// get stuff to display the current playing
var nowPlaying = (function() {
	var that = {};
	var display;
	that.fetch = function() {
		cvhXHR(that.update, '/includes/now_playing.inc.php');
	}
	that.update = function(XHR) {
		display.innerHTML = XHR.responseText;
	}
	that.init = function() {
		display = document.getElementById('now_playing');
		that.fetch();
		window.setInterval(that.fetch, 30000);
	}
	return that;
})();


// make function to load admin page
function launch_admin_edit($keyword) {
        editor_win=window.open
   ("/admin/edit/index.php?keyword="+$keyword,"admin_edit",'statusbar=0,toolbar=0,menubar=0,scrollbars=1,resizable=no,width=600,height=600')
  }

// make function to load admin page
function launch_player() {
        player_win=window.open
   ("/player","wayfm_player",'statusbar=0,toolbar=0,menubar=0,scrollbars=0,resizable=yes,width=500,height=350')
  }

function launch_win($url, $name, $width, $height) {
	random_win=window.open($url,$name,'statusbar=0,toolbar=0,menubar=0,scrollbars=0,resizable=no,width='+$width+',height='+$height)
}

// gets the nav menu to work in IE since the pseudo class ":hover" only works on links (<a>) in IE
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav_ul");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}

function launch_video(video) {
    random_win=window.open
   ("/includes/video.php?video_keyword="+video,"random_win",'statusbar=0,toolbar=0,menubar=0,scrollbars=1,resizable=no,width=480,height=430')
  }


<!-- Copyright 2003 Bontrager Connection, LLC
// Code obtained from http://WillMaster.com/

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
        if(ss[i].value.length > 0) { return false; }
        }
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
        if(ss[i].checked) { return false; }
        }
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
        if(ss[i].selected) {
                if(ss[i].value.length) { return false; }
                }
        }
return true;
}
