// flash
	var f2 = false;
	var f3 = false;
	var f4 = false;
	var f5 = false;
	var f6 = false;
	var mV = 6;
	var aV = 0;
	var hRV = false;
	var jsV = 1.0;
	var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
	jsV = 1.1;
if(isIE && isWin){
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('f2 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	document.write('f3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	document.write('f4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('f5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
	document.write('f6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
	document.write('</SCR' + 'IPT\> \n');
}
function checkFlash(rV){
	var ua=navigator.userAgent.toLowerCase();
	this.webtv = (ua.indexOf("webtv")>-1);
	this.ie = (parseFloat(ua.slice(ua.indexOf("msie")+5)));
	this.nn = (parseFloat(ua.slice(ua.indexOf("mozilla/")+8)));
	var browser = navigator.appName.toLowerCase();
	if (browser=="netscape"){
	this.netscape = true;
	}else{
	this.netscape = false;
	}
	this.mac = (ua.indexOf("mac")>-1);
	this.flash = false;
	
	if (navigator.plugins){
		if (navigator.plugins["Shockwave Flash 2.0"]
		|| navigator.plugins["Shockwave Flash"]){
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var fD = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var fV = parseInt(fD.charAt(fD.indexOf(".") - 1));
			f2 = fV == 2;
			f3 = fV == 3;
			f4 = fV == 4;
			f5 = fV == 5;
			f6 = fV == 6;
		}
	}
	for (var i = 2; i <= mV; i++) {
		if (eval("f" + i) == true) aV = i;
	}
	if (aV >= rV) {
		this.flash = true;
	}
}
function flashObj() {
	this.flashFile = "filename.swf";
	this.LiveConnect = "FALSE";
      	this.wmode = "opaque";
      	this.redirect = null;
	this.DenyIEdl = "FALSE";
	this.altImg = "NoFlash.gif";
	this.altTxt = null;
	this.height = "400";
	this.width = "520";
	this.ID = "espn";
	this.webTV = "true";
	this.quality = "best";
	this.scale = "exactfit";
	this.menu = "false";
	this.deviceFont = "false";
	this.FlashVer = 4;
	this.cabVersion = "4,0,0,0";
	this.render = writeFlashComponent;
}
function writeFlashComponent() {
	var Ticket=new checkFlash(this.FlashVer);
	var sCR;
	if (Ticket.flash) {
			if (Ticket.mac || Ticket.netscape || this.DenyIEdl=='TRUE') {
			sCR="<EMBED SRC="+this.flashFile+" swLiveConnect="+this.LiveConnect+" WIDTH="+this.width+" HEIGHT="+this.height+" QUALITY="+this.quality+" SCALE="+this.scale+" wmode="+this.wmode+" ID="+this.ID+" MENU="+this.menu+" DEVICEFONT="+this.deviceFont+" TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED>";
		} else if (Ticket.ie>=4 && this.DenyIEdl=='FALSE') {
			sCR="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version="+this.cabVersion+"\" ID=\""+this.ID+"\" WIDTH=\""+this.width+"\" HEIGHT=\""+this.height+"\">\n";
			sCR+="<PARAM NAME=movie VALUE=\""+this.flashFile+"\">\n";						
			sCR+="<PARAM NAME=quality VALUE=\""+this.quality+"\">\n";
			sCR+="<PARAM NAME=scale VALUE=\""+this.scale+"\">\n";
			sCR+="<PARAM NAME=menu VALUE=\""+this.menu+"\">\n";
			sCR+="<PARAM NAME=wmode VALUE=\""+this.wmode+"\">\n";
			sCR+="<PARAM NAME=devicefont VALUE=\""+this.deviceFont+"\">\n";
			sCR+="</OBJECT>\n";
		} else if (Ticket.webtv) {
			sCR="<EMBED SRC="+this.flashFile+" swLiveConnect=TRUE WIDTH="+this.width+" HEIGHT="+this.height+" QUALITY="+this.quality+" SCALE="+this.scale+" wmode="+this.wmode+" ID="+this.ID+" MENU="+this.menu+" DEVICEFONT="+this.deviceFont+"  TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED>";
		}
	} else {
	if (this.redirect){
	 top.location.href = this.redirect;
	} else {
			if (this.altTxt){
			sCR = this.altTxt;
			} else {
			sCR="<IMG SRC="+this.altImg+" WIDTH="+this.width+" HEIGHT="+this.height+" BORDER=0>";
			}
		}
		}
	return sCR;
}

// menu
if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;

if (document.images) {

/*		
		var imgelMenu1ON  = new Image();imgelMenu1ON.src  = "/images/topmenu/home_on.gif";
		var imgelMenu1OFF = new Image();imgelMenu1OFF.src = "/images/topmenu/home.gif";

		var imgelMenu1aON  = new Image();imgelMenu1aON.src  = "/images/topmenu/competitions_on.gif";
		var imgelMenu1aOFF = new Image();imgelMenu1aOFF.src = "/images/topmenu/competitions.gif";
		
		var imgelMenu1bON  = new Image();imgelMenu1bON.src  = "/images/topmenu/football_on.gif";
		var imgelMenu1bOFF = new Image();imgelMenu1bOFF.src = "/images/topmenu/football_central.gif";
		
		var imgelMenu2ON  = new Image();imgelMenu2ON.src  = "/images/topmenu/magazine_on.gif";
		var imgelMenu2OFF = new Image();imgelMenu2OFF.src = "/images/topmenu/magazine.gif";
		
		var imgelMenu3ON  = new Image();imgelMenu3ON.src  = "/images/topmenu/training_on.gif";
		var imgelMenu3OFF = new Image();imgelMenu3OFF.src = "/images/topmenu/training.gif";
		
		var imgelMenu4ON  = new Image();imgelMenu4ON.src  = "/images/topmenu/uefa_on.gif";
		var imgelMenu4OFF = new Image();imgelMenu4OFF.src = "/images/topmenu/uefa.gif";

		var imgelMenu5ON  = new Image();imgelMenu5ON.src  = "/images/topmenu/games_on.gif";
		var imgelMenu5OFF = new Image();imgelMenu5OFF.src = "/images/topmenu/games.gif";


		var imgelMenu1ON  = new Image();imgelMenu1ON.src  = "/images/topmenu/mobile_on_new.gif";
		var imgelMenu1OFF = new Image();imgelMenu1OFF.src = "/images/topmenu/mobile_new.gif";

		var imgelMenu1aON  = new Image();imgelMenu1aON.src  = "/images/topmenu/competitions_on_new.gif";
		var imgelMenu1aOFF = new Image();imgelMenu1aOFF.src = "/images/topmenu/competitions_new.gif";
		
		var imgelMenu1bON  = new Image();imgelMenu1bON.src  = "/images/topmenu/football_on_new.gif";
		var imgelMenu1bOFF = new Image();imgelMenu1bOFF.src = "/images/topmenu/football_new.gif";
		
		var imgelMenu2ON  = new Image();imgelMenu2ON.src  = "/images/topmenu/magazine_on_new.gif";
		var imgelMenu2OFF = new Image();imgelMenu2OFF.src = "/images/topmenu/magazine_new.gif";
		
		var imgelMenu3ON  = new Image();imgelMenu3ON.src  = "/images/topmenu/training_on_new.gif";
		var imgelMenu3OFF = new Image();imgelMenu3OFF.src = "/images/topmenu/training_new.gif";
		
		var imgelMenu4ON  = new Image();imgelMenu4ON.src  = "/images/topmenu/uefa_on_new.gif";
		var imgelMenu4OFF = new Image();imgelMenu4OFF.src = "/images/topmenu/uefa_new.gif";

		var imgelMenu5ON  = new Image();imgelMenu5ON.src  = "/images/topmenu/games_on_new.gif";
		var imgelMenu5OFF = new Image();imgelMenu5OFF.src = "/images/topmenu/games_new.gif";
		
*/
}

function imgON(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "ON.src");
	}
}
function imgOFF(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "OFF.src");
	}
}
function getDateTime()
{
	var now = new Date();
	var e = '0' + now.getHours();
	if (e.length > 2) e = e.substring(1);
	d = e + ':';
	e = '0' + now.getMinutes();
	if (e.length > 2) e = e.substring(1);
	d += e + ' ';
	e = '0' + now.getDate();
	if (e.length > 2) e = e.substring(1);
	d += e + '/';
	e = '0' + (now.getMonth() + 1);
	if (e.length > 2) e = e.substring(1);
	d += e + '/' + now	.getFullYear();
	
	return d;
}

