//Quote-form
function getBaseURL() {
    var url = location.href;  // entire url including querystring - also: window.location.href;
    var baseURL = url.substring(0, url.indexOf('/', 14));


    if (baseURL.indexOf('http://localhost') != -1) {
        // Base Url for localhost
        var url = location.href;  // window.location.href;
        var pathname = location.pathname;  // window.location.pathname;
        var index1 = url.indexOf(pathname);
        var index2 = url.indexOf("/", index1 + 1);
        var baseLocalUrl = url.substr(0, index2);

        return baseLocalUrl + "/";
    }
    else {
        // Root Url for domain name
        return baseURL + "/";
    }

}
function showoption()
{
				if (document.getElementById("frm_size").value.length==0)
				{
				alert("Please select size to be moved");
				document.getElementById("frm_size").focus();
				return false;
				}
				if((document.getElementById("frm_zip").value == "")||(document.getElementById("frm_zip").value == "ex: 10701"))
				{
					alert("Please enter your zipcode");
					document.getElementById("frm_zip").focus();
					return false;
				}   
				if((document.getElementById("to_city").value == "")||(document.getElementById("to_city").value == "ex: 10701"))
				{
					alert("Please enter zipcode to move");
					document.getElementById("to_city").focus();
					return false;
				}  
//				if(document.getElementById("inputString").value == "")
//				{
//					alert("Please enter your state");
//					document.getElementById("inputString").focus();
//					return false;
//				}  
				if(document.getElementById("frm_email").value == "")
				{
					alert("Please enter your email id");
					document.getElementById("frm_email").focus();
					return false;
				}   
				var re = /^[_\.0-9a-z-]+\@([0-9a-z][0-9a-z-]*\.)+([a-z]{2,4})+$/i
				if (!document.getElementById("frm_email").value.match(re)) 
				{
					alert('Please enter a valid email id')
					document.getElementById("frm_email").focus();
					return false;
				}
			document.getElementById('formone').style.display = "none";
			document.getElementById('formtwo').style.display = "block";
			//alert("2333");
}

