/**
* Advert.js
*
*/
var requiredMajorVersion = 8;
var requiredMinorVersion = 0;
var requiredRevision = 0;
var jsVersion = 1.0;

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
if (isOpera) {requiredMajorVersion = 9;}
jsVersion = 1.1;
function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
  // NS/Opera version >= 3 check for Flash plugin in plugin array
        if (navigator.plugins != null && navigator.plugins.length > 0) {
                if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
                        var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
                var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
                        descArray = flashDescription.split(" ");
                        tempArrayMajor = descArray[2].split(".");
                        versionMajor = tempArrayMajor[0];
                        versionMinor = tempArrayMajor[1];
                        if ( descArray[3] != "" ) {
                                tempArrayMinor = descArray[3].split("r");
                        } else {
                                tempArrayMinor = descArray[4].split("r");
                        }
                versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
        } else {
                        flashVer = -1;
                }
        }
        // MSN/WebTV 2.6 supports Flash 4
        else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
        // WebTV 2.5 supports Flash 3
        else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
        // older WebTV supports Flash 2
        else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
        // Can't detect in all other cases
        else {

                flashVer = -1;
        }
        return flashVer;
}
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
        reqVer = parseFloat(reqMajorVer + "." + reqRevision);
        for (i=25;i>0;i--) {
                if (isIE && isWin && !isOpera) {
                        versionStr = ControlVersion();
                } else {
                        versionStr = JSGetSwfVer(i);
                }
                if (versionStr == -1 ) {
                        return false;
                } else if (versionStr != 0) {
                        if(isIE && isWin && !isOpera) {
                                tempArray         = versionStr.split(" ");
                                tempString        = tempArray[1];
                                versionArray      = tempString .split(",");
                        } else {
                                versionArray      = versionStr.split(".");
                        }
                        versionMajor      = versionArray[0];
                        versionMinor      = versionArray[1];
                        versionRevision   = versionArray[2];

                        versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
                        versionNum        = parseFloat(versionString);
                        if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
                                return true;
                        } else {
                                return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );
                        }
                }
        }
        return (reqVer ? false : 0.0);
}

var google_ad_client = 'granada_liverpool_120x600';
var google_ad_width = 120;
var google_ad_height = 600;
var google_ad_format = '120x600_pas_abgc';
var google_safe = 'high';
var google_color_bg = 'F9F9F9';
var google_color_border = 'CC0000';

function LFCScroller(){return true;}

function switch_section(sec,sub){
    i = 0;
    do
    {
        var current_section = null;
        if ( document.all){
            current_section = document.all['section_'+sec+'_'+i];}
        else if ( document.getElementById ){
            current_section = document.getElementById('section_'+sec+'_'+i);}
        if ( current_section != null ){ 
            current_section.style.overflow = ( i == sub ? 'visible' : 'hidden' );
            current_section.style.visibility = ( i == sub ? 'visible' : 'hidden' );
        }
        i++;
    } while ( current_section != null );
}

function setLFCHomepage(obj, page)
{
    if ( parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5)) >= 5 )
    {
        obj.style.behavior='url(#default#homepage)';
        obj.setHomePage(page);        
    }
}

function addLFCPlayer(no,name,pos, url)
{
    document.writeln('<tr class=feature>');
    document.writeln('<td width=23 height=16 bgcolor=#cccccc align=center>'+no+'</td>');
    document.writeln('<td width=179><a href="'+url+'">'+name+'</a></td>');
    document.writeln('<td width=29>'+pos+'</td>');
    document.writeln('</tr>');
}

hasFlash = false;
hasFlash = DetectFlashVer(8,0,0);

var current = location.href;
var http_str = current.substr(0, 5);

if(http_str == 'http:')
{
var rsi_segs = [];
var segs_beg=document.cookie.indexOf('rsi_segs=');
if(segs_beg>=0){
segs_beg=document.cookie.indexOf('=',segs_beg)+1;
if(segs_beg>0){
var segs_end=document.cookie.indexOf(';',segs_beg);
if(segs_end==-1)segs_end=document.cookie.length;
rsi_segs=document.cookie.substring(segs_beg,segs_end).split('|');
}}
var segLen=20
var segQS="",segArr=new Array()
if (rsi_segs.length<segLen){segLen=rsi_segs.length}
for (var i=0;i<segLen;i++){
segArr=rsi_segs[i].split("_")
if (segArr.length>1) segQS+=("rsi"+"="+segArr[1]+"+")
}
}
else
{
var segQS = "";
}

