

 function AlwaysFireBeforeFormSubmit()
 {
   var isSumbit = true;
  if(form1.FirstName.value.trim() =='')
  {
    document.getElementById("div_FirstName").style.backgroundColor="red";
    document.getElementById("div_FirstName").style.color="white"; 
    isSumbit = false;
  }
  if(form1.LastName.value.trim() =='')
  {
    document.getElementById("div_LastName").style.backgroundColor="red";
    document.getElementById("div_LastName").style.color="white"; 
    isSumbit = false;
  }
  if(form1.organization.value.trim() =='')
  {
    document.getElementById("div_organization").style.backgroundColor="red";
    document.getElementById("div_organization").style.color="white"; 
    isSumbit = false;
  }
  if(form1.email.value.trim() =='')
  {
    document.getElementById("div_email").style.backgroundColor="red";
    document.getElementById("div_email").style.color="white"; 
    isSumbit = false;
  }
  if(form1.Password.value.trim() =='')
  {
    document.getElementById("div_Password").style.backgroundColor="red";
    document.getElementById("div_Password").style.color="white"; 
    isSumbit = false;
  }
  if(form1.ConfPassword.value.trim() =='')
  {
    document.getElementById("div_ConfPassword").style.backgroundColor="red";
    document.getElementById("div_ConfPassword").style.color="white"; 
    isSumbit = false;
  }
  
   if(isSumbit)
      form1.submit(); 
   
      return isSumbit;
 }
  
function CheckStatus(object)
{

 var textbox = eval('form1.'+object);
 if(textbox.value.trim()!='')
 { 
   document.getElementById('div_'+object).style.backgroundColor="white";
   document.getElementById('div_'+object).style.color="black";
 }
}
 

String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
}



