var vbCrLf = "\r\n"

function setFocus() {

    Form1.txtLabNumber.focus();
}

function InitDHTML(strEQA, intPOPUPShown)	{

	var strMsg;
	
	// Added to onload event as documents not displaying for BC scheme
	if (strEQA=='NPT'){
		ShowInstructions()
	}
	else{
		ShowDocuments()
	}
	
	// Added Error Reporting on this page 7/09/2010 - P.Bridge
	
	strMsg = document.getElementById('txtErrInfo').value;
	
	if (strMsg.length > 0)	{
		alert(strMsg);
	}
	 
	if (intPOPUPShown == 1)	{
	
		strMsg=document.getElementById('txtAlertMessage').value;
		
		if (strMsg.length>0)	{
			alert(strMsg);
		}
	}	
	
}

function ShowInstructions() {

	//Show Instructions Title
	//document.getElementById('divInstructionsTitle').style.visibility = 'visible';
	//document.getElementById('divInstructionsTitle').style.position = 'relative';
	document.getElementById('divInstructionsTitle').style.display = 'block';
	
	//Hide Documents Title
	//document.getElementById('divDocumentsTitle').style.visibility = 'hidden';
	//document.getElementById('divDocumentsTitle').style.position = 'absolute';
	document.getElementById('divDocumentsTitle').style.display = 'none';
	
	//Change Button to Documents button
	//document.getElementById('divDocumentsButton').style.visibility = 'visible';
	//document.getElementById('divDocumentsButton').style.position = 'relative';
	document.getElementById('divDocumentsButton').style.display = 'block';
	
	//document.getElementById('divInstructionsButton').style.visibility = 'hidden';
	//document.getElementById('divInstructionsButton').style.position = 'absolute';
	document.getElementById('divInstructionsButton').style.display = 'none';
			
	//Show Instructions
	//document.getElementById('divInstructions').style.visibility = 'visible';
	//document.getElementById('divInstructions').style.position = 'relative';
	//document.getElementById('divInstructions').style.width = '100%';
	//document.getElementById('divDocuments').style.height = '0';
	document.getElementById('divInstructions').style.display = 'block';	
		
	//Hide Documents List
	//document.getElementById('divDocuments').style.visibility = 'hidden';
	//document.getElementById('divDocuments').style.position = 'absolute';
	//document.getElementById('divDocuments').style.width = '0';
	//document.getElementById('divDocuments').style.height = '0';
	document.getElementById('divDocuments').style.display = 'none';
		
}

function ShowDocuments() {

	var intHeight;
	
	//Show Documents Title
	//document.getElementById('divDocumentsTitle').style.visibility = 'visible';
	//document.getElementById('divDocumentsTitle').style.position = 'relative';
	document.getElementById('divDocumentsTitle').style.display = 'block';	
		
	//Hide Instructions Title
	//document.getElementById('divInstructionsTitle').style.visibility = 'hidden';
	//document.getElementById('divInstructionsTitle').style.position = 'absolute';
	document.getElementById('divInstructionsTitle').style.display = 'none';
	
	//Change Button to Instructions button
	//document.getElementById('divInstructionsButton').style.visibility = 'visible';
	//document.getElementById('divInstructionsButton').style.position = 'relative';
	document.getElementById('divInstructionsButton').style.display = 'block';
	//document.getElementById('divDocumentsButton').style.visibility = 'hidden';
	//document.getElementById('divDocumentsButton').style.position = 'absolute';
	document.getElementById('divDocumentsButton').style.display = 'none'
		
	//Show Documents list
	//document.getElementById('divDocuments').style.visibility = 'visible';
	//document.getElementById('divDocuments').style.position = 'relative';
	//document.getElementById('divDocuments').style.width = '100%';

	document.getElementById('divDocuments').style.display = 'block';
		
	//Hide Instructions
	//document.getElementById('divInstructions').style.visibility = 'hidden';
	//document.getElementById('divInstructions').style.position = 'absolute';
	//document.getElementById('divInstructions').style.width = '0';
	//document.getElementById('divInstructions').style.height = '0';
	
	document.getElementById('divInstructions').style.display = 'none'
	
}

function ShowReport()	{

	document.getElementById("frmViewReport").target = "EQAReport";
    document.getElementById("frmViewReport").submit();

}
