		var selectedCount = 0;
	var cateSelected = new String("");
	var checkedItemsValue = new String("");
	
	function initCheckBoxVar()
	{
		var noOfElements = document.forms[1].elements.length;
		var cmmArr;
		for (var i=0; i < noOfElements ; i++)
			if (document.forms[1].elements[i].type == "checkbox")
				if (document.forms[1].elements[i].checked)
				{
					++selectedCount;
					if (cateSelected.length == 0)
					{
////commented and added by mickey 				cmmArr = new String(document.forms[0].elements[i].value).split('`');
						cmmArr = mockSplit(document.forms[1].elements[i].value,'`');
						cateSelected = cmmArr[0];
					}
				}
	}

	
	
	
	function checkClicks(chkObj)
	{
		if (! chkObj.checked)
		{
			--selectedCount;
			if (selectedCount == 0)
				cateSelected = new String("");
			return true;
		}
		else 
		{
//commented and added by mickey 			var cmmArr = new String(chkObj.value).split('`');
			cmmArr = mockSplit(chkObj.value,'`');
			if (cateSelected.length == 0)
				cateSelected = cmmArr[0];
			else if (cateSelected != cmmArr[0])
			{
				alert("Sorry, can't compare products from different categories.");
				return false;
			}

			if (++selectedCount > 8)
			{
				alert("Sorry, can't compare more than 8 products.");
				--selectedCount;
				return false;
			}
		}
		
		return true;
	}
					
	function compareProducts()
	{
		if (selectedCount < 1)
			alert("Please select at least one or more products for comparison");
		else
		{		
			var noOfElements = document.forms[1].elements.length;
			for (var i=0; i < noOfElements ; i++)
				if (document.forms[1].elements[i].type == "checkbox")
					if (document.forms[1].elements[i].checked)
						checkedItemsValue = checkedItemsValue + (document.forms[1].elements[i].value + ",");
						
			document.forms[1].ckbox.value = checkedItemsValue;
			checkedItemsValue = "";
			linkSubmitForm("","../search/prodcomp.cfm");
			
		}
	}

	
	function compareReset()
	{
		selectedCount = 0;
		cateSelected = new String("");
		checkedItemsValue = new String("");
		
		var noOfElements = document.forms[1].elements.length;
		var cmmArr;
		for (var i=0; i < noOfElements ; i++)
		{
			if (document.forms[1].elements[i].type == "checkbox")
				{
					document.forms[1].elements[i].checked = false;
				}
		}		

	}
	

	
	function blipTextWindow(blipType){
		if (blipType == "PRICEBLIP"){
			
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=230,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Price window</TITLE></HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6" >The price for a used instrument configured with options exceeds the price for a new base model with no options.  Click on the View Inventory button to see available configurations.</font></ul></td></tr>');
 			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		}
		else
		if (blipType == "RENTBLIP"){
		
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=200,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Price window</TITLE>");
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">This model is also available for rent. Click on the Add to Cart / Select Product  button to rent this piece of equipment.</font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		
		}
			else
			if (blipType == "NEWPRICE"){
			
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=200,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Price window</TITLE>");
			 msgWindow.document.write('<script language="JavaScript">');
			 msgWindow.document.write('function OpenWarranty(){');
			 msgWindow.document.write('self.opener.document.forms[0].targetPage.value="../estore/warranty.cfm";');
			 //msgWindow.document.write('actionTxt = self.opener.document.forms[0].pageName.value;');
			 msgWindow.document.write('actionTxt="/estore/warrantytmp.cfm";');
			 msgWindow.document.write('self.opener.document.forms[0].action = actionTxt;');
			 msgWindow.document.write('self.opener.document.forms[0].submit();');			 
			 msgWindow.document.write('self.close();');
			 msgWindow.document.write('}</script>');
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">Product is unused, sealed, and comes directly from the manufacturer.  It is sold with the following');
 			 msgWindow.document.write(' <a href="javascript:OpenWarranty()" >Warranty.</a></font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		}
			else
			if (blipType == "USLISTPRICE"){
			
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=200,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Price window</TITLE>");
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write("<table cellspacing=0><tr><td><ul><li><font face=Arial pointsize=6>Manufacturer's Suggested Retail Price in US dollars for a new model</font></td></tr>");
			 msgWindow.document.write('<tr><td align="center"><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		}
			else
			if (blipType == "MFGPRICE"){
			
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=200,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Price window</TITLE>");
			 msgWindow.document.write('<script language="JavaScript">');
			 msgWindow.document.write('function OpenWarranty(){');
			 msgWindow.document.write('self.opener.document.forms[0].targetPage.value="../estore/warranty.cfm";');
			 //msgWindow.document.write('actionTxt = self.opener.document.forms[0].pageName.value;');
			 msgWindow.document.write('actionTxt ="/estore/warrantytmp.cfm";');
			 msgWindow.document.write('self.opener.document.forms[0].action = actionTxt;');
			 msgWindow.document.write('self.opener.document.forms[0].submit();');			
			 msgWindow.document.write('self.close();');
			 msgWindow.document.write('}</script>');
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">The manufacturer is having a sale on this product, with a below-normal price.  It is sold with the following');
			 msgWindow.document.write(' <a href="javascript:OpenWarranty()" >Warranty.</a></font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		}
			else
			if (blipType == "PREOWNPRICE"){
			
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=200,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Price window</TITLE>");
			 msgWindow.document.write('<script language="JavaScript">');
			 msgWindow.document.write('function OpenWarranty(){');
			 msgWindow.document.write('self.opener.document.forms[0].targetPage.value="../estore/warranty.cfm";');
			 msgWindow.document.write('actionTxt ="/estore/warrantytmp.cfm";');
			 //msgWindow.document.write('actionTxt = self.opener.document.forms[0].pageName.value;');
			 msgWindow.document.write('self.opener.document.forms[0].action = actionTxt;');
			 msgWindow.document.write('self.opener.document.forms[0].submit();');			
			 msgWindow.document.write('self.close();');
			 msgWindow.document.write('}</script>');
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">This product is being sold after previous use but has been calibrated and brought up to specifications as published by TestMart. It is sold with the following');
			 msgWindow.document.write(' <a href="javascript:OpenWarranty()" >Warranty.</a></font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		}
			else
			if (blipType == "REFPRICE"){
			
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=250,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Price window</TITLE>");
			 msgWindow.document.write('<script language="JavaScript">');
			 msgWindow.document.write('function OpenWarranty(){');
			 msgWindow.document.write('self.opener.document.forms[0].targetPage.value="../estore/warranty.cfm";');
			// msgWindow.document.write('actionTxt = self.opener.document.forms[0].pageName.value;');
			 msgWindow.document.write('actionTxt = "/estore/warrantytmp.cfm";');
			 msgWindow.document.write('self.opener.document.forms[0].action = actionTxt;');
			 msgWindow.document.write('self.opener.document.forms[0].submit();');			
			 msgWindow.document.write('self.close();');
			 msgWindow.document.write('}');
			 msgWindow.document.write('function OpenProcess21(){');
			 msgWindow.document.write('self.opener.document.forms[0].targetPage.value="../misc/process21.cfm";');
			 msgWindow.document.write('actionTxt = self.opener.document.forms[0].pageName.value;');
			 msgWindow.document.write('self.opener.document.forms[0].action = actionTxt;');
			 msgWindow.document.write('self.opener.document.forms[0].submit();');			
			 msgWindow.document.write('self.close();');
			 msgWindow.document.write('}');
			 msgWindow.document.write('</script>');
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write("<table cellspacing=0><tr><td><ul><li><font face=Arial pointsize=6>This product is being sold after previous use, but has been subject to TestMart's comprehensive <a href=javascript:OpenProcess21() >21-Point Refurbishing Process.</a> It is sold with the following");
			 msgWindow.document.write(' <a href="javascript:OpenWarranty()" >Warranty.</a></font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		}
		else
		if (blipType == "CONTBLIP"){
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=200,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Price window</TITLE>");
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">Please contact TestMart to obtain the latest information on this product.  You can call us at (888)665-2765 or +1(650)624-0525, or send e-mail to <a href="mailto:sales@testmart.com">sales@testmart.com.</a></font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		
		}
		else
		if (blipType == "OPTBLIP"){
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=200,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Contact Testmart</TITLE>");
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">Please contact TestMart to obtain the latest information on this option.  You can call us at (888)665-2765 or +1(650)624-0525, or send e-mail to <a href="mailto:sales@testmart.com">sales@testmart.com.</a></font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		
		}	
	   else
		if (blipType == "CERTBLIP"){
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=310,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Calibration Certificate window</TITLE>");
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">The ANSI-Z540 Certificate of Calibration signifies that the instrument listed has been calibrated in compliance with the requirements of ANSI/NCSL-Z540-1-1994. The equipment used is traceable to the National Reference Standards as maintained by the National Institute of Standards and Technology. This certificate documents calibration conditions and the calibration equipment employed during the process.  Before and after measurement data is available for an additional fee.</font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		}
	else
		if (blipType == "NAVICP"){
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=310,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Calibration Certificate window</TITLE>");
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">These products are available to government employees, including DoD personnel, as well as civilian contractors who are supporting a government or DoD contract.  These products were negotiated by the Navy Inventory Control Point (NAVICP) and contractors supporting non-Navy contracts may be required to have an ABM waiver on file.</font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
		}
	}

	function navicpdelivery(delivery)
	{
			 msgWindow=window.open("","displayWindow","titlebar=no,menubar=no,width=500,height=310,resizable=no");
   			 msgWindow.document.write("<HEAD><TITLE>Calibration Certificate window</TITLE>");
			 msgWindow.document.write("</HEAD>");
			 msgWindow.document.write("<BODY bgcolor=#ffffff>");
			 msgWindow.document.write('<form action=" "  method="post">');
			 msgWindow.document.write('<table cellspacing="0"><tr><td><ul><li><font face="Arial" pointsize="6">In accordance with the NAVICP contract, the delivery time for this product is<b> ')
			 msgWindow.document.write(delivery)
			 msgWindow.document.write(' </b>.This is the maximum delivery period allowed by the contract and the actual delivery time is usually much shorter.</font></td></tr>');
			 msgWindow.document.write('<tr><td align="center"><br><a href="javascript:self.close();"><img src="/webdata/img/close.gif" border="0"></a></td></tr></table>');
			 msgWindow.document.write('<br><div align="center"><img src="/webdata/img/seal5.gif" border="0"></div>');
			 msgWindow.document.write("</form></body>");
	}

	function moveToLocation(loc){
		self.location.hash = loc;
		return;
	}
	
/* these following two functions are exlusively for archivespec.cfm use only */		
function compareProductsArchive(var2)
{
			document.forms[1].ckbox.value = var2;
			checkedItemsValue = "";
			linkSubmitForm("","../search/prodcomp.cfm");
}

function searchsimilar(actionpage,targetpg,param1,parma2,param3,param4,param5)
{
			document.forms[1].ckbox.value = param4;
			checkedItemsValue = "";
			linkSubmitForm(actionpage,targetpg,param1,parma2,param3,'',param5);
}

function invoverride(){
	var pagename = "overrideinventory";
	curdate = new Date();
	WindowName = curdate.setTime(Date.parse(curdate));

	var wtop  = ( screen.height - 450)/2;
	var wleft = ( screen.width - 550)/2 ;

	var windowprops = 'toolbar=0,location=0,directories=0,status=0, ' +
			'menubar=0,scrollbars=1,resizable=0,width=550,height=450,top='+wtop+',left='+wleft;
	self.name = WindowName;
	overrideWindow = window.open("/reqlist/overrideinventory.cfm","overrideinventory",windowprops);

			if ( overrideWindow != null )
			{
				if ( overrideWindow.opener == null )
				{ overrideWindow.opener = self;  } 
			
				if (arguments.length == 3){
					document.forms[1].param1.value = arguments[0];
					document.forms[1].param2.value = arguments[1];
					document.forms[1].param3.value = arguments[2];
					document.forms[1].param4.value = '../reqlist/reqlist.cfm';
				}
				else if (arguments.length == 4){
					document.forms[1].param1.value = arguments[0];
					document.forms[1].param2.value = arguments[1];
					document.forms[1].param3.value = arguments[2];
					document.forms[1].param4.value = arguments[3];
				}
				else{
					document.forms[1].param1.value = "";
					document.forms[1].param2.value = "";
					document.forms[1].param3.value = "";
					document.forms[1].param4.value = '../reqlist/reqlist.cfm';
				}	
				document.forms[1].action="/estore/reqlisttmp.cfm?ttype=";
				document.forms[1].targetPage.value = "../reqlist/overrideinventory.cfm";
				document.forms[1].target="overrideinventory";
				document.forms[1].method="post";
				document.forms[1].submit();
				overrideWindow.focus(); 
			}
	overrideWindow.opener = self;  
	overrideWindow.focus();
}		
