function Browser(){
	var ua = navigator.userAgent.toLowerCase(); 
	this.Gecko = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
	this.Safari = (ua.indexOf('safari') != - 1);
	this.IE = (ua.indexOf('msie') != -1 && !this.Opera && (ua.indexOf('webtv') == -1) ); 
	this.Mozilla = (this.Gecko && ua.indexOf('gecko/') + 14 == ua.length);
	this.Firefox = ( (ua.indexOf('firebird/') != -1) || (ua.indexOf('firefox/') != -1) );
	this.NS = ( (this.Gecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && !this.Opera && !this.Safari && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
	this.IECompatible = ( (ua.indexOf('msie') != -1) && !this.IE);
	this.NSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.NS && !this.Mozilla);
	this.geckoVersion = ( (this.Gecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
	this.equivalentMozilla = ( (this.Gecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
	this.versionMinor = parseFloat(navigator.appVersion); 
	if (this.Gecko && !this.Mozilla) this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
	else if (this.Mozilla) this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
	else if (this.IE && this.versionMinor >= 4) this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
	else if (this.Safari) this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
	this.versionMajor = parseInt(this.versionMinor); 
	this.DOM1 = (document.getElementById);
	this.DOM2Event = (document.addEventListener && document.removeEventListener);
	this.mode = document.compatMode ? document.compatMode : 'BackCompat';
	this.Win = (ua.indexOf('win') != -1);
	this.Mac = (ua.indexOf('mac') != -1);
	this.NS6x = (this.NS && this.versionMajor == 6);
	this.NS6up = (this.NS && this.versionMajor >= 6);
	this.NS7up = (this.NS && this.versionMajor >= 7);
	this.IE4 = (this.IE && this.versionMajor == 4);
	this.IE5 = (this.IE && this.versionMajor == 5);
	this.IE55 = (this.IE && this.versionMinor == 5.5);
	this.IE5up = (this.IE && this.versionMajor >= 5);
	this.IE6x = (this.IE && this.versionMajor == 6);
	this.IE6up = (this.IE && this.versionMajor >= 6);
}
var is = new Browser();

var flashVersion = 0;
function getFlashVersion() {
	var latestFlashVersion = 20;
	var agent = navigator.userAgent.toLowerCase(); 
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object'){ 
			for (var i = latestFlashVersion; i >= 3; i--){
				if (flashPlugin.description.indexOf(i + '.') != -1){
	               flashVersion = i;
	               break;
	            }
			}
		}
	}
	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
		var doc = '<scr' + 'ipt language="VBScript"\> \n';
		doc += 'On Error Resume Next \n';
		doc += 'Dim obFlash \n';
		doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
		doc += '	Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
		doc += '	If IsObject(obFlash) Then \n';
		doc += '		flashVersion = i \n';
		doc += '		Exit For \n';
		doc += '	End If \n';
		doc += 'Next \n';
		doc += '</scr' + 'ipt\> \n';
		document.write(doc);
	} else {flashVersion = flashVersion_DONTKNOW; }
return flashVersion;
}
flashVersion_DONTKNOW = -1;
function FlashObject(){
	this.maxVersion;
	this.SwfFile;
	this.minVersion;
	this.altSwfFile;
	this.altImage;
	this.altImageAddAtribute;
	this.altImageHTML;
	this.width;
	this.height;
	this.menu;
	this.background;
	this.wmode;
	this.clientFlashVersion;
}
FlashObject.prototype.rnd=function(){
	this.ranNum= Math.random()*255;
    return this.ranNum;
}
FlashObject.prototype.reEmbed=function(){
	this.embed(true);
}

FlashObject.prototype.embed=function(reEmbed){
	var buff;
	if(!reEmbed){
		this.clientFlashVersion = getFlashVersion();
	}

	if(this.clientFlashVersion>=this.maxVersion){
		buff=''+
			'<OBJECT ID="FLASHWINDOW" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.SwfFile+'?'+this.rnd()+'"><PARAM NAME=menu VALUE='+this.menu+'><param name="wmode" value="'+this.wmode+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="'+this.background+'">'+
				'<EMBED src="'+this.SwfFile+'?'+this.rnd()+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality="high" bgcolor="'+this.background+'"  WIDTH="'+this.width+'" HEIGHT="'+this.height+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'+
			'</OBJECT>';
	}else if((this.clientFlashVersion> this.minVersion) && (this.clientFlashVersion< this.maxVersion) && this.altSwfFile){
		alert("0");
		buff=''+
			'<OBJECT ID="FLASHWINDOW" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.altSwfFile+'?'+this.rnd()+'"><PARAM NAME=menu VALUE='+this.menu+'<param name="wmode" value="'+this.wmode+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE='+this.background+'>'+
				'<EMBED src="'+this.altSwfFile+'?'+this.rnd()+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality=high bgcolor='+this.background+'  WIDTH='+this.width+' HEIGHT='+this.height+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'+
			'</OBJECT>';
	}else{
		this.altImageAddAtribute ? (buff='<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" '+this.altImageAddAtribute+' />'+this.altImageHTML) : (buff='<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" />');
	}
	if(!reEmbed)
		document.write(buff);
	else
		document.getElementById("movie").innerHTML = buff;
}

function init(){
	if (!document.getElementsByTagName) return;
	imgArray = document.getElementsByTagName("img");
		for (i=0;i<imgArray.length;i++){
			if(imgArray[i].alt!=-1) imgArray[i].title=imgArray[i].alt;
		}
	aArray = document.getElementsByTagName("a");
		for (i=0;i<aArray.length;i++){
			if(aArray[i] && aArray[i].href && !aArray[i].title && aArray[i].childNodes[0])	aArray[i].title = aArray[i].childNodes[0].nodeValue;
		}
}

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 PopItUp(src,w,h,s,r) {
	(s)?(w=w+17):w;
	(!r)?(r=0):(r=1);
	Popwin = window.open(src,"popwin","width=" + w + ",height=" + h + ",location=0,directories=0,status=1,scrollbars="+s+",menubar=0,resizable=1,copyhistory=0");
	Popwin.focus();
	return false;
}
function PopItUpTrue(src,w,h,s,r) {
	(s)?(w=w+17):w;
	(!r)?(r=0):(r=1);
	Popwin = window.open(src,"popwin","width=" + w + ",height=" + h + ",location=0,directories=0,status=1,scrollbars="+s+",menubar=0,resizable=1,copyhistory=0");
	Popwin.focus();
}

function getUrl(obj){
	selectedObj=obj.options[obj.selectedIndex];
	document.location.href=selectedObj.value;
	return true;
}

function preload() {
	for(j=1;j<=4;j++){
		for (i=1;i<=2;i++) {
			x=new Image();
			x.src='i/tm_0'+j+'_0'+i+'.gif';
		}
	}
}

function MagicTab(menuObj, maindivID, subdivID, language){
	this.menuObj=menuObj;
	this.maindivID=maindivID;
	this.subdivID=subdivID;
	this.MenuData=new Array;
	this.tabImgPrefix="tm_";
	this.SubMenuData=new Array;
	this.firstActive=-1;
	this.SubMenuData;
	this.activeTabIndex;
	this.subOldIndex=-1;
	this.subIndex=-1;
	this.overClass;
	this.outClass;
	this.timer;
	this.mainDiv=this.getID(this.maindivID);
	this.subDiv=this.getID(this.subdivID);
	this.language = language;
	this.iFolder="/i/menu/";
}
MagicTab.prototype.getID=function(id){
	return document.getElementById(id);
}
MagicTab.prototype.ShowActiveTab=function(){
	if( this.firstActive!=-1){
		this.getID((this.subdivID+"ul"+this.firstActive)).className="show";
		this.getID((this.tabImgPrefix+"0"+this.firstActive)).src=this.iFolder+this.tabImgPrefix+'0'+(this.firstActive+1)+'_02.gif';
	}
}
MagicTab.prototype.SetActiveTab=function(){
	if( this.firstActive!=-1){
		this.TabTimer=setTimeout(this.menuObj+".ShowActiveTab("+this.firstActive+")",401);
	}
}
MagicTab.prototype.ClearActiveTab=function(){
	if( this.firstActive!=-1){
		this.getID((this.subdivID+"ul"+this.firstActive)).className="";
		this.getID((this.tabImgPrefix+"0"+this.firstActive)).src=this.iFolder+this.tabImgPrefix+'0'+(this.firstActive+1)+'_01.gif';
	}	
}
MagicTab.prototype.buildSubmenu=function(k){
	var subMenuDataLength=this.SubMenuData[k].length;
	var subMenuCont;
	var submenutmp="";


	var newDiv2 = document.createElement("div");
	newDiv2.setAttribute("id", "ScrollArea");
	newDiv2.setAttribute("style", "float:left;overflow:hidden; width:886px; height:18px; top:0px; position:relative; padding-top:0px; margin-right:10px;");


	var newDiv3 = document.createElement("div");
	newDiv3.setAttribute("id", "ScrollboxArea");
	newDiv3.setAttribute("style", "float:left;position:relative; left:0px;top:0px;");





	if(is.IE){
		submenutmp +='<ul id="'+this.subdivID+'ul'+k+'" onmouseover="'+this.menuObj+'.showSubMenu('+k+');">';
		if (k == 1)
		{
			submenutmp +='<div id="img_scroll_left" style="display:none;"><img src="/i/scroll_left.gif" alt="" onmousedown="fast()" onmouseup="slow()" onmouseover="scrollHDS(0)" onmouseout="pause()" /></div>';
			submenutmp +='<div id="ScrollArea" style="float:left;overflow:hidden; width:886px; height:18px; top:0px; position:relative; padding-top:0px; margin-right:10px; "><div id="ScrollboxArea" style="float:left;position:relative; left:0px;top:0px;">';
		}
	}else{
		var newUL = document.createElement("ul");
			newUL.setAttribute("id", this.subdivID+"ul"+k)
			newUL.setAttribute("onmouseover", this.menuObj + ".showSubMenu("+k+")");
		if (k == 1)
		{
			var newDiv1 = document.createElement("div");
			newDiv1.setAttribute("id", "img_scroll_left");
			var newImg1 = document.createElement("img");
			newDiv1.style.display = "none";
			newImg1.setAttribute("src", "/i/scroll_left.gif");
			newImg1.setAttribute("onmousedown", "fast()");
			newImg1.setAttribute("onmouseup", "slow()");
			newImg1.setAttribute("onmouseover", "scrollHDS(0)");
			newImg1.setAttribute("onmouseout", "pause()");
			newDiv1.appendChild(newImg1);
			newUL.appendChild(newDiv1);




			//newDiv2.appendChild(newDiv3);

		}
	}
	for(i=0;i<subMenuDataLength;i++){
		var subMenuCont=new Array();
			subMenuCont=this.SubMenuData[k][i].split("|");

			if(is.IE){
				if ((k == 0) && (i==1))
				{
					var str = subMenuCont[1].substr(1,(subMenuCont[1].length));
					submenutmp +='<li onmouseover="'+this.menuObj+'.showSub('+k+');subMenuShow();" onmouseout="subMenuClose();"><a href="'+subMenuCont[1]+'"';
					if (subMenuCont[i] == window.location.href)
					{
						submenutmp +=' style="color:#DC3C52;"';
					}

					var subpages1 = ["how_to_apply.html","how_to_repay.html","security.html","tariffs.html","comfort_instalment.html"]
					for (h=0;h<=subpages1.length;h++)
					{
						if (window.location.href == "http://"+window.location.hostname+"/retail_banking/credit_cards/"+subpages1[h])
						{
							submenutmp +='style="color:#DC3C52;"';
						}
					}

					submenutmp +='">'+subMenuCont[0]+'</a></li>';
					
				}
				else
				{

					var str = subMenuCont[1].substr(1,(subMenuCont[1].length));
					submenutmp +='<li onmouseover="'+this.menuObj+'.showSub('+k+')"><a href="'+subMenuCont[1]+'"';
					if ("http://"+window.location.hostname+str == window.location.href)
					{
						submenutmp +='style="color:#DC3C52;"';
					}
					submenutmp +='>'+subMenuCont[0]+'</a></li>';
					
				}	
			}
			else{
					var newLI = document.createElement("li");
				if ((k == 0) && (i==1))
				{
						newLI.setAttribute("onmouseover", this.menuObj + ".showSub("+k+");subMenuShow();");
						newLI.setAttribute("onmouseout","subMenuClose();");
				}
				else 
				{
						newLI.setAttribute("onmouseover", this.menuObj + ".showSub("+k+")");
				}
				var newA = document.createElement("a");
					newA.setAttribute("href",subMenuCont[1]);
				var newText = document.createTextNode(subMenuCont[0]);
					
					newA.appendChild(newText);
					if(newA == window.location.href){
						newA.style.color = "#DC3C52";
					}

					if ((k == 0) && (i==1))
					{
						var subpages1 = ["how_to_apply.html","how_to_repay.html","security.html","tariffs.html","comfort_instalment.html"]
						for (h=0;h<=subpages1.length;h++)
						{
							if (window.location.href == "http://"+window.location.hostname+"/retail_banking/credit_cards/"+subpages1[h])
							{
								newA.style.color = "#DC3C52";
							}
						}
					}


					newLI.appendChild(newA);
				if (k == 1)
				{
					newDiv3.appendChild(newLI);
				}
				else
				{
					newUL.appendChild(newLI);
				}

			}
	}
	if(is.IE){
		if (k == 1)
		{
			submenutmp +='</div></div><div id="img_scroll_right"><img src="/i/scroll_right.gif" alt="" onmousedown="fast()" onmouseup="slow()" onmouseover="scrollHDS(1)" onmouseout="pause()"  /></div>';
		}
		submenutmp +="</ul>"
		this.subDiv.innerHTML += submenutmp;

	}else{
		if (k == 1)
		{
			newDiv2.appendChild(newDiv3);
			newUL.appendChild(newDiv2);

			var newDiv4 = document.createElement("div");
			newDiv4.setAttribute("id", "img_scroll_right");
			var newImg2 = document.createElement("img");
			newImg2.setAttribute("src", "/i/scroll_right.gif");
			newImg2.setAttribute("onmousedown", "fast()");
			newImg2.setAttribute("onmouseup", "slow()");
			newImg2.setAttribute("onmouseover", "scrollHDS(1)");
			newImg2.setAttribute("onmouseout", "pause()");
			newDiv4.appendChild(newImg2);

			newUL.appendChild(newDiv4);
		}
		this.subDiv.appendChild(newUL);
	}




}
MagicTab.prototype.Build=function(){
	var MenuDataLength=this.MenuData.length;
	var MenuCont;
	var menutmp="";
	var i;

	if(is.IE){
		menutmp += "<ul>";
	}else{
		var newUL = document.createElement("ul");
	}
	for (i=0;i<MenuDataLength;i++){
		var MenuCont=new Array();
			MenuCont=this.MenuData[i].split("|");
			
			if(is.IE){
				//if(i>0)
					menutmp +='<li><a href="'+MenuCont[2]+'" onmouseover="'+this.menuObj+'.showSubMenu('+i+');"  onmouseout="'+this.menuObj+'.hideSubMenu('+i+');"><img id="'+this.tabImgPrefix+'0'+i+'" src="'+MenuCont[0]+'" alt="'+MenuCont[1]+'" /></a></li>';
				//else
					//menutmp +='<li><a onmouseover="'+this.menuObj+'.showSubMenu('+i+');"  onmouseout="'+this.menuObj+'.hideSubMenu('+i+');"><img id="'+this.tabImgPrefix+'0'+i+'" src="'+MenuCont[0]+'" alt="'+MenuCont[1]+'" /></a></li>';
			}
			else{
				var newLI = document.createElement("li");
				var newA = document.createElement("a");
				var newIMG = document.createElement("img");
				newIMG.setAttribute("src", MenuCont[0]);
				newIMG.setAttribute("alt", MenuCont[1]);
				newIMG.setAttribute("title", MenuCont[1]);
				newIMG.setAttribute("id", this.tabImgPrefix+"0"+i);
				newIMG.setAttribute("onmouseover", this.menuObj + ".showSubMenu("+i+")");
				newIMG.setAttribute("onmouseout", this.menuObj + ".hideSubMenu("+i+")");
				newA.appendChild(newIMG);
				//if(i>0)
				newA.setAttribute("href",MenuCont[2]);
				newA.setAttribute("onmouseover", this.menuObj + ".showSubMenu("+i+")");
				newLI.appendChild(newA);
				newUL.appendChild(newLI);
			}
			this.buildSubmenu(i);
	}
	if(is.IE){
		menutmp +="</ul>"
		this.mainDiv.innerHTML += menutmp;
	}else{
		this.mainDiv.appendChild(newUL);
	}
	if( this.firstActive!=-1) this.ShowActiveTab(this.firstActive);
}
MagicTab.prototype.showSub=function(i){
	clearTimeout(this.timer);
	clearTimeout(this.TabTimer);
	if(i!=this.firstActive){
		this.ClearActiveTab();
	}
	this.getID((this.subdivID+'ul'+i)).className="show";
}

MagicTab.prototype.showSubMenu=function(i){
	clearTimeout(this.timer);
	if (this.subOldIndex>-1 && this.subOldIndex!=i) this.hideSub(this.subOldIndex);
	this.getID((this.tabImgPrefix+"0"+i)).src=this.iFolder+this.tabImgPrefix+'0'+(i+1)+'_02.gif';
	this.showSub(i);
}
MagicTab.prototype.hideSub=function(i){
	this.getID((this.subdivID+"ul"+i)).className="";
	this.getID((this.tabImgPrefix+"0"+i)).src=this.iFolder+this.tabImgPrefix+'0'+(i+1)+'_01.gif';
}
MagicTab.prototype.hideSubMenu=function(i){
	//this.timer=setTimeout(this.menuObj+".hideSub("+i+")",400);
	//this.SetActiveTab();
	this.subOldIndex=i;
}

//window.onload = function() {
//	preload();
//	init();
//	externalLinks();
//	topmenu.Build();

//			if (typeof sIFR == "function") {
//				sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"/swf/Futura_Bk_BT.swf", sWmode:"transparent", sColor:"#027DA2", sLinkColor:"#FFFFFF", sHoverColor:"#FFFFFF", sFlashVars:""}));
//			}

//	initHDS();
//	SubMenuKaydir();
//}


function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function () {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}

addLoadEvent(function () {
    preload();
    init();
    externalLinks();
    topmenu.Build();

    if (typeof sIFR == "function") {
        sIFR.replaceElement(named({ sSelector: "h1", sFlashSrc: "/swf/Futura_Bk_BT.swf", sWmode: "transparent", sColor: "#027DA2", sLinkColor: "#FFFFFF", sHoverColor: "#FFFFFF", sFlashVars: "" }));
    }

    initHDS();
    SubMenuKaydir();

});

function mailTo(m,e) {
	if (!e) {
		e='dexia.com';
	}
	
	
	document.write('<a href="mailto:'+m+String.fromCharCode(64)+e+'">'+m+String.fromCharCode(64)+e+'</a>');
}

function subMenuShow(){
	document.getElementById('subMenu2').style.display = "block";
}
function subMenuClose(){
	document.getElementById('subMenu2').style.display = "none";
}
function subMenuScrollShow(scrollNode1){
	if(scrollNode1 == 1){
		document.getElementById('img_scroll_left').style.display = "block";
	}else {
		document.getElementById('img_scroll_right').style.display = "block";
	}
}
function subMenuScrollHide(scrollNode2){
	if(scrollNode2 == 1){
		document.getElementById('img_scroll_right').style.display = "none";
	}else {
		document.getElementById('img_scroll_left').style.display = "none";
	}
}




netscape = "";
ver = navigator.appVersion; 
len = ver.length;
for(iln = 0; iln < len; iln++) 
	if (ver.charAt(iln) == "(") 
		break;
netscape = (ver.charAt(iln+1).toUpperCase() != "C");

function keyDown(DnEvents) { // handles keypress
	// determines whether Netscape or Internet Explorer
	k = (netscape) ? DnEvents.which : window.event.keyCode;
	if (k == 13) { // enter key pressed
		//document.getElementById("_ctl0:submitBtnOnMain").click();
		if (ChangeAcikDeniz()){
			document.getElementById("_ctl0:submitBtnOnMain").click();
			__doPostBack('_ctl0$submitBtnOnMain','');
			return true;
		}
		else
			return false;
	}
}
if (netscape) 
	document.captureEvents(Event.KEYDOWN|Event.KEYUP);




function DivGosterGizle(img_id,div_id,img) {
    if (document.getElementById) {
    
        if (document.getElementById(div_id).style.display == "")
        {
            document.getElementById(div_id).style.display = "none";
            document.getElementById(img_id).src = '/i/ico_plus_'+ img +'.gif';
	    } else {
            document.getElementById(div_id).style.display = "";
            document.getElementById(img_id).src = '/i/ico_minus_'+ img +'.gif';
	    }
	    
    }
}



/*****   *****/

LeftPx = 0
spacerWidth=10
defaultSpeed=5
maxSpeed=50
totalWidth=1400

displayWidth=0
displayHeight=0
step=defaultSpeed

function initHDS(){
displayBox=document.getElementById("ScrollArea")
displayWidth=886

displayHeight=18
scrollBox=document.getElementById("ScrollboxArea")


scrollBox.style.width=totalWidth+"px"
}

leftTimer=""
function scrollHDS(n){

clearTimeout(leftTimer)
var scrollBoxPos=parseInt(scrollBox.style.left)
if(n==1){
scrollBoxPos-=step
}
else{
scrollBoxPos+=step

}

scrollBox.style.left=scrollBoxPos+"px"
leftTimer=setTimeout("scrollHDS("+n+")",20)
subMenuScrollShow('1');

if(n==1&&scrollBoxPos<= -(totalWidth-displayWidth)+(spacerWidth)){
scrollBox.style.left=-(totalWidth-displayWidth)+(spacerWidth)+"px"
clearTimeout(leftTimer)
subMenuScrollHide('1');
}else {
subMenuScrollShow('1');
subMenuScrollShow('0');
}

if(n==0&&scrollBoxPos> 0-step){
scrollBox.style.left=0
clearTimeout(leftTimer)
subMenuScrollHide('0');
subMenuScrollShow('0');
}
}

function fast(){
step=maxSpeed
}

function slow(){
step=defaultSpeed
}

function pause(){
clearTimeout(leftTimer)
}


function DivOpenMe(div_id) {
    if (document.getElementById) {
		document.getElementById("title_mi_russian").style.display = "none";
    	document.getElementById("title_mi_world").style.display = "none";

		document.getElementById("table_mi_russian").style.display = "none";
    	document.getElementById("table_mi_world").style.display = "none";

		document.getElementById("title_"+div_id).style.display = "";
		document.getElementById("table_"+div_id).style.display = "";
    }
}


function DivMyHistory(div_id) {
    if (document.getElementById) {
		document.getElementById("Div2000").style.display = "none";
    	document.getElementById("Div1990").style.display = "none";
		document.getElementById("Div1980").style.display = "none";
    	document.getElementById("Div1950").style.display = "none";
    	document.getElementById("Div1900").style.display = "none";
    	document.getElementById("Div1850").style.display = "none";

		document.getElementById(div_id).style.display = "";
    }
}

function ChangeService(div_id) {
    if (document.getElementById) {
		document.getElementById("DivRetail").style.display = "none";
    	document.getElementById("DivCorporate").style.display = "none";
		document.getElementById("DivFinancialInstitutions").style.display = "none";

		document.getElementById(div_id).style.display = "";
    }
}


function SubMenuKaydir() 
{
	scrollBox.style.left=LeftPx+"px"
	if (LeftPx < 0)
	{
		document.getElementById('img_scroll_left').style.display = "block";
	}


}

function baseDomainString(){
  e = document.domain.split(/\./);
  if(e.length > 1) {
    //return("domain=" + e[e.length-2] + "." +  e[e.length-1]) + ";"  ;
    return e;
  }else{
    return("");
  }
}


function changeLang(){
var lnkk = window.location.href;
//var hashes = window.location.hostname;
var keyy = document.location.href.search("russian/")>0?"":"/russian";

var dizi = lnkk.split('/');

var url1 = dizi[0]+"/"+dizi[1]+"/"+dizi[2];
var url2 = "";
 
     for(var i=3;i<dizi.length;i++) {
	 var url2 = url2 + "/" +dizi[i];
	 }

var url = url1 + keyy + url2 ;

return url;


}


