function inputLimiter3(e,allow) { 
var AllowableCharacters = '';
//if (allow == 'Letters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';}
//if (allow == 'Numbers'){AllowableCharacters='1234567890';} 
//if (allow == 'NameCharacters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.\'';}
//if (allow == 'NameCharactersAndNumbers'){
AllowableCharacters='1234567890. ()';
//}
var k; 
k=document.all?parseInt(e.keyCode): parseInt(e.which); 
if (k!=13 && k!=8 && k!=0){ 
if ((e.ctrlKey==false) && (e.altKey==false)) { 
return (AllowableCharacters.indexOf(String.fromCharCode(k))!=-1); 
} else { 
return true; 
} 
} else { 
return true; 
} 
} 

function inputLimiter2(e,allow) { 
var AllowableCharacters = '';
//if (allow == 'Letters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';}
//if (allow == 'Numbers'){AllowableCharacters='1234567890';} 
//if (allow == 'NameCharacters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.\'';}
//if (allow == 'NameCharactersAndNumbers'){
AllowableCharacters='1234567890 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\'';
//}
var k; 
k=document.all?parseInt(e.keyCode): parseInt(e.which); 
if (k!=13 && k!=8 && k!=0){ 
if ((e.ctrlKey==false) && (e.altKey==false)) { 
return (AllowableCharacters.indexOf(String.fromCharCode(k))!=-1); 
} else { 
return true; 
} 
} else { 
return true; 
} 
} 


function inputLimiter1(e,allow) { 
var AllowableCharacters = '';
//if (allow == 'Letters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';}
//if (allow == 'Numbers'){AllowableCharacters='1234567890';} 
//if (allow == 'NameCharacters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.\'';}
//if (allow == 'NameCharactersAndNumbers'){
//AllowableCharacters='1234567890 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\'';
AllowableCharacters='1234567890.';
//}
var k; 
k=document.all?parseInt(e.keyCode): parseInt(e.which); 
if (k!=13 && k!=8 && k!=0){ 
if ((e.ctrlKey==false) && (e.altKey==false)) { 
return (AllowableCharacters.indexOf(String.fromCharCode(k))!=-1); 
} else { 
return true; 
} 
} else { 
return true; 
} 
} 


function inputLimiter(e,allow) { 
var AllowableCharacters = '';
//if (allow == 'Letters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';}
//if (allow == 'Numbers'){AllowableCharacters='1234567890';} 
//if (allow == 'NameCharacters'){AllowableCharacters=' ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.\'';}
//if (allow == 'NameCharactersAndNumbers'){
//AllowableCharacters='1234567890 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_\'';
AllowableCharacters='1234567890.';
//}
var k; 
k=document.all?parseInt(e.keyCode): parseInt(e.which); 
if (k!=13 && k!=8 && k!=0){ 
if ((e.ctrlKey==false) && (e.altKey==false)) { 
return (AllowableCharacters.indexOf(String.fromCharCode(k))!=-1); 
} else { 
return true; 
} 
} else { 
return true; 
} 
} 



function ischinese(s){
    var ret=false;
    for(var i=0;i<s.length;i++)
	{
    if(s.charCodeAt(i)>=10000)
	ret=true;
	}
    return ret;
  }



function formReset()
{
document.form1.reset();
}


function formSubmit()
{
if(check()==true)
document.form1.submit();
}

function formSubmit2()
{
document.form1.submit();
}

function formSubmit1()
{
document.form.submit();
}

//////////////// check id  
  function check_id()
  {
  var user_id='';
  var user_id2=document.form1.user_id.value;
  
  for(var i=0;i<document.form1.user_id.value.length;i++)
  { 
   user_id2=user_id2.replace(" ",""); 
  }
  for(var i=0;i<user_id2.length;i++)
  { 
    if(user_id2.charCodeAt(i)<10000)
    user_id=user_id+user_id2.charAt(i);
  }
   document.form1.user_id.value=""+user_id+"";
  // alert("testing: "+user_id);
   document.getElementById("uid").src="user_verification.php?uid="+user_id+"";
  }
  
  function reset_id()
  {
   document.form1.user_id.value="";
   document.form1.user_id.focus();
  } 
  
  function set_id(value)
  {
   document.form1.user_id.value=""+value+"";
  } 
//////////////// check id   


