   
   //ROTATING HOT STUF IMAGES
    var current;
    var numBtns = 4;
    var selectionBtns = new Array(numBtns);
    var imgarray = new Array(numBtns);
    switch(SessionCulture) 
    {
        case "fr-FR":
            imgarray[0] = new Array();
            imgarray[0][0] = '/images/announcement1.gif';
            imgarray[0][1] = 'http://www.extremenetworks.com//products/sentriant-ag.aspx';
            imgarray[1] = new Array();
            imgarray[1][0] = '/images/announcement1.gif';
            imgarray[1][1] = 'http://www.extremenetworks.com//products/TamingChaos_Splash.aspx';
            imgarray[2] = new Array();
            imgarray[2][0] = '/images/announcement1.gif';
            imgarray[2][1] = 'http://www.extremenetworks.com//products/blackdiamond-12800r.aspx';
            imgarray[3] = new Array();
            imgarray[3][0] = '/images/announcement1.gif';
            imgarray[3][1] = 'http://www.extremenetworks.com//products/wireless-family.aspx';
            imgarray[4] = new Array();
            imgarray[4][0] = 'http://www.extremenetworks.com//images/home/hotstuff-sumx250e-fr.gif';
            imgarray[4][1] = 'http://www.extremenetworks.com//products/summit-x250e.aspx';
            break;    
        case "es-MX":
            imgarray[0] = new Array();
            imgarray[0][0] = 'http://www.extremenetworks.com//images/home/hotstuff-sentriantag-es.gif';
            imgarray[0][1] = 'http://www.extremenetworks.com//products/sentriant-ag.aspx';
            imgarray[1] = new Array();
            imgarray[1][0] = 'http://www.extremenetworks.com//images/home/hotstuff-tamechaos-es.gif';
            imgarray[1][1] = 'http://www.extremenetworks.com//products/TamingChaos_Splash.aspx';
            imgarray[2] = new Array();
            imgarray[2][0] = 'http://www.extremenetworks.com//images/home/hotstuff-BD-12802r-es.gif';
            imgarray[2][1] = 'http://www.extremenetworks.com//products/blackdiamond-12800r.aspx';
            imgarray[3] = new Array();
            imgarray[3][0] = 'http://www.extremenetworks.com//images/home/hotstuff-summitwm200_2000-es.gif';
            imgarray[3][1] = 'http://www.extremenetworks.com//products/wireless-family.aspx';
            imgarray[4] = new Array();
            imgarray[4][0] = 'http://www.extremenetworks.com//images/home/hotstuff-sumx250e-es.gif';
            imgarray[4][1] = 'http://www.extremenetworks.com//products/summit-x250e.aspx';
            break;      
        case "de-DE":
            imgarray[0] = new Array();
            imgarray[0][0] = 'http://www.extremenetworks.com//images/home/hotstuff-sentriantag-de.gif';
            imgarray[0][1] = 'http://www.extremenetworks.com//products/sentriant-ag.aspx';
            imgarray[1] = new Array();
            imgarray[1][0] = 'http://www.extremenetworks.com//images/home/hotstuff-tamechaos-de.gif';
            imgarray[1][1] = 'http://www.extremenetworks.com//products/TamingChaos_Splash.aspx';
            imgarray[2] = new Array();
            imgarray[2][0] = 'http://www.extremenetworks.com//images/home/hotstuff-BD-12802r-de.gif';
            imgarray[2][1] = 'http://www.extremenetworks.com//products/blackdiamond-12800r.aspx';
            imgarray[3] = new Array();
            imgarray[3][0] = 'http://www.extremenetworks.com//images/home/hotstuff-summitwm200_2000-de.gif';
            imgarray[3][1] = 'http://www.extremenetworks.com//products/wireless-family.aspx';
            imgarray[4] = new Array();
            imgarray[4][0] = 'http://www.extremenetworks.com//images/home/hotstuff-sumx250e-de.gif';
            imgarray[4][1] = 'http://www.extremenetworks.com//products/summit-x250e.aspx';
            break;  
        case "pt-BR":
            imgarray[0] = new Array();
            imgarray[0][0] = 'http://www.extremenetworks.com//images/home/hotstuff-sentriantag-pt.gif';
            imgarray[0][1] = 'http://www.extremenetworks.com//products/sentriant-ag.aspx';
            imgarray[1] = new Array();
            imgarray[1][0] = 'http://www.extremenetworks.com//images/home/hotstuff-tamechaos-pt.gif';
            imgarray[1][1] = 'http://www.extremenetworks.com//products/TamingChaos_Splash.aspx';
            imgarray[2] = new Array();
            imgarray[2][0] = 'http://www.extremenetworks.com/images/home/hotstuff-BD-12802r-pt.gif';
            imgarray[2][1] = 'http://www.extremenetworks.com/products/blackdiamond-12800r.aspx';
            imgarray[3] = new Array();
            imgarray[3][0] = 'http://www.extremenetworks.com/images/home/hotstuff-summitwm200_2000-pt.gif';
            imgarray[3][1] = 'http://www.extremenetworks.com/products/wireless-family.aspx';
            imgarray[4] = new Array();
            imgarray[4][0] = 'http://www.extremenetworks.com/images/home/hotstuff-sumx250e-pt.gif';
            imgarray[4][1] = 'http://www.extremenetworks.com/products/summit-x250e.aspx';
            break;  
        case "zh-CN":
            imgarray[0] = new Array();
            imgarray[0][0] = 'http://www.extremenetworks.com/images/home/hotstuff-sentriantag-zh-cn.gif';
            imgarray[0][1] = 'http://www.extremenetworks.com/products/sentriant-ag.aspx';
            imgarray[1] = new Array();
            imgarray[1][0] = 'http://www.extremenetworks.com/images/home/hotstuff-tamechaos-zh-cn.gif';
            imgarray[1][1] = 'http://www.extremenetworks.com/products/TamingChaos_Splash.aspx';
            imgarray[2] = new Array();
            imgarray[2][0] = 'http://www.extremenetworks.com/images/home/hotstuff-BD-12802r-zh-cn.gif';
            imgarray[2][1] = 'http://www.extremenetworks.com/products/blackdiamond-12800r.aspx';
            imgarray[3] = new Array();
            imgarray[3][0] = 'http://www.extremenetworks.com/images/home/hotstuff-summitwm200_2000-zh-cn.gif';
            imgarray[3][1] = 'http://www.extremenetworks.com/products/wireless-family.aspx';
            imgarray[4] = new Array();
            imgarray[4][0] = 'http://www.extremenetworks.com/images/home/hotstuff-sumx250e-zh-cn.gif';
            imgarray[4][1] = 'http://www.extremenetworks.com/products/summit-x250e.aspx';
            break;
        case "ko-KR":
            imgarray[0] = new Array();
            imgarray[0][0] = 'http://www.extremenetworks.com/images/home/hotstuff-sentriantag-ko.gif';
            imgarray[0][1] = 'http://www.extremenetworks.com/products/sentriant-ag.aspx';
            imgarray[1] = new Array();
            imgarray[1][0] = 'http://www.extremenetworks.com/images/home/hotstuff-tamechaos-ko.gif';
            imgarray[1][1] = 'http://www.extremenetworks.com/products/TamingChaos_Splash.aspx';
            imgarray[2] = new Array();
            imgarray[2][0] = 'http://www.extremenetworks.com/images/home/hotstuff-BD-12802r-ko.gif';
            imgarray[2][1] = 'http://www.extremenetworks.com/products/blackdiamond-12800r.aspx';
            imgarray[3] = new Array();
            imgarray[3][0] = 'http://www.extremenetworks.com/images/home/hotstuff-summitwm200_2000-ko.gif';
            imgarray[3][1] = 'http://www.extremenetworks.com/products/wireless-family.aspx';
            imgarray[4] = new Array();
            imgarray[4][0] = 'http://www.extremenetworks.com/images/home/hotstuff-sumx250e-ko.gif';
            imgarray[4][1] = 'http://www.extremenetworks.com/products/summit-x250e.aspx';
 
            break;
        case "en-US":
        default: 
            imgarray[0] = new Array();
            imgarray[0][0] = '/images/announcement1.gif';
            imgarray[0][1] = 'http://www.extremenetworks.com/products/sentriant-ag.aspx';
            imgarray[1] = new Array();
            imgarray[1][0] = '/images/announcement2.gif';
            imgarray[1][1] = 'http://www.extremenetworks.com/products/TamingChaos_Splash.aspx';
            imgarray[2] = new Array();
            imgarray[2][0] = '/images/announcement1.gif';
            imgarray[2][1] = 'http://www.extremenetworks.com/products/blackdiamond-12800r.aspx';
            imgarray[3] = new Array();
            imgarray[3][0] = '/images/announcement2.gif';
            imgarray[3][1] = 'http://www.extremenetworks.com/products/wireless-family.aspx';
            imgarray[4] = new Array();
            imgarray[4][0] = '/images/announcement2.gif';
            imgarray[4][1] = 'http://www.extremenetworks.com/products/summit-x250e.aspx';
        break;
    }
    
    var waitTime = 2500;

    var nextBtnTimeoutId;

    function startRotate() {

    current = 0;

    nextSelection();

    //nextBtnTimeoutId = setTimeout("nextSelection()", waitTime);

    }

    function docimgChange(selection) {
        var el = document.getElementById('hotstuff');
        el.src = imgarray[selection - 1][0];
        //el.onclick = "docimgClick('" + imgarray[selection - 1][1] + "');";
        el.link = imgarray[selection - 1][1];
    }
    
    function docimgClick(url) {
        window.location= url;
    }

    function nextSelection() {
        current++;
        if (current > numBtns) {
            current = 1;
        }

        //alert('highlightHotStuff('+current+')');
        highlightHotStuff('btn' + current);
	docimgChange(current);
        nextBtnTimeoutId = setTimeout("nextSelection()",waitTime);
    }

    function stopRotate() {
        window.clearTimeout(nextBtnTimeoutId);
    }
   
   
    
      //HIGHLIGHTING NUMBERS IN HOT STUFF SECTION ON HOME/INDEX PAGE
  function highlightHotStuff(targetBtnId) {
    var btnIds = new Array("1", "2", "3", "4");

    for (var i = 0; i < btnIds.length; i++) {
      var id = btnIds[i];
      var btnId = "btn" + id;
      var btnEl = document.getElementById(btnId);

      var origSrc = btnEl.src;

      // get the first part of the image name, ie "/images/home/btn-hotstuff-1"
      var imagePrefix = origSrc.substring(0, origSrc.lastIndexOf("-"));
      if (btnId == targetBtnId) {
        // target btn, so turn it on
        btnEl.src = imagePrefix + "-on.gif";
      } else {
        // other btns, so turn them off
        btnEl.src = imagePrefix + "-off.gif";
      }
    }
  }



  //HIGHLIGHTING NUMBERS IN NEWS SECTION ON HOME/INDEX PAGE
  function highlightNews(targetBtnEl) {
    var btnIds = new Array("1", "2", "3");
    var targetBtnId = targetBtnEl.id;

    for (var i = 0; i < btnIds.length; i++) {
      var id = btnIds[i];
      var btnId = "btnNews" + id;
      var btnEl = document.getElementById(btnId);

      var origSrc = btnEl.src;

      // get the first part of the image name, ie "/images/home/btn-news-1"
      var imagePrefix = origSrc.substring(0, origSrc.lastIndexOf("-"));
      if (btnId == targetBtnId) {
        // target btn, so turn it on
        btnEl.src = imagePrefix + "-on.gif";
      } else {
        // other btns, so turn them off
        btnEl.src = imagePrefix + "-off.gif";
      }
    }
  }


	//SHOW AND HIDE NEWS TEXT ON INDEX/HOME PAGE
    function displayDivHome(id) {
        for (var i=0; i<newItems.length; i++) {
            var divId = newItems[i];
            var divEl = document.getElementById(divId);
            if (divEl)
            {
                if (divId == id) {
                    // display the one we want
                    divEl.style.display="block";
                } else {
                    // turn off all others
                    divEl.style.display="none";
                }
            }
        }

    }

	
	//ROTATING HOME/INDEX TOP AND BOTTOM IMAGES
	var numPairs = 1;  // 5;
	var topPics = new Array(numPairs);
	var bottomPics = new Array(numPairs);
	var linkPics = new Array(numPairs);


    switch(SessionCulture) 
    {
        case "fr-FR":
	        topPics[0] = "images/home/focal-top-fr.jpg";
	        bottomPics[0] = "images/home/focal-bottom-fr.jpg";
	        linkPics[0] = "/products/TamingChaos_Splash.aspx";

        /*
	        topPics[0] = "images/home/future-top.jpg";
	        bottomPics[0] = "images/home/future-bottom.jpg";

	        topPics[1] = "images/home/mitt-top.jpg";
	        bottomPics[1] = "images/home/mitt-bottom.jpg";

	        topPics[2] = "images/home/clocks-top.jpg";
	        bottomPics[2] = "images/home/clocks-bottom.jpg";

	        topPics[3] = "images/home/focal-top.jpg";
	        bottomPics[3] = "images/home/focal-bottom.jpg";

	        topPics[4] = "images/home/mask-top.jpg";
	        bottomPics[4] = "images/home/mask-bottom.jpg";
        */
            break;    
        case "es-MX":
	        topPics[0] = "images/home/focal-top-es.jpg";
	        bottomPics[0] = "images/home/focal-bottom-es.jpg";
	        linkPics[0] = "/products/TamingChaos_Splash.aspx";

        /*
	        topPics[0] = "images/home/future-top.jpg";
	        bottomPics[0] = "images/home/future-bottom.jpg";

	        topPics[1] = "images/home/mitt-top.jpg";
	        bottomPics[1] = "images/home/mitt-bottom.jpg";

	        topPics[2] = "images/home/clocks-top.jpg";
	        bottomPics[2] = "images/home/clocks-bottom.jpg";

	        topPics[3] = "images/home/focal-top.jpg";
	        bottomPics[3] = "images/home/focal-bottom.jpg";

	        topPics[4] = "images/home/mask-top.jpg";
	        bottomPics[4] = "images/home/mask-bottom.jpg";
        */  
            break;      
        case "de-DE":
	        topPics[0] = "images/home/focal-top-de.jpg";
	        bottomPics[0] = "images/home/focal-bottom-de.jpg";
	        linkPics[0] = "/products/TamingChaos_Splash.aspx";

        /*
	        topPics[0] = "images/home/future-top.jpg";
	        bottomPics[0] = "images/home/future-bottom.jpg";

	        topPics[1] = "images/home/mitt-top.jpg";
	        bottomPics[1] = "images/home/mitt-bottom.jpg";

	        topPics[2] = "images/home/clocks-top.jpg";
	        bottomPics[2] = "images/home/clocks-bottom.jpg";

	        topPics[3] = "images/home/focal-top.jpg";
	        bottomPics[3] = "images/home/focal-bottom.jpg";

	        topPics[4] = "images/home/mask-top.jpg";
	        bottomPics[4] = "images/home/mask-bottom.jpg";
        */
            break;  
        case "pt-BR":
	        topPics[0] = "images/home/focal-top-pt.jpg";
	        bottomPics[0] = "images/home/focal-bottom-pt.jpg";
	        linkPics[0] = "/products/TamingChaos_Splash.aspx";

        /*
	        topPics[0] = "images/home/future-top.jpg";
	        bottomPics[0] = "images/home/future-bottom.jpg";

	        topPics[1] = "images/home/mitt-top.jpg";
	        bottomPics[1] = "images/home/mitt-bottom.jpg";

	        topPics[2] = "images/home/clocks-top.jpg";
	        bottomPics[2] = "images/home/clocks-bottom.jpg";

	        topPics[3] = "images/home/focal-top.jpg";
	        bottomPics[3] = "images/home/focal-bottom.jpg";

	        topPics[4] = "images/home/mask-top.jpg";
	        bottomPics[4] = "images/home/mask-bottom.jpg";
        */
            break;  
        case "zh-CN":
	        topPics[0] = "images/home/focal-top-zh-cn.jpg";
	        bottomPics[0] = "images/home/focal-bottom-zh-cn.jpg";
	        linkPics[0] = "/products/TamingChaos_Splash.aspx";

        /*
	        topPics[0] = "images/home/future-top.jpg";
	        bottomPics[0] = "images/home/future-bottom.jpg";

	        topPics[1] = "images/home/mitt-top.jpg";
	        bottomPics[1] = "images/home/mitt-bottom.jpg";

	        topPics[2] = "images/home/clocks-top.jpg";
	        bottomPics[2] = "images/home/clocks-bottom.jpg";

	        topPics[3] = "images/home/focal-top.jpg";
	        bottomPics[3] = "images/home/focal-bottom.jpg";

	        topPics[4] = "images/home/mask-top.jpg";
	        bottomPics[4] = "images/home/mask-bottom.jpg";
        */
            break;
        case "ko-KR":
	        topPics[0] = "images/home/focal-top-ko.jpg";
	        bottomPics[0] = "images/home/focal-bottom-ko.jpg";
	        linkPics[0] = "/products/TamingChaos_Splash.aspx";

        /*
	        topPics[0] = "images/home/future-top.jpg";
	        bottomPics[0] = "images/home/future-bottom.jpg";

	        topPics[1] = "images/home/mitt-top.jpg";
	        bottomPics[1] = "images/home/mitt-bottom.jpg";

	        topPics[2] = "images/home/clocks-top.jpg";
	        bottomPics[2] = "images/home/clocks-bottom.jpg";

	        topPics[3] = "images/home/focal-top.jpg";
	        bottomPics[3] = "images/home/focal-bottom.jpg";

	        topPics[4] = "images/home/mask-top.jpg";
	        bottomPics[4] = "images/home/mask-bottom.jpg";
        */
            break;
        case "en-US":
        default: 
	        topPics[0] = "images/home/focal-top.jpg";
	        bottomPics[0] = "images/home/focal-bottom.jpg";
	        linkPics[0] = "/products/TamingChaos_Splash.aspx";

        /*
	        topPics[0] = "images/home/future-top.jpg";
	        bottomPics[0] = "images/home/future-bottom.jpg";

	        topPics[1] = "images/home/mitt-top.jpg";
	        bottomPics[1] = "images/home/mitt-bottom.jpg";

	        topPics[2] = "images/home/clocks-top.jpg";
	        bottomPics[2] = "images/home/clocks-bottom.jpg";

	        topPics[3] = "images/home/focal-top.jpg";
	        bottomPics[3] = "images/home/focal-bottom.jpg";

	        topPics[4] = "images/home/mask-top.jpg";
	        bottomPics[4] = "images/home/mask-bottom.jpg";
        */
        break;
    }	

	function selectPair() {
  	var randIndex=Math.floor(Math.random()*numPairs);

  	var topPicEl = document.getElementById('img1');
  	topPicEl.src = topPics[randIndex];
  	topPicEl.link = linkPics[0];
  	var bottomPicEl = document.getElementById('img2');
  	bottomPicEl.src = bottomPics[randIndex];

	}



   //SHOWING AND HIDING DESCRIPTIONS ON SOLUTIONS PAGE(S)
    var items = new Array('solutions1', 'solutions2', 'solutions3', 'solutions4', 'solutions5', 'solutions6', 'solutions7', 'solutions8', 'solutions9', 'solutions10', 'solutions11', 'solutions12', 'solutions13', 'solutions14', 'solutions15');
    var newItems = new Array('news', 'news2', 'news3', 'news4');
    var curDiv;

var ids=new Array('a1','a2','a3','a4');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById && document.getElementById(id)) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers && document.id) { // Netscape 4
			document.id.display = 'none';
		}
		else if(document.all && document.all.id) { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}
