var detail_semaphore = false;
openid = '';

function imgalpha(item,estate) {
	if (document.getElementById(item))
	{
		if (estate)
		{
			document.getElementById(item).style.filter = "alpha(enabled=true, opacity=25, style=0)";
		}
		else
		{
			document.getElementById(item).style.filter = "alpha(enabled=true, opacity=100, style=0)";
		}
	}
}

function showdetail(item,img,estate) {
  if (estate) {
        document.getElementById(item).style.display = "block";
        imgalpha(img,false);
      }
  else {
        document.getElementById(item).style.display = "none";
        imgalpha(img,true);
      }
}



function showdetail2(object,item,img,estate) {

   if (estate) 
   {
	var l = document.getElementById(object).offsetLeft;
        var t = document.getElementById(object).offsetTop;
       	document.getElementById(item).style.top = (t+25) + "px";
        document.getElementById(item).style.left = (l+50) + "px";
       	document.getElementById(item).style.display = "block";
        imgalpha(img,false);


        if (openid && (item != openid))
		{
              CloseDetail(openid);
        }

		
   }
   else
   {
        document.getElementById(item).style.display = "none";
        imgalpha(img,true)


   }
        return openid = item;

}




function okno(url,w,h){
//  wasOpen  = false;
  win=window.open(url,'','toolbar=no,location=no,status=no,menubar=no,scrollbars='+s+',resizable=yes,copyhistory=no,width=' + w + ',height='+h);

/*
      win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="cs"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"><meta http-equiv="Content-Language" content="cs"><title>Fotobanka</title><style type="text/css">body{margin:0;padding:0;}</style></head><body bgcolor="#ffffff">');
      win.document.write('<a href="javascript:window.close();"><img src="'+ url +'" width="'+ w +'" height="'+ h +'" alt="" border="0"></a>');
      win.document.write('</body></html>');
  */
 return (typeof(win)=='object')?true:false;
}

function news(url){
  win=window.open(url,'','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=680,height=600');
}



function CloseDetail(openid) 
{
    if (openid)
    {
        document.getElementById(openid).style.display = "none";
    }
}



