var xmlHttp function skiList(str) { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="library/ski_areas_listing.php" url=url+"?st="+str url=url+"&sid="+Math.random() xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true) xmlHttp.send(null) } function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("ski_list").innerHTML=xmlHttp.responseText } } function skiAdd(str) { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="library/ski_area_addlist.php" url=url+"?num="+str url=url+"&sid="+Math.random() xmlHttp.onreadystatechange=stateChanged2 xmlHttp.open("GET",url,true) xmlHttp.send(null) } function stateChanged2() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("ski_listadd").innerHTML=xmlHttp.responseText } } function runScript() { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="library/skicode.php" url=url+"?sid="+Math.random() xmlHttp.onreadystatechange=stateChanged3 xmlHttp.open("GET",url,true) xmlHttp.send(null) } function stateChanged3() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("ski_script").innerHTML=xmlHttp.responseText } else { document.getElementById("ski_script").innerHTML = "

" } } function runScript2() { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Browser does not support HTTP Request") return } var url="library/weather.php" url=url+"?sid="+Math.random() xmlHttp.onreadystatechange=stateChanged4 xmlHttp.open("GET",url,true) xmlHttp.send(null) } function stateChanged4() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("weather_script").innerHTML=xmlHttp.responseText } else { document.getElementById("weather_script").innerHTML = "

" } } 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; }