var Animate = new Image;
Animate.src = "source/animate.jpg";

var Animate2 = new Image;
Animate2.src = "source/animateHouse.jpg";

var Animate3 = new Image;
Animate3.src = "source/animateOffice.jpg";


// APPEAR / DISAPPEAR SUB-PRODUCTS DIVS

function toggle(which)
{
(document.getElementById(which).style.visibility == "visible") ? document.getElementById(which).style.visibility = "hidden" :   document.getElementById(which).style.visibility = "visible";
disappears(which);
}

function invisible()
{
document.getElementById('productslide').style.visibility = "hidden";
document.getElementById('supportslide').style.visibility = "hidden";
document.getElementById('contactslide').style.visibility = "hidden";
document.getElementById('Poffice').style.visibility = "hidden";
document.getElementById('Phome').style.visibility = "hidden";
document.getElementById('Phouse').style.visibility = "hidden";
}

function disappears(which)
{
switch(which)
	{
	case 'Poffice':
		document.getElementById('Phome').style.visibility = "hidden";
		document.getElementById('Phouse').style.visibility = "hidden";
		break;
	case 'Phome':
		document.getElementById('Poffice').style.visibility = "hidden";
		document.getElementById('Phouse').style.visibility = "hidden";
		break;
	case 'Phouse':
		document.getElementById('Phome').style.visibility = "hidden";
		document.getElementById('Poffice').style.visibility = "hidden";
		break;
	case 'productslide':
		document.getElementById('Phome').style.visibility = "hidden";
		document.getElementById('Phouse').style.visibility = "hidden";
		document.getElementById('Poffice').style.visibility = "hidden";
		document.getElementById('supportslide').style.visibility = "hidden";
		document.getElementById('contactslide').style.visibility = "hidden";
		break;
	case 'supportslide':
		document.getElementById('Phome').style.visibility = "hidden";
		document.getElementById('Phouse').style.visibility = "hidden";
		document.getElementById('Poffice').style.visibility = "hidden";
		document.getElementById('productslide').style.visibility = "hidden";
		document.getElementById('contactslide').style.visibility = "hidden";
		break;
	case 'contactslide':
		document.getElementById('Phome').style.visibility = "hidden";
		document.getElementById('Phouse').style.visibility = "hidden";
		document.getElementById('Poffice').style.visibility = "hidden";
		document.getElementById('supportslide').style.visibility = "hidden";
		document.getElementById('productslide').style.visibility = "hidden";
		break;
	default:
		document.getElementById('Phome').style.visibility = "hidden";
		document.getElementById('Phouse').style.visibility = "hidden";
		document.getElementById('Poffice').style.visibility = "hidden";
		break;
	}
}

//function disappear(which, which2)
//{
//document.getElementById(which).style.visibility = "hidden";
//document.getElementById(which2).style.visibility = "hidden";
//}


function splashGlow(which)
{
document.getElementById(which).style.visibility = "visible"
}

function splashGlowOff(which)
{
document.getElementById(which).style.visibility = "hidden"
}


// GLOW / ROLLOVERS - MAIN LINKS

function glow(which)
{
document.getElementById(which).style.backgroundColor = "#99CC99";
}

function unglow(which)
{
document.getElementById(which).style.background = "#565656";
}

// GLOW / ROLLOVERS - MAIN LINKS

function glowSplash(which)
{
//document.getElementById(which).style.cursor='pointer';
document.getElementById(which).style.backgroundColor = "#FFFFFF";
invisible();
}

function unglowSplash(which)
{
document.getElementById(which).style.background = "transparent";
}

// GLOW / ROLLOVERS - SUB LINKS

function sideglow(which)
{
document.getElementById(which).style.backgroundColor = "#FBFBFB"; //C7EC89
}

function sideunglow(which)
{
document.getElementById(which).style.backgroundColor = "#F5F5F5";
}



// GLOW / ROLLOVERS - SUB LINKS

function sglow(which)
{
document.getElementById(which).style.backgroundColor = "#FFFFFF";
}

function sunglow(which)
{
document.getElementById(which).style.background = "#F3F3F3";
}

// HOME PAGE - TAB TOGGLE

