var myOrientArr = new Array();

function Browser(){
	var ua = navigator.userAgent.toLowerCase(); 
	this.Gecko = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
	this.Safari = (ua.indexOf('safari') != - 1);
	this.Opera = (ua.indexOf('opera') != - 1);
	this.IE = (ua.indexOf('msie') != -1 && !this.Opera && (ua.indexOf('webtv') == -1) ); 
	this.Firefox = ( (ua.indexOf('firebird/') != -1) || (ua.indexOf('firefox/') != -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.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 = 25;
	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'+
			'On Error Resume Next \n'+
			'Dim obFlash \n'+
			'For i = ' + latestFlashVersion + ' To 3 Step -1 \n'+
			'	Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n'+
			'	If IsObject(obFlash) Then \n'+
			'		flashVersion = i \n'+
			'		Exit For \n'+
			'	End If \n'+
			'Next \n'+
			'</scr' + 'ipt\> \n';
		document.write(doc);
	} else {flashVersion = flashVersion_DONTKNOW; }
return flashVersion;
}
var flashVersion_DONTKNOW = -1;
function FlashObject(){
	this.ID=this.ID;
	this.maxVersion=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.flashvars;
	this.scale;
	this.salign;
}
FlashObject.prototype.rnd=function(){
	this.ranNum= Math.random()*255;
    return this.ranNum;
}
FlashObject.prototype.embed=function(){
	var buff;
	if(getFlashVersion()>=this.maxVersion){
		
		buff=''+
			'<OBJECT ID="'+this.ID+'" 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+'"><PARAM NAME=menu VALUE='+this.menu+'><param name="wmode" value="'+this.wmode+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="flashvars" VALUE="'+ this.flashvars +'"><PARAM NAME="bgcolor" VALUE="'+this.background+'"><PARAM NAME="scale" VALUE="'+this.scale+'"><PARAM NAME="salign" VALUE="'+this.salign+'">'+
				'<EMBED flashvars="'+ this.flashvars +'" name="'+this.ID+'" src="'+this.SwfFile+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality="high" bgcolor="'+this.background+'"  WIDTH="'+this.width+'" HEIGHT="'+this.height+'" scale="'+this.scale+'" salign="'+this.salign+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swLiveConnect="true"></EMBED>'+
			'</OBJECT>';
	}else if((getFlashVersion()> this.minVersion) && (getFlashVersion()< this.maxVersion) && this.altSwfFile){
		
		buff=''+
			'<OBJECT ID="'+this.ID+'" 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+'"><PARAM NAME=menu VALUE='+this.menu+'<param name="wmode" value="'+this.wmode+'">><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE='+this.background+'>'+
				'<EMBED flashvars="'+ this.flashvars +'" name="'+this.ID+'" src="'+this.altSwfFile+'" 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" swLiveConnect="true"></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" />');
	}
	document.write(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 extWin(src){
	ExtWin = window.open(src);
	ExtWin.focus();
	return false;
}

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.href && anchor.rel == "external" ){
			anchor.target="_blank";
		}
	}
}

function getCenter(pwidth,pheight){
	wwidth=screen.width;
	wheigth=screen.height;
	lpos= (wwidth - pwidth)/2;
	tpos= (wheigth - pheight)/2;
	return lpos, tpos;
}


function PopItUp(src,w,h,s) {
	if(s) w=w+17;
	getCenter(w,h);
	Popwin = window.open(src,"pop_up","toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=1, copyhistory=0");
	Popwin.focus();
	//return false;
}
function PopItUp_kobi(src,w,h,s) {
	if(s) w=w+17;
	getCenter(w,h);
	Popwin = window.open(src,"pop_up","toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=0, copyhistory=0");
	Popwin.focus();
	//return false;
}

function PopItUpReturn(src,w,h,s) {
	if(s) w=w+17;
	getCenter(w,h);
	Popwin = window.open(src,"pop_up","toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=0, copyhistory=0");
	Popwin.focus();
	return false;
}


