var ua = navigator.userAgent.toLowerCase()
var isIE=ua.indexOf('msie') > -1
var isFF=ua.indexOf('firefox') > -1
function SetCookie(name, value){
var expdate = new Date()
var argv = SetCookie.arguments
var argc = SetCookie.arguments.length
var expires = (argc > 2) ? argv[2] : null
var path = (argc > 3) ? argv[3] : null
var domain = (argc > 4) ? argv[4] : null
var secure = (argc > 5) ? argv[5] : false
if(expires!=null) expdate.setTime(expdate.getTime() + ( expires * 1000 ))
document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires="+ expdate.toGMTString()))
+((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain))
+((secure == true) ? "; secure" : "")}
function top_domain(){
var domain,tmp=location.host.split('.'),i = tmp.length
var hz = tmp[(i-1)]
var hz2 = tmp[(i-2)]
if( hz2=='net' || hz2=='com' || hz2=='org'  ){return tmp[(i-3)]+"."+hz2+"."+hz}
return tmp[(i-2)]+"."+tmp[(i-1)]}
function GetCookie(n){
var aCookie = document.cookie.split("; ")
for(var i=0; i < aCookie.length; i++){
var aCrumb = aCookie[i].split("=")
if(n == aCrumb[0])	return unescape(aCrumb[1])
}return null}
function DelCookie(name){
var exp = new Date()
exp.setTime (exp.getTime() - 1)
var cval = GetCookie(name)
document.cookie = name + "=" + cval + "; expires="+ exp.toGMTString()}
function his(n,l){
ll=sE.href.length
if( location.href.substr(0,13) == sE.href.substr(0,13) ) return
if(l.substr(0,4)!='http' ) return
l = (l.replace(/</g,"&lt;")).replace(/>/g,"&gt;")
n = n.replace(/<[^>]+>/g,"")
if(n.length>12) n = n.substring(0,12)
var hisstr=GetCookie('ckhis'),hisarr=new Array()
if( hisstr != null ) hisarr=hisstr.split('^^')
if(n=='' || l=='') return
var tmp = new Array(),row
if(typeof(hisarr) == 'object'){
if(hisarr.length > 14) delete(hisarr[0])
for(v in hisarr){row = hisarr[v].split('**');tmp[row[0]] = row[1]}
if( typeof(tmp[n]) != 'undefined' ) delete(tmp[n])
hisarr=new Array()
for(v in tmp)if( tmp[v] != 'undefined') hisarr.push(v+'**'+tmp[v])}
hisarr.push(n+'**'+l)
ck('ckhis',hisarr.join('^^'))
if($('nav2') && $('nav2').src=='lsjl.html')	frame('nav2').location.reload()
}
function ck(n,v){SetCookie(n,v,94608000,'/',top_domain())}
function frame(n){return (isFF)?document.getElementById(n).contentWindow:document.frames[n]}
function getPos(el){
var r = {'x':el.offsetLeft,'y':el.offsetTop}
if(el.offsetParent){
var tmp = getPos(el.offsetParent)
r.x += tmp.x;r.y += tmp.y
}return r}
function regE(n,e,f){if(window.attachEvent)	n.attachEvent(e,f);	else n.addEventListener(e.replace(/^on/,''),f,false)}
function $(obj){return document.getElementById(obj)}
function os(obj){return $(obj).style}


function search4()
{
if(document.form1.abc[0].checked) window.open("http://www.baidu.com/s?tn=5xwz_pg&word="+form1.key.value,"mspg6");
if(document.form1.abc[1].checked) window.open("http://www.google.cn/search?hl=zh-CN&q="+form1.key.value,"mspg4");
if(document.form1.abc[2].checked) window.open("http://mp3search.baidu.com/wstsearch?tn=baidump3&ct=134217728&lm=-1&rn=&word="+form1.key.value,"mspg7");
if(document.form1.abc[3].checked) window.open("http://mp3search.baidu.com/wstsearch?tn=baidump3lyric&ct=150994944&lm=-1&rn=&word="+form1.key.value,"mspg9");
if(document.form1.abc[4].checked) window.open("http://www.baidu.com/i?ct=201326592&cl=2&lm=-1&tn=baiduimage&word="+form1.key.value,"mspg11");
if(document.form1.abc[5].checked) window.open("http://post.baidu.com/f?kw="+form1.key.value,"mspg0");
if(document.form1.abc[6].checked) window.open("http://zhidao.baidu.com/q?ct=17&pn=0&tn=ikaslist&rn=10&word="+form1.key.value,"mspg5");
if(document.form1.abc[7].checked) window.open("http://news.baidu.com/ns?cl=2&rn=20&tn=news&word="+form1.key.value,"mspg15");
if(document.form1.abc[8].checked) window.open("http://www.gougou.com/search?id=1&search="+form1.key.value,"mspg18");
if(document.form1.abc[9].checked) window.open("http://www.baidu.com/s?tn=5xwz&word="+form1.key.value+"%20site%3Awww.5xwz.com","mspg12");
if(document.form1.abc[10].checked) window.open("http://www.baidu.com/baidu?ie=gb2312&bs=&sr=&z=&ct=1048576&cl=3&f=8&word="+form1.key.value,"mspg16");
if(document.form1.abc[11].checked) window.open("http://map.baidu.com/m?word="+form1.key.value,"mspg14");
if(document.form1.abc[12].checked) window.open("http://www.baidu.com/baidu?ft=all&q1="+form1.key.value,"mspg10");
if(document.form1.abc[13].checked) window.open("http://video.baidu.com/v?ct=301989888&rn=20&pn=0&db=0&s=0&word="+form1.key.value,"mspg3");
if(document.form1.abc[14].checked) window.open("http://cn.search.yahoo.com/search?p="+form1.key.value,"mspg2");
if(document.form1.abc[15].checked) window.open("http://baike.baidu.com/w?ct=17&lm=0&tn=baiduWikiSearch&pn=0&rn=10&word="+form1.key.value+"&submit=search","mspg13");
if(document.form1.abc[16].checked) window.open("http://www.sogou.com/web?sogouhome=&shuru=shou&query="+form1.key.value,"mspg1");
if(document.form1.abc[17].checked) window.open("http://www.soso.com/q?w="+form1.key.value,"mspg17");

return false;}