function idxl_showtip(_1,_2){
var _3=$("idxl_tipblock");
if(_3){
Element.show(_3);
_3.innerHTML=MSG_USERPROFILETIPS[_2];
_3.style.left=getPos(_1,"Left")-_3.offsetWidth+"px";
_3.style.top=getPos(_1,"Top")+_1.offsetHeight+"px";
}
}
function idxl_hidetip(_4,_5){
var _6=$("idxl_tipblock");
if(_6){
Element.hide(_6);
_6.innerHTML="";
}
}
function umain_onlisttoggle(_7,_8,_9){
var _a=$("umain_listmorebtn_"+_7+"_"+_8);
var _b=$("umain_listlessbtn_"+_7+"_"+_8);
var _c=$("umain_listmoreinfo_"+_7+"_"+_8);
var _d=$("umain_listlessinfo_"+_7+"_"+_8);
if(_a&&_b&&_c&&_d){
if(_9){
Element.hide(_a);
Element.show(_b);
Element.show(_c);
Element.hide(_d);
}else{
Element.show(_a);
Element.hide(_b);
Element.hide(_c);
Element.show(_d);
}
}
}
function fti_onchangecolor(_e){
var hc=$("fti_inputcolor");
var hw=$("fti_inputword");
var cr=$("fti_settingitem_"+_e);
if(hc&&hw&&cr){
var od=document.getElementsByClassName("coloritemcur");
for(var i=0;i<od.length;i++){
od[0].className="coloritem";
}
cr.className="coloritemcur";
hc.value=_e;
hw.style.color="#"+_e;
}
}
function fti_onselectsong(div,sid,fid){
var ap=$("fti_settingauto_1");
if(div.checked){
show_loading(div);
new Ajax.Request("/feast/update_song/"+fid+"?song_id="+sid+"&autoplay="+(ap.checked+0),{asynchronous:true,evalScripts:true});
}
}
function fti_onshowothersong(fid,div){
var ap=$("fti_settingauto_1");
show_loading(div);
new Ajax.Request("/feast/select_song/"+fid+"?autoplay="+(ap.checked+0),{asynchronous:true,evalScripts:true});
}
function fsg_invitelink(_1b,div){
var fm=$("group_invite_friends_form");
var sf=fm["selected_friends"].value;
var fm2=$("fti_sendgiftform");
var gid=fm2["gid"].value;
var ids=$A(document.getElementsByName("ids[]")).select(function(a){
return a.checked;
}).map(function(n){
return n.value;
});
show_loading(div);
if(sf){
new Ajax.Request("/feast/select_friend_view/"+"?page="+_1b+"&gid="+gid,{postBody:"ids="+ids+"&selected_friends="+sf,asynchronous:true,evalScripts:true,method:"post"});
}else{
new Ajax.Request("/feast/select_friend_view/"+"?page="+_1b+"&gid="+gid,{postBody:"ids="+ids,asynchronous:true,evalScripts:true,method:"post"});
}
}
function fsg_invitegroup(_24,div){
var fm=$("group_invite_friends_form");
var sf=fm["selected_friends"].value;
var fm2=$("fti_sendgiftform");
var gid=fm2["gid"].value;
var ids=$A(document.getElementsByName("ids[]")).select(function(a){
return a.checked;
}).map(function(n){
return n.value;
});
var _2d=$A(document.getElementsByName("ids[]")).select(function(a){
return !a.checked;
}).map(function(n){
return n.value;
});
show_loading(div);
if(sf){
new Ajax.Request("/feast/select_friend_view/"+"?group_id="+_24+"&gid="+gid,{postBody:"ids="+ids+"&selected_friends="+sf+"&uids="+_2d,asynchronous:true,evalScripts:true,method:"post"});
}else{
new Ajax.Request("/feast/select_friend_view/"+"?group_id="+_24+"&gid="+gid,{postBody:"ids="+ids+"&uids="+_2d,asynchronous:true,evalScripts:true,method:"post"});
}
}
function fsg_oncheckbox(cbx){
var cnt=$("yobogivdlg_fcount");
if(cnt){
var cnm=parseInt(cnt.innerHTML);
if(isNaN(cnm)){
cnm=0;
}
if(cbx.checked){
cnm+=1;
}else{
cnm-=1;
}
cnt.innerHTML=cnm;
}
}
function fsg_onselectgift(cbx,gid,_35,_36,_37){
if(cbx.checked){
var fg=$("fti_giftid");
var sa=$("fti_selectedgiftblock");
if(fg&&sa){
fg.value=gid;
var str="<img src=\""+_37+"\" width=\"60\" height=\"60\" />";
str+="<div class=\"itemname\">"+_35+"</div>";
str+="<div class=\"itemfunc\">$"+_36+"</div>";
sa.innerHTML=str;
var fn=$("fti_friendnumber");
var pt=$("fti_pricetotal");
var ac=$("fti_accountcurrent");
var al=$("fti_accountleft");
if(fn&&pt&&ac&&al){
fn=parseInt(fn.innerHTML);
if(fn>0){
var tt=parseInt(_36)*fn;
pt.innerHTML=tt;
al.innerHTML=parseInt(ac.innerHTML)-tt;
}
}
}
}
}
function fti_onchangeborder(cur,tar,_42,_43){
if(cur&&tar&&_42&&_43){
if(cur.checked){
var _44=document.getElementsByClassName(_43);
for(var i=0;i<_44.length;i++){
_44[i].className=_42;
}
$(tar).className=_43;
}
}
}
function fti_onsendgift(){
var dlg=$("yobo_feastsendconfirm");
var gfn=$("fti_friendnumber");
var gsp=$("fti_pricetotal");
var dfn=$("fti_dlgnumbersend");
var dsp=$("fti_dlgpricesend");
var gid=$("fti_giftid");
var yb=$("yobo");
if(dlg&&gfn&&gsp&&dfn&&dsp&&gid&&yb){
if(parseInt(gfn.innerHTML)==0||gid.value==""){
printE({"title":ERROR_GENERAL_MSG,"li":[ERROR_NO_GIFTORFRIEND],"type":"alert","className":"error"});
}else{
dfn.innerHTML=gfn.innerHTML;
dsp.innerHTML=gsp.innerHTML;
var wd=365;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
Element.show(dlg);
dlg.style.top=(getPageOffsetY()+150)+"px";
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
}
}
}
function fti_onsendconfirm(){
var btn=$("fti_sendformsubmit");
if(btn){
btn.click();
}
}
function fti_onsellgift(gid,_52,_53){
var dlg=$("yobo_feastsellconfirm");
var gop=$("fti_dlgpricecurrent");
var gsp=$("fti_dlgpricesell");
var hid=$("fti_dlghiddensellid");
var yb=$("yobo");
if(dlg&&gop&&gsp&&hid&&yb){
gop.innerHTML=_52;
gsp.innerHTML=_53;
hid.value=gid;
var wd=365;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
Element.show(dlg);
dlg.style.top=(getPageOffsetY()+150)+"px";
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
}
}
function fsg_updategiftlist(_5c,_5d,div){
var fm=$("fti_sendgiftform");
var gid=fm["gid"].value;
show_loading(div);
if(gid){
new Ajax.Request("/feast/update_gifts/"+"?gid="+gid+"&category="+_5c+"&page="+_5d,{asynchronous:true,evalScripts:true,method:"get"});
}else{
new Ajax.Request("/feast/update_gifts/"+"?category="+_5c+"&page="+_5d,{asynchronous:true,evalScripts:true,method:"get"});
}
}
function fsg_selectfriend(div){
var fm=$("fti_sendgiftform");
var gid=fm["gid"].value;
var _64=fm["ids"].value;
show_loading(div);
if(gid){
if(_64){
new Ajax.Request("/feast/select_friend_view/"+"?gid="+gid+"&selected_friends="+_64,{asynchronous:true,evalScripts:true,method:"get"});
}else{
new Ajax.Request("/feast/select_friend_view/"+"?gid="+gid,{asynchronous:true,evalScripts:true,method:"get"});
}
}else{
if(_64){
new Ajax.Request("/feast/select_friend_view"+"?selected_friends="+_64,{asynchronous:true,evalScripts:true,method:"get"});
}else{
new Ajax.Request("/feast/select_friend_view",{asynchronous:true,evalScripts:true,method:"get"});
}
}
}
function fsg_cancelfriend(fid,div){
confirm(MSG_FEAST_FRIEND_REMOVE);
var fm=$("fti_sendgiftform");
var gid=fm["gid"].value;
var _69=fm["ids"].value;
show_loading(div);
new Ajax.Request("/feast/cancel_friend/"+fid+"?ids="+_69+"&gid="+gid,{asynchronous:true,evalScripts:true,method:"get"});
}
