if(!nexacro.Device){nexacro.DeviceI=function(){this._userCreatedObj={};this.curDevice=0;this.isphone=0;this._is_hybrid=true;};var _pDeviceI=nexacro.DeviceI.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.DeviceI);_pDeviceI._type_name="Device";_pDeviceI.setup=function(){};_pDeviceI.execiOS=function(){};_pDeviceI.exec=function(_a){};_pDeviceI.makeID=function(){};_pDeviceI.runCallback=function(_a,_b,_c){};_pDeviceI.on_created=function(){};_pDeviceI.isHybrid=function(){};_pDeviceI.publicNumCheck=function(){};_pDeviceI.paramck_folderName=function(_a){};_pDeviceI.publicNumCheck_Sms=function(){};_pDeviceI.pramck_makeCall=function(_a,_b){};_pDeviceI.paramck_play=function(_a){};_pDeviceI.paramck_phoneNumber=function(_a){};_pDeviceI.paramck_message=function(_a){};_pDeviceI.paramck_sendMessage=function(_a,_b){};_pDeviceI.paramck_deleteMessage=function(_a){};_pDeviceI.paramck_AudioLoad=function(_a){};_pDeviceI.paramck_isReachable=function(_a){};_pDeviceI.paramck_watchStart=function(_a){};_pDeviceI.parmack_Geolocation=function(_a,_b,_c){};_pDeviceI.paramck_vibstartpos=function(_a){};_pDeviceI.paramck_vibrepeatcount=function(_a){};_pDeviceI.paramck_vibpattern=function(_a){};_pDeviceI.paramck_accuracy=function(_a){};_pDeviceI.parmack_AccelgetCurrentPosition=function(_a){};_pDeviceI.pramck_AccelwatchStart=function(_a,_b){};_pDeviceI.pramck_virtualproperty=function(_a){};_pDeviceI.pramck_asyncOpen=function(_a,_b){};_pDeviceI.pramck_asyncRead=function(_a){};_pDeviceI.pramck_asyncReadLine=function(_a){};_pDeviceI.paramck_asyncSeek=function(_a,_b){};_pDeviceI.pramck_asyncDelete=function(_a){};_pDeviceI.pramck_asyncIsExist=function(_a){};_pDeviceI.pramck_asyncGetFileList=function(_a,_b,_c){};_pDeviceI.pramck_filedialog_defaultextension=function(_a){};_pDeviceI.pramck_filedialog_filter=function(_a){};_pDeviceI.pramck_filedialog_numbercheck=function(_a){};_pDeviceI.pramck_filedialogasyncOpen=function(_a,_b,_c,_d){};_pDeviceI.pramck_contactString=function(_a){};_pDeviceI.isConvertDateToString=function(_a){};_pDeviceI.isValidDate=function(_a){};_pDeviceI.pramk_ContactFieldArray=function(_a){};_pDeviceI.pramk_ContactIMArray=function(_a){};_pDeviceI.pramk_ContactAddressArray=function(_a){};_pDeviceI.pramk_ContactOrganizationArray=function(_a){};_pDeviceI.pramk_ContactPhotoArray=function(_a){};_pDeviceI.parseDateToInt=function(_a){};_pDeviceI.paramck_takePicture=function(_a,_b,_c,_d,_e){};_pDeviceI.paramck_busytimeout=function(_a){};_pDeviceI.paramck_datasource=function(_a){};_pDeviceI.paramck_asyncOpen=function(_a,_b){};_pDeviceI.paramck_query=function(_a){};_pDeviceI.paramck_paramck_ldbconnection=function(_a){};_pDeviceI.paramck_asyncExecuteQuery=function(_a){};_pDeviceI.paramck_ImagePicker_asyncOpen=function(_a,_b,_c,_d,_e){};_pDeviceI.encodeString=function(_a){};_pDeviceI.DatasetToJSONString=function(_a){};_pDeviceI.DatasetToJSONObject=function(_a){};_pDeviceI.JSONObjectToDataset=function(_a,_b){};_pDeviceI.JSONStringToDataset=function(_a,_b){};_pDeviceI.DatasetToJSONString2=function(_a){};_pDeviceI.DatasetToJSONObject2=function(_a){};_pDeviceI.JSONObjectToDataset2=function(_a,_b){};_pDeviceI.JSONStringToDataset2=function(_a,_b){};_pDeviceI.exit=function(_a){};_pDeviceI=null;nexacro.Device=new nexacro.DeviceI();if(nexacro.Device.isHybrid()){if(window.system){if(nexacro.Device.curDevice==1){nexacro.System.prototype();nexacro.System.getSystemInfo();}}}if(nexacro.System){nexacro.System.makeCall=function(_a,_b){};nexacro.System.execBrowserHybrid=function(_a){};nexacro.System.play=function(_a){};nexacro.System.stop=function(){};nexacro.System.getSystemInfo=function(){};nexacro.System.recvPhoneInfo=function(_a){};nexacro.System.setOrientation=function(_a){};}}if(!nexacro.Sms){nexacro.Sms=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this._refform=_b;this.name=_a||"";this.phonenumber="";this.message="";this.enableevent=true;this._is_alive=true;this._event_list={"cansendmessage":1,"onsendmessage":1,"onrecvmessage":1,"ondeletemessage":1,"onerror":1,"onreadmessagelist":1};this.cansendmessage=null;this.onsendmessage=null;this.onrecvmessage=null;this.ondeletemessage=null;this.onerror=null;this.onreadmessagelist=null;var _c='""';var _d;_d='{"id":'+this._id+', "div":"Sms", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pSms=nexacro.Sms.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.Sms);_pSms._type_name="Sms";_pSms.destroy=function(){var _a='""';var _b;this._is_alive=false;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"Sms", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pSms.on_created=function(){};_pSms._getReferenceContext=function(){return this._refform;};_pSms.set_phonenumber=function(_a){if(this.paramck_phoneNumber(_a)==true){this.phonenumber=_a;return true;}return false;};_pSms.set_message=function(_a){if(this.paramck_message(_a)==true){this.message=_a;return true;}return false;};_pSms.sendMessage=function(_a,_b){if(nexacro.Device.curDevice==0){if(nexacro.__getMobileProductType().toLowerCase()=="shw-m380s"){this.sendUnsupportedFunc();return false;}}else{if(nexacro.SystemType=="ipad"){this.sendUnsupportedFunc();return false;}if(Number(nexacro.OSVersion.substring(0,1))<4){this.sendUnsupportedFunc();return false;}}var _c=new nexacro.SmsMessage("SmsMessage",this);_c.set_smsid("-1");if(_a==null&&_b==null){_c.set_phonenumber(this.phonenumber||"");_c.set_message(this.message||"");}else if(_a&&_b){if(typeof (_a)=="undefined"){_a="";}if(typeof (_b)=="undefined"){_b="";}if(!_c.set_phonenumber(_a)){return false;}_c.set_message(_b);}else if(_a!=null||_b!=null){if(typeof (_a)=="undefined"){_a="";}if(!_c.set_phonenumber(_a)){return false;}_c.set_message(_b||"");}else{return false;}var _d=this._cansendmessage(_c.phonenumber,_c.message);if(_d!=null){if(_d.toString()=="false"){return false;}}if(this.paramck_sendMessage(_c.phonenumber,_c.message)){var _e;var _f;var _g=_c.phonenumber.split("+").join("");if(nexacro.Device.curDevice==0){_e='{"number":"'+_g+'", "msg":"'+_c.message+'"}';}else{_e='{ "number":"'+_c.phonenumber;_e+='", "msg":"'+_c.message.replace(/\n/g,"_NEWLINE_");_e+='"}';}_f='{"id":'+this._id+', "div":"Sms", "method":"sendMessage", "params":'+_e+'}';nexacro.Device.exec(_f);return true;}else{return false;}};_pSms.recvStart=function(){if(nexacro.Device.curDevice==0){if(nexacro.__getMobileProductType().toLowerCase()=="shw-m380s"){this.sendUnsupportedFunc();return;}var _a='""';var _b='{"id":'+this._id+', "div":"Sms", "method":"recvStart", "params":'+_a+'}';nexacro.Device.exec(_b);}else{this.sendUnsupportedFunc();}};_pSms.recvStop=function(){if(nexacro.Device.curDevice==0){if(nexacro.__getMobileProductType().toLowerCase()=="shw-m380s"){this.sendUnsupportedFunc();return;}var _a='""';var _b='{"id":'+this._id+', "div":"Sms", "method":"recvStop", "params":'+_a+'}';nexacro.Device.exec(_b);}else{this.sendUnsupportedFunc();}};_pSms.readMessageList=function(){if(nexacro.Device.curDevice==0){if(nexacro.__getMobileProductType().toLowerCase()=="shw-m380s"||nexacro.__getMobileProductType().toLowerCase()=="lg-su760"){this.sendUnsupportedFunc();return;}var _a='""';var _b='{"id":'+this._id+', "div":"Sms", "method":"readMessageList", "params":'+_a+'}';nexacro.Device.exec(_b);}else{this.sendUnsupportedFunc();}};_pSms.deleteMessage=function(_a){if(nexacro.Device.curDevice==0){if(nexacro.__getMobileProductType().toLowerCase()=="shw-m380s"||nexacro.__getMobileProductType().toLowerCase()=="shw-m250s"||nexacro.__getMobileProductType().toLowerCase()=="lg-su760"){this.sendUnsupportedFunc();return false;}}else{this.sendUnsupportedFunc();return false;}this.index=_a;if(this.paramck_deleteMessage(this.index)){if(nexacro.Device.curDevice==0){this.id=_a;var _b='{"id":"'+this.id+'"}';var _c='{"id":'+this._id+', "div":"Sms", "method":"deleteMessage", "params":'+_b+'}';nexacro.Device.exec(_c);}return true;}else{return false;}};_pSms._onsendmessage=function(_a){var _b;if(nexacro.Device.curDevice==0){_b=new nexacro.SmsEventInfo("onsendmessage",_a.smsid,_a.phonenumber,_a.message);}else{_b=new nexacro.SmsEventInfo("onsendmessage", -1,_a.phonenumber,_a.message);}this._fire_onsendmessage(this,_b);};_pSms._fire_onsendmessage=function(_a,_b){if(this.onsendmessage&&this.onsendmessage._has_handlers){return this.onsendmessage._fireEvent(this,_b);}return true;};_pSms._onrecvmessage=function(_a){var _b=new nexacro.SmsEventInfo("onrecvmessage",_a.smsid,_a.phonenumber,_a.message);this._fire_onrecvmessage(this,_b);};_pSms._fire_onrecvmessage=function(_a,_b){if(this.onrecvmessage&&this.onrecvmessage._has_handlers){return this.onrecvmessage._fireEvent(this,_b);}return true;};_pSms._onreadmessagelist=function(objData){var arr=new Array(objData.length);for(var i=0;i=0){this.repeatcount=_a;}else{return false;}}else{return false;}}return true;};_pAudioPlayer.set_startpos=function(_a){if(typeof (_a)=="undefind"||_a==null){return false;}else{if((_a== -1)||(0<=_a&&_a<=this.duration)){this.startpos=_a;}else{return false;}}return true;};_pAudioPlayer.set_stoppos=function(_a){if(typeof (_a)=="undefind"||_a==null){return false;}else{if((_a== -1)||(0<=_a&&_a<=this.duration)){this.stoppos=_a;}else{return false;}}return true;};_pAudioPlayer.set_volume=function(_a){if(typeof (_a)=="undefind"||_a==null){return false;}else{if((_a>=0.0&&_a<=1.0)||_a== -1){this.volume=_a;}else{return false;}}return true;};_pAudioPlayer.set_pan=function(_a){if(typeof (_a)=="undefind"||_a==null){return false;}else{if((_a>=0.0&&_a<=1.0)||_a== -1){this.pan=_a;}else{return false;}}return true;};_pAudioPlayer.set_url=function(_a){var _b=this.paramck_AudioLoad(_a);if(_b==true){this.url=_a;return true;}else{return false;}};_pAudioPlayer.load=function(_a){this.startpos= -1;this.stoppos= -1;var _b=this.paramck_AudioLoad(_a);if(_b==true){this.url=_a;if(nexacro.Device.curDevice==0){var _c="";var _d="";var _e=_a.substring(0,9);if(_e.toLowerCase()=="%userapp%"){_c=1;_d=_a.substring(9,_a.length);}else if(_e.toLowerCase()=="%sd_card%"){_c=2;_d=_a.substring(9,_a.length);}else if(_e.substring(0,7)=="http://"){_d=_a;_c="";}else{var _f=application._getFileCache(_a);if(null!=_f){_c=3;_d=_f;}else{_d=_a;}}var _g='{"target":"'+_d+'", "EnvironmentPath":"'+_c+'"}';}else{var _h="";var _e=_a.substring(0,9);if(_e.toLowerCase()=="%userapp%"){_h="_userapp_"+_a.substring(9,_a.length);}else if(_e.substring(0,7)=="http://"){_h=_a;}else{var _f=application._getFileCache(_a);if(null!=_f){_h="_userapp_"+_f;}else{_h=_a;}}var _g='{"target":"'+_h+'"}';}var _i='{"id":'+this._id+', "div":"Sound", "method":"load", "params":'+_g+'}';nexacro.Device.exec(_i);return true;}else{return false;}};_pAudioPlayer.play=function(_a){var _b;var _c;var _d;if(typeof (_a)=="undefined"||_a==null||_a==""){_a=0;_d=1;}else{if(nexacro.Device.publicNumCheck(_a)&&_a>=0&&_a<=86400000){if(_a<200){return false;}else{_d=0;}}else{return false;}}if(typeof (this.repeatcount)=="undefined"||this.repeatcount==null){this.repeatcount=1;}if(typeof (this.startpos)=="undefined"||this.startpos==null||this.startpos==0){this.startpos= -1;}if(typeof (this.stoppos)=="undefined"||this.stoppos==null||this.stoppos==0){this.stoppos= -1;}if(this.volume>=0.0&&this.volume<=1.0){this.setvolume();}if((this.pan>=0.0&&this.pan<=1.0)||this.pan== -1){this.setpan();}if(nexacro.Device.curDevice==0){_b='{ repeatstartpos:"'+this.startpos;_b+='", repeatstoppos:"'+this.stoppos;_b+='", repeatcount:"'+this.repeatcount;_b+='", playingeventtime:"'+_a;_b+='", intervaltimestate:"'+_d;_b+='"}';}else{_b='{ "repeatstartpos":"'+this.startpos;_b+='", "repeatstoppos":"'+this.stoppos;_b+='", "repeatcount":"'+this.repeatcount;_b+='", "playingeventtime":"'+_a;_b+='", "intervaltimestate":"'+_d;_b+='"}';}if(this.bload==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _e=new nexacro.AudioErrorEventInfo("onerror","","0","1007","Not loaded");this._fire_onerror(this,_e);},20);return true;}if(this.bplay==true){var _e=this;nexacro.OnceCallbackTimer.callonce(this,function(){var _f=new nexacro.AudioErrorEventInfo("onerror","",_e.currentpos,"1008","Already playing");this._fire_onerror(this,_f);},20);return true;}if(this.startpos== -1&&this.stoppos== -1){_c='{"id":'+this._id+', "div":"Sound", "method":"play", "params":'+_b+'}';}else{_c='{"id":'+this._id+', "div":"Sound", "method":"repeatplay", "params":'+_b+'}';}nexacro.Device.exec(_c);return true;};_pAudioPlayer.pause=function(){if(this.bload==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","","0","1007","Not loaded");this._fire_onerror(this,_c);},20);return;}if(this.bplay==false&&this.bpaused==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","","0","1009","Not playing");this._fire_onerror(this,_c);},20);return;}if(this.bpaused==true){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","",this.currentpos,"1303","Already paused");this._fire_onerror(this,_c);},20);return;}var _a='""';var _b='{"id":'+this._id+', "div":"Sound", "method":"pause", "params":'+_a+'}';nexacro.Device.exec(_b);};_pAudioPlayer.resume=function(){if(this.bload==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","","0","1007","Not loaded");this._fire_onerror(this,_c);},20);return;}if(this.bplay==true){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","",this.currentpos,"1011","Not Paused");this._fire_onerror(this,_c);},20);return;}if(this.bpaused==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","",this.currentpos,"1010","Can't resume.");this._fire_onerror(this,_c);},20);return;}var _a='""';var _b='{"id":'+this._id+', "div":"Sound", "method":"resume", "params":'+_a+'}';nexacro.Device.exec(_b);};_pAudioPlayer.stop=function(){if(this.bload==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","","0","1007","Not loaded");this._fire_onerror(this,_c);},20);return;}if(this.bplay==false&&this.bpaused!=true){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","",this.currentpos,"1009","Not playing");this._fire_onerror(this,_c);},20);return;}var _a='""';var _b='{"id":'+this._id+', "div":"Sound", "method":"stop", "params":'+_a+'}';nexacro.Device.exec(_b);};_pAudioPlayer._onload=function(_a){var _b=new nexacro.AudioEventInfo("onload",_a.reason,_a.url,_a.playtime,_a.curtime,_a.repeatstart,_a.repeatend,_a.repeatcount);this.duration=_a.playtime;this.bload=true;this.bplay=false;this.bpaused=false;this.duration=_a.playtime;this._fire_onload(this,_b);};_pAudioPlayer._fire_onload=function(_a,_b){if(this.onload&&this.onload._has_handlers){return this.onload._fireEvent(this,_b);}return true;};_pAudioPlayer._onplay=function(_a){var _b=new nexacro.AudioEventInfo("onplay",_a.reason,_a.url,_a.playtime,_a.curtime,_a.repeatstart,_a.repeatend,_a.repeatcount);this.duration=_a.playtime;this.currentpos=_a.curtime;this.bplay=true;this.bpaused=false;this._fire_onplay(this,_b);};_pAudioPlayer._fire_onplay=function(_a,_b){if(this.onplay&&this.onplay._has_handlers){return this.onplay._fireEvent(this,_b);}return true;};_pAudioPlayer._onplaying=function(_a){var _b=new nexacro.AudioEventInfo("onplaying",_a.reason,_a.url,_a.playtime,_a.curtime,_a.repeatstart,_a.repeatend,_a.repeatcount);this.duration=_a.playtime;this.currentpos=_a.curtime;this._fire_onplaying(this,_b);};_pAudioPlayer._fire_onplaying=function(_a,_b){if(this.onplaying&&this.onplaying._has_handlers){return this.onplaying._fireEvent(this,_b);}return true;};_pAudioPlayer._onstop=function(_a){var _b=new nexacro.AudioEventInfo("onstop",_a.reason,_a.url,_a.playtime,_a.curtime,_a.repeatstart,_a.repeatend,_a.repeatcount);this.duration=_a.playtime;this.currentpos=_a.curtime;if(_a.reason=="4"||_a.reason=="5"){this.bpaused=false;this.bplay=false;this.currentpos=0.0;}else if(_a.reason=="6"){this.bpaused=true;this.bplay=false;}this._fire_onstop(this,_b);};_pAudioPlayer._fire_onstop=function(_a,_b){if(this.onstop&&this.onstop._has_handlers){return this.onstop._fireEvent(this,_b);}return true;};_pAudioPlayer.movePos=function(_a){if(this.bload==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _b=new nexacro.AudioErrorEventInfo("onerror","",0,"1007","Not loaded");this._fire_onerror(this,_b);},20);return;}if(typeof (_a)!="undefined"&&(_a>=0&&_a<=this.duration)&&nexacro.Device.publicNumCheck(_a)){this.time=_a||"";var _b;if(nexacro.Device.curDevice==0){_b='{ desttime:"'+this.time;_b+='"}';}else{_b='{ "desttime":"'+this.time;_b+='"}';}var _c='{"id":'+this._id+', "div":"Sound", "method":"movePos", "params":'+_b+'}';nexacro.Device.exec(_c);return true;}else{return false;}};_pAudioPlayer._onmovepos=function(_a){this.currentpos=_a.curtime;var _b=new nexacro.AudioEventInfo("onmovepos",_a.reason,_a.url,_a.playtime,_a.curtime,_a.repeatstart,_a.repeatend,_a.repeatcount);this.duration=_a.playtime;this._fire_onmovepos(this,_b);};_pAudioPlayer._fire_onmovepos=function(_a,_b){if(this.onmovepos&&this.onmovepos._has_handlers){return this.onmovepos._fireEvent(this,_b);}return true;};_pAudioPlayer.setvolume=function(){var _a;if(nexacro.Device.curDevice==0){_a='{ volume:"'+this.volume;_a+='"}';}else{_a='{ "volume":"'+this.volume;_a+='"}';}var _b='{"id":'+this._id+', "div":"Sound", "method":"setvolum", "params":'+_a+'}';nexacro.Device.exec(_b);};_pAudioPlayer.setpan=function(){var _a;if(nexacro.Device.curDevice==0){_a='{ pan:"'+this.pan;_a+='"}';}else{_a='{ "pan":"'+this.pan;_a+='"}';}var _b='{"id":'+this._id+', "div":"Sound", "method":"setpan", "params":'+_a+'}';nexacro.Device.exec(_b);};_pAudioPlayer._onerror=function(_a){var _b=new nexacro.AudioErrorEventInfo("onerror",_a.url,_a.curtime,_a.errorcode,_a.errormsg);this._fire_onerror(this,_b);};_pAudioPlayer._fire_onerror=function(_a,_b){if(this.onerror&&this.onerror._has_handlers){return this.onerror._fireEvent(this,_b);}return true;};_pAudioPlayer.paramck_AudioLoad=function(_a){if(_a==null||typeof (_a)=="undefined"||typeof (_a)!="string"){return false;}return true;};_pAudioPlayer=null;}if(!nexacro.AudioEventInfo){nexacro.AudioEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h){this.eventid=_a;this.reason=_b;this.url=_c;this.duration=_d;this.currentpos=_e;};var _pAudioEventInfo=nexacro.AudioEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.AudioEventInfo);_pAudioEventInfo._type_name="AudioEventInfo";_pAudioEventInfo=null;}if(!nexacro.AudioErrorEventInfo){nexacro.AudioErrorEventInfo=function(_a,_b,_c,_d,_e){this.eventid=_a;this.url=_b;this.currentpos=_c;this.errortype="ObjectError";this.statuscode=_d;this.errormsg=_e;};var _pAudioErrorEventInfo=nexacro.AudioErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.AudioErrorEventInfo);_pAudioErrorEventInfo._type_name="AudioErrorEventInfo";_pAudioErrorEventInfo=null;}if(!nexacro.Geolocation){nexacro.Geolocation=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.ACCURACY_0=0;this.ACCURACY_1=1;this.ACCURACY_2=2;this.ACCURACY_3=3;this.ACCURACY_4=4;this.coords={latitude:0.0,longitude:0.0,altitude:0.0,heading:0.0,speed:0.0,accuracy:0.0,altitudeaccuracy:0.0,set_latitude:function(){},set_longitude:function(){},set_altitude:function(){},set_heading:function(){},set_speed:function(){},set_accuracy:function(){},set_altitudeaccuracy:function(){}};this.timestamp="";this.sourcetype="";this.enableevent=true;this._event_list={"onrecvsuccess":1,"onrecverror":1};this.onrecvsuccess=null;this.onrecverror=null;var _c='""';var _d;_d='{"id":'+this._id+', "div":"Geolocation", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pGeolocation=nexacro.Geolocation.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.Geolocation);_pGeolocation._type_name="Geolocation";_pGeolocation.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"Geolocation", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pGeolocation.on_created=function(){};_pGeolocation.set_coords=function(){};_pGeolocation.set_latitude=function(){};_pGeolocation.set_longitude=function(){};_pGeolocation.set_altitude=function(){};_pGeolocation.set_heading=function(){};_pGeolocation.set_speed=function(){};_pGeolocation.set_accuracy=function(){};_pGeolocation.set_altitudeaccuracy=function(){};_pGeolocation.set_sourcetype=function(){};_pGeolocation.set_timestamp=function(){};_pGeolocation.getCurrentPosition=function(_a,_b){var _c;if(_a==null||_b==null){return false;}if(this.parmack_Geolocation(_a,_b,1)){this.Accuracy=_a;this.Timeout=_b;if(nexacro.Device.curDevice==0){_c='{Accuracy:"'+this.Accuracy+'", Timeout:"'+this.Timeout+'"}';}else{_c='{"Accuracy":"'+this.Accuracy;_c+='", "timeout":"'+this.Timeout+'"}';}var _d='{"id":'+this._id+', "div":"Geolocation", "method":"getCurrentPosition", "params":'+_c+'}';nexacro.Device.exec(_d);return true;}else{return false;}};_pGeolocation.watchStart=function(_a,_b){var _c;if(_a==null||_b==null){return false;}if(this.parmack_Geolocation(_a,_b,2)){this.Accuracy=_a.toString();this.IntervalTime=_b.toString();if(nexacro.Device.curDevice==0){_c='{"Accuracy":"'+this.Accuracy+'", "IntervalTime":"'+this.IntervalTime+'"}';}else{this.Accuracy=_a;_c='{"Accuracy":"'+this.Accuracy;_c+='", "timeout":"'+this.IntervalTime+'"}';}var _d='{"id":'+this._id+', "div":"Geolocation", "method":"watchStart", "params":'+_c+'}';nexacro.Device.exec(_d);}else{return false;}return true;};_pGeolocation.watchStop=function(){var _a='""';var _b='{"id":'+this._id+', "div":"Geolocation", "method":"watchStop", "params":'+_a+'}';nexacro.Device.exec(_b);};_pGeolocation._onrecvsuccess=function(_a){this.coords.latitude=_a.coords.latitude;this.coords.longitude=_a.coords.longitude;this.coords.altitude=_a.coords.altitude;this.coords.heading=_a.coords.heading;this.coords.speed=_a.coords.speed;this.coords.accuracy=_a.coords.accuracy;this.coords.altitudeaccuracy=_a.coords.altitudeaccuracy;this.timestamp=new Date(_a.timestamp);this.sourcetype=_a.sourcetype;var _b=new nexacro.GeolocationEventInfo("onrecvsuccess",this.coords,this.timestamp,this.sourcetype);this._fire_onrecvsuccess(this,_b);};_pGeolocation._fire_onrecvsuccess=function(_a,_b){if(this.onrecvsuccess&&this.onrecvsuccess._has_handlers){return this.onrecvsuccess._fireEvent(this,_b);}return true;};_pGeolocation._onrecverror=function(_a){var _b=new nexacro.GeolocationErrorEventInfo("onrecverror",_a.errorcode,_a.errormsg);this._fire_onrecverror(this,_b);};_pGeolocation._fire_onrecverror=function(_a,_b){if(this.onrecverror&&this.onrecverror._has_handlers){return this.onrecverror._fireEvent(this,_b);}return true;};_pGeolocation.parmack_Geolocation=function(_a,_b,_c){if(_a==null||typeof (_a)=="undefined"){return false;}if(_b==null||typeof (_b)=="undefined"){return false;}if(_c==null||typeof (_c)=="undefined"){return false;}if(!nexacro.Device.publicNumCheck(_a)){return false;}if(!nexacro.Device.publicNumCheck(_b)){return false;}if(nexacro.Device.curDevice==0){if(_c==1){if((_a>=0&&_a<3)&&(_b>=200&&_b<=86400000)){return true;}else{return false;}}else if(_c==2){if((_a>=0&&_a<3)&&(_b>=200&&_b<=86400000)){return true;}else{return false;}}}else{if(_c==1){if((_a>=0&&_a<5)&&(_b>=200&&_b<=86400000)){return true;}else{return false;}}else if(_c==2){if((_a>=0&&_a<5)&&(_b>=200&&_b<=86400000)){return true;}else{return false;}}}return true;};_pGeolocation=null;}if(!nexacro.GeolocationEventInfo){nexacro.GeolocationEventInfo=function(_a,_b,_c,_d){this.eventid=_a;this.coords={latitude:Number(_b.latitude),longitude:Number(_b.longitude),altitude:Number(_b.altitude),heading:Number(_b.heading),speed:Number(_b.speed),accuracy:Number(_b.accuracy),altitudeaccuracy:Number(_b.altitudeaccuracy)};this.timestamp=_c;this.sourcetype=_d;};var _pGeolocationEventInfo=nexacro.GeolocationEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.GeolocationEventInfo);_pGeolocationEventInfo._type_name="GeolocationEventInfo";_pGeolocationEventInfo=null;}if(!nexacro.GeolocationErrorEventInfo){nexacro.GeolocationErrorEventInfo=function(_a,_b,_c){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;};var _pGeolocationErrorEventInfo=nexacro.GeolocationErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.GeolocationErrorEventInfo);_pGeolocationErrorEventInfo._type_name="GeolocationErrorEventInfo";_pGeolocationErrorEventInfo=null;}if(!nexacro.Acceleration){nexacro.Acceleration=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.xpos=0;this.ypos=0;this.zpos=0;this.timestamp="";this.accuracy=0;this.enableevent=true;this._event_list={"onrecvsuccess":1,"onrecverror":1};this.onrecvsuccess=null;this.onrecverror=null;var _c='""';var _d='{"id":'+this._id+', "div":"Acceleration", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pAcceleration=nexacro.Acceleration.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.Acceleration);_pAcceleration._type_name="Acceleration";_pAcceleration.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"Acceleration", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pAcceleration.on_created=function(){};_pAcceleration.set_xpos=function(){};_pAcceleration.set_ypos=function(){};_pAcceleration.set_zpos=function(){};_pAcceleration.set_timestamp=function(){};_pAcceleration.set_accuracy=function(){};_pAcceleration.getCurrentAcceleration=function(_a){var _b;if(typeof (_a)=="undefined"||_a==null){this.accuracy=0;}else{if(this.paramck_accuracy(_a)){if(_a>=0&&_a<=3){this.accuracy=_a;}else{return false;}}else{return false;}}var _c=this.parmack_AccelgetCurrentPosition(this.accuracy);if(_c==true){if(nexacro.Device.curDevice==0){_b='{"Accuracy" : "'+this.accuracy.toString()+'"}';}else{_b='{"Accuracy":"'+this.accuracy+'"}';}var _d='{"id":'+this._id+', "div":"Acceleration", "method":"getCurrentAcceleration", "params":'+_b+'}';nexacro.Device.exec(_d);return true;}else{return false;}};_pAcceleration.watchStart=function(_a,_b){var _c;var _d=this.pramck_AccelwatchStart(_b,_a);if(_d==true){if(nexacro.Device.curDevice==0){_c='{ IntervalTime:"'+_b;_c+='", Accuracy:"'+_a;_c+='"}';}else{_c='{"timeout":"'+_b;_c+='", "Accuracy":"'+_a;_c+='"}';}var _e='{"id":'+this._id+', "div":"Acceleration", "method":"watchStart", "params":'+_c+'}';nexacro.Device.exec(_e);return true;}else{return false;}};_pAcceleration.watchStop=function(){var _a='""';var _b='{"id":'+this._id+', "div":"Acceleration", "method":"watchStop", "params":'+_a+'}';nexacro.Device.exec(_b);};_pAcceleration._onrecvsuccess=function(_a){this.xpos=parseFloat(_a.xpos);this.ypos=parseFloat(_a.ypos);this.zpos=parseFloat(_a.zpos);this.timestamp=new Date(_a.timestamp);this.accuracy=parseFloat(_a.accuracy);var _b=new nexacro.AccelerationEventInfo("onrecvsuccess",this);this._fire_onrecvsuccess(this,_b);};_pAcceleration._fire_onrecvsuccess=function(_a,_b){if(this.onrecvsuccess&&this.onrecvsuccess._has_handlers){return this.onrecvsuccess._fireEvent(this,_b);}return true;};_pAcceleration._onrecverror=function(_a){var _b=new nexacro.AccelerationErrorEventInfo("onrecverror",_a.errorcode,_a.errormsg);this._fire_onrecverror(this,_b);};_pAcceleration._fire_onrecverror=function(_a,_b){if(this.onrecverror&&this.onrecverror._has_handlers){return this.onrecverror._fireEvent(this,_b);}return true;};_pAcceleration.paramck_accuracy=function(_a){if(_a==null||typeof (_a)=="undefined"){return false;}if(!nexacro.Device.publicNumCheck(_a)){return false;}return true;};_pAcceleration.parmack_AccelgetCurrentPosition=function(_a){if(!nexacro.Device.publicNumCheck(_a)){return false;}return true;};_pAcceleration.pramck_AccelwatchStart=function(_a,_b){if(_a==null||typeof (_a)=="undefined"){return false;}if(_b==null||typeof (_b)=="undefined"){return false;}if((_b>=0&&_b<=3)&&(_a>=200&&_a<=86400000)){}else{return false;}if(!nexacro.Device.publicNumCheck(_a)){return false;}if(!nexacro.Device.publicNumCheck(_b)){return false;}return true;};_pAcceleration=null;}if(!nexacro.AccelerationEventInfo){nexacro.AccelerationEventInfo=function(_a,_b){this.eventid=_a;this.xpos=_b.xpos;this.ypos=_b.ypos;this.zpos=_b.zpos;this.timestamp=_b.timestamp;this.accuracy=_b.accuracy;};_pAccelerationEventInfo=nexacro.AccelerationEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.AccelerationEventInfo);_pAccelerationEventInfo._type_name="AccelerationEventInfo";_pAccelerationEventInfo=null;}if(!nexacro.AccelerationErrorEventInfo){nexacro.AccelerationErrorEventInfo=function(_a,_b,_c){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;};_pAccelerationErrorEventInfo=nexacro.AccelerationErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.AccelerationErrorEventInfo);_pAccelerationErrorEventInfo._type_name="AccelerationErrorEventInfo";_pAccelerationErrorEventInfo=null;}if(!nexacro.Vibrator){nexacro.Vibrator=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.repeatcount="1";this.patterns=new Array(100,100);this.startpos="0";this.enableevent=true;this._event_list={"onplay":1,"onstop":1,"onerror":1};this.onplay=null;this.onstop=null;this.onerror=null;var _c='""';var _d='{"id":'+this._id+', "div":"Vibrator", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pVibrator=nexacro.Vibrator.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.Vibrator);_pVibrator._type_name="Vibrator";_pVibrator.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"Vibrator", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pVibrator.on_created=function(){};_pVibrator.set_repeatcount=function(_a){if(this.paramck_vibrepeatcount(_a)){this.repeatcount=_a;return true;}return false;};_pVibrator.set_patterns=function(_a){if(this.paramck_vibpattern(_a)){this.patterns=_a;return true;}return false;};_pVibrator.set_startpos=function(_a){if(this.paramck_vibstartpos(_a)){this.startpos=_a;return true;}return false;};_pVibrator.hasVibrator=function(){if(nexacro.Device.curDevice==0){return nexacro.__hasVibrator();}else{if(nexacro.Device.isphone==1){return true;}else{return false;}}};_pVibrator.play=function(){var _a;if(nexacro.Device.curDevice==0){if(this.startpos=0){var _c=new Array();var _d=0;if(Number(this.startpos)%2!=0){_c[0]=0;_d++ ;}var _e=this.patterns.length;for(var _f=this.startpos;_f<_e;_f++ ){_c[_d]=this.patterns[_f];_d++ ;}_a='{ turn:"'+this.repeatcount.toString();_a+='", delay:"'+_c;_a+='"}';}else{return this._onerror({errorcode:'00001',errormsg:'parameter error'});}}else{_a='{ "turn":"'+this.repeatcount;_a+='", "delay":"'+this.patterns;_a+='", "startpos":"'+this.startpos;_a+='"}';if(nexacro.Device.isphone!=1){return this._onerror({errorcode:'10001',errormsg:'Unsupported device Vibrator'});}}var _b='{"id":'+this._id+', "div":"Vibrator", "method":"play", "params":'+_a+'}';nexacro.Device.exec(_b);};_pVibrator.stop=function(){var _a='""';var _b='{"id":'+this._id+', "div":"Vibrator", "method":"stop", "params":'+_a+'}';nexacro.Device.exec(_b);};_pVibrator._onplay=function(_a){var _b=new nexacro.VibratorEventInfo("onplay");this._fire_onplay(this,_b);};_pVibrator._fire_onplay=function(_a,_b){if(this.onplay&&this.onplay._has_handlers){return this.onplay._fireEvent(this,_b);}return true;};_pVibrator._onstop=function(_a){var _b=new nexacro.VibratorEventInfo("onstop");this._fire_onstop(this,_b);};_pVibrator._fire_onstop=function(_a,_b){if(this.onstop&&this.onstop._has_handlers){return this.onstop._fireEvent(this,_b);}return true;};_pVibrator._onerror=function(_a){var _b=new nexacro.VibratorErrorEventInfo("onerror",_a.errorcode,_a.errormsg);this._fire_onerror(this,_b);};_pVibrator._fire_onerror=function(_a,_b){if(this.onerror&&this.onerror._has_handlers){return this.onerror._fireEvent(this,_b);}return true;};_pVibrator.paramck_vibstartpos=function(_a){if(!nexacro.Device.publicNumCheck(_a)||Number(_a)<0){return false;}return true;};_pVibrator.paramck_vibrepeatcount=function(_a){if(!nexacro.Device.publicNumCheck(_a)){return false;}if(Number(_a)<0){return false;}return true;};_pVibrator.paramck_vibpattern=function(_a){if(_a instanceof Array){if(_a.length<=100){for(var _b=0;_b<_a.length;_b++ ){if(!nexacro.Device.publicNumCheck(_a[_b])){return false;}if(_a[_b]<1){return false;}}}else{return false;}if(_a.length%2!=0){return false;}}else{return false;}return true;};_pVibrator=null;}if(!nexacro.VibratorEventInfo){nexacro.VibratorEventInfo=function(_a){this.eventid=_a;};var _pVibratorEventInfo=nexacro.VibratorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.VibratorEventInfo);_pVibratorEventInfo._type_name="VibratorEventInfo";_pVibratorEventInfo=null;}if(!nexacro.VibratorErrorEventInfo){nexacro.VibratorErrorEventInfo=function(_a,_b,_c){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;};var _pVibratorErrorEventInfo=nexacro.VibratorErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.VibratorErrorEventInfo);_pVibratorErrorEventInfo._type_name="VibratorErrorEventInfo";_pVibratorErrorEventInfo=null;}if(!nexacro.Network){nexacro.Network=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.availabletype="";this.timestamp="";this.enableevent=true;this._event_list={"onrecvsuccess":1,"onrecverror":1};this.onrecvsuccess=null;this.onrecverror=null;var _c='""';var _d='{"id":'+this._id+', "div":"Network", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pNetwork=nexacro.Network.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.Network);_pNetwork._type_name="Network";_pNetwork.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"Network", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pNetwork.on_created=function(){};_pNetwork.set_availabletype=function(){};_pNetwork.set_timestamp=function(){};_pNetwork.isReachable=function(_a){var _b;if(_a==null){return false;}var _c=this.paramck_isReachable(_a);if(_c==true){if(nexacro.Device.curDevice==0){this.url=_a||"";_b='{"url":"'+this.url+'"}';}else{_b='{"target":"'+_a+'"}';this.availabletype="availabletype";this.timestamp="timestamp";}var _d='{"id":'+this._id+', "div":"Network", "method":"isReachable", "params":'+_b+'}';nexacro.Device.exec(_d);return true;}else{return false;}};_pNetwork.watchStart=function(_a){var _b;var _c=this.paramck_watchStart(_a);if(_c==true){if(nexacro.Device.curDevice==0){this.intervalTime=_a||"";_b='{"target":"'+this.intervalTime+'"}';}else{_b='{"target":"'+_a+'"}';}var _d='{"id":'+this._id+', "div":"Network", "method":"watchStart", "params":'+_b+'}';nexacro.Device.exec(_d);return true;}else{return false;}};_pNetwork.watchStop=function(){var _a='""';var _b='{"id":'+this._id+', "div":"Network", "method":"watchStop", "params":'+_a+'}';nexacro.Device.exec(_b);};_pNetwork._onrecvsuccess=function(_a){this.availabletype=parseInt(_a.availabletype)|0;this.timestamp=new Date(_a.timestamp);var _b=new nexacro.NetworkEventInfo("onrecvsuccess");this._fire_onrecvsuccess(this,_b);};_pNetwork._fire_onrecvsuccess=function(_a,_b){if(this.onrecvsuccess&&this.onrecvsuccess._has_handlers){return this.onrecvsuccess._fireEvent(this,_b);}return true;};_pNetwork._onrecverror=function(_a){var _b=new nexacro.NetworkErrorEventInfo("onrecverror",_a.errorcode,_a.errormsg);this._fire_onrecverror(this,_b);};_pNetwork._fire_onrecverror=function(_a,_b){if(this.onrecverror&&this.onrecverror._has_handlers){return this.onrecverror._fireEvent(this,_b);}return true;};_pNetwork.paramck_isReachable=function(_a){if(_a.trim().length<1||_a==null||typeof (_a)=="undefined"||typeof (_a)!="string"||_a==""){return false;}return true;};_pNetwork.paramck_watchStart=function(_a){if(_a==null||typeof (_a)=="undefined"){return false;}if(!nexacro.Device.publicNumCheck(_a)){return false;}if(_a<200||_a>86400000){return false;}return true;};_pNetwork=null;}if(!nexacro.NetworkEventInfo){nexacro.NetworkEventInfo=function(_a){this.eventid=_a;};var _pNetworkEventInfo=nexacro.NetworkEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.NetworkEventInfo);_pNetworkEventInfo._type_name="NetworkEventInfo";_pNetworkEventInfo=null;}if(!nexacro.NetworkErrorEventInfo){nexacro.NetworkErrorEventInfo=function(_a,_b,_c){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;};var _pNetworkErrorEventInfo=nexacro.NetworkErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.NetworkErrorEventInfo);_pNetworkErrorEventInfo._type_name="NetworkErrorEventInfo";_pNetworkErrorEventInfo=null;}if(!nexacro.FileDialog){nexacro.FileDialog=function(_a,_b){this.name=_a||"";this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.enableevent=true;this.defaultextension=true;this.filter="";this.filterindex=0;this.EnvironmentPath=1;this.async=true;this._event_list={"onclose":1,"onerror":1};this.onclose=null;this.onerror=null;var _c='{"defaultextension":"'+this.defaultextension+'","filter":"'+this.filter+'","filterindex":"'+this.filterindex+'"}';var _d='{"id":'+this._id+', "div":"FileDialog", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};nexacro.FileDialog.LOAD=1;nexacro.FileDialog.SAVE=2;nexacro.FileDialog.MULTILOAD=3;nexacro.FileDialog.SELFOLDER=4;var _pFileDialog=nexacro.FileDialog.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.FileDialog);_pFileDialog._type_name="FileDialog";_pFileDialog.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"FileDialog", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pFileDialog.on_created=function(){};_pFileDialog.set_defaultextension=function(_a){if(this.pramck_filedialog_defaultextension(_a)){if(typeof (_a)!="boolean"){if(_a.toLowerCase()=='true'){this.defaultextension=true;}else if(_a.toLowerCase()=='false'){this.defaultextension=false;}}else{this.defaultextension=_a;}return true;}else{return false;}};_pFileDialog.set_filter=function(_a){if(this.pramck_filedialog_filter(_a)){var _b=_a.split("|");var _c=_b.length;if(_c<2){return false;}if((_c%2==1)&&_b[_c-1]!=""){return false;}var _d=/[\*].[a-zA-Z0-9가-힣\*]/gi;for(var _e=0;_e<_c;_e++ ){if(_e%2==1){if(_d.test(_b[_e])==false){return false;}_d.lastIndex=0;}}this.filter=_a;return true;}else{return false;}};_pFileDialog.set_filterindex=function(_a){if(this.pramck_filedialog_numbercheck(_a)){this.filterindex=_a;return true;}else{return false;}};_pFileDialog.set_async=function(_a){};_pFileDialog.open=function(_a,_b,_c,_d){if(_c==null||typeof (_c)=="undefined"){_c="%USERAPP%";}if(_d==null||typeof (_d)=="undefined"){_d="";}if(!this.pramck_filedialogasyncOpen(_a,_b)){return false;}if(this.filter==""){this.filter="All(*.*)|*.*|";}var _e=this.filter.split("|");if(this.defaultextension==true&&this.filterindex>=(_e.length/2)){return false;}if(nexacro.Device.curDevice==0){var _h=_c.substring(0,9);if(_h.toLowerCase()=="%userapp%"){this.EnvironmentPath=1;}else if(_h.toLowerCase()=="%sd_card%"){this.EnvironmentPath=2;}else{return false;}}else{var _h=_c.substring(0,9);if(_h.toLowerCase()=="%userapp%"){_c="_userapp_";}else{return false;}}var _f='{"strTitle":"'+_a+'","constOpenMode":"'+_b+'","strInitialPath":"'+_c+'","strFileName":"'+_d+'","defaultextension":"'+this.defaultextension+'","filter":"'+this.filter+'","filterindex":"'+this.filterindex+'","EnvironmentPath":"'+this.EnvironmentPath+'"}';var _g;_g='{"id":'+this._id+', "div":"FileDialog", "method":"open", "params":'+_f+'}';nexacro.Device.exec(_g);return true;};_pFileDialog._onclose=function(_a){var _b=_a.virtualfiles;var _c=new Array(_b.length);for(var _e=0;_e<_b.length;_e++ ){var _f=new nexacro.VirtualFile("VirtualFile","");_f.filename=_b[_e].filename;_f.fullpath=_b[_e].fullpath;_f.path=_b[_e].path;_c[_e]=_f;}var _d=new nexacro.FileDialogEventInfo("onclose",_a.reason,_a.path,_c);this._fire_onclose(this,_d);};_pFileDialog._fire_onclose=function(_a,_b){if(this.onclose&&this.onclose._has_handlers){return this.onclose._fireEvent(this,_b);}return true;};_pFileDialog.pramck_filedialog_defaultextension=function(_a){if(_a==null||typeof (_a)=="undefined"||typeof (_a)!="boolean"){if(_a.toLowerCase()=='true'||_a.toLowerCase()=='false'){return true;}else{return false;}}else{return true;}};_pFileDialog.pramck_filedialog_filter=function(_a){if(_a==null||typeof (_a)=="undefined"||typeof (_a)!="string"){return false;}else{return true;}};_pFileDialog.pramck_filedialog_numbercheck=function(_a){if(_a==null||typeof (_a)=="undefined"){return false;}if(!nexacro.Device.publicNumCheck(_a)){return false;}return true;};_pFileDialog.pramck_filedialogasyncOpen=function(_a,_b){if(_a==null||typeof (_a)=="undefined"){return false;}if(_b==null||typeof (_b)=="undefined"){return false;}else{if(!nexacro.Device.publicNumCheck(_b)){return false;}if(_b>4||_b<1){return false;}}return true;};_pFileDialog=null;}if(!nexacro.FileDialogEventInfo){nexacro.FileDialogEventInfo=function(_a,_b,_c,_d){this.eventid=_a;this.reason=_b;this.path=_c;this.virtualfiles=_d;};var _pFileDialogEventInfo=nexacro.FileDialogEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.FileDialogEventInfo);_pFileDialogEventInfo._type_name="FileDialogEventInfo";_pFileDialogEventInfo=null;}if(nexacro.OS=="iOS"&&!nexacro.VirtualFile){nexacro.VirtualFile=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.filename="";this.fullpath="";this.path="";this.enableevent=true;this.async=true;this._event_list={"onsuccess":1,"onerror":1,"getEvent":1};this.onsuccess=null;this.onerror=null;this.getEvent=null;var _c='{"strFilename":"'+this.filename+'","fullpath":"'+this.fullpath+'","path":"'+this.path+'"}';var _d='{"id":'+this._id+', "div":"VirtualFile", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};nexacro.VirtualFile.openRead=0x0001;nexacro.VirtualFile.openWrite=0x0002;nexacro.VirtualFile.openAppend=0x0010;nexacro.VirtualFile.openCreate=0x1000;nexacro.VirtualFile.openText=0x0100;nexacro.VirtualFile.openBinary=0x0200;nexacro.VirtualFile.seekBegin=0x0000;nexacro.VirtualFile.seekCurrent=0x0001;nexacro.VirtualFile.seekEnd=0x0002;nexacro.VirtualFile.findAll=0x0001;nexacro.VirtualFile.findFileOnly=0x0002;nexacro.VirtualFile.findDirectoryOnly=0x0003;nexacro.VirtualFile.findCaseless=0x0010;nexacro.VirtualFile.EnvironmentPath=1;var _pVirtualFile=nexacro.VirtualFile.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.VirtualFile);_pVirtualFile._type_name="VirtualFile";_pVirtualFile.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"VirtualFile", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pVirtualFile.on_created=function(){};_pVirtualFile.set_filename=function(_a){if(this.pramck_virtualproperty(_a)){this.filename=_a;return true;}else{return false;}};_pVirtualFile.set_fullpath=function(_a){if(this.pramck_virtualproperty(_a)){this.fullpath=_a;return true;}else{return false;}};_pVirtualFile.set_path=function(_a){if(this.pramck_virtualproperty(_a)){this.path=_a;return true;}else{return false;}};_pVirtualFile.set_environmentpath=function(_a){if(this.pramck_virtualproperty(_a)){this.EnvironmentPath=_a;if(( +this.EnvironmentPath)!=( +this.EnvironmentPath)){return false;}return true;}else{return false;}};_pVirtualFile.set_async=function(_a){};_pVirtualFile.set_filename=function(){};_pVirtualFile.set_fullpath=function(){};_pVirtualFile.set_path=function(){};_pVirtualFile.open=function(_a,_b){this.nOptions="";this.nFiletype="";if(_a==null){this.nOptions=_a;}else if(_a!=null){this.nOptions=_b;this.fullpath=_a;}else{return false;}var _c=this.fullpath.lastIndexOf("/");if(_c== -1){_c=this.fullpath.lastIndexOf("%");}this.path=this.fullpath.substring(0,_c+1);var _d=this.fullpath.lastIndexOf("/");if(_d== -1){_d=this.fullpath.lastIndexOf("%");}this.filename=this.fullpath.substring(_d+1,this.fullpath.length);if(!this.pramck_asyncOpen(this.path,this.nOptions)){return false;}this.strFilename="";if(nexacro.Device.curDevice==0){this.strFilename=this.fullpath.substring(9,this.fullpath.length);var _g=this.fullpath.substring(0,9);if(_g.toLowerCase()=="%userapp%"){this.EnvironmentPath=1;}else if(_g.toLowerCase()=="%sd_card%"){this.EnvironmentPath=2;}else{var _h=application._getFileCache(_a);if(null!=_h){this.EnvironmentPath=3;this.strFilename=_h;}else{return false;}}}else{var _i="";var _g=this.fullpath.substring(0,9);if(_g.toLowerCase()=="%userapp%"){_i="_userapp_"+this.fullpath.substring(9,this.fullpath.length);}else{var _h=application._getFileCache(_a);if(null!=_h){_i="_userapp_"+_h;}else{_i=_a;}}this.strFilename=_i;}var _e="";if(nexacro.Device.curDevice==0){_e='{"strFilename":"'+this.strFilename+'","nOptions":"'+this.nOptions+'","nFiletype":"'+this.nFiletype+'","EnvironmentPath":"'+this.EnvironmentPath+'"}';}else{_e='{"strFilename":"'+this.strFilename+'","nOptions":"'+this.nOptions+'","nFiletype":"'+this.nFiletype+'"}';}var _f='{"id":'+this._id+', "div":"VirtualFile", "method":"open", "params":'+_e+'}';nexacro.Device.exec(_f);return true;};_pVirtualFile.close=function(){var _a='""';var _b='{"id":'+this._id+', "div":"VirtualFile", "method":"close", "params":'+_a+'}';nexacro.Device.exec(_b);};_pVirtualFile.read=function(_a){this.nLength=_a|| -1;this.strCharset="UTF-8";if(!this.pramck_asyncRead(this.nLength)){return false;}var _b='{ "nLength":"'+this.nLength;_b+='", "strCharset":"'+this.strCharset;_b+='"}';var _c='{"id":'+this._id+', "div":"VirtualFile", "method":"read", "params":'+_b+'}';nexacro.Device.exec(_c);return true;};_pVirtualFile.readLine=function(_a){this.strCharset="UTF-8";if(_a==null){this.strDelimeter="";}else if(_a!=null){this.strDelimeter=nexacro.Device.encodeString(_a);if(!this.pramck_asyncReadLine(this.strDelimeter)){return false;}}var _b='{ "strDelimeter":"'+this.strDelimeter;_b+='", "strCharset":"'+this.strCharset;_b+='"}';var _c='{"id":'+this._id+', "div":"VirtualFile", "method":"readLine", "params":'+_b+'}';nexacro.Device.exec(_c);return true;};_pVirtualFile.seek=function(_a,_b){this.nOffset="";this.nOption="";if(_b==null){this.nOffset=_a;this.nOption=VirtualFile.seekCurrent;}else if(_b!=null){this.nOffset=_a;this.nOption=_b;}if(!this.paramck_asyncSeek(this.nOffset,this.nOption)){return false;}var _c='{ "nOffset":"'+this.nOffset;_c+='", "nOption":"'+this.nOption;_c+='"}';var _d='{"id":'+this._id+', "div":"VirtualFile", "method":"seek", "params":'+_c+'}';nexacro.Device.exec(_d);return true;};_pVirtualFile.write=function(_a,_b){this.varData=_a;this.strCharset=_b;if(typeof (this.varData)=="undefined"||this.varData.length==0){return false;}var _c='{ "varData":"'+this.varData;_c+='", "strCharset":"'+this.strCharset;_c+='"}';var _d='{"id":'+this._id+', "div":"VirtualFile", "method":"write", "params":'+_c+'}';nexacro.Device.exec(_d);return true;};_pVirtualFile.remove=function(_a){this._strFilePath="";if(_a instanceof nexacro.VirtualFile){this._strFilePath=_a.fullpath;}else{this._strFilePath=_a;}if(!this.pramck_asyncDelete(this._strFilePath)){return false;}var _b="";var _c="";if(nexacro.Device.curDevice==0){_c=this._strFilePath.substring(0,9);if(_c.toLowerCase()=="%userapp%"){this.EnvironmentPath=1;_b=this._strFilePath.substring(9,this._strFilePath.length);}else if(_c.toLowerCase()=="%sd_card%"){this.EnvironmentPath=2;_b=this._strFilePath.substring(9,this._strFilePath.length);}else{var _f=application._getFileCache(_a);if(null!=_f){this.EnvironmentPath=3;_b=_f;}else{return false;}}}else{var _g="";_c=this._strFilePath.substring(0,9);if(_c.toLowerCase()=="%userapp%"){_g="_userapp_"+this._strFilePath.substring(9,this._strFilePath.length);}else{var _f=application._getFileCache(_a);if(null!=_f){_g="_userapp_"+_f;}else{return false;}}_b=_g;}var _d='{"strFilePath":"'+_b+'","EnvironmentPath":"'+this.EnvironmentPath+'"}';var _e='{"id":'+this._id+',"div":"VirtualFile", "method":"remove", "params":'+_d+'}';nexacro.Device.exec(_e);return true;};_pVirtualFile.getFileList=function(_a,_b,_c){this.strPath=_a;this.strSearchExpr=_b;this.constOption=_c;if(typeof (this.constOption)=="undefined"){this.constOption=VirtualFile.findAll;}if(_a==null||_b==null||!this.pramck_asyncGetFileList(this.strPath,this.strSearchExpr,this.constOption)){return false;}var _d="";if(nexacro.Device.curDevice==0){var _g=this.strPath.substring(0,9);if(_g.toLowerCase()=="%userapp%"){this.EnvironmentPath=1;_d=this.strPath.substring(9,this.strPath.length);}else if(_g.toLowerCase()=="%sd_card%"){this.EnvironmentPath=2;_d=this.strPath.substring(9,this.strPath.length);}else{var _h=application._getFileCache(_a);if(null!=_h){this.EnvironmentPath=3;_d=_h;}else{return false;}}}else{var _i="";var _g=this.strPath.substring(0,9);if(_g.toLowerCase()=="%userapp%"){_i="_userapp_"+this.strPath.substring(9,this.strPath.length);}else{var _h=application._getFileCache(_a);if(null!=_h){_i="_userapp_"+_h;}else{return false;}}_d=_i;}var _e='{"strPath":"'+_d+'" ,"strSearchExpr":"'+this.strSearchExpr+'","constOption":"'+this.constOption+'","EnvironmentPath":"'+this.EnvironmentPath+'"}';var _f='{"id":'+this._id+', "div":"VirtualFile", "method":"getFileList", "params":'+_e+'}';nexacro.Device.exec(_f);return true;};_pVirtualFile.getFileSize=function(){var _a;if(nexacro.Device.curDevice==0){_a='{ "strPath":"'+this.fullpath;_a+='","EnvironmentPath":"'+this.EnvironmentPath+'"}';}else{var _c="";var _d=this.fullpath.substring(0,9);if(_d.toLowerCase()=="%userapp%"){_c="_userapp_"+this.fullpath.substring(9,this.fullpath.length);}_a='{ "strPath":"'+_c;_a+='","EnvironmentPath":"'+this.EnvironmentPath+'"}';}var _b='{"id":'+this._id+', "div":"VirtualFile", "method":"getFileSize", "params":'+_a+'}';nexacro.Device.exec(_b);};_pVirtualFile.isExist=function(_a){if(!this.pramck_asyncIsExist(_a)){return false;}var _b="";if(nexacro.Device.curDevice==0){var _e=_a.substring(0,9);if(_e.toLowerCase()=="%userapp%"){this.EnvironmentPath=1;_b=_a.substring(9,_a.length);}else if(_e.toLowerCase()=="%sd_card%"){this.EnvironmentPath=2;_b=_a.substring(9,_a.length);}else{var _f=application._getFileCache(_a);if(null!=_f){this.EnvironmentPath=3;_b=_f;}else{return false;}}}else{var _g="";var _e=_a.substring(0,9);if(_e.toLowerCase()=="%userapp%"){_b="_userapp_"+_a.substring(9,_a.length);}else{var _f=application._getFileCache(_a);if(null!=_f){_b="_userapp_"+_f;}else{return false;}}}var _c='{ "strPath":"'+_b+'","EnvironmentPath":"'+this.EnvironmentPath+'"}';var _d='{"id":'+this._id+', "div":"VirtualFile", "method":"isExist", "params":'+_c+'}';nexacro.Device.exec(_d);return true;};_pVirtualFile.createDirectory=function(_a,_b){if(!this.pramck_asyncIsExist(_a)){return false;}if(_b==null){this.strPath=_a;this.bAllCreate=false;}else if(_b!=null){this.strPath=_a;this.bAllCreate=_b;}else{return false;}var _c="";if(nexacro.Device.curDevice==0){var _f=_a.substring(0,9);if(_f.toLowerCase()=="%userapp%"){_c=_a.substring(9,_a.length);this.EnvironmentPath=1;}else if(_f.toLowerCase()=="%sd_card%"){_c=_a.substring(9,_a.length);this.EnvironmentPath=2;}else{return false;}}else{var _f=_a.substring(0,9);if(_f.toLowerCase()=="%userapp%"){_c="_userapp_"+_a.substring(9,_a.length);}else{return false;}}var _d='{ "strPath":"'+_c+'","EnvironmentPath":"'+this.EnvironmentPath+'","bAllCreate":"'+this.bAllCreate+'"}';var _e='{"id":'+this._id+', "div":"VirtualFile", "method":"createDirectory", "params":'+_d+'}';nexacro.Device.exec(_e);return true;};_pVirtualFile.deleteDirectory=function(_a,_b){if(!this.pramck_asyncIsExist(_a)){return false;}if(_b==null){this.strPath=_a;this.bAllChild=false;}else if(_b!=null){this.strPath=_a;this.bAllChild=_b;}else{return false;}var _c="";if(nexacro.Device.curDevice==0){var _f=_a.substring(0,9);if(_f.toLowerCase()=="%userapp%"){_c=_a.substring(9,_a.length);this.EnvironmentPath=1;}else if(_f.toLowerCase()=="%sd_card%"){_c=_a.substring(9,_a.length);this.EnvironmentPath=2;}else{return false;}}else{var _f=_a.substring(0,9);if(_f.toLowerCase()=="%userapp%"){_c="_userapp_"+_a.substring(9,_a.length);}else{return false;}}var _d='{ "strPath":"'+_c+'","EnvironmentPath":"'+this.EnvironmentPath+'","bAllChild":"'+this.bAllChild+'"}';var _e='{"id":'+this._id+', "div":"VirtualFile", "method":"deleteDirectory", "params":'+_d+'}';nexacro.Device.exec(_e);return true;};_pVirtualFile.renameDirectory=function(_a,_b){if(!this.pramck_asyncIsExist(_a)){return false;}if(!this.paramck_folderName(_b)){return false;}if(_b==null){return false;}this.strPath=_a;this.strNewName=_b;var _c="";var _d="";if(nexacro.Device.curDevice==0){var _g=_a.substring(0,9);if(_g.toLowerCase()=="%userapp%"){_c=_a.substring(9,_a.length);this.EnvironmentPath=1;}else if(_g.toLowerCase()=="%sd_card%"){_c=_a.substring(9,_a.length);this.EnvironmentPath=2;}else{return false;}}else{var _g=_a.substring(0,9);if(_g.toLowerCase()=="%userapp%"){_c="_userapp_"+_a.substring(9,_a.length);}else{return false;}}if(nexacro.Device.curDevice==0){var _g=_b.substring(0,9);if(_g.toLowerCase()=="%userapp%"){_d=_b.substring(9,_b.length);this.EnvironmentPath=1;}else if(_g.toLowerCase()=="%sd_card%"){_d=_b.substring(9,_b.length);this.EnvironmentPath=2;}else{_d=_b;}}else{var _g=_b.substring(0,9);if(_g.toLowerCase()=="%userapp%"){_d="_userapp_"+_b.substring(9,_b.length);}else{_d=_b;}}var _e='{ "strPath":"'+_c+'","strNewName":"'+_d+'","EnvironmentPath":"'+this.EnvironmentPath+'"}';var _f='{"id":'+this._id+', "div":"VirtualFile", "method":"renameDirectory", "params":'+_e+'}';nexacro.Device.exec(_f);return true;};_pVirtualFile._onsuccess=function(objData){var _textdata="";var _bindata="";var temptxtlen=0;var tempbinlen=0;if(objData.textdata){temptxtlen=objData.textdata.length;}if(objData.binarydata){tempbinlen=objData.binarydata.length;}if(temptxtlen>0){_textdata=objData.textdata.replace(/\&\;/g,"&");_textdata=_textdata.replace(/\<\;/g,"<");_textdata=_textdata.replace(/\>\;/g,">");_textdata=_textdata.replace(/\"\;/g,"\"");_textdata=_textdata.replace(/\&apos\;/g,"'");_textdata=_textdata.replace(/\&\#32\;/g," ");_textdata=_textdata.replace(/\&\#13\;/g,"\r");_textdata=_textdata.replace(/\&\#10\;/g,"\n");_textdata=_textdata.replace(/\&\#9\;/g,"\t");}else if(tempbinlen>0){_bindata=objData.binarydata.replace(/\&\;/g,"&");_bindata=_bindata.replace(/\<\;/g,"<");_bindata=_bindata.replace(/\>\;/g,">");_bindata=_bindata.replace(/\"\;/g,"\"");_bindata=_bindata.replace(/\&apos\;/g,"'");_bindata=_bindata.replace(/\&\#32\;/g," ");_bindata=_bindata.replace(/\&\#13\;/g,"\r");_bindata=_bindata.replace(/\&\#10\;/g,"\n");_bindata=_bindata.replace(/\&\#9\;/g,"\t");}var e=new nexacro.VirtualFileEventInfo("onsuccess",objData.reason,_textdata,_bindata,eval(objData.fileattributelist),objData.filesize,objData.fileisexist);this._fire_onsuccess(this,e);};_pVirtualFile._fire_onsuccess=function(_a,_b){if(this.onsuccess&&this.onsuccess._has_handlers){return this.onsuccess._fireEvent(this,_b);}return true;};_pVirtualFile._onerror=function(_a){var _b=new nexacro.VirtualFileErrorEventInfo("onerror",_a.errorcode,_a.errormsg);this._fire_onerror(this,_b);};_pVirtualFile._fire_onerror=function(_a,_b){if(this.onerror&&this.onerror._has_handlers){return this.onerror._fireEvent(this,_b);}return true;};_pVirtualFile.toJSON=function(){return eval('({"filename":"'+this.filename+'","fullpath":"'+this.fullpath+'","path":"'+this.path+'"})');};_pVirtualFile.paramck_folderName=function(_a){if(_a==null){return false;}if(_a.match(/[\"/:*?<>|]/)){return false;}return true;};_pVirtualFile.pramck_virtualproperty=function(_a){if(typeof (_a)=="undefined"||_a==""||_a==null){return false;}else{return true;}};_pVirtualFile.pramck_asyncOpen=function(_a,_b){if(_b==null){if(typeof (_a)=="undefined"||_a==""||_a==null){return false;}if(!nexacro.Device.publicNumCheck(_a)){return false;}return true;}if(_a==null||typeof (_a)=="undefined"){return false;}if(_b==null||typeof (_b)=="undefined"){return false;}if(!nexacro.Device.publicNumCheck(_b)){return false;}return true;};_pVirtualFile.pramck_asyncRead=function(_a){if(_a==null||typeof (_a)=="undefined"){return false;}if(!nexacro.Device.publicNumCheck(_a)){return false;}return true;};_pVirtualFile.pramck_asyncReadLine=function(_a){if(_a==null||typeof (_a)=="undefined"||typeof (_a)!="string"){return false;}return true;};_pVirtualFile.paramck_asyncSeek=function(_a,_b){if(_a==null||typeof (_a)=="undefined"){return false;}if(_b==null||typeof (_b)=="undefined"){return false;}if(!nexacro.Device.publicNumCheck(_a)){return false;}return true;};_pVirtualFile.pramck_asyncDelete=function(_a){if(_a==null||typeof (_a)=="undefined"||_a==""){return false;}else{return true;}};_pVirtualFile.pramck_asyncIsExist=function(_a){if(_a==null||typeof (_a)=="undefined"||_a==""||typeof (_a)!="string"){return false;}else{return true;}};_pVirtualFile.pramck_asyncGetFileList=function(_a,_b,_c){if(_a==null||typeof (_a)=="undefined"||_a==""||typeof (_a)!="string"){return false;}if(_b==null||typeof (_b)=="undefined"||_b==""||typeof (_b)!="string"){return false;}if(_c==null||typeof (_c)=="undefined"||_c==""){return false;}if(!nexacro.Device.publicNumCheck(_c)){return false;}return true;};_pVirtualFile=null;}if(nexacro.OS=="iOS"&&!nexacro.VirtualFileEventInfo){nexacro.VirtualFileEventInfo=function(_a,_b,_c,_d,_e,_f,_g){this.eventid=_a;this.reason=_b;this.textdata=_c;this.binarydata=_d;if(typeof (_e)!="undefined"){var _h=new Array(_e.length);for(var _i=0;_i<_e.length;_i++ ){_h[_i]=new nexacro.FileAttribute(_e[_i]);}this.fileattributelist=_h;}else{this.fileattributelist="";}this.filesize=_f;this.fileisexist=_g;};var _pVirtualFileEventInfo=nexacro.VirtualFileEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.VirtualFileEventInfo);_pVirtualFileEventInfo._type_name="VirtualFileEventInfo";_pVirtualFileEventInfo=null;}if(nexacro.OS=="iOS"&&!nexacro.VirtualFileErrorEventInfo){nexacro.VirtualFileErrorEventInfo=function(_a,_b,_c){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;};var _pVirtualFileErrorEventInfo=nexacro.VirtualFileErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.VirtualFileErrorEventInfo);_pVirtualFileErrorEventInfo._type_name="VirtualFileErrorEventInfo";_pVirtualFileErrorEventInfo=null;}if(nexacro.OS=="iOS"&&!nexacro.FileAttribute){nexacro.FileAttribute=function(_a){this.accesstime=_a.accesstime;this.createtime=_a.createtime;this.filename=_a.filename;this.groupid=_a.groupid;this.modifytime=_a.modifytime;this.size=_a.size;this.userid=_a.userid;this.isdirectory=_a.isdirectory;this.isreadonly=_a.isreadonly;};var _pFileAttribute=nexacro.FileAttribute.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.FileAttribute);_pFileAttribute._type_name="FileAttribute";_pFileAttribute.on_created=function(){};_pFileAttribute.isDirectory=function(){return this.isdirectory;};_pFileAttribute.isReadOnly=function(){return this.isreadonly;};_pFileAttribute=null;}if(!nexacro.Camera){nexacro.Camera=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.imagequality="100";this.imagewidth="0";this.imageheight="0";this.encodingtype="JPEG";this.gettype="0";this.enableevent=true;this._event_list={"oncapture":1,"onerror":1};this.oncapture=null;this.onerror=null;var _c='""';var _d="";_d='{"id":'+this._id+', "div":"Camera", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pCamera=nexacro.Camera.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.Camera);_pCamera._type_name="Camera";_pCamera.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"Camera", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pCamera.on_created=function(){};_pCamera.set_imagequality=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.imagequality=100;}else{if(_a>=0&&_a<=100){this.imagequality=_a;}else{return false;}}return true;};_pCamera.set_imagewidth=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.imagewidth=0;}else{if(_a>=0){this.imagewidth=_a;}else{return false;}}return true;};_pCamera.set_imageheight=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.imageheight=0;}else{if(_a>=0){this.imageheight=_a;}else{return false;}}return true;};_pCamera.set_encodingtype=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.encodingtype="JPEG";}else{if(_a=="JPEG"||_a.toUpperCase()=="JPEG"){this.encodingtype="JPEG";}else if(_a=="PNG"||_a.toUpperCase()=="PNG"){this.encodingtype="PNG";}else{return false;}}return true;};_pCamera.set_gettype=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.gettype=0;}else{if(_a==0||_a==1){this.gettype=_a;}else{return false;}}return true;};_pCamera.takePicture=function(){if(this.paramck_takePicture(this.imagequality,this.imagewidth,this.imageheight,this.encodingtype,this.gettype)){var _a='{ "quality":"'+this.imagequality.toString();_a+='", "width":"'+this.imagewidth.toString();_a+='", "height":"'+this.imageheight.toString();_a+='", "encodingType":"'+this.encodingtype.toString();_a+='", "gettype":"'+this.gettype.toString();_a+='"}';var _b="";_b='{"id":'+this._id+', "div":"Camera", "method":"takePicture", "params":'+_a+'}';nexacro.Device.exec(_b);}else{}};_pCamera._oncapture=function(_a){var _b=new nexacro.CameraEventInfo("oncapture",_a.reason,_a.url,_a.imagedata,_a.imagewidth,_a.imageheight);this._fire_oncapture(this,_b);};_pCamera._fire_oncapture=function(_a,_b){if(this.oncapture&&this.oncapture._has_handlers){return this.oncapture._fireEvent(this,_b);}return true;};_pCamera._onerror=function(_a){var _b=new nexacro.CameraErrorEventInfo("onerror",_a.errorcode,_a.errormsg);this._fire_onerror(this,_b);};_pCamera._fire_onerror=function(_a,_b){if(this.onerror&&this.onerror._has_handlers){return this.onerror._fireEvent(this,_b);}return true;};_pCamera.paramck_takePicture=function(_a,_b,_c,_d,_e){if(_a!=null){if(!nexacro.Device.publicNumCheck(_a)){return false;}}if(_b!=null){if(!nexacro.Device.publicNumCheck(_b)){return false;}}if(_c!=null){if(!nexacro.Device.publicNumCheck(_c)){return false;}}if(_e!=null){if(!nexacro.Device.publicNumCheck(_e)){return false;}}if(_d!=null){if(typeof (_d)!="string"){return false;}}return true;};_pCamera=null;}if(!nexacro.CameraEventInfo){nexacro.CameraEventInfo=function(_a,_b,_c,_d,_e,_f){this.eventid=_a;this.reason=_b;this.url=_c;this.imagedata=_d;this.imagewidth=_e;this.imageheight=_f;};var _pCameraEventInfo=nexacro.CameraEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.CameraEventInfo);_pCameraEventInfo._type_name="CameraEventInfo";_pCameraEventInfo=null;}if(!nexacro.CameraErrorEventInfo){nexacro.CameraErrorEventInfo=function(_a,_b,_c){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;};var _pCameraErrorEventInfo=nexacro.CameraErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.CameraErrorEventInfo);_pCameraErrorEventInfo._type_name="CameraErrorEventInfo";_pCameraErrorEventInfo=null;}if(!nexacro.ImagePicker){nexacro.ImagePicker=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.imagequality="100";this.imagewidth="0";this.imageheight="0";this.encodingtype="JPEG";this.gettype="0";this.enableevent=true;this._event_list={"onsuccess":1,"onerror":1};this.onsuccess=null;this.onerror=null;var _c='""';var _d="";if(nexacro.Device.curDevice==0){_d='{"id":'+this._id+', "div":"ImagePicker", "method":"constructor", "params":'+_c+'}';}else{_d='{"id":'+this._id+', "div":"Camera", "method":"constructor", "params":'+_c+'}';}nexacro.Device.exec(_d);};var _pImagePicker=nexacro.ImagePicker.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.ImagePicker);_pImagePicker._type_name="ImagePicker";_pImagePicker.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];if(nexacro.Device.curDevice==0){_b='{"id":'+this._id+', "div":"ImagePicker", "method":"destroy", "params":'+_a+'}';}else{_b='{"id":'+this._id+', "div":"Camera", "method":"destroy", "params":'+_a+'}';}nexacro.Device.exec(_b);return true;};_pImagePicker.on_created=function(){};_pImagePicker.set_imagequality=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.imagequality=100;}else{if(_a>=0&&_a<=100){this.imagequality=_a;}else{return false;}}return true;};_pImagePicker.set_imagewidth=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.imagewidth=0;}else{if(_a>=0){this.imagewidth=_a;}else{return false;}}return true;};_pImagePicker.set_imageheight=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.imageheight=0;}else{if(_a>=0){this.imageheight=_a;}else{return false;}}return true;};_pImagePicker.set_encodingtype=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.encodingtype="JPEG";}else{if(_a=="JPEG"||_a.toUpperCase()=="JPEG"){this.encodingtype="JPEG";}else if(_a=="PNG"||_a.toUpperCase()=="PNG"){this.encodingtype="PNG";}else{return false;}}return true;};_pImagePicker.set_gettype=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.gettype=0;}else{if(_a==0||_a==1){this.gettype=_a;}else{return false;}}return true;};_pImagePicker.open=function(_a,_b){if((_a!=null&&typeof (_a)!="undefined")&&((_a==0)||(_a==1)||(_a=="0")||(_a=="1"))){this.gettype=_a;}else{return false;}if((_b!=null&&typeof (_b)!="undefined")&&((_b==0)||(_b==1)||(_b=="0")||(_b=="1"))){this.encodingtype=_b;}if(this.paramck_ImagePicker_asyncOpen(this.imagequality,this.imagewidth,this.imageheight,this.encodingtype,this.gettype)){var _c='{ "quality":"'+this.imagequality.toString();_c+='", "width":"'+this.imagewidth.toString();_c+='", "height":"'+this.imageheight.toString();_c+='", "encodingType":"'+this.encodingtype.toString();_c+='", "gettype":"'+this.gettype.toString();_c+='"}';var _d="";if(nexacro.Device.curDevice==0){_d='{"id":'+this._id+', "div":"ImagePicker", "method":"open", "params":'+_c+'}';}else{_d='{"id":'+this._id+', "div":"Camera", "method":"open", "params":'+_c+'}';}nexacro.Device.exec(_d);return true;}else{return false;}};_pImagePicker._onsuccess=function(_a){var _b=new nexacro.ImagePickerEventInfo("onsuccess",_a.url,_a.imagedata,_a.imagefile);this._fire_onsuccess(this,_b);};_pImagePicker._fire_onsuccess=function(_a,_b){if(this.onsuccess&&this.onsuccess._has_handlers){return this.onsuccess._fireEvent(this,_b);}return true;};_pImagePicker._onerror=function(_a){var _b=new nexacro.ImagePickerErrorEventInfo("onerror",_a.errorcode,_a.errormsg);this._fire_onerror(this,_b);};_pImagePicker._fire_onerror=function(_a,_b){if(this.onerror&&this.onerror._has_handlers){return this.onerror._fireEvent(this,_b);}return true;};_pImagePicker.paramck_ImagePicker_asyncOpen=function(_a,_b,_c,_d,_e){if(_a!=null){if(!nexacro.Device.publicNumCheck(_a)){return false;}}if(_b!=null){if(!nexacro.Device.publicNumCheck(_b)){return false;}}if(_c!=null){if(!nexacro.Device.publicNumCheck(_c)){return false;}}if(_e!=null){if(!nexacro.Device.publicNumCheck(_e)){return false;}}if(_d!=null){if(typeof (_d)!="string"){return false;}}return true;};_pImagePicker=null;}if(!nexacro.ImagePickerEventInfo){nexacro.ImagePickerEventInfo=function(_a,_b,_c,_d){this.eventid=_a;this.imageurl=_b;this.imagedata=_c;this.imagefile=_d;};var _pImagePickerEventInfo=nexacro.ImagePickerEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.ImagePickerEventInfo);_pImagePickerEventInfo._type_name="ImagePickerEventInfo";_pImagePickerEventInfo=null;}if(!nexacro.ImagePickerErrorEventInfo){nexacro.ImagePickerErrorEventInfo=function(_a,_b,_c){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;};var _pImagePickerErrorEventInfo=nexacro.ImagePickerErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.ImagePickerErrorEventInfo);_pImagePickerErrorEventInfo._type_name="ImagePickerErrorEventInfo";_pImagePickerErrorEventInfo=null;}if(!nexacro.AudioRecorder){nexacro.AudioRecorder=function(_a,_b){this._obj=_b;this._refform=_b;this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.brecording=false;this.bpaused=false;this.reccurtime="";this.audiofile="";this.samplerate=8000;this.channelconfig=1;if(nexacro.Device.curDevice==0){this.audioformat="mp3";}else{this.audioformat="wav";}this.enableevent=true;this._is_alive=true;this._event_list={"onrecord":1,"onrecording":1,"onstop":1,"onerror":1};this.onrecord=null;this.onrecording=null;this.onstop=null;this.onerror=null;var _c='""';var _d="";_d='{"id":'+this._id+', "div":"AudioRecorder", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pAudioRecorder=nexacro.AudioRecorder.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.AudioRecorder);_pAudioRecorder._type_name="AudioRecorder";_pAudioRecorder.destroy=function(){var _a='""';var _b;this._is_alive=false;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"AudioRecorder", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pAudioRecorder.on_created=function(){};_pAudioRecorder._getReferenceContext=function(){return this._refform;};_pAudioRecorder.set_audiofile=function(_a){if(typeof (_a)=="undefind"||_a==null||_a==""){return false;}else{this.audiofile=_a;}return true;};_pAudioRecorder.set_samplerate=function(_a){if(typeof (_a)=="undefind"||_a==null){return false;}else{if(nexacro.Device.publicNumCheck(_a)){if(_a>=8000&&_a<=96000){this.samplerate=_a;}else{return false;}}else{return false;}}return true;};_pAudioRecorder.set_channelconfig=function(_a){if(typeof (_a)=="undefind"||_a==null){return false;}else{if(_a==1||_a==2){this.channelconfig=_a;}else{return false;}}return true;};_pAudioRecorder.set_audioformat=function(_a){if(typeof (_a)=="undefind"||_a==null){return false;}else{var _b=_a.lastIndexOf(".");var _c=_a.substring(_b,_a.length).toUpperCase();if((nexacro.Device.curDevice==0)){if(_c=="OGG"||_c=="AMR_NB"||_c=="AMR_WB"||_c=="MP3"){this.audioformat=_a.toUpperCase();}else{return false;}}if(nexacro.Device.curDevice==1){if(_c=="WAV"){this.audioformat="WAV";}else{return false;}}}return true;};_pAudioRecorder.recordingStart=function(_a){var _b;if(typeof (_a)=="undefined"||_a==null||_a==""){return false;}else{if(nexacro.Device.publicNumCheck(_a)&&_a<=86400000&&_a>=0){if(_a<200){return false;}else{_b=0;}}else{return false;}}if(this.brecording==true){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror",this.audiofile,this.reccurtime,"1301","Already recording");this._fire_onerror(this,_c);},20);return false;}if(this.audiofile==""||typeof (this.audiofile)=="undefined"){var _c=this;nexacro.OnceCallbackTimer.callonce(this,function(){var _d=new nexacro.AudioErrorEventInfo("onerror",this.audiofile,this.reccurtime,"1304","Recording Setting Error");this._fire_onerror(this,_d);},20);return false;}if(nexacro.Device.curDevice==0){var _d="";var _e="";var _f=this.audiofile.substring(0,9);if(_f.toLowerCase()=="%userapp%"){_d=1;_e=this.audiofile.substring(9,this.audiofile.length);}else if(_f.toLowerCase()=="%sd_card%"){_d=2;_e=this.audiofile.substring(9,this.audiofile.length);}else{nexacro.OnceCallbackTimer.callonce(this,function(){var _g=new nexacro.AudioErrorEventInfo("onerror",this.audiofile,this.reccurtime,"1304","Recording Setting Error");this._fire_onerror(this,_g);},20);return false;}var _g='{ "audiofile":"'+_e;_g+='", "samplerate":"'+this.samplerate;_g+='", "channelconfig":"'+this.channelconfig;_g+='", "audioFormat":"'+this.audioformat;_g+='", "EnvironmentPath":"'+_d;_g+='", playingeventtime:"'+_a;_g+='", intervaltimestate:"'+_b;_g+='"}';var _h="";_h='{"id":'+this._id+', "div":"AudioRecorder", "method":"recordingStart", "params":'+_g+'}';}else{var _i="";var _f=this.audiofile.substring(0,9);if(_f.toLowerCase()=="%userapp%"){_i="_userapp_"+this.audiofile.substring(9,this.audiofile.length);}else{nexacro.OnceCallbackTimer.callonce(this,function(){var _j=new nexacro.AudioErrorEventInfo("onerror",this.audiofile,this.reccurtime,"1304","Recording Setting Error");this._fire_onerror(this,_j);},20);return false;}var _g='{ "audiofile":"'+_i;_g+='", "samplerate":"'+this.samplerate;_g+='", "channelconfig":"'+this.channelconfig;_g+='", "audioFormat":"'+this.audioformat;_g+='", "playingeventtime":"'+_a;_g+='", "intervaltimestate":"'+_b;_g+='"}';var _h="";_h='{"id":'+this._id+', "div":"Sound", "method":"recordingStart", "params":'+_g+'}';}nexacro.Device.exec(_h);return true;};_pAudioRecorder.recordingStop=function(){if(this.brecording==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","","0","1302","Not recording");this._fire_onerror(this,_c);},20);return;}var _a='""';var _b="";if(nexacro.Device.curDevice==0){_b='{"id":'+this._id+', "div":"AudioRecorder", "method":"recordingStop", "params":'+_a+'}';}else{_b='{"id":'+this._id+', "div":"Sound", "method":"recordingStop", "params":'+_a+'}';}nexacro.Device.exec(_b);};_pAudioRecorder.pause=function(){if(nexacro.Device.curDevice==0){return;}if(this.brecording==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","","0","1302","Not recording");this._fire_onerror(this,_c);},20);return;}if(this.bpaused==true){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror",this.audiofile,this.reccurtime,"1303","Already paused");this._fire_onerror(this,_c);},20);return;}var _a='""';var _b="";_b='{"id":'+this._id+', "div":"Sound", "method":"recpause", "params":'+_a+'}';nexacro.Device.exec(_b);};_pAudioRecorder.resume=function(){if(nexacro.Device.curDevice==0){return;}if(this.brecording==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror","","0","1302","Not recording");this._fire_onerror(this,_c);},20);return;}if(this.bpaused==false){nexacro.OnceCallbackTimer.callonce(this,function(){var _c=new nexacro.AudioErrorEventInfo("onerror",this.audiofile,this.reccurtime,"1011","Not paused");this._fire_onerror(this,_c);},20);return;}var _a='""';var _b="";_b='{"id":'+this._id+', "div":"Sound", "method":"recresume", "params":'+_a+'}';nexacro.Device.exec(_b);};_pAudioRecorder._onrecord=function(_a){this.brecording=true;this.bpaused=false;};_pAudioRecorder._fire_onrecord=function(_a,_b){if(this.onrecord&&this.onrecord._has_handlers){return this.onrecord._fireEvent(this,_b);}return true;};_pAudioRecorder._onrecording=function(_a){this.brecording=true;this.bpaused=false;this.reccurtime=_a.curtime;var _b=new nexacro.AudioEventInfo("onrecording",_a.reason,_a.url,_a.playtime,_a.curtime,null,null,null);this._fire_onrecording(this,_b);};_pAudioRecorder._fire_onrecording=function(_a,_b){if(this.onrecording&&this.onrecording._has_handlers){return this.onrecording._fireEvent(this,_b);}return true;};_pAudioRecorder._onstop=function(_a){if(_a.reason=="5"){this.brecording=false;this.bpaused=false;}else if(_a.reason=="6"){this.brecording=true;this.bpaused=true;}var _b=new nexacro.AudioEventInfo("onstop",_a.reason,_a.url,_a.playtime,_a.curtime,null,null,null);this._fire_onstop(this,_b);};_pAudioRecorder._fire_onstop=function(_a,_b){if(this.onstop&&this.onstop._has_handlers){return this.onstop._fireEvent(this,_b);}return true;};_pAudioRecorder._onerror=function(_a){var _b=new nexacro.AudioErrorEventInfo("onerror",_a.url,_a.curtime,_a.errorcode,_a.errormsg);this._fire_onerror(this,_b);};_pAudioRecorder._fire_onerror=function(_a,_b){if(this.onerror&&this.onerror._has_handlers){return this.onerror._fireEvent(this,_b);}return true;};_pAudioRecorder=null;}if(!nexacro.ContactSet){nexacro.ContactSet=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.isRunning=false;this.enableevent=true;this._event_list={"onsuccess":1,"onerror":1};this.onsuccess=null;this.onerror=null;var _c='""';var _d='{"id":'+this._id+', "div":"ContactSet", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pContactSet=nexacro.ContactSet.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.ContactSet);_pContactSet._type_name="ContactSet";_pContactSet.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"ContactSet", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pContactSet.on_created=function(){};_pContactSet.query=function(_a,_b){if(typeof (_a)=="undefined"||_a==""){return false;}if(!(nexacro.Device.pramck_contactString(_a))){return false;}if(_b==null||typeof (_b)=="undefined"){_b= -1;}else{try{var _f=Number(_b.toString());}catch(e){return false;}if(( +_f)!=( +_f)){return false;}if(_b==0||_b< -1){return false;}}var _c=_a.split(";");if(_c.length<1){return false;}for(var _g=0;_g<_c.length;_g++ ){var _h=_c[_g].split(":");if(_h.length<2){return false;}else{var _i=_h[0].toLowerCase();if(_c.length==1){if(!(_i=="all"||_i=="uniqueid"||_i=="categories"||_i=="birthday"||_i=="contactname"||_i=="nickname"||_i=="note"||_i=="phonenumbers"||_i=="emails"||_i=="ims"||_i=="urls"||_i=="addresses"||_i=="organizations")){return false;}}else{if(!(_i=="uniqueid"||_i=="categories"||_i=="birthday"||_i=="contactname"||_i=="nickname"||_i=="note"||_i=="phonenumbers"||_i=="emails"||_i=="ims"||_i=="urls"||_i=="addresses"||_i=="organizations")){return false;}}}if(_h[1].split(" ").join("").length==0){return false;}}if(nexacro.Device.curDevice==1){_a=_a.replace(/\?/g,"_QUESTION_");}var _d='{ "strQueryInfo":"'+_a;_d+='", "nResultCnt":"'+_b;_d+='"}';var _e='{"id":'+this._id+', "div":"ContactSet", "method":"query", "params":'+_d+'}';if(this.isRunning){return false;}this.isRunning=true;nexacro.Device.exec(_e);return true;};_pContactSet.append=function(_a){if(!(_a instanceof nexacro.Contact)){return false;}if(this.typeCheck(_a)==false){return false;}var _b=_a.toJson();var _c='{"id":'+this._id+', "div":"ContactSet", "method":"append", "params":'+_b+'}';if(this.isRunning){return false;}this.isRunning=true;nexacro.Device.exec(_c);return true;};_pContactSet.update=function(_a){if(!(_a instanceof nexacro.Contact)){return false;}if(this.typeCheck(_a)==false){return false;}var _b=_a.toJson();var _c='{"id":'+this._id+', "div":"ContactSet", "method":"update", "params":'+_b+'}';if(this.isRunning){return false;}this.isRunning=true;nexacro.Device.exec(_c);return true;};_pContactSet.remove=function(_a){if(typeof (_a)=="undefined"){return false;}if(_a!=null){if((( +_a)!=( +_a))||_a<0){return false;}}var _b='{ "strUniqueID":"'+_a;_b+='"}';var _c='{"id":'+this._id+', "div":"ContactSet", "method":"remove", "params":'+_b+'}';if(this.isRunning){return false;}this.isRunning=true;nexacro.Device.exec(_c);return true;};_pContactSet._onsuccess=function(_a){this.isRunning=false;if(nexacro.Device.curDevice==0){var _b="";var _c="";var _d="";var _e="";var _f="";var _g="";var _h="";var _i="";var _j="";var _k="";var _l="";var _m="";var _n="";var _o="";var _p="";var _q="";var _r="";var _s="";var _t="";var _u=new Array();for(var _v=0;_v<_a.length;_v++ ){if(typeof (_a[_v].contacts)!="undefined"){if(typeof (_a[_v].contacts.uniqueid)!="undefined"){_c=_a[_v].contacts.uniqueid;}if(typeof (_a[_v].contacts.contactname)!="undefined"){if(typeof (_a[_v].contacts.contactname.displayname)!="undefined"){_d=_a[_v].contacts.contactname.displayname;}if(typeof (_a[_v].contacts.contactname.familyname)!="undefined"){_e=_a[_v].contacts.contactname.familyname;}if(typeof (_a[_v].contacts.contactname.givenname)!="undefined"){_f=_a[_v].contacts.contactname.givenname;}if(typeof (_a[_v].contacts.contactname.middlename)!="undefined"){_g=_a[_v].contacts.contactname.middlename;}if(typeof (_a[_v].contacts.contactname.prefix)!="undefined"){_h=_a[_v].contacts.contactname.prefix;}if(typeof (_a[_v].contacts.contactname.suffix)!="undefined"){_i=_a[_v].contacts.contactname.suffix;}}if(typeof (_a[_v].contacts.nickname)!="undefined"){_j=_a[_v].contacts.nickname;}if(typeof (_a[_v].contacts.birthday)!="undefined"){_k=new Date(_a[_v].contacts.birthday);}if(typeof (_a[_v].contacts.note)!="undefined"){_l=_a[_v].contacts.note;}if(typeof (_a[_v].contacts.phonenumbers)!="undefined"){_m=new Array(_a[_v].contacts.phonenumbers.length);for(var _w=0;_w<_a[_v].contacts.phonenumbers.length;_w++ ){var _x=new nexacro.ContactField("",_a[_v].contacts.phonenumbers[_w].type,_a[_v].contacts.phonenumbers[_w].value,_a[_v].contacts.phonenumbers[_w].label,"");_m[_w]=_x;}}else{_m=new nexacro.ContactField("","","","","");}if(typeof (_a[_v].contacts.emails)!="undefined"){_n=new Array(_a[_v].contacts.emails.length);for(var _w=0;_w<_a[_v].contacts.emails.length;_w++ ){var _y=new nexacro.ContactField("",_a[_v].contacts.emails[_w].type,_a[_v].contacts.emails[_w].value,_a[_v].contacts.emails[_w].label,"");_n[_w]=_y;}}else{_n=new nexacro.ContactField("","","","","");}if(typeof (_a[_v].contacts.ims)!="undefined"){_o=new Array(_a[_v].contacts.ims.length);for(var _w=0;_w<_a[_v].contacts.ims.length;_w++ ){var _z=new nexacro.ContactIM("",_a[_v].contacts.ims[_w].type,_a[_v].contacts.ims[_w].value,_a[_v].contacts.ims[_w].label,_a[_v].contacts.ims[_w].protocoltype,_a[_v].contacts.ims[_w].protocollabel,"");_o[_w]=_z;}}else{_o=new nexacro.ContactIM("","","","","","","");}if(typeof (_a[_v].contacts.categories)!="undefined"){_p=new Array(_a[_v].contacts.categories.length);for(var _w=0;_w<_a[_v].contacts.categories.length;_w++ ){var _aa=new nexacro.ContactField("",_a[_v].contacts.categories[_w].type,_a[_v].contacts.categories[_w].value,_a[_v].contacts.categories[_w].label,"");_p[_w]=_aa;}}else{_p=new nexacro.ContactField("","","","","");}if(typeof (_a[_v].contacts.urls)!="undefined"){_q=new Array(_a[_v].contacts.urls.length);for(var _w=0;_w<_a[_v].contacts.urls.length;_w++ ){var _ab=new nexacro.ContactField("",_a[_v].contacts.urls[_w].type,_a[_v].contacts.urls[_w].value,_a[_v].contacts.urls[_w].label,"");_q[_w]=_ab;}}else{_q=new nexacro.ContactField("","","","","");}if(typeof (_a[_v].contacts.addresses)!="undefined"){_r=new Array(_a[_v].contacts.addresses.length);for(var _w=0;_w<_a[_v].contacts.addresses.length;_w++ ){var _ac=new nexacro.ContactAddress("",_a[_v].contacts.addresses[_w].type,_a[_v].contacts.addresses[_w].country,_a[_v].contacts.addresses[_w].postcode,_a[_v].contacts.addresses[_w].city,_a[_v].contacts.addresses[_w].region,_a[_v].contacts.addresses[_w].street,_a[_v].contacts.addresses[_w].label,"");_r[_w]=_ac;}}else{_r=new nexacro.ContactAddress("","","","","","","","","");}if(typeof (_a[_v].contacts.organizations)!="undefined"){_s=new Array(_a[_v].contacts.organizations.length);for(var _w=0;_w<_a[_v].contacts.organizations.length;_w++ ){var _ad=new nexacro.ContactOrganization("",_a[_v].contacts.organizations[_w].type,_a[_v].contacts.organizations[_w].company,_a[_v].contacts.organizations[_w].department,_a[_v].contacts.organizations[_w].title,_a[_v].contacts.organizations[_w].label,"");_s[_w]=_ad;}}else{_s=new nexacro.ContactOrganization("","","","","","","");}if(typeof (_a[_v].contacts.photos)!="undefined"){_t=new Array(_a[_v].contacts.photos.length);for(var _w=0;_w<_a[_v].contacts.photos.length;_w++ ){var _ae=new nexacro.ContactPhoto("",_a[_v].contacts.photos[_w].imagedata,_a[_v].contacts.photos[_w].label,"");_t[_w]=_ae;}}else{_t=new nexacro.ContactPhoto("","","","");}var _af=new nexacro.Contact("",_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,"");_u[_v]=_af;}if(nexacro.Device.curDevice==0){_b=_a[_v].reason;}else{_b=_a.reason;}}var _ag=new nexacro.ContactSetEventInfo("onsuccess",_b,_u);}else{_a.contacts=this.makeContacts(_a.contacts);var _ag=new nexacro.ContactSetEventInfo("onsuccess",_a.reason,_a.contacts);}this._fire_onsuccess(this,_ag);};_pContactSet._fire_onsuccess=function(_a,_b){if(this.onsuccess&&this.onsuccess._has_handlers){return this.onsuccess._fireEvent(this,_b);}return true;};_pContactSet._onerror=function(_a){this.isRunning=false;var _b=new nexacro.ContactSetErrorEventInfo("onerror",_a.errorcode,_a.errormsg);this._fire_onerror(this,_b);};_pContactSet._fire_onerror=function(_a,_b){if(this.onerror&&this.onerror._has_handlers){return this.onerror._fireEvent(this,_b);}return true;};_pContactSet.makeContacts=function(objData){var str=objData;var str2=eval("("+str+")");var persons=new Array();persons=str2.contact;var contactObjList=new Array();for(var k=0;k0){for(var _b=0;_b<_a.phonenumbers.length;_b++ ){var _c=_a.phonenumbers[_b].type*1;if(_c<0&&_c>12){return false;}var _d=_a.phonenumbers[_b].type+"";if(nexacro.Device.curDevice==0){if(!(_d=="0"||_d=="1"||_d=="2"||_d=="3"||_d=="4"||_d=="6"||_d=="7"||_d=="9"||_d=="10")){return false;}}else{if(_d=="1"){return false;}}}}}if(typeof (_a.emails)!="undefined"){if((_a.emails.length)>0){for(var _b=0;_b<_a.emails.length;_b++ ){var _c=_a.emails[_b].type*1;if(_c<0&&_c>12){return false;}var _d=_a.emails[_b].type+"";if(nexacro.Device.curDevice==0){if(!(_d=="0"||_d=="4"||_d=="6"||_d=="7"||_d=="10")){return false;}}else{if(_d=="1"){return false;}}}}}if(typeof (_a.categories)!="undefined"){if((_a.categories.length)>0){for(var _b=0;_b<_a.categories.length;_b++ ){var _c=_a.categories[_b].type*1;if(_c<0&&_c>12){return false;}var _d=_a.categories[_b].type+"";if(_d!="0"){return false;}}}}if(typeof (_a.urls)!="undefined"){if((_a.urls.length)>0){for(var _b=0;_b<_a.urls.length;_b++ ){var _c=_a.urls[_b].type*1;if(_c<0&&_c>12){return false;}var _d=_a.urls[_b].type+"";if(nexacro.Device.curDevice==0){if(_d!="12"){return false;}}else{if(_d=="1"){return false;}}}}}if(typeof (_a.ims)!="undefined"){if((_a.ims.length)>0){for(var _b=0;_b<_a.ims.length;_b++ ){var _c=_a.ims[_b].type*1;if(_c<0&&_c>12){return false;}var _d=_a.ims[_b].type+"";if(nexacro.Device.curDevice==0){if(_d!="7"){return false;}var _e=_a.ims[_b].protocoltype+"";if(!(_e=="0"||_e=="1"||_e=="2"||_e=="3"||_e=="4"||_e=="5"||_e=="6"||_e=="7"||_e=="8")){return false;}}else{if(_d=="1"){return false;}}}}}if(typeof (_a.addresses)!="undefined"){if((_a.addresses.length)>0){for(var _b=0;_b<_a.addresses.length;_b++ ){var _c=_a.addresses[_b].type*1;if(_c<0&&_c>12){return false;}var _d=_a.addresses[_b].type+"";if(nexacro.Device.curDevice==0){if(!(_d=="0"||_d=="4"||_d=="7"||_d=="10")){return false;}}else{if(_d=="1"){return false;}}}}}if(typeof (_a.organizations)!="undefined"){if((_a.organizations.length)>0){for(var _b=0;_b<_a.organizations.length;_b++ ){var _c=_a.organizations[_b].type*1;if(_c<0&&_c>12){return false;}var _d=_a.organizations[_b].type+"";if(nexacro.Device.curDevice==0){if(!(_d=="0"||_d=="7"||_d=="10")){return false;}}else{if(_d!="10"){return false;}}}}}return true;};_pContactSet=null;}if(!nexacro.ContactSetEventInfo){nexacro.ContactSetEventInfo=function(_a,_b,_c){this.eventid=_a;this.reason=_b;this.contacts=_c;};var _pContactSetEventInfo=nexacro.ContactSetEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.ContactSetEventInfo);_pContactSetEventInfo._type_name="ContactSetEventInfo";_pContactSetEventInfo=null;}if(!nexacro.ContactSetErrorEventInfo){nexacro.ContactSetErrorEventInfo=function(_a,_b,_c){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;};var _pContactSetErrorEventInfo=nexacro.ContactSetErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.ContactSetErrorEventInfo);_pContactSetErrorEventInfo._type_name="ContactSetErrorEventInfo";_pContactSetErrorEventInfo=null;}if(!nexacro.Contact){nexacro.Contact=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t){this.enableevent=true;if(arguments.length==2){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.uniqueid="";this.contactname={displayname:"",familyname:"",givenname:"",middlename:"",prefix:"",suffix:"",set_displayname:function(){},set_familyname:function(_u){this["familyname"]=_u;},set_givenname:function(_u){this["givenname"]=_u;},set_middlename:function(_u){this["middlename"]=_u;},set_prefix:function(_u){this["prefix"]=_u;},set_suffix:function(_u){this["suffix"]=_u;}};this.nickname="";this.birthday="";this.note="";this.phonenumbers="";this.emails="";this.ims="";this.categories="";this.urls="";this.addresses="";this.organizations="";this.photos="";}else{this.uniqueid=_b||"";this.contactname={displayname:(_c||""),familyname:(_d||""),givenname:(_e||""),middlename:(_f||""),prefix:(_g||""),suffix:(_h||""),set_displayname:function(){},set_familyname:function(_u){this["familyname"]=_u;},set_givenname:function(_u){this["givenname"]=_u;},set_middlename:function(_u){this["middlename"]=_u;},set_prefix:function(_u){this["prefix"]=_u;},set_suffix:function(_u){this["suffix"]=_u;}};this.nickname=(_i||"");this.birthday=(_j||"");if(typeof (_k)!="undefined"&&_k!=""){_k=_k.replace(/ /g,"\n");}this.note=(_k||"");this.phonenumbers=(_l||"");this.emails=(_m||"");this.ims=(_n||"");this.categories=(_o||"");this.urls=(_p||"");this.addresses=(_q||"");this.organizations=(_r||"");this.photos=(_s||"");}};nexacro.Contact.TYPE_CUSTOM=0;nexacro.Contact.TYPE_CALLBACK=1;nexacro.Contact.TYPE_FAX_HOME=2;nexacro.Contact.TYPE_FAX_WORK=3;nexacro.Contact.TYPE_HOME=4;nexacro.Contact.TYPE_MAIN=5;nexacro.Contact.TYPE_MOBILE=6;nexacro.Contact.TYPE_OTHER=7;nexacro.Contact.TYPE_OTHER_FAX=8;nexacro.Contact.TYPE_PAGER=9;nexacro.Contact.TYPE_WORK=10;nexacro.Contact.TYPE_IPHONE=11;nexacro.Contact.TYPE_HOMEPAGE=12;nexacro.Contact.PTYPE_CUSTOM=0;nexacro.Contact.PTYPE_AIM=1;nexacro.Contact.PTYPE_MSN=2;nexacro.Contact.PTYPE_YAHOO=3;nexacro.Contact.PTYPE_SKYPE=4;nexacro.Contact.PTYPE_QQ=5;nexacro.Contact.PTYPE_GOOGLE_TALK=6;nexacro.Contact.PTYPE_ICQ=7;nexacro.Contact.PTYPE_JABBER=8;nexacro.Contact.PTYPE_NETMEETING=9;nexacro.Contact.PTYPE_FACEBOOK=10;nexacro.Contact.PTYPE_GADUGADU=11;var _pContact=nexacro.Contact.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.Contact);_pContact._type_name="Contact";_pContact.on_created=function(){};_pContact.set_uniqueid=function(_a){if(nexacro.Device.pramck_contactString(_a)==true){this.uniqueid=_a;return true;}return false;};_pContact.set_displayname=function(_a){};_pContact.set_familyname=function(_a){if(nexacro.Device.pramck_contactString(_a)==true){this.contactname.familyname=_a;return true;}return false;};_pContact.set_givenname=function(_a){if(nexacro.Device.pramck_contactString(_a)==true){this.contactname.givenname=_a;return true;}return false;};_pContact.set_middlename=function(_a){if(nexacro.Device.pramck_contactString(_a)==true){this.contactname.middlename=_a;return true;}return false;};_pContact.set_prefix=function(_a){if(nexacro.Device.pramck_contactString(_a)==true){this.contactname.prefix=_a;return true;}return false;};_pContact.set_suffix=function(_a){if(nexacro.Device.pramck_contactString(_a)==true){this.contactname.suffix=_a;return true;}return false;};_pContact.set_nickname=function(_a){if(nexacro.Device.pramck_contactString(_a)==true){this.nickname=_a;return true;}return false;};_pContact.set_note=function(_a){if(nexacro.Device.pramck_contactString(_a)==true){this.note=_a;return true;}return false;};_pContact.set_birthday=function(_a){if(this.isValidDate(_a)==true){this.birthday=_a;return true;}return false;};_pContact.set_phonenumbers=function(_a){if(this.pramk_ContactFieldArray(_a)==true){this.phonenumbers=_a;return true;}return false;};_pContact.set_emails=function(_a){if(this.pramk_ContactFieldArray(_a)==true){this.emails=_a;return true;}return false;};_pContact.set_ims=function(_a){if(this.pramk_ContactIMArray(_a)==true){this.ims=_a;return true;}return false;};_pContact.set_categories=function(_a){if(this.pramk_ContactFieldArray(_a)==true){this.categories=_a;return true;}return false;};_pContact.set_urls=function(_a){if(this.pramk_ContactFieldArray(_a)==true){this.urls=_a;return true;}return false;};_pContact.set_addresses=function(_a){if(this.pramk_ContactAddressArray(_a)==true){this.addresses=_a;return true;}return false;};_pContact.set_organizations=function(_a){if(this.pramk_ContactOrganizationArray(_a)==true){this.organizations=_a;return true;}return false;};_pContact.set_photos=function(_a){if(this.pramk_ContactPhotoArray(_a)==true){this.photos=_a;return true;}return false;};_pContact.pramk_ContactFieldArray=function(_a){if(Object.prototype.toString.call(_a)==="[object Array]"||_a==""){for(var _b=0;_b<_a.length;_b++ ){if(!(nexacro.Device.pramck_contactString(_a[_b].type)&&nexacro.Device.pramck_contactString(_a[_b].value)&&nexacro.Device.pramck_contactString(_a[_b].label))){return false;}}return true;}return false;};_pContact.pramk_ContactIMArray=function(_a){if(Object.prototype.toString.call(_a)==="[object Array]"||_a==""){for(var _b=0;_b<_a.length;_b++ ){if(!(nexacro.Device.pramck_contactString(_a[_b].type)&&nexacro.Device.pramck_contactString(_a[_b].label)&&nexacro.Device.pramck_contactString(_a[_b].value)&&nexacro.Device.pramck_contactString(_a[_b].protocoltype)&&nexacro.Device.pramck_contactString(_a[_b].protocollabel))){return false;}}return true;}return false;};_pContact.pramk_ContactAddressArray=function(_a){if(Object.prototype.toString.call(_a)==="[object Array]"||_a==""){for(var _b=0;_b<_a.length;_b++ ){if(!(nexacro.Device.pramck_contactString(_a[_b].type)&&nexacro.Device.pramck_contactString(_a[_b].country)&&nexacro.Device.pramck_contactString(_a[_b].postcode)&&nexacro.Device.pramck_contactString(_a[_b].city)&&nexacro.Device.pramck_contactString(_a[_b].region)&&nexacro.Device.pramck_contactString(_a[_b].street)&&nexacro.Device.pramck_contactString(_a[_b].label))){return false;}}return true;}return false;};_pContact.pramk_ContactOrganizationArray=function(_a){if(Object.prototype.toString.call(_a)==="[object Array]"||_a==""){for(var _b=0;_b<_a.length;_b++ ){if(!(nexacro.Device.pramck_contactString(_a[_b].type)&&nexacro.Device.pramck_contactString(_a[_b].company)&&nexacro.Device.pramck_contactString(_a[_b].department)&&nexacro.Device.pramck_contactString(_a[_b].title)&&nexacro.Device.pramck_contactString(_a[_b].label))){return false;}}return true;}return false;};_pContact.pramk_ContactPhotoArray=function(_a){if(Object.prototype.toString.call(_a)==="[object Array]"||_a==""){for(var _b=0;_b<_a.length;_b++ ){if(!(nexacro.Device.pramck_contactString(_a[_b].imagedata)&&nexacro.Device.pramck_contactString(_a[_b].label))){return false;}}return true;}return false;};_pContact.toJson=function(){if(this.contactname.familyname==null){this.contactname.familyname="";}if(this.contactname.displayname==null){this.contactname.displayname="";}if(this.contactname.givenname==null){this.contactname.givenname="";}if(this.contactname.middlename==null){this.contactname.middlename="";}if(this.contactname.prefix==null){this.contactname.prefix="";}if(this.contactname.suffix==null){this.contactname.suffix="";}if(typeof (this.uniqueid)=="undefined"){this.uniqueid="";}var _a='{ "uniqueid":"'+this.uniqueid;if(nexacro.Device.curDevice==0){_a+='", "contactname":{';_a+=' "familyname":"'+this.contactname.familyname;_a+='", "displayname":"'+this.contactname.displayname;_a+='", "givenname":"'+this.contactname.givenname;_a+='", "middlename":"'+this.contactname.middlename;_a+='", "prefix":"'+this.contactname.prefix;_a+='", "suffix":"'+this.contactname.suffix;_a+='"}';}else{_a+='", "contactname":[{';_a+=' "familyname":"'+this.contactname.familyname;_a+='", "displayname":"'+this.contactname.displayname;_a+='", "givenname":"'+this.contactname.givenname;_a+='", "middlename":"'+this.contactname.middlename;_a+='", "prefix":"'+this.contactname.prefix;_a+='", "suffix":"'+this.contactname.suffix;_a+='"}]';}if(typeof (this.nickname)=="undefined"){this.nickname="";}_a+=', "nickname":"'+this.nickname;if(nexacro.Device.curDevice==0){if(this.birthday!=""){var _b;var _c;var _d;_b=this.birthday.getFullYear();_c=this.birthday.getMonth()+1;_d=this.birthday.getDate();_a+='", "birthday":"'+_b+'-'+_c+'-'+_d;}else{_a+='", "birthday":"'+this.birthday;}}else{if(this.birthday!=""){_a+='", "birthday":"'+this.birthday.getFullYear()+'/'+(this.birthday.getMonth()+1)+'/'+this.birthday.getDate();}else{_a+='", "birthday":"';}}if(typeof (this.note)=="undefined"){this.note="";}if(nexacro.Device.curDevice==1){this.note=this.note.replace(/\r/g,"");this.note=this.note.replace(/\n/g,"_NEWLINE_");this.note=this.note.replace(/ /g,"_NEWLINE_");}_a+='", "note":"'+this.note;_a+='", "phonenumbers":';if(typeof (this.phonenumbers)!="undefined"){if((this.phonenumbers.length)>0){_a+='[';for(var _e=0;_e0){_a+='[';for(var _e=0;_e0){_a+='[';for(var _e=0;_e0){_a+='[';for(var _e=0;_e0){_a+='[';for(var _e=0;_e0){_a+='[';for(var _e=0;_e0){_a+='[';for(var _e=0;_e0){_a+='[';for(var _e=0;_e86400000){return false;}return true;};_pLiteDBConnection.paramck_datasource=function(_a){if(_a==null||typeof (_a)=="undefined"){return false;}return true;};_pLiteDBConnection.paramck_asyncOpen=function(_a,_b){if(_a==null||typeof (_a)=="undefined"||typeof (_a)!="string"){return false;}if(!nexacro.Device.publicNumCheck(_b)){return false;}return true;};_pLiteDBConnection.paramck_query=function(_a){if(_a==null||typeof (_a)=="undefined"||typeof (_a)!="string"){return false;}return true;};_pLiteDBConnection.paramck_paramck_ldbconnection=function(_a){if(_a==null||typeof (_a)=="undefined"||!(_a instanceof nexacro.LiteDBConnection)){if(typeof (_a)!="string"){}else{return false;}}return true;};_pLiteDBConnection.paramck_asyncExecuteQuery=function(_a){if(_a==null||typeof (_a)=="undefined"||typeof (_a)!="string"){return false;}return true;};_pLiteDBConnection=null;}if(nexacro.OS=="iOS"&&!nexacro.LiteDBParameter){nexacro.LiteDBParameter=function(_a,_b,_c){this.name=_a||"";this.type=_b||"string";this.value=_c;};var _pLiteDBParameter=nexacro.LiteDBParameter.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.LiteDBParameter);_pLiteDBParameter._type_name="LiteDBParameter";_pLiteDBParameter.set_name=function(_a){if(this.paramck_datasource(_a)){this.name=_a;return true;}else{return false;}};_pLiteDBParameter.set_value=function(_a){if(this.paramck_datasource(_a)){this.value=_a;return true;}else{return false;}};_pLiteDBParameter.set_type=function(_a){if(this.paramck_datasource(_a)){this.type=_a;return true;}else{return false;}};_pLiteDBParameter.toJSON=function(){var valueString;if(this.value==null){valueString='null';}else if(this.value==undefined){valueString='undefined';}else{switch(nexacro.DataUtils.toTypeCode(this.type)){case 2:case 3:valueString=nexacro.DataUtils.toTextFromDecimal(this.value);break;case 4:valueString='"'+nexacro.DataUtils.toTextFromDecimal(this.value)+'"';break;case 5:valueString='"'+nexacro.DataUtils.toTextFromDate(this.value)+'"';break;case 6:valueString='"'+nexacro.DataUtils.toTextFromTime(this.value)+'"';break;case 7:if(this.value.dateObj==undefined){valueString='"'+nexacro.DataUtils.toTextFromDateTime(this.value)+'"';}else{valueString='"'+nexacro.DataUtils.toTextFromDateTime(this.value.dateObj)+'"';}break;case 0:case 1:case 8:case 9:default:valueString='"'+nexacro.Device.encodeString(this.value)+'"';break;}}return eval('({"name":"'+this.name+'","type":'+nexacro.DataUtils.toTypeCode(this.type)+',"value":'+valueString+'})');};_pLiteDBParameter.paramck_datasource=function(_a){if(_a==null||typeof (_a)=="undefined"){return false;}return true;};_pLiteDBParameter=null;}if(nexacro.OS=="iOS"&&!nexacro.LiteDBStatement){nexacro.LiteDBStatement=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this._obj=_b;this.query="";this.ldbconnection="";this.parameters={};this.paramdataset;this.applyrowpos= -1;this.enableevent=true;this.async=true;this._event_list={"onsuccess":1,"onerror":1};this.onsuccess=null;this.onerror=null;var _c='""';var _d='{"id":'+this._id+', "div":"SQLStatement", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pLiteDBStatement=nexacro.LiteDBStatement.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.LiteDBStatement);_pLiteDBStatement._type_name="LiteDBStatement";_pLiteDBStatement.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"SQLStatement", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pLiteDBStatement.on_created=function(){};_pLiteDBStatement.set_query=function(_a){if(this.paramck_query(_a)){this.query=_a;return true;}else{return false;}};_pLiteDBStatement.set_ldbconnection=function(_a){var _b=false;if(_a instanceof nexacro.LiteDBConnection){this.ldbconnection=_a;_b=true;}else if(typeof (_a)=="string"){var _c="@";if(_a.indexOf(_c)==0){_a=_a.substring(_c.length);}else if(_a.match(/@/)==null){_a=_c+_a;}if(null!=this._obj[_a]&&this._obj[_a] instanceof nexacro.LiteDBConnection){this.ldbconnection=this._obj[_a];_b=true;}}if(_b){var _d='{"connectionID":"'+this.ldbconnection._id+'"}';var _e='{"id":'+this._id+', "div":"SQLStatement", "method":"set_SQLConnection", "params":'+_d+'}';nexacro.Device.exec(_e);}return _b;};_pLiteDBStatement.set_parameters=function(_a){if(_a instanceof Object){this.parameters=_a;return true;}return false;};_pLiteDBStatement.set_async=function(_a){};_pLiteDBStatement.close=function(){var _a;if(nexacro.Device.curDevice==0){_a='{"id":"'+this._id+'"}';}else{_a='""';}var _b='{"id":'+this._id+',"div":"SQLStatement", "method":"close", "params":'+_a+'}';nexacro.Device.exec(_b);};_pLiteDBStatement.executeQuery=function(_a){if(_a==null){if(this.query.length==0){return false;}}else if(_a){if(typeof (_a)=="string"&&_a.length>0){this.query=_a;}else{return false;}}var _b=this.caheckTypeKeyword(this.query);if(_b!=1){return false;}var _c=this.retQueryString(this.query);var _d=new nexacro.Dataset();var _e={};var _f= -1;if(this.parameters instanceof nexacro.Dataset){_d=this.parameters;}else{_e=this.parameters;}{var _g='{"query":"'+_c+'", "qType":"'+_b+'","parameters":'+JSON.stringify(_e)+',"paramdataset":'+nexacro.Device.DatasetToJSONString2(_d)+',"applyrowpos":'+_f+'}';var _h='{"id":'+this._id+',"div":"SQLStatement", "method":"executeQuery", "params":'+_g+'}';nexacro.Device.exec(_h);}return true;};_pLiteDBStatement.executeUpdate=function(_a){if(_a==null){if(this.query.length==0){return false;}}else if(_a){if(typeof (_a)=="string"&&_a.length>0){this.query=_a;}else{return false;}}else{return false;}var _b=this.caheckTypeKeyword(this.query);var _c=this.retQueryString(this.query);var _d=new nexacro.Dataset();var _e={};var _f= -1;if(this.parameters instanceof nexacro.Dataset){_d=this.parameters;}else{_e=this.parameters;}{var _g='{"query":"'+_c+'", "qType":"'+_b+'","parameters":'+JSON.stringify(_e)+',"paramdataset":'+nexacro.Device.DatasetToJSONString2(_d)+',"applyrowpos":'+_f+'}';var _h='{"id":'+this._id+', "div":"SQLStatement", "method":"executeUpdate", "params":'+_g+'}';nexacro.Device.exec(_h);}return true;};_pLiteDBStatement._onsuccess=function(_a){var _b;if(_a.reason!="7"){_b=new nexacro.LiteDBEventInfo("onsuccess",_a.reason,_a.returnvalue);}else{var _c=new nexacro.Dataset("__tempDS",this._obj);_c=nexacro.Device.JSONObjectToDataset2(_a.returnvalue,_c);_b=new nexacro.LiteDBEventInfo("onsuccess",_a.reason,_c);}this._fire_onsuccess(this,_b);};_pLiteDBStatement._fire_onsuccess=function(_a,_b){if(this.onsuccess&&this.onsuccess._has_handlers){return this.onsuccess._fireEvent(this,_b);}return true;};_pLiteDBStatement._onerror=function(_a){var _b=new nexacro.LiteDBErrorEventInfo("onerror",_a.errorcode,_a.errormsg,_a.ldberrorcode,_a.ldberrormsg);this._fire_onerror(this,_b);};_pLiteDBStatement._fire_onerror=function(_a,_b){if(this.onerror&&this.onerror._has_handlers){return this.onerror._fireEvent(this,_b);}return true;};_pLiteDBStatement.retQueryString=function(_a){_a=_a.replace(/"/g,"_DQOUT_");_a=_a.replace(/'/g,"_QUOT_");return _a;};_pLiteDBStatement.caheckTypeKeyword=function(_a){if(typeof (_a)=="undefined"||_a.length==0){return;}var _b=_a.toLowerCase();var _c=_b.split(" ");for(var _d=0;_d<_c.length;_d++ ){if(_a.match(/select/)!=null){return 1;}else if(_a.match(/insert/)!=null){return 2;}else if(_a.match(/update/)!=null){return 3;}else if(_a.match(/delete/)!=null){return 4;}}return 0;};_pLiteDBStatement.paramck_query=function(_a){if(_a==null||typeof (_a)=="undefined"||typeof (_a)!="string"){return false;}return true;};_pLiteDBStatement=null;}if(nexacro.OS=="iOS"&&!nexacro.XPushEventInfo){nexacro.XPushEventInfo=function(_a,_b,_c,_d,_e,_f,_g){this.eventid=_a;this.reason=_b;this.serverip=_c;this.serverport=_d;this.command=_e;this.action=_f;this.message=_g;this.returnvalue=_g.returnvalue;if(this.command==undefined){this.command=null;}};var _pXPushEventInfo=nexacro.XPushEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.XPushEventInfo);_pXPushEventInfo._type_name="XPushEventInfo";_pXPushEventInfo=null;}if(nexacro.OS=="iOS"&&!nexacro.XPushErrorEventInfo){nexacro.XPushErrorEventInfo=function(_a,_b,_c,_d,_e,_f,_g,_h){this.eventid=_a;this.errortype="ObjectError";this.statuscode=_b;this.errormsg=_c;this.serverip=_d;this.serverport=_e;this.command=_f;this.action=_g;this.pushmessageobject=_h;if(this.command==undefined){this.command=null;}};var _pXPushErrorEventInfo=nexacro.XPushErrorEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.XPushErrorEventInfo);_pXPushErrorEventInfo._type_name="XPushErrorEventInfo";_pXPushErrorEventInfo=null;}if(nexacro.OS=="iOS"&&!nexacro.XPushKeepAliveEventInfo){nexacro.XPushKeepAliveEventInfo=function(_a,_b){this.eventid=_a;this.type=_b;};var _pXPushKeepAliveEventInfo=nexacro.XPushKeepAliveEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.XPushKeepAliveEventInfo);_pXPushKeepAliveEventInfo._type_name="XPushKeepAliveEventInfo";_pXPushKeepAliveEventInfo=null;}if(nexacro.OS=="iOS"&&!nexacro.XPushRequestMessageCountEventInfo){nexacro.XPushRequestMessageCountEventInfo=function(_a,_b,_c,_d,_e,_f){this.eventid=_a;this.userid=_b;this.sendtype=_c;this.sendid=_d;this.receivetype=_e;this.receiveid=_f;};var _pXPushRequestMessageCountEventInfo=nexacro.XPushRequestMessageCountEventInfo.prototype=nexacro._createPrototype(nexacro.Event,nexacro.XPushRequestMessageCountEventInfo);_pXPushRequestMessageCountEventInfo._type_name="XPushRequestMessageCountEventInfo";_pXPushErrorEventInfo=null;}if(nexacro.OS=="iOS"&&!nexacro.CommandControl){nexacro.CommandControl=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.actiontype;this.callback;this.check="0";this.messagekey;this.messagetype;this.objdataset;this.objform;this.row= -1;this.type="update";this.useactiveformcallback=false;};var _pCommandControl=nexacro.CommandControl.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.CommandControl);_pCommandControl._type_name="CommandControl";_pCommandControl.destroy=function(){var _a='""';var _b;return true;};_pCommandControl.on_created=function(){};_pCommandControl.equal=function(_a){if(this.callback!=_a.callback){return false;}if(this.check!=_a.check){return false;}if(this.messagekey!=_a.messagekey){return false;}if(this.messagetype!=_a.messagetype){return false;}if(this.objdataset!==_a.objdataset){return false;}if(this.objform!==_a.objform){return false;}if(this.row!=_a.row){return false;}if(this.type!=_a.type){return false;}if(this.useactiveformcallback!=_a.useactiveformcallback){return false;}return true;};_pCommandControl.toJSON=function(){return eval('({"_id":"'+this._id+'","messagetype":"'+this.messagetype+'","messagekey":"'+this.messagekey+'"})');};_pCommandControl.remove=function(_a){return (_a<0||_a>this.length)?this:this.slice(0,_a).concat(this.slice(_a+1,this.length));};_pCommandControl=null;}if(nexacro.OS=="iOS"&&!nexacro.XPush){nexacro.XPush=function(_a,_b){this._id=nexacro.Device.makeID();nexacro.Device._userCreatedObj[this._id]=this;this.name=_a||"";this.enableevent=true;this.commandlist=new Array;this.controlretry="5";this.debug=false;this.iplist=new Array;this.keepalivetime="30";this.keeptimeout="60";this.layouturl="";this.retry=1;this.sessionid="";this.timeout="30";this.userid="";this._parent_elem=_b;this.errorcode;this.errormsg;this.async=true;this.connectip="";this.connectport="-1";this.connectSuccess=false;this.action;this._event_list={"onsuccess":1,"onerror":1,"onkeepalive":1};this.onsuccess=null;this.onerror=null;var _c='""';var _d='{"id":'+this._id+', "div":"XPush", "method":"constructor", "params":'+_c+'}';nexacro.Device.exec(_d);};var _pXPush=nexacro.XPush.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.XPush);_pXPush._type_name="XPush";_pXPush._handle=null;_pXPush._currentipinfo=null;_pXPush.on_created=function(){};_pXPush.destroy=function(){var _a='""';var _b;delete nexacro.Device._userCreatedObj[this._id];_b='{"id":'+this._id+', "div":"XPush", "method":"destroy", "params":'+_a+'}';nexacro.Device.exec(_b);return true;};_pXPush.set_channeltype=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.channeltype="single";}else{this.channeltype=_a;}return true;};_pXPush.set_commandlist=function(){};_pXPush.set_connectip=function(_a){};_pXPush.set_connectport=function(_a){};_pXPush.set_controlretry=function(_a){if(typeof (_a)=="undefined"||_a==null){this.controlretry=5;}else{if(nexacro.Device.publicNumCheck(_a)){if(_a>=0){this.controlretry=_a;}else{return false;}}else{return false;}}return true;};_pXPush.set_debug=function(_a){if(typeof (_a)=="undefined"||_a==null){this.debug=false;}else{this.debug=_a;}return true;};_pXPush.set_iplist=function(_a){var _b=this.iplist.length;if(_b>0){this.iplist.splice(0,_b);}if(typeof (_a)=="undefined"||_a==null||_a==""){}else{if(_a.indexOf(",")>=0){var _c=_a.split(",");if(_c.length>0){for(var _d=0;_d<_c.length;_d++ ){var _e=_c[_d].split(":");var _f=new Object;_f.ip=_e[0];_f.port=_e[1].valueOf();_f.retry=false;this.iplist.push(_f);}}}else{var _e=_a.split(":");var _f=new Object;_f.ip=_e[0];_f.port=_e[1].valueOf();_f.retry=false;this.iplist.push(_f);}}return true;};_pXPush.set_keepalivetime=function(_a){if(typeof (_a)=="undefined"||_a==null){this.keepalivetime=30;}else{if(nexacro.Device.publicNumCheck(_a)){if(_a>=0){this.keepalivetime=_a;}else{return false;}}else{return false;}}return true;};_pXPush.set_keeptimeout=function(_a){if(typeof (_a)=="undefined"||_a==null){this.keeptimeout=60;}else{if(nexacro.Device.publicNumCheck(_a)){if(_a>=0){this.keeptimeout=_a;}else{return false;}}else{return false;}}return true;};_pXPush.set_layouturl=function(_a){if(typeof (_a)=="undefined"||_a==null){this.layouturl="";}else{var _b=_a.substring(0,9);if(_b.toLowerCase()!="%userapp%"){this._onerror({errorcode:"-702"});}else{this.layouturl=_a;}}return true;};_pXPush.set_retry=function(_a){if(typeof (_a)=="undefined"||_a==null){this.retry=1;}else{if(nexacro.Device.publicNumCheck(_a)){if(_a>=0){this.retry=Number(_a);}else{return false;}}else{return false;}}return true;};_pXPush.set_sessionid=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.sessionid="";}else{this.sessionid=_a;}return true;};_pXPush.set_timeout=function(_a){if(typeof (_a)=="undefined"||_a==null){this.timeout=30;}else{if(nexacro.Device.publicNumCheck(_a)){if(_a>=0){this.timeout=_a;}else{return false;}}else{return false;}}return true;};_pXPush.set_userid=function(_a){if(typeof (_a)=="undefined"||_a==null||_a==""){this.userid="";}else{this.userid=_a;}return true;};_pXPush.set_async=function(_a){if(_a===undefined||_a===null){return;}_a=nexacro._toBoolean(_a);this.async=_a;return true;};_pXPush.subscribe=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j){this.command(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);};_pXPush.unsubscribe=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j){this.command(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);};_pXPush.reqisterDevice=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j){this.command(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);};_pXPush.unregisterDevice=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j){this.command(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);};_pXPush.reqisterTopic=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j){this.command(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);};_pXPush.unreqisterTopic=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j){this.command(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);};_pXPush.requestMessageCount=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j){this.command(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j);};_pXPush.command=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j){var _k=new nexacro.CommandControl();var _l;this.action=_a;_k.actiontype=_a;_k.type=_f;_k.callback=_g;_k.messagekey=_c;_k.messagetype=_b;_k.objdataset=_e;_k.objform=_d;if(_h!=undefined){if(( +_h)!=( +_h)){return false;}else{_k.row=_h;}}else{_k.row= -1;}if(_i!=undefined){_k.check=_i;}else{_k.check="0";}if(_j!=undefined){if(typeof (_j)!="boolean"){if((_j.toLowerCase()!="false")&&(_j.toLowerCase()!="true")){_k.useactiveformcallback=false;}else{_k.useactiveformcallback=_j;}}else{_k.useactiveformcallback=_j;}}else{_k.useactiveformcallback=false;}this.strCommand=_a;this.strMessageType=_b;this.strMessageKey=_c;this.objDataset=_e;this.strCallBack=_g;if(this.strCommand===undefined||this.strCommand===null||this.strCommand==""){this._onerror({errorcode:"-701"});}else{this.strCommand=this.strCommand.toString();if(_a=="ADDF"||_a=="DELF"){if(_d===undefined||_d===null||this.strMessageType===undefined||this.strMessageType===null||this.strMessageType==""||this.strMessageKey===undefined||this.strMessageKey===null||this.strMessageKey==""||this.objDataset===undefined||this.objDataset===null||_f===undefined||_f===null||_f==""||this.strCallBack===undefined||this.strCallBack===null||this.strCallBack==""){this._onerror({errorcode:"-701"});}else{this.strMessageType=this.strMessageType.toString();this.strMessageKey=this.strMessageKey.toString();if((_f.toLowerCase()!="append")&&(_f.toLowerCase()!="update")&&(_f.toLowerCase()!="insert")&&(_f.toLowerCase()!="replace")&&(_f!="allUpdate")){this._onerror({errorcode:"-701"});}else{this.strCallBack=this.strCallBack.toString();if(_d[this.strCallBack]===undefined){this._onerror({errorcode:"-701"});}else{if(_a=="ADDF"){_l='{"id":'+this._id+', "div":"XPush", "method":"ADDF", "params":'+JSON.stringify(_k)+'}';var _m,_n=false;for(var _m=0;_m=0){_c=Number(this.retry);}}var _e;_e='{ "strUserID":"'+_a;_e+='", "strSessionID":"'+_b;_e+='", "iplist":'+JSON.stringify(this.iplist);_e+=', "retry":"'+_c;_e+='", "controlretry":"'+this.controlretry;_e+='", "layouturl":"'+this.layouturl;_e+='", "keepalivetime":"'+this.keepalivetime;_e+='", "keeptimeout":"'+this.keeptimeout;_e+='", "timeout":"'+this.timeout;_e+='", "commandlist":'+JSON.stringify(this.commandlist);_e+='}';var _f;_f='{"id":'+this._id+', "div":"XPush", "method":"connect", "params":'+_e+'}';nexacro.Device.exec(_f);};_pXPush.disconnect=function(){if(this.connectSuccess){var _a='""';var _b;_b='{"id":'+this._id+', "div":"XPush", "method":"disconnect", "params":'+_a+'}';this.connectSuccess=false;this.commandlist.length=0;nexacro.Device.exec(_b);}else{this._onerror({errorcode:"-401"});}};_pXPush.resume=function(){if(this.connectSuccess){var _a='""';var _b;_b='{"id":'+this._id+', "div":"XPush", "method":"resume", "params":'+_a+'}';nexacro.Device.exec(_b);}else{this._onerror({errorcode:"-601"});}};_pXPush.suspend=function(){if(this.connectSuccess){var _a='""';var _b;_b='{"id":'+this._id+', "div":"XPush", "method":"suspend", "params":'+_a+'}';nexacro.Device.exec(_b);}else{this._onerror({errorcode:"-501"});}};_pXPush.getCurrentIP=function(){if(this.connectip){return this.connectip;}return null;};_pXPush.getCurrentPort=function(){if(this.connectport){return this.connectport;}return null;};_pXPush.sendResponse=function(_a){if(this.connectSuccess){var _b;var _c;_b='{"msgid":"'+_a+'"}';var _c='{"id":'+this._id+', "div":"XPush", "method":"sendResponse", "params":'+_b+'}';nexacro.Device.exec(_c);}else{this._onerror({errorcode:"-901"});}};_pXPush.requestMessage=function(){if(this.connectSuccess){if(arguments.length<2){return;}var _a=arguments[0];var _b="";for(var _c=1;_c1){_b+=",\""+(arguments[_c])+"\"";}else{_b+="\""+(arguments[_c])+"\"";}}if(_b.length>0){var _d;var _e;_d='{"messagetype":"'+_a+'", "messagekeys":['+_b+']}';var _e='{"id":'+this._id+', "div":"XPush", "method":"requestMessage", "params":'+_d+'}';nexacro.Device.exec(_e);}}else{this._onerror({errorcode:"-902"});}};_pXPush._resetIPList=function(){var _a=this.iplist.length;for(var _b=0;_b<_a;_b++ ){if(this.iplist[_b].retry){this.iplist[_b].retry=false;}}};_pXPush._getrandomipinfo=function(){var _a=this.iplist.length;if(_a>0){for(var _b=0;_b<_a;_b++ ){if(this.iplist[_b].retry==false){break;}}if(_b==_a){return null;}var _c;do{_c=Math.floor((Math.random()*((_a-1)-0+1)))+0;}while(this.iplist[_c].retry)this.iplist[_c].retry=true;this._currentipinfo=this.iplist[_c];return this._currentipinfo;}return null;};_pXPush._onxpush=function(ret){var retData;if(nexacro.Device.curDevice==0){retData=ret;}else{retData=eval("("+ret+")");}this.RecvData=retData.recvdata;var paramRow;var paramChangeColumns=new Array();var paramAllColumns=new Array();var paramChangeRows=new Array();var paramobjChangeList=new Array();var rows=this.RecvData.rows;for(var i=0;i