anim = true;
anim_curr = 0;

function set_arrays(text,img)  {
	text_array = Ext.decode(text);
	img_array = Ext.decode(img);
}

function set_banner(curr)  {
	anim_curr = curr;
	for(i=0;i<=2;i++) {
		var href_id = 'href_'+i;
		if (i==curr) {
			document.getElementById(href_id).className = 'gall_home_href_hover';
		} else {
			document.getElementById(href_id).className = 'gall_home_href';
		}
	}
	document.getElementById('gall_home').style.backgroundImage = 'url('+img_array[curr]+')';
	document.getElementById('gall_home_text').innerHTML = text_array[curr];
}

function set_anim() {
	if (anim) {
		anim_curr++;
		if (anim_curr>2) anim_curr = 0;
		for(i=0;i<=2;i++) {
			var href_id = 'href_'+i;
			if (i==anim_curr) {
				document.getElementById(href_id).className = 'gall_home_href_hover';
			} else {
				document.getElementById(href_id).className = 'gall_home_href';
			}
		}
		document.getElementById('gall_home').style.backgroundImage = 'url('+img_array[anim_curr]+')';
		document.getElementById('gall_home_text').innerHTML = text_array[anim_curr];
	}
	setTimeout('set_anim()',10000);
}