function LFCAdServer(w,h)
{
    this.width = w;
    this.height = h;
    this.prefix = "";
    this.external = "";
    this.weight = 0;
    this.monitor = null;
    this.size = 0;
    this.date = new Date();
    this.ads = new Array();
    this.adchannels = new Array();
    this.bet_ads = new Array();
    this.channels = new Array(
	'news',
	'shop',
	'match',
	'interactive',
	'mobile',
	'tickets',
	'team',
	'history',
	'club'
    );
    for (i=0;i<this.channels.length;i++)
    {
    	this.adchannels[this.channels[i]] = new Array();
    }
    this.add = function(img,url,alt,weight,start,end,channel,type) {

	        this.showme = true;

		//rep, replacement displayed only if no flash
		
		if ( (type=='gif' && hasFlash==true) || (hasFlash==false && type=='swf'))
 		{
			this.showme = false;
		}
		else 
		{
			if ( start != '' )
			{
				start = new Date(start);
				if ( start > this.date )
				{
					this.showme = false;
				}
			}
			if ( end != '' )
			{
				end = new Date(end);
				if ( end < this.date )
				{
					this.showme = false;
				}
			}
		}
		if ( this.showme )
		{
			this.ads[this.size] = new Array();

			if (channel != null)
			{
				for (y=weight;y>=0;y--)
				{
					if (channel == 'all')
					{
					    for (i=0;i<this.channels.length;i++)
					    {
						this.adchannels[this.channels[i]][this.adchannels[this.channels[i]].length] = this.size;
					    }
					}
					else this.adchannels[channel][this.adchannels[channel].length] = this.size;

				}
				this.ads[this.size]["img"] = 'http://assets.liverpoolfc.tv' + img;
				//this.ads[this.size]["img"] = '/mpu_ads/' + img;
			}
			else
			{
				for (y=weight;y>0;y--)
				{
					this.bet_ads[this.bet_ads.length] = this.size;
				}
				this.ads[this.size]["img"] = this.prefix + img;
			}
			this.ads[this.size]["url"] = url;
			this.ads[this.size]["alt"] = alt;
			this.ads[this.size]["weight"] = weight;
			this.ads[this.size]["channel"] = channel;

			this.extension = img.substring(img.lastIndexOf(".")).toUpperCase();

			if (this.external == ' target="_blank"' || this.extension == ".GIF" || this.extension == ".JPG" || this.extension == ".JPEG")
			{
				this.ads[this.size]["tag"] = '<img src="'+this.ads[this.size]["img"]+'" alt="'+this.ads[this.size]["alt"]+'" width="'+this.width+'" height="'+this.height+'" border="0" />';
			}
			else if ( this.extension == ".SWF" )
			{
				this.ads[this.size]["tag"] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+this.width+'" height="'+this.height+'"><param name="quality" value="high" /><param name="movie" value="'+this.ads[this.size]["img"]+'"><param value="opaque" name="wmode"><embed src="'+this.ads[this.size]["img"]+'" width="'+this.width+'" height="'+this.height+'" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>';
			}
			else
			{
				this.size--;
			}
			this.size++;

		}
    }
    this.setInternal = function() {
        this.prefix = '/ads/';
    }
    this.setExternal = function() {
        this.external = ' target="_blank"';
    }
	this.display = function(channel) {
		if (channel != null)
		{
			//channel is for mpu ads not on homepage
			adref = Math.floor(Math.random() * this.adchannels[channel].length);
			ad = this.adchannels[channel][adref];
		}
		else 
		{
			adref = Math.floor(Math.random() * this.bet_ads.length);
			ad = this.bet_ads[adref];

			for (i=0;i<this.bet_ads.length;i++)
			{
				if ( this.ads[ad]["img"] != "/ads/300x145Liverpool_9Fallback.gif")
				{
					break;
				}
				else
				{
					ad = this.bet_ads[++adref];

					if ( adref == this.bet_ads.length )
					{
						adref = 0;
						ad = this.bet_ads[adref];
					}
				}
			}
		}

		if (this.ads[ad]["url"] != '') document.write('<a href="'+this.ads[ad]["url"]+'"'+this.external+'>');
		document.write(this.ads[ad]["tag"]);
		if (this.ads[ad]["url"] != '') document.write('</a>');
	}
}

