﻿// JScript File

function solTabs(name, id, end){
//hide all tab contents and change all tabs to blue- pass start, pass end 
    hideTabs(1, end, name);
//show the tab that was clicked on
    showTab(name + id);
}
function showTab(idName)// id of element on rollover
		{
		// Get the td element-pass name 
        var myTD = document.getElementById('td' + idName);
		if(myTD){
   	   	    // Change color of td element to white
		    myTD.style.background='#ffffff';
		}
		// Get the a element-pass name 
        var myA = document.getElementById('a' + idName);
		if(myA){
   	   	    // Set a element color to clicked on gray
		    myA.style.color='#333333';
		}
		// Get the child <div> element-pass name
		var myel = document.getElementById('div' + idName);
		if (myel){
			// Expand child <div> element
		    myel.style.display = 'block';
		}
	}

function hideTabs(start, end, name)//hide all solution content
{
	for (var i= start; i < end+1; i++){
		var idName = name + i
		//alert(i);
		// Get the td element-pass name 
        var myTD = document.getElementById('td' + idName);
		if(myTD){
   	   	    // Remove color from td element
		    myTD.style.background='transparent';
		}
		// Get the a element-pass name 
        var myA = document.getElementById('a' + idName);
		if(myA){
   	   	    // Set a element color back to blue
		    myA.style.color='#376D91';
		}
		// Get the child <div> element-pass name
		var myel = document.getElementById('div' + idName);
		if (myel){
			// Collapse child <div> elements
		    myel.style.display = 'none';
		}
		
	}
}
//set up slide show and preload images

var slideShowCust = new Array()
var slideShowPart = new Array()
var Custctr = 24;
var Partctr = 12;

function loadCustomerSlideShow()
{
	var num = 25;
   for(i=0;i<num;i++)
   {
	slideShowCust[i] = new Image();
   }

   for(i=0;i<num;i++)
   {
	slideShowCust[i].src = "/images/Customer_logos/logo" + eval(i+1) + ".jpg";
   }

}
function runCustomerSlideShow()
{
	Custctr++;
	if (Custctr==25)
	{
		Custctr=0;
	}
	document.imgCustLogo.src=slideShowCust[Custctr].src;
	setTimeout("runCustomerSlideShow()",5000);
}//END FUNCTION

function loadPartnerSlideShow()
{
	var num = 13;
   for(i=0;i<num;i++)
   {
	slideShowPart[i] = new Image();
   }

   for(i=0;i<num;i++)
   {
	slideShowPart[i].src = "/images/Partner_logos/logo" + eval(i+1) + ".jpg";
   }

}//END FUNCTION

function runPartnerSlideShow()
{
	Partctr++;
	if (Partctr==13)
	{
		Partctr=0;
	}
	document.imgPartLogo.src=slideShowPart[Partctr].src;
	setTimeout("runPartnerSlideShow()",5000);
}//END FUNCTION