 function get_weath()
		 {
			if(document.Form1.MainSite_Left1_txtweather.value == "")
			{
				alert("Please Enter City, State or US Zip Code");
				document.Form1.MainSite_Left1_txtweather.focus();
				return false;
			}
			
			if(IsNumber(document.Form1.MainSite_Left1_txtweather.value) == true)
			{
				var zip = document.Form1.MainSite_Left1_txtweather.value;
				if (zip.length > 5)
				{
					alert("Invalid City, State or US Zip Code");
					document.Form1.MainSite_Left1_txtweather.focus();
					return false
				}
			}
		}
		
	function login_chk()
		{
			if(document.Form1.MainSite_Left1_txtloginanme.value == "")
			{
				alert("Enter Email Address");
				document.Form1.MainSite_Left1_txtloginanme.focus();
				return false;
			}
			if(document.Form1.MainSite_Left1_txtloginpass.value == "")
			{
				alert("Enter Password");
				document.Form1.MainSite_Left1_txtloginpass.focus();
				return false;
			}
		return true
		
		}
		
		 function IsNumber(strString)
		 //  check for valid numeric strings
		 {
			 var strValidChars = "0123456789";
			 var strChar;
			 var blnResult = true;
   
		//  test strString consists of valid characters listed above
			for (i = 0; i < strString.length && blnResult == true; i++)
			{
				strChar = strString.charAt(i);
				if (strValidChars.indexOf(strChar) == -1)
				{
					blnResult = false;
				}
			}
			return blnResult;
		}
		
		function login_chk_top()
		{
			if(document.Form1.MainSite_Top1_txtloginanme.value == "")
			{
				alert("Enter Email address");
				document.Form1.MainSite_Top1_txtloginanme.focus();
				return false;
			}
			if(document.Form1.MainSite_Top1_txtloginpass.value == "")
			{
				alert("Enter Password");
				document.Form1.MainSite_Top1_txtloginpass.focus();
				return false;
			}
		return true
		
		}
		
		function chk_search()
			{
				var d=document.Form1;
				if ((d.MainSite_Left1_dd_state.value == "0") || (document.getElementById('MainSite_Left1_dd_state').selectedIndex == '0'))						
				{
					alert("Select a State");
							d.MainSite_Left1_dd_state.focus();
							return false;
						}
						if ((d.MainSite_Left1_dd_city.value == "0") || (document.getElementById('MainSite_Left1_dd_city').selectedIndex == '0'))
						{
							alert("Select a City");
							d.MainSite_Left1_dd_city.focus();
							return false;
						}
						/*if (d.MainSite_Left1_dd_date.value == "Select a Date")
						{
							alert("Select a date");
							d.MainSite_Left1_dd_date.focus();
							return false;
						}*/
						/* if (d.MainSite_Left1_dd_MinTemp.value == "0")
						{
							alert("Select a Min Temperature value");
							d.MainSite_Left1_dd_MinTemp.focus();
							return false;
						}
						if (d.MainSite_Left1_dd_MaxTemp.value == "0")
						{
							alert("Select a Maximum Temperature value");
							d.MainSite_Left1_dd_MaxTemp.focus();
							return false;
						}
						var maxtemp = parseInt(d.MainSite_Left1_dd_MaxTemp.value);
						var mintemp = parseInt(d.MainSite_Left1_dd_MinTemp.value);
						if(maxtemp < mintemp)
						{
							alert("Maximum Temperature cannot be less than Minimum Temperature");
							d.MainSite_Left1_dd_MaxTemp.focus();
							return false;
						}		*/		
						return true;
					}
					
		function chk_subscribe()
		{
			if(document.Form1.MainSite_Left1_txtnewsemail.value == "Enter a valid email")
			{
			 document.Form1.MainSite_Left1_txtnewsemail.value = "";
			}
			if(document.Form1.MainSite_Left1_txtnewsemail.value == "")
			{
				alert("Enter Email");
				document.Form1.MainSite_Left1_txtnewsemail.focus();
				return false
			}
			if(isValidEmail(document.Form1.MainSite_Left1_txtnewsemail.value) == false)
			{
				alert("Invalid Email");
				document.Form1.MainSite_Left1_txtnewsemail.focus();
				return false
			}
			return true
		}
		
		function isValidEmail(val)
		{
		 var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
		 if (!val.match(re))
			{
		     return false;
			} 
		 else 
			{
			 return true;
			}
		}
		function fngetcity(ctrlname,cityselectedindex)
		{
			
			var d="document.Form1.";
			var ctrltobefilledname="dd_city";
			d = d + ctrlname;
			//alert(d);
			//var stateval = eval(d).value;
			var stateval = document.Form1.MainSite_Left1_dd_state.value;
			//alert(eval(d).value);
			if (document.Form1.MainSite_Left1_dd_state.selectedIndex!="0")
			{
				document.Form1.MainSite_Left1_dd_state.selectedValue=stateval;	
				document.Form1.MainSite_Left1_hidstate.value = stateval;		
				//alert("welcoem" + document.Form1.dd_state.selectedValue+ document.Form1.dd_city.selectedValue);
				//alert("welcome" + eval(d).value);
				//fnajaxcall(eval(d).value,ctrltobefilledname,"QuickSearchAjax.aspx","Form1",cityselectedindex);
				fnajaxcall(stateval,ctrltobefilledname,"QuickSearchAjax.aspx","Form1",cityselectedindex);
			}
			else
			{
				//alert("else"+ document.Form1.MainSite_Left1_dd_city.options.length);				
				document.Form1.MainSite_Left1_dd_city.length = 0 ;
				document.Form1.MainSite_Left1_dd_city.options[0] = new Option("Select a city","Select a city");					document.Form1.MainSite_Left1_dd_city.selectedIndex	 = 0;
			}
			 	
		}
		function fnajaxcall(ctrlvalue,ctrltobefilledname,pagename,frmname,cityselectedindex)
		 {
			//alert("ajax call");		
			document.Form1.MainSite_Left1_hidcity.value = cityselectedindex;
			xmlHttp=GetXmlHttpObject()
			if (xmlHttp==null)
			{
			alert ("Browser does not support HTTP Request")
			return
			} 
			if(typeof netscape != 'undefined' && typeof netscape.security !='undefined')
			{
				try
				{
				
				}catch(e)
				{
					document.write("error" + e)
				}
			}
			//var url="http://www.trackprocess.com/Ajax/gethint.asp"
			//var url="http://www.trackprocess.com\/Ajax\/gethint.asp"
			var url=pagename
			str=ctrlvalue
			url=url+"?s="+str+"&ctyctrl="+ctrltobefilledname
			url=url+"&sid="+Math.random()
			xmlHttp.onreadystatechange=stateChanged
			try
			{ 
			xmlHttp.open("get",url)
			}catch(e1)
			{	
				document.write("error1")
			}
			xmlHttp.send(null)
			
			//} 
		 }
		 
		 function stateChanged() 
		{ 
			//alert(xmlHttp.readyState)	
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{ 
				//document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
				var tempxmlval=xmlHttp.responseText
				//alert(tempxmlval);
				var tempxmlarrval = tempxmlval.split(",");
				//alert(document.Form1.MainSite_Left1_dd_city.length);
				if(document.Form1.MainSite_Left1_dd_city.length > 0 )
				{ 
					document.Form1.MainSite_Left1_dd_city.length = 0;
					/* for (i = 0; i < document.Form1.MainSite_Left1_dd_city.options.length; i++) 
					{
						document.Form1.MainSite_Left1_dd_city.options[i] = null;
					}*/
				}
				//alert(document.Form1.MainSite_Left1_dd_city.length + "s" +  tempxmlarrval.length );	
				for(i=0;i<tempxmlarrval.length;i++)
				{
					//alert(tempxmlarrval[i]);
					//document.frmsimple.cbotxtlist.options[1].value = tempxmlarrval[i]	
					document.Form1.MainSite_Left1_dd_city.options[i] = new Option(tempxmlarrval[i],tempxmlarrval[i])								
				}
				//document.getElementById("txtHint").innerHTML=xmlHttp.responseText
				
				//document.Form1.dd_city.selectedValue=document.Form1.hidcity.value;
				document.Form1.MainSite_Left1_dd_city.selectedIndex=document.Form1.MainSite_Left1_hidcity.value;
				//alert("welcome selected" + document.Form1.MainSite_Left1_dd_city.selectedIndex); 
			} 
		} 

		function GetXmlHttpObject()
		{ 
			var objXMLHttp=null
			if (window.XMLHttpRequest)
			{

				objXMLHttp=new XMLHttpRequest()
				//alert("if" + objXMLHttp);
			}
			else if (window.ActiveXObject)
			{
				objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
				//alert("else if" + objXMLHttp);

			}
			return objXMLHttp
		}  
		
		function fnselect(v)
		{
			//alert("fnselect" + v);
			var d=document.Form1.MainSite_Left1_;
			//alert("S"+ document.getElementById('dd_city').Value + document.getElementById('dd_state').Value);
			//alert("v" + v + document.Form1.dd_city.value);
			//alert("selected item" + document.Form1.dd_city.selectedIndex + document.getElementById('dd_city').options[document.getElementById('dd_city').selectedIndex].value);
			document.Form1.MainSite_Left1_hidcity.value = document.Form1.MainSite_Left1_dd_city.selectedIndex;
			document.Form1.MainSite_Left1_hidcity1.value = document.getElementById('MainSite_Left1_dd_city').options[document.getElementById('MainSite_Left1_dd_city').selectedIndex].value;
			document.Form1.MainSite_Left1_dd_city.selectedValue=v;
			//alert(document.getElementById('dd_city').value);
			//fnajaxfillgolfcourses(document.Form1.dd_state.value,document.Form1.dd_city.value,"QuickSearchAjax.aspx","Form1")
			
		}
		
		function fillajax()
		{
			//alert("fillajax()" + document.Form1.dd_city.value +" s "+ document.Form1.dd_state.value);			
			//alert(document.Form1.MainSite_Left1_hidcity.value);
			fngetcity("dd_state",document.Form1.MainSite_Left1_hidcity.value);
			//fnselect(document.Form1.hidcity.value);
		}
