function popup(url,w,h,s,r) {
	s = s == void 0 ? ',scrollbars=1' : '';  // default is scrollbars
	r = r == void 0 ? ',resizable=1' : '';  // default is resizable
	l = (screen.width) ? (screen.width - w)/2 : 0;
	t = (screen.height) ? (screen.height - h)/2 : 0;
	winpops = window.open(url, '', 'top='+t+',left='+l+',width='+w+',height='+h+s+r);
}

function display_qt(filename) {
	document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"\n');
    document.write('codebase="http://www.apple.com/qtactivex/qtplugin.cab"\n');
    document.write('width="320" height="256">\n');
    document.write('<param name="src" value="' + filename + '">\n');
    document.write('<param name="autoplay" value="true">\n');
	document.write('<embed src="' + filename + '"\n');
	document.write('pluginspage="http://www.apple.com/quicktime/download"\n');
    document.write('width="320" height="256" autoplay="true">\n');
	document.write('</embed></object>\n');
}

function isEmailAddr(email) {
	if (email.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) return true;
	else return false;
}

function validateEmail(theForm) {
	if (!isEmailAddr(theForm.email.value)) {
		theForm.email.focus();
		alert("Please enter a valid email address.");
		return false;
	}
	return true;
}

