$(function(){if($.cookie("uname")!=""&&$.cookie("uname")!=null){$("#sayhello").empty();$("#sayhello").append("您好"+$.cookie("uname"));$("#splog").empty();$("#uout").show();$.post("mywebs.asp",{uname:$.cookie("uname")},function(date){$("#mylist").append(date)});$("#myct").fadeIn("slow")}$("#bar1").corner("5px");$("#rbox1").corner("4px");$("#mleft").corner("5px");$(".dcorner").corner();$("#foot").corner();$("#addnew").click(function(){if($.cookie("uname")!=""&&$.cookie("uname")!=null){var txt='添加新收藏:<br />网站名称：<input type="text" id="webname"  value="" /><br />网站地址：<input type="text" id="url"   value="" />';function mycallbackform(v,m){if(v=="sub"){$.post("newurl.asp",{webname:m.children("#webname").val(),url:m.children("#url").val()},function(date){$.prompt(date);$("#mylist").append("<li><a href='http://"+m.children("#url").val()+"'>"+m.children("#webname").val()+"</a></li>")})}};$.prompt(txt,{callback:mycallbackform,buttons:{添加:'sub',取消:'cancel'}})}else{$.prompt("请先登陆",{buttons:{确定:'sub'}})}});$("#min").click(function(){$("#mc").toggle();$("#min").toggle();$("#max").toggle()});$("#max").click(function(){$("#mc").toggle();$("#min").toggle();$("#max").toggle()});$("#close").click(function(){$("#myct").toggle()});$("#myctshow").click(function(){$("#myct").fadeIn("slow")});$("#szsc").mouseover(function(){$("#szsc").attr("src","js/arrow_blue_h.gif")});$("#szsc").mouseout(function(){$("#szsc").attr("src","js/arrow_blue.gif")});$("#szsc").click(function(){if($.cookie("uid")!=""&&$.cookie("uid")!=null){GB_show("编辑我的收藏","modlist.asp",370,500)}else{$.prompt("请先登录")}});$("#regedit").click(function(){GB_show("注册","regedit.asp",370,500)});$("#down1").click(function(){var h1=$("#rtmove2").height()+8;var h2=$("#rtmove1").height()+8;$("#rtmove1").animate({top:h1},500);$("#rtmove2").animate({top:-h2},500);$("#up1").toggle();$("#down1").toggle();$("#up2").toggle();$("#down2").toggle();$.cookie('r2pst',"down")});$("#up1").click(function(){var h1=$("#rtmove2").height()+8;var h2=$("#rtmove1").height()+8;$("#rtmove2").animate({top:0},500);$("#rtmove1").animate({top:0},500);$("#up1").toggle();$("#down1").toggle();$("#up2").toggle();$("#down2").toggle();$.cookie('r2pst',"up")});$("#up2").click(function(){$("#down1").click()});$("#down2").click(function(){$("#up1").click()});$("#login").click(function(){var txt='用户登陆<br />用户名：<input type="text" id="uname"   value="" /><br />密 &nbsp 码：<input type="password" id="psd"  value="" />';function mycallbackform(v,m){if(v=="sub"){var uname=m.children("#uname").val();var psd=m.children("#psd").val();$.post("login.asp",{uname:uname,psd:psd},function(date){if(date=="0"){$.prompt("用户名或密码错误")}else{$("#sayhello").empty();$("#sayhello").append("您好"+uname);$("#splog").empty();$("#uout").show();$.post("mywebs.asp",{uname:uname},function(date){$("#mylist").append(date)})}})}};$.prompt(txt,{callback:mycallbackform,buttons:{登录:'sub',取消:'cancel'}})});$("#logout").click(function(){$.cookie("uname","");$.cookie("uid","");document.location.reload()})})
