﻿function addfavorite(_1,_2){
if(document.all){
window.external.addFavorite(_1);
}else{
if(window.sidebar){
window.sidebar.addPanel(_2,_1,"aaa");
}
}
};
function addBookmark(_3,_4){
if(window.sidebar){
window.sidebar.addPanel(_4,_3,"");
}else{
if(document.all){
window.external.AddFavorite(_3,_4);
}else{
if(window.opera&&window.print){
return true;
}
}
}
};
function processForm(_5){
var _6=dijit.byId(_5);
var _7=null;
dojo.every(_6.getDescendants(),function(_8){
if(_8.isValid()==false){
_7=_8;
}
console.log("widget: ",_8);
console.log("isValid: ",_8.isValid);
console.log("isValid(): ",_8.isValid());
console.log("firstInvalidWidget: ",_7);
return !_8.isValid||_8.isValid();
});
if(_7!=null){
_7.focus();
_7.displayMessage("您的输入可能尚有错误，请检查！");
}else{
_6.submit();
}
};
function processFormAjax(){
var _9=dijit.byId("theSubmitButton");
dojo.connect(_9,"onClick",function(_a){
_a.preventDefault();
_a.stopPropagation();
var _b={form:dojo.byId("RemarkOnForm"),handleAs:"json",load:function(_c){
dojo.byId("response").innerHTML="反馈消息："+_c.theAllInformation;
if(_c.theResult_true_false=="true"){
if(_c.intJifenFollowUp!="0"){
var _d="<br /><img src=/images/ico/small/coins_add.png />您已成功获得了点评菜品送出的"+_c.strJifenFollowUp+_c.intJifenFollowUp+"积分哦~";
}else{
var _d="<br /><img src=/images/ico/small/coins_add.png />您的第一次点评已得到过积分了，此次点评不计入积分哦:)";
}
ShowDialog("<span style=color:black;>成功点评提示信息</span>","","width:300px;height:200px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_happy.png />恭喜您，点评成功！"+_d+"<br /><br />刷新查看您的新点评：<a class=\"button_img77\" style=\"display:inline-block; color:green;\" href=\"javascript:return false;\" onclick=\"location.reload();\">刷新查看&gt;&gt;</a></span></div>");
}
},error:function(_e){
dojo.byId("response").innerHTML="<img src='/images/ico/small/emotion_suprised.png' style='float:none;' />通讯失效，请您重新访问本页面并重新尝试操作！"+_e.message;
}};
dojo.byId("response").innerHTML="<img src='/images/ajax-loader.gif' style='float:none;' /> Loading ...";
var _f=dojo.xhrPost(_b);
});
};
dojo.addOnLoad(processFormAjax);
function addFavoriteAjax(_10){
dojo.xhrGet({url:"/ONCEFOREVER/Account.Services.Private.asp",content:{query:"True",ServicesAction:"addFavorite",id:_10,CokeShow:Math.random()},timeout:10000,handleAs:"json",load:function(_11){
if(_11.theResult_true_false=="true"){
ShowDialog("<span style=color:black;>成功收藏提示信息</span>","","width:300px;height:200px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_happy.png />"+_11.theAllInformation+"<br /><img src=/images/ico/small/coins_add.png />同时您也成功获得网站主办的鼓励小活动-收藏菜品的1积分哦~<br /></span></div>");
}else{
ShowDialog("<span style=color:black;>提示信息</span>","","width:300px;height:200px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_wink.png />"+_11.theAllInformation+"<br /></span></div>");
}
},error:function(_12){
ShowDialog("<span style=color:black;>提示信息</span>","","width:300px;height:200px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_unhappy.png />通讯失效，请您重新访问本页面并重新尝试操作！<br /><br />具体技术描述信息："+_12.message+"<br /></span></div>");
}});
};
function addAccount_TuijianPengyou(_13){
dojo.xhrGet({url:"/ONCEFOREVER/Account.Services.Private.asp",content:{query:"True",ServicesAction:"addAccount_TuijianPengyou_CheckReady",id:_13,CokeShow:Math.random()},timeout:10000,handleAs:"json",load:function(_14){
if(_14.theResult_true_false=="true"){
ShowDialog("<img src=/images/ico/small/group.png /> <span style=color:black;>请填写您推荐朋友的Email信息</span>","/ONCEFOREVER/addAccount_TuijianPengyou.Welcome?id="+_13,"width:460px;height:500px;","");
}else{
ShowDialog("<span style=color:black;>提示信息</span>","","width:300px;height:200px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_wink.png />"+_14.theAllInformation+"<br /></span></div>");
}
},error:function(_15){
ShowDialog("<span style=color:black;>提示信息</span>","","width:300px;height:200px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_unhappy.png />通讯失效，请您重新访问本页面并重新尝试操作！<br /><br />具体技术描述信息："+_15.message+"<br /></span></div>");
}});
};
function processFormAjax_addAccount_TuijianPengyou(){
var _16={form:dojo.byId("tuijianpengyou"),handleAs:"json",load:function(_17){
if(_17.theResult_true_false=="true"){
dojo.byId("responseDialog").innerHTML=""+_17.theAllInformation+_17.strJifenFollowUp;
}else{
dojo.byId("responseDialog").innerHTML=""+_17.theAllInformation;
}
},error:function(_18){
dojo.byId("responseDialog").innerHTML="<img src='/images/ico/small/emotion_suprised.png' style='float:none;' />通讯失效，请您重新访问本页面并重新尝试操作！";
}};
dojo.byId("responseDialog").innerHTML="<img src='/images/ajax-loader.gif' style='float:none;' /> Loading ...";
var _19=dojo.xhrPost(_16);
};
function processFormAjax_QuestionnairesForm(){
var _1a=dijit.byId("theSubmitButton_QuestionnairesForm");
dojo.connect(_1a,"onClick",function(_1b){
_1b.preventDefault();
_1b.stopPropagation();
var _1c={form:dojo.byId("QuestionnairesForm"),handleAs:"json",load:function(_1d){
dojo.byId("response").innerHTML=""+_1d.theAllInformation;
},error:function(_1e){
dojo.byId("response").innerHTML="<img src='/images/ico/small/emotion_suprised.png' style='float:none;' />通讯失效，请您重新访问本页面并重新尝试操作！"+_1e.message;
}};
dojo.byId("response").innerHTML="<img src='/images/ajax-loader.gif' style='float:none;' /> Loading ...";
var _1f=dojo.xhrPost(_1c);
});
};
dojo.addOnLoad(processFormAjax_QuestionnairesForm);
function addAccount_GiftCertificated(_20){
var _21=confirm("确定要兑换此礼品券吗？( 领取礼品券后将扣除您的相应积分数 )");
if(_21==true){
dojo.xhrGet({url:"/ONCEFOREVER/Account.Services.Private.asp",content:{query:"True",ServicesAction:"addAccount_GiftCertificated",id:_20,CokeShow:Math.random()},timeout:10000,handleAs:"json",load:function(_22){
if(_22.theResult_true_false=="true"){
ShowDialog("<img src=/images/ico/small/group.png /> <span style=color:black;>成功领取礼品券提示信息</span>","","width:300px;height:230px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_happy.png />"+_22.theAllInformation+"<br /></span></div>");
}else{
ShowDialog("<span style=color:black;>提示信息</span>","","width:300px;height:230px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_wink.png />"+_22.theAllInformation+"<br /></span></div>");
}
},error:function(_23){
ShowDialog("<span style=color:black;>提示信息</span>","","width:300px;height:230px;","<div style=background-color:#ffffff;width:auto;height:auto;><span style=\"color: #666;\"><img src=/images/ico/emotion_unhappy.png />通讯失效，请您重新访问本页面并重新尝试操作！<br /><br />具体技术描述信息："+_23.message+"<br /></span></div>");
}});
}
};
function processFormAjax_SendMessageForm(){
var _24=dijit.byId("theSubmitButton_SendMessageForm");
dojo.connect(_24,"onClick",function(_25){
_25.preventDefault();
_25.stopPropagation();
var _26={form:dojo.byId("SendMessageForm"),handleAs:"json",load:function(_27){
dojo.byId("response").innerHTML=""+_27.theAllInformation;
},error:function(_28){
dojo.byId("response").innerHTML="<img src='/images/ico/small/emotion_suprised.png' style='float:none;' />通讯失效，请您重新访问本页面并重新尝试操作！"+_28.message;
}};
dojo.byId("response").innerHTML="<img src='/images/ajax-loader.gif' style='float:none;' /> Loading ...";
var _29=dojo.xhrPost(_26);
});
};
dojo.addOnLoad(processFormAjax_SendMessageForm);
function processFormAjax_BindingMyVIPCardForm(){
var _2a=dijit.byId("theSubmitButton_BindingMyVIPCardForm");
dojo.connect(_2a,"onClick",function(_2b){
_2b.preventDefault();
_2b.stopPropagation();
var _2c={form:dojo.byId("BindingMyVIPCardForm"),handleAs:"json",load:function(_2d){
dojo.byId("response").innerHTML=""+_2d.theAllInformation;
},error:function(_2e){
dojo.byId("response").innerHTML="<img src='/images/ico/small/emotion_suprised.png' style='float:none;' />通讯失效，请您重新访问本页面并重新尝试操作！"+_2e.message;
}};
dojo.byId("response").innerHTML="<img src='/images/ajax-loader.gif' style='float:none;' /> Loading ...";
var _2f=dojo.xhrPost(_2c);
});
};
dojo.addOnLoad(processFormAjax_BindingMyVIPCardForm);
function processFormAjax_ChangePassword(){
var _30=dijit.byId("theSubmitButton_ChangePassword");
dojo.connect(_30,"onClick",function(_31){
_31.preventDefault();
_31.stopPropagation();
var _32={form:dojo.byId("ChangePassword"),handleAs:"json",load:function(_33){
dojo.byId("response").innerHTML=""+_33.theAllInformation;
},error:function(_34){
dojo.byId("response").innerHTML="<img src='/images/ico/small/emotion_suprised.png' style='float:none;' />通讯失效，请您重新访问本页面并重新尝试操作！"+_34.message;
}};
dojo.byId("response").innerHTML="<img src='/images/ajax-loader.gif' style='float:none;' /> Loading ...";
var _35=dojo.xhrPost(_32);
});
};
dojo.addOnLoad(processFormAjax_ChangePassword);
function processFormAjax_PersonalInformationForm(){
var _36=dijit.byId("theSubmitButton_PersonalInformationForm");
dojo.connect(_36,"onClick",function(_37){
_37.preventDefault();
_37.stopPropagation();
var _38={form:dojo.byId("PersonalInformationForm"),handleAs:"json",load:function(_39){
dojo.byId("response").innerHTML=""+_39.theAllInformation;
},error:function(_3a){
dojo.byId("response").innerHTML="<img src='/images/ico/small/emotion_suprised.png' style='float:none;' />通讯失效，请您重新访问本页面并重新尝试操作！"+_3a.message;
}};
dojo.byId("response").innerHTML="<img src='/images/ajax-loader.gif' style='float:none;' /> Loading ...";
var _3b=dojo.xhrPost(_38);
});
};
dojo.addOnLoad(processFormAjax_PersonalInformationForm);
function insertAfter(_3c,_3d){
var _3e=_3d.parentNode;
if(_3e.lastChild==_3d){
_3e.appendChild(_3c);
}else{
_3e.insertBefore(_3c,_3d.nextSibling);
}
};
function Upload(_3f){
dojo.byId("uploading").innerHTML="<img src=/images/loading.gif />";
dojo.io.iframe.send({form:"foo",method:"post",handleAs:"json",url:"/upload/upfile.asp",load:function(_40,_41){
console.log(_40,_41);
if(!_40.valid){
dojo.byId("uploading").innerHTML="上传失败！<img src=/images/no.png />";
}else{
if(_3f=="null"||_3f==null){
_3f="";
}
dojo.byId("value_photo"+_3f).value=_40.src;
dojo.byId("src_photo"+_3f).src=_40.src;
dojo.byId("href_photo"+_3f).href=_40.src;
if(typeof dijit.byId("tmp"+_3f)=="object"){
dijit.byId("tmp"+_3f).label="图片详细尺寸：<br /><img src='"+_40.src+"' />";
}
dojo.byId("uploading").innerHTML="上传成功<img src=/images/ok.gif />";
}
return _40;
},error:function(_42,_43){
console.log("Error");
console.log(_42,_43);
dojo.byId("uploading").innerHTML="网络出错，上传失败！<img src=/images/no.png />";
return _42;
}});
};
function ShowDialog(_44,_45,_46,_47){
console.log("titlename:",_44,"hrefurl:",_45,"styleStr:",_46,"contentStr:",_47);
if(_45==""){
var d1=new dijit.Dialog({title:_44,content:_47,style:""+_46+""});
}else{
var d1=new dijit.Dialog({title:_44,href:_45+"&CokeShow="+Math.random(),style:""+_46+""});
}
d1.show();
dojo.connect(d1,"hide",d1,function(e){
d1.destroy();
});
if(typeof (dojo.byId("FName"))=="object"){
dojo.connect(d1,"hide",d1,function(e){
dijit.byId("FName").destroy();
});
}
if(typeof (dojo.byId("FEmail"))=="object"){
dojo.connect(d1,"hide",d1,function(e){
dijit.byId("FEmail").destroy();
});
}
if(typeof (dojo.byId("CodeStr_TuiJianPengYou"))=="object"){
dojo.connect(d1,"hide",d1,function(e){
dijit.byId("CodeStr_TuiJianPengYou").destroy();
});
}
if(typeof (dojo.byId("submit886"))=="object"){
dojo.connect(d1,"hide",d1,function(e){
dijit.byId("submit886").destroy();
});
}
};
function DisplayTheElement(_4e){
var _4f=dojo.byId(_4e);
console.log(_4e);
console.log(_4f);
console.log(dojo.style(_4f,"display"));
if(dojo.style(_4f,"display")=="none"){
dojo.style(_4f,{display:"block"});
}else{
dojo.style(_4f,{display:"none"});
}
};
function stripeTables(_50){
var _51="#EAE8E3";
if(!document.getElementsByTagName){
return false;
}
var _52=document.getElementsByTagName("table");
for(var i=0;i<_52.length;i++){
if(_52[i].getAttribute("id",1)==_50){
var odd=false;
var _55=_52[i].getElementsByTagName("tr");
for(var j=0;j<_55.length;j++){
if(odd==true){
_55[j].style.backgroundColor="#FFFFFF";
_55[j].style.height="23";
odd=false;
}else{
_55[j].style.backgroundColor="#FFFFFF";
_55[j].style.height="23";
odd=true;
}
_55[j].onmouseover=function(){
this.style.backgroundColor=_51;
};
_55[j].onmouseout=function(){
this.style.backgroundColor="#FFFFFF";
};
}
}
}
};
function isPatrn(_57,_58){
if(!_58.exec(_57)){
return false;
}else{
return true;
}
};
function ShowDialog_Search(strFromURL) {
ShowDialog('<img src=/images/ico/small/group.png /> <span style=color:black;>请填写您要搜索的关键字(菜品)</span>','/Club/ShowDialog_Search.Welcome?strFromURL=' + strFromURL, 'width:460px;height:200px;','');
}