var AdGroup = Math.round(Math.random() * 100000000);
function ExternalAdServer() {
  this.server = 'http://adserver.adtech.de/';
  this.standard = new Array();
  this.standard[0] = 'addyn|3.0|512|';
  this.standard[1] = 'ADTECH;loc=100;target=_blank;sub1=[subst];key=key1+key2+key3+key4+'+segQS+';grp=';
  this.standard[2] = ';misc=';

  this.id = new Array();
  this.id["home"] = new Array();
  this.id["home"]["banner"] = '1010169|0|1|';
  this.id["home"]["richmedia"] = '1019648|0|16|';
  this.id["news"] = new Array();
  this.id["news"]["banner"] = '1019652|0|1|';
  this.id["news"]["extra"] = '1019652|0|1|';
  this.id["news"]["skyscraper"] = '1019651|0|168|';
  //this.id["news"]["richmedia"] = '1019653|0|16|';
  this.id["news"]["richmedia"] = '1550078|0|170|';
  this.id["match"] = new Array();
  this.id["match"]["banner"] = '1019655|0|1|';
  this.id["match"]["skyscraper"] = '1019654|0|168|';
  this.id["match"]["richmedia"] = '1019656|0|16|';
  this.id["shop"] = new Array();
  this.id["shop"]["banner"] = '1019657|0|1|';
  this.id["shop"]["skyscraper"] = '1019659|0|168|';
  this.id["shop"]["richmedia"] = '1019658|0|16|';
  this.id["interact"] = new Array();
  this.id["interact"]["banner"] = '1019664|0|1|';
  this.id["interact"]["skyscraper"] = '1019665|0|168|';
  this.id["interact"]["richmedia"] = '1019663|0|16|';
  this.id["mobile"] = new Array();
  this.id["mobile"]["banner"] = '1019666|0|1|';
  this.id["mobile"]["skyscraper"] = '1019667|0|168|';
  this.id["mobile"]["richmedia"] = '1019668|0|16|';
  this.id["tickets"] = new Array();
  this.id["tickets"]["banner"] = '1019669|0|1|';
  this.id["tickets"]["skyscraper"] = '1019671|0|168|';
  this.id["tickets"]["richmedia"] = '1019670|0|16|';
  this.id["team"] = new Array();
  this.id["team"]["banner"] = '1019673|0|1|';
  this.id["team"]["skyscraper"] = '1019674|0|168|';
  this.id["team"]["richmedia"] = '1019672|0|16|';
  this.id["history"] = new Array();
  this.id["history"]["banner"] = '1019676|0|1|';
  this.id["history"]["skyscraper"] = '1019675|0|168|';
  this.id["history"]["richmedia"] = '1019677|0|16|';
  this.id["club"] = new Array();
  this.id["club"]["banner"] = '1019680|0|1|';
  this.id["club"]["skyscraper"] = '1019679|0|168|';
  this.id["club"]["richmedia"] = '1019678|0|16|';
  this.id["ros"] = new Array();
  this.id["ros"]["banner"] = '1010171|0|1|';
  this.id["ros"]["richmedia"] = '1105491|0|170|';

  this.display = function(section, type) {

    var html = "";
	if (section == '' && type == '')
	{
		html = "<img src=\"http://www.liverpoolfc.tv/ads/m0407_liverpool-5star_145x145.gif\" />"
		document.write(html);
	}

    // If ad hits are not acceptable remove the following two lines
    if ( type == "extra" )
     	  return;
    // If ad hits are acceptable remove the following four lines
    //if ( type == "extra" ) {
    //   html = '<br/>&nbsp;<br/>';
    //   document.write(html); 
    //}
	  
    html = '<scr'+'ipt language="JavaScript1.1" src="'+this.server+this.standard[0]+this.id[section][type]+this.standard[1]+AdGroup+this.standard[2]+new Date().getTime()+'"></scr'+'ipt>';
    document.write(html);
    if ( type == "banner" && section != "ros" ) {
        //html = '<scr'+'ipt language="JavaScript1.1" src="'+this.server+this.standard[0]+this.id[section]["richmedia"]+this.standard[1]+AdGroup+this.standard[2]+new Date().getTime()+'"></scri'+'pt>';
        //document.write(html);
    }
  }

}

