<!--
function popup(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=750,left = 0,top = 0');");
}


var req = null;

function loadXMLDoc(url) {
   // Internet Explorer
   try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
   catch(e) {
      try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
      catch(oc) { req = null; }

   }

   // Mozailla/Safari
   if (req == null && typeof XMLHttpRequest != "undefined") {
      req = new XMLHttpRequest();
   }
   // Call the processChange() function when the page has loaded
   if (req != null) {
      req.onreadystatechange = processChange;
      req.open("GET", url+"&dummy="+new Date().getTime(), true);
      req.send(null);
   }
}

function processChange(evt) {

document.getElementById("opmsg").innerHTML = "<h2>Loading wind...<img src='/images/indicator_light.gif' border='0' align=absmiddle></h2>";

   // The page has loaded and the HTTP status code is 200 OK

   if (req.readyState == 4) {
   		
   		
   
         if (req.status == 200) {
		
      // Write the contents of this URL to the searchResult layer
      
      document.getElementById("searchResult").innerHTML = req.responseText;
      
//      document.getElementById("opmsg").innerHTML = "Report updated!";
        document.getElementById("opmsg").innerHTML = "<h2>Wind Summary<img src='/images/indicator_blank.gif' border='0' align=absmiddle></h2>";
      
      }
   }
}



function loadXMLDoc2(url) {
   // Internet Explorer
   try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
   catch(e) {
      try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
      catch(oc) { req = null; }
   }

   // Mozailla/Safari
   if (req == null && typeof XMLHttpRequest != "undefined") {
      req = new XMLHttpRequest();
   }
   // Call the processChange() function when the page has loaded
   if (req != null) {
      req.onreadystatechange = processChange2;
      req.open("GET", url+"&dummy="+new Date().getTime(), true);
      req.send(null);
   }
}

function processChange2(evt) {

document.getElementById("opmsg2").innerHTML = "<br><br><h2>Loading wind...<img src='images/indicator.gif' border='0' align=absmiddle></h2>";

   // The page has loaded and the HTTP status code is 200 OK

   if (req.readyState == 4) {
   		
   		
   
         if (req.status == 200) {
		
      // Write the contents of this URL to the searchResult layer
      
      getObject("searchResult2").innerHTML = req.responseText;
      
//      document.getElementById("opmsg2").innerHTML = "Report updated!";
        document.getElementById("opmsg2").innerHTML = "<br><br><h2>Wind Summary<img src='images/indicator_blank.gif' border='0' align=absmiddle></h2>";
      
      }
   }
}



function getObject(name) {
   var ns4 = (document.layers) ? true : false;
   var w3c = (document.getElementById) ? true : false;
   var ie4 = (document.all) ? true : false;

   if (ns4) return eval('document.' + name);
   if (w3c) return document.getElementById(name);
   if (ie4) return eval('document.all.' + name);
   return false;
}

function reset(){

document.getElementById("opmsg2").innerHTML = "";
document.getElementById("searchResult2").innerHTML = "";

}

// -->

   function visit(newURL) {
	 //--If the selected file name isn't blank, send it to reader.
	 if (newURL != '') {
	   loadXMLDoc2(newURL);
	 }
   }
