var oLast;

function FlashOver(src){
	var nID = document.getElementById('collage');
	nID.innerHTML = "<img src=\"" + src + "\" width=\"546\" height=\"218\">";
}

function changeState(layerRef, state){ 
	var blockElement = document.getElementById(layerRef).style;
	blockElement.display = state;
}

function pre_view(src, obj) {
	var oPhoto = document.getElementById('photo');
	if (oLast)
		oLast.className = 'op';
	oLast = obj;
	obj.className = 'noop';
	oPhoto.src = src;
}



function ChangeColor(src, obj){
	 
	var img = document.getElementById('photo');
	img.src = src;
	if (oLast)
		oLast.style.border = '2px solid #FFF';
	oLast = obj.parentNode;
	obj.parentNode.style.border = '2px solid #000';
}

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+10, h+46);";
 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();
}