﻿<!-- Begin to hide script contents from old browsers.

function ProductSlideStart(productId, productName)
{
	var prodId = document.getElementById("productId");
	var prodName = document.getElementById("productName");
	var pDiv = document.getElementById("prodDiv");
	var cDiv = document.getElementById("compDiv");
	var pTechBody = document.getElementById("prodTechBodyDiv");
	var cTechBody = document.getElementById("compTechBodyDiv");
	var pTd = document.getElementById("prodTechTd");
	var cTd = document.getElementById("compTechTd");
	var cBody = document.getElementById("compBodyDiv");
	var prodImgs = document.getElementById("prodImgs");
	
	if (productId > 0 && prodId && prodName)
	{
		prodId.value = productId;
		prodName.value = productName;
	}
	if ((cTechBody && cTechBody.style.display == "none") || (pDiv && pDiv.style.width == "852px"))
	{
		if (productId > 0)
			document.location.href = "/Technology/Products.aspx?ProductId=" + productId + "&CN=" + productName;
		return;
	}
	if (pTd) pTd.style.backgroundColor = "#ffffff";
	if (cTd && cTechBody && pTechBody)
	{
		pTechBody.style.height = cTd.clientHeight + "px";
		cTechBody.style.height = cTd.clientHeight + "px";
	}
	if (pTechBody && pTechBody.style.display == "none")
	{
		$("#prodTechBodyDiv").animate({"width" : "470px"}, {"duration" : 900});
	}
	if (cTd) cTd.style.backgroundColor = "#ffffff";
	if (cDiv) $("#compDiv").animate({"left" : "854px", "width" : "83px"}, {"duration" : 900});
	if (cDiv && cBody)
		$("#prodDiv").animate({"width": "852px"}, {"duration": 900});
	else if (cDiv)
		$("#prodDiv").animate({"width": "852px"}, {"duration": 900, "complete": ProductTechSlideEnd});
	
	if (cTechBody) $("#compTechBodyDiv").animate({"left": "470px", "width": "0px"}, {"duration": 930, "complete" : ComponentTechBodySlideEnd});
	if (cBody) $("#compBodyDiv").animate({"left": "945px", "width": "0px"}, {"duration": 890, "complete" : ComponentBodySlideEnd});
	if (prodImgs) $("#prodImgs").cycle("resume");
}

function ComponentSlideStart(componentId, componentName)
{
	var compId = document.getElementById("componentId");
	var compName = document.getElementById("componentName");
	var cDiv = document.getElementById("compDiv");
	var pDiv = document.getElementById("prodDiv");
	var pTechBody = document.getElementById("prodTechBodyDiv");
	var cTechBody = document.getElementById("compTechBodyDiv");
	var pBody = document.getElementById("prodBodyDiv");
	var cTd = document.getElementById("compTechTd");
	var techBorder = document.getElementById("techBorder");
	var compImgs = document.getElementById("compImgs");
	var cSlide = "-399px";
	var cTechSlide = "-471px";
	
	if (componentId > 0 && compId && compName)
	{
		compId.value = componentId;
		compName.value = componentName;
	}
	if ((pTechBody && pTechBody.style.display == "none") || (cDiv && cDiv.style.width == "868px"))
	{
		if (componentId > 0)
			document.location.href = "/Technology/Components.aspx?ComponentId=" + componentId + "&CN=" + componentName;
		return;
	}
	if (cTechBody && cTechBody.style.display == "none")
	{
		cTechBody.style.width = "470px"; 
		cTechBody.style.left = "380px";
		cTechBody.style.display = "block";
		cTechSlide = "-851px";
	}
	if (cDiv && cDiv.style.width == "83px") cSlide = "-785px";
	if (cTd && cTechBody && pTechBody)
	{
		cTechBody.style.height = cTd.clientHeight + "px";
		pTechBody.style.height = cTd.clientHeight + "px";
	}
	if (techBorder) techBorder.style.backgroundColor = "#ffffff";
	if (pDiv) $("#prodDiv").animate({"width": "67px"}, {"duration": 900});
	if (cDiv && pBody)
		$("#compDiv").animate({"left": cSlide, "width": "868px"}, {"duration": 900});
	else if (cDiv)
		$("#compDiv").animate({"left": cSlide, "width": "868px"}, {"duration": 900, "complete": ComponentTechSlideEnd});
	if (pTechBody && cTechBody)
	{
		$("#prodTechBodyDiv").animate({"width": "0px"}, {"duration": 900, "complete" : ProductTechBodySlideEnd});
		$("#compTechBodyDiv").animate({"left": cTechSlide}, {"duration": 950});
	}
	if (pBody) $("#prodBodyDiv").animate({"width": "0px"}, {"duration": 890, "complete" : ProductBodySlideEnd});
	if (compImgs) $("#compImgs").cycle("resume");
}

