	

window["allLoaded"]=false
	 function loadDefs(){
	  window["chatPosOriginal"]=true
	  window["xLeftScrollingDiv"]=document.getElementById("leftMenuScrollingDiv")
      window["leftMenuLowest"]=document.getElementById("leftMenuLowestPoint")
	  window["current"]=document.getElementById("mm1")
	  window["useSub"]=false
	  window["subCallerLink"]=''
	  window["currentSub"]=''
	  window["currentLinkInfo"]=null
	  window["allLoaded"]=true
	  window["hideEnabled"]=true
	  window["ua"]=navigator.userAgent
	  window["isFF"]=(document.getElementById && !document.all)
	  window["curChartPeriod"]="5MIN"
	  window["curChartCurrency"]="EUR"
	  
	  if(document.getElementById("ratesWin"))  
	  	b=setTimeout('loadRates()',500)
		
	  //window.onscroll = repositionLeftScroller;
	 }
	 function setSubCallerLink(o)
	 {
		window["subCallerLink"]=o
	 }
	 function showMenu(o){
	  
	  showMenu2(o,0,0,false,'')

	 }
	 function showMenu2(o,oLeft,oTop,subMenu,subMenuSuffix){
	    hideMenu(o)
	    window["current"]=o
	    document.getElementById(o.id).style.backgroundColor="#4e848e"
	    return;
	  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

	  	cTop=61
	  	pWidth=o.offsetWidth
		pLeft=o.offsetLeft
		pTop=o.offsetTop

	  cTop=cTop
	  mp1=document.getElementById("menuPop1"+suff)
		
	  mps=document.getElementById("menuShade"+suff)
	  mtxt=document.getElementById(o.id+subMenuSuffix+"txt")
	  
	  mtxt.style.width=pWidth+"px"
	  mp1.style.width=pWidth+"px"
	  mps.style.width=pWidth+"px"
	  mp1.style.height=mtxt.offsetHeight+"px"
	  mps.style.height=mp1.offsetHeight+"px"
	  if (subMenu)
	  {
	  	mWidth=document.getElementById("menuPop1").offsetWidth
		sCLT=window["subCallerLink"].offsetTop
		pLeft=pLeft+mWidth-1-5
		cTop=cTop+sCLT
	  }
	 
	  mtxt.style.top=pTop+cTop+oTop+"px"
	  mp1.style.top=pTop+cTop+oTop+"px"
	  mps.style.top=mp1.offsetTop+"px"
	  
	  document.getElementById("topLine_"+o.id).className="topMnuLineA"
	  document.getElementById(o.id).style.backgroundColor="#4e848e"
	  
	  mtxt.style.left=pLeft+cLeft+oLeft+"px"
	  mp1.style.left=pLeft+cLeft+oLeft+"px"
	  mps.style.left=mp1.offsetLeft+"px"
	  
	 }

	 function hideMenu(o){
      hChMenu()
      
	  if(!window["allLoaded"] || !window["hideEnabled"])return
	  hideLinkInfo()
	  
	  
	  ////document.getElementById(window["current"].id+"txt").style.left="-500px"
	  ////document.getElementById("menuPop1").style.left="-500px"
	  ////document.getElementById("menuShade").style.left="-500px"
	  
	  document.getElementById(window["current"].id+"txt").style.top="-1500px"
	  document.getElementById("menuPop1").style.top="-1500px"
	  document.getElementById("menuShade").style.top="-1500px"
	  
	  document.getElementById("topLine_"+window["current"].id).className="topMnuLine"
	  document.getElementById(window["current"].id).style.backgroundColor=""
	  
	  document.getElementById(window["current"].id+"txt").style.width=''
	  
	 	hideSubMenu()
	 }
	 function hideSubMenu(){
	 	
		if (window["useSub"] && window["subHide"])
		
	 	{
		////document.getElementById("menuPop1a").style.left="-500px"
	  	////document.getElementById("menuShadea").style.left="-500px"
		
		////document.getElementById(window["currentSub"].id+"txt").style.left="-500px"
		
		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)
	  

	  
	 }
	 
	 function loadRates()
	 { 
	 
	 }
	 
	 function doneRates(r){
	 
	 }
	 
		
	 function showLinkInfo(o)
	{
		showLinkInfoA(o,"t")
	}
	 function showLinkInfoA(o,p){
	    tAdd=0
	    cTop=0
	    
	 	/*
	 	if(window.opera) return
	 	else if(document.getElementById && (document.all==null)){
	  		cTop=17
		}else{cTop=0}
        */
	 	hideLinkInfo()
	 	window["currentLinkInfo"]=o
		lic=document.getElementById("linkInfo_"+o.id)
		o.style.position="relative"
		
		
	 	o.style.zIndex=500
	    
		li=document.getElementById("linkInfo")
		lib=document.getElementById("linkInfoB")
		lis=document.getElementById("linkInfoS")
		li.style.width=lic.offsetWidth+20+"px"
		li.style.height=lic.offsetHeight+"px"
		if (p=="b")
	        tAdd=li.offsetHeight+27
		lib.style.height=lic.offsetHeight+10+"px"
		lib.style.width=lic.offsetWidth+20+"px"
		li.style.left=o.offsetLeft-3+"px"
		lic.style.left=o.offsetLeft+7+"px"
		
		li.style.top=o.offsetTop-li.offsetHeight+cTop-27+tAdd+"px"
		lic.style.top=o.offsetTop-li.offsetHeight+cTop-5+tAdd+"px"
		lis.style.width=lib.offsetWidth+"px"
		lis.style.top=li.offsetTop-4+tAdd+"px"
		lis.style.height=lib.offsetHeight+"px"
		lis.style.left=li.offsetLeft-4+"px"
		
	    
		lib.style.display="block"

		if(o.className=="superLink"){
			window["hideEnabled"]=false
			a=setTimeout("delayHideEnable()",10)
		}
	 }
	 function hideLinkInfo(){
		
	 	if(window["currentLinkInfo"]!=null)
			{
			window["currentLinkInfo"].innerHTML=window["currentLinkInfo"].innerHTML
	 		lic=document.getElementById("linkInfo_"+window["currentLinkInfo"].id)
			lis=document.getElementById("linkInfoS")
			window["currentLinkInfo"].style.zIndex=1
			li=document.getElementById("linkInfo")
			lic.style.left=-500+"px"
			li.style.top=-1500+"px"
			li.style.left=-500+"px"
			lic.style.top=-1500+"px"
			lis.style.left=-500+"px"
			lis.style.top=-1500+"px"
			window["currentLinkInfo"]=null
			}
	 }
	 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/support/userguide/content/frames2.htm", "UserGuide","status=yes,resizable=yes,scrollbars=yes");
		w.focus()
				}

