function getPage(state, city, location){
				
				var xmlhttp; //Clear our fetching variable

        //try {
        //        xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object
        //} catch (e) {
        //        try {
        //                xmlhttp = new
        //                ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
        //    } catch (E) {
        //        xmlhttp = false;
        //                }
       // }
        //if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
        //        xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
       //}

				 try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } 
			   catch(e) { 
			      try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } 
			      catch(oc) { xmlhttp = null; } 
			   } 
			   if (!xmlhttp && typeof XMLHttpRequest != "undefined") { xmlhttp = new XMLHttpRequest(); } 

        var file = 'http://www.surfmunchy.com/catalog/text.php?state=' +state+ '&city=' +city+ '&location=' +location; //This is the path to the file we just finished making *
    		xmlhttp.open('GET', file, true); //Open the file through GET, and add the page we want to retrieve as a GET variable **
    		xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) { //Check if it is ready to recieve data
                var content = xmlhttp.responseText; //The content data which has been retrieved ***
                if( content ){ //Make sure there is something in the content variable
                      document.getElementById('content').innerHTML = content; //Change the inner content of your div to the newly retrieved content ****
                }
        } 
        }
        
        xmlhttp.send(null) //Nullify the XMLHttpRequest
        
       
			 return;
}
function getnow(va){
	getPage(va);	
	document.locator.submit();
	
}

function SetCookie(cookieValue) {	
 var today = new Date();
 var expire = new Date();
 var showName = cookieValue.split(" ");                
 //if (nDays==null || nDays==0) 
 var nDays=7;
 var mylocation = "mylocation";
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = mylocation+"_"+showName[0]+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
 
 alert("Default Location : "+ showName[1] + " " + showName[2]);         
 document.forms[0].submit();       
}

