<!--stopindex-->
// This external javascript file is used by the Multimedia and Digital Projector Screen Calculator pages.

function fMain(workingProjector, formName){
	//call calculation to get either screen or dist results
	if(formName == "distanceCalculate")	{
		if(workingProjector.givenDiag >0){
			calcDistance(workingProjector);
		} else {
			alert("Sorry, we need a value in the screen size of larger than 1 inch or cm diagonal. Please try again.");
			return false
		}
	} else {
		if(workingProjector.givenDist >0) {
			calcScreen(workingProjector);
		} else {
			alert("Sorry, we need a value in the distance of larger than 1 foot or meter. Please try again");
			return false
		}
	}
		
	//now that we've got results, let's display them
	//we'll call zoomProjector for zoom models
	//we call fixedProj for fixed lens models
				
	// intercept calls for 8610 and 8620
	if(workingProjector.model == "8610" || 
		workingProjector.model == "8620" ||
		workingProjector.model == "7720"){
		fixedProj(workingProjector, formName);	
	} else {
		zoomProjector(workingProjector, formName);
	}
}		

function zoomProjector(workingProjector, formName){
	if(formName == "screenMeasure")	{
	// Since the new digital projectors have a different look than the multimedia projectors we need
	// to check the model of the working projector so we can call the appropriate results page.  We
	// need to add any new digital projector models to this list.
	// robertg 11.2003
	// choose the appropriate range of image size results page
		if (workingProjector.model == "S10" ||
		   workingProjector.model == "S20" ||
		   workingProjector.model == "S40" ||
		   workingProjector.model == "S50" ||
		   workingProjector.model == "H10" ||		   
		   workingProjector.model == "X40" ||
		   workingProjector.model == "X20" ||
		   workingProjector.model == "X45" ||
		   workingProjector.model == "X50" ||
		   workingProjector.model == "X55" ||
		   workingProjector.model == "X55i" ||		   
		   workingProjector.model == "S55" ||
   		   workingProjector.model == "S55i" ||
		   workingProjector.model == "X62w" ||
		   workingProjector.model == "X65" ||
		   workingProjector.model == "X70" ||
		   workingProjector.model == "X70S" ||
		   workingProjector.model == "X70L" ||
		   workingProjector.model == "X75" ||
		   workingProjector.model == "X80" ||
		   workingProjector.model == "X80S" ||
		   workingProjector.model == "X80L" ||
   		   workingProjector.model == "X68" ||		   		   
		   workingProjector.model == "X90w" ||
		   workingProjector.model == "PX5") {
		   	// is a digital projector so display the new (Digital Projector) range of image size results page
			rWindow = window.open("dp_screen_results.html",name,'alwaysraised=yes,menubar=no,titlebar=no,width=565,height=562,left=10,top=10');
		} else {   			
			// some digital projectors do not display minimum and maximum images sizes in the range of image size results page so we need
			// a range of image size results page that will only display a single set of sizes (diagonal, width, height).
			// note: if you add a model below DO NOT add it above
			if (workingProjector.model == "S15i" ||
			   workingProjector.model == "X15i" ||
			   workingProjector.model == "S15" ||
			   workingProjector.model == "X62" ||
			   workingProjector.model == "X15") {
				rWindow = window.open("dp_screen_results_optimal.html",name,'alwaysraised=yes,menubar=no,titlebar=no,width=565,height=562,left=10,top=10');
			} else {
				// is not a digital projector so display original (non Digtal Projector) range of image size results page
				rWindow = window.open("screen_results.html",name,'alwaysraised=yes,menubar=no,titlebar=no,width=687,height=480,left=10,top=10');
			}
		}
	} else {  // formName == "distanceCalculate"
	// choose the appropriate optimal distance results page
	
		if (workingProjector.model == "S10" ||
		   workingProjector.model == "S20" ||
		   workingProjector.model == "S40" ||
		   workingProjector.model == "S50" ||
		   workingProjector.model == "H10" ||		   
		   workingProjector.model == "X40" ||
		   workingProjector.model == "X20" ||
		   workingProjector.model == "X45" ||
		   workingProjector.model == "X50" ||
		   workingProjector.model == "X55" ||
		   workingProjector.model == "X55i" ||		   
		   workingProjector.model == "S55" ||
   		   workingProjector.model == "S55i" ||
		   workingProjector.model == "X62w" ||
		   workingProjector.model == "X65" ||
		   workingProjector.model == "X70" ||
		   workingProjector.model == "X70S" ||
		   workingProjector.model == "X70L" ||
		   workingProjector.model == "X75" ||
		   workingProjector.model == "X80" ||
		   workingProjector.model == "X80S" ||
		   workingProjector.model == "X80L" ||
   		   workingProjector.model == "X68" ||		   		   
		   workingProjector.model == "X90w" ||
		   workingProjector.model == "PX5") {
		   	// is a digital projector so display the new (Digital Projector) optimal distance results page
			rWindow = window.open("dp_dist_results.html",name,'alwaysraised=yes,menubar=no,titlebar=no,width=565,height=442,left=10,top=10');

		} else {   			
			// some digital projectors do not display minimum and maximum distances in the optimal distance results page so we need
			// an optimal distance results page that will only display a single optimal distance.
			// note: if you add a model below DO NOT add it above
			if (workingProjector.model == "S15i" ||
			   workingProjector.model == "X15i" ||
			   workingProjector.model == "S15" ||
			   workingProjector.model == "X62" ||
			   workingProjector.model == "X15") {
				rWindow = window.open("dp_dist_results_optimal.html",name,'alwaysraised=yes,menubar=no,titlebar=no,width=565,height=442,left=10,top=10');
			} else {
				// is not a digital projector so display original (non Digtal Projector) range of image size results page
				rWindow = window.open("dist_results.html",name,'alwaysraised=yes,menubar=no,titlebar=no,width=687,height=530,left=10,top=10');
			}
		}
	}
}

