function _gel(id){return document.getElementById(id)}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
	 var anchor = anchors[i];
	 if (anchor.getAttribute("href") &&
			 anchor.getAttribute("rel") == "external")
		 anchor.target = "_blank";
 }
}
/*
function activateMenu(nav) {
	if(document.all && document.getElementById(nav).currentStyle){  
		var navroot = document.getElementById(nav);
		var lis=navroot.getElementsByTagName("li");  
		for (i=0; i<lis.length; i++) {
			if(lis[i].lastChild.tagName=="ul"){
				lis[i].onmouseover=function() {	
					this.lastChild.style.display="block";
				}
				lis[i].onmouseout=function() {   
					this.lastChild.style.display="none";
				}
			}
		}
	}
}
*/
var vival,vch,vsh,vsp,vso;
function vscroll(){
	vsp=(vsp>=-vsh)?vsp-1:vch;
	vso.style.top=vsp+'px';
}

var hival,hcw,hsw,hsp,hso;
function hscroll(){
	hsp=(hsp>=-hsw)?hsp-1:hcw;
	hso.style.left=hsp+'px';
}

function init(){
	externalLinks();
//return;	

	if(_gel('hcontainer')!=undefined){
		hcw=_gel('hcontainer').offsetWidth;
		_gel('hcontainer').onmouseover=function(){clearInterval(hival)};
		_gel('hcontainer').onmouseout=function(){hival=setInterval('hscroll()',20)};
		hsp=hcw;
		hso=_gel('hscroller');
		hsw=hso.offsetWidth;
		hival=setInterval('hscroll()',20);
	}

	if(_gel('vcontainer')!=undefined){
		vch=_gel('vcontainer').offsetHeight;
		_gel('vcontainer').onmouseover=function(){clearInterval(vival)};
		_gel('vcontainer').onmouseout=function(){vival=setInterval('vscroll()',20)};
		vsp=vch;
		vso=_gel('vscroller');
		vsh=vso.offsetHeight;
		vival=setInterval('vscroll()',20);
	}
}

window.onload = init; 

