//Focus on first field
//---------------------------------------------------------------------------------------------------------------------
function putFocus(formInst, elementInst) 
{
	if (document.forms.length > 0) 
	{
		document.forms[formInst].elements[elementInst].focus();
	}
}
//Pop-up window
function pop_up(wch_window,wdth,heght,scrl)
{
	{
		var winl = (screen.width - wdth) / 2;
		var wint = (screen.height - heght) / 2;
		window.open(wch_window,"newWindow","toolbar=0,menubar=0,location=0,directories=0,status=0,scrollbars="+scrl+",resizable=no,width="+wdth+",height="+heght+",left="+winl+",top="+wint);
	}
}
//Add main category
function addcategory()
{
	if (document.add_category.maincategory.value == "")
	{
		alert('Please enter a category')
		document.add_category.maincategory.focus()
		return false;
	}
	confirm_val = confirm("Are you sure you want to add this category?")
	if (confirm_val == true)
	{			
		document.add_category.submit()
	}
	else
	{
		return false;
	}
}

//Add main footer
function addfooter()
{
	if (document.add_footer.addfoot.value == "")
	{
		alert('Please enter a footer')
		document.add_footer.addfoot.focus()
		return false;
	}
	confirm_val = confirm("Are you sure you want to add this footer?")
	if (confirm_val == true)
	{			
		document.add_footer.submit()
	}
	else
	{
		return false;
	}
}

//Add band
function addband()
{
	if (document.add_band.regBand.options[document.add_band.regBand.selectedIndex].value == "")
	{
		alert('Please select a registered band')
		document.add_band.regBand.focus()
		return false;
		
	}
	if (document.add_band.addband.value == "")
	{
		alert('Please enter a band name')
		document.add_band.addband.focus()
		return false;
	}
	if (document.add_band.addbandimages.value == "")
	{
		alert('Please select an image for this band')
		document.add_band.addbandimages.focus()
		return false;
	}

	confirm_val = confirm("Are you sure you want to add this band to your hotlist?")
	if (confirm_val == true)
	{			
		document.add_band.submit()
	}
	else
	{
		return false;
	}
}

//Add venue
function addvenue()
{
	if (document.add_venue.regVenue.value == "")
	{
		alert('Please select a registered venue')
		document.add_venue.regVenue.focus()
		return false;
	}
	if (document.add_venue.addvenue.value == "")
	{
		alert('Please enter a venue')
		document.add_venue.addvenue.focus()
		return false;
	}
	if (document.add_venue.addvenueimages.value == "")
	{
		alert('Please select an image for this venue')
		document.add_band.addvenueimages.focus()
		return false;
	}

	confirm_val = confirm("Are you sure you want to add this venue to your hotlist?")
	if (confirm_val == true)
	{			
		document.add_venue.submit()
	}
	else
	{
		return false;
	}
}

function modifyfooter()
{
	if (document.modify_footer.modify_foot.value == "")
	{
		alert('Please select a footer')
		document.modify_footer.modify_foot.focus()
		return false;
	}
	if (document.modify_footer.modify_footer.value == "")
	{
		alert('Please enter a new name for your footer')
		document.modify_footer.modify_footer.focus()
		return false;
	}
	confirm_val = confirm("Are you sure you want to modify this footer link?")
	if (confirm_val == true)
	{			
		document.modify_footer.submit()
	}
	else
	{
		return false;
	}
}

function modifyband()
{
	if (document.modify_band.modifyband.value == "")
	{
		alert('Please select a band')
		document.modify_band.modifyband.focus()
		return false;
	}
	if (document.modify_band.modify_band.value == "")
	{
		alert('Please enter a new name for your band')
		document.modify_band.modify_band.focus()
		return false;
	}
	confirm_val = confirm("Are you sure you want to modify this band name?")
	if (confirm_val == true)
	{			
		document.modify_band.submit()
	}
	else
	{
		return false;
	}
}

