

/*
-- ------ Zone ------ --
*/
function Zone(){}
//-- ------ #Parameters ------ --

Zone.prototype.sAjax_0=new netsSingleAjax();
Zone.prototype.sName="mainZone";
Zone.prototype.sURL="Plus/Common/Nets/Data_Zone_HeadChoose.php";
Zone.prototype.sTabCount=2;
Zone.prototype.sLoaded=0;
Zone.prototype.sFlag="Groupsale";


//-- ------ #Methods ------ --
//-- ### --
Zone.prototype.OnShow=function(pType){
	if(pType==0){
		//#Open
		document.getElementById(this.sName+"_Button").className="ZoneChoose_1_Focus";
		document.getElementById(this.sName+"_Link").className="Link1 FWhite1";
		document.getElementById(this.sName+"_Box").className="ZoneChoose_2_Box";
		
		this.OnOpenbox();
	}else{
		//#Close
		document.getElementById(this.sName+"_Button").className="ZoneChoose_1_Blur";
		document.getElementById(this.sName+"_Link").className="Link2 FBlack2";
		document.getElementById(this.sName+"_Box").className=tmpCommon.sysHidden;
	}

	return 0;
}
Zone.prototype.OnTab=function(pIndex){
	var Coun0=0;
	while(this.sTabCount>Coun0){
		document.getElementById("mainZone_TabButton_"+Coun0).className="ZoneChoose_3_Tab1";
		document.getElementById("mainZone_TabBox_"+Coun0).className=tmpCommon.sysHidden;
		Coun0++;
	}
	
	document.getElementById("mainZone_TabButton_"+pIndex).className="ZoneChoose_3_Tab0";
	document.getElementById("mainZone_TabBox_"+pIndex).className="ZoneChoose_4_Panel";
	return 0;
}
Zone.prototype.OnTab_Home=function(pIndex){
	var Coun0=0;
	while(this.sTabCount>Coun0){
		document.getElementById("mainZone_TabButton_"+Coun0).className="ZoneH_Title_6";
		document.getElementById("mainZone_TabBox_"+Coun0).className=tmpCommon.sysHidden;
		Coun0++;
	}
	
	document.getElementById("mainZone_TabButton_"+pIndex).className="ZoneH_Title_5";
	document.getElementById("mainZone_TabBox_"+pIndex).className="ZoneH_1";
	return 0;
}
Zone.prototype.OnOpenbox=function(pType){
	if(this.sLoaded==0){
		tmpURL=tmpCommon.sysRoot+this.sURL+"?DFlag="+this.sFlag+"&CODE="+Math.random();
		this.sAjax_0.sFlag="Data";
		this.sAjax_0.sPanel=this.sName+"_Box";
		this.sAjax_0.sURL=tmpURL;
		this.sAjax_0.sendRequestSp(tmpURL,"zone_OnOpenbox_Callback();");
		//window.open(tmpURL,"_blank");
	}

	return 0;
}
function zone_OnOpenbox_Callback(){
	var tmpFlag=tmpZone.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpZone.sAjax_0.sPanel);
	var tmpURL=tmpZone.sAjax_0.sURL;
	var tmpHttpRequests=tmpZone.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			tmpPanel.innerHTML=tmpData;
			tmpZone.sLoaded=1;
	    	tmpFrames.showLoading(1);
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
		tmpPanel.innerHTML=tmpCommon.sysLoading_Ajax;
	}
}


