//#####################################################################################\\
//#####################################################################################\\
//#                          Big Dave's JavaScript Library                            #\\
//#                        Copyright © 2002 Max Levy Autograph                        #\\
//#                                All rights reserved.                               #\\
//#####################################################################################\\
//#####################################################################################\\

function isValid() {
    var firstPW = changepw.pass1.value;
	var secondPW = changepw.pass2.value;
   
    if (firstPW != secondPW) {
	    alert("Your passwords do not match. Please try again.");

		changepw.pass1.value = "";
		changepw.pass2.value = "";
		
		focusNow();
		
		return false;
	}
	else {
	    alert("Your password has been changed.");
		return true;    
	}
}


function focusNow() {
    changepw.pass1.focus();
}


function EmptyCart()
{
  if(confirm("Are you sure you want to remove all items from your cart?"))
  {
	this.window.location="cartdel.cfm"
  }
}


function OpenGlossary(name)
{
  GloWindow = window.open("Glosspg.cfm?Gls="+name, "Glosspg", "toolbar=no, scrollbars=no, location=no, width=400, height=200")
  GloWindow.focus()
}


function OpenDiscount(Product)
{
  DiscWindow = window.open("DiscPrc.cfm?MLOPN="+Product, "DiscPg", "Toolbar=no, scrollbars=no, location=no, width=400, height=400")
  DiscWindow.focus()
}

function CheckoutDown()
{
  var picWindow
  
  pageContent = "<html>\n";
  pageContent += "<head>\n";
  
  pageContent += "<title>Feature not available";
  pageContent += "</title>\n";
  
  pageContent += "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>\n";
  pageContent += "</head>\n\n";
  pageContent += "<body bgcolor='white' text='black' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>\n";
  pageContent += "<table width='220' border='0' cellspacing='0' cellpadding='10'>\n";
  pageContent += "<tr>\n"; 
  pageContent += "<td>\n"; 
  pageContent += "<div align='center' font face='Arial, Helvetica, sans-serif' size='3'>\n";
  
  pageContent += "This feature is currently not available due to a system upgrade.  Please contact customer service at 800-798-3675 to complete "
  pageContent += "your order."  
  pageContent += "<br>\n"
  pageContent += "<br>\n";
  pageContent += "<a href='javascript: window.close()'><font face='Arial, Helvetica, sans-serif' size='2'>Close This Window</font></a>\n";
  pageContent += "</div>\n";
  pageContent += "</td>\n";
  pageContent += "</tr>\n";
  pageContent += "</table>\n";
  pageContent += "</body>\n";
  pageContent += "</html>";

  picWindow = window.open("","","height=280,width=220");
  
  picWindow.document.write(pageContent);
  picWindow.document.close();
}

