function gif_over(img) {
	img.src=img.src.replace('.gif','r.gif');
} 
function gif_out(img) {
	img.src=img.src.replace('r.gif','.gif');
}

function bg_main_over(td) {
	td.style.color='ffffff';
	td.style.backgroundImage="url('../../img/gr.gif')";
}

function bg_main_out(td) {
	td.style.color='1F8C12';
	td.style.backgroundImage="url('../../img/gr1.gif')";
}

function prehide(lay){
	eval("document.all."+lay+".style.top=0");
}

function show(lay,el,x,y){
	psx=get_posx(el);
	psy=get_posy(el);
	eval("document.all."+lay+".style.left=psx+x;");
	eval("document.all."+lay+".style.top=psy+y;");
	eval("document.all."+lay+".style.visibility='visible'");
	if(document.layers){
		eval("document.layers['"+lay+"'].visibility='visible'");
	}
}

function hide(lay){
	eval("document.all."+lay+".style.visibility='hidden'");;
	if(document.layers){
		eval("document.layers['"+lay+"'].visibility='hidden'");
	}
}
function get_posx(el) {
	var ipos = 0;
	while (el!=null) {
		ipos+=el["offsetLeft"]
		el = el.offsetParent
	}
	return ipos;
}

function get_posy(el) {
	var ipos = 0;
	while (el!=null) {
		ipos+=el["offsetTop"]
		el = el.offsetParent
	}
	return ipos;
}



function fixflash(containerID){
	var flashContainer = document.getElementById(containerID);
	var flashMovie = document.createElement("div");
	flashMovie.innerHTML = flashContainer.innerHTML.replace(/</g, "<").replace(/>/g, ">");
	flashContainer.parentNode.insertBefore(flashMovie, flashContainer);
	flashContainer.parentNode.removeChild(flashContainer);
	flashMovie.setAttribute("id",containerID);
}
function ac_open() {
	window.open('http://www.alternet.com.ua/press/det/news_ukr/Pidkliuchy.html','','resizable=1,scrollbars=1,width=670,height=500,toolbar=0');
}

function ac_open2() {
	window.open('http://www.alternet.com.ua/rus/press/det/news_rus/Podkliuchy.html','','resizable=1,scrollbars=1,width=670,height=500,toolbar=0');
}

function ac_open1() {
	window.open('game.html','','resizable=0,scrollbars=0,width=750,height=510,toolbar=0,top=0,left=0');
}

