function openWindow(URL,WIDTH,HEIGHT) {
	window.open(URL,"popup_" + WIDTH + "_" + HEIGHT,"width=" + WIDTH + ",height=" + HEIGHT + ",scrollbars=no");
}

function openScrollWindow(URL,WIDTH,HEIGHT) {
	window.open(URL,"popup_" + WIDTH + "_" + HEIGHT,"width=" + WIDTH + ",height=" + HEIGHT + ",scrollbars=yes");
}

function verifyForm () {
	var form = document.signup_form;


	if (form.x_First_Name.value.length <= 0) {
		alert ("You must tell us your first name.");
		return false;
	}

	if (form.x_Last_Name.value.length <= 0) {
		alert ("You must tell us your last name.");
		return false;
	}

	if (form.x_Address.value.length <= 0) {
		alert ("You must tell us your street address.");
		return false;
	}

	if (form.x_City.value.length <= 0) {
		alert ("You must tell us your city.");
		return false;
	}

	if (form.x_State.selectedIndex <= 0) {
		alert ("You must tell us your state.");
		return false;
	}

	if (form.x_Zip.value.length <= 0) {
		alert ("You must tell us your zip code.");
		return false;
	}

	if (form.homephone.value.length < 10) {
		alert ("You must tell us your home phone number, including area code (ex: 801-123-4567).");
		return false;
	}

	if (form.workphone.value.length < 10) {
		alert ("You must tell us your daytime phone number, including area code (ex: 801-123-4567).");
		return false;
	}

	if (form.email.value.length <= 0) {
		alert ("You must tell us your valid email address.  This is required so we can send you membership information.");
		return false;
	}

	if (form.password.value.length <= 3) {
		alert ("You must tell us your password, at least 4 characters in length.");
		return false;
	}
	if (form.passwordConfirm.value.length <= 0) {
		alert ("You must cofirm your password.");
		return false;
	}
	if (form.password.value != form.passwordConfirm.value) {
		alert ("Password confirmation failed.  Password does not match confirmation");
		return false;
	}


	if (form.agreementAndTerms.checked == false) {
		alert("You must agree to the Scrapola.com terms of service / billing agreement.");
		return false;
	}

	return true;
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}