var fotowin = null;

function foto(id, width, height){
	fotowin = window.open("", "foto", "width =" +width +",height =" +height +",location=no,menubar=no,directories=no,toolbar=no,scrollbars=no,resizable=no,status=no");
	fotowin.document.write("<html><body leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginwidth=\"0\"><img src=\"./util/mma_bin.php?src=mid&amp;id=" + id + "\"/></boby></html>");
	document.body.onfocus = closeFotoWin;
}

function foto_cnt(id, width, height){
	fotowin = window.open("", "foto", "width =" +width +",height =" +height +",location=no,menubar=no,directories=no,toolbar=no,scrollbars=no,resizable=no,status=no");
	fotowin.document.write("<html><body leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginwidth=\"0\"><img src=\"./cnt_bin.php?id=" + id + "\"/></boby></html>");
	document.body.onfocus = closeFotoWin;
}

function foto_addr(id, width, height){
	fotowin = window.open("", "foto", "width =" +width +",height =" +height +",location=no,menubar=no,directories=no,toolbar=no,scrollbars=no,resizable=no,status=no");
	fotowin.document.write("<html><body leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginwidth=\"0\"><img src=\"./addr_bin.php?src=mid&amp;id=" + id + "\"/></boby></html>");
	document.body.onfocus = closeFotoWin;
}

function closeFotoWin() {
	if(fotowin != null && !(fotowin.closed)) {
		fotowin.close();
	}
}

/* PRINT PAGE */
function printWindow(str, id, lng) {
	window.open("print.php?lng="+lng+"&strId="+str+"&id="+id+"","print", "width=670,height=500,location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes, resizable=no,status=no")
}

/* rollover script */
/* Note: Changes target class to modify its looks */

/* mouse over */
function switchclass_over(which, className) {
	which.className=className+'On';
}

/* mouse out */
function switchclass_out(which, className) {
	which.className=className;
}

/* mouseover images */
function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
		}
	}
}
function switchOver(num)
{
	document['image'+num].src = eval("image" + num + "over.src");
}
function switchOff(num)
{
	document['image'+num].src = eval("image" + num + "off.src");
}