function A_Href_StatusBar(txt)
{ 
  window.status = txt;
}
  
function A_Href_Over(txt,iname,ipath)
{
  if( iname!='')
    document.images[iname].src = ipath+iname+'_over.gif';   
  window.status = txt;
}

function A_Href_Out(iname,ipath) { 
  if( iname!='')
    document.images[iname].src = ipath+iname+'.gif';   
  window.status = ''; 
}  

function addCaption( oImgElem, bUseCaptionMarker )
{
  // Insert Caption
  var oCaptionElem = document.createElement("div");
  oCaptionElem.className = "photo_caption";

  if( bUseCaptionMarker)
  {
    var oCaptionMarkerElem = document.createElement("div");
    oCaptionMarkerElem.className = "photo_caption-marker";
    var oCaptionMarkerTextElem = document.createTextNode("\u00bb");
    oCaptionMarkerElem.appendChild(oCaptionMarkerTextElem);
    oCaptionElem.appendChild(oCaptionMarkerElem );
  }

  var oCaptionTextElem = document.createElement("div");
  oCaptionTextElem.className = "photo_caption-text";
  var oCaptionText = document.createTextNode( oImgElem.alt );
  oCaptionTextElem.appendChild(oCaptionText );
  oCaptionElem.appendChild(oCaptionTextElem);

  if( oImgElem.getAttribute("copyright") != null )
  {
    var oCopyrightElem = document.createElement("div");
    oCopyrightElem.className = "photo_copyright";
    var oCopyrightText = document.createTextNode( 
      oImgElem.getAttribute("copyright") );
    oCopyrightElem.appendChild(oCopyrightText);
    oCaptionElem.appendChild(oCopyrightElem );
  }

  if(oImgElem.nextSibling) 
    oImgElem.parentNode.insertBefore(oCaptionElem,
      oImgElem.nextSibling);
  else
    oImgElem.parentNode.appendChild(oCaptionElem);

  with(oImgElem.style)
  {
    oCaptionElem.style.width = (oImgElem.width+borderLeft+
      borderRight+paddingLeft+paddingRight)+"px";
  }

  return true; 
}

function Question(id,text,link) {
	okno=window.confirm(text);
	if( !okno) {
		id.href="javascript:void(0);";
	}
	else id.href=link;
	return okno;
}

//
// roztahne obsah stranky na celou obrazovku
function wholePageHeightXHTML(id_object,used_height) {
	
	// stranka je delsi jak obrazovka
	var height1 = document.body.clientHeight
	
	// stranka je kratsi jak obrazovka
	var height2 = document.documentElement.clientHeight
	
	if( height1>height2)
		sh = height1
	else 
		sh = height2
		
	new_height =  sh - used_height
	document.getElementById( id_object).style.height = new_height+"px"
} // wholePageHeightXHTML


