function popup(url, w, h) {
	var from_top = (screen.height - h) / 2;
	var from_left = (screen.width - w) / 2;
	var properties = 'height=' + h + ',width=' + w + ',top=' + from_top + ',left=' + from_left + ',scrollbars=no,status=no';
	
	win = window.open(url, '', properties);

	if (parseInt(navigator.appVersion) >= 4){
		win.window.focus();
	}// end if
}// end function

function popScroll(url, w, h) {
	var from_top = (screen.height - h) / 2;
	var from_left = (screen.width - w) / 2;
	var properties = 'height=' + h + ',width=' + w + ',top=' + from_top + ',left=' + from_left + ',scrollbars=yes,status=no,resize=yes';
	
	win = window.open(url, '', properties);

	if (parseInt(navigator.appVersion) >= 4){
		win.window.focus();
	}// end if
}// end function


function validateForm(){
	var probs = '';
	
	if(document.contact.from.value == ''){
		probs += '- "From" is a required field\n';
	}// end if
	
	if(document.contact.subject.value == ''){
		probs += '- "Subject" is a required field\n';
	}// end if
	
	if(document.contact.message.value == ''){
		probs += '- "Message" is a required field\n';
	}// end if
	
	if(probs != ''){
		var mess = 'Please complete this form correctly:\n';
		mess += probs;
		alert(mess);
		return false;
	} else {
		return true;
	}// end if
	
}// end of function


function clearField(fieldname){

	if (fieldname.defaultValue == fieldname.value){
		fieldname.value = "";
	}// end if

}// end of function