// <!--
//validates the Contact Us form
function validateForm() {
	req1 = contactUs.name.value;
	req2 = contactUs.email.value;
	req3 = contactUs.marketing.value;
	regexp = /\w{1,}[\@]{1}\w{1,}[\.]{1}\w{2}/;

	if ((req1=='') || (req1==' ')) {
		alert('Your name is a required field. Please enter again.');
		return false;
	}
	if ((req2=='') || (req2==' ')) {
		alert('Your email address is a required field. Please enter again.');
		return false;
	}
	if(!regexp.test(req2)) {
		alert('The email address you entered is not valid.  Please enter again.');
		return false;
	}
	if ((req3=='') || (req3==' ')) {
		alert('Please tell us how you find out about BlackTree Media. You will help us a great deal.  Thank you.');
		return false;
	}
}


//good for QuickTime movie because it displays controls
function openVideo(url) {
  	newwindow = window.open(url, 'sub_window', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=320,height=260');
	newwindow.focus();
}


//good for opening SWF video clips
function openBigVideo(url) {
  	newwindow = window.open(url, 'sub_window', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=340,height=280');
	newwindow.focus();
}


//we are gonna use this to keep the frame pages from showing up as orphans
//this code is called by the parent page
function loadIframe(iframe_name) {
	if (location.search.length > 0) {
		loc=unescape(location.search.substring(1));
		window.frames[iframe_name].location=loc;
	}
}

// -->
