
//設定按鈕位置
function set_system_help_pos(){
var tcx=$.cookie('sys_tip_click');
var pos=$('.header_right').position();
if(tcx==0){
var moux=pos.left-60;
$('div[name=system_help_bt]').width('207px');
}else{
var moux=pos.left+108;
$('div[name=system_help_bt]').width('37px');
$('div[name=system_help_bt]').css('background-image','url(images/sys_tip/tip_off.gif)');
$('div[name=system_help_bt]').hover(function (){
$(this).css('background-image','url(images/sys_tip/tip_on.gif)');
},function (){
var ta=$('#system_help_box').css('display');
if(ta!='block'){
$(this).css('background-image','url(images/sys_tip/tip_off.gif)');
}
});
}
var mouy=pos.top;
$('div[name=system_help_bt]').css('left',moux);
$('div[name=system_help_bt]').show();
}
function hide_sys_tip(){
$('.system_help').remove();
$('div[name=system_help_bt]').css('background-image','url(images/sys_tip/tip_off.gif)');
}
//設定提示
function set_sys_tip(page_id,index_n){
var pos=$('#header .header_banner').position();
var moux=pos.left-50;
var mouy=pos.top;
$('#system_help_box').remove();
jQuery("<div/>", {id: 'system_help_box'}).appendTo("body");
$('#system_help_box').css('left',moux).addClass('system_help');
var is_mem=$.cookie('is_member');
if(page_id=='member_area'){
if(is_mem=='0'){page_id='no_member_area';}
}
if(page_id=='active'||page_id=='about_us'){  index_n='0';  }
$('#system_help_box').css('background-image','url(images/sys_tip/'+page_id+'_tip_'+index_n+'.png)');
$('#system_help_box').click(hide_sys_tip);
}
//系統提示
function check_system_help(){
var pos=$('.header_right').position();
var moux=pos.left+108;
$('div[name=system_help_bt]').css('left',moux);
$('div[name=system_help_bt]').width('37px');
$('div[name=system_help_bt]').css('background-image','url(images/sys_tip/tip_off.gif)');
$('div[name=system_help_bt]').hover(function (){
$(this).css('background-image','url(images/sys_tip/tip_on.gif)');
},function (){
var ta=$('#system_help_box').css('display');
if(ta!='block'){
$(this).css('background-image','url(images/sys_tip/tip_off.gif)');
}
});
$('div[name=system_help_bt]').css('background-image','url(images/sys_tip/tip_on.gif)');
var page_name=location.hash;
//產品介紹
var page_list={ '#new_active':'active',
'#product':'product',
'#about_us':'about_us',
'#member_area':'member_area',
'#buty_knowledge':'buty_knows',
'#door_info':'door_info',
'#e_catelog':'e_catelog'
}
var active_idx_list= ["0","1","2","3","4","5"];
var product_idx_list= ["0","1","2","3","4"];
var door_info_idx_list= ["0","1","2"];
var buty_knows_idx_list=["0","1","2"];
var member_area_idx_list=["0","1","2","3","4","5"];
var e_catelog_idx_list=["0"];
var about_us_idx_list=["0","1","2","3","4","5","6","7"];
var vali_idx_list={ '#new_active':active_idx_list,
'#product':product_idx_list,
'#door_info':door_info_idx_list,
'#buty_knowledge':buty_knows_idx_list,
'#member_area':member_area_idx_list,
'#e_catelog':e_catelog_idx_list,
'#about_us':about_us_idx_list
}
var page_id=page_list[page_name];
var tw=$("#"+page_id+'_sub_menu').width();
if(tw!=null){
var idx=$("#"+page_id+'_sub_menu').tabs().getIndex();
var vali_idx=vali_idx_list[page_name];
if(vali_idx.in_array(idx)){    set_sys_tip(page_id,idx); }
}else{
set_sys_tip(page_id,0);
}
}
