

	function populateAll(status)
	{
		document.getElementById("letterDiv").style.visibility="visible";		
		document.getElementById("letterDiv").style.display="block";		
		status=status
		populateProducts('',status)
	}
	function populateProducts(letter,status)
	{
		status = status;
		var szURL = "/bindProductList.asp?letter="+letter+"&status="+status+"&sid="+Math.random();
		document.getElementById("productsDiv").innerHTML = "";
		document.getElementById("productsDiv").innerHTML="<table width=100% align=center border=0 cellpadding=0 cellspacing=0 bgcolor='#eeeeee' height=80><tr><td width=100% align=center valign=middle><img src='http://www.fibre2fashion.com/_resources/images/loading.gif' border=0><br><font face=arial size=2><b>Please wait while the records are being fetched</b></font></td></tr></table>";
							
		var xmlHttp = null 	
			if (typeof window.ActiveXObject != 'undefined' ) 
			{ 
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
			} 
			else 
			{ 
				xmlHttp = new XMLHttpRequest(); 
			}


			xmlHttp.open("GET", szURL, false);
			xmlHttp.send(null);
			
			if (xmlHttp.readyState == 4 || xmlHttp.readyState=="complete") 
			{	
				document.getElementById("productsDiv").innerHTML=xmlHttp.responseText
				document.getElementById("productsDiv").style.visibility="visible";		
			}
			
			self.focus();
	}
		
	
	function bindPhoneTip(rootPath,company_name,user_id,country,paid,status,objDiv)
	{
		
		szURL = '/includes/bindPhoneTip.asp?company_name='+escape(company_name)+'&user_id='+user_id+'&country='+escape(country)+'&paid='+paid+'&status='+status;
				
		var xmlHttp = null;
		e = event;
		
		if (typeof window.ActiveXObject != 'undefined' ) 
		{ 
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
		} 
		else 
		{ 
			xmlHttp = new XMLHttpRequest(); 
		}


		xmlHttp.open("GET", szURL, false);
		xmlHttp.send(null);
		
		if (xmlHttp.readyState == 4 || xmlHttp.readyState=="complete") 
		{	
			objDiv = document.getElementById(objDiv)
			objDiv.innerHTML = xmlHttp.responseText;
			objDiv.style.display = "block";
			
			var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
	
			if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 
			var leftPos = e.clientX - 100;
	
			if(leftPos<0)leftPos = 0;	
				objDiv.style.left = leftPos + 'px';
			objDiv.style.top = e.clientY - objDiv.offsetHeight -1 + st + 'px';
		}
			
	}
	
function hidePhoneTip(objDiv)
{	
	document.getElementById(objDiv).style.display="none";
}