/* v7.35 */

var pics=new Array()
pics[0]="images/fade/081.jpg"
pics[1]="images/fade/1111.jpg"
pics[2]="images/fade/1244.jpg"
pics[3]="images/fade/095.jpg"
pics[4]="images/fade/161.jpg"
pics[5]="images/fade/110.jpg"
pics[6]="images/fade/188.jpg"
pics[7]="images/fade/54.jpg"
pics[8]="images/fade/85.jpg"
pics[9]="images/fade/171.jpg"

function startup() {
  x=0;view=0;
  rotate();
}

//usingmootools.js
function rotate() {
	
    var el = $('fadeimg');
    if (view==1){
      view=0;
      el.fade(0);
      setTimeout("rotate()",1000)}
      
      else{
      view = 1;
      if (x == pics.length){x=0}
      document.fadeimg.src = pics[x]
      x++;
      el.fade(0);
      el.fade(1);
      setTimeout("rotate()",10000)}
  }

function showad() {
var myEffect = new Fx.Morph($('advert'), {
duration: 2000});
myEffect.start({
 //width: 300,Transition the width
height: [0, 140], //Transition height from 0 to 100
opacity: 1 //Transition opacity to 1
});
}

function hidead() {
var myEffect = new Fx.Morph($('advert'), {
duration: 1500});
myEffect.start({
 //width: 300,Transition the width
height: [140, 0], //Transition height from 0 to 100
opacity: 0//Transition opacity to 1
});
}

/*
For this and over 400+ free scripts, visit http://www.javascriptkit.com/
*/

var tickercontents=new Array()
/*tickercontents[0]='... Cowboy Trap Special One Off Show Jan 13th 2010 BBC1 19:30 ...'*/
tickercontents[0]='... Cowboy Trap new episodes 2nd and 9th August 2010 BBC1 19:30 ...'
tickercontents[2]='... Available for Live / Corporate Events ...'
tickercontents[3]='... Contact Clive via   <a href="mailto:Clive@cliveholland.co.uk"> E-Mail</a> ...'
tickercontents[1]='... Cowboy Trap Series 3 coming soon ...'

var tickdelay=7000; //delay btw messages
var highlightspeed=7; //10 pixels at a time.

//Do not edit pass this line//
var beginclip=0;
var currentmessage=0;
var clipwidth=0;

function changetickercontent(){
crosstick.style.clip="rect(0px 0px auto 0px)";
crosstick.innerHTML=tickercontents[currentmessage];
highlightmsg();
}

function highlightmsg(){
var msgwidth=crosstick.offsetWidth;
if (clipwidth<msgwidth){
clipwidth+=highlightspeed;
crosstick.style.clip="rect(0px "+clipwidth+"px auto 0px)";
beginclip=setTimeout("highlightmsg()",20);
}
else{
clipwidth=0;
clearTimeout(beginclip);
if (currentmessage==tickercontents.length-1) currentmessage=0;
else currentmessage++
setTimeout("changetickercontent()",tickdelay);
}
}

function start_ticking(){
crosstick=document.getElementById? document.getElementById("highlighter") : document.all.highlighter;
crosstickParent=crosstick.parentNode? crosstick.parentNode : crosstick.parentElement;
if (parseInt(crosstick.offsetHeight)>0)
crosstickParent.style.height=crosstick.offsetHeight+'px';
else
setTimeout("crosstickParent.style.height=crosstick.offsetHeight+'px'",100) //delay for Mozilla's sake
changetickercontent();
}