function modifyvenue()
{
	if (document.modify_venue.modifyvenue.value == "")
	{
		alert('Please select a venue')
		document.modify_venue.modifyvenue.focus()
		return false;
	}
	if (document.modify_venue.modify_venue.value == "")
	{
		alert('Please enter a new name for your venue')
		document.modify_venue.modify_venue.focus()
		return false;
	}
	confirm_val = confirm("Are you sure you want to modify this venue name?")
	if (confirm_val == true)
	{			
		document.modify_venue.submit()
	}
	else
	{
		return false;
	}
}

//Add sub category
function addsubcategory()
{
	if (document.addsub_category.preset_category.options[document.addsub_category.preset_category.selectedIndex].value == "")
	{
		alert('Please select a category')
		document.addsub_category.preset_category.focus()
		return false;
		
	}
	if (document.addsub_category.subcategory.value == "")
	{
		alert('Please enter a sub-category')
		document.addsub_category.subcategory.focus()
		return false;
		
	}
	document.addsub_category.submit()
}
//Main category reset
function addcategoryreset()
{
	window.location = "control_panel.asp?cmd=navigation"
}

//Footer category reset
function footerreset()
{
	window.location = "control_panel.asp?cmd=footer"
}

//Band category reset
function bandreset()
{
	window.location = "control_panel.asp?cmd=bandHL"
}

//Venue category reset
function venuereset()
{
	window.location = "control_panel.asp?cmd=venueHL"
}

//highlights reset
function highreset()
{
	window.location = "control_panel.asp?cmd=highlights"
}

//sbv reset
function sbvreset()
{
	window.location = "control_panel.asp?cmd=sbv"
}

//Modify category
function modifycategories()
{
	if (document.modify_category.modify_cat.value == "")
	{
		alert("Please select a category to modify") 
		document.modify_category.modify_cat.focus()
		return false;
	}
	else if (document.modify_category.modify_cat_text.value == "")
	{
		alert("You did not enter a corresponding modification value for the CATEGORY you selected") 
		document.modify_category.modify_cat_text.focus()
		return false;
	}
	else
	{
		confirm_val = confirm("Are you sure you want to modify this data?\nModifying a main catgory will place all exising sub catgegories under the new category name.\nDo you wish to proceed?")
		if (confirm_val == true)
		{			
			document.modify_category.submit()
		}
		else
		{
			return false;
		}
	}
}
//Modify sub category
function modifysubcategories()
{
	if (document.modify_subcategory.modify_subcat.value == "")
	{
		alert("Please select a category") 
		document.modify_subcategory.modify_subcat.focus()
		return false;
	}
	else if (document.modify_subcategory.modify_subsubcat.value == "")
	{
		alert("You did not select a corresponding SUB CATEGORY") 
		document.modify_subcategory.modify_subsubcat.focus()
		return false;
	}
	else if (document.modify_subcategory.modify_subcat_text.value == "")
	{
		alert("You did not enter a new name for the SUB-CATEGORY you selected") 
		document.modify_subcategory.modify_subcat_text.focus()
		return false;
	}
	else
	{
		confirm_val = confirm("Are you sure you want to modify this data?")
		if (confirm_val == true)
		{			
			document.modify_subcategory.submit()
		}
		else
		{
			return false;
		}
	}
}

//Prepop modify category
function modifycat()
{
	var wch_cat
	wch_cat = document.modify_subcategory.modify_subcat.options[document.modify_subcategory.modify_subcat.selectedIndex].value
	window.location = "control_panel.asp?cmd=navigation&wchcat="+wch_cat
}

//Prepop modify category
function addpagecat()
{
	var wch_cat
	wch_cat = document.addpage.content_category.options[document.addpage.content_category.selectedIndex].value
	window.location = "control_panel.asp?cmd=add_page&wchcat="+wch_cat
}

//modify category
function modpagecat()
{
	var wch_cat
	wch_cat = document.modpage.mod_category.options[document.modpage.mod_category.selectedIndex].value
	window.location = "control_panel.asp?cmd=mod_page&wchcat="+wch_cat
}

