function ShowOtherEducation(value){
	if(value=="other"){
		document.getElementById("OtherEducation").style.display = 'block';
	}else{
		document.getElementById("OtherEducation").style.display = 'none';
	}
}

function ShowOtherOccupation(value){
	if(value=="other"){
		document.getElementById("OtherOccupation").style.display = 'block';
	}else{
		document.getElementById("OtherOccupation").style.display = 'none';
	}
}

function ShowOtherIndustry(value){
	if(value=="other"){
		document.getElementById("OtherIndustry").style.display = 'block';
	}else{
		document.getElementById("OtherIndustry").style.display = 'none';
	}
}

function getCities(stateid){
	if(stateid==""){
		document.getElementById("ChangeCity").innerHTML='<select name="city" id="city" class="inputstyle" onBlur="CheckSelectValue(this.name);" onchange="javascript:getPinCode(this.value);"><option value="">--Select City--</option></select>&nbsp;<img width="16" height="16" name="city" src="images/blank.gif" alt="">';
		document.getElementById("ChangeArea").innerHTML='<select name="area" id="area" class="inputstyle" onBlur="CheckSelectValue(this.name);" onchange="javascript:getPinCode(this.value);"><option value="">--Select Area--</option></select>&nbsp;<img width="16" height="16" name="area" src="images/blank.gif" alt="">';
		document.getElementById("OtherCity").style.display = 'none';
		document.getElementById("OtherArea").style.display = 'none';
		document.getElementById("ChangePinCode").style.display = 'none';
		document.getElementById("OtherPinCode").style.display = 'none';
	}else{
		var url = "GetPhoneModels.php?stateid="+stateid;
		httpObj.open("GET",url,true);
		httpObj.onreadystatechange = function(){
			if(httpObj.readyState==4){
				var strContent=httpObj.responseText;
				document.getElementById("ChangeCity").innerHTML=strContent;
				document.getElementById("ChangeArea").innerHTML='<select name="area" id="area" class="inputstyle" onBlur="CheckSelectValue(this.name);"><option value="">--Select Area--</option></select>';
				document.getElementById("OtherCity").style.display = 'none';
				document.getElementById("OtherArea").style.display = 'none';
				document.getElementById("ChangePinCode").style.display = 'none';
				document.getElementById("OtherPinCode").style.display = 'none';
			}	
		};
		httpObj.send(null);
	}
}


function getArea(cityid){
	if(cityid==""){
		document.getElementById("ChangeArea").innerHTML='<select name="area" id="area" class="inputstyle" onfocus="CheckSelectValue(this.name);"><option value="">--Select Area--</option></select>&nbsp;<img width="16" height="16" name="area" src="images/blank.gif" alt="">';
		document.getElementById("OtherCity").style.display = 'none';
		document.getElementById("OtherArea").style.display = 'none';
		document.getElementById("ChangePinCode").style.display = 'none';
		document.getElementById("OtherPinCode").style.display = 'none';
	}else if(cityid=="other"){
		document.getElementById("ChangeArea").innerHTML='<input type="text" class="inputstyle" name="other_area" id="other_area" style="width:195;" maxlength="50" onBlur="CheckInputValue1(this.name,\'ErrorMessage3\');"/>&nbsp;<img width="16" height="16" name="other_area" src="images/blank.gif" alt="">';
		document.getElementById("OtherCity").style.display = 'block';
		document.getElementById("OtherArea").style.display = 'none';                                                                                                              
		document.getElementById("ChangePinCode").style.display = 'none';
		document.getElementById("OtherPinCode").style.display = 'block';
	}else{
		var url = "GetPhoneModels.php?cityid="+cityid;
		httpObj.open("GET",url,true);
		httpObj.onreadystatechange = function(){
			if(httpObj.readyState==4){
				var strContent=httpObj.responseText;
				document.getElementById("ChangeArea").innerHTML=strContent;
				document.getElementById("OtherCity").style.display = 'none';
				document.getElementById("OtherArea").style.display = 'none';
				document.getElementById("ChangePinCode").style.display = 'none'; 
				document.getElementById("OtherPinCode").style.display = 'none';
			}	
		};
		httpObj.send(null);
	}
}

function getPinCode(areaid){
	if(areaid==""){
		document.getElementById("OtherArea").style.display = 'none';
		document.getElementById("ChangePinCode").style.display = 'none'; 
		document.getElementById("OtherPinCode").style.display = 'none';
	}else if(areaid=="other"){
		document.getElementById("OtherArea").style.display = 'block';
		document.getElementById("ChangePinCode").style.display = 'none';
		document.getElementById("OtherPinCode").style.display = 'block';
	}else{
		var url = "GetPhoneModels.php?areaid="+areaid;
		httpObj.open("GET",url,true);
		httpObj.onreadystatechange = function(){
			if(httpObj.readyState==4){
				var strContent=httpObj.responseText;
				//var strContent=httpObj.responseText;
				document.getElementById("OtherArea").style.display = 'none';
				document.getElementById("OtherPinCode").style.display = 'none';
				document.getElementById("ChangePinCode").style.display = 'block'; 
				document.getElementById("ChangePinCode").innerHTML=strContent; 
			}	
		};
		httpObj.send(null);
	}
}



