function show(i) {if(document.getElementById) {e=document.getElementById(i);} else {e=document.all[i];} e.style.display="block";}
function hide(i) {if(document.getElementById) {e=document.getElementById(i);} else {e=document.all[i];} e.style.display="none";}
function load(i,p){var r;var s=i.shift();if(document.getElementById){l=document.getElementById(s);} else {l=document.all[s];} if (window.XMLHttpRequest) r = new XMLHttpRequest(); else if(window.ActiveXObject){try {r = new ActiveXObject('Msxml2.XMLHTTP');} catch(e){} try {r = new ActiveXObject('Microsoft.XMLHTTP');} catch(e){}} if(r){r.onreadystatechange=function(){if(r.readyState==4 && r.status==200){l.innerHTML=r.responseText;if(i.length>0)load(i,p);}};r.open("POST","load.php?action="+s+"&p="+p,true);r.setRequestHeader("Content-Type","application/x-www-form-urlencoded");r.send('param=1');} else l.innerHTML="";return false;}
function addBasket(c){load(['addbasket','bask1','bask2','baskethelp'],c);baskethelp.style.display='block';return false;}
function counter() {document.getElementById('count').innerHTML="<img src='http://counter.yadro.ru/hit?t21.1;r"+escape(document.referrer)+((typeof(screen)=="undefined")?"":";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";i"+escape("Жж"+document.title.substring(0,80))+";"+Math.random()+"' width=88 height=31>";}
function showFav() {url=location.href;title=document.title;if(typeof window.sidebar=="object"||(window.opera&&document.createElement)) fav.innerHTML="<a href='"+url+"' title='"+title+"' rel='sidebar'>Добавить в закладки</a>";else if(typeof window.external=="object")fav.innerHTML="<a href='.' onclick='window.external.AddFavorite(\""+url+"\", \""+title+"\");return false;' rel='sidebar'>Добавить в закладки</a>";}
function social() {url=location.href;document.getElementById('social').innerHTML="<p>Поделиться ссылкой на эту страницу в социальных сетях:<br><br><a target=_blank href='http://connect.mail.ru/share?share_url="+url+"'><img src='img/mm.gif' title='Поделиться В Моем Мире'></a> <a target=_blank href='http://vkontakte.ru/share.php?url="+url+"'><img src='img/vk.gif' title='Поделиться ВКонтакте'></a> <a target=_blank href='http://www.facebook.com/sharer.php?u="+url+"'><img src='img/fb.gif' title='Поделиться в Facebook'></a> <a target=_blank href='http://www.livejournal.com/update.bml?event="+url+"&amp;subject=Oriflame'><img src='img/lj.gif' title='Опубликовать в своем блоге livejournal.com'></a> <a target=_blank href='http://twitter.com/home?status=Oriflame%20-%20"+url+"'><img src='img/twbut.gif' title='Опубликовать в twitter.com'></a> <a href='http://www.liveinternet.ru/journal_post.php?action=n_add&amp;cnurl="+url+"' target=_blank><img src='img/li.gif' title='Запостить на LiveInternet'></a></p>";}
function l() {showFav();social();showbaskethelp();}
function showsearchhelp() {searchhelp.style.display = 'block';searchhelp.innerHTML = "Например: тени для век, туалетная вода, пудра, 2654, гель для душа";}
function hidesearchhelp() {searchhelp.style.display = 'none';searchhelp.innerHTML = "";}
function showbaskethelp() {load(['baskethelp'],'');if(getCookie('last'))baskethelp.style.display='block';
if(navigator.appName=="Microsoft Internet Explorer"){var ua = navigator.userAgent;var IEoffset = ua.indexOf("MSIE ");if(parseFloat(ua.substring(IEoffset+5, ua.indexOf(";", IEoffset))) == "6") baskethelp.style.position="absolute";}}
function hidebaskethelp() {baskethelp.style.display='none';load(['setcookie'],'last,');}
function getCookie(name){var cookie=" "+document.cookie;var search=" "+name+"=";var setStr=null;var offset=0;var end=0;if(cookie.length>0){offset=cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=cookie.indexOf(";",offset);if(end==-1){end=cookie.length;}setStr=unescape(cookie.substring(offset,end));}}return(setStr);}

