// Copyright 2000-2008 Niruthi LLC/Andrew Michaelis
function cimh(lon,lat,ht){
   var m = new GMarker(new GPoint(lon, lat))
   GEvent.addListener(m, "click", function(){m.openInfoWindowTabsHtml(ht)}); 
   return m;
}
function loadg(lat, lon, zoomky, marks) {
   if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("gmap"));
        map.setCenter(new GLatLng(lat, lon), zoomky);
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        map.removeMapType(G_SATELLITE_MAP);
        for (i=0;i<=marks.length;i++){
            var tbs = new Array(2);
            tbs[0] = new GInfoWindowTab('Current', "<div id=ght_"+marks[i]._id+"><iframe frameborder=\"0\" align=\"middle\" src=\"/curconsml.php?sid="+marks[i]._id+"\"><a href=\"/\">Your Browser Doesn't Support Frames. Click here</a></iframe></div>");
            tbs[1] = new GInfoWindowTab('Forecast', "<div id=ght_"+marks[i]._id+"><iframe frameborder=\"0\" align=\"middle\" src=\"/frcstsml.php?sid="+marks[i]._id+"\"><a href=\"/\">Your Browser Doesn't Support Frames. Click here</a></iframe></div>");
            map.addOverlay(cimh(marks[i]._lon, marks[i]._lat, tbs));
        }
   }
   else
   {
      document.write("<center><h3>ERROR : javascript must be enabled and your brower must be compatible. Sorry.</h3></center>");
      document.write("<center><h3><a href='http://www.meteoindia.com'>Back to local weather</a></h3></center>");
   }
}
function Station(id,lon,lat,elev,name){
   this._id=id; this._lon=lon; this._lat=lat; this._elev=elev;
   if (undefined != name) { this._name=name; }
   else { this._name="NA"; }
}