function fixedProj(workingProjector, formName){
	if(formName == "screenMeasure")	{
		rWindow = window.open("screen_resultsF.html",name,'alwaysraised=yes,menubar=no,titlebar=no,width=687,height=480,left=10,top=10');
	} else {
		rWindow = window.open("dist_resultsF.html",name,'alwaysraised=yes,menubar=no,titlebar=no,width=687,height=530,left=10,top=10');
	}
}

// called from MODEL_calc.jhtml file
function htmlCall(modelNumber, formName){
	workingProjector = new projector(modelNumber);
	//put form data into variables
	setToInches(workingProjector, formName);
	fMain(workingProjector, formName);	
}

// called from FLASH
function flashCall(superVar){
	// declare temp variables
	superstring = new string(superVar);
	//parse superVar to get model Number, formName, givenDiag or givenDist
	diag = superstring.substr(11, 13);
	dist = superstring.substr(8, 10);
	formName = superstring.substr(4, 6);
	modelNumber = superstring.substr(0, 3);
	// initialize working Projector
	workingProjector = new projector(modelNumber);
	// set given variables of givenDiag or givenDist to working projector
	workingProjector.givenDiag = diag;
	workingProjector.givenDist = dist;
}

// no money here - just rounding the results to 2 digits past the decimal
// NB: returns string!

function roundDollar (Val) {
// no money here - just rounding the results to 2 digits past the decimal returns string!
// the three commented out lines below round to two decimal places. robertg 11.2003
//   Val = "" + Math.round(Val * 100)
//   Decimal = Val.substring (Val.length-2, Val.length)
//   Dollar=Val.substring(0, Val.length-2)
// the three lines below round to one decimal place. robertg 11.2003
    Val = "" + Math.round(Val * 10)
    Decimal = Val.substring (Val.length-1, Val.length)
    Dollar=Val.substring(0, Val.length-1)
    return (Dollar + "." + Decimal);
}

function goUrl(){
	var URL = document.footer.Category.options[document.footer.Category.selectedIndex].value;
	window.location.href = URL;
}