//////////////// check phone  
  function check_phone()
  {
  var contact_tel='';
  var contact_tel2=document.form1.contact_tel.value;
  for(var i=0;i<document.form1.contact_tel.value.length;i++)
  {
   contact_tel2=contact_tel2.replace(" ","");
  }
  for(var i=0;i<contact_tel2.length;i++)
  { 
    if(contact_tel2.charCodeAt(i)<10000)
    contact_tel=contact_tel+contact_tel2.charAt(i);
  }
   document.form1.contact_tel.value=""+contact_tel+"";
   //document.getElementById("tel").src="phone_verification.php?tel="+contact_tel+"";
  }

  function phone_reset_id()
  {
   document.form1.contact_tel.value="";
   document.form1.contact_tel.focus();
  } 
//////////////// check phone   

  
//////////////// check email  
  function check_email()
  {
	if (document.form1.contact_email.value == ""){
		//alert("Please fill in the E-mail Address");
		document.getElementById("return_email").src="email_verification.php?msg=1";
		//document.form1.contact_email.focus();
		return false;
    }else {
		var emailStr=document.form1.contact_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			//alert("E-mail Address must include ( @ and . )");
			document.getElementById("return_email").src="email_verification.php?msg=2";
		    //document.form1.contact_email.focus();
 			return false;
		}
	}
    document.getElementById("return_email").src="email_verification.php?email="+document.form1.contact_email.value+"";
  }

  function email_reset_id()
  {
   document.form1.contact_email.value="";
   //document.form1.contact_email.focus();
  } 
//////////////// check email   
  
  
  
  
  
  
  
  
  
  
  
  
  function change_code(value)
  {
   document.form1.verify_code1.value=""+value+"";
   //alert(document.form1.verify_code1.value);
  } 
  
  function change_code2(value)
  {
   document.form1.verify_code2.value=""+value+"";
   //alert(document.form1.verify_code2.value);
  } 
  
  function change_dir(value)
  {
   document.form0.cat_dir.value=""+value+"";
  } 
  
  function check(){

  	document.form1.birth_day.value=document.form1.orderdate.value;
  
	if (document.form1.contact_name.value == ""){
			alert("Please fill your First Name!");
			document.form1.contact_name.focus();
			return false;
	}
	
	if (document.form1.contact_name1.value == ""){
			alert("Please fill your Last Name!");
			document.form1.contact_name1.focus();
			return false;
	}
	
	if (document.form1.contact_address.value == ""){
			alert("Please fill your Address!");
			document.form1.contact_address.focus();
			return false;
	}	
	
	if (document.form1.contact_district.value == ""){
			alert("Please fill your District!");
			document.form1.contact_district.focus();
			return false;
	}	
	
	if (document.form1.contact_country.value == ""){
			alert("Please select your Country!");
			document.form1.contact_country.focus();
			return false;
	}	
	
	var str=document.form1.contact_tel.value;
	str1=str.replace(' ',"");
	str2=str1.replace('-',"");
	str3=str2.replace('+',"");
	str4=str3.replace('.',"");
	str5=str4.replace(' ',"");
	str6=str5.replace('(',"");
	str7=str6.replace(')',"");
	if (str7 == "" || isNaN(str7)==true){
		alert("Please fill your valid Telephone Number!");
		document.form1.contact_tel.focus();
		return false;
    }
	
	
	
	if (document.form1.contact_email.value == ""){
		alert("Please fill in the E-mail Address");
		document.form1.contact_email.focus();
		return false;
    }else {
		var emailStr=document.form1.contact_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.form1.contact_email.focus();
 			return false;
		}
	}
	
	if (document.form1.contact_email1.value == "" && document.form1.contact_email.value != ""){
		alert("Please re-enter your E-mail Address!");
		document.form1.contact_email1.focus();
		return false;
    }else {
		if (document.form1.contact_email1.value != document.form1.contact_email.value) {
 			alert("The E-mail Address re-entered is not matching!");
			document.form1.contact_email1.focus();
 			return false;
		}
	}
	
	if (document.form1.user_id.value == ""){
			alert("Please fill your User ID!");
			document.form1.user_id.focus();
			return false;
	}
	
	if (document.form1.user_pwd.value == ""){
			alert("Please fill your User Password!");
			document.form1.user_pwd.focus();
			return false;
	}
	
	
	if (document.form1.user_pwd1.value == "" && document.form1.user_pwd.value != ""){
		alert("Please re-enter your User Password");
		document.form1.user_pwd1.focus();
		return false;
    }else {
		if (document.form1.user_pwd1.value != document.form1.user_pwd.value) {
 			alert("The User Password re-entered is not matching!");
		    document.form1.user_pwd1.focus();
 			return false;
		}
	}
	
	

	if (document.form1.birth_day.value == ""){
			alert("Please fill your Birthday!");
			return false;
	}	
	
	
		if (document.form1.verify_code1.value != document.form1.verify_code2.value) {
 			alert("The Verification Code is invalid!");
 			return false;
		}
	
	

