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(n.substr(0,2)=='¸ü¶à') return
if(l.substr(0,4)!='http' ) return
l = (l.replace(/</g,"&lt;")).replace(/>/g,"&gt;")
n = (n.replace(/</g,"&lt;")).replace(/>/g,"&gt;")
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}