
/*-- ------ #AppPlatform ------ --*/
function AppPlatform(){}
//-- #Parameters --
//#Name
AppPlatform.prototype.sAjax_0=new netsSingleAjax();
AppPlatform.prototype.sNavigationIndex=0;
AppPlatform.prototype.sNavigationCount=6;
AppPlatform.prototype.sNavigationMenuName="mainNavigation_";
AppPlatform.prototype.sNavigationChildMenuName="mainNavigation_Child_";
AppPlatform.prototype.sDetailBoxName="rightBox_";
AppPlatform.prototype.sDetailButtonName="rightButton_";
AppPlatform.prototype.sDiscussBoxName="discussBox_";

AppPlatform.prototype.sMenuTabCount=3;

//-- #Methods --
//#Navigation
AppPlatform.prototype.OnNavigation=function(pIndex){
	var Coun0=0;
	var tmpElement=document.getElementById("MainNavigation_"+Coun0);
	while(tmpElement!=undefined){
		document.getElementById("MainNavigation_"+Coun0).className="Head_7_3";
		
		Coun0++;
		tmpElement=document.getElementById("MainNavigation_"+Coun0);
	}
	
	document.getElementById("MainNavigation_"+pIndex).className="Head_7_2";
	return 0;
}

AppPlatform.prototype.MenuTab_Show=function(pIndex){
	var Coun0=0;
	while(this.sMenuTabCount>Coun0){
		document.getElementById("MenuTab_Button_"+Coun0).className="AppPlatfrom_Tab_3";
		document.getElementById("MenuTab_Box_"+Coun0).className=tmpCommon.sysHidden;
		Coun0++;
	}
	
	document.getElementById("MenuTab_Button_"+pIndex).className="AppPlatfrom_Tab_2";
	document.getElementById("MenuTab_Box_"+pIndex).className="";
	return 0;
}
//#Menu
var systemMenuURL="../../../Plus/Common/Nets/Menu.php";
AppPlatform.prototype.Menu_Show=function(pIndex){
	var tmpElement0=document.getElementById("comMenu");
	var tmpElement1=document.getElementById("menuBox");
	var tmpElement2=document.getElementById("HiddenMenu");
	var tmpURL="";
	
	if(tmpElement0.className=="AppPlatfrom_Frame_M_Hidden"){
		tmpElement0.className="AppPlatfrom_Frame_M";
		tmpElement1.className="";
		tmpElement2.className=tmpCommon.sysHidden;

		tmpURL=systemMenuURL+"?ActionType=DMenuState&DMenuState="+0;
	}else{
		tmpElement0.className="AppPlatfrom_Frame_M_Hidden";
		tmpElement1.className=tmpCommon.sysHidden;
		tmpElement2.className="AppPlatfrom_Frame_M_Link";

		tmpURL=systemMenuURL+"?ActionType=DMenuState&DMenuState="+1;
	}
	
	this.sAjax_0.sFlag="Data";
	this.sAjax_0.sPanel="Data";
	this.sAjax_0.sURL=tmpURL;
	this.sAjax_0.sendRequestSp(tmpURL,"appPlatform_MenuShow_Callback();");
	//window.open(tmpURL,"_blank");
	
	return 0;
}
function appPlatform_MenuShow_Callback(){}

AppPlatform.prototype.ChildMenu_Show=function(pIndex){
	var tmpElement0=document.getElementById("MainChildmenu_"+pIndex);
	if(tmpElement0.className==tmpCommon.sysHidden){
		tmpElement0.className="Menu_1_5";
	}else{
		tmpElement0.className=tmpCommon.sysHidden;
	}
	
	return 0;
}

