function go(bkid1){
w=800 
h=600 
  
if (window.screen) { 
    w = window.screen.availWidth; 
    h = window.screen.availHeight; 
   }

window.open("/admin/redirect.php?id="+bkid1,"place_bets","menubar=0,resizable=1,width="+w+",height="+h+",scrollbars=1");	
}


//load betslip
function loadbetslip(id, bdd, sportid, bid){
w=800 
h=600 
  
if (window.screen) { 
    w = window.screen.availWidth; 
    h = window.screen.availHeight; 
   }
 
window.open("/admin/redirect.php?id="+id+"&bdd="+bdd+"&sp="+sportid+"&bid="+bid,"betslip","menubar=0,resizable=1,width="+w+",height="+h+",scrollbars=1");	
}  


function countdown(obj){
	this.obj		    = obj;
	this.Div		    = "clock";
	this.BackColor		= "white";
	this.ForeColor		= "black";
	this.TargetDate		= "07/07/2012 5:00 PM";
	this.DisplayFormat	= " <table><tr><td> %%D%% </td><td> %%H%% </td><td> %%M%% </td><td> %%S%% </td><td></tr></table>";
	this.CountActive	= true;
	
	this.DisplayStr;

	this.Calcage		= cd_Calcage;
	this.CountBack		= cd_CountBack;
	this.Setup		= cd_Setup;
}



function cd_Calcage(secs, num1, num2){
  s = ((Math.floor(secs/num1))%num2).toString();
  if (s.length < 2) s = "0" + s;
  return (s);
}


function cd_CountBack(secs){
  this.DisplayStr = this.DisplayFormat.replace(/%%D%%/g,	this.Calcage(secs,86400,100000));
  this.DisplayStr = this.DisplayStr.replace(/%%H%%/g,		this.Calcage(secs,3600,24));
  this.DisplayStr = this.DisplayStr.replace(/%%M%%/g,		this.Calcage(secs,60,60));
  this.DisplayStr = this.DisplayStr.replace(/%%S%%/g,		this.Calcage(secs,1,60));

  document.getElementById(this.Div).innerHTML = this.DisplayStr;
  if (this.CountActive) setTimeout(this.obj +".CountBack(" + (secs-1) + ")", 990);
}


function cd_Setup(){
	var dthen	= new Date(this.TargetDate);
  	var dnow	= new Date();
	ddiff		= new Date(dthen-dnow);
	gsecs		= Math.floor(ddiff.valueOf()/1000);
	this.CountBack(gsecs);
}


var cd1 = new countdown('cd1');
cd1.Div	= "clock1";
cd1.TargetDate		= "07/07/2012 5:00 PM";
cd1.DisplayFormat	= "<table width=50%><tr><td align=center width=25%><font face=Verdana color=#E3C572> %%D%% </td><td width=25% align=center><font face=Verdana color=#E3C572> %%H%% </td><td align=center width=25%><font face=Verdana color=#E3C572> %%M%% </td><td align=center width=25%><font face=Verdana color=#E3C572> %%S%% </td></tr><tr><td align=center><font face=Verdana color=#E3C572>Days</td><td align=center><font face=Verdana color=#E3C572>Hours</td><td align=center><font face=Verdana color=#E3C572>Minutes</td><td align=center><font face=Verdana color=#E3C572>Seconds</td></tr></table>";



var bookmarkurl   = "http://www.2012-euro-championships.co.uk";
var bookmarktitle = "Euro Championship 2012";

function addbookmark(){
  if (document.all)
  window.external.AddFavorite(bookmarkurl,bookmarktitle);
 }
			
var strapline = 'Euro Championship 2012 Betting, Results, Fixtures, Accommodation, Sportswear, Odds Comparison';

function dgstatus(){
  window.status = strapline;
  timerID= setTimeout("dgstatus()", 20);
 }
dgstatus();

function cauta(){
  document.search.submit();
 }

function tell_a_friend(){
  wina=this.open("recommend.php",'','resizable=no,menubar=no,width=240,height=400,top='+(screen.availHeight-400)/2+',left='+(screen.availWidth-240)/2+',scrollbars=yes');
  wina.opener = this;
 }


