
/*-- ------ #Cms ------ --*/
function Cms(){}
//-- #Parameters --
//#Name
Cms.prototype.sAjax_0=new netsSingleAjax();

Cms.prototype.sImgIndex=0;
Cms.prototype.sImgCount=0;

//-- #Methods --
Cms.prototype.imgSet=function(pIndex){
	this.sImgIndex=pIndex;
	if(this.sImgIndex==0){
		document.getElementById("detailImgMButton_AA").className="DocDe_29";
		document.getElementById("detailImgMButton_AB").className="";
		document.getElementById("detailImgMButton_BA").className="DocDe_29";
		document.getElementById("detailImgMButton_BB").className="";
		document.getElementById("detailImgMessage").className=tmpCommon.sysHidden;
	}else if(this.sImgIndex==this.sImgCount-1){
		document.getElementById("detailImgMButton_AA").className="";
		document.getElementById("detailImgMButton_AB").className="DocDe_29";
		document.getElementById("detailImgMButton_BA").className="";
		document.getElementById("detailImgMButton_BB").className="DocDe_29";
	}else{
		document.getElementById("detailImgMButton_AA").className="";
		document.getElementById("detailImgMButton_AB").className="";
		document.getElementById("detailImgMButton_BA").className="";
		document.getElementById("detailImgMButton_BB").className="";
	}
	document.getElementById("detailImgBox").style.width=document.getElementById("detailImgButton_Width_"+this.sImgIndex).value+tmpCommon.sysPx;
	document.getElementById("detailImgBox").src=document.getElementById("detailImgButton_Source_"+this.sImgIndex).value;
	Coun0=0;
	while(document.getElementById("detailImgButton_A_"+Coun0)!=undefined){
		document.getElementById("detailImgButton_A_"+Coun0).className="DocDe_24";
		document.getElementById("detailImgButton_B_"+Coun0).className="DocDe_25";
		Coun0++;
	}
	document.getElementById("detailImgButton_A_"+this.sImgIndex).className="DocDe_30";
	document.getElementById("detailImgButton_B_"+this.sImgIndex).className="DocDe_28";
	
	return 0;
}
Cms.prototype.imgPrevious=function(){
	this.sImgIndex--;
	if(this.sImgIndex<=0){
		this.sImgIndex=0;
	}
	this.imgSet(this.sImgIndex);
	return 0;
}
Cms.prototype.imgNext=function(){
	this.sImgIndex++;
	if(this.sImgIndex>=this.sImgCount){
		this.sImgIndex=this.sImgCount-1;
		document.getElementById("detailImgMessage").className="DocDe_31";
	}
	this.imgSet(this.sImgIndex);
	return 0;
}
Cms.prototype.imgMessageCancel=function(){
	document.getElementById("detailImgMessage").className=tmpCommon.sysHidden;
	return 0;
}
//#About tab
Cms.prototype.sAbout_TabCount=4;
Cms.prototype.OnAbout_Tab=function(pIndex){
	var Coun0=0;
	while(Coun0<this.sAbout_TabCount){
		document.getElementById("aboutTab_"+Coun0).className="About_Title_3";
		Coun0++;
	}
	
	document.getElementById("aboutTab_"+pIndex).className="About_Title_2";
	return 0;
}
//#Promotion
Cms.prototype.OnModifyContent=function(pName){
	document.getElementById(pName+"Txt_Link").childNodes[0].innerHTML=document.getElementById(pName+"Txt_Content").value;
	document.getElementById(pName+"Txt").value=document.getElementById(pName+"Txt_Link").innerHTML.replace("&amp;","&");
	
	return 0;
}
//#Search Contentbox
Cms.prototype.sDSearch_Contentbox_Tabcount=7;
Cms.prototype.sDSearch_Contentbox_Keyword="";
Cms.prototype.sDSearch_Contentbox_URL="../../../Plus/m_default/Cms/searchList.php";
Cms.prototype.OnDSearch_Contentbox_Tab=function(pFlag,pIndex){
	var Coun0=0;
	while(Coun0<this.sDSearch_Contentbox_Tabcount){
		document.getElementById("DSearchContent_Tab_"+Coun0).className="SearchL_1_7";
		Coun0++;
	}
	document.getElementById("DSearchContent_Tab_"+pIndex).className="SearchL_1_8";
	
	tmpURL=this.sDSearch_Contentbox_URL+"?ActionType="+pFlag+"&DKeyword="+tmpCommon.encodeURL(this.sDSearch_Contentbox_Keyword,0);
	this.sAjax_0.sFlag="DSearchContent_Box";
	this.sAjax_0.sPanel="DSearchContent_Box";
	this.sAjax_0.sURL=tmpURL;
	this.sAjax_0.sendRequestSp(tmpURL,"cms_DSearch_Contentbox_Tab_Callback()");
	//window.open(tmpURL,"_blank");
	return 0;
}
function cms_DSearch_Contentbox_Tab_Callback(){
	var tmpFlag=tmpCms.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpCms.sAjax_0.sPanel);
	var tmpURL=tmpCms.sAjax_0.sURL;
	var tmpHttpRequests=tmpCms.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);
		tmpPanel.innerHTML=tmpCommon.sysLoading_Ajax;
	}
}
Cms.prototype.OnDSearch_TiteShow=function(pID){
	document.getElementById("DSearch_Row"+pID+"_Link").className="Link1 SearchL_1_43";
	
	tmpFrames.showTile(document.getElementById("DSearch_Row"+pID+"_Link"),document.getElementById("DSearch_Row"+pID+"_Content"));
	return 0;
}
Cms.prototype.OnDSearch_TiteClose=function(pID){
	document.getElementById("DSearch_Row"+pID+"_Link").className="Link4 FBlack3";
	
	tmpFrames.hiddenTile(document.getElementById("DSearch_Row"+pID+"_Link"),document.getElementById("DSearch_Row"+pID+"_Content"));
	return 0;
}


//-- ------ #Instanct ------ --
var tmpCms=new Cms();


