// JavaScript Document
var getStoreInfo = Class.create();
getStoreInfo.prototype={
	StoreIdGroup:new Array(),//前台分類館ID(陣列儲存);
	StoreOrgIdGroup:new Array(),//後台分類館ID(陣列儲存);
	StoreNMGroup:new Array(),//館英文名稱(陣列儲存);
	StoreCNMGroup : $H(),//館中文名稱(雜叢儲存);
	StoreOrgCNMGroup : $H(),//後台館ID中文名稱(雜叢儲存);
	StoreHideIdGroup : new Array(),
	NewStoreSeq : new Array(),
	StoreMark : false,
	LocationStoreNM : null,
	LocationStoreBK : null,
	LocationStoreCol : null,
	csstext : "",
	initialize:function()
	{
		
	},
	AddStore : function(StoreId,StoreOrgId,StoreName,StoreCNM,StoreHideBollin){
		this.StoreIdGroup.push(StoreId);
		this.StoreOrgIdGroup.push(StoreOrgId);
		this.StoreNMGroup.push(StoreName);
		this.StoreCNMGroup[StoreId]=StoreCNM;	
		this.StoreOrgCNMGroup[StoreOrgId]=StoreCNM;				
		this.StoreHideIdGroup.push(StoreHideBollin);
	},
	StoreInfo : function(){		
		switch(getUrlObj.PageName){
			case "lproductlist.aspx":case "sproductlist.aspx":case "productdetail.aspx":case "gbproductdetail.aspx":
			    this.StoreMark=true;
			break;			
			default:
			   if(getUrlObj.PageName.indexOf("_home.aspx")>-1 || getUrlObj.PageName.indexOf("_list.aspx")>-1){				   
				   if(getUrlObj.PageName.indexOf("tf_")>-1 || getUrlObj.PageName.indexOf("st_")>-1){
					   this.StoreMark = false;
					   this.LocationStoreNM = getUrlObj.PageName.split("_")[0];					   
				   }else{
					   this.StoreMark = true;
				   }				   
			   }else{
				   this.StoreMark=false;
			   }
			break;
		}
	    if(this.StoreMark){
			for(w=0; w<this.StoreIdGroup.length; w++){
			    if(this.StoreIdGroup[w]==StoreID){
				    if(this.StoreNMGroup[w].indexOf("_")>-1){
					    this.LocationStoreNM = this.StoreNMGroup[w].split("_")[0];					
				    }else{
				        this.LocationStoreNM = this.StoreNMGroup[w];
				    }
					this.LocationStoreBK=this.StoreBackgroundGroup[StoreID];
					this.LocationStoreCol=this.StoreFontGroup[StoreID];
			    }
	        }    
		}
	},
	setStyleSheets : function(){
		document.write("<style id=\"SetStyleSheets\"></style>");
		var StyleSheetsObj=document.styleSheets;
		this.csstext = this.StoreCssText();		
		for(g in StyleSheetsObj){			     
            if(StyleSheetsObj[g].id=="SetStyleSheets"){				
			    StyleSheetsObj[g].cssText=this.csstext;
			}
		}
	},
	StoreCssText : function(){		
		var text ="";		
		return text;
	}
}
if(getUrlObj.PageName.indexOf("lproductlist.aspx")>-1){
    var LocationKind="LPMenu";	
}else if(getUrlObj.PageName.indexOf("sproductlist.aspx")>-1){
	var LocationKind="SPMenu";
}else if(getUrlObj.PageName.indexOf("productdetail.aspx")>-1){
	var LocationKind="ProductDetail";
}else if(getUrlObj.PageName.indexOf("_home.aspx")>-1 || getUrlObj.PageName.indexOf("_list.aspx")>-1){	
//	if(getUrlObj.PageName.indexOf("tf_")>-1){
//		var LocationKind="PaySongZoom";
//		var PaySongName="Prefecture_24";
//	}else if(getUrlObj.PageName.indexOf("st_")>-1){
//		var LocationKind="PaySongZoom";
//		var PaySongName="Prefecture_store";
//	}else{		
//	    var LocationKind="StoreMenu";		
//	}
	var LocationKind="StoreMenu";
}
document.write("<script type=\"text/javascript\" src=\"../includes/StoreConfig.js\"></script>");
document.write("<script type=\"text/javascript\" src=\"../includes/MenuAction.js\"></script>");
document.write("<script type=\"text/javascript\" src=\"../includes/StoreMenuClass.js\"></script>");