function PopupCloseFadeIn()
{
	document.getElementById("wrapper_border").style.filter = "alpha(opacity=100)";
	document.getElementById("wrapper_border").style.MozOpacity = "1.0";
	document.getElementById("wrapper_border").style.Opacity = "1.0";	
	document.getElementById("popupwrapper").style.display = "none";
	document.getElementById("Changing_content").style.display = "inline";
	document.getElementById("emailnewsletter").value = "Email";
}


function ShowWrapper(Wrapper)
//Showwrapper will let a div disapear and wil show a other div.
{
	if(Wrapper == "Products_Wrapper")
	{
		document.getElementById("Tv_Wrapper").style.display = "none";
		document.getElementById("Brochure_Wrapper").style.display = "none";
		document.getElementById("wrapper_border").style.height = "1558px";
		document.getElementById("Content_Border").style.height = "1208px";
		document.getElementById("Products_Wrapper").style.display = "inline";
		document.getElementById("tvlink").style.background = "";
		document.getElementById("brochurelink").style.background = "";
		document.getElementById("productslink").style.background = "URL(Images/Menu2/bgbutton.png)";
	}
	if(Wrapper == "Brochure_Wrapper")
	{
		
		document.getElementById("Tv_Wrapper").style.display = "none";
		document.getElementById("Products_Wrapper").style.display = "none";
		document.getElementById("wrapper_border").style.height = "1080px";
		document.getElementById("Content_Border").style.height = "730px";
		document.getElementById("Brochure_Wrapper").style.display = "inline";
		document.getElementById("tvlink").style.background = "";
		document.getElementById("productslink").style.background = "";
		document.getElementById("brochurelink").style.background = "URL(Images/Menu2/bgbutton.png)";
	}
	
	if(Wrapper == "Tv_Wrapper")
	{
		document.getElementById("Brochure_Wrapper").style.display = "none";
		document.getElementById("Products_Wrapper").style.display = "none";
		document.getElementById("wrapper_border").style.height = "auto";
		document.getElementById("Content_Border").style.height = "700px";
		document.getElementById("Tv_Wrapper").style.display = "inline";
		document.getElementById("productslink").style.background = "";
		document.getElementById("brochurelink").style.background = "";
		document.getElementById("tvlink").style.background = "URL(Images/Menu2/bgbutton.png)";
		
	}
}


var opacIntro = 100;
var fadeOut = true;
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

function FadeIn(divNr) 
// FadeIn will let de DIV fade. It will change the opacity from 0 to 100.
{
    window.document.getElementById("CurrentProjects_Logo_" + divNr).style.display = "inline";
	window.document.getElementById("CurrentProjects_Text_" + divNr).style.display = "inline";
    opacIntro += 2;
    if (opacIntro < 100) {
        if (ie5) {
           window.document.getElementById("CurrentProjects_Logo_" + divNr).filters.alpha.opacity = opacIntro;
		   window.document.getElementById("CurrentProjects_Text_" + divNr).filters.alpha.opacity = opacIntro;
        }
        if (ns6) {
            window.document.getElementById("CurrentProjects_Logo_" + divNr).style.MozOpacity = opacIntro / 100;
			window.document.getElementById("CurrentProjects_Text_" + divNr).style.MozOpacity = opacIntro / 100;
        }
        window.setTimeout("FadeIn("+divNr+")", 50);
    }
	else
	{
		swapCurrentProjects(divNr);	
	}
}


function FadeOut(divNr, divNr2) 
//FadeOut will let a Div fade out. It will change the opacity from 100 to 0.
{
    if (opacIntro > 0) {
        opacIntro -= 2;
		if (ie5) {
           window.document.getElementById("CurrentProjects_Logo_" + divNr).filters.alpha.opacity = opacIntro;
		   window.document.getElementById("CurrentProjects_Text_" + divNr).filters.alpha.opacity = opacIntro;
        }
        if (ns6) {
            window.document.getElementById("CurrentProjects_Logo_" + divNr).style.MozOpacity = opacIntro / 100;
			window.document.getElementById("CurrentProjects_Text_" + divNr).style.MozOpacity = opacIntro / 100;
        }
        window.setTimeout("FadeOut("+divNr+","+divNr2+")", 50);
    } else {	
		window.document.getElementById("CurrentProjects_Logo_" + divNr).style.display = "none";
		window.document.getElementById("CurrentProjects_Text_" + divNr).style.display = "none";
		FadeIn(divNr2);
    }
}

function swapCurrentProjects(divNr)
//Swap current projects will fadeout the first div and fadein the seccond one.
{

 
	if(divNr == 7)
	{
		divNr2 = 1;
	}
	else
	{
		divNr2 = divNr + 1;
	}
	//window.alert(divNr +', '+ divNr2 + ', ' + opacIntro); check the divnr and the opacity
	FadeOut(divNr, divNr2); 
	
	if(divNr == 7)
	{
		divNr = 1;
		divNr2 = 2;
	}
}