function getparam(name) { var reg = new regexp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r!=null)return decodeuricomponent(r[2]); return null; } function selectitem(lists, typeid) { $(lists[0]).addclass("active").siblings().removeclass("active"); for (var i = 0; i < lists.length; i++) { var href = $(lists[i]).children("a")[0].href; if (href.indexof(typeid.tostring()) > -1) { $(lists[i]).addclass("active").siblings().removeclass("active"); continue; } } } 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进行添加"); } } }