﻿var xmlHttp = false;
try{xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");}
catch (e){
	try{xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}
	catch(e2){xmlHttp=false;}
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined'){xmlHttp = new XMLHttpRequest();}

function DelHouse(){
    var id=document.getElementById("delid").value;
	var pwd=document.getElementById("delpwd").value;
	var type=document.getElementById("deltype").value;
	var city=document.getElementById("delcity").value;
	if(id==''||pwd==''){alert("请输入删除密码");}else{
	var url="/delhouse.jsp?id="+id+"&pwd="+pwd+"&type="+type+"&city="+city;
	xmlHttp.open("GET",url,true);
	xmlHttp.onreadystatechange=UpdatePage2;
	xmlHttp.send(null);}
}

function UpdatePage2(){
	var type=document.getElementById("deltype").value;
	if (xmlHttp.readyState==4){
		var response=xmlHttp.responseText;
		if(response=="1"){
			alert("信息删除成功");window.location.href="/"+type;
		}else{
			alert("删除密码错误！");
		}
	}
}

function showorhide(menu1,menu2){
if(menu1!=null){menu1.style.display = 'none';}
if(menu2!=null){menu2.style.display = 'block';}
}