function wopen(imgName, w , h, Title)
{
	var wo = window.open("", "abc", "width = " + w + " , height = " + h + ", scrollbars=0, status=0");
	wo.document.open();
	var win = "";
	win = "<html><head><title>" + Title + "</title></head>";
	win += "<body bgcolor='#ffffff' leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0' marginwidth='0' marginheight='0'>";
	win += "<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'><tr><td align='center'>";
	win += "<a href='#' onClick='self.window.close();'><img src='" + imgName + "' width='" + w + "' height='" + h + "' border='0' alt='" + Title + "'></a>";
	win += "</td></tr></table>";
	win += "</body></html>";
	w += 40;
	h += 58;
	wo.window.resizeTo(w, h);
	wo.document.write(win);
	wo.window.focus();
	wo.document.close();	
} 

function popup(imgName, w , h, Title)
{
	var left, top;
	left = screen.width / 2 - (w / 2);
	top = screen.height / 3 - (h / 2); if (top<0) { top=0; }

	var wo = window.open("", "abc", "width=" + w + ", height=" + h + ", scrollbars=0, status=0, left=" + left + ", top=" + top );
	wo.document.open();
	var win = "";
	win = "<html><head>";
	win += "<title>" + Title + "</title>";
	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 += "<a href='#' onClick='self.window.close();'><img src='" + imgName + "' width='" + w + "' height='" + h + "' alt='" + Title + "'></a>";
	win += "</td></tr></table>";
	win += "</body></html>";
	w += 20;
	h += 52;
	wo.window.resizeTo(w, h);
	wo.document.write(win);
	wo.window.focus();
	wo.document.close();
}

var arr = new Array("id1", "id2", "id3", "id4", "id5", "id6", "id7", "id8", "id9", "id10", "id11", "id12", "id13", "id14", "id15", "id16");
function ChangeFoto(sImg, imgnum, obj)
{
	 
	var img = document.getElementById('bigFoto');
	img.src = sImg;
	img.alt = obj.alt; img.title = obj.alt;
	
	document.getElementById('textFoto').innerHTML = obj.alt;
	
	for(var i=0; i<arr.length; i++)
	{
		var julia = document.getElementById('id' + i);
		
		if(julia != null)
		{
			julia.style.background = 'url(\'/img/ram.gif\')';
		}
	}
	
	sel = document.getElementById('id' + imgnum);
	sel.style.background = 'url(\'/img/ramsel.gif\')';
}