function turnToRegPage()
{
        window.location.href="register.jsp";
}


function checkLogin(form)
{
        if (form.username.value == "") {
                alert("Username can't be null!");
                form.username.focus();
                return(false);
        }

        if (form.username.value.length > 20 ||
                form.username.value.length < 1) {
                alert("Username can consist of 1-20 characters and numbers only!");
                form.username.focus();
                return(false);
        }

        if (form.password.value == "") {
                alert("Password can't be null!");
                form.password.focus();
                return(false);
        }

        if (form.password.value.length > 30 ||
                form.password.value.length < 6) {
                alert("Password can consist of 6-16 characters and numbers only!");
                form.password.focus();
                return(false);
        }

        if (form.checkcode.value == "") {
                alert("Checkcode can't be null!");
                form.username.focus();
                return(false);
        }
        if (form.checkcode.value.length > 4 ||
                form.checkcode.value.length < 4) {
                alert("Checkcode can consist of 4 numbers only!");
                form.password.focus();
                return(false);
        }
    //    if (form.set_homepage.checked == true) {
	//	form.style.behavior="url(#default#homepage)";
	//	form.setHomePage("http://www.ftchinese.com");
	//}

}
//var ad_logon = 0;
//if (getCookie("sessionid")!=null) {
//  ad_logon = 1;
//}

