/* HiddenField V2.0
Copyright 2006 Intellitech Enterprises. More info available at
http://www.intellitechent.com */


function doRevealLink(ID, clickType, username, location) {
  var rtn = true;
  if(showObject(clickType + 'Val' + ID)) {
    rtn = false;
    hideObject(clickType + 'Link' + ID);
    showObject(clickType + 'Label' + ID);
    logClick(ID, clickType, username, location);
  }
  return rtn;
}

function getObject(objID) {
  if (document.all) {
    var obj = document.all[objID];
  }
  else if (document.getElementById) {
    var obj = document.getElementById(objID);
  }
  return obj;
}

function hideObject(objID) {
  var obj = getObject(objID);
  var rtn = false;
  if (obj != null) {
    obj.style.display = "none";
    rtn = true;
  }
  return rtn;
}

function showObject(objID) {
  var obj = getObject(objID);
  var rtn = false;
  if (obj != null) {
    obj.style.display = "inline";
    obj.style.position = "static";
    obj.style.width = "auto";
    obj.style.height = "auto";
    obj.style.overflow = "visible";
    rtn = true;
  }
  return rtn;
}

function logClick(ID, clickType, username, location) {
  var img = new Image();
//  var d = new Date();
  var s_clickBase = "http://www.dentistwizard.com/cgi-bin/dentists/HiddenField.cgi";
  img.src = s_clickBase + "?LinkID=" + ID + "&Type=" + clickType + "&UserName=" + username + "&Location=" + location;
}
