// JavaScript file for graphical forecast weekly table.
 
// Mouse over effect initialized as on
var onoroff = "ON"
var imagedisplay = "yes"

// function to load new image... 
function getnewimg(imagenam,imagenum,mov) {
         if ((onoroff == "OFF") && (mov == 1)){return;}
            image = "http://www.weather.gov/forecasts/graphical/images/" + sector + "/" + imagenam + imagenum + "_" + sector + ".png" ;
         document.the_image.src= image ;
         
         return;
     }
     
// Function for weather element popup definitions
function topWindow(linksite){
popup = window.open("http://www.weather.gov/forecasts/graphical/sectors/" + linksite,"","height=300,width=300,scrollbars=yes");
}


/////////BLIPMAPS
var blip_prefix = "";
var blip_time = "18";
var blip_image = "wfpm"

function setBlipImage(bliptype, blipregion) {

//	alert(document.blip_img.src);

	//if switching from RUC to ETA reset to 18
        if ((bliptype == "ETA") && !(blip_time == "18" || blip_time == "21"))
		blip_time = "18";

	//if switching from ETA to RUC reset prefix
        if ((bliptype == "ETA") && !(blip_prefix == "curr." || blip_prefix == "curr+1." || blip_prefix == "curr+2." || blip_prefix == "previous."))
		blip_prefix = "curr.";

	//if switching from RUC to ETA reset prefix
        if ((bliptype == "RUC") && !(blip_prefix == "" || blip_prefix == "first." || blip_prefix == "previous."))
		blip_prefix = "";


         if (bliptype == "RUC")
	         document.blip_img.src= 'http://www.drjack.info/BLIP/RUC/' + blipregion + '/FCST/' 
	         	+ blip_prefix + 'wfpm.' + blip_time + 'z.png';
         if (bliptype == "ETA")
	         document.blip_img.src= 'http://www.drjack.info/BLIP/ETA/' + blipregion + '/FCST/' 
	         	+ 'wfpm.' + blip_prefix + blip_time + 'z.png';
	         	
//	alert(document.blip_img.src);
			
         return;
}

function setPrefix(bliptype, blipregion, prefix) {
	blip_prefix = prefix;

	setBlipImage(bliptype, blipregion);
         return;
     }

function setTime(bliptype, blipregion, btime) {
	blip_time = btime;

	setBlipImage(bliptype, blipregion);
         return;
     }
