var xmlHttpmolds = createXmlHttpRequestObject();

function createXmlHttpRequestObject()
{
	var xmlHttp;

	try
	{
		xmlHttp = new XMLHttpRequest();
	}
	catch(e)
	{
		var XmlHttpVersions = new Array("MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP");
		for (var i=0; i<XmlHttpVersions.length && !xmlHttp; i++)
		{
			try
			{
				xmlHttp = new ActiveXObject(XmlHttpVersions[i]);
			}
			catch (e) {}
		}
	}
	if (!xmlHttp)
		alert("Error creating the XMLHttpRequest object.");
	else
		return xmlHttp;
}

function cadIN()
{
	try
	{
		document.getElementById('dcad').style.background = "url(images/cad_u_1.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}
function cadOUT()
{
	try
	{
		document.getElementById('dcad').style.background = "url(images/3dcad.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}

function moldsIN()
{
	try
	{
		document.getElementById('dcad').style.background = "url(images/molds_u_1.jpg)";
		document.getElementById('molds2').style.background = "url(images/molds_u_2.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}
function moldsOUT()
{
	try
	{
		document.getElementById('dcad').style.background = "url(images/3dcad.jpg)";
		document.getElementById('molds2').style.background = "url(images/models2.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}

function modelsIN()
{
	try
	{
		document.getElementById('molds2').style.background = "url(images/models_u_1.jpg)";
		document.getElementById('proto2').style.background = "url(images/models_u_2.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}
function modelsOUT()
{
	try
	{
		document.getElementById('molds2').style.background = "url(images/models2.jpg)";
		document.getElementById('proto2').style.background = "url(images/proto2.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}

function protoIN()
{
	try
	{
		document.getElementById('proto2').style.background = "url(images/proto_u_1.jpg)";
		document.getElementById('prod2').style.background = "url(images/proto_u_2.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}
function protoOUT()
{
	try
	{
		document.getElementById('proto2').style.background = "url(images/proto2.jpg)";
		document.getElementById('prod2').style.background = "url(images/prod2.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}

function prodIN()
{
	try
	{
		document.getElementById('prod2').style.background = "url(images/prod_u_1.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}
function prodOUT()
{
	try
	{
		document.getElementById('prod2').style.background = "url(images/prod2.jpg)";
	}
	catch(e)
	{
		alert(xmlHttpmolds.statusText);
	}
}