function showreklama(){

var browser=navigator.appName;
if (browser == "Microsoft Internet Explorer") {

var xxx1 = document.documentElement.clientWidth+document.documentElement.scrollLeft;
//alert (xxx1);
document.getElementById("reklamadiv").style.left = ((xxx1/2) - 280)+"px";

} 

else {

var xxx1 = document.documentElement.clientWidth;
//alert (document.getElementById("reklamadiv").width);
document.getElementById("reklamadiv").style.left = ((xxx1/2) - 280)+"px";

}


document.getElementById("reklamadiv").style.display="block";
}

function hidereklama(){
document.getElementById("reklamadiv").style.display="none";
}

function openwin(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function writeFlash(sSrc,nWidth,nHeight)	{
flashSrc = sSrc;
flashWidth = nWidth;
flashHeight = nHeight;
flash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+flashWidth+'" height="'+flashHeight+'" id="writenflash" align="middle">';
flash += '<param name="allowScriptAccess" value="sameDomain">'
flash += '<param name="movie" value="'+flashSrc+'">';
flash += '<param name="quality" value="high">';
flash += '<param name="wmode" value="transparent">';
flash += '<embed src="'+flashSrc+'" quality="high" width="'+flashWidth+'" height="'+flashHeight+'" name="writenflash" align="middle" allowScriptAccess="sameDomain" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
flash += '</object>';

document.write(flash);
}


function repair() /*OPRAV PROBLEMY V IE*/
{
var browser=navigator.appName;
	if (browser == "Microsoft Internet Explorer") {
	document.getElementById("divin1").style.backgroundPositionY = "1px";
	document.getElementById("divin2").style.backgroundPositionY = "1px";
	}
}


function loginswitch(what, what2) { 

if (what == "ipassword" &&  what2 == 1){
document.getElementById("ipassword").value = "" ;
}

if (what == "ipassword" &&  what2 == 2){
if (document.getElementById("ipassword").value == "") {
document.getElementById("ipassword").value = "ipassword" ;
}
}


if (what == "ilogin" &&  what2 == 1){
document.getElementById("ilogin").value = "" ;
}
if (what == "ilogin" &&  what2 == 2){
if (document.getElementById("ilogin").value == "") {
document.getElementById("ilogin").value = "login" ;
}
}


}



function ro_swapImgRestore() { 
  var i,x,a=document.ro_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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

function ro_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=ro_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ro_swapImage() { 
  var i,j=0,x,a=ro_swapImage.arguments; document.ro_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=ro_findObj(a[i]))!=null){document.ro_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//HUHUUHUHUHHUHUUHUHUHHUHUUHUHUHHUHUUHUHUHHUHUUHUHUHHUHUUHUHUHHUHUUHUHUH


	function getMozSelection(txtarea) {
		var selLength = txtarea.textLength;
		var selStart = txtarea.selectionStart;
		var selEnd = txtarea.selectionEnd;
		if (selEnd==1 || selEnd==2) selEnd=selLength;
		return (txtarea.value).substring(selStart, selEnd);
	}
	
	function mozWrap(txtarea, lft, rgt) {
		var selLength = txtarea.textLength;
		var selStart = txtarea.selectionStart;
		var selEnd = txtarea.selectionEnd;
		if (selEnd==1 || selEnd==2) selEnd=selLength;
		var s1 = (txtarea.value).substring(0,selStart);
		var s2 = (txtarea.value).substring(selStart, selEnd)
		var s3 = (txtarea.value).substring(selEnd, selLength);
		txtarea.value = s1 + lft + s2 + rgt + s3;
	}
	
	function IEWrap(lft, rgt) {
		strSelection = document.selection.createRange().text;
		if (strSelection!="") {
		document.selection.createRange().text = lft + strSelection + rgt;
		}

	}
	
	function wrapSelection(txtarea, lft, rgt) {
		if (document.all) {IEWrap(lft, rgt);}
		else if (document.getElementById) {mozWrap(txtarea, lft, rgt);}
	}
	function wrapSelectionWithLink(txtarea) {
		var my_link = prompt("Zadaj URL adresu:","http://");
		if (my_link != null) {
			lft="<a href=\"" + my_link + "\" target=\"_blank\">";
			rgt="</a>";
			wrapSelection(txtarea, lft, rgt);
		}
		return;
	}	
	
	
	
	
function insertAtCursor(myField, myValue) {

  //IE support

  if (document.selection) {

    myField.focus();

    sel = document.selection.createRange();

    sel.text = myValue;

  }

  //MOZILLA/NETSCAPE support

  else if (myField.selectionStart || myField.selectionStart == '0') {

    var startPos = myField.selectionStart;

    var endPos = myField.selectionEnd;

    myField.value = myField.value.substring(0, startPos)

                  + myValue

                  + myField.value.substring(endPos, myField.value.length);

  } else {

    myField.value += myValue;

  }

}

function wrag(who) { //Write Re And Go
document.getElementById('f_nadpis').value = 'RE: ' + who;
window.scroll(0,100000);
}


function ukaz_to(what) { //Write Re And Go
//document.getElementById(what).style.visibility="visible";
//document.getElementById(what).style.height="auto";
document.getElementById(what).style.display="block";
}

function skry_to(what) { //Write Re And Go
//document.getElementById(what).style.visibility="hidden";
//document.getElementById(what).style.height="0px";
document.getElementById(what).style.display="block";
}

