/**
 * @author keith
 */

 function confirmdelete(area){
   
   var msg;
   
   switch(area)
{
case 'slot':
  msg = "Are you sure you want to delete this slot ?\nThis can not be undone !"; 
  break;
case 'show':
   msg = "Are you sure you want to delete this show ?\nThis can not be undone !\n Note:\nIf this show is no long part of the DSMFM schedule, you can simply add it to the archive, just edit the show and select archived."; 
  break;
  case 'slide':
   msg = "Are you sure you want to delete this slideshow image ?\nThis can not be undone !\n"; 
  break;
default:
  msg = ' m ???';
}

                return confirm(msg);
            }
			
			
  function scheduleSelectDay(sel){
//window.open(this.options[this.selectedIndex].value,'_top')
  	//dd = document.getElementById(sel).selectedIndex;
  	alert(sel.options[sel.selectedIndex].value);
  }
  
  
        function  loadScript(scriptName) {        
                 var b_script = document.createElement('script');
  b_script.setAttribute("type","text/javascript");
  b_script.setAttribute("src", scriptName);
  document.getElementsByTagName("body")[0].appendChild(b_script);
}
  
function livePopUp() {
// newwindow=window.open('/live.php','Listen-Live','height=320,width=500');
	newwindow=window.open('/live.php','_blank','height=320,width=500');
	if (window.focus) {newwindow.focus()}
	return false;
}

/*
 * Does exactly what it says on the tin !
 */
function clearInput(sel) {
  sel.value='';
}

/*
 * Spam, ort No thanks, I'm vegi !
 *  
 */
function noSpam(user,domain) {
      eString = "mailto:" + user + "@" + domain;
      window.location = eString;
      }
      
/*
 * modal Message
 *  
 */      
      
function showModalMSG() {
	el = document.getElementById("modalMSG");
	el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible";
}

function hideModalMSG() {
	el = document.getElementById("modalMSG");
	el.style.visibility = (el.style.visibility == "hidden") ? "visible" : "hidden";
}




