
function Main(){}

Main.prototype.sNavigationCount=8;

Main.prototype.Navigation=function(pIndex){
	var Coun0=0;
	while(this.sNavigationCount>Coun0){
		document.getElementById("mainNavigation_"+Coun0).className="Head_6";
		Coun0++;
	}
	document.getElementById("mainNavigation_"+pIndex).className="Head_6_A";
}

Main.prototype.HomeLogin=function(user,org){
    if(user!=''||org!= ''){
        alert("请先退出当前登录");
        return false;
    }
	var tmpElement_0=document.getElementById("mainLogin_Tab");
	if(tmpElement_0.src.indexOf("Ui/m_default/Img/Common/17.jpg")>0){//当前登陆框为个人登录 单击后变成企业登录
	    viableTextCheckOrg();
		tmpElement_0.src="Ui/m_default/Img/Common/18.jpg";
		document.getElementById("mainLogin_1").className="Home_3_1";
		document.getElementById("mainLogin_0").className="DHidden";
	}else{
	    viableTextCheckPer();
		tmpElement_0.src="Ui/m_default/Img/Common/17.jpg";
		document.getElementById("mainLogin_0").className="Home_3_1";
		document.getElementById("mainLogin_1").className="DHidden";
	}
	
}
 
Main.prototype.OtherMenu=function(pHead,pIndex){
	var Coun0=0;
	var tmpElement_0=document.getElementById(pHead+Coun0);
	/*
	while(tmpElement_0!=undefined){
		if(tmpElement_0.className=="ODetail_M_2"){
			tmpElement_0.className="ODetail_M_1";
			tmpElement_0.childNodes[0].className=""
		}else if(tmpElement_0.className=="ODetail_M_1"){
		}else if(tmpElement_0.className=="ODetail_M_3_A"){
			tmpElement_0.className="ODetail_M_3_B";
		}else if(tmpElement_0.className=="ODetail_M_3_B"){
		}
		Coun0++;
		tmpElement_0=document.getElementById(pHead+Coun0);
	}
	*/
	
	tmpElement_0=document.getElementById(pHead+pIndex);
	if(tmpElement_0!=undefined){
		if(tmpElement_0.className=="ODetail_M_2"){
			tmpElement_0.className="ODetail_M_1";
			tmpElement_0.childNodes[0].className=""
		}else if(tmpElement_0.className=="ODetail_M_1"){
			tmpElement_0.className="ODetail_M_2";
			tmpElement_0.childNodes[0].className="ODetail_M_2_A"
		}else if(tmpElement_0.className=="ODetail_M_3_A"){
			tmpElement_0.className="ODetail_M_3_B";
		}else if(tmpElement_0.className=="ODetail_M_3_B"){
			tmpElement_0.className="ODetail_M_3_A";
		}
	}
	
	return 0;
}

Main.prototype.ControlDefault=function(pControl,pDefault,pType){
	if(pType==0){
		if(pControl.value==pDefault){
			pControl.value="";
			pControl.style.color="#333333";
		}
	}else{
		if(pControl.value==pDefault || pControl.value==""){
			pControl.value=pDefault;
			pControl.style.color="#AAAAAA";
		}
	}
	
	return 0;
}
Main.prototype.FloatBox=function(pControl,pClass,pType){
	if(pType==0){
		pControl.className="FBox_0_B";
		pControl.childNodes[0].className=pClass;
	}else{
		pControl.className="FBox_0_A";
		pControl.childNodes[0].className="DHidden";
	}
	
	return 0;
}
//-- ------ ### ------ --
function ShowBox(pName,pType){
    var topPX=document.documentElement.scrollTop+100;
	var tmpElement1=document.getElementById(pName);
	sysNowShowBox=pName;
	if(pType=="0"){
		if(tmpElement1.className==sysHidden){
			tmpElement1.className="contentBox Box_2";
			var tmpWidth=(document.documentElement.clientWidth-tmpElement1.style.width)/2+document.documentElement.scrollLeft;
			var tmpHeight=(document.documentElement.clientHeight-120)/2+document.documentElement.scrollTop;
			
			tmpWidth=(document.documentElement.clientWidth-800)/2+document.documentElement.scrollLeft;
			tmpElement1.style.top=topPX+sysPx;
			
			tmpElement1.style.left=tmpWidth+sysPx;
			HiddenAllSelect(0);
			HiddenExceptionSelect(1);
			fullBlack(0);
		}
	}else{
		tmpElement1.className=sysHidden;
		fullBlack(1);
	}
}
//
var sysNowBlackType="1";
function fullBlack(pType){
	var tmpElement1=document.getElementById(sysBlackBox);
	if(pType=="0"){
		tmpElement1.className="BlackBox Box_1";
		tmpElement1.style.top="0"+sysPx;
		tmpElement1.style.left="0"+sysPx;
		var tmpClientWidth=0;
		var tmpClientHeight=0;
		if(snetsNavigator.appName=="Opera"){	
			//
			if(parseInt(document.body.clientWidth)>parseInt(document.documentElement.clientWidth)){
				tmpClientWidth=document.body.clientWidth;
			}else{
				tmpClientWidth=document.documentElement.clientWidth;
			}
			if(parseInt(document.body.clientHeight)>parseInt(document.documentElement.clientHeight)){
				tmpClientHeight=document.body.clientHeight;
			}else{
				tmpClientHeight=document.documentElement.clientHeight;
			}
		}else{
			//
			if(parseInt(document.body.clientWidth)>parseInt(document.documentElement.clientWidth)){
				tmpClientWidth=document.body.clientWidth;
			}else{
				tmpClientWidth=document.documentElement.clientWidth;
			}
			if(parseInt(document.body.clientHeight)>parseInt(document.documentElement.clientHeight)){
				tmpClientHeight=document.body.clientHeight;
			}else{
				tmpClientHeight=document.documentElement.clientHeight;
			}
		}
		tmpElement1.style.width=tmpClientWidth+sysPx;
		tmpElement1.style.height=(tmpClientHeight)+sysPx;
		sysNowBlackType="0";
	}else{
		tmpElement1.className=sysHidden;
		sysNowBlackType="1";
		HiddenAllSelect(1);}
}
//
var sysExceptionSelect="";
function HiddenAllSelect(pType){
	var tmpElementAR1=document.getElementsByTagName("Select");
	var Coun;
	var tmpList1=sysExceptionSelect.split(sysSPLIT1);
	//
	Coun=0;
	while(tmpElementAR1.length>Coun){
		//
		var Coun1=0;
		var tmpFlag=0;
		while(tmpList1.length-1>Coun1){
			if(tmpList1[Coun1]==tmpElementAR1[Coun].id){tmpFlag=1;}
			Coun1++;
		}
		//
		if(tmpFlag==0){
			if(parseInt(pType)==0){tmpElementAR1[Coun].style.visibility="hidden";}
			else{tmpElementAR1[Coun].style.visibility="visible";}
		}
		Coun++;
	}
}
//
function HiddenExceptionSelect(pType){
	var tmpElement1;
	var Coun=0;
	var tmpList1=sysExceptionSelect.split(sysSPLIT1);
	//
	while(tmpList1.length-1>Coun){
		tmpElement1=document.getElementById(tmpList1[Coun]);
		if(parseInt(pType)==0){
			tmpElement1.style.visibility="hidden";
		}else{
			tmpElement1.style.visibility="visible";
		}
		Coun++;
	}
}

