// Javascript functions to check the customer search forms

// validateStdSearch
function validateStdSearch() { 		

var frm = document.forms.search; 	

if (frm.stdsearch.value == "" || frm.stdsearch == null)
{
// Build alert box message showing how many characters entered
mesg = "Please enter a document no / name that you want to search for.\n"
alert(mesg);
// Place the cursor on the field for revision
frm.stdsearch.focus();
// return false to stop further processing
return (false);
}
// If text_name is not null continue processing
return (true);
}

// validateCISearch
function validateCISearch() { 		

var frm = document.forms.search; 	

if (frm.pDocName.value == "" || frm.pDocName == null)
{
// Build alert box message showing how many characters entered
mesg = "Please enter a complete CI no.\n"
alert(mesg);
// Place the cursor on the field for revision
frm.pDocName.focus();
// return false to stop further processing
return (false);
}
// If text_name is not null continue processing
return (true);
}


// validateCustDwgSearch
function validateCustDwgSearch() { 		

var frm = document.forms.custdwg; 	

if (frm.pDrawingNo.value == "" || frm.pDrawingNo == null)
{
// Build alert box message showing how many characters entered
mesg = "Please enter a complete drawing no.\n"
alert(mesg);
// Place the cursor on the field for revision
frm.pDrawingNo.focus();
// return false to stop further processing
return (false);
}
// If text_name is not null continue processing
return (true);
}


// validatePartSearch
function validatePartSearch() { 		

var frm = document.forms.custpart; 	

if (frm.pPartNo.value == "" || frm.pPartNo == null)
{
// Build alert box message showing how many characters entered
mesg = "Please enter a complete part no.\n"
alert(mesg);
// Place the cursor on the field for revision
frm.pPartNo.focus();
// return false to stop further processing
return (false);
}
// If text_name is not null continue processing
return (true);
}
