  function getElement(aID)
    {
        return (document.getElementById) ?
            document.getElementById(aID) : 

document.all[aID];
    }

    function getIFrameDocument(aID){ 
        var rv = null; 
        var frame=getElement(aID);
        // if contentDocument exists, W3C compliant (e.g. Mozilla) 
        if (frame.contentDocument)
            rv = frame.contentDocument;
        else // bad Internet Explorer  ;)
            rv = document.frames[aID].document;
        return rv;
    }

    function adjustMyFrameHeight()
    {
        var frame = getElement("ifwherecan");
        var frameDoc = getIFrameDocument("ifwherecan");
        frame.height = frameDoc.body.offsetHeight;      
      
   
    }
    
    function loading()
    {

    document.getElementById("divloading").innerHTML = "<img src='images/loader.gif' alt='loading' />"
//    var windowHeight = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
//    var h = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
//    var windowWidth = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth;
//    var IpopTop = ((windowHeight - document.getElementById("divloading").offsetHeight) / 2);
//    document.getElementById("divloading").style.top = ((IpopTop + h) + 100) + 'px';
    document.getElementById("divloading").style.left = ((document.body.clientWidth / 2)-100) + 'px';
    document.getElementById("divloading").style.display = "block";
    //var t=setTimeout("unloading()",40000);
    }
    
    function unloading()
    {     
        document.getElementById("divloading").innerHTML = "";
        document.getElementById("divloading").style.display = "none"; 
    }
