var imgT=0;
var imgB=0;
function fLoadVertBanners(){
	images = new Array(2);
	images[0] = "<a href ='http://www.mocktheweek.tv/thedvd/' target='_blank'><img src='../images/promos/vertical-banners/OTK-240x120-mocktheweek02.jpg' alt='Mock The Week DVD' width='120' height='240' border='0'></a>";
	images[1] = "<a href ='http://www.mocktheweek.tv/thedvd/' target='_blank'><img src='../images/promos/vertical-banners/OTK-240x120-mocktheweek01.jpg' alt='Mock The Week DVD' width='120' height='240' border='0'></a>";
	
	images[2] = "<a href ='http://hmv.com/hmvweb/displayProductDetails.do?ctx=280;5;-1;-1;-1&sku=262947' target='_blank'><img src='../images/promos/vertical-banners/OTK-240x120-alan-carr-boxset.jpg' alt='Alan Carr DVD Compilation' width='120' height='240' border='0'></a>";
	images[3] = "<a href ='http://hmv.com/hmvweb/displayProductDetails.do?ctx=280;5;-1;-1;-1&sku=262975' target='_blank'><img src='../images/promos/vertical-banners/OTK-240x120-dobriain-dvd-boxset.jpg' alt='Dara O Briain DVD Collection' width='120' height='240' border='0'></a>";
	images[4] = "<a href ='http://www.amazon.co.uk/Michael-McIntyre-Live-2009-DVD/dp/B001U0O91K/ref=sr_1_2?ie=UTF8&s=dvd&qid=1245530645&sr=1-2' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240_mmc_DVD.jpg' alt='Michael McIntyre DVD' width='120' height='240' border='0'></a>";
	images[5] = "<a href ='http://www.amazon.co.uk/Rich-Hall-Otis-Crenshaw-Live/dp/B00280LHK2/ref=sr_1_1?ie=UTF8&s=dvd&qid=1248124285&sr=1-1' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240_richhallDVD.jpg' alt='Rich Hall DVD' width='120' height='240' border='0'></a>";
	images[6] = "<a href ='http://www.play.com/DVD/DVD/4-/11071724/Lee-Evans-Access-All-Arenas/Product.html' target='_blank'><img src='../images/promos/vertical-banners/OTK-240x120_leeevansDVD.jpg' alt='Lee Evans DVD' width='120' height='240' border='0'></a>";
	
	images[7] = "<a href ='http://hmv.com/hmvweb/displayProductDetails.do?ctx=204;5;-1;-1;31&sku=973943' target='_blank'><img src='../images/promos/vertical-banners/OTK-240x120_brendon-burns-DVD.jpg' alt='Brendon Burns DVD' width='120' height='240' border='0'></a>";
	
	images[8] = "<a href ='http://www.amazon.co.uk/Andy-Parsons-Britains-Idiots-Live/dp/B0027VSQDS/ref=sr_1_1?ie=UTF8&s=dvd&qid=1250336578&sr=1-1' target='_blank'><img src='../images/promos/vertical-banners/OTK-240x120_andy-parsons-DVD.jpg' alt='Andy Parsons DVD' width='120' height='240' border='0'></a>";
	
	index = imgB;
    document.getElementById('bottom-banner-vert').innerHTML = images[index];
	imgB++;
	if (imgB > 8) imgB=0;
	
	
	
	images[0] = "<a href ='http://www.play.com/Books/Books/4-/10663150/Look-Back-In-Hunger/Product.html' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240-jobrand-book.jpg' alt='Jo Brand Book' width='120' height='240' border='0'></a>";
	
	images[1] = "<a href ='http://www.amazon.co.uk/Thanks-Nothing-Jack-Dee/dp/0385615485/ref=sr_1_1?ie=UTF8&s=books&qid=1248968251&sr=1-1' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240-jack-dee-book.jpg' alt='Jack Dee Book' width='120' height='240' border='0'></a>";
	
	images[2] = "<a href ='http://www.amazon.co.uk/Tickling-English-Dara-O-Briain/dp/0718154371/ref=sr_1_1?ie=UTF8' target='_blank'><img src='../images/promos/vertical-banners/OTK-240x120-dobriain-book.jpg' alt='Dara O Briain Book' width='120' height='240' border='0'></a>";
	
	images[3] = "<a href ='http://www.amazon.co.uk/Look-Who-Story-Alan-Carr/dp/0007278233/ref=sr_1_2?ie=UTF8&s=books&qid=1243588436&sr=8-2' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240-alan-carr-book.jpg' alt='Alan Carr Book' width='120' height='240' border='0'></a>";
	images[4] = "<a href ='http://www.amazon.co.uk/Why-Do-Say-These-Things/dp/0553813498/ref=sr_1_1?ie=UTF8&s=books&qid=1243589254&sr=1-1' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240-jross-book.jpg' alt='Jonathan Ross Book' width='120' height='240' border='0'></a>";
	images[5] = "<a href ='http://www.amazon.co.uk/Magnificent-Bastards-Rich-Hall/dp/0349119651' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240-rich-hall-book.jpg' alt='Rich Hall Book' width='120' height='240' border='0'></a>";
	images[6] = "<a href ='http://www.amazon.co.uk/Beginners-Guide-Acting-English/dp/0091922925/ref=sr_1_1?ie=UTF8&s=books&qid=1243589622&sr=1-1' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240-shappi-book.jpg' alt='Shappi Khorsandi Book' width='120' height='240' border='0'></a>";
	images[7] = "<a href ='http://www.amazon.co.uk/Thanks-Nothing-Jack-Dee/dp/0385615485/ref=sr_1_1?ie=UTF8&s=books&qid=1248968251&sr=1-1' target='_blank'><img src='../images/promos/vertical-banners/OTK-120x240-jack-dee-book.jpg' alt='Jack Dee Book' width='120' height='240' border='0'></a>";
	
	index = imgT;
    document.getElementById('top-banner-vert').innerHTML = images[index];
	imgT++;
	if (imgT > 7) imgT=0;
	
	setTimeout('fLoadVertBanners()',6000);
}


