﻿//排序
function compositor(a,b,c,userid) {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'compositor.asp?name='+a+'&b='+b+'&ac='+c+'&userid='+userid+'&g='+g+'&q='+q+'&l='+l+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('loadimg...');
   if(xmlhttp.status==200){
     if (xmlhttp.responseText.split('-->')[1]!=-1)setTimeout('window.location.reload();',1500);
    //alert(xmlhttp.responseText.split('-->')[1])
   }
}}
}


//文字左右調
function txtcompositor(a,b,c,userid,d,num) {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'compositor.asp?name='+a+'&b='+b+'&ac='+c+'&userid='+userid+'&d='+d+'&g='+g+'&q='+q+'&l='+l+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('loadimg...');
   if(xmlhttp.status==200){
     if (xmlhttp.responseText.split('-->')[1]!=-1){
      a+'();';
       for (var is=1;is<Math.ceil(num)+1;is++){
        if (document.getElementById(b+is)!=null){
         if (c=='left')document.getElementById(b+is).style.marginLeft=(parseInt(document.getElementById(b+is).style.marginLeft,10)-2).toString() + "px";
         if (c=='right')document.getElementById(b+is).style.marginLeft=(parseInt(document.getElementById(b+is).style.marginLeft,10)+2).toString() + "px";
        }
       }
      setTimeout('lightBody();',1000);
     }
   }
}}
}



//刪除自訂
function del_since_add(a,b,c) {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skin_choice.asp?p='+a+'&b='+b+'&autoidtxt='+c+'&g='+g+'&q='+q+'&l='+l+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('loadimg...');
   if(xmlhttp.status==200){
     if (xmlhttp.responseText.split('-->')[1]!=-1)setTimeout('window.location.reload();',0000);
   }
}}
}


//開關左右側項目
function del_left_right(p,a,b,c,d) {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skin_choice.asp?p='+p+'&a='+a+'&b='+b+'&c='+c+'&d='+d+'&g='+g+'&q='+q+'&l='+l+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('loadimg...');
   if(xmlhttp.status==200){
     if (xmlhttp.responseText.split('-->')[1]!=-1)setTimeout('window.location.reload();',0000);
   }
}}
}


//左右側項目預設值排序
function left_right_load_compositor(a,b,c,userid) {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'compositor.asp?name='+a+'&b='+b+'&ac='+c+'&userid='+userid+'&g='+g+'&q='+q+'&l='+l+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
   if(xmlhttp.status==200){
    left_right_compositor(a,b.split('_load')[0],c,userid);
   }
}}
}


//左右側項目顯示值排序
function left_right_compositor(a,b,c,userid) {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'compositor.asp?name='+a+'&b='+b+'&ac='+c+'&userid='+userid+'&g='+g+'&q='+q+'&l='+l+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('loadimg...');
   if(xmlhttp.status==200){
   setTimeout('window.location.reload();',100);
   }
}}
}


//折扣分類
function showmidcode(buyok)
{
if(document.getElementById(buyok).style.display=="none"){
document.getElementById(buyok).style.display="";
} else {
document.getElementById(buyok).style.display="none"; 
}
}
function golifeclassify() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golifeclassify&larcode='+escape(larcode)+'&midcode='+escape(midcode)+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golifeclassify").innerHTML=xmlhttp.responseText;
myadmin_id_url("golifeclassify"); //賦予ID在清單連結
}}
}

//折扣分類
function county() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=county';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("county").innerHTML=xmlhttp.responseText;
myadmin_id_url("county"); //賦予ID在清單連結
}}
}

//折扣統計
function golife_statistics() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golife_statistics';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golife_statistics").innerHTML=xmlhttp.responseText;
myadmin_id_url("golife_statistics"); //賦予ID在清單連結
}}
}

