//登陆框内文字 function inputTipText(){ $("input[class*=grayTips]") .each(function(){ var oldVal=$(this).val(); $(this) .focus(function(){ if($(this).val()!=oldVal){$(this).css({"color":"#000"})}else{$(this).val("").css({"color":"#959595"})} }) .blur(function(){ if($(this).val()==""){$(this).val(oldVal).css({"color":"#959595"})} }) .keydown(function(){$(this).css({"color":"#000"})}) }) } $(function(){ inputTipText(); }) //所有期刊名称列表26个字母切换 function setTab(name,cursel,n){ for(i=1;i<=n;i++){ var menu=document.getElementById(name+i); var con=document.getElementById("con_"+name+"_"+i); menu.className=i==cursel?"gr":""; con.style.display=i==cursel?"block":"none"; } } //产品搜索更多 function openShutManager(oSourceObj,oTargetObj,shutAble,oOpenTip,oShutTip){ var sourceObj = typeof oSourceObj == "string" ? document.getElementById(oSourceObj) : oSourceObj; var targetObj = typeof oTargetObj == "string" ? document.getElementById(oTargetObj) : oTargetObj; var openTip = oOpenTip || ""; var shutTip = oShutTip || ""; if(targetObj.style.display!="none"){ if(shutAble) return; targetObj.style.display="none"; if(openTip && shutTip){ sourceObj.innerHTML = shutTip; } } else { targetObj.style.display="block"; if(openTip && shutTip){ sourceObj.innerHTML = openTip; } } } // 加入收藏 function addBookmark(title,url) { if (window.sidebar) { window.sidebar.addPanel(title,url,""); } else if( document.all ) { window.external.AddFavorite(url,title); } else if( window.opera && window.print ) { return true; } } function setHome(url) { if (document.all){ document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage(url); }else if (window.sidebar){ if(window.netscape){ try{ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }catch (e){ } } if(window.confirm("你确定要设置"+url+"为首页吗?")==1){ var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage',url); } } }