 function lib_open_img_window(src,width,height){
   if(width==0)
     width=500;
   width+=20;
   if(height==0)
     height=400;
   height+=20;
   if(height>600)
     height=600;
   var left = (screen.availWidth/2) - (width/2);
   var top = (screen.availHeight/2) - (height/2);
   info=window.open('/img_preview.php?src='+src,'info','resizable=1, scrollbars=1, toolbar=0, status=0, width='+width+', height='+height+', left='+left+', top='+top);
   info.focus();
 }
function open_window(src, id, width, height){
   if(width==0)   width=500;
   width+=20;
   if(height==0)  height=400;
   height+=20;
   if(height>600)  height=600;
   var left = (screen.availWidth/2) - (width/2);
   var top = (screen.availHeight/2) - (height/2);
   info=window.open('/'+src+'?id='+id,'photo','resizable=1, scrollbars=1, toolbar=0, status=0, width='+width+', height='+height+', left='+left+', top='+top);
   info.focus();
 }

function ShowHideBlock(id,href,span,h) {
    var item = null;
    if (document.getElementById) {
        item = document.getElementById(id);
          href = document.getElementById(href);
     span = document.getElementById(span);
    h = document.getElementById(h);
    }
    else if (document.all) {
        item = document.all[id];
          href = document.all[href];
    }
    else if (document.layers) {
        item = document.layers[id];
          href = document.layers[href];
    }
    if (!item) {
    }
    else if (item.style) {
        if (item.style.display == "none") {
            item.style.display = "";
   span.className = "open";
   h.className = "open";

        }
        else {
            item.style.display = "none";
   span.className = "close";
   h.className = "close";
        }
    }
    else {
        item.visibility = "show";
  item.className = "open";
  span.className = "open";
  h.className = "open";
    }
}