var xmlHttpform,xmlHttpadv,xmlHttpcity,xmlHttpzip,xmlHttpzip_sel,in_xmlHttpform,in_xmlHttpadv,on_xmlHttpcity,on_xmlHttpzip,on_xmlHttpzip_sel,fr_xmlHttpcity,fr_xmlHttpzip,fr_xmlHttpzip_sel,fr_on_xmlHttpcity,fr_on_xmlHttpzip,fr_on_xmlHttpzip_sel;
function loadform(val)
{ 
//alert(val);
	xmlHttpform=GetXmlHttpObject()
	if(xmlHttpform==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var url;
    if(val != "")
	{
			if(document.getElementById("frm_date").value == "")
			{
			alert("Please enter the estimate date");
			document.getElementById("frm_date").focus();
			return false;
			}  
			var fromdat = document.getElementById("frm_date").value;
			/*if(fromdat != "")
			{
				var currentTime = new Date();
				
				var month = currentTime.getMonth() + 1;
				var day = currentTime.getDate();
				var year = currentTime.getFullYear();
				//var datn = day+"-"+month+"-"+year;
				var datn = month+"-"+day+"-"+year;

				var fir = dateCompare(datn,fromdat,'<=');
				if(fir == false) 
				{
				alert("Please Enter a Valid Date");
				document.getElementById("frm_date").focus();
				return false;
				}
			}*/
			if(document.getElementById("frm_fname").value == "")
			{
			alert("Please enter the first name");
			document.getElementById("frm_fname").focus();
			return false;
			}  
			if(document.getElementById("frm_lname").value == "")
			{
			alert("Please enter the last name");
			document.getElementById("frm_lname").focus();
			return false;
			}  
			if(document.getElementById("frm_tel").value == "")
			{
			alert("Please enter the contact number");
			document.getElementById("frm_tel").focus();
			return false;
			}  
			document.getElementById('formone').style.display = "block";
			document.getElementById('formtwo').style.display = "none";
			var frm_size = document.getElementById("frm_size").value;
			var frm_zip = document.getElementById("frm_zip").value;
			var to_city = document.getElementById("to_city").value;
			<!--var frm_state = document.getElementById("frm_state").value;-->
			var frm_email = document.getElementById("frm_email").value;
			var frm_date= document.getElementById("frm_date").value;
			var frm_fname= document.getElementById("frm_fname").value;
			var frm_lname= document.getElementById("frm_lname").value;
			var frm_tel= document.getElementById("frm_tel").value;
			var frm_tel_two= document.getElementById("frm_tel_two").value;
			var frm_tel_three= document.getElementById("frm_tel_three").value;
				url="process_r/form-action.php?frm_size="+frm_size+"&frm_zip="+frm_zip+"&to_city="+to_city+"&frm_email="+frm_email+"&frm_date="+frm_date+"&frm_fname="+frm_fname+"&frm_lname="+frm_lname+"&frm_tel="+frm_tel+"&frm_tel_two="+frm_tel_two+"&frm_tel_three="+frm_tel_three;	
			}else{
			   url="support/search-form.php";
			}
	//alert(val+"**");
		//alert(url);
	xmlHttpform.onreadystatechange=stateChangedfun 
	xmlHttpform.open("GET",url,true)
	xmlHttpform.send(null)
}
function stateChangedfun() 
{ 
	if (xmlHttpform.readyState==4 || xmlHttpform.readyState=="complete")
	{ 
		  //alert(xmlHttpform.responseText);
			   document.getElementById("frm").innerHTML=xmlHttpform.responseText;

	}
	if (xmlHttpform.readyState==1)
	{ 
			document.getElementById("frm").innerHTML="Please wait....";
	} 
} 

function cc1()
{
var l = document.getElementById("frm_tel").value.length;
	
	if(l==3)
	{
		document.getElementById("frm_tel_two").focus();
	}
	
}
function cc2()
{
var la = document.getElementById("frm_tel_two").value.length;
	
	if(la==3)
	{
		document.getElementById("frm_tel_three").focus();
	}
	
}
function in_cc1()
{
var lx = document.getElementById("in_frm_tel").value.length;
	
	if(lx==3)
	{
		document.getElementById("in_frm_tel_two").focus();
	}
	
}
function  in_cc2()
{
var ly = document.getElementById("in_frm_tel_two").value.length;
	
	if(ly==3)
	{
		document.getElementById("in_frm_tel_three").focus();
	}
	
}

function in_showoption()
{
				if (document.getElementById("in_frm_size").value.length==0)
				{
				alert("Please select size to be moved");
				document.getElementById("in_frm_size").focus();
				return false;
				}
				if((document.getElementById("in_frm_zip").value == "")||(document.getElementById("in_frm_zip").value == "(ex: 10701)"))
				{
					alert("Please enter moving from zip");
					document.getElementById("in_frm_zip").focus();
					return false;
				}   
				if((document.getElementById("in_to_city").value == "")||(document.getElementById("in_to_city").value == "(ex: 10701)"))
				{
					alert("Please enter zipcode to move");
					document.getElementById("in_to_city").focus();
					return false;
				}  
//				if(document.getElementById("in_inputString").value == "")
//				{
//					alert("Please enter your state");
//					document.getElementById("in_inputString").focus();
//					return false;
//				}  
				if(document.getElementById("in_frm_email").value == "")
				{
					alert("Please enter your email id");
					document.getElementById("in_frm_email").focus();
					return false;
				}   
				var re = /^[_\.0-9a-z-]+\@([0-9a-z][0-9a-z-]*\.)+([a-z]{2,4})+$/i
				if (!document.getElementById("in_frm_email").value.match(re)) 
				{
					alert('Please enter a valid email id')
					document.getElementById("in_frm_email").focus();
					return false;
				}
			document.getElementById('in_formone').style.display = "none";
			document.getElementById('in_formtwo').style.display = "block";
			//alert("2333");
}

function in_loadform(in_val)
{ 
//alert(val);
	in_xmlHttpform=GetXmlHttpObject()
	if(in_xmlHttpform==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var in_url;
var site_url = getBaseURL();
    if(in_val != "")
	{
			if(document.getElementById("in_frm_date").value == "")
			{
			alert("Please enter the estimate date");
			document.getElementById("in_frm_date").focus();
			return false;
			} 
			var fromdat = document.getElementById("in_frm_date").value;
			if(fromdat != "")
			{
				var currentTime = new Date();
				
				var month = currentTime.getMonth() + 1;
				var day = currentTime.getDate();
				var year = currentTime.getFullYear();
				var datn = day+"-"+month+"-"+year;
				
				var fir = dateCompare(datn,fromdat,'<=');
				if(fir == false)
				{
				alert("Please Enter a Valid Date");
				document.getElementById("in_frm_date").focus();
				return false;
				}
			}			if(document.getElementById("in_frm_fname").value == "")
			{
			alert("Please enter the first name");
			document.getElementById("in_frm_fname").focus();
			return false;
			}  
			if(document.getElementById("in_frm_lname").value == "")
			{
			alert("Please enter the last name");
			document.getElementById("in_frm_lname").focus();
			return false;
			}  
			if(document.getElementById("in_frm_tel").value == "")
			{
			alert("Please enter the contact number");
			document.getElementById("in_frm_tel").focus();
			return false;
			}  
			document.getElementById('in_formone').style.display = "block";
			document.getElementById('in_formtwo').style.display = "none";
			var in_frm_size = document.getElementById("in_frm_size").value;
			var in_frm_zip = document.getElementById("in_frm_zip").value;
			var in_to_city = document.getElementById("in_to_city").value;
			//var in_frm_state = document.getElementById("in_inputString").value;
			var in_frm_email = document.getElementById("in_frm_email").value;
			var in_frm_date= document.getElementById("in_frm_date").value;
			var in_frm_fname= document.getElementById("in_frm_fname").value;
			var in_frm_lname= document.getElementById("in_frm_lname").value;
			var in_frm_tel= document.getElementById("in_frm_tel").value;
			var in_frm_tel_two= document.getElementById("in_frm_tel_two").value;
			var in_frm_tel_three= document.getElementById("in_frm_tel_three").value;
				in_url=site_url+"process_r/inform-action.php?in_frm_size="+in_frm_size+"&in_frm_zip="+in_frm_zip+"&in_to_city="+in_to_city+"&in_frm_email="+in_frm_email+"&in_frm_date="+in_frm_date+"&in_frm_fname="+in_frm_fname+"&in_frm_lname="+in_frm_lname+"&in_frm_tel="+in_frm_tel+"&in_frm_tel_two="+in_frm_tel_two+"&in_frm_tel_three="+in_frm_tel_three;	
			}else{
			   in_url=site_url+"support/in_search-form.php";
			}
		//alert(in_url);
	in_xmlHttpform.onreadystatechange=in_stateChangedfun 
	in_xmlHttpform.open("GET",in_url,true)
	in_xmlHttpform.send(null)
}
function in_stateChangedfun() 
{ 
	if (in_xmlHttpform.readyState==4 || in_xmlHttpform.readyState=="complete")
	{ 
		   //alert(xmlHttpform.responseText);
			   document.getElementById("in_frm").innerHTML=in_xmlHttpform.responseText;

	}
	if (in_xmlHttpform.readyState==1)
	{ 
			document.getElementById("in_frm").innerHTML="Please wait....";
	} 
} 

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
	objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
	objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
} 

//Quote-form ends here
function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion) >= 4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage;}}else if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)location.reload();}MM_reloadPage(true);

