function showDiv(div_id)
{

   if (document.getElementById && document.getElementById(div_id))
   {
   document.getElementById(div_id).style.display = 'block';
   }

}

function hideDiv(div_id)
{

   if (document.getElementById && document.getElementById(div_id))
   {
   document.getElementById(div_id).style.display = 'none';
   }

}

function toggleDiv(div_id)
{

   if (document.getElementById && document.getElementById(div_id))
   {
   var div_ref = document.getElementById(div_id).style;

      if (div_ref.display == 'none')
      {
      div_ref.display = 'block';
      }
      else if (div_ref.display == 'block' || div_ref.display == '')
      {
      div_ref.display = 'none';
      }

   }

}



function hideWindowStatus()
{
window.status='';
return true;
}

function showImage(title, filepath, width, height)
{

var xpos = 0;

   if (self.screen.width)
   {
   xpos = (self.screen.width / 2) - (width / 2);
   }

var query  = '?';
query += 'title=' + escape(title);
query += '&';
query += 'filepath=' + escape(filepath);
query += '&';
query += 'filewidth=' + escape(width);
query += '&';
query += 'fileheight=' + escape(height);

height += 30;

var the_window = window.open('image_preview.php' + query,'','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,left=' + xpos + ',top=100,screenX=' + xpos + ',screenY=100,width=' + width + ',height=' + height);

}