//modify sub category data
function modsubpagecat()
{
	wch_cat    = document.modpage.mod_category.options[document.modpage.mod_category.selectedIndex].value
	wch_subcat = document.modpage.mod_subcategory.options[document.modpage.mod_subcategory.selectedIndex].value
	window.location = "control_panel.asp?cmd=mod_page&wchcat="+wch_cat+"&subcat="+wch_subcat
}

//Delete category
function deletecategories()
{
	if (document.delete_category.delete_cat.value == "")
	{
		alert("Please select a category") 
		document.delete_category.delete_cat.focus()
		return false;
	}
	else
	{
		confirm_val = confirm("Are you sure you want to delete this category?\nWarning! This action cannot be undone.\nDeleting a category will remove all SUB CATEGORIES AND DATA for that category.\nDo you wish to proceed?")
		if (confirm_val == true)
		{			
			document.delete_category.submit()
		}
		else
		{
			return false;
		}
	}
}	
//Delete sub category
function deletesubcategories()
{
	if (document.delete_subcategory.delete_subcat.value == "")
	{
		alert("Please select a category") 
		document.delete_subcategory.delete_subcat.focus()
		return false;
	}
	if (document.delete_subcategory.delete_subsubcat.value == "")
	{
		alert("Please select a sub category") 
		document.delete_subcategory.delete_subsubcat.focus()
		return false;
	}
	else
	{
		confirm_val = confirm("Are you sure you want to delete this sub category?\nWarning! This action cannot be undone.\nDeleting a SUB CATEGORY will remove all information under that sub category.\nDo you wish to proceed?")
		if (confirm_val == true)
		{			
			document.delete_subcategory.submit()
		}
		else
		{
			return false;
		}
	}
}

//Prepop delete category
function deletecat()
{
	var wch_cat
	wch_cat = document.delete_subcategory.delete_subcat.options[document.delete_subcategory.delete_subcat.selectedIndex].value
	window.location = "control_panel.asp?cmd=navigation&deletewchcat="+wch_cat
}

//system logout
function system_logout()
{
	confirm_val = confirm("Are you sure you want to log out of the system?")
	if (confirm_val == true)
	{			
		window.location = "control_panel.asp?logout=true"
	}
	else
	{
		return false;
	}
}

//Contact support
function contactsupport()
{
	document.contact.submit()
}

//Contact reset
function contactreset()
{
	window.location = "control_panel.asp?cmd=contact"
}

function listorder()
{
	confirm_val = confirm("Are you sure you want to re-order this list?")
	if (confirm_val == true)
	{			
		document.list.submit()
	}
	else
	{
		return false;
	}
}

function bandsorder()
{
	confirm_val = confirm("Are you sure you want to re-order this list?")
	if (confirm_val == true)
	{			
		document.bands.submit()
	}
	else
	{
		return false;
	}
}

function sbvorder()
{
	confirm_val = confirm("Are you sure you want to re-order this list?")
	if (confirm_val == true)
	{			
		document.sbv.submit()
	}
	else
	{
		return false;
	}
}


function venuesorder()
{
	confirm_val = confirm("Are you sure you want to re-order this list?")
	if (confirm_val == true)
	{			
		document.venues.submit()
	}
	else
	{
		return false;
	}
}

function deletefooter()
{
	if (document.delete_footer.delete_foot.value == "")
	{
		alert("Please select a footer to delete") 
		document.delete_footer.delete_foot.focus()
		return false;
	}
	else
	{
		confirm_val = confirm("Are you sure you want to delete this footer?\nWarning! This action cannot be undone.\nDeleting will remove all information under that category.\nDo you wish to proceed?")
		if (confirm_val == true)
		{			
			document.delete_footer.submit()
		}
		else
		{
			return false;
		}
	}

}

