
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 addOnLoad(func)
{       
		var oldonload = window.onload;
		
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				oldonload();
				func();
			}  
	}
}

addOnLoad(externalLinks);




function showPhoto(imgUrl) {
	$('gallery_photo_container').innerHTML = "<img src=\""+imgUrl+"\" alt=\"\" />";
}   




var tid;
function showLayer()
{	
	if (tid) {  clearTimeout(tid)};
	document.getElementById('extra_top_menu').style.display = "block";        
}

function hideLayer(layerName) {
	document.getElementById('extra_top_menu').style.display = "none";
}
function off() {
	hideLayer('extra_top_menu');
}
function to() {
	tid = setTimeout("off()",500);
}


function overLayer() {		
	off(); 	
	showLayer();	
}
