function siteclick(){
	var obj = event.srcElement;
	if(obj.tagName!='A') obj=obj.parentNode;
	if(typeof(obj)!='object') return;
	if(obj.tagName=='A'){
		var link=obj.href;
		if(link.indexOf('http://')==0){
		    link=obj.href.substr(10);
		   	link=link.substr(link.indexOf('/')+1);
		}
		if(link.indexOf('c')==0 || link.indexOf('bannerpublish')==0){
		    if(currentuid==0){
			    document.getElementById('lktitle').innerHTML='<img src="image/info.png" alt="提醒" title="提醒" />&nbsp;请登录';
		    	document.getElementById('lkcontent').innerHTML='<form action="memberlogin.html" method="post" name="loginform" id="loginform" onsubmit="return checklogin();"><input type="hidden" name="action" value="'+link+'" /><table><tr height="30"><td>用户名：</td><td><input type="input" name="username" class="input3" value="账户/邮箱/ID" onfocus="this.value=\'\'" /><span class="fontred">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;提示：登录后服务功能更完善</span></td></tr><tr height="30"><td>密　码：</td><td><input type="password" name="password" class="input3" /></td></tr><tr height="30"><td>验证码：</td><td><input type="text" name="checkkey" class="input2" /><img  style="border:#000000 1px solid;cursor:pointer" alt="点击图片换验证码" src="a.html" onClick="this.src=\'a.php?time=\'+(new Date).getTime()" align="absmiddle" width="100" height="26" /></td></tr><tr height="30"><td></td><td><input type="checkbox" name="remember" id="remember" value="1" /><label for="remember">记住我</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="image" id="loginbutton" src="image/login2.gif" align="absmiddle" /></td></tr><tr height="30"><td></td><td align="left"><a href="register.html" ><img src="image/quickreg.gif" alt="" title="" align="absmiddle" /></a>　<a href="findpwd.html">忘记密码</a></td></tr></table></form>';
		    	document.getElementById('lkbg').style.display='';
		    	document.getElementById('lkbox').style.display='';
		    	document.getElementById("lkbg").style.top = document.body.scrollTop;
	            document.getElementById("lkbox").style.top = document.body.scrollTop+100;
				return false;
			}
		}
	}
}
var path=location.pathname.substr(1);
if(path.substr(0, 4)=='user') path=path.substr(4, 3);
else if(path.charAt(0)=='c') path=path.substr(1, 3);
else path=path.substr(0, 3);
try{
    var dom=document.getElementById('menu'+path);
	dom.setAttribute('class', 'mainmenusel');
	dom.setAttribute('className', 'mainmenusel');
}catch(e){}
if (document.all){ 
    document.body.attachEvent("onclick", siteclick);
}else{ 
    window.onclick=function(event){
	    var obj=event.target;
		if(obj.tagName!='A') obj=obj.parentNode;
		try{
		if(obj.tagName=='A'){
	    	var link=obj.href;
			if(link.indexOf('http://')==0){
			    link=obj.href.substr(10);
			   	link=link.substr(link.indexOf('/')+1);
			}
			if(link.indexOf('c')==0 || link.indexOf('bannerpublish')==0){
			    if(currentuid==0){
				    document.getElementById('lktitle').innerHTML='<img src="image/info.png" alt="提醒" title="提醒" />&nbsp;请登录';
			    	document.getElementById('lkcontent').innerHTML='<form action="memberlogin.html" method="post" name="loginform" id="loginform" onsubmit="return checklogin();"><input type="hidden" name="action" value="'+link+'" /><table><tr height="30"><td>用户名：</td><td><input type="input" name="username" class="input3" value="账户/邮箱/ID" onfocus="this.value=\'\'" /><span class="fontred">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;提示：登录后服务功能更完善</span></td></tr><tr height="30"><td>密　码：</td><td><input type="password" name="password" class="input3" /></td></tr><tr height="30"><td>验证码：</td><td><input type="text" name="checkkey" class="input2" /><img  style="border:#000000 1px solid;cursor:pointer" alt="点击图片换验证码" src="a.html" onClick="this.src=\'a.php?time=\'+(new Date).getTime()" align="absmiddle" width="100" height="26" /></td></tr><tr height="30"><td></td><td><input type="checkbox" name="remember" id="remember" value="1" /><label for="remember">记住我</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="image" id="loginbutton" src="image/login2.gif" align="absmiddle" /></td></tr><tr height="30"><td></td><td align="left"><a href="register.html" ><img src="image/quickreg.gif" alt="" title="" align="absmiddle" /></a>　<a href="findpwd.html">忘记密码</a></td></tr></table></form>';
			    	document.getElementById('lkbg').style.display='';
			    	document.getElementById('lkbox').style.display='';
			    	document.getElementById("lkbg").style.top = document.body.scrollTop;
	    	        document.getElementById("lkbox").style.top = document.body.scrollTop+100;
			    	return false;
				}
			}
		}
		}catch(e){};
	}
}

window.onscroll = function () {
	var div=document.getElementById("notice");
	if(document.body.scrollTop + document.body.clientHeight < document.getElementById("bottompos").offsetTop+20){
	    div.style.top = document.body.scrollTop + document.body.clientHeight-19;
		document.getElementById("lkbg").style.top = document.body.scrollTop;
	    document.getElementById("lkbox").style.top = document.body.scrollTop+lktopheight;
	}
	
};
window.onresize = function () {
	var div=document.getElementById("notice");
	if(document.body.scrollTop + document.body.clientHeight < document.getElementById("bottompos").offsetTop+20){
	    div.style.top = document.body.scrollTop + document.body.clientHeight-19;
		document.getElementById("lkbg").style.top = document.body.scrollTop;
	    document.getElementById("lkbox").style.top = document.body.scrollTop+lktopheight;
	}
	
};
setTimeout('var div=document.getElementById("notice"); div.style.display=""; if(document.body.scrollTop + document.body.clientHeight < document.getElementById("bottompos").offsetTop+20){   div.style.top = document.body.scrollTop + document.body.clientHeight-19;	document.getElementById("lkbg").style.top = document.body.scrollTop;    document.getElementById("lkbox").style.top = document.body.scrollTop+lktopheight;}', 2000 );

refresh();