var Loader = {
	functions: new Array(),
	
  register: function(args) {
		var size = this.functions.length;
		var fname = arguments[0];
		this.functions.push(args);
  },
	
	run: function() {
    for (var i = 0; i < this.functions.length; i++) {
      var lambda = this.functions[i];
	    try {
        eval(lambda+";");
      } catch (e) {}
    }
	}
}


function picWin(im,wi,he,titl,mess,winpars){
	/*if(he>500) 
	{
		he=500;
		wi+=16;
		winpars = ",scrollbars=yes"
	}*/
	wi +=10;
	he +=10;
	var wL = (screen.width-wi) / 2;
	var wT = (screen.height-he) / 2;
	var wp;
	var img=new Image();
	img.src=im;
	wp="width="+wi+",height="+(typeof(titl)=="undefined"?he:he+30)+",left="+wL+",top="+wT+(typeof(winpars)=="undefined"?"":winpars);
	var vokno=window.open("","",wp);
	vokno.document.open();
	vokno.document.write('<html><head><title>'+(typeof(titl)=="undefined"?"":titl)+'</title>'+
	'<meta http-equiv="content-type" content="text/html; charset=utf-8">'+
	'<style>body{margin:0;padding:5px;background:#fff;font-size:10pt;letter-spacing:0.05em;font-family: Verdana, Helvetica, sans-serif;body} p{margin-top:5px;text-align:center;font-size:10pt}</style>'+
	'</head><body>'+
	'<img src="'+im+'" alt="'+(typeof(mess)=="undefined"?"Kliknutím zavřete okno":mess)+
	'" title="'+(typeof(mess)=="undefined"?"Kliknutím zavřete okno":mess)+
	'" onclick="window.close()" style="display:block;cursor:pointer;cursor:hand">'+
	(typeof(titl)=="undefined"?"":'<p>'+titl+'</p>')+
	'</body></html>');
	vokno.document.close();
	return typeof(vokno)=="object"?true:false;
}

function showFulImage(im,w,h,title){
	div = document.getElementById("full_img");
	arrImg = div.getElementsByTagName("img");
	arrP = div.getElementsByTagName("p");
	img = arrImg[0];
	p = arrP[0];
	oImg = new Image();
	oImg.src = im;
	img.src = oImg.src;
	img.width = w;
	img.height = h;
	p.style.textAlign = "center";
	p.innerHTML = title;	
	ml = (540 - w) / 2;
	img.style.marginLeft = ml+"px";
	img.style.visibility = "visible";	
}



