var www_u=location.href+"&share=1";
var stat_url = "";
function addFav(id,cat){
if(cat == "content") p_url = "/content/";
else if(cat == "board") p_url = "/board/";
var ddpopup = window.open(stat_url+p_url+"fav_"+cat+".php?id="+id,"addthis_popup","toolbar=0,status=0,width=405,height=220");
ddpopup.focus();
return false;
}
function addPrint(id,cat){
if(cat == "content") p_url = "/content/";
else if(cat == "board") p_url = "/board/";
var ddpopup = window.open(stat_url+p_url +"print.php?id="+id,"addthis_popup","toolbar=0,status=0,width=405,height=220");
ddpopup.focus();
return false;
}
function sendMail(id,cat){
var ddpopup = window.open(stat_url+"http://www.dek-d.com/mailclub/list-contentSendMail.php?id="+id+"&cate="+cat,"addthis_popup","toolbar=0,status=0,width=500,height=600");
ddpopup.focus();
return false;
}
function addHi5(){
document.getElementById('shareForm').submit();
return false;
}
function addTwitter(title){
var ddpopup = window.open(stat_url+"http://twitter.com/?status="+encodeURIComponent(title)+" - "+encodeURIComponent(www_u),"addthis_popup","toolbar=0,status=0,width=626,height=436");
ddpopup.focus();
return false;
}
function addFacebook(){
var ddpopup = window.open(stat_url+"http://www.facebook.com/sharer.php?u="+encodeURIComponent(www_u),"addthis_popup","toolbar=0,status=0,width=626,height=436");
ddpopup.focus();
return false;
}
function addLive(title){
var ddpopup = window.open(stat_url+"https://favorites.live.com/quickadd.aspx?marklet=1&url="+encodeURIComponent(www_u)+"&title="+encodeURIComponent(title),"addthis_popup","toolbar=0,status=0,width=626,height=436");
ddpopup.focus();
return false;
}
function addOther(title){
window.open("addthis.php?url="+encodeURI(www_u)+"&title="+encodeURI(title),"addthis_popup","");
return false;
}
function setVoice(title){
var parameters = "mode=set&icon=28&msg="+encodeURIComponent(document.getElementById('voice_msg').value );
var a = new Ajax.Request('/myLib/voice.php',{method:'post', postBody:parameters,
onComplete:function(req){
var response = req.responseText;
var msg = '';
if(response == '1'){
msg = 'อัพเดทสถานะเรียบร้อย เพื่อนๆทุกคน รับทราบ !';
}
else if(response == '2') msg = 'ข้อความต้องยาวอย่างน้อย 4 ตัวอักษร !!!';
else if(response == '3') msg = 'ข้อความต้องยาวไม่เกิน 100 ตัวอักษร !!!';
else if(response == '4') msg = 'ไม่สามารถโพสซ้ำได้ !!!';
else if(response == '5') msg = 'เมนูนี้ สำหรับมายไอดีเวอร์ชั่น 2 เท่านั้น !!!';
else if(response == '9') msg = 'กรุณาล๊อคอินก่อนใช้งาน !!!';
else msg = 'ไม่สามารถเปลี่ยนสถานะได้ กรุณาลองใหม่ภายหลัง !!!' + 'nnnnn' +response ;
alert(msg);
return false;
document.getElementById("p_ajax").disabled=false;
}
});
return false;
}