function changeState(layerRef, state)
{ 
	var blockElement = document.getElementById(layerRef).style;
	blockElement.display = state;
}

function wopen3 (obj){
 var wo = window.open("", "abc", "width=10, height=10, scrollbars=0, status=0");
 wo.document.open();
 var win = "";
 win = "<html><head>";
 win += "<title>Image</title>";
 win += "<script>function resizes (obj){";
 win += "var w=obj.width, h=obj.height;";
 win += "window.resizeTo (w+25, h+25);";
 win += "}</"+"script"+">";
 win += "<style type='text/css'> * {margin:0; padding:0; border:0; } </style> </head>"
 win += "<body>";
 win += "<table cellpadding='0' cellspacing='0' width='100%' height='100%'><tr><td align='center'>";
 win += "<img src='" + obj + "' alt='' onload='resizes(this)' />";
 win += "</td></tr></table>";
 win += "</body></html>";
 wo.document.write(win);
 wo.window.focus();
 wo.document.close();
}

var arr = new Array("id0", "id1", "id2", "id3", "id4", "id5", "id6", "id7", "id8", "id9", "id10", "id11");
function ChangeColor(sImg, imgSrc)
{
	var img = document.getElementById('CarIDF');
	img.src = sImg;
	
	for(var i=0; i<arr.length; i++)
	{
		var julia = document.getElementById('id' + i);
		
		if(julia != null)
		{
			julia.style.border = "2px solid #fff";
		}
	}
	
	imgSrc.style.border = "2px solid #B0001D";	
	document.getElementById('nID').innerHTML = imgSrc.alt;
}