var browser=new __BrowserType();var dragObj=new Object();var __dataSetArr=new Array();var __dataSetArrTxt=new Array();var __PathVxlAjax='/VoxelAjax';var __HandlerExtension='ashx';VoxelAjax={Data:0,DataGrid:1,ObjPlayer:2,Util:3,UI:4,Cookies:5,Xml:6};Using=function(enumNamespace){var scriptFile=new Array();switch(enumNamespace){case VoxelAjax.Xml:scriptFile[scriptFile.length]='_____vlxAjaxXml';case VoxelAjax.Data:scriptFile[scriptFile.length]='_____vlxAjaxDataSet';scriptFile[scriptFile.length]='_____vlxAjaxDataTable';break;case VoxelAjax.Cookies:scriptFile[scriptFile.length]='_____vlxAjaxCookies';break;case VoxelAjax.DataGrid:scriptFile[scriptFile.length]='_____vlxAjaxDataGrid';break;case VoxelAjax.ObjPlayer:scriptFile[scriptFile.length]='_____vlxAjaxObjPlayer';break;case VoxelAjax.Util:scriptFile[scriptFile.length]='_____vlxAjaxUtil';scriptFile[scriptFile.length]='_____vlxAjaxHashtable';break;case VoxelAjax.UI:scriptFile[scriptFile.length]='_____vlxAjaxUI';break}var scriptTag='';for(var i=0;i<scriptFile.length;i++){scriptTag+='<script language=\'javascript\' type=\'text/javascript\' src=\''+__PathVxlAjax+'/'+scriptFile[i]+'.'+__HandlerExtension+'\'></script>'}document.writeln(scriptTag)};Function.prototype.inherits=function(parentClass){this.prototype.base={};var sConstructor=parentClass.toString();var aMatch=sConstructor.match(/\s*function (.*)\(/);if(aMatch!=null){this.prototype[aMatch[1]]=parentClass}for(var m in parentClass.prototype){this.prototype[m]=parentClass.prototype[m];this.prototype.base[m]=parentClass.prototype[m]}};__ExecAjaxMethod=function(args,urlAjax){var ajx=new Ajax();var args_post='';args_fnc=null;for(var i=0;i<args.length;i++){if(args[i]==null){if(i>0){args_post+=','}args_post+='null'}else{if(i>0&&args[i].GetType()!='Function'){args_post+=','}switch(args[i].GetType()){case'Function':args_fnc=args[i];break;case'System.Collections.Hashtable':case'System.Text.StringBuilder':case'System.Data.DataTable':case'System.Data.DataSet':case'System.Array':args_post+=args[i].___CSharpSerializer().replace(/,/g,'$VIRG$');break;case'System.DateTime':args_post+=args[i].___CSharpSerializer();break;default:args_post+=args[i].toString().replace(/,/g,'$VIRG$')}}}return ajx.request(urlAjax,args_fnc,args_post.replace(/\\+/g,'$MAIS$').replace(/&/g,'$ECOM$'),10,'POST')};var events={KEY_BACKSPACE:8,KEY_TAB:9,KEY_ENTER:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DEL:46,getElementLeft:function(Elem){var elem=Elem;xPos=elem.offsetLeft;tempEl=elem.offsetParent;while(tempEl!=null){try{xPos+=tempEl.offsetLeft;tempEl=tempEl.offsetParent}catch(e){}}return xPos},getElementTop:function(Elem){var elem=Elem;yPos=elem.offsetTop;tempEl=elem.offsetParent;while(tempEl!=null){try{yPos+=tempEl.offsetTop;tempEl=tempEl.offsetParent}catch(e){}}return yPos},getSel:function(){var txt='';var foundIn='';if(window.getSelection){txt=window.getSelection()}else if(document.getSelection){txt=document.getSelection()}else if(document.selection){txt=document.selection.createRange().text}else return;return txt},element:function(event){return event.target||event.srcElement},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)))},isRightClick:function(event){return(((event.which)&&(event.which==2))||((event.which)&&(event.which==3))||((event.button)&&(event.button==2))||((event.button)&&(event.button==3)))},pointerX:function(event){return event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(event){return event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop))}};Number.prototype.GetType=function(){if(parseInt(this)==this){return'System.Int32'}else{return'System.Float'}};Number.prototype.extenso=function(c){var _this=this.toString().replace(/\./g,',');var ex=[['zero','um','dois','três','quatro','cinco','seis','sete','oito','nove','dez','onze','doze','treze','quatorze','quinze','dezesseis','dezessete','dezoito','dezenove'],['dez','vinte','trinta','quarenta','cinqüenta','sessenta','setenta','oitenta','noventa'],['cem','cento','duzentos','trezentos','quatrocentos','quinhentos','seiscentos','setecentos','oitocentos','novecentos'],['mil','milhão','bilhão','trilhão','quadrilhão','quintilhão','sextilhão','setilhão','octilhão','nonilhão','decilhão','undecilhão','dodecilhão','tredecilhão','quatrodecilhão','quindecilhão','sedecilhão','septendecilhão','octencilhão','nonencilhão']];var a,n,v,i,n=_this.replace(c?/[^,\d]/g :/\D/g,'').split(','),e=' e ',$='real',d='centavo';for(var f=n.length-1,l,j=-1,r=[],s=[],t='';++j<=f;s=[]){j&&(n[j]=(('.'+n[j])*1).toFixed(2).slice(2));if(!(a=(v=n[j]).slice((l=v.length)%3).match(/\d{3}/g),v=l%3?[v.slice(0,l%3)]:[],v=a?v.concat(a):v).length)continue;for(a=-1,l=v.length;++a<l;t=''){if(!(i=v[a]*1))continue;i%100<20&&(t+=ex[0][i%100])||i%100+1&&(t+=ex[1][(i%100/10>>0)-1]+(i%10?e+ex[0][i%10]:''));s.push((i<100?t:!(i%100)?ex[2][i==100?0:i/100>>0]:(ex[2][i/100>>0]+e+t))+((t=l-a-2)>-1?' '+(i>1&&t>0?ex[3][t].replace('ão','ões'):ex[3][t]):''))}a=(s.length>1?(a=s.pop(),s.join(' ')+' e '+a):s.join('')||((!j&&(n[j+1]*1>0)||r.length)?'':ex[0][0]));a&&r.push(a+(c?(' '+(v.join('')*1>1?j?d+'s':$.replace('l','is'):j?d:$)):''))}return r.join(e)};Number.prototype.FormatNumber=function(decimalNum,bolCommas,bolLeadingZero,bolParens){var tmpNum=this;var iSign=this<0?-1:1;tmpNum*=Math.pow(10,decimalNum);tmpNum=Math.round(Math.abs(tmpNum));tmpNum/=Math.pow(10,decimalNum);tmpNum*=iSign;var tmpNumStr=new String(tmpNum);if(!bolLeadingZero&&this<1&&this>-1&&this!=0)if(this>0)tmpNumStr=tmpNumStr.substring(1,tmpNumStr.length);else tmpNumStr='-'+tmpNumStr.substring(2,tmpNumStr.length);tmpNumStr=tmpNumStr.replace('.',',');if(bolCommas&&(this>=1000||this<=-1000)){var iStart=tmpNumStr.indexOf(',');if(iStart<0)iStart=tmpNumStr.length;iStart-=3;while(iStart>=1){tmpNumStr=tmpNumStr.substring(0,iStart)+'.'+tmpNumStr.substring(iStart,tmpNumStr.length);iStart-=3}}if(bolParens&&this<0)tmpNumStr='('+tmpNumStr.substring(1,tmpNumStr.length)+')';var decimalDif,trail;var decimalPoint=tmpNumStr.lastIndexOf(',');if(decimalPoint>-1){decimalDif=decimalNum-(tmpNumStr.length-decimalPoint-1);trail=''}else{decimalDif=decimalNum;trail=','}if(decimalDif>0){while(decimalDif>0){trail+='0';decimalDif--}tmpNumStr+=trail}return tmpNumStr};Function.prototype.GetType=function(){return'Function'};Boolean.prototype.GetType=function(){return'System.Boolean'};Array.prototype.indexOf=function(v,b,s){for(var i=+b||0,l=this.length;i<l;i++){if(this[i]===v||s&&this[i]==v){return i}}return-1};Array.prototype.copy=function(){var i=0;var b=new Array();for(i;i<this.length;i++){b[i]=(typeof this[i].copy!='undefined')?this[i].copy():this[i]}return b};Array.prototype.Count=function(){return this.length};Array.prototype.contains=function(value){var i=this.length;if(i>0){do{if(this[i]===value){return true}}while(i--)}return false};Array.prototype.insert=function(i,v){this.splice(i,0,v)};Array.prototype.remove=function(i){this.splice(i,1)};Array.prototype.Remove=function(i){this.remove(i)};Array.prototype.lastIndexOf=function(v,b,s){b=+b||0;var i=this.length;while(i-->b){if(this[i]===v||s&&this[i]==v){return i}}return-1};Array.prototype.random=function(r){var i=0,l=this.length;if(!r){r=this.length}else if(r>0){r=r%l}else{i=r;r=l+r%l}return this[Math.floor(r*Math.random()-i)]};Array.prototype.shuffle=function(b){var i=this.length,j,t;while(i){j=Math.floor((i--)*Math.random());t=b&&typeof this[i].shuffle!=='undefined'?this[i].shuffle():this[i];this[i]=this[j];this[j]=t}return this};Array.prototype.unique=function(b){var a=[],i,l=this.length;for(i=0;i<l;i++){if(a.indexOf(this[i],0,b)<0){a.push(this[i])}}return a};Array.prototype.GetType=function(){return'System.Array'};Array.prototype.___CSharpSerializer=function(){var result=new StringBuilder();for(var i=0;i<this.length;i++){if(i>0){result.Append('$ARRAYSEP$')}if(this[i]!=null){if(this[i].GetType()=='System.DateTime'){result.Append(this[i].___CSharpSerializer())}else{result.Append(this[i])}}else{result.Append('null')}}return result.ToString()};Date.prototype.GetType=function(){return'System.DateTime'};Date.IsDate=function(year,month,day){var date=new Date(month+'/'+day+'/'+year);if(isNaN(date)){return false}else{return(date.getFullYear()==year&&date.getMonth()+1==month&&date.getDate()==day)}};Date.prototype.toString=function(stringFormat){var months=new Array('janeiro','fevereiro','março','abril','maio','junho','julho','agosto','setembro','outubro','novembro','dezembro');var weekdays=new Array('domingo','segunda-feira','terça-feira','quarta-feira','quinta-feira','sexta-feira','sábado');if(stringFormat!=null&&stringFormat.length>0){var sb=new StringBuilder();var part=stringFormat.charAt(0);var i=0;while(i<stringFormat.length){if(part=='\\'){sb.Append(stringFormat.charAt(++i));part=stringFormat.charAt(++i)}else{if(i+1<stringFormat.length&&stringFormat.charAt(i)==stringFormat.charAt(i+1)){part+=stringFormat.charAt(++i)}else{switch(part){case'y':case'yyyy':sb.Append(this.getFullYear());break;case'yy':sb.Append(this.getFullYear().toString().right(2));break;case'M':sb.Append(this.getMonth()+1);break;case'MM':sb.Append(((this.getMonth()+1)<10?'0':'')+(this.getMonth()+1));break;case'MMM':sb.Append(months[this.getMonth()].left(3));break;case'MMMM':sb.Append(months[this.getMonth()]);break;case'd':sb.Append(this.getDate());break;case'dd':sb.Append((this.getDate()<10?'0':'')+this.getDate());break;case'ddd':sb.Append(weekdays[this.getDay()].left(3));break;case'dddd':sb.Append(weekdays[this.getDay()]);break;case'H':sb.Append(this.getHours());break;case'HH':sb.Append((this.getHours()<10?'0':'')+this.getHours());break;case'h':var h=this.getHours()%12;sb.Append(h==0?12:h);break;case'hh':var h=this.getHours()%12;sb.Append(h==0?12:(h<10?'0':'')+h);break;case'm':sb.Append(this.getMinutes());break;case'mm':sb.Append((this.getMinutes()<10?'0':'')+this.getMinutes());break;case's':sb.Append(this.getSeconds());break;case'ss':sb.Append((this.getSeconds()<10?'0':'')+this.getSeconds());break;case'f':sb.Append(this.getMilliseconds().toString().left(1));break;case'ff':sb.Append((this.getMilliseconds()<10?'0':'')+this.getMilliseconds().toString().left(2));break;case'fff':sb.Append((this.getMilliseconds()<10?'00':this.getMilliseconds()<100?'0':'')+this.getMilliseconds());break;case't':sb.Append(this.getHours()>=12?'P':'A');break;case'tt':sb.Append(this.getHours()>=12?'PM':'AM');break;default:sb.Append(part)}part=stringFormat.charAt(++i)}}}return(isNaN(this)?null:sb.ToString())}else{if(isNaN(this)){return null}else{if(this.getHours()==0&&this.getMinutes()==0&&this.getSeconds()==0&&this.getMilliseconds()==0){return(this.getDate()<10?'0':'')+this.getDate()+'/'+((this.getMonth()+1)<10?'0':'')+(this.getMonth()+1)+'/'+this.getFullYear()}else{return(this.getDate()<10?'0':'')+this.getDate()+'/'+((this.getMonth()+1)<10?'0':'')+(this.getMonth()+1)+'/'+this.getFullYear()+' '+(this.getHours()<10?'0':'')+this.getHours()+':'+(this.getMinutes()<10?'0':'')+this.getMinutes()+':'+(this.getSeconds()<10?'0':'')+this.getSeconds()+'.'+(this.getMilliseconds()<10?'00':this.getMilliseconds()<100?'0':'')+this.getMilliseconds()}}}};Date.Parse=function(stringDate,stringFormat){if(stringFormat!=null&&typeof stringDate=='string'&&stringFormat.trim().length>0&&stringDate.trim().length>0){var year,month,day,hours,minutes,seconds,milliseconds;year=month=day=hours=minutes=seconds=milliseconds=0;var ampm=null;var sb=new StringBuilder();var part=stringFormat.charAt(0);var i,j;i=j=0;while(i<stringFormat.length){if(part=='\\'){sb.Append(stringFormat.charAt(++i));part=stringFormat.charAt(++i)}else{if(i+1<stringFormat.length&&stringFormat.charAt(i)==stringFormat.charAt(i+1)){part+=stringFormat.charAt(++i)}else{switch(part){case'y':case'yy':case'yyyy':year=stringDate.substr(j,part.length);break;case'M':case'MM':month=stringDate.substr(j,part.length);break;case'd':case'dd':day=stringDate.substr(j,part.length);break;case'H':case'HH':case'h':case'hh':hours=stringDate.substr(j,part.length);break;case'm':case'mm':minutes=stringDate.substr(j,part.length);break;case's':case'ss':seconds=stringDate.substr(j,part.length);break;case'f':case'ff':case'fff':milliseconds=stringDate.substr(j,part.length);break;case't':case'tt':ampm=stringDate.substr(j,part.length).left(1);break;default:}j+=part.length;part=stringFormat.charAt(++i)}}}var date=new Date();if(ampm!=null){if(ampm.toUpperCase()=='P'&&hours!=12){hours=parseInt(hours)+12}else if(hours==12&&ampm.toUpperCase()=='A'){hours=0}}date.setFullYear(year,month-1,day);date.setHours(hours,minutes,seconds,milliseconds);if(!isNaN(date)){return date}}return null};Date.prototype.__AddDate=function(y,m,d,h,mn,s,ms){var date=new Date();date.setFullYear(this.getFullYear()+y,this.getMonth()+m,this.getDate()+d);date.setHours(this.getHours()+h,this.getMinutes()+mn,this.getSeconds()+s,this.getMilliseconds()+ms);return date};Date.prototype.AddYears=function(n){return this.__AddDate(n,0,0,0,0,0,0)};Date.prototype.AddMonths=function(n){return this.__AddDate(0,n,0,0,0,0,0)};Date.prototype.AddDays=function(n){return this.__AddDate(0,0,n,0,0,0,0)};Date.prototype.AddHours=function(n){return this.__AddDate(0,0,0,n,0,0,0)};Date.prototype.AddMinutes=function(n){return this.__AddDate(0,0,0,0,n,0,0)};Date.prototype.AddSeconds=function(n){return this.__AddDate(0,0,0,0,0,n,0)};Date.prototype.AddMilliseconds=function(n){return this.__AddDate(0,0,0,0,0,0,n)};Date.Diff=function(stDate,edDate,ret){switch(ret){case'd':return Math.ceil((edDate.getTime()-stDate.getTime())/(24*60*60*1000));case'h':return Math.ceil((edDate.getTime()-stDate.getTime())/(60*60*1000));case'mm':return Math.ceil((edDate.getTime()-stDate.getTime())/(60*1000));case'ss':return Math.ceil((edDate.getTime()-stDate.getTime())/1000);default:return Math.ceil(edDate.getTime()-stDate.getTime())}};Date.prototype.___CSharpSerializer=function(){var result=new StringBuilder();result.Append(this.getFullYear()+'/');result.Append(this.getMonth()+'/');result.Append(this.getDate()+'/');result.Append(this.getHours()+'/');result.Append(this.getMinutes()+'/');result.Append(this.getSeconds()+'/');result.Append(this.getMilliseconds());return result.ToString()};String.prototype.isVisa=function(){return verifyCC(this,'Visa')};String.prototype.isMasterCard=function(){return verifyCC(this,'MasterCard')};String.prototype.isAmex=function(){return verifyCC(this,'Amex')};String.prototype.isDiners=function(){return verifyCC(this,'Diners')};String.prototype.isJCBCard=function(){return verifyCC(this,'JCBCard')};function verifyCC(inNumber,type){var total=0;var tmp=0;var number='';for(i=0;i<inNumber.length;i++){if(inNumber.charAt(i)>='0'&&inNumber.charAt(i)<='9'){number=number+inNumber.charAt(i)}else return false}if(number.length<13)return false;first=''+number.charAt(0);second=''+number.charAt(1);third=''+number.charAt(2);firstTwo=first+second;firstFour=firstTwo+third+number.charAt(3);if(type=='MasterCard'){if(first!='5'||second<'1'||second>'5')return false;if(number.length!=16)return false}else if(type=='Visa'){if(first!='4')return false;if(number.length!=13&&number.length!=16)return false}else if(type=='Amex'){if(first!='3'||(second!='4'&&second!='7'))return false;if(number.length!=15)return false}else if(type=='Diners'){if(firstTwo!='36'&&firstTwo!='38'&&(firstTwo!='30'||(third<'0'||third>'5')))return false;if(number.length!=14)return false}else if(type=='JCBCard'){if(firstFour!='2131'&&firstFour!='1800'&&(first!='3'))return false;if(number.length!=16&&first=='3')return false;if(number.length!=15&&first!='3')return false}for(loc=number.length-2;loc>=0;loc-=2){total+=1*number.charAt(loc+1);tmp=number.charAt(loc)*2;if(tmp>9)total+=1;total+=tmp%10}if(number.length%2>0)total+=1*number.charAt(0);if(total%10==0)return true;else return false};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'')};String.Empty=function(){return''};String.prototype.trimStart=function(){return this.replace(/^\s*/,'')};String.prototype.trimEnd=function(){return this.replace(/\s*$/,'')};String.prototype.startsWith=function(s){return(this.substr(0,s.length)==s)};String.prototype.endsWith=function(str){return(this.length-str.length)==this.lastIndexOf(str)};String.prototype.reverse=function(){var s='';var i=this.length;while(i>0){s+=this.substring(i-1,i);i--}return s};String.prototype.mid=function(ini,tam){if(this==null)return(false);if(ini>this.length)return'';if(tam==null||tam.length==0)return(false);return this.substr((ini-1),tam)};String.prototype.stripTags=function(){return this.replace(/<\/?[^>]+>/gi,'')};String.prototype.mask=function(m){var m,l=(m=m.split('')).length,s=this.split(''),j=0,h='';for(var i=-1;++i<l;)if(m[i]!='#'){if(m[i]=='\\'&&(h+=m[++i]))continue;h+=m[i];i+1==l&&(s[j-1]+=h,h='')}else{if(!s[j]&&!(h=''))break;(s[j]=h+s[j++])&&(h='')}return s.join('')+h};String.prototype.isCPF=function(){var c=this;if((c=c.replace(/[^\d]/g,'').split('')).length!=11)return false;if(new RegExp('^'+c[0]+'{11}$').test(c.join('')))return false;for(var s=10,n=0,i=0;s>=2;n+=c[i++]*s--);if(c[9]!=(((n%=11)<2)?0:11-n))return false;for(var s=11,n=0,i=0;s>=2;n+=c[i++]*s--);if(c[10]!=(((n%=11)<2)?0:11-n))return false;return true};String.prototype.isCNPJ=function(){var b=[6,5,4,3,2,9,8,7,6,5,4,3,2],c=this;if((c=c.replace(/[^\d]/g,'').split('')).length!=14)return false;for(var i=0,n=0;i<12;n+=c[i]*b[++i]);if(c[12]!=(((n%=11)<2)?0:11-n))return false;for(var i=0,n=0;i<=12;n+=c[i]*b[i++]);if(c[13]!=(((n%=11)<2)?0:11-n))return false;return true};String.prototype.capitalize=function(){return this.replace(/[\wàáâãäåæçèéêëìíîïñòóôõöùúûüýÿ]+/gi,function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()})};String.prototype.htmlEncode=function(){return this.toString().replace(/&/g,'&amp;').replace(/'/g,'&quot;').replace(/</g,'&lt;').replace(/>/g,'&gt;')};String.prototype.left=function(n){if(n<=0)return'';else if(n>String(this).length)return this;else return String(this).substring(0,n)};String.prototype.right=function(n){if(n<=0)return'';else if(n>String(this).length)return str;else{var iLen=String(this).length;return String(this).substring(iLen,iLen-n)}};String.prototype.___padLeftRight=function(str,length,isLeft){var lengthDiff=length-this.length;if(lengthDiff>0){var auxStr='';while(auxStr.length<lengthDiff){auxStr+=str}if(isLeft){auxStr+=this}else{auxStr=this+auxStr}if(auxStr.length>lengthDiff){if(isLeft){return auxStr.right(length)}else{return auxStr.left(length)}}else{return auxStr}}else{return this}};String.prototype.padLeft=function(str,length){return this.___padLeftRight(str,length,true)};String.prototype.padRight=function(str,length){return this.___padLeftRight(str,length,false)};String.Format=function(str){for(var i=1;i<arguments.length;i++){str=str.split('{'+(i-1)+'}').join(arguments[i])}return str};String.prototype.insertAt=function(s,p){while(p<0)p+=this.length;return(this.substring(0,p)+s+this.substr(p))};String.prototype.replaceAt=function(s,p){while(p<0)p+=this.length;return(this.substring(0,p)+s+this.substr(p+s.length))};String.prototype.clearAccents=function(){return this.replace(/[àáâãäåæçèéêëìíîïñòóôõöùúûüýÿ]/gi,function(e){var res=(e.match(/[àáâãäåæ]/i)?'a':e.match(/[èéêë]/i)?'e':e.match(/[ìíîï]/i)?'i':e.match(/[òóôõö]/i)?'o':e.match(/[ùúûü]/i)?'u':e.match(/[ç]/i)?'c':e.match(/[ñ]/i)?'n':'y');return(e.charCodeAt(0)>=224&&e.charCodeAt(0)<=255)?res:res.toUpperCase()})};String.prototype.GetType=function(){return'System.String'};var Request={QueryString:function(key){try{var qs=new __Querystring();return qs.get(key)}catch(e){return null}},Browser:browser,Url:{Directory:getURL().Dir,Domain:getURL().Domain,Path:getURL().Path,Page:{Name:getURL().Page,Extension:getURL().Ext},IsSecure:getURL().IsSecure,Arguments:getURL().Args}};function getURL(){var uri=new Object();uri.Dir=location.href.substring(0,location.href.lastIndexOf('\/'));uri.Domain=uri.Dir;if(uri.Domain.substr(0,7)=='http:\/\/')uri.Domain=uri.Domain.substr(7);uri.Path='';var pos=uri.Domain.indexOf('\/');if(pos>-1){uri.Path=uri.Domain.substr(pos+1);uri.Domain=uri.Domain.substr(0,pos)};uri.Page=location.href.substring(uri.Dir.length+1,location.href.length+1);uri.IsSecure=(location.href.substr(0,7).indexOf('https:')<0?false:true);pos=uri.Page.indexOf('?');if(pos>-1){uri.Page=uri.Page.substring(0,pos)};pos=uri.Page.indexOf('#');if(pos>-1){uri.Page=uri.Page.substring(0,pos)};uri.Ext='';pos=uri.Page.indexOf('.');if(pos>-1){uri.Ext=uri.Page.substring(pos+1);uri.Page=uri.Page.substr(0,pos)};uri.File=uri.Page;if(uri.Ext!='')uri.File+='.'+uri.Ext;if(uri.File=='')uri.Page='index';uri.Args=location.search.substr(1).split('?');return uri};function __Querystring(qs){this.params=new Object();if(qs==null)qs=location.search.substring(1,location.search.length);if(qs.length==0)return;qs=qs.replace(/\+/g,' ');var args=qs.split('&');for(var i=0;i<args.length;i++){var value;var pair=args[i].split('=');var name=unescape(pair[0]);if(pair.length==2)value=unescape(pair[1]);else value=name;this.params[name]=value}this.get=function(key,default_){if(default_==null)default_=null;var value=this.params[key];if(value==null)value=default_;return value}};function __BrowserType(){var ua,s,i;this.Type={IsIE:false,IsNS:false,IsFirefox:false,IsOpera:false,IsSafari:false};this.Version=null;this.Name=null;ua=navigator.userAgent;s='Opera';if((i=ua.indexOf(s))>=0){this.Type.IsOpera=true;this.Name='Opera';this.Version=parseFloat(ua.substr(i+s.length));return}s='MSIE';if((i=ua.indexOf(s))>=0){this.Type.IsIE=true;this.Name='IE';this.Version=parseFloat(ua.substr(i+s.length));return}s='Firefox';if((i=ua.indexOf(s))>=0){this.Type.IsFirefox=true;this.Name='Firefox';this.Version=parseFloat(ua.substr((i+s.length)+1));return}s='Netscape';if((i=ua.indexOf(s))>=0){this.Type.IsNS=true;this.Name='Netscape';this.Version=parseFloat(ua.substr((i+s.length)+1));return}s='Gecko';if((i=ua.indexOf(s))>=0){this.Type.IsGecko=true;this.Name='Other(Gecko)';this.Version=0;return}};addEvent=function(o,e,f,s){var r=o[r='_'+(e='on'+e)]=o[r]||(o[e]?[[o[e],o]]:[]),a,c,d;r[r.length]=[f,s||o],o[e]=function(e){try{(e=e||event).preventDefault||(e.preventDefault=function(){e.returnValue=false});e.stopPropagation||(e.stopPropagation=function(){e.cancelBubble=true});e.target||(e.target=e.srcElement||null);e.key=(e.which+1||e.keyCode+1)-1||0}catch(f){}for(d=1,f=r.length;f;r[--f]&&(a=r[f][0],o=r[f][1],a.call?c=a.call(o,e):(o._=a,c=o._(e),o._=null),d&=c!==false));return e=null,!!d}};removeEvent=function(o,e,f,s){for(var i=(e=o['_on'+e]||[]).length;i;)if(e[--i]&&e[i][0]==f&&(s||o)==e[i][1])return delete e[i];return false};var execTry=function(){var returnValue;for(var i=0;i<arguments.length;i++){var lambda=arguments[i];try{returnValue=lambda();break}catch(e){}}return returnValue};