function checkForm(f) {
	if (f.subdomain.value.length<1) {
		f.subdomain.focus();
		return false;
	} else if (!checkStringForBadChars(f.subdomain.value)) {
		alert("Sorry, only the following characters are allowed: asdefghijklmnopqrstuvwxyz1234567890-_");
		f.subdomain.focus();
		return false;	
	}
	f.submit.disabled=true;
	return true;
}

function checkStringForBadChars(s) {
        var goodChars = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
        for (var i = 0; i < s.length; i++) {
                c = s.substring(i, i+1);
                if (goodChars.indexOf(c)==-1) {
                        return false;
                }
        }
	return true;
}

