
TV_GADGET="0387878700000001";
ZAPPING_GADGET="0387878700000030";
BOOKMARK_GADGET="0387878700140034";
WEBLINK_GADGET="0387878700140052";
SIGNAGELINK_GADGET="0377777700000017";
BROWSER_APPS="0077777700140002";
MYSTREAM_APPS="0387878700000056";
MENU_APPS="0387878700000009";
VIERALICK_APPS="0387878700000016";
MYHOMECLUB_APPS="0387878700000053";
MARKETTOP_APPS="0387878700000061";
APPMARKET_APPS="0387878700000062";
HSMARKET_APPS="0387878700000064";
MESSAGE_APPS="0387878700140065";
INSTALLER_APPS="installer";
INSTALLER2_APPS="0387878700000079";
DISCLAIMER_APPS="0387878700000046";
APPS_GADGET=MARKETTOP_APPS;
SETUPUSER_APPS="0387878700000078";
SETUPUSR_APPS=SETUPUSER_APPS;
IPTV_CC_SETTING_APPS="0077777700000015";
FUREAI=[
"0040000600000009",
"0040000600000010",
"0040000600000011",
"0040000600000012"
];
INIT_FILE=FUREAI.slice();
try{show_smad;}catch(e){show_smad=true;}
DEFAULT_SCREEN_WALLPAPER=IMG_PATH+"apps_back_gradation.png";
_GLOBAL_=(function(){return this;})();
NULL_FUNCTION=function(){return null;};
CONTEXT_SURFER=(system.mdl_cfg.apps_context==system.mdl_cfg.APPS_CONTEXT_SURFER);
SU_IS_SLOW_ANIM=(function(){
if(system.product.match("_4K$")&&(system.product.match("14LD6")||system.product.match("15LD6")))
return false;
return (system.product.match("(SLD8A|MT5591|_4K$)")!=null);})();
ANIM_INTERVAL=100;
SU_IS_GBL15=(system.product.match("^GBL15")!=null);
if(!SU_IS_GBL15){
INIT_FILE.unshift(MESSAGE_APPS);}
if(SU_IS_GBL15){
MARKETTOP_APPS="0387878700000105";
APPMARKET_APPS="0387878700000105";
APPS_GADGET="0387878700000105";}
if(!ebus.asr){
ebus.asr={
supported:false,
language:system.locale.language,
req_recog:NULL_FUNCTION,
set_listener:NULL_FUNCTION,
get_listener:NULL_FUNCTION,
set_recog_option:NULL_FUNCTION
};};
if(system.is_enable_launch_appli===undefined)
system.is_enable_launch_appli=function(){return 1;};
var is_lang_ar=((system.locale.language.substr(0,2)=="ar")
||(system.locale.language.substr(0,2)=="fa")
||(system.locale.language.substr(0,2)=="he"));
var is_china=(system.locale.country=="CN");
LC_TEXT_ALIGN=is_lang_ar?RIGHT:LEFT;
var load_pkg_file=function (org_lang,path,app_name){
var lang=org_lang;
var pkg_name="lang_"+app_name;
var msg=function(){return "";};
var prefix=(app_name=="home")?"":"pkg_";
if(lang=="zh-00"){
lang="zh-CN";}else if((lang=="en-00")||(lang=="en-CN")){
lang="en-HK";}else if(lang=="en-NZ"){
lang="en-AU";}else if(lang=="en-BR"){
lang="en-JM";}else if(lang=="es-BR"){
lang="es-AR";}else if((lang=="zh-AU")||(lang=="zh-NZ")||(lang=="zh-US")){
lang="zh-CN";}
add_package_load_path(pkg_name,path+"/"+prefix+"lang_"+lang+".js");
try{
prepare_package(pkg_name);
require(pkg_name);}catch(e){
lang=lang.substr(0,2);
add_package_load_path(pkg_name,path+"/"+prefix+"lang_"+lang+".js");
try{
prepare_package(pkg_name);
require(pkg_name);}catch(e){
add_package_load_path(pkg_name,path+"/"+prefix+"lang_en-IE.js");
try{
prepare_package(pkg_name);
require(pkg_name);}catch(e){
console.log("No pkg_lang at all");
add_package_load_path(pkg_name,path+"/"+prefix+"lang_en-US.js");
try{
prepare_package(pkg_name);
require(pkg_name);}catch(e){}
}
}
}
if(_GLOBAL_[pkg_name].LANG){
msg=_GLOBAL_[pkg_name].LANG;
discard_package(pkg_name);}
return msg;};
load_pkg_lang=function (path,app_name){
var lang=system.locale.language.substr(0,5);
return load_pkg_file(lang,path,app_name);};
load_pkg_voice=function (path,app_name){
if(!ebus.tts.supported){
return function(){return "";};}
try{
var lang=ebus.tts.language.substr(0,5);}catch(e){
lang="en-IE";}
return load_pkg_file(lang,path,app_name);};
load_pkg_asr=function (path,app_name){
if(!ebus.asr.supported){
return function(){return "";};}
var lang=ebus.asr.language.substr(0,5);
return load_pkg_file(lang,path,app_name);};
try{
var SHOW_TVINFO=(system.mdl_cfg.with_home_banner)?true:false;}catch(e){
var SHOW_TVINFO=false;}
getFormattedDateString=function(date){

if(!(date instanceof Date)){
return "--/--/-- --:--";}
try{
var country=system.locale.country;
var product=system.product;}catch(e){
var country="DE";
var product="GBL13MT5590_EU";}
var y=date.getFullYear();
var m=date.getMonth()+1;
m=m<10?"0"+m.toString():m.toString();
var d=date.getDate();
d=d<10?"0"+d.toString():d.toString();
var str="";
if(product.match(/GBL.+JP/)
||(country=="SG")||(country=="HK")||(country=="CN")||(country=="TW")){
str=y+"/"+m+"/"+d;}else if(product.match(/GBL.+US/)){
str=m+"/"+d+"/"+y;}else {
str=d+"/"+m+"/"+y;}
var minute=date.getMinutes();
if(minute<10){
minute="0"+minute.toString();}else {
minute=minute.toString();}
var ampm="";
var hour=date.getHours();
if(product.match(/GBL.+US/)||(country=="AU")){
if(date.getHours()<12){
ampm=" a.m.";}else{
ampm=" p.m.";}
if(hour>12)hour-=12;
if(hour==0)hour=12;}
str+=" "+hour+":"+minute+ampm;
return str;};
isString=function (obj){
return (typeof (obj)=="string"||obj instanceof String);};
isNumber=function (obj){
return (typeof (obj)=="number"&&!isNaN(obj));};
change_font_size=function(obj){
if(obj instanceof gtext){
if(get_text_width(obj,obj.text)>obj.width){
for(var i=obj.font_size;i>12;i-=4){
obj.font_size=i;
if(get_text_width(obj,obj.text)<=obj.width){
break;}
}
setf_text(obj,obj.text);}
}
return obj.font_size;}
change_font_size_b=function (obj){
if(obj instanceof gtextbox){
if(get_text_font_height(obj,obj.text)>obj.height){
for(var i=obj.font_size;i>=8;i-=4){
obj.font_size=i;
if(get_text_font_height(obj,obj.text)<=obj.height){
break;}
}
setf_text(obj,obj.text);}
}else {
console.log("arg object is not gtextbox");}
return obj.font_size;}
getInfoPlist=function (product_id,key){
if(!product_id||!key)
return;
var ret=null;
http_request({url:APPLI_PATH+product_id+"/Info.plist",
sync:true,
onload:function (status,header,body){
if(status==200){
try{
ret=body.match(new RegExp("^"+key+"=(.+)$","mi"))[1];}catch(e){
ret="";}
}else {
ret=null;}
}});
return ret;};
getDefaultUrl=function (key){
if(!key)
return;
var file="file:///etc/server_url";
var ret=null;
http_request({url:file,sync:true,
onload:function (status,header,body){
if(status==200&&isString(body)){
try{
ret=body.match(new RegExp("^"+key+"\ +(.+)$","mi"))[1];}catch(e){
ret="";}
}else {
ret=null;}
}});
return ret;};
var AJAXCE_HOME_URL_TAG="initurl";
var MyHostName=null;
getHostName=function (){
if(!MyHostName){
var ret=getDefaultUrl(AJAXCE_HOME_URL_TAG);
if(isString(ret)){
try{
MyHostName=ret.match(new RegExp("^(.+://[^/]+)/","m"))[1];
if(MyHostName.indexOf("http://")==0){
var tmp=MyHostName.split(":");
if(tmp[2]!=null){
MyHostName=MyHostName.replace(":"+tmp[2],
":"+(parseInt(tmp[2])+443-80));}
MyHostName=MyHostName.replace("http://","https://");}
}catch(e){}
}else{
MyHostName=null;}
}
return MyHostName;};
var AJAXCE_LATEST_URL_TAG="latesturl";
var MyLatestUrl=null;
var updateNeeded=null;
update_latest_timer={};
checkUpdate=function (){
if(!MyLatestUrl){
var ret=getDefaultUrl(AJAXCE_LATEST_URL_TAG);
if(isString(ret))
MyLatestUrl=ret;}
var need_to_update=null;
http_request({url:MyLatestUrl,
sync:true,limit_mode:LIMIT_NONE,
onload:function (status,header,body){
if(status==200&&isString(body)){
try{
if(body.match(new RegExp("^false"))){
need_to_update=true;
updateNeeded=need_to_update;}else if(body.match(new RegExp("^true"))){
need_to_update=false;
updateNeeded=need_to_update;}else {
need_to_update=null;}
}catch(e){
need_to_update=null;}
}else{
need_to_update=null;}}});
return need_to_update;};
checkUpdateAsync=function (finished_func){
finished_func&&finished_func(false);
return null;

};
isUpdateNeeded=function(){
return false;

}
getMarketInfo=function(){
var ret=false;
var file="file:///usr/local/ajaxce/nvram_file/0/market_info.json";
http_request({url:file,sync:true,method:"GET",
onload:function(status,header,body){
if(status==200){
ret=body;}
}});
try{
require("json2");
provide("json2");
JSON.parse(ret);}catch(e){
console.log("format error. "+e.message);
try{
nvram_file.remove({filename:"market_info.json"});}catch(e){};
return false;}
return ret;};
function readFromNV2List(fname){
var data=null;
try{
var tmp=apps_nvram_file.read({product_id:"home",filename:fname,async:false});
data=eval(sysutil.tconv.binary_to_string(tmp));}catch(e){};
return data;};
gimageResource=function(target,bool){
if(bool){
target.org_src=target.src;
target.src="";}else{
if(target.org_src){
target.src=target.org_src;
delete target.org_src;}
}
};
gtextResource=function(target,bool){
if(bool){
target.org_text=target.text;
setf_text(target,"");}else{
if(isString(target.org_text)){
setf_text(target,target.org_text);
delete target.org_text;}
}
};
var ActiveStatus=true;
setActiveStatus=function (bool){
ActiveStatus=bool;};
isActiveStatus=function(){
return ActiveStatus;};
var VisibleStatus=false;
setVisibleStatus=function (bool){
VisibleStatus=bool;
HOME.visible_p=bool;};
isVisibleStatus=function(){
return VisibleStatus;};
getPowerStatus=function(){
var power=system.POWER_STATUS_OFF;
if(system.is_pnlpow_on){
if(system.is_pnlpow_on()){
return system.POWER_STATUS_ON;}else {
return system.POWER_STATUS_OFF;}
}
try{
power=system.get_power_status2();}catch(e){
power=system.get_power_status();}
return power;}
var networkAvailable={"power":false,"net":false,"clock":false};
var networkAvailableResult=false;
judgeNetworkAvailable=function (id){
try{
switch(id){
case "net":
networkAvailable[id]=(system.is_ip_available()==1);
break;
case "power":
networkAvailable[id]=(getPowerStatus()==system.POWER_STATUS_ON);
break;
case "clock":
networkAvailable[id]=(new Date().getTime()>Date.UTC(2008,10-1,17,2,17,17));
break;}
}catch(e){}
var disconnect=false;
for(var prop in networkAvailable){
if(!networkAvailable[prop])disconnect=true;}
setNetworkAvailable(!disconnect);}
initNetworkAvailable=function (){
judgeNetworkAvailable("net");
judgeNetworkAvailable("power");
judgeNetworkAvailable("clock");};
checkNetworkAvailable=function (id){
return networkAvailable[id];};
setNetworkAvailable=function (bool){
networkAvailableResult=bool;};
isNetworkAvailable=function(){
return networkAvailableResult;};
initNetworkAvailable();
var SystemEventHook={};
addSystemEventHook=function (symbol,event,hook_func){
try{
if(SystemEventHook[symbol]){
console.log("Already added.  "+symbol);
return;}
SystemEventHook[symbol]={"event":event,"hook_func":hook_func};}catch(e){
console.log("[JS Error] "+e.message);}
};
delSystemEventHook=function (symbol){
try{
delete SystemEventHook[symbol];}catch(e){
console.log("[JS Error] "+e.message);}
};
runSystemEventHook=function(stg,obj,ev){
var rval=false;
for(var symbol in SystemEventHook){
var event_obj=SystemEventHook[symbol];
if(ev!=event_obj.event)continue;
if(event_obj.hook_func instanceof Function){
var ret=false;
try{
ret=event_obj.hook_func.apply(stg,arguments);
if(ret===true)rval=true;}catch(e){
console.log("[SystemEvent Error] "+e.message);}
}
}
return rval;};
var UserAgentHook={};
addUserAgentHook=function (symbol,event,hook_func){
try{
if(UserAgentHook[symbol]){
console.log("Already added.  "+symbol);
return;}
UserAgentHook[symbol]={"event":event,"hook_func":hook_func};}catch(e){
console.log("[JS Error] "+e.message);}
};
delUserAgentHook=function (symbol){
try{
delete UserAgentHook[symbol];}catch(e){
console.log("[JS Error] "+e.message);}
};
runUserAgentHook=function(stg,obj,ev){
var rval=false;
for(var symbol in UserAgentHook){
var event_obj=UserAgentHook[symbol];
if(ev!=event_obj.event)continue;
if(event_obj.hook_func instanceof Function){
var ret=false;
try{
ret=event_obj.hook_func.apply(stg,arguments);
if(ret===true)rval=true;}catch(e){
console.log("[UserAgent Error] "+e.message);}
}
}
return rval;};
var UpdateUsrProfHook={};
addUpdateUsrProfHook=function (symbol,event,hook_func){
try{
if(UpdateUsrProfHook[symbol]){
console.log("Already added.  "+symbol);
return;}
UpdateUsrProfHook[symbol]={"event":event,"hook_func":hook_func};}catch(e){
console.log("[JS Error] "+e.message);}
};
delUpdateUsrProfHook=function (symbol){
try{
delete UpdateUsrProfHook[symbol];}catch(e){
console.log("[JS Error] "+e.message);}
};
runUpdateUsrProfHook=function(stg,obj,ev){
var rval=false;
for(var symbol in UpdateUsrProfHook){
var event_obj=UpdateUsrProfHook[symbol];
if(ev!=event_obj.event)continue;
if(event_obj.hook_func instanceof Function){
var ret=false;
try{
ret=event_obj.hook_func.apply(stg,arguments);
if(ret===true)rval=true;}catch(e){
console.log("[UpdateUsrProf Error] "+e.message);}
}
}
return rval;};
var TVPlayerEventHook={};
addTVPlayerEventHook=function (symbol,event,hook_func){
try{
if(TVPlayerEventHook[symbol]){
console.log("Already added.  "+symbol);
return;}
TVPlayerEventHook[symbol]={"event":event,"hook_func":hook_func};}catch(e){
console.log("[JS Error] "+e.message);}
};
delTVPlayerEventHook=function (symbol){
try{
delete TVPlayerEventHook[symbol];}catch(e){
console.log("[JS Error] "+e.message);}
};
var runTVPlayerEventHook=function(stg,obj,ev){
var rval=false;
for(var symbol in TVPlayerEventHook){
var event_obj=TVPlayerEventHook[symbol];
if(ev!=event_obj.event)continue;
if(event_obj.hook_func instanceof Function){
var ret=false;
try{
ret=event_obj.hook_func.apply(stg,arguments);
if(ret===true)rval=true;}catch(e){
console.log("[TVPlayerEvent Error] "+e.message);}
}
}
return rval;};
setTVPlayerEventHook=function (){
var timer={};
append_timer(timer,1,function(obj){
delete_timer(obj);
add_default_stage_event_hook(
tvplayer,
function(stg,obj,ev,data){
if(runTVPlayerEventHook(stg,obj,ev,data))
return true;
return false;}
);});};
function evaluate_file(product_id,filename){
var ret;
var DEBUG_TOP;
var exist=apps_nvram_file.apps_exist({product_id:product_id,filename:filename});
if(!exist)return false;
var body=read_file(APPLI_PATH+product_id+"/"+filename);
if(!body)return false;
try{
var PRODUCT_ID="var PRODUCT_ID='"+product_id+"';";
DEBUG_TOP=Error().lineNumber;
ret=eval("(function(){"+PRODUCT_ID+PROTECT_GADGET+body+"})();");}catch(e){
var dlog="["+product_id+"]["+filename+"] ";
dlog+="Eval Error. line "+(e.lineNumber-DEBUG_TOP)+": ";
dlog+=e.name+": "+e.message;
console.log(dlog);}
return ret;}
function load_init_file(product_id){
return evaluate_file(product_id,"gadget/init_file.js");};
var DISCLAIMER_VERSION_FILE="file:///usr/local/ajaxce/nvram_file/0/disclaimer.txt";
isDisclaimerNeeded=function(){
var mkt_info=getMarketInfo();
if(mkt_info==false){
try{
system.write_agree_to_disclamer(0);}catch(e){}
return true;}
try{
var agree_ver="0.00";
http_request({url:DISCLAIMER_VERSION_FILE,sync:true,method:"GET",
onload:function(status,header,body){
if(status==200){
agree_ver=body;}
}});
var disclaimer_ver=eval("("+mkt_info+")")["disclaimer_version"];
if(parseInt(disclaimer_ver)>parseInt(agree_ver)){
try{
system.write_agree_to_disclamer(0);}catch(e){}
return true;}else{
try{
system.write_agree_to_disclamer(1);}catch(e){}
return false;}
}catch(e){
return true;}
};
read_file=function (filename){
var rval=null;
http_request({url:filename,sync:true,
onload:function (status,header,body){
if(status==200)rval=body;}});
return rval;};
get_dial_arg=function (args){
var ret=null;
try{
ret=args.match(new RegExp("-d ([^ ]+)"));}catch(e){};
if(!(ret&&ret.length==2))
return null;
var rval=read_file("file:///"+ret[1]);
var dial_arg=null;
try{
var boot_args=rval.split("&");
for(var i=0;i<boot_args.length;i++){
var data=boot_args[i].split("=");
var symbol=data[0];
var value=data[1];
if(symbol.indexOf("DIAL_ARG")!=-1){
var bin=sysutil.hex.decode(value);
dial_arg=sysutil.tconv.binary_to_string(bin);
if(!dial_arg)dial_arg="";
break;}
}
}catch(e){
dial_arg=null;}
return dial_arg;};
var locked_list=null;
getLockedList=function (){
return locked_list;};
updateLockedList=function (){
var ret=null;
try{
ret=apps_nvram_file.read({filename:"locked_list",product_id:"home"});
ret=sysutil.tconv.binary_to_string(ret);}catch(e){
}
locked_list=ret;};
updateLockedList();
LogReport={
LAUNCH_APL:"/vcapp/info?",
OPERATE_HS:"/vcapp/log/sui/ope?",
report:function(WEB_API,product_id,others){
try{
if(getPowerStatus()!=system.POWER_STATUS_ON)return;}catch(e){}
var report=others||{};
var report_url=getHostName()+WEB_API;
if(isString(report))
report={};
if(!report.app&&product_id){
report_url+=("app="+product_id);}else if(report.app){
report_url+=("app="+report.app);}else{
report_url+="app=";}
if(report.pos===undefined){
report.pos="-1";}
try{
is_shop_mode=system.is_shop_demo_mode();
report.shop=(is_shop_mode)?1:0;}catch(e){}
var EVCMID=null;
try{
var tmp=eval("("+getMarketInfo()+")");
EVCMID=tmp.user||"";}catch(e){
EVCMID=null;}
report.lang=system.locale.language;
report.country=system.locale.country;
report.user=encodeURIComponent(EVCMID);
for(var name in report){
report_url+=("&"+name+"="+report[name]);}
http_request({url:report_url,sync:false});},
};
signature=function(data){
var seed="cb4cb476f61a6639a9c2ae20adf4cd074f39b8c7fbcab540803ce06336fdec79";
var key=system.secret.encrypted_key_to_key({input:sysutil.hex.decode(seed),key_length:20});
var bin=sysutil.cipher.hmac(sysutil.cipher.DIGEST_SHA1,key,data);
var ret=sysutil.base64.encode(bin);
return ret;};
secure_eval=function(body,header_code){var tmp=body.match(new RegExp("^//VC_SIGNATURE=\\\"(.*)\\\""));
if(tmp===null){
throw new Error("[secure_eval] Cannot find signature.");}
var sign=tmp[1];
var data=body.substr(body.indexOf("\n")+1);
if(sign!=signature(data)){
console.log("\n========= <FAIL> signature check ===============");
console.log("//  server side ="+sign);
console.log("//  client side ="+signature(data));
console.log("================================================\n");
throw new Error("[secure_eval] Failed to check a signature.");}
console.log("========= signature check OK ! ===============");
return eval((header_code||"")+body);};
jump_pbrowser={
symbol:null,
set:function(symbol){
this._symbol=symbol;},
reset:function(){
this.set(null);},
get:function(){
return this._symbol;},
};
try{
ebus.pbrowser[0].launch_appli=function(symbol,arg){
BROWSER.owner=symbol;
ebus.pbrowser[0].launch(arg);}
ebus.pbrowser[0].discard_appli=function(){
delete BROWSER.owner;
ebus.pbrowser[0].discard();}
}catch(e){
};
weblink={
private_data:{"launch_from":0},
CODE:{
"ICON":0,
"BOOKMARK":1,
"SMARTPHONE":2,
"VOICE_SEARCH":3,
"HOME_SEARCH":4,
"URL_DIRECT":5,
},
CATEGORY_CODE:{
"NONE":0,
"WEB":1,
"IMAGE":2,
"MOVIE":3,
"NEWS":4,
"MAPS":5,
},
ENGINE_CODE:{
"DEFAULT":0,
"GOOGLE":1,
"BING":2,
},
clear:function(){
this.set(this.CODE.ICON);},
set:function (args){
this.private_data={
"launch_from":isNumber(args.launch_from)?args.launch_from:0,
"url":isString(args.url)?args.url:"",
"category":isNumber(args.category)?args.category:null,
"search_engine":isNumber(args.search_engine)?args.search_engine:null,
"keyword":isString(args.keyword)?args.keyword:"",
"extra_data":isString(args.extra_data)?args.extra_data:"",
};},
get:function (){
return this.private_data;}
};
applink={
private_data:{"launch_to":null,"usrprof_id":null,"application_data_id":null,"rawdata":null},
launch_from:null,
clear:function(){
this.set();
this.setFrom();},
setFrom:function (launch_from){
this.set();
this.launch_from=isString(launch_from)?launch_from:null;},
set:function (args){
if(!args)args={};
this.private_data={
"launch_to":isString(args.launch_to)?args.launch_to:null,
"usrprof_id":(isNumber(args.usrprof_id)||isString(args.usrprof_id))?args.usrprof_id:null,
"application_data_id":isString(args.application_data_id)?args.application_data_id:null,
"rawdata":isString(args.rawdata)?args.rawdata:null,
};
if(args.launch_from){
this.setFrom(arg.launch_from);}
},
get:function (){
var tmp={"launch_from":this.launch_from};
for(var prop in this.private_data)
tmp[prop]=this.private_data[prop];
return tmp;}
};
apputil={
CODE:{
"NO_MODULE":-6,
"NO_INFO_PLIST":-5,
"NO_PRODUCT_ID":-4,
"LOCKED":-3,
"NETWORK_ERROR":-2,
"LAUNCH_ERROR":-1,
"SUCCESS":0,
"ALREADY_LAUNCHED":1,
"DISCLAIMER":2,
"NETWORK_DL_CONFIRM":4,
"NETWORK_DL_PREPARE":5,
"INSTALLING":6,
"COMING_SOON":7,
"CANCEL":8,
"WAIT_IP_AVAILABLE":9,
"NV_FULL":10,
},
HARDCODED_PRODUCT_ID:[
"clock_setting",
"self_launch",
"network_check",
"network_dl",
"network_dl_confirm",
"network_dl_prepare",
"locked",
TV_GADGET,
MENU_APPS,
VIERALICK_APPS,
BROWSER_APPS,
MYSTREAM_APPS,
],
get_symbol:function(code){
for(var name in this.CODE)
if(this.CODE[name]==code)
return name;
return "";},
};
apputil.current_stage=null;
apputil.setCurrentProductID=function(product_id){
this.current_stage=product_id;};
apputil.getCurrentProductID=function(){
return this.current_stage;};
apputil.on_stage=function(stage_symbol,product_id,report){
this.setCurrentProductID(product_id);
LogReport.report(LogReport.LAUNCH_APL,product_id,report);
return on_stage(stage_symbol);};
apputil.transit=function(transit,stage_symbol){
prepare_stage(stage_symbol);
try{
var active_screen=HOME.operator.getActiveScreen();
var gadget=active_screen[1].cursor;
var pos=gadget.translate;
transit.from_bookmark.x+=pos[0];
transit.from_bookmark.y+=pos[1];
transit.from_bookmark.z+=pos[2];
var tv=active_screen[1].getTVGadgetObject();
transit.from={x:tv.translate[0],y:(tv.translate[1]+tv.gadget.tv.translate[1]),
z:tv.translate[2],
width:tv.gadget.tv.width,height:tv.gadget.tv.height};
transit.finished=function(){force_redraw();};
var bplayer=new BroadcastPlayer();
bplayer.start_transit(transit);}catch(e){
console.log(e.message);}
on_stage(stage_symbol);};
apputil.launch_apl=function (PRODUCT_ID,ARGS,LOCKED_PANEL,REPORT,SEQ_ID,STAGE_SYMBOL,TRANSIT,FINISHED_FUNC,PBROWSER){

var product_id=PRODUCT_ID;
var args=ARGS||"";
var locked="";
var report=REPORT||null;
var sid=SEQ_ID||"";
var stage_symbol=STAGE_SYMBOL||"";var transit=TRANSIT||null;
var pbrowser=PBROWSER||null;
var host="";
if(stage_symbol=="platinum_main"){

if(!system.home_browser.prepare_on_stage()){
weblink.set({});
return this.CODE.SUCCESS;}
}
if(stage_symbol=="mystream"){

if(!system.home_browser.prepare_on_stage()){
weblink.set({});
return this.CODE.SUCCESS;}
}
var lock_skip_flg=false;
var lock_use_gwin=false;
switch(LOCKED_PANEL){
case "use_gwin":
lock_skip_flg=false;
lock_use_gwin=true;
break;
case "pass":
lock_skip_flg=true;
lock_use_gwin=false;
break;
case "locked":
lock_skip_flg=false;
lock_use_gwin=true;
locked="locked";
break;
case "check":
default:
lock_skip_flg=false;
lock_use_gwin=false;
break;};
if(!isString(product_id))
return this.CODE.NO_PRODUCT_ID;
if(!lock_skip_flg){
var LOCKED_LIST=readFromNV2List("locked_list");
if((LOCKED_LIST instanceof Array)&&LOCKED_LIST.indexOf(product_id)!=-1){
if(lock_use_gwin){
locked="locked";}else{
return this.CODE.LOCKED;}
}
}
var check=getInfoPlist(product_id,"latest_check");
var need_update_check=true;
var agree_disclaimer=(isDisclaimerNeeded()==false);
var callback=FINISHED_FUNC||null;
var me=this;
var finished=function (mode){
if(mode==IP_AVAIL_STAT_NG){
launch_appli("network_check","","","","",sid);
if(callback)callback(me.CODE.NETWORK_ERROR);
return me.CODE.NETWORK_ERROR;}
if(mode==IP_AVAIL_STAT_CANCEL){
if(callback)callback(me.CODE.CANCEL);
return me.CODE.CANCEL;}
if(mode==null){
callback=null;}
if(check&&need_update_check){
if(check.match(new RegExp("^true"))){
var need_update=checkUpdate();
need_update_check=false;
if(need_update==null){
launch_appli("network_check","","","","",sid);
if(callback)callback(me.CODE.NETWORK_ERROR);
return me.CODE.NETWORK_ERROR;}
if(need_update==true){
if(!agree_disclaimer){launch_appli(DISCLAIMER_APPS,"",getHostName(),"","",sid);
if(callback)callback(me.CODE.DISCLAIMER);
return me.CODE.DISCLAIMER;}else{
launch_appli("network_dl_confirm","","","","",sid);
if(callback)callback(me.CODE.NETWORK_DL);
return me.CODE.NETWORK_DL;}
}
}
}
if(agree_disclaimer==false){
var need_disclaimer=getInfoPlist(product_id,"disclaimer");
if(need_disclaimer&&need_disclaimer.match(new RegExp("^true"))){
LogReport.report(LogReport.LAUNCH_APL,DISCLAIMER_APPS,report);
launch_appli(DISCLAIMER_APPS,"",getHostName(),"","",sid);
if(callback)callback(me.CODE.DISCLAIMER);
return me.CODE.DISCLAIMER;}
}
var launchable_gadget=false;
var tmp_launchable_gadget=getInfoPlist(product_id,"launchable_gadget");
if(tmp_launchable_gadget&&tmp_launchable_gadget.match(new RegExp("^true"))){
launchable_gadget=true;
host=product_id;
product_id="gadget";}
var module=null;
if(!(stage_symbol||launchable_gadget)){
if(me.HARDCODED_PRODUCT_ID.indexOf(product_id)==-1){
module=getInfoPlist(product_id,"module");
if(module==null){
if(callback)callback(me.CODE.NO_INFO_PLIST);
return me.CODE.NO_INFO_PLIST;}
if(module==""){
if(callback)callback(me.CODE.NO_MODULE);
return me.CODE.NO_MODULE;}
}
}
if(module=="ajaxceplay"){
host=getHostName();}
if(!launchable_gadget){
LogReport.report(LogReport.LAUNCH_APL,product_id,report);}
me.prepare(product_id);
var rval=0;
if(stage_symbol){
try{
if(transit){
me.transit(transit,stage_symbol);}else {
on_stage(stage_symbol);}
}catch(e){
rval=-1;}
}else{
var pid=product_id;
if(pbrowser){
pid="pbrowser";
args=product_id;}
rval=launch_appli(pid,"",host,args,locked,sid);}
if(rval<0){
if(callback)callback(me.CODE.LAUNCH_ERROR);
return me.CODE.LAUNCH_ERROR;}
if(rval==1){
if(callback)callback(me.CODE.ALREADY_LAUNCHED);
return me.CODE.ALREADY_LAUNCHED;}
if(callback)callback(me.CODE.SUCCESS);
return me.CODE.SUCCESS;}

if(check&&need_update_check){
if(check.match(new RegExp("^true"))){
if(!system.is_ip_available()){
wait_ip_available(finished);
return this.CODE.WAIT_IP_AVAILABLE;}else{
var need_update=checkUpdate();
need_update_check=false;
if(need_update==null){
launch_appli("network_check","","","","",sid);
return me.CODE.NETWORK_ERROR;}
if(need_update==true){
if(!agree_disclaimer){launch_appli(DISCLAIMER_APPS,"",getHostName(),"","",sid);
return me.CODE.DISCLAIMER;}else
launch_appli("network_dl_confirm","","","","",sid);
return me.CODE.NETWORK_DL;}
}
}else if(check.match(new RegExp("^installing"))){
return me.CODE.INSTALLING;}else if(check.match(new RegExp("^coming_soon"))){
return me.CODE.COMING_SOON;}else if(check.match(new RegExp("^nv_full"))){
return me.CODE.NV_FULL;}
}else{
}
return finished();};
apputil.directLaunch=function(product_id,report){try{
var gadget=evaluate_file(product_id,"gadget/gadget.js");
gadget.directLaunch("pass",report);}catch(e){
console.log("["+product_id+"] directLaunch Error. "+e.message);}
applink.clear();};
apputil.prepare=function(product_id){
try{
switch(product_id)
{
case FUREAI[0]:
case FUREAI[1]:
case FUREAI[2]:
case FUREAI[3]:
case "0040000600000005":
case "0040000600000006":
case "0040000600000007":
case "0040000600000008":
system.apps.cancel_fureai_check();
break;
default:
break;}
}catch(e){
console.log(e.message);};
return;};
apputil.latestCheckList=[];
apputil.latestCheckCount=0;
apputil.cancelLatestCheck=function (id){
var obj=this.latestCheckList[id];
if(!obj)return;
delete_timer(obj);
if(isNumber(obj.handler)){
cancel_http_request(obj.handler);}
delete this.latestCheckList[id];};
apputil.latestCheck=function (finished_func){
var id=this.latestCheckCount++;
this.latestCheckList[id]=null;
var me=this;
var make_finished_func=function(){
var closure_id=id;
var closure_finished_func=finished_func;
return function (mode){
switch(mode){
case IP_AVAIL_STAT_OK:
if(me.latestCheckList[closure_id]!=null)
return;
me.latestCheckList[closure_id]={};
var callback=function(a){
append_timer(me.latestCheckList[closure_id],1,
function(obj){
delete_timer(obj);
var ret;
try{
ret=closure_finished_func(a);}catch(e){
console.log("[JS error] \n"+closure_finished_func);}
return ret})};
var handler=checkUpdateAsync(callback);
me.latestCheckList[closure_id].handler=handler;
return;
case IP_AVAIL_STAT_NG:
case IP_AVAIL_STAT_CANCEL:
default:
break;}
if(closure_finished_func)
closure_finished_func(null);
delete me.latestCheckList[closure_id];};};
if(!system.is_ip_available()){
wait_ip_available(make_finished_func());
return this.latestCheckCount;}
var func=make_finished_func();
func(IP_AVAIL_STAT_OK);
return id;}
apputil.launch_nwdl=function (){
var agree_disclaimer=(isDisclaimerNeeded()==false);
if(!agree_disclaimer){
launch_appli(DISCLAIMER_APPS,"",getHostName());}else{
launch_appli("network_dl_confirm");}
}
apputil.launch_disclaimer=function (){
launch_appli(DISCLAIMER_APPS,"",getHostName());}
apputil.deeplink=function (product_id,deeplinkid,deeplinkurl){
var exist=apps_nvram_file.apps_exist({product_id:product_id,filename:"Info.plist"});
var args="";
var lock="use_gwin";
var report={pos:"-1",action:"deeplink"};
var dpid="";
var dpurl="";
if(isString(deeplinkid)||isNumber(deeplinkid)){
dpid=encodeURIComponent(deeplinkid);}
if(isString(deeplinkurl)||isNumber(deeplinkurl)){
dpurl=encodeURIComponent(deeplinkurl);}
if(exist){
var module=getInfoPlist(product_id,"module");
switch(module){
case "ajaxceplay":
args=getInfoPlist(product_id,"arg");
if(dpid||dpurl){
args+=" -l deeplink:deeplinkid="+dpid+"&deeplinkurl="+dpurl;}
break;
case "vudu":
if(isString(deeplinkid)||isNumber(deeplinkid)){
args="-i "+deeplinkid;}
break;}
var jsfile="gadget/deeplink_launch.js";
var isexist=apps_nvram_file.apps_exist({product_id:product_id,filename:jsfile});
if(isexist){
var body=read_file(APPLI_PATH+product_id+"/"+jsfile);
if(body){
var ret=false;
try{
ret=eval("(function(){"+body+"})();");}catch(e){
console.log("["+product_id+"][direct_launch] "+e.name+": "+e.message);}
if(ret==true)return true;}
}
return apputil.launch_apl(product_id,args,lock,report);}else{
try{
args=getInfoPlist(INSTALLER2_APPS,"arg");
args+=" -l vmarket:jump="+product_id;
var lockedlist=getLockedList();
if((isString(lockedlist))&&isString(product_id)&&
lockedlist.indexOf('"'+product_id+'"')!=-1){
lock="locked";}
}catch(e){console.log(e.message);};
return apputil.launch_apl(INSTALLER2_APPS,args,lock,report);}
}
apputil.launch_apps_banner=function(){
launch_appli("apps_banner");};
DISPATCH_DEFAULT={destination:system.input_dev.DISPATCH_DEFAULT};
resetInputDev=function(){
try{
system.input_dev.mouse.set_dispatch(DISPATCH_DEFAULT);
system.input_dev.key.set_dispatch(DISPATCH_DEFAULT);
system.input_dev.touchpad.set_dispatch(DISPATCH_DEFAULT);
system.input_dev.touchpen.set_dispatch(DISPATCH_DEFAULT);
system.input_dev.kbd.set_dispatch(DISPATCH_DEFAULT);
system.cursor_pointer.set_current_index(CURSOR_INVISIBLE_INDEX);
system.cursor_pointer.set_timeout(1);
system.cursor_pointer.force_show();}catch(e){};};
function storeAdultSetting(bool){
try{
var val=1;
if(bool==false){
val=1;}else{
val=0;}
system.apps.write_adult_category(val);}catch(e){
console.log(" cannot write \"system.apps.write_adult_category()\": Error = "+e.message);};}
function getAdultSetting(){
var ret=null;
try{
if(system.apps.read_adult_category()==1)
ret=false;else{
ret=true;}
}catch(e){
console.log(" cannot read \"system.apps.read_adult_category()\": Error = "+e.message);
ret=false;};
return ret;}
useNumKey=function (bool){
ebus.smartphone.set_string_input_mode(SPHONE_STRING_INPUT_NONE);
if(bool){
system.key_control.numeral=true;
ebus.smartphone.set_keyboard_type(SPHONE_KEYBOARD_TYPE_NONE);
ebus.smartphone.set_keyboard_type(SPHONE_KEYBOARD_TYPE_NUM);
ebus.smartphone.set_string_input_mode(SPHONE_STRING_INPUT_STRING);}else {
system.key_control.numeral=false;
ebus.smartphone.set_keyboard_type(SPHONE_KEYBOARD_TYPE_NUM);
ebus.smartphone.set_keyboard_type(SPHONE_KEYBOARD_TYPE_NONE);
ebus.smartphone.set_string_input_mode(SPHONE_STRING_INPUT_NONE);}
}
is_available_stage=function(symbol){
try{
return _GLOBAL_[symbol].visible_p;}catch(e){
return false;}
}
is_available_guidance=function(){
try{
return _GLOBAL_.guidance_container.isActive;}catch(e){
return false;}
}
is_available_SMAd=function(){
try{
var active_screen=HOME.operator.getActiveScreen();
return active_screen[1]._SMAd_status();}catch(e){}
return false;}
isMyHOME=function(){
if(HOME.visible_p!=true)return false;
if(_GLOBAL_.search&&_GLOBAL_.search.visible_p==true)return false;
if(_GLOBAL_.message&&_GLOBAL_.message.visible_p==true)return false;
if(!(HOME.operator===HOME.myscreen_op))return false;
if(_GLOBAL_.guidance_container&&_GLOBAL_.guidance_container.isActive)return false;
return true;}
var VoiceStack=[];
VoiceReserve=function (text){
VoiceStack.push(text);}
VoiceCancelReservation=function (){
VoiceStack.splice(0);}
VoicePlay=function (text,effect,isForce){
if(!isString(text))
return;
var voice=VoiceStack.join("\n")+text;
VoiceCancelReservation();
if(!ebus.tts.supported)
return;
if(!system.mdl_cfg.with_home_voice_guidance)
return;
if(is_available_guidance())
return;
ebus.tts.play({text:voice,starting_sound:effect,force:isForce});}
VoiceStop=function (){
if(!ebus.tts.supported)
return;
VoiceCancelReservation();
ebus.tts.stop();}
addEventHook=function (symbol,hook_func){
HOME.add_event_hook(symbol,hook_func);};
delEventHook=function (symbol){
HOME.del_event_hook(symbol);};
NEXT_STAGE=null;
on_stage_with_fade_out=function (symbol){
if(system.mdl_cfg.with_bp_transit_effect){
NEXT_STAGE=symbol;
system.effect.fade(system.effect.FADE_OUT);}
else
{
on_stage(symbol);}
};
fade_out=function (){
if(system.mdl_cfg.with_bp_transit_effect){
NEXT_STAGE="no stage";
system.effect.fade(system.effect.FADE_OUT);}
};
set_pre_videobox=function (visivle,x,y,z,width,height,faraway){
var w=(width||0);
var h=(height||0);
pre_videobox.visible_p=visivle;
pre_videobox.translate[0]=(x||0)-HOME.bg_translate[0];
pre_videobox.translate[1]=(y||0)-HOME.bg_translate[1];
pre_videobox.translate[2]=(z||0)-HOME.bg_translate[2];
pre_videobox.components[0].width=w+w%2;
pre_videobox.components[0].height=h+h%2;
pre_videobox.components[0].translate[2]=(faraway==false)?0:-9999;};
set_pre_videobox_sub=function (visivle,x,y,z,width,height,faraway){
pre_videobox_sub.visible_p=visivle;
pre_videobox_sub.translate[0]=(x||0)-HOME.bg_translate[0];
pre_videobox_sub.translate[1]=(y||0)-HOME.bg_translate[1];
pre_videobox_sub.translate[2]=(z||0)-HOME.bg_translate[2];
pre_videobox_sub.components[0].width=(width||0);
pre_videobox_sub.components[0].height=(height||0);
pre_videobox_sub.components[0].translate[2]=(faraway==false)?0:-9999;};
function get_screen_template(screen_info){
if(!screen_info)
screen_info={template:"tv"};
var template_name=screen_info.template;
var ret=null;
var pkg_symbol=SCREEN_PREFIX+template_name;
try{
if(isDLScreen(screen_info.screen_install_id)&&screen_info.template!="inst"){
var pkg_url=SCREEN_PATH+screen_info.screen_install_id;
if(screen_info.debug_mode===true&&isString(screen_info.debug_screen_path))
pkg_url=screen_info.debug_screen_path;
if(!package_load_path[pkg_symbol])
add_package_load_path(pkg_symbol,pkg_url+"/template.js");}
if(screen_info.debug_mode===true)
prepare_package(pkg_symbol);
require(pkg_symbol);
provide(pkg_symbol);
ret=_GLOBAL_[pkg_symbol].template;}catch(e){
del_screen_template(screen_info);
try{
if(!screen_info.debug_mode){
HOME.SCREEN_ORDER=HOME.getScreenOrder();
var id=HOME.SCREEN_ORDER.indexOf(screen_info);
HOME.SCREEN_ORDER.splice(id,1);
HOME.storeScreenOrder(HOME.SCREEN_ORDER);}
}catch(e){}
console.log(template_name+" template is not found.");
var pkg_symbol=SCREEN_PREFIX+"tv";
require(pkg_symbol);
provide(pkg_symbol);
ret=_GLOBAL_[pkg_symbol].template;}
if(!ret){
console.log(template_name+" template is invalid.");
var pkg_symbol=SCREEN_PREFIX+"tv";
require(pkg_symbol);
provide(pkg_symbol);
ret=_GLOBAL_[pkg_symbol].template;}
return ret;}
function del_screen_template(screen_info){
try{
if(!isDLScreen(screen_info.screen_install_id))return;
discard_package(SCREEN_PREFIX+screen_info.template);}catch(e){}
}
function isScreenKey(screen_key){
return (isNumber(screen_key)||isString(screen_key));}
function isDLScreen(screen_install_id){
return (isString(screen_install_id)&&screen_install_id.length>=3);}
function isDLScreenKey(key){
return (isString(key)&&key.length>=3);}
doFilter=function (list,exp){
if(!list)
return [];
var retlist=[];
var len=list.length;
for(var i=0;i<len;i++){
try{
if(list[i].match(exp))
retlist.push(list[i]);}catch(e){}
}
return retlist;}

