function ChangeOptions(txt_cate, lstPrimary, lstSecondary, strArray,form)
	{
	  var alen    = eval(strArray + ".length");
	  var listLen = 0;
	  text = new String("--Select One--");

	  var strKey  = eval("document."+form+"." + lstPrimary + ".options[document."+form+"." + lstPrimary + ".selectedIndex].value")
	  
	  var strKey1  = eval("document."+form+"." + txt_cate + ".options[document."+form+"." + txt_cate + ".selectedIndex].value")
	  
	  
	  eval("document."+form+"." + lstSecondary + ".options.length = 0");
	  eval("document."+form+"." + lstSecondary + ".options[0] = new Option(text,0)");
	   listLen = listLen + 1;
	if ((strKey != 0) && (strKey1 != 0) )
	 {

	 for (var i = 0; i < alen; i++) 
	  {
  		var dum_str = strArray + "[i][1] == " + strKey1 ;


	/*	if ((eval(strArray + "[i][0] == " + strKey)) && (eval(dum_str)) )   */
	if ((eval(strArray + "[i][0] =='" + strKey+"'")) && (eval(dum_str)) )
	    {
	    eval("document."+form+"." + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][3], " + strArray + "[i][2])");
	    listLen = listLen + 1;
	    }
	  }
	 }
	else	
		{
				for (var i = 0; i < alen; i++) 
	  				{
	   					
	    						eval("document."+form+"." + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][3], " + strArray + "[i][2])");
	    						listLen = listLen + 1;
	    					
	  				}
		
		}	  
	  		eval("document."+form+"." + lstSecondary + ".options[0].selected = true");

	  	if(navigator.appName=="Netscape")
		{
//			history.go(0);
		}
	 
	}
	

	

	
	
	
	
	
	

	
function ChangeOptions1(lstPrimary, lstSecondary, strArray,form)
	{	 
	  var alen    = eval(strArray + ".length");	  
	  var listLen = 0;
	  text = new String("--Select One--");
	  
	  var strKey  = eval("document."+form+"." + lstPrimary + ".options[document."+form+"." + lstPrimary + ".selectedIndex].value")
	  
	  
	  eval("document."+form+"." + lstSecondary + ".options.length = 0");
	  eval("document."+form+"." + lstSecondary + ".options[0] = new Option(text,0)");
	   listLen = listLen + 1;
	if (strKey != 0)
	 {
	   
	 for (var i = 0; i < alen; i++) 
	  {
	  	var dum_str = strArray + "[i][0] == '" + strKey + "'";
		if (eval(dum_str))
	    {
	    eval("document."+form+"." + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][2], " + strArray + "[i][1])");
	    listLen = listLen + 1;
	    }
	  }
	 }
	else	
		{
				for (var i = 0; i < alen; i++) 
	  				{
	   					
	    						eval("document."+form+"." + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][2], " + strArray + "[i][1])");
	    						listLen = listLen + 1;
	    					
	  				}
		
		}	  
	  		eval("document."+form+"." + lstSecondary + ".options[0].selected = true");
	  	if(navigator.appName=="Netscape")
		{
//			history.go(0);
		}
	 
	}
	
	
	


	
function SelectOptions(lstPrimary, lstSecondary, strArray,form)
	{
	  var alen    = eval(strArray + ".length");
	  var listLen = 0;
	  


	  text = new String("--Select One--");
	  
	  var strKey  = eval("document."+form+"." + lstPrimary + ".options[document."+form+"." + lstPrimary + ".selectedIndex].value")


	  eval("document."+form+"." + lstSecondary + ".options.length = 0");
	  eval("document."+form+"." + lstSecondary + ".options[0] = new Option(text,0)");
           listLen = listLen + 1;
	if (strKey != 0)
	 {

	 for (var i = 0; i < alen; i++) 
	  {
	  	var dum_str = strArray + "[i][0] == '" + strKey + "'";    



		if (eval(dum_str))
	    {
	    eval("document."+form+"." + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][2], " + strArray + "[i][1])");


             listLen = listLen + 1;
	  }

            }


	 }
	else	
		{
				for (var i = 0; i < alen; i++) 
	  				{
	    						eval("document."+form+"." + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][2], " + strArray + "[i][1])");
	    						listLen = listLen + 1;


	  				}
		
		}



	  	if(navigator.appName=="Netscape")
		{
//			history.go(0);
		}
	 
	}
	



function Changecity(lstPrimary, lstSecondary, strArray,form)
	{

	  var alen    = eval(strArray + ".length");
	  var listLen = 0;
	  text = new String("--Select One--");

	  var strKey  = eval("document."+form+"." + lstPrimary + ".options[document."+form+"." + lstPrimary + ".selectedIndex].value")

	  eval("document."+form+"." + lstSecondary + ".options.length = 0");
	  eval("document."+form+"." + lstSecondary + ".options[0] = new Option(text,0)");
	   listLen = listLen + 1;
	if (strKey != 0)
	 {

	 for (var i = 0; i < alen; i++) 
	  {

	if (eval(strArray + "[i][0] =='" + strKey+"'"))
	    {
	    eval("document."+form+"." + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][2], " + strArray + "[i][1])");
	    listLen = listLen + 1;
	    }
	  }
	 }
	else	
		{
				for (var i = 0; i < alen; i++) 
	  				{
	   					
	    						eval("document."+form+"." + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][2], " + strArray + "[i][1])");
	    						listLen = listLen + 1;
	    					
	  				}
		
		}	  
	  		eval("document."+form+"." + lstSecondary + ".options[0].selected = true");
	  	if(navigator.appName=="Netscape")
		{
//			history.go(0);
		}

	}


///////////// AJAX FUNCTIONS
var xmlHttp

function showCity(str)
{ 

	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	var url="includes\\cities_ajax.php";
	url=url+"?q="+str;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
///////////////////////////////////////
function showCity1(str)
{ 

	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	var url="includes\\cities_ajax1.php";
	url=url+"?q="+str;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
//////////////////////////////////http://www.luxurypass.com/

/***********************************/
//show pending and approved service providers
function showResult()
{ 

	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	var url="index.php?module=Lp_ServiceMd&type=admin&func=servicechangestatues&swhere=changereq&bfield=status&btable=bizpending";
	//url=url+"?q="+str;
	//url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=getResult;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function getResult() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("txtResult").innerHTML=xmlHttp.responseText;
	}
}
/***********************************/

function showService(str)
{ 

	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	} 
	var url="includes\\services_ajax.php";	
	url=url+"?q="+str;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChanged1;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("txtCity").innerHTML=xmlHttp.responseText;
	}
}

function stateChanged1() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("txtService").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
  	{
  		// Firefox, Opera 8.0+, Safari
  		xmlHttp=new XMLHttpRequest();
  	}
	catch (e)
  	{
  		// Internet Explorer
  		try
    	{
    		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    	}
  		catch (e)
    	{
    		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    	}
  	}
	return xmlHttp;
}
///////////// END AJAX FUNCTIONS



