window.onerror=function(){return true}
D=document;W=window;
function $(id){return D.getElementById(id)}
//-resz imgs
var imgShE=[null,0,0];
function imgShOn(e,sz){
if(navigator.appName!='Microsoft Internet Explorer') return;
if(imgShE)imgShOff(imgShE);
imgShE=[e,e.width,e.height];
e.removeAttribute('width');
e.removeAttribute('height');
e.className='cartBoxCellImg';
}
function imgShOff(e){
if(navigator.appName!='Microsoft Internet Explorer') return;
e.width=imgShE[1];
e.height=imgShE[2];
e.className='';
imgShE=[null,0,0];
}
function chVisMoreDescr(el){
try{if(!el||!el.lastChild)return;
with(el.lastChild.style)display=(display==''||display=='none')?'block':'none';}catch(e){}
}
var rCol_wN,rCol_e,rColStep,rColDirection;
function rColRun(){
var n,f=0; 
var rCol_w=parseInt(rCol_e.style.width);
if(rColDirection){rColStep*=3;n=rCol_w-rColStep;
}else{rColStep*=2;n=rCol_w+rColStep;}
if(n>rCol_wN){n=rCol_wN;f=1;
}else if(n<1){rColSetD('navColumnThreeWrapperMenus',0);rColSetD('rightTop2',0);rColSetD('buttonOpenPanel',1);n=25;f=1;}
rCol_e.style.width=n+'px';
if(f)return;
setTimeout(rColRun,50);
}
function rColChange(wN){
rCol_wN=wN;
rCol_e=document.getElementById('navColumnThreeWrapper');
if(!rCol_e) return;
var rCol_w=parseInt(rCol_e.style.width);
rColDirection=(rCol_wN==rCol_w);
if(!rColDirection){
	rColSetD('buttonOpenPanel',0);
	rColSetD('navColumnThreeWrapperMenus',1);
	rColSetD('rightTop2',1);
}
rColStep=1;
rColRun();
setCookie('rColStateHide',escape(rColDirection),356);
}
function rColSetD(e,d){
document.getElementById(e).style.display=(d?'block':'none');
}
//-sub cats
function rColSubChange(o){
var e1=o.parentNode.childNodes[1];
e1.className=(e1.className=='tmBoxContClose'?'tmBoxCont':'tmBoxContClose');
var e0=o.parentNode.childNodes[0];
if(e0.id)setCookie(e0.id,e1.className,356);
}
function setCookie(name,val,days){
if(days){
	var d=new Date();d.setTime(d.getTime()+(days*86400000));var expires="; expires="+d.toGMTString();
}else{var expires=''};
document.cookie=name+"="+val+expires+"; path=/";
}
//-
function helpTmHead(e){
var E=e.childNodes[1].style;
E.display=E.display=='block'?'none':'block';
}

/*SCROLL NEWS*/
{var fcontent=[
'<div><big><b>Скидки 3% и более на все товары более 400 грн</b></big></div><br/><div><a href="/index.php?carnitine=specials">Товары по специальным ценам &gt;&gt;</a></div>',
'<div><big><b>Дополнительные скидки за большой заказ</b></big></div><div><span>При покупке товаров на сумму свыше</span><br/>&nbsp; &nbsp; 1200 грн - скидка 3%;<br/>&nbsp; &nbsp; 2000 грн - скидка 4%;<br/>&nbsp; &nbsp; 3000 грн - скидка 5%.</div>'];
var delay=7000,fdSche=1,index=0;fdDly=2000,clB='rgb(0,0,0)',clW='rgb(255,255,255)',hx=fdSche==0?255:0,startCl=fdSche==0?clW:clB,endCl=fdSche==0?clB:clW;
function ldNews(){
if(index>=fcontent.length)index=0;
var e=$("fscroller");if(!e)return;
e.style.color=startCl;e.innerHTML=fcontent[index];linksobj=e.getElementsByTagName("A");
colorfade();index++;if(fcontent.length>1)setTimeout(ldNews,delay+fdDly)}frame=20;
function linkcolorchange(obj){if(obj.length>0)for(i=0;i<obj.length;i++)obj[i].style.color="rgb("+hx+","+hx+","+hx+")";}
function colorfade(){if(frame>0){hx=fdSche==0?hx-12:hx+12;$("fscroller").style.color="rgb("+hx+","+hx+","+hx+")";
frame--;setTimeout(colorfade,60);}else{$("fscroller").style.color=endCl;frame=20;hx=fdSche==0?255:0}}
if(screen.width>960)W.onload=ldNews;
}

