var privacy =
"<span style='color: black;font-size: 14px; font-family: Comic Sans MS;'>" +
"The Brat Factor&trade; takes the protection and proper use of your personal information seriously. " +
"We respect your privacy, and take great care to safeguard information in our possession. " +
"Your preferences for use of your information are our highest priority." +
"The Brat Factor&trade; does not share customer information (including e-mail addresses) with any " +
"outside companies. For any question please email us at neenerneener@thebratfactor.com</span>";

function validateBlogForm(frm) {

	if (frm.title.text != "") {
		if (Trim(frm.title.value) == "") {
			alert("Title be filled in.");
			return false;
		}
	}

	if (Trim(frm.body.value) == "") {
		alert("Text must be filled in.");
		return false;
	}

	return true;
}


function validateRegisterForm(frm) {

	if (frm.first_name.text != "") {
		if (Trim(frm.first_name.value) == "") {
			alert("First Name must be filled in.");
			return false;
		}
	}

	if (Trim(frm.last_name.value) == "") {
		alert("Last Name must be filled in.");
		return false;
	}


	if (Trim(frm.email_address.value) == "") {
		alert("Email Address must be filled in.");
		return false;
	}

	if (Trim(frm.email_address.value) != Trim(frm.confirm_email.value)) {
		alert("Email Address must match. Please confirm that your email address is correct.");
		return false;
	}

	return true;
}

function Trim(TRIM_VALUE){
	if(TRIM_VALUE.length < 1){
		return"";
	}
	TRIM_VALUE = RTrim(TRIM_VALUE);
	TRIM_VALUE = LTrim(TRIM_VALUE);
	if(TRIM_VALUE=="") {
		return "";
	} else {
		return TRIM_VALUE;
	}
} //End Function

function RTrim(VALUE){
	var w_space = String.fromCharCode(32);
	var v_length = VALUE.length;
	var strTemp = "";
	if(v_length < 0){
		return"";
	}
	var iTemp = v_length -1;

	while(iTemp > -1){
		if(VALUE.charAt(iTemp) == w_space){
	}
	else{
		strTemp = VALUE.substring(0,iTemp +1);
		break;
	}
	iTemp = iTemp-1;

	} //End While
	return strTemp;

} //End Function

function LTrim(VALUE){
	var w_space = String.fromCharCode(32);
	if(v_length < 1){
		return"";
	}
	var v_length = VALUE.length;
	var strTemp = "";

	var iTemp = 0;

	while(iTemp < v_length) {
		if(VALUE.charAt(iTemp) == w_space){
		} else {
			strTemp = VALUE.substring(iTemp,v_length);
			break;
		}
		iTemp = iTemp + 1;
	} //End While
	return strTemp;
} //End Function

function tshirtOnChange() {
	var frm = document.getElementById('tshirtFrm');
	var shirtSize = frm.os0.value;

	if (shirtSize == 'Small' || shirtSize == 'Medium' || shirtSize == 'Large' || shirtSize == 'X Large') {
		frm.amount.value = '14.95';
	} else {
		frm.amount.value = '16.95';
	}
}

function showHideExtra(elex, eley) {
	var x;
	var y;
	if ( document.getElementById && (x = document.getElementById(elex)) &&  x.style ) {
		x.style.display = ('none' == x.style.display)? '' : '' ;
	}
	if ( document.getElementById && (y = document.getElementById(eley)) &&  y.style ) {
		if (y.style.display == '') {
			y.style.display = 'none';
		}
		//y.style.display = ('none' == y.style.display)? '' : 'none' ;
	}
}