
//1k DHTML API
d=document;l=d.layers;op=navigator.userAgent.indexOf('Opera')!=-1;ff=navigator.userAgent.indexOf('Firefox')!=-1;
function gE(e,f){if(l){f=(f)?f:self;var V=f.document.layers;if(V[e])return V[e];for(var W=0;W<V.length;)t=gE(e,V[W++]);return t;}if(d.all)return d.all[e];return d.getElementById(e);}
function sE(e){l?e.visibility='show':e.style.visibility='visible';}
function hE(e){l?e.visibility='hide':e.style.visibility='hidden';}
function sZ(e,z){l?e.zIndex=z:e.style.zIndex=z;}
function sX(e,x){l?e.left=x:op?e.style.pixelLeft=x:e.style.left=x;}
function sY(e,y){l?e.top=y:op?e.style.pixelTop=y:e.style.top=y;}
function sW(e,w){l?e.clip.width=w:op?e.style.pixelWidth=w:e.style.width=w;}
function sH(e,h){l?e.clip.height=h:op?e.style.pixelHeight=h:e.style.height=h;}
function sC(e,t,r,b,x){l?(X=e.clip,X.top=t,X.right=r,X.bottom=b,X.left=x):e.style.clip='rect('+t+' '+r+' '+b+' '+x+')';}
function wH(e,h){if(l){Y=e.document;Y.open();Y.write(h);Y.close();}else if(e.innerHTML)e.innerHTML=h;}
function dsE(e){l?e.display='':e.style.display='';}
function dhE(e){l?e.display='none':e.style.display='none';}
function ds(e) {return l?e.display:e.style.display;}
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))num = "0";
sign = (num == (num = Math.abs(num)));num = Math.floor(num*100+0.50000000001); cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10) cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
     num = num.substring(0,num.length-(4*i+3))+','+num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '$' + num + '.' + cents);
}
function popPlayer(url) {   mywindow = window.open ("playcmd.php?plist="+url, "cmPlayer","status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,width=625,height=635"); return mywindow;}
function popPlayerNew(url) {   mywindow = window.open ("playcmd_new.php?plist="+url, "cmPlayer","status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,width=625,height=635"); return mywindow;}

function play(v){popPlayer(v);}
function checkAll(pf){ff?firfoxCheckUncheckAll(pf, true):CheckUncheckAll(pf, true)}
function uncheckAll(pf) {ff?firfoxCheckUncheckAll(pf, false):CheckUncheckAll(pf, false)}
//hard coded values for formObject
function firfoxCheckUncheckAll(pf, v)
{
	for (var i=0;i<frmSongs.elements.length;i++) {
	    var e = frmSongs.elements[i];
	    if ( (e.name == pf+'song[]') ) {
	      e.checked = v;
	    }
	}
}
function CheckUncheckAll(pf, v)
{
	var field = gE(pf+'song[]');
	for (i = 0; i < field.length; i++) field[i].checked = v ;
}

function showDiv(divId)
{	var e = gE(divId);
	if (e != null)
		dsE(e);
}
function hideDiv(divId)
{
	var e = gE(divId);
	if (e != null)
		dhE(e);
}
function toggleDisplay(divId)
{	var e = gE(divId);
	if (e != null)
	{
		var r = ds(e);
		if (r == 'none')
			dsE(e);
		else
			dhE(e);
  	}}


