function showSelect(state){
  if(document.getElementById){
    showHide("drpEvent", state);
    showHide("drpEvents", state);
    //showHide("player", state);
    //showHide("player2", state);
  }
  
}
function showHide(id, state){
  if(document.getElementById){
    var obj;
    obj = document.getElementById(id);
    
    if(obj){
      if(state == -1){
        obj.style.display = "none";
      }else{
        obj.style.display = "";
      }
    }
  }
    
}
function globalSetTextOfDiv(id, text){
 if(document.getElementById){
   var theDiv = document.getElementById(id);
   theDiv.innerHTML = text;
 }
}
function globalGetTextOfDiv(id){
 if(document.getElementById){
   var theDiv = document.getElementById(id);
   if(theDiv){
     return theDiv.innerHTML;
   }else{
     return '';
   }
 }else{
   return '';
 }
}
function globalGetTextOfTextbox(id){
 if(document.getElementById){
   var theBox = document.getElementById(id);
   if(theBox){
     return theBox.value;
   }else{
     return '';
   }
 }else{
   return '';
 }
}
function globalSetTextOfTextbox(id, theText){
 if(document.getElementById){
   var theBox = document.getElementById(id);
   if(theBox){
     theBox.value = theText;
   }
 }
}
function globalGetSelectedText(sDropdownId){
  //returns the selected item in a dropdown menu's text.
  var dropdown;
  if(document.getElementById){
    dropdown = document.getElementById(sDropdownId);
    if(dropdown){
      return dropdown.options[dropdown.selectedIndex].text;
    }else{
      return '';
    }
  }else{
    return '';
  }
}
 function globalStringTrim(inputString){
   return inputString.replace(/^\s+|\s+$/g, '');
 }