function deleteband()
{
	if (document.delete_band.deleteband.value == "")
	{
		alert("Please select a band to delete") 
		document.delete_band.deleteband.focus()
		return false;
	}
	else
	{
		confirm_val = confirm("Are you sure you want to delete this band?\nWarning! This action cannot be undone.\nDeleting will remove all information under that category.\nDo you wish to proceed?")
		if (confirm_val == true)
		{			
			document.delete_band.submit()
		}
		else
		{
			return false;
		}
	}

}

function deletesbv()
{
	if (document.delete_sbv.deletesbv.value == "")
	{
		alert("Please select an sbv to delete") 
		document.delete_sbv.deletesbv.focus()
		return false;
	}
	else
	{
		confirm_val = confirm("Are you sure you want to delete this sbv?\nWarning! This action cannot be undone.\nDeleting will remove all information under that category.\nDo you wish to proceed?")
		if (confirm_val == true)
		{			
			document.delete_sbv.submit()
		}
		else
		{
			return false;
		}
	}

}

function deletevenue()
{
	if (document.delete_venue.deletevenue.value == "")
	{
		alert("Please select a venue to delete") 
		document.delete_venue.deletevenue.focus()
		return false;
	}
	else
	{
		confirm_val = confirm("Are you sure you want to delete this venue?\nWarning! This action cannot be undone.\nDeleting will remove all information under that category.\nDo you wish to proceed?")
		if (confirm_val == true)
		{			
			document.delete_venue.submit()
		}
		else
		{
			return false;
		}
	}

}

//Prepop modify bands hotlist
function modbandHot()
{
	var wch_cat
	wch_cat = document.modify_band_subtitle.modifybandsub.options[document.modify_band_subtitle.modifybandsub.selectedIndex].value
	window.location = "control_panel.asp?cmd=bandHL&bandsubtitle="+wch_cat
}

//Prepop modify venues hotlist
function modvenueHot()
{
	var wch_cat
	wch_cat = document.modify_venue_subtitle.modifyvenuesub.options[document.modify_venue_subtitle.modifyvenuesub.selectedIndex].value
	window.location = "control_panel.asp?cmd=venueHL&venuesubtitle="+wch_cat
}

function modifysubband()
{
	if (document.modify_band_subtitle.modifybandsub.value == "")
	{
		alert('Please select a band')
		document.modify_band_subtitle.modifybandsub.focus()
		return false;
	}
	
	if (document.modify_band_subtitle.modifybandsubtitle.value == "")
	{
		alert('Please a sub-title')
		document.modify_band_subtitle.modifybandsubtitle.focus()
		return false;
	}


	confirm_val = confirm("Are you sure you want to modify this hotlist subtitle?")
	if (confirm_val == true)
	{			
		document.modify_band_subtitle.submit()
	}
	else
	{
		return false;
	}
}

function modifysubvenue()
{
	if (document.modify_venue_subtitle.modifyvenuesub.value == "")
	{
		alert('Please select a venue')
		document.modify_venue_subtitle.modifyvenuesub.focus()
		return false;
	}
	
	if (document.modify_venue_subtitle.modifyvenuesubtitle.value == "")
	{
		alert('Please a sub-title')
		document.modify_venue_subtitle.modifyvenuesubtitle.focus()
		return false;
	}


	confirm_val = confirm("Are you sure you want to modify this hotlist subtitle?")
	if (confirm_val == true)
	{			
		document.modify_venue_subtitle.submit()
	}
	else
	{
		return false;
	}
}



//Add band
function addhigh()
{
	if (document.add_high.addhigh.value == "")
	{
		alert('Please enter a highlight')
		document.add_high.addhigh.focus()
		return false;
	}
	if (document.add_high.addhighimage.value == "")
	{
		alert('Please select an image for your highlight')
		document.add_high.addhighimage.focus()
		return false;
	}

	confirm_val = confirm("Are you sure you want to add this highlight?")
	if (confirm_val == true)
	{			
		document.add_high.submit()
	}
	else
	{
		return false;
	}
}

