<!--
//  Military Standard Connector Accessories
//  GLOBAL VARIABLE DECLARATIONS
var COUNTER_0=1;var COUNTER_1=1;var COUNTER_2=1;var COUNTER_3=1;var COUNTER_4=1;var COUNTER_5=1;
var OPTION_1;   var OPTION_2;   var OPTION_3;   var OPTION_4;   var OPTION_5;   var OPTION_6;
var PARTNUMBER; var QwikCreateWindow;
var LENGTH_FACTOR = 1;

var PRODUCT_SERIES = "M85049";
var BASIC_PART     = "59";

var CATFILE_1="http://www.alvatek.com/qwikcreate/milspec/pdf/M85049-59.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");

	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(" ", " ");}


	// CONNECTOR DESIGNATOR
	if (WHAT_OPTS == "START") {o[i++]=new Option("Please Select Below","");
		o[i++]=new Option("12 (Overall Shell Diamater: .933 (23.7))","12");
		o[i++]=new Option("14 (Overall Shell Diamater: 1.057 (26.8))","14");
		o[i++]=new Option("16 (Overall Shell Diamater: 1.182 (30.0))","16");
		o[i++]=new Option("18 (Overall Shell Diamater: 1.307 (33.2))","18");
		o[i++]=new Option("20 (Overall Shell Diamater: 1.532 (38.9))","20");
		o[i++]=new Option("22 (Overall Shell Diamater: 1.557 (39.5))","22");
		o[i++]=new Option("24 (Overall Shell Diamater: 1.797 (45.6))","24");
		o[i++]=new Option("28 (Overall Shell Diamater: 2.057 (52.2))","28");
		o[i++]=new Option("32 (Overall Shell Diamater: 2.307 (58.6))","32");
		o[i++]=new Option("36 (Overall Shell Diamater: 2.557 (64.9))","36");
		o[i++]=new Option("40 (Overall Shell Diamater: 2.869 (72.9))","40");
		o[i++]=new Option("44 (Overall Shell Diamater: 3.120 (79.2))","44");
	}

	if((WHAT_OPTS=="OPTION2")){o[i++]=new Option("Please Select Below","");
		o[i++]=new Option("Black Anodize (Finish Code: A)","A");
		o[i++]=new Option("500 Hour Cadmium Olive Drab Over Electroless Nickel (Finish Code: W)","W");
	}






	if (i==0) { alert("Error: that dropdown should do something, but it doesn't"); }
	else {eval(Selections_Path+".length=o.length");OPTION_WIDTH=0;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();}
	OPTION_VAL=caller.options[caller.selectedIndex].value;
	OPTION_TXT=caller.options[caller.selectedIndex].text;
	GOTO_URL=0;

	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") {OPTION_1 = OPTION_VAL; if(COUNTER_0==1) {Fill_Selections("Main_Layer", "Main_Layer_Select_2", "OPTION2"); COUNTER_0=0;};}
	if (caller.name=="Main_Layer_Select_2") {OPTION_2 = OPTION_VAL; }

	}
	PARTNUMBER = PRODUCT_SERIES + "/" + BASIC_PART;
	if((OPTION_1)&&(OPTION_1!="NNN")){PARTNUMBER += OPTION_1;};
	if((OPTION_2)&&(OPTION_2!="NNN")){PARTNUMBER += OPTION_2;};

	if((OPTION_1)&&(OPTION_2)){Display_Layer("Part_Number_Button");}
	else {Hide_Layer("Part_Number_Button");}
}
//

//----------------------------------------------------------------------------------------------------------------------