var LFCAds300x250 = new LFCAdServer(300,250);
var LFCAds120x600 = new LFCAdServer(120,600);
LFCAds300x250.setInternal();
LFCAds120x600.setInternal();

//BettingAds.setInternal();

//BettingAds.add("GAMES_300x145-liverpool0155rt.gif","http://games.paddypower.com/newplayerbonus.html?GID=6050&AFF_ID=942","Bet £1 get £10 FREE with Paddy Power Games",5,"16 AUGUST    2009 18:00","17 AUGUST    2009 18:00");
//BettingAds.add("pp_generic_button_liverpool.gif","http://www.paddypower.com/bet?action=cmp&cid=37&AFF_ID=10002725","Click here for LFC Betting. Free £10 bet",1,"05 MAY       2009 00:01","20 MAY       2009 23:59");
//BettingAds.add("300X145_Liverpool_1.gif","http://www.paddypower.com/football/football-matches/premier-league-matches/Tottenham-v-Liverpool-1487063.html?cid=37&AFF_ID=10002725","Money-Back on ANY Premier League game this weekend that ends 0-0",5,"12 AUGUST    2009 11:07","16 AUGUST    2009 16:00");
//BettingAds.add("300x145Liverpool_9Fallback.gif","http://www.paddypower.com/bet?action=cmp&cid=37&AFF_ID=10002725","FREE 20 POUND BET",1,"20 AUGUST    2008 15:00","10 OCTOBER   2010 00:00");


//BettingAds.add("<!--IMG-->","<!--URL-->","<!--ALT-->",<!--WEIGHT-->,<!--START-->,<!--END-->);

//omit the gif or flash from type arg to display advert regardless