function PopItUpReturn2(src,tit,w,h,s) {
	if(s) w=w+17;
	getCenter(w,h);
	Popwin = window.open(src,tit,"toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=0, copyhistory=0");
	Popwin.focus();
	return false;
}


function PopItUpReklam(src,tit,w,h,s) {
	if(s) w=w+17;
	getCenter(w,h);
	Popwin = window.open(src,tit,"toolbar=0,width=" + w + ", height=" + h + ", left="+ lpos +", top="+ tpos +"; location=0, directories=0, status=1, scrollbars="+s+", menubar=0, resizable=0, copyhistory=0");
	window.location.reload( true );
	Popwin.focus();
	return false;
}





function getWindowHeight(){
	var windowHeight = 0;
	if(typeof(window.innerHeight) == 'number'){
		windowHeight = window.innerHeight;
	}else{
		if(document.documentElement && document.documentElement.clientHeight){
			windowHeight = document.documentElement.clientHeight;
		}else{
			if(document.body && document.body.clientHeight){
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}


function setFooter(){
	if (document.getElementById){
		var windowHeight = getWindowHeight();
		if (windowHeight>0){
			var contentHeight = document.getElementById('wrapper').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight)>= 0) {
				footerElement.style.marginTop = (windowHeight - (contentHeight+footerHeight)) + 'px';
			}else{
				footerElement.style.marginTop = '0';
			}
		}
	}
}



window.onload = function() {
	init();
	externalLinks();
	setFooter();
}

window.onresize = function() {
	setFooter();
}

function mailTo(m,e) {
	if (!e) {
		e='hsbc.com.tr';
	}
	
	
	document.write('<a href="mailto:'+m+String.fromCharCode(64)+e+'">'+m+String.fromCharCode(64)+e+'</a>');
}


function setSearchTxt(mytxtObj,statu){	
	if(!mytxtObj._defaultValue) {
			mytxtObj._defaultValue = mytxtObj.value;
	}	
	if (statu==1){
		if (mytxtObj.value==''){
			mytxtObj.value=mytxtObj._defaultValue;
		}
	}
	else{
		if (mytxtObj.value == mytxtObj._defaultValue){
			mytxtObj.value = '';
		}
	}
	
}

function $(_id){return document.getElementById(_id);}

function topMenuSelecter(selectLink){
	mySelectedLink = "http://" + window.location.hostname + selectLink	
	myMenu= $("tmenu").getElementsByTagName("ul");
	if (myMenu.length>0){
		myMenuList = myMenu[0].getElementsByTagName("li")
		for (var i=0;i<myMenuList.length;i++){
			myHref = myMenuList[i].getElementsByTagName("a")[0].href;		
			if (myHref == mySelectedLink){
				myMenuList[i].className += " SELECTEDPAGE"
				var x = new Array();
				x[0]=myHref;
				x[1]=myMenuList[i].getElementsByTagName("a")[0].getAttribute("title");
				myOrientArr[0]=x;
				break;
			}
		}
		if (i<myMenuList.length-1){
			myMenuList[i+1].className += " NOBG"
		}
		if (i>0){
			myMenuList[i-1].className += " NOPADDING"
		}
	}
}

function subMenuSelecter(selectLink){
	mySelectedLink = "http://" + window.location.hostname + selectLink;
	myMenu= $("subMenu").getElementsByTagName("ul");
	if (myMenu.length>0){
		myMenuList = myMenu[0].getElementsByTagName("li")
		for (var i=0;i<myMenuList.length;i++){
			myHref = myMenuList[i].getElementsByTagName("a")[0].href;		
			if (myHref == mySelectedLink){
				myMenuList[i].className += " SELECTEDPAGE"
				
				var x = new Array();
				x[0]=myHref;
				x[1]=myMenuList[i].getElementsByTagName("a")[0].getAttribute("title");
				myOrientArr[1]=x;
				
				break;
			}
		}
		
		if ((i != 0) && (i != myMenuList.length-1)){
			myMenuList[i+1].className += " LEFTSELECT"
			myMenuList[i-1].className += " RIGHTSELECT"
		}
		
		if (i==0){
			myMenu[0].className ="FIRSTITEMSELECTED"
			myMenuList[i+1].className += " LEFTSELECT"
		}
		else if (i == myMenuList.length-1){
			myMenu[0].className ="LASTITEMSELECTED"
			myMenuList[i-1].className += " RIGHTSELECT"
		}
		
		myMenuList[i].className += " ACTIVENODE"
		
	}
}


function orientation(_lang){
	myStr ="";
	myStr += "<ul>";
	
	_lang = _mySiteLanguage;
	if (_mySiteLanguage=="eng"){
		root="/eng/"
		rootText = "Home Page"
	}
	else{
		root="/tr/"
		rootText = "Ana Sayfa"
	}
	myStr += "<li>";
		myStr += "<a href=\""+root+"\">"+rootText+"</a>";	
	myStr += "</li>";
	
		for (var i=0;i<myOrientArr.length;i++){
			_class="";
			
			myStr += "<li class=\""+ _class +"\">";
				if (i==myOrientArr.length-1){
				myStr +=  myOrientArr[i][1];
				}
				else{
				myStr += "<a href=\""+ myOrientArr[i][0] +"\">" + myOrientArr[i][1] + "</a>";	
				}
			myStr += "</li>";
		}
	myStr += "</ul>";
	
	$("textArea").innerHTML = myStr;
}


function otherSiteHSBC(_link){
	if (_mySiteLanguage=="tr"){
		popPath="/tr/pop_OtherHSBCSite.asp?" + _link
	}
	else if (_mySiteLanguage=="eng"){
		popPath="/eng/pop_OtherHSBCSite.asp?" + _link
	}
	
	PopItUp(popPath,770,450,1);
	return false;
}

function otherSite(_link){
	if (_mySiteLanguage=="tr"){
		popPath="/tr/pop_OtherSite.asp?" + _link
	}
	else if (_mySiteLanguage=="eng"){
		popPath="/eng/pop_OtherSite.asp?" + _link
	}
	
	PopItUp(popPath,770,450,1);
	return false;
}
function otherSite1(_link){
	if (_mySiteLanguage=="tr"){
		popPath="/tr/pop_OtherSite.asp?" + _link
	}
	else if (_mySiteLanguage=="eng"){
		popPath="/eng/pop_OtherSite.asp?" + _link
	}
	
	PopItUp(popPath,500,300,1);
	return false;
}

opportunityCOUNT=0;
	function showOpportunity(statu){
		if (statu==1){opportunityCOUNT++;}
		else if (statu==0){opportunityCOUNT--;}
	
		myOpp = $("firsatlar").getElementsByTagName("div");
		if (myOpp.length>0){
			for (i=0;i<myOpp.length;i++){
				myOpp[i].style.display="none";
			}
			myOpp[opportunityCOUNT].style.display="";
			
			
			$("firDurum").innerHTML=opportunityCOUNT+1;
			$("firToplam").innerHTML=myOpp.length;
			
			$("lnk_onceki").style.display="";
			$("lnk_sonraki").style.display="";
			if (opportunityCOUNT==0){
				$("lnk_onceki").style.display="none";
			}
			else if(opportunityCOUNT==myOpp.length-1){
				$("lnk_sonraki").style.display="none";
			}						
		}
		return false;	
	}
	
/*
function showHideElement(_elm){	
		myElement = $(_elm)
		if (myElement){
			if (myElement.style.display == ""){
				myElement.style.display = "none";
			}
			else{
				myElement.style.display = "";
			}
		}
}
*/
var exObj="";
var exClickObj="";
var selecterFlag=0;
function showHideElement(_elm, clickObj){	
		myElement = $(_elm)
		if (myElement){
			if (myElement.style.display == ""){
				myElement.style.display = "none";
			}
			else{
				myElement.style.display = "";
			}
		}
		
		if(exObj!="" && exObj != _elm){
			$(exObj).style.display = "none";
		}
		
		if(exObj != _elm){
			exObj = _elm;
		}
		
		if (exClickObj != ""){					
			exClickObj.className = "";
		}
		if (clickObj){
			if (clickObj != exClickObj){
				selecterFlag=1;
			}
			else{
				if (selecterFlag==1){selecterFlag=0;}
				else{selecterFlag=1;}
			}
						
			if (selecterFlag==1){
				clickObj.className += " selected";
			}
			
			
			exClickObj = clickObj;
		}
		
}

function showHideElement2(_elm, clickObj){	
		myElement = $(_elm)
		if (myElement){
			if (myElement.style.position == "static"){
				myElement.style.position = "absolute";
			}
			else{
				myElement.style.position = "static";
			}
		}
		
		if(exObj!="" && exObj != _elm){
			$(exObj).style.position = "absolute";
		}
		
		if(exObj != _elm){
			exObj = _elm;
		}
		
		if (exClickObj != ""){					
			exClickObj.className = "";
		}
		if (clickObj){
			if (clickObj != exClickObj){
				selecterFlag=1;
			}
			else{
				if (selecterFlag==1){selecterFlag=0;}
				else{selecterFlag=1;}
			}
						
			if (selecterFlag==1){
				clickObj.className += " selected";
			}
			
			
			exClickObj = clickObj;
		}
		
}
var innerObj="";
var innerClickObj="";
var innerSelecterFlag=0;
function showHideInnerElement(_elm, clickObj){	
		myElement = $(_elm)
		if (myElement){
			if (myElement.style.display == ""){
				myElement.style.display = "none";
			}
			else{
				myElement.style.display = "";
			}
		}
		
		if(innerObj!="" && innerObj != _elm){
			$(innerObj).style.display = "none";
		}
		
		if(innerObj != _elm){
			innerObj = _elm;
		}
		
		if (innerClickObj != ""){					
			innerClickObj.className = "";
		}
		if (clickObj){
			if (clickObj != innerClickObj){
				innerSelecterFlag=1;
			}
			else{
				if (innerSelecterFlag==1){innerSelecterFlag=0;}
				else{innerSelecterFlag=1;}
			}
						
			if (innerSelecterFlag==1){
				clickObj.className += " selected";
			}
			
			
			innerClickObj = clickObj;
		}
		
}

function goToPage(_href){
window.location.href=_href;
}


function selectMyCombo(_combo){
		_root = "http://" + window.location.hostname;
		_currentPage = window.location.href;
		myCombo = $(_combo);
		for (i=0; i<myCombo.options.length;i++){
			_myComboPage = _root + myCombo.options[i].value ;
			if (_myComboPage == _currentPage){
				
				myCombo.options[i].selected = true;
				break;
			}
		}		
}



function homeFlashtoLocate(){
	if (is.Firefox || is.Safari || is.Gecko || is.NS6up || is.Opera) {
		if ($("FlashContainer")){
			$("FlashContainer").className="flashContRel";
			myContDiv = $("FlashContainer").getElementsByTagName("div")
			if(myContDiv.length>0){
				myContDiv[0].className = "flashConttoLocate"
			}
		}
	}
}


function addDay(__dd){											
	for (var i=1;i<32;i++){
		__value = "0" + i													
		__value = __value.substr(__value.length-2,2);												
		optionItem = new Option( __value, __value,  false, false);
		$(__dd).options[i]=optionItem;
	}
}

function addMoth(__dd){
	if (_mySiteLanguage=="eng"){
		myMonth = ["January","February","March","April","May","June","July","Agust","September","October","November","December"]										
	}
	else{
		myMonth = ["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]										
	}
	for (var i=1;i<13;i++){
		__value = "0" + i													
		__value = __value.substr(__value.length-2,2);												
		optionItem = new Option(myMonth[i-1], __value,  false, false);
		$(__dd).options[i]=optionItem;
	}
}

function addYear(__dd){
	var _date = new Date();
	thisYear = _date.getYear();
	if (! is.IE){
		thisYear = 1900 + thisYear;
	}
	thisYear ++;
	for (var i=1937; i<thisYear;i++){								
		optionItem = new Option( i, i,  false, false);
		$(__dd).options[i - 1936]=optionItem;
	}
	
}	





	var DWin 
	function bireysel_int(url,name){	
		DWin = window.open(url,name,"toolbar=0,top=0,left=0,width=790,height=640,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=1"); 
	}
	
	
	var DWin 
	function kurumsal_int(url,name){	
		DWin = window.open(url,name,"toolbar=0,top=0,left=0,width=790,height=710,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=1"); 
	}	




	function getUrl(url,target) {
		if(url=='blank') return false;
		if(target && target=='blank') window.open(url);
	else document.location.href=url;
	  }




function pageType(type){

						var myContainer = document.getElementById("sright")
						if (type =="small"){
							myContainer.className = "sright";
						}
						else if(type =="big"){
					
							myContainer.className = "sRight_big";
						}

			}




function msignKWindow() //m-Sign için gerekli pencereyi açar.
{
var scrwidth=(screen.width>1000 ? 785:790); var scrheight=(screen.height>800 ? 608:522); var CWin = window.open("https://kurumsal.hsbc.com.tr/TUR/MSGNOR_01.asp","MsignB","toolbar=0,top=0,left=0,width="+scrwidth+",height="+scrheight+",location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=1,dependent=0");
}


function msignWindow() //m-Sign için gerekli pencereyi açar.
{
var scrwidth=(screen.width>1000 ? 785:790); var scrheight=(screen.height>800 ? 608:522); var CWin = window.open("https://kurumsal.hsbc.com.tr/TUR/MSGNAP_01.asp","Msign","toolbar=0,top=0,left=0,width="+scrwidth+",height="+scrheight+",location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=1,dependent=0");
}


function newWindow(url,width,height) //Yeni pencere açar.
{
	day = new Date();
	id = day.getTime();
	PageName="Page"+id
	PageName = window.open(url,id,"toolbar=0,top=0,left=0,width="+width+",height="+height+",location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=0"); 
}

function internetWindow() //İnternet Bankacılığı için gerekli pencereyi açar.
{
	var url="https://bireysel.hsbc.com.tr/TUR"
	var DWin = window.open(url,"HSBCNET","toolbar=0,top=0,left=0,width=790,height=640,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=1"); 
}

function winopenKK(x,s)
{
    var strRf = s ;     //Url'e eklenecek strRef değişkeni

    var url="https://bireysel.hsbc.com.tr/TUR/transactions/CAPPLY_01.asp?strRef="+ strRf
    var DWin = window.open(url,"BASVURUFORMU","toolbar=0,top=0,left=0,width=790,height=555,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,copyhistory=1");

}

	
	function onlyNumber(e){
		var keyCode = (window.event) ? event.keyCode : e.which;
		if(keyCode == 13){anindaSifre();return true;}
		if ((keyCode<48 || keyCode>57)) {return false;}
		
		
	}
	function pressEnter(){
		if((window.event) ? event.keyCode : e.which == 13){
			anindaSifre();
			return true;
		}
	}
	function cell3Full(){
		if(document.getElementById('kk_number_3_2').value.length == 2){
			 document.getElementById('kk_number_4').focus();
		}
	}
	function anindaSifre(){

		var cell3 = document.getElementById('kk_number_3_2').value;
		var cell4 = document.getElementById('kk_number_4').value;

		
		if(cell3.length < 2 || cell4.length < 4){
			alert('Lütfen kredi kartınızın son altı rakamını giriniz.');
			document.getElementById('kk_number_3_2').focus();
			if(cell3.length == 2 && cell4.length < 4){ document.getElementById('kk_number_4').focus();}
			return false;
			
		} else {
			bireysel_int('https://bireysel.hsbc.com.tr/tur/pentry.asp?WT.ac=HBTR_aninda_sifre&Card3='+cell3+'&Card4='+cell4,'HSBCNETCC');
			DWin.focus();
		}
		
	}
	function managementShow(){
			var obj=document.getElementById('DivIletisimBilgi');
			
			var status = obj.style.display;
			
				if(status == 'none') {
				obj.style.display="block";
				} else if(status == 'block') {
				obj.style.display ="none";
				}
						
			}




