<!--
var pww=0,pwh=0,ajback=null;var brw='?icsof'[((this.Worker||0).prototype+'').length/7|0]||'i';var ie6=(brw=='i'&&(navigator.appVersion.match(/MSIE\u0020([.\d]+);/)||[])[1]<8);function toInt(s){s=s.replace(/\s/g,'');return(parseInt(s));}
function trim(v){return(v.replace(/^\s\s*/,'').replace(/\s\s*$/,''));}
function urlQ(url,k,v){k=k.replace(/[\[]/g,"\\\[").replace(/[\]]/g,"\\\]");var rex=new RegExp("([\\?&]"+k+")=([^&#]*)");var q=rex.exec(url);if(v==null)return(q==null?q:q[2]);return(q==null?(url+'&'+k+'='+v):url.replace(rex,'$1\='+v));}
function elTry(el){try{return(el.type.length&&el.title.length&&el.name.length&&!el.disabled)}catch(e){return(0);}}
function elFl(el){var bg=el.style.backgroundColor;el.style.backgroundColor='#fa8080';window.setTimeout(function(){el.style.backgroundColor=bg;},500);return(null);}
function elErr(el){var mes='Заполните или исправьте помеченное поле',d=el.title.replace(/[^0-9]/g,'');t=elWld(el.title);if(!t.length||el.type.match(/^(select-one)$/i)){alert(mes);return(0);}t=t[2];if(t.substr(0,1).toLowerCase()==t.substr(0,1))mes+='\nДопускаются '+t;else mes=t;if(d.length)mes+='\nТребуется '+d+' значащих цифр';alert(mes);}
function elWld(k){var spc='\x22\x27\x28\x29\x2c\x2d\x2e\x2f\x3a\x3b\x5f\\\\ ';var arr={'ru':['([а-я- ])*','[^а-я]','русские буквы, пробелы и дефис'],'en':['([a-z- ])*','[^a-z]','латинские буквы, пробелы и дефис'],'int':['([0-9 ])*','[^0-9]','только цифры и пробелы'],'flt':['([0-9\.\, ])*','[^0-9\.\,]','цифры, пробелы и .,'],'num':['([0-9'+spc+'])*','[^0-9]','цифры и разделители'],'lat':['([0-9a-z'+spc+'])*','[^0-9a-z]','латинские буквы, цифры и разделители'],'rus':['([0-9а-я'+spc+'])*','[^0-9а-я]','русские буквы, цифры и разделители'],'dts':['([0-9]{1,2})['+spc+']{1}([0-9]{1,2})['+spc+']{1}([0-9]{2,4})','','Введена неверная дата'],'fon':['([0-9'+spc+'])*','','Телефон, с учетом кода города, должен включать 10 цифр\nКод города должен быть отделен от номера пробелом\nПеред кодом города не нужно указывать 8 или +7'],'file':['([a-z0-9\-\_\.])*','','Неверное имя файла'],'mail':['[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+','','Неверный e-mail адрес'],'pas':['([a-z0-9\!\@\#\$\%\^\&\*\(\)-_\+\=])+','','']};k=k.replace(/\d/g,'').toLowerCase();if(!arr.hasOwnProperty(k)){try{arr[k]=eval(k+'Chk()');}catch(e){return('');}}return(arr[k]);}
function elChk(el){if(elTry(el)&&el.type.match(/^(password|text|textarea|select-one)$/i)){var s=(el.type.toLowerCase()=='select-one');var v=(s?el[el.selectedIndex].value:el.value);var t=el.title.replace(/\d/g,''),w=t.toLowerCase();var d=el.title.replace(/[^\d]/g,'');v=trim(v);if(!v.length)return(t==w);var rex=elWld(w);if(!rex.length)return(1);var p=new RegExp('^'+rex[0]+'$','i');if(!v.match(p))return(0);if(v.length){switch(w){case'dts':var y=v.replace(p,'$3')*1;if(y<100)y+=y>30?1900:2000;if((y<1900)||(y>2100))return(0);var m=v.replace(p,'$2')*1;m-=1;if((m<0)||(m>11))return(0);var a=[31,((!(y%4)&&((y%100)||!(y%400)))?29:28),31,30,31,30,31,31,30,31,30,31][m];m+=1;d=v.replace(p,'$1')*1;if(d>a)return(0);v=v.replace(/[^0-9]/g,'');if(v.length<8)return(0);break;case'fon':if(!v.match(/(?:\s+?)/))return(0);v=v.replace(/[^0-9]/g,'');if(v.length!=10)return(0);break;default:if(!d.length||!rex[1].length)return(1);p=new RegExp(rex[1],'ig');v=v.replace(p,'');return(v.length==d);}}}
return(1);}
function checkForm(obj){for(var i=0;i<obj.length;++i){if(!elChk(obj.elements[i])){elErr(obj.elements[i]);elFl(obj.elements[i]);obj[obj.elements[i].name].focus();return(false);}}
return(true);}
function subF(n){var obj=document.forms[n];if(obj!=undefined&&checkForm(obj))obj.submit();return(0);}
function num3(i){try{n=i.value;if(n.match(/[^0-9 ]/))elFl(i);}catch(e){};if(n==undefined)n=i+'';n=n.replace(/([^0-9])/g,'');n=new Array(4-n.length%3).join("\t")+n;n=n.replace(/([0-9\t]{3})/g,"$1 ").replace(/\s+$/,'').replace(/^\s+/,'');try{i.value=n;}catch(e){}return(n);}
function dtf3(i){try{n=i.value;}catch(e){};if(n==undefined)n=i+'';var p=elWld('dts');p=new RegExp('^'+p[0]+'$','i');var y=n.replace(p,'$3')*1;var m=n.replace(p,'$2')*1;var d=n.replace(p,'$1')*1;n=d+m+y;if(!isFinite(n)){try{i.value='';elFl(i);}catch(e){}return('');}
if(y<100)y+=y>30?1900:2000;n=(d<10?'0':'')+d+'.'+(m<10?'0':'')+m+'.'+y;try{i.value=n;}catch(e){}return(n);}
function sHi(i){var div=i.parentNode.getElementsByTagName("span")[0];div.style.display=(div.style.display=='inline'?'none':'inline');}
function sDiv(a){var div=a.parentNode.getElementsByTagName("div")[0];if(div.style.display=="block"){div.style.display="none";a.innerHTML=a.innerHTML.replace(String.fromCharCode(9650),String.fromCharCode(9660));}else{div.style.display="block";a.innerHTML=a.innerHTML.replace(String.fromCharCode(9660),String.fromCharCode(9650));}}
function sDoo(d,t){if(t==null)t=!(document.getElementById(d).style.display=='none');document.getElementById(d).style.display=(t?'block':'none');}
function getCookie(name){var matches=document.cookie.match(new RegExp("(?:^|; )"+name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,'\\$1')+"=([^;]*)"));return(matches?decodeURIComponent(matches[1]):undefined);}
function setCookie(name,value,props){props=props||{}
var exp=props.expires;if(typeof(exp)=="number"&&exp){var d=new Date();d.setTime(d.getTime()+exp*1000);exp=props.expires=d;}
if(exp&&exp.toUTCString){props.expires=exp.toUTCString()}
value=encodeURIComponent(value);var updatedCookie=name+"="+value;for(var propName in props){updatedCookie+="; "+propName;var propValue=props[propName];if(propValue!==true){updatedCookie+="="+propValue}}
document.cookie=updatedCookie;}
function delCookie(name){setCookie(name,null,{expires:-1})}
function evtAdd(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true;}else if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r;}
return false;}
function evtDel(obj,evType,fn,useCapture){if(obj.removeEventListener){obj.removeEventListener(evType,fn,useCapture);return true;}else if(obj.detachEvent){var r=obj.detachEvent("on"+evType,fn);return r;}}
function evtLoad(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}
function ajas(q,cb,ui){if(arguments.length<2)cb='call.back.htm';if(arguments.length<3)ui='alert';else eval(ui+'()');var script=document.createElement('script');lok=0;function check(){if(!lok)eval(ui+'("Ошибка загрузки")');document.body.removeChild(script);return(true);}
script.onreadystatechange=function(){if(this.readyState=='complete'||this.readyState=='loaded'){setTimeout(check,0);}}
script.onload=script.onerror=check;script.type='text/javascript';script.src='http://'+window.location.host+'/'+cb+'?'+q;document.body.appendChild(script);return(true);}
function winUrl(url,w,h){ScrWidth=screen.width;x=(ScrWidth/2)-(w/2);ScrHeight=screen.height;y=(ScrHeight/2)-(h/2);PWin=window.open(url,'PW','left='+x+', top='+y+',width='+w+', height='+h+', toolbar=0, status=0, menubar=0, minimize=0, resizable=1, scrollbars=1');if(pww>0&&(pww!=w||pwh!=h)){PWin.resizeTo(w,h+50);PWin.moveTo(x,y);}PWin.focus();pww=w;pwh=h;return(false);}
function winTop(){window.scrollTo(0,0);return(1);}
function openWin(url,w,h){ScrWidth=screen.width;x=(ScrWidth/2)-(w/2);ScrHeight=screen.height;y=(ScrHeight/2)-(h/2);PWin=window.open(url,'PW','left='+x+', top='+y+',width='+w+', height='+h+', toolbar=0, status=0, menubar=0, minimize=0, resizable=1, scrollbars=1');if(pww>0&&(pww!=w||pwh!=h)){PWin.resizeTo(w,h+50);PWin.moveTo(x,y);}PWin.focus();pww=w;pwh=h;return(false);}
function setTown(sel){var town=sel.options[sel.selectedIndex].value;setCookie('town',town,{expires:31536000,path:'/'});window.location.reload();}
-->