var bleft=130;
var btop=102;
var speed=3;

var ie=document.all;
var dom=document.getElementById;

function slidein(lang1, lang2)
{
	document.getElementById('extlink').innerHTML = '<a href="javascript:slideout(\''+lang1+'\',\''+lang2+'\');" class="searchboxtxt">'+lang1+'</a>';
	
	if (!dom&&!ie)
		return

	crossboxcover=(dom)?document.getElementById("extendedboxcover") : document.all.extendedboxcover
	crossbox=(dom)?document.getElementById("extendedbox"): document.all.extendedbox

	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset

	crossbox.height=crossbox.offsetHeight
	crossboxcover.style.height=parseInt(crossbox.height)+"px"
	crossbox.style.top=crossbox.height*(-1)+"px"
	crossboxcover.style.left=bleft+"px"
	crossboxcover.style.top=btop+"px"
	crossboxcover.style.visibility=(dom||ie)? "visible" : "show"
	
	start=setInterval("sin()",5)
}

function sin()
{
	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset

	if (parseInt(crossbox.style.top)<0)
	{
		crossboxcover.style.top=scroll_top+btop+"px"
		crossbox.style.top=parseInt(crossbox.style.top)+speed+"px"
	}
	else
	{
		clearInterval(start)
		crossbox.style.top=0
	}
}

function slideout(lang1, lang2)
{
	document.getElementById('extlink').innerHTML = '<a href="javascript:slidein(\''+lang1+'\',\''+lang2+'\');" class="searchboxtxt">'+lang2+'</a>';
	
	if (!dom&&!ie)
		return

	crossboxcover=(dom)?document.getElementById("extendedboxcover") : document.all.extendedboxcover
	crossbox=(dom)?document.getElementById("extendedbox"): document.all.extendedbox
	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
	crossbox.height=crossbox.offsetHeight
	
	end=setInterval("sout()",5)
}

function sout()
{
	if (window.start) 
		clearInterval(start)

	scroll_top=(ie)? truebody().scrollTop : window.pageYOffset

	if (parseInt(crossbox.style.top)>-70)
	{
		crossboxcover.style.top=btop+"px"
		crossbox.style.top=parseInt(crossbox.style.top)-speed+"px"
	}
	else
	{
		clearInterval(end)
		crossboxcover.style.visibility=(dom||ie)? "hidden" : "hidden"
	}
}

function truebody()
{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function tableruler()
{
	if (document.getElementById && document.createTextNode)
	{
		var tables=document.getElementsByTagName('table');
		for (var i=0;i<tables.length;i++)
		{
			if(tables[i].className=='subframe')
			{
				var trs=tables[i].getElementsByTagName('tr');
				for(var j=0;j<trs.length;j++)
				{
					if(trs[j].className=='ochosen')
					{
						trs[j].onmouseover=function(){this.className='ochosenr';return false}
						trs[j].onmouseout=function(){this.className='ochosen';return false}
					}
					else if(trs[j].className=='bchosen')
					{
						trs[j].onmouseover=function(){this.className='bchosenr';return false}
						trs[j].onmouseout=function(){this.className='bchosen';return false}
					}
					else if(trs[j].className=='nchosen')
					{
						trs[j].onmouseover=function(){this.className='nchosenr';return false}
						trs[j].onmouseout=function(){this.className='nchosen';return false}
					}
					else
					{
						trs[j].onmouseover=function(){this.className='ruled';return false}
						trs[j].onmouseout=function(){this.className='';return false}
					}
				}
			}
		}
	}
}

function createBookmarkLink(website, title)
{
	url = "http://" + website;

	if (window.sidebar)
	{
		window.sidebar.addPanel(title, url, "");
	}
	else if ( window.external )
	{
		window.external.AddFavorite( url, title);
	}
	else if (window.opera && window.print)
	{
		return true;
	}
}

function normal()
{
	document.getElementById("EUMAP").style.cursor='default';
}

function pointer()
{
	document.getElementById("EUMAP").style.cursor='pointer';
} 
