// opens a new window w/o address bar
function openWindow(page)
{
	window.open(page,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=400");
}
// opens a new window w/ address bar
function openWindowWithLocation(page)
{
	window.open(page,"_blank","toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=400");
}
// used by the aweber.php script
// if the AweberFormFields value (passed as the argument) is null or blank, it prompts the user
// to make the change or allow jim to handle the emails
function TestValue( aweber )
{
	if( aweber == null || aweber == "" ) {
		confirm('You didn\'t provide the Aweber Field data!\nIf you want Jim to handle the Aweber account, click OK, otherwise click Cancel and add this information.');
		return false;
	} else {
		return true;	
	}
}
// used to dynamically hide/show the border around a completed form
function displayBorder( value ) {
	if( value == "yes" ) {
		action = "visible";
	} else {
		action = "hidden";
	}
	// set the id's with the action above
	for( i = 1; i <= 8; i++ ) {
		id = 'borderId' + i.toString();
		document.getElementById( 'borderId' + i.toString() ).style.visibility = action;
	}
}
// confirm that the TOS were accepted
function verifyAccept() {
	if( document.getElementById('tosAcceptId').checked ) {
		document.getElementById('tos').style.display = 'none';
		document.getElementById('downloadText').style.display = '';
	}
}
// check a text box for double-quotes while the user types
function noQuotesCheck( e ) {
	var key;
	var keychar;
	
	if( window.event ) {
		key = window.event.keyCode;
	}
	else if( e ) {
		key = e.which;
	}
	else {
		return true;
	}
	keychar = String.fromCharCode( key );
	if( key == 34 ) {
		return false;
	} else {
		return true;
	}
}