<!--
var BASIC_PART;
var PARTNUMBER;
var IMGFILE;
var FINISH_SYM;
var DASH_NUM_1;
var DASH_NUM_2;
var ANGULAR;
var BAND_OPTION;
var QwikCreateWindow;

var PRODUCT_SERIES = "447";
//var BASIC_PART     = "001";

var OPENCATALOGPAGE="http://www.alvatek.com/qwikcreate/mightymouse/G-9.pdf";
//

//----------------------------------------------------------------------------------------------------------------------

//
function QwikCreate_StartUP() {
	Display_Layer("wait");
	QwikCreate_LoadUp();
}

function QwikCreate_LoadUp() {
	Fill_Selections("Main_Layer", "Main_Layer_Select_1", "START");
	Fill_Selections("Main_Layer", "Main_Layer_Select_2", "BLANK");
	Fill_Selections("Main_Layer", "Main_Layer_Select_3", "BLANK");
	Fill_Selections("Main_Layer", "Main_Layer_Select_4", "BLANK");
	Fill_Selections("Main_Layer", "Main_Layer_Select_6", "BLANK");
	//Fill_Selections("Main_Layer", "Main_Layer_Select_4", "BLANK");

	Layer_X = 50;
	Layer_Y = 140;
	document.getElementById('Header_Layer').style.left=20;
	document.getElementById('Header_Layer').style.top=20;
	document.getElementById('Main_Layer').style.left=Layer_X;
	document.getElementById('Main_Layer').style.top=Layer_Y;
	document.getElementById('Part_Number_Button').style.left=Layer_X;
	document.getElementById('Part_Number_Button').style.top=300+Layer_Y;
	Display_Layer("Header_Layer");
	Display_Layer("Main_Layer");
	Hide_Layer("wait");
}
//

//----------------------------------------------------------------------------------------------------------------------

//
function Hide_Layer (WHAT_LAYER) {
	document.getElementById(WHAT_LAYER).style.visibility="hidden";
}
function Display_Layer (WHAT_LAYER) {
	document.getElementById(WHAT_LAYER).style.visibility="visible";
}
//

//----------------------------------------------------------------------------------------------------------------------

//
function Fill_Selections(WHAT_LAYER, WHAT_SELECT, WHAT_OPTS) {
	Selections_Path="document.forms[0]." + WHAT_SELECT;

	o = new Array;
	i=0;

	if (WHAT_OPTS == "BLANK") {
		o[i++]=new Option(" ", " ");
	}
	if(WHAT_OPTS == "START")
	{
		o[i++]=new Option("Please Select Below", "");
		o[i++]=new Option("Straight", "S");
		o[i++]=new Option("45 degrees", "H");
		o[i++]=new Option("90 degrees", "J");
	}
	if(WHAT_OPTS == "FINISH_SYM")
	{
		o[i++]=new Option("Please Select Below", "");
		o[i++]=new Option("Anodize/Black","C");
		o[i++]=new Option("Gold Iridite Over Cadmium Plate Over Nickel","J");
		o[i++]=new Option("Electroless Nickel","M");
		o[i++]=new Option("Cad/O.D. Over Electroless Nickel (500 Hour Salt Spray)","NF");
		o[i++]=new Option("Zinc Nickel/Olive Drab Over Electroless Nickel","ZN");
		o[i++]=new Option("Zinc Nickel/Black Over Electroless Nickel","ZNU");
		o[i++]=new Option("SST. Material/Passivate","Z1");
	}
	if (WHAT_OPTS == "DASH_NUM_1") {
		o[i++]=new Option("Please Select Below","");
		o[i++]=new Option("05","05");
		o[i++]=new Option("06","06");
		o[i++]=new Option("07","07");
		o[i++]=new Option("09","09");
		o[i++]=new Option("12","12");
		o[i++]=new Option("14","14");		
	}
	if (WHAT_OPTS == "DASH_NUM_2") {
		o[i++]=new Option("Please Select Below","");
		o[i++]=new Option("02","02");
		o[i++]=new Option("03","03");
		o[i++]=new Option("04","04");
		o[i++]=new Option("05","05");
		o[i++]=new Option("06","06");
		o[i++]=new Option("07","07");
		o[i++]=new Option("08","08");
		o[i++]=new Option("09","09");
		o[i++]=new Option("10","10");
		o[i++]=new Option("11","11");
		o[i++]=new Option("12","12");
		o[i++]=new Option("13","13");
		o[i++]=new Option("14","14");		
	}
	if(WHAT_OPTS == "BAND_OPTION")
	{
		o[i++]=new Option("Please Select Below","");
		o[i++]=new Option("None","N");
		o[i++]=new Option("600-083 Band Supplied","B");
		o[i++]=new Option("600-083-1 Pre-Coiled Band Supplied","K");
	}


	OPTION_WIDTH=0;
	if (i==0) {
		alert("Error: that dropdown should do something, but it doesn't");
	} else {
		eval(Selections_Path+".length=o.length");

		for (i=0; i < o.length; i++) {
			eval(Selections_Path+".options[i]=o[i]");
			if (o[i].text.length>OPTION_WIDTH) {
				OPTION_WIDTH=o[i].text.length;
			}
		}
	}
	eval(Selections_Path+".width=OPTION_WIDTH");
	eval(Selections_Path+".length=o.length");
	eval(Selections_Path+".options[0].selected=true");
}
//