function wr() {
		w=window.open('/eng/applications/live/other/loadapp.asp','withdraw','width=700,height=600,scrollbars=yes,toolbar=yes');
		w.focus()
				}
							
function cb() {
		w = window.open("/eng/about/brochure1.pdf", "Brochure","status=yes,resizable=yes,scrollbars=yes");
		w.focus()
				}
				
function cpass() {
		w = window.open("/eng/applications/live/other/loadappcp.asp", "Password","status=yes,resizable=yes,scrollbars=yes,menubar=yes");
		w.focus()
				}
				
function cretrieve() {
		w = window.open("/eng/applications/live/other/loadappidr.asp", "IDRetrieve","status=yes,resizable=yes,scrollbars=yes,menubar=yes");
		w.focus()
				}
				
function ctransfer() {
		w = window.open("/eng/applications/live/other/loadapptf2.asp", "FundsTransfer","status=yes,resizable=yes,scrollbars=yes,menubar=yes");
		w.focus()
				}
				
function cmoa() {
		w = window.open("/eng/applications/live/other/loadappmoasub2.asp", "MOA","status=yes,resizable=yes,scrollbars=yes,menubar=yes");
		w.focus()
				}
				
		
function hasInvalidLetter(v,textType)
{
	validTextLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 _&'.,-\/"
	validUsernameLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_"
	validEmailLetters="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890_.@-"
	if(textType=="TEXT")
		valid=validTextLetters
	else if(textType=="USERNAME")
		valid=validUsernameLetters
	else if(textType=="EMAIL")
		valid=validEmailLetters
	
	var badLetter
	badLetter=false
	for(i=0;i<v.length;i++)
	{
		ch=v.charAt(i)
		if(valid.indexOf(ch)==-1)
			{
			badLetter=true
			if(badLetter)
				return true
			}
	}

}

