
var toggle = 2;

function Preloadimgs(length, path, type)
{
    for(var i = 1; i<=length; i++)
    {
        this[i]= new Image();
        this[i].src= path + i + type;
    }
    return this;
}

function rollOn(num)
{
    toggle = num;
    //alert(num);
    if(document.images)
		eval('document.images["imgTab'+num+'"].src='+'on[num].src');
}

function rollOff(num)
{
    if(document.images)
		eval('document.images["imgTab'+num+'"].src='+'off[num].src');
}

function showHideLayer(i)
{
	var i, args, theObj, vHeight, twice;
    args = showHideLayer.arguments;
    // ie4 & ns6 tab controls
    if (ie4 || ns6)
    {
        if(ie4)
            theObj = eval("document.all[\'tab" + toggle + "\']");
        if(ns6)
            theObj = eval("document.getElementById(\'tab" + toggle + "\')");

        theObj.style.visibility = 'hidden';
        if(document.images)
            rollOff(toggle);

        if(ie4)
            theObj = eval("document.all[\'tab" + i + "\']");
        if(ns6)
            theObj = eval("document.getElementById(\'tab" + i + "\')");

        if(theObj)
        {
            theObj.style.zindex = 10;
            theObj.style.visibility = 'visible';
            if(document.images)
                rollOn(i);
        }
    }
    // ns4 tab controls
    if(ns4)
    {
        theObj = eval("document.layers[\'tab" + toggle + "\']");
        theObj.visibility="hide";
        rollOff(toggle);
        theObj = eval("document.layers[\'tab" + i + "\']");
        theObj.top = scrollTopbound;
        theObj.clip.top = 0;
        theObj.clip.bottom = 231;
        if(theObj)
        {
            theObj.zindex = 10;
            theObj.visibility="show";
            if (theObj.document.height < 250)
                showSlider = 0;
            else
                showSlider = 1;
            if(document.images)
                rollOn(i);
        }
        objSlider.top = sliderTopbound;
    }
}

function showText(num)
{
    if(document.images) {
		if (toggle == num)
			eval('document.images["imgTab'+num+'"].src='+'onm[num].src');
		else
			eval('document.images["imgTab'+num+'"].src='+'offm[num].src');
    }
}

function hideText(num)
{
	var num = num;
	if(document.images) {
		if (toggle == num)
			eval('document.images["imgTab'+num+'"].src='+'on[num].src');
		else
			eval('document.images["imgTab'+num+'"].src='+'off[num].src');    
    }
}

function Printable(x,y)
{
    window.open("/en/products/ProductSheet.asp?DriveID=" + x + "&Lang=" + y,"Print","width=590,height=500,scrollbars,toolbar");
    //window.print();
}

function AdjustHeight()
{
	// get objects
	var tabOne;
	tabOne = document.getElementById('tab1');
	var tabTwo;
	tabTwo = document.getElementById('tab2');
	var tabThree 
	tabThree = document.getElementById('tab3');
	var tabFour;
	tabFour = document.getElementById('tab4');
	var tabFive;
	tabFive = document.getElementById('tab5');
	var tabSix;
	tabSix = document.getElementById('tab6');
	// set to 0
	var maxHeight = 0;
	// find the tallest box
	if ((tabOne.offsetHeight >= tabTwo.offsetHeight) && (tabOne.offsetHeight >= tabThree.offsetHeight) && (tabOne.offsetHeight >= tabFour.offsetHeight) && (tabOne.offsetHeight >= tabFive.offsetHeight) && (tabOne.offsetHeight >= tabSix.offsetHeight))
		maxHeight = tabOne.offsetHeight;
	else if ((tabTwo.offsetHeight >= tabThree.offsetHeight) && (tabTwo.offsetHeight >= tabFour.offsetHeight) && (tabTwo.offsetHeight >= tabFive.offsetHeight) && (tabTwo.offsetHeight >= tabSix.offsetHeight))
		maxHeight = tabTwo.offsetHeight;
	else if ((tabThree.offsetHeight >= tabFour.offsetHeight) && (tabThree.offsetHeight >= tabFive.offsetHeight) && (tabThree.offsetHeight >= tabSix.offsetHeight))
		maxHeight = tabThree.offsetHeight;
	else if ((tabFour.offsetHeight >= tabFive.offsetHeight) && (tabFour.offsetHeight >= tabSix.offsetHeight))
		maxHeight = tabFour.offsetHeight;
	else if ((tabFive.offsetHeight >= tabSix.offsetHeight))
		maxHeight = tabFive.offsetHeight;
	else
		maxHeight = tabSix.offsetHeight;
	// add 30
	maxHeight += 30;	
	// set the height
	document.getElementById('TableBox').style.height = maxHeight + 'px';
}