function toggleTab(which, whichOff)
{	    
     //IE5.5 and 6 fix
if(navigator.appName == "Microsoft Internet Explorer" && (navigator.userAgent.indexOf('MSIE 6') != -1 || navigator.userAgent.indexOf('MSIE 5.5') != -1 || navigator.userAgent.indexOf('MSIE 7') != -1))
     {
     document.getElementById(which).setAttribute("className", "tab");
     document.getElementById(whichOff).setAttribute("className", "tabOff");
     }
else
     {
     document.getElementById(which).setAttribute("class", "tab");
     document.getElementById(whichOff).setAttribute("class", "tabOff"); 
     }
     
if(which == 'tabFind')
{document.getElementById('FindBloc').style.visibility = "visible";}
else
{document.getElementById('FindBloc').style.visibility = "hidden";}   
}


// SELECT DROP DOWN URL FUNCTION

 function doSel(obj)
 {
     for (i = 1; i < obj.length; i++)
        if (obj[i].selected == true)
           eval(obj[i].value);
}



// ONMOUSEOVER MAKE PIC BIGGER

function bigger(which)
{
document.getElementById(which).setAttribute("height", "85");
}

// ONMOUSEOUT MAKE PIC SMALLER

function smaller(which)
{
document.getElementById(which).setAttribute("height", "80");
}



// ONMOUSEOVER CHANGE BUTTON SITE MAP

function light(which)
{
document.getElementById(which).setAttribute("src", "source/buttondown.jpg");
}

// ONMOUSEOUT CHANGE BUTTON SITE MAP

function dark(which)
{
document.getElementById(which).setAttribute("src", "source/button.jpg");
}

// ONMOUSEOVER/OUT CHANGE BUTTON GENERIC

function Glight(which, source)
{
document.getElementById(which).setAttribute("src", source);
}


function Gdark(which, source)
{
document.getElementById(which).setAttribute("src", source);
}


// SPECIALS FORWARD / BACKWARD BUTTONS


function changeSpecial(button)
{
var counter;


if (document.getElementById('Spec1').style.visibility == 'visible' && button == 'F')
	{counter=1;}
	
else if (document.getElementById('Spec3').style.visibility == 'visible' && button == 'B')
	{counter=2;}
	
//else if (document.getElementById('Spec3').style.visibility == 'visible' && button == 'F')
//	{counter=3;}
	
//else if (document.getElementById('Spec5').style.visibility == 'visible' && button == 'B')
//	{counter=4;}


  
   switch(counter)
	{
	case 1:
		document.getElementById('Spec1').style.visibility = "hidden";
		document.getElementById('Spec2').style.visibility = "hidden";
		document.getElementById('Spec3').style.visibility = "visible";
		document.getElementById('Spec4').style.visibility = "visible";
		document.getElementById('B').style.opacity = 1;
		document.getElementById('B').style.filter = 'alpha(opacity=100)'
		document.getElementById('F').style.opacity = 0.3;
		document.getElementById('F').style.filter = 'alpha(opacity=30)'
		break;
	case 2:
	    	document.getElementById('Spec3').style.visibility = "hidden";
		document.getElementById('Spec4').style.visibility = "hidden";
		document.getElementById('Spec1').style.visibility = "visible";
		document.getElementById('Spec2').style.visibility = "visible";
		document.getElementById('B').style.opacity = 0.3;
		document.getElementById('B').style.filter = 'alpha(opacity=30)'
		document.getElementById('F').style.opacity = 1;
		document.getElementById('F').style.filter = 'alpha(opacity=100)'
		break;
/*	case 3:
	    	document.getElementById('Spec3').style.visibility = "hidden";
		document.getElementById('Spec4').style.visibility = "hidden";
		document.getElementById('Spec5').style.visibility = "visible";
		document.getElementById('F').style.opacity = 0.3;
		document.getElementById('F').style.filter = 'alpha(opacity=30)'
		break;
	case 4:
	    	document.getElementById('Spec5').style.visibility = "hidden";
		document.getElementById('Spec3').style.visibility = "visible";
		document.getElementById('Spec4').style.visibility = "visible";
		document.getElementById('F').style.opacity = 1;
		document.getElementById('F').style.filter = 'alpha(opacity=100)'
		break;
*/

	default:
		break;
	}
    
}

function hover(which)
{
    switch(which)
	{
	case 'B':
		document.getElementById(which).setAttribute("src", "source/arrowB_glow.gif");
		break;
	case 'F':
		document.getElementById(which).setAttribute("src", "source/arrowF_glow.gif");
		break;
	default:
		break;
	}
       
}

function hoverOut(which)
{
    
    switch(which)
	{
	case 'B':
		document.getElementById(which).setAttribute("src", "source/arrowB.gif");
		break;
	case 'F':
		document.getElementById(which).setAttribute("src", "source/arrowF.gif");
		break;
	default:
		break;
	}
	     
}