//Add sbv
function addsbv()
{
	
	if (document.add_sbv.addsbvimage.value == "")
	{
		alert('Please select an image for your sbv')
		document.add_sbv.addsbvimage.focus()
		return false;
	}

	confirm_val = confirm("Are you sure you want to add this sbv?")
	if (confirm_val == true)
	{			
		document.add_sbv.submit()
	}
	else
	{
		return false;
	}
}


function modifyhigh()
{
	if (document.modify_highlight.modifyhighlight.value == "")
	{
		alert('Please select a highlight')
		document.modify_highlight.modifyhighlight.focus()
		return false;
	}
	if (document.modify_highlight.modihighlight_text.value == "")
	{
		alert('Please enter a new name for your highlight')
		document.modify_highlight.modihighlight_textfocus()
		return false;
	}
	confirm_val = confirm("Are you sure you want to modify this highlight?")
	if (confirm_val == true)
	{			
		document.modify_highlight.submit()
	}
	else
	{
		return false;
	}
}

function modifysbv()
{
	if (document.modify_sbv.modifysbv.value == "")
	{
		alert('Please select an sbv')
		document.modify_sbv.modifysbv.focus()
		return false;
	}
	
	confirm_val = confirm("Are you sure you want to modify this sbv?")
	if (confirm_val == true)
	{			
		document.modify_sbv.submit()
	}
	else
	{
		return false;
	}
}

if (document.images)
{
  pic1= new Image(250,60); 
  pic1.src="images/index_63_light.jpg"; 

  pic2= new Image(251,59); 
  pic2.src="images/index_73_light.jpg"; 

  pic3= new Image(249,58); 
  pic3.src="images/index_82_light.jpg"; 

  pic4= new Image(251,60); 
  pic4.src="images/index_87_light.jpg"; 

  pic5= new Image(250,59); 
  pic5.src="images/index_99_light.jpg"; 
  
  pic6= new Image(251,60); 
  pic6.src="images/index_113_light.jpg"; 

  pic7= new Image(248,61); 
  pic7.src="images/index_61_light.jpg"; 

  pic8= new Image(248,60); 
  pic8.src="images/index_71_light.jpg"; 

  pic9= new Image(247,59); 
  pic9.src="images/index_81_light.jpg"; 

  pic10= new Image(248,58); 
  pic10.src="images/index_94_light.jpg"; 

  pic11= new Image(248,59); 
  pic11.src="images/index_101_light.jpg"; 

  pic12= new Image(249,60); 
  pic12.src="images/index_114_light.jpg"; 

}

//View editor
function vieweditor()
{
	wch_cat      = document.addpage.content_category.options[document.addpage.content_category.selectedIndex].value
	wch_subcat   = document.addpage.content_subcategory.options[document.addpage.content_subcategory.selectedIndex].value
	window.location = "control_panel.asp?cmd=add_page&wchcat="+wch_cat+"&subcat="+wch_subcat+"&editor=true"
}
//View modify editor
function viewmodeditor()
{
	wch_cat      = document.modpage.mod_category.options[document.modpage.mod_category.selectedIndex].value
	wch_subcat   = document.modpage.mod_subcategory.options[document.modpage.mod_subcategory.selectedIndex].value
	window.location = "control_panel.asp?cmd=mod_page&wchcat="+wch_cat+"&subcat="+wch_subcat+"&editor=true"
}
//Hide modify editor
function hidemodeditor()
{
	wch_cat      = document.modpage.mod_category.options[document.modpage.mod_category.selectedIndex].value
	wch_subcat   = document.modpage.mod_subcategory.options[document.modpage.mod_subcategory.selectedIndex].value
	window.location = "control_panel.asp?cmd=mod_page&wchcat="+wch_cat+"&subcat="+wch_subcat
}
//Hide parent editor
function hidepareditor()
{
	wch_header   = document.parpage.pageheader.value
	wch_footer   = document.parpage.pagefooter.value
	window.location = "control_panel.asp?cmd=parent_page"+"&header="+wch_header+"&footer="+wch_footer
}
//Hide editor
function hideeditor()
{
	wch_cat      = document.addpage.content_category.options[document.addpage.content_category.selectedIndex].value
	wch_subcat   = document.addpage.content_subcategory.options[document.addpage.content_subcategory.selectedIndex].value
	window.location = "control_panel.asp?cmd=add_page&wchcat="+wch_cat+"&subcat="+wch_subcat
}
//View modify editor
function viewpareditor()
{
	wch_header   = document.parpage.pageheader.value
	wch_footer   = document.parpage.pagefooter.value
	window.location = "control_panel.asp?cmd=parent_page"+"&header="+wch_header+"&footer="+wch_footer+"&editor=true"
}


