function toggleLayer( whichLayer )
{

  var elem, vis, linkObj;

  if( document.getElementById ) { // this is the way the standards work
  
      elem = document.getElementById( whichLayer );
      linkObj = document.getElementById('sh-link');
  } 
  
  else if( document.all ) { // this is the way old msie versions work
      elem = document.all[whichLayer];
      linkObj = document.all('sh-link');
  }    
  
  else if( document.layers ) { // this is the way nn4 works
      elem = document.layers[whichLayer];
      linkObj = document.layers('sh-link');  
  }
  
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
  
  // fix the text in the link
  if (vis.display.indexOf('block') > -1)
  {
  	linkObj.innerHTML = '[-] Hide Details';
  }
  else
  {
  	linkObj.innerHTML = '[+] Show Details';
  }
  
}

function newWindow(PicId,Id,IdName,Table,ImageField,MaxLen,Path,AllowGif,StoreWH){

	newWin = window.open('uploadPhoto-multiple-1.asp?PicId=' + PicId + '&Id=' + Id + '&IdName=' + IdName + '&Table=' + Table + '&ImageField=' + ImageField + '&MaxLen=' + MaxLen + '&Path=' + Path + '&AllowGif=' + AllowGif + '&StoreWH=' + StoreWH,'newItemWindow','width=520,height=370,toolbar=no,location=no,scrollbars=no')

}

function newWindowOld(PicId,Id,IdName,Table,ImageField,MaxLen,Path,AllowGif,StoreWH){

	newWin = window.open('uploadPhoto.asp?PicId=' + PicId + '&Id=' + Id + '&IdName=' + IdName + '&Table=' + Table + '&ImageField=' + ImageField + '&MaxLen=' + MaxLen + '&Path=' + Path + '&AllowGif=' + AllowGif + '&StoreWH=' + StoreWH,'newItemWindow','width=420,height=280,toolbar=no,location=no,scrollbars=no')

}