//var iframes = {mastercard: {url: 'http://furtif.advertures.cz/projekt/citibank/citikarta/web/iframe/form.htm', title: 'Citibank kreditní karta Classic a Gold'}, csa: {url: 'http://furtif.advertures.cz/projekt/citibank/citicsa/web2/iframe/form_kredit.htm', title: 'Citi ÈSA kreditní karta'}, shell: {url: 'http://furtif.advertures.cz/projekt/citibank/citishell/web_php/iframe/form_kredit.htm', title: 'Shell MasterCard od Citibank'}, o2: {url: 'http://furtif.advertures.cz/projekt/citibank/citio2/web/iframe/form.htm', title: 'Platební karty s O2'}};

//var iframes = {mastercard: {url: 'https://www.citikarta.cz/iframe/form.htm', title: 'Citibank kreditní karta Classic a Gold'}, csa: {url: 'http://www.citikarta.cz/csa/iframe/form_kredit.htm', title: 'Citi ÈSA kreditní karta'}, shell: {url: 'https://www.citikarta.cz/citishell/iframe/form_kredit.htm', title: 'Shell MasterCard od Citibank'}, o2: {url: 'https://www.citikarta.cz/o2/iframe/form.htm', title: 'Platební karty s O2'}};

function showForm(card) {
	var iframebox = document.getElementById('formframe');
	var iframeboxcontent = document.getElementById('formframeboxborder');
	iframeboxcontent.innerHTML = '<a href="#" onclick="return hideForm()" id="close">&lt; zpìt</a><h2>' + iframes[card].title + '</h2><iframe src="' + iframes[card].url + '" width="285" height="735" frameborder="0" marginheight="0" marginwidth="0"></iframe>';
	if(card == 'shell' || card == 'o2') iframebox.className = 'rightframe';
	else iframebox.className = '';
	iframebox.style.display = 'block';
	return false;
}

function hideForm() {
	var iframebox = document.getElementById('formframe');
	var iframeboxcontent = document.getElementById('formframeboxborder');
	iframeboxcontent.innerHTML = '';
	iframebox.style.display = 'none';
	return false;
}

var plusid = 1;
function plusDetail(linkobj) {
	var id = linkobj.id.substring(4);
	document.getElementById('plus' + plusid).className = '';
	document.getElementById('detail' + plusid).className = 'detail';
	plusid = id;
	document.getElementById('plus' + plusid).className = 'active';
	document.getElementById('detail' + plusid).className = 'detail active';
}

window.onload = function() {
	var pluslist = document.getElementById('pluslist');
	var plusitems = pluslist.getElementsByTagName('a');
	for(var i=0; i<plusitems.length; i++) {
		plusitems[i].onmouseover = function() { plusDetail(this); }
	}
	//advantages(false);
}

function direct() {
	//var now = new Date();
	//var windowhref = "http://czechrepublic.online.citibank.cz/HomeBankingSec/StartSession.asp?LANGNAME=Czech&LANG=92&DEVICEMODE=HTMLGPH&SRCT=10&BUSCODE=cz&SERVICECODE=SIGNON&MODE=2";
	//mainwin=window.open(windowhref,"citidirect","toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes, resizable=yes, history=no, width=780,height=570");
	
  parent.document.location.href = "http://production.citibank.cz";
	
	
	return false;
}

function directen() {
	//var now = new Date();
	//var windowhref = "http://czechrepublic.online.citibank.cz/HomeBankingSec/StartSession.asp?LANGNAME=English_(Czech)&LANG=1&DEVICEMODE=HTMLGPH&SRCT=10&BUSCODE=cz&SERVICECODE=SIGNON&MODE=2";
	//mainwin=window.open(windowhref,"citidirect","toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes, resizable=yes, history=no, width=780,height=570");
  parent.document.location.href = "https://production.citibank.cz/CZGCB/JPS/portal/LocaleSwitch.do?locale=en_CZ";

	return false;
}

function popup(urlstring) {
	var wWidth = 0;
	var wHeight = 0;
	if(window.screen.availWidth) wWidth = window.screen.availWidth;
	if(window.screen.availHeight) wHeight = window.screen.availHeight;
	var xpos = 0;
	var ypos = 0;
	var w = 750;
	var h = 500;

	if(wWidth > w) {
		xpos = (wWidth - w)/2;
	}
	if(wHeight > h) {
		ypos = (wHeight - h)/2;
	}
	window.open(urlstring, "citipopup", "scrollbars=yes, top=" + ypos + ", left=" + xpos + ", menubar=no, width=" + w + ",height=" + h + ", resizable=yes");
	return false;
}

function show(id) {
	if(id == 'debetcard') {
		document.getElementById('debetcard').style.display = 'block';
		document.getElementById('loan').style.display = 'none';
		document.getElementById('tab1').className = 'active';
		document.getElementById('tab2').className = '';
	} else if(id == 'loan') {
		document.getElementById('debetcard').style.display = 'none';
		document.getElementById('loan').style.display = 'block';
		document.getElementById('tab1').className = '';
		document.getElementById('tab2').className = 'active';
	}
}

/*
function advantages(show) {
	var whybox = document.getElementById('whycards');
	if(show) {
		whybox.className = 'show';
		sIFR.replaceElement("div#whycards h1", named({sFlashSrc: "/czech/consumer-banking/czech/kreditni-karta/sifr/interstate-regul.swf", sColor: "#CC0000", sBgColor: "#FFFFFF", sWmode: "transparent"}));
	}
	else whybox.className = '';
}
*/