function projector(modelNumber)
{
	// determine model number and set each variable group accordingly
	switch (modelNumber)
	{ 
	 case "S10" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.149484536;
					this.maxSlope = 0.121360825;
					this.maxB = -0.224742268;
					this.screenMinSlope = 8.239543088;
					this.screenMinB = 1.855647013;
					this.screenMaxSlope = 9.92785286;
					this.screenMaxB = 1.488669851;
		        break; 
	 case "S15" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.121697802;
					this.minB = -0.090989011;
					this.maxSlope = 0.121697802;
					this.maxB = -0.090989011;
					this.screenMinSlope = 8.216968429;
					this.screenMinB = 0.748901974;
					this.screenMaxSlope = 8.216968429;
					this.screenMaxB = 0.748901974;
		        break; 
     case "S15i" :
        // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.126731685;
					this.minB = -0.083241758;
					this.maxSlope = 0.126731685;
					this.maxB = -0.083241758;
					this.screenMinSlope = 7.890571411;
					this.screenMinB = 0.658225639;
					this.screenMaxSlope = 7.890571411;
					this.screenMaxB = 0.658225639;
		        break; 
     case "X15i" :
        // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.1203663;
					this.minB = -0.080164835;
					this.maxSlope = 0.1203663;
					this.maxB = -0.080164835;
					this.screenMinSlope = 8.307823047;
					this.screenMinB = 0.667730532;
					this.screenMaxSlope = 8.307823047;
					this.screenMaxB = 0.667730532;
		        break; 
	 case "S20" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.149484536;
					this.maxSlope = 0.121360825;
					this.maxB = -0.224742268;
					this.screenMinSlope = 8.239543088;
					this.screenMinB = 1.855647013;
					this.screenMaxSlope = 9.92785286;
					this.screenMaxB = 1.488669851;
		        break; 
	 case "S40" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.149484536;
					this.maxSlope = 0.121360825;
					this.maxB = -0.224742268;
					this.screenMinSlope = 8.239543088;
					this.screenMinB = 1.855647013;
					this.screenMaxSlope = 9.92785286;
					this.screenMaxB = 1.488669851;
		        break; 
	 case "X40" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.149484536;
					this.maxSlope = 0.121360825;
					this.maxB = -0.224742268;
					this.screenMinSlope = 8.239543088;
					this.screenMinB = 1.855647013;
					this.screenMaxSlope = 9.92785286;
					this.screenMaxB = 1.488669851;
		        break; 
	 case "X45" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100720472;
					this.minB = -0.158622047;
					this.maxSlope = 0.121002362;
					this.maxB = -0.183110236;
					this.screenMinSlope = 8.263768179;
					this.screenMinB = 1.520094433;
					this.screenMaxSlope = 9.927374906;
					this.screenMaxB = 1.586497963;
		        break; 
	 case "S50" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.149484536;
					this.maxSlope = 0.121360825;
					this.maxB = -0.224742268;
					this.screenMinSlope = 8.239543088;
					this.screenMinB = 1.855647013;
					this.screenMaxSlope = 9.92785286;
					this.screenMaxB = 1.488669851;
		        break; 
	 case "X50" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.149484536;
					this.maxSlope = 0.121360825;
					this.maxB = -0.224742268;
					this.screenMinSlope = 8.239543088;
					this.screenMinB = 1.855647013;
					this.screenMaxSlope = 9.92785286;
					this.screenMaxB = 1.488669851;
		        break; 
	 case "S55" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.158622047;
					this.maxSlope = 0.121002362;
					this.maxB = -0.183110236;
					this.screenMinSlope = 8.263768179;
					this.screenMinB = 1.520094433;
					this.screenMaxSlope = 9.927374906;
					this.screenMaxB = 1.586497963;
		        break; 
	 case "S55i" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.158622047;
					this.maxSlope = 0.121002362;
					this.maxB = -0.183110236;
					this.screenMinSlope = 8.263768179;
					this.screenMinB = 1.520094433;
					this.screenMaxSlope = 9.927374906;
					this.screenMaxB = 1.586497963;
		        break; 
	 case "X55" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.158622047;
					this.maxSlope = 0.121002362;
					this.maxB = -0.183110236;
					this.screenMinSlope = 8.263768179;
					this.screenMinB = 1.520094433;
					this.screenMaxSlope = 9.927374906;
					this.screenMaxB = 1.586497963;
		        break; 
	 case "X55i" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.100721649;
					this.minB = -0.158622047;
					this.maxSlope = 0.121002362;
					this.maxB = -0.183110236;
					this.screenMinSlope = 8.263768179;
					this.screenMinB = 1.520094433;
					this.screenMaxSlope = 9.927374906;
					this.screenMaxB = 1.586497963;
		        break; 
     case "X62" :
        // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.11774359;
					this.minB = -0.070384615;
					this.maxSlope = 0.11774359;
					this.maxB = -0.070384615;
					this.screenMinSlope = 8.492907544;
					this.screenMinB = 0.599169554;
					this.screenMaxSlope = 8.492907544;
					this.screenMaxB = 0.599169554;
		        break; 
	 case "X65" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.135752577;
					this.minB = -0.277319588;
					this.maxSlope = 0.171360825;
					this.maxB = -0.024742268;
					this.screenMinSlope = 5.83551583;
					this.screenMinB = 0.146326736;
					this.screenMaxSlope = 7.365971539;
					this.screenMaxB = 2.047346281;
		        break; 
	 case "X70" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.102068041;
					this.minB = -0.231237113;											
					this.maxSlope = 0.152521649;
					this.maxB = -0.189484536;	
					this.screenMinSlope = 6.554909563;
					this.screenMinB = 1.263538946;
					this.screenMaxSlope = 9.790304389;	
					this.screenMaxB = 2.330139119;	
		        break; 
	 case "X70L" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.152960825;
					this.minB = -0.364742268;											
					this.maxSlope = 0.279004124;
					this.maxB = -0.33371134;	
					this.screenMinSlope = 3.584168821;
					this.screenMinB = 1.196272;
					this.screenMaxSlope = 6.537598461;	
					this.screenMaxB = 2.384863679;	
		        break; 
	 case "X70S" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.076191753;
					this.minB = -0.19257732;											
					this.maxSlope = 0.102439175;
					this.maxB = -0.135257732;	
					this.screenMinSlope = 9.761454133;
					this.screenMinB = 1.324408665;
					this.screenMaxSlope = 13.12392633;	
					this.screenMaxB = 2.533333665;	
		        break; 
	 case "X75" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.101247475;
					this.minB = -0.123217893;
					this.maxSlope = 0.121755892;
					this.maxB = -0.15011063;
					this.screenMinSlope = 8.213104212;
					this.screenMinB = 1.233737839;
					this.screenMaxSlope = 9.876736864;
					this.screenMaxB = 1.21773744;
		        break; 
	 case "H10" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.095197938;
					this.minB = 0.38185567;											
					this.maxSlope = 0.122637113;
					this.maxB = -0.133402062;	
					this.screenMinSlope = 8.153972846;
					this.screenMinB = 1.089618302;
					this.screenMaxSlope = 10.44549986;	
					this.screenMaxB = -3.474427857;	
		        break; 
	 case "X80" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.103182229;
					this.minB = -0.355188165;
					this.maxSlope = 0.152334184;
					this.maxB = -0.01220156;
					this.screenMinSlope = 6.563573514;
					this.screenMinB = 0.1140683;
					this.screenMaxSlope = 9.689253392;
					this.screenMaxB = 3.498682495;
		        break;
	 case "X80L" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope =0.152708661;
					this.minB = -0.333070866;
					this.maxSlope = 0.279181102;
					this.maxB = -0.35511811;
					this.screenMinSlope = 3.581891727;
					this.screenMinB = 1.27237167;
					this.screenMaxSlope = 6.548354639;
					this.screenMaxB = 2.182087073;
		        break;
	 case "X80S" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope =0.07703937;
					this.minB = -0.368503937;
					this.maxSlope = 0.10403937;
					this.maxB = -0.518503937;
					this.screenMinSlope = 9.561473334;
					this.screenMinB = 5.518054852;
					this.screenMaxSlope = 12.92401987;
					this.screenMaxB = 5.22772905;
		        break;
 	 case "PX5" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.129691919;
					this.minB = -0.145440115;
					this.maxSlope = 0.155462963;
					this.maxB = -0.137671958;
					this.screenMinSlope = 6.432400187;
					this.screenMinB = 0.885562236;
					this.screenMaxSlope = 7.710580261;
					this.screenMaxB = 1.121434386;
		        break; 
	 case "X68" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.101622711;
					this.minB = -0.17978022;
					this.maxSlope = 0.123967949;
					this.maxB = -0.576923077;
					this.screenMinSlope = 8.041827268;
					this.screenMinB = 4.934348018;
					this.screenMaxSlope = 9.836232386;
					this.screenMaxB = 1.808238673;
		        break; 
	 case "X15" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 0.112725275;
					this.minB = -0.103626374;
					this.maxSlope = 0.112725275;
					this.maxB = -0.103626374;
					this.screenMinSlope = 8.87095391;
					this.screenMinB = 0.921115992;
					this.screenMaxSlope = 8.87095391;
					this.screenMaxB = 0.921115992;
		        break; 
	 case "X62w" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 1.183541667;
					this.minB = -5.660416667;
					this.maxSlope = 1.398078704;
					this.maxB = 1.589768519;
					this.screenMinSlope = 0.715016732;
					this.screenMinB = -1.091167599;
					this.screenMaxSlope = 0.840805018;
					this.screenMaxB = 5.392696348;
		        break; 
	 case "X90w" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 1.215972222;
					this.minB = -1.676388889;
					this.maxSlope = 1.462037037;
					this.maxB = -1.864814815;
					this.screenMinSlope = 0.683973196;
					this.screenMinB = 1.276244602;
					this.screenMaxSlope = 0.822384901;
					this.screenMaxB = 1.379001553;
		        break; 
	 case "X20" :
	    // set variables for this model
 					this.model = modelNumber;
					this.minSlope = 1.021990741;
					this.minB = -0.458796296;
					this.maxSlope = 1.229861111;
					this.maxB = -1.081944444;
					this.screenMinSlope = 0.81309647;
					this.screenMinB = 0.880280612;
					this.screenMaxSlope = 0.97847575;
					this.screenMaxB = 0.449810732;
		        break; 
	default : 
	alert("Please select a model from the drop down menu before continuing."); 
	return false
	} 
	
	// these assigned by user form entries
	this.givenDist = 0;
	this.givenDiag = 0;
	this.givenWidth = 0;
	this.givenHeight = 0;
	this.metric = false; 
	
	// these results of calculations			
	this.distanceMin = 0;
	this.distanceMax = 0;
	this.screenDiagMin = 0;
	this.screenWidthMin = 0;
	this.screenHeightMin = 0;
	this.screenDiagMax = 0;
	this.screenWidthMax = 0;
	this.screenHeightMax = 0;
}