var imgL=0;
var imgR=0;
function fLoadHorizBanners(){
	images = new Array();
	
	images[0] = "<a href ='http://www.theo2.co.uk/inside/book-now.html?Date_Day=30&Date_Month=3&Date_Year=2010'><img src='../images/promos/468-banners/ComedyGala2_60x468pixel.jpg' alt='Channel 4's Comedy Gala' width='468' height='60' border='0'></a>";
	images[1] = "<a href ='http://www.theo2.co.uk/inside/book-now.html?Date_Day=30&Date_Month=3&Date_Year=2010'><img src='../images/promos/468-banners/ComedyGala2_60x468pixel.jpg' alt='Channel 4's Comedy Gala' width='468' height='60' border='0'></a>";
	
	images[2] = "<a href ='http://www.amazon.co.uk/exec/obidos/ASIN/B001U0O91K/offthekerbcou-21' ><img src='../images/promos/468-banners/OTK-60x468_MM09_DVD.jpg' alt='Michael McIntyre 2009 DVD' width='468' height='60' border='0'></a>";
	
	images[3] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=kevin_bridges' ><img src='../images/promos/468-banners/OTK_60x468_KevinBridges.jpg' alt='Kevin Bridges Spring Tour' width='468' height='60' border='0'></a>";
	images[4] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=sean_lock'><img src='../images/promos/468-banners/Sean-Lock-Lockipedia.jpg' alt='Sean Lock 2010 Tour' width='468' height='60' border='0'></a>";
	
	images[5] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=shappi_khorsandi'><img src='../images/promos/468-banners/SK-2010.jpg' alt='Adam Hills 2009 Tour' width='468' height='60' border='0'></a>";
	
	index = imgL;
    document.getElementById('left-banner-horz').innerHTML = images[index];
	imgL++;
	if (imgL > 5) imgL=0;
	
	images[0] = "<a href ='http://www.play.com/DVD/DVD/4-/11071724/Lee-Evans-Access-All-Arenas/Product.html' tager='_blank'><img src='../images/promos/468-banners/OTK-60x468_Lee_DVD.jpg' alt='Lee Evans Access All Arenas DVD' width='468' height='60' border='0'></a>";
	
	images[1] = "<a href ='http://www.laughingboycomedyclub.com' tager='_blank'><img src='../images/promos/468-banners/LBCC_banner.jpg' alt='Laughing Boy Comedy Club' width='468' height='60' border='0'></a>";
	
	images[2] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=jon_richardson'><img src='../images/promos/468-banners/OTK_60x468_JRichardson.jpg' alt='Jon Richardson Tour' width='468' height='60' border='0'></a>";
	
	images[3] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=dara_obriain' ><img src='../images/promos/468-banners/DOB-2010.jpg' alt='Rich Hall / Otis Lee Crenshaw at Apollo Theatre' width='468' height='60' border='0'></a>";
	
	//images[4] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=marcus_brigstocke'><img src='../images/promos/468-banners/OTK_60x468_MarcusBrigstock_1.jpg' alt='Michael McIntyre 2009 Tour' width='468' height='60' border='0'></a>";
	index = imgR;
    document.getElementById('right-banner-horz').innerHTML = images[index];
	imgR++;
	if (imgR > 3) imgR=0;
	setTimeout('fLoadHorizBanners()',6000);
}

