var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-@";
function checkDoubleBytes(str) {
	if (str == null) {
		return true;
	}
	for (i = 0;  i < str.length;  i++) {
		ch = str.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
			if (ch == checkOK.charAt(j)) break;
			if (j == checkOK.length) {
			return false;
				break;
			}
	}
}
function checkForm2() {
	var isok = true;
	var isvalid = true;
	if (document.forms.username.value=="")
		{	window.alert ("请您填写用户名!")
			document.forms.username.focus();
			return false;
		}
	if (document.forms.password.value=="")
		{
			window.alert ("请您填写密码!")
			document.forms.password.focus();
			return false;
		}
	if (checkDoubleBytes(document.forms.password.value) == false) {
		window.alert("请您在密码栏中输入字母，数字，或者下画线！")
		document.forms.password.focus();
		isok = false;
	}
	if (checkDoubleBytes(document.forms.username.value) == false) {
		window.alert("请您在账号栏中输入字母，数字，或者下画线！")
		document.forms.username.focus();
		isok = false;
	}
/**
	if (document.forms.username.value.length<6 || document.forms.username.value.length>30)
		{	window.alert ("请您填写长度在6-15个字符的用户名!")
			document.forms.username.focus();
			return false;
		}
**/
	/**
	if (document.forms.password.value.length<6 || document.forms.password.value.length>15)
		{	window.alert ("请您填写长度在6-15个字符的密码!")
			document.forms.password.focus();
			return false;
		}
	**/
	return isok;
}
function myOpen1(myurl,myname)
{
    window.open(myurl,myname,"height=300,width=310,left=100,top=100,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");
}

function myOpen(myurl,myname)
{
	window.open(myurl,myname,"height=600,width=800,left=0,top=0,menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");
}
