		function addfavorite(a) { 
			a.title=document.title; a.href=location.href; window.external.AddFavorite(location.href,a.title); 
			a.href="http://wonderland-alice.ru";
			return false;
		}
		
		function add2fav(x)
		{
			if (document.all && !window.opera) {
				window.external.AddFavorite("wonderland-alice.ru", "Алиса в Стране чудес");
			}
			else{
				x.href=document.location;
				x.title=document.title;
				x.rel = "sidebar";
			}
		}

		function isIE6()
		{
			var reg = new RegExp("msie (6|5)", "i");
			if(!(arMath = reg.exec(navigator.userAgent.toLowerCase()))){
				return false;
			}
			return true;	
		}
		
		function replacePNG()
		{
			var reg = new RegExp("\.png$", "i");
			img = document.body.getElementsByTagName('img');
			for(var i=0; i<img.length; i++)
			{
				path = img[i].getAttribute('src');
				if(path = reg.exec(path)){
					newStyle = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img[i].src+"')";
					img[i].src = '/images/em.gif';
					img[i].style.filter = newStyle;
				}
			}
		}
		
		window.onload = function()
		{
			var IE6 = isIE6();
			if (IE6) replacePNG();	  
		}