function pageNavigate(step, psize)
{
	var page = parseInt(psize,10)-1;
	var pre = "page=";
	var begin = baseUrl.indexOf(pre);
	var newIndex = 1;
	if (begin > 0) {
		begin += pre.length;
		var ixEnd = baseUrl.lastIndexOf('.');
		var oldIndex = parseInt(baseUrl.substring(begin, ixEnd),10);
		newIndex = oldIndex + parseInt(step,10);
		var newsLink;
		if (newIndex > 0)
			newsLink = baseUrl.substring(0,begin) + newIndex + baseUrl.substr(ixEnd);
		else {
			var pre2 = ",page=" + oldIndex;
			begin = baseUrl.indexOf(pre2);
			newsLink = baseUrl.substring(0,begin) + baseUrl.substring(begin + pre2.length);
		}
	}
	else {
		var pre2 = ".htm";
		begin = baseUrl.indexOf(pre2);
		newsLink = baseUrl.substring(0,begin) + ',page=1' + baseUrl.substring(begin);
	}

	if (newIndex >= 1)
		newsLink = newsLink.substring(0,newsLink.length-1) + 'x';
	else
		newsLink = newsLink.substring(0,newsLink.length-1) + 'l';
	
	window.location.href = newsLink;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

//util function written by: James Kerr 26/02/2002
//parameters: optional[int percentage of total screen height] 
//returns a percentage, as specified by the parameter percent, of the total screen height 
//if no parameter specified then returns 80% of total screen height by default
//if no/invalid parameter specified returns default percentage of total screen height
function getPercentageScreenHeight(percent) {
	
	var percentageScreenHeight;
	var defaultPercentage = 80;
		
	if(arguments.length > 0) {
		if(!isNaN(parseInt(arguments[0]))) {
			percentageScreenHeight = Math.round(screen.height*(parseInt(arguments[0])/100));
		}
	} 
	else {
		percentageScreenHeight = Math.round(screen.height*(defaultPercentage/100));
	}
	
	return percentageScreenHeight;
		
}	//end of function
	
	
	
//util function written by: James Kerr 26/02/2002
//parameters: optional[string (height in pixels/percentage of total screen height)] 
//function returns specified height if it is an int or
//returns a percentage of total screen height if '%' symbol is used e.g. 10% and number part is a valid int
//otherwise it returns the default percentage height of the total screen height
//if no/invalid parameter specified returns default percentage of total screen height: see function getPercentageScreenHeight(percent) 
function getPopUpHeight(height) {
	
	if(arguments.length <= 0) {
		return getPercentageScreenHeight();
	}
	else {
		if((String(arguments[0]).indexOf("%") != -1) && (arguments[0].length >= 2)) {
			if(!isNaN(parseInt(String(arguments[0]).substring(0,String(arguments[0]).indexOf("%"))))) {
				return getPercentageScreenHeight(parseInt(String(arguments[0]).substring(0,String(arguments[0]).indexOf("%"))));
			}
			else {
				return getPercentageScreenHeight();
			}
		}
		else if(!isNaN(parseInt(arguments[0]))) {
			return height;
		}
		else {
			return getPercentageScreenHeight();
		}
	}
		
}	//end of function

function openPopup(address, target, width, height) 
{
	fnOpenWindow(address, target, 'no', 'no', 'no', 'no', 'no', 'yes', 'yes', width, height, '0', '0')
}

function fnOpenWindow(address, target, toolbar, location, directories, status, menubar, scrollbars, resizable, width, height, top, left) 
{
	if (!(top > '0'))
	{
		top = (window.screen.availHeight / 2) - (height / 2);
	}
	if (!(left > '0'))
	{
		left = (window.screen.availWidth / 2) - (width / 2);
	}
	var option = "toolbar="+toolbar+",location="+location+"directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",width="+width+",height="+height+",top="+top+",left="+left;
	objWindow = window.open(address, target, option); 
	objWindow.focus();
}


//-------------WCP02 Athlete Bio Open Window function ----------------------------------------------
function fnOpenWinBio(strAthlCode)
{
	fnOpenWindow('http://www2.iaaf.org/Results/Bio/' + strAthlCode + '.html','Biography','no','no','no','no','no','yes','yes','520','420','','');
}
//--------------------------------------------------------------------------------------------------


//util function written by: James Kerr 30/04/2002
//opens specified address in the window (window.opener) that opened the window from which this function is called
//if no window.opener exists (i.e. the current window was opened by the user) or the window.opener has been closed then a new window is opened using fnOpenWindow()
function fnOpenInOpenerWindow(address, target, toolbar, location, directories, status, menubar, scrollbars, resizable, width, height, top, left) 
{
	var objParentWindow = window.opener;
	
	if (objParentWindow && !objParentWindow.closed) {
		objParentWindow.location.href = address;
		objParentWindow.focus();
	} else {
		fnOpenWindow(address, target, toolbar, location, directories, status, menubar, scrollbars, resizable, width, height, top, left);
	}
}

//-------------- check RealPlayer - cdm 14.05.2002
var realEnabled = false;
var realOneEnabled = false;
var realState=false;
var G2=false;

function checkReal()
{
	
	numPlugins = navigator.plugins.length;
	for(i=0;i<numPlugins;i++)
	{
		plugin = navigator.plugins[i];
		if ((plugin.name.substring(0,10)=="RealPlayer")&&(plugin.name.indexOf("G2")>0)) realState=true;
	}

   	document.write('<script language=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('G2 = (NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))\n');
	document.write('</script\> \n');
   	document.write('<script language=VBScript\>\non error resume next \nG2=(NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))\n</script\>\n');
	return (realState||G2);
}

function linkReal(url,realUrl,realOneUrl)
{
	if( realOneEnabled )
		document.location.href = url;
	else
		if( realEnabled )
			window.open(realOneUrl);
		else
			window.open(realUrl);
}

//-------------- end check Real Player

//-------------- check realOne
function isRealOne() {

        RealOneInst = 'undetermined';
        
        var agt=navigator.userAgent.toLowerCase();
        var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                        && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                        && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
        if (is_nav) {
                IERPCtl = 0;
        }
        
        document.write('<OBJECT ID="IERPCtl" WIDTH=0 HEIGHT=0 CLASSID="CLSID:FDC7A535-4070-4B92-A0EA-D9994BCC0DC5"></OBJECT>');
        
        if (navigator.plugins) {
                if ((navigator.userAgent.charAt(8)) >= ('3'))
                {
                var nPlayerInstalled=2;
                var i=0;
                while (navigator.plugins[i])
                        {
                        if ((navigator.plugins[i].name) == 'RealOne Player Version Plugin')
                                {
                                        nPlayerInstalled=1;
                                        szPlayerVersion=navigator.plugins[i].description;
                                        break;
                                }
                        i++;
                        }
        
                        if ( nPlayerInstalled == 2 )
                        {
                                var nRPVersion = IERPCtl.RealPlayerVersion;
                                if ( nRPVersion == null )
                                {
                                nPlayerInstalled=2;
                                } else {
                                nPlayerInstalled=1;
                                }
                        }
                }       
                if (nPlayerInstalled == 1)
                {
                RealOneInst = 'installed';
                } 
                if (nPlayerInstalled == 2)
                {
                RealOneInst = 'notinstalled';
                }
        } else {
        RealOneInst = 'undetermined';
        }
        /*
        if (RealOneInst == 'installed') {
                if (agt.indexOf(" (r1 ") != -1) {
                        RealOneInst = 'using';
                }
        }
        */
        if (RealOneInst == 'installed')
			return true;     
		else
			return false;     

}
//-------------- end check realOne