function openNew(urlToOpen){
	window.open(urlToOpen, '', 'height=350,width=650,scrollbars=yes,resizable=no,location=no');
}

function openPayoutTable(urlToOpen){
	window.open(urlToOpen, "FreeMyMusic", "height=700,width=1000,location=no,menubar=no,resizable=no,titlebar=yes,scrollbars=yes");
}


function postback(url){

	var root = document.form3;
    var url  = url;

    root.action = url;
    root.method = "POST";
    root.submit();


}//End postback


function valSendToFriend(){

	var errorCount = 0;
	var errorMessage = "";

	if(document.form_sendtoafriend.firstName.value.length == 0){
		errorCount++;
		errorMessage += "*	Enter a Name\n"
	}
	

	var valid = false;
	for(counter = 0; counter < document.form_sendtoafriend.emailtype.length; counter++){
		if(document.form_sendtoafriend.emailtype[counter].checked){
			valid = true;
		}
	}
	
	if(!valid){
		errorCount++;
		errorMessage += "*	Select the Type of Email to Send\n"
	}
	
	
	if(errorCount > 0 ){
	
		errorMessage = "There was an error with your form.  Please review the below items and correct\n==================================================\n"+errorMessage;
		alert(errorMessage);
		return false;
	
	}else{
	
		return true;
		
	}

}

function goTo(URL){

	var URL;
	document.location = URL;

}



function returnHome(){
	document.location = "http://www.freemymusic.com";
}

function viewMyPost(fid, cid){

	var fid = fid;
	var cid = cid;
	
	document.location = "detailedinfo.php?fid="+fid+"&cid="+cid+"";
	
}

function confirmDeleteVote(){


	
	if(confirm("Are you sure you want to retract your vote?")){
	
		return true;
	}else{
		return false;
	}
	
}//End


function fanClubMap(bandId){

	var bandId = bandId;
	var page   = "fanclubmap.php?bid="+bandId;
	
	window.open(page, '', 'height=446,width=800')


}