layers = new Array('home','exterior','interior','equipment','engine','insurance','press')

function showLayer(c)
{
	for (i=0; i<=layers.length - 1; i++)
	{
		document.getElementById(layers[i]+'Text').style.display = 'none';
		document.getElementById(layers[i]+'Img').src = 'img/'+layers[i]+'01.gif';
	}
	document.getElementById(layers[c]+'Text').style.display = 'block';
	document.getElementById(layers[c]+'Img').src = 'img/'+layers[c]+'02.gif';
}

function openImage(img)
{
 var params="menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,dependent,top=0,left=0,width=1,height=1";
 var random = Math.floor(Math.random()*9999999);
 popupWin = window.open('',random,params);
 popupWin.document.write('<html><head><title></title><style type="text/css">* {padding:0px;margin:0px;}</style></head><body><div><a href="javascript:window.close()"><img src="'+img+'" border=0 alt="Click to close window" name="image"></a></div></body></html>');
 setTimeout('reSize()',500);
}

function reSize()
{
 var width = popupWin.document.image.width;
 var height = popupWin.document.image.height;

 if (document.layers)
 {
  popupWin.window.outerWidth = width;
  popupWin.window.outerHeight = height;		
 }
 else
  popupWin.window.resizeTo(width+10,height+29);
}