function fnSwitchDiv(objPic,objDiv)
{
	if(objDiv.style.display=="")
	{
		objPic.src="../../images/Pic/open_w.gif";
		objDiv.style.display="none";
	}
	else
	{
		objPic.src="../../images/Pic/close_w.gif";
		objDiv.style.display=""			
	}
}

function checktab()
{
	if(event.srcElement.selectedIndex>=0)
	{
		event.srcElement.createSeparatorAt(1);
		event.srcElement.getItem(1).remove();
	}
}

function fnSMD(strUrl,mWidth,mHeight){
	var winHeight = mHeight;
	var winWidth = mWidth;
	var Left = (screen.availWidth-winWidth )/2;
	var Top = (screen.availHeight-winHeight )/2;
	window.showModalDialog(strUrl,window,"dialogwidth:"+winWidth +"px;dialogheight:"+winHeight+"px;scroll:no;status:no;help:no");
	//window.open('app_right_add.aspx','填加组',"width="+winWidth +",height="+winHeight+",resizable=no,top="+Top+",left="+Left)
}

function fnWinOpen(strUrl,mWidth,mHeight){
	var winHeight = mHeight;
	var winWidth = mWidth;
	var Left = (screen.availWidth-winWidth )/2;
	var Top = (screen.availHeight-winHeight )/2;
	window.open(strUrl,'WinOpen',"width="+winWidth +",height="+winHeight+",resizable=no,top="+Top+",left="+Left);
}

function fnWinOpenR(strUrl,mWidth,mHeight){
	var winHeight = mHeight;
	var winWidth = mWidth;
	var Left = (screen.availWidth-winWidth )/2;
	var Top = (screen.availHeight-winHeight )/2;
	window.open(strUrl,'WinOpen',"width="+winWidth +",height="+winHeight+",resizable=no,scrollbars=yes,top="+Top+",left="+Left);
}

function goToRUL(URL,Target){
	if(Target==null) Target = "frmBotton";
	if(URL!="")
	{
		window.frames(Target).location = URL;
	}
}

function a(x,y,color){
	document.write("<img border='0' style='position: absolute; left: "+(x+2)+"; top: "+(y+2)+";background-color: "+color+"' src='px.gif' width=1 height=1>")
}

function line(x1,y1,x2,y2,color){
	var tmp
	alert("x1="+x1+"\ny1="+y1+"\nx2="+x2+"\ny2="+y2);
	if(x1>=x2){
		tmp=x1;
		x1=x2;
		x2=tmp;
		tmp=y1;
		y1=y2;
		y2=tmp;
	}
	for(var i=x1;i<=x2;i++){
		x = i;
		y = (y2 - y1) / (x2 - x1) * (x - x1) + y1;
		a(x,y,color);
	}
}

function TdShow(imgObj,tdName){
	var tdObj = document.getElementById(tdName);
	temp = tdObj.style.display;
	if(temp=="none"){
		tdObj.style.display = "";
		imgObj.src = "/SchoolManage/WebSchoolManage/images/pic/close_w.gif";
	}
	else{
		tdObj.style.display = "none";
		imgObj.src = "/SchoolManage/WebSchoolManage/images/pic/open_w.gif";
	}
}

function Del(){
    if(!confirm('您正在删除您所勾选的所有项目。\n您确定吗？')){
		//theForm.onsubmit() = return false;
		
	}
	else{
	    alert("22");
	    //theForm.onsubmit = return true;
	}
	
}

function BuySellZD(strId,houseSort,strState){
     window.frames("frmZD").location = "FrmPubZD.aspx?id="+strId+"&houseSort="+houseSort+"&state="+strState;
}

