function OpenInfoPop (PKPageBlock,PageID) {
	var MyPath = jsFullPath + "infopop.asp?pb=" + PKPageBlock + "&id=" + PageID;

	var myWin = window.open(MyPath, "InfoPop", "top=100,left=100,height=400, width=400, toolbar=no, scrollbars=yes");

}

function OpenInfoDisp (QueryString) {
	var MyPath = jsFullPath + "infodisp.asp?" + QueryString;

	var myWin = window.open(MyPath, "infodisp", "top=100,left=100,height=500, width=500, toolbar=no, scrollbars=yes");

}


function GoNoHistory (sPath){
// navigates to the given page without leaving the current one in history
	var sNewLocation = jsFullPath + sPath;

	window.location.replace(sNewLocation);

}

function GoWithHistory (sPath){
// navigates to the given page and leaves the current one in history
	var sNewLocation = jsFullPath + sPath;

	//alert (sNewLocation);

	//return;

	window.location = sNewLocation;

}

function GoHome(NoHistory){
	if (NoHistory == true)
	{
		GoNoHistory("info.asp?pb=1&id=1");

	}
	else
	{
		GoWithHistory("info.asp?pb=1&id=1");

	}
}

function ValidateEmail(theForm)
{
	var sEmail = theForm.emailaddress.value

	if (sEmail.length == 0)
	{
		alert("You must enter a valid e-mail address.")
		return false;

	}
	return true;

}

function isEmail(string) 
{
if (string.length == 0)
	return false;
	
if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
	return true;

else
	alert('That E-mail address appears to be invalid.\n\nIf you are certain the address is valid,\nplease notify us at support@wiredmusician.net.');

	return false;

}

function ValidateMemberInfo(form){     
//	var pw1 = form.password.value;

//  var pw2 = form.reenterpassword.value;

//	var username = form.username.value;

	var firstname = form.firstname.value;

	var lastname = form.lastname.value;

	var email = form.email.value;

	
	
	if(firstname.length == 0)
	{
	    alert("Please enter a first name.");

	    return false;

	} 
	if(lastname.length == 0)
	{
	    alert("Please enter a last name.");

	    return false;

	} 
	if(email.length == 0)
	{
	    alert("Please enter a valid E-mail address.");

	    return false;

	} 
	else
	{
		return isEmail(email);

	}

  	return true;


}