var xCoords=0;
var yCoords=0;
if (navigator.appName == "Netscape") {
   document.captureEvents(Event.CLICK);
}
document.onclick=captureCoords;

function captureCoords(e)
{
   if (navigator.appName == "Microsoft Internet Explorer"){
      xCoords = event.clientX;
      yCoords = event.clientY;
   }
   else {
      xCoords = e.pageX;
      yCoords = e.pageY;
   }
}
function expandCreditsNS(objShowCredits, lngImageOID, lngPortfolioOID){
   var scrWidth,scrY,scrLength,yWin;
   scrWidth = (window.screen.width-200);
   yWin= yCoords+ 60;
   scrLength = (window.screen.height/2);
   scrY = scrLength-100;
   
   if (yCoords < scrLength){ 
      
      var newWin = window.open("PopupCredits.asp?eCI=" + EncodeString(lngImageOID) + "&eP=" + EncodeString(lngPortfolioOID), "Spot", "width=180,height=300,screenX="+ scrWidth + ",screenY=" +yWin+ ",top=" +yWin+",left=" + scrWidth);
   }
   else
   {     
     
     var newWin = window.open("PopupCredits.asp?eCI=" + EncodeString(lngImageOID) + "&eP=" + EncodeString(lngPortfolioOID), "Spot", "width=180,height=300,screenX=" + scrWidth + ",screenY=" +scrY+ ",top=" +scrY+ ",left=" +scrWidth);
   }
   newWin.focus();
}  

function expandCredits(objShowCredits){
   d = document;
   layer1 = "";    
  
   if(d.getElementById)
      layer1 = d.getElementById(objShowCredits);
   else 
      return 1;

   if(layer1.style.display == "" ) 
   {
      layer1.style.display = "none";
   } 
   else 
   {
      layer1.style.display = "";
   }
}