function openLink(URI){
  win = window.open(URI,"secWin","");
  win.focus;
}
function JustSoPicWindow(imageName,imageWidth,imageHeight,typ) {	
  bgcolor="#FFFFFF";
  if (typ==1)		
    imageName=imageName.substring(0,imageName.lastIndexOf("/"))+"-big"+imageName.substring(imageName.lastIndexOf("/"),imageName.length);	
  else		
    imageName=imageName.substring(0,(imageName.length-8))+"big.jpg";
	if ((typ==1) || (typ==''))		
    typ="Klikněte pro zavření okna";
    					//nove promenne
              
              var pimageWidth=imageWidth;
              var pimageHeight=imageHeight;
              var posuvnik='no';
              
              	//********************		
                var adj=10;
                var w = screen.width;
                var h = screen.height;
                var scrWidth;
                var scrHeight;
                var plus=0;
                //alert(w+","+h);
                //var byFactor=1;
                		if (w<imageWidth) //obrazek je sirsi nez obrazovka
                    	{		posuvnik='yes';		srcWidth=w;		plus=20;	}	else srcWidth=imageWidth+plus;		if ((h-50-plus)<imageHeight) 
                      //obrazek je vyssi nez obrazovka
                      	{		posuvnik='yes';		srcHeight=h;		plus=20;	}	else srcHeight=imageHeight+plus;		srcWidth=srcWidth+plus;	var posLeft=Math.round((w-srcWidth)/2);	var posTop=Math.round((h-srcHeight)/2);
                        	/*posTop = parseInt(posTop);	posLeft = parseInt(posLeft);			scrWidth = parseInt(scrWidth); 	scrHeight = parseInt(scrHeight);*/	
                          			var agt=navigator.userAgent.toLowerCase();	if (agt.indexOf("opera") != -1){	  var args= new Array();	  args[0]='parent';	  args[1]=imageName;	  var i ; document.MM_returnValue = false;	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");	} else {	newWindow = window.open("",null,"width="+srcWidth+",height="+srcHeight+",left="+posLeft+",top="+posTop+", scrollbars="+posuvnik);	newWindow.document.open();	newWindow.document.write('<html><title>'+typ+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="'+typ+'" >'); 	newWindow.document.write('</td></tr></table></body></html>');	newWindow.document.close();	newWindow.focus();	}}

