/*******************************************************************************
	OBJECT:        checkdata.js.
	DESCRIPTION:   Validate the search field.
	DEVELOPER:     Mohammed Ovais. 
	DATE:          31 May 2006.
	ATTRIBUTES:
    RETURN:
*******************************************************************************/
















































































































































































































































































































function validateData(pds)
{
var chkstring=pds.case_no.value;
var casefld=pds.case_no;
var strptn=/[PpDd]-\d{5}-\d{5}/;
var str="T"
var len=chkstring.length
if  ((strptn.test(chkstring)==true)||(len>13)) {
return true;
}
 else if ((chkstring.indexOf(str)!=-1)) 
{
alert("            This system does not supply status for T-Cases. " +"\n" + " Please enter a “D” or “P” prefix depending on your geographical location. ")
casefld.focus()
return false
}
else if ((pds.case_no.value=="")) 
{
alert("Please enter the case number with all dashes." +"\n" + "         Where the # represents a number " +"\n" + "(e.g. P-#####-##### OR D-#####-#####).  ")
casefld.focus()
return false
}
else{ 
alert(" You have entered an invalid Case Number.  ");
return false;
}
}
function test(obj, value)
 {
       obj.value = value;
 }
