function usernamecheck() {
	if (!formIsValid()) return;
	var username = document.addurl.username.value;
	var width = 350;
	var height = 150;
	var y = (screen.height - height) / 2;
	var x = (screen.width - width) / 2;
	var options = "width=" + width + ",height=" + height + ",top=" + y + ",left=" + x + ",resizable=no";
	window.open("usernamecheck.asp?username=" + username,"_blank",options);
}
function formIsValid() {
	if ( document.addurl.username.value == "" ) {
		alert('帳號欄位不可空白!');
		return false;
	}

var re = /[0-9a-z]{1,}/;
        var str = document.addurl.username.value;
        var result = str.match(re);
        if (result == null || result != str) {
                alert("只允許輸入小寫英文字母及數字");
return false;
	}

	return true;

}