var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;var isNs=(navigator.appName.indexOf("Netscape")!=-1);function defined(a){return typeof(a)!="undefined"&&a!=null}function ntpHotel(a){img=document.getElementById("nti"+a);rldr=document.getElementById("ntr"+a);if(img.attributes.chk.value==1){rldr.src="/user/notepad/hotel/json?al="+a+"&chk="+0+"&rnd="+Math.random();img.attributes.chk.value=0;img.src="/i/chf.gif"}else{rldr.src="/user/notepad/hotel/json?al="+a+"&chk="+1+"&rnd="+Math.random();img.attributes.chk.value=1;img.src="/i/cht.gif"}}function ShowWin(c,a,e,b,d){cx=screen.width/2-(a/2);cy=(screen.height/2-(e/2));d=(d=="no")?"no":"yes";window.open(c,b,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+a+",height="+e+",scrollbars="+d+",top="+cy+",left="+cx)}function ntpOffer(a){img=document.getElementById("nti"+a);rldr=document.getElementById("ntr"+a);if(img.attributes.chk.value==1){rldr.src="/user/notepad/offer/json?oid="+a+"&chk="+0+"&rnd="+Math.random();img.attributes.chk.value=0;img.src="/i/chf.gif"}else{rldr.src="/user/notepad/offer/json?oid="+a+"&chk="+1+"&rnd="+Math.random();img.attributes.chk.value=1;img.src="/i/cht.gif"}}function ShowPropWin(c,b,f){b=Math.round(screen.width*(b/100));f=Math.round(screen.height*(f/100));var a=(screen.width/2-(b/2));var e=(screen.height/2-(f/2));var d="yes";window.open(c,"","toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+b+",height="+f+",scrollbars="+d+",top="+e+",left="+a)}function loadPhoto(a){photo1=new Image();photo1.src=a;Control(a)}function Control(a){if((photo1.width!=0)&&(photo1.height!=0)){viewFoto(a)}else{tmpInterval=setTimeout("Control('"+a+"');",20)}}function viewFoto(a){w=photo1.width;h=photo1.height;tmpString="top="+((screen.height-h)/2)+",left="+((screen.width-w)/2)+",height="+h+",width="+w+",toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,resizable=yes";fin=window.open("","photo",tmpString);fin.document.open();fin.document.write("<html><head><title>�����������</title></head><body style='margin:0;padding:0'><a href='javascript: window.close();'><img src='"+a+"' border=0 alt='��������, ����� �������' title='��������, ����� �������'></a></body></html>");fin.document.close();fin.focus()}function addListener(a,c,b){if(a.attachEvent){a.attachEvent("on"+c,function(){b(window.event)})}else{if(a.addEventListener){a.addEventListener(c,b,false)}}}function passwordStrength(p){var d=0,k=p.length;if(k<4){return d}else{d=k*4}for(var m=2;m<=4;m++){var a=new RegExp(".{1,"+m+"}","g"),n=p.match(a),g={};if(n===null){break}var j=n.length,c=0;while(j--){if(typeof g[n[j]]=="undefined"){c++}}delete g;delete n;delete a;d=d-(Math.ceil(k/m)-c)}var q=(p.match(/[0-9]/g)||[]).length,b=(p.match(/[|!@#$%&*\/=?,;.:\-_+~^�\\]/g)||[]).length,o=(p.match(/[a-z]/g)||[]).length,f=(p.match(/[A-Z]/g)||[]).length,e=o+f;if(q>=3){d=d+5}if(b>=2){d=d+5}if(o>0&&f>0){d+=10}if(q>0&&b>0){d+=15}if(q>0&&e>0){d+=15}if(b>0&&e>0){d+=15}if(q==0&&b==0){d-=10}if(b==0&&e==0){d-=10}if(d<0){d=0}if(d>100){d=100}return d};
