function LOADJUKEBOX() {
	var maxSongsInPlayer = 60;
	var songlist = "";
	var url = "";
	var songsInList = 0;
	var preChar = "";
	for (var i=0;i<document.jukebox.elements.length&&songsInList<maxSongsInPlayer;i++)
		if (document.jukebox.elements[i].name == 'Songlist')
			if (document.jukebox.elements[i].checked) {
				songlist = songlist + preChar + document.jukebox.elements[i].value;
				songsInList++;
				preChar = ",";
			}
	if (songlist != "") {
		url= playerRAOnDemand + songlist;
		window.open(url,'jukebox','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=no,width=468,height=279');
	}
}
function ConfirmExecute(){
	return confirm("Do you really want to do it?")}
function checkall_new() {
	var cnt = 29;
	var ch = 0;
  for (var i=0;i<document.jukebox.elements.length;i++) {
    	var e = document.jukebox.elements[i];
		if (e.checked) ch = ch + 1;
	}	
	if (cnt == ch) {
		document.jukebox.Selection.value = 'true'
		document.jukebox.selectbutton.value = 'De-Select All'
	} else {
		document.jukebox.Selection.value = 'false'
		document.jukebox.selectbutton.value = 'Select All'
	}}
function SelectAll() {
	if (document.jukebox.Selection.value == 'true') {
		var elval = false;
		document.jukebox.Selection.value = 'false'
		document.jukebox.selectbutton.value = 'Select All'
	} else {
		var elval = true;
		document.jukebox.Selection.value = 'true'
		document.jukebox.selectbutton.value = 'De-Select All'
	}
	 for (var i=0;i<document.jukebox.elements.length;i++){
	  var e = document.jukebox.elements[i];
	  if (e.name=='Songlist') e.checked = elval;
	}}
function OpenVRating(path, ClipID)
{window.open(path+'video/v_rateclip_frameset.cfm?ClipID='+ClipID, 'rateclip','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=yes,width=470,height=280');}

function OpenVSendtofriend(path, ClipID)
{window.open(path+'video/v_stf_frameset.cfm?ClipID='+ClipID, 'STF','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=no,width=470,height=550');}

function OpenDRating(path, WID)
{window.open(path+'downloads/d_ratewallpaper_frameset.cfm?WID='+WID, 'ratewallpaper','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=yes,width=470,height=280');}

function OpenDSendtofriend(path, WID)
{window.open(path+'downloads/d_stf_frameset.cfm?WID='+WID, 'STF','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=no,width=470,height=550');}

function OpenSong(TrackID)
{window.open(playerRAOnDemand+TrackID,'song','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=no,width=468,height=279');}

function OpenRating(path, trackID)
{window.open(path+'audio/a_ratesong_frameset.cfm?TrackID='+trackID, 'ratesong','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=yes,width=470,height=280');}

function OpenSendtofriend(path, trackID)
{window.open(path+'audio/a_stf_frameset.cfm?TrackID='+trackID, 'STF','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=no,width=470,height=550');}

function OpenAdd2WCD(path, trackID,TrackName)
{xposition=0;yposition=0;width=250;height=270;
if (parseInt(navigator.appVersion) >= 4 ){
	xposition = (screen.width - width) / 2; yposition = (screen.height - height) / 2;}
	window.open(path+'members/m_addtowebcd_popup.cfm?TrackID='+trackID+'&TrackName='+TrackName,'webcd','directories=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,copyhistory=no,status=no,width='+width+',height='+height+',screenx='+xposition+',screeny='+yposition+',left='+xposition+',top='+ yposition);}
