function escape2(str){ return escape(str).replace(/\+/g,"%2b"); } function addVote(id,mtype,btn) { btn.value="请在提交,请稍等!"; btn.disabled=true; var voteNum; var rbVote=document.forms[0].elements["vote"]; for(var i=0;i0) { return "MSIE"; //IE浏览器 } if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ return "Firefox"; //Firefox浏览器 } if(isSafari=navigator.userAgent.indexOf("Safari")>0) { return "Safari"; //Safan浏览器 } if(isCamino=navigator.userAgent.indexOf("Camino")>0){ return "Camino"; //Camino浏览器 } if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){ return "Gecko"; //Gecko浏览器 } } function getLoginBar(w,x) { //参数说明:w=-1,0,1分别指"退出","初始化"和"登陆" //x=0,1,2分别表示首页或动态,列表页和内容页 var uName=""; var uPass=""; if(w==1) { uName=$("#loginBarName").val(); uPass=$("#loginBarPass").val(); if(!uName || !uPass)return; } $.get("Ajax.ashx", { oper: "login",name: escape2(uName),pass:escape2(uPass),state:w,x:x,time: Date() }, function(rp){ if(rp!="") { if(rp=="ok") { var s=window.location.href; window.location.replace(s); } else if(rp=="nopass") alert("密码错误!"); else if(rp=="noname") alert("用户不存在"); else if(rp=="nologin") alert("不允许登陆"); else $("#loginBarContent").html(rp); } }); } function imgopen(thisid) { if (document.getElementById('img'+thisid)) { document.getElementById('img'+thisid).src='../Images/manage/minus.gif'; document.getElementById(thisid).style.display="block"; } } function imgclose(thisid) { if (document.getElementById('img'+thisid)) { document.getElementById('img'+thisid).src='../Images/manage/plus.gif'; document.getElementById(thisid).style.display="none"; } } function trclick2(thisid) { var divTags=document.getElementsByTagName("tr"); for(var i=0;i=boxWidth || imgHeight>=boxHeight) { //比较imgBox的长宽比与img的长宽比大小 if((boxWidth/boxHeight)>=(imgWidth/imgHeight)) { //重新设置img的width和height $(this).width((boxHeight*imgWidth)/imgHeight); $(this).height(boxHeight); // //让图片居中显示 // var margin=(boxWidth-$(this).width())/2; // $(this).css("margin-left",margin); } else { //重新设置img的width和height $(this).width(boxWidth); $(this).height((boxWidth*imgHeight)/imgWidth); //让图片居中显示 var margin=(boxHeight-$(this).height())/2; $(this).css("margin-top",margin); } } }); } function leftMenuimgopen(thisid) { if (document.getElementById('img'+thisid)) { document.getElementById(thisid).style.display="block"; } } function leftMenuclick(thisid) { var divTags=document.getElementsByTagName("tr"); for(var i=0;i