//----------------------------------------------------------------------------------------------------------------------

//
function Form_Change(caller) {
	if ((QwikCreateWindow)&&(!QwikCreateWindow.closed)) {
		QwikCreateWindow.close();
	}

	if (caller.options) {
		OPTION_VAL=caller.options[caller.selectedIndex].value;
		OPTION_TXT=caller.options[caller.selectedIndex].text;
	}
	
	GOTO_URL=0;

	// -- IF GOING TO A DIFFERENT WEBSITE
	if (OPTION_VAL.indexOf("http://") == 0) {
		Hide_Layer("Header_Layer");
		Hide_Layer("Main_Layer");
		Hide_Layer("Part_Number_Button");
		Display_Layer("wait");
		window.open(OPTION_VAL, "_top");
		GOTO_URL=1;
	}

	// -- IF GOING TO A DIFFERNT PAGE, SAME SITE
	if (OPTION_VAL.indexOf(":")==0) {
		Hide_Layer("Header_Layer");
		Hide_Layer("Main_Layer");
		Hide_Layer("Part_Number_Button");
		Display_Layer("wait");
		TOGO_URL=OPTION_VAL.substring(1)+".html";
		window.open(TOGO_URL, "_top");
		GOTO_URL=1;
	}
	if (!GOTO_URL) {
		if (caller.name=="Main_Layer_Select_1") {
			ANGULAR = OPTION_VAL;
			ANGULAR_NAME=OPTION_TXT;
			Fill_Selections("Main_Layer", "Main_Layer_Select_2", "FINISH_SYM");
		}
		if (caller.name=="Main_Layer_Select_2") {
			FINISH_SYM = OPTION_VAL;
			FINISH_SYM_NAME=OPTION_TXT;
			Fill_Selections("Main_Layer", "Main_Layer_Select_3", "DASH_NUM_1");
		}
		if (caller.name=="Main_Layer_Select_3") {
			DASH_NUM_1 = OPTION_VAL;
			DASH_NUM_1_NAME = OPTION_TXT;
			Fill_Selections("Main_Layer", "Main_Layer_Select_4", "DASH_NUM_2");
		}
		if (caller.name=="Main_Layer_Select_4") {
			DASH_NUM_2 = OPTION_VAL;
			DASH_NUM_2_NAME = OPTION_TXT;
		}
		if(caller.name=="Main_Layer_Select_5"){
			LENGTH = caller.value;
			Fill_Selections("Main_Layer", "Main_Layer_Select_6", "BAND_OPTION");
		}
		if(caller.name=="Main_Layer_Select_6"){
			BAND_OPTION = OPTION_VAL;
			BAND_OPTION_NAME = OPTION_TXT;
		}
	}

	
	PARTNUMBER = PRODUCT_SERIES + "M" + ANGULAR + "755" + FINISH_SYM + DASH_NUM_1 + DASH_NUM_2 + LENGTH;
	
	if(BAND_OPTION != "N")
	{
		PARTNUMBER = PARTNUMBER + BAND_OPTION;
	}

	if ((ANGULAR)&&(LENGTH)&&(BAND_OPTION)&&(DASH_NUM_2)&&(DASH_NUM_1)&&(FINISH_SYM)) {
		Display_Layer("Part_Number_Button");
	} else {
		Hide_Layer("Part_Number_Button");
	}
}
//