function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()

//Show layers
function show(id)
{
this.css=bw.dom? document.getElementById(id).style:bw.ie4?document.all[id].style:bw.ns4?document.layers[id]:0;	
this.css.visibility='visible'
//document.getElementById('about_1').style.color='#000000';
}	
//Hide a layer
function hide(id)
{
	this.css=bw.dom? document.getElementById(id).style:bw.ie4?document.all[id].style:bw.ns4?document.layers[id]:0;	
	this.css.visibility='hidden';

}

function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore)selObj.selectedIndex=0;}function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
   function changeCSS(obj, bgColor, bdColor, ftColor) {
   	if (document.getElementById) {
		obj.style.backgroundColor = bgColor;
		obj.style.borderColor = bdColor;
		obj.style.color = ftColor;
	}
}
	function lookup(inputString)
	{
		if(inputString.length == 0)
		{
			// Hide the suggestion box.
			$('#suggestions').hide();
			} else {
			// post data to our php processing page and if there is a return greater than zero
			// show the suggestions box
			$.post("string_search.php", {mysearchString: ""+inputString+""}, function(data){
				if(data.length >0)
				{
				$('#suggestions').show();
				$('#autoSuggestionsList').html(data);
				}
			});
		}
	} //end
	
	// if user clicks a suggestion, fill the text box.
	function fill(thisValue) {
	$('#inputString').val(thisValue);
	setTimeout("$('#suggestions').hide();", 200);
	}
	//In State
		function in_lookup(inputString)
	{
		if(inputString.length == 0)
		{
			// Hide the suggestion box.
			$('#in_suggestions').hide();
			} else {
			// post data to our php processing page and if there is a return greater than zero
			// show the suggestions box
			$.post("in_string_search.php", {mysearchString: ""+inputString+""}, function(data){
				if(data.length >0)
				{
				$('#in_suggestions').show();
				$('#in_autoSuggestionsList').html(data);
				}
			});
		}
	} //end
	
	// if user clicks a suggestion, fill the text box.
	function in_fill(thisValue) {
	$('#in_inputString').val(thisValue);
	setTimeout("$('#in_suggestions').hide();", 200);
	}
	

