<!--
var date = new Date();
var months = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var days = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

function setCookie(loc) {
    var expDate = new Date(2009, 11, 31, 23, 59, 59);         // Expires December 31, 2009 at 11:59 PM GMT
    document.cookie="location=" + escape(loc) + "; expires=" + expDate +"; path=/";
}

function getCookie(name) {
    // cookies are separated by semicolons
    var aCookie = document.cookie.split("; ");
    var return_value = null;

    for (var i=0; i < aCookie.length; i++)
    {
        // a name/value pair (a crumb) is separated by an equal sign
        var aCrumb = aCookie[i].split("=");
        if (aCrumb[0] == name) 
            return_value = unescape(aCrumb[1]);
    }

    if (return_value) {
        return return_value;
    }
    else{
        // a cookie with the requested name does not exist
        return null;
    }
}

function set_date() {
      f = document.getElementById("fill");

      var da=days[date.getDay()];
      var mo=months[date.getMonth()];
      var dt=date.getDate();
      var yr=date.getFullYear();

      f.innerHTML = da + ", " + mo + " " + dt + ", " + yr + "&nbsp;";
}

function initialize() {
    loc = getCookie("location");
    if (!loc) {
        qWx("Norman");
    }
    else {
        qWx(loc);
    }

    set_date();
}

function swap(mapName) {
    m = document.getElementById("map");
    l = document.getElementById("mesonet");

    if (mapName == "temp") {
        m.src = "http://hoot.ou.edu/fcast_images/period_0_temps.png";
        l.href = "http://hoot.ou.edu/fcast_images/period_0_temps.png";
    }
    if (mapName == "dewp") { 
        m.src = "http://owl.ou.edu/images/dewp_mesonet_image_final.gif"; 
        l.href = "http://owl.ou.edu/images/dewp_mesonet_image_final.gif"; 
    }
    if (mapName == "wind") { 
        m.src = "http://owl.ou.edu/images/wind_mesonet_image_final.gif";
        l.href = "http://owl.ou.edu/images/wind_mesonet_image_final.gif";
    }
    if (mapName == "rain") {
        m.src = "http://owl.ou.edu/images/rain_mesonet_image_final.gif";
        l.href = "http://owl.ou.edu/images/rain_mesonet_image_final.gif";
    }
}
//-->