function setToInches(projector, formName){
	if(formName == "distanceCalculate"){
		if(document.forms[formName].diagmeasure[1].checked)	{
			workingProjector.metric = true;
			//convert centimeters to inches so it calculate function
			// inches equals centimeters * .4
			workingProjector.givenDiag = document.forms[formName].diag.value*.3937007874;
		} else {
			workingProjector.givenDiag = document.forms[formName].diag.value;
		}
	} else {				
		// this runs if formName is screenMeasure
		if(document.forms[formName].distancemeasure[1].checked) {
			workingProjector.metric = true;
			//convert meters to feet to calculate function
			// feet equals meters * 3.2808399
			workingProjector.givenDist = document.forms[formName].distance.value * 3.2808399;
		} else {
			workingProjector.givenDist = document.forms[formName].distance.value;
		}
	}		
}
	
function calcDistance(projector, formName){
	workingProjector.distanceMin = projector.minSlope * projector.givenDiag  + projector.minB;
	workingProjector.distanceMax = projector.maxSlope * projector.givenDiag  + projector.maxB; 
	// intercept calls for 8610 and 8620
	if(projector.model == 8610 || projector.model == 8620){
		workingProjector.distanceMin = 0.074091118 * projector.givenDiag + 0.566728;
		workingProjector.distanceMax = 0;
	}
}