function viewfooteditor()
{
	wch_cat      = document.addfooter.content_footer.options[document.addfooter.content_footer.selectedIndex].value
	window.location = "control_panel.asp?cmd=addFooter&wch_foot="+wch_cat+"&editor=true"
}

function hidefooteditor()
{
	wch_cat      = document.addfooter.content_footer.options[document.addfooter.content_footer.selectedIndex].value
	window.location = "control_panel.asp?cmd=addFooter&wch_foot="+wch_cat
}


//Copy modify text function
function modcopytext()
{
	if(document.modpage.hiddencheckedvalue.value == "on")
	{
		alert('Please uncheck the PARSE / VIEW HTML checbox before copying')
		return false;
	}
	document.modpage.modifymainbody.value = document.modpage.hiddencopytext.value
}

//Copy text function
function copytext()
{
	if(document.addpage.hiddencheckedvalue.value == "on")
	{
		alert('Please uncheck the PARSE / VIEW HTML checbox before copying')
		return false;
	}
	document.addpage.mainbody.value = document.addpage.hiddencopytext.value
}


function footerctext()
{
	if(document.addfooter.hiddencheckedvalue.value == "on")
	{
		alert('Please uncheck the PARSE / VIEW HTML checbox before copying')
		return false;
	}
	document.addfooter.footerbody.value = document.addfooter.hiddencopytext.value
}


//Clear text function
function clearcopytext()
{
	document.addpage.mainbody.value = ""
}
//Clear modify copy text function
function clearmodcopytext()
{
	document.modpage.modifymainbody.value = ""
}
//Clear footer text function
function clearfootertext()
{
	document.addfooter.footerbody.value = ""
}
//Add page data
function addpagedata()
{
	if (document.addpage.content_category.value == "")
	{
		alert("Please select a category") 
		document.addpage.content_category.focus()
		return false;
	}
	//if (document.addpage.content_subcategory.value == "")
	//{
	//	alert("Please select a sub category value") 
//		document.addpage.content_subcategory.focus()
//		return false;
//	}
	
	confirm_val = confirm("Are you sure you want to create this page?")
	if (confirm_val == true)
	{			
		document.addpage.submit()
	}
	else
	{
		return false;
	}
}

//Add page reset
function addpagereset()
{
	window.location = "control_panel.asp?cmd=add_page"
}
//Mod page reset
function modpagereset()
{
	window.location = "control_panel.asp?cmd=mod_page"
}


//Update page data
function modpagedata()
{
	if (document.modpage.mod_category.value == "")
	{
		alert("Please select a category") 
		document.modpage.mod_category.focus()
		return false;
	}
	
	confirm_val = confirm("Are you sure you want to update this page?")
	if (confirm_val == true)
	{			
		document.modpage.submit()
	}
	else
	{
		return false;
	}
}

function showfooter()

{	
	wch_foot      = document.addfooter.content_footer.options[document.addfooter.content_footer.selectedIndex].value
	window.location = "control_panel.asp?cmd=addFooter&wch_foot="+wch_foot
}

function addfooterdata()
{
	if (document.addfooter.content_footer.value == "")
	{
		alert("Please select a footer") 
		document.addfooter.content_footer.focus()
		return false;
	}
	
	confirm_val = confirm("Are you sure you want to add/update this content?")
	if (confirm_val == true)
	{			
		document.addfooter.submit()
	}
	else
	{
		return false;
	}	
}

