//*************************************************************************************************************//
//Declare the strings to be used in the javascript error messages
var strerr1 =  "Anwendername ist ungültig";
var strerr6 =  "Der Anwendername darf max. 20 Zeichen umfassen";

var strerr2 =  "Das Passwort ist ungültig";
var strerr42 = "Das derzeitige Passwort ist ungültig";
var strerr43 = "Das neue Passwort ist ungültig";
var strerr44 = "Sie habe das neue Passwort nicht richtig bestätigt";

var strerr3 =  "Der Nachname ist ungültig";
var strerr4 =  "Der Vorname ist ungültig";
var strerr5 =  "Die Email ist ungültig";		

var strerr7 =  "Das Geburtsjahr ist ungültig";
var strerr8 =  "Das Geburtsjahr muss eine Zahl sein";
var strerr9 =  "Das Geburtsjahr muss im YYYY-Format sein";
var strerr10 = "Das Geburtsjahr muss höher als 1900 sein";
var strerr11 = "Dwe Geburtstag ist ungültig";
var strerr12 = "Der Geburtsmonat ist ungültig";

var strerr13 =  "Die Sprache ist ungültig";
var strerr14 =  "Die Postleitzahl ist ungültig";
var strerr15 =  "Das Land ist ungültig";
var strerr16 =  "Das Bundesland ist ungültig";
var strerr17 =  "Die Stadt ist ungültig";
var strerr18 =  "Die Adresse ist ungültig";
var strerr19 =  "Das Telefon ist ungültig";

var strerr20 =  "Netzwerkkarte 1 - Treiberversion ist ungültig";
var strerr21 =  "Netzwerkkarte 1 - Bezeichnung ist ungültig";

var strerr22 =  "Soundkarte 1 - Treiberanbieter ist ungültig";
var strerr23 =  "Soundkarte 1 - Treiberversion ist ungültig";
var strerr24 =  "Soundkarte 1 - Bezeichnung ist ungültig";

var strerr25 =  "Grafikkarte 1 - Treiberanbieter ist ungültig";
var strerr26 =  "Grafikkarte 1 - Treiberversion ist ungültig";
var strerr27 =  "Grafikkarte 1 - Bezeichnung ist ungültig";

var strerr28 =  "Der Speicher ist ungültig";
var strerr29 =  "Der Speicher muss eine Zahl sein";

var strerr30 =  "Der Prozessor-Takt ist ungültig";
var strerr31 =  "Der Prozessor-Takt muss eine Zahl sein";
var strerr32 =  "Das Prozessor-Modell ist ungültig";
var strerr33 =  "Der Prozessor-Typ ist ungültig";

var strerr34 =  "Die Mainboard-Bios-Version/-Datum ist ungültig";
var strerr35 =  "Der Mainboard-Chipsatz ist ungültig";
var strerr36 =  "Das Mainboard-Modell ist ungültig";
var strerr37 =  "Der Mainboard-Hersteller ist ungültig";

var strerr38 =  "Die Direct-X-Version ist ungültig";

var strerr39 =  "Das Betriebssystem-Servicepack ist ungültig";
var strerr40 =  "Das Betriebssystem ist ungültig";

var strerr41 =  "Dr System-Nickname ist ungültig";

var strerr45 =  "\"Problem\" ist leer";
var strerr46 =  "\"Thema\" ist leer";
var strerr47 =  "Das System ist ungültig";
var strerr48 =  "Das Produkt ist ungültig";
var strerr51 =  "Das FAQ ID ist ungültig";

var strerr49 =  "Das Alter muss eine Zahl sein";
var strerr50 =  "Um den gesetzlichen Bestimmungen zu genügen erheben wir keine Informationen von Kindern unter 16 Jahren. Bitte lasst den entsprechenden Abschnitt von den Eltern oder gesetzlichen Vertretern ausfüllen.";

var confirmMsgtext = "System löschen:";

var messagestart = "Die folgenden Fehler traten auf:";

//*****************************************************************************************************************//