function calcScreen(projector){
	workingProjector.screenDiagMin = projector.screenMinSlope *  projector.givenDist + projector.screenMinB;
	workingProjector.screenDiagMax = projector.screenMaxSlope *  projector.givenDist + projector.screenMaxB;
	// intercept calls for 8610 and 8620
	if(workingProjector.model == "8610" || workingProjector.model == "8620"){
		workingProjector.screenDiagMin = 13.48086124 * projector.givenDist - 7.352512;
		workingProjector.screenDiagMax = 0;	
	}
	//we get the other dimensions by converting the width results
	workingProjector.screenWidthMin = .8 * workingProjector.screenDiagMin;
	workingProjector.screenWidthMax = .8 *  workingProjector.screenDiagMax;

	workingProjector.screenHeightMin = .6 * workingProjector.screenDiagMin;
	workingProjector.screenHeightMax = .6 * workingProjector.screenDiagMax;
}	

// function called onChange so that whenever the user changes one
// dimension on the screens, the other two update
// since we passed the name of the dimension, we can route the
// operations with a switch  
// note: do not try to set projector attributes since the object won't have
// been created when this function is called! -just Drew
	
function updateDimensions(formName, dimension){
	switch(dimension){
		case "diag":
			// set width and height values in document
			document.forms[formName].width.value = document.forms[formName].diag.value * .8;
			document.forms[formName].height.value =  document.forms[formName].diag.value * .6 ;
		
		case "width":
			// set height and diag values in document
			// diag is width / .8
			document.forms[formName].diag.value = document.forms[formName].width.value / .8;
			document.forms[formName].height.value =  document.forms[formName].diag.value * .6;
		
		case "height":
			// set width and diag values in document
			// diag is height / .6
			document.forms[formName].diag.value = document.forms[formName].height.value / .6;
			document.forms[formName].width.value =  document.forms[formName].diag.value  * .8;
	}
}