function fLoadHorizBannersRoot(){
	images = new Array();
	
	images[0] = "<a href ='http://www.theo2.co.uk/inside/book-now.html?Date_Day=30&Date_Month=3&Date_Year=2010'><img src='../images/promos/468-banners/ComedyGala2_60x468pixel.jpg' alt='Channel 4's Comedy Gala' width='468' height='60' border='0'></a>";
	images[1] = "<a href ='http://www.theo2.co.uk/inside/book-now.html?Date_Day=30&Date_Month=3&Date_Year=2010'><img src='../images/promos/468-banners/ComedyGala2_60x468pixel.jpg' alt='Channel 4's Comedy Gala' width='468' height='60' border='0'></a>";
	images[2] = "<a href ='http://www.amazon.co.uk/exec/obidos/ASIN/B001U0O91K/offthekerbcou-21' ><img src='../images/promos/468-banners/OTK-60x468_MM09_DVD.jpg' alt='Michael McIntyre 2009 DVD' width='468' height='60' border='0'></a>";
	images[3] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=kevin_bridges' ><img src='images/promos/468-banners/OTK_60x468_KevinBridges.jpg' alt='Kevin Bridges Spring Tour' width='468' height='60' border='0'></a>";
	images[4] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=sean_lock'><img src='images/promos/468-banners/Sean-Lock-Lockipedia.jpg' alt='Sean Lock 2010 Tour' width='468' height='60' border='0'></a>";
	images[5] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=shappi_khorsandi'><img src='images/promos/468-banners/SK-2010.jpg' alt='Adam Hills 2009 Tour' width='468' height='60' border='0'></a>";
	
	index = imgL;
    document.getElementById('left-banner-horz').innerHTML = images[index];
	imgL++;
	if (imgL > 5) imgL=0;
	
	images[0] = "<a href ='http://www.laughingboycomedyclub.com' tager='_blank'><img src='images/promos/468-banners/LBCC_banner.jpg' alt='Laughing Boy Comedy Club' width='468' height='60' border='0'></a>";
	images[1] = "<a href ='http://www.laughingboycomedyclub.com' tager='_blank'><img src='images/promos/468-banners/LBCC_banner.jpg' alt='Laughing Boy Comedy Club' width='468' height='60' border='0'></a>";
	images[2] = "<a href ='http://www.play.com/DVD/DVD/4-/11071724/Lee-Evans-Access-All-Arenas/Product.html' tager='_blank'><img src='images/promos/468-banners/OTK-60x468_Lee_DVD.jpg' alt='Lee Evans Access All Arenas DVD' width='468' height='60' border='0'></a>";
	images[3] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=jon_richardson'><img src='images/promos/468-banners/OTK_60x468_JRichardson.jpg' alt='Jon Richardson Tour' width='468' height='60' border='0'></a>";
	images[4] = "<a href ='http://www.offthekerb.co.uk/listings/?artist=dara_obriain' ><img src='images/promos/468-banners/DOB-2010.jpg' alt='Rich Hall / Otis Lee Crenshaw at Apollo Theatre' width='468' height='60' border='0'></a>";
	index = imgR;
    document.getElementById('right-banner-horz').innerHTML = images[index];
	imgR++;
	if (imgR > 4) imgR=0;
	setTimeout('fLoadHorizBannersRoot()',6000);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//---------------------------------------------


//--------------------------------------------
function clock() {
	//document.board.style.cursor='default';
	//document.board.style.width='1px';
	//document.board.style.height='1px';
d = new Date();
dateText = "";
dayValue = d.getDay();
monthValue = d.getMonth();
minuteValue = d.getMinutes();
hourValue = d.getHours();
if (dayValue == 0)dateText += "SUN";else if (dayValue == 1)dateText += "MON";else if (dayValue == 2)dateText += "TUE";else if (dayValue == 3)dateText += "WED";else if (dayValue == 4) dateText += "THU";else if (dayValue == 5) dateText += "FRI";else if (dayValue == 6)dateText += "SAT";
dateText += " " + d.getDate() + " ";
if (monthValue == 0) dateText += "JAN";if (monthValue == 1) dateText += "FEB";if (monthValue == 2) dateText += "MAR";if (monthValue == 3) dateText += "APR";if (monthValue == 4) dateText += "MAY";if (monthValue == 5) dateText += "JUN";if (monthValue == 6) dateText += "JUL";if (monthValue == 7) dateText += "AUG";if (monthValue == 8) dateText += "SEP";if (monthValue == 9) dateText += "OCT";if (monthValue == 10) dateText += "NOV";if (monthValue == 11) dateText += "DEC";
if (minuteValue < 10) minuteValue = "0" + minuteValue;
if (hourValue < 12)
    {
	tod = " AM"
	}else{
	tod = " PM"
	}
if (os.mac && bw.ie4) hourValue += 1;
dispTime = dateText + " " + hourValue + ":" + minuteValue + " " + tod; 
if (bw.ns && !bw.dom) {
document.layers.nowtime.document.write("<span class='grywtxt'>" + dispTime + "</span>");
document.layers.nowtime.document.close();
}
else if (bw.dom && !bw.ie) document.getElementById('nowtime').innerHTML = dispTime;
else
if (document.all)
nowtime.innerHTML = dispTime;
setTimeout("clock()", 30000);
}
	
//Drop Down Navigation Script
	
function navigateArea(form){
	var loca = form.artists.options[form.artists.selectedIndex].value
	if (loca=="divide"){
		return false;
	}else{
	window.top.location.href = loca;
	}
}

function openPopup(url){
	h = window.open(url,'otkpop','width=290,height=490,scrollbars=1,status=0,menubar=0,resizable=0,toolbar=0,location=0,directories=0')
	h.focus();
	return false;
}

function openPreview(url){
	var prewin = window.open(url,'prewind','width=450,height=450,scrollbars=no')
	prewin.focus();
}
function openMovie(url){
	var prewin = window.open(url,'prewind','width=550,height=350,scrollbars=no')
	prewin.focus();
}
function openYouTubeMovie(url){
	var prewin = window.open(url,'prewind','width=500,height=450,scrollbars=no')
	prewin.focus();
}
var imgArray = new Array();

function imgPreload() {
		if (bw.ie){
             if (!document.images) return;
             for (var i = 0; i < imgPreload.arguments.length; i++) {
                  imgArray[i] = new Image();
                  imgArray[i].src = imgPreload.arguments[i];
		}
   }
}

//clears newsletter box

function clearnews(){
	document.newsletter.newsregis.value="";
}

//ecard selection script
function checkbox(num){
	for (e=0;e<document.pickecard.ecardchoice.length;e++) {
		if (document.pickecard.ecardchoice[e].value == num) {
			document.pickecard.ecardchoice[e].checked = true;
		}
	}
	return;
}
function MM_preloadImages(){ //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
MM_preloadImages('cms144c.gif','cmsad84.gif');