var slides=new Array();
var levs=-1;

var z;
var sobg=-1;

ie= (document.all && !window.opera) ? true:false;
dom=document.getElementById ? true:false;
oper=window.opera? true:false;
ie5=!!(navigator.appVersion.indexOf("IE 5")>0&&dom&&!oper?1:0);

if (!ie)
	{
	document.write("<style>");
	document.write(".ob134100 {background-image: url(/images/ob-134-100l.png)}");
	document.write(".ob134100d {background-image: url(/images/ob-134-100d.png)}");
	document.write(".obg134100 {background-image: url(/images/obg-134-100l.png)}");
	document.write(".obg134100d {background-image: url(/images/obg-134-100d.png)}");
	document.write(".hoverright {background-image: url(/images/hoverer-r.png)}");
	document.write(".hoverb1 {background-image: url(/images/hoverer-b1.png)}");
	document.write(".hoverb2 {background-image: url(/images/hoverer-b2.png)}");
	document.write(".hoverb3 {background-image: url(/images/hoverer-b3.png)}");		
	document.write(".hoveredbg {background-color: #A3C274; background-image: url(/images/hoverer-bg.png)}");			
	document.write("</style>");
	}
if (ie && !ie5)
	{
	document.write("<style>");
	document.write(".hoveredbg {background-color: #A3C274; background-image: url(/images/hoverer-bg.png)}");			
	document.write("</style>");
	}
if (ie && ie5)
	{
	document.write("<style>");
	document.write(".ob134100 {background-image: url(/images/ob-134-100l.gif)}");
	document.write(".ob134100d {background-image: url(/images/ob-134-100d.gif)}");
	document.write(".obg134100 {background-image: url(/images/obg-134-100l.gif)}");
	document.write(".obg134100d {background-image: url(/images/obg-134-100d.gif)}");
	document.write(".hoverright {background-image: url(/images/hoverer-r.gif)}");
	document.write(".hoverb1 {background-image: url(/images/hoverer-b1.gif)}");
	document.write(".hoverb2 {background-image: url(/images/hoverer-b2.gif)}");
	document.write(".hoverb3 {background-image: url(/images/hoverer-b3.gif)}");		
	document.write(".hoveredbg {background-color: #A3C274; background-image: url(/images/hoverer-bg.gif)}");			
	document.write("</style>");
	}
	
	
function obs(param)
{
	
	for (i=0; i<=levs; i++) if (i!=param) obhh(i);
	
	document.getElementById('cell'+param).style.backgroundColor="#A3C274";
	document.getElementById('cell'+param).style.backgroundImage="url(/images/hoverer-bg2."+(ie5? "gif":"png")+")";
	document.images["cel"+param].src="/images/ob-sell.gif";
	document.images["cer"+param].src="/images/ob-selr.gif";
	document.getElementById('hover'+param).style.visibility="visible";
	if (ie && !ie5)
		{
		document.getElementById("icell"+param).style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/images/ob"+(param==sobg?"g":"")+"-134-100d.png)";
		}
		else
		{
		document.getElementById("icell"+param).style.backgroundImage="url(/images/ob"+(param==sobg?"g":"")+"-134-100d."+(ie5? "gif":"png")+")";
		}
		
}

function obh(param)
{
z=setTimeout("obhh("+param+")",1800);
}

function obhhall()
{
	for (i=0; i<=levs; i++) obhh(i);
}

function obhh(param)
{
	document.getElementById('cell'+param).style.backgroundColor="#C4DF9B";
	document.getElementById('cell'+param).style.backgroundImage="";
	document.images["cel"+param].src="/images/1.gif";
	document.images["cer"+param].src="/images/1.gif";
	document.getElementById('hover'+param).style.visibility="hidden";
	if (ie && !ie5)
		{
		document.getElementById("icell"+param).style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src=/images/ob"+(param==sobg?"g":"")+"-134-100l.png)";		
		}
		else
		{
		document.getElementById("icell"+param).style.backgroundImage="url(/images/ob"+(param==sobg?"g":"")+"-134-100l."+(ie5? "gif":"png")+")";
		}
}	

function slideon(param,url)
{
	for (i=0; i<slides.length; i++) slideoff(slides[i]);

	document.images["slide"].src=url;
	document.getElementById("slidehref").href=document.getElementById("slidehref"+param).href;
	document.getElementById("slidl"+param).style.backgroundImage="url(/images/lgr-b.gif)";
	document.getElementById("slidm"+param).style.backgroundColor="#e9e9e9";
	document.getElementById("slidr"+param).style.backgroundImage="url(/images/lgr-b2.gif)";
	document.images["islidl"+param].src="/images/lgr-t.gif";
	document.images["islidr"+param].src="/images/lgr-t2.gif";
}

function slideoff(param)
{
	document.getElementById("slidl"+param).style.backgroundImage="url(/images/1.gif)";
	document.getElementById("slidm"+param).style.backgroundColor="white";
	document.getElementById("slidr"+param).style.backgroundImage="url(/images/1.gif)";
	document.images["islidl"+param].src="/images/1.gif";
	document.images["islidr"+param].src="/images/1.gif";
}

	
function ctm()
{
clearTimeout(z);
}


var searchword;
searchword="";

function searchswap()
{
switch (document.searchform.text.value)
	{
	case "":
		document.searchform.text.value=searchword;
		document.getElementById("wsearch").style.color="#aaaaaa";
	break;
	case searchword:
		document.searchform.text.value="";
		document.getElementById("wsearch").style.color="black";
	break;
	}
}


function do_at_start()
{
lang=document.images["logotype"].alt;
switch (lang)
	{
	case "ÌÅÄÈÍÖÅÍÒÐ":
		searchword="ïîèñê";
		break;
	case "MEDINCENTRE":
		searchword="search";
		break;
	}
if (searchword!="")
	{
	document.searchform.text.value=searchword;
	document.searchform[0].onfocus=function(){searchswap();};
	document.searchform[0].onblur=function(){searchswap();};
	document.getElementById("wsearch").style.color="#aaaaaa";
	}
}


function innerright_main()
{
if (!ie5) obhhall();
}

function innerright_int()
{
if (!ie5) obhhall();
}

function checkit()
{
if (document.searchform.text.value=="") 
	{
	document.getElementById('wsearch').style.borderColor='#FFD109';
	setTimeout("document.getElementById('wsearch').style.borderColor='black';",200);
	return false;
	}
	 else return true;
}


