<!--
	function tearoff (url, name, width, height){
		window.name = 'PUMain';
		tearWin=window.open(url, name, 'personalbar=no,toolbar=no,status=no,scrollbars=yes,location=no,resizable=yes,menubar=yes,width=' + width + ',height=' + height);
		if(window.focus) {
			tearWin.focus();
		}
	}

	function tearoffNoFocus (url, name, width, height){
		window.name = 'PUMain';
		tearWin=window.open(url, name, 'personalbar=no,toolbar=no,status=yes,scrollbars=yes,location=no,resizable=yes,menubar=yes,width=' + width + ',height=' + height);
		return tearWin;
	}

	function toggleLayer( whichLayer ){
		var elem, vis;
		
		if( document.getElementById ) {
			elem = document.getElementById( whichLayer );}
		else if( document.all ) {
			elem = document.all[whichLayer];}
		else if( document.layers ) {
			elem = document.layers[whichLayer];}
			
		vis = elem.style;
		
		// if the style.display value is blank we try to figure it out here
		if(vis.display=='' && elem.offsetWidth != undefined&&elem.offsetHeight != undefined){
			vis.display = (elem.offsetWidth != 0 && elem.offsetHeight != 0) ? 'block' : 'none';}
			
		vis.display = (vis.display=='' || vis.display == 'block') ? 'none' : 'block';
		
		document.formcomment.name.focus()
	}
	
	
	
	function processCommentForm(theForm) {
		var reason = "";
		reason += validateEmpty(theForm.name, "Name is required");
		reason += validateEmpty(theForm.comment, "Comment is required");
		//reason += validateEmail(theForm.email);
		if (reason != "") {
			alert("Some fields need correction:\n\n" + reason);
			return false;
		}
		else{
			theForm.submit();
		}

		return true;
	}
	
	
	function validateEmpty(fld, message) {
		var error = "";

		if (fld.value.length == 0) {
			fld.style.background = 'Yellow'; 
			error = "   - " + message + "\n"
		} 
		else {
			fld.style.background = 'White';
		}
		return error;  
	}
	
	
	function trim(s){
		return s.replace(/^\s+|\s+$/, '');
	}
	
	
	function validateEmail(fld) {
		var error="";
		var tfld = trim(fld.value);                        // value of field with whitespace trimmed off
		var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;
		var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;

		if (fld.value != "" && !emailFilter.test(tfld)) {              //test email for illegal characters
			fld.style.background = 'Yellow';
			error = "   - Email address is not valid.\n";
		} 
		else if (fld.value.match(illegalChars)) {
			fld.style.background = 'Yellow';
			error = "   - Email address contains illegal characters.\n";
		} 
		else {
			fld.style.background = 'White';
		}
		return error;
	}

-->






