function formControls() {
	if (document.getElementById("rightForm")) {
		rightYourName = document.getElementById("rightForm").YourName;
		rightYourCompany = document.getElementById("rightForm").YourCompany;
		rightYourEmail = document.getElementById("rightForm").YourEmail;
		rightYourNumber = document.getElementById("rightForm").YourNumber;
		rightYourName.onfocus = new Function("focusValues(rightYourName, 'Your Name')");
		rightYourName.onblur = new Function("blurValues(rightYourName, 'Your Name')");
		rightYourCompany.onfocus = new Function("focusValues(rightYourCompany, 'Your Company')");
		rightYourCompany.onblur = new Function("blurValues(rightYourCompany, 'Your Company')");
		rightYourEmail.onfocus = new Function("focusValues(rightYourEmail, 'Your E-Mail')");
		rightYourEmail.onblur = new Function("blurValues(rightYourEmail, 'Your E-Mail')");
		rightYourNumber.onfocus = new Function("focusValues(rightYourNumber, 'Your Number')");
		rightYourNumber.onblur = new Function("blurValues(rightYourNumber, 'Your Number')");
	} else if (document.getElementById("ContactForm")) {
		firstName = document.getElementById("ContactForm").FirstName;
		lastName = document.getElementById("ContactForm").LastName;
		companyName = document.getElementById("ContactForm").CompanyName;
		email = document.getElementById("ContactForm").Email;
		phoneNumber = document.getElementById("ContactForm").YourNumber;
		message = document.getElementById("ContactForm").Message;
		firstName.onfocus = new Function("focusValues(firstName, 'First Name')");
		firstName.onblur = new Function("blurValues(firstName, 'First Name')");
		lastName.onfocus = new Function("focusValues(lastName, 'Last Name')");
		lastName.onblur = new Function("blurValues(lastName, 'Last Name')");
		companyName.onfocus = new Function("focusValues(companyName, 'Company Name')");
		companyName.onblur = new Function("blurValues(companyName, 'Company Name')");
		email.onfocus = new Function("focusValues(email, 'Email')");
		email.onblur = new Function("blurValues(email, 'Email')");
		phoneNumber.onfocus = new Function("focusValues(phoneNumber, 'Your Number')");
		phoneNumber.onblur = new Function("blurValues(phoneNumber, 'Your Number')");
		message.onfocus = new Function("focusValues(message, 'Message')");
		message.onblur = new Function("blurValues(message, 'Message')");
	}
}

function focusValues(formElement, val) {
	if (formElement.value == val) {
		formElement.value = "";
	}
}

function blurValues(formElement, val) {
	if (formElement.value == "") {
		formElement.value = val;
	}
}

function trimString(str) {
	str = this != window? this : str;
	return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}

function isEmpty(TmpString) {
	if (!TmpString) {
		return true;
	}
	TmpString = trimString(TmpString);
	if (TmpString.length <= 0) {
		return true;
	}
	return false;
}
