/* 
 * More info at: http://phpjs.org
 * 
 * This is version: 2.94
 * php.js is copyright 2009 Kevin van Zonneveld.
 * 
 * Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
 * (http://kevin.vanzonneveld.net), Onno Marsman, Michael White
 * (http://getsprink.com), Waldo Malqui Silva, Paulo Ricardo F. Santos, Jack,
 * Jonas Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Ates
 * Goral (http://magnetiq.com), Legaev Andrey, Ratheous, Alex, Martijn
 * Wieringa, Nate, lmeyrick (https://sourceforge.net/projects/bcmath-js/),
 * Philippe Baumann, Enrique Gonzalez, Webtoolkit.info
 * (http://www.webtoolkit.info/), Theriault, Ash Searle
 * (http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek, Carlos
 * R. L. Rodrigues (http://www.jsfromhell.com), stag019, pilus,
 * http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
 * Michael Grier, marrtins, d3x, Andrea Giammarchi
 * (http://webreflection.blogspot.com), GeekFG (http://geekfg.blogspot.com),
 * Erkekjetter, Johnny Mast (http://www.phpvrouwen.nl), T.Wild, majak, David,
 * Oleg Eremeev, mdsjack (http://www.mdsjack.bo.it), Breaking Par Consulting
 * Inc
 * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
 * Mirek Slugen, Martin (http://www.erlenwiese.de/), Public Domain
 * (http://www.json.org/json2.js), Joris, Steven Levithan
 * (http://blog.stevenlevithan.com), Steve Hilder, KELAN, Arpad Ray
 * (mailto:arpad@php.net), T.J. Leahy, Marc Palau, Josh Fraser
 * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
 * gettimeofday, AJ, Aman Gupta, Felix Geisendoerfer
 * (http://www.debuggable.com/felix), Sakimori, Lars Fischer, Caio Ariede
 * (http://caioariede.com), Alfonso Jimenez (http://www.alfonsojimenez.com),
 * Pellentesque Malesuada, Tyler Akins (http://rumkin.com), gorthaur,
 * Thunder.m, Karol Kowalski, Kankrelune (http://www.webfaktory.info/), Frank
 * Forte, Subhasis Deb, duncan, Gilbert, class_exists, noname, Marco, madipta,
 * 0m3r, David James, Arno, Nathan, Mateusz "loonquawl" Zalega, ReverseSyntax,
 * Scott Cariss, Slawomir Kaniecki, Denny Wardhana, nobbler, sankai, Sanjoy
 * Roy, Douglas Crockford (http://javascript.crockford.com), mktime, marc
 * andreu, ger, john (http://www.jd-tech.net), Ole Vrijenhoek
 * (http://www.nervous.nl/), Steve Clay, Thiago Mata
 * (http://thiagomata.blog.com), Jon Hohle, Linuxworld, lmeyrick
 * (https://sourceforge.net/projects/bcmath-js/this.), Ozh, nord_ua, Pyerre,
 * Soren Hansen, Peter-Paul Koch (http://www.quirksmode.org/js/beat.html),
 * T0bsn, MeEtc (http://yass.meetcweb.com), Brad Touesnard, David Randall,
 * Bryan Elliott, Tim Wiel, XoraX (http://www.xorax.info), djmix, Paul, J A R,
 * Hyam Singer (http://www.impact-computing.com/), kenneth, T. Wild, Raphael
 * (Ao RUDLER), Marc Jansen, Francesco, Lincoln Ramsay, echo is bad, Der Simon
 * (http://innerdom.sourceforge.net/), Eugene Bulkin (http://doubleaw.com/),
 * LH, JB, Bayron Guevara, Cord, Francois, Kristof Coomans (SCK-CEN Belgian
 * Nucleair Research Centre), Pierre-Luc Paour, Martin Pool, Kirk Strobeck,
 * Saulo Vallory, Christoph, Artur Tchernychev, Wagner B. Soares, Valentina De
 * Rosa, Daniel Esteban, Jason Wong (http://carrot.org/), Rick Waldron,
 * Mick@el, Anton Ongson, Simon Willison (http://simonwillison.net), Gabriel
 * Paderni, Marco van Oort, Blues (http://tech.bluesmoon.info/), Luke Godfrey,
 * rezna, Tomasz Wesolowski, Eric Nagel, Pul, Bobby Drake, uestla, Alan C,
 * Yves Sucaet, sowberry, hitwork, Norman "zEh" Fuchs, Ulrich, johnrembo, Nick
 * Callen, ejsanders, Aidan Lister (http://aidanlister.com/), Brian Tafoya
 * (http://www.premasolutions.com/), Philippe Jausions
 * (http://pear.php.net/user/jausions), Orlando, dptr1988, HKM, metjay,
 * strcasecmp, strcmp, Taras Bogach, ChaosNo1, Alexander Ermolaev
 * (http://snippets.dzone.com/user/AlexanderErmolaev), Le Torbi, James, Chris,
 * DxGx, Pedro Tainha (http://www.pedrotainha.com), Philipp Lenssen,
 * penutbutterjelly, Greg Frazier, Tod Gentille, Alexander M Beedie,
 * FremyCompany, baris ozdil, FGFEmperor, Atli Þór, 3D-GRAF, jakes, gabriel
 * paderni, Yannoo, Luis Salazar (http://www.freaky-media.com/), Tim de
 * Koning, stensi, vlado houba, Jalal Berrami, date, Matteo, Victor, taith,
 * Robin, Matt Bradley, fearphage (http://http/my.opera.com/fearphage/),
 * Manish, davook, Benjamin Lupton, Russell Walker (http://www.nbill.co.uk/),
 * Garagoth, Andrej Pavlovic, Dino, Jamie Beck (http://www.terabit.ca/), DtTvB
 * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Christian
 * Doebler, setcookie, YUI Library:
 * http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Andreas,
 * Blues at http://hacks.bluesmoon.info/strftime/strftime.js, Greenseed,
 * mk.keck, Luke Smith (http://lucassmith.name), Rival, Diogo Resende, Allan
 * Jensen (http://www.winternet.no), Howard Yeend, Kheang Hok Chin
 * (http://www.distantia.ca/), Jay Klehr, Leslie Hoare, Ben Bryan, booeyOH,
 * Amir Habibi (http://www.residence-mixte.com/), Cagri Ekin
 * 
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */ 


