function checkTextLength(a){var b=a.text.value,c=maxLength+2,d=0,e="black";while(c>maxLength)c=b.length,c>maxLength&&(b=b.substr(0,b.length-1),d=1);d==1&&(a.text.value=b,e="red");var f=maxLength-c;return document.getElementById("infobox").innerHTML='Осталось символов: <span id="remainingsymbols" style="color:'+e+'">'+f+"</span> ",c<maxLength}function MoveMapBack(a){var b=-425,c=document.getElementById("content");return function(){hideCurve(),b=b+3,c.style.backgroundPosition="0px "+b+"px",b>0?a():setTimeout(arguments.callee,1)}(),document.getElementById("navmetro").innerHTML='<a id="a1" href="javascript:void(0);" onmouseover="makeActiv(this);makeVisible(\'proezd02\');" class="activ">На машине</a><a id="a2" href="javascript:void(0);" onmouseover="makeActiv(this);makeVisible(\'proezd01\');" style="border-left: solid 1px #ccc;">На метро</a>',document.getElementById("printlink").name="proezd02",1}function MoveMap(a){var b=0,c=document.getElementById("content");return function(){hideCurve(),b=b-3,c.style.backgroundPosition="0px "+b+"px",b<-425?a():setTimeout(arguments.callee,1)}(),document.getElementById("navmetro").innerHTML='<a href="javascript:void(0);" class="activ">На машине</a>',document.getElementById("printlink").name="proezd03",2}function hideCurve(){document.getElementById("curve").src=""}function makeActiv(a){var b=document.getElementById("curve");a.id=="a2"?(document.getElementById("a1").className="inactive",b.src="/i/curve03.png"):(document.getElementById("a2").className="inactive",b.src="/i/curve02.png"),a.className="activ"}function makeVisible(a){a=="proezd02"?(document.getElementById(a).style.display="block",document.getElementById("proezd01").style.display="none",document.getElementById("printlink").name="proezd02"):(document.getElementById(a).style.display="block",document.getElementById("proezd02").style.display="none",document.getElementById("printlink").name="proezd01")}function addMarker(a,b,c){var d=new google.maps.Marker({position:a,map:map});typeof b!="undefined"&&b.close();var e=document.getElementById(c).innerHTML,f=/^<span>([^<]+)([\s\S]+)/im,g=e.replace(f,"<b>$1</b>$2"),b=new google.maps.InfoWindow({content:g+'<a href="#" class="balloon" onclick="printDealer(\''+c+"', '"+d.position.toUrlValue(6)+"'); return false;\">Распечатать</a>",maxWidth:205});return b.open(map,d),google.maps.event.addListener(d,"click",function(){b.open(map,d)}),b}function printDealer(a,b){var c=document.getElementById(a).innerHTML,d=document.getElementById("outside"),e=new Image;e.src="http://maps.googleapis.com/maps/api/staticmap?zoom=14&size=512x512&markers="+b+"&sensor=false";var f=/^<span>([^<]+)([\s\S]+)/im;c='<a id="backlink" href="#map">Вернуться к общему списку</a>'+c.replace(f,"<b>$1</b>$2");var g=function(){document.body.removeChild(h),d.style.display="block"},h=document.createElement("DIV");h.id="printversion",h.innerHTML=c,document.body.appendChild(h),h.appendChild(e),d.style.display="none",document.getElementById("backlink").onclick=g}function printContacts(a){var b=a.name,c=document.getElementById("outside"),d=new Image;d.src="/i/map4print_"+b+".png",content='<a name="printVersion" id="backlink" href="javascript:void(0);">Вернуться к полной версии</a>'+document.getElementById("a").innerHTML+'<br /><p style="width:70%; margin:auto; text-align:justify;">'+document.getElementById(b).innerHTML+"</p>";var e=function(){document.body.removeChild(f),c.style.display="block"},f=document.createElement("DIV");f.id="printversion",f.innerHTML=content,document.body.appendChild(f),f.appendChild(d),c.style.display="none",document.getElementById("backlink").onclick=e}function RemReq(a,b,c){var d=document.getElementById("RemReq");d&&document.lastChild.lastChild.removeChild(d);var e=null,f=document.createElement("SPAN");e=document.lastChild.lastChild.appendChild(f),e.setAttribute("id","RemReq"),e.style.display="none",setTimeout(function(){b+="?datei="+a+"&target="+c;var d=document.createElement("script");d.type="text/javascript",d.src=b,f.appendChild(d)},10)}function validate(a){if(emptyField(a.name))alert("Вы не указали Вашего имени!");else if(emptyField(a.city))alert("Пожалуйста, укажите ваш город.");else if(emptyField(a.email))alert("Пожалуйста, введите Ваш адрес электронной почты.");else if(emptyField(a.text))alert("Пожалуйста, введите текст сообщения.");else return!0;return!1}function emptyField(a){if(a.value.length==0)return!0;for(var b=0;b<a.value.length;++b){var c=a.value.charAt(b);if(c!=" "&&c!="\t")return!1}return!0}function as(){var a="ophefhbhkehstrctchFKJhit";document.getElementById("check").value=a+"()"}function ViewFragm(a,b){var c=document.getElementById("bi");c.src="",c.src="/i/ajax-loader.gif";var d=new Image;d.src="/i/products/"+a+"/"+a+"_"+b+".jpg",d.onload=function(){if(typeof this.naturalHeight!="undefined"){if(this.naturalHeight==0)return!1;c.src=d.src}else{if(!this.complete)return!1;c.src=d.src}}}var maxLength=500,trigger=2
