function change_image(id) {
	t=document.getElementById('thumb_'+id);
	if (t) {
		m=document.getElementById('img_main');
		m.src=t.innerHTML+'?from=products';
		m.name=id;
	}
}

function popup_images(symbol,id) {
	//PopupWindow(symbol,id,800,700);
	draw_image_box(symbol,id);

}
function PopupWindow(symbol, id , width, height) {
	   okno = window.open('/products_galleries.xml?symbol='+symbol+'&id='+id, 'podglad', 'dependent=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizeable=1,copyhistory=no,width='+width+',height='+height+',screenX=150,screenY=150,top=150,left=150,scrollbars=yes');
	/*
	   okno.document.open();
	   okno.document.write('<?xml version="1.0" encoding="utf-8" ?>');
	   okno.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">');
	   okno.document.write('<html xmlns="http://www.w3.org/1999/xhtml">');
	   okno.document.write('<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Podgląd</title></head>');
	   okno.document.write('<body style="margin: 0px; padding: 0px" onclick="window.close()"><img style="border: 0px none" src="'+url+'" alt="" /></body></html>');
	   okno.document.close();
	*/
	   okno.focus();
	}


function draw_image_box(symbol,id){
	var url='/products_galleries.xml?symbol=' + symbol + '&id=' + id;
	var caption='&#160;';
	var modal=true;
	var width="800";
	var height="600";
	var draw_this='<div style="font-size:4px;;line-height:2px;">&nbsp;<br \/><br \/><\/div>'
	+'<iframe  name="popup" frameborder="0" src="' + url + '" width="100%" height="650" ></iframe>'
	+(OLns4?'<\/form>':'');

	overlib(draw_this, EXCLUSIVEOVERRIDE, WIDTH, width, HEIGHT, height, caption?CAPTION:DONOTHING, caption?caption:DONOTHING,CLOSECLICK,CLOSETEXT,'',
	//overlib(draw_this, EXCLUSIVEOVERRIDE, caption?CAPTION:DONOTHING, caption?caption:DONOTHING,CLOSECLICK,CLOSETEXT,'',
	CAPTIONPADDING,4, TEXTPADDING,10, BGCLASS,'olbgD', BORDER,1,
	CGCLASS,'olcgD', CAPTIONFONTCLASS,'olcapD', CLOSEFONTCLASS,'olcloD',
	FGCLASS,'olfgD', TEXTFONTCLASS,'oltxtD',
	SHADOW, SHADOWCOLOR,'#A0A0A0', MODAL,
	STICKY, SCROLL, MIDX,0, MIDY,0,MODALCOLOR,'#000');
}

