var newwindow;
function poptastic(url){

newwindow=window.open(url,'name','height=600,width=600,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=no,status=yes');
	if (window.focus) {newwindow.focus()}
}

function goTo(url) {
	location.href=url;
}

function changeVisibility(parentID) {
document.getElementById("responseForm").style.display="block";
//document.getElementById("imgbox2").style.visibility="visible";
//document.getElementById("responseForm").style.visibility="visible";
document.forms[0].parent_id.value=parentID;
window.location.hash = 'responseForm';
//document.body.scrollTop = document.getElementById(elementId).offsetTop;
}

function selectEmail() {
var to = document.forms[0].subject.options[document.forms[0].subject.selectedIndex].value;
	if(to=="pcbug website contact form - membership") {
		document.forms[0].sendTo.value = "membership@pcbug.org";
	}
	else if(to=="pcbug website contact form - other questions or comments") {
		document.forms[0].sendTo.value = "info@pcbug.org";
	}
	else {
		document.forms[0].sendTo.value = "webmaster@pcbug.org";
	}

}



function validate(form){
	//var form = document.forms[0];
	var password = form.password.value;
	var password2 = form.password2.value;
	var email = form.emailAddress.value;
	//alert("password:"+password+" password2:" + password2);

	if (password != password2) {
	//	alert("not equal");
		document.getElementById("passwordError").style.display="block";
		return false;
	}
	
	else if(password=="" && password2=="" && email==""){
		alert("all blank");
		document.getElement.ById("emptyError").style.display="block";
		return false;
	}
	else{
	alert("all good");
	return true;
	//form.submit();
	}	
}

