var _$elemCache = new Object();
function $(id, reload) {if(!_$elemCache[id]||reload){var e = document.getElementById(id);_$elemCache[id] = e;return e;} else return _$elemCache[id];}
function x$(id){_$elemCache[id]=null;}
function $$(id){return $(id,true)}
function _pos(e,m){if(!m)m={x:0,y:0};var x=0,y=0;while(e){x+=e.offsetLeft;y+=e.offsetTop;try{e=e.offsetParent;}catch(ex){e=null;}}return{x:x+m.x,y:y+m.y};}
function _modpos(p,t) {return {x:(p?p.x:NaN)+(t?t.x:0),y:(p?p.y:NaN)+(t?t.y:0)};}
function _cpos(d) {var vp=_vp();return {x:((vp.w/2)-(d?d.w/2:0)+vp.x), y:((vp.h/2)-(d?d.h/2:0)+vp.y),w:(d?d.w:NaN),h:(d?d.h:NaN)};}
function _dim(e){e=_c(e);return (!e||!e.offsetWidth)?{w:0,h:0}:{w:e.offsetWidth,h:e.offsetHeight};};
function _absolute(e){e=_c(e);if(!e||!e.style||e.style.position=='absolute')return;var p=_pos(e);var w=e.clientWidth;var h=e.clientHeight;e.style.position='absolute';e.style.left=p.x+'px';e.style.top=p.y+'px';}

function _c(e){return e;}
function _hide(e){e=_c(e);if(e&&e.style){e.style.display='none';e.style.visibility='hidden';}}
function _show(e){e=_c(e);if(e&&e.style){e.style.visibility='visible';e.style.display='block';}}
function _moveTo(e,p){e=_c(e);if(!e||!e.style||!p)return;if((typeof p)=='string')p=$(p);if(p.x==null&&p.y==null)p=_pos(p);if(p.x!=null)e.style.left=p.x+'px';if(p.y!=null)e.style.top=p.y+'px';}
function _moveBy(e,t){e=_c(e);if(!e||!e.style||!t)return;var p=_pos(e);e.style.left=(t.x+p.x)+'px';e.style.top=(t.y+p.y)+'px';}
function _resize(e,d){e=_c(e);if(!e||!e.style||!d)return;if(d.w!=null)e.style.width=d.w+'px';if(d.h!=null)e.style.height=d.h+'px';}
function _mimic(e,t){_moveTo(t,e);_resize(t,_dim(e));}


var isIE = false;
var req;
function loadDoc(url) {
	try {
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", url, true);
        req.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        isIE = true;
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", url, true);
            req.send();
        }
    }
  } catch(e) {}
}
function processReqChange() {
	  try {
	    if (req.readyState == 4) {
	        if (req.status == 200) {
	            loadContent();
	         }
	    }
    } catch(e) {}
}

function loadContent() {
	  try {
			document.getElementById('content-div').innerHTML = req.responseText;
		} catch(e) {}
}

