//
// 26.12.2006
//
//
//


 var imgpath = 'images/';
 //Roll-over
        function over_service(item){

                document[item].src=imgpath+"service_icons/"+item+"_b.gif" ;
        }


        function out_service(item){

                document[item].src=imgpath+"service_icons/"+item+"_g.gif" ;
        }




// preload Images

		function preload()
		{
			//document.forms['f'].elements['q'].value='Пошук...';
			//document.forms['subscribe'].elements['email'].value='Адреса електронної пошти';
		}

        function preloadImages()
        {
        if (document.images)
                {

                var preloaded = new Array(3);

				preloaded[1] = new Image();
				preloaded[1].src = imgpath + "sitemap_b.gif";

				preloaded[2] = new Image();
				preloaded[2].src = imgpath + "subitem_bg.jpg";

				preloaded[3] = new Image();
				preloaded[3].src = imgpath + "uparrow.gif";

                }
        }

// rollover Menu background

function menuover(item)
	{
	item.className = "menuover";
	}

function menuout(item)
	{
	item.className = "menuout";
	}


function submenuover(item)
	{
	item.className = "submenuover";
	}

function submenuout(item)
	{
	item.className = "submenuout";
	}


//


function showhide(item, image)
	{
		//alert(document.getElementById(item).style.display);
	if (document.getElementById(item).style.display=='none')
	{
		document.getElementById(item).style.display='';
		document[image].src=imgpath+"uparrow.gif"
	} else {
		document.getElementById(item).style.display='none';
		document[image].src=imgpath+"downarrow.gif"
	};
	}


function recode(str)
{azbuka = "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя";
len = str.length;
for (ich=0; ich <= len-1; ich++) {
 ch = str.substr(ich,1);
 if (str.charCodeAt(ich) < 128) {
 document.write(ch);
 } else {
 idx = azbuka.indexOf(ch);
 if (idx >= 0 && idx < 64) {
 code = 1040 + idx;
 document.write("&amp;#" + code + ";");
 } else if (ch == "Ё") {
 document.write("&amp;#1025;");
 } else if (ch == "ё") {
 document.write("&amp;#1105;");
 };
 };
};
};
