var def = new Object();
umisti = function(){
	hcenter = function(){
		eval("win" + "dow.on" + "re" + "size = function(){ centerDivElement('soup'); }");
	}
	hcenter();
	centerDivElement('soup');
}

function centerDivElement(what){
	// EDIT
	var w = what;
	var elmW = parseInt(document.getElementById(w).style.width) / 2; var elmH = parseInt(document.getElementById(w).style.height) / 2;
	var centerX = Math.round( getInnerWidth(this) / 2 ); var centerY = Math.round( getInnerHeight(this) / 2 );
	var x = parseInt(centerX); var y = parseInt(centerY); 
	var tpos = (y - elmH); var lpos = (x - elmW);
	if(tpos <= 0){ tpos = 0; } if(lpos <= 0){ lpos = 0; }
	var stp = 85; if(tpos < stp){tpos = stp;}
	document.getElementById(w).style.left = lpos + "px";
	document.getElementById(w).style.top = tpos + "px";
	// EDIT
}
function getInnerWidth(win) {
	var winWidth; if (win.innerWidth) { winWidth = win.innerWidth; }
	else if (win.document.documentElement && win.document.documentElement.clientWidth) { winWidth = win.document.documentElement.clientWidth; }
	else if (document.body) { winWidth = win.document.body.clientWidth; }
	return winWidth;
}
function getInnerHeight(win) {
	var winHeight; if (win.innerHeight) { winHeight = win.innerHeight; }
	else if (win.document.documentElement && win.document.documentElement.clientHeight) { winHeight = win.document.documentElement.clientHeight; }
	else if (win.document.body) { winHeight = win.document.body.clientHeight; }
	return winHeight;
}

/******************************************************************************************************************************/

function resize(){ 
	 /*alert(document.getElementById("test").offsetHeight);
	alert(document.getElementById("test").offsetWidth);*/ 
	var vyska = document.getElementById("obsah").offsetHeight + "px";
	/*var sirka = document.getElementById("obsah").offsetWidth + "px";*/
	var frame = document.getElementById("soup"); 
	frame.style.height = vyska;
	/*frame.style.width = sirka;*/
}

/******************************************************************************************************************************/

function correctPNG(){
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	if ((version >= 5.5) && (document.body.filters)){
		for(var i=0; i<document.images.length; i++){
			var img = document.images[i]
			var imgName = img.src.toUpperCase()
			if (imgName.substring(imgName.length-3, imgName.length) == "PNG"){
				var imgID = (img.id) ? "id='" + img.id + "' " : ""
				var imgClass = (img.className) ? "class='" + img.className + "' " : ""
				var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
				var imgStyle = "display:inline-block;" + img.style.cssText 
				if (img.align == "left") imgStyle = "float:left;" + imgStyle
				if (img.align == "right") imgStyle = "float:right;" + imgStyle
				if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
				var strNewHTML = "<span " + imgID + imgClass + imgTitle
				+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></"+"span>" 
				img.outerHTML = strNewHTML
				i = i-1
			}
		}
	}    
}
if(document.all){window.attachEvent("onload", correctPNG);}

/******************************************************************************************************************************/

function openfullwindow(url) {
    var options = 'scrollbars=yes,resizable=no,status=no,toolbar=no,menubar=no,location=no';
    options += ',width=' + screen.availWidth + ',height=' + screen.availHeight;
    options += ',screenX=0,screenY=0,top=0,left=0';
    var win = window.open(url, '', options);
    win.resizeTo(screen.availWidth, screen.availHeight);
}
function openwindow(url, jmeno, w, h) {
	window.open(url, jmeno, 'resizable=0,top=65,left=65,menubar=0,toolbar=0,width=' + w + ',height=' + h);
}

/******************************************************************************************************************************/

var message="Sorry, that function is disabled.\nThis Page Copyrighted and Images and Text protected!\nALL RIGHTS RESERVED"; 

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;

if (isIE||isNN){
document.oncontextmenu=checkV;
}else{
document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
document.onmousedown=checkV;}

function checkV(e){
if (isN4){
if (e.which==2||e.which==3){
dPUW=alert(message);
return false;
}}else{
dPUW=alert(message);
return false;}}

/******************************************************************************************************************************/

function email(name, domain, suffix, text)
{
   var address = name + "\u0040" + domain + "." + suffix;
   var url = "mailto:" + address;
   if( ! text )
   {
      text = address;
   }
   document.write("<a href=\"" + url + "\">" + text + "</a>");
}

/******************************************************************************************************************************/

COPYRIGHT = "2006-";

function writeCopyright(){
	document.write(COPYRIGHT, new Date().getFullYear());
}