function trim(inputString) 
{
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function

function checkLoginform()
{
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false
	//Checking for empty last name field
	trimmed_string = trim(document.login_form.username.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr1 + "\n";
	        //message = message + "Username is invalid\n";
			document.login_form.username.focus();
	}
	//Checking for empty last name field
	trimmed_string = trim(document.login_form.password.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr2 + "\n";
			document.login_form.password.focus();
	}
	form = checkMessage(message);
return form;
}

function checkLoginform2()
{
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false
	//Checking for empty last name field
	trimmed_string = trim(document.login_form2.username.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr1 + "\n";
			document.login_form2.username.focus();
	}
	//Checking for empty last name field
	trimmed_string = trim(document.login_form2.password.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr2 + "\n";
			document.login_form2.password.focus();
	}
	form = checkMessage(message);
return form;
}

//************************Customer Registration Step 1 validation**********************
//Take in mind that every error is checked to ensure user friendly error messages
//I understand that these if stmts can easily be combined
function checkCUSTREG1()
{
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false	
	//Checking for empty last name field
	trimmed_string = trim(document.customer_reg_step1.lastname.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr3 + "\n";
			document.customer_reg_step1.lastname.focus();
	}
	//Checking for empty first name field
	trimmed_string = trim(document.customer_reg_step1.firstname.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr4 + "\n";
			document.customer_reg_step1.firstname.focus();
	}
	//Check the email address
	if (!isEmailAddr(document.customer_reg_step1.email.value))
	{
		message = message + strerr5 + "\n";		
		document.customer_reg_step1.email.focus();
	}
	//Checking for blank username field
	trimmed_string = trim(document.customer_reg_step1.username.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr1 + "\n";
			document.customer_reg_step1.username.focus();
	}
	else
	{
		//Maximum of 12 characters
		if(trimmed_string.length > 20)
		{
			message = message + strerr6 + "\n";
			document.customer_reg_step1.username.focus();
		}
	}
	//Validate the age
	//trimmed_string = trim(document.customer_reg_step1.age.value);
	//If the string is age year
	//if(trimmed_string.length == 0)
	//{
	//	message = message + strerr49 + "\n"
	//	document.customer_reg_step1.age.focus();
	//}
	//else
	//{
		//if the age is numeric
	//	if(isNaN(document.customer_reg_step1.age.value) == true)
	//	{ 
	//		message = message + strerr49 + "\n";
	//		document.customer_reg_step1.age.focus();
	//	}
	//	else
	//	{
			//if the age is over 16
	//		if(document.customer_reg_step1.age.value < 16)
	//		{
	//			message = strerr50 + "\n";
	//			document.customer_reg_step1.age.focus();
	//		}			
	//	}
	//}
	//Language check
	if(document.customer_reg_step1.lang_id.value == 0)
	{
		message = message + strerr13 + "\n";
		document.customer_reg_step1.lang_id.focus();		
	}
	//Zip postal check
	trimmed_string = trim(document.customer_reg_step1.zip_postal.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr14 + "\n";
			document.customer_reg_step1.zip_postal.focus();
	}
	//Country id check
	if(document.customer_reg_step1.country_id.value == 0)
	{
		message = message + strerr15 + "\n";
		document.customer_reg_step1.country_id.focus();		
	}
	//State and Province check
	
    var isIE=document.all?true:false;
    var isDOM=document.getElementById?true:false;
    
    if( isIE )
    {
    	if( divstatetext.style.visibility == "visible" )
    	    document.customer_reg_step1.state_prov.value = document.customer_reg_step1.statetext.value;
        else
    	    document.customer_reg_step1.state_prov.value = document.customer_reg_step1.statelist.options[document.customer_reg_step1.statelist.selectedIndex].value;
    }
    else if( isDOM )
    {
    	if( document.getElementById("divstatetext").style.visibility == "visible" )
    	    document.customer_reg_step1.state_prov.value = document.customer_reg_step1.statetext.value;
        else
    	    document.customer_reg_step1.state_prov.value = document.customer_reg_step1.statelist.options[document.customer_reg_step1.statelist.selectedIndex].value;
    }
	trimmed_string = trim(document.customer_reg_step1.state_prov.value);
	if (trimmed_string.length == 0)
	{
	        message = message + strerr16 + "\n";
			//document.customer_reg_step1.state_prov.focus();
	}
	//City check
	trimmed_string = trim(document.customer_reg_step1.city.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr17 + "\n";
			document.customer_reg_step1.city.focus();
	}
	//Address check
	trimmed_string = trim(document.customer_reg_step1.address.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr18 + "\n";
			document.customer_reg_step1.address.focus();
	}
	//Primary phone 1
	trimmed_string = trim(document.customer_reg_step1.phone1.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr19 + "\n";
			document.customer_reg_step1.phone1.focus();
	}
	form = checkMessage(message);
return form;

} // end of the function checkform()


//************************Customer Registration Step 2 validation**********************
function checkCUSTREG2() 
{
if(document.customer_reg_step2.testbutton.value == 2)
{
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false	

	form = checkMessage(message);
	return form;
}
else
{
	return true;
}
} // end of the function checkform()

function checkADDSYSTEM()
{
	if(document.customer_reg_step3.testbutton.value == 2)
	{
		// create error message string variable, with nothing in it
		var message = ""; 
		var trimmed_string;
		var form = "";      //The form return of true or false
	
		//Nickname
		trimmed_string = trim(document.customer_reg_step3.nickname.value);
		if (trimmed_string.length == 0) 
		{
				message = message + strerr41 + "\n";
				document.customer_reg_step3.nickname.focus();
				
		}
	
		form = checkMessage(message);
		return form;
	}
	else
	{
		return true;
	}
} // end of the function checkADDSYSTEM()

//*******************************Customer Registration Step 3 - Manual system**********************
function checkCUSTREG3()
{
//Os check
if(document.customer_reg_step3.testbutton.value == 2)
{
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false
	//Network Driver Version
	//trimmed_string = trim(document.customer_reg_step3.elements['network[0][driver_ver]'].value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr20 + "\n";
	//		document.customer_reg_step3.elements['network[0][driver_ver]'].focus();
	//}
	//Network Name
	//trimmed_string = trim(document.customer_reg_step3.elements['network[0][name]'].value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr21 + "\n";
	//		document.customer_reg_step3.elements['network[0][name]'].focus();
	//}
	//Audio Driver Provider
	//trimmed_string = trim(document.customer_reg_step3.elements['audio[0][driver_prov]'].value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr22 + "\n";
	//		document.customer_reg_step3.elements['audio[0][driver_prov]'].focus();
	//}
	//Audio Driver Version
	//trimmed_string = trim(document.customer_reg_step3.elements['audio[0][driver_ver]'].value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr23 + "\n";
	//		document.customer_reg_step3.elements['audio[0][driver_ver]'].focus();
	//}
	//Audio Name
	//trimmed_string = trim(document.customer_reg_step3.elements['audio[0][name]'].value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr24 + "\n";
	//		document.customer_reg_step3.elements['audio[0][name]'].focus();
	//}
	//Video Driver Provider
	//trimmed_string = trim(document.customer_reg_step3.elements['video[0][driver_prov]'].value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr25 + "\n";
	//		document.customer_reg_step3.elements['video[0][driver_prov]'].focus();
	//}
	//Video Driver Version
	//trimmed_string = trim(document.customer_reg_step3.elements['video[0][driver_ver]'].value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr26 + "\n";
	//		document.customer_reg_step3.elements['video[0][driver_ver]'].focus();
	//}
	//Video Name
	//trimmed_string = trim(document.customer_reg_step3.elements['video[0][name]'].value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr27 + "\n";
	//		document.customer_reg_step3.elements['video[0][name]'].focus();
	//}
	//Memory
	//trimmed_string = trim(document.customer_reg_step3.memory_num.value);
	//if(trimmed_string.length == 0)
	//{
	//	message = message + strerr28 + "\n"
	//	document.customer_reg_step3.memory_num.focus();
	//}
	//else
	//{
		//Memory is numeric
	//	if(isNaN(document.customer_reg_step3.memory_num.value) == true)
	//	{ 
	//		message = message + strerr29 + "\n";
	//		document.customer_reg_step3.memory_num.focus();
	//	}
	//}
	//Processor Speed
	//trimmed_string = trim(document.customer_reg_step3.processor_speed_num.value);
	//if(trimmed_string.length == 0)
	//{
	//	message = message + strerr30 + "\n"
	//	document.customer_reg_step3.processor_speed_num.focus();
	//}
	//else
	//{
		//Processor Speed is numeric
	//	if(isNaN(document.customer_reg_step3.processor_speed_num.value) == true)
	//	{ 
	//		message = message + strerr31 + "\n";
	//		document.customer_reg_step3.processor_speed_num.focus();
	//	}
	//}
	//Processor Model
	//trimmed_string = trim(document.customer_reg_step3.processor_model.value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr32 + "\n";
	//		document.customer_reg_step3.processor_model.focus();
	//}
	//Processor Type
	//trimmed_string = trim(document.customer_reg_step3.processor_type.value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr33 + "\n";
	//		document.customer_reg_step3.processor_type.focus();
	//}
	//Motherboard Bios Version Date
	//trimmed_string = trim(document.customer_reg_step3.mboard_bios_ver.value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr34 + "\n";
	//		document.customer_reg_step3.mboard_bios_ver.focus();
	//}
	//Motherboard Chipset
	//trimmed_string = trim(document.customer_reg_step3.mboard_chipset.value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr35 + "\n";
	//		document.customer_reg_step3.mboard_chipset.focus();
	//}
	//Motherboard Model
	//trimmed_string = trim(document.customer_reg_step3.mboard_model.value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr36 + "\n";
	//		document.customer_reg_step3.mboard_model.focus();
	//}
	//Motherboard Manufacturer
	//trimmed_string = trim(document.customer_reg_step3.mboard_manufac.value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr37 + "\n";
	//		document.customer_reg_step3.mboard_manufac.focus();
	//}
	//Direct X Version
	//trimmed_string = trim(document.customer_reg_step3.directx_ver.value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr38 + "\n";
	//		document.customer_reg_step3.directx_ver.focus();
	//}
	//Service Pack
	//trimmed_string = trim(document.customer_reg_step3.os_spack.value);
	//if (trimmed_string.length == 0) 
	//{
	//        message = message + strerr39 + "\n";
	//		document.customer_reg_step3.os_spack.focus();
			
	//}
	//OS ID
	//if(document.customer_reg_step3.os_id.value < 1)
	//{
	//	message = message + strerr40 + "\n";
	//	document.customer_reg_step3.os_id.focus();		
	//}
	//Nickname
	trimmed_string = trim(document.customer_reg_step3.nickname.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr41 + "\n";
			document.customer_reg_step3.nickname.focus();
			
	}
	form = checkMessage(message);
	return form;
}
else
{
	return true;
}
} // end of the function checkform()
function CheckSendLogin()
{
	// create error message string variable, with nothing in it
	var message = ""; 
	var form = "";      //The form return of true or false	
	//Check the email address
	if (!isEmailAddr(document.sendlogin.useremail.value))
	{
		message = message + strerr5 + "\n";		
		document.sendlogin.useremail.focus();
	}
	form = checkMessage(message);
return form;
}
function CheckSysAuto()
{
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false
	//Check nickname
	trimmed_string = trim(document.system.nickname.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr41 + "\n";
			document.system.nickname.focus();
	}
	form = checkMessage(message);
return form;
}
function checkEDITPROF()
{
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false	
	//Language check
	if(document.edit_prof.lang_id.value == 0)
	{
		message = message + strerr13 + "\n";
		document.edit_prof.lang_id.focus();		
	}
	//Zip postal check
	trimmed_string = trim(document.edit_prof.zip_postal.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr14 + "\n";
			document.edit_prof.zip_postal.focus();
	}
	//Country id check
	if(document.edit_prof.country_id.value == 0)
	{
		message = message + strerr15 + "\n";
		document.edit_prof.country_id.focus();		
	}
	//State and Province check
    var isIE=document.all?true:false;
    var isDOM=document.getElementById?true:false;
    if( isIE )
    {
    	if( divstatetext.style.visibility == "visible" )
    	    document.edit_prof.state_prov.value = document.edit_prof.statetext.value;
        else
    	    document.edit_prof.state_prov.value = document.edit_prof.statelist.options[document.edit_prof.statelist.selectedIndex].value;
    }
    else if( isDOM )
    {
    	if( document.getElementById("divstatetext").style.visibility == "visible" )
    	    document.edit_prof.state_prov.value = document.edit_prof.statetext.value;
        else
    	    document.edit_prof.state_prov.value = document.edit_prof.statelist.options[document.edit_prof.statelist.selectedIndex].value;
    }
	trimmed_string = trim(document.edit_prof.state_prov.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr16 + "\n";
			//document.edit_prof.state_prov.focus();
	}
	//City check
	trimmed_string = trim(document.edit_prof.city.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr17 + "\n";
			document.edit_prof.city.focus();
	}
	//Address check
	trimmed_string = trim(document.edit_prof.address.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr18 + "\n";
			document.edit_prof.address.focus();
	}
	//Primary phone 1
	trimmed_string = trim(document.edit_prof.phone1.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr19 + "\n";
			document.edit_prof.phone1.focus();
	}
	//Checking for empty last name field
	trimmed_string = trim(document.edit_prof.lastname.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr3 + "\n";
			document.edit_prof.lastname.focus();
	}
	//Checking for empty first name field
	trimmed_string = trim(document.edit_prof.firstname.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr4 + "\n";
			document.edit_prof.firstname.focus();
	}
	form = checkMessage(message);
return form;

}

function checkChangePass()
{
	
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false
	trimmed_string = trim(document.changepass.cur_pass.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr42 + "\n";
			document.changepass.cur_pass.focus();
	}
	trimmed_string = trim(document.changepass.new_pass.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr43 + "\n";
			document.changepass.new_pass.focus();
	}
	if(document.changepass.cnew_pass.value != document.changepass.new_pass.value)
	{
		message = message + strerr44 + "\n";
		document.changepass.cnew_pass.focus();
	}
	
	form = checkMessage(message);
return form;
}

function confirmLink(theLink, strQuery)
{

	confirmMsg = confirmMsgtext;
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + '\n' + strQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';		
    }

    return is_confirmed;
} // end of the 'confirmLink()' function


