d = document;

tsel = 2;

function changeTag(n) {
	if (n == tsel) return;
	d.getElementById('t'+tsel).className = 'tag1';
	d.getElementById('tr'+tsel).style.display = 'none';
	d.getElementById('t'+n).className = 'tag2';
	document.getElementById('tr'+n).style.display = 'block';
	tsel = n;
}

function offTimer() {
	if (document.timer) {
		window.clearTimeout(document.timer);
		document.timer = null;
	}
}

function show(obj) {
	document.getElementById('sub' + obj).style.display = 'block';
	document.getElementById('i' + def).className = '';
	document.getElementById('i' + obj).className = 's';
	
	if (document.getElementById('i' + obj).parentNode.parentNode.className == 'r')	document.getElementById('sub' + obj).style.marginLeft = (document.getElementById('i' + obj).offsetWidth - document.getElementById('sub' + obj).offsetWidth) + 'px';
}

function hide() {
	if (document.vis_l3) {
			document.getElementById(document.vis_l3).style.display = 'none';
			document.vis_l3 = null;
		};
	document.getElementById('sub' + document.vis).style.display = 'none';
	document.getElementById('i' + document.vis).className = '';
	document.getElementById('i' + def).className = 's';
}
function on(obj) {
	offTimer();
	if (document.vis) {
		hide();
	}
	show(obj);
}

function off(obj) {
	document.vis = obj;
	document.timer = window.setTimeout('hide()', 300);
}

function on_1(obj) {
	offTimer();
	if (document.vis) {
		hide();
	}
	show(obj);
        document.getElementById("ir0").getElementsByTagName('img')[0].src="/img/bg/basket_dark.png"

}

function off_1(obj) {
	document.vis = obj;
	document.timer = window.setTimeout('hide();document.getElementById("ir0").getElementsByTagName("img")[0].src="/img/bg/basket.png";', 300);
}

function show_screen_shot(img_src, wi, he){
	wi=wi+100;
	he=he+60;
	var ss_win = window.open(img_src,"","width=" + wi + ",height=" + he + ",status=no,toolbar=no,menubar=no,location=no, scrollbars=yes");
	ss_win.focus();
}

function showObj(id) {
	document.getElementById(id).style.display = 'block';
}

function hideObj(id) {
	document.getElementById(id).style.display = 'none';
}
