function showWait()
			{
				var myWait = document.getElementById("Wait");
				var myMapImage = document.getElementById("MapImage");
					
				myWait.style.visibility="visible";
				myMapImage.style.visibility="hidden";
			}

            
function showPrintPreviewTable(){ 
    window.open("PrintPreview.aspx?table=TRUE","_layer","menubar=yes,scrollbars=yes,toolbar=yes,resizable=yes"); 
} 

function openHelp(){
	window.open("GDPMAP_Help.htm","help","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}

function openHelpLevel(){
	window.open("GDPMAP_Help.htm#Level","Level","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}

function openHelpShare(){
	window.open("GDPMAP_Help.htm#Share","Share","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}

function openHelpPerJob(){
	window.open("GDPMAP_Help.htm#PerJob","PerJob","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}

function openHelpAAGR(){
	window.open("GDPMAP_Help.htm#AAGR","AAGR","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}

function openHelpLQ(){
	window.open("GDPMAP_Help.htm#LQ","LQ","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");
}

function openHelpCurrentDollarGSP(){
	window.open("GDPMAP_Help.htm#CurrentDollarGSP","CurrentDollarGSP","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");}

function openHelpTOPILessSub(){
	window.open("GDPMAP_Help.htm#TOPILessSub","TOPILessSub","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");}

function openHelpCompensation(){
	window.open("GDPMAP_Help.htm#Compensation","Compensation","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");}

function openHelpGOS(){
	window.open("GDPMAP_Help.htm#GOS","GOS","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");}

function openHelpTOPI(){
	window.open("GDPMAP_Help.htm#TOPI","TOPI","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");}
 
 
function openHelpQuantityIndex(){
	window.open("GDPMAP_Help.htm#QuantityIndex","QuantityIndex","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");}

function openHelpRealChainedDollarGSP(){
	window.open("GDPMAP_Help.htm#RealChainedDollarGSP","RealChainedDollarGSP","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");}

function openHelpNotPermitted(){
	window.open("GDPMAP_Help.htm#NotPermitted","NotPermitted","width=850,height=500,resizable=yes,menubar=no,scrollbars=yes,toolbar=no");}



function showhide(val){
	
     	if (val == "map_avg_growth") {
		begyearlabel.style.visibility = "visible";
		fromlabel.style.visibility = "visible";
		tolabel.style.visibility = "visible";
		endyearlabel.style.visibility = "visible";
		
	 	}
	else
   	{
   		begyearlabel.style.visibility = "hidden";
   		fromlabel.style.visibility = "hidden";
   		tolabel.style.visibility = "hidden";
		endyearlabel.style.visibility = "hidden";

   	}
}
//only show begin year when Unit of measure name "avg_annual_growth" selected, otherwise hide begin year.
//call showhide function here, a[3] means stat_proc.value (stored procedure name).

function bothfuncs(){
var a = document.forms("mapinfo").select_values.value.split(",");

showhide(a[3]);
if (a[0] != "") {
	document.forms("mapinfo").endyear.value   = a[0];
	document.forms("mapinfo").component.value = a[1];
	document.forms("mapinfo").industry.value  = a[2];
	document.forms("mapinfo").stat_proc.value = a[3];
	document.forms("mapinfo").ranges.value    = a[4];
	document.forms("mapinfo").begyear.value   = a[5];
	document.forms("mapinfo").colors.value    = a[6];
	if (a[7] == 3) {
		document.forms("mapinfo").dist_method[1].checked = false;
		document.forms("mapinfo").dist_method[0].checked = true;

	}
	else 	{
	document.forms("mapinfo").dist_method[1].checked = true;
	document.forms("mapinfo").dist_method[0].checked = false;
		}

	   }
}


						 


