function gif_over(src) {
	src.children.tags('IMG')[0].src=src.children.tags('IMG')[0].src.replace('.gif','r.gif');
} 
function gif_out(src) {
	src.children.tags('IMG')[0].src=src.children.tags('IMG')[0].src.replace('r.gif','.gif');
}


function bg_over(td) {
//alert(7);
	td.style.color='#1A5E9F';
	td.style.backgroundColor='#F0F3F1';
	td.style.backgroundImage="url('"+imgpath+"/dark.gif')";
} 
function bg_out(td) {	
	td.style.color='#0A3800';
	td.style.backgroundColor='transparent';
	td.style.backgroundImage="url('"+imgpath+"/white.gif')";
}


function change_width(){
	width = screen.width
    height = screen.height
	if(width<1024){
/*800*/		document.all.main.width='100%';
	}else if(width<1152){
/*1024*/	document.all.main.width='82%';
	}else if (width<1280){
/*1152*/	document.all.main.width='74%';
	}else if (width<1600){
/*1280*/	document.all.main.width='72%';
	}else{
/*>1600*/	document.all.main.width='60%';
	}
}

function change_width_headers(){
	width = screen.width
    height = screen.height
	if(width<1024){
/*800*/		document.all.headers.width='100%';
	}else if(width<1152){
/*1024*/	document.all.headers.width='82%';
	}else if (width<1280){
/*1152*/	document.all.headers.width='74%';
	}else if (width<1600){
/*1280*/	document.all.headers.width='72%';
	}else{
/*>1600*/	document.all.headers.width='60%';
	}
}


function change_width_center(){
	width = screen.width
    height = screen.height
	if(width<1024){
/*800*/		document.all.centerr.width='100%';
	}else if(width<1152){
/*1024*/	document.all.centerr.width='82%';
	}else if (width<1280){
/*1152*/	document.all.centerr.width='74%';
	}else if (width<1600){
/*1280*/	document.all.centerr.width='72%';
	}else{
/*>1600*/	document.all.centerr.width='60%';
	}
}

function showLayer(layerName) {
	eval('document.getElementById("'+layerName+'").style.visibility="visible"');

}
function hideLayer(layerName) {
	 eval('document.getElementById("'+layerName+'").style.visibility="hidden"');
}


function set_active(id){
	document.all[id].src=imgpath+"menu/"+id+"r.gif";
}
function set_inactive(id){
	document.all[id].src=imgpath+"menu/"+id+".gif";
}



function hide(id,layerName){
	hideLayer(layerName);
	set_inactive(id);
}

function show(id,layerName){
	formmenu(id,layerName);
	showLayer(layerName);
	set_active(id);
}


function formmenu(id,layerName){
	document.all[layerName].style.top = 165
	document.all[layerName].style.left = document.all['main'].offsetLeft+document.all[id].offsetLeft;
}


function form_top_left_karta(){
	document.all["langs"].style.right = document.all['main'].offsetLeft+5;
}

