if (EDGET_BLOB==undefined) {var EDGET_BLOB={applicationName: "edget.eu",finishedLoading: false}}if (EDGET_BLOB!=undefined && EDGET_BLOB.applicationName=='edget.eu' && !EDGET_BLOB.finishedLoading) {EDGET_BLOB.prefs={access_key:"by54qqi7"}}if (EDGET_BLOB!=undefined && EDGET_BLOB.applicationName=='edget.eu' && !EDGET_BLOB.finishedLoading) {EDGET_BLOB.util={cookieNotSet:"Cookie not set",getCookie:function(c_name){if (document.cookie.length==0) {return this.cookieNotSet;}var c_start=document.cookie.indexOf(c_name + "=");if (c_start==-1) {return this.cookieNotSet;}c_start=c_start + c_name.length+1;var c_end=document.cookie.indexOf(";",c_start);if (c_end==-1) c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end));},setCookie:function(c_name,value,exdate){document.cookie=c_name+ "=" +escape(value)+";expires="+exdate.toGMTString();return true;}}}if (MCE!=undefined) {if (MCE.applicationName==undefined ||MCE.applicationName!="Converter") {alert("Converter: global variable MCE is already used!");}} else {var MCE = {applicationName: "Converter",applicationVersion: "0.9.0",releaseType: 'major',installMode: 'edget',finishedLoading: false}}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.tzUtil = {timezones : {"IDLW":-12,"NT":-11,"HST":-10,"AKST":-9,"PST":-8,"AKDT":-8,"MST":-7,"PDT":-7,"CST":-6,"MDT":-6,"EST":-5,"CDT":-5,"EDT":-4,"AST":-4,"GUY":-3,"ADT":-3,"AT":-2,"UTC":0,"GMT":0,"Z":0,"WET":0,"WEST":1,"CET":1,"BST":1,"IST":1,"CEST":2,"EET":2,"EEST":3,"MSK":3,"MSD":4,"ZP4":4,"ZP5":5,"ZP6":6,"WAST":7,"AWST":8,"WST":8,"JST":9,"ACST":9.5,"ACDT":10.5,"AEST":10,"AEDT":11,"NZST":12,"IDLE":12,"NZDT":13},get_local_offset:function(){var D=new Date();return -D.getTimezoneOffset()/60;},get_tz_offset:function(tz){var re = /^([+-])(0[0-9]|1[0-2])([03]0)$/;var ree=re.exec(tz);if (ree && ree[0]) {var sgn=new Number(ree[1]+'1');if (ree[2].substr(0,0)=='0') {ree[2]=ree[2].substr(1);}var h=new Number(ree[2]);var m=new Number(ree[3]);return sgn*(h+m/60);}if (tz in this.timezones) {return this.timezones[tz];}return undefined;},validate_hour:function(hour){if (hour===undefined || hour==='' || hour>23) {return false;}return true;},validate_minute:function(minutes){if (minutes===undefined || minutes==='' || minutes>59) {return false;}return true;}};}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.conv_table=new String("\"               in2m\tmetric in               in2m\tmetric inch             in2m\tmetric inches           in2m\tmetric mil              mil2m\tmetric mi               mi2m\tmetric mile             mi2m\tmetric miles            mi2m\tmetric ft               ft2m\tmetric foot             ft2m\tmetric feet             ft2m\tmetric yard             yd2m\tmetric yards            yd2m\tmetric yd               yd2m\tmetric ounce            oz2kg\tmetric oz               oz2kg\tmetric ounces           oz2kg\tmetric pound            lb2kg\tmetric pounds           lb2kg\tmetric lb               lb2kg\tmetric lbs              lb2kg\tmetric stone            stone2all stones           stone2all kg               kg2lb\tImperial kgs              kg2lb\tImperial kilogram         kg2lb\tImperial kilograms        kg2lb\tImperial g                g2oz\tImperial gram             g2oz\tImperial grams            g2oz\tImperial m                m2in\tImperial meter            m2in\tImperial meters           m2in\tImperial metre            m2in\tImperial metres           m2in\tImperial mm               mm2in\tImperial millimetre       mm2in\tImperial millimetres      mm2in\tImperial millimeter       mm2in\tImperial millimeters      mm2in\tImperial km               km2in\tImperial kilometre        km2in\tImperial kilometres       km2in\tImperial kilometer        km2in\tImperial kilometers       km2in\tImperial "+String.fromCharCode(181)+"m               microm2in\tImperial micrometre       microm2in\tImperial micrometres      microm2in\tImperial micrometer       microm2in\tImperial micrometers      microm2in\tImperial micron           microm2in\tImperial microns          microm2in\tImperial cm               cm2in\tImperial centimetre       cm2in\tImperial centimetres      cm2in\tImperial centimeter       cm2in\tImperial centimeters      cm2in\tImperial "+String.fromCharCode(176)+"celsius         c2f\tFahrenheit "+String.fromCharCode(176)+"celcius         c2f\tFahrenheit "+String.fromCharCode(176)+"c               c2f\tFahrenheit "+String.fromCharCode(176)+"_celsius        c2f\tFahrenheit "+String.fromCharCode(176)+"_celcius        c2f\tFahrenheit "+String.fromCharCode(176)+"_c              c2f\tFahrenheit \u00BAcelsius         c2f\tFahrenheit \u00BAcelcius         c2f\tFahrenheit \u00BAc               c2f\tFahrenheit \u00BA_celsius        c2f\tFahrenheit \u00BA_celcius        c2f\tFahrenheit \u00BA_c              c2f\tFahrenheit "+"c                c2f\tFahrenheit celsius          c2f\tFahrenheit celcius          c2f\tFahrenheit centigrade       c2f\tFahrenheit centigrades      c2f\tFahrenheit degree_celsius   c2f\tFahrenheit degrees_celsius  c2f\tFahrenheit degree_centigrade  c2f\tFahrenheit degrees_centigrade c2f\tFahrenheit degree_c         c2f\tFahrenheit degrees_c        c2f\tFahrenheit "+String.fromCharCode(176)+"f               f2c\tCelsius "+String.fromCharCode(176)+"fahrenheit      f2c\tCelsius "+String.fromCharCode(176)+"_fahrenheit     f2c\tCelsius "+String.fromCharCode(176)+"_f              f2c\tCelsius \u00BAf               f2c\tCelsius \u00BAfahrenheit      f2c\tCelsius \u00BA_fahrenheit     f2c\tCelsius \u00BA_f              f2c\tCelsius f                  f2c\tCelsius fahrenheit         f2c\tCelsius degree_fahrenheit  f2c\tCelsius degrees_fahrenheit f2c\tCelsius degree_f           f2c\tCelsius degrees_f          f2c\tCelsius mph              miph2kmph\tmetric mi/h             miph2kmph\tmetric mile/h           miph2kmph\tmetric miles/h          miph2kmph\tmetric mile/hour        miph2kmph\tmetric miles/hour       miph2kmph\tmetric miles_per_hour   miph2kmph\tmetric mile_per_hour    miph2kmph\tmetric mile_an_hour     miph2kmph\tmetric miles_an_hour    miph2kmph\tmetric nmi              nmi2all nautical_miles   nmi2all nautical_mile    nmi2all knot             knot2all knots            knot2all kt               knot2all km/h             kmph2miph\tImperial kmph             kmph2miph\tImperial kilometers/hour  kmph2miph\tImperial kilometres/hour  kmph2miph\tImperial kilometers_per_hour kmph2miph\tImperial kilometres_per_hour kmph2miph\tImperial kilometer_per_hour kmph2miph\tImperial kilometre_per_hour kmph2miph\tImperial degree           deg2all degrees          deg2all deg              deg2all "+String.fromCharCode(176)+"            deg2all m/s              mps2all mps              mps2all meters_per_second mps2all metres_per_second mps2all meter_per_second mps2all metre_per_second mps2all km/s              kmps2all kmps              kmps2all kilometers_per_second kmps2all kilometres_per_second kmps2all kilometer_per_second kmps2all kilometre_per_second kmps2all l                litre2gallon\tImperial liter            litre2gallon\tImperial liters           litre2gallon\tImperial litre            litre2gallon\tImperial litres           litre2gallon\tImperial gallon           gallon2litre\tmetric gallons          gallon2litre\tmetric gal              gallon2litre\tmetric fluid_ounces     floz2ml\tmetric fluid_ounce      floz2ml\tmetric fl._oz.          floz2ml\tmetric fl._oz           floz2ml\tmetric fl_oz.           floz2ml\tmetric fl.oz.           floz2ml\tmetric fl_oz            floz2ml\tmetric floz             floz2ml\tmetric fluidounce       floz2ml\tmetric fluidounces      floz2ml\tmetric ml               ml2floz\tImperial milliliter       ml2floz\tImperial milliliters      ml2floz\tImperial mililiter        ml2floz\tImperial mililiters       ml2floz\tImperial pa               pa2psi\tImperial pascal           pa2psi\tImperial pascals          pa2psi\tImperial kpa              kpa2psi\tImperial psi              psi2kpa\tmetric internal_time    internal_time internal_currency internal_currency square_foot      sqft2sqm\tmetric square_feet      sqft2sqm\tmetric square_ft        sqft2sqm\tmetric sq_ft            sqft2sqm\tmetric sq._ft.          sqft2sqm\tmetric sq_ft.           sqft2sqm\tmetric sq._ft           sqft2sqm\tmetric sq_feet          sqft2sqm\tmetric sq_foot          sqft2sqm\tmetric sf               sqft2sqm\tmetric foot"+String.fromCharCode(178)+" sqft2sqm\tmetric feet"+String.fromCharCode(178)+" sqft2sqm\tmetric ft"+String.fromCharCode(178)+" sqft2sqm\tmetric ft^2             sqft2sqm\tmetric foot^2           sqft2sqm\tmetric feet^2           sqft2sqm\tmetric square_meters    sqm2sqft\tImperial square_metres    sqm2sqft\tImperial square_meter     sqm2sqft\tImperial square_metre     sqm2sqft\tImperial m"+String.fromCharCode(178)+" sqm2sqft\tImperial meter"+String.fromCharCode(178)+" sqm2sqft\tImperial metre"+String.fromCharCode(178)+" sqm2sqft\tImperial meters"+String.fromCharCode(178)+" sqm2sqft\tImperial metres"+String.fromCharCode(178)+" sqm2sqft\tImperial m^2              sqm2sqft\tImperial meter^2          sqm2sqft\tImperial metre^2          sqm2sqft\tImperial meters^2         sqm2sqft\tImperial metres^2         sqm2sqft\tImperial cc               cc2cuin\tImperial cm^3             cc2cuin\tImperial cm"+String.fromCharCode(179)+" cc2cuin\tImperial cu_in            cuin2cc\tmetric in^3             cuin2cc\tmetric in"+String.fromCharCode(179)+" cuin2cc\tmetric mpg              mpg2lptm\tmetric miles_per_gallon mpg2lptm\tmetric nm               nm2ftlb\tImperial newton_metres    nm2ftlb\tImperial newton_metre     nm2ftlb\tImperial newton_meters    nm2ftlb\tImperial newton_meter     nm2ftlb\tImperial ");MCE.converters={in2m:function(v){return {inValue:v.value,outValue:v.value*0.0254,inUnit:'in',outUnit: 'm'};},mil2m:function(v){return {inValue: v.value,outValue: v.value*0.0000254,inUnit: 'mil',outUnit: 'm'};},mi2m:function(v){return {inValue: v.value,outValue: v.value*1609.344,inUnit: 'miles',outUnit: 'm'};},ft2m:function(v){return {inValue: v.value,outValue: v.value*0.3048,inUnit: 'ft',outUnit: 'm'};},yd2m:function(v){return {inValue: v.value,outValue: v.value*0.9144,inUnit: 'yd',outUnit: 'm'};},oz2kg:function(v){return {inValue: v.value,outValue: v.value*0.0283,inUnit: 'oz',outUnit: 'kg'};},lb2kg:function(v){return {inValue: v.value,outValue: v.value*0.45359237,inUnit: 'lbs',outUnit: 'kg'};},stone2all:function(v){var result=new Object();result.inValue=v.value;result.inUnit="stone";if (MCE.prefs.getPref('pref_metric')) {result.outValue=v.value*6.35029318;result.outUnit="kg";} else {result.outValue=v.value*14;result.outUnit="lbs";}return result;},kg2lb:function(v){return {inValue: v.value,outValue: v.value/0.45359237,inUnit: 'kg',outUnit: 'lbs'};},g2oz:function(v){return {inValue: v.value,outValue: v.value/28.3,inUnit: 'g',outUnit: 'oz'};},m2in:function(v){return {inValue: v.value,outValue: v.value*1000/25.4,inUnit: 'm',outUnit: 'in'};},mm2in:function(v){return {inValue: v.value,outValue: v.value/25.4,inUnit: 'mm',outUnit: 'in'};},km2in:function(v){return {inValue: v.value,outValue: (v.value/0.0254)*1000,inUnit: 'km',outUnit: 'in'};},microm2in:function(v){return {inValue: v.value,outValue: v.value/25400,inUnit: String.fromCharCode(181)+"m",outUnit: 'in'};},cm2in:function(v){return {inValue: v.value,outValue: v.value/2.54,inUnit: 'cm',outUnit: 'in'};},c2f:function(v){return {inValue: v.value,outValue: Math.round((v.value*1.8+32)*10)/10,inUnit: String.fromCharCode(176)+"C",outUnit: String.fromCharCode(176)+"F"};},f2c:function(v){return {inValue: v.value,outValue: Math.round(10*(v.value-32)/1.8)/10,inUnit: String.fromCharCode(176)+"F",outUnit: String.fromCharCode(176)+"C"};},miph2kmph:function(v){var result=new Object();result.inValue=v.value;if (v.value<2) {result.outValue=Math.round(v.value*16093.44)/10000;} else if (v.value < 10) {result.outValue=Math.round(v.value*160.9344)/100;} else {result.outValue=Math.round(v.value*1.609344);}result.inUnit="mph";result.outUnit="km/h";return result;},kmph2miph:function(v){var result=new Object();result.inValue=v.value;if (v.value<3) {result.outValue=Math.round(v.value/0.0001609344)/10000;} else if (v.value<15) {result.outValue=Math.round(v.value/0.01609344)/100;} else {result.outValue=Math.round(v.value/1.609344);}result.inUnit="km/h";result.outUnit="mph";return result;},deg2all:function(v){var result=new Object();result.inValue=v.value;if (MCE.prefs.getPref('pref_celsius')) {result.inUnit=String.fromCharCode(176)+"F";result.outUnit=String.fromCharCode(176)+"C";result.outValue=(v.value-32)/1.8;} else {result.inUnit=String.fromCharCode(176)+"C";result.outUnit=String.fromCharCode(176)+"F";result.outValue=v.value*1.8+32;}return result;},mps2all:function(v){var result=new Object();result.inValue=v.value;result.inUnit="m/s";if (MCE.prefs.getPref('pref_metric')) {result.outUnit="km/h";result.outValue=v.value * 18 / 5;} else {result.outUnit="mph";result.outValue=v.value * 3600 / 1610.3;}return result;},kmps2all:function(v){var result=MCE.converters.mps2all(v);result.outValue*=1000;result.inUnit='km/s';return result;},litre2gallon:function(v){return {inValue: v.value,outValue: v.value/3.785411784,inUnit: 'L',outUnit: 'gal'};},gallon2litre:function(v){return {inValue: v.value,outValue: v.value*3.785411784,inUnit: 'gal',outUnit: 'L'};},ml2floz:function(v){return {inValue: v.value,outValue: v.value/29.5735295625,inUnit: 'ml',outUnit: 'fl oz'};},floz2ml:function(v){return {inValue: v.value,outValue: v.value*29.5735295625,inUnit: 'fl oz',outUnit: 'ml'};},pa2psi:function(v){return {inValue: v.value,outValue: v.value/6894.75729,inUnit: 'Pa',outUnit: 'psi'};},kpa2psi:function(v){return {inValue: v.value,outValue: v.value/6.89475729,inUnit: 'KPa',outUnit: 'psi'};},psi2kpa:function(v){return {inValue: v.value,outValue: v.value*6.89475729,inUnit: 'psi',outUnit: 'KPa'};},cc2cuin:function(v){return {inValue: v.value,outValue: v.value/16.387064,inUnit: "cm"+String.fromCharCode(179),outUnit: "in"+String.fromCharCode(179)};},cuin2cc:function(v){return {inValue: v.value,outValue: v.value*16.387064,inUnit: "in"+String.fromCharCode(179),outUnit: "cm"+String.fromCharCode(179)};},mpg2lptm:function(v){var oU=new Number(235.2/v.value);var oI=new Number(282.5/v.value);return {only_show_converted: true,not_numerical: true,inValue: v.value,inUnit: 'mpg',outCustom: v.value+"mp(US)g = "+oU.toFixed(2)+" L/100 km; "+v.value+" mp(Imp)g = "+oI.toFixed(2)+" L/100 km"};},internal_time:function(v){var result=new Object();result.inValue=v.value;var re = /([0-9]{1,2})(:?([0-9]{2}))?(:[0-9]{2})?[\s]*(am|pm|AM|PM|a\.m\.|p\.m\.|A\.M\.|P\.M\.)?[\s]*([+\-0-9A-Z]{1,5})?/;var regexp_result = re.exec(v.value);if (regexp_result[3]==undefined) {regexp_result[3]="00";}if (regexp_result[4]==undefined) {regexp_result[4]='';}if (regexp_result[5]) { if (regexp_result[1]=='12') {regexp_result[1]=0;}if (regexp_result[5].toLowerCase().match(/pm|p\.m\./)) {regexp_result[1]=String(Math.abs(regexp_result[1])+12);}var end_result=regexp_result[1]+':'+regexp_result[3]+regexp_result[4];result.inUnit='12h';result.outUnit='24h';} else { if (regexp_result[1]=='00' || regexp_result[1]=='0') {regexp_result[1]=12;}if (regexp_result[1]>12) {end_result=String(Math.abs(regexp_result[1])-12)+':'+regexp_result[3]+regexp_result[4]+' PM';} else {end_result=regexp_result[1]+':'+regexp_result[3]+regexp_result[4]+' AM';}result.inUnit='24h';result.outUnit='12h';}result.outValue=end_result;result.not_numerical=true;result.only_show_converted=true;var local_tz=MCE.tzUtil.get_local_offset();var orig_tz;if (v.orig_tz!=undefined) {orig_tz=v.orig_tz;} else {orig_tz=MCE.tzUtil.get_tz_offset(regexp_result[6]);}if (isNaN(orig_tz) || orig_tz==local_tz) {if ((result.outUnit=='24h' && MCE.prefs.getPref('pref_24h')) ||(result.outUnit=='12h' && !MCE.prefs.getPref('pref_24h'))) {return result;} else {return {inhibit:true};}}var hh=regexp_result[1]; var mm=regexp_result[3];var ss=regexp_result[4];var delta_tz=local_tz-orig_tz; var delta_tz_hh=Math.floor(delta_tz);var delta_tz_mm=(delta_tz-delta_tz_hh)*60;var local_hh=1*hh;var local_mm=1*delta_tz_mm+1*mm;if (local_mm>59) {local_hh++;local_mm-=60;}if (local_mm<0) {local_hh--;local_mm+=60;}if (local_mm<10) {local_mm="0"+local_mm;}local_hh+=delta_tz_hh;var local_dd=0;if (local_hh>23) {local_dd++;local_hh-=24;}if (local_hh<0) {local_dd--;local_hh+=24;}if (local_dd==0) {local_dd='';} else if (local_dd==1) {local_dd='/+1';} else {local_dd='/-1';}result.inUnit='';result.outUnit='local TZ';if (MCE.prefs.getPref('pref_24h')) {result.outValue=local_hh+':'+local_mm+ss+local_dd;return result;} else {if (local_hh==0) {local_hh=12;}if (local_hh>12) {local_hh-=12;var local_ampm=' PM';} else {var local_ampm=' AM';}result.outValue=local_hh+':'+local_mm+ss+local_dd+local_ampm;return result;}},sqft2sqm:function(v){return {inValue: v.value,outValue: v.value*0.09290304,inUnit: 'sq ft',outUnit: "m"+String.fromCharCode(178)};},sqm2sqft:function(v){return {inValue: v.value,outValue: v.value/0.09290304,inUnit: "m"+String.fromCharCode(178),outUnit: 'sq ft'};},nm2ftlb:function(v){var result=new Object();result.inUnit="Nm";result.inValue=v.value;result.outUnit='ft-lb';result.outValue=v.value*0.7375621;if (result.outValue<1) {result.outUnit='in-lb';result.outValue=result.outValue*12;}return result;},internal_currency:function(v){var myCurrency=MCE.prefs.getPref('pref_myCurrency');var thisCurrency=v.currency;if (!myCurrency || thisCurrency==myCurrency) {return {inhibit:true};}var rate=MCE.currency.getRate(thisCurrency,myCurrency);if (!rate) {return {inhibit:true};}return {inValue: v.value,inUnit: thisCurrency,outValue: v.value*rate,outUnit: myCurrency};},knot2all:function(v){var result=new Object();result.inValue=v.value;result.inUnit="knot";if (MCE.prefs.getPref('pref_metric')) {result.outUnit="km/h";result.outValue=v.value * 1.852;} else {result.outUnit="mph";result.outValue=v.value * 1.852 / 1.609344;}return result;},nmi2all:function(v){var result=new Object();result.inValue=v.value;result.inUnit="nmi";if (MCE.prefs.getPref('pref_metric')) {result.outUnit="km";result.outValue=v.value * 1.852;} else {result.outUnit="mi";result.outValue=v.value * 1.852 / 1.609344;}return result;}};MCE.adjusters={prepareValue:function(o){if (o.outValue>=0) {o.signChanged=false;return o;}o.signChanged=true;o.outValue=-o.outValue;return o;},restoreValue:function(o){if (o.signChanged) {o.signChanged=false;o.outValue=-o.outValue;}return o;},metricWeight:function(o){if (o.outUnit!="kg") {return o;}o=this.prepareValue(o);var tv=o.outValue;if ((tv>=1) && (tv<1000)) {return this.restoreValue(o);}if (tv>=1000) {o.outValue/=1000;o.outUnit="t";return this.restoreValue(o);}if (tv>=0.001) {o.outValue*=1000;o.outUnit="g";return this.restoreValue(o);}o.outValue*=1000000;o.outUnit="mg";return this.restoreValue(o);},imperialDistance:function(o){if (o.outUnit!="in") {return o;}o=this.prepareValue(o);var tv=o.outValue;if (tv<0.03125) { o.outValue=tv*100;o.outUnit="mil";return this.restoreValue(o);}if (tv>=42240) { o.outValue=tv/63360;o.outUnit="mi";return this.restoreValue(o);}if (tv>=108) { o.outValue=tv/36;o.outUnit='yd';return this.restoreValue(o);}if (tv>=36) { var fts=Math.floor(tv/12);var ins=Math.round(tv-fts*12);o.outCustom=fts+"'"+ins;if (o.signChanged) {o.outCustom='-'+o.outCustom;}return o;}if (MCE.prefs.getPref('pref_in_fract')) {var tv32=Math.round(tv*32) % 32;if (tv32) {if (tv32==16) {var fraction="1/2";} else if (!tv32 % 8) {var fraction=(tv32/8)+"/4";} else if (!tv32 % 4) {var fraction=(tv32/4)+"/8";} else if (!tv32 % 2) {var fraction=(tv32/2)+"/16";} else {var fraction=tv32+"/32";}}tv=Math.floor(tv);var inches=tv % 12;tv=(tv-inches)/12;o.outCustom=tv+"'"+inches;if (fraction) {o.outCustom=o.outCustom+"-"+fraction+"\"";} else if (tv==0) {o.outCustom=inches+"\"";} else {o.outCustom=o.outCustom+"\"";}if (o.signChanged) {o.outCustom='-'+o.outCustom;}return o;}o.outValue=tv;o.outUnit='in';return this.restoreValue(o);},metricDistance:function(o){if (o.outUnit!="m") {return o;}o=this.prepareValue(o);var tv=o.outValue;if ((tv>=1) && (tv<1000)) {return this.restoreValue(o);}if (tv>=1000) {o.outValue/=1000;o.outUnit="km";return this.restoreValue(o);}if (tv>=0.01) {o.outValue*=100;o.outUnit="cm";return this.restoreValue(o);}if (tv>=0.0001) {o.outValue*=1000;o.outUnit="mm";return this.restoreValue(o);}o.outValue*=1000000;o.outUnit=String.fromCharCode(181)+"m";return this.restoreValue(o);},imperialVolume:function(o){o=this.prepareValue(o);if ((o.outUnit=='fl oz') && (o.outValue>80)) {o.outUnit='gal';o.outValue/=128;}if ((o.outUnit=='gal') && (o.outValue<0.625)) {o.outUnit='fl oz';o.outValue*=128;}return this.restoreValue(o);},metricVolume:function(o){o=this.prepareValue(o);if ((o.outUnit=='ml') && (o.outValue>1000)) {o.outUnit='L';o.outValue/=1000;}if ((o.outUnit=='L') && (o.outValue<1)) {o.outUnit='ml';o.outValue*=1000;}return this.restoreValue(o);}};}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.util={addSeparators:function(nStr){var thou_sep=MCE.prefs.getPref('pref_thou_sep');var dec_sep=MCE.prefs.getPref('pref_dec_sep');nStr += '';var x = nStr.split('.'); var x1 = x[0];var x2 = x.length > 1 ? dec_sep + x[1] : '';var rgx = /(\d+)(\d{3})/;while (rgx.test(x1)) {x1 = x1.replace(rgx, '$1' + thou_sep + '$2');}return x1 + x2;},smartRound:function(v){var vStr=new String(v);if (vStr.indexOf('.')==-1)return this.addSeparators(vStr);if (v>100) {return this.addSeparators(Math.round(v));}var log=this.floorLog10(vStr);var out=new String(new Number(v).toFixed(2-log));return this.addSeparators(out.replace(/[.]?[0]+$/,''));},floorLog10:function(s){var x = s.replace(/^-/,'').split('.'); if (Number(x[0]!='0')) { return x[0].length-1; }var zeroes=/^([0]*)/.exec(x[1]);return -zeroes[1].length-1; },determine_separators:function(s){if (!isNaN(s)) {return s;}try {var tmp=s.indexOf(",");}catch(e) {return s;}if (tmp==-1) {var re = /^[\d]{1,3}(\.[\d]{3})*(\.[\d]+)$/;if (re.exec(s)) {s=s.replace(/\./g,"");return s;} else {return false;}}if (s.indexOf(".")!=-1) {if (s.lastIndexOf(".")>s.lastIndexOf(",")) {s=s.replace(/,/g,"");} else {s=s.replace(/\./g,"");s=s.replace(/,/g,".");}} else {if (s.indexOf(",")!=s.lastIndexOf(",")) {s=s.replace(/,/g,"");} else {if ((s.length<=7) && (s.indexOf(",")==s.length-4)) {s=s.replace(/,/g,"");} else {s=s.replace(/\./g,"");s=s.replace(/,/g,".");}}}return s;},inArray:function(needle, haystack){var i=0;for(i=0;i<haystack.length;i++) {var hayAtom=haystack[i];if(needle==hayAtom) {return i;}}return -1;},toASCII:function(str){var dumpData=new String();for(var i=0;i<str.length;i++) {dumpData=dumpData+str.charCodeAt(i)+', ';}return dumpData;},simplify:function(word){while(word.substr(word.length-1)=='.') {word=word.substr(0,word.length-1);}return word;}};}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.regression={regressionTest:function(){return false;}}}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.core={doConversion:function(txt,sw){if (sw) {var temp = sw;} else {var temp = this.getSelectedWord(txt);if (!temp) {return false;}}var pos=MCE.util.inArray(temp.unit,MCE.conversions[0]);if (pos==-1) {return false;}var target=MCE.conversions[2][pos];if (MCE.prefs.getPref('pref_one_way') && target &&((target=='metric' && !MCE.prefs.getPref('pref_metric')) ||(target=='Imperial' && MCE.prefs.getPref('pref_metric')) ||(target=='Celsius' && !MCE.prefs.getPref('pref_celsius')) ||(target=='Fahrenheit' && MCE.prefs.getPref('pref_celsius')))) {return {inhibit:true};}if (temp.unit!='internal_time') {temp.value=MCE.util.determine_separators(temp.value);}if (temp.value===false || temp.value===undefined) {return false;}var converter=MCE.conversions[1][pos];var cr=MCE.converters[converter](temp); if (temp.multiplier>1) {cr.inValue*=temp.multiplier;cr.outValue*=temp.multiplier;}if (cr.outUnit=="m") {cr=MCE.adjusters.metricDistance(cr);}if (cr.outUnit=="kg") {cr=MCE.adjusters.metricWeight(cr);}if (cr.outUnit=="in") {cr=MCE.adjusters.imperialDistance(cr);}if ((cr.outUnit=='gal') || (cr.outUnit=='fl oz')) {cr=MCE.adjusters.imperialVolume(cr);}if ((cr.outUnit=='ml') || (cr.outUnit=='L')) {cr=MCE.adjusters.metricVolume(cr);}if (!cr.not_numerical) {cr.inValue=MCE.util.smartRound(cr.inValue);cr.outValue=MCE.util.smartRound(cr.outValue);}if (!cr.outCustom) {cr.outCustom=cr.outValue+" "+cr.outUnit;}return cr;},registerConverters:function(){var conv_symbols=new Array();var conv_functions=new Array();var conv_targets=new Array();var atoms=MCE.conv_table.split(" ");var conv_symbol=true;var register_extended=true;if (MCE.extended_symbols.length) {register_extended=false;}var i;var a_converter_symbol_1=new Array();var a_converter_symbol_2plus=new Array();for(i=0;i<atoms.length;i++) {var atom=atoms[i];if (!atom) {continue;}if (conv_symbol) {if (register_extended && (atom.indexOf('_')>-1)) {MCE.extended_symbols_raw.push(atom.replace(/_/g,' '));MCE.extended_symbols.push(atom.replace(/_/g,'[\\s]+'));}conv_symbols.push(atom);var letter=atom.substring(0,1);if (MCE.util.inArray(letter,a_converter_symbol_1)==-1) {a_converter_symbol_1.push(letter);MCE.symbol_1+=letter;}var j=0;for(j=1;j<atom.length;j++) {letter=atom.substring(j,j+1);if (MCE.util.inArray(letter,a_converter_symbol_2plus)==-1) {a_converter_symbol_2plus.push(letter);MCE.symbol_2plus+=letter;}}} else {if (atom.indexOf("\t")==-1) {conv_functions.push(atom);conv_targets.push(false);} else {var x=atom.split("\t");conv_functions.push(x[0]);conv_targets.push(x[1]);}}conv_symbol=!conv_symbol;}MCE.symbol_1=this.regexpise(MCE.symbol_1);MCE.symbol_2plus=this.regexpise(MCE.symbol_2plus);return new Array(conv_symbols,conv_functions,conv_targets);},regexpise:function(in_s){var i=0;var result='';var s=in_s;var re_raw=/[0-9a-zA-Z !"#$%&'*+,.:;<=>?@_`{|}~]/;var re_escape=/[\(\)\-\/\[\\\]\^]/;for(i=0;i<s.length;i++) {var letter=s.substring(i,i+1);var replace=letter;if (!re_raw.exec(letter)) {if (re_escape.exec(letter)) {replace='\\'+replace;} else {var hex=replace.charCodeAt(0).toString(16).toUpperCase();while(hex.length<4) {hex='0'+hex;}replace='\\u'+hex;}}result+=replace;}return result;},convertPage:function(){MCE.iface.setOldPage();MCE.iface.conversionStart();if (MCE.regression.regressionTest()) {MCE.iface.conversionEnd();return true;}var myDocs=MCE.iface.getAllDocuments();var i;for(i=0;i<myDocs.length;i++) {this.convertDoc(myDocs[i]);}MCE.iface.conversionEnd();return true;},convertDoc:function(aDoc){if (aDoc.getElementsByTagName('BODY').length) {this.convertElement(aDoc.getElementsByTagName('BODY')[0],'');return true;}return false;},restorePage:function(){var myDocs=MCE.iface.getAllDocuments();var i;for(i=0;i<myDocs.length;i++) {this.restoreDoc(myDocs[i]);}return true;},restoreDoc:function(aDoc){if (aDoc.getElementsByTagName('BODY').length) {this.restoreElement(aDoc.getElementsByTagName('BODY')[0],'');MCE.iface.setNewPage();return true;}return false;},restoreElement:function(elem){do {if (elem.converter_originalNode!=undefined) {var replacing=elem;elem=elem.nextSibling;replacing.parentNode.replaceChild(replacing.converter_originalNode,replacing);continue;}if (elem.firstChild!=undefined) {this.restoreElement(elem.firstChild);}} while ((elem!=undefined) && (elem=elem.nextSibling));return true;},convertElement:function(docu,history){var d=docu;if (d==undefined)return false;var myResult=false;var d_original;do {if (d.nodeType==1) {if (d.nodeName!='SCRIPT' && d.nodeName!='STYLE') {d_original=d.cloneNode(true);if (this.convertElement(d.firstChild,history+'/'+d.nodeName)) {d.converter_originalNode=d_original;if (d.previousSibling!=undefined && d.previousSibling.converter_originalNode!=undefined) {myResult=true;}}}} else if (d.nodeType!=8) { var d_content=d.nodeValue;var skip_sibling=false;if (d.nextSibling!=undefined && d.nextSibling.nodeName=='SUP') {var sup_index=d_content.length;d_content=d_content+'^'+d.nextSibling.firstChild.nodeValue;skip_sibling=true;}var re=/[0-9]/;var result=re.exec(d.nodeValue);if (!result) {d=d.nextSibling;if (skip_sibling) {skip_sibling=false;if (d!=undefined)d=d.nextSibling;}continue;}var new_content=this.convertText(d_content);if (new_content!=d_content) {myResult=true;var new_index=sup_index+new_content.length-d_content.length;if (new_content.substring(new_index)!=d_content.substring(sup_index)) {d.nodeValue=new_content;if (skip_sibling) {d.parentNode.removeChild(d.nextSibling);}}}};d=d.nextSibling;if (skip_sibling) {skip_sibling=false;if (d!=undefined)d=d.nextSibling;}} while (d!=undefined);return myResult;},convertText:function(txt){var rawText=txt; var re = /\r/g;rawText=rawText.replace(re,' ');re = /\n/g;rawText=rawText.replace(re,' ');var convertedText=''; var wordData=false; var convertedTmp='';wordData=this.getSelectedWord(rawText);if (!wordData) {return txt;}while (wordData) {var cr=this.doConversion(wordData.match,wordData);if (MCE.prefs.getPref('pref_replace_original') && cr && !cr.inhibit) {convertedText=convertedText+rawText.substring(0,wordData.index);} else {convertedText=convertedText+rawText.substring(0,wordData.index+wordData.match.length);}rawText=rawText.substring(wordData.index+wordData.match.length,rawText.length);if (cr && !cr.inhibit) {if (cr.only_show_converted || MCE.prefs.getPref('pref_only_show_converted')) {convertedTmp=cr.outCustom;} else {convertedTmp=cr.inValue + " " + cr.inUnit + " = " + cr.outCustom;}if (MCE.prefs.getPref('pref_replace_original')) {convertedText+=convertedTmp;} else {convertedText+=" ("+convertedTmp+")";}}wordData=this.getSelectedWord(rawText)}convertedText=convertedText+rawText;return convertedText;},computeFraction:function(text){var re = /([0-9]+)\/([0-9]+)/;var result=re.exec(text);if (!result) {return new Number(text);}var numr=new Number(result[1]);var numt=new Number(result[2]);if (!numr || !numt) {return 0;}return numr/numt;},getSelectedWord:function(word){var results=[];var tmp;var re = /(([0-9]*)\')?([0-9]+)[\s\-]([0-9]+\/[0-9]+)[\s\-]?(\"|inches|inch|in)/i;var result = re.exec(word);if (result) {if (!result[1])result[1]=0;tmp={parser: 'awkward Imperial'};tmp.value=new Number(0);if (result[2]!=undefined) {tmp.value+=new Number(12*result[2]);}tmp.value+=new Number(result[3]);tmp.value+=this.computeFraction(result[4]);tmp.unit="in";tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}var re = /([0-9]*)\'([0-9]+)[\s\-]([0-9\/]+)/;var result = re.exec(word);if (result) {tmp={parser: 'awkward Imperial II'};tmp.value=12*result[1]+1*result[2]+this.computeFraction(result[3]);tmp.unit="in";tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}var re = /([0-9]+)\'[ ]*([0-9]{1,2})\"/;var result = re.exec(word);if (result) {tmp={parser: 'informal Imperial'};tmp.value=12*result[1]+1*result[2];tmp.unit="in";tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);} else {var re = /([0-9]+)\'[ ]*([0-9]{1,2})/;var result = re.exec(word);if (result) {tmp={parser: 'informal Imperial II'};tmp.value=12*result[1]+1*result[2];tmp.unit="in";tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}}var re = new RegExp("([\\-]?[0-9.][0-9.,\\/]*)[\\s]*("+MCE.extended_symbols.join('|').replace(/\./g,"\\.")+")","i");var result = re.exec(word);if ((result) && (result[1]) && (result[2])) {var pos=MCE.util.inArray(result[2].toLowerCase().replace(/[\s]+/g,' '),MCE.extended_symbols_raw);if (pos>-1){tmp={parser: 'extended symbols'};tmp.value=result[1];tmp.unit=MCE.extended_symbols_raw[pos].replace(/ /g,'_');tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}}var re = /([0-9]{1,2}):?([0-9]{2})(:([0-9]{2}))?[\s]*(am|a\.m\.|pm|p\.m\.)?([\s]*([+\-][0-9]{4})|[\s]*([a-z]{1,4}))?/i;var result = re.exec(word);if (result &&MCE.tzUtil.validate_hour(result[1]) &&MCE.tzUtil.validate_minute(result[2]) &&((result[5] && !result[6]) ||(result[7] &&MCE.tzUtil.get_tz_offset(result[7])!=undefined) ||(result[8] &&MCE.tzUtil.get_tz_offset(result[8])!=undefined))) {tmp={parser: 'TZ I'};tmp.value=result[0];tmp.unit='internal_time';tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}var re = /([0-9]{1,2}):([0-9]{2})(:([0-9]{2}))?[\s]*[\(]?(UTC|GMT)([+\-])([0-9]{1,2})[\)]?/;var result = re.exec(word);if (result) {tmp={parser: 'TZ UTC',value: result[0],unit: 'internal_time',match: result[0],index: word.indexOf(result[0]),orig_tz: new Number(result[6]+result[7])};results.push(tmp);}var re = /([0-9]{1,2}):([0-9]{2})(:([0-9]{2}))?[\s]*(am|a\.m\.|pm|p\.m\.)?([\s]*([+\-][0-9]{4})|[\s]*([a-z]{3,4}))?/i;var result = re.exec(word);if (result &&MCE.tzUtil.validate_hour(result[1]) &&MCE.tzUtil.validate_minute(result[2]) &&(!result[6] ||(result[7] &&MCE.tzUtil.get_tz_offset(result[7])!=undefined) ||(result[8] &&MCE.tzUtil.get_tz_offset(result[8])!=undefined))) {tmp={parser: 'TZ II'};tmp.value=result[0];tmp.unit='internal_time';tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}var re = /([0-9]{1,2}):?([0-9]{2})(:([0-9]{2}))?[\s]*(am|a\.m\.|pm|p\.m\.)/i;var result = re.exec(word);if (result &&MCE.tzUtil.validate_hour(result[1]) &&MCE.tzUtil.validate_minute(result[2])) {tmp={parser: 'TZ III'};tmp.value=result[0];tmp.unit='internal_time';tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}var re = /([0-9]{1,2})[\s]*(am|a\.m\.|pm|p\.m\.)([\s]*([+\-][0-9]{4})|[\s]*([A-Z]{3,4}))?/i;var result = re.exec(word);if (result &&MCE.tzUtil.validate_hour(result[1]) &&((!result[4] &&!result[5]) ||(result[4] &&MCE.tzUtil.get_tz_offset(result[4])!=undefined) ||(result[5] &&MCE.tzUtil.get_tz_offset(result[5])!=undefined))) {if (!result[3]) {result[3]='';} else {result[3]=' '+result[3];}tmp={parser: 'TZ IV'};tmp.value=result[1]+':00 '+result[2]+result[3];tmp.unit='internal_time';tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}var re = /([\-]?)([\d]+\.|[\d]+|\.|[\d]+,)([\s]*|-)([\d]*)([^ .,!?;+\(\)0-9\s]+)/;if (re.exec(word)) {var re = new RegExp("([\\-]?)(((([\\d]+[.]?)+(,[0-9]+)?)|([\\d]*\\.[\\d]+))([/][0-9]+)?)[\\s]*(thousand|million)?[\\s\\-]*(["+MCE.symbol_1+"]["+MCE.symbol_2plus+"]*)","i");var result = re.exec(word);if ((result) && (result[2]) && (result[10]) && (result[10].substring(result[10].length-1)!='-')) {var tmpTest=result[2];var tmp_idx=result[2].indexOf("/");if (tmp_idx!=-1 && tmp_idx!=result[2].length-1) {var resultMembers=result[2].split("/");var i;for(i=0;i<resultMembers.length;i++) {resultMembers[i]=MCE.util.determine_separators(resultMembers[i]);}result[2]=this.computeFraction(resultMembers.join("/"));}var multi=1;if (result[9]) {if (result[9]=='million') {multi=1000000;} else {multi=1000;}}tmp={parser: 'regular comma'};tmp.value=result[1]+result[2];tmp.unit=MCE.util.simplify(result[10].toLowerCase());tmp.match=MCE.util.simplify(result[0]);tmp.index=word.indexOf(result[0]);tmp.multiplier=multi;results.push(tmp);}var re = new RegExp("([\\-]?)((([\\d]+[\\,]?)+(\\.[0-9]+)?)([/][0-9]+)?)[\\s]*(thousand|million)?[\\s]*(["+MCE.symbol_1+"]["+MCE.symbol_2plus+"]*)","i");var result = re.exec(word);if ((result) && (result[2]) && (result[8]) && (result[8].substring(result[8].length-1)!='-')) {var tmpTest=result[2];var tmp_idx=result[2].indexOf("/");if (tmp_idx!=-1 && tmp_idx!=result[2].length-1) {var resultMembers=result[2].split("/");for(i=0;i<resultMembers.length;i++) {resultMembers[i]=MCE.util.determine_separators(resultMembers[i]);}result[2]=this.computeFraction(resultMembers.join("/"));}var multi=1;if (result[7]) {if (result[7]=='million') {multi=1000000;} else {multi=1000;}}tmp={parser: 'regular period'};tmp.value=result[1]+result[2];tmp.unit=MCE.util.simplify(result[8].toLowerCase());tmp.match=MCE.util.simplify(result[0]);tmp.index=word.indexOf(result[0]);tmp.multiplier=multi;results.push(tmp);}}re = /([0-9]+)[\s\-]*(foot|feet|ft|'|`)[\s\-]*([0-9]*(\.[0-9]+)?)[\s\-]*?(([0-9]+)\/([0-9]+)[\s\-]*)?([\s]*(inches|inch|in))?/i;result = re.exec(word);if (result) {var fract=0;if (result[5] && (result[7]>0)) {fract=result[6]/result[7];}tmp={parser: 'explicit 10 foot 5'};if (result[3] || fract) {tmp.value=12*result[1]+1*result[3]+fract;tmp.unit='in';} else {tmp.value=result[1];tmp.unit='ft';}tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}re = /([0-9]+)[\s\-]*(foot|feet|ft|'|`)[\s\-]*(([0-9]+)\/([0-9]+)[\s\-]*)([\s]*(inches|inch|in))?/i;result = re.exec(word);if (result && result[5]>0) {tmp={parser: 'explicit 10 foot 1/5'};tmp.value=12*result[1]+result[4]/result[5];tmp.unit='in';tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}re = /([0-9]+)[\s]+stone(s)?[\s]+([0-9]+)/;result = re.exec(word);if (result) {tmp={parser: 'explicit 11 stone 4'};tmp.value=Number(result[1])+Number(result[3])/14;tmp.unit='stones';tmp.match=result[0];tmp.index=word.indexOf(result[0]);results.push(tmp);}if (MCE.prefs.getPref('pref_currency_enabled')) {results=results.concat(this.getCurrencyWord(word));}return this.bestAmong(results);},getCurrencyWord:function(word){var results=[];var tmp;var re;var result;var i;var number_regexp_next=6;var number_regexp="("+"([\\d]+\\,)+\\.[\\d]+|"+ "([\\d]+\\.)+\\,[\\d]+|"+ "([\\d]+\\,)+[\\d]+|"+ "([\\d]+\\.)+[\\d]+|"+ "\\.[\\d]+|"+ "[\\d]+"+ ")";if (/[\d.,]+[\s]*[a-z]{3}/i.exec(word)) {re = new RegExp(number_regexp+"[\\s]*([a-z]{3})([a-z]?)","i");result = re.exec(word);if (result &&!result[number_regexp_next+1] && MCE.util.inArray(result[number_regexp_next].toUpperCase(),MCE.currency.currencies)>-1) {tmp={parser: 'currency, regular, right'};tmp.value=result[1];tmp.unit='internal_currency';tmp.match=result[0];tmp.index=word.indexOf(result[0]);tmp.currency=result[number_regexp_next].toUpperCase();results.push(tmp);}}re = new RegExp("([a-z]?)([a-z]{3})[\\s]*"+number_regexp,"i");result = re.exec(word);if (result &&!result[1] && MCE.util.inArray(result[2].toUpperCase(),MCE.currency.currencies)>-1) {tmp={parser: 'currency, regular, left'};tmp.value=result[3];tmp.unit='internal_currency';tmp.match=result[0];tmp.index=word.indexOf(result[0]);tmp.currency=result[2].toUpperCase();results.push(tmp);}if (/[\d.,]+[\s]*[^\s\d.,]/.exec(word)) {re = new RegExp(number_regexp+"[\\s]*(["+MCE.currency.unambiguous_regexp+"])");result=re.exec(word);if (result) {tmp={parser: 'currency, unambiguous, right'};tmp.value=result[1];tmp.unit='internal_currency';tmp.match=result[0];tmp.index=word.indexOf(result[0]);for(i=0;i<MCE.currency.unambiguous_currency_symbols.length;i++) {if(result[number_regexp_next]==MCE.currency.unambiguous_currency_symbols[i].symbol) {tmp.currency=MCE.currency.unambiguous_currency_symbols[i].ISO;break;}}results.push(tmp);}}re = new RegExp("(["+MCE.currency.unambiguous_regexp+"])[\\s]*"+number_regexp);result=re.exec(word);if (result) {tmp={parser: 'currency, unambiguous, left'};tmp.value=result[2];tmp.unit='internal_currency';tmp.match=result[0];tmp.index=word.indexOf(result[0]);for(i=0;i<MCE.currency.unambiguous_currency_symbols.length;i++) {if(result[1]==MCE.currency.unambiguous_currency_symbols[i].symbol) {tmp.currency=MCE.currency.unambiguous_currency_symbols[i].ISO;break;}}results.push(tmp);}return results;},bestAmong:function(results){if (!results.length) {return false;}var br=results[0];br.match=br.match.replace(/[\s]+$/,'');for(var i=1;i<results.length;i++) {results[i].match=results[i].match.replace(/[\s]+$/,'');br=this.bestBetween(br,results[i]);}return br;},bestBetween:function(res1,res2){var re=/^[0-9 ]+$/;if (!res1.match || re.exec(res1.match)) {return res2;}if (!res2.match || re.exec(res2.match)) {return res1;}if (res1.index<res2.index) {return res1;}if (res1.index>res2.index) {return res2;}if (res2.match.length>res1.match.length) {return res2;}if (res2.match.length<res1.match.length) {return res1;}if (res2.value>res1.value) {return res2;}if (res1.currency!==undefined) {return res1;}if (res2.currency!==undefined) {return res2;}return res1;},init:function(){MCE.extended_symbols=new Array();MCE.extended_symbols_raw=new Array();MCE.symbol_1='';MCE.symbol_2plus='';MCE.conversions = MCE.core.registerConverters();}};MCE.core.init();}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.iface={cookiePrefix:"converter_",customConversion_text:false,onOptions:false,conversionStart:function(){},conversionEnd:function(){},showLocation:function(loc){window.setTimeout(function() {MCE.iface.browse(loc);}, 100);},browse:function(loc){window.open(loc,'_blank',null);},getCBody:function(){var cBodyT=document.getElementsByTagName("body");if (!cBodyT.length) {return false;}return cBodyT[0];},setNewPage:function(){this.setIcon(0);var cBody=this.getCBody();if (cBody) {cBody.setAttribute("converter_extension_converted",false);return true;}},setOldPage:function(){this.setIcon(1);var cBody=this.getCBody();if (cBody) {cBody.setAttribute("converter_extension_converted",true);return true;}},isNewPage:function(){var cBody=this.getCBody();if (cBody) {return (cBody.getAttribute("converter_extension_converted")!="true");}throw "Unexpected condition!";return false;},initControls:function(){document.write("<div id='EDGET_CONVERTER' style='width:60px; height: 54px; background-image: url(\"http://www.edget.eu/images/edget-gfx.png\"); cursor: pointer' onClick='MCE.iface.mouseClick()'><div style='position:relative; top:32px; left: 39px; width:21px; height:22px' onMouseOver='MCE.iface.oMouseOver()' onMouseOut='MCE.iface.oMouseOut()' onClick='MCE.iface.oMouseClick()'></div></div>");return;var statIcon=document.getElementById('converter_status');if (statIcon) {statIcon.hidden = !MCE.prefs.getPref('pref_fullpage_icon');}},init:function(){MCE.iface.initControls();return true;},onPopup:function(){return true;},fullPageAction:function(){if (this.isNewPage()) {MCE.core.convertPage();} else {MCE.core.restorePage();}},triggerCustom:function(content){this.customConversion_text=content;this.customConversionPopup();},customConversionPopup:function(){return true;},openPrefsWindow:function(){return true;},custom_conversion_convert:function(){return true;},custom_conversion_close:function(){return true;},custom_conversion_open:function(){return true;},custom_conversion_switch:function(){return true;},log: function(message) {return true;},statusPopupShowing:function(){return true;},getDocument:function(){return document;},getAllDocuments:function(){var docs=[];if (frames.length>0) {for(var i=0;i<frames.length;i++) {docs.push(frames[i].document);}}docs.push(document);return docs;},setIcon:function(offset){document.getElementById('EDGET_CONVERTER').style.backgroundPosition="0px "+(-1*offset*54)+"px";return true;},mouseClick:function(e){if (this.onOptions) {this.onOptions=false;return true;}MCE.iface.fullPageAction();},oMouseOver:function(e){var offset=1;if (this.isNewPage()) {offset=0;}this.setIcon(2+offset);},oMouseOut:function(e){var offset=1;if (this.isNewPage()) {offset=0;}this.setIcon(offset);},oMouseClick:function(e){this.onOptions=true;window.open('http://www.edget.eu/userprefs.php','_blank');}};MCE.iface.init();}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.currency={unambiguous_regexp:null,retrieveHTTP:function(from,to){var url;if (MCE.installMode=='local') {url="http://www.google.com/search?hl=en&q=1+"+from+"+in+"+to;} else if(MCE.installMode=='edget') {url="http://www.edget.eu/currency?from="+from+"&to="+to+"&key="+EDGET_BLOB.prefs.access_key;} else {alert("Converter: Unknown installation mode ["+MCE.installMode+"]");return false;}try {var request = new XMLHttpRequest();request.open("GET", url, false); request.send(null); if (request.status != 200) {return false;}var re=/<h2[^>]+><b>1 [^=]+= ([0-9.\s]+)[^<]+<\/b><\/h2>/.exec(request.responseText);var finalV=new Number(re[1].replace(/[\s]/, ''));if (finalV==0) {return false;}} catch (e) {return false;}return finalV;},getRate:function(from,to){var rate;if (rate=this.iface.getCache(from,to)) {return rate;}if (rate=this.retrieveHTTP(from,to)) {this.iface.saveCache(from,to,rate);return rate;}return false;},init:function(){var uc1='';for(var i=0;i<this.unambiguous_currency_symbols.length;i++) {uc1+=this.unambiguous_currency_symbols[i].symbol;}this.unambiguous_regexp=MCE.core.regexpise(uc1);},currencies:['AED','ANG','ARS','AUD','BGN','BHD','BOB','BND','BRL','BWP','CAD','CHF','CLP','CNY','COP','CSD','CRC','CZK','DKK','DOP','DZD','EEK','EGP','EUR','FJD','GBP','HNL','HKD','HRK','HUF','IDR','ILS','INR','ISK','JMD','JOD','JPY','KES','KRW','KWD','KYD','KZT','LBP','LKR','LTL','LVL','MAD','MDL','MKD','MUR','MXN','MYR','NAD','NGN','NIO','NOK','NPR','NZD','OMR','PEN','PGK','PHP','PKR','PLN','PYG','QAR','RON','RSD','RUB','SAR','SCR','SEK','SGD','SKK','SLL','SVC','THB','TND','TRY','TTD','TWD','TZS','UAH','UGX','USD','UYU','UZS','VEB','VND','YER','ZAR','ZMK'],unambiguous_currency_symbols:[{symbol: '€',ISO: 'EUR'},{symbol: '£',ISO: 'GBP'},{symbol: '₪',ISO: 'ILS'},{symbol: '฿',ISO: 'THB'},{symbol: '₦',ISO: 'NGN'},{symbol: '₲',ISO: 'PYG'},{symbol: '₱',ISO: 'PHP'}],currency_names:{'AED': 'United Arab Emirates dirham','AFN': 'Afghani','ALL': 'Lek','AMD': 'Armenian dram','ANG': 'Netherlands Antillean guilder','AOA': 'Kwanza','ARS': 'Argentine peso','AUD': 'Australian dollar','AWG': 'Aruban guilder','AZN': 'Azerbaijanian manat','BAM': 'Convertible marks','BBD': 'Barbados dollar','BDT': 'Bangladeshi taka','BGN': 'Bulgarian lev','BHD': 'Bahraini dinar','BIF': 'Burundian franc','BMD': 'Bermudian dollar (customarily known as Bermuda dollar)','BND': 'Brunei dollar','BOB': 'Boliviano','BOV': 'Bolivian Mvdol (funds code)','BRL': 'Brazilian real','BSD': 'Bahamian dollar','BTN': 'Ngultrum','BWP': 'Pula','BYR': 'Belarussian ruble','BZD': 'Belize dollar','CAD': 'Canadian dollar','CDF': 'Franc Congolais','CHE': 'WIR euro (complementary currency)','CHF': 'Swiss franc','CHW': 'WIR franc (complementary currency)','CLF': 'Unidad de Fomento (funds code)','CLP': 'Chilean peso','CNY': 'Renminbi','COP': 'Colombian peso','COU': 'Unidad de Valor Real','CRC': 'Costa Rican colon','CUP': 'Cuban peso','CVE': 'Cape Verde escudo','CZK': 'Czech Koruna','DJF': 'Djibouti franc','DKK': 'Danish krone','DOP': 'Dominican peso','DZD': 'Algerian dinar','EEK': 'Kroon','EGP': 'Egyptian pound','ERN': 'Nakfa','ETB': 'Ethiopian birr','EUR': 'Euro','FJD': 'Fiji dollar','FKP': 'Falkland Islands pound','GBP': 'Pound sterling','GEL': 'Lari','GHS': 'Cedi','GIP': 'Gibraltar pound','GMD': 'Dalasi','GNF': 'Guinea franc','GTQ': 'Quetzal','GYD': 'Guyana dollar','HKD': 'Hong Kong dollar','HNL': 'Lempira','HRK': 'Croatian kuna','HTG': 'Haiti gourde','HUF': 'Forint','IDR': 'Rupiah','ILS': 'Israeli new sheqel','INR': 'Indian rupee','IQD': 'Iraqi dinar','IRR': 'Iranian rial','ISK': 'Iceland krona','JMD': 'Jamaican dollar','JOD': 'Jordanian dinar','JPY': 'Japanese yen','KES': 'Kenyan shilling','KGS': 'Som','KHR': 'Riel','KMF': 'Comoro franc','KPW': 'North Korean won','KRW': 'South Korean won','KWD': 'Kuwaiti dinar','KYD': 'Cayman Islands dollar','KZT': 'Tenge','LAK': 'Kip','LBP': 'Lebanese pound','LKR': 'Sri Lanka rupee','LRD': 'Liberian dollar','LSL': 'Lesotho loti','LTL': 'Lithuanian litas','LVL': 'Latvian lats','LYD': 'Libyan dinar','MAD': 'Moroccan dirham','MDL': 'Moldovan leu','MGA': 'Malagasy ariary','MKD': 'Denar','MMK': 'Kyat','MNT': 'Tugrik','MOP': 'Pataca','MRO': 'Ouguiya','MUR': 'Mauritius rupee','MVR': 'Rufiyaa','MWK': 'Kwacha','MXN': 'Mexican peso','MXV': 'Mexican Unidad de Inversion (UDI) (funds code)','MYR': 'Malaysian ringgit','MZN': 'Metical','NAD': 'Namibian dollar','NGN': 'Naira','NIO': 'Cordoba oro','NOK': 'Norwegian krone','NPR': 'Nepalese rupee','NZD': 'New Zealand dollar','OMR': 'Rial Omani','PAB': 'Balboa','PEN': 'Nuevo sol','PGK': 'Kina','PHP': 'Philippine peso','PKR': 'Pakistan rupee','PLN': 'Złoty','PYG': 'Guarani','QAR': 'Qatari rial','RON': 'Romanian new leu','RSD': 'Serbian dinar','RUB': 'Russian rouble','RWF': 'Rwanda franc','SAR': 'Saudi riyal','SBD': 'Solomon Islands dollar','SCR': 'Seychelles rupee','SDG': 'Sudanese pound','SEK': 'Swedish krona','SGD': 'Singapore dollar','SHP': 'Saint Helena pound','SLL': 'Leone','SOS': 'Somali shilling','SRD': 'Surinam dollar','STD': 'Dobra','SYP': 'Syrian pound','SZL': 'Lilangeni','THB': 'Baht','TJS': 'Somoni','TMT': 'Manat','TND': 'Tunisian dinar','TOP': 'Pa\'anga','TRY': 'Turkish lira','TTD': 'Trinidad and Tobago dollar','TWD': 'New Taiwan dollar','TZS': 'Tanzanian shilling','UAH': 'Hryvnia','UGX': 'Uganda shilling','USD': 'US dollar','USN': 'United States dollar (next day) (funds code)','USS': 'United States dollar (same day) (funds code) (one source claims it is no longer used, but it is still on the ISO 4217-MA list)','UYU': 'Peso Uruguayo','UZS': 'Uzbekistan som','VEF': 'Venezuelan bolívar fuerte','VND': 'Vietnamese đồng','VUV': 'Vatu','WST': 'Samoan tala','XAF': 'CFA franc BEAC','XAG': 'Silver (one troy ounce)','XAU': 'Gold (one troy ounce)','XBA': 'European Composite Unit (EURCO) (bond market unit)','XBB': 'European Monetary Unit (E.M.U.-6) (bond market unit)','XBC': 'European Unit of Account 9 (E.U.A.-9) (bond market unit)','XBD': 'European Unit of Account 17 (E.U.A.-17) (bond market unit)','XCD': 'East Caribbean dollar','XDR': 'Special Drawing Rights','XFU': 'UIC franc (special settlement currency)','XOF': 'CFA Franc BCEAO','XPD': 'Palladium (one troy ounce)','XPF': 'CFP franc','XPT': 'Platinum (one troy ounce)','XTS': 'Code reserved for testing purposes','XXX': 'No currency','YER': 'Yemeni rial','ZAR': 'South African rand','ZMK': 'Kwacha','ZWL': 'Zimbabwe dollar','CSD': 'Serbian dinar','SKK': 'Slovak koruna','SVC': 'Salvadoran colon','VEB': 'Venezuelan bolivar'}};MCE.currency.init();}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.currency.iface={cacheExpiration:6*3600000, cookiePrefix:'converter_currency_rate_',getCache:function(from,to){var cookieName=this.cookiePrefix+from+'_'+to;var val=EDGET_BLOB.util.getCookie(cookieName);if (val==EDGET_BLOB.util.cookieNotSet) {return false;}return new Number(val);},saveCache:function(from,to,rate){var cookieName=this.cookiePrefix+from+'_'+to;var expDate=new Date();expDate.setTime(expDate.getTime()+this.cacheExpiration);return EDGET_BLOB.util.setCookie(cookieName,rate,expDate);}}}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.prefs={pref_list:{pref_24h:'boolean',pref_fullpage_icon:'boolean',pref_fullpage_menu:'boolean',pref_selection_menu:'boolean',pref_metric:'boolean',pref_celsius:'boolean',pref_in_fract:'boolean',pref_custom_single:'boolean',pref_currency_enabled:'boolean',pref_myCurrency:'string',pref_custom_convert_selection:'boolean',pref_thou_sep:'string',pref_dec_sep:'string',pref_one_way:'boolean',pref_only_show_converted:'boolean',pref_replace_original:'boolean',pref_default_unit:'string'},pref_defaults:{pref_24h:true,pref_fullpage_icon:true,pref_fullpage_menu:false,pref_selection_menu:true,pref_metric:true,pref_celsius:true,pref_in_fract:true,pref_custom_single:true,pref_currency_enabled:true,pref_myCurrency:'',pref_custom_convert_selection:true,pref_thou_sep:',',pref_dec_sep:'.',pref_one_way:false,pref_only_show_converted:false,pref_replace_original:false,pref_default_unit:''},prefs:{},prefs_cached:false,getPref:function(pref){this.iface.buildCache();return this.prefs[pref];},setPref:function(pref,val){if (!this.iface._writePref(pref,val)) {return false;}this.prefs[pref]=val;return true;}}}if (MCE!=undefined && MCE.applicationName=='Converter' && !MCE.finishedLoading) {MCE.prefs.iface={buildCache:function(){if (MCE.prefs.prefs_cached) {return true;}for(var pref in MCE.prefs.pref_list) {if (EDGET_BLOB.prefs[pref]==undefined) {MCE.prefs.prefs[pref]=MCE.prefs.pref_defaults[pref];} else {MCE.prefs.prefs[pref]=EDGET_BLOB.prefs[pref];}}MCE.prefs.prefs_cached=true;return true;}}}MCE.finishedLoading=true;EDGET_BLOB.finishedLoading=true;function doConvert(){MCE.iface.fullPageAction();}
