var Switcher = {
    initialize: function()
    {
        container = document.getElementById("switcher");
        if (!container) return false;
        link = container.getAttribute("href");
        image = container.getElementsByTagName("img")[0];
        addEvent(window, "unload", function() {window.clearInterval(Timer);}, false);
        Switcher.doSwitch();
        Timer = window.setInterval("Switcher.doSwitch()", 2000);
        i = 0;
    },
    doSwitch: function()
    {                        
        var l = Switcher.data.length;
        var i = Math.round((l-1)*Math.random());
        container.href = Switcher.data[i][2];
        image.src = Switcher.data[i][0];
        image.alt = Switcher.data[i][1];
    },
    data: new Array(
		["Images/customers/microsoft.gif","microsoft","http://www.microsoft.com"],
		["Images/customers/cisco.gif","cisco","http://www.cisco.com"],
		["Images/customers/volvo.gif","volvo","http://www.volvo.com"],
		["Images/customers/yahoo.gif","yahoo","http://www.yahoo.com.cn"],
		["Images/customers/hp.gif","hp","http://www.hp.com.cn"],
		["Images/customers/att.gif","att","http://www.att.com"],
		["Images/customers/citi.gif","citi","http://www.citibank.com"],
		["Images/customers/ibm.gif","IBM","http://www.ibm.com"]
    )
}
addEvent(window, "load", Switcher.initialize, false);
