﻿// JScript File


var message="";

function clickIE()
 
{if (document.all)
{(message);return false;}}
 
function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.  onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu  =clickIE;}
 
document.oncontextmenu=new Function("return false")





maximagenumber = 15;
interval = 2000;
var adRotatorArray=new Array()
imageDir = "images/logos/"
function initialiseAdRotator()
{   
    //Load the images into an array
    adRotatorArray[0] = imageDir+"hillarys_logo.gif";
    adRotatorArray[1] = imageDir+"bourne_logo.jpg";
    adRotatorArray[2] = imageDir+"bangolufsen_logo.jpg";
    adRotatorArray[3] = imageDir+"butlins_logo.jpg";
    adRotatorArray[4] = imageDir+"habitat_logo.jpg";
    adRotatorArray[5] = imageDir+"millies_logo.jpg";
    adRotatorArray[6] = imageDir+"clear_water_logo.jpg";
    adRotatorArray[7] = imageDir+"wilson_logo.jpg";
    adRotatorArray[8] = imageDir+"woodhouse.jpg"; 
    adRotatorArray[9] = imageDir+"comet_logo.jpg"; 
    adRotatorArray[10] = imageDir+"warner_logo.jpg"; 
    adRotatorArray[11] = imageDir+"chubb_logo.jpg"; 
    adRotatorArray[12] = imageDir+"bwsf_logo.jpg"; 
    adRotatorArray[13] = imageDir+"tsa_logo.jpg"; 
    adRotatorArray[14] = imageDir+"burtons_foods_logo.gif"; 
    adRotatorArray[15] = imageDir+"acer_logo.jpg";
    


    OnTimeout(0);
}
//sets the image number according to how many there are, will wrap to 0.
function SetImageNumber(imagenumber)
{
    if((imagenumber+1)>maximagenumber)
        imagenumber = 0;
    else
        imagenumber++;

    return imagenumber;
}
function OnTimeout(imagenumber)
{
    SetNewImage(imagenumber);
    imagenumber = SetImageNumber(imagenumber);  
    strCall = "OnTimeout("+imagenumber+")"    
    setTimeout(strCall,interval);
}

function SetNewImage(imagenumber)
{    
    document.getElementById('adRotator1').src = adRotatorArray[imagenumber];    
}

//initialiseAdRotator();

function flashtext()
{
   /* element = document.getElementById('stockcars_menu_item');
    if(element)
    {
        //alert("element ok");
        if(element.style.color!="black")
        {
            //alert("element not ffffff");       
            element.style.color="black";
        }
        else
        {    
            //alert("element  ffffff");         
            element.style.color="white";            
        } 
    }
    
    setTimeout("flashtext();",1000);
    */
}


 


