    if (!document.getElementById && document.all) {    
    document.getElementById = new Function('id', 'return document.all[id]')    
    }    

  function getDiv(divID,oDoc) {
      if( !oDoc ) { oDoc = document; }
      if( document.layers ) {
          if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
              for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
                  y = getRefToDiv(divID,oDoc.layers[x].document); }
              return y; } }
      if( document.getElementById ) {
          return document.getElementById(divID); }
      if( document.all ) {
          return document.all[divID]; }
      return false;
  }

function getX(obj){return( obj.offsetParent==null ? obj.offsetLeft : obj.offsetLeft+getX(obj.offsetParent) );}
function getY(obj){return( obj.offsetParent==null ? obj.offsetTop : obj.offsetTop+getY(obj.offsetParent) );}
  function swapimg(s,c) {
    getDiv(s).src = c
  } 