
//***********************************************	
//***************** FUNCTIONS *******************
//***********************************************

// show help
function showHelp(){
	if (typeof helpWin == 'undefined'){
		helpWin = window.open("help.htm", "Help", "width=500,height=400,toolbar=0,menubar=0,scrollbars=1,status=0,resizable=1,left=340,top=50");
		helpWin.opener = self;
	} else {
		if (helpWin.closed){
			helpWin = window.open("help.htm", "Help", "width=500,height=400,toolbar=0,menubar=0,scrollbars=1,status=0,resizable=1,left=340,top=50");
			helpWin.opener = self;
		} else {			
			helpWin.focus();
		}
	}
}


// show form
function showForm(sForm){
	document.getElementById('ifrm').src =  "txt_" + sForm + "z.htm";
	//origzeusedit document.TextFrame.location = "txt_" + sForm + ".htm";
}

// set layer mode
function setLayerMode(){
	document.frmMain.cmd.value = 'REFRESH';
	showLayer("loadLayer");
	document.frmMain.submit();
}


// show CAMA
function showCAMA(){
	sFolio = document.frmMain.folio.value;
	if(sFolio != ""){
		document.getElementById('ifrm').src = "txt_CAMAz.asp?folio="+sFolio;
		//origzeusedit document.frames['TextFrame'].location.href= "txt_CAMA.asp?folio="+sFolio;
	}
}

// set map size
function setMapSize(iSize){
	document.frmMain.cmd.value = 'REFRESH';
	document.frmMain.msize.value = iSize;
	document.frmMain.submit();
	showLayer("loadLayer");
}

// show buffer results
function showBufferResults(){
	document.TextFrame.location = "txt_buffer.asp";

}


// show airborne
function showAirborne(sFlight){
	if(sFlight != ""){
		theURL = "video/"+sFlight+".mpg";
		window.open(theURL, "Airborne", "width=350,height=300,toolbar=0,menubar=0,scrollbars=0,resizable=0,left=340,top=0");
	}
}


// show print map
function showPrintMap(){
	cmd = document.frmMain.lcmd.value;
	//alert(cmd);
	radius = document.frmMain.radius.value;
	folio = document.frmMain.folio.value;
	minX = document.frmMain.minX.value;
	minY = document.frmMain.minY.value;
	maxX = document.frmMain.maxX.value;
	maxY = document.frmMain.maxY.value;
	lmode = document.frmMain.layermode.options[document.frmMain.layermode.options.selectedIndex].value;
	theURL = "printmap.asp?folio="+folio+"&minX="+minX+"&minY="+minY+"&maxX="+maxX+"&maxY="+maxY+"&layermode="+lmode+"&cmd="+cmd+"&radius="+radius;
	//alert(theURL);
	printWin = window.open(theURL, "Print", "width=600,height=400,toolbar=0,menubar=1,scrollbars=1,resizable=1,left=20,top=0");
}

// show home
function showHome(){
	parent.location = "http://www.hcpafl.org/www";
}

// show PQ home
function showPQHome(){
	parent.location = "default.htm";
}


