// JavaScript Document
function printpr()
{
var OLECMDID = 7;
/* OLECMDID values:
* 6 - print
* 7 - print preview
* 1 - open window
* 4 - Save As
*/
var PROMPT = 1; // 2 DONTPROMPTUSER 
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser); 
WebBrowser1.ExecWB(OLECMDID, PROMPT);
WebBrowser1.outerHTML = "";
}

function MouseOver(divName)
{
	thisDiv = document.getElementById(divName);
	if (thisDiv)
		{thisDiv.style.color = "#0000FF";
		thisDiv.style.fontWeight = "normal";
		thisDiv.style.cursor = "hand";}
	else 
		{alert("Error: Could not locate div with id: " + divName);}	
}

function MouseOut(divName)
{
	thisDiv = document.getElementById(divName);
	if (thisDiv)
		{thisDiv.style.color = "#000000";
		thisDiv.style.fontWeight = "normal";
		thisDiv.style.cursor = "auto";}
	else 
		{alert("Error: Could not locate div with id: " + divName);}	
}

function displayDiv(divName, divName2)
{
	thisDiv = document.getElementById(divName);
	prevDiv = document.getElementById(divName2);
	
	if (prevDiv)
		{prevDiv.style.display = "none";}
	
	if (thisDiv)
		{if (thisDiv.style.display == "none")
			{thisDiv.style.display = "inline";}
		else 
			{thisDiv.style.display = "none";}
		}
		
	document.forms.frmSearchLab.pt.value = divName;
	window.location.href = "#top";
}

function CheckForm_frmSearchLab()
{
   if ((document.frmSearchLab.sb.value == "tn") && ((document.frmSearchLab.txt.value == "") || (document.frmSearchLab.txt.value.length > 0 && (document.frmSearchLab.txt.value.length < 3 || document.frmSearchLab.txt.value.length > 20))))  
   		{alert("Please enter a Test Name search criteria between three and twenty characters.");
		document.frmSearchLab.txt.focus();
		return false;}

   if ((document.frmSearchLab.sb.value == "tc") && ((document.frmSearchLab.txt.value == "") || (document.frmSearchLab.txt.value.length > 0 && (document.frmSearchLab.txt.value.length < 1 || document.frmSearchLab.txt.value.length > 10))))   
   		{alert("Please enter a Test Code search criteria between one and ten characters.");
		document.frmSearchLab.txt.focus();
		return false;}

   return true;
}