var fadeInText = new Array ("Vehicle storage", "Secure storage", "Dehumidified chambers", "Restoration projects", "Chassis or body storage", "Motorbike storage", "Parts storage", "Premium care service", "Delivery and collection");
var fadeWidth = "100%" ;// The width of the content space
var fadeHeight = "50" ;// The height of the content space
var fadeBorderW="0" ;// Border width
var fadeBorderC="#004891" ;// Border Colour

var timeOutVal="145" ;// Delay in milliseconds
var def_10='A',def_11='B',def_12='C',def_13='D',def_14='E',def_15='F';
var fadeColour=15;
var fadeCount=0;
var spinOW = 550;
var spinD = 1;
var spinW = spinOW;

function init() {
document.write('<table width="' + fadeWidth + '" height="' + fadeHeight + '" style="border:' + fadeBorderW + ' ' + fadeBorderC + '"><tr><td align="middle">');
document.write('<div id="fadeDiv" class="so">');
document.write('</div>');
document.write('</td></tr></table>');
//spinOW = spinW = ( document.getElementById( 'spin' ).style.offsetWidth * 1 );
//debug window.alert( "spinD is " + spinD + " spinW is " + spinW + " spinOW is " + spinOW + " " + spin.width )
}

function parseColour(hexColour) {
 var returnVal;
 if(hexColour>=10) {
  for(var i=0; i<=15; i++) {
    if((hexColour==i)) {
       returnVal = eval('def_' + i);
    } } }
 else { returnVal=hexColour;
  }
 return(returnVal);
} 

function writeDiv(){
 var ln = fadeInText.length;
 if ( spinD > 0 )
  {
  spinW -= 10 ;
  if ( ! spinW > 0 )
   { spinD *= -1;
     spinW = 0 ;}
  }
 else
  {
  spinW += 10
  if ( spinW > spinOW )
   { spinD *= -1;
     spinW = spinOW ;}
  }
//document.getElementById( 'spin' ).width = spinW
//spin.width = spinW

 document.getElementById( 'fadeDiv' ).innerHTML= '<font face="verdana,arial,helvetica" size="5" color="' +  makeColour(parseColour(fadeColour)) + '"><b>' + fadeInText[fadeCount] + '</span></b></font>';
 if((fadeColour>0)  && (fadeColour!=0)) {
  fadeColour-- ;}
 else {
  fadeColour=15;
  if(fadeCount< ln) {
   fadeCount++  ;}
  if(fadeCount== ln) {
    fadeCount = 0;
  }
 }
  setTimeout("writeDiv()",timeOutVal);
}

function makeColour(hexColour){
 return (hexColour + '0' + hexColour + '0' + hexColour + '0');
}

function resetAll() {
 div_count=0;
 fadeColour=15;
}

function opLink( olDiv, olText )
{
	document.write('<div class="so"><a href="#" onmouseover="document.getElementById( \''+olDiv + '\' ).style.display=\'\'" onmouseout="document.getElementById( \'' + olDiv + '\' ).style.display=\'none\'"><b>'+olText+'</b></a></div>');
	document.write('<div class="pr"><b>'+olText+'</b></div>');
}

function op(opdiv, optext)
{
	document.write('<div id="'+opdiv+'" style="display: none" class="so">'+optext+'</div>');
	document.write('<div class="pr">'+optext+'</div>');
}