//DB Controlled Adverts Start

 //allred_120x600_08072010.gif 
 LFCAds120x600.add('/uploads/allred_120x600_08072010.gif','http://www.liverpoolfc.tv/fans/membership/official-lfc-membership?ncid=membership_allred_sky_08072010','','','29 July 2010 00:00','30 September 2010 23:59','news','gif');


 //allred_300x250_08072010.swf 
 LFCAds300x250.add('/uploads/allred_300x250_08072010.swf','','','','29 July 2010 00:00','30 September 2010 23:59','news','swf');


 //allred_120x600_08072010.swf 
 LFCAds120x600.add('/uploads/allred_120x600_08072010.swf','','','','29 July 2010 00:00','30 September 2010 23:59','news','swf');


 //allred_300x250_08072010.gif
 LFCAds300x250.add('/uploads/allred_300x250_08072010.gif','http://www.liverpoolfc.tv/fans/membership/official-lfc-membership?ncid=membership_allred_mpu_08072010','','','29 July 2010 00:00','30 September 2010 23:59','news','gif');


 //188Bet Super8 Campaign August2010
 LFCAds300x250.add('/uploads/300x250_super8_liv.gif','http://www.188promo.com/super8/?vendorId=2015','','','01 August 2010 00:01','12 August 2010 23:59','news','all');


 //188Bet Super8 Campaign August2010
 LFCAds120x600.add('/uploads/120x600_super8_liv.gif','http://www.188promo.com/super8/?vendorId=2015','','','01 August 2010 00:01','12 August 2010 23:59','news','all');


 //Conference Events mpu 082010
 LFCAds300x250.add('/uploads/conference_events_mpu_05112009.gif','http://www.liverpoolfc.tv/club/banqueting.htm?ncid=conferences&events_mpu_16112009','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Conference Events sky 082010
 LFCAds120x600.add('/uploads/conference_events_sky_05112009.gif','http://www.liverpoolfc.tv/club/banqueting.htm?ncid=conferences&events_sky_16112009','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Soccer Schools 082010
 LFCAds300x250.add('/uploads/soccerschools_mpu_042010.jpg','https://bookings.liverpoolfc.tv/soccerschools/booking/currentcourses.htm?ncid=soccerschool_mpu_courses_16112009','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Soccer Schools 082010
 LFCAds120x600.add('/uploads/soccerschools_sky_042010.jpg','https://bookings.liverpoolfc.tv/soccerschools/booking/currentcourses.htm?ncid=soccerschool_sky_courses_16112009','','','04 August 2010 00:01','30 May 2011 23:59','news','all');


 //Ticket Matchday Hospitality 082010
 LFCAds300x250.add('/uploads/matchday_hospitalitypackaging_mpu_05112009.gif','https://bookings.liverpoolfc.tv/matchdays/booking/book.htm?page=0&ncid=hospitality_mpu_matchday_16112009bskyb','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Ticket Matchday Hospitality 082010
 LFCAds120x600.add('/uploads/matchday_hospitalitypackaging_sky_05112009.gif','https://bookings.liverpoolfc.tv/matchdays/booking/book.htm?page=0&ncid=hospitality_sky_matchday_16112009bskyb','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Shop Adidas Golf 082010
 LFCAds300x250.add('/uploads/shop_adidasgolf_14042010_mpu.jpg','http://store.liverpoolfc.tv/products/accessories/golf?ncid=store_golfadidas_mpu_150410','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Shop Adidas Golf 082010 
 LFCAds120x600.add('/uploads/shop_adidasgolf_14042010_sky.jpg','http://store.liverpoolfc.tv/products/accessories/golf?ncid=store_golfadidas_sky_150410','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Shop Home Kit Launch 082010
 LFCAds300x250.add('/uploads/shop_kitlaunch_mpu_050510.swf','http://www.liverpoolfc.tv/shop/kit?ncid=store_preorder_newhomekit_mpu_25032010','','','04 August 2011 00:01','31 December 2010 23:59','news','swf');


 //Shop Home Kit Launch 082010
 LFCAds300x250.add('/uploads/lfc_kitlaunch_mpu_050510.gif','http://www.liverpoolfc.tv/shop/kit?ncid=store_preorder_newhomekit_mpu_25032010','','','04 August 2010 00:01','31 December 2010 23:59','news','gif');


 //Shop Home Kit Launch 082010 
 LFCAds120x600.add('/uploads/lfc_kitlaunch_sky_050510.gif','http://www.liverpoolfc.tv/shop/kit?ncid=store_preorder_newhomekit_sky_25032010','','','04 August 2010 00:01','31 December 2010 23:59','news','gif');


 //Shop Home Kit Launch 082010
 LFCAds120x600.add('/uploads/shop_kitlaunch_sky_050510.swf','http://www.liverpoolfc.tv/shop/kit?ncid=store_preorder_newhomekit_sky_25032010','','','04 August 2010 00:01','31 December 2010 23:59','news','swf');


 //Mobile Istanbul05 082010
 LFCAds300x250.add('/uploads/mobile_istanbul05_mpu.jpg','http://clk.tradedoubler.com/click?p=23708&a=1673377&url=http%3A%2F%2Fitunes.apple.com%2Fgb%2Fapp%2Fistanbul-05-lfc-','','','04 August 2010 00:01','24 May 2011 23:59','news','all');


 //Mobile Istanbul05 082010 
 LFCAds120x600.add('/uploads/mobile_istanbul05_sky.jpg','http://clk.tradedoubler.com/click?p=23708&a=1673377&url=http%3A%2F%2Fitunes.apple.com%2Fgb%2Fapp%2Fistanbul-05-lfc-','','','04 August 2010 00:01','24 May 2011 23:59','news','all');


 //Shop Away Kit Launch 082010 
 LFCAds300x250.add('/uploads/shop_awaykitorder_mpu_080610.gif','http://store.liverpoolfc.tv/products/newawaykit?ncid=store_preorder_newawaykit_mpu_27052010','','','04 August 2010 00:01','31 December 2010 23:59','news','gif');


 //Shop Away Kit Launch 082010 
 LFCAds300x250.add('/uploads/shop_awaykitorder_mpu_080610.swf','http://store.liverpoolfc.tv/products/newawaykit?ncid=store_preorder_newawaykit_mpu_27052010','','','04 August 2010 00:01','31 December 2010 23:59','news','swf');


 //Shop Away Kit Launch 082010 
 LFCAds120x600.add('/uploads/shop_awaykitorder_sky_080610.gif','http://store.liverpoolfc.tv/products/newawaykit?ncid=store_preorder_newawaykit_sky_27052010','','','04 August 2010 00:01','31 December 2010 23:59','news','gif');


 //Shop Away Kit Launch 082010 
 LFCAds120x600.add('/uploads/shop_awaykitorder_sky_080610.swf','http://store.liverpoolfc.tv/products/newawaykit?ncid=store_preorder_newawaykit_sky_27052010','','','04 August 2010 00:01','31 December 2010 23:59','news','swf');


 //Events Christmas Bookings 082010
 LFCAds120x600.add('/uploads/xmas2010_skyscraper.jpg','http://www.liverpoolfc.tv/corporate/meetings-and-events?ncid=hospitality_christmas_sky_01072010skyb','','','04 August 2010 00:01','20 December 2010 23:59','news','all');


 //Anfield Tours 082010
 LFCAds300x250.add('/uploads/tours2010_mpu.jpg','https://bookings.liverpoolfc.tv/stadiumtours/booking/default.htm?ncid=toursmuseum_anfieldtour_mpu_02072010','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Shop Euro Kit Launch 082010 
 LFCAds300x250.add('/uploads/shop_eurokitorder_mpu_120810.gif','http://store.liverpoolfc.tv/products/footballkit/thirdkit?ncid=store_order_neweurokit_mpu_14072010','','','04 August 2010 00:01','31 December 2010 23:59','news','all');


 //Shop Euro Kit Launch 082010 
 LFCAds120x600.add('/uploads/shop_eurokitorder_sky_120810.gif','http://store.liverpoolfc.tv/products/footballkit/thirdkit?ncid=store_order_neweurokit_sky_14072010','','','04 August 2010 00:01','31 December 2010 23:59','news','all');


 //Mobile Liverpool Membership 082010
 LFCAds300x250.add('/uploads/mobile_liverpoolmembershipmpu.jpg','http://www.liverpoolfc.tv/mobile?id=wallpapers&ncid=mobile_lfcmembership_mpu_21072010','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Mobile Liverpool Membership 082010
 LFCAds120x600.add('/uploads/mobile_120x600liverpoolmembership.jpg','http://www.liverpoolfc.tv/mobile?id=wallpapers&ncid=mobile_lfcmembership_mpu_21072010','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //BOA Wave Liverpool 082010
 LFCAds300x250.add('/uploads/boa_m0526-wave-liverpool-300x250.swf','https://www.mbna.co.uk/apply/UKCCapp/Ctl/entry?sc=82lfcrwgs_ost&mc=ECO-UK-33333-12711','','','04 August 2010 00:01','30 May 2011 23:59','news','swf');


 //BOA Wave Liverpool 082010
 LFCAds300x250.add('/uploads/boa_m0526-wave-liverpool-300x250.jpg','http://www.liverpoolfc.tv/mobile?id=wallpapers&ncid=mobile_lfcmembership_mpu_21072010','','','04 August 2010 00:01','31 May 2011 23:59','news','gif');


 //BOA Wave Liverpool 082010 
 LFCAds120x600.add('/uploads/boa_m0526-wave-liverpool-120x600.jpg','https://www.mbna.co.uk/apply/UKCCapp/Ctl/entry?sc=82lfcrwgs_ost&mc=ECO-UK-33333-12711','','','04 August 2010 00:01','31 May 2011 23:59','news','gif');


 //BOA Wave Liverpool 082010
 LFCAds120x600.add('/uploads/boa_m0526-wave-liverpool-120x600.swf','https://www.mbna.co.uk/apply/UKCCapp/Ctl/entry?sc=82lfcrwgs_ost&mc=ECO-UK-33333-12711','','','04 August 2010 00:01','31 May 2011 23:59','news','swf');


 //Mobile iphone News Centre 082010
 LFCAds300x250.add('/uploads/mobile-iphone-app-1109-mpu.jpg','http://www.liverpoolfc.tv/news/latest-news/new-lfc-match-and-news-centre-on-iphone?ncid=mobile_mpu_iphone_app_20112009','','','04 August 2010 00:01','31 May 2011 23:59','news','all');


 //Mobile iphone News Centre 082010
 LFCAds120x600.add('/uploads/mobile-iphone-app-1109-sky.jpg','http://www.liverpoolfc.tv/news/latest-news/new-lfc-match-and-news-centre-on-iphone?ncid=mobile_sky_iphone_app_20112009','','','04 August 2010 00:01','30 May 2011 23:59','news','all');


 //BOA Free Shirt
 LFCAds300x250.add('/uploads/mbna-mpu-300x250_4c5add491cf81256485268.gif','https://www.mbna.co.uk/apply/UKCCapp/Ctl/entry?sc=8lfcfhsgs_ost&mc=ECO-UK-33333-12772','','','09 August 2010 00:01','30 September 2010 23:59','news','all');


 //BOA Free Shirt
 LFCAds120x600.add('/uploads/mbna-sky-120x600_4c5ae0caa9ba5967245429.gif','https://www.mbna.co.uk/apply/UKCCapp/Ctl/entry?sc=8lfcfhsgs_ost&mc=ECO-UK-33333-12772','','','09 August 2010 00:01','30 September 2010 23:59','news','all');


 //Events Christmas Bookings 082010 
 LFCAds300x250.add('/uploads/xmas2010_mpu_4c5aa3ba520ed551540354.jpg','http://www.liverpoolfc.tv/corporate/meetings-and-events?ncid=hospitality_christmas_mpu_01072010skyb','','','05 May 2010 00:01','20 December 2010 23:59','news','all');


 //188Bet Coupon 05082010
 LFCAds300x250.add('/uploads/300x250_4c5ae1336cc24526641725.gif','www.188promo.com/coupon','','','05 August 2010 22:01','08 August 2010 23:59','news','all');


 //ThomasCook New Season 10-11 MPU
 LFCAds300x250.add('/uploads/thomascook_season1011_mpu.swf','http://www.thomascooksport.com/Football/Premier-League/Liverpool-FC?ac=lwwyb','','','09 August 2010 00:01','30 May 2011 23:59','news','swf');


 //ThomasCook New Season 10-11 MPU
 LFCAds300x250.add('/uploads/thomascook_season1011_mpu.gif','http://www.thomascooksport.com/Football/Premier-League/Liverpool-FC?ac=lwwyb','','','09 August 2010 00:01','30 May 2011 23:59','news','gif');


 //ThomasCook New Season 10-11 MPU
 LFCAds120x600.add('/uploads/thomascook_season1011_sky.gif','http://www.thomascooksport.com/Football/Premier-League/Liverpool-FC?ac=lwwyb','','','09 August 2010 00:01','30 May 2011 23:59','news','all');

//DB Controlled Adverts End


//LFCAds300x250.add('shop_eurokit_preorder_mpu.jpg','http://store.liverpoolfc.tv/products/footballkit?ncid=shmpueurokit210708','Pre-order the new LFC Euro Away Kit now for your chance to win 4 tickets to the first Champions League Group Stage Home Game','3','24 July 2009 00:01','13 August 2010 23:00','news','gif');
//LFCAds300x250.add('shop_eurokit_preorder_mpu.jpg','http://store.liverpoolfc.tv/products/footballkit?ncid=shmpueurokit210708','Pre-order the new LFC Euro Away Kit now for your chance to win 4 tickets to the first Champions League Group Stage Home Game','3','24 July 2009 00:01','13 August 2010 23:00','news','swf');

//LFCAds120x600.add('shop_eurokit_preorder_mpu.jpg','http://store.liverpoolfc.tv/products/footballkit?ncid=shmpueurokit210708','Pre-order the new LFC Euro Away Kit now for your chance to win 4 tickets to the first Champions League Group Stage Home Game','3','24 July 2009 00:01','13 August 2010 23:00','news','gif');
//LFCAds120x600.add('shop_eurokit_preorder_mpu.jpg','http://store.liverpoolfc.tv/products/footballkit?ncid=shmpueurokit210708','Pre-order the new LFC Euro Away Kit now for your chance to win 4 tickets to the first Champions League Group Stage Home Game','3','24 July 2009 00:01','13 August 2010 23:00','news','swf');


//LFCAds145x145.add("<!--IMG-->","<!--URL-->","<!--ALT-->","<!--weight-->","<!--start-->","<!--end-->","<!--channel-->","<!--type-->");


var ExternalAds = new ExternalAdServer();
function homeban(){ ExternalAds.display("home", "banner"); }
function newsban(){ ExternalAds.display("news", "banner"); }
function news145(){ ExternalAds.display("news", "richmedia"); }

function newsgad(){ ExternalAds.display("news", "skyscraper"); }
function featgad(){ ExternalAds.display("news", "skyscraper"); }
function shopban(){ ExternalAds.display("shop", "banner"); }
function shop145(){ ExternalAds.display("ros", "richmedia"); }

function shopgad(){ ExternalAds.display("shop", "skyscraper"); }
function matcban(){ ExternalAds.display("match", "banner"); }
function matc145(){ ExternalAds.display("ros", "richmedia"); }

function matcgad(){ ExternalAds.display("match", "skyscraper"); }
function inteban(){ ExternalAds.display("interact", "banner"); }
function inte145(){ ExternalAds.display("ros", "richmedia"); }

function integad(){ ExternalAds.display("interact", "skyscraper"); }
function mobiban(){ ExternalAds.display("mobile", "banner"); }
function mobi145(){ ExternalAds.display("ros", "richmedia"); }

function mobigad(){ ExternalAds.display("interact", "skyscraper"); }
function tickban(){ ExternalAds.display("tickets", "banner"); }
function tick145(){ ExternalAds.display("ros", "richmedia"); }

function tickgad(){ ExternalAds.display("tickets", "skyscraper"); }
function teamban(){ ExternalAds.display("team", "banner"); }
function team145(){ ExternalAds.display("ros", "richmedia"); }

function teamgad(){ ExternalAds.display("team", "skyscraper"); }
function histban(){ ExternalAds.display("history", "banner"); }
function hist145(){ ExternalAds.display("ros", "richmedia"); }

function histgad(){ ExternalAds.display("history", "skyscraper"); }
function clubban(){ ExternalAds.display("club", "banner"); }
function club145(){ ExternalAds.display("ros", "richmedia"); }

function clubgad(){ ExternalAds.display("club", "skyscraper"); }

function home145(){ ExternalAds.display("ros", "richmedia"); }
function homegad(){ ExternalAds.display("home", "skyscraper"); }

//LFCAds145x145.display();

function mpuAd(usetemp){
  usetemp = 1;
  if(usetemp == 1)
  {
   //Temp in house version of ad serving
    LFCAds300x250.display('news');
  }else{
   //Old Sky Version of ad serving
   document.write('<scr'+'ipt type="text/javascript" language="javascript1.1" src="http://adserver.adtech.de/addyn|3.0|512|1186633|0|170|ADTECH;loc=100;target=_blank;key=key1+key2+key3+key4;grp=[group];misc='+new Date().getTime()+'"></scri'+'pt>');
  }
 }
function skyscraperAd(usetemp){ 
  if(usetemp == 1)
   {
    //Temp in house version of ad serving
    LFCAds120x600.display('news');
  }else{
    //Old Sky Version of ad serving
    newsgad();
  }
 }

/**
* End of Advert.js
*
*/