//In state ends here
//Form Date
	function cc1()
{
var l = document.getElementById("frm_tel").value.length;
	
	if(l==3)
	{
		document.getElementById("frm_tel_two").focus();
	}
	
}

function cc2()
{
var la = document.getElementById("frm_tel_two").value.length;
	
	if(la==3)
	{
		document.getElementById("frm_tel_three").focus();
	}
	
}

	//Form Date ends here
	
	
	
	 /*******************To allow only integers*********************/
 function numcheck(event) 
 {
 
 if(navigator.appName != "Microsoft Internet Explorer" )
 {
  if( (event.which >= 48 && event.which <= 57) || (event.which == 8 )  || (event.which==0) )
	   {
	     return; 
		}
  else
   { 
  		return false;
  	}
 }
 else
 {
    if( (event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 8 ) )
	   {
	     return; 
	}
  else { 
    return false;
  }
	}
 }

 /**********************/
function clearText(field)
{
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}
/*************************/
function dateCompare(sSrc,sDes,sOp)
{
	
   var oSrcDt,oDesDt;
   var aStrTok;

   var iDt1,iDt2;

   aStrTok=sSrc.split("-");
   if(aStrTok.length !=3 ) return false;

   oSrcDt=new Date(aStrTok[2],aStrTok[1]-1,aStrTok[0]);
  

   iDt1 = Date.parse(oSrcDt);

   if ( isNaN(iDt1)) iDt1=0;

   aStrTok=sDes.split("-");
   if(aStrTok.length !=3 ) return false;

  oDesDt=new Date(aStrTok[2],aStrTok[1]-1,aStrTok[0]);
  

   iDt2 = Date.parse(oDesDt);

   if (isNaN(iDt2)) iDt2=0;

   if(sOp!='>' && sOp!='<' && sOp!='==' && sOp!='<=' && sOp!='>=' && sOp!='<>' && sOp!='!='){SetStatus('Operator is not valid !'); return ;}	
  
  switch (sOp)
   {
     case ">":
			return (iDt1 > iDt2);
     case "<":
			return (iDt1 < iDt2);
     case "=": case "==":
            return (iDt1 == iDt2);
     case "<=":
			return (iDt1 <= iDt2);
     case ">=":
           return (iDt1 >= iDt2);
     case "!=" : case "<>":
           return (iDt1 != iDt2);
     default:
		   return false;
   }
 }
 
 /* zip code*/
 
 function OpenZipFinder() {
	day = new Date();
	id = day.getTime();
	URL = 'ZipLocator.php'
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=400,left = 362,top = 234');");
}

