/*
    功能：
        遮挡当前页面

    用法：
        调用curtain()即可

    注意：
        
*/

var isIE5=false;
var isIE6=true;
var body=document.body;
String.prototype.inc=function(k1,k2){return k2==null?this.indexOf(k1)>-1?true:false:(k2+this+k2).indexOf(k2+k1+k2)>-1?true:false}

function curtain(){
	oo("bxDlg_bg").style.height=body.clientHeight

	dlg_fadeBg(0)   

	ol=document.getElementsByTagName("select")
	for(i=0;i<ol.length;i++){
		hide(ol[i])
	}
	
	show("bxDlg_bg")
}

function oo(obj){
	return typeof(obj)!="string"?obj:(isIE5?document.all(obj):document.getElementById(obj))
}

function show(obj){
	oo(obj).style.visibility=""
}
function hide(obj){
	oo(obj).style.visibility="hidden"
}

function dlg_fadeBg(index){
	if(isIE6){
		oo("bxDlg_bg").innerHTML="<div id=bxDlg_bg1 style=height:100%;background:black;filter:alpha(opacity="+index+")>&nbsp;</div>"
		if(index<15)
			window.setTimeout("dlg_fadeBg("+(index+3)+")",10)
	}
	else{
		if(index==0)
			oo("bxDlg_bg1").style.visibility=oo("bxDlg_bg2").style.visibility=oo("bxDlg_bg3").style.visibility=oo("bxDlg_bg4").style.visibility=oo("bxDlg_bg5").style.visibility="hidden"
		else
			oo("bxDlg_bg"+index).style.visibility=""
		if(index<5)
			window.setTimeout("dlg_fadeBg("+(index+1)+")",10)
	}
}



with (document) {
  write("<span id=bxDlg_bg align=center oncontextmenu=\"return false\" onselectstart=\"return false\" style=\"visibility:hidden;width:100%;position:absolute;left:0;top:0\"></span>");
}