nav=navigator.appName.indexOf("Microsoft")!=-1?1:2;
function popup(a,b,c,d,e,g,f){c=Math.min(screen.availWidth,c);d=Math.min(screen.availHeight-40,d);newwin=window.open(a,b,"scrollbars="+e+", menubar=no, width="+c+", height="+d+", resizable="+(f?"yes":"no")+",toolbar=no, left="+(screen.availWidth-c)/2+", top="+(screen.availHeight-d-30)/2+", location=no, status=yes");g&&(popInt=setInterval(function(){if(typeof newwin.name=="string"){if(newwin.document.body)openerfocus=function(){typeof newwin.name=="string"?newwin.focus():document.body.onfocus=null},
document.body.onfocus=openerfocus,newwin.window.document.body.onunload=function(){alert(66)},newwin.focus(),clearInterval(popInt)}else clearInterval(popInt)},1))}function hex2rgb(a){return[a>>16,a>>8&255,a&255]}
function formatNumber(a,b,c,d){if(b==void 0)b=2;else if(b<0)var b=Math.abs(b),e=1;else e=0;c=c==null?".":c;d=d==null?",":d;a=String(a).split(".");nat=a[0];a[0]="";a[1]==null&&(a[1]="");if(e)for(e=a[1].length;e<b;e++)a[1]+="0";for(e=nat.length;e>0;e-=3)a[0]=nat.substr(Math.max(e-3,0),3+Math.min(e-3,0))+d+a[0];a[0]=a[0].substr(0,a[0].length-d.length);return a[0]+(a[1]!=""?(b>0?c:"")+a[1].substr(0,b):"")}
function formatSize(a,b,c){b=b==null?".":b;c=c==null?",":c;$sizes={TB:Math.pow(1024,4),GB:Math.pow(1024,3),MB:Math.pow(1024,2),KB:1024};for($key in $sizes)if(a>=($value=$sizes[$key]))return formatNumber(a/$value,3-(Math.floor(a/$value)+"").length,b,c)+" "+$key;return formatNumber(a,0,"",c)+" B"}
function backgroundTrans(a,b,c,d,e){d==void 0&&(d="bgColor");clearInterval(a.interval);var g=b,b=hex2rgb(Number("0x"+b.substr(1))),f=hex2rgb(Number("0x"+a[d].substr(1))),h=0;a.stopTrans=function(){clearInterval(this.interval)};a.endTrans=function(){this.stopTrans();this[d]=g;e!=null&&e()};var i=function(){h+=50;if(h>=c)a.endTrans();else{var e=parseInt(f[0]+h*(b[0]-f[0])/c)*65536;e+=parseInt(f[1]+h*(b[1]-f[1])/c)*256;e+=parseInt(f[2]+h*(b[2]-f[2])/c);e=e.toString(16);try{a[d]="#"+e}catch(g){}}};a.interval=
setInterval(i,10);i()}
function bgTrans(a,b,c,d,e){a.style.backgroundColor=b;clearInterval(a.interval);var g=c,c=hex2rgb(Number("0x"+c.substr(1))),f=hex2rgb(Number("0x"+b.substr(1))),h=0;a.stopTrans=function(){clearInterval(this.interval)};a.endTrans=function(){this.stopTrans();this.style.backgroundColor=g;e!=null&&e()};b=function(){h+=50;if(h>=d)a.endTrans();else{var b=parseInt(f[0]+h*(c[0]-f[0])/d)*65536;b+=parseInt(f[1]+h*(c[1]-f[1])/d)*256;b+=parseInt(f[2]+h*(c[2]-f[2])/d);b=b.toString(16);try{a.style.backgroundColor="#"+
b}catch(e){}}};a.interval=setInterval(b,10);b()}function addOption(a,b,c){b=new Option(b,c);a.options[a.length]=b}function deleteOption(a,b){a.length>0&&(a.options[b]=null)}
function moveOptions(a,b,c){for(var c=c==null?0:c,d=[],e=[],g=0,f=a.length-1;f>=0;f--)if(a.options[f].selected)d[g]=a.options[f].text,e[g]=a.options[f].value,c!=1&&deleteOption(a,f),g++;if(c<2)for(f=g-1;f>=0;f--){if(c==1){for(var h=g=0;h<b.options.length;h++)if(b.options[h].value==e[f]){g=1;break}if(g)continue}addOption(b,d[f],e[f])}if(a.onchange)a.onchange();if(b.onchange)b.onchange()}function isBisYear(a){return a%4==0&&a%100!=0||a%400==0}
function correctDate(a,b){var c=[31,31,29,31,30,31,30,31,31,30,31,30,31];c[2]=isBisYear(a[b+"[0]"].value)?29:28;c=c[Number(a[b+"[1]"].value)];if(a[b+"[2]"].value>c)try{a[b+"[2]"].selectedIndex=c-(a[b+"[2]"].options.length==31?1:0)}catch(d){}}
Array.prototype.find=function(a,b){a.length==void 0||typeof a!="object"?(a=[a],single=!0):single=!1;var c=[];if(b==void 0)for(var d=0;d<a.length;d++){c[d]=-1;toFind=a[d];for(var e=0;e<this.length;e++)if(this[e]==toFind){c[d]=e;break}}else for(d=0;d<a.length;d++){c[d]=[];toFind=a[d];for(e=0;e<this.length;e++)this[e]==toFind&&c[d].push(e);c[d][0]==void 0&&(c[d]=-1)}return single?c[0]:c};
function writeFlash(a,b,c,d,e,g,f,h,i,j){document.getElementById(a).innerHTML='<object charset="UTF-8" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="'+g+'" width="'+c+'" height="'+d+'" style="'+j+'" flashvars="'+f+'"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+b+'" /><param name="quality" value="high" /><param name="allowFullScreen" value="true" /><param name="bgcolor" value="'+
e+'" /><param name="flashVars" value="'+f+'" />'+(i==0||i==1?'<param name="menu" value="'+i+'" />':"")+(h?'<param name="wmode" value="transparent" />':"")+'<embed style="'+j+'" name="'+g+'" src="'+b+'" quality="high" allowFullScreen="true" bgcolor="'+e+'" width="'+c+'" height="'+d+'" flashVars="'+f+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'}
function updateCounter(a,b,c,d){var e=c-a.value.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n").length;b.value!=null?b.value=e:b.innerHTML=e;if(d&&e<=0)a.value=a.value.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n").substr(0,c);b.style.color=e<0?"#ff0000":"#6699cc"}function isNumberKey(a){a=a.which?a.which:event.keyCode;return a<31||a>48&&a<57}
arr_escape={"\u0103":"%C4%83","\u0102":"%C4%82","\u00ee":"%C3%AE","\u00ce":"%C3%8E","\u00e2":"%C3%A2","\u00c2":"%C3%82","\u015f":"%C5%9F","\u015e":"%C5%9E","\u0163":"%C5%A3","\u0162":"%C5%A2","\u0162":"%C5%A2","+":"%2B","/":"%2F"};function rawurlencode(a){for(var b="",c=0;c<a.length;c++){var d=a.charAt(c);b+=arr_escape[d]!=void 0?arr_escape[d]:escape(d)}return b}function rawurldecode(a){for(var b in arr_escape)a=a.replace(RegExp(arr_escape[b],"g"),b);return unescape(a)}
function setCookie(a,b,c,d,e,g){if(c){var f=new Date;f.setTime(c*1E3);c=f.toGMTString()}document.cookie=a+"="+escape(b)+(c?"; expires="+c:"")+(d?"; path="+d:"")+(e?"; domain="+e:"")+(g?"; secure":"")}function mailTo(a){for(var a=decodeURIComponent(a),b="",c=a.length-1;c>=0;c--)b+=a.charAt(c);document.location="mailto:"+b}
function isValid(a,b,c){switch(b){case "novoid":$valid=a.trim()!="";break;case "nonull":$valid=a!="";break;case "name":$valid=a.trim().match(/^[^`~!@#$%^&*()_=+\[{\]}\\|;:'",<.>\/?]+$/);break;case "username":$valid=a.match(/^[^\s]+$/i);break;case "email":$valid=a.match(/^([-0-9a-z_~%+]+[-\.0-9a-z_~%+]*[-0-9a-z_~%+]+|[-0-9a-z_~%+])@[-0-9a-z_~]+(\.[-0-9a-z_~]+)*\.[0-9a-z_]{2,5}$/i);break;case "int":$valid=a.match(/^\-?[0-9]+$/);break;case "int+":$valid=a.match(/^[0-9]+$/);break;case "float":$valid=
a.match(/^[0-9\-]+((,|\.)[0-9\-]+)?$/);break;case "float+":$valid=a.match(/^\-?[0-9\-]+((,|\.)[0-9\-]+)?$/);break;case "phone":$valid=a.trim().match(/^\+?([0-9]+[\s\-\.]?)*[0-9]+$/);break;case "password":$valid=a.length>=6&&a.length<=50&&a.match(/[0-9].*[a-z]|[a-z].*[0-9]/i);break;case "nozero":$valid=a!="0";break;default:b=b.match(/\/(.*)\/(.*)/),$valid=b!=null?a.match(RegExp(b[1],b[2])):null}return a==""&&c||Number($valid)!=0};