function city_sel(sc)
{
	xmlHttpcity=GetXmlHttpObject()
	if(xmlHttpcity==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var cityurl;
	cityurl = "process_r/cityload.php?sc="+sc;
	xmlHttpcity.onreadystatechange=stateChanged_city 
	//alert(cityurl);
	xmlHttpcity.open("GET",cityurl,true)
	xmlHttpcity.send(null)
}

function stateChanged_city() 
{ 
	if (xmlHttpcity.readyState==4 || xmlHttpcity.readyState=="complete")
	{ 
		 //alert(xmlHttpcity.responseText);
			   document.getElementById("city_sel").innerHTML=xmlHttpcity.responseText;

	}
	if (xmlHttpcity.readyState==1)
	{ 
			document.getElementById("city_sel").innerHTML="Please wait....";
	} 
} 

function sel_zipcode(st,cn,pgr)
{
	xmlHttpzip=GetXmlHttpObject()
	if(xmlHttpzip==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var zipurl;
	zipurl = "process_r/zipload.php?st="+st+"&cn="+cn+"&pgr="+pgr;
	xmlHttpzip.onreadystatechange=stateChanged_zip 
	//alert(zipurl);
	xmlHttpzip.open("GET",zipurl,true)
	xmlHttpzip.send(null)
}
function stateChanged_zip() 
{ 
	if (xmlHttpzip.readyState==4 || xmlHttpzip.readyState=="complete")
	{ 
		 // alert(xmlHttpzip.responseText);
			   document.getElementById("zip_loc").innerHTML=xmlHttpzip.responseText;

	}
	if (xmlHttpzip.readyState==1)
	{ 
			document.getElementById("zip_loc").innerHTML="Please wait....";
	} 
} 
function zip_select(zip)
{
	window.opener.document.getElementById("to_city").value = zip;
	self.close();
}


 /* zip code end here*/
 
  /* From zip code*/
 
 function fr_OpenZipFinder() {
	day = new Date();
	id = day.getTime();
	URL = 'fr_ZipLocator.php'
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=400,left = 362,top = 234');");
}

function fr_city_sel(sc)
{
	fr_xmlHttpcity=GetXmlHttpObject()
	if(fr_xmlHttpcity==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var fr_cityurl;
	fr_cityurl = "process_r/fr_cityload.php?sc="+sc;
	fr_xmlHttpcity.onreadystatechange=fr_stateChanged_city 
	//alert(fr_cityurl);
	fr_xmlHttpcity.open("GET",fr_cityurl,true)
	fr_xmlHttpcity.send(null)
}

function fr_stateChanged_city() 
{ 
	if (fr_xmlHttpcity.readyState==4 || fr_xmlHttpcity.readyState=="complete")
	{ 
		 //alert(xmlHttpcity.responseText);
			   document.getElementById("city_sel").innerHTML=fr_xmlHttpcity.responseText;

	}
	if (fr_xmlHttpcity.readyState==1)
	{ 
			document.getElementById("city_sel").innerHTML="Please wait....";
	} 
} 

function fr_sel_zipcode(st,cn,pgr)
{
	fr_xmlHttpzip=GetXmlHttpObject()
	if(fr_xmlHttpzip==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var fr_zipurl;
	fr_zipurl = "process_r/fr_zipload.php?st="+st+"&cn="+cn+"&pgr="+pgr;
	fr_xmlHttpzip.onreadystatechange=fr_stateChanged_zip 
	//alert(fr_zipurl);
	fr_xmlHttpzip.open("GET",fr_zipurl,true)
	fr_xmlHttpzip.send(null)
}
function fr_stateChanged_zip() 
{ 
	if (fr_xmlHttpzip.readyState==4 || fr_xmlHttpzip.readyState=="complete")
	{ 
		 // alert(xmlHttpzip.responseText);
			   document.getElementById("zip_loc").innerHTML=fr_xmlHttpzip.responseText;

	}
	if (fr_xmlHttpzip.readyState==1)
	{ 
			document.getElementById("zip_loc").innerHTML="Please wait....";
	} 
} 
function fr_zip_select(fr_zip)
{
	window.opener.document.getElementById("frm_zip").value = fr_zip;
	self.close();
}


 /* From zip code end here*/
 
 
 
 /* zip code inner cms*/
 
 function on_OpenZipFinder() {
	day = new Date();
	id = day.getTime();
	URL = 'on_ZipLocator.php'
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=400,left = 362,top = 234');");
}

function on_city_sel(sc)
{
	on_xmlHttpcity=GetXmlHttpObject()
	if(on_xmlHttpcity==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var on_cityurl;
	on_cityurl = "process_r/on_cityload.php?sc="+sc;
	on_xmlHttpcity.onreadystatechange=on_stateChanged_city 
	//alert(on_cityurl);
	on_xmlHttpcity.open("GET",on_cityurl,true)
	on_xmlHttpcity.send(null)
}

function on_stateChanged_city() 
{ 
	if (on_xmlHttpcity.readyState==4 || on_xmlHttpcity.readyState=="complete")
	{ 
		 //alert(xmlHttpcity.responseText);
			   document.getElementById("city_sel").innerHTML=on_xmlHttpcity.responseText;

	}
	if (on_xmlHttpcity.readyState==1)
	{ 
			document.getElementById("city_sel").innerHTML="Please wait....";
	} 
} 

function on_sel_zipcode(st,cn,pgr)
{
	on_xmlHttpzip=GetXmlHttpObject()
	if(on_xmlHttpzip==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var on_zipurl;
	on_zipurl = "process_r/on_zipload.php?st="+st+"&cn="+cn+"&pgr="+pgr;
	on_xmlHttpzip.onreadystatechange=on_stateChanged_zip 
	//alert(on_zipurl);
	on_xmlHttpzip.open("GET",on_zipurl,true)
	on_xmlHttpzip.send(null)
}
function on_stateChanged_zip() 
{ 
	if (on_xmlHttpzip.readyState==4 || on_xmlHttpzip.readyState=="complete")
	{ 
		 // alert(xmlHttpzip.responseText);
			   document.getElementById("zip_loc").innerHTML=on_xmlHttpzip.responseText;

	}
	if (on_xmlHttpzip.readyState==1)
	{ 
			document.getElementById("zip_loc").innerHTML="Please wait....";
	} 
} 
function on_zip_select(zip_on)
{
	//alert(zip_on);
	window.opener.document.getElementById("in_to_city").value = zip_on;
	self.close();
}


 /* zip code end here*/
 /* from zip code inner cms*/
 
 function fr_on_OpenZipFinder() {
	day = new Date();
	id = day.getTime();
	URL = 'fr_on_ZipLocator.php'
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=400,left = 362,top = 234');");
}

function fr_on_city_sel(sc)
{
	fr_on_xmlHttpcity=GetXmlHttpObject()
	if(fr_on_xmlHttpcity==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var fr_on_cityurl;
	fr_on_cityurl = "process_r/fr_on_cityload.php?sc="+sc;
	fr_on_xmlHttpcity.onreadystatechange=fr_on_stateChanged_city 
	//alert(fr_on_cityurl);
	fr_on_xmlHttpcity.open("GET",fr_on_cityurl,true)
	fr_on_xmlHttpcity.send(null)
}

function fr_on_stateChanged_city() 
{ 
	if (fr_on_xmlHttpcity.readyState==4 || fr_on_xmlHttpcity.readyState=="complete")
	{ 
		//alert(fr_on_xmlHttpcity.responseText);
			   document.getElementById("city_sel").innerHTML=fr_on_xmlHttpcity.responseText;

	}
	if (fr_on_xmlHttpcity.readyState==1)
	{ 
			document.getElementById("city_sel").innerHTML="Please wait....";
	} 
} 

function fr_on_sel_zipcode(st,cn,pgr)
{
	fr_on_xmlHttpzip=GetXmlHttpObject()
	if(fr_on_xmlHttpzip==null)
	{
	alert ("Browser does not support HTTP Request")
	return
	} 
	var fr_on_zipurl;
	fr_on_zipurl = "process_r/fr_on_zipload.php?st="+st+"&cn="+cn+"&pgr="+pgr;
	fr_on_xmlHttpzip.onreadystatechange=fr_on_stateChanged_zip 
	//alert(fr_on_zipurl);
	fr_on_xmlHttpzip.open("GET",fr_on_zipurl,true)
	fr_on_xmlHttpzip.send(null)
}
function fr_on_stateChanged_zip() 
{ 
	if (fr_on_xmlHttpzip.readyState==4 || fr_on_xmlHttpzip.readyState=="complete")
	{ 
		  //alert(fr_on_xmlHttpzip.responseText);
			   document.getElementById("zip_loc").innerHTML=fr_on_xmlHttpzip.responseText;

	}
	if (fr_on_xmlHttpzip.readyState==1)
	{ 
			document.getElementById("zip_loc").innerHTML="Please wait....";
	} 
} 
function fr_on_zip_select(zip_on)
{
	//alert(zip_on);
	window.opener.document.getElementById("in_frm_zip").value = zip_on;
	self.close();
}


 /* from zip code end here*/


