function fx_changeSource(name,newsrc)
{
   var img = document.getElementById(name);
   if (img != null)
      img.src = newsrc;
}

function fx_changeTextDecoration(name,newValue)
{
   var img = document.getElementById(name);
   if (img != null)
      img.style.textDecoration = newValue;
}

function fx_changeBackgroundColor(name,newValue)
{
   var img = document.getElementById(name);
   if (img != null)
      img.style.backgroundColor = newValue;
}

// changes the height of the iframe to match the height of its content
function fx_autosizeFrame(frame)
{
   if (frame == null)
      return;

   if (frame.contentWindow) // IE style
      frame.height = frame.contentWindow.document.body.scrollHeight;
   else if (frame.contentDocument) // FireFox style
      frame.height = frame.contentDocument.body.scrollHeight;
}

function fx_focus(w)
{
   if (!w)
      w = self;

   if (w.focus)
      w.focus();
}

function fx_close(w)
{
   if (!w)
      w = self;

   w.opener = self;
   w.close();
}

function fx_redirect(url, w)
{
   if (!w)
      w = self;

   if (w.location.replace)
       w.location.replace(url);
   else
       w.location.href = url;
}


function fx_write(id)
{
   if (window.attachEvent)
   {
      var elem = document.getElementById(id);
      if (elem)
         document.write(elem.innerHTML);
   }
}