var agt = navigator.userAgent.toLowerCase();
var versInt = parseInt(navigator.appVersion);
var is_ie	= ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (versInt < 4));
var is_ie4    = (is_ie && (versInt == 4) && (agt.indexOf("msie 4")!=-1) );
var is_aol   = (agt.indexOf("aol") != -1);
var is_aol3  = (is_aol && is_ie3);
var is_aol4  = (is_aol && is_ie4);
var is_aol5  = (agt.indexOf("aol 5") != -1);
var is_aol6  = (agt.indexOf("aol 6") != -1);
var is_comp   = (agt.indexOf("compuserve") != -1);
var is_comp2000   = (agt.indexOf("cs") != -1);	 
var is_compie = (is_comp && is_ie);
function CNN_openPopup( url, name, widgets, openerUrl ){
	var host = location.hostname;
	var popupWin = window.open( url, name, widgets );
	
	if ( openerUrl )
	{
		popupWin.opener.location = openerUrl;
	}

	if ( !( is_aol6 || is_aol3 || is_aol4 || is_aol5 || is_compie || is_comp2000) )
	{
		popupWin.opener.top.name = "opener";
		popupWin.focus();
	}
}
function popUp(URL,fat,ugly,scroller) {
	width = fat;
	height = ugly;
	day = new Date();
	id = day.getTime();
	if (scroller=="yes") {
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + "');");
	} else {
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width + ",height=" + height + "');");
	}
}
function flashwindow(winname,wintitle,winsrc,wincolor) {
	if (!wincolor) { wincolor="#000000"; }
	var opts = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=410,height=330";
	var win = window.open ("", winname, opts);
	with (win.document) {
		writeln ('<html><head><title>'+wintitle+'</title></head><body bgcolor="'+wincolor+'"><center>');
	      //writeln ('  <iframe frameborder="0" scrolling="no" width=100% height=100% src="'+winsrc+'"></iframe>');
		writeln ('  <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH=100% HEIGHT=100% id="musical" ALIGN="center">');
		writeln ('     <PARAM NAME=movie VALUE="'+winsrc+'">');
		writeln ('     <PARAM NAME=quality VALUE=high>');
		writeln ('     <param wmode="transparent">');
	        writeln ('     <PARAM NAME=bgcolor VALUE='+wincolor+'>');
		writeln ('     <EMBED src="'+winsrc+'" quality=high wmode="transparent" bgcolor="'+wincolor+'" WIDTH=100% HEIGHT=100% NAME="Musical" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
		writeln ('  </OBJECT>');
		writeln ('</center></body></html>');
		close ();
	}
}
