//TC-- the following site is where the history comes from: http://dhtmlnirvana.com/program/permalink/ajax_history.html 
//frames.asp and select.asp are also part of this. 
function framesManager()
{
    var args = framesManager.arguments;
    var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP"): new XMLHttpRequest();
    switch (args[0])
    {
        case "load_page":
            if (x)
            {
                x.onreadystatechange = function()
                {
                if (x.readyState == 4 && x.status == 200)
                    {
                    //TC-- sometimes onload will leave el null therefore I have it reload
                        el = document.getElementById(args[2]);
                        if (null == el)
                        {
                        setTimeout("framesManager('load_page', 'frame.asp?name='+i, 'contentrenderLYR')",10); 
                        }
                        el.innerHTML = x.responseText;
                        
                       
                  }
                }
                x.open("GET", args[1], true);
                x.send(null);
                
            }
            break;
    }
} 
 

 
 // fadein code
hex=255 // Initial color value.

function fadetext(){ 
  if(hex>0) { //If color is not black yet
    hex-=11; // increase color darkness
    document.getElementById("fac_cms").style.color=
                      "rgb("+hex+","+hex+","+hex+")";
    setTimeout("fadetext()",20); 
  }
  else
    hex=255 //reset hex value
}

//adjust iframe height to content
function autofitIframe(id){
if (!window.opera && !document.mimeType && document.all && document.getElementById){
parent.parent.document.getElementById(id).style.height=this.document.body.offsetHeight+"px";
}
else if(document.getElementById) {
parent.parent.document.getElementById(id).style.height=this.document.body.scrollHeight+"px"
}
}

