
// --- POP-UP WINDOW --- //
function displayWindow(url, width, height) {
	var theWindow = window.open(url,'','width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no,status=no,left=0,top=0');
}


// --- PHOTO POP-UP WINDOW --- //
function displayPhotoWindow(url, width, height) {
	var theWindow = window.open(url,'PhotoWindow','width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no,status=no,left=0,top=0');
}


// --- TRIM FUNCTIONS --- //
function LTrim(theString) {
	var whitespace = new String(" \t\n\r");
	var s = new String(theString);
	if (whitespace.indexOf(s.charAt(0)) != -1) {
		var j = 0;
		var i = s.length;
		while (j < i && whitespace.indexOf(s.charAt(j)) != -1) {
			j++;
		}
		s = s.substring(j, i);
	}
	return s;
}

function RTrim(theString) {
	var whitespace = new String(" \t\n\r");
	var s = new String(theString);
	if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
		var i = s.length - 1;
		while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1) {
			i--;
		}
		s = s.substring(0, i+1);
	}
	return s;
}

function Trim(theString) {
	return RTrim(LTrim(theString));
}


// --- NAV FUNCTIONS --- //
function mouseOn(theRow) {
	theRow.style.backgroundColor="#FFFF88"
	theRow.style.cursor = "hand";
}
function mouseOff(theRow) {
	theRow.style.backgroundColor="#EDE100"
	theRow.style.cursor = "";
}


// --- SUBMIT PAYPAL FORM --- //
function submitPayment() {
	document.PaymentForm.submit();
}