//
function QwikCreatePartNumber() {
	SHELL_SIZE_REF="<BR>Shell Size Refernce = ";
	DIM_A    ="<BR>A Thread Class Class 2B-LH = ";
	DIM_B    ="<BR>B Diameter Max = ";
	DIM_F    ="<BR>F Dimension Max = ";
	DIM_G    ="<BR>G Dimension Max = ";
	DIM_H    ="<BR>H Dimension Max = ";

	//-----------------------------------------------
	//-----------------------------------------------
	// --- ENVELOPE DIMENSIONS



if((OPTION_1=="12")){DIM_A+=".750 - 20 UNEF";DIM_B+=".933 (23.7)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+=".798 (20.3)"};
if((OPTION_1=="14")){DIM_A+=".875 - 20 UNEF";DIM_B+="1.057 (26.8)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+=".922 (23.4)"};
if((OPTION_1=="16")){DIM_A+="1.000 - 20 UNEF";DIM_B+="1.182 (30.0)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+="1.048 (26.6)"};
if((OPTION_1=="18")){DIM_A+="1.125 - 18 UNEF";DIM_B+="1.307 (33.2)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+="1.172 (29.8)"};
if((OPTION_1=="20")){DIM_A+="1.250 - 18 UNEF";DIM_B+="1.532 (38.9)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+="1.297 (32.9)"};
if((OPTION_1=="22")){DIM_A+="1.375 - 18 UNEF";DIM_B+="1.557 (39.5)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+="1.423 (36.1)"};
if((OPTION_1=="24")){DIM_A+="1.625 - 18 UNEF";DIM_B+="1.797 (45.6)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+="1.662 (42.2)"};
if((OPTION_1=="28")){DIM_A+="1.875 - 16 UN";DIM_B+="2.057 (52.2)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+="1.922 (48.8)"};
if((OPTION_1=="32")){DIM_A+="2.062 - 16 UN";DIM_B+="2.307 (58.6)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+="2.172 (55.2)"};
if((OPTION_1=="36")){DIM_A+="2.312 - 16 UN";DIM_B+="2.557 (64.9)";DIM_F+=".479 (12.2)";DIM_G+="1.175 (29.8)";DIM_H+="2.422 (61.5)"};
if((OPTION_1=="40")){DIM_A+="2.625 - 16 UN";DIM_B+="2.869 (72.9)";DIM_F+=".667 (16.9)";DIM_G+="1.375 (34.9)";DIM_H+="2.734 (69.4)"};
if((OPTION_1=="44")){DIM_A+="2.875 - 16 UN";DIM_B+="3.120 (79.2)";DIM_F+=".667 (16.9)";DIM_G+="1.375 (34.9)";DIM_H+="2.982 (75.7)"};


	DIM_F+=" &#177 .016 (.4)";
	DIM_G+=" &#177 .031 (.8)";
	DIM_H+=" &#177 .010 (.3)";
	//-----------------------------------------------



	if((QwikCreateWindow)&&(!QwikCreateWindow.closed)){QwikCreateWindow.close();};
	QwikCreateWindow=window.open('','','scrollbars=yes,resizable=yes,width=700,height=600');
	QwikCreateWindow.document.open("text/html","replace");
	QwikCreateWindow.document.write("<HTML><TITLE>QwikCreate - Part Number: ",PARTNUMBER,", Glenair Inc.</TITLE><BODY BGCOLOR=WHITE><CENTER><IMG SRC='imgs/banner_air.jpg'><TABLE WIDTH=640 BORDER=0 CELLPADDING=5 CELLSPACING=0><TR VALIGN=TOP><TD COLSPAN=2><CENTER><FONT FACE='TAHOMA' SIZE=5><B>Part Number: ",PARTNUMBER,"</FONT><BR><FONT SIZE=2>","<BR>");
	QwikCreateWindow.document.write("<img src='imgs/",PRODUCT_SERIES,"_",BASIC_PART,".gif'>");
	QwikCreateWindow.document.write("</TD></TR><TR VALIGN=TOP><TD WIDTH=50%><FONT FACE='TAHOMA' SIZE=2>");
	QwikCreateWindow.document.write(
		"<BR>Basic Part Number = ", PRODUCT_SERIES, "/", BASIC_PART
		,(OPTION_1)?("<BR>Adapter Size = "+OPTION_1):("")
		,(OPTION_2=="A")?("<BR>Finish = Black Anodize (Finish Code: A)"):("<BR>Finish = 500 Hour Cadmium Olive Drab Over Electroless Nickel (Finish Code: W)")
	);

	QwikCreateWindow.document.write("</TD><TD WIDTH=50%><FONT FACE='TAHOMA' SIZE=2>");

	QwikCreateWindow.document.write(DIM_A);
	QwikCreateWindow.document.write(DIM_B);
	QwikCreateWindow.document.write(DIM_F);
	QwikCreateWindow.document.write(DIM_G);
	QwikCreateWindow.document.write(DIM_H);

	QwikCreateWindow.document.write("<BR>Dimensions are in Inches (Millimeter)</TD></TR>");
	QwikCreateWindow.document.write("<TR><TD COLSPAN=2><CENTER><TABLE><TR><TD><FONT FACE='TAHOMA' SIZE=2><FONT FACE=TAHOMA SIZE=2><B>NOTES:</B>");
	QwikCreateWindow.document.write("<BR>For complete dimensions see applicable Military Specification.");
	QwikCreateWindow.document.write("<BR><CENTER><U>Unless otherwise specified, the following dimensional tolerances will apply:</U><BR>.xx = &#177 .03 (0.8); &nbsp &nbsp .xxx = &#177 .015 (0.4); &nbsp &nbsp Lengths = &#177 .060 (1.52); &nbsp &nbsp Angles = &#177 5&#176</CENTER>");QwikCreateWindow.document.write("</TD></TR></TABLE></TD></TR><TR><TD COLSPAN=2><CENTER><BR><FORM>")
	
	OPENCATALOGPAGE=CATFILE_1;
	QwikCreateWindow.document.write("<INPUT TYPE='BUTTON' VALUE='Open Catalog Page' onClick=window.open('",OPENCATALOGPAGE,"','temppage','toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=600')> &nbsp &nbsp &nbsp ");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>");QwikCreateWindow.document.write("</BODY></HTML>");
	QwikCreateWindow.document.close();
	windowopen=1;
}
//

//----------------------------------------------------------------------------------------------------------------------

//
function ShowChoices() {
	var HelpWindow
	HelpWindow=window.open('','help','height=500,width=350,scrollbars=yes');HelpWindow.document.open("text/html","replace");HelpWindow.document.write("<HTML><TITLE>",PRODUCT_SERIES,"-",BASIC_PART," Jackscrew Options - Glenair, Inc.</TITLE><BODY BGCOLOR=WHITE><A NAME='TOP'></A><TABLE WIDTH=100% CELLPADDING=2 CELLSPACING=0 BORDER=0><TR BGCOLOR=#1863AD><TD><FONT FACE=ARIAL SIZE=3 COLOR=WHITE><B>Selecting Jackscrew</FONT></TD><TD ALIGN=RIGHT><A HREF='#' onClick='window.print()'><IMG SRC='imgs/print.gif' BORDER=0></A></TD></TR><TR><TD COLSPAN=2 BGCOLOR=WHITE><FONT FACE='NEW TIMES ROMAN' SIZE=2><B>Your Jackscrew Function Options:</B></TD></TR><TR><TD><CENTER>")

	HelpWindow.document.write("");

	HelpWindow.document.write("</TD></TR></TABLE></BODY></HTML>");HelpWindow.document.close();
}
// -->