
 function isdefined(Id) {
  var o = document.getElementById(Id);
  if (o) {
 	return true; }
  else {
  	return false; }  
}
 function showAnonymousComment() {
     var anonymous = document.getElementById("anonymousCommentId");
     var introduce = document.getElementById("introduceId");
     anonymous.style.display="";
     introduce.style.display="none";
 }
 
function Panel(panelName) {
  this.activePanel = 0;
  this.panelName = panelName;
}

Panel.prototype.showPanel = function (panelId) {
  if (this.activePanel == panelId) return true;
  try {
    active = document.getElementById(this.panelName + this.activePanel);
    called = document.getElementById(this.panelName + panelId);
    active.style.display = "none";
    called.style.display = "block";
    this.activePanel = panelId;
  } catch(e) {}
}

// Login Modal Window Functions
function toggleOverlay(height, overflow){
  htm = document.getElementsByTagName('html')[0];
  htm.style.height = height;
  htm.style.overflow = overflow; 
} 
function showLoginOverlay() {
  target = document.getElementById("login_overlay");
  target.style.display = "block";
  toggleOverlay('100%', "hidden");
  try {
    document.getElementById("FlashPlayer").style.visibility = "hidden";
  } catch(e) {}
} 
function hideLoginOverlay() {
  target = document.getElementById("login_overlay");
  target.style.display = "none";
  toggleOverlay('', "auto");
  try {
    document.getElementById("FlashPlayer").style.visibility = "visible";
  } catch(e) {}
}

function toggleDisplay(dropdownId) {
  dropdown = document.getElementById(dropdownId);
  if (dropdown.style.display != "block")
    dropdown.style.display = "block";
  else
    dropdown.style.display = "none";
}
            
function updateCSS(theClass, element, value) {
 var cssRules;
 if (document.all) {
  cssRules = 'rules';
 }
 else if (document.getElementById) {
  cssRules = 'cssRules';
 }
 for (var i = 0; i < document.styleSheets.length; i++){
  for (var j = 0; j < document.styleSheets[i][cssRules].length; j++) {
   if (document.styleSheets[i][cssRules][j].selectorText == theClass) {
    document.styleSheets[i][cssRules][j].style[element] = value;
   }
  }
 }  
}