//店家登入
function checkuserform(){
	if (document.loginbox.userid.value.length ==0){
		alert(include_skin__1);
		document.loginbox.userid.focus();
		return false;
	}
	if (document.loginbox.password.value.length==0){
		alert(include_skin__2);
		document.loginbox.password.focus();
		return false;
	}
        if (document.loginbox.yzm.value.length==0){
		alert(all_Public_45);
		document.loginbox.yzm.focus();
		return false;
	}
	return true;
}	

function golife_login() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golife_login';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golife_login").innerHTML=xmlhttp.responseText;
myadmin_id_url("golife_login"); //賦予ID在清單連結
if (getCookie(cookienum+'privilegelogin')==undefined || getCookie(cookienum+'privilegelogin')==""){
yzmgo('16','','golife_login.asp',colorload);
}
}}
}
//店家中心選單
function golifeuser_center_menu(mm) {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&mm='+mm+'&skinshow=golifeuser_center_menu';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golifeuser_center_menu").innerHTML=xmlhttp.responseText;
//myadmin_id_url("golifeuser_center_menu"); //賦予ID在清單連結
}}
}

//店家網頁選單
function show_menu() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=show_menu';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("show_menu").innerHTML=xmlhttp.responseText;
myadmin_id_url("show_menu"); //賦予ID在清單連結
}}
}
//店家網頁統計
function show_statistics() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=show_statistics';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("show_statistics").innerHTML=xmlhttp.responseText;
myadmin_id_url("show_statistics"); //賦予ID在清單連結
}}
}

//開關店家網頁左右側項目
function golife_del_left_right(p,a,b,c,d) {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skin_choice.asp?p='+p+'&a='+a+'&b='+b+'&c='+c+'&d='+d+'&g='+g+'&q='+q+'&l='+l+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('loadimg...');
   if(xmlhttp.status==200){
     if (xmlhttp.responseText.split('-->')[1]!=-1)setTimeout('window.location.reload();',0000);
   }
}}
}
//折扣群組列印
function golife_group() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golife_group';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golife_group").innerHTML=xmlhttp.responseText;
myadmin_id_url("golife_group"); //賦予ID在清單連結
g_print_l();
}}
}
//店家群組列印
function show_group() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=show_group';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("show_group").innerHTML=xmlhttp.responseText;
//myadmin_id_url("show_group"); //賦予ID在清單連結
g_print_l();
}}
}

//優質店家
function golife_high_quality() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golife_high_quality';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golife_high_quality").innerHTML=xmlhttp.responseText;
myadmin_id_url("golife_high_quality"); //賦予ID在清單連結
}}
}

//好康報報
function golife_good_gang() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golife_good_gang';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golife_good_gang").innerHTML=xmlhttp.responseText;
myadmin_id_url("golife_good_gang"); //賦予ID在清單連結
}}
}

//最新店家
function golife_newuser() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golife_newuser';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golife_newuser").innerHTML=xmlhttp.responseText;
myadmin_id_url("golife_newuser"); //賦予ID在清單連結
}}
}

//最新商品
function golife_sample() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golife_sample';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golife_sample").innerHTML=xmlhttp.responseText;
myadmin_id_url("golife_sample"); //賦予ID在清單連結
}}
}


//最新折扣
function golife_prod() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=golife_prod';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("golife_prod").innerHTML=xmlhttp.responseText;
myadmin_id_url("golife_prod"); //賦予ID在清單連結
}}
}


//折扣會員登入
function checkuserform2(){
	if (document.loginbox.userid.value.length ==0){
		alert(include_skin__1);
		document.loginbox.userid.focus();
		return false;
	}
	if (document.loginbox.password.value.length==0){
		alert(include_skin__2);
		document.loginbox.password.focus();
		return false;
	}
        if (document.loginbox.yzm.value.length==0){
		alert(all_Public_45);
		document.loginbox.yzm.focus();
		return false;
	}
	return true;
}	

