
var count = 1;    // global variable (Don't change this!)
var go = 1;       // tells the banner if to rotate
var max = 11;     // number of banners

var url1 = "../images/Comp_Visual1_Large.gif";
var url2 = "../images/Comp_Visual2_Large.gif";
var url3 = "../images/Comp_Visual3_Large.gif";
var url4 = "../images/Comp_Visual4_Large.gif";
var url5 = "../images/Comp_Visual5_Large.gif";
var url6 = "../images/Comp_Visual6_Large.gif";
var url7 = "../images/Comp_Visual7_Large.gif";
var url8 = "../images/Comp_Visual8_Large.gif";
var url9 = "../images/Comp_Visual9_Large.gif";
var url10 = "../images/Comp_Visual10_Large.gif";
var url11 = "../images/Comp_Visual11_Large.gif";

var text1 = "Ad Visual 1";
var text2 = "Ad Visual 2";
var text3 = "Ad Visual 3";
var text4 = "Ad Visual 4";
var text5 = "Ad Visual 5";
var text6 = "Ad Visual 6";
var text7 = "Ad Visual 7";
var text8 = "Ad Visual 8";
var text9 = "Ad Visual 9";
var text10 = "Ad Visual 10";
var text11 = "Ad Visual 11";


// Change company picture

function ChangeCompanyPic()
{
	if (document.images['CompanyImg'].src.substring(40, 64) == "Company.jpg")
			{
				document.images['CompanyImg'].src = "../images/corporate_en.gif";
			}
}

// function to link to appropriate image
function ViewImage()
   {
     window.open(eval("url" + count));
   }
// function to rotate image
function rotate()
   {
		  if (document.images)   // Only if the image object exists so no errors occur with IE 3.0
	     {
	     if (go)        // If cursor not on image
	       {
	       if (++count > max) count = 1;
	       document.images['companypic'].src = "../images/Comp_Visual" + count + "_small.gif";
	       window.setTimeout('rotate();',5000);
	       }
	     else          // If cursor on image, try to rotate later
	       {
	       window.setTimeout('rotate();',100);
	       }
	     }
    
   }

// function to display text in the status bar about the current banner
function windowON()
    {
    window.status = eval('text' + count);
    setTimeout("windowOFF()",2000);
    }

// function to clear the status bar message
function windowOFF()
    {
    window.status="";
}