var the_imageoff = new Image();
var the_imageon = new Image();

var i;


function img_act(imgName){ 

if (document.images){ 
the_imageoff[imgName] = new Image();
the_imageon[imgName] = new Image();
the_imageoff[imgName].src = "/mp/xm/i/" + imgName + ".gif"
the_imageon[imgName].src = "/mp/xm/i/" + imgName + "_on.gif";
document.images[imgName].src = the_imageon[imgName].src;
}
}

function img_inact(imgName){ 

if (document.images){ 
the_imageoff[imgName] = new Image();
the_imageon[imgName] = new Image();
the_imageoff[imgName].src = "/mp/xm/i/" + imgName + ".gif"
the_imageon[imgName].src = "/mp/xm/i/" + imgName + "_on.gif";
document.images[imgName].src = the_imageoff[imgName].src;
}
}
   
function img_act2(imgName){ 

if (document.images){ 
the_imageoff[imgName] = new Image();
the_imageon[imgName] = new Image();
the_imageoff[imgName].src = "/mp/xm/i/programming/subnav/" + imgName + "_off.gif"
the_imageon[imgName].src = "/mp/xm/i/programming/subnav/" + imgName + "_on.gif";
document.images[imgName].src = the_imageon[imgName].src;
}
}

function img_inact2(imgName){ 

if (document.images){ 
the_imageoff[imgName] = new Image();
the_imageon[imgName] = new Image();
the_imageoff[imgName].src = "/mp/xm/i/programming/subnav/" + imgName + "_off.gif"
the_imageon[imgName].src = "/mp/xm/i/programming/subnav/" + imgName + "_on.gif";
document.images[imgName].src = the_imageoff[imgName].src;
}
}



function newWin(theURL){
var confirmWin = window.open(theURL,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');

	//give a reference between the opener
	//and the popup for backwards compatibility
	if(confirmWin.opener==null){
		confirmWin.opener = self;
	}
	return false;
}

function imagepop(bg, image, width, height) { //maDprogrAMiNsklz 2003 (c)
	
	window.open('/generic/pop_up.jsp?bgColor=' + bg + '&image=' + image + '', 'xtWin', 'left=10,top=10,width=' + width + ',height=' + height + ',scrollbars=no,status=no');
	
}

function launchXMRO() {
	
		var options = "width=790,height=448,resizable=yes,scrollbars=no,status=no";
		//var thehref = "@player.url.root@/player/2ft/index.jsp";	
		var thehref = appHostUrlXM+appContext+"/listen/playerShell.action";
		
		var inlineplayer;
		if(!uiType)
			uiType="generic";
		if (uiType=="msie" || uiType=="generic")
		{
			inlineplayer="false";
		
			if (screen.width >= 1024){ 
			
			options = "width=945,height=590,resizable=yes,scrollbars=no,status=no";
			
			}
			var remote = window.open(thehref,"wmp",options);
	 
			if (!remote.opener) remote.opener = self; // For JS1.0
			if (remote.focus) remote.focus();
			// Netscape 6.0 complains when focusing on newly opend window, saying
			// "uncaught exception". This exception cannot be caught even if it's in try block.
			// This is a known N6 bug, and no workaround is made here.
		}
		else
		{ 
		
		  inlineplayer="true";
		  window.location.href=thehref;
		}
	
}

function why_login() {
	
		var options = "width=400,height=150,resizable=no,scrollbars=yes,status=no,top=10,left=10";
		var thehref = "/xstream/registration/why_login.jsp";	
		
		var remote = window.open(thehref,"why",options);
 
        if (!remote.opener) remote.opener = self; // For JS1.0
        if (remote.focus) remote.focus();
        // Netscape 6.0 complains when focusing on newly opend window, saying
        // "uncaught exception". This exception cannot be caught even if it's in try block.
        // This is a known N6 bug, and no workaround is made here.
}


function find_radio() {
	
		var options = "width=400,height=150,resizable=no,scrollbars=yes,status=no,top=10,left=10";
		var thehref = "/xstream/registration/find_radio.jsp";	
		
		var remote = window.open(thehref,"why",options);
 
        if (!remote.opener) remote.opener = self; // For JS1.0
        if (remote.focus) remote.focus();
        // Netscape 6.0 complains when focusing on newly opend window, saying
        // "uncaught exception". This exception cannot be caught even if it's in try block.
        // This is a known N6 bug, and no workaround is made here.
}

	
