
function checkText(desctext) {

var rude = "";
reg2 = /^.*\n*( bitch | cunt | fuck|penis |sonofabitch )+.*\n*$/i
if (reg2.test(desctext.value))
{ 
rude = "Your entry appears to contain inappropriate language.\n\n Please try to keep it decent.";
}

var wrongtype = "";
reg3 = /^.*\n*(!!!!)+.*\n*$/i
if (reg3.test(desctext.value))
	{ 
	wrongtype = "Whoa, easy with those exclamation marks!";
 	}

if ( rude != "" || wrongtype != "" ) {
alert (rude+wrongtype+"\n\n");
}
}


function checkPass(desctext) {
var obvious = "";
if (desctext.value == "password" | desctext.value == "pass"  | desctext.value == "12345"  )
{
obvious = "Your password is too easy to guess. Please choose another.\n\n";
}

var same = "";
if (desctext.value == profileform.login.value  )
{
obvious = "Please choose a password that is different from your login name.\n\n";
}

var tooshort = "";
if (desctext.value.length < 4 )
	{ 
	tooshort = "Your password is too short. Please use at least 4 characters.\n\n";
 	}
if (obvious != "" || tooshort != "" || same != "") {
alert ("There are some problems with your password:\n\n"+obvious+tooshort+same);
}
}

function checkPassUpdate(desctext) {
var obvious = "";
if (desctext.value == "password" | desctext.value == "pass"  | desctext.value == "12345"  )
{
obvious = "Your password is too easy to guess. Please choose another.\n\n";
}

var tooshort = "";
if (desctext.value.length < 4 )
	{ 
	tooshort = "Your password is too short. Please use at least 4 characters.\n\n";
 	}

if (obvious != "" || tooshort != "") {
alert ("There are some problems with your password:\n\n"+obvious+tooshort);
}
}