//Add footer reset
function addfooterreset()
{
	window.location = "control_panel.asp?cmd=addFooter"
}

function showhighlight()
{
	wch_high      = document.addhighlight.content_highlight.options[document.addhighlight.content_highlight.selectedIndex].value
	window.location = "control_panel.asp?cmd=addHighlights&wch_high="+wch_high
}

function addhighdata()
{
	if (document.addhighlight.content_highlight.value == "")
	{
		alert("Please select a highlight topic") 
		document.addhighlight.content_highlight.focus()
		return false;
	}
	
	if (document.addhighlight.highImage.value == "")
	{
		alert("Please select a highlight image") 
		document.addhighlight.highImage.focus()
		return false;
	}


	confirm_val = confirm("Are you sure you want to add/update this content?")
	if (confirm_val == true)
	{			
		document.addhighlight.submit()
	}
	else
	{
		return false;
	}	
}

function addhighdatareset()
{
	window.location = "control_panel.asp?cmd=addHighlights"
}

function viewhigheditor()
{
	wch_high      = document.addhighlight.content_highlight.options[document.addhighlight.content_highlight.selectedIndex].value
	window.location = "control_panel.asp?cmd=addHighlights&wch_high="+wch_high+"&editor=true"
}

function hidehigheditor()
{
	wch_high      = document.addhighlight.content_highlight.options[document.addhighlight.content_highlight.selectedIndex].value
	window.location = "control_panel.asp?cmd=addHighlights&wch_high="+wch_high
}


function highlighttext()
{
	if(document.addhighlight.hiddencheckedvalue.value == "on")
	{
		alert('Please uncheck the PARSE / VIEW HTML checbox before copying')
		return false;
	}
	document.addhighlight.highlightbody.value = document.addhighlight.hiddencopytext.value
}

function clearhightext()
{
	document.addhighlight.highlightbody.value = ""
}


function showbands()
{
	wch_band      = document.addbandpage.content_band.options[document.addbandpage.content_band.selectedIndex].value
	window.location = "control_panel.asp?cmd=addBand&wch_band="+wch_band
}

function showvenues()
{
	wch_venue       = document.addvenuepage.content_venue.options[document.addvenuepage.content_venue.selectedIndex].value
	window.location = "control_panel.asp?cmd=addVenue&wch_venue="+wch_venue
}

function bandtext()
{
	if(document.addbandpage.hiddencheckedvalue.value == "on")
	{
		alert('Please uncheck the PARSE / VIEW HTML checbox before copying')
		return false;
	}
	document.addbandpage.bandbody.value = document.addbandpage.hiddencopytext.value
}

function venuetext()
{
	if(document.addvenuepage.hiddencheckedvalue.value == "on")
	{
		alert('Please uncheck the PARSE / VIEW HTML checbox before copying')
		return false;
	}
	document.addvenuepage.venuebody.value = document.addvenuepage.hiddencopytext.value
}

function clearbandtext()
{
	document.addbandpage.bandbody.value = ""
}

function clearvenuetext()
{
	document.addvenuepage.venuebody.value = ""
}


function addbanddata()
{
	if (document.addbandpage.content_band.value == "")
	{
		alert("Please select a Band") 
		document.addbandpage.content_band.focus()
		return false;
	}
	
	if (document.addbandpage.bandImage.value == "")
	{
		alert("Please select a band image") 
		document.addbandpage.bandImage.focus()
		return false;
	}


	confirm_val = confirm("Are you sure you want to this add/update this content?")
	if (confirm_val == true)
	{			
		document.addbandpage.submit()
	}
	else
	{
		return false;
	}	
}

function addbanddatareset()
{
	window.location = "control_panel.asp?cmd=addBand"
}


function viewbandeditor()
{
	wch_band     = document.addbandpage.content_band.options[document.addbandpage.content_band.selectedIndex].value
	window.location = "control_panel.asp?cmd=addBand&wch_band="+wch_band+"&editor=true"
}

