        var DHTML = (document.getElementById || document.all || document.layers);
        function getObj(name)
        {
          if (document.getElementById)
          {
          	this.obj = document.getElementById(name);
        	this.style = document.getElementById(name).style;
          }
          else if (document.all)
          {
        	this.obj = document.all[name];
        	this.style = document.all[name].style;
          }
          else if (document.layers)
          {
           	this.obj = document.layers[name];
           	this.style = document.layers[name];
          }
        }
        
        function invi(flag)
        {
        	if (!DHTML) return;
        	var x = new getObj('Layer1');
        	x.style.visibility = (flag) ? 'hidden' : 'visible'
        }
        
        var textleft = -400;
        
        function move(leftpos)
        {
        	if (!DHTML) return;
        	var x = new getObj('Layer1');
        	textleft = leftpos;
        	x.style.left = textleft;
        }
        
        function MM_reloadPage(init) { if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}
        
		bomenuvisible = false ;
    MM_reloadPage(true);
		function ToggleLNMenu() {
			
			var ns = (navigator.appName.indexOf("Explorer") != -1);
			// unchecked for browsers
			if (bomenuvisible) {
					bomenuvisible = false ;
						//if (ns) { topNav_r1_c5.title = "Click here to view the Compare Odds Menu" ; 
						//} 
					P7AniMagic('Layer1',-150,112,25,30,0,0) ;
						
					var DropBox = document.getElementById("AssMarket");
					if (DropBox) {
   						DropBox.style.visibility = "visible";
	  				}
			}
			else
			{
					
				var DropBox = document.getElementById("AssMarket");
				if (DropBox) {
  					DropBox.style.visibility = "hidden";
				}
				bomenuvisible = true ;
					
					//if (ns) { topNav_r1_c5.title = "Click here to hide the Compare Odds Menu" ;
					//}
					
				P7AniMagic('Layer1',0,112,25,30,0,0) ;
			}
		}
        
        function P7AniMagic(el, x, y, a, b, c, s) { //v2.5 PVII
         var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y);
         var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\','; 
         if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;}
         if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;}
         var xx=(parseInt(d.left))?parseInt(d.left):0;
         var yy=(parseInt(d.top))?parseInt(d.top):0;
         if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;}
         else if (c==2) {m=false;clearTimeout(g.p7Magic);}
         else {var i=parseInt(a);
          if (eval(g.moved)){clearTimeout(g.p7Magic);}
          if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
          if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
          if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
          if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}}
         if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4){
            xx+="px";yy+="px";}
          d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')');
          }else {g.moved=false;}
        }
function ODFS_BS(selID, feedID, marketID, dispPrice, isBestPrice, priceType) 
{
	refStr = new String(document.location);
	SetCookie("BSPageReferer", refStr, null, "/") ;
	if ((refStr.indexOf("/m/") > 0) || (refStr.indexOf("/mhr/") > 0)) 
	{
		SetCookie("MRM", refStr, null, "/") ;
	}
	else
	{
		DeleteCookie ("MRM") ;
	}
	ODFSBetslip=window.open("http://www.easyodds.com/compareodds/bet-slip.aspx?fm_fd_id=" + feedID + "&eoMarketID=" + marketID + "&selectionID=" + selID + "&dp=" + dispPrice + "&isbp=" + isBestPrice + "&pt=" + priceType, "ODFSBetslip","width=500,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
	 if (ODFSBetslip.opener == null) ODFSBetslip.opener = self;
	 	ODFSBetslip.focus();
	
}

function SpreadSell(feedID, marketID, selectionID, sellPrice, isBestPrice)
{
	ODFSBetslip=window.open("/compareodds/bet-slip.aspx?fm_fd_id=" + feedID + "&eoMarketID=" + marketID + "&selectionID=" + selectionID + "&dp=" + sellPrice + "&isbp=" + isBestPrice + "&spread=Sell", "ODFSBetslip", "width=500,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
		if (ODFSBetslip.opener == null) ODFSBetslip.opener = self;
	 		ODFSBetslip.focus();
}

function SpreadBuy(feedID, marketID, selectionID, buyPrice, isBestPrice)
{
	ODFSBetslip=window.open("/compareodds/bet-slip.aspx?fm_fd_id=" + feedID + "&eoMarketID=" + marketID + "&selectionID=" + selectionID + "&dp=" + buyPrice + "&isbp=" + isBestPrice + "&spread=Buy", "ODFSBetslip", "width=500,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
		if (ODFSBetslip.opener == null) ODFSBetslip.opener = self;
			ODFSBetslip.focus();
}


function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function FixCookieDate (date) {
  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);
}
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}


function SetCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

function ShowForm(participantID) {
	var FormDiv		  =	document.getElementById("formguide");	
	if (FormDiv == null) 
	{
		BBcreateTooltip("Sorry - Form is temporarily unavailable",undefined);
	}
	else
	{
		
	
 	var HorseFormDiv1 = document.getElementById("form_figures" + participantID).innerHTML;
 	var HorseFormDiv2 = document.getElementById("form_textDetails1" + participantID).innerHTML;
 	var HorseFormDiv3 = document.getElementById("form_textDetails2" + participantID).innerHTML;
 	var HorseFormDiv4 = document.getElementById("form_textForm" + participantID).innerHTML;
	var NewFormDiv 	= document.getElementById("tooltip");
	NewFormDiv.style.fontFamily = "Verdana";
	NewFormDiv.style.fontSize = "8pt";
	BBcreateTooltip(HorseFormDiv1 + "<br/>" + HorseFormDiv2 + "<br/>" + HorseFormDiv3 + "<br/>" + HorseFormDiv4,undefined);
	}
 }
 
 