function checkEmailId($strEmailId) {
var $str;
ajax1.requestFile = 'checkEmailId.php?emailid='+$strEmailId;			
ajax1.onLoading = function() { //$str="Loading..."; 
//$strStyle="block"; 
//document.getElementById("divDisplayEmailIdError").style.display=$strStyle;
//document.getElementById("divDisplayEmailIdError").innerHTML = $str
}		
ajax1.onCompletion = function() { 
$str="";
if(ajax1.response>=1) { $str = "<img src=\"http://anytimematrimony.com/pics/warning.png\" border=\"0\" align=\"absmiddle\" /> Sorry, Email ID Already Exists, Kindly change the Email ID."; $strStyle="block";  
//For Home page quick registration div tag
//alert("Sorry, Email ID Already Exists, Kindly change the Email ID.");
document.getElementById("divDisplayError").style.display = "block";
document.getElementById("divDisplayMsg").style.display = "none";
}
if(ajax1.response==0) { $str = ""; $strStyle="none"; 
//For Home page quick registration div tag
document.getElementById("divDisplayMsg").style.display = "block";
document.getElementById("divDisplayError").style.display = "none";
}
document.getElementById("divDisplayEmailIdError").style.display=$strStyle;
document.getElementById("divDisplayEmailIdError").innerHTML = $str;
}
ajax1.runAJAX();	}	

function get_castes($id,obj) {
var $str;
//alert($id);
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=b&startvalue=Select';
//alert(ajax1.requestFile);
ajax1.onLoading = function() {  document.getElementById("divCaste").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:235px;\"><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}	
function get_castes_agents($id,obj) {
var $str;
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=ba&startvalue=Select';			
ajax1.onLoading = function() {  document.getElementById("divCaste").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:222px;\"><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}	

function get_castessimplsearch($id,obj) {
var $str;
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=bs&startvalue=Select';			
ajax1.onLoading = function() {  document.getElementById("divCaste").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:235px;\"><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}	
function get_castesh($id,obj) {
var $str;
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=h&startvalue=Select';
ajax1.onLoading = function() {  document.getElementById("divCaste").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:189px;\"><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() {eval(ajax1.response);}
ajax1.runAJAX();	
}	

function get_castes1($id,obj) {
var $str;
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=m&startvalue=Select';
//alert(ajax1.requestFile);
ajax1.onLoading = function() {  document.getElementById("divCaste").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:235px;height:40px;\" multiple><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}	
function get_castes2($id,obj) {
//alert($id);
var $str;
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=e&startvalue=Select';
//alert(ajax1.requestFile);
ajax1.onLoading = function() {  document.getElementById("divCaste").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:235px;height:40px;\" multiple><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}

function get_editCaste($id,obj) {
var $str;
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=PE&startvalue=Select';
ajax1.onLoading = function() { document.getElementById("divCasteEdit").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:222px;\"><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}

function get_castes3($id,obj) {
var $str;
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=s&startvalue=Select';			
ajax1.onLoading = function() {  document.getElementById("divCaste").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:235px;height:40px;\" multiple><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}
function get_castes4($id,obj) {
//alert($id);
var $str;
ajax1.requestFile = 'caste_searchajax.php?casteid='+$id+'&opt=s';	
var y = document.getElementById("caste[]");
var newOpt;
ajax1.onLoading = function() {  newOpt = new Option('Loading...',0);y.options[0] = newOpt;
//document.getElementById("divCaste").innerHTML ="<select name=\"caste\" class=\"text_box_border\" id=\"caste\" style=\"width:235px;height:40px;\" multiple><option>Loading..</option></select>"; 
}		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}


function get_casteinquickSearch($id,obj) {
var $str;
ajax1.requestFile = 'caste.php?casteid='+$id+'&opt=q&startvalue=Select';			
ajax1.onLoading = function() {  document.getElementById("divCasteqSearch").innerHTML ="<select name=\"casteqsearch\" class=\"text_box_border\" id=\"casteqsearch\" style=\"width:125px;height:40px;\"><option>Loading..</option></select>"; }		
ajax1.onCompletion = function() { eval(ajax1.response);}
ajax1.runAJAX();	
}


function getCasteValue() {
	//alert(document.getElementById("caste").value);
}
	
/*function changeAgeGender($strGender) { if($strGender=="M") {	$strValue = 21; }	else  {	$strValue = 18; } document.getElementById("txtSAge").value=$strValue;}*/

function changeAgeGender($strGender) { 
	if($strGender=="M") { $strValue = 21; }	else  {	$strValue = 18; } 
	document.getElementById("txtSAge").value=$strValue;  
}

function changeAgeGenderVal($strGender) { 
	if($strGender=="M") { $strValue = 21; }	else  {	$strValue = 18; } 
	document.getElementById("txtSAgeq").value=$strValue;  
}

