// JavaScript Document

function sd(id,visibility)  // setdisplay
{
 if(document.getElementById)
 {
  var obj = document.getElementById(id);
  if(obj)
  {
   obj.style.display = visibility?"block":"none";
  }
 }
}

function ha()   //hide aal
{
 sd('r6',0);sd('r5',0);sd('r4',0);sd('r3',0);sd('r2',0);sd('r1',0);
}

/* ukaz obrazek */

function winH() {
   if (window.innerHeight)
      /* NN4 a kompatibilní prohlížeče */
      return window.innerHeight;
   else if
   (document.documentElement &&
   document.documentElement.clientHeight)
      /* MSIE6 v std. režimu - Opera a Mozilla
      již uspěly s window.innerHeight */
      return document.documentElement.clientHeight;
   else if
   (document.body && document.body.clientHeight)
      /* starší MSIE + MSIE6 v quirk režimu */
      return document.body.clientHeight;
   else
      return null;
}


function getScrollOffset()
{
	if(document.documentElement.scrollTop)
		return document.documentElement.scrollTop;
	if(window.pageYOffset)
		return window.pageYOffset;
	return document.body.scrollTop;
}

function ukazObrazek(src,width,height)
{
 	if(document.getElementById)
 	{
 		var obj = document.getElementById('detailImg');
 		if(obj)
 			{
 				obj.src = src;
 				obj.width = width;
 				obj.height = height;
			}
  	obj = document.getElementById('imgBlock');
  	if(obj)
  		{
   		obj.style.visibility = "visible";
   		obj.style.height = (winH())+'px';
   		}
   	obj = document.getElementById('imgBlock');
  	if(obj)
  		{
   		obj.style.top = getScrollOffset()+'px';
  		}
 	}
 return false;
}


function schovejObrazek()
{
	var obj = document.getElementById('detailImg');
 		if(obj)
 		{
 		obj.src = 'style/galerie/free.gif';
		}
	var obj = document.getElementById('imgBlock');
  	if(obj)
  	{
   	obj.style.visibility = "hidden";
  	}
	return false;
}

a = "spravceahojportalweb.cz".replace(/ahoj/g, "@");

function add_smile(t){ 
  document.getElementById("vzkaznikText").value+= '' + t; 
}
