/*var xmlHttp

function changeCommunity(str)
{ 

	
	if(str!=2&&str!=5&&str!=7&&str!=9)
	{
		
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="select.php"
		url=url+"?q="+str
		xmlHttp.onreadystatechange=stateChanged 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
		
	}
	else
	{
		document.MatriForm.community.disabled=true;
		document.MatriForm.caste.disabled=true;
	}
		
}
function stateChanged() 
{ 	
	
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 	
		 document.getElementById('change').innerHTML=xmlHttp.responseText;
		 
	 } 
}
function availability_chk(str)
{ 
	 	xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="availability_chk.php"
		url=url+"?q="+str
		xmlHttp.onreadystatechange=stateChanged15
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
			
}
function stateChanged15() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("available").innerHTML=xmlHttp.responseText;
		 
	 } 
}
function changeCaste(str)
{ 
	
	if(str!=2&&str!=5&&str!=7&&str!=9)
	{
	 	xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="caste.php"
		url=url+"?q="+str
		xmlHttp.onreadystatechange=stateChanged16
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
	}
	else
	{
		document.MatriForm.caste.disabled=true;
	}
			
}
function stateChanged16() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("caste1").innerHTML=xmlHttp.responseText;
	 } 
}
function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	 {
		 // Firefox, Opera 8.0+, Safari
		 xmlHttp=new XMLHttpRequest();
	 }
	catch (e)
	 {
		 //Internet Explorer
		 try
		  {
			  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		  }
		 catch (e)
		  {
			  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
	 }
	return xmlHttp;
}
var x;
function edit_pro()
{
		x=document.getElementById("edit").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit.php"
		xmlHttp.onreadystatechange=stateChanged1 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
  	
}

function stateChanged1() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("edit").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit1").innerHTML="<a class='m_profile_edit' onClick='return save_pro()'>[ Save ]</a>";
		
	 } 
}
function save_pro()
{
		var p=document.getElementById('txtPC').value;
		var id=document.getElementById('id').value;
		var about=document.getElementById('txtmsg').value;
		var partner=document.getElementById('txtpart').value;
	
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save.php"
		url=url+"?q="+p+"&a="+about+"&id="+id+"&par="+partner
		xmlHttp.onreadystatechange=stateChanged2 
		xmlHttp.open("GET",url,false)
		
		xmlHttp.send(null)
	
		
}
function stateChanged2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("edit").innerHTML=x;
		//  document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit1").innerHTML="<a onClick='return edit_pro(); class='m_profile_edit'>[ Edit ]</a>";
		 location.href="edit_profile.php";

	 } 
}
function edit_basic()
{
		x=document.getElementById("basic").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit_basic.php"
		xmlHttp.onreadystatechange=stateChanged3 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}

function stateChanged3() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("basic").innerHTML=xmlHttp.responseText;
		 document.getElementById("basic1").innerHTML="<a onClick='return save_basic();' class='m_profile_edit'>[ Save ]</a>";
		 
	 } 
}
function save_basic()
{
		
		var fName=document.getElementById('fName').value;

		var lName=document.getElementById('lName').value;
		if(document.getElementById('txtGender').checked==false)
				gender='Female';
		else
				gender='Male';
		var age=document.getElementById('age').value;
		var day=document.getElementById('dobDay').value;
		var month=document.getElementById('dobMonth').value;
		var year=document.getElementById('dobYear').value;
		var pbirth=document.getElementById('txtPb').value;
		var mstatus=document.getElementById('MARITAL_STATUS').value;
		var time_of_birth=document.getElementById('time_of_birth').value;
		var id=document.getElementById('id').value;
		
				xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save_basic.php"
		url=url+"?fName="+fName+"&lName="+lName+"&id="+id+"&gender="+gender+"&age="+age+"&day="+day+"&month="+month+"&year="+year+"&pbirth="+pbirth+"&mstatus="+mstatus+"&time_of_birth="+time_of_birth;
		xmlHttp.onreadystatechange=stateChanged4 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}
function stateChanged4() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("basic").innerHTML=x;
		 // document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("basic1").innerHTML="<a onClick='return edit_basic();' class='m_profile_edit'>[ Edit ]</a>";
		  location.href="edit_profile.php";
	 } 
}
var e;
function edit_ed()
{
		e=document.getElementById("edit_ed").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit_ed.php"
		xmlHttp.onreadystatechange=stateChanged5 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}

function stateChanged5() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("edit_ed").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_ed1").innerHTML="<a onClick='return save_ed()' class='m_profile_edit'>[ Save ]</a>";
	 } 
}
function save_ed()
{
		var ed=document.getElementById('txtEdu').value;
		var id=document.getElementById('id').value;
		var occ=document.getElementById('txtOccu').value;
		var inc=document.getElementById('txtIncome').value;		
		var Education_detail=document.getElementById('Education_detail').value;
		var occ_txt=document.getElementById('occ_txt').value;
		var Annu_txt=document.getElementById('Annu_txt').value;

		
		
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save_ed.php"
		url=url+"?ed="+ed+"&occ="+occ+"&inc="+inc+"&id="+id+"&Education_detail="+Education_detail+"&occ_txt="+occ_txt+"&Annu_txt="+Annu_txt
		xmlHttp.onreadystatechange=stateChanged6 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}
function stateChanged6() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("edit_ed").innerHTML=e;
		//  document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_ed1").innerHTML="<a onClick='return edit_ed();' class='m_profile_edit'> [ Edit ] </a>";
		  location.href="edit_profile.php";
	 } 
}
function edit_socio()
{
		x=document.getElementById("edit_socio").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit_socio.php"
		xmlHttp.onreadystatechange=stateChanged7 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}

function stateChanged7() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("edit_socio").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_socio1").innerHTML="<a onClick='return save_socio()' class='m_profile_edit'>[ Save ] </a>";
	 } 
}
function save_socio()
{
		var reg=document.getElementById('religion').value;
		
		var id=document.getElementById('id').value;
		var caste=document.getElementById('caste').value;
		
		
		var gothra=document.getElementById('txtGothra').value;
		
		var nak=document.getElementById('txtStar').value;
		
		var moon=document.getElementById('txtMoon').value;

		var horo=document.getElementById('txtHorosMatch').value;
		var community=document.getElementById('community').value;
		
				
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save_socio.php"
		url=url+"?reg="+reg+"&caste="+caste+"&gothra="+gothra+"&id="+id+"&nak="+nak+"&moon="+moon+"&horo="+horo+"&community="+community
		xmlHttp.onreadystatechange=stateChanged8 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}
function stateChanged8() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("edit_socio").innerHTML=x;
		//  document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_socio1").innerHTML="<a onClick='return edit_socio();' class='m_profile_edit'>[ Edit ]</a>";
		  location.href="edit_profile.php";
	 } 
}
function edit_phy()
{
		x=document.getElementById("edit_phy").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit_phy.php"
		xmlHttp.onreadystatechange=stateChanged9 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}

function stateChanged9() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("edit_phy").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_phy1").innerHTML="<a onClick='return save_phy()' class='m_profile_edit'>[ Save ]</a>";
		 
	 } 
}
function save_phy()
{
		var height=document.getElementById('txtHeight').value;
		var weight=document.getElementById('txtWeight').value;
		var blood_group=document.getElementById('blood_group').value;
		var body_type=document.getElementById('txtBody').value;
		var com=document.getElementById('txtComplexion').value;
		var diet=document.getElementById('txtDiet').value;
		var smoke=document.getElementById('txtSmoke').value;
		var drink=document.getElementById('txtDrink').value;
		var id=document.getElementById('id').value;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save_phy.php"
		url=url+"?height="+height+"&weight="+weight+"&blood_group="+blood_group+"&id="+id+"&body_type="+body_type+"&com="+com+"&diet="+diet+"&smoke="+smoke+"&drink="+drink
		xmlHttp.onreadystatechange=stateChanged10 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}
function stateChanged10() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("edit_phy").innerHTML=x;
		//  document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_phy1").innerHTML="<a onClick='return edit_phy();' class='m_profile_edit'>[ Edit ]</a>";
		  location.href="edit_profile.php";
	 } 
}
function edit_family()
{
		x=document.getElementById("edit_family").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit_family.php"
		xmlHttp.onreadystatechange=stateChanged11 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}

function stateChanged11() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("edit_family").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_family1").innerHTML="<a onClick='return save_family()' class='m_profile_edit'>[ Save ]</a>";
	 } 
}
function save_family()
{
		var det=document.getElementById('txtFD').value;
		var type=document.getElementById('txtFT').value;
		var value=document.getElementById('txtFV').value;
		var status=document.getElementById('txtFS').value;
		var fOccu=document.getElementById('fOccu').value;
		var mOccu=document.getElementById('mOccu').value;
		var txtFS1=document.getElementById('txtFS1').value;
		var txtFS2=document.getElementById('txtFS2').value;
		var id=document.getElementById('id').value;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save_family.php"
		url=url+"?det="+det+"&type="+type+"&value="+value+"&id="+id+"&status="+status+"&fOccu="+fOccu+"&mOccu="+mOccu+"&txtFS1="+txtFS1+"&txtFS2="+txtFS2
		xmlHttp.onreadystatechange=stateChanged12 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}
function stateChanged12() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("edit_family").innerHTML=x;
		//  document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_family1").innerHTML="<a onClick='return edit_family();' class='m_profile_edit'>[ Edit ]</a>";
		  location.href="edit_profile.php";
	 } 
}
function edit_hob()
{
		x=document.getElementById("edit_hob").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit_hob.php"
		xmlHttp.onreadystatechange=stateChanged13 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}

function stateChanged13() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("edit_hob").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_hob1").innerHTML="<a onClick='return save_hob()' class='m_profile_edit'>[ Save ]</a>";
	 } 
}
function save_hob()
{
		var hob=document.getElementById('txtHobby').value;
		var int=document.getElementById('txtInterest').value;
		var id=document.getElementById('id').value;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save_hob.php"
		url=url+"?hob="+hob+"&int="+int+"&id="+id
		xmlHttp.onreadystatechange=stateChanged14 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}
function stateChanged14() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("edit_hob").innerHTML=x;
		//  document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_hob1").innerHTML="<a onClick='return edit_hob();' class='m_profile_edit'>[ Edit ]</a>";
		  location.href="edit_profile.php";
	 } 
}

function edit_part()
{
		x=document.getElementById("edit_part").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit_part.php"
		xmlHttp.onreadystatechange=stateChanged17
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}

function stateChanged17() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("edit_part").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_part1").innerHTML="<a onClick='return save_part();' class='m_profile_edit'>[ Save ]</a>";
	 } 
}
function save_part()
{
		
		var min_age=document.getElementById('min_age').value;
		var max_age=document.getElementById('max_age').value;
		var looking=document.getElementById('txtLooking').value;
		var txtPPE=document.getElementById('txtPPE').value;
		var country=document.getElementById('txtPcountry').value;
		var height=document.getElementById('txtPHeight').value;	
		var reg=document.getElementById('religion').value;
		var community=document.getElementById('community').value;
		var caste=document.getElementById('caste').value;
		var res_status=document.getElementById('txtPReS').value;
		var com=document.getElementById('txtComplexion').value;
		var height1=document.getElementById('txtPHeight1').value;		
		var id=document.getElementById('id').value;
		
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save_part.php"
		url=url+"?min_age="+min_age+"&max_age="+max_age+"&looking="+looking+"&txtPPE="+txtPPE+"&country="+country+"&height="+height+"&reg="+reg+"&caste="+caste+"&id="+id+"&res_status="+res_status+"&com="+com+"&community="+community+"&height1="+height1
		
		xmlHttp.onreadystatechange=stateChanged18 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}
function stateChanged18() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("edit_part").innerHTML=x;
		  document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_part1").innerHTML="<a onClick='return edit_part();' class='m_profile_edit'>[ Edit ]</a>";
		 location.href="edit_profile.php";
		 
	 } 
}
function changePhoto(str)
{ 
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="del_photo.php"
		url=url+"?q="+str
		xmlHttp.onreadystatechange=stateChanged19 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
	
		
}
function stateChanged19() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("del").innerHTML=xmlHttp.responseText;
	 } 
}



//Location

function edit_loc()
{
		e=document.getElementById("edit").innerHTML;
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="edit_loc.php"
		xmlHttp.onreadystatechange=stateChanged85 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}

function stateChanged85() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 
		 document.getElementById("edit_loc").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_loc1").innerHTML="<a onClick='return save_loc()' class='m_profile_edit'>[ Save ]</a>";
	 } 
}
function save_loc()
{
		var txtCountry=document.getElementById('txtCountry').value;
		var id=document.getElementById('id').value;
		var ResidingState=document.getElementById('ResidingState').value;
		var City=document.getElementById('City').value;		
	

		
		
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="save_loc.php"
		url=url+"?txtCountry="+txtCountry+"&ResidingState="+ResidingState+"&City="+City+"&id="+id
		xmlHttp.onreadystatechange=stateChanged6 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
}
function stateChanged6() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 		
		 document.getElementById("edit_loc").innerHTML=e;
		//  document.getElementById("res").innerHTML=xmlHttp.responseText;
		 document.getElementById("edit_loc1").innerHTML="<a onClick='return edit_loc();' class='m_profile_edit'> [ Edit ] </a>";
		  location.href="edit_profile.php";
	 } 
}*/


//cites
var xmlHttp

function changeCity(str)
{ 

		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		 {
			 alert ("Browser does not support HTTP Request")
			 return
	 	}
		var url="city.php"
		url=url+"?q="+str
		xmlHttp.onreadystatechange=stateChanged234 
		xmlHttp.open("GET",url,false)
		xmlHttp.send(null)
		

		
}
function stateChanged234() 
{ 	
	
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 	
		 document.getElementById('cites').innerHTML=xmlHttp.responseText;
		 
	 } 
}
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
