function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}
function OpenBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
function IsNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;
   for (i = 0; i < sText.length && IsNumber == true; i++) { 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) {
			IsNumber = false;
		}
	}
   return IsNumber;
}
function CheckFormPhotos(){
	var msg;
	msg = '';
	if(document.PhotosForm.Category.value==''){
		msg = 'Please choose a category to list this under.';
	}
	if(document.PhotosForm.FILE1.value==''){
		if(msg==''){
			msg = 'Please browse for a photo and then upload.';	
		}else{
			msg = msg + '\nBrowse for a photo too, yahoo...';	
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}

function CheckFormLyric(){
	var msg;
	msg = '';
	if(document.LyricForm.Category.value==''){
		msg = 'Please choose a category to list this under.';
	}
	if(document.LyricForm.Title.value==''){
		if(msg==''){
			msg = 'Please add a title for this lyric entry.';	
		}else{
			msg = msg + '\nPlease add a title for this lyric entry';	
		}
	}
	if(document.LyricForm.Words.value==''){
		if(msg==''){
			msg = 'Please add words for this lyric entry.';	
		}else{
			msg = msg + '\nPlease add words for this lyric entry';	
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormProducts(){
	var msg;
	msg = '';
	if(document.ProductsForm.Category.value==''){
		msg = 'Please choose a category to list this under.';
	}
	if(document.ProductsForm.FILE1.value==''){
		if(msg==''){
			msg = 'Please browse for a photo and then upload.';	
		}else{
			msg = msg + '\nBrowse for a photo too, yahoo...';	
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormSongs(){
	var msg;
	var barrefVariable;
	barrefVariable = '';
	barrefVariable = SongsForm.barrefVar.value;
	msg = '';
	if(document.SongsForm.Artist.value==''){
		msg = 'Please choose an artist for this song.\n';
	}
	if(document.SongsForm.SongTitle.value==''){
		msg += 'Please choose a title for this song.\n';
	}
	if(!IsNumeric(document.SongsForm.OrderNumber.value)) {
		msg += 'Please use a number for the order of the song.\n';
	}
	if(document.SongsForm.SongCount.value>=10){
		msg += 'You have uploaded the maximum of 10 songs.\nPlease delete one to upload another.';
	}
	if(document.SongsForm.Mp3.value==''){
		if(msg==''){
			msg = 'Please browse for a song and then upload.';	
		}else{
			msg = msg + '\nBrowse for a song.';	
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	document.getElementById('waitingSong').innerHTML='Uploading Song Item...<br><br>This may take up to 5 minutes if your<br>Mp3 is large or your connection is slow.<br>Please be patient.&nbsp;&nbsp;Thanks...';
	/*return ShowProgress(barrefVariable);*/
	return true;
}
function ShowProgress(barrefVar)
{
  	strAppVersion = navigator.appVersion;
	if (strAppVersion.indexOf('MSIE') != -1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4)
	{
	  winstyle = "dialogWidth=385px; dialogHeight:140px; center:yes";
	  window.showModelessDialog(barrefVar + '&b=IE',null,winstyle);
	}
	else
	{
	  window.open(barrefVar + '&b=NN','','width=370,height=115', true);
	}
  return true;
}
function CheckFormCategories(){
	var msg;
	msg = '';
	if(document.AddCategoryForm.Name.value==''){
		msg = 'Please choose a title for this category.';
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormMessageboard(){
	var msg;
	msg = '';
	if(document.MessageboardForm.Comments.value==''){
		msg = 'Please enter comments to insert.';
	}
	if(document.MessageboardForm.Security.value==''){
		if(msg==''){
			msg = 'Please enter your security combination.';	
		}else{
			msg = msg + '\nPlease enter your security combination.';	
		}
	}
	if(document.MessageboardForm.Email.value!=''){
		email = document.MessageboardForm.Email.value
		AtPos = email.indexOf("@")
		StopPos = email.lastIndexOf(".")
		
		if (AtPos == -1 || StopPos == -1) {
			if(msg==''){
				msg = 'Please enter a valid email address.';	
			}else{
				msg = msg + '\nPlease enter a valid email address.';	
			}
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormNewsEntry(){
	var msg;
	msg = '';
	if(document.AddNewNewsForm.Title.value==''){
		msg = 'Please enter a title for this News entry.';
	}
	if(document.AddNewNewsForm.Summary.value==''){
		if(msg==''){
			msg = 'Please enter a quick summary for this news entry.';
		}else{
			msg += '\nPlease enter a quick summary for this news entry.';
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormResources(){
	var msg;
	msg = '';
	if(document.ResourcesForm.Text.value==''){
		msg = 'Ya gotta give this guy a title!';
	}
	if(document.ResourcesForm.Link.value==''){
		if(msg==''){
			msg = 'Please give this resource/link a URL to go to.';	
		}else{
			msg = msg + '\nPlease give this resource/link a URL to go to';	
		}
	}
	if(document.ResourcesForm.Category.value==''){
		if(msg==''){
			msg = 'Please choose a category to list this under.';	
		}else{
			msg = msg + '\nPlease choose a category to list this under.';	
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormPress(){
	var msg;
	msg = '';
	if(document.PressForm.ArticleTitle.value==''){
		msg = 'Ya gotta give this guy a title!';
	}
	if(document.PressForm.Content.value==''){
		if(msg==''){
			msg = 'Please enter some content.';	
		}else{
			msg = msg + '\nPlease enter some content.';	
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormContactUs(){
	var msg;
	msg = '';
	if(document.ContactForm.Name.value==''){
		msg = 'Please enter your name.';
	}
	if(document.ContactForm.Comments.value==''){
		if(msg==''){
			msg = 'Please enter some comments in the form.';	
		}else{
			msg = msg + '\nPlease enter some comments in the form.';	
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}else{
		return true;
	}
}
function CheckFormShows(){
	var msg;
	msg = '';
	if(document.ShowsForm.Month.value==''||document.ShowsForm.Day.value==''||document.ShowsForm.Year.value==''){
		msg = 'Please enter a date for this show.';
	}
	if(document.ShowsForm.Venue.value==''){
		if(msg==''){
			msg = 'Please enter the venue-location of this show.';	
		}else{
			msg = msg + '\nPlease enter the venue-location of this show.';	
		}
	}
	if(document.ShowsForm.VLink.value!=''){
		if(ShowsForm.VLink.value.indexOf('http://www.')==-1){
			if(msg==''){
				msg = 'Please enter a valid link for the venue.';	
			}else{
				msg = msg + '\nPlease enter a valid link for the venue.';	
			}
		}
	}
	if(document.ShowsForm.DLink.value!=''){
		if(ShowsForm.DLink.value.indexOf('http://www.')==-1){
			if(msg==''){
				msg = 'Please enter a valid link for the description.';	
			}else{
				msg = msg + '\nPlease enter a valid link for the description.';	
			}
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormMailingList(){
	var msg;
	msg = '';
	if(document.AddMailingListForm.Email.value==''){
		msg = 'Please enter an email to add.';
	}else{
		email = document.AddMailingListForm.Email.value
		AtPos = email.indexOf("@")
		StopPos = email.lastIndexOf(".")
		if (AtPos == -1 || StopPos == -1) {
			msg = 'Please enter a valid email address.';
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormMailingListAdd(){
	var msg;
	msg = '';
	if(document.LiveAddMailingListForm.Email.value==''||document.LiveAddMailingListForm.Email.value=='Email Address'){
		msg = 'Please enter an email to add.';
	}else{
		email = document.LiveAddMailingListForm.Email.value
		AtPos = email.indexOf("@")
		StopPos = email.lastIndexOf(".")
		if (AtPos == -1 || StopPos == -1) {
			msg = 'Please enter a valid email address.';
		}
	}
	if(document.LiveAddMailingListForm.Zip.value=='Zip Code'){
		document.LiveAddMailingListForm.Zip.value='';
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function CheckFormEmailContent(){
	var msg;
	msg = '';
	if(document.UpdateEmailContentForm.EmailSubject.value==''){
		msg = 'Please enter an a subject for the email.';
	}
	if(document.UpdateEmailContentForm.EmailContent.value==''||document.UpdateEmailContentForm.EmailContent.value=='<P>&nbsp;</P>'){
		if(msg==''){
			msg = 'Please enter content for this email.';	
		}else{
			msg = msg + '\nPlease enter content for this email.';	
		}
	}
	if(msg!=''){
		alert(msg);
		return false;
	}
	return true;
}
function confirmmsg(msg) { //v1.0
	switch (msg) {
		case 1:		alert("Thanks for your interest to sign up on the mailing list.\nTo verify your email address, an email as been sent to it.  \nPlease read that email and follow the instructions\nto complete the verification process.\n\nThanks!");break;
  		case 2:		alert("That is not a valid email address or\nyou are not on the list.\n\nPlease try again.");break;	
		case 3:		alert("We have received your request to be taken off\nthe mailing list.  To verify your email address, an email\nas been sent to it.  Please read that email and follow the\ninstructions to get you off the list.\n\nWe appreciate your patience.");break;	
		case 4:		alert("That is not a valid email address.");break;	
		case 5:		alert("The Mp3 file is larger than 10mb. \nPlease compress it more and upload again.\n\nSorry for the inconvenience.");break;	
		}
}