function setRadioStandard(formName){
	if(formName == "distanceCalculate"){
		//set diag, wid, and heimeasure radio buttons to inches
		document.forms[formName].diagmeasure[0].checked = true
		document.forms[formName].widmeasure[0].checked = true
		document.forms[formName].heimeasure[0].checked = true
		// convert values from meters to feet
		if(document.forms[formName].diag.value != "") {
			//execute conversion only if there is a value in Diag
			document.forms[formName].diag.value *= .3937007874;	
			document.forms[formName].width.value *= .3937007874;	
			document.forms[formName].height.value *= .3937007874;		
		}
	} else {
		//convert distance value from meters to feet
		if(document.forms[formName].distance.value != "") {
			//execute conversion only if there is value in dist
			document.forms[formName].distance.value /= .3048;	
		}
	}
}

function setRadioMetric(formName){
	if(formName == "distanceCalculate"){
		//set diag, wid, and heimeasure radio buttons to metric
		document.forms[formName].diagmeasure[1].checked = true
		document.forms[formName].widmeasure[1].checked = true
		document.forms[formName].heimeasure[1].checked = true
			
		// convert values from inches into centimeters
		if(document.forms[formName].diag.value != ""){
			//execute conversion only if there is a value in Diag
			document.forms[formName].diag.value /= .3937007874;	
			document.forms[formName].width.value /= .3937007874;	
			document.forms[formName].height.value /= .3937007874;	
		}			
	} else {
		//convert value from feet to meters
		if(document.forms[formName].distance.value != "") {
			//execute conversion only if there is value in dist
			document.forms[formName].distance.value *= .3048;
		}
	}
}

function MakeArray(){
	this.length = MakeArray.arguments.length
    for (var i = 0; i < this.length; i++)
    	this[i+1] = MakeArray.arguments[i]
}

function jumpProjector(form){
	i = form.SelectMenu.selectedIndex;
    if (i == 0) return;
    	window.location.href = projectorurl[i+1];
}

var projectorpageopt = new MakeArray(
		"  select another projector ",
	"PX5",
	"H10",
	"S10",
	"S15",
	"S15i",
	"S20",
	"S40",
	"S50",
	"S55",
	"S55i",	
	"X15",
	"X15i",
	"X20",
	"X40",
	"X45",
	"X50",
	"X55",
	"X55i",	
	"X62",
	"X62w",
	"X65",
	"X68",	
	"X70",
	"X70S",
	"X70L",
	"X75",	
	"X80",	
	"X80L",	
	"X80S",	
	"X90w");

var projectorurl = new MakeArray(
	"",
	"px5_calc.html",
	"h10_calc.html",
	"s10_calc.html",
	"s15_calc.html",
	"s15i_calc.html",
	"s20_calc.html",
	"s40_calc.html",
	"s50_calc.html",	
	"s55_calc.html",	
	"s55i_calc.html",
	"x15_calc.html",	
	"x15i_calc.html",
	"x20_calc.html",
	"x40_calc.html",	
	"x45_calc.html",		
	"x50_calc.html",	
	"x55_calc.html",	
	"x55i_calc.html",
	"x62_calc.html",
	"x62w_calc.html",
	"x65_calc.html",
	"x68_calc.html",
	"x70_calc.html",
	"x70s_calc.html",
	"x70l_calc.html",
	"x75_calc.html",	
	"x80_calc.html",	
	"x80l_calc.html",	
	"x80s_calc.html",	
	"x90w_calc.html");
<!--startindex-->
