var common = {
	e_display : function(idx){
		if( ! common.hash )
		{
			common.hash = [];
			var c_list = zk.$D("dl", zk.$D("#l_items"));
			for(var i = 0, l = c_list.length; i < l; i++){
				common.hash[common.hash.length] = c_list[i];
			}
		}
		for(var i = 0, l = common.hash.length; i < l; i++){
			common.hash[i].style.display = idx === -1 ? "" : (i != idx ? "none" : "");
		}
		common.oidx = idx;
	},
	goback : function(event){
		var e = event;
		if( common.oidx != -1 ){
			common.e_display(-1);
			window.location.replace("#");
			zk.$E.cancel(e)
		}
	}
};
zk.skin_switch = {
	cur : 1,
	skinSel : function( index ) {
		var _t = this;
		if( _t.cur != index ) {
			if ( ! _t.c_skin ) { _t.c_skin = zk.$D("#skin"); }
			if ( _t.c_skin ) {
				_t.c_skin.href = "/css/skin" + index + "/sub_v0608.css";
				_t.cur = index;
				zk.cookie.set( "pagestyle", index, 7 );
			}
		}
	},
	init : function(){
		window.$K = this;
		var s = zk.cookie.get( "pagestyle" );
		if ( s ) {
			s = parseInt( s );
			if ( s > 0 ) { this.skinSel( s ); }
		}
	}
};
zk.skin_switch.init();
