function changeTab(act,layOn,isSubYears){
	var chg = act.parentNode.parentNode;
	var list = act.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('div');
	for (i=0; i<(list.length-1); i++) {
		if (list[i].className == 'tabSxOn') list[i].className = 'tabSxOff'
		else if (list[i].className == 'tabDxOn') list[i].className = 'tabDxOff';
		if ((list[i].className == 'tabOn') || (list[i].className == 'tabOff')) {
			if (list[i].className == 'tabOn') list[i].className = 'tabOff'
		}
	}
	if ((chg.className == 'tabOn') || (chg.className == 'tabOff')) {
		chg.className = 'tabOn';
		lato = chg.parentNode.getElementsByTagName('div');
		for (s=0; s<(lato.length); s++){
			if ((lato[s].className == 'tabSxOff') || (lato[s].className == 'tabSxOn')) {
				lato[s].className = 'tabSxOn';
			} else if ((lato[s].className == 'tabDxOff') || (lato[s].className == 'tabDxOn')) {
				lato[s].className = 'tabDxOn';
			}
		}
	}
	var elencoTab = $$('div.contTab');
	for (var i=0;i<elencoTab.length;i++){
		elencoTab[i].style.display='none';
	}
	document.getElementById('tab'+layOn).style.display = 'block';
	if(isSubYears){
		for (i=0;i<$('btnYears').childNodes.length;i++){
			if($('btnYears').childNodes[i].tagName=='DIV') $('btnYears').childNodes[i].className="years"
		}
		document.getElementById('years_'+layOn).className = "years see"
	}
}

function changeMonth(id,size) {
	for (var i =0; i<size; i++ ) {
		if (document.getElementById("t"+i).style.display == "block") {
			document.getElementById("t"+i).style.display = "none";
			document.getElementById("d"+i).style.display = "none";
			document.getElementById("dd"+i).style.display = "block";
			document.getElementById("dd"+id).style.display = "none";
			document.getElementById("d"+id).style.display = "block";
			document.getElementById("t"+id).style.display = "block";
			break;
		}
	}
}

function tree(arg) 
{
	var d = "uca_" + arg;
	var d1 = "uca__" + arg;
	if (document.getElementById(d).style.display == "none") {
		document.getElementById(d).style.display = "block";
		document.getElementById(d1).style.display = "block";
	}
	else if (document.getElementById(d).style.display == "block") {
		document.getElementById(d).style.display = "none";
		document.getElementById(d1).style.display = "none";
	} 
}

function querySt(ji) {
	hu = window.location.search.substring(1);
	gy = hu.split("&");
	for (i=0;i<gy.length;i++) {
		ft = gy[i].split("=");
		if (ft[0] == ji) {
			return ft[1];
		}
	}
}

function fontSizer(){
	var sizer=document.getElementById('fontSizer').childNodes[0].nodeValue;
	switch (sizer){
	case 'AAA': 
		document.body.style.fontSize="80%";
		document.getElementById('fontSizer').childNodes[0].nodeValue='A';
		setCookie("UCSIL_fontsize",'80%',7);
		break;
	case 'AA':
		document.body.style.fontSize="180%";
		document.getElementById('fontSizer').childNodes[0].nodeValue='AAA';
		setCookie("UCSIL_fontsize",'180%',7);
		break;
	case 'A':
		document.body.style.fontSize="100%";
		document.getElementById('fontSizer').childNodes[0].nodeValue='AA';
		setCookie("UCSIL_fontsize",'100%',7);
		break;
	}
}

function setCookie(name,value,expdays){
	var now = new Date();
	var exp = new Date(now.getTime() + (1000*60*60*24*expdays));
	document.cookie = name + "=" + escape(value) + ";" + "expires=" + exp.toGMTString() + ";" + "path=/";
}

function getCookie(name){
	var cname = name + "=";
	var dc = document.cookie;
	if (dc.length > 0) {
		var start = dc.indexOf(cname);
		if (start != -1){
			start += cname.length;
			var stop = dc.indexOf(";", start);
			if (stop == -1) stop = dc.length;
			return unescape(dc.substring(start,stop));
		}
	}
	return null;
}

window.onload = function(){
	sizer=getCookie("UCSIL_fontsize");
	switch (sizer){
	case '80%': 
		document.body.style.fontSize="80%";
		document.getElementById('fontSizer').childNodes[0].nodeValue='A';
		break;
	case '180%':
		document.body.style.fontSize="180%";
		document.getElementById('fontSizer').childNodes[0].nodeValue='AAA';
		break;
	case '100%':
		document.body.style.fontSize="100%";
		document.getElementById('fontSizer').childNodes[0].nodeValue='AA';
		break;
	}
}

function addToFavorites(){
var ua=navigator.userAgent;
if (window.opera){
document.getElementById("bm_OP").style.display="inline";
}else if (document.all && ua.indexOf("Mac")==-1){
if(document.getElementById) document.getElementById("bm_IE").style.display="inline";
else document.all.bm_DISABLED.style.display="inline";
}else if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")){
document.getElementById("bm_MZ").style.display="inline";
}else if( ua.indexOf("Mac")!=-1 && (document.all || ua.indexOf("Safari")!=-1) ){
document.getElementById("bm_DISABLED").style.display="inline";
}
}
function disabledBookmarks(){
var ua=navigator.userAgent;
if(document.all)alert("To add this page to Favorites use [APPLE] + [D]")
else if (ua.indexOf("Safari")!=-1)alert("To add this page to Favorites use [APPLE] + [D]\nor drag the link on Favorites bar")
else alert("Sorry! Your browser doesn't support this function.")
}

if (window.location.hostname == 'www.unicreditatonint.com' || window.location.hostname == 'unicreditatonint.com' || window.location.hostname == 'www.ucatonint.com' || window.location.hostname == 'ucatonint.com' || window.location.hostname == 'www.atonint.com' || window.location.hostname == 'atonint.com')
{
fileName = "http://www.unicreditsecurities.com.cy" + window.location.pathname + window.location.search + window.location.hash;
window.location.replace(fileName);
}

function showban_1() {
if ($.browser.webkit || $.browser.safari)
{
	$("#banX").css('display','block');
}
else
{
	$("#banX").show("normal");	
}
setTimeout('showban_2()', 300);
}
function showban_2() {
if ($.browser.webkit || $.browser.safari)
{
	$("#banX").css('display','none');
	$("#ban1").css('display','block');
}
else
{
	$("#banX").hide("slow");
	$("#ban1").show(1000);
}
t = setTimeout('showban_3()', 3000);
$("#ban1").mouseenter(function() { clearTimeout(t);});
}
function showban_3() {
if ($.browser.webkit || $.browser.safari)
{
	$("#ban1").css('display','none');
	$("#banX").css('display','block');
}
else
{
	$("#ban1").hide(1000);
	$("#banX").show(300);
}
setTimeout('showban_2()', 1000);
}
