/////////////////////////弹出窗口/////////////////////////////////////////
function OpenWindow(sUrl, sWinName, iWidth, iHeight, sPosition)
{
    var sSettings = ",resizable=yes,toolbar=no,menubar=no,location=no";
	OpenWindowEx(sUrl, sWinName, iWidth, iHeight, sSettings, sPosition);
}
function OpenWindow3(sUrl, sWinName, iWidth, iHeight, sPosition)
{
    var sSettings = ",resizable=no,toolbar=no,menubar=no,location=no";
	OpenWindowEx(sUrl, sWinName, iWidth, iHeight, sSettings, sPosition);
}
function OpenWindow2(sUrl, sWinName, iWidth, iHeight, sPosition)
{
    var sSettings = ",resizable=yes,toolbar=no,menubar=no,location=no,scrollbars=yes";
	OpenWindowEx(sUrl, sWinName, iWidth, iHeight, sSettings, sPosition);
}
function OpenWindowMax(sUrl, sWinName)
{
    var sSettings = "left=0,top=0,width=" + (screen.availWidth - 7) + ",height=" + (screen.availHeight - 51) + ",toolbar=no,menubar=no,location=no,status=yes,resizable=yes";
    window.open(sUrl, sWinName, sSettings);
}
function OpenWindowEx(sUrl, sWinName, iWidth, iHeight, sSetting, sPosition)
{
	var sSettings = "width=" + iWidth + ",height=" + iHeight + sSetting;
	switch (sPosition.toLowerCase())
	{
		case "c" :
			sSettings = sSettings + ",left=" + (screen.availWidth - iWidth) / 2 + ",top=" + (screen.availHeight - iHeight) / 2;
			break;
		case "l" :
			sSettings = sSettings + ",left=0,top=" + (screen.availHeight - iHeight) / 2;
			break;
		case "r" :
			sSettings = sSettings + ",left=" + (screen.availWidth - iWidth) + ",top=" + (screen.availHeight - iHeight) / 2;
			break;
		case "t" :
			sSettings = sSettings + ",left=" + (screen.availWidth - iWidth) / 2 + ",top=0";
			break;
		case "b" :
			sSettings = sSettings + ",left=" + (screen.availWidth - iWidth) / 2 + ",top=" + (screen.availHeight - iHeight);
			break;
		case "tl" :
			sSettings = sSettings + ",left=0,top=0";
			break;
	}
	window.open(sUrl, sWinName, sSettings);
}
//////////////////////////属性Div//////////////////////////////////
function SwichPropDiv(DivID)
{
    if (document.all(DivID).style.display == "none")
    {
	    document.all(DivID).style.display = "";
	    document.all("lk_" + DivID).innerText = "[▲]";
	    document.all("lk_" + DivID).title = "隐藏";
	}
    else
    {
	    document.all(DivID).style.display = "none";
	    document.all("lk_" + DivID).innerText = "[▼]";
	    document.all("lk_" + DivID).title = "显示";
    }
}
