window["allLoaded"]=false
function loadDefs()
{
	window["current"]=document.getElementById("m1")
	window["useSub"]=false
	window["subCallerLink"]=''
	window["currentSub"]=''
	window["currentLinkInfo"]=null
	window["allLoaded"]=true
	window["hideEnabled"]=true
	window["ua"]=navigator.userAgent
	window["curChartPeriod"]="5MIN"
	window["curChartCurrency"]="EUR"
	if(document.getElementById("ratesWin"))  
		b=setTimeout('loadRates()',500)
}
function setSubCallerLink(o)
{
	window["subCallerLink"]=o
}
function showMenu(o)
{
	showMenu2(o,0,0,false,'')
}
function showMenu2(o,oLeft,oTop,subMenu,subMenuSuffix)
{
	if(!window["allLoaded"])return

	if (!subMenu)
	{
		hideMenu(o)
		window["current"]=o

		suff=''
		subMenuSuffix=''
		mWidth=0
	
	}else{
		window["useSub"]=true
		window["currentSub"]=document.getElementById(o.id+subMenuSuffix)
		suff='a'
		if(window["subVisible"])
			return;
		else
			window["subVisible"]=true
	}

	cTop=0
	cLeft=0
	
	if(window.opera)
	{
		pLeft=document.getElementById("mainBody").offsetLeft+o.parentElement.offsetLeft
		pTop=document.getElementById("tblBody").offsetTop+document.getElementById("startM").offsetTop+25
		cLeft=30
		cTop=1
	}else if(document.getElementById && (document.all==null)){

		cTop=17
		pLeft=o.offsetLeft
		pTop=o.offsetTop

	}else if(window["ua"].indexOf("Konqueror")>-1){

		pLeft=document.getElementById("mainBody").offsetLeft+o.parentElement.offsetLeft+document.getElementById("divBody").offsetLeft
		pTop=document.getElementById("tblBody").offsetTop+document.getElementById("startM").offsetTop+25
		cLeft=30
		cTop=17

	}else{

		cTop=17
		oRef=o
		pLeft=-3
		pTop=0
		while(oRef.offsetParent)
		{
			pTop=pTop+oRef.offsetTop
			pLeft=pLeft+oRef.offsetLeft
			oRef=oRef.offsetParent
		}

		if(pTop==176 || pTop==536) {cTop=3;}
	}

	langTopAdd=0
	cTop=cTop+langTopAdd
	mp1=document.getElementById("menuPop1"+suff)

	mps=document.getElementById("menuShade"+suff)
	mtxt=document.getElementById(o.id+subMenuSuffix+"txt")

	mtxt.style.width=mtxt.offsetWidth+5
	mp1.style.width=mtxt.offsetWidth+14
	mps.style.width=mp1.offsetWidth
	mp1.style.height=mtxt.offsetHeight+10
	mps.style.height=mp1.offsetHeight
	if (subMenu)
	{
		mWidth=document.getElementById("menuPop1").offsetWidth
		sCLT=window["subCallerLink"].offsetTop
		pLeft=pLeft+mWidth-1-5
		cTop=cTop+sCLT
	}

	mtxt.style.top=pTop+4+cTop+oTop
	mp1.style.top=pTop+cTop+oTop
	mps.style.top=mp1.offsetTop+5

	mtxt.style.left=pLeft+10+cLeft+oLeft
	mp1.style.left=pLeft+5+cLeft+oLeft
	mps.style.left=mp1.offsetLeft-5
}
function hideMenu(o)
{
	if(!window["allLoaded"] || !window["hideEnabled"])return
	hideLinkInfo()
	document.getElementById(window["current"].id+"txt").style.left=-500
	document.getElementById("menuPop1").style.left=-500
	document.getElementById("menuShade").style.left=-500

	document.getElementById(window["current"].id+"txt").style.top=-500
	document.getElementById("menuPop1").style.top=-500
	document.getElementById("menuShade").style.top=-500

	document.getElementById(window["current"].id+"txt").style.width=''
	hideSubMenu()
}
function hideSubMenu()
{
	if (window["useSub"] && window["subHide"])
	{
		document.getElementById("menuPop1a").style.left=-500
		document.getElementById("menuShadea").style.left=-500

		document.getElementById(window["currentSub"].id+"txt").style.left=-500

		document.getElementById(window["currentSub"].id+"txt").style.width=''
		window["useSub"]=false
		window["subVisible"]=false
	}
}
function disableSubHide(){
	at=setTimeout('window["subHide"]=true',500)
}
function sChP(per){window["curChartPeriod"]=per;setChart()}
function sChC(cur){window["curChartCurrency"]=cur;setChart()}
function setChart(){
	document.getElementById("mChPer").innerHTML=window["curChartPeriod"]
	document.getElementById("mChRate").innerHTML=window["curChartCurrency"]
	c=document.getElementById("imgChart")
	a="/activeX/getChart.asp?p="+window["curChartPeriod"]+"&c="+window["curChartCurrency"]
	b=setTimeout('c.src=a',10)
	setCookie('lastMiniChartC',window["curChartCurrency"],true)
	setCookie('lastMiniChartP',window["curChartPeriod"],true)
	hideMenu(this)
}
function loadRates()
{ 
	if(!document.getElementById("ratesWin")) return
}
function doneRates(r){
	if(!document.getElementById("ratesWin")) return
	document.getElementById("ratesWin").innerHTML=r
}
function showLinkInfo(o){
	if(window.opera) return
	else if(document.getElementById && (document.all==null)){
		cTop=17
	}else{cTop=0}

	hideLinkInfo()
	window["currentLinkInfo"]=o
	o.style.position="relative"
	lic=document.getElementById("linkInfo_"+o.id)
	o.style.zIndex=500		
	li=document.getElementById("linkInfo")
	lib=document.getElementById("linkInfoB")
	lis=document.getElementById("linkInfoS")
	li.style.width=lic.offsetWidth+20
	li.style.height=lic.offsetHeight
	lib.style.height=lic.offsetHeight+10
	li.style.left=o.offsetLeft-3
	lic.style.left=o.offsetLeft+7
	li.style.top=o.offsetTop-li.offsetHeight-5-23+cTop
	lic.style.top=o.offsetTop-li.offsetHeight-23+cTop
	lis.style.width=lib.offsetWidth
	lis.style.top=li.offsetTop-4
	lis.style.height=lib.offsetHeight
	lis.style.left=li.offsetLeft-4

	if(o.className=="superlink"){
		window["hideEnabled"]=false
		a=setTimeout("delayHideEnable()",10)
	}
}
function hideLinkInfo()
{
	if(window["currentLinkInfo"]!=null)
	{
		lic=document.getElementById("linkInfo_"+window["currentLinkInfo"].id)
		lis=document.getElementById("linkInfoS")
		window["currentLinkInfo"].style.zIndex=90
		li=document.getElementById("linkInfo")
		lic.style.left=-500
		li.style.top=-500
		li.style.left=-500
		lic.style.top=-500
		lis.style.left=-500
		lis.style.top=-500
	}
}
function delayHideEnable()
{
	window["hideEnabled"]=true
}
function doSearch()
{
	f=document.forms.searchForm
	f.searchString.value=document.getElementById("searchField").value
	filterStr=""+(document.getElementById("sfAbout").checked?"sf_About":"")
				+(document.getElementById("sfTrading").checked?"sf_Trading":"")
				+(document.getElementById("sfServices").checked?"sf_Services":"")
				+(document.getElementById("sfSupport").checked?"sf_Support":"")
	f.searchFilter.value=filterStr
	document.forms.searchForm.submit()
}
function showSearchOptions()
{
	document.getElementById("searchOptions").style.display="block"
}
function unchAll()
{
	document.getElementById("sfAll").checked=false
}
function setCookie(sName, sValue,d)
{
	if(d) {e="expires=Mon, 1 Dec 2008 23:59:59 UTC;path=/"}
	else {e="expires=Mon, 1 Dec 2008 23:59:59 UTC;path=/"}
	document.cookie = sName + "=" + escape(sValue) + "; " + e
}
function getCookie(sName)
{
	var aCookie = document.cookie.split("; ");
	for (var i=0; i < aCookie.length; i++)
	{
		var aCrumb = aCookie[i].split("=");
		if (sName == aCrumb[0]) 
			return unescape(aCrumb[1]);
	}
	return null;
}
function popWin(wPage,wName,wParam){
	w = window.open(wPage, wName,wParam);
	w.focus()
	return w;
}
function scrollLeftUp()
{
   st=document.getElementById("docBody").scrollTop
   return (st>200?st-200:0);
}
function ug()
{
	w = window.open("/eng/ug/frames2.htm", "UserGuide","status=yes,resizable=yes,scrollbars=yes");
	w.focus();
}
function doNothing()
{
}
function setTopLocation()
{
	var listener = document.getElementById('listener');
	if (listener != null) 
	{
		listener.src = listener.src + "&location=" + top.location;
	}
}