﻿//排序
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+'&g='+g+'&userid='+userid+'';
xmlhttp.open('GET',strURL,true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('請稍候...');
   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+'';
xmlhttp.open('GET',strURL,true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('請稍候...');
   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+'';
xmlhttp.open('GET',strURL,true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('請稍候...');
   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+'';
xmlhttp.open('GET',strURL,true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('請稍候...');
   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+'';
xmlhttp.open('GET',strURL,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+'';
xmlhttp.open('GET',strURL,true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
darkBody('請稍候...');
   if(xmlhttp.status==200){
    setTimeout('window.location.reload();',0000);
   }
}}
}


//推廣登入
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='../skindata.asp?q='+q+'&g='+g+'&c='+c+'&skinshow=myadmin_login';
xmlhttp.open('GET',strURL,true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("myadmin_login").innerHTML=xmlhttp.responseText;
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+'&mm='+mm+'&skinshow=my_menu';
xmlhttp.open('GET',strURL,true);
xmlhttp.send(null);  
xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){
document.getElementById("my_menu").innerHTML=xmlhttp.responseText;
myadmin_id_url("my_menu"); //賦予ID在清單連結
//if (mm.indexOf("my_icom.asp")!=-1)setTimeout("showmidcode('icom1');",100);
}}
}

