		var param=0
		var total=0		//numer of records
		var skok=20
		var xmldsoObj;
		function changeto(highlightcolor)
		{
			source=event.srcElement
			if (source.tagName=="TR"||source.tagName=="TABLE")
				return
			while(source.tagName!="TR")
				source=source.parentElement
			if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
					source.style.backgroundColor=highlightcolor
		}
		
		function changeback(originalcolor){
		if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
		return
		if (event.toElement!=source)
			source.style.backgroundColor="transparent"
		}
		function info()
		{
			nrPage.innerText=xmldsoObj.recordset.absolutepage;
			allpage.innerText=xmldsoObj.recordset.pagecount;
			if (xmldsoObj.recordset.absolutepage == 1)
				{
					document.all("but1").style.display="none"
					document.all("but2").style.display="none"
				}
			else
				{	
					document.all("but1").style.display="block"
					document.all("but2").style.display="block"
				}
			if (xmldsoObj.recordset.absolutepage == xmldsoObj.recordset.pagecount)
				{
					document.all("but3").style.display="none"
					document.all("but4").style.display="none"
				}
			else
				{	
					document.all("but3").style.display="block"
					document.all("but4").style.display="block"
				}
		}	
		
		function jump(param)
		{
			xmldsoObj.recordset.Movefirst
			xmldsoObj.recordset.Move(param-1)
			pom= xmldsoObj.recordset("nid")
			if (pom!='') { 
				parent.parent.frames['fraContent'].document.location.href='../employees/employees.asp?id='+pom
			}
		}

		function table_resize(param)
		{
			TABLE1.dataPageSize = param;
			xmldsoObj.recordset.pagesize=param;
			skok=param
			info()
		}
		function initialize(rss)
		{
			xmldsoObj=rss
			form1.r_size.value=skok;
			xmldsoObj.recordset.movefirst;
			xmldsoObj.recordset.pagesize=skok;
			total=xmldsoObj.recordset.recordcount;
			//if (total==1) total=0
			
			tdLetter.innerText = olet=='0' ? '' : olet;
			//tdLetter.innerText = olet;
			tdTotal.innerText=total;
			info();
		}
		function click_fullprevious()
		{
			TABLE1.firstPage();
			xmldsoObj.recordset.movefirst;
			info();
		}
		function click_previous()
		{
			TABLE1.previousPage();
			if (xmldsoObj.recordset.absolutepage > 1)
				xmldsoObj.recordset.move(-skok);
			info()
		}
		function click_next()
		{
			TABLE1.nextPage();
			if (xmldsoObj.recordset.absolutepage < xmldsoObj.recordset.pagecount)
				xmldsoObj.recordset.move(skok);
				if (xmldsoObj.recordset.EOF)
					xmldsoObj.recordset.movelast;
			info()
		}
		function click_fullnext()
		{
			TABLE1.lastPage();
			xmldsoObj.recordset.movelast;
			info()
		}
		function recor_sort(param)
		{
	        //xmldsoObj.SortColumn="no";//param;
  			//TABLE1.Reset();

		}

