Popup = {

    open : function ( url, width, height, name, toolbar, scroll, x, y )
    {
        if ( name == null )
        {
            var name = new Date();
            name = name.getTime();
            name = name.toString();
        }
        
        toolbar               = toolbar ? 'yes' : 'no';
        scroll                = scroll ? 'yes' : 'no';
        var features          = 'toolbar='+toolbar+',menubar='+toolbar+',location='+toolbar+',status='+toolbar+',scrollbars='+scroll+',resizable='+scroll;
        if (width) features  += ',width='+width;
        if (height) features += ',height='+height;
        if (x) features      += ',screenX='+x+',left='+x;
        if (y) features      += ',screenY='+y+',top='+y;
        this.reference        = window.open(url, name, features);
        
        if ( this.reference != null && ! this.reference.closed )
        {
            this.reference.focus();
        }
    },
    
    openCenter : function ( url, width, height, name, toolbar, scroll )
    {
        var x = (width && window.screen.availWidth) ? Math.round((window.screen.availWidth - parseInt(width)) / 2) : 0;
        var y = (height && window.screen.availHeight) ? Math.round((window.screen.availHeight - parseInt(height)) / 2) : 0;
        this.open(url, width, height, name, toolbar, scroll, x, y);
    }
}

function openWebRadio ( url )
{
    Popup.openCenter ( url, 510, 240, 'webradio', false, false );
    return false;
}

function matchColumns ()
{ 
	var divs,contDivs,maxHeight,divHeight,d; 
	divs=document.getElementsByTagName('div'); 
    contDivs=[]; 
	maxHeight=0; 
	
	for(var i=0;i<divs.length;i++)
	{ 
		if(/\bmatch\b/.test(divs[i].className))
		{ 
	        d=divs[i]; 
            contDivs[contDivs.length]=d;
			
			if(d.offsetHeight)
			{ 
         		divHeight=d.offsetHeight; 					
    		} 
 			else if(d.style.pixelHeight)
			{ 
		      	divHeight=d.style.pixelHeight;					 
	    	} 
			
			maxHeight=Math.max(maxHeight,divHeight); 

   		} 
	} 
 	
	for(var i=0;i<contDivs.length;i++)
	{ 
          contDivs[i].style.height=maxHeight + "px"; 
    } 
} 

window.onload=function()
{ 
     if(document.getElementsByTagName)
	 { 
          matchColumns();			 
     } 
} 