function hidebandeditor()
{
	wch_band      = document.addbandpage.content_band.options[document.addbandpage.content_band.selectedIndex].value
	window.location = "control_panel.asp?cmd=addBand&wch_band="+wch_band
}




function viewvenueeditor()
{
	wch_venue     = document.addvenuepage.content_venue.options[document.addvenuepage.content_venue.selectedIndex].value
	window.location = "control_panel.asp?cmd=addVenue&wch_venue="+wch_venue+"&editor=true"
}

function hidevenueeditor()
{
	wch_venue      = document.addvenuepage.content_venue.options[document.addvenuepage.content_venue.selectedIndex].value
	window.location = "control_panel.asp?cmd=addVenue&wch_venue="+wch_venue
}


function addvenuedata()
{
	if (document.addvenuepage.content_venue.value == "")
	{
		alert("Please select a Venue") 
		document.addvenuepage.content_venue.focus()
		return false;
	}
	
	if (document.addvenuepage.venueImage.value == "")
	{
		alert("Please select a venue image") 
		document.addvenuepage.venueImage.focus()
		return false;
	}


	confirm_val = confirm("Are you sure you want to this add/update this content?")
	if (confirm_val == true)
	{			
		document.addvenuepage.submit()
	}
	else
	{
		return false;
	}	
}

function addvenuedatareset()
{
	window.location = "control_panel.asp?cmd=addVenue"
}


function viewsbveditor()
{
	window.location = "control_panel.asp?cmd=sbv2&editor=true"
}

function hidesbveditor()
{
	window.location = "control_panel.asp?cmd=sbv2"
}

function sbv2text()
{
	if(document.addsbv2.hiddencheckedvalue.value == "on")
	{
		alert('Please uncheck the PARSE / VIEW HTML checbox before copying')
		return false;
	}
	document.addsbv2.sbv2body.value = document.addsbv2.hiddencopytext.value
}

function clearsbv2text()
{
	document.addsbv2.sbv2body.value = ""
}


function addsbv2data()
{
	
	confirm_val = confirm("Are you sure you want to this add/update this content?")
	if (confirm_val == true)
	{			
		document.addsbv2.submit()
	}
	else
	{
		return false;
	}	
}


function sbv2datareset()
{
	window.location = "control_panel.asp?cmd=sbv2"
}

function login()
{

	if (document.accountLogin.username.value == "")
	{
		alert("Please enter your username")
		document.accountLogin.username.focus()
		return false;
	}
	
	else if (document.accountLogin.password.value == "")
	{
			
		alert("Please enter your password")
		document.accountLogin.password.focus()
		return false;
	}

	else
	{
		document.accountLogin.submit();
	}	
}


function searchBox()
{

	if (document.search.searchval.value == "")
	{
		

		document.getElementById("searcherror").innerHTML = "<font face = verdana size = 1 color = #800000>Please enter a search value in the field</font>"
		document.search.searchval.focus()
		return false;
	}
	else
	{
		document.search.submit();
	}	
}

function clearSearch()
{
	document.search.searchval.value = ""
}


function searchVal()
{
	//if(document.search.searchval.value == "")
	//{
	//	alert("Please enter a search value")
	//	document.search.searchval.focus()
	//	return false;
	//}
	//else
	//{
		document.search.submit();
	//}
}
function clearField()
{
	document.search.searchval.value = ""
}
function clearCity()
{
	document.search.city.value = ""
}
function clearState()
{
	document.search.state.value = ""
}
function clearZip()
{
	document.search.zip.value = ""
}

function searchres()
{
	if(document.search.search_val.value == "")
	{
		alert("Please enter a search value")
		document.search.search_val.focus()
		return false;
	}
	else
	{
		document.search.submit()
	}
}


function searchresprofile()
{
	if(document.searchbypro.profilesearch.value == "")
	{
		alert("Please select a search value")
		document.searchbypro.profilesearch.focus()
		return false;
	}
	else
	{
		document.searchbypro.submit()
	}
}
