function validateForm(frm){
	if(document.forms.frm.username.value=="" || document.forms.frm.username.value=="Username"){
		alert("Please enter your username.");
		document.forms.frm.username.focus();
		return false;
	}
	
	if(document.forms.frm.password.value=="" || document.forms.frm.password.value=="Password"){
		alert("Please enter your password.");
		document.forms.frm.password.focus();
		return false;
	}
	return true;
	/*var a="<div  class='wh-content'><p><strong>Username : </strong>"+document.forms.frm.txtusername.value+" </p><p>&nbsp;</p><p><strong>Password : </strong>"+document.forms.frm.txtpassword.value+"</p></div><div style='float:right'><a href =javascript:void(0) onclick = document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'><strong>X</strong></a>";
	validateForm2(a);
	*/
}
/*function validateForm2(a)
{
	document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById("light").innerHTML=a;
}*/

function newvalidateForm(){
	if(document.commonheaderfrm.username.value=="" || document.commonheaderfrm.username.value=="Username"){
		alert("Please enter your username.");
		document.commonheaderfrm.username.focus();
		return false;
	}
	
	if(document.forms.commonheaderfrm.password.value=="" || document.forms.commonheaderfrm.password.value=="Password"){
		alert("Please enter your password.");
		document.forms.commonheaderfrm.password.focus();
		return false;
	}
	return true;
	/*var a="<div  class='wh-content'><p><strong>Username : </strong>"+document.forms.frm.txtusername.value+" </p><p>&nbsp;</p><p><strong>Password : </strong>"+document.forms.frm.txtpassword.value+"</p></div><div style='float:right'><a href =javascript:void(0) onclick = document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'><strong>X</strong></a>";
	validateForm2(a);
	*/
}

function Validate(){       
        var x = document.sform.phone_no.value;		
         if(document.sform.phone_no.value == "")		 {
              alert("Enter numeric value");
			  document.sform.phone_no.focus();
			  return false; 
		 }
	    if(isNaN(x)|| x.indexOf(" ")!=-1){
              alert("Enter numeric value");
			  document.sform.phone_no.focus();
			  return false; 
		}
		if (x.length != 12){
                alert("Enter 12 characters starting with 91"); 
				 document.sform.phone_no.focus();
				return false;
        }
		return true;
		/*Validate2(x);*/      	
}

function mobileValidate(){  
	var x = document.formmobile.phone_no.value;		
	if(document.formmobile.phone_no.value == "")		 {
	  alert("Enter numeric value");
	  document.formmobile.phone_no.focus();
	  return false; 
	}
	if(isNaN(x)|| x.indexOf(" ")!=-1){
	  alert("Enter numeric value");
	  document.formmobile.phone_no.focus();
	  return false; 
	}
	if (x.length != 12){
		alert("Enter 12 characters starting with 91"); 
		 document.formmobile.phone_no.focus();
		return false;
	}
	return true;
		/*Validate2(x);*/      	
}
/*
function Validate2(x)
{
 var text="<div class='wh-content'><strong>Your Mobile Number : </strong>"+ x +"</div><div style='float:right'><a href =javascript:void(0) onclick = document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'><strong>X</strong></a></div>";
 document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById("light").innerHTML=text;
} 
*/
