function openWindow(url) 
{
   window.open("pic.aspx?link=" + url ,"", "resizable=no,menubar=no,toolbar=no,status=no,scrollsbars=no,location=no,width=640,height=480");
}
 
function openSlideshowWindow(id) 
{
   window.open("show.aspx?id=" + id ,"", "resizable=no,menubar=no,toolbar=no,status=no,scrollsbars=no,location=no,width=640,height=480");
}

function addLeadingZeros(num, size) 
{    
   num += "";
   while (num.length<size) 
      num = "0" + num; 
   return num;
}


function resize()
{
   if(document.getElementById('picture'))
   {
      var imgWinW=eval("document.getElementById('picture').width+0");
      var imgWinH=eval("document.getElementById('picture').height+0");
      if(!document.all)
      {
         imgWinH = imgWinH + 25
      }
      if(window.setResizable) 
         window.setResizable(true);window.resizeTo(imgWinW, imgWinH);
         
      if (window.setResizable) 
      {
         window.setResizable(window.saveResizable);
      }
      
      if(window.document.body && (window.document.body.clientWidth!=imgWinW || window.document.body.clientHeight!=imgWinH)) 
      {
         window.resizeTo(2*imgWinW-window.document.body.clientWidth,2*imgWinH-window.document.body.clientHeight);
      }
   }
}


function goLite(FRM,BTN)
{
   window.document.forms[FRM].elements[BTN].style.color = "#ff0000";
   window.document.forms[FRM].elements[BTN].style.backgroundColor = "#EEEEEE";
   window.document.forms[FRM].elements[BTN].style.borderColor = "#999999";
}

function goDim(FRM,BTN)
{
   window.document.forms[FRM].elements[BTN].style.color = "#000000";
   window.document.forms[FRM].elements[BTN].style.backgroundColor = "#EEEEEE";
   window.document.forms[FRM].elements[BTN].style.borderColor = "#BBBBBB";
}
