moz = document.all?false:true

function o(id, isArray) {
  if (isArray == true) {
    objArray = new Array()
    elems = document.getElementsByTagName("*")
    for (idx=0; idx<elems.length; idx++)
      if (elems[idx].id == id)
        objArray[objArray.length] = elems[idx]
    return objArray
  } else if (isArray == 3) { // Prefix
    objArray = new Array()
    elems = document.getElementsByTagName("*")
    for (idx=0; idx<elems.length; idx++)
      if (elems[idx].id.substring(0, id.length) == id)
        objArray[objArray.length] = elems[idx]
    return objArray
  } else
    return document.getElementById(id)
}

// This function is to change the font-size according to the area width
// NOTE: the area (obj), you should define the WIDTH and font-size
function changeFontSize(obj) {
  if (o(obj)) {
    boxWidth_O = parseInt(o(obj).style.width)
    boxWidth_N = parseInt(o(obj).offsetWidth)
    boxHeight_O = parseInt(o(obj).style.height)
    boxHeight_N = parseInt(o(obj).offsetHeight)
    boxFontSize = parseInt(o(obj).style.fontSize)
    if (boxWidth_O != "" && boxWidth_O != "NaN" && 
        boxWidth_N != "" && boxWidth_N != "NaN" && 
        boxFontSize != "" && boxFontSize != "NaN" && 
        (boxWidth_N > boxWidth_O || boxHeight_N > boxHeight_O)) {      
      o(obj).style.fontSize = (boxFontSize - 1) + "pt"
      changeFontSize(obj)
    }
  }
}
// Call this function and put in the object ID
//setTimeout("changeFontSize('edir_name')", 500)

function openPage(obj) {
  obj.href = obj.getAttribute("myhref")
}

function flashObj(destId, url, objId, width, height) {
  html = "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "
  html+= "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\" "
  html+= "WIDTH=\""+width+"\" HEIGHT=\""+height+"\" id=\""+objId+"\"> "
  html+= "<PARAM NAME=movie VALUE=\""+url+"\"> "
  html+= "<PARAM NAME=quality VALUE=high> "
  html+= "<PARAM NAME=bgcolor VALUE=#FFFFFF> "
  html+= "<EMBED src=\""+url+"\" " 
  html+= "quality=high bgcolor=#FFFFFF WIDTH=\""+width+"\" HEIGHT=\""+height+"\" "
  html+= "NAME=\""+objId+"\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" "
  html+= "PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED></OBJECT>"
  o(destId).innerHTML = html
}