// JavaScript Document
function qccontact(c){
var i=document.getElementById(c).value
if(i=='First Name'){
document.getElementById(c).value='';
document.frm.txtfname.focus();
return false;
}
return true;
}
function qccontactlast(c){
var i=document.getElementById(c).value
if(i=='Last Name'){
document.getElementById(c).value='';
document.frm.txtlname.focus();
return false;
}return true;
}
function qccontactbllast(p,ns){
var i=document.getElementById(p).value
if(i==""){
document.getElementById(p).value=ns;
}return true;
}
function qccontactemal(c){
var i=document.getElementById(c).value
if(i=='E-mail'){
document.getElementById(c).value='';
document.frm.txtemail.focus();
return false;
}return true;
}
function qccontactno(c){
var i=document.getElementById(c).value
if(i=='Contact No.'){
document.getElementById(c).value='';
document.frm.txtcno.focus();
return false;
}return true;
}
function qccontactaddres(c){
var i=document.getElementById(c).value
if(i=='Country'){
document.getElementById(c).value='';
document.frm.txtcountry.focus();
return false;
}return true;
}
function qccontactdec(c){
var i=document.getElementById(c).value
if(i=='Please describe your requirements'){
document.getElementById(c).value='';
return false;
}return true;
}
function qccontactdec1(c){
var i=document.getElementById(c).value
if(i=='Address'){
document.getElementById(c).value='';
return false;
}return true;
}
// JavaScript Document
function Is_Blank(obj, chk_val, msg){
	if(obj.value == chk_val){
		alert(msg);
		obj.focus();
		return true;
	}
	else return false;
}
function Is_Email(email){
	var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
	var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
	if (!(!reg1.test(email) && reg2.test(email))) return false;
	else return true;
}
function qicmain(){
	var i=document.getElementById('fname').value
	var j=document.getElementById('lname').value
	var k=document.getElementById('email').value
	var l=document.getElementById('phone').value
	var m=document.getElementById('comment').value
	if(i=='First Name'){
	alert("Please enter  First Name");
	document.frm_cont.fname.focus();
	return false;
	}
if(k=='E-mail'){
	alert("Please enter  E-mail Id.");
	document.frm_cont.email.focus();
	return false;
	}
	else if(!Is_Email(k)){
		alert("Please enter valid E-mail Id."); 
		document.frm_cont.email.focus();
	return false;
	}
	flg=0;
	if(l=='Contact No.'){
	alert("Please enter  Contact Number.");
	document.frm_cont.phone.focus();
	return false;
	}
	else if(isNaN(l))	{flg=1;}
	else if((l).length<10 || (l).length>10){ flg=1; }
	if(flg==1){
		alert("Please Enter Valid Contact Number");
		document.frm_cont.phone.focus();
	return false;
		}
document.frm_cont.submit();
}
function funrq(){
	var i=document.getElementById('fname').value
	var j=document.getElementById('lname').value
	var k=document.getElementById('email').value
	var l=document.getElementById('phone').value
	var m=document.getElementById('comment').value
	if(i=='First Name'){
	alert("Please enter  Frist Name.");
	document.frm_cont.fname.focus();
	return false;
	}
}