<!--//
function confirmdelete() {
	return confirm("Are you sure you want to delete this item?");
}

function popup(url,nme,wgt, hgt)
		{
		var params='toolbar=no,height='+hgt+',width='+wgt+',location=no,scrollbars=yes,status=no,menubar=no,resizable=yes';
		if(self && self.screen && self.screen.width)
			{
			params+=",left="+((self.screen.width-wgt)/2);
			params+=",top="+((self.screen.height-hgt)/2);
			}
		window.open(url,nme,params);

}

function popupplayer(url,nme,wgt, hgt)
		{
		var params='toolbar=no,height='+hgt+',width='+wgt+',location=no,scrollbars=no,status=no,menubar=no,resizable=no';
		if(self && self.screen && self.screen.width)
			{
			params+=",left="+((self.screen.width-wgt)/2);
			params+=",top="+((self.screen.height-hgt)/2);
			}
		window.open(url,nme,params);

}


function setPointer(theRow, thePointerColor, theFontColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
        theCells[c].style.color = theFontColor;
				/* theCells[c].style.cursor= 'hand';*/
    }

    return true;
}

function addTrack(x){
	// only called when a track is added to a catalogue item
	if (x.trackfile.value.length > 0) {
		x.addtrack.type="button";
		x.addtrack.style.backgroundColor="#FFFFCC";
		x.addtrack.style.color="#FF0000";
		x.addtrack.value="Please wait whilst you're mp3 file is uploading";
	}
	return true;
}

function validatesearch(frm) {
	/*
	if (frm.searchfield.selectedIndex==0) {
		document.frmSearch.searchfield.style.border="solid 1px #FF0000";
		document.frmSearch.searchfield.style.backgroundColor="#FFFFCC";
		return false;
	} else {
		document.frmSearch.searchfield.style.border="none";
		document.frmSearch.searchfield.style.backgroundColor="#FFFFFF";	
	}
	*/
	if (frm.searchfor.value=="Type Keyword Here" || frm.searchfor.value.length==0) {
		document.frmSearch.searchfor.value="";
		document.frmSearch.searchfor.style.border="solid 1px #FF0000";
		document.frmSearch.searchfor.style.backgroundColor="#FFFFCC";
		return false;
	}
	return true;	
}

function closeplayer() {
	// the only way to do this is to open the player and then close it - it it's open it will not open another
	mywin=window.open('','playerWin','width=430,height=20');
	mywin.close();
}
//-->
