function element(id) {
  if (document.getElementById != null) {
   // Works for most, but not N4 or IE4
   return document.getElementById(id);
  } else if (document.all != null) {
   // Only works in all IE
   return document.all[id];
  } else if (document.layers != null) {
   // Works only in N4
   return document.layers[id];
  } else {
   // If we get here, browser isn't JS/CSS/DOM complitant at all!
   return null;
  }
}
    
/* Variables 
var fade_duration = 0.2; // Length of time to fade in/out of popups (in seconds)
var x_close = 0.4; // Length of time to fade out popups when X is clicked (in seconds)
var mode_switch = 450; // Length of time of fade in/out for mode switch (in miliseconds)
var highlight_fadeout = 1; // Lenhth of time of fade out for a row highlight (in seconds)
var building_number_array = new Array(80,130);*/
    
/* Display Gallery Tag DIV 
function displayTag(divtag,linktext,cnt) {
  if (element(divtag).style.display != "none") {
    new Effect.BlindUp(divtag, {duration:fade_duration});
    element(linktext).innerHTML = "<a href=\"javascript:displayTag('tag_"+cnt+"','show_tag_"+cnt+"');\">Tag</a>";
  } else {
    new Effect.BlindDown(divtag, {duration:fade_duration});
    element(linktext).innerHTML = "<a href=\"javascript:displayTag('tag_"+cnt+"','show_tag_"+cnt+"');\">Tag</a>";
  }
}*/


/* clear a div */
function clearDiv(divtag){
	element(divtag).innerHTML = "";
}

/* hide a div */
function hideDiv(divtag){
	element(divtag).style.display = "none";
}