getScreenOrderId=function (screen_key){
if(!isDLScreen(screen_key))
return screen_key;
try{
return parseInt(screen_key.match("(.+):.+")[1]);}catch(e){
return 0;}
}
getScreenInstallId=function (screen_key){
if(!isDLScreen(screen_key))
return screen_key;
try{
return screen_key.match(".+:(.+)")[1];}catch(e){
return 0;}
}
getFaceScreenKey=function (screen_key){
return getScreenOrderId(screen_key);}
getScreenKeyByFaceAPI=function (face_screen_key){
var order=HOME.getScreenOrder();
var len=order.length;
for(var i=0;i<len;i++){
var key=getFaceScreenKey(order[i]);
if(key==face_screen_key)
return order[i];}
return 0;}
getScreenKeyByFilepath=function (path){
var tmp,screen_key;
var order=HOME.getScreenOrder();
if(!isString(path))
return null;
tmp=path.match("/screen([^/]+)$");
screen_key=null;
if(tmp&&isString(tmp[1])){
screen_key=parseInt(tmp[1]);
if(order.indexOf(screen_key)!=-1)
return screen_key;}
screen_key=null;
tmp=path.match("/([^/]+)/screen$");
if(tmp&&isString(tmp[1])){
for(var i=0;i<order.length;i++){
if(!isDLScreen(order[i]))continue;
if(order[i].match(":"+tmp[1]+"$")==null)continue;
screen_key=order[i];
break;}
if(isScreenKey(screen_key))
return screen_key;}
return null;}
getScreenAPI=function(symbol){
var SCREEN_VCAPI={
"PREPARE":"/mhs_market/screen-prepare",
"INSTALL":"/mhs_market/screen-install",
"DELETE":"/mhs_market/screen-delete-download",
"REPORT":"/mhs_market/screen-notice-message.json",
};
var mhs_market_upload_authorizer="upload-user:n0w.up1oading";

var url=getHostName();
try{
var domain=url.match("^https://(.+)$")[1];
url="https://"+mhs_market_upload_authorizer+"@"+domain;}catch(e){}
url+=SCREEN_VCAPI[symbol];
return url;}
getUserScreenNum=function(){
var order=HOME.getScreenOrder();
var num=0;
for(var i=0;i<order.length;i++){
if(!isDLScreen(order[i])){
num++;}else{
var info=HOME.getScreenInfo(order[i]);
if(info.install_type!=SCREEN_INST_AUTO_SUFFIX)
num++;}
}
return num;}
getPartnerScreenNum=function(){
var order=HOME.getScreenOrder();
var num=0;
for(var i=0;i<order.length;i++){
if(isDLScreen(order[i])){
var info=HOME.getScreenInfo(order[i]);
if(info.install_type==SCREEN_INST_AUTO_SUFFIX)
num++;}
}
return num;}
PROTECT_GADGET="var PROTECT_GADGET"
+",HOME, startup_ui, apps, apps_customize,_GLOBAL_"
+",startup, _operator, guidance_container"
+",setActiveStatus, storeAdultSetting"
+",on_stage"
+";";
sm_store_meta=function(sm_meta,pana_meta){
var ret=false;
try{
var store_str=JSON.stringify([JSON.stringify(sm_meta),JSON.stringify(pana_meta)]);
apps_nvram_file.write({filename:"sm_ad_url",data:store_str,product_id:"home",});
ret=true;}catch(e){}
return ret;};
var fdp_color=[
"COL_BASE",
"COL_BASE_A",
"COL_BASE_SUB",
"COL_BASE_SUB_A",
"COL_TEXT_ONBASE",
"COL_TEXT_ONBASE_A",
"COL_TEXT_SUB_ONBASE",
"COL_ICON_ONBASE",
"COL_BORDER_ONBASE",
"COL_BTN",
"COL_BTN_BORDER",
"COL_POINT_ONBASE",
"COL_WIDGET_SUB",
"COL_POP",
"COL_POP_A",
"COL_POP_BORDER",
"COL_POINT",
"COL_TEXT_ONPOINT",
"COL_TEXT_SUB_ONPOINT",
"COL_ICON_ONPOINT",
"COL_BORDER_ONPOINT",
"COL_FCS",
];
fdp_color_p={};
try{
for(var i=0;i<fdp_color.length;i++){
var name=fdp_color[i].substr(4);
fdp_color_p[name]=system.fdp_color[name];
_GLOBAL_[fdp_color[i]]=system.fdp_color[name];}
}catch(e){
console.log("system.fdp_color: "+e.message);}
COL_GRAYOUT=[0,0,0,127];COL_TRANSPARENT=[0,0,0,0];
function getProfile(usrprof_id){
if(!(isNumber(usrprof_id)&&usrprof_id>=0))
return null;
try{
var uprofile=system.user_profile.get({mhc:{id:usrprof_id}});
var icon=uprofile.mhc.icon;
if(!(icon instanceof Binary||isString(icon)))
uprofile.mhc.icon=IMG_PATH+"UserIcon00.png";
var icon=uprofile.mhc.mhc_icon;
if(!(icon instanceof Binary||isString(icon)))
uprofile.mhc.mhc_icon=IMG_PATH+"UserIcon00.png";
if(!isString(uprofile.mhc.mhc_nickname))
uprofile.mhc.mhc_nickname="";
return uprofile;}catch(e){
usrprof_GC();}
return null;}
function usrprof_GC(){
var update_list=[];
var uprofile=null;
try{
uprofile=system.user_profile.get({mhc:{}});
if(uprofile.mhc.all.length==0)
throw ("cannot read user_profile.");}catch(e){
return;}
var order=HOME.getScreenOrder();
for(var i=0;i<order.length;i++){
var info=HOME.getScreenInfo(order[i]);
if(isNumber(info.usrprof_id)&&info.usrprof_id>=0&&uprofile.mhc.all.indexOf(info.usrprof_id)==-1){
info.usrprof_id=null;
HOME.storeScreenInfo(info,order[i]);
update_list.push(order[i]);}
}
HOME.setCurProfId(HOME.getCurProfId());
return update_list;}
