 //<![cdata[
<!--
/* order= NSW, VIC, QLD, WA, SA, Tas,NT, ACT,  */

/* state forecasts*/ 
var sf=new Array(
"/cgi-bin/wrap_fwo.pl?IDN10031.txt",
"/cgi-bin/wrap_fwo.pl?IDV10310.txt",
"/cgi-bin/wrap_fwo.pl?IDQ10700.txt",
"/cgi-bin/wrap_fwo.pl?IDW12000.txt",
"/cgi-bin/wrap_fwo.pl?IDS10033.txt",
"/cgi-bin/wrap_fwo.pl?IDT13100.html",
"/cgi-bin/wrap_fwo.pl?IDD10110.html",
"/cgi-bin/wrap_fwo.pl?IDN10035.txt");

/*towns and cities, no NT product, NT from above repeated */
var tf=new Array(
"/watl/weather/forecasts/nsw-7-day-forecasts.shtml",
"/watl/weather/forecasts/vic-7-day-forecasts.shtml",
"/watl/weather/forecasts/qld-7-day-forecasts.shtml",
"/watl/weather/forecasts/wa-7-day-forecasts.shtml",
"/watl/weather/forecasts/sa-7-day-forecasts.shtml",
"/watl/weather/forecasts/tas-7-day-forecasts.shtml",
"/watl/weather/forecasts/nt-7-day-forecasts.shtml",
"/watl/weather/forecasts/nsw-7-day-forecasts.shtml"
);
/*
"/cgi-bin/wrap_fwo.pl?IDN10084.txt",
"/cgi-bin/wrap_fwo.pl?IDV10580.txt",
"/cgi-bin/wrap_fwo.pl?IDQ10600.txt",
"/cgi-bin/wrap_fwo.pl?IDW14500.txt",
"/cgi-bin/wrap_fwo.pl?IDS10043.txt",
"/cgi-bin/wrap_fwo.pl?IDT13400.html",
"/cgi-bin/wrap_fwo.pl?IDD10110.html",
"/cgi-bin/wrap_fwo.pl?IDN10049.txt";
*/
/*district forecast clickable maps, ACT direct to forecast */
var df=new Array(
"/weather/nsw/nsw-forecast-map.shtml",
"/weather/vic/vic-forecast-map.shtml",
"/weather/qld/qld-forecast-map.shtml",
"/weather/wa/wa-forecast-map.shtml",
"/weather/sa/sa-forecast-map.shtml",
"/weather/tas/tas-forecast-map.shtml",
"/weather/nt/nt-forecast-map.shtml",
"/cgi-bin/wrap_fwo.pl?IDN10035.txt");

/*latest weather*/
var lw=new Array(
"/products/IDN60800.shtml",
"/products/IDV60800.shtml",
"/products/IDQ60800.shtml",
"/products/IDW60800.shtml",
"/products/IDS60800.shtml",
"/products/IDT60800.shtml",
"/products/IDD60800.shtml",
"/products/IDN60800.shtml"
);

/* latest weather graphs...temp values */
var lg=new Array(
"/watl/weather/observations/nsw-latest-weather-graphs.shtml",
"/watl/weather/observations/vic-latest-weather-graphs.shtml",
"/watl/weather/observations/qld-latest-weather-graphs.shtml",
"/watl/weather/observations/wa-latest-weather-graphs.shtml",
"/watl/weather/observations/sa-latest-weather-graphs.shtml",
"/watl/weather/observations/tas-latest-weather-graphs.shtml",
"/watl/weather/observations/nt-latest-weather-graphs.shtml",
"/watl/weather/observations/act-latest-weather-graphs.shtml"
);

/* thermal comfort */
var tc=new Array(
"/products/IDN65179.shtml",
"/products/IDV65079.shtml",
"/products/IDQ65214.shtml",
"/products/IDW65100.shtml",
"/products/IDS65004.shtml",
"/products/IDT65050.shtml",
"/products/IDD65155.shtml",
"/products/IDN65179.shtml"				 
);

/*ag_bull*/
var ab=new Array(
"/products/IDN65176.shtml",
"/products/IDV65176.shtml",
"/products/IDQ60604.shtml",
"/products/IDW65176.shtml",
"/products/IDS65176.shtml",
"/products/IDT65176.shtml",
"/products/IDD65176.shtml",
"/products/IDN65176.shtml"
);

/*daily_weather_obs*/
var dw=new Array(
"/climate/dwo/IDCJDW0200.shtml",
"/climate/dwo/IDCJDW0300.shtml",
"/climate/dwo/IDCJDW0400.shtml",
"/climate/dwo/IDCJDW0600.shtml",
"/climate/dwo/IDCJDW0500.shtml",
"/climate/dwo/IDCJDW0700.shtml",
"/climate/dwo/IDCJDW0800.shtml",
"/climate/dwo/IDCJDW0100.shtml"
);

/* old climate_averages*/
/*
var ca=new Array(			 
"/climate/averages/tables/ca_nsw_names.shtml", 
"/climate/averages/tables/ca_vic_names.shtml", 
"/climate/averages/tables/ca_qld_names.shtml", 
"/climate/averages/tables/ca_wa_names.shtml",
"/climate/averages/tables/ca_sa_names.shtml",
"/climate/averages/tables/ca_tas_names.shtml",
"/climate/averages/tables/ca_nt_names.shtml",
"/climate/averages/tables/ca_nsw_names.shtml"
);
*/

var ca=new Array(			 
"/climate/averages/index.shtml?map_type=cdio&code=1", 
"/climate/averages/index.shtml?map_type=cdio&code=3", 
"/climate/averages/index.shtml?map_type=cdio&code=5", 
"/climate/averages/index.shtml?map_type=cdio&code=7",
"/climate/averages/index.shtml?map_type=cdio&code=9",
"/climate/averages/index.shtml?map_type=cdio&code=11",
"/climate/averages/index.shtml?map_type=cdio&code=12",
"/climate/averages/index.shtml?map_type=cdio&code=1"
);

  function gotoURL(n){
	var theform='productSelector'+n;
  	var feedback;
  	var noLocation=true;
   // var theLocation = document.productSelector.where.selectedIndex;
    //if(document.productSelector.where.options[theLocation].value == "null"){ 
	var theLocation = document[theform].where.selectedIndex;
		if(document[theform].where.options[theLocation].value == "null"){ 
		feedback="Please select a location first";
		alert(feedback);
		return false;
	   }
   
  else{
	theLocation=theLocation*1;
	var set,url;
	noLocation=false;
	//check the product
	var noProduct=true;
	//var theProduct= document.productSelector.what;
	var theProduct= document[theform].what;
	for(var i=0;i<theProduct.length;i++){
			if(theProduct[i].checked){
				noProduct=false;
				theArray=theProduct[i].value;
				//if(theArray=="na"){alert("The product you selected is not available for this location."); return false;}
				url=eval(theArray)[theLocation-1];
				window.location.href = url;
				return false;
			}

		}
		/*
		if(noProduct){ 
				feedback = "Please select a product";
				alert(feedback);
				return false;
		}
		*/
    }
  }
//-->
//]]> 
