var n = 15;
var f = false;
var b = new Array;
function prel(){

   	if(document.images) {
	  for(i=1;i<=n;i++)
               {str = '/buttons/p' + i + '_a.gif';
               b[i-1] = new Image();
               b[i-1].src = str;
}f = true;
 		}
}

function on(im){
	if (document.images && (f == true)) 
		{document.images[im].src="/buttons/"+im+"_a.gif";}
		
}
function off(im){
	if (document.images && (f == true))
		{document.images[im].src = "/buttons/"+im+".gif";}
}


function on_arr(im){
	if (document.images && (f == true)) 
		{document.images[im].src="/buttons/p2_a.gif";}
		
}
function off_arr(im){
	if (document.images && (f == true))
		{document.images[im].src = "/buttons/p2.gif";}
}

function on_arr_inside(im){
	if (document.images && (f == true)) 
		{document.images[im].src="/buttons/p14_a.gif";}
		
}
function off_arr_inside(im){
	if (document.images && (f == true))
		{document.images[im].src = "/buttons/p14.gif";}
}


function fon_on(id) 
{
document.getElementById(id).style.backgroundImage="url(/images/fon_menu_active.gif)";
}

function fon_off(id) 
{
document.getElementById(id).style.backgroundImage="url(/images/fon_menu.gif)";
}

/*function menu_on(id) 
{
document.getElementById(id).style.backgroundImage="url(/images/fon_menu_active.gif)";
document.getElementById(id).style.color="#185A1C";
}

function menu_off(id) 
{
document.getElementById(id).style.backgroundImage="";
document.getElementById(id).style.color="#ffffff";
}
*/
function fon_on(id) 
{
document.getElementById(id).style.backgroundImage="url(/images/fon_menu_active.gif)";
}

function fon_off(id) 
{
document.getElementById(id).style.backgroundImage="url(/images/fon_menu.gif)";
}

function menu_on(id) 
{
document.getElementById(id).style.color='#185A1C';
}

function menu_off(id) 
{
document.getElementById(id).style.color='';
}


function link_on(id) 
{
document.getElementById(id).style.backgroundImage="url(/images/fon_footer_menu.gif)";
}

function link_off(id) 
{
document.getElementById(id).style.backgroundImage="";
}

function link (x)
{
    document.location = x;
}