function enableLargeFonts(ena){
	u=document.URL
	if(u.indexOf('?')==-1)
		u=u+'?a=none'
	
	if(ena)
		{window.location=u+'&large=true'}
	else
		{window.location=u+'&large=false'}

}


function rtOver(r)
{
    document.getElementById("ri"+r).className="riImgO"
    document.getElementById("tr"+r).style.backgroundColor="white"
}
function rtOut(r)
{
    document.getElementById("ri"+r).className="riImg"
    document.getElementById("tr"+r).style.backgroundColor=""
}
function cRatesSH()
{
    c=document.getElementById("crossRates").style.display
    
    d=(c=="none")?"block":"none"
    document.getElementById("crossRates").style.display=d
}

function wFlash(o,p,h,w,trans)
{
    p2=p
    if(p.toUpperCase().indexOf('.SWF?')==-1)
        p2=p+'.swf?'
        
    if (trans) 
        t='<param name="wmode" value="transparent">'
    else
        t=''
    txt='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" WIDTH='+w+' HEIGHT='+h+'>'+t+'<PARAM NAME=movie VALUE="'+p2+'&a=1&lang=chs"><PARAM NAME=quality VALUE=high><EMBED src="'+p2+'&a=1&lang=chs" quality=high WIDTH='+w+' HEIGHT='+h+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>'  
    o.innerHTML=txt
    o.style.backgroundImage="url('"+p+".gif')"
}

function wFlash2(o,p,h,w,trans)
{
    p2=p
    if(p.toUpperCase().indexOf('.SWF?')==-1)
        p2=p+'.swf?'
    if (trans) 
        t='<param name="wmode" value="transparent">'
    else
        t=''
        
    txt='<object type="application/x-shockwave-flash" width='+w+' height='+h+' wmode="transparent" data="'+p2+'&a=1&lang=chs"><param name="movie" value="'+p2+'&a=1&lang=chs" /><param name="wmode" value="transparent" /></object>'
    o.innerHTML=txt
}


function popJavaChart(cur,inter)
{
    popWin('/_apps/javacharts/jc_mg.asp?cur='+cur+'&i='+inter,'jc'+cur,'width=700,height=620,resizable=yes')
}
function shChMenu(o)
{
    hChMenu()
    chM=document.getElementById(o.id+"txt")
    chM.style.left=o.offsetLeft+"px"
    chM.style.top=o.offsetTop+14+"px"

}
function hChMenu()
{
    ////document.getElementById("mChRatetxt").style.left="-500px"
    document.getElementById("mChRatetxt").style.top="-1500px"
    ////document.getElementById("mChPertxt").style.left="-500px"
    document.getElementById("mChPertxt").style.top="-500px"

}

function repositionLeftScroller()
    {   
        if (!window["allLoaded"]) return
         scTop=(window["isFF"]?window.pageYOffset:window["xLeftScrollingDiv"].offsetParent.scrollTop)
        if(scTop>window["leftMenuLowest"].offsetTop)
            window["xLeftScrollingDiv"].style.top=scTop-window["leftMenuLowest"].offsetTop+"px"
        else
            window["xLeftScrollingDiv"].style.top=0
        repositionChatLink()
    }

    function repositionChatLink()
    {
        if (!window["allLoaded"]) return
            
            chatDiv=document.getElementById("chatSupportDIV")
            chatDivLow=document.getElementById("chatSupportDIVLowerTarget")
            
            if(chatPosOriginal)
            {
                scTop=(window["isFF"]?window.pageYOffset:chatDiv.offsetParent.scrollTop)
                if(scTop>chatDiv.offsetTop)
                {
                    chatDivLow.innerHTML=chatDiv.innerHTML
                    chatDiv.style.height=chatDiv.offsetHeight+"px"
                    chatDiv.innerHTML=""
                    chatPosOriginal=false
                }
            }
            else
            {
                scTop=(window["isFF"]?window.pageYOffset:chatDiv.offsetParent.scrollTop)
                if(scTop<chatDiv.offsetTop)
                {
                    chatDiv.innerHTML=chatDivLow.innerHTML      
                    chatDivLow.innerHTML=""
                    chatPosOriginal=true
                }
            }
    }