function flash( swf, width, height){
	document.write('<object type="application/x-shockwave-flash"\n');
	document.write('  data="'+swf+'" width="'+width+'" height="'+height+'">\n');
	document.write('<param name="movie" value="'+swf+'" /><param name=wmode value=opaque>\n');
	document.write('</object>\n');
}

function flash_popup( swf, width, height, id){
	document.write('<p>\n');
	document.write('<object type="application/x-shockwave-flash"\n');
	document.write('  data="'+swf+'" width="'+width+'" height="'+height+'" id="'+id+'">\n');
	document.write('<param name="movie" value="'+swf+'" /><param name=wmode value=transparent><param name=loop value=false><param name=menu value=false><param name=bgcolor value=#FFFFFF>\n');
	document.write('</object>\n');
	document.write('</p>\n');
}
function loadEmpty( elem ){
	elem.src='/themes/default/zasoby/obrazy/brak_foto.jpg';
}
function loadMiniEmpty( elem ){
	elem.src='/themes/default/zasoby/obrazy/brak_foto_m.jpg';
}
function loadGalleryImage( gallery, elem ){
	document.getElementById(gallery).src=elem;
}

function create_window(image, width, height) 
{
	width = width + 40;
	height = height +110;

	var window_spec = "location=no, scrollbars=no, menubars=no, toolbars=no, resizable=yes, left=0, top=0, width=0 , height=0";
	var url = "engine/image_window.php?image=" + image;
	pop_up_window = window.open(url, 'pop_up_window', window_spec); 
	pop_up_window.resizeTo(width,height);
	pop_up_window.focus();

}

//------------------------------------------------------------------------------------------
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}