

 // Pop ups for Weather warming   
var newwindow;
function pop(url){
	newwindow=window.open(url,'name','height=570,width=700, scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}
 
var newwindow;
function pop1(url){
	newwindow=window.open(url,'name','height=800,width=850, scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}

var newwindow;
function pop2(url){
	newwindow=window.open(url,'name','height=800,width=700, scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}
var newwindow;
function pop4(url){
	newwindow=window.open(url,'name','height=650,width=700, scrollbars=yes');
	if (window.focus) {newwindow.focus()}
}

function PopupCenter(pageURL, title,w,h) {
var left = (screen.width/6)-(w/6);
var top = (screen.height/10)-(h/10);
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}

<!-- NOAA Player
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=440,height=585,scrollbars=yes');
return false;
}


var newwindow;
function pop3(url){
newwindow=window.open(url,'name','height=800,width=850, scrollbars=yes');
if (window.focus) {newwindow.focus()}
}


// For Changing Images in Water Vapor   
function changeImage(filename)

{

   document.mainimage.src = filename;

}

// For Changing Images 2   
function changeImage2(filename)

{

   document.mainimage2.src = filename;

}


<!-- New  Wind Chill Calculator 1.1 -->
<!-- Modified 9/10/2001: Bryan Ruby, National Weather Service, Sioux Falls -->
<!-- Previous Contributers: Darren Collins (WFO FSD), James P. Dildine (jpd@wlsmail.com), Bryan Ruby (bryan.ruby@noaa.gov) -->
<!-- Begin

			function decideConvert(temp, ws)
			{
				temp = parseFloat(document.Convert.Temp.value);
				ws = parseFloat(document.Convert.windspeed.value);

				if(document.Convert.windunit[1].checked)
				{
					ws = convertktstomph(ws);
					ws1 = convertktstomps(ws);
				}

				if(document.Convert.windunit[2].checked)
				{
					ws = convertmpstomph(ws);
					ws1 = document.Convert.windunit[2].value;
				}
				
				if(document.Convert.windunit[3].checked)
				{
					ws = convetkphtomph(ws);
					ws1 = convertkphtomps(ws);
				}
								
				if (document.Convert.tempunit[0].checked)
				{
					var ws1 = convertmphtomps(ws);
					var temp1 = convertFtoC(temp);
					
					if (temp > 40)
					{
						alert('A Wind Chill value cannot be calculated for temperatures greater than 40 degrees Fahrenheit.');
						document.Convert.Fahr.value="";
						document.Convert.Cels.value="";
					}
					else
					{
						document.Convert.Fahr.value = roundOff(windChill(temp, ws));
						var C = parseFloat(document.Convert.Fahr.value);
						document.Convert.Cels.value = roundOff(convertFtoC(C));
						document.Convert.Watts.value = roundOff(WPM2(temp1, ws1));
					}
				}

				if (document.Convert.tempunit[1].checked)
				{
					var F = convertCtoF(temp);
					var ws1 = convertmphtomps(ws);
					if (F > 40)
					{
						alert('A Wind Chill value cannot be calculated for temperatures greater than 4.4 degrees Celsius.');
						document.Convert.Fahr.value="";
						document.Convert.Cels.value="";
					}
					else
					{
						document.Convert.Fahr.value = roundOff(windChill(F, ws));
						document.Convert.Cels.value = roundOff((convertFtoC(windChill(F, ws))));
						document.Convert.Watts.value = roundOff(WPM2(temp,ws1));
					}
				}
			}
				
			function convertFtoC(Fahr)
			{
				var Celsius;
				Celsius= .55556 * (Fahr - 32);
				return Celsius;
			}

			function convertCtoF(Cels)
			{
				var Fahr;
				Fahr= 1.8 * Cels + 32;
				return Fahr;
			}

			function convertktstomph(knots)
			{
				var mph;
				mph = 1.1507794*knots;
				return mph;
			}

			function convertmpstomph(mps)
			{
				var mph;
				mph = 2.23694*mps;
				return mph;
			}
			
			function convertmphtomps(mph)
			{
				var ws1;
				ws1 = 0.44704*mph;
				return ws1;
			}
			
			function convertktstomps(knots)
			{
				var ws1;
				ws1 = 0.5144444*knots;
				return ws1;
			}
			
			function convetkphtomph (kph)
			{
				var mph;
				mph = 0.621371*kph;
				return mph;
			}
			
			function convertkphtomps (kph)
			{
				var ws1;
				ws1 = 0.277778*kph;
				return ws1;
			}
			
			function windChill(F, mph)
			{
				var wChill;
				
				wChill = 35.74 + .6215*F - 35.75*Math.pow(mph, 0.16) + 0.4275*F*Math.pow(mph, 0.16);
				return wChill;
			}

			function WPM2 (C, mps)
			{
				var Watts;
			
				Watts = (12.1452 + 11.6222*Math.sqrt(mps) - 1.16222*mps)*(33 - C);
				return Watts;

			}
			function getAns(temp)
			{
				return temp;
			}

			function roundOff(value)
			{
				value = Math.round(10*value)/10;
				return value;
			}

			function setToNull()
			{
				document.Convert.Fahr.value="";
				document.Convert.Cels.value="";
				document.Convert.windspeed.value="";
				document.Convert.Temp.value="";
				document.Convert.Watts.value="";
			}
		
//  End -->


<!-- Version 8/020/2000: w-ddc.webmaster -->
<!-- Modified Version 8/16/2001 (for New Wind Chill Index): -->
<!-- National Weather Service Dodge City, KS -->

<!-- Begin
function windChill1(form) {
wind=eval(form.wind.value);
temp=eval(form.temp.value);
chill=(0.0817*(3.71*(Math.sqrt(wind))+5.81-0.25*wind)*(temp-91.4)+91.4);
nchill=(35.74+0.6215*temp-35.75*Math.pow(wind,0.16)+0.4275*temp*Math.pow(wind,0.16));
chill=Math.round(chill);
nchill=Math.round(nchill);
form.windchill.value = chill;
form.nwindchill.value = nchill;
}
//  End -->



//--  Heat Index Calculator 1.1 

    //  ###################################  HEAT INDEX ######################################
            function heat1_c(HI1_C){
            if(parseFloat(HI1_C.tempair.value) < 18){
            alert("Entry Invalid!  Click on reset and try again!");
            }
            else {
            var tempair_in_fahrenheit = 1.80 * HI1_C.tempair.value + 32.0;
            var hi1_c = -42.379 + 2.04901523 * tempair_in_fahrenheit + 10.14333127 * HI1_C.RHumidity.value - 0.22475541 * tempair_in_fahrenheit * HI1_C.RHumidity.value - 6.83783 * (Math.pow(10, -3)) * (Math.pow(tempair_in_fahrenheit, 2)) - 5.481717 * (Math.pow(10, -2)) * (Math.pow(HI1_C.RHumidity.value, 2)) + 1.22874 * (Math.pow(10, -3)) * (Math.pow(tempair_in_fahrenheit, 2)) * HI1_C.RHumidity.value + 8.5282 * (Math.pow(10, -4)) * tempair_in_fahrenheit * (Math.pow(HI1_C.RHumidity.value, 2)) - 1.99 * (Math.pow(10, -6)) * (Math.pow(tempair_in_fahrenheit, 2)) * (Math.pow(HI1_C.RHumidity.value,2));
            HI1_C.heatindex.value = Math.round(hi1_c) + " F"  + " / " + Math.round((hi1_c - 32) * .556) + " C";
            var rh3 = 1 - HI1_C.RHumidity.value/100;
            var tdpc3 = HI1_C.tempair.value - (((14.55 + .114*HI1_C.tempair.value)*rh3) + (Math.pow(((2.5 + .007*HI1_C.tempair.value)*rh3), 3)) + ((15.9 + .117*HI1_C.tempair.value))*(Math.pow(rh3, 14)));
            HI1_C.dewpt2.value = Math.round(1.80 * tdpc3 + 32.0) + " F" + " / " + Math.round(tdpc3) + " C";
            }
            }
            function HIDEW_c(heatdew_c){
            if(heatdew_c.tempair3.value < 19){
            alert("Invalid Entry!  Click on reset and try again!");
            }
            else{
            if (heatdew_c.tempair3.value < heatdew_c.dewpoint_c.value){
            alert("Your dew point temperature cannot be higher than the air temperature.  Click on reset and try again!");
            }
            else{
            tac = parseFloat(heatdew_c.tempair3.value);
            tdac = parseFloat(heatdew_c.dewpoint_c.value);
            var stuff3 = (112 - (0.1 * tac) + tdac) / (112 + (0.9 * tac));
            var RHumidity3 = Math.round(100.0 * (Math.pow(stuff3,8)));
            var airtemp_in_fahrenheit = 1.80 * heatdew_c.tempair3.value + 32.0;
            var hi3 = -42.379 + 2.04901523 * airtemp_in_fahrenheit + 10.14333127 * RHumidity3 - 0.22475541 * airtemp_in_fahrenheit * RHumidity3 - 6.83783 * (Math.pow(10, -3)) * (Math.pow(airtemp_in_fahrenheit, 2)) - 5.481717 * (Math.pow(10, -2)) * (Math.pow(RHumidity3, 2)) + 1.22874 * (Math.pow(10, -3)) * (Math.pow(airtemp_in_fahrenheit, 2)) * RHumidity3 + 8.5282 * (Math.pow(10, -4)) * airtemp_in_fahrenheit * (Math.pow(RHumidity3, 2)) - 1.99 * (Math.pow(10, -6)) * (Math.pow(airtemp_in_fahrenheit, 2)) * (Math.pow(RHumidity3,2));
            heatdew_c.answer.value = Math.round(hi3) + " F" +  " / " + Math.round((hi3 - 32) * .556) + " C";
            heatdew_c.RH3.value = RHumidity3 + "%";
            }
            }
            }
            function heat1(HeatIndex){
            if(HeatIndex.tempair.value < 65){
            alert("Entry Invalid!  Click on reset and try again!");
            }
            else {
            var hi = -42.379+2.04901523*HeatIndex.tempair.value+10.14333127*HeatIndex.RHumidity.value-0.22475541*HeatIndex.tempair.value*HeatIndex.RHumidity.value-6.83783*(Math.pow(10, -3))*(Math.pow(HeatIndex.tempair.value, 2))-5.481717*(Math.pow(10, -2))*(Math.pow(HeatIndex.RHumidity.value, 2))+1.22874*(Math.pow(10, -3))*(Math.pow(HeatIndex.tempair.value, 2))*HeatIndex.RHumidity.value+8.5282*(Math.pow(10, -4))*HeatIndex.tempair.value*(Math.pow(HeatIndex.RHumidity.value, 2))-1.99*(Math.pow(10, -6))*(Math.pow(HeatIndex.tempair.value, 2))*(Math.pow(HeatIndex.RHumidity.value,2));
            HeatIndex.heatindex.value = Math.round(hi) + " F" +  " / " + Math.round((hi - 32) * .556) + " C";
            var tempc2 = (HeatIndex.tempair.value - 32) * .556;
            var rh2 = 1 - HeatIndex.RHumidity.value/100;
            var tdpc2 = tempc2 - (((14.55 + .114*tempc2)*rh2) + (Math.pow(((2.5 + .007*tempc2)*rh2), 3)) + ((15.9 + .117*tempc2))*(Math.pow(rh2, 14)));
            HeatIndex.dewpt2.value = Math.round(1.80 * tdpc2 + 32.0) + " F" + " / " + Math.round(tdpc2) + " C";
            }
            }
            function HIDEW(heatdew){
            if(heatdew.tempair2.value < 65){
            alert("Entry Invalid!  Click on reset and try again!");
            }
            else{
            var tc2 = (parseFloat(heatdew.tempair2.value) - 32) * .556;
            var tdc2 = (parseFloat(heatdew.dewpoint.value) -32)* .556;
            if (tc2 < tdc2){
            alert("Your dew point temperature cannot be higher than the air temperature.  Click on reset and try again!");
            }
            else{
            var stuff2 = (112-(0.1*tc2)+tdc2)/(112+(0.9*tc2));
            var RHumidity2 = Math.round(100.0*(Math.pow(stuff2,8)));
            var hi2 = -42.379+2.04901523*heatdew.tempair2.value+10.14333127*RHumidity2-0.22475541*heatdew.tempair2.value*RHumidity2-6.83783*(Math.pow(10, -3))*(Math.pow(heatdew.tempair2.value, 2))-5.481717*(Math.pow(10, -2))*(Math.pow(RHumidity2, 2))+1.22874*(Math.pow(10, -3))*(Math.pow(heatdew.tempair2.value, 2))*RHumidity2+8.5282*(Math.pow(10, -4))*heatdew.tempair2.value*(Math.pow(RHumidity2, 2))-1.99*(Math.pow(10, -6))*(Math.pow(heatdew.tempair2.value, 2))*(Math.pow(RHumidity2,2));
            heatdew.answer.value = Math.round(hi2) + " F" +  " / " + Math.round((hi2 - 32) * .556) + " C";
            heatdew.RHumidity2.value = RHumidity2 + "%";
            }
            }
            }
            function clearF(form){
            form.Celsius.value="";
            form.tempf.value = "";
            }
            function clearC(form){
            form.Fahrenheit.value = "";
            form.tempc.value = "";
            }
            function clearwindchill(form){
            form.windchill.value = "";
            form.mph.value = "";
            form.intemp.value = "";
            }
            function clearwindchill_C(form){
            form.wcvalue_in_c.value = "";
            form.mph_C.value = "";
            form.intemp_C.value = "";
            }
            function clearhumidity(form){
            form.relativeh.value = "";
            form.airtemp.value = "";
            form.dewpointtemp.value = "";
            form.answer3.value = "";
            form.answer4.value = "";
            }
            function clearhumidity2(form){
            form.TheRHinPercent.value = "";
            form.rh_tcc.value = "";
            form.rh_tdcc.value = "";
            form.answer1.value = "";
            form.answer2.value = "";
            }
            function clearHI(form){
            form.tempair.value = "";
            form.RHumidity.value = "";
            form.heatindex.value = "";
            }
            function clearHIDEW(form){
            form.tempair2.value = "";
            form.RHumidity2.value = "";
            form.answer.value = "";
            }
            function clearHI(form){
            form.tempair.value = "";
            form.RHumidity.value = "";
            form.heatindex.value = "";
            }
            function clearHIDEW(form){
            form.tempair2.value = "";
            form.RHumidity2.value = "";
            form.answer.value = "";
            }
            function clearHI1_C(form){
            form.tempair.value = "";
            form.RHumidity.value = "";
            form.heatindex.value = "";
            form.dewpt2.value = "";
            }
            function clearHIDEW_c(form){
            form.tempair3.value = "";
            form.RH3.value = "";
            form.answer.value = "";
            form.dewpoint_c.value="";
            }
//-- END Heat Index END Heat Index END Heat Index END Heat Index END Heat Index 




//--  Start 5 Scale Temperature Conversion  

var arrFactors = new Array(6);

var prevValue = 0;

var prevBox = null;

var decimalPlaces = 3;

  arrFactors[1] = parseFloat('1');

  arrFactors[2] = parseFloat('1');

  arrFactors[3] = parseFloat('1');

  arrFactors[4] = parseFloat('1');

  arrFactors[5] = parseFloat('1');



function convertTemps(fromID, toID, val) {

  var FAHR_RANK_DIFF = 459.67;

  var CELS_KELV_DIFF = 273.15;  

  switch (fromID) {

  case 1: // deg Fahrenheit

    switch (toID) {

    case 1: return val;  // to deg Fahrenheit   

    case 2: return (val - 32) * 5 / 9;  // to deg Celsius

    case 3: return (val + FAHR_RANK_DIFF) / 1.8;  // to Kelvin

    case 4: return val + FAHR_RANK_DIFF; // to deg Rankine

    case 5: return (val - 32) * 4 / 9;  // to deg Reaumur

    }

  case 2: // deg Celsius

    switch (toID) {

    case 1: return val * 9 / 5 + 32;  // to deg Fahrenheit

    case 2: return val;  // to deg Celsius

    case 3: return val + CELS_KELV_DIFF;  // to Kelvin

    case 4: return val * 9 / 5 + 32 + FAHR_RANK_DIFF; // to deg Rankine

    case 5: return val * 8 / 10;  // to deg Reaumur

    }

  case 3: // Kelvin

    switch (toID) {

    case 1: return val * 1.8 - FAHR_RANK_DIFF;  // to deg Fahrenheit    

    case 2: return val - CELS_KELV_DIFF;  // to deg Celsius

    case 3: return val;  // to Kelvin

    case 4: return val * 1.8; // to deg Rankine

    case 5: return (val - CELS_KELV_DIFF) * 8 / 10;  // to deg Reaumur

    }

  case 4: // deg Rankine

    switch (toID) {

    case 1: return val - FAHR_RANK_DIFF;  // to deg Fahrenheit  

    case 2: return (val - FAHR_RANK_DIFF - 32) * 5 / 9;  // to deg Celsius

    case 3: return val / 1.8;  // to Kelvin

    case 4: return val; // to deg Rankine

    case 5: return (val - FAHR_RANK_DIFF - 32) * 4 / 9;  // to deg Reaumur

    }

  case 5: // deg Reaumur

    switch (toID) {

    case 1: return val * 9 / 4 + 32;  // to deg Fahrenheit      

    case 2: return val * 10 / 8; // to deg Celsius

    case 3: return val * 10 / 8 + CELS_KELV_DIFF;  // to Kelvin

    case 4: return val * 9 / 4 + 32 + FAHR_RANK_DIFF; // to deg Rankine

    case 5:return val;  // to deg Reaumur

    }   

  }

}



function roundDP(n, decplaces) {

  var t = Number('1e' + decplaces);

  return Math.round(n * t) / t;

}



function convert(form, id) {

  var val, fromFactor, i;  

  // start at 1 since 0 is temp element

  val = parseFloat(form[id].value);

  if (isNaN(val) || prevValue == val) return; 

  // highlight the new box for visibility

  if (form[id].style) {

    if (prevBox != null) {

      form[prevBox].style.color = '';

      document.getElementById('temp' + prevBox).style.fontWeight = 'normal';

    }

    form[id].style.color = '#0000ff';

    document.getElementById('temp' + id).style.fontWeight = 'bold';

  }

  prevBox = id;  

  if (val == '' || isNaN(val)) val = 0;

  fromFactor = arrFactors[id];  

  for (i = 1; i < form.length; i++)   

    if (i != id) form[i].value = roundDP(convertTemps(id, i, val), decimalPlaces); 

}



function enterBox(form, id) {

  prevValue = parseFloat(form[id].value);

}

// -->



 // Wind Speed
// clears field of default value
function clear_field(field) {
                if (field.value==field.defaultValue) {
                        field.value=''
                }
        }

function signifdig(num)
// Round string numeric content to 5 significant digits
{var ex=0;
if(num==0) {strin="0"; return strin;}
if(num<0.) {strin="-"; num = Math.abs(num);}
else strin="";
wsto = num;
if(num>=0){ 
while (num>=10) {num/=10; ex+=1;}
{erg = Math.round((wsto*Math.pow(10,4-ex)) / Math.pow(10,4-ex)*100)/100; strin+=eval(erg);}
}
return strin;}
        
function repsigdig(num,dv)
{
    if(num==0) {strin="0"; return strin;}
    strin=eval(Math.round(num*Math.pow(10.,dv))/Math.pow(10.,dv));
    return strin;
}

function calc(form,val,index)
{
if(index==0) v=val;               // m s-1
if(index==1) v=val/3.6;           // km h-1
if(index==2) v=val*(0.51+4/900);  // knots
if(index==3) v=val*0.44704;       // mi h-1
if(index==4) v=val*0.3048;        // ft s-1
if(index==5) v=val/60.;           // m min-1
if(index==6) v=val*0.3048/60.;    // ft min-1

form.ms.value=signifdig(v);                 // m s-1
var kmh=v*3.6;
form.kmh.value=signifdig(v*3.6);            // km h-1
var knot=v/(0.51+4/900);
form.knot.value=signifdig(knot);            // knot
form.mih.value=signifdig(v/0.44704);        // mi h-1
form.fts.value=signifdig(v/0.3048);         // ft s-1
form.mmi.value=signifdig(v*60.);            // m min-1
form.ftm.value=signifdig(v/0.3048*60.);     // ft min-1
beaufort(form,knot);
return;
}
function beaufort(form,knot)
{
if(knot<=1) form.bea.value=signifdig(0);
if(knot>1 && knot<3.5) form.bea.value=signifdig(1);
if(knot>=3.5 && knot<6.5) form.bea.value=signifdig(2);
if(knot>=6.5 && knot<10.5) form.bea.value=signifdig(3);
if(knot>=10.5 && knot<16.5) form.bea.value=signifdig(4);
if(knot>=16.5 && knot<21.5) form.bea.value=signifdig(5);
if(knot>=21.5 && knot<27.5) form.bea.value=signifdig(6);
if(knot>=27.5 && knot<33.5) form.bea.value=signifdig(7);
if(knot>=33.5 && knot<40.5) form.bea.value=signifdig(8);
if(knot>=40.5 && knot<47.5) form.bea.value=signifdig(9);
if(knot>=47.5 && knot<55.5) form.bea.value=signifdig(10);
if(knot>=55.5 && knot<63.5) form.bea.value=signifdig(11);
if(knot>=63.5) form.bea.value=signifdig(12);

return;
}
//-->

<!--  Start Marine Traffic --> 

       width=820;          //the width of the embedded map in pixels or percentage
       height=700;         //the width of the embedded map in pixels or percentage
       border=0;           //the width of border around the map. Zero means no border
       notation=true;     //true or false to display or not the vessel icons and options at the left
       latitude=37.5184;   //the latitude of the center of the map in decimal degrees
       longitude=-123.0469;  //the longitude of the center of the map in decimal degrees
       zoom=8;            //the zoom level of the map. Use values between 2 and 17
       trackvessel=0;      //the MMSI of the vessel to track, if within the range of the system
 //-->                       


<!--  Start Climate Prediction Center -->

   function show_tab(nam)
   {
    document.getElementById("TAB610dayToutlook").style.display= "none";
    document.getElementById("TAB610dayPoutlook").style.display= "none";
    document.getElementById("TAB814dayToutlook").style.display= "none";
    document.getElementById("TAB814dayPoutlook").style.display= "none";
    document.getElementById("TAB30dayToutlook").style.display= "none";
    document.getElementById("TAB30dayPoutlook").style.display= "none";
    document.getElementById("TAB90dayToutlook").style.display= "none";
    document.getElementById("TAB90dayPoutlook").style.display= "none";
    document.getElementById("TABhazardstw").style.display= "none";
    document.getElementById("TABhazardsp").style.display= "none";
    
    document.getElementById("TABdroughtmonitor").style.display= "none";
    document.getElementById("TABseasonaldrought").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
  //-->


<!--  Start River Center -->

   function show_tab2(nam)
   {
    document.getElementById("RIVER1").style.display= "none";
    document.getElementById("RIVER2").style.display= "none";
    document.getElementById("RIVER3").style.display= "none";
    document.getElementById("RIVER4").style.display= "none";
    document.getElementById("RIVER5").style.display= "none";
    document.getElementById("RIVER6").style.display= "none";
    document.getElementById("RIVER7").style.display= "none";
    document.getElementById("RIVER8").style.display= "none";
    document.getElementById("RIVER9").style.display= "none";
    document.getElementById("RIVER10").style.display= "none";
    document.getElementById("RIVER11").style.display= "none";
    document.getElementById("RIVER12").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
  //-->

<!--  Start State Center -->

   function show_tab3(nam)
   {
    document.getElementById("STATE1").style.display= "none";
    document.getElementById("STATE2").style.display= "none";
    document.getElementById("STATE3").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
  //-->


<!--  Start Hourly Roundup Center -->

   function show_tab4(nam)
   {
    document.getElementById("HOURLY1").style.display= "none";
    document.getElementById("HOURLY2").style.display= "none";
    document.getElementById("HOURLY3").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
  //-->

<!--  Start Weather Story -->

   function show_tab5(nam)
   {
    document.getElementById("WXstory1").style.display= "none";
    document.getElementById("WXstory2").style.display= "none";
    document.getElementById("WXstory3").style.display= "none";
	document.getElementById("WXstory4").style.display= "none";
    document.getElementById("WXstory5").style.display= "none";
    document.getElementById("WXstory6").style.display= "none";
	document.getElementById("WXstory7").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
  //-->

<!--  Start AQI Center -->
function show_tab_AQI(nam)
   {
    document.getElementById("AQI_MAPs1").style.display= "none";
    document.getElementById("AQI_MAPs2").style.display= "none";
    document.getElementById("AQI_MAPs3").style.display= "none";
    document.getElementById("AQI_MAPs4").style.display= "none";
    document.getElementById("AQI_MAPs5").style.display= "none";
    document.getElementById("AQI_MAPs6").style.display= "none";
    document.getElementById("AQI_MAPs7").style.display= "none";
    document.getElementById("AQI_MAPs8").style.display= "none";
    document.getElementById("AQI_MAPs9").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
//-->
<!--  Start AQI Forecast Center -->
function show_tab_AQI_forecast(nam)
   {
    document.getElementById("AQI_forecast1").style.display= "none";
    document.getElementById("AQI_forecast2").style.display= "none";
    document.getElementById("AQI_forecast3").style.display= "none";
	document.getElementById("AQI_forecast4").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
//-->
<!--  Start AQI Forecast Center -->
function show_tab_AQI_Highest(nam)
   {
    document.getElementById("AQI_Highest1").style.display= "none";
    document.getElementById("AQI_Highest2").style.display= "none";
    document.getElementById("AQI_Highest3").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
//-->
<!--  Start AQI Center -->
function show_tab_Discussion(nam)
   {
    document.getElementById("Discussion0").style.display= "none";
    document.getElementById("Discussion1").style.display= "none";
    document.getElementById("Discussion2").style.display= "none";
    document.getElementById("Discussion3").style.display= "none";
    document.getElementById("Discussion4").style.display= "none";
    document.getElementById("Discussion5").style.display= "none";
    document.getElementById("Discussion6").style.display= "none";
    document.getElementById("Discussion7").style.display= "none";
    document.getElementById("Discussion8").style.display= "none";
	document.getElementById("Discussion9").style.display= "none";
    document.getElementById("Discussion10").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
//-->

<!--  Start AQI Center -->
function show_tab_Nps(nam)
   {
    document.getElementById("NPS0").style.display= "none";
    document.getElementById("NPS1").style.display= "none";
    document.getElementById("NPS2").style.display= "none";
    document.getElementById("NPS3").style.display= "none";
    document.getElementById("NPS4").style.display= "none";    
    document.getElementById(nam).style.display = "block";
   }
//-->

<!--  Start State Center -->

   function show_tab_wxQ(nam)
   {
    document.getElementById("WXQ1").style.display= "none";
    document.getElementById("WXQ2").style.display= "none";
    document.getElementById("WXQ3").style.display= "none";
	document.getElementById("WXQ4").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
  //-->
<!--  Start State Center -->

   function show_tab_MAPwxQ(nam)
   {
    document.getElementById("mapWXQ1").style.display= "none";
    document.getElementById("mapWXQ2").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
  //-->
  <!--  Start AQI Forecast Center -->
function show_tab_forecast(nam)
   {
    document.getElementById("forecast1").style.display= "none";
    document.getElementById("forecast2").style.display= "none";
    document.getElementById(nam).style.display = "block";
   }
//-->

//Jump menu function written by Macromedia
//Used in the selectbox on forecast-detail.asp to toggle between foreacst days
function MM_jumpMenu(targ,selObj,restore)
{ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}
 //-->

/** Rounded Corners with Dropshadows  *********

 * RUZEE.ShadedBorder 0.6.2
 * (c) 2006 Steffen Rusitschka
 *
 * RUZEE.ShadedBorder is freely distributable under the terms of an MIT-style license.
 * For details, see http://www.ruzee.com/
 */

var RUZEE = window.RUZEE || {};

RUZEE.ShadedBorder = {

create: function(opts) {
  var isie = /msie/i.test(navigator.userAgent) && !window.opera;
  var isie6 = isie && !window.XMLHttpRequest;
  function sty(el, h) {
    for(k in h) {
      if (/ie_/.test(k)) {
        if (isie) el.style[k.substr(3)]=h[k];
      } else el.style[k]=h[k];
    }
  }
  function crdiv(h) {
    var el=document.createElement("div");
    el.className = "sb-gen";
    sty(el, h);
    return el;
  }
  function op(v) {
    v = v<0 ? 0 : v;
    if (v>0.99999) return "";
    return isie ? " filter:alpha(opacity=" + (v*100) + ");" : " opacity:" + v + ';';
  }

  var sr = opts.shadow || 0;
  var r = opts.corner || 0;
  var bor = 0;
  var bow = opts.border || 0;
  var boo = opts.borderOpacity || 1;
  var shadow = sr != 0;
  var lw = r > sr ? r : sr;
  var rw = lw;
  var th = lw;
  var bh = lw;
  if (bow > 0) {
    bor = r;
    r = r - bow;
  }
  var cx = r != 0 && shadow ? Math.round(lw/3) : 0;
  var cy = cx;
  var cs = Math.round(cx/2);
  var iclass = r > 0 ? "sb-inner" : "sb-shadow";
  var sclass = "sb-shadow";
  var bclass = "sb-border";
  var edges = opts.edges || "trlb";
  if (!/t/i.test(edges)) th=0;
  if (!/b/i.test(edges)) bh=0;
  if (!/l/i.test(edges)) lw=0;
  if (!/r/i.test(edges)) rw=0;

  var p = { position:"absolute", left:"0", top:"0", width:lw + "px", height:th + "px", 
            ie_fontSize:"1px", overflow:"hidden", margin:"0", padding:"0" }; var tl = crdiv(p);
  delete p.left; p.right="0"; p.width=rw + "px"; var tr = crdiv(p);
  delete p.top; p.bottom="0"; p.height=bh + "px"; var br = crdiv(p);
  delete p.right; p.left="0"; p.width=lw + "px"; var bl = crdiv(p);

  var tw = crdiv({ position:"absolute", width:"100%", height:th + "px", ie_fontSize:"1px",
                   top:"0", left:"0", overflow:"hidden", margin:"0", padding:"0" });
  var t = crdiv({ position:"relative", height:th + "px", ie_fontSize:"1px",
                  margin:"0 "+ rw + "px 0 " + lw + "px", overflow:"hidden", padding:"0" });
  tw.appendChild(t);

  var bw = crdiv({ position:"absolute", left:"0", bottom:"0", width:"100%", height:bh + "px", 
                   ie_fontSize:"1px", overflow:"hidden", margin:"0", padding:"0" });
                   
  var b = crdiv({ position:"relative", height:bh + "px", ie_fontSize:"1px",
                  margin:"0 "+ rw + "px 0 " + lw + "px", overflow:"hidden", padding:"0" });
                  
  bw.appendChild(b);

  var mw = crdiv({ position:"absolute", top:(-bh)+"px", left:"0", width:"100%", height:"100%",
                   overflow:"hidden", ie_fontSize:"1px", padding:"0", margin:"0" });

  function corner(el,t,l) {
    var w = l ? lw : rw;
    var h = t ? th : bh;
    var s = t ? cs : -cs;
    var dsb = []; var dsi = []; var dss = [];
    
    var xp=0; var xd=1; if (l) { xp=w-1; xd=-1; }
    for (var x=0; x<w; ++x) {
      var yp=h-1; var yd=-1; if (t) { yp=0; yd=1; }
      var finished=false;
      for (var y=h-1; y>=0 && !finished; --y) {
        var div = '<div style="position:absolute; top:' + yp + 'px; left:' + xp + 'px; ' +
                  'width:1px; height:1px; overflow:hidden; margin:0; padding:0;';

        var xc = x - cx; var yc = y - cy - s;
        var d = Math.sqrt(xc*xc+yc*yc);
        var doShadow = false;

        if (r > 0) {
          // draw border
          if (xc < 0 && yc < bor && yc >= r || yc < 0 && xc < bor && xc >= r) {
            dsb.push(div + op(boo) + '" class="' + bclass + '"></div>');
          } else
          if (d<bor && d>=r-1 && xc>=0 && yc>=0) {
            var dd = div;
            if (d>=bor-1) {
              dd += op((bor-d)*boo);
              doShadow = true;
            } else dd += op(boo);
            dsb.push(dd + '" class="' + bclass + '"></div>');
          }
          
          // draw inner
          var dd = div + ' z-index:2;' + (t ? 'background-position:0 -' + (r-yc-1) + 'px;' : 'background-image:none;');
          var finish = function() {
            if (!t) dd = dd.replace(/top\:\d+px/, "top:0px");
            dd = dd.replace(/height\:1px/, "height:" + (y+1) + "px");
            dsi.push(dd + '" class="' + iclass + '"></div>');
            finished = true;
          };
          if (xc < 0 && yc < r || yc < 0 && xc < r) {
            finish();
          } else
          if (d<r && xc>=0 && yc>=0) {
            if (d>=r-1) {
              dd += op(r-d);
              doShadow = true;
              dsi.push(dd + '" class="' + iclass + '"></div>');
            } else {
              finish();
            }
          } else doShadow = true;
        } else doShadow = true;
        
        // draw shadow
        if (sr > 0 && doShadow) {
          d = Math.sqrt(x*x+y*y);
          if (d<sr) {
            dss.push(div + ' z-index:0; ' + op(1-(d/sr)) + '" class="' + sclass + '"></div>');
          }
        }
        yp += yd;
      }
      xp += xd;
    }
    el.innerHTML = dss.concat(dsb.concat(dsi)).join('');
  }
  
  function mid(mw) {
    var ds = [];

    ds.push('<div style="position:relative; top:' + (th+bh) + 'px; height:2048px; ' +
            ' margin:0 ' + (rw-r-cx) + 'px 0 ' + (lw-r-cx) + 'px; ' +
            ' padding:0; overflow:hidden;' +
            ' background-position:0 ' + (th > 0 ? -(r+cy+cs) : '0') + 'px;"' +
            ' class="' + iclass + '"></div>');

    var dd = '<div style="position:absolute; width:1px;' +
        ' top:' + (th+bh) + 'px; height:2048px; padding:0; margin:0;';
    if (sr>0) {
      for (var x=0; x<lw-r-cx; ++x) {
        ds.push(dd + ' left:' + x + 'px;' + op((x+1.0)/lw) + 
            '" class="' + sclass + '"></div>');
      }

      for (var x=0; x<rw-r-cx; ++x) {
        ds.push(dd + ' right:' + x + 'px;' + op((x+1.0)/rw) + 
            '" class="' + sclass + '"></div>');
      }
    }

    if (bow > 0) {
      var su = ' width:' + bow + 'px;' + op(boo) + '" class="' + bclass + '"></div>';
      ds.push(dd + ' left:' + (lw-bor-cx) + 'px;' + su);
      ds.push(dd + ' right:' + (rw-bor-cx) + 'px;' + su);
    }

    mw.innerHTML = ds.join('');
  }

  function tb(el, t) {
    var ds = [];
    var h = t ? th : bh;
    var dd = '<div style="height:1px; overflow:hidden; position:absolute; margin:0; padding:0;' +
        ' width:100%; left:0px; ';
    var s = t ? cs : -cs;
    for (var y=0; y<h-s-cy-r; ++y) {
      if (sr>0) ds.push(dd + (t ? 'top:' : 'bottom:') + y + 'px;' + op((y+1)*1.0/h) + 
          '" class="' + sclass + '"></div>');
    }
    if (y >= bow) {
      ds.push(dd + (t ? 'top:' : 'bottom:') + (y - bow) + 'px;' + op(boo) +
          ' height:' + bow + 'px;" class="' + bclass + '"></div>');
    }

    ds.push(dd + (t ? 'background-position-y:0; top:' : 
                      'background-image:none; bottom:') + y + 'px;' +
        ' height:' + (r+cy+s) + 'px;" class="' + iclass + '"></div>');

    el.innerHTML = ds.join('');
  }

  corner(tl, true, true); corner(tr, true, false);
  corner(bl, false, true); corner(br, false, false);
  mid(mw); tb(t, true); tb(b, false);
  needsCloning = false;

  return {
    render: function(el) {
      if (typeof el == 'string') el = document.getElementById(el);
      if (el.length != undefined) {
        for (var i=0; i<el.length; ++i) this.render(el[i]);
        return;
      }
      el.className += " sb";
      sty(el, { position:"relative", background:"transparent" });

      // remove generated children
      var node = el.firstChild;
      while (node) {
        var nextNode = node.nextSibling;
        if (node.nodeType == 1 && node.className == 'sb-gen')
          el.removeChild(node);
        node = nextNode;
      }

      var iel = el.firstChild;

      var twc = needsCloning ? tw.cloneNode(true) : tw;
      var mwc = needsCloning ? mw.cloneNode(true) : mw;



      var bwc = needsCloning ? bw.cloneNode(true) : bw;
      var tlc = needsCloning ? tl.cloneNode(true) : tl;
      var trc = needsCloning ? tr.cloneNode(true) : tr;
      var blc = needsCloning ? bl.cloneNode(true) : bl;
      var brc = needsCloning ? br.cloneNode(true) : br;
      
      el.insertBefore(tlc, iel); el.insertBefore(trc, iel);
      el.insertBefore(blc, iel); el.insertBefore(brc, iel);
      el.insertBefore(twc, iel); el.insertBefore(mwc, iel);
      el.insertBefore(bwc, iel);

      if (isie6) {
        el.onmouseover=function() { this.className += " hover"; }
        el.onmouseout=function() { this.className = this.className.replace(/ hover/,""); }
      }
      if (isie) {
        function resize() {
          twc.style.width = bwc.style.width = mwc.style.width = el.offsetWidth + "px";
          if (isie6) {
            mwc.firstChild.style.height = el.offsetHeight + "px";
          } else {
            for (var i=0; i<mwc.childNodes.length; ++i) {
              mwc.childNodes[i].style.height = (el.offsetHeight - bh - th)  + "px";
            }
          }
          trc.style.right = brc.style.right = null;
          trc.style.left  = brc.style.left  = (el.offsetWidth - rw) + "px";
        }
        el.onresize=resize;
        resize();
      }
      needsCloning = true;
    }
  };
}
}

// add our styles to the document
document.write('\
  <style type="text/css">\
  .sb, .sbi, .sb *, .sbi * { position:relative; z-index:1; }\
  * html .sb, * html .sbi { height:1%; }\
  .sbi { display:inline-block; }\
  .sb-inner { background:#ddd; }\
  .sb-shadow { background:#000; }\
  .sb-border { background:#bbb; }\
  </style>\
');

//* START RUZEE.ShadedBorder
var shadowedBorder    = RUZEE.ShadedBorder.create({ corner:8, shadow:16 });
  
  var changeBorders = [
    RUZEE.ShadedBorder.create({ corner:20 }),
    RUZEE.ShadedBorder.create({ corner:10, shadow:20 })
  ];  
 // ########################################################################################

<!--

/***********************************************
* Rollover background-image button- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Specify optional button target: "_new" for new window, or name of FRAME target (ie "myframe")
var buttontarget=""

if (document.images){
after=new Image()
//Enter image path of second image (for preloading purposes):
after.src="second.jpg"
}

function changegizmo(e, image){
var el=window.event? event.srcElement: e.target
if (el.tagName=="INPUT"&&el.type=="button")
el.style.backgroundImage="url"+"('"+image+"')"
if (el.tagName=="INPUT"&&el.type=="reset")
el.style.backgroundImage="url"+"('"+image+"')"
}

function jumptogizmo(url){
if (buttontarget=="")
window.location=url
else if (buttontarget=="_new")
window.open(url)
else
parent[buttontarget].location=url
}

//-->



//** Tab Content script v2.0- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Updated Oct 7th, 07 to version 2.0. Contains numerous improvements:
//   -Added Auto Mode: Script auto rotates the tabs based on an interval, until a tab is explicitly selected
//   -Ability to expand/contract arbitrary DIVs on the page as the tabbed content is expanded/ contracted
//   -Ability to dynamically select a tab either based on its position within its peers, or its ID attribute (give the target tab one 1st)
//   -Ability to set where the CSS classname "selected" get assigned- either to the target tab's link ("A"), or its parent container
//** Updated Feb 18th, 08 to version 2.1: Adds a "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically
//** Updated April 8th, 08 to version 2.2: Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0) 

////NO NEED TO EDIT BELOW////////////////////////

function ddtabcontent(tabinterfaceid){
	this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container
	this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container
	this.enabletabpersistence=true
	this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
	this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array
	this.subcontentids=[] //Array to store ids of the sub contents ("rel" attr values)
	this.revcontentids=[] //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values)
	this.selectedClassTarget="link" //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link")
}

ddtabcontent.getCookie=function(Name){ 
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return ""
}

ddtabcontent.setCookie=function(name, value){
	document.cookie = name+"="+value+";path=/" //cookie value is domain wide (path=/)
}

ddtabcontent.prototype={

	expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers
		this.cancelautorun() //stop auto cycling of tabs (if running)
		var tabref=""
		try{
			if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr
				tabref=document.getElementById(tabid_or_position)
			else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr
				tabref=this.tabs[tabid_or_position]
		}
		catch(err){alert("Invalid Tab ID or position entered!")}
		if (tabref!="") //if a valid tab is found based on function parameter
			this.expandtab(tabref) //expand this tab
	},

	cycleit:function(dir, autorun){ //PUBLIC function to move foward or backwards through each hot tab (tabinstance.cycleit('foward/back') )
		if (dir=="next"){
			var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
		}
		else if (dir=="prev"){
			var currentTabIndex=(this.currentTabIndex>0)? this.currentTabIndex-1 : this.hottabspositions.length-1
		}
		if (typeof autorun=="undefined") //if cycleit() is being called by user, versus autorun() function
			this.cancelautorun() //stop auto cycling of tabs (if running)
		this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])
	},

	setpersist:function(bool){ //PUBLIC function to toggle persistence feature
			this.enabletabpersistence=bool
	},

	setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link")
		this.selectedClassTarget=objstr || "link"
	},

	getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to
		return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref
	},

	urlparamselect:function(tabinterfaceid){
		var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i")) //check for "?tabinterfaceid=2" in URL
		return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index
	},

	expandtab:function(tabref){
		var subcontentid=tabref.getAttribute("rel") //Get id of subcontent to expand
		//Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easily search through
		var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
		this.expandsubcontent(subcontentid)
		this.expandrevcontent(associatedrevids)
		for (var i=0; i<this.tabs.length; i++){ //Loop through all tabs, and assign only the selected tab the CSS class "selected"
			this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)? "selected" : ""
		}
		if (this.enabletabpersistence) //if persistence enabled, save selected tab position(int) relative to its peers
			ddtabcontent.setCookie(this.tabinterfaceid, tabref.tabposition)
		this.setcurrenttabindex(tabref.tabposition) //remember position of selected tab within hottabspositions[] array
	},

	expandsubcontent:function(subcontentid){
		for (var i=0; i<this.subcontentids.length; i++){
			var subcontent=document.getElementById(this.subcontentids[i]) //cache current subcontent obj (in for loop)
			subcontent.style.display=(subcontent.id==subcontentid)? "block" : "none" //"show" or hide sub content based on matching id attr value
		}
	},

	expandrevcontent:function(associatedrevids){
		var allrevids=this.revcontentids
		for (var i=0; i<allrevids.length; i++){ //Loop through rev attributes for all tabs in this tab interface
			//if any values stored within associatedrevids matches one within allrevids, expand that DIV, otherwise, contract it
			document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none"
		}
	},

	setcurrenttabindex:function(tabposition){ //store current position of tab (within hottabspositions[] array)
		for (var i=0; i<this.hottabspositions.length; i++){
			if (tabposition==this.hottabspositions[i]){
				this.currentTabIndex=i
				break
			}
		}
	},

	autorun:function(){ //function to auto cycle through and select tabs based on a set interval
		this.cycleit('next', true)
	},

	cancelautorun:function(){
		if (typeof this.autoruntimer!="undefined")
			clearInterval(this.autoruntimer)
	},

	init:function(automodeperiod){
		var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid) //get position of persisted tab (applicable if persistence is enabled)
		var selectedtab=-1 //Currently selected tab index (-1 meaning none)
		var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid) //returns null or index from: tabcontent.htm?tabinterfaceid=index
		this.automodeperiod=automodeperiod || 0
		for (var i=0; i<this.tabs.length; i++){
			this.tabs[i].tabposition=i //remember position of tab relative to its peers
			if (this.tabs[i].getAttribute("rel")){
				var tabinstance=this
				this.hottabspositions[this.hottabspositions.length]=i //store position of "hot" tab ("rel" attr defined) relative to its peers
				this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel") //store id of sub content ("rel" attr value)
				this.tabs[i].onclick=function(){
					tabinstance.expandtab(this)
					tabinstance.cancelautorun() //stop auto cycling of tabs (if running)
					return false
				}
				if (this.tabs[i].getAttribute("rev")){ //if "rev" attr defined, store each value within "rev" as an array element
					this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))
				}
				if (selectedtabfromurl==i || this.enabletabpersistence && selectedtab==-1 && parseInt(persistedtab)==i || !this.enabletabpersistence && selectedtab==-1 && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
					selectedtab=i //Selected tab index, if found
				}
			}
		} //END for loop
		if (selectedtab!=-1) //if a valid default selected tab index is found
			this.expandtab(this.tabs[selectedtab]) //expand selected tab (either from URL parameter, persistent feature, or class="selected" class)
		else //if no valid default selected index found
			this.expandtab(this.tabs[this.hottabspositions[0]]) //Just select first tab that contains a "rel" attr
		if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
			this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod)
		}
	} //END int() function

} //END Prototype assignmen




//////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////

// Chandler Burning Index Calculator

function compt(obj)
{
 return parseFloat(obj);
}
function inputCBI(form, button)
{
 cal_fdi(form);
 return;
}
function cal_fdi(form)
{
var a=compt(form.inputCBI1.value);//temperature = degrees Fahrenheit
if (a < 0 || a > 120) {
   
   alert("ERROR - Temperature must be between 0 and 120 degrees Fahrenheit.")
}
var b=compt(form.inputCBI2.value);//rh = Humidity
if (b < 0 || b > 100) {
   
   alert("ERROR - Humidity must be between 0 and 100 percent.")
}

var a1 = (5/9)*(a - 32)
CBI = (0.0167 * (104.5 - (1.373 * b) + (0.54 * a1)) * (124 * Math.pow(10,(-0.0142 * b))))
FH_CBImath = (Math.round(CBI))
if (CBI < 50)
  {
 var adj = "LOW"
  }
if (CBI >= 50)
  {
 var adj = "MODERATE"
}
if (CBI > 75)
  {
  var adj = "HIGH"
}
  if (CBI > 90)
  {
  var adj = "VERY HIGH"
}
if (CBI >= 97.5)
  {
  var adj = "EXTREME"
}

{
form.outputCBI3.value=FH_CBImath;//CBI
form.outputCBI4.value=adj;//adjective
}
}

//// Chandler Burning Index Calculation ENDS ////////////////////////////////////


