
function fresh(img){
    var src=img.getAttribute("src");
    src=src+"?new="+Math.random(0,10);
    img.setAttribute("src",src);
}

function prepare(){
    var nav=document.getElementById("fresh");
    var name=nav.getAttribute("name");
    var str="fresh";
    if(name==str){
        nav.onclick=function(){
            var img=document.getElementById("img");
            fresh(img);
            return false;
        }
    }
}
window.onload=prepare;

function chklogin(formct){
	if (formct.username.value=='' ){
		alert('会员名为空，请填写会员名');
		return false; 
	}
	if (formct.password.value=='' ){
		alert('密码为空，请填写登录密码');
		return false; 
	}
	if (formct.code.value=='' ){
		alert('验证码为空，请填写验证码');
		return false; 
	}
}