function sethome(obj,url){ try{ obj.style.behavior='url(#default#homepage)'; obj.sethomepage(url); }catch(e){ if(window.netscape){ try{ netscape.security.privilegemanager.enableprivilege("universalxpconnect"); }catch(e){ alert("抱歉,此操作被浏览器拒绝!\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'"); } }else{ alert("抱歉,您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+url+"】设置为首页。"); } } } function addfavorite(title, url) { try { window.external.addfavorite(url, title); } catch (e) { try { window.sidebar.addpanel(title, url, ""); } catch (e) { alert("抱歉,您所使用的浏览器无法完成此操作。\n\n加入收藏失败,请进入新网站后使用ctrl+d进行添加"); } } } function dy_scroll(wraper,prev,next,img,speed,or) { var wraper = $(wraper); var prev = $(prev); var next = $(next); var img = $(img).find('ul'); var w = img.find('li').outerwidth(true); var s = speed; next.click(function() { img.animate({'margin-left':-w},function() { img.find('li').eq(0).appendto(img); img.css({'margin-left':0}); }); }); prev.click(function() { img.find('li:last').prependto(img); img.css({'margin-left':-w}); img.animate({'margin-left':0}); }); if (or == true) { ad = setinterval(function() { next.click();},s*1000); wraper.hover(function(){clearinterval(ad);},function(){ad = setinterval(function() { next.click();},s*1000);}); } } $(function(){ var cname=""; $("#topnav li").hover(function(){ cname=$(this).attr("class"); if(!cname){$(this).addclass("hover");} $("dl",this).show(); },function(){ $("dl",this).hide(); if(!cname){$(this).removeclass("hover");} }); // dy_scroll('.pro_width','.arrow_left','.arrow_right','.pro_width',5,true); }) function checksearch(the) { if ($.trim(the.key.value)=='') { alert('请输入关键字'); the.key.focus(); the.key.value=''; return false } if ($.trim(the.key.value)=='请输入关键字') { alert('请输入关键字'); the.key.focus(); the.key.value=''; return false } } //回顶部 window.onload = function () { var topbtn = document.getelementbyid("top"); var timer = null; var pagelookheight = document.documentelement.clientheight; topbtn.onclick = function () { timer = setinterval(function () { var backtop = document.body.scrolltop; var speedtop = backtop/4; document.body.scrolltop = backtop -speedtop; if(backtop ==0){ clearinterval(timer); } }, 20); } } $(document).ready(function(){ $('.menu-kj2').each(function(){ if ($(this).has('li').length == 0){ $(this).remove(); } }); });