function confirmDelete(theID,theType,theHeadline) {
confirmMsg="Are you sure you want to permanently erase the "+theType+" entry:\r\r'"+theHeadline+"'\r\rfrom the system? You cannot undo this action.";
if (confirm(confirmMsg)) {
location=theType=="song"?'admin_new_releases.php?action=Delete&id='+theID:'admin_article.php?action=Delete&type='+theType+'&id='+theID;
}
		return;
}

function formatLink(theForm) {
if (theForm.link.value!="") {
if (theForm.link.value.indexOf("http://") == -1) {
	theForm.link.value="http://"+theForm.link.value; 
	}
	if (theForm.link.value.indexOf("www") == -1) {
	alert ("The link doesn't appear to be valid.\rPlease correct it to look like this format: \r - 'http://www.thelink.com' \ror copy the link from your browser window \rand paste it in the link box. Thanks!");
	theForm.link.select();
		return false;

	} else {
	return true;
	}
	} else {
	return true;
	}
}

function forceRadio() {
	var locat=location.toString();
	if (locat.indexOf("?")!=-1) {
	location.href=locat+"&bypass=true";
	} else {
	location.href=locat+"?bypass=true";
}
}

// ROLLOVER TD navigation
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
//	alert(navigator.appVersion);
	return this
}
bw=new checkBrowser()


//Reusable background color change function
function changeBc(obj,theColor){
//if (obj=="home") {
//				obj2="homeNav";
//				div2=bw.dom?document.getElementById(obj2):bw.ie4?document.all[obj2]:bw.ns4?document.layers[obj2]:0;	
//				div2.src=(theColor=="mainOver")?("imgs/nav_l_widget_on.gif"):("imgs/nav_l_widget_off.gif");
//}
	if (theColor=="mainOver") { color="#767766"; }
else if (theColor=="labelOver"){ color="#FCED40"; } //d0d1c2
else {color=theColor;}
  div=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
	if(bw.dom || bw.ie4) div.backgroundColor=color;
	else if(bw.ns4) div.bgColor=color;
	
}


function mClk(link){
	if (link){
		location.href = link;
	}else{
		return false;
	}	
}

// search form function
function searchSite() {
//alert(document.searchForm.searchType[1].value);
}


function toggle(item) {
   var obj=document.getElementById(item);
   var visible=(obj.style.display!="none")
   var key=document.getElementById(item);
   if (visible) {
    obj.style.display= "none";
//  key.innerHTML = "VIEW " + word;
   } else {
    obj.style.display="";
//  key.innerHTML = "<span style='padding-right:9em;'>CLOSE " + word + "<\/span>"; 
   }
}