var strb=document.form1.agree2;
	if (strb.checked!=true)
    {
	//alert(document.form1.verify_code1.value);
	//alert(document.form1.verify_code2.value);
		alert("Please agree the Agreement and Pivacy!");
		return false;
    }
	
	
//if(true)
//document.form1.submit();	

}

  function checksp(){
	if (document.form1.ass_name.value == ""){
			alert("Please fill your Company Name!");
			document.form1.ass_name.focus();
			return false;
	}

	if (document.form1.contact_name.value == ""){
			alert("Please fill your First Name!");
			document.form1.contact_name.focus();
			return false;
	}
	
	if (document.form1.contact_name1.value == ""){
			alert("Please fill your Last Name!");
			document.form1.contact_name1.focus();
			return false;
	}
	
	if (document.form1.contact_position.value == ""){
			alert("Please fill your Position!");
			document.form1.contact_position.focus();
			return false;
	}
	
	if (document.form1.contact_email.value == ""){
		alert("Please fill in the E-mail Address");
		document.form1.contact_email.focus();
		return false;
    }else {
		var emailStr=document.form1.contact_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.form1.contact_email.focus();
 			return false;
		}
	}
	
	
	var str=document.form1.contact_tel.value;
	str1=str.replace(' ',"");
	str2=str1.replace('-',"");
	str3=str2.replace('+',"");
	str4=str3.replace('.',"");
	str5=str4.replace(' ',"");
	str6=str5.replace('(',"");
	str7=str6.replace(')',"");
	if (str7 == "" || isNaN(str7)==true){
		alert("Please fill your valid Telephone Number!");
		document.form1.contact_tel.focus();
		return false;
    }
	
	

	
		if (document.form1.verify_code1.value != document.form1.verify_code2.value) {
 			alert("The Verification Code is invalid!");
 			return false;
		}
	

}


  function checka(){
	if (document.form1.ass_name.value == ""){
			alert("Please fill your Organization Name!");
			document.form1.ass_name.focus();
			return false;
	}

	if (document.form1.contact_name.value == ""){
			alert("Please fill your First Name!");
			document.form1.contact_name.focus();
			return false;
	}
	
	if (document.form1.contact_name1.value == ""){
			alert("Please fill your Last Name!");
			document.form1.contact_name1.focus();
			return false;
	}
	
	if (document.form1.contact_position.value == ""){
			alert("Please fill your Position!");
			document.form1.contact_position.focus();
			return false;
	}
	
	if (document.form1.contact_email.value == ""){
		alert("Please fill in the E-mail Address");
		document.form1.contact_email.focus();
		return false;
    }else {
		var emailStr=document.form1.contact_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.form1.contact_email.focus();
 			return false;
		}
	}
	
	
	var str=document.form1.contact_tel.value;
	str1=str.replace(' ',"");
	str2=str1.replace('-',"");
	str3=str2.replace('+',"");
	str4=str3.replace('.',"");
	str5=str4.replace(' ',"");
	str6=str5.replace('(',"");
	str7=str6.replace(')',"");
	if (str7 == "" || isNaN(str7)==true){
		alert("Please fill your valid Telephone Number!");
		document.form1.contact_tel.focus();
		return false;
    }
	
	
	if (document.form1.ci_form.value == ""){
			//alert("Please upload your CI Form!");
			//document.form1.ci_form.focus();
			//return false;
	}
	
	
	
		if (document.form1.verify_code1.value != document.form1.verify_code2.value) {
 			alert("The Verification Code is invalid!");
 			return false;
		}
	

}





  function checkrf(){

	if (document.form1.contact_name.value == ""){
			alert("Please fill the First Name of your friend!");
			document.form1.contact_name.focus();
			return false;
	}
	
	if (document.form1.contact_name1.value == ""){
			alert("Please fill the Last Name of your friend!");
			document.form1.contact_name1.focus();
			return false;
	}
	
	if (document.form1.contact_name2.value == ""){
			alert("Please fill your Name!");
			document.form1.contact_name2.focus();
			return false;
	}
	
	
	if (document.form1.contact_email.value == ""){
		alert("Please fill in the E-mail Address");
		document.form1.contact_email.focus();
		return false;
    }else {
		var emailStr=document.form1.contact_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.form1.contact_email.focus();
 			return false;
		}
	}
	
	
	var str=document.form1.contact_tel.value;
	str1=str.replace(' ',"");
	str2=str1.replace('-',"");
	str3=str2.replace('+',"");
	str4=str3.replace('.',"");
	str5=str4.replace(' ',"");
	str6=str5.replace('(',"");
	str7=str6.replace(')',"");
	if (str7 == "" || isNaN(str7)==true){
		alert("Please fill your valid Telephone Number!");
		document.form1.contact_tel.focus();
		return false;
    }
	
	

	
	


}



  function checkfb(){

	if (document.form1.contact_name.value == ""){
			alert("Please fill your First Name!");
			document.form1.contact_name.focus();
			return false;
	}
	
	if (document.form1.contact_name1.value == ""){
			alert("Please fill your Last Name!");
			document.form1.contact_name1.focus();
			return false;
	}
	

	
	if (document.form1.contact_email.value == ""){
		alert("Please fill in your E-mail Address");
		document.form1.contact_email.focus();
		return false;
    }else {
		var emailStr=document.form1.contact_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.form1.contact_email.focus();
 			return false;
		}
	}
	
	

	if (document.form1.message.value == ""){
			alert("Please fill your message!");
			document.form1.message.focus();
			return false;
	}
	
	


}



  function checkae(){

	if (document.form1.contact_name.value == ""){
			alert("Please fill your First Name!");
			document.form1.contact_name.focus();
			return false;
	}
	
	if (document.form1.contact_name1.value == ""){
			alert("Please fill your Last Name!");
			document.form1.contact_name1.focus();
			return false;
	}
	

	
	if (document.form1.contact_email.value == ""){
		alert("Please fill in your E-mail Address");
		document.form1.contact_email.focus();
		return false;
    }else {
		var emailStr=document.form1.contact_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.form1.contact_email.focus();
 			return false;
		}
	}
	
	

	if (document.form1.question.value == ""){
			alert("Please fill your question!");
			document.form1.question.focus();
			return false;
	}
	
	


}




  function checkam(){

	if (document.form1.contact_name.value == ""){
			alert("Please fill your First Name!");
			document.form1.contact_name.focus();
			return false;
	}
	
	if (document.form1.contact_name1.value == ""){
			alert("Please fill your Last Name!");
			document.form1.contact_name1.focus();
			return false;
	}
	
	if (document.form1.contact_email.value == ""){
		alert("Please fill in the E-mail Address");
		document.form1.contact_email.focus();
		return false;
    }else {
		var emailStr=document.form1.contact_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.form1.contact_email.focus();
 			return false;
		}
	}
	
	
	var str=document.form1.contact_tel.value;
	str1=str.replace(' ',"");
	str2=str1.replace('-',"");
	str3=str2.replace('+',"");
	str4=str3.replace('.',"");
	str5=str4.replace(' ',"");
	str6=str5.replace('(',"");
	str7=str6.replace(')',"");
	if (str7 == "" || isNaN(str7)==true){
		alert("Please fill your valid Telephone Number!");
		document.form1.contact_tel.focus();
		return false;
    }
	
	
	if (document.form1.contact_address.value == ""){
			alert("Please fill your Address!");
			document.form1.contact_address.focus();
			return false;
	}
	
	
		if (document.form1.verify_code1.value != document.form1.verify_code2.value) {
 			alert("The Verification Code is invalid!");
 			return false;
		}
	

}




  function checke(){
	if (document.form1.sat.value == ""){
			alert("Please fill your title!");
			document.form1.sat.focus();
			return false;
	}

	if (document.form1.name1.value == ""){
			alert("Please fill your First Name!");
			document.form1.name1.focus();
			return false;
	}
	
	if (document.form1.name2.value == ""){
			alert("Please fill your Last Name!");
			document.form1.name2.focus();
			return false;
	}
	
	var str=document.form1.tel.value;
	str1=str.replace(' ',"");
	str2=str1.replace('-',"");
	str3=str2.replace('+',"");
	str4=str3.replace('.',"");
	str5=str4.replace(' ',"");
	str6=str5.replace('(',"");
	str7=str6.replace(')',"");
	if (str7 == "" || isNaN(str7)==true){
		alert("Please fill your valid Telephone Number!");
		document.form1.tel.focus();
		return false;
    }
	

	
	
	if (document.form1.email.value == ""){
		alert("Please fill in the E-mail Address");
		document.form1.email.focus();
		return false;
    }else {
		var emailStr=document.form1.email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.form1.email.focus();
 			return false;
		}
	}
	
	if (document.form1.amount_opt_value.value <= 0){
			alert("Please select the Event Cost!");
			return false;
	}
	