function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function checkEMAILSUP()
{
	
	// create error message string variable, with nothing in it
	var message = ""; 
	var trimmed_string;
	var form = "";      //The form return of true or false

	trimmed_string = trim(document.email_support.problem.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr45 + "\n";
			document.email_support.problem.focus();
	}

	trimmed_string = trim(document.email_support.subject.value);
	if (trimmed_string.length == 0) 
	{
	        message = message + strerr46 + "\n";
			document.email_support.subject.focus();
	}

	if(document.email_support.system.value < 1)
	{
		message = message + strerr47 + "\n";
		document.email_support.system.focus();
	}
	
	if(document.email_support.product.value < 1)
	{
		message = message + strerr48 + "\n";
		document.email_support.product.focus();
	}

	form = checkMessage(message);
return form;

}

  
function checkMessage(message)
{
	// is there an error message?   		
	if ( message.length > 0 ) 
	{ 
		   message = messagestart + "\n\n" + message;	
		   alert( message ); // display error message 
	       return false; // return false, not ok to process 
    }
	else 
	{
		   return true; // no error message to display, return ok to process 
	} 

}

function MM_openBrWindow(theURL,winName,features) 
{ //v2.0
  var winpops = window.open(theURL,winName,features);
  winpops.moveTo(0,0);
}

function checkSearchFAQ()
{
	
	var message = ""; 
	var form = "";      //The form return of true or false
	if( document.search_faq.FAQProductID.value < 1 && document.search_faq.faqid.value == '' )

	{

		message = strerr48 + "\n";

		document.search_faq.FAQProductID.focus();
	}
    if( document.search_faq.faqid.value != '' && isNaN( document.search_faq.faqid.value ) )
    {
        message = strerr51 + "\n";
		document.search_faq.faqid.focus();
    }
	form = checkMessage(message);
return form;
}