// Compression: minified


function date(format,timestamp){var that=this;var jsdate=((typeof(timestamp)=='undefined')?new Date():(typeof(timestamp)=='object')?new Date(timestamp):new Date(timestamp*1000));var pad=function(n,c){if((n=n+"").length<c){return new Array(++c-n.length).join("0")+n;}else{return n;}};var _dst=function(t){var dst=0;var jan1=new Date(t.getFullYear(),0,1,0,0,0,0);var june1=new Date(t.getFullYear(),6,1,0,0,0,0);var temp=jan1.toUTCString();var jan2=new Date(temp.slice(0,temp.lastIndexOf(' ')-1));temp=june1.toUTCString();var june2=new Date(temp.slice(0,temp.lastIndexOf(' ')-1));var std_time_offset=(jan1-jan2)/(1000*60*60);var daylight_time_offset=(june1-june2)/(1000*60*60);if(std_time_offset===daylight_time_offset){dst=0;}else{var hemisphere=std_time_offset-daylight_time_offset;if(hemisphere>=0){std_time_offset=daylight_time_offset;}
dst=1;}
return dst;};var ret='';var txt_weekdays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var txt_ordin={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"};var txt_months=["","January","February","March","April","May","June","July","August","September","October","November","December"];var f={d:function(){return pad(f.j(),2);},D:function(){var t=f.l();return t.substr(0,3);},j:function(){return jsdate.getDate();},l:function(){return txt_weekdays[f.w()];},N:function(){return f.w()?f.w():7;},S:function(){return txt_ordin[f.j()]?txt_ordin[f.j()]:'th';},w:function(){return jsdate.getDay();},z:function(){return(jsdate-new Date(jsdate.getFullYear()+"/1/1"))/864e5>>0;},W:function(){var a=f.z(),b=364+f.L()-a;var nd2,nd=(new Date(jsdate.getFullYear()+"/1/1").getDay()||7)-1;if(b<=2&&((jsdate.getDay()||7)-1)<=2-b){return 1;}
if(a<=2&&nd>=4&&a>=(6-nd)){nd2=new Date(jsdate.getFullYear()-1+"/12/31");return that.date("W",Math.round(nd2.getTime()/1000));}
var w=(1+(nd<=3?((a+nd)/7):(a-(7-nd))/7)>>0);return(w?w:53);},F:function(){return txt_months[f.n()];},m:function(){return pad(f.n(),2);},M:function(){var t=f.F();return t.substr(0,3);},n:function(){return jsdate.getMonth()+1;},t:function(){var n;if((n=jsdate.getMonth()+1)==2){return 28+f.L();}
if(n&1&&n<8||!(n&1)&&n>7){return 31;}
return 30;},L:function(){var y=f.Y();return(!(y&3)&&(y%1e2||!(y%4e2)))?1:0;},o:function(){if(f.n()===12&&f.W()===1){return jsdate.getFullYear()+1;}
if(f.n()===1&&f.W()>=52){return jsdate.getFullYear()-1;}
return jsdate.getFullYear();},Y:function(){return jsdate.getFullYear();},y:function(){return(jsdate.getFullYear()+"").slice(2);},a:function(){return jsdate.getHours()>11?"pm":"am";},A:function(){return f.a().toUpperCase();},B:function(){var off=(jsdate.getTimezoneOffset()+60)*60;var theSeconds=(jsdate.getHours()*3600)+
(jsdate.getMinutes()*60)+
jsdate.getSeconds()+off;var beat=Math.floor(theSeconds/86.4);if(beat>1000){beat-=1000;}
if(beat<0){beat+=1000;}
if((String(beat)).length==1){beat="00"+beat;}
if((String(beat)).length==2){beat="0"+beat;}
return beat;},g:function(){return jsdate.getHours()%12||12;},G:function(){return jsdate.getHours();},h:function(){return pad(f.g(),2);},H:function(){return pad(jsdate.getHours(),2);},i:function(){return pad(jsdate.getMinutes(),2);},s:function(){return pad(jsdate.getSeconds(),2);},u:function(){return pad(jsdate.getMilliseconds()*1000,6);},e:function(){return'UTC';},I:function(){return _dst(jsdate);},O:function(){var t=pad(Math.abs(jsdate.getTimezoneOffset()/60*100),4);t=(jsdate.getTimezoneOffset()>0)?"-"+t:"+"+t;return t;},P:function(){var O=f.O();return(O.substr(0,3)+":"+O.substr(3,2));},T:function(){return'UTC';},Z:function(){return-jsdate.getTimezoneOffset()*60;},c:function(){return f.Y()+"-"+f.m()+"-"+f.d()+"T"+f.h()+":"+f.i()+":"+f.s()+f.P();},r:function(){return f.D()+', '+f.d()+' '+f.M()+' '+f.Y()+' '+f.H()+':'+f.i()+':'+f.s()+' '+f.O();},U:function(){return Math.round(jsdate.getTime()/1000);}};return format.replace(/[\\]?([a-zA-Z])/g,function(t,s){if(t!=s){ret=s;}else if(f[s]){ret=f[s]();}else{ret=s;}
return ret;});}
function getenv(varname){if(!this.php_js||!this.php_js.ENV||!this.php_js.ENV[varname]){return false;}
return this.php_js.ENV[varname];}
function money_format(format,number){if(typeof number!=='number'){return null;}
var regex=/%((=.|[+^(!-])*?)(\d*?)(#(\d+))?(\.(\d+))?([in%])/g;this.setlocale('LC_ALL',0);var monetary=this.php_js.locales[this.php_js.localeCategories['LC_MONETARY']]['LC_MONETARY'];var doReplace=function(n0,flags,n2,width,n4,left,n6,right,conversion){var value='',repl='';if(conversion==='%'){return'%';}
var fill=flags&&/=./.test(flags)?flags.match(/=(.)/)[1]:' ';var showCurrSymbol=!flags||flags.indexOf('!')===-1;width=parseInt(width,10)||0;var neg=number<0;number=number+'';number=neg?number.slice(1):number;var decpos=number.indexOf('.');var integer=decpos!==-1?number.slice(0,decpos):number;var fraction=decpos!==-1?number.slice(decpos+1):'';var str_splice=function(integerStr,idx,thous_sep){var integerArr=integerStr.split('');integerArr.splice(idx,0,thous_sep);return integerArr.join('');};var init_lgth=integer.length;left=parseInt(left,10);var filler=init_lgth<left;if(filler){var fillnum=left-init_lgth;integer=new Array(fillnum+1).join(fill)+integer;}
if(flags.indexOf('^')===-1){var thous_sep=monetary.mon_thousands_sep;var mon_grouping=monetary.mon_grouping;for(var i=0,idx=integer.length;i<mon_grouping.length;i++){idx-=mon_grouping[i];if(idx<0){break;}
if(filler&&idx<fillnum){thous_sep=fill;}
integer=str_splice(integer,idx,thous_sep);}
if(mon_grouping[i-1]>0){while(idx>mon_grouping[i-1]){idx-=mon_grouping[i-1];if(filler&&idx<fillnum){thous_sep=fill;}
integer=str_splice(integer,idx,thous_sep);}}}
if(right==='0'){value=integer;}
else{var dec_pt=monetary.mon_decimal_point;if(right===''){right=conversion==='i'?monetary.int_frac_digits:monetary.frac_digits;}
right=parseInt(right,10);if(right===0){fraction='';dec_pt='';}
else if(right<fraction.length){fraction=Math.round(parseFloat(fraction.slice(0,right)+'.'+fraction.substr(right,1),10))+'';}
else if(right>fraction.length){fraction+=new Array(right-fraction.length+1).join('0');}
value=integer+dec_pt+fraction;}
var symbol='';if(showCurrSymbol){symbol=conversion==='i'?monetary.int_curr_symbol:monetary.currency_symbol;}
var sign_posn=neg?monetary.n_sign_posn:monetary.p_sign_posn;var sep_by_space=neg?monetary.n_sep_by_space:monetary.p_sep_by_space;var cs_precedes=neg?monetary.n_cs_precedes:monetary.p_cs_precedes;if(flags.indexOf('(')!==-1){repl=(cs_precedes?symbol+(sep_by_space===1?' ':''):'')+
value+
(!cs_precedes?(sep_by_space===1?' ':'')+symbol:'');if(neg){repl='('+repl+')';}
else{repl=' '+repl+' ';}}
else{var pos_sign=monetary.positive_sign;var neg_sign=monetary.negative_sign;var sign=neg?(neg_sign):(pos_sign);var otherSign=neg?(pos_sign):(neg_sign);var signPadding='';if(sign_posn){signPadding=new Array(otherSign.length-sign.length+1).join(' ');}
var valueAndCS='';switch(sign_posn){case 0:valueAndCS=cs_precedes?symbol+(sep_by_space===1?' ':'')+value:value+(sep_by_space===1?' ':'')+symbol;repl='('+valueAndCS+')';break;case 1:valueAndCS=cs_precedes?symbol+(sep_by_space===1?' ':'')+value:value+(sep_by_space===1?' ':'')+symbol;repl=signPadding+sign+(sep_by_space===2?' ':'')+valueAndCS;break;case 2:valueAndCS=cs_precedes?symbol+(sep_by_space===1?' ':'')+value:value+(sep_by_space===1?' ':'')+symbol;repl=valueAndCS+(sep_by_space===2?' ':'')+sign+signPadding;break;case 3:repl=cs_precedes?signPadding+sign+(sep_by_space===2?' ':'')+symbol+(sep_by_space===1?' ':'')+value:value+(sep_by_space===1?' ':'')+sign+signPadding+(sep_by_space===2?' ':'')+symbol;break;case 4:repl=cs_precedes?symbol+(sep_by_space===2?' ':'')+signPadding+sign+(sep_by_space===1?' ':'')+value:value+(sep_by_space===1?' ':'')+symbol+(sep_by_space===2?' ':'')+sign+signPadding;break;}}
var padding=width-repl.length;if(padding>0){padding=new Array(padding+1).join(' ');if(flags.indexOf('-')!==-1){repl+=padding;}
else{repl=padding+repl;}}
return repl;};return format.replace(regex,doReplace);}
function setlocale(category,locale){var categ='',cats=[],i=0,d=this.window.document;this.php_js=this.php_js||{};var phpjs=this.php_js;var _copy=function _copy(orig){var newObj={};for(var i in orig){if(typeof orig[i]==='object'){newObj[i]=_copy(orig[i]);}
else{newObj[i]=orig[i];}}
return newObj;};if(!phpjs.locales){phpjs.locales={};phpjs.locales.en={'LC_COLLATE':function(str1,str2){return(str1==str2)?0:((str1>str2)?1:-1);},'LC_CTYPE':{an:/^[A-Za-z\d]+$/g,al:/^[A-Za-z]+$/g,ct:/^[\u0000-\u001F\u007F]+$/g,dg:/^[\d]+$/g,gr:/^[\u0021-\u007E]+$/g,lw:/^[a-z]+$/g,pr:/^[\u0020-\u007E]+$/g,pu:/^[\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E]+$/g,sp:/^[\f\n\r\t\v ]+$/g,up:/^[A-Z]+$/g,xd:/^[A-Fa-f\d]+$/g,CODESET:'UTF-8',lower:'abcdefghijklmnopqrstuvwxyz',upper:'ABCDEFGHIJKLMNOPQRSTUVWXYZ'},'LC_TIME':{a:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],A:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],b:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],B:['January','February','March','April','May','June','July','August','September','October','November','December'],c:'%a %d %b %Y %r %Z',p:['AM','PM'],P:['am','pm'],r:'%I:%M:%S %p',x:'%m/%d/%Y',X:'%r',alt_digits:'',ERA:'',ERA_YEAR:'',ERA_D_T_FMT:'',ERA_D_FMT:'',ERA_T_FMT:''},'LC_MONETARY':{int_curr_symbol:'USD',currency_symbol:'$',mon_decimal_point:'.',mon_thousands_sep:',',mon_grouping:[3],positive_sign:'',negative_sign:'-',int_frac_digits:2,frac_digits:2,p_cs_precedes:1,p_sep_by_space:0,n_cs_precedes:1,n_sep_by_space:0,p_sign_posn:3,n_sign_posn:0},'LC_NUMERIC':{decimal_point:'.',thousands_sep:',',grouping:[3]},'LC_MESSAGES':{YESEXPR:'^[yY].*',NOEXPR:'^[nN].*',YESSTR:'',NOSTR:''}};phpjs.locales.en_US=_copy(phpjs.locales.en);phpjs.locales.en_US.LC_TIME.c='%a %d %b %Y %r %Z';phpjs.locales.en_US.LC_TIME.x='%D';phpjs.locales.en_US.LC_TIME.X='%r';phpjs.locales.en_US.LC_MONETARY.int_curr_symbol='USD ';phpjs.locales.en_US.LC_MONETARY.p_sign_posn=1;phpjs.locales.en_US.LC_MONETARY.n_sign_posn=1;phpjs.locales.en_US.LC_MONETARY.mon_grouping=[3,3];phpjs.locales.en_US.LC_NUMERIC.thousands_sep='';phpjs.locales.en_US.LC_NUMERIC.grouping=[];phpjs.locales.en_GB=_copy(phpjs.locales.en);phpjs.locales.en_GB.LC_TIME.r='%l:%M:%S %P %Z';phpjs.locales.en_AU=_copy(phpjs.locales.en_GB);phpjs.locales.C=_copy(phpjs.locales.en);phpjs.locales.C.LC_CTYPE.CODESET='ANSI_X3.4-1968';phpjs.locales.C.LC_MONETARY={int_curr_symbol:'',currency_symbol:'',mon_decimal_point:'',mon_thousands_sep:'',mon_grouping:[],p_cs_precedes:127,p_sep_by_space:127,n_cs_precedes:127,n_sep_by_space:127,p_sign_posn:127,n_sign_posn:127,positive_sign:'',negative_sign:'',int_frac_digits:127,frac_digits:127};phpjs.locales.C.LC_NUMERIC={decimal_point:'.',thousands_sep:'',grouping:[]};phpjs.locales.C.LC_TIME.c='%a %b %e %H:%M:%S %Y';phpjs.locales.C.LC_TIME.x='%m/%d/%y';phpjs.locales.C.LC_TIME.X='%H:%M:%S';phpjs.locales.C.LC_MESSAGES.YESEXPR='^[yY]';phpjs.locales.C.LC_MESSAGES.NOEXPR='^[nN]';phpjs.locales.fr=_copy(phpjs.locales.en);phpjs.locales.fr.LC_TIME.a=['dim','lun','mar','mer','jeu','ven','sam'];phpjs.locales.fr.LC_TIME.A=['dimanche','lundi','mardi','mercredi','jeudi','vendredi','samedi'];phpjs.locales.fr.LC_TIME.b=['jan','fÃ©v','mar','avr','mai','jun','jui','aoÃ»','sep','oct','nov','dÃ©c'];phpjs.locales.fr.LC_TIME.B=['janvier','fÃ©vrier','mars','avril','mai','juin','juillet','aoÃ»t','septembre','octobre','novembre','dÃ©cembre'];phpjs.locales.fr.LC_TIME.c='%a %d %b %Y %T %Z';phpjs.locales.fr.LC_TIME.p=['',''];phpjs.locales.fr.LC_TIME.P=['',''];phpjs.locales.fr.LC_TIME.x='%d.%m.%Y';phpjs.locales.fr.LC_TIME.X='%T';phpjs.locales.fr_CA=_copy(phpjs.locales.fr);phpjs.locales.fr_CA.LC_TIME.x='%Y-%m-%d';}
if(!phpjs.locale){phpjs.locale='en_US';var NS_XHTML='http://www.w3.org/1999/xhtml';var NS_XML='http://www.w3.org/XML/1998/namespace';if(d.getElementsByTagNameNS&&d.getElementsByTagNameNS(NS_XHTML,'html')[0]){if(d.getElementsByTagNameNS(NS_XHTML,'html')[0].getAttributeNS&&d.getElementsByTagNameNS(NS_XHTML,'html')[0].getAttributeNS(NS_XML,'lang')){phpjs.locale=d.getElementsByTagName(NS_XHTML,'html')[0].getAttributeNS(NS_XML,'lang');}else if(d.getElementsByTagNameNS(NS_XHTML,'html')[0].lang){phpjs.locale=d.getElementsByTagNameNS(NS_XHTML,'html')[0].lang;}}else if(d.getElementsByTagName('html')[0]&&d.getElementsByTagName('html')[0].lang){phpjs.locale=d.getElementsByTagName('html')[0].lang;}}
phpjs.locale=phpjs.locale.replace('-','_');if(!(phpjs.locale in phpjs.locales)){if(phpjs.locale.replace(/_[a-zA-Z]+$/,'')in phpjs.locales){phpjs.locale=phpjs.locale.replace(/_[a-zA-Z]+$/,'');}}
if(!phpjs.localeCategories){phpjs.localeCategories={'LC_COLLATE':phpjs.locale,'LC_CTYPE':phpjs.locale,'LC_MONETARY':phpjs.locale,'LC_NUMERIC':phpjs.locale,'LC_TIME':phpjs.locale,'LC_MESSAGES':phpjs.locale};}
if(locale===null||locale===''){locale=this.getenv(category)||this.getenv('LANG');}else if(locale instanceof Array){for(i=0;i<locale.length;i++){if(!(locale[i]in this.php_js.locales)){if(i===locale.length-1){return false;}
continue;}
locale=locale[i];break;}}
if(locale==='0'||locale===0){if(category==='LC_ALL'){for(categ in this.php_js.localeCategories){cats.push(categ+'='+this.php_js.localeCategories[categ]);}
return cats.join(';');}
return this.php_js.localeCategories[category];}
if(!(locale in this.php_js.locales)){return false;}
if(category==='LC_ALL'){for(categ in this.php_js.localeCategories){this.php_js.localeCategories[categ]=locale;}}else{this.php_js.localeCategories[category]=locale;}
return locale;}
function strtotime(str,now){var i,match,s,strTmp='',parse='';strTmp=str;strTmp=strTmp.replace(/\s{2,}|^\s|\s$/g,' ');strTmp=strTmp.replace(/[\t\r\n]/g,'');if(strTmp=='now'){return(new Date()).getTime()/1000;}else if(!isNaN(parse=Date.parse(strTmp))){return(parse/1000);}else if(now){now=new Date(now*1000);}else{now=new Date();}
strTmp=strTmp.toLowerCase();var __is={day:{'sun':0,'mon':1,'tue':2,'wed':3,'thu':4,'fri':5,'sat':6},mon:{'jan':0,'feb':1,'mar':2,'apr':3,'may':4,'jun':5,'jul':6,'aug':7,'sep':8,'oct':9,'nov':10,'dec':11}};var process=function(m){var ago=(m[2]&&m[2]=='ago');var num=(num=m[0]=='last'?-1:1)*(ago?-1:1);switch(m[0]){case'last':case'next':switch(m[1].substring(0,3)){case'yea':now.setFullYear(now.getFullYear()+num);break;case'mon':now.setMonth(now.getMonth()+num);break;case'wee':now.setDate(now.getDate()+(num*7));break;case'day':now.setDate(now.getDate()+num);break;case'hou':now.setHours(now.getHours()+num);break;case'min':now.setMinutes(now.getMinutes()+num);break;case'sec':now.setSeconds(now.getSeconds()+num);break;default:var day;if(typeof(day=__is.day[m[1].substring(0,3)])!='undefined'){var diff=day-now.getDay();if(diff==0){diff=7*num;}else if(diff>0){if(m[0]=='last'){diff-=7;}}else{if(m[0]=='next'){diff+=7;}}
now.setDate(now.getDate()+diff);}}
break;default:if(/\d+/.test(m[0])){num*=parseInt(m[0],10);switch(m[1].substring(0,3)){case'yea':now.setFullYear(now.getFullYear()+num);break;case'mon':now.setMonth(now.getMonth()+num);break;case'wee':now.setDate(now.getDate()+(num*7));break;case'day':now.setDate(now.getDate()+num);break;case'hou':now.setHours(now.getHours()+num);break;case'min':now.setMinutes(now.getMinutes()+num);break;case'sec':now.setSeconds(now.getSeconds()+num);break;}}else{return false;}
break;}
return true;};match=strTmp.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(match!=null){if(!match[2]){match[2]='00:00:00';}else if(!match[3]){match[2]+=':00';}
s=match[1].split(/-/g);for(i in __is.mon){if(__is.mon[i]==s[1]-1){s[1]=i;}}
s[0]=parseInt(s[0],10);s[0]=(s[0]>=0&&s[0]<=69)?'20'+(s[0]<10?'0'+s[0]:s[0]+''):(s[0]>=70&&s[0]<=99)?'19'+s[0]:s[0]+'';return parseInt(this.strtotime(s[2]+' '+s[1]+' '+s[0]+' '+match[2])+(match[4]?match[4]/1000:''),10);}
var regex='([+-]?\\d+\\s'+'(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?'+'|sun\.?|sunday|mon\.?|monday|tue\.?|tuesday|wed\.?|wednesday'+'|thu\.?|thursday|fri\.?|friday|sat\.?|saturday)'+'|(last|next)\\s'+'(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?'+'|sun\.?|sunday|mon\.?|monday|tue\.?|tuesday|wed\.?|wednesday'+'|thu\.?|thursday|fri\.?|friday|sat\.?|saturday))'+'(\\sago)?';match=strTmp.match(new RegExp(regex,'g'));if(match==null){return false;}
for(i=0;i<match.length;i++){if(!process(match[i].split(' '))){return false;}}
return(now.getTime()/1000);}