function ProductTechSlideEnd()
{
	var prodId = document.getElementById("productId");
	var prodName = document.getElementById("productName");
	var pTechBody = document.getElementById("prodTechBodyDiv");
	if (!pTechBody) document.location.href = "/Technology/Products.aspx";
	if (prodId && prodId.value)
		document.location.href = "/Technology/Products.aspx?ProductId=" + prodId.value + "&CN=" + prodName.value;
}

function ProductTechBodySlideEnd()
{
	var pTechBody = document.getElementById("prodTechBodyDiv");
	var cTechBody = document.getElementById("compTechBodyDiv");
	var pTd = document.getElementById("prodTechTd");
	var cTd = document.getElementById("compTechTd");
	var techBorder = document.getElementById("techBorder");
	var compImgs = document.getElementById("compImgs");
	var compImg1 = document.getElementById("compImg1");
	if (pTechBody) pTechBody.style.display = "none";
	if (cTd) cTd.style.backgroundColor = "#e4e3e3";
	if (techBorder) techBorder.style.backgroundColor = "#ffffff";
	if (pTd) pTd.style.backgroundColor = "#e4e3e3";
	if (cTechBody && pTechBody)
	{
		pTechBody.style.height = "";
		cTechBody.style.height = "";
	}
	if (cTechBody && compImgs && compImg1)
	{
		cTechBody.style.width = "469px";
		compImgs.style.width = "469px";
		compImg1.style.width = "469px";
	}
}

function ProductBodySlideEnd()
{
	var pBody = document.getElementById("prodBodyDiv");
	var smProducts = document.getElementById("smProducts");
	if (pBody && smProducts)
	{
		smProducts.style.visibility = "hidden";
		pBody.style.visibility = "hidden";
		document.location.href = "/Technology/Components.aspx";
	}
}

function ComponentTechSlideEnd()
{
	var compId = document.getElementById("componentId");
	var compName = document.getElementById("componentName");
	var pTechBody = document.getElementById("prodTechBodyDiv");
	if (!pTechBody) document.location.href = "/Technology/Components.aspx";
	if (compId && compId.value)
		document.location.href = "/Technology/Components.aspx?ComponentId=" + compId.value + "&CN=" + compName.value;
}

function ComponentTechBodySlideEnd()
{
	var cTechBody = document.getElementById("compTechBodyDiv");
	var pTechBody = document.getElementById("prodTechBodyDiv");
	var pTd = document.getElementById("prodTechTd");
	var techBorder = document.getElementById("techBorder");
	if (cTechBody) cTechBody.style.display = "none";
	if (techBorder) techBorder.style.backgroundColor = "#e4e3e3";
	if (cTechBody && pTechBody)
	{
		pTechBody.style.height = "";
		cTechBody.style.height = "";
	}
}

function ComponentBodySlideEnd()
{
	var cBody = document.getElementById("compBodyDiv");
	var smComponents = document.getElementById("smComponents");
	if (cBody && smComponents)
	{
		smComponents.style.visibility = "hidden";
		cBody.style.visibility = "hidden";
		document.location.href = "/Technology/Products.aspx";
	}
}

// End the hiding here. -->