function getCurrentCities(stateid){
	if(stateid==""){
		document.getElementById("CurrentChangeCity").innerHTML='<select name="c_city" id="c_city" class="inputstyle" onBlur="CheckSelectValue(this.name);"><option value="">--Select City--</option></select>&nbsp;<img width="16" height="16" name="c_city" src="images/blank.gif" alt="">';
		document.getElementById("CurrentChangeArea").innerHTML='<select name="c_area" id="c_area" class="inputstyle" onBlur="CheckSelectValue(this.name);"><option value="">--Select Area--</option></select>&nbsp;<img width="16" height="16" name="c_area" src="images/blank.gif" alt="">';
		document.getElementById("CurrentOtherCity").style.display = 'none';
		document.getElementById("CurrentOtherArea").style.display = 'none';
		document.getElementById("CurrentChangePinCode").style.display = 'none';
		document.getElementById("CurrentOtherPinCode").style.display = 'none';
	}else{
		var url = "GetPhoneModels.php?currentstateid="+stateid;
		httpObj.open("GET",url,true);
		httpObj.onreadystatechange = function(){
			if(httpObj.readyState==4){
				var strContent=httpObj.responseText;
				document.getElementById("CurrentChangeCity").innerHTML=strContent;
				document.getElementById("CurrentChangeArea").innerHTML='<select name="c_area" id="c_area" class="inputstyle" onBlur="CheckSelectValue(this.name);"><option value="">--Select Area--</option></select>';
				document.getElementById("CurrentOtherCity").style.display = 'none';
				document.getElementById("CurrentOtherArea").style.display = 'none';
				document.getElementById("CurrentChangePinCode").style.display = 'none';
				document.getElementById("CurrentOtherPinCode").style.display = 'none';
			}	
		};
		httpObj.send(null);
	}
}

function getCurrentArea(cityid){
	if(cityid==""){
		document.getElementById("CurrentChangeArea").innerHTML='<select name="c_area" id="c_area" class="inputstyle" onBlur="CheckSelectValue(this.name);"><option value="">--Select Area--</option></select>&nbsp;<img width="16" height="16" name="c_area" src="images/blank.gif" alt="">';
		document.getElementById("CurrentOtherCity").style.display = 'none';
		document.getElementById("CurrentOtherArea").style.display = 'none';
		document.getElementById("CurrentChangePinCode").style.display = 'none';
		document.getElementById("CurrentOtherPinCode").style.display = 'none';
	}else if(cityid=="other"){
		document.getElementById("CurrentChangeArea").innerHTML='<input type="text" class="inputstyle" name="c_other_area" id="c_other_area" maxlength="50" onBlur="CheckInputValue1(this.name,\'ErrorMessage3\');"/>&nbsp;<img width="16" height="16" name="c_other_area" src="images/blank.gif" alt="">';
		document.getElementById("CurrentOtherCity").style.display = 'block';
		document.getElementById("CurrentOtherArea").style.display = 'none';                                                             document.getElementById("CurrentChangePinCode").style.display = 'none';
		document.getElementById("CurrentOtherPinCode").style.display = 'block';
	}else{
		var url = "GetPhoneModels.php?currentcityid="+cityid;
		httpObj.open("GET",url,true);
		httpObj.onreadystatechange = function(){
			if(httpObj.readyState==4){
				var strContent=httpObj.responseText;
				document.getElementById("CurrentChangeArea").innerHTML=strContent;
				document.getElementById("CurrentOtherCity").style.display = 'none';
				document.getElementById("CurrentOtherArea").style.display = 'none';
				document.getElementById("CurrentChangePinCode").style.display = 'none'; 
				document.getElementById("CurrentOtherPinCode").style.display = 'none';
			}	
		};
		httpObj.send(null);
	}
}

function getCurrentPinCode(areaid){
	if(areaid==""){
		document.getElementById("CurrentOtherArea").style.display = 'none';
		document.getElementById("CurrentChangePinCode").style.display = 'none'; 
		document.getElementById("CurrentOtherPinCode").style.display = 'none';
	}else if(areaid=="other"){
		document.getElementById("CurrentOtherArea").style.display = 'block';
		document.getElementById("CurrentChangePinCode").style.display = 'none';
		document.getElementById("CurrentOtherPinCode").style.display = 'block';
	}else{
		var url = "GetPhoneModels.php?currentareaid="+areaid;
		httpObj.open("GET",url,true);
		httpObj.onreadystatechange = function(){
			if(httpObj.readyState==4){
				var strContent=httpObj.responseText;
				document.getElementById("CurrentOtherArea").style.display = 'none';
				document.getElementById("CurrentOtherPinCode").style.display = 'none';
				document.getElementById("CurrentChangePinCode").style.display = 'block'; 
				document.getElementById("CurrentChangePinCode").innerHTML=strContent; 
			}	
		};
		httpObj.send(null);
	}
}