function show_login() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=show_login';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("show_login").innerHTML=xmlhttp.responseText;
myadmin_id_url("show_login"); //賦予ID在清單連結
checkmsgjs(); //檢查新訊息
if (getCookie(cookienum+'showlogin')==undefined || getCookie(cookienum+'showlogin')==""){
yzmgo('16','','show_login.asp',colorload);
}
}}
}

//店家會員中心選單
function show_user_center_menu() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=show_user_center_menu';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("show_user_center_menu").innerHTML=xmlhttp.responseText;
myadmin_id_url("show_user_center_menu"); //賦予ID在清單連結
if (getCookie('msgshowmu')=="show"){
if (document.getElementById('msgnu')!=null){
document.getElementById("msgnu").style.display='';
document.getElementById("msgimg").src='images/small/collapsed_no.gif';
}
}
checkmsgjs(); //檢查新訊息
}}
}

//訊息選單
function msgimg(ok){
if(document.getElementById("msgnu").style.display=="none"){
document.getElementById("msgnu").style.display='';
document.getElementById("msgimg").src='images/small/collapsed_no.gif';
saveCookie("msgshowmu","show")
} else {
document.getElementById("msgnu").style.display="none"; 
document.getElementById("msgimg").src='images/small/collapsed_yes.gif';
saveCookie("msgshowmu","noshow")
}
}


function showmidcode2(buyok){
//if(document.getElementById(buyok).style.display=="none"){
document.getElementById(buyok).style.display="";
//} else {
//document.getElementById(buyok).style.display="none"; 
//}
}

//店家商品分類
function show_classify() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=show_classify&larcode='+escape(golifeshowlarcode)+'&midcode='+escape(golifeshowmidcode)+'&smacode='+escape(golifeshowsmacode)+'';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("show_classify").innerHTML=xmlhttp.responseText;
myadmin_id_url("show_classify"); //賦予ID在清單連結
}}
}

//推廣登入
function myadmin_login() {
//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&skinshow=myadmin_login';

xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("myadmin_login").innerHTML=xmlhttp.responseText;
myadmin_id_url("myadmin_login"); //賦予ID在清單連結
if (getCookie(cookienum+'myadminlogin')==undefined || getCookie(cookienum+'myadminlogin')==""){
yzmgo('16','../','mylogin.asp');
}
}}
}

//推廣會員選單
function my_menu(mm) {

//瀏覽器 Firefox, Opera 8.0+, Safari, Internet Explorer 
var xmlhttp;
try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
var strURL=mymap+'skindata.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&mm='+mm+'&skinshow=my_menu';
xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("my_menu").innerHTML=xmlhttp.responseText;
myadmin_id_url("my_menu"); //賦予ID在清單連結
r_center_menu("my_menu");
}}
}

//檢查新訊息
function checkmsgjs(){ 
 if (getCookie(cookienum+'showlogin')!=undefined){
      var xmlhttp;
      try { xmlhttp=new XMLHttpRequest(); }catch (e) {  try {xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e) {try {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e) { alert("Your browser does not support AJAX!"); return false;}}}
      var strURL='show_massbuy_msg.asp?q='+q+'&g='+g+'&c='+c+'&l='+l+'&action=checkmsg';
      xmlhttp.open('GET',strURL+'&err999='+escape(new Date()),true);
      xmlhttp.send(null);  
      xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
       if(xmlhttp.status==200){
        if (xmlhttp.responseText.split('|||')[1].indexOf("no")==-1){
          if (document.getElementById('newmsg')!=null){
 			document.getElementById('newmsg').innerHTML=xmlhttp.responseText.split('|||')[1];
			backgroundB('newmsg','#FF0000',colorload,'2',500);
 			setTimeout("clearTimeout(backgroundBgo);", 4800);
          }
        }else{
			if (document.getElementById('newmsg')!=null)document.getElementById('newmsg').innerHTML='';
        }
        if (document.getElementById('newmsg')!=null)setTimeout("checkmsgjs();", 5000);
       }
      }}
 }
}
//檢查新訊息