var test_status=true;	
for (i=1; i<=1; i++) {
	if (document.getElementById('money_type'+i).checked==true){
		test_status=false;
    }
}
	
if(test_status)
{
alert("Please select the Payment Method !");
return false;
}
else
{
return true;
}
	
}



function check3(){
	if (document.formn.news_email.value == ""){
		alert("Please fill in the E-mail Address");
		document.formn.news_email.focus();
		return false;
    }else {
		var emailStr=document.formn.news_email.value;
		//alert(emailStr);
		var emailPat=/[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
		var matchArray=emailStr.match(emailPat);
		if (matchArray==null) {
 			alert("E-mail Address must include ( @ and . )");
		    document.formn.news_email.focus();
 			return false;
		}
	}
}

function checkd1(){
//  && document.getElementById("donate_type2").checked==false
	if (document.getElementById("donate_type1").checked==false){
		alert("Please select the donation option!");
		return false;
    }

}

function checkd2(value){
var test_status=true;

if(document.getElementById("ass_select").value=="")
test_status=true;
else
test_status=false;

if(test_status)
{
alert("Please select the beneficiary organization !");
return false;
}
else
{
return true;
}
}


function checkd3a(){
if (document.getElementById('item_des1').checked==true){
	if (document.getElementById('item_element11').value == ""){
			alert("Please fill the Item Name!");
			return false;
	}

	if (document.getElementById('item_element12').value == ""){
			alert("Please fill the estimated price!");
			return false;
	}
	
	if (document.getElementById('item_element13').value == ""){
			alert("Please fill the Description!");
			return false;
	}
}	

if (document.getElementById('item_des2').checked==true){
	if (document.getElementById('item_element21').value == ""){
			alert("Please fill the Message!");
			return false;
	}
}
	
}

function checkd3b(){
var test_status=true;
	if (document.getElementById('money_value').value <1 && isNaN(document.getElementById('money_value'))==true){
		    alert("Please fill the Donation Amount which is equal to or larger than HK$ 100!");
			return false;
	}

for (i=1; i<=1; i++) {
	if (document.getElementById('money_type'+i).checked==true){
		test_status=false;
    }
}

if(test_status)
{
alert("Please select the Payment Method !");
return false;
}
else
{
return true;
}
}


function checkdt(){

if (document.getElementById('dt_message').value == ""){
			alert("Please fill the Donation Time Details!");
			return false;
}


var test_status=true;

if(document.getElementById("ass_select").value=="")
test_status=true;
else
test_status=false;

if(test_status)
{
alert("Please select the beneficiary organization !");
return false;
}
else
{
return true;
}
}



function checkpo(){
// && document.getElementById("money_type2").checked==false
	if (document.getElementById("money_type1").checked==false){
		alert("Please select the payment option!");
		return false;
    }

if (document.getElementById('d_firstname').value == ""){
			alert("Please fill the First Name!");
		    document.getElementById('d_firstname').focus();
			return false;
}

if (document.getElementById('d_lastname').value == ""){
			alert("Please fill the Last Name!");
			document.getElementById('d_lastname').focus();
			return false;
}

if (document.getElementById('d_address').value == ""){
			alert("Please fill the Address!");
		    document.getElementById('d_address').focus();
			return false;
}

var str=document.getElementById('d_tel').value;
	str1=str.replace(' ',"");
	str2=str1.replace('-',"");
	str3=str2.replace('+',"");
	str4=str3.replace('.',"");
	str5=str4.replace(' ',"");
	str6=str5.replace('(',"");
	str7=str6.replace(')',"");
	if (str7 == "" || isNaN(str7)==true){
		alert("Please fill your valid Telephone Number!");
		document.getElementById('d_tel').focus();
		return false;
    }


}