var xmlHttp
function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
  {
	   xmlHttp=new XMLHttpRequest();
  }
  catch(e)
  {
   		// Internet Explorer
	   try
	   {
		xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	   } 
	   catch(e)
	   {
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	   }
  }
  return xmlHttp;
}


function reqallajax(did,rqsturl)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=rqsturl;
//document.getElementById(did).innerHTML='<img src="images/loading.gif" border="0" alt="" title="Loading" width="32" height="32" />';
if (xmlHttp)
  {
   xmlHttp.onreadystatechange = function()
   {
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

		 { 		
		 document.getElementById(did).innerHTML=xmlHttp.responseText; 
		 }
   }
  }
xmlHttp.open("GET",url,true)

xmlHttp.send(null)

}

var remail=/^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/;
function isblank(s)  
	 {
	   var len=s.length;
	   for(var i=0;i<len;i++)
	   {
	     if(s.charAt(i)!=" ")
		 {
		   return false;
		  }
		}
		return true;
	}

function onlyNumbers(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode;
	 if (charCode > 31 && (charCode < 43 || charCode > 57)){
	 alert("Please enter numaric value");
	return false;
	}								
	 return true;
}

function evntonlyNumbers(evt)
{

	var charCode = (evt.which) ? evt.which : event.keyCode;
	 if (charCode > 31 && (charCode < 48 || charCode > 57) ){
	 alert("Please enter numaric value");
	return false;
	}								
	 return true;
}

function careersubmit(str){
	if(isblank(str.careername.value)){
	alert("You forgot to enter Your Name.");
	str.careername.focus();
	return false;
	}
	if(isblank(str.careerage.value)){
	alert("You forgot to enter Your Age.");
	str.careerage.focus();
	return false;
	}
	if(isblank(str.careersex.value)){
	alert("You forgot to enter Your Sex.");
	str.careersex.focus();
	return false;
	}
	if(isblank(str.careeraddress.value)){
	alert("You forgot to enter Your Address.");
	str.careeraddress.focus();
	return false;
	}
	if(isblank(str.careerphone.value)){
	alert("You forgot to enter Your Phone No.");
	str.careerphone.focus();
	return false;
	}
	if(isblank(str.careeremail.value)){
	alert("You forgot to enter Your Email.");
	str.careeremail.focus();
	return false;
	}
	if(!remail.test(str.careeremail.value)){
	alert("You forgot to correct Email ID");
	str.careeremail.focus();
	return false;	
	}
	if(isblank(str.careerdegree.value)){
	alert("You forgot to enter Your Highest Academic Degree.");
	str.careerdegree.focus();
	return false;
	}
	if(isblank(str.careerskill.value)){
	alert("You forgot to enter Your Technical Skill.");
	str.careerskill.focus();
	return false;
	}
	if(isblank(str.careerexpricence.value)){
	alert("You forgot to enter Your Brief Working Experience.");
	str.careerexpricence.focus();
	return false;
	}
	if(isblank(str.wordverification.value)){
	alert("You forgot to enter Your Word Verification.");
	str.wordverification.focus();
	return false;
	}
	return true;

}

function requestqotesubmit(str){
	if(isblank(str.reqstqotname.value)){
	alert("You forgot to enter Your Name.");
	str.reqstqotname.focus();
	return false;
	}
	if(isblank(str.reqstqotemail.value)){
	alert("You forgot to enter Your Email.");
	str.reqstqotemail.focus();
	return false;
	}
	if(!remail.test(str.reqstqotemail.value)){
	alert("You forgot to correct Email ID");
	str.reqstqotemail.focus();
	return false;	
	}
	if(isblank(str.reqstqotphone.value)){
	alert("You forgot to enter Your Phone No.");
	str.reqstqotphone.focus();
	return false;
	}
	if(isblank(str.reqstqotcompany.value)){
	alert("You forgot to enter Your Company Name.");
	str.reqstqotcompany.focus();
	return false;
	}
	if(isblank(str.reqstqotcomments.value)){
	alert("You forgot to enter Your Comments.");
	str.reqstqotcomments.focus();
	return false;
	}
	if(isblank(str.wordverification.value)){
	alert("You forgot to enter Word Verification.");
	str.wordverification.focus();
	return false;
	}
	return true;
}

function packageenquirysubmit(str){
	if(isblank(str.reqstqotname.value)){
	alert("You forgot to enter Your Name.");
	str.reqstqotname.focus();
	return false;
	}
	if(isblank(str.reqstqotemail.value)){
	alert("You forgot to enter Your Email.");
	str.reqstqotemail.focus();
	return false;
	}
	if(!remail.test(str.reqstqotemail.value)){
	alert("You forgot to correct Email ID");
	str.reqstqotemail.focus();
	return false;	
	}
	if(isblank(str.reqstqotphone.value)){
	alert("You forgot to enter Your Phone No.");
	str.reqstqotphone.focus();
	return false;
	}
	if(isblank(str.reqstqotcompany.value)){
	alert("You forgot to enter Your Company Name.");
	str.reqstqotcompany.focus();
	return false;
	}
	if(isblank(str.reqstqotcomments.value)){
	alert("You forgot to enter Your Comments.");
	str.reqstqotcomments.focus();
	return false;
	}
	if(isblank(str.wordverification.value)){
	alert("You forgot to enter Word Verification.");
	str.wordverification.focus();
	return false;
	}
	str.act.value="packageenquiry";
	return true;
}

function contactusqotesubmit(str){
	if(isblank(str.reqstqotname.value)){
	alert("You forgot to enter Your Name.");
	str.reqstqotname.focus();
	return false;
	}
	if(isblank(str.reqstqotemail.value)){
	alert("You forgot to enter Your Email.");
	str.reqstqotemail.focus();
	return false;
	}
	if(!remail.test(str.reqstqotemail.value)){
	alert("You forgot to correct Email ID");
	str.reqstqotemail.focus();
	return false;	
	}
	if(isblank(str.reqstqotphone.value)){
	alert("You forgot to enter Your Phone No.");
	str.reqstqotphone.focus();
	return false;
	}
	if(isblank(str.reqstqotcompany.value)){
	alert("You forgot to enter Your Website.");
	str.reqstqotcompany.focus();
	return false;
	}
	if(isblank(str.reqstqotcomments.value)){
	alert("You forgot to enter Services.");
	str.reqstqotcomments.focus();
	return false;
	}
	if(isblank(str.wordverification.value)){
	alert("You forgot to enter Word Verification.");
	str.wordverification.focus();
	return false;
	}
	return true;
}