function fwLoadMenus() {
  if (window.fw_menu_0) return;
  window.fw_menu_0 = new Menu("root",227,19,"Verdana, Arial, Helvetica, sans-serif",12,"#ffffff","#ffffff","#006699","#cccccc");
  fw_menu_0.addMenuItem("USAF and Standard Targets", "location='catsel.cfm?CatID=9'");
  fw_menu_0.addMenuItem("DOF and MTF Targets", "location='catsel.cfm?CatID=10'");
  fw_menu_0.addMenuItem("Ronchi Rulings", "location='catsel.cfm?CatID=13'");
  fw_menu_0.addMenuItem("Ronchi Slides", "location='catsel.cfm?CatID=17'");
  fw_menu_0.addMenuItem("Distortion Targets", "location='catsel.cfm?CatID=20'");
  fw_menu_0.addMenuItem("Variable Frequency Targets", "location='catsel.cfm?CatID=16'");
  fw_menu_0.addMenuItem("Gray Scale Targets", "location='CatSel.cfm?CatID=8'");
   fw_menu_0.hideOnMouseOut=true;
  window.fw_menu_1 = new Menu("root",221,19,"Verdana, Arial, Helvetica, sans-serif",12,"#ffffff","#ffffff","#006699","#cccccc");
  fw_menu_1.addMenuItem("Grid and Dot Arrays", "location='catsel.cfm?CatID=3'");
  fw_menu_1.addMenuItem("Distortion Targets", "location='catsel.cfm?CatID=20'");
  fw_menu_1.addMenuItem("Reticles", "location='CatSel.cfm?CatID=6'");
  fw_menu_1.addMenuItem("DOF and MTF Targets", "location='CatSel.cfm?CatID=10'");
  fw_menu_1.addMenuItem("Reticles", "location='CatSel.cfm?CatID=6'");
  fw_menu_1.addMenuItem("Microscopes", "location='CatSel.cfm?CatID=5'");
  fw_menu_1.addMenuItem("Magnifiers and Comparators", "location='CatSel.cfm?CatID=4'");
  fw_menu_1.addMenuItem("Fluorescent Targets", "location='catsel.cfm?catid=15'");
  fw_menu_1.addMenuItem("X-Ray Targets", "location='NotAvail.cfm'");
  fw_menu_1.addMenuItem("Ronchi Rulings", "location='CatSel.cfm?CatID=13'");
   fw_menu_1.hideOnMouseOut=true;
  window.fw_menu_2 = new Menu("root",193,19,"Verdana, Arial, Helvetica, sans-serif",12,"#ffffff","#ffffff","#006699","#cccccc");
  fw_menu_2.addMenuItem("Reticles", "location='CatSel.cfm?CatID=6'");
  fw_menu_2.addMenuItem("Ronchi Rulings", "location='CatSel.cfm?CatID=13'");
  fw_menu_2.addMenuItem("Ronchi Slides", "location='CatSel.cfm?CatID=17'");
  fw_menu_2.addMenuItem("Grid and Dot Arrays", "location='CatSel.cfm?CatID=3'");
  fw_menu_2.addMenuItem("Scratch / Dig Standards", "location='catres.cfm?CatID=9&qcr1sel=Scratch+Dig'");
  fw_menu_2.addMenuItem("Clear Optical Path Targets", "location='CatSel.cfm?CatID=14'");
  fw_menu_2.addMenuItem("Fluorescent Targets", "location='CatSel.cfm?CatID=15'");
  fw_menu_2.addMenuItem("X-Ray Targets", "location='CatSel.cfm?CatID=14'");
   fw_menu_2.hideOnMouseOut=true;
  window.fw_menu_3 = new Menu("root",260,19,"Verdana, Arial, Helvetica, sans-serif",12,"#ffffff","#ffffff","#006699","#cccccc");
  fw_menu_3.addMenuItem("Calibration for Rules and Scales", "location='CatSel.cfm?CatID=11'");
  fw_menu_3.addMenuItem("Calibration for Grid and Dot Arrays", "location='CatSel.cfm?CatID=12'");
  fw_menu_3.addMenuItem("Custom Calibration Services");
   fw_menu_3.hideOnMouseOut=true;
  window.fw_menu_4 = new Menu("root",221,19,"Verdana, Arial, Helvetica, sans-serif",12,"#ffffff","#ffffff","#006699","#cccccc");
  fw_menu_4.addMenuItem("MicroRules", "location='catsel.cfm?CatID=1'");
  fw_menu_4.addMenuItem("MicroScales", "location='catsel.cfm?CatID=2'");
  fw_menu_4.addMenuItem("Machine Vision Scales", "location='catsel.cfm?CatID=21'");
  fw_menu_4.addMenuItem("Grid and Dot Arrays", "location='CatSel.cfm?CatID=3'");
  fw_menu_4.addMenuItem("Magnifiers and Comparators", "location='CatSel.cfm?CatID=4'");
  fw_menu_4.addMenuItem("Microscopes", "location='CatSel.cfm?CatID=5'");
  fw_menu_4.addMenuItem("Reticles", "location='catsel.cfm?CatId=6'");
  fw_menu_4.addMenuItem("Distortion Targets", "location='CatSel.cfm?CatID=20'");
  fw_menu_4.addMenuItem("Comparator Charts and Scales", "location='CatSel.cfm?CatID=7'");
  fw_menu_4.addMenuItem("Gray Scale Targets", "location='CatSel.cfm?CatID=8'");
  fw_menu_4.addMenuItem("Stage Calibration Tools", "location='CatSel.cfm?CatID=19'");
   fw_menu_4.hideOnMouseOut=true;

  fw_menu_4.writeMenus();
} // fwLoadMenus()


function openPic(imageURL, pageName) {
  var newContent;
  var picWindow;
  
  pageContent = "<html>\n";
  pageContent += "<head>\n";
  
  pageContent += "<title>";
  pageContent += pageName;
  pageContent += "</title>\n";
  
  pageContent += "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>\n";
  pageContent += "</head>\n\n";
  pageContent += "<body bgcolor='white' text='black' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>\n";
  pageContent += "<table width='220' border='0' cellspacing='0' cellpadding='10'>\n";
  pageContent += "<tr>\n"; 
  pageContent += "<td>\n"; 
  pageContent += "<div align='center'>\n";
  
  pageContent += "<img src='";
  pageContent += imageURL;
  pageContent += "' width='200' height='200' border='0'>\n";
  
  pageContent += "<br>\n"
  pageContent += "<br>\n";
  pageContent += "<a href='javascript: window.close()'><font face='Arial, Helvetica, sans-serif' size='2'>Close This Window</font></a>\n";
  pageContent += "</div>\n";
  pageContent += "</td>\n";
  pageContent += "</tr>\n";
  pageContent += "</table>\n";
  pageContent += "</body>\n";
  pageContent += "</html>";

  picWindow = window.open("","","height=280,width=220");
  
  picWindow.document.write(pageContent);
  picWindow.document.close();
}