function doPromo()
{
 errorstring = "";
 temp = trim(document.GLSaveForm.txtPromo.value);
 if(temp == "")
 {
  errorstring = errorstring + "Please enter a valid Promo Code.\r";
 }
 if(errorstring == "")
 {
  location.href = "http://www.greenleafmusic.com/store/PromoCreateOrder.php?pp=" + temp;
 }
 else
 {
  window.alert(errorstring)
 }
}

function doArtist()
{
 errorstring = "";
 i = document.GLSaveForm.selArtist.selectedIndex;
 if(i == -1 && i == 0)
 {
  errorstring = errorstring + "Please select Artist.\r";
 }
 if(errorstring == "")
 {
  AValue = "?a=" + document.GLSaveForm.selArtist.options[document.GLSaveForm.selArtist.selectedIndex].value;
  location.href = "http://www.greenleafmusic.com/store/browsebyartist.php" + AValue;
 }
 else
 {
  window.alert(errorstring)
 }
}

function doSearch()
{
 errorstring = "";
 temp = trim(document.GLSaveForm.txtSearch.value);
 if(temp == "")
 {
  errorstring = errorstring + "Please enter what you want to search for!\r";
 }
 if(errorstring == "")
 {
  temp = removeCharacter(temp,"'");
  temp = removeCharacter(temp,String.fromCharCode(34));
  location.href = "http://www.greenleafmusic.com/store/browsebysearch.php?s=" + temp;
 }
 else
 {
  window.alert(errorstring)
 }
}

