eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('9 t(a,b){g(3 u a){k c=[],e=[],p=[],d=[],5=[],l=[];8(a[3].6(\'.\')!=-1||a[3].6(\'#\')==-1){8(a[3].6(\'>\')!=-1){c[3]=a[3].f(a[3].6(\'>\')+2);a[3]=a[3].f(0,a[3].6(\'>\')-1)}8(a[3].6(\'.\')!=-1){e[3]=a[3].f(a[3].6(\'.\')+1);a[3]=a[3].f(0,a[3].6(\'.\'))}p[3]=a[3];8(!e[3])e[3]=\'\';8(c[3]){l[3]=r.q(p[3]);g(k j=0;j<l[3].o;j++){8(l[3][j].4.6(e[3])!=-1){5[3]=l[3][j].q(c[3]);g(k i=0;i<5[3].o;i++){5[3][i].n=9(){7.4+=\' \'+b};5[3][i].m=9(){7.4=7.4.h(b,\'\')}}}}}s{5[3]=r.q(p[3]);g(k i=0;i<5[3].o;i++){8(5[3][i].4.6(e[3])!=-1){5[3][i].n=9(){7.4+=\' \'+b};5[3][i].m=9(){7.4=7.4.h(b,\'\')}}}}}s 8(a[3].6(\'#\')!=-1){8(a[3].6(\'>\')!=-1){c[3]=a[3].f(a[3].6(\'>\')+2);a[3]=a[3].f(0,a[3].6(\'>\')-1)}a[3]=a[3].h(\'#\',\'\');d[3]=r.v(a[3]);8(d[3]){8(c[3]){5[3]=d[3].q(c[3]);g(k i=0;i<5[3].o;i++){5[3][i].n=9(){7.4+=\' \'+b};5[3][i].m=9(){7.4=7.4.h(b,\'\')}}}s{d[3].n=9(){7.4+=\' \'+b};d[3].m=9(){7.4=7.4.h(b,\'\')}}}}}}',32,32,'|||_el|className|_hoverElement|indexOf|this|if|function||||_id|_class|substr|for|replace|||var|_parent|onmouseout|onmouseover|length|_tag|getElementsByTagName|document|else|hoverForIE6|in|getElementById'.split('|'),0,{}))
function ieHover() {
	hoverForIE6(['fieldset.subscribe > span', 'div.btn > span'], 'hover');
}
if (document.all && window.attachEvent)
	attachEvent("onload", ieHover);

function initInputs()
{
	var inputs = document.getElementsByTagName("input");
	for (var i=0; i<inputs.length; i++)
	{

		if (inputs[i].type == "text" && (inputs[i].name == "subcrmail" || inputs[i].name == "q"))
		{
			var form = getAncestor(inputs[i], "form");
			if (form) form.onsubmit = handleSubmit;
			inputs[i].onfocus = function ()
			{
				if ((this.value == "введите e-mail") || (this.value == "Поиск по сайту"))
				this.value = "";
			}
			inputs[i].onblur = function ()
			{
				if (this.value == "" && this.name == "subcrmail") this.value = "введите e-mail";
				if (this.value == "" && this.name == "q") this.value = "Поиск по сайту";
			}
		}
	}
}
function handleSubmit()
{
	var re = new RegExp('^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$');
	var element = this.elements["email"];
	if (element)
	{
		if (element.value == "")
		{
			alert("Email address is empty!");
			return false;
		}
		else
			return element.value.match(re)
				|| (alert("You have entered incorrect email address!"), false);
	}
	return true;
}

function getAncestor(element, tagName)
{
	var node = element;
	while (node.parentNode && (!node.tagName ||
			(node.tagName.toUpperCase() != tagName.toUpperCase())))
		node = node.parentNode;
	return node;
}
if (window.addEventListener)
{
	window.addEventListener("load", initInputs, false);
}
else if (window.attachEvent){
	window.attachEvent("onload", initInputs);
}