/*---------------------*/
/* Browser Check       */
/*---------------------*/
var is = new browserCheck();
function browserCheck(){
	this.agent=navigator.userAgent.toLowerCase()
	this.op=window.opera 
	this.moz=(this.agent.indexOf("gecko")>-1 || window.sidebar)
	this.ie=this.agent.indexOf("msie")>-1 && !this.op
	return this;
}



function setHeight(refererId,targetId,offset){
	var bottom;
	bottom =  document.getElementById(refererId).offsetTop;
	bottom += offset;
	if(document.getElementById(targetId))
	{
		if(is.moz)
		{
			document.getElementById(targetId).style.height = bottom+"px";
		}
		else
		{
		}
	}
}


function setPksHeight(){
	var bottom;
	var offset = 100;
	bottomRight =  document.getElementById("rightBottomMeter")?document.getElementById("rightBottomMeter").offsetTop:0;
	bottomLeft =  document.getElementById("leftBottomMeter")?document.getElementById("leftBottomMeter").offsetTop:0;
	bottomCenter =  document.getElementById("centerBottomMeter")?document.getElementById("centerBottomMeter").offsetTop:0;

	bottom = (bottomRight>bottomLeft)?bottomRight:bottomLeft;
	bottom = (bottomCenter>bottom)?bottomCenter:bottom;

	if(document.getElementById("pks_body") && bottom>0)
	{
		if(is.moz)
		{
			document.getElementById("pks_body").style.height = offset+bottom+"px";
		}
		else
		{
		}
	}
}


// BIGFOTO   -  (c) Marek Laco, vznik: 1999
//              www.mlaco.sk
//
// revizia: 12.5.2001
//
// volne mozte sirit, len tu nechajte tento text. 
//
// pouzitie: Bigfoto(cesta,subor,sirka,vyska);
//     teda napr: Bigfoto('http://members.xoom.com/nevedko/imgs/','marek.gif',200,100);
//
//

ie4 = false;

if ((navigator.appName == 'Microsoft Internet Explorer')  &&  (navigator.appVersion.substring(0, 1) >= 4)) ie4 = true;

function Bigfoto(path, file, width, height, title) {
var name2 = file.substring(1,4);
var name = "";

//------ neviem nazov fcie, tak na to ideme postupne: (nahrada nebezpecnych znakov)
for(i=0;i<name2.length;i++)
 if (((chr = name2.substring(i,i+1)) != '.') && (chr != "-"))
   name = name + chr;
//-------

iwidth = width;
iheight = height;

top_px=((screen.height / 2) - (height / 2) - 20);
left_px=((screen.width / 2) - (width / 2));

sbars="no";

if (screen.height < (height + 33)) {
sbars="yes"
if (ie4) width+=16; //sbars
top_px=5;
height=(screen.height-50-35);
}

if (screen.width < (width + 5)) {
sbars="yes"
if (ie4) height+=16; //sbars
left_px=5;
width=(screen.width-50);
}

msg=window.open("",name,"toolbar=no,directories=no,menubar=no,resizable=no,scrollbars="+sbars+",status=no,top="+top_px+",left="+left_px+",width="+width+",height="+height,"MIME-CONTENT=text/html");

msg.document.writeln("<HTML><HEAD><TITLE>"+title+"</TITLE></HEAD>");

msg.document.writeln("<style>body {background-color: #F0F0F0; background-image: url('/imgs/loading.gif'); background-repeat: no-repeat; background-position: 50% 80%; margin: 0px; padding: 0px;} </style><BODY>");
if (!ie4) msg.document.writeln("<DIV STYLE='position: absolute; left: 0px; top: 0px;'>");
msg.document.writeln("<a href=\"javascript:window.close()\"><img src='"+path+file+"' border=0 width='"+iwidth+"' height='"+iheight+"'></a><br>");
if (!ie4) msg.document.writeln("</DIV>");
msg.document.writeln("</BODY></HTML>");
msg.document.close();
}



