﻿function enLarges(pic, wdth, hght) {
  var divwdth = wdth + 5;
  var divhght = hght + 5;  
  var winL = (screen.width - 600) / 2;
  var winT = (screen.height - 400) / 2;  
  content = '<div id="showLrg" style="position:relative;cursor:pointer;left:' + winL + 'px;top:' + winT + ';width:' + divwdth + 'px;height:' + divhght + ';border-top: solid 2px #BBBBBB; border-left: solid 2px #BBBBBB; border-bottom: solid 2px #000000; border-right: solid 2px #000000; background: #666666; padding: 5px 5px 5px 5px;z-index:4;" ondbclick="hide();" onclick="hide();"><img src="' + pic + '" style="height:' + hght + 'px;width:' + wdth + 'px;border-top: solid 2px #000000;border-left: solid 2px #000000;border-right: solid 2px #BBBBBB;border-bottom: solid 2px #BBBBBB;"></div>';  
  document.getElementById('hiddenDiv').innerHTML = content;
  if (event.mousemove) {
    hide();
  }
}
function hide() {
  if (document.getElementById('showLrg')) {
    document.getElementById('showLrg').style.display = 'none';
  }
  else {
    return false;
  }
}
function showMedia(file) {
  var width = 800;
  var height = 600;
  var left = (screen.width - width) / 2;
  var top = (screen.height - height) / 2;
  var params = 'width=' + width + ', height=' + height;
  params += ', top=' + top + ', left=' + left;
  params += ', directories=no';
  params += ', location=no';
  params += ', menubar=no';
  params += ', resizable=no';
  params += ', scrollbars=no';
  params += ', status=no';
  params += ', toolbar=no';
  newwin = window.open(file, 'media01', params);
  if (window.focus) {
    newwin.focus();
  }  
  try {
    urchinTracker(file);
  }
  catch (err) {}
  return false;
}
function enLarge(AImgUrl, AWidth, AHeight) 
{
  var width = AWidth;
  var height = AHeight;
  var left = (screen.width - width) / 2;
  var top = (screen.height - height) / 2;
  var params = 'width=' + width + ', height=' + height;
  params += ', top=' + top + ', left=' + left;
  params += ', directories=no';
  params += ', location=no';
  params += ', menubar=no';
  params += ', resizable=no';
  params += ', scrollbars=no';
  params += ', status=no';
  params += ', toolbar=no';
  newwin = window.open(AImgUrl, 'media01', params);
  if (window.focus) {
    newwin.focus();
  }  
  return false;
}
function ResetListElements(AElementArray) {
  for (var i = 0; i < AElementArray.length; i++)
  {
    var objElement = document.getElementById(AElementArray[i]); 
    if (objElement) {
      objElement.className = '';          
    }
  }
}    
function ResetContentElements(AElementArray) {
  for (var i = 0; i < AElementArray.length; i++)
  {
    var objElement = document.getElementById(AElementArray[i]); 
    if (objElement) {                
      objElement.style.display = 'none';
    }
  }
}  
function DoUrchinTracker(AValue) {
  try {
    AValue = AValue.replace('#', '|');  
    urchinTracker(AValue);
  }
  catch(e) {} 
}