//----------------------------------------------------------------------------------------------------------------------

//
function QwikCreatePartNumber() {


	if(ANGULAR == "S")
	{
		IMGFILE = "447-755-s.gif";
	}
	if(ANGULAR == "H")
	{
		IMGFILE = "447-755-h.gif";
	}
	if(ANGULAR == "J")
	{
		IMGFILE = "447-755-j.gif";
	}
	
	if ((QwikCreateWindow)&&(!QwikCreateWindow.closed)) {
		QwikCreateWindow.close();
	}
	QwikCreateWindow=window.open('','','resizable=yes,scrollbars=yes,width=770,height=600');
	//
	QwikCreateWindow.document.write("<HTML><TITLE>QwikCreate - Part Number: ",PARTNUMBER,", Glenair Inc.</TITLE><BODY BGCOLOR=WHITE><CENTER><IMG SRC='http://www.alvatek.com/qwikcreate/mca/imgs/banner_air.jpg'>\n");
	QwikCreateWindow.document.write("<TABLE WIDTH=640 BORDER=0 CELLPADDING=5 CELLSPACING=0><TR VALIGN=TOP><TD COLSPAN=2><CENTER><BR><FONT FACE='TAHOMA' SIZE=5><B>Part Number: ",PARTNUMBER,"</B></FONT><BR>\n");
	QwikCreateWindow.document.write("<img src='imgs/"+ IMGFILE +"'><br>");
	QwikCreateWindow.document.write("</TD></TR>\n");
	QwikCreateWindow.document.write("<TR VALIGN=TOP><TD COLSPAN=2><FONT FACE='TAHOMA' SIZE=2>\n");
	QwikCreateWindow.document.write("Angular Function: ",ANGULAR_NAME,"<br>\n");
	QwikCreateWindow.document.write("Finish Sym: ",FINISH_SYM_NAME,"<br>\n");
	QwikCreateWindow.document.write("Dash Num: ",DASH_NUM_1_NAME,"<br>\n");
	QwikCreateWindow.document.write("Dash Num: ",DASH_NUM_2_NAME,"<br>\n");
	QwikCreateWindow.document.write("Length: ",LENGTH,"<br>\n");
	QwikCreateWindow.document.write("Band Option: ",BAND_OPTION_NAME,"<br>\n");	

	//QwikCreateWindow.document.write("<br>Metric dimensions (mm) are in parentheses <br>\n");
	//QwikCreateWindow.document.write("<br>Consult factory for sizes not shown <br>\n");
	//QwikCreateWindow.document.write("<br>Tubing shown for reference only. <br>\n");

	QwikCreateWindow.document.write("<br></TD></TR>");
	QwikCreateWindow.document.write("<TR><TD COLSPAN=2 ALIGN=CENTER><FONT FACE='TAHOMA' SIZE=2>\n");
	QwikCreateWindow.document.write("<INPUT TYPE='BUTTON' VALUE='Open Catalog Page' onClick=window.open('",OPENCATALOGPAGE,"','temppage','toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=750,height=600')> &nbsp &nbsp &nbsp \n");
	QwikCreateWindow.document.write("");
	QwikCreateWindow.document.write("<INPUT TYPE='BUTTON' VALUE='Quote' onClick=window.open('../../pages/search_results.php?searchtype=b&search=yes&query=",PARTNUMBER,"','temppage','toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=600')>  &nbsp &nbsp &nbsp ");
	QwikCreateWindow.document.write((window.print)?("<INPUT TYPE='BUTTON' VALUE='Print' onClick='window.print()'>"):("<FONT FACE=TAHOMA SIZE=2>CTRL+P (PC) or CMD+P (Mac) to Print</FONT>")," &nbsp &nbsp &nbsp <INPUT TYPE='BUTTON' VALUE='Close' onClick='self.close()'></FORM></TD></TR></TABLE><BR>\n");
	QwikCreateWindow.document.write("</BODY></HTML>\n");


	QwikCreateWindow.document.close()
	windowopen=1;
}
//

//----------------------------------------------------------------------------------------------------------------------

