function aPicClick(idx) {
	return wndPics.load(a_links[idx].href);
}

startList = function() {
if (document.getElementById) {
	navRoot = document.getElementById("submenu");
	if (navRoot) {
	for (i=0; i<navRoot.childNodes.length; i++) {
		node = navRoot.childNodes[i];
		if (node.nodeName=="LI" && node.childNodes[2]) {
			childUL = node.childNodes[2];
			for (m=0; m<childUL.childNodes.length; m++) {
				litem = childUL.childNodes[m];		
				if (litem.className != "catpdf" && litem.className != "info" && litem.nodeName == "LI") {
					if (litem.childNodes[0].nodeName=="A") {
						litem.onmouseover = function() {
							window.status=this.childNodes[0].href;
							this.childNodes[0].className += " over";
							if (isie) {this.className+=" hover";}
						}
						litem.onmouseout = function() {
							if (isie) {this.className=this.className.replace(" hover","");}
							this.childNodes[0].className=this.childNodes[0].className.replace(" over", "");
							window.status="";
						}
						litem.onclick = function() {
							document.location = this.childNodes[0].href;
						}
					}
				}
			}
			if (isie) {
			node.onmouseover=function() {
				this.childNodes[2].style.position='absolute';
				lf = this.parentNode.offsetWidth + 51 - this.offsetLeft;
				tp = this.parentNode.offsetHeight - 1;
				this.childNodes[2].style.left='-'+lf+'px';
				this.childNodes[2].style.top=tp;
				this.className="over";
			}
			node.onmouseout=function() {
				this.className="main";
			}}
		}
	}}
}
}

var a_links, ticker, imagefolder, imgw, imgh;
window.onload = function () {
	MM_preloadImages('ui/feat-idioma-big.gif',
					 'ui/feat-gansolandia-big.gif',
					 'ui/feat-catalogo-big.gif',
					 'ui/feat-boletin-big.gif',
					 'ui/feat-asistencia-big.gif');

	startList();

	wndPics = new xWindow('_hinpic', 640, 480, 150, 150, 0, 0, 1, 1, 0, 0);

	a_links = document.getElementsByTagName("a");
	for (i=0;i<a_links.length;i++) {
		if (a_links[i].className == "picture" || a_links[i].className == "pic-arrow") {
			eval("addEvent(a_links[i], 'click', function (){return aPicClick("+i+");})");
		}
	}

	ticker = document.getElementById('ticker');
	if (ticker) ticker.originalContents = ticker.innerHTML;
	var lang='/',docurl='';
	docurl = document.location + '';
	if (docurl.indexOf('/es/')) {
		lang = '/es/';
	} else if (docurl.indexOf('/en/')) {
		lang = '/en/';
	}
	
	imagefolder = lang+'syspax/ui/thisFolder.php';
	imagefolder = imagefolder.replace('thisFolder.php', '');
	imgw = '87'; imgh = '63';
	

	
	addEvent(document.getElementById('feat-gansolandia'), 'mouseover', featgansolandiaOver);
	addEvent(document.getElementById('feat-gansolandia'), 'mouseout', featAllOut);
	
}


function featgansolandiaOver() {
	clearTimeout(timer);
	ticker.innerHTML = '<img height="'+ imgh +'" width="'+ imgw +'" alt="Visitar Gansolandia" src="' + imagefolder + 'feat-gansolandia-big.gif" /><br />Gansolandia';
	running = false;
}


running = false;
var timer;
function featAllOut() {
	if (running) {
		ticker.innerHTML = ticker.originalContents;
   		running = false;
   	} else {
	    timer = setTimeout("featAllOut()", 1000);
	    running = true;
	}
}