//#ReportDetail
AppPlatform.prototype.ReportDetail_TabShow=function(pIndex){
	var Coun0=0;
	var tmpElement=document.getElementById("detailButton_"+Coun0);
	while(tmpElement!=undefined){
		document.getElementById("detailButton_"+Coun0).className="AppPlatform_Report_1_21";
		document.getElementById("detailBox_"+Coun0).className=tmpCommon.sysHidden;
		
		Coun0++;
		tmpElement=document.getElementById("detailButton_"+Coun0);
	}
	
	document.getElementById("detailButton_"+pIndex).className="AppPlatform_Report_1_22";
	document.getElementById("detailBox_"+pIndex).className="AppPlatform_Report_1_23";
	return 0;
}










AppPlatform.prototype.setDetailBox=function(pIndex){
	Coun0=0;
	while(document.getElementById(this.sDetailButtonName+Coun0)!=undefined){
		document.getElementById(this.sDetailButtonName+Coun0).className="AppPlatform_1_0";
		document.getElementById(this.sDetailBoxName+Coun0).className=tmpCommon.sysHidden;
		Coun0++;
	}
	document.getElementById(this.sDetailButtonName+pIndex).className="AppPlatform_1_1";
	document.getElementById(this.sDetailBoxName+pIndex).className="";
	return 0;
}
AppPlatform.prototype.getDetail=function(pPage,pID){
	this.setDetailBox(1);
	if(pPage==""){
		pPage=tmpCommon.sysPage;
	}
	var tmpURL=pPage+"?ActionType=Detail&Detail="+pID;
	this.sAjax_0.sPanel="rightBox_1";
	this.sAjax_0.sFlag="External_Detail";
	this.sAjax_0.sendRequestSp(tmpURL,"appPlatform_getDetail_callback()");
	//window.open(tmpURL,"_blank");
	
	return 0;
}
function appPlatform_getDetail_callback(){
	var tmpFlag=tmpAppPlatform.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpAppPlatform.sAjax_0.sPanel);
	var tmpURL=tmpAppPlatform.sAjax_0.sURL;
	var tmpHttpRequests=tmpAppPlatform.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;
	    	tmpFrames.showLoading(1);
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
	}
}

AppPlatform.prototype.navigation_setMenu=function(pIndex){
	Coun0=0;
	while(Coun0<this.sNavigationCount){
		document.getElementById(this.sNavigationMenuName+Coun0).className="Head_7";
		Coun0++;
	}
	this.sNavigationIndex=pIndex;
	document.getElementById(this.sNavigationMenuName+pIndex).className="Head_8";
	return 0;
}
AppPlatform.prototype.navigation_showChildMenu=function(pIndex,pType){
	return 0;
	
	Coun0=0;
	while(Coun0<this.sNavigationCount){
		document.getElementById(this.sNavigationChildMenuName+Coun0).className=tmpCommon.sysHidden;
		Coun0++;
	}
	if(pType==0){
		document.getElementById(this.sNavigationMenuName+pIndex).className="Head_8";
		document.getElementById(this.sNavigationChildMenuName+pIndex).className="Head_9";
	}else if(this.sNavigationIndex!=pIndex){
		document.getElementById(this.sNavigationMenuName+pIndex).className="Head_7";
	}
	return 0;
}
AppPlatform.prototype.showDiscuss=function(pURL,pIndex){
	if(document.getElementById(this.sDiscussBoxName+pIndex+"_Box").className==tmpCommon.sysHidden){
		document.getElementById(this.sDiscussBoxName+pIndex+"_Button").innerHTML="- 收起评论";
		document.getElementById(this.sDiscussBoxName+pIndex+"_Box").className="AppPlatform_3_0_1";
		document.getElementById(this.sDiscussBoxName+pIndex+"_Box").childNodes[0].src=pURL;
	}else{
		document.getElementById(this.sDiscussBoxName+pIndex+"_Button").innerHTML="+ 评论";
		document.getElementById(this.sDiscussBoxName+pIndex+"_Box").className=tmpCommon.sysHidden;
		document.getElementById(this.sDiscussBoxName+pIndex+"_Box").childNodes[0].src="";
	}
	return 0;
}

//-- ------ #Instanct ------ --
var tmpAppPlatform=new AppPlatform();


