function log(){return null;};
console_log=log;
var path=APPLI_PATH+"0077777700140002/gadget/";
try{
if(configure){
console_log("platinum_main configure loaded.");}
}catch(e){
add_package_load_path("configure",path+"configure.js");
require("configure");}
var DEF_SIDE_WINDOW=configure.DEF_SIDE_WINDOW;
var DEF_4K2K=configure.DEF_4K;
var DEF_CHANGE_SCREEN=configure.DEF_CHANGE_SCREEN;
var DEF_SIDE_TV=configure.DEF_SIDE_TV;
var DEF_TTS=configure.DEF_TTS;
var DEF_TOOLTIP=configure.DEF_TOOLTIP;
var DEF_RECCOMEND=configure.DEF_RECCOMEND;
var DEF_MULTI_USER=configure.DEF_MULTI_USER;
TIMER_RESOLUTION=40;PLATINUM_LANGUAGE=system.locale.language.substr(0,5);
var LANGUAGE_LIST=["en-US","fr-CA","es-US","en-IE","de-DE","it-IT","cs-CZ","hu-HU",
"nl-NL","pl-PL","sk-SK","en-GB","sl-SI","pt-PT","el-GR","bg-BG",
"da-DK","et-EE","fi-FI","hr-HR","lt-LT","lv-LV","no-NO","ro-RO",
"ru-RU","sr-YU","sv-SE","tr-TR","id-ID","pt-BR","es-BR","hi-00",
"th-TH","vi-VN","ar-SA","fa-IR","zh-CN","zh-TW","zh-HK","ja-JP",
"fr-FR","es-ES","mk-MK"];
console_log("platinum_main.js PLATINUM_LANGUAGE:"+PLATINUM_LANGUAGE);
var PLATINUM_FILE_LANGUAGE=(function (language){
for(var i=0;i<LANGUAGE_LIST.length;i++){
if(language==LANGUAGE_LIST[i]){
return LANGUAGE_LIST[i];}
}
switch(language.substr(0,2)){

case "es":
return "es-US";
case "fr":
return "fr-CA";
case "it":
return "it-IT";
case "zh":
return "zh-CN";
case "hi":
return "hi-00";
case "vi":
return "vi-VN";
case "th":
return "th-TH";
case "ar":
return "ar-SA";
case "fa":
return "fa-IR";
case "id":
return "id-ID";
case "ja":
return "ja-JP";
case "mk":
return "mk-MK";
default:
return "en-IE";}
})(PLATINUM_LANGUAGE);
console_log("platinum_main.js PLATINUM_FILE_LANGUAGE:"+PLATINUM_FILE_LANGUAGE);

add_package_load_path("lang_platinum",path+"lang/pkg_lang_platinum_"+PLATINUM_FILE_LANGUAGE+".js");
add_package_load_path("pkg_common",path+"pkg_common.js");
add_package_load_path("pkg_browser",path+"pkg_browser.js");
add_package_load_path("pkg_bookmark",path+"pkg_bookmark.js");
add_package_load_path("pkg_toolbars",path+"pkg_toolbars2.js");
add_stage_load_path("platinum_main",path+"platinum_main.js");
var kbd_path=COMMON_PATH+"keyboard/";
kbd_skin_path=kbd_path+"pkg_keyboard_skin.js";
kbd_default_skin_path=kbd_path+"pkg_keyboard_skin.js";
kbd_skin_path=path+"pkg_keyboard_skin.js";
kbd_default_skin_path=kbd_path+"pkg_keyboard_skin.js";
add_package_load_path("kbd",kbd_path+"pkg_keyboard.js");
add_package_load_path("textarea",kbd_path+"pkg_textarea.js");
require("lang_platinum");
require("pkg_common");
prepare_package("pkg_bookmark");
prepare_package("pkg_toolbars");
W_TEXT=lang_platinum.GetMessageText();
PALTINUM_PATH_IMG="file:///usr/local/application/0077777700140002/gadget/img/";
PLATINUM_MAIN_READY=false;
BROWSER_READY=false;VERSION="0.001";
PLATINUM_BOOT_OPTION=null;
QUERY_TITLE="TITLE";
RECV_URL_EV=1;
SEND_URL_EV=2;
RECV_BOOKMARK_URL_EV=3;
SEND_TITLE_EV=4;
SEND_ACK_REQ_URL=1;
SEND_URL_REQ=2;
SEND_ACK_REQ_BOOKMARK=3;
SEND_TITLE_REQ=4;
enable_keyhook=false;
NAGARA_LAUNCH=DEF_SIDE_WINDOW;
side_w_mode=NAGARA_LAUNCH;
DEF_NAGARA_4K2K=1;
DEF_NAGARA_COMN=2;
DEF_FULL_4K2K=3;
DEF_NAGARA_COMN_CHANGE=5;
DEF_FULL_COMN_CHANGE=6;
check_display_mode=function(){
if(DEF_4K2K)return (side_w_mode)?DEF_NAGARA_4K2K:DEF_FULL_4K2K;
if(!DEF_CHANGE_SCREEN)return DEF_NAGARA_COMN;
return (side_w_mode)?DEF_NAGARA_COMN_CHANGE:DEF_FULL_COMN_CHANGE;}
nv_search_data_flag=false;
display_search_engine_name=false;

var SEARCH_MAJOR_VERSION="2";
var TOU_MAJOR_VERSION="1";
var COUNTRY_CODE=system.locale.country.substr(0,2);
var HOST_NAME=getHostName();
var SEARCH_PATH=HOST_NAME+"/browser_info/search_engine/";
var TOU_PATH=HOST_NAME+"/browser_info/term_of_use/";
Server_json={
sv_status:null,
tou_ver_path:TOU_PATH+TOU_MAJOR_VERSION+".json",
tou_text_path:TOU_PATH+TOU_MAJOR_VERSION+"/"+PLATINUM_FILE_LANGUAGE+".json",
engine_ver_path:SEARCH_PATH+SEARCH_MAJOR_VERSION+".json",
engine_data_path:SEARCH_PATH+SEARCH_MAJOR_VERSION+"/"+COUNTRY_CODE+".json",
request_handler:0,
};
Server_json.get_file=function(file_name){
var result=null;
try{
if(this.request_handler)cancel_http_request(this.request_handler);
this.request_handler=http_request({
url:file_name,
sync:true,
onload:
function(status,header,body){
this.sv_status=status;
if(status==200){
result=eval("("+body+")");}
}
});
this.request_handler=0;}catch(e){
console_log("Error get_file:"+e);}
return result;}
Server_json.get_tou_version=function(){
console_log("Server_json.get_tou_version");
var ret=this.get_file(this.tou_ver_path);
if(ret!=null){
if("version" in ret){
if(!isNaN(ret.version)){
var verdt=ret.version.split(".");
if(verdt[0]==TOU_MAJOR_VERSION){
return ret.version;}
}
}
}
return null;}
Server_json.get_tou_text=function(){
console_log("Server_json.get_tou_text");
var ret=this.get_file(this.tou_text_path);
if(ret==null)return ret;
return ("text" in ret)?ret.text:null;}
Server_json.get_search_engine_version=function(){
console_log("Server_json.get_search_engine_version");
var ret=this.get_file(this.engine_ver_path);
if(ret!=null){
if("version" in ret){
if(!isNaN(ret.version)){
var verdt=ret.version.split(".");
if(verdt[0]==SEARCH_MAJOR_VERSION){
return ret.version;}
}
}
}
return null;}
Server_json.get_search_engine_data=function(){
console_log("Server_json.get_search_engine_data");
var ret=this.get_file(this.engine_data_path);
return ret;}
Server_json.get_status=function(){
return this.sv_status;}
var check_launch=function(){
try{
PLATINUM_BOOT_OPTION=weblink.get();
weblink.clear();
console_log("BOOT_OPTION launch_from: "+PLATINUM_BOOT_OPTION.launch_from
+" url: '"+PLATINUM_BOOT_OPTION.url
+"' category: "+PLATINUM_BOOT_OPTION.category
+" search_engine: "+PLATINUM_BOOT_OPTION.search_engine
+" keyword: '"+PLATINUM_BOOT_OPTION.keyword
+"' extra_data: "+PLATINUM_BOOT_OPTION.extra_data);}catch(e){
console_log("read boot option failed :"+e.message);}
}
USER_PROFILE_ID=null;
var COUNTRY=system.locale.country.substr(0,2);
var SEARCH_COUNTRY=(function(country){
switch(country){
case "JP":
return 0;
case "US":
case "CA":
return 1;
case "CN":
return 2;
case "TW":
return 3;
case "HK":
return 1;
case "IE":
case "DE":
case "AT":
case "FR":
case "IT":
case "ES":
case "CZ":
case "HU":
case "UK":
case "NL":
case "PL":
case "SK":
case "GB":
case "SI":
case "PT":
case "BG":
case "DK":
case "EE":
case "FI":
case "BE":
case "CH":
case "GR":
case "HR":
case "LT":
case "MT":
case "AD":
case "LU":
case "LV":
case "NO":
case "RO":
case "RU":
case "YU":
case "SE":
case "TR":
case "EEU":
return 1;
case "ID":
case "BR":
case "BR":
return 1;
case "00":
case "TH":
case "VN":
case "IR":
return 1;
default:
return 1;}
})(COUNTRY);
require("lang_platinum");

var SEARCH_LIST=[
["US","com"],["CA","ca"],["DE","de"],["IE","ie"],
["NL","nl"],["HU","hu"],["PL","pl"],["CZ","cz"],
["SK","sk"],["IT","it"],["GB","co.uk"],["SI","si"],
["GR","gr"],["PT","pt"],["DK","dk"],["FI","fi"],
["HR","hr"],["NO","no"],["RO","ro"],["RU","ru"],
["BG","bg"],["LT","lt"],["YU","rs"],["SE","se"],
["LV","lv"],["EE","ee"],["TR","com.tr"],["BR","com.br"],
["ID","co.id"],["CN","com.hk"],["TW","com.tw"],["HK","com.hk"],
["VN","com.vn"],["TH","co.th"],["SA","com.sa"],["FR","fr"],
["ES","es"],["SG","com.sg"],["AU","com.au"],["NZ","co.nz"],
["IN","co.in"],["MY","com.my"],["AE","ae"],["KW","com.kw"],
["MX","com.mx"],["AT","at"],["BE","be"],["CH","ch"],
["MT","com.mt"],["AD","ad"],["LU","lu"],["IS","is"],
["UA","com.ua"],["KZ","kz"],["CIS","by"],["UK","co.uk"],
["CL","cl"],["PE","com.pe"],["CO","com.co"],["AR","com.ar"],
["PA","com.pa"],["JP","co.jp"],
];
SEARCH_DOMAIN=(function(country){
for(var i=0,max=SEARCH_LIST.length;i<max;i++){
if(country==SEARCH_LIST[i][0]){
return SEARCH_LIST[i][1];}
}
return "com";})(COUNTRY);
SEARCH_TYPE=0;

if(COUNTRY=="CN"){
ENGINE_LIST=[
{id:2,name:"Baidu"},
{id:0,name:"Google"},
{id:1,name:"bing"}
];}
else {
ENGINE_LIST=[
{id:1,name:"bing"},
{id:0,name:"Google"}
];}
key_flag=false;
set_func_id=function(){
switch(check_display_mode()){
case DEF_NAGARA_4K2K:
case DEF_NAGARA_COMN_CHANGE:
FUNC_INVALID=-1;
FUNC_CHANGE_SCREEN=0;
FUNC_BACK=1;
FUNC_NEXT=2;
FUNC_REDUNTION=3;
FUNC_ENLARGE=4;
FUNC_BOOKMARK_PLUS=5;
FUNC_RELOAD=6;
FUNC_LOCATION=7;
FUNC_SEARCH=8;
FUNC_GUIDE=9;
FUNC_END=10;
FUNC_DRAG=11;
FUNCTION_NUM=12;
break;
case DEF_NAGARA_COMN:
FUNC_INVALID=-1;
FUNC_BACK=0;
FUNC_NEXT=1;
FUNC_REDUNTION=2;
FUNC_ENLARGE=3;
FUNC_BOOKMARK_PLUS=4;
FUNC_RELOAD=5;
FUNC_LOCATION=6;
FUNC_SEARCH=7;
FUNC_GUIDE=8;
FUNC_END=9;
FUNC_DRAG=10;
FUNCTION_NUM=11;
break;
case DEF_FULL_4K2K:
case DEF_FULL_COMN_CHANGE:
FUNC_INVALID=-1;
FUNC_CHANGE_SCREEN=0;
FUNC_BACK=1;
FUNC_NEXT=2;
FUNC_REDUNTION=3;
FUNC_ENLARGE=4;
FUNC_BOOKMARK_PLUS=5;
FUNC_RELOAD=6;
FUNC_LOCATION=7;
FUNC_SEARCH=8;
FUNC_GUIDE=9;
FUNC_END=10;
FUNC_DRAG=11;
FUNCTION_NUM=12;
break;}
}
set_func_id();
var COLOR_KEY=null;
if(system.mdl_cfg.color_key_order==system.mdl_cfg.COLOR_KEY_R_G_Y_B){
COLOR_KEY=[
{symbol:TXK_RED,color:[250,102,72,255]},
{symbol:TXK_GREEN,color:[57,186,146,255]},
{symbol:TXK_YELLOW,color:[255,214,0,255]},
{symbol:TXK_BLUE,color:[62,137,230,255]},
];}else {
COLOR_KEY=[
{symbol:TXK_BLUE,color:[62,137,230,255]},
{symbol:TXK_RED,color:[250,102,72,255]},
{symbol:TXK_GREEN,color:[57,186,146,255]},
{symbol:TXK_YELLOW,color:[255,214,0,255]},
];}
get_COLOR_KEY=function(index){
if(typeof index==="number"&&COLOR_KEY[index])return COLOR_KEY[index];
return null;};
SCREEN_WIDTH=1920;
SCREEN_HEIGHT=1080;
FUNC_BAR_HEIGHT=85;
set_func_pos=function(){
var disp_mode=check_display_mode();
switch(disp_mode){
case DEF_NAGARA_4K2K:
case DEF_NAGARA_COMN_CHANGE:
FUNC_LEFT_POS=-324;
FUNC_RIGHT_POS=960;
FUNC_WIDTH=70;
FUNC_W_MARGIN=2;
LOCATION_WIDTH=385;
SEARCH_WIDTH=214;
break;
case DEF_NAGARA_COMN:
FUNC_LEFT_POS=-324;
FUNC_RIGHT_POS=960;
FUNC_WIDTH=72;
FUNC_W_MARGIN=0;
LOCATION_WIDTH=480;
SEARCH_WIDTH=240;
break;
case DEF_FULL_4K2K:
case DEF_FULL_COMN_CHANGE:
FUNC_LEFT_POS=-900;
FUNC_RIGHT_POS=900;
FUNC_WIDTH=76;
FUNC_W_MARGIN=20;
LOCATION_WIDTH=680;
SEARCH_WIDTH=316;
break;}
switch(disp_mode){
case DEF_NAGARA_4K2K:
case DEF_NAGARA_COMN_CHANGE:
COLOR_POS_LIST=[
FUNC_LEFT_POS,
FUNC_LEFT_POS+FUNC_WIDTH*1+FUNC_W_MARGIN*1,
FUNC_LEFT_POS+FUNC_WIDTH*2+FUNC_W_MARGIN*2,
FUNC_LEFT_POS+FUNC_WIDTH*3+FUNC_W_MARGIN*3,
FUNC_LEFT_POS+FUNC_WIDTH*4+FUNC_W_MARGIN*4,
FUNC_LEFT_POS+FUNC_WIDTH*5+FUNC_W_MARGIN*5,
FUNC_LEFT_POS+FUNC_WIDTH*5.5+FUNC_W_MARGIN*5+12+LOCATION_WIDTH-27.5,
FUNC_LEFT_POS+FUNC_WIDTH*5.5+FUNC_W_MARGIN*5+12+LOCATION_WIDTH/2,
FUNC_LEFT_POS+FUNC_WIDTH*5.5+FUNC_W_MARGIN*5+12+LOCATION_WIDTH+25.5+SEARCH_WIDTH/2,
FUNC_LEFT_POS+FUNC_WIDTH*6+FUNC_W_MARGIN*5+12+LOCATION_WIDTH+25.5+SEARCH_WIDTH+15,
FUNC_LEFT_POS+FUNC_WIDTH*7+FUNC_W_MARGIN*6+12+LOCATION_WIDTH+25.5+SEARCH_WIDTH+15,
FUNC_RIGHT_POS-17-FUNC_WIDTH/2
];
break;
case DEF_NAGARA_COMN:
COLOR_POS_LIST=[
FUNC_LEFT_POS,
FUNC_LEFT_POS+FUNC_WIDTH,
FUNC_LEFT_POS+FUNC_WIDTH*2+FUNC_W_MARGIN,
FUNC_LEFT_POS+FUNC_WIDTH*3+FUNC_W_MARGIN,
FUNC_LEFT_POS+FUNC_WIDTH*4+FUNC_W_MARGIN*2,
FUNC_LEFT_POS+FUNC_WIDTH*4+FUNC_W_MARGIN*2+FUNC_WIDTH/2+LOCATION_WIDTH-36,
FUNC_LEFT_POS+FUNC_WIDTH*4+FUNC_W_MARGIN*2+FUNC_WIDTH/2+LOCATION_WIDTH/2,
FUNC_LEFT_POS+FUNC_WIDTH*4+FUNC_W_MARGIN*2+FUNC_WIDTH/2+LOCATION_WIDTH
+SEARCH_WIDTH/2,
FUNC_LEFT_POS+FUNC_WIDTH*5+FUNC_W_MARGIN*2+LOCATION_WIDTH
+SEARCH_WIDTH,
FUNC_LEFT_POS+FUNC_WIDTH*6+FUNC_W_MARGIN*2+LOCATION_WIDTH
+SEARCH_WIDTH,
FUNC_RIGHT_POS-45
];
break;
case DEF_FULL_4K2K:
case DEF_FULL_COMN_CHANGE:
var space_edge=13;
COLOR_POS_LIST=[
FUNC_LEFT_POS,
FUNC_LEFT_POS+FUNC_WIDTH+FUNC_W_MARGIN,
FUNC_LEFT_POS+FUNC_WIDTH*2+FUNC_W_MARGIN,
FUNC_LEFT_POS+FUNC_WIDTH*3+FUNC_W_MARGIN*2,
FUNC_LEFT_POS+FUNC_WIDTH*4+FUNC_W_MARGIN*2,
FUNC_LEFT_POS+FUNC_WIDTH*5+FUNC_W_MARGIN*3,
FUNC_LEFT_POS+FUNC_WIDTH*6+FUNC_W_MARGIN*3+LOCATION_WIDTH-27.5,
FUNC_LEFT_POS+FUNC_WIDTH*6+FUNC_W_MARGIN*3+LOCATION_WIDTH/2,
FUNC_LEFT_POS+FUNC_WIDTH*6+FUNC_W_MARGIN*4+LOCATION_WIDTH+25.5+SEARCH_WIDTH/2,
FUNC_LEFT_POS+FUNC_WIDTH*6+FUNC_W_MARGIN*5+LOCATION_WIDTH+25.5+SEARCH_WIDTH+42,
FUNC_LEFT_POS+FUNC_WIDTH*7+FUNC_W_MARGIN*5+LOCATION_WIDTH+25.5+SEARCH_WIDTH+42,
FUNC_RIGHT_POS-20
];
break;}
}
set_func_pos();
DIRECT_LAUNCH=false;
var USE_TTS=(ebus.tts&&ebus.tts.supported)?true:false;
if(USE_TTS)
USE_TTS=DEF_TTS;
URL_STR="";
var SAVE_URL="";
BRW_INFO={
url:"",
title:"",
favicon_uri:""
}
CHANGE_FONT_SIZE=function (obj){
if(get_text_width(obj,obj.text)>obj.width){
for(var i=obj.font_size;i>14;i-=4){
obj.font_size=i;
if(get_text_width(obj,obj.text)<=obj.width)break;}
setf_text(obj,obj.text);}
}
CHANGE_FONT_SIZE_B=function (obj){
if(get_text_font_height(obj,obj.text)>obj.height){
for(var i=obj.font_size;i>14;i-=4){
obj.font_size=i;
if(get_text_font_height(obj,obj.text)<=obj.height){
break;}
}
setf_text(obj,obj.text);}
}
TOU_PANEL_MODE_STARTING=1;
TOU_VERSION=null;
var get_user_profile_length=function(){
var ret=0;
if(!system.user_profile||!system.user_profile.supported)return ret;
var all_id=[];
try{
var profile=system.user_profile.get({});
if(profile&&profile.mhc&&profile.mhc.all){
all_id=profile.mhc.all;}
}catch(e){
console.log(e);}
for(var i=0;i<all_id.length;i++){
if(isNumber(all_id[i])){
ret++;}
}
return ret;};
get_pointer_table=function(type){
var table=null;
if(type=="browser"){
switch(check_display_mode()){
case DEF_NAGARA_COMN:
table=[
{x1:-360,x2:-288,y1:540,y2:440,id:0,obj:null},
{x1:-287,x2:-216,y1:540,y2:440,id:1,obj:null},
{x1:-215,x2:-144,y1:540,y2:440,id:2,obj:null},
{x1:-143,x2:-72,y1:540,y2:440,id:3,obj:null},
{x1:-71,x2:0,y1:540,y2:440,id:4,obj:null},
{x1:420,x2:480,y1:540,y2:440,id:5,obj:null},
{x1:1,x2:480,y1:540,y2:440,id:6,obj:null},
{x1:481,x2:720,y1:540,y2:440,id:7,obj:null},
{x1:721,x2:792,y1:540,y2:440,id:8,obj:null},
{x1:793,x2:864,y1:540,y2:440,id:9,obj:null},
{x1:-934,x2:-386,y1:171,y2:119,id:10,obj:null},
{x1:-934,x2:-386,y1:-459,y2:-540,id:11,obj:null},
{x1:-441,x2:-401,y1:78,y2:14,id:12,obj:null},
{x1:-441,x2:-401,y1:-66,y2:-130,id:13,obj:null},
{x1:-441,x2:-401,y1:-210,y2:-274,id:14,obj:null},
{x1:-441,x2:-401,y1:-354,y2:-418,id:15,obj:null},
{x1:-934,x2:-386,y1:117,y2:-25,id:16,obj:null},
{x1:-934,x2:-386,y1:-27,y2:-169,id:17,obj:null},
{x1:-934,x2:-386,y1:-171,y2:-313,id:18,obj:null},
{x1:-934,x2:-386,y1:-315,y2:-457,id:19,obj:null},
{x1:-360,x2:919,y1:442.5,y2:-502.5,id:20,obj:null},
{x1:-360,x2:-320,y1:-502,y2:-542,id:21,obj:null},
{x1:882,x2:922,y1:-502,y2:-542,id:22,obj:null},
{x1:922,x2:962,y1:444.5,y2:404.5,id:23,obj:null},
{x1:922,x2:962,y1:-464.5,y2:-504.5,id:24,obj:null},
{x1:-360,x2:919,y1:-502,y2:-542,id:25,obj:null},
{x1:922,x2:962,y1:442.5,y2:-502.5,id:26,obj:null},
];
break;
case DEF_NAGARA_4K2K:
case DEF_NAGARA_COMN_CHANGE:
var index=0;
table=[
{x1:-359,x2:-289,y1:540,y2:455,id:index++,obj:null},
{x1:-287,x2:-217,y1:540,y2:455,id:index++,obj:null},
{x1:-215,x2:-145,y1:540,y2:455,id:index++,obj:null},
{x1:-143,x2:-73,y1:540,y2:455,id:index++,obj:null},
{x1:-71,x2:-1,y1:540,y2:455,id:index++,obj:null},
{x1:1,x2:71,y1:540,y2:455,id:index++,obj:null},
{x1:405.5,x2:459.5,y1:540,y2:455,id:index++,obj:null},
{x1:83,x2:460,y1:540,y2:455,id:index++,obj:null},
{x1:485.5,x2:699.5,y1:540,y2:455,id:index++,obj:null},
{x1:714.5,x2:784.5,y1:540,y2:455,id:index++,obj:null},
{x1:786.5,x2:856.5,y1:540,y2:455,id:index++,obj:null},
];
if(DEF_TOOLTIP){
table.push(
{x1:885,x2:955,y1:540,y2:455,id:index++,obj:null}
);}
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table.push(
{x1:-933,x2:-387,y1:119,y2:66,id:index++,obj:null},
{x1:-933,x2:-387,y1:-487,y2:-540,id:index++,obj:null},
{x1:-456,x2:-378,y1:28,y2:-35,id:index++,obj:null},
{x1:-456,x2:-378,y1:-110,y2:-173,id:index++,obj:null},
{x1:-456,x2:-378,y1:-248,y2:-311,id:index++,obj:null},
{x1:-456,x2:-378,y1:-386,y2:-449,id:index++,obj:null},
{x1:-933,x2:-387,y1:65,y2:-72,id:index++,obj:null},
{x1:-933,x2:-387,y1:-73,y2:-210,id:index++,obj:null},
{x1:-933,x2:-387,y1:-211,y2:-348,id:index++,obj:null},
{x1:-933,x2:-387,y1:-349,y2:-486,id:index++,obj:null}
);
var user_len=get_user_profile_length();
switch(user_len+1){
case 1:
table.push(
{x1:-685,x2:-635,y1:199,y2:121,id:index++,obj:null}
);
break;
case 2:
table.push(
{x1:-718,x2:-668,y1:199,y2:121,id:index++,obj:null},
{x1:-652,x2:-602,y1:199,y2:121,id:index++,obj:null}
);
break;
case 3:
table.push(
{x1:-751,x2:-701,y1:199,y2:121,id:index++,obj:null},
{x1:-685,x2:-635,y1:199,y2:121,id:index++,obj:null},
{x1:-619,x2:-569,y1:199,y2:121,id:index++,obj:null}
);
break;
case 4:
table.push(
{x1:-784,x2:-734,y1:199,y2:121,id:index++,obj:null},
{x1:-718,x2:-668,y1:199,y2:121,id:index++,obj:null},
{x1:-652,x2:-602,y1:199,y2:121,id:index++,obj:null},
{x1:-586,x2:-536,y1:199,y2:121,id:index++,obj:null}
);
break;
case 5:
table.push(
{x1:-817,x2:-767,y1:199,y2:121,id:index++,obj:null},
{x1:-751,x2:-701,y1:199,y2:121,id:index++,obj:null},
{x1:-685,x2:-635,y1:199,y2:121,id:index++,obj:null},
{x1:-619,x2:-569,y1:199,y2:121,id:index++,obj:null},
{x1:-553,x2:-503,y1:199,y2:121,id:index++,obj:null}
);
break;
case 6:
table.push(
{x1:-850,x2:-800,y1:199,y2:121,id:index++,obj:null},
{x1:-784,x2:-734,y1:199,y2:121,id:index++,obj:null},
{x1:-718,x2:-668,y1:199,y2:121,id:index++,obj:null},
{x1:-652,x2:-602,y1:199,y2:121,id:index++,obj:null},
{x1:-586,x2:-536,y1:199,y2:121,id:index++,obj:null},
{x1:-520,x2:-470,y1:199,y2:121,id:index++,obj:null}
);
break;
case 7:
table.push(
{x1:-883,x2:-833,y1:199,y2:121,id:index++,obj:null},
{x1:-817,x2:-767,y1:199,y2:121,id:index++,obj:null},
{x1:-751,x2:-701,y1:199,y2:121,id:index++,obj:null},
{x1:-685,x2:-635,y1:199,y2:121,id:index++,obj:null},
{x1:-619,x2:-569,y1:199,y2:121,id:index++,obj:null},
{x1:-553,x2:-503,y1:199,y2:121,id:index++,obj:null},
{x1:-487,x2:-437,y1:199,y2:121,id:index++,obj:null}
);
break;
default:
break;}
}else{
table.push(
{x1:-933,x2:-387,y1:200,y2:119,id:index++,obj:null},
{x1:-933,x2:-387,y1:-459,y2:-540,id:index++,obj:null},
{x1:-456,x2:-378,y1:78,y2:14,id:index++,obj:null},
{x1:-456,x2:-378,y1:-66,y2:-130,id:index++,obj:null},
{x1:-456,x2:-378,y1:-210,y2:-274,id:index++,obj:null},
{x1:-456,x2:-378,y1:-354,y2:-418,id:index++,obj:null},
{x1:-933,x2:-387,y1:117,y2:-25,id:index++,obj:null},
{x1:-933,x2:-387,y1:-27,y2:-169,id:index++,obj:null},
{x1:-933,x2:-387,y1:-171,y2:-313,id:index++,obj:null},
{x1:-933,x2:-387,y1:-315,y2:-457,id:index++,obj:null}
);}
}else{
table.push(
{x1:-933,x2:-387,y1:540,y2:432,id:index++,obj:null},
{x1:-933,x2:-387,y1:-432,y2:-540,id:index++,obj:null},
{x1:-456,x2:-378,y1:394,y2:326,id:index++,obj:null},
{x1:-456,x2:-378,y1:250,y2:182,id:index++,obj:null},
{x1:-456,x2:-378,y1:106,y2:38,id:index++,obj:null},
{x1:-456,x2:-378,y1:-38,y2:-106,id:index++,obj:null},
{x1:-456,x2:-378,y1:-182,y2:-250,id:index++,obj:null},
{x1:-456,x2:-378,y1:-326,y2:-394,id:index++,obj:null},
{x1:-933,x2:-387,y1:432,y2:288,id:index++,obj:null},
{x1:-933,x2:-387,y1:288,y2:144,id:index++,obj:null},
{x1:-933,x2:-387,y1:144,y2:0,id:index++,obj:null},
{x1:-933,x2:-387,y1:0,y2:-144,id:index++,obj:null},
{x1:-933,x2:-387,y1:-144,y2:-288,id:index++,obj:null},
{x1:-933,x2:-387,y1:-288,y2:-432,id:index++,obj:null}
);}
table.push(
{x1:-360,x2:919,y1:442.5,y2:-502.5,id:index++,obj:null},
{x1:-360,x2:-320,y1:-502,y2:-542,id:index++,obj:null},
{x1:882,x2:922,y1:-502,y2:-542,id:index++,obj:null},
{x1:922,x2:962,y1:444.5,y2:404.5,id:index++,obj:null},
{x1:922,x2:962,y1:-464.5,y2:-504.5,id:index++,obj:null},
{x1:-360,x2:919,y1:-502,y2:-542,id:index++,obj:null},
{x1:922,x2:962,y1:442.5,y2:-502.5,id:index++,obj:null}
);
break;
case DEF_FULL_4K2K:
case DEF_FULL_COMN_CHANGE:
var index=0;
table=[
{x1:-938,x2:-862,y1:540,y2:455,id:index++,obj:null},
{x1:-842,x2:-766,y1:540,y2:455,id:index++,obj:null},
{x1:-765,x2:-690,y1:540,y2:455,id:index++,obj:null},
{x1:-670,x2:-594,y1:540,y2:455,id:index++,obj:null},
{x1:-593,x2:-518,y1:540,y2:455,id:index++,obj:null},
{x1:-498,x2:-422,y1:540,y2:455,id:index++,obj:null},
{x1:241.5,x2:295.5,y1:540,y2:455,id:index++,obj:null},
{x1:-384,x2:296,y1:540,y2:455,id:index++,obj:null},
{x1:341.5,x2:657.5,y1:540,y2:455,id:index++,obj:null},
{x1:684.5,x2:754.5,y1:540,y2:455,id:index++,obj:null},
{x1:760.5,x2:830.5,y1:540,y2:455,id:index++,obj:null},
];
if(DEF_TOOLTIP){
table.push(
{x1:845,x2:915,y1:540,y2:455,id:index++,obj:null}
);}
table.push(
{x1:-959,x2:919,y1:442.5,y2:-502.5,id:index++,obj:null},
{x1:-962,x2:-922,y1:-502,y2:-542,id:index++,obj:null},
{x1:882,x2:922,y1:-502,y2:-542,id:index++,obj:null},
{x1:922,x2:962,y1:444.5,y2:404.5,id:index++,obj:null},
{x1:922,x2:962,y1:-464.5,y2:-504.5,id:index++,obj:null},
{x1:-959,x2:919,y1:-502,y2:-542,id:index++,obj:null},
{x1:922,x2:962,y1:442.5,y2:-502.5,id:index++,obj:null}
);
break;}
}else if(type=="move_bookmark"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-960,x2:-386,y1:120,y2:66,id:0,obj:null},
{x1:-960,x2:-386,y1:-459,y2:-540,id:1,obj:null},
{x1:-960,x2:-51,y1:66,y2:-3,id:2,obj:null},
{x1:-960,x2:-51,y1:-3,y2:-141,id:3,obj:null},
{x1:-960,x2:-51,y1:-141,y2:-279,id:4,obj:null},
{x1:-960,x2:-51,y1:-279,y2:-417,id:5,obj:null},
{x1:-960,x2:-51,y1:-417,y2:-459,id:6,obj:null},
{x1:-10,x2:210,y1:-55,y2:-105,id:7,obj:null},
];}else{
table=[
{x1:-960,x2:-386,y1:171,y2:119,id:0,obj:null},
{x1:-960,x2:-386,y1:-459,y2:-540,id:1,obj:null},
{x1:-960,x2:-51,y1:119,y2:46,id:2,obj:null},
{x1:-960,x2:-51,y1:46,y2:-98,id:3,obj:null},
{x1:-960,x2:-51,y1:-98,y2:-242,id:4,obj:null},
{x1:-960,x2:-51,y1:-242,y2:-386,id:5,obj:null},
{x1:-960,x2:-51,y1:-386,y2:-459,id:6,obj:null},
{x1:-10,x2:210,y1:-55,y2:-105,id:7,obj:null},
];}
}else{
table=[
{x1:-960,x2:-360,y1:540,y2:435,id:0,obj:null},
{x1:-960,x2:-360,y1:-459,y2:-540,id:1,obj:null},
{x1:-960,x2:-51,y1:435,y2:362,id:2,obj:null},
{x1:-960,x2:-51,y1:362,y2:218,id:3,obj:null},
{x1:-960,x2:-51,y1:218,y2:74,id:4,obj:null},
{x1:-960,x2:-51,y1:74,y2:-70,id:5,obj:null},
{x1:-960,x2:-51,y1:-70,y2:-214,id:6,obj:null},
{x1:-960,x2:-51,y1:-214,y2:-358,id:7,obj:null},
{x1:-960,x2:-51,y1:-358,y2:-431,id:8,obj:null},
{x1:-10,x2:210,y1:-55,y2:-105,id:9,obj:null},
];}
}else if(type=="submenu1"){
table=[
{x1:-454,x2:-136,y1:223,y2:175,id:0,obj:null},
{x1:-454,x2:-136,y1:175,y2:127,id:1,obj:null},
{x1:-454,x2:-136,y1:127,y2:79,id:2,obj:null},
];}else if(type=="submenu2"){
table=[
{x1:1,x2:319,y1:223,y2:175,id:0,obj:null},
{x1:1,x2:319,y1:175,y2:127,id:1,obj:null},
{x1:1,x2:319,y1:127,y2:79,id:2,obj:null},
];}else if(type=="submenu3"){
table=[
{x1:496,x2:814,y1:223,y2:175,id:0,obj:null},
{x1:496,x2:814,y1:175,y2:127,id:1,obj:null},
{x1:496,x2:814,y1:127,y2:79,id:2,obj:null},
];}else if(type=="submenu4"){
table=[
{x1:-454,x2:-136,y1:-32,y2:-80,id:0,obj:null},
{x1:-454,x2:-136,y1:-80,y2:-136,id:1,obj:null},
{x1:-454,x2:-136,y1:-128,y2:-176,id:2,obj:null},
];}else if(type=="submenu5"){
table=[
{x1:1,x2:319,y1:-32,y2:-80,id:0,obj:null},
{x1:1,x2:319,y1:-80,y2:-136,id:1,obj:null},
{x1:1,x2:319,y1:-128,y2:-176,id:2,obj:null},
];}else if(type=="submenu6"){
table=[
{x1:496,x2:814,y1:-32,y2:-80,id:0,obj:null},
{x1:496,x2:814,y1:-80,y2:-136,id:1,obj:null},
{x1:496,x2:814,y1:-128,y2:-176,id:2,obj:null},
];}else if(type=="submenu7"){
table=[
{x1:-454,x2:-136,y1:-292,y2:-340,id:0,obj:null},
{x1:-454,x2:-136,y1:-340,y2:-388,id:1,obj:null},
{x1:-454,x2:-136,y1:-128,y2:-436,id:2,obj:null},
];}else if(type=="submenu8"){
table=[
{x1:1,x2:319,y1:-292,y2:-340,id:0,obj:null},
{x1:1,x2:319,y1:-340,y2:-388,id:1,obj:null},
{x1:1,x2:319,y1:-128,y2:-436,id:2,obj:null},
];}else if(type=="submenu9"){
table=[
{x1:496,x2:814,y1:-292,y2:-340,id:0,obj:null},
{x1:496,x2:814,y1:-340,y2:-388,id:1,obj:null},
{x1:496,x2:814,y1:-128,y2:-436,id:2,obj:null},
];}else if(type=="submenu_side1"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-359,x2:-81,y1:109,y2:53,id:0,obj:null},
{x1:-359,x2:-81,y1:53,y2:-3,id:1,obj:null},
{x1:-359,x2:-81,y1:-3,y2:-59,id:2,obj:null},
{x1:-359,x2:-81,y1:-59,y2:-115,id:3,obj:null},
];}else{
table=[
{x1:-359,x2:-81,y1:112,y2:74,id:0,obj:null},
{x1:-359,x2:-81,y1:74,y2:18,id:1,obj:null},
{x1:-359,x2:-81,y1:18,y2:-38,id:2,obj:null},
];}
}else{
table=[
{x1:-359,x2:-81,y1:444,y2:388,id:0,obj:null},
{x1:-359,x2:-81,y1:388,y2:332,id:1,obj:null},
{x1:-359,x2:-81,y1:332,y2:276,id:2,obj:null},
];}
}else if(type=="submenu_side2"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-359,x2:-81,y1:-29,y2:-85,id:0,obj:null},
{x1:-359,x2:-81,y1:-85,y2:-141,id:1,obj:null},
{x1:-359,x2:-81,y1:-141,y2:-197,id:2,obj:null},
{x1:-359,x2:-81,y1:-197,y2:-253,id:3,obj:null},
];}else{
table=[
{x1:-359,x2:-81,y1:-14,y2:-70,id:0,obj:null},
{x1:-359,x2:-81,y1:-70,y2:-126,id:1,obj:null},
{x1:-359,x2:-81,y1:-126,y2:-182,id:2,obj:null},
];}
}else{
table=[
{x1:-359,x2:-81,y1:300,y2:244,id:0,obj:null},
{x1:-359,x2:-81,y1:244,y2:188,id:1,obj:null},
{x1:-359,x2:-81,y1:188,y2:132,id:2,obj:null},
];}
}else if(type=="submenu_side3"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-359,x2:-81,y1:-167,y2:-223,id:0,obj:null},
{x1:-359,x2:-81,y1:-223,y2:-279,id:1,obj:null},
{x1:-359,x2:-81,y1:-279,y2:-335,id:2,obj:null},
{x1:-359,x2:-81,y1:-335,y2:-391,id:3,obj:null},
];}else{
table=[
{x1:-359,x2:-81,y1:-158,y2:-214,id:0,obj:null},
{x1:-359,x2:-81,y1:-214,y2:-270,id:1,obj:null},
{x1:-359,x2:-81,y1:-270,y2:-326,id:2,obj:null},
];}
}else{
table=[
{x1:-359,x2:-81,y1:156,y2:100,id:0,obj:null},
{x1:-359,x2:-81,y1:100,y2:44,id:1,obj:null},
{x1:-359,x2:-81,y1:44,y2:-12,id:2,obj:null},
];}
}else if(type=="submenu_side4"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-359,x2:-81,y1:-305,y2:-361,id:0,obj:null},
{x1:-359,x2:-81,y1:-361,y2:-417,id:1,obj:null},
{x1:-359,x2:-81,y1:-417,y2:-473,id:2,obj:null},
{x1:-359,x2:-81,y1:-473,y2:-529,id:3,obj:null},
];}else{
table=[
{x1:-359,x2:-81,y1:-302,y2:-358,id:0,obj:null},
{x1:-359,x2:-81,y1:-358,y2:-414,id:1,obj:null},
{x1:-359,x2:-81,y1:-414,y2:-470,id:2,obj:null},
];}
}else{
table=[
{x1:-359,x2:-81,y1:12,y2:-44,id:0,obj:null},
{x1:-359,x2:-81,y1:-44,y2:-100,id:1,obj:null},
{x1:-359,x2:-81,y1:-100,y2:-156,id:2,obj:null},
];}
}else if(type=="submenu_side5"){
if(!DEF_SIDE_TV){
table=[
{x1:-359,x2:-81,y1:-132,y2:-188,id:0,obj:null},
{x1:-359,x2:-81,y1:-188,y2:-244,id:1,obj:null},
{x1:-359,x2:-81,y1:-244,y2:-300,id:2,obj:null},
];}
}else if(type=="submenu_side6"){
if(!DEF_SIDE_TV){
table=[
{x1:-359,x2:-81,y1:-276,y2:-332,id:0,obj:null},
{x1:-359,x2:-81,y1:-332,y2:-388,id:1,obj:null},
{x1:-359,x2:-81,y1:-388,y2:-444,id:2,obj:null},
];}
}else if(type=="submenu_user1"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-55,x2:-9,y1:-5,y2:-115,id:0,obj:null},
{x1:7,x2:53,y1:-5,y2:-115,id:1,obj:null},
{x1:69,x2:115,y1:-5,y2:-115,id:2,obj:null},
{x1:131,x2:177,y1:-5,y2:-115,id:3,obj:null},
{x1:193,x2:239,y1:-5,y2:-115,id:4,obj:null},
{x1:255,x2:301,y1:-5,y2:-115,id:5,obj:null}
];}
}
}else if(type=="submenu_user2"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-55,x2:-9,y1:-143,y2:-253,id:0,obj:null},
{x1:7,x2:53,y1:-143,y2:-253,id:1,obj:null},
{x1:69,x2:115,y1:-143,y2:-253,id:2,obj:null},
{x1:131,x2:177,y1:-143,y2:-253,id:3,obj:null},
{x1:193,x2:239,y1:-143,y2:-253,id:4,obj:null},
{x1:255,x2:301,y1:-143,y2:-253,id:5,obj:null}
];}
}
}else if(type=="submenu_user3"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-55,x2:-9,y1:-281,y2:-391,id:0,obj:null},
{x1:7,x2:53,y1:-281,y2:-391,id:1,obj:null},
{x1:69,x2:115,y1:-281,y2:-391,id:2,obj:null},
{x1:131,x2:177,y1:-281,y2:-391,id:3,obj:null},
{x1:193,x2:239,y1:-281,y2:-391,id:4,obj:null},
{x1:255,x2:301,y1:-281,y2:-391,id:5,obj:null}
];}
}
}else if(type=="submenu_user4"){
if(DEF_SIDE_TV){
if(DEF_MULTI_USER){
table=[
{x1:-55,x2:-9,y1:-419,y2:-529,id:0,obj:null},
{x1:7,x2:53,y1:-419,y2:-529,id:1,obj:null},
{x1:69,x2:115,y1:-419,y2:-529,id:2,obj:null},
{x1:131,x2:177,y1:-419,y2:-529,id:3,obj:null},
{x1:193,x2:239,y1:-419,y2:-529,id:4,obj:null},
{x1:255,x2:301,y1:-419,y2:-529,id:5,obj:null}
];}
}
}else if(type=="TOU_1"){
table=[
{x1:800,x2:840,y1:309,y2:269,id:0,obj:null},
{x1:800,x2:840,y1:-249,y2:-289,id:1,obj:null},
{x1:-827.5,x2:-756.5,y1:-294,y2:-364,id:2,obj:null},
{x1:-221,x2:221,y1:-393,y2:-475,id:3,obj:null},
];}else if(type=="TOU_2"){
table=[
{x1:800,x2:840,y1:309,y2:269,id:0,obj:null},
{x1:800,x2:840,y1:-249,y2:-289,id:1,obj:null},
{x1:-827.5,x2:-756.5,y1:-294,y2:-364,id:2,obj:null},
{x1:-496,x2:-54,y1:-393,y2:-475,id:3,obj:null},
{x1:54,x2:496,y1:-393,y2:-475,id:4,obj:null},
];}else if(type=="engine"){
switch(check_display_mode()){
case DEF_NAGARA_4K2K:
case DEF_NAGARA_COMN:
case DEF_NAGARA_COMN_CHANGE:
table=[
{x1:483,x2:703,y1:472,y2:418,id:0,obj:null},
{x1:483,x2:703,y1:418,y2:364,id:1,obj:null},
{x1:483,x2:703,y1:364,y2:310,id:2,obj:null},
{x1:483,x2:703,y1:310,y2:256,id:3,obj:null},
{x1:483,x2:703,y1:256,y2:202,id:4,obj:null},
{x1:483,x2:703,y1:202,y2:148,id:5,obj:null},
{x1:483,x2:703,y1:148,y2:94,id:6,obj:null},
{x1:483,x2:703,y1:94,y2:40,id:7,obj:null},
{x1:483,x2:703,y1:40,y2:-12,id:8,obj:null},
{x1:483,x2:703,y1:-12,y2:-66,id:9,obj:null},
];
break;
case DEF_FULL_4K2K:
case DEF_FULL_COMN_CHANGE:
table=[
{x1:390,x2:610,y1:472,y2:418,id:0,obj:null},
{x1:390,x2:610,y1:418,y2:364,id:1,obj:null},
{x1:390,x2:610,y1:364,y2:310,id:2,obj:null},
{x1:390,x2:610,y1:310,y2:256,id:3,obj:null},
{x1:390,x2:610,y1:256,y2:202,id:4,obj:null},
{x1:390,x2:610,y1:202,y2:148,id:5,obj:null},
{x1:390,x2:610,y1:148,y2:94,id:6,obj:null},
{x1:390,x2:610,y1:94,y2:40,id:7,obj:null},
{x1:390,x2:610,y1:40,y2:-12,id:8,obj:null},
{x1:390,x2:610,y1:-12,y2:-66,id:9,obj:null},
];
break;}
}else if(type=="menu"){
table=[
{x1:190,x2:915,y1:453,y2:383,id:0,obj:null},
{x1:190,x2:915,y1:383,y2:313,id:1,obj:null},
{x1:190,x2:915,y1:313,y2:243,id:2,obj:null},
{x1:190,x2:915,y1:243,y2:173,id:3,obj:null},
{x1:190,x2:915,y1:173,y2:103,id:4,obj:null},
];}else if(type=="prompt"){
table=[
{x1:-300,x2:300,y1:145,y2:95,id:0,obj:null},
{x1:-270,x2:-30,y1:45,y2:-5,id:1,obj:null},
{x1:30,x2:270,y1:45,y2:-5,id:2,obj:null},
];}else if(type=="digest_auth"){
table=[
{x1:-270,x2:530,y1:195,y2:145,id:0,obj:null},
{x1:-270,x2:530,y1:105,y2:55,id:1,obj:null},
{x1:-290,x2:-50,y1:15,y2:-35,id:2,obj:null},
{x1:10,x2:250,y1:15,y2:-35,id:3,obj:null},
];}else if(type=="popup_1"){
table=[
{x1:-120,x2:120,y1:-285,y2:-335,id:0,obj:null},
];}else if(type=="popup_2"){
table=[
{x1:-260,x2:-20,y1:-285,y2:-335,id:0,obj:null},
{x1:20,x2:260,y1:-285,y2:-335,id:1,obj:null},
];}else if(type=="exit_popup"){
table=[
{x1:-260,x2:-40,y1:-55,y2:-105,id:0,obj:null},
{x1:40,x2:260,y1:-55,y2:-105,id:1,obj:null},
];}else if(type=="del_bm_popup"){
table=[
{x1:-260,x2:-40,y1:-55,y2:-105,id:0,obj:null},
{x1:40,x2:260,y1:-55,y2:-105,id:1,obj:null},
];}else if(type=="del_cookie_popup"){
table=[
{x1:-260,x2:-40,y1:-55,y2:-105,id:0,obj:null},
{x1:40,x2:260,y1:-55,y2:-105,id:1,obj:null},
];}else if(type=="selected_popup1"){
table=[
{x1:690,x2:910,y1:473,y2:423,id:0,obj:null},
{x1:690,x2:910,y1:423,y2:373,id:1,obj:null},
{x1:690,x2:910,y1:373,y2:323,id:2,obj:null},
{x1:690,x2:910,y1:323,y2:273,id:3,obj:null},
{x1:690,x2:910,y1:273,y2:223,id:4,obj:null},
{x1:690,x2:910,y1:223,y2:173,id:5,obj:null},
{x1:690,x2:910,y1:173,y2:123,id:6,obj:null},
{x1:690,x2:910,y1:123,y2:73,id:7,obj:null},
{x1:690,x2:910,y1:73,y2:23,id:8,obj:null},
{x1:690,x2:910,y1:23,y2:-27,id:9,obj:null},
];}else if(type=="selected_popup2"){
table=[
{x1:690,x2:910,y1:403,y2:353,id:0,obj:null},
{x1:690,x2:910,y1:353,y2:303,id:1,obj:null},
];}else if(type=="selected_popup3"){
table=[
{x1:690,x2:910,y1:333,y2:283,id:0,obj:null},
{x1:690,x2:910,y1:283,y2:233,id:1,obj:null},
];}else{
}

return table;};
pointer_table=null;
set_pointer_obj=function(list,start_pos){
var num=list.length;
var end_pos=start_pos+num;
var j=0;
for(var i=start_pos;i<end_pos;i++){
pointer_table[i].obj=list[j];
if(j<num-1){
j++;}else{
break;}
}
};
set_base_pointer_obj=function(){
var bar_obj=brw_disp.brw.get_scrollbar_obj();
var list=[brw_disp.brw.get_brw_obj(),
bar_obj.bar_w_btn_left,
bar_obj.bar_w_btn_right,
bar_obj.bar_h_btn_top,
bar_obj.bar_h_btn_btm,
bar_obj.bar_w_base,
bar_obj.bar_h_base];
var display_mode=check_display_mode();
if((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE)){
var tmp_list=side_window.get_obj();
list=tmp_list.concat(list);}
pointer_table=get_pointer_table("browser");
set_pointer_obj(function_bar.ary_item,0);
if(DEF_TOOLTIP){
set_pointer_obj(list,function_bar.ary_item.length);}else{
set_pointer_obj(list,function_bar.ary_item.length-1);}
};
pointer_id=null;
SearchObj=function(x,y){
var id=null;
var max=pointer_table.length;
for(var i=0;i<max;i++){
if(((x>=pointer_table[i].x1)&&(x<=pointer_table[i].x2))&&
((y>=pointer_table[i].y2)&&(y<=pointer_table[i].y1))){
id=pointer_table[i].id;
break;}
}
return id;};
common_key={};
common_key.set_cursor=function(o_obj,cobj){
this.old=o_obj.cursor;
if(this.old==cobj)
{
return;}
if(this.old)
{
if(this.old.leave_focus)
{
this.old.leave_focus(this.old);}
if(this.old){
this.old.in_cursor=false;
this.old.toggle_cursor=false;}
}
if(cobj)
{
if(cobj.enter_focus)
{
cobj.enter_focus(cobj);}else{
}
cobj.in_cursor=true;
}
o_obj.cursor=cobj;
this.obj=cobj;
}
MoveTo=function(param){
delete_timer(this);
if(param.func)param.func(this);
this.tmp={};
this.pos_end={};
this.tmp.rate=0.6;
this.tmp.max_count=param.count?param.count:9;
if(param.rate){
this.tmp.rate=param.rate;}
if(param.count)this.tmp.max_count=param.count;
this.pos_end.x=param.x;
this.pos_end.y=param.y;
this.pos_end.z=param.z;
this.tmp.dx=param.x-this.translate[0];
this.tmp.dy=param.y-this.translate[1];
this.tmp.dz=param.z-this.translate[2];
this.translate[0]+=this.tmp.dx*this.tmp.rate;
this.translate[1]+=this.tmp.dy*this.tmp.rate;
this.translate[2]+=this.tmp.dz*this.tmp.rate;

force_redraw();
append_timer(this,50,function (obj,count){
obj.tmp.dx=param.x-obj.translate[0];
obj.tmp.dy=param.y-obj.translate[1];
obj.tmp.dz=param.z-obj.translate[2];
obj.translate[0]+=Math.floor(obj.tmp.dx*obj.tmp.rate);
obj.translate[1]+=Math.floor(obj.tmp.dy*obj.tmp.rate);
obj.translate[2]+=Math.floor(obj.tmp.dz*obj.tmp.rate);


if(count>=obj.tmp.max_count){
delete_timer(obj);

obj.translate[0]=param.x;
obj.translate[1]=param.y;
obj.translate[2]=param.z;


if(typeof param.end_func=="function"){
param.end_func(obj);}
}
force_redraw();});}
SIDE_WINDOW_WIDTH=600;
SIDE_WINDOW_HEIGHT=SCREEN_HEIGHT;
BOOKMARK_GUIDE_POS_X=0;
BOOKMARK_GUIDE_POS_Y=-510;
BOOKMARK_GUIDE_TEXT_W=1800;
BOOKMARK_GUIDE_ICON_POS_Y=28;
BOOKMARK_GUIDE_ICON_SIZE=50;
BOOKMARK_GUIDE_FONT_SIZE=28;
if(PLATINUM_LANGUAGE!="ja-JP"){
BOOKMARK_GUIDE_POS_X=-40;
BOOKMARK_GUIDE_POS_Y=-517;
BOOKMARK_GUIDE_ICON_POS_Y=30;
BOOKMARK_GUIDE_ICON_SIZE=45;
BOOKMARK_GUIDE_FONT_SIZE=24;}
BOOKMARK_ITEM_TR_Z=-2200;
BOOKMARK_ITEM_W=640;
BOOKMARK_ITEM_H=360;
BOOK_MARK_DISP_TR_Z=1400;
BOOK_MARK_R_GAP=17.5;
BOOK_MARK_Y_GAP=380;
if(DEF_MULTI_USER)
BOOK_MARK_MAX=60;
else
BOOK_MARK_MAX=27;
BOOK_MARK_ROTATION_T=300;
BOOKMARK_DISP_MAX=(DEF_SIDE_TV)?4:6;
require("pkg_bookmark");
require("pkg_toolbars");
textarea_box=new container({translate:[0,0,0],visible_p:false});
textarea_box.create=function(param){
console_log("[textarea_box][create]");
if(this.components.length!=0)return;
require("textarea");
this.translate=param.translate;
this.width=param.width;
this.height=param.height;
var font_size=param.font_size;
if(param.mode=="search"){
var text=W_TEXT.W_SEARCH;
var text_pos=[-this.width/2+300,7,0];
var textarea_y=-55;}else{
var text="URL";
var text_pos=[-this.width/2+250,-18,0];
var textarea_y=-65;}
this.img_bg_panel=new gimage({translate:[0,-280,0],width:1920,height:680,
src:PALTINUM_PATH_IMG+"skb_bp.png",draw_type:DIRECT});
this.img_icon=new gimage({translate:[-this.width/2+20,7,0],width:35,height:35,
src:PALTINUM_PATH_IMG+"skb_search_icon.png",draw_type:DIRECT});
this.text=new gtext({translate:text_pos,width:500,font_size:36,text:text,color:[0,0,0,255]});
this.img_bg_l=new gimage({translate:[-this.width/2,textarea_y,0],
width:14,height:this.height,src:PALTINUM_PATH_IMG+"skb_textarea_box_l.png",draw_type:DIRECT});
this.img_bg_m=new gimage({translate:[0,textarea_y,0],
width:this.width-14,height:this.height,src:PALTINUM_PATH_IMG+"skb_textarea_box_m.png",draw_type:DIRECT});
this.img_bg_r=new gimage({translate:[this.width/2,textarea_y,0],
width:14,height:this.height,src:PALTINUM_PATH_IMG+"skb_textarea_box_r.png",draw_type:DIRECT});
this.textarea=new textarea.create({width:this.width-14,height:this.height,
font_size:font_size,singleline:true,char_length_limit:500,omitter:"...",unconf_margin:12});
this.textarea.translate[1]=textarea_y;

this.components.push(this.img_bg_panel,this.text,this.img_bg_l,this.img_bg_m,this.img_bg_r,this.textarea);
if(param.mode=="search"){
this.components.push(this.img_icon);}
this.moveTo=MoveTo;};
textarea_box.appear=function(text){
console_log("[textarea_box][appear]");
var self=this;
textarea_box.visible_p=true;
this.moveTo({x:0,y:80,z:0.1,end_func:function(){
self.textarea.set_text(text);}});};
textarea_box.disappear=function(){
console_log("[textarea_box][disappear]");
this.moveTo({x:0,y:-620,z:0.1,end_func:null});
textarea_box.visible_p=false;
this.textarea.set_visible(false);
this.free();};
textarea_box.getText=function(){
console_log("[textarea_box][getText]");
return this.textarea.get_text();};
textarea_box.free=function(){
console_log("[textarea_box][free]");
if(this.components.length==0)return;
this.textarea.set_text("");
this.textarea.free();
discard_package("textarea");
for(var i=0,max=this.components.length;i<max;i++){
if(this.components[i] instanceof gtext||this.components[i] instanceof gtextbox){
setf_text(this.components[i],"");}else if(this.components[i] instanceof gimage){
this.components[i].src="";}
}
this.components.splice(0,this.components.length);};
var direct_input_area={};
direct_input_area.do_confirm_composition=function(text){
console_log("[direct_input_area][do_confirm_composition]");
brw_disp.brw.do_confirm_composition(text);};
direct_input_area.do_set_composition=function(convert_info){
console_log("[direct_input_area][do_set_composition]");
brw_disp.brw.do_set_composition(convert_info);};
direct_input_area.do_cancel_composition=function(){
console_log("[direct_input_area][do_cancel_composition]");
brw_disp.brw.do_cancel_composition();};
direct_input_area.do_move_caret=function(key){
console_log("[direct_input_area][do_move_caret]");
brw_disp.brw.do_move_caret(key);};
direct_input_area.do_enter_backspace=function(){
console_log("[direct_input_area][do_enter_backspace]");
brw_disp.brw.do_enter_backspace();};
direct_input_area.do_enter_linefeed=function(){
console_log("[direct_input_area][do_enter_linefeed]");
brw_disp.brw.do_enter_linefeed();};
direct_input_area.do_enter_allclear=function(){
console_log("[direct_input_area][do_enter_delall]");
brw_disp.brw.do_enter_delall();};
direct_input_area.is_singleline=function(){
console_log("[direct_input_area][is_singleline]");
return brw_disp.brw.is_singleline();};
sft_kbd=new container({visible_p:false});
sft_kbd.create=function(skin_path){
require("kbd");
kbd.set_kbd_skin_path(skin_path);
kbd.set_skin_info({color:"WHITE",size:"MEDIUM"});
this.kbd_item=kbd.create();
this.components.push(this.kbd_item);
this.kbd_item.set_trg_textarea(this.textarea_trg);
this.kbd_item.set_height_change_callback(this.change_kb_height);
this.kbd_item.set_show_asr_menu_callback(this.show_asr_menu);
this.kbd_item.set_done_callback(sft_kbd.done_enter_action,"UP");
this.kbd_item.set_cancel_callback(sft_kbd.cancel_enter_action);
if(InputDevManager.get_pointer_status()){
this.kbd_item.disable_change_input_method();
if(this.kbd_item.set_keyboard_type)this.kbd_item.set_keyboard_type("software");}

if(ebus&&ebus.kbd&&ebus.kbd.supported){
add_event_hook(ebus.kbd,sft_kbd.usb_key_hook);}
this.height=0;
this.change_kb_height(this.kbd_item.get_height());
this.pos_y=-540+this.height/2;
this.focus_out_mode=false;
this.moveTo=MoveTo;

};
sft_kbd.set_passwd_mode=function(){
console_log("[START][sft_kbd][set_passwd_mode]");
this.kbd_item.set_mode("PASSWD");
};
sft_kbd.set_input_char=function(val){
console_log("[START][sft_kbd][set_input_char]");
this.kbd_item.change_input_char_set({type:val});
};
sft_kbd.appear=function(param){
var self=this;
console_log("[START][sft_kbd.appear]");
sft_kbd.textarea_trg=param.textarea;
sft_kbd.done_action_cb=null;
sft_kbd.cancel_action_cb=null;
if(param.done_cb)sft_kbd.done_action_cb=param.done_cb;
if(param.cancel_cb)sft_kbd.cancel_action_cb=param.cancel_cb;
sft_kbd.create(param.skin_path);
this.translate[1]=-540-this.height/2;
this.moveTo({x:0,y:-540+this.height/2,z:0.1,end_func:function(){
self.set_kb_starting_point();
common_key.set_cursor(platinum_main,sft_kbd);
}});
this.kbd_item.setText(param.text);
this.visible_p=true;
this.hide_anim=false;
common_key.set_cursor(platinum_main,this);
this.lock_move_mode=false;
this.set_move_mode("free");
InputDevManager.set_move_mode("hybrid");
console_log("[END][sft_kbd.appear]");};
sft_kbd.set_kb_starting_point=function(){
var st_p=this.translate.slice();
st_p[1]+=this.height/2;
st_p[2]=0;
this.kbd_item.set_starting_point(st_p);};
sft_kbd.set_move_mode=function(mode){
if(!this.lock_move_mode)
this.kbd_item.set_move_mode(mode);};
sft_kbd.disappear=function(){
var self=this;
self.hide_anim=true;
del_event_hook(ebus.kbd);

brw_disp.brw.move_down_position();
this.moveTo({x:0,y:-540-this.height/2,z:0.1,end_func:function(){
self.visible_p=false;
self.free();
self.focus_out_mode=false;}});};
sft_kbd.free=function(){
if(this.components.length==0){
return;}
this.lock_move_mode=false;
for(var i=0;i<this.components.length;i++){
if(this.components[i] instanceof gtext||this.components[i] instanceof gtextbox){
setf_text(this.components[i],"");}else if(this.components[i] instanceof gimage){
this.components[i].src="";}else if(this.components[i] instanceof container){
for(var j=0,max=this.components[i].components.length;j<max;j++){
if(this.components[i].components[j] instanceof gimage){
this.components[i].components[j].src="";}
}
}
if(this.components[i].free)this.components[i].free();}
this.components.splice(0,this.components.length);};
sft_kbd.enter_focus=function(){
console_log("[START][sft_kbd.enter_focus]");
common_key.set_cursor(this,this.kbd_item);};
sft_kbd.leave_focus=function(){
console_log("[START][sft_kbd.leave_focus]");
common_key.set_cursor(this,null);};
sft_kbd.done_enter_action=function(){
if(sft_kbd.done_action_cb){
sft_kbd.done_action_cb(sft_kbd.kbd_item.getText());
return;}
};
sft_kbd.cancel_enter_action=function(){
console_log("[sft_kbd.cancel_enter_action]");
if(sft_kbd.cancel_action_cb){
sft_kbd.cancel_action_cb();
return;}
};
sft_kbd.change_kb_height=function(height){
console_log("[sft_kbd.change_kb_height]"+height);
var self=sft_kbd;
if((!textarea_box.visible_p)&&(!popup_disp_mgr.is_disp())){
if((!self.height)||((height-self.height)!=0)){
self.height=height;
var param=brw_disp.brw.get_cursor_info();
distance=brw_disp.skb_calc_move_distance(param);
brw_disp.brw.move_up_position(distance);}
}
self.height=height;
self.translate=[0,-540+self.height/2,0.1];
self.kbd_item.set_translate([0,height/2,0]);
self.pos_y=self.translate[1];
self.set_kb_starting_point();
console_log("[sft_kbd.change_kb_height]"+sft_kbd.translate);};
sft_kbd.show_asr_menu=function(bool){
var self=sft_kbd;
if(bool){self._old_move_mode=InputDevManager.get_move_mode();
self._old_kbd_move_mode=self.kbd_item.get_move_mode();
InputDevManager.set_move_mode("key");
self.set_move_mode("key");
self.lock_move_mode=true;}else {self.lock_move_mode=false;
InputDevManager.set_move_mode(self._old_move_mode);
if(self._old_move_mode=="free"||self._old_move_mode=="hybrid"){
InputDevManager.pointer_disappear();};
self.set_move_mode(self._old_kbd_move_mode);}
};
sft_kbd.key_hook=function(up_down,key){
var ret=false;
if((this.cursor==this.kbd_item)&&(!this.focus_out_mode)){
if((key==TXK_UP)||(key==TXK_DOWN)||(key==TXK_LEFT)||(key==TXK_RIGHT)){
this.set_move_mode("key");}
ret=this.kbd_item.keyhook(up_down,key);}

if(up_down!=KEY_PRESS)return false;
console_log("[ROOT][sft_kbd.key_hook]ret:"+ret);
if(!ret){
return false;}
return true;};
sft_kbd.usb_key_hook=function(){
if(InputDevManager.get_pointer_status()){
InputDevManager.pointer_disappear();}
sft_kbd.set_move_mode("key");
return sft_kbd.kbd_item.usb_key_hook(
arguments[0],arguments[1],arguments[2],arguments[3],
arguments[4],arguments[5],arguments[6]
);};
sft_kbd.asr_hook=function(arg){
if(this.kbd_item.asr_hook&&typeof this.kbd_item.asr_hook=="function"){
this.kbd_item.asr_hook(arg);}
};
TV_HEIGHT=(SHOW_TVINFO==true)?324-27:324;
var TV_WIDTH=Math.floor(TV_HEIGHT*16/9);
tv_area=function(param){
this.translate=param.translate;
this.components=[
this.tv_obj=new videobox({width:TV_WIDTH,height:TV_HEIGHT,
color:[255,255,255,0],overscan:true,source:0,}),
];
if(!this.bplayer)this.bplayer=new BroadcastPlayer();};
tv_area.prototype=new container({});
tv_area.prototype.connect_bplayer=function(){
console_log("[tv_area.connect_bplayer]");
try{
this.bplayer.connect(VideoDev,AudioDev);
set_screen_mode(PIP_EXVIDEO_MODE);}catch(e){};
this.tv_obj.translate[2]=0;};
tv_area.prototype.disconnect_bplayer=function(){
console_log("[tv_area.disconnect_bplayer]");
try{
set_screen_mode(OSD_ONLY_MODE);
this.bplayer.disconnect();}catch(e){};
this.tv_obj.translate[2]=-9999;};
tv_area.prototype.set_size=function(width,height){
console_log("[tv_area.set_size]");
this.tv_obj.width=width?width:TV_WIDTH;
this.tv_obj.height=height?height:TV_HEIGHT;};
tv_info=function(param){
this.translate=param.translate;
this.components=[
this.label=new gbox({width:TV_WIDTH,height:27,color:[0,0,0,160],}),
this.title=new gtext({width:TV_WIDTH-12,font_size:26,align:CENTER,omitter:"...",
color:[255,255,255,255],translate:[0,1,0],}),
];};
tv_info.prototype=new container({});
tv_info.prototype.update=function (title){
try{
load("/tmp/home_banner.js");
var text_info=null;
this.home_banner_info=home_banner_info;

var banner_id=this.home_banner_info[0];
if(banner_id==-1){
text_info=home_banner_info[1]?home_banner_info[1]:" ";}else {
switch(banner_id){
case 0:
text_info="地上D ";
break;
case 1:
text_info="BS ";
break;
case 2:
text_info="CS1 ";
break;
case 3:
text_info="CS2 ";
break;
default:
break;}
var info1=this.home_banner_info[1]?this.home_banner_info[1]:"";
var info2=this.home_banner_info[2]?this.home_banner_info[2]:"";
var info3=this.home_banner_info[3]?this.home_banner_info[3]:"";
text_info=text_info+info1+"  "+info2+"     "+info3;}

if(text_info||text_info==" ")setf_text(this.title,text_info);}catch(e){
console.log("# Error = "+e.message);}
};
tv_info.prototype.default_tvplayer_event_hook=function(stg,obj,event){
if(event!=obj.UPDATE)return false;
if(BROWSER_READY==true){
try{
side_window.tv_info.update();}catch(e){
}
};
return true;};
tv_info.prototype.free=function(){
setf_text(this.title,"");};
var prompt=new container({translate:[0,0,0],visible_p:false,});
prompt.create=function(param){
console_log("[START][prompt][create]");
if(this.components.length!=0)return;
require("textarea");
var self=this;
this.translate=param.translate;
var height=400;
var width=850;
this.focus_obj=param.focus_obj;
this.exit_cb=param.exit_cb;
this.img_bg_l=new gimage({width:50,height:height,
translate:[-width/2+25,0,0],
src:PALTINUM_PATH_IMG+"popup_bk_l.png",draw_type:DIRECT,});
this.img_bg_r=new gimage({width:50,height:height,
translate:[width/2-25,0,0],
src:PALTINUM_PATH_IMG+"popup_bk_r.png",draw_type:DIRECT,});
this.img_bg_m=new gimage({width:width-100,height:height,
src:PALTINUM_PATH_IMG+"popup_bk_m.png",
draw_type:DIRECT,});
this.message=new gtextbox({translate:[0,95,0],
width:600,height:150,valign:MIDDLE,font_size:40,
text:param.message});
this.text_val=new pkg_common.text_item({mode:0,
translate:[0,-30,0],width:600,height:50,text:param.data,
obj:this,focus_obj:param.focus_obj,});
this.textarea_val=textarea.create({
width:this.text_val.text.width,height:this.text_val.text.height,
font_size:this.text_val.text.font_size,singleline:true,
char_length_limit:500,omitter:"...",unconf_pos:"under",unconf_margin:25});
this.textarea_val.translate=[this.text_val.translate[0],this.text_val.translate[1]+3,0.2];
this.textarea_val.set_text(prompt.text_val.get_text());
this.textarea_val.set_visible(false);
this.textarea_val.set_unconf_bg_param({height:50,color:[32,213,255,192]});
this.text_val.action=function(obj){
prompt.enter_text();};
this.text_val.mouseover=function(obj){
if(sft_kbd.visible_p)return;
common_key.set_cursor(self,self.text_val);};
this.text_val.mouseout=function(obj){
};
this.btn_ok=new pkg_common.button_item({
translate:[-150,-height/2+70,0],
font_size:40,text:W_TEXT.W_OK,obj:this,focus_obj:param.focus_obj,
visible_p:true,});
this.btn_ok.action=function(obj){
if(sft_kbd.visible_p)return;
prompt.enter_ok_btm();};
this.btn_ok.mouseover=function(obj){
if(sft_kbd.visible_p)return;
common_key.set_cursor(self,self.btn_ok);};
this.btn_ok.mouseout=function(obj){
};
this.btn_cancel=new pkg_common.button_item({
translate:[150,-height/2+70,0],
font_size:40,text:W_TEXT.W_CANCEL,obj:this,focus_obj:param.focus_obj,
visible_p:true,});
this.btn_cancel.action=function(obj){
if(sft_kbd.visible_p)return;
prompt.enter_cancel_btm();};
this.btn_cancel.mouseover=function(obj){
if(sft_kbd.visible_p)return;
common_key.set_cursor(self,self.btn_cancel);};
this.btn_cancel.mouseout=function(obj){
};
this.components.push(this.img_bg_l,this.img_bg_r,this.img_bg_m,
this.message,
this.text_val,
this.btn_ok,this.btn_cancel,
this.textarea_val);
this.fg_done=false;
console_log("[END][prompt][create]");}
prompt.appear=function(param){
pointer_table=get_pointer_table("prompt");
this.create(param);
this.focus_obj.set_mode(2);
this.visible_p=true;
this.next_focus=this.text_val;
this.ary_item=new Array();
this.ary_item.push(this.text_val,this.btn_ok,this.btn_cancel);
set_pointer_obj(this.ary_item,0);
common_key.set_cursor(platinum_main,prompt);
}
prompt.disappear=function(){
this.visible_p=false;
set_base_pointer_obj();
this.focus_obj.disappear();
force_redraw();
this.exit_cb();
this.free();
}
prompt.enter_focus=function(){
common_key.set_cursor(this,this.next_focus);
this.focus_obj.appear();}
prompt.leave_focus=function(){
this.next_focus=this.cursor;}
prompt.free=function(){
console_log("[START][prompt][free]");
if(this.components.length==0)return;
this.textarea_val.set_text("");
discard_package("textarea");
for(var i=0,max=this.components.length;i<max;i++){
if(this.components[i] instanceof gtext||
this.components[i] instanceof gtextbox){
setf_text(this.components[i],"");}else if(this.components[i] instanceof gimage){
this.components[i].src="";}
if(this.components[i].free)this.components[i].free();}
this.components.splice(0,this.components.length);
console_log("[END][prompt][free]");}
prompt.set_text=function(text){
console_log("[START][prompt][set_text] text = "+text);
var self=prompt;
self.text_val.set_text(self.textarea_val.get_text());
self.text_val.text.visible_p=true;
self.textarea_val.set_text("");
self.textarea_val.set_visible(false);

}
prompt.sft_key_done_cb=function(text){
console_log("[START][prompt][sft_key_done_cb] text = "+text);
prompt.set_text(text);
common_key.set_cursor(platinum_main,prompt);
sft_kbd.disappear();
prompt.focus_obj.appear();
}
prompt.sft_key_cancel_cb=function(){
prompt.text_val.text.visible_p=true;
prompt.textarea_val.set_text("");
prompt.textarea_val.set_visible(false);
common_key.set_cursor(platinum_main,prompt);
sft_kbd.disappear();
prompt.focus_obj.appear();
}
prompt.enter_text=function(){
if(sft_kbd.visible_p)return;
sft_kbd.appear({text:"",
skin_path:kbd_default_skin_path,
textarea:this.textarea_val,
done_cb:prompt.sft_key_done_cb,cancel_cb:prompt.sft_key_cancel_cb});
prompt.text_val.text.visible_p=false;
prompt.textarea_val.set_text(prompt.text_val.get_text());
prompt.textarea_val.set_visible(true);
}
prompt.enter_ok_btm=function(){
console_log("[START][prompt][enter_ok_btm]value "+prompt.text_val.get_text());
var self=prompt;
brw_disp.prompt_req({
value:self.text_val.get_text(),
res:true});
self.disappear();
}
prompt.enter_cancel_btm=function(){
var self=prompt;
brw_disp.prompt_req({
value:"",
res:false});
prompt.disappear();
}
prompt.key_hook=function(up_down,key){
if(up_down==KEY_DOWN)this.fg_done=true;
if((up_down!=KEY_UP)||(!this.fg_done))return true;
this.fg_done=false;
if(key==TXK_RETURN){
prompt.enter_cancel_btm();}
switch(this.cursor){
case this.text_val:
console_log("[ROOT][prompt][key_hook] val_text");
switch(key){
case TXK_DOWN:
console_log("[ROOT][prompt][key_hook] TXK_DOWN");
common_key.set_cursor(this,this.btn_ok);
break;
case TXK_ENTER:
console_log("[ROOT][prompt][key_hook] TXK_ENTER");
prompt.enter_text();
break;}
break;
case this.btn_ok:
console_log("[ROOT][prompt][key_hook] ok_btm");
switch(key){
case TXK_UP:
console_log("[ROOT][prompt][key_hook] TXK_UP");
common_key.set_cursor(this,this.text_val);
break;
case TXK_RIGHT:
console_log("[ROOT][prompt][key_hook] TXK_RIGHT");
common_key.set_cursor(this,this.btn_cancel);
break;
case TXK_ENTER:
console_log("[ROOT][prompt][key_hook] TXK_ENTER");
prompt.enter_ok_btm();
break;}
break;
case this.btn_cancel:
console_log("[ROOT][prompt][key_hook] cancel_btm");
switch(key){
case TXK_UP:
console_log("[ROOT][prompt][key_hook] TXK_UP");
common_key.set_cursor(this,this.text_val);
break;
case TXK_LEFT:
console_log("[ROOT][prompt][key_hook] TXK_LEFT");
common_key.set_cursor(this,this.btn_ok);
break;
case TXK_ENTER:
console_log("[ROOT][prompt][key_hook] TXK_ENTER");
prompt.enter_cancel_btm();
break;}
break;}
return true;
}
var digest_auth=new container({translate:[0,0,0],visible_p:false,});
digest_auth.create=function(param){
if(this.components.length!=0)return;
require("textarea");
var self=this;
this.translate=param.translate;
var height=500;
var width=1500;
var end_pos=param.server_name.indexOf("/",8);
this.server_name=param.server_name.substring(0,end_pos+1);
this.focus_obj=param.focus_obj;
this.exit_cb=param.exit_cb;
this.img_bg_l=new gimage({});
this.img_bg_r=new gimage({});
this.img_bg_m=new gbox({width:width,height:height,color:system.fdp_color.POP_A});
this.img_key=new gimage({translate:[-width/2+80,height/2-75,0],
width:60,height:60,src:PALTINUM_PATH_IMG+"key_active.png",draw_type:DIRECT});
this.message=new gtextbox({translate:[50,height/2-130,0],
width:1300,height:130,color:[255,255,255,255],align:LEFT,
text:W_TEXT.W_AUTH_MESSAGE_1_1+this.server_name+W_TEXT.W_AUTH_MESSAGE_1_2
+"\n"+W_TEXT.W_AUTH_MESSAGE_2+param.message,});
this.text_user_title=new gtext({translate:[-width/2+150+350/2,0,0],
width:250,text:W_TEXT.W_USER_NAME,color:[255,255,255,255],align:RIGHT,});
this.text_user=new pkg_common.text_item({
translate:[width/2-150-900/2,0,0],width:800,height:50,
obj:this,focus_obj:param.focus_obj,});
this.text_user.action=function(obj){
self.enter_user_text();};
this.text_user.mouseover=function(){
if(sft_kbd.visible_p)return;
common_key.set_cursor(self,self.text_user);};
this.text_user.mouseout=function(){
};
this.textarea_user=textarea.create({
width:this.text_user.text.width,height:this.text_user.text.height,
font_size:this.text_user.text.font_size,singleline:true,
char_length_limit:500,omitter:"...",unconf_pos:"over",unconf_margin:20});
this.textarea_user.translate=[this.text_user.translate[0],this.text_user.translate[1]+3,0.1];
this.textarea_user.set_text(digest_auth.text_user.get_text());
this.textarea_user.set_visible(false);
this.textarea_user.set_unconf_bg_param({height:50,color:[32,213,255,192]});
this.text_passwd_title=new gtext({translate:[-width/2+150+350/2,-height/2+160,0],
width:250,text:W_TEXT.W_PASSWORD,color:[255,255,255,255],align:RIGHT,});
this.text_passwd=new pkg_common.text_item({mode:1,
translate:[width/2-150-900/2,-height/2+160,0],width:800,height:50,
obj:this,focus_obj:param.focus_obj,});
this.text_passwd.action=function(obj){
self.enter_password_text();};
this.text_passwd.mouseover=function(){
if(sft_kbd.visible_p)return;
common_key.set_cursor(self,self.text_passwd);};
this.text_passwd.mouseout=function(){
};
this.textarea_passwd=textarea.create({width:this.text_passwd.text.width,height:this.text_passwd.text.height,
font_size:this.text_passwd.text.font_size,singleline:true,char_length_limit:500,omitter:"...",passwd_mode:true});
this.textarea_passwd.translate=[this.text_passwd.translate[0],this.text_passwd.translate[1]+3,0.1];
this.textarea_passwd.set_text(digest_auth.text_passwd.get_text());
this.textarea_passwd.set_visible(false);
this.textarea_passwd.set_unconf_bg_param({force_visible:false});
this.btn_ok=new pkg_common.button_item({
translate:[-150,-height/2+70,0],
font_size:40,text:W_TEXT.W_OK,obj:this,focus_obj:param.focus_obj,
visible_p:true,});
this.btn_ok.action=function(obj){
self.enter_ok_btm();};
this.btn_ok.mouseover=function(){
if(sft_kbd.visible_p)return;
common_key.set_cursor(self,self.btn_ok);};
this.btn_ok.mouseout=function(){
};
this.btn_cancel=new pkg_common.button_item({
translate:[150,-height/2+70,0],
font_size:40,text:W_TEXT.W_CANCEL,obj:this,focus_obj:param.focus_obj,
visible_p:true,});
this.btn_cancel.action=function(obj){
self.enter_cancel_btm();};
this.btn_cancel.mouseover=function(){
if(sft_kbd.visible_p)return;
common_key.set_cursor(self,self.btn_cancel);};
this.btn_cancel.mouseout=function(){
};
CHANGE_FONT_SIZE_B(this.message);
CHANGE_FONT_SIZE(this.text_user_title);
CHANGE_FONT_SIZE(this.text_passwd_title);
this.components.push(this.img_bg_l,this.img_bg_r,this.img_bg_m,
this.img_key,
this.message,
this.text_user_title,this.text_user,
this.textarea_user,
this.text_passwd_title,this.text_passwd,
this.textarea_passwd,
this.btn_ok,this.btn_cancel);
this.mode_text=0;
this.fg_done=false;
}
digest_auth.appear=function(param){
console_log("[START][digest_auth][appear]");
pointer_table=get_pointer_table("digest_auth");
this.create(param);
this.focus_obj.set_mode(2);
this.visible_p=true;
this.next_focus=this.text_user;
this.ary_item=new Array();
this.ary_item.push(this.text_user,this.text_passwd,this.btn_ok,this.btn_cancel);
set_pointer_obj(this.ary_item,0);
common_key.set_cursor(platinum_main,digest_auth);
}
digest_auth.disappear=function(){
this.visible_p=false;
set_base_pointer_obj();
this.focus_obj.disappear();
force_redraw();
this.exit_cb();
this.free();
}
digest_auth.enter_focus=function(){
common_key.set_cursor(this,this.next_focus);
this.focus_obj.appear();
}
digest_auth.leave_focus=function(){
this.next_focus=this.cursor;
}
digest_auth.free=function(){
if(this.components.length==0)return;
this.textarea_user.set_text("");
this.textarea_passwd.set_text("");
discard_package("pkg_textarea");
for(var i=0,max=this.components.length;i<max;i++){
if(this.components[i] instanceof gtext||
this.components[i] instanceof gtextbox){
setf_text(this.components[i],"");}else if(this.components[i] instanceof gimage){
this.components[i].src="";}
if(this.components[i].free)this.components[i].free();}
this.components.splice(0,this.components.length);
}
digest_auth.set_text=function(text){
var self=digest_auth;
if(self.mode_text==1){
console_log("[ROOT][digest_auth][set_text] 1");
self.text_user.set_text(self.textarea_user.get_text());
self.text_user.text.visible_p=true;
self.textarea_user.set_text("");
self.textarea_user.set_visible(false);}else{
console_log("[ROOT][digest_auth][set_text] 2");
self.text_passwd.set_text(self.textarea_passwd.get_text());
self.text_passwd.text.visible_p=true;
self.textarea_passwd.set_text("");
self.textarea_passwd.set_visible(false);}

}
digest_auth.sft_key_done_cb=function(text){
digest_auth.set_text(text);
common_key.set_cursor(platinum_main,digest_auth);
sft_kbd.disappear();
digest_auth.focus_obj.appear();
}
digest_auth.sft_key_cancel_cb=function(){
if(digest_auth.mode_text==1){
digest_auth.text_user.text.visible_p=true;
digest_auth.textarea_user.set_text("");
digest_auth.textarea_user.set_visible(false);}else{
digest_auth.text_passwd.text.visible_p=true;
digest_auth.textarea_passwd.set_text("");
digest_auth.textarea_passwd.set_visible(false);}
common_key.set_cursor(platinum_main,digest_auth);
sft_kbd.disappear();
digest_auth.focus_obj.appear();
}
digest_auth.enter_user_text=function(){
if(sft_kbd.visible_p)return;
digest_auth.mode_text=1;
sft_kbd.appear({text:"",
skin_path:kbd_default_skin_path,
textarea:this.textarea_user,
done_cb:digest_auth.sft_key_done_cb,
cancel_cb:digest_auth.sft_key_cancel_cb});
digest_auth.text_user.text.visible_p=false;
digest_auth.textarea_user.set_text(digest_auth.text_user.get_text());
digest_auth.textarea_user.set_visible(true);
}
digest_auth.enter_password_text=function(){
if(sft_kbd.visible_p)return;
digest_auth.mode_text=2;
sft_kbd.appear({text:"",
skin_path:kbd_default_skin_path,
textarea:this.textarea_passwd,
done_cb:digest_auth.sft_key_done_cb,
cancel_cb:digest_auth.sft_key_cancel_cb});
sft_kbd.set_passwd_mode();
digest_auth.text_passwd.text.visible_p=false;
digest_auth.textarea_passwd.set_text(digest_auth.text_passwd.get_text());
digest_auth.textarea_passwd.set_visible(true);
}
digest_auth.enter_ok_btm=function(){
console_log("[START][digest_auth][enter_ok_btm]url "+digest_auth.server_name);
var self=digest_auth;
brw_disp.authentication_req({
url:self.server_name,
name:self.text_user.get_text(),
password:self.text_passwd.get_text(),
res:true});
self.disappear();
}
digest_auth.enter_cancel_btm=function(){
console_log("[START][digest_auth][enter_cancel_btm]");
var self=digest_auth;
brw_disp.authentication_req({
url:self.server_name,
name:"",
password:"",
res:false});
digest_auth.disappear();
}
digest_auth.key_hook=function(up_down,key){
console_log("[START][digest_auth][key_hook]"+up_down);
if(up_down==KEY_DOWN)this.fg_done=true;
if((up_down!=KEY_UP)||(!this.fg_done))return true;
this.fg_done=false;
if(key==TXK_RETURN){
digest_auth.enter_cancel_btm();}
switch(this.cursor){
case this.text_user:
console_log("[ROOT][digest_auth][key_hook] user_text");
switch(key){
case TXK_DOWN:
console_log("[ROOT][digest_auth][key_hook] TXK_DOWN");
common_key.set_cursor(this,this.text_passwd);
break;
case TXK_ENTER:
console_log("[ROOT][digest_auth][key_hook] TXK_ENTER");
digest_auth.enter_user_text();
break;}
break;
case this.text_passwd:
console_log("[ROOT][digest_auth][key_hook] password_text");
switch(key){
case TXK_UP:
console_log("[ROOT][digest_auth][key_hook] TXK_UP");
common_key.set_cursor(this,this.text_user);
break;
case TXK_DOWN:
console_log("[ROOT][digest_auth][key_hook] TXK_DOWN");
common_key.set_cursor(this,this.btn_ok);
break;
case TXK_ENTER:
console_log("[ROOT][digest_auth][key_hook] TXK_ENTER");
digest_auth.enter_password_text();
break;}
break;
case this.btn_ok:
console_log("[ROOT][digest_auth][key_hook] ok_btm");
switch(key){
case TXK_UP:
console_log("[ROOT][digest_auth][key_hook] TXK_UP");
common_key.set_cursor(this,this.text_passwd);
break;
case TXK_RIGHT:
console_log("[ROOT][digest_auth][key_hook] TXK_RIGHT");
common_key.set_cursor(this,this.btn_cancel);
break;
case TXK_ENTER:
console_log("[ROOT][digest_auth][key_hook] TXK_ENTER");
digest_auth.enter_ok_btm();
break;}
break;
case this.btn_cancel:
console_log("[ROOT][digest_auth][key_hook] cancel_btm");
switch(key){
case TXK_UP:
console_log("[ROOT][digest_auth][key_hook] TXK_UP");
common_key.set_cursor(this,this.text_passwd);
break;
case TXK_LEFT:
console_log("[ROOT][digest_auth][key_hook] TXK_LEFT");
common_key.set_cursor(this,this.btn_ok);
break;
case TXK_ENTER:
console_log("[ROOT][digest_auth][key_hook] TXK_ENTER");
digest_auth.enter_cancel_btm();
break;}
break;}
return true;
console_log("[END][digest_auth][key_hook]");}
const NULL_FUNCTION=function(){return null;};
var focus_color=COL_FCS;
Cursor=new container(
{
translate:[0,-FUNC_BAR_HEIGHT/2,BOOK_MARK_DISP_TR_Z],
rotation:[0,0,1,0],
visible_p:false,
});
Cursor.init=function(){
this.rate=0.6;
this.dx=0;
this.dy=0;
this.dz=0;
this.dw=0;
this.dh=0;
this.max_count=0;
this.width=0;
this.height=0;
this.x=0;
this.y=0;
this.z=0;
this.w=0;
this.h=0;
this.r=0;
this.focus_line_src=PALTINUM_PATH_IMG+"focus_line.png";
this.focus_angle_src=PALTINUM_PATH_IMG+"focus_angle.png";
this.l_r=[0,90,-180,-90];
this.a_r=[-90,0,90,180];
this.l_h=16;
this.a_w=16;
this.a_h=16;
this.components=[
this.actor=new actor(
{
base_col_width:0,cursor_width:0,cursor_col:[[48,181,243,255],[49,156,231,255]],rotation:[0,0,0,0],
translate:[0,0,BOOKMARK_ITEM_TR_Z],
bg_image:[
new gimage({width:1920,height:this.l_h,src:this.focus_line_src,draw_type:DIRECT,
rotation:[this.l_r[0],0,0,1],color:focus_color,onload:NULL_FUNCTION,onerror:NULL_FUNCTION}),
new gimage({width:1920,height:this.l_h,src:this.focus_line_src,draw_type:DIRECT,
rotation:[this.l_r[1],0,0,1],color:focus_color,onload:NULL_FUNCTION,}),
new gimage({width:1920,height:this.l_h,src:this.focus_line_src,draw_type:DIRECT,
rotation:[this.l_r[2],0,0,1],color:focus_color,onload:NULL_FUNCTION,}),
new gimage({width:1920,height:this.l_h,src:this.focus_line_src,draw_type:DIRECT,
rotation:[this.l_r[3],0,0,1],color:focus_color,onload:NULL_FUNCTION,}),
new gimage({width:this.a_w,height:this.a_h,src:this.focus_angle_src,draw_type:DIRECT,
rotation:[this.a_r[0],0,0,1],color:focus_color,onload:NULL_FUNCTION,onerror:NULL_FUNCTION}),
new gimage({width:this.a_w,height:this.a_h,src:this.focus_angle_src,draw_type:DIRECT,
rotation:[this.a_r[1],0,0,1],color:focus_color,onload:NULL_FUNCTION,}),
new gimage({width:this.a_w,height:this.a_h,src:this.focus_angle_src,draw_type:DIRECT,
rotation:[this.a_r[2],0,0,1],color:focus_color,onload:NULL_FUNCTION,}),
new gimage({width:this.a_w,height:this.a_h,src:this.focus_angle_src,draw_type:DIRECT,
rotation:[this.a_r[3],0,0,1],color:focus_color,onload:NULL_FUNCTION,}),
],
}),
];}
Cursor.init();
Cursor.appear=function(){
if(this.actor.bg_image[0].src==""){
this.actor.bg_image[0].src=this.focus_line_src;
this.actor.bg_image[1].src=this.focus_line_src;
this.actor.bg_image[2].src=this.focus_line_src;
this.actor.bg_image[3].src=this.focus_line_src;
this.actor.bg_image[4].src=this.focus_angle_src;
this.actor.bg_image[5].src=this.focus_angle_src;
this.actor.bg_image[6].src=this.focus_angle_src;
this.actor.bg_image[7].src=this.focus_angle_src;}
this.visible_p=true;
force_redraw();
}
Cursor.disappear=function(){
delete_timer(this);
this.visible_p=false;
force_redraw();
this.placeTo(this.x,this.y,this.z,this.w,this.h,this.r);
}
Cursor.set_mode=function(mode){
if(mode==1){
this.translate=[0,-FUNC_BAR_HEIGHT/2,BOOK_MARK_DISP_TR_Z];}else{
this.translate=[0,0,0];}
}
Cursor.free=function(){
delete_timer(this);
for(var i=0;i<this.actor.bg_image.length;i++){
this.actor.bg_image[i].src="";}
}
Cursor.placeTo=function(x,y,z,w,h,r){
delete_timer(this);
if(x!=null)this.actor.translate[0]=x;
if(y!=null)this.actor.translate[1]=y;
if(z!=null)this.actor.translate[2]=z;
if((w!=null)&&(h!=null)&&(r!=null))this.setSize(w,h,r);
this.x=x;
this.y=y;
this.z=z;
this.w=w;
this.h=h;
this.r=r;
}
Cursor.moveTo=function(param){
delete_timer(this);
this.rate=0.8;
if(param.max_count){
this.max_count=param.max_count;}else {
this.max_count=9;}
if(param.rate){
this.max_count*=this.rate/param.rate;
this.rate=param.rate;}
var angle=param.angle?param.angle:0;
this.x=param.x;
this.y=param.y;
this.z=param.z;
this.w=param.w;
this.h=param.h;
this.r=param.angle;
this.dx=param.x-this.actor.translate[0];
this.dy=param.y-this.actor.translate[1];
this.dz=param.z-this.actor.translate[2];
this.actor.translate[0]+=this.dx*this.rate;
this.actor.translate[1]+=this.dy*this.rate;
this.actor.translate[2]+=this.dz*this.rate;
this.dw=param.w-this.width;
this.dh=param.h-this.height;
this.da=angle-this.rotation[0];
this.setSize(
this.width+Math.floor(this.dw*this.rate),
this.height+Math.floor(this.dh*this.rate),
this.rotation[0]+this.da*this.rate
);
if(typeof param.start_func=="function"){
param.start_func();}

append_timer(this,50,function(obj,count){
obj.dx=param.x-obj.actor.translate[0];
obj.dy=param.y-obj.actor.translate[1];
obj.dz=param.z-obj.actor.translate[2];
obj.actor.translate[0]+=obj.dx*obj.rate;
obj.actor.translate[1]+=obj.dy*obj.rate;
obj.actor.translate[2]+=obj.dz*obj.rate;
obj.dw=param.w-obj.width;
obj.dh=param.h-obj.height;
obj.setSize(
obj.width+Math.floor(obj.dw*obj.rate),
obj.height+Math.floor(obj.dh*obj.rate)
);
obj.da=angle-obj.rotation[0];
obj.rotation[0]+=obj.da*obj.rate;
force_redraw();
if(count>=obj.max_count){
delete_timer(obj);
obj.actor.translate[0]=param.x;
obj.actor.translate[1]=param.y;
obj.actor.translate[2]=param.z;
obj.setSize(param.w,param.h,angle);
force_redraw();
if(typeof param.end_func=="function"){
param.end_func();}
}
});
}
Cursor.setSize=function(w,h,angle){
this.width=w;
this.height=h;
var w_margin=8;
var h_margin=8;
var t_margin=4;
this.actor.bg_image[0].width=w-w_margin;
this.actor.bg_image[2].width=w-w_margin;
this.actor.bg_image[1].width=h-h_margin;
this.actor.bg_image[3].width=h-h_margin;
this.actor.bg_image[0].translate[1]=h/2+t_margin;
this.actor.bg_image[2].translate[1]=-h/2-t_margin;
this.actor.bg_image[1].translate[0]=-w/2-t_margin;
this.actor.bg_image[3].translate[0]=w/2+t_margin;
this.actor.bg_image[0+4].translate[1]=h/2+4;
this.actor.bg_image[2+4].translate[1]=-h/2-4;
this.actor.bg_image[1+4].translate[0]=-w/2-4;
this.actor.bg_image[3+4].translate[0]=w/2+4;
this.actor.bg_image[0+4].translate[0]=w/2+4;
this.actor.bg_image[2+4].translate[0]=-w/2-4;
this.actor.bg_image[1+4].translate[1]=h/2+4;
this.actor.bg_image[3+4].translate[1]=-h/2-4;

if(typeof angle=="number"){
this.rotation[0]=angle;}
force_redraw();
}
brw_disp=new container({"visible_p":true,"translate":[0,SCREEN_HEIGHT,0],});
brw_disp.create=function(){
if(this.components.length>0)return;
this.components=[
this.brw=BROWSER.brw,
this.full=pkg_browser.full_screen_obj
];
this.fg_capture=false;
this.wait_capture=false;
this.fg_loading=false;
this.capture_url="";
this.fg_boot_animation=false;
this.capture_obj={};
this.fg_disp_first=true;
this.param=new Object();
this.param.stage=platinum_main;
this.param.keyboard=sft_kbd;
this.param.nagara_tv=NAGARA_LAUNCH;
this.param.use_tts=USE_TTS;
this.param.connect_cb=function (initial_url){
console_log("connect: browser ");
if(tou_panel.starting_disp)return;
if(initial_url){
brw_disp.appear(initial_url);}else{
brw_disp.direct_launch_load();}
};
this.param.load_started_cb=function (){
console_log("load_started: browser ");
if(brw_disp.fg_loading)brw_disp.wait_capture=false;
brw_disp.fg_loading=true;
brw_disp.fg_capture=false;
function_bar.clear_drag_mode();
function_bar.set_btn_state();
if(this.cursor)common_key.set_cursor(brw_disp,null);
append_timer({},5000,function(obj){
delete_timer(obj);
if(brw_disp.fg_boot_animation){
var bplayer=new BroadcastPlayer();
bplayer.stop_transit();
brw_disp.fg_boot_animation=false;}
});
if((platinum_main.cursor!=function_bar)
&&(!popup_disp_mgr.is_disp())
&&(!sft_kbd.visible_p)){
InputDevManager.set_move_mode("free");common_key.set_cursor(platinum_main,brw_disp);
function_bar.set_free_focus();}
else if(!sft_kbd.visible_p){
console_log("[load_started_cb]2");
InputDevManager.set_move_mode("free");
common_key.set_cursor(platinum_main,null);
common_key.set_cursor(platinum_main,function_bar);
function_bar.set_free_focus();}
if(socket_mgr.is_smapho_add_bookmark()){
if(bookmark.all_data.bookmarkpanel.length>=BOOK_MARK_MAX){
socket_mgr.send_event(SEND_ACK_REQ_BOOKMARK,null,false);
console.log("[smapho] max bookmarks error");}
else {
socket_mgr.send_event(SEND_ACK_REQ_BOOKMARK,null,true);}
}
};
this.param.loaded_cb=function (){
console_log("loaded: browser loaded_cb");
brw_disp.fg_loading=false;
brw_disp.fg_disp_first=false;
if(socket_mgr.is_smapho_req()){
socket_mgr.reset_smapho_req();console_log("[loaded_cb]socket ack");
if(socket_mgr.is_smapho_add_bookmark()){
socket_mgr.reset_smapho_add_bookmark();function_bar.add_bookmark_action();}
else {
socket_mgr.send_event(SEND_ACK_REQ_URL,null,true);}
}
if(PLATINUM_BOOT_OPTION){
if((PLATINUM_BOOT_OPTION.launch_from!=0)||(NAGARA_LAUNCH)){
PLATINUM_BOOT_OPTION=null;}
}
enable_keyhook=true;
brw_disp.brw.show();
function_bar.set_btn_state();
if(brw_disp.fg_boot_animation){
var bplayer=new BroadcastPlayer();
bplayer.stop_transit();
brw_disp.fg_boot_animation=false;}
if(brw_disp.wait_capture){
brw_disp.wait_capture=false;
brw_disp.fg_capture=true;
delete_timer(brw_disp.capture_obj);
append_timer(brw_disp.capture_obj,500,function(obj){
delete_timer(obj);
if(!brw_disp.fg_capture)return;
brw_disp.brw.stop_capture_req();
brw_disp.brw.get_pixmap();});}
console_log("loaded: browser end");};
this.param.page_info_cb=function(data){
console_log("page_info_cb: browser url:"+data.uri);
BRW_INFO.url=data.uri;
BRW_INFO.title=data.title;
BRW_INFO.favicon_uri=data.favicon_uri;
setf_text(function_bar.text_locate,data.uri);
URL_STR=data.uri;
function_bar.set_key(data.uri);};
this.param.change_cursor_cb=function(param){
if(param.state){
Cursor.set_mode(0);
Cursor.appear();
Cursor.placeTo(param.x,param.y,0,param.w,param.h,0);}else{
Cursor.disappear();
brw_disp.brw.tts_stop();}
};
this.param.move_textarea_cb=function(param){
var distance=brw_disp.skb_calc_move_distance(param);
brw_disp.brw.move_up_position(distance);};
this.param.move_up_position_cb=function(param){
under_mask.move_up(param);};
this.param.move_down_position_cb=function(param){
under_mask.move_down(param);};
this.param.change_status_cb=function(param){
function_bar.set_btn_state();};
this.param.scroll_start_cb=function(){
brw_disp.scroll_state=true;
function_bar.set_disable();};
this.param.scroll_end_cb=function(){
brw_disp.scroll_state=false;
if(point_base.edge_state){
append_timer(point_base,2500,function(obj,count){
delete_timer(obj);
point_base.appear();});}
function_bar.set_free_focus();};
this.param.get_pixmap_cb=function(data){
console_log("get_pixmap_cb: browser data");
if(!brw_disp.fg_capture)return;

if(data.result){
if(DEF_4K2K){
bookmark.set_bookmark({title:BRW_INFO.title,url:brw_disp.capture_url,thumbnail_path:data.img,thumb_big:data.img_big,thumb_4k:data.img_4k,result:data.result});}else{
bookmark.set_bookmark({title:BRW_INFO.title,url:brw_disp.capture_url,thumbnail_path:data.img,thumb_big:data.img_big,result:data.result});}
}else{
bookmark.set_bookmark({title:BRW_INFO.title,url:brw_disp.capture_url,result:data.result});}
brw_disp.capture_url="";
};
this.param.return_cb=function (){
console_log(">>>>>>>>>>>> browser is disappeared.");
brw_disp.brw.load_stop_req();
if((NAGARA_LAUNCH)||(DIRECT_LAUNCH)){
brw_disp.show_exit_popup();}
};
this.param.discard_cb=function (param){
};
this.param.disconnect_cb=function (param){
if((brw_disp.fg_disp_first)&&(!brw_disp.fg_loading)){
if(tou_panel.starting_disp)return;
brw_disp.direct_launch_load();}else{
BROWSER_READY=false;}
brw_disp.fg_loading=false;
if(socket_mgr.is_smapho_req()){
socket_mgr.reset_smapho_req();console_log("[disconnect_cb]socket ack");
if(socket_mgr.is_smapho_add_bookmark()){
socket_mgr.reset_smapho_add_bookmark();console.log("[smapho] disconnect platinum");}
else {
console.log("[smapho] disconnect platinum");
socket_mgr.send_event(SEND_ACK_REQ_URL,null,false);}
}
if(PLATINUM_BOOT_OPTION){
if((PLATINUM_BOOT_OPTION.launch_from!=0)||(NAGARA_LAUNCH)){
PLATINUM_BOOT_OPTION=null;}
}
if(param){
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},param);}else{
if(!NAGARA_LAUNCH){
brw_disp.disappear();
if(!popup_disp_mgr.is_disp())
common_key.set_cursor(platinum_main,function_bar);}else{
brw_disp.disappear();}
}
};
this.param.load_failed_cb=function(param){
brw_disp.fg_loading=false;
if(socket_mgr.is_smapho_req()){
socket_mgr.reset_smapho_req();console_log("[load_failed_cb]socket ack");
if(socket_mgr.is_smapho_add_bookmark()){
socket_mgr.reset_smapho_add_bookmark();}
else {
socket_mgr.send_event(SEND_ACK_REQ_URL,null,false);}
}
if(PLATINUM_BOOT_OPTION){
if((PLATINUM_BOOT_OPTION.launch_from!=0)||(NAGARA_LAUNCH)){
PLATINUM_BOOT_OPTION=null;}
}
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},param);
function_bar.set_btn_state();};
this.param.show_popup_cb=this.show_popup_cb;
this.param.prompt_cb=function(param){
function_bar.clear_drag_mode();
brw_disp.prompt_cb(param);};
this.param.authentication_cb=function(param){
function_bar.clear_drag_mode();
brw_disp.authentication_cb(param);};
this.param.skb_appear=function (param){
if(sft_kbd.visible_p)return false;
sft_kbd.appear({text:"",
skin_path:kbd_default_skin_path,
textarea:direct_input_area,
done_cb:brw_disp.skb_done_action,
cancel_cb:brw_disp.skb_cancel_action});
switch(param.mode){
case "password":
sft_kbd.set_passwd_mode();
break;
case "email":
case "url":
case "tel":
case "number":
sft_kbd.set_input_char("ALPHABET");
break;
default:
break;}
return true;};
this.param.skb_disappear=function (){
if(!sft_kbd.visible_p)return;
brw_disp.skb_cancel_action();};
this.param.skb_is_disp=function (){
if(sft_kbd.hide_anim)return false;
if(sft_kbd.visible_p)return true;
return false;};
this.param.full_screen_cb=function(mode){
if(NAGARA_LAUNCH){
if(mode){
function_bar.visible_p=false;
side_window.visible_p=false;
if(DEF_MULTI_USER)
MultiUserSelection.set_visible(false);
brw_disp.show_full_info_popup();}else{
function_bar.visible_p=true;
var display_mode=check_display_mode();
if((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE)){
side_window.visible_p=true;
if(DEF_MULTI_USER)
MultiUserSelection.set_visible(true);}
}
}
};
this.param.change_asr_mode_cb=function(mode){
if(mode){
InputDevManager.set_move_mode("key");
common_key.set_cursor(platinum_main,brw_disp);}else{
InputDevManager.set_move_mode("free");}
};
this.moveTo=pkg_common.MoveTo;
smapho_listener.add_event_hook(this.smapho_event_hook);
socket_mgr.add_event_hook(this.socket_event_hook);
BROWSER_READY=true;
if(socket_mgr.data)socket_mgr.connect(socket_mgr.data);
this.full_param=new Object();
this.full_param.stage=platinum_main;
this.full_param.connect_cb=function(){
};
this.full_param.disconnect_cb=function(){
brw_disp.brw.visible_p=true;
function_bar.visible_p=true;
var display_mode=check_display_mode();
if((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE)){
side_window.visible_p=true;
if(DEF_MULTI_USER)
MultiUserSelection.set_visible(true);}
brw_disp.full.visible_p=false;
if(!sft_kbd.visible_p)
del_event_hook(ebus.kbd);};
this.full_param.full_screen_cb=function(){
brw_disp.full.visible_p=true;
function_bar.visible_p=false;
var display_mode=check_display_mode();
if((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE))
side_window.visible_p=false;
if(DEF_MULTI_USER)
MultiUserSelection.set_visible(false);
brw_disp.brw.visible_p=false;
add_event_hook(ebus.kbd,usb_key_hook);};
this.full_param.windowless_cb=function(){
brw_disp.brw.visible_p=true;
function_bar.visible_p=true;
var display_mode=check_display_mode();
if((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE)){
side_window.visible_p=true;
if(DEF_MULTI_USER)
MultiUserSelection.set_visible(true);}
brw_disp.full.visible_p=false;
if(!sft_kbd.visible_p)
del_event_hook(ebus.kbd);};};
function byte2strLen(byteLen,str)
{
var len=0;
var tbl=[0,1,1,1,2,3,2,3,4,3];

for(var i=0;i<str.length;i++){
len+=tbl[encodeURIComponent(str.charAt(i)).length];
if(len==byteLen)
break;}
return (i+1);}
brw_disp.asr_action=function (val,word){
console.log("[BROWSER]: brw_obj.asr_action val= ",val);
var id=0;
if(val.length==0)return;
if(word){
for(var i=0,max=val.length;i<max;i++){
if(val[i]>=2101&&val[i]<=2106){id=val[i]-2000;
break;}else if(val[i]==2050){id=50;
break;}
}
if(id==0){id=101+pkg_toolbars.SetSearchCategoryByUrl(function_bar.get_locate_text());}
}else{
for(var i=val.length-1;i>=0;i--){
if(val[i]>2000){
id=val[i]-2000;
break;}
}
}
if(id==0)return;
console.log("[brw_disp.asr_action]id:"+id);
if(id<=11){
var func_id;
switch(id){
case 1:func_id=FUNC_BACK;break;
case 2:func_id=FUNC_NEXT;break;
case 3:func_id=FUNC_REDUNTION;break;
case 4:func_id=FUNC_ENLARGE;break;
case 5:func_id=FUNC_BOOKMARK_PLUS;break;
case 6:func_id=FUNC_RELOAD;break;
case 10:func_id=FUNC_END;break;
case 11:func_id=FUNC_CHANGE_SCREEN;break;
default:return;break;}
function_bar.ary_item[func_id].action();}else if(id==12){
brw_disp.private_browsing_func(!brw_disp.brw.get_private_browsing());
function_bar.guide_tips();}else if(id>=101&&id<=106){
SEARCH_TYPE=id-101;
if(brw_disp.brw.fg_full)
brw_disp.brw.back_action();
function_bar.set_search_text(word);}else{
brw_disp.brw.asr_action_pkg(id,word);}
};
brw_disp.usb_hook=function(stage,device,event){
console_log("[brw_disp.usb_hook]:"+arguments[3]);
if(event==ebus.asr.ASR_RESULT_EV){
console_log("[brw_disp.usb_hook]STRING_EV:"+arguments[3]);
if(sft_kbd.visible_p){
sft_kbd.asr_hook(arguments);
return;}
var str=arguments[3];
var strLen=str.length;
var start=0;
var end;
var byteLen;
var len;
var type=[];
var i=0;
var word="";
var has_search_action=false;
end=str.indexOf(",",start);
if(end<0)return;
byteLen=parseInt(str.substring(start,end));
console_log("byteLen:"+byteLen);
if(isNaN(byteLen))return;
start=end+1;
len=byte2strLen(byteLen,str.substring(start));
start+=len;

while(start<strLen){
end=str.indexOf(",",start);
if(end<0)break;
type[i]=parseInt(str.substring(start,end));
if(isNaN(type[i]))break;
start=end+1;
end=str.indexOf(",",start);
if(end<0)break;
byteLen=parseInt(str.substring(start,end));
if(isNaN(byteLen))break;
start=end+1;
len=byte2strLen(byteLen,str.substring(start));
start=end+1;

if(type[i]==9){
word=str.substr(start,len);}else if(type[i]>=2101&&type[i]<=2106){
has_search_action=true;}
start+=len;
i++;}
if((word=="")&&has_search_action){
word=function_bar.get_search_text();}
brw_disp.asr_action(type,word);}
};
brw_disp.set_bookmark=function(data){
var bookmark_count=data.bookmarkpanel.length;
if(bookmark_count>0){
var bookmark_url_list=new Array();
for(var i=0;i<bookmark_count;i++){
bookmark_url_list[i]=data.bookmarkpanel[i].url;}
this.brw.set_bkmk_url_list({count:bookmark_count,list:bookmark_url_list});}else{
this.brw.set_bkmk_url_list({count:0,});}
};
brw_disp.direct_launch_load=function(){
var url="";
if(PLATINUM_BOOT_OPTION){
if(PLATINUM_BOOT_OPTION.launch_from==1){
url=PLATINUM_BOOT_OPTION.url;
if(system.mdl_cfg.with_bp_transit_effect)
brw_disp.fg_boot_animation=true;
brw_disp.wait_capture=true;}else if(PLATINUM_BOOT_OPTION.launch_from==2){
url=SAVE_URL;
SAVE_URL="";}else if((PLATINUM_BOOT_OPTION.launch_from==3)
||(PLATINUM_BOOT_OPTION.launch_from==4)){
url="";
SEARCH_TYPE=(PLATINUM_BOOT_OPTION.category==0)?
0:PLATINUM_BOOT_OPTION.category-1;
function_bar.set_search_text(PLATINUM_BOOT_OPTION.keyword);}else if((PLATINUM_BOOT_OPTION.launch_from==0)&&(NAGARA_LAUNCH)){
if(bookmark.all_data.bookmarkpanel.length!=0){
if(bookmark.data&&bookmark.data.bookmarkpanel.length!=0)
url=bookmark.data.bookmarkpanel[0].url;
else
url=bookmark.all_data.bookmarkpanel[0].url;}else{
url="";}
}else if(PLATINUM_BOOT_OPTION.launch_from==5){
url=PLATINUM_BOOT_OPTION.url;}else{
PLATINUM_BOOT_OPTION=null;}
}
if(SAVE_URL){
url=SAVE_URL;
SAVE_URL="";}
if(url){
pointer_table=get_pointer_table("browser");
function_bar.create();
brw_disp.appear(url);
setf_text(function_bar.text_locate,url);
URL_STR=url;
if(brw_disp.wait_capture)brw_disp.capture_url=url;}
if(PLATINUM_BOOT_OPTION!=null){
if((PLATINUM_BOOT_OPTION.launch_from==0)&&(NAGARA_LAUNCH)&&(url=="")){
InputDevManager.set_move_mode("free");if(!function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,null);}
brw_disp.appear();}
}
};
brw_disp.appear=function(url,from_bookmark){
console_log("[START][brw_disp.appear]url:"+url);
Cursor.init();
Cursor.disappear();
function_bar.clear_drag_mode();
this.param.url=url;
this.capture_url="";
var display_mode=check_display_mode();
if(this.param.url){
if(!this.brw.is_connect()){
if(this.brw.is_alived()!=true){
console_log("[brw_disp.appear]appear");
this.brw.appear(this.param);
this.full.create(brw_disp.full_param);}else{
this.brw.set_initial_url(this.param.url);}
}else{
console_log("[brw_disp.appear]open_url");
if((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE)){
side_window.appear();
side_window.placeTo({x:SIDE_WINDOW_WIDTH/2-SCREEN_WIDTH/2,y:0,z:0});
}
if(brw_disp.brw.fg_full){
this.brw.set_initial_url(this.param.url);}else{
this.brw.open_url(this.param.url);}
}
function_bar.set_key(url);
if((sft_kbd.visible_p)||(socket_mgr.is_smapho_req())
||(PLATINUM_BOOT_OPTION)||(bookmark_bg_image.visible_p)){
animation_mask.appear();
this.translate[1]=SCREEN_HEIGHT;
this.moveTo({x:0,y:0,z:0,end_func:function(){
console_log("[brw_disp.appear]end");
bookmark_bg_image.visible_p=false;}});}
if(DEF_RECCOMEND){
if(from_bookmark||
(PLATINUM_BOOT_OPTION&&PLATINUM_BOOT_OPTION.launch_from==weblink.CODE.BOOKMARK)){
bookmark.count_use_history(url);}
}
this.visible_p=true;}else{
if((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE)){
side_window.appear();
side_window.placeTo({x:SIDE_WINDOW_WIDTH/2-SCREEN_WIDTH/2,y:0,z:0});
}
}
if(tou_panel.is_disp())tou_panel.disappear();
if(search_engine.visible_p)search_engine.disappear();
if(guide_menu.visible_p)guide_menu.disappear();
if((NAGARA_LAUNCH)&&(side_window.replace_bookmark_mode)){
common_popup.disappear(side_window.replace_bookmark_cancel);}
if(common_popup.visible_p)common_popup.disappear(common_popup.return_cb,true);
if(error_popup.visible_p)error_popup.disappear(error_popup.return_cb,true);
if(digest_auth.visible_p)digest_auth.enter_cancel_btm();
if(prompt.visible_p)prompt.enter_cancel_btm();
var bar_obj=this.brw.get_scrollbar_obj();
var list=[this.brw.get_brw_obj(),
bar_obj.bar_w_btn_left,
bar_obj.bar_w_btn_right,
bar_obj.bar_h_btn_top,
bar_obj.bar_h_btn_btm,
bar_obj.bar_w_base,
bar_obj.bar_h_base];
if((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE)){
var tmp_list=side_window.get_obj();
list=tmp_list.concat(list);}
pointer_table=get_pointer_table("browser");
set_pointer_obj(function_bar.ary_item,0);
if(DEF_TOOLTIP){
set_pointer_obj(list,function_bar.ary_item.length);}else{
set_pointer_obj(list,function_bar.ary_item.length-1);}
};
brw_disp.disappear=function(){
if(brw_disp.brw){
brw_disp.brw.focus_obj.setShow(false);brw_disp.brw.tts_stop();}
bookmark_bg_image.visible_p=true;
popup_disp_mgr.clear_info_array();
if(this.moveTo){
this.moveTo({x:0,y:SCREEN_HEIGHT,z:0,end_func:function(){
this.visible_p=false;}});}
if(!NAGARA_LAUNCH){
if(!popup_disp_mgr.is_disp()){
if(platinum_main.cursor==function_bar){
common_key.set_cursor(platinum_main,null);
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,null);
common_key.set_cursor(platinum_main,bookmark);}
}
}
};
brw_disp.free=function(){
console_log("[START][brw_disp.free]");
if(!this.components.length)return;
if(this.full&&this.full.free)this.full.free();
console_log("[END][brw_disp.free]");};
brw_disp.enter_focus=function(){
};
brw_disp.leave_focus=function(){
common_key.set_cursor(this,null);
key_flag=false;};
brw_disp.reload_func=function(){
if(this.brw.is_alived()){
this.brw.reload_action();}else{
this.appear(function_bar.get_locate_text());}
};
brw_disp.private_browsing_func=function(param){
if(this.brw.is_alived()){
this.brw.private_browsing_action(param);}else{
this.appear(function_bar.get_locate_text());}
};
brw_disp.do_not_tracking_func=function(param){
if(this.brw.is_alived()){
this.brw.do_not_tracking_action(param);}
};
brw_disp.skb_calc_move_distance=function(param){
console_log("[skb_calc_move_distance]");
var distance=0;
var cursor_under_y=0;
var cursor_top_y=0;
var skb_top_y=0;
cursor_under_y=Math.ceil(param.y-param.h/2);
cursor_top_y=Math.ceil(param.y+param.h/2);
skb_top_y=Math.ceil(-540+sft_kbd.height);
distance=cursor_under_y-skb_top_y;
distance=-distance;
if(distance<0){
if(Math.abs(distance)<10)
distance=distance+10;}
if((cursor_top_y+distance)>(SCREEN_HEIGHT/2-FUNC_BAR_HEIGHT)){
distance=SCREEN_HEIGHT/2-FUNC_BAR_HEIGHT-cursor_top_y-20;
if((distance+60)>sft_kbd.height){
distance=distance-(distance-sft_kbd.height)-60;}
}
return distance;};
brw_disp.skb_done_action=function(text){
sft_kbd.disappear();
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
brw_disp.brw.focus_obj.setShow(false);};
brw_disp.skb_cancel_action=function(){
sft_kbd.disappear();
brw_disp.brw.focus_obj.setShow(false);
brw_disp.brw.cancel_text();
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
};
brw_disp.skb_force_disappear=function(){
sft_kbd.disappear();
if(textarea_box.visible_p)
textarea_box.disappear();
brw_disp.brw.focus_obj.setShow(false);};
brw_disp.show_full_info_popup=function(){
console_log("[brw_disp.show_full_info_popup]");
if(common_popup.visible_p)return;
var wording=W_TEXT.W_FULL_SCREEN_GUIDE;
var param={
title:"",
text:wording,
translate:[0,460,1],
width:1040,
height:160,
appear_cb:function(){
common_key.set_cursor(platinum_main,null);
enable_keyhook=true;},
return_cb:brw_disp.show_full_info_popup_cancel,
text_font_size:32,
offset_text_w:-80,
offset_text_h:40,
focus_obj:Cursor,
focus_offset:[0.0,0,1],
}
param.delete_time=2000;
InputDevManager.set_move_mode("free");
function_bar.clear_drag_mode();
common_popup.appear(param);
var list=common_popup.get_btn_obj();
pointer_table=get_pointer_table("del_cookie_popup");
set_pointer_obj(list,0);};
brw_disp.show_full_info_popup_cancel=function(){
if(!function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,brw_disp);}
set_base_pointer_obj();};
brw_disp.show_exit_popup=function(){
if(common_popup.visible_p)return;
var wording=W_TEXT.W_CONFIRM_EXIT;
var text_yes=W_TEXT.W_YES;
var text_no=W_TEXT.W_NO;
var param={
text:wording,
translate:[0,0,1],
width:740,
height:380,
appear_cb:function(){
common_key.set_cursor(platinum_main,common_popup);
Cursor.appear();
enable_keyhook=true;},
focus_obj:Cursor,
focus_offset:[0.0,0,1],
offset_text_w:-80,
offset_btn_x:0,
offset_btn_y:-20,
}
param.return_cb=brw_disp.exit_popup_cancel;
param.btn_cb=[brw_disp.exit_popup_ok,brw_disp.exit_popup_cancel];
param.btn_text=[text_yes,text_no];
param.text_font_size=32;
param.title="";
param.cur_pos=0;
Cursor.set_mode(2);
InputDevManager.set_move_mode("hybrid");
function_bar.clear_drag_mode();
common_popup.appear(param);
var list=common_popup.get_btn_obj();
pointer_table=get_pointer_table("exit_popup");
set_pointer_obj(list,0);};
brw_disp.exit_popup_ok=function(){
if(NAGARA_LAUNCH){
if(BRW_INFO.url){
common_effect_out(TXK_RETURN);
}else{
brw_disp.disappear();
common_effect_out(TXK_RETURN);
}
}else if(DIRECT_LAUNCH){
brw_disp.disappear();
common_effect_out(TXK_RETURN);
}else{}
};
brw_disp.exit_popup_cancel=function(){
InputDevManager.set_move_mode("free");
if(!function_bar.set_free_focus())
common_key.set_cursor(platinum_main,brw_disp);
set_base_pointer_obj();};
brw_disp.show_popup_cb=function(disp_param,error_code){
var wording=null;
var word_list=[
[1,W_TEXT.W_NET_ERROR_UNSUPPORTED_PROTOCOL],
[3,W_TEXT.W_NET_ERROR_URL_FAILED],
[5,W_TEXT.W_NET_ERROR_COULDNT_RSOLVE_PROXY],
[6,W_TEXT.W_NET_ERROR_COULDNT_RESOLVE_HOST],
[7,W_TEXT.W_NET_ERROR_COULDNT_CONNECT],
[27,W_TEXT.WB_LT_ERR_HUGE_SITE],
[28,W_TEXT.W_NET_ERROR_NETWORK_ERROR],
[33,W_TEXT.W_NET_ERROR_RANGE_ERROR],
[34,W_TEXT.W_NET_ERROR_HTTP_POST_ERROR],
[35,W_TEXT.W_NET_ERROR_SSL_CONNECT_ERROR],
[42,W_TEXT.W_NET_ERROR_ABORTED_BY_CALLBACK],
[43,W_TEXT.W_NET_ERROR_BAD_FUNCTION_ARGUMENT],
[47,W_TEXT.W_NET_ERROR_TOO_MANY_REDIRECTS],
[52,W_TEXT.W_NET_ERROR_NETWORK_ERROR],
[55,W_TEXT.W_NET_ERROR_SEND_ERROR],
[56,W_TEXT.W_NET_ERROR_RECV_ERROR],
[59,W_TEXT.W_NET_ERROR_NOT_SUPPORTED],
[61,W_TEXT.W_NET_ERROR_NOT_SUPPORTED],
[63,W_TEXT.W_NET_ERROR_NOT_SUPPORTED],
[64,W_TEXT.W_NET_ERROR_NOT_SUPPORTED],
[65,W_TEXT.W_NET_ERROR_NETWORK_ERROR],
[75,W_TEXT.W_NET_ERROR_NOT_SUPPORTED],
[78,W_TEXT.W_NET_ERROR_NOT_FOUND],
[79,W_TEXT.W_NET_ERROR_NETWORK_ERROR],
[80,W_TEXT.W_NET_ERROR_NETWORK_ERROR],
[81,W_TEXT.W_NET_ERROR_NETWORK_ERROR],
[400,W_TEXT.W_HTTP_BAD_REQUEST],
[401,W_TEXT.W_HTTP_UNAUTHORIZED],
[402,W_TEXT.W_HTTP_PAYMENT_REQUIRED],
[403,W_TEXT.W_HTTP_FORBIDDEN],
[404,W_TEXT.W_HTTP_NOT_FOUND],
[405,W_TEXT.W_HTTP_METHOD_NOT_ALLOWED],
[406,W_TEXT.W_HTTP_NOT_ACCEPTABLE],
[407,W_TEXT.W_HTTP_PROXY_AUTH_REQUIRED],
[408,W_TEXT.W_HTTP_REQUEST_TIMEOUT],
[409,W_TEXT.W_HTTP_CONFLICT],
[410,W_TEXT.W_HTTP_GONE],
[411,W_TEXT.W_HTTP_LENGTH_REQUIERED],
[412,W_TEXT.W_HTTP_PRECONDITION_FAILED],
[413,W_TEXT.W_HTTP_REQUEST_TOO_LARGE],
[414,W_TEXT.W_HTTP_REQUEST_URI_TOO_LONG],
[415,W_TEXT.W_HTTP_UNSUPPORTED_MEDIA_TYPE],
[416,W_TEXT.W_HTTP_REQUESTD_NOT_SATISFIABLE],
[417,W_TEXT.W_HTTP_EXPECTATION_FAILED],
[500,W_TEXT.W_HTTP_INTERNAL_SERVER_ERROR],
[501,W_TEXT.W_HTTP_NOT_IMPLEMENTED],
[502,W_TEXT.W_HTTP_BAD_GATEWAY],
[503,W_TEXT.W_HTTP_SERVICE_UNAVAILABLE],
[504,W_TEXT.W_HTTP_GATEWAY_TIMEOUT],
[505,W_TEXT.W_HTTP_VER_NOT_SUPPORTED],
[1111,W_TEXT.W_NET_ERROR_NOT_TOU],
[9990,W_TEXT.W_BOOKMARK_ERROR_1],
[9999,W_TEXT.WB_LT_ERR_HUGE_SITE],
[null,W_TEXT.W_NET_ERROR_OTHERS]
];
switch(disp_param.type){
case BROWSER_ERROR_EV:
for(var i=0,max=word_list.length;i<max;i++){
if((error_code==word_list[i][0])||(null==word_list[i][0])){
wording=word_list[i][1];
if(PLATINUM_LANGUAGE=="ja-JP"){
if((1<=error_code)&&(error_code<=83)
||(word_list[i][0]==null)){
wording=wording+"(W"+error_code+")";}
}
break;}
}
break;
case BROWSER_ALERT_EV:
case BROWSER_CONFIRM_EV:
wording=disp_param.msg;
break;
case BROWSER_INSECURE_EV:
wording=W_TEXT.W_ERR_UNSECURE;
break;
case BROWSER_CAN_NOT_PLAY_EV:
wording=W_TEXT.W_CAN_NOT_PLAY;
break;
default:
wording="";
break;}

var param={
text:wording,
translate:[0,0,1],
width:1000,
height:800,
appear_cb:function(){
common_key.set_cursor(platinum_main,error_popup);
Cursor.appear();
enable_keyhook=true;},
focus_obj:Cursor,
focus_offset:[0.0,0,1],
btn_offset:-250,
}
switch(disp_param.type){
case BROWSER_ERROR_EV:
if(error_code<9000){
param.return_cb=brw_disp.server_error_ok;
param.btn_cb=[brw_disp.server_error_ok];}else{
param.return_cb=brw_disp.brw_error_ok;
param.btn_cb=[brw_disp.brw_error_ok];}
param.btn_text=[W_TEXT.W_OK];
param.title=W_TEXT.W_ERR_TITLE;
param.cur_pos=0;
if(error_code==9999){
brw_disp.disappear();}
break;
case BROWSER_ALERT_EV:
param.return_cb=brw_disp.alert_ok;
param.btn_cb=[brw_disp.alert_ok];
param.btn_text=[W_TEXT.W_OK];
param.title="";
break;
case BROWSER_CONFIRM_EV:
param.return_cb=brw_disp.confirm_cancel;
param.btn_cb=[brw_disp.confirm_ok,brw_disp.confirm_cancel];
param.btn_text=[W_TEXT.W_OK,W_TEXT.W_CANCEL];
param.title="";
param.cur_pos=1;
break;
case BROWSER_INSECURE_EV:
param.return_cb=brw_disp.insecure_cancel;
param.btn_cb=[brw_disp.insecure_cancel];
param.btn_text=[W_TEXT.W_CANCEL];
param.title="";
break;
case BROWSER_CAN_NOT_PLAY_EV:
param.return_cb=brw_disp.can_not_play_ok;
param.btn_cb=[brw_disp.can_not_play_ok];
param.btn_text=[W_TEXT.W_OK];
param.title="";
break;
default:
break;}
if(sft_kbd.visible_p)
brw_disp.skb_force_disappear();
if(common_popup.visible_p)common_popup.disappear(common_popup.return_cb,true);
popup_disp_mgr.change_disp();
Cursor.set_mode(2);
InputDevManager.set_move_mode("hybrid");
function_bar.clear_drag_mode();
error_popup.appear(param);
var list=error_popup.get_btn_obj();
if(list.length==1){
pointer_table=get_pointer_table("popup_1");}else{
pointer_table=get_pointer_table("popup_2");}
set_pointer_obj(list,0);
popup_disp_mgr.push_info_array({type:disp_param.type,msg:disp_param.msg,error_code:error_code});
};
brw_disp.server_error_ok=function(){
if(tou_panel.server_error==true){
common_effect_out(TXK_RETURN);
return;}
if(popup_disp_mgr.is_disp())return;
common_key.set_cursor(platinum_main,function_bar);
if(!BRW_INFO.url){
function_bar.back_action();}else{
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
}
popup_disp_mgr.re_disp();
};
brw_disp.brw_error_ok=function(){
if(popup_disp_mgr.is_disp())return;
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
popup_disp_mgr.re_disp();
};
brw_disp.alert_ok=function(){
brw_disp.brw.alert_req();
if(popup_disp_mgr.is_disp())return;
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
popup_disp_mgr.re_disp();};
brw_disp.confirm_ok=function(){
brw_disp.brw.confirm_req(true);
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
popup_disp_mgr.re_disp();};
brw_disp.confirm_cancel=function(){
brw_disp.brw.confirm_req(false);
if(popup_disp_mgr.is_disp())return;
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
popup_disp_mgr.re_disp();};
brw_disp.prompt_cb=function(param){
popup_disp_mgr.change_disp();
InputDevManager.set_move_mode("hybrid");
prompt.appear({translate:[0,150,0],
focus_obj:Cursor,message:param[4],data:param[5],
exit_cb:function(){
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
}});};
brw_disp.prompt_req=function(param){
console_log("[START][brw_disp][prompt_req]");
this.brw.prompt_req(param.value,param.res);
console_log("[END][brw_disp][prompt_req]");};
brw_disp.authentication_cb=function(param){
popup_disp_mgr.change_disp();
InputDevManager.set_move_mode("hybrid");
digest_auth.appear({translate:[0,170,0],
focus_obj:Cursor,server_name:param[4],message:param[5],
exit_cb:function(){
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
}});};
brw_disp.authentication_req=function(param){
this.brw.authentication_req(param.url,param.name,param.password,param.res);
};
brw_disp.insecure_cancel=function(){
brw_disp.brw.insecure_req(false);
if(popup_disp_mgr.is_disp())return;
brw_disp.brw.load_stop_req();
function_bar.set_btn_state();
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
popup_disp_mgr.re_disp();};
brw_disp.can_not_play_ok=function(){
if(popup_disp_mgr.is_disp())return;
InputDevManager.set_move_mode("free");
if(function_bar.set_free_focus()){
common_key.set_cursor(platinum_main,function_bar);}else{
common_key.set_cursor(platinum_main,brw_disp);}
popup_disp_mgr.re_disp();};
brw_disp.smapho_event_hook=function(ev,data){
system.screensaver.update_timer();
switch(ev){
case QUERY_TITLE:
smapho_listener.send_query(QUERY_TITLE,BRW_INFO.title);
break;
default:
break;}
};
brw_disp.socket_event_hook=function(ev,data){
switch(ev){
case RECV_URL_EV:
case RECV_BOOKMARK_URL_EV:
if(brw_disp.brw.is_connect()&&(!tou_panel.starting_disp)){
if(brw_disp.brw.fg_full)
brw_disp.brw.back_action();
brw_disp.appear(data);
setf_text(function_bar.text_locate,data);
URL_STR=data;}else{
SAVE_URL=data;}
break;
case SEND_URL_EV:
socket_mgr.send_event(SEND_URL_REQ,URL_STR);
break;
case SEND_TITLE_EV:
socket_mgr.send_event(SEND_TITLE_REQ,BRW_INFO.title);
break;
default:
break;}
};
brw_disp.key_hook=function(up_down,key){

if(this.full.visible_p){
if(this.full.key_hook(up_down,key))
return true;}
if(this.brw.asr_fg_link){
var ret=false;
if(this.brw.key_hook(up_down,key))ret=true;
return ret;}
brw_disp.brw.focus_obj.setShow(false);brw_disp.brw.tts_stop();
brw_disp.brw.clear_asr_link("all");
if((up_down==KEY_UP)&&(key==TXK_SUBMENU)){
if(NAGARA_LAUNCH){
var mouse_pos_x=system.cursor_pointer.get_pos_x();
var mouse_pos_y=system.cursor_pointer.get_pos_y();
var id=SearchObj(mouse_pos_x,mouse_pos_y);
var display_mode=check_display_mode();
var base_id=((display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE))?13:12;
if(DEF_TOOLTIP)
base_id++;
if((id>=base_id)&&(id<(base_id+BOOKMARK_DISP_MAX))){
id=id-(base_id-1);}else if((id>=(base_id+BOOKMARK_DISP_MAX))&&(id<(base_id+BOOKMARK_DISP_MAX*2))){
id=id-(base_id+BOOKMARK_DISP_MAX-1);}else{
brw_disp.brw.submenu_action();
return true;}
if(DEF_TOOLTIP){
tooltip_item.disappear();}
if(!side_window.btn_bookmark.ary_item[id].enable)return false;
side_window.btn_bookmark.ary_item[id].img.visible_p=true;
side_window.btn_bookmark.ary_item[id].img_act.visible_p=false;
side_window.btn_bookmark.ary_item[id].img_prs.visible_p=false;
side_window.btn_bookmark.ary_item[id].img_submenu.visible_p=true;
side_window.btn_bookmark.ary_item[id].img_submenu_act.visible_p=false;
submenu.appear_from_side(id);
return true;}else{
brw_disp.brw.submenu_action();
return true;}
}
if((up_down=KEY_PRESS)&&(key==TXK_RETURN)){
if((NAGARA_LAUNCH)&&(side_window.replace_bookmark_mode)){
common_popup.disappear(side_window.replace_bookmark_cancel);}
}
return false;}
brw_disp.change_screen_func=function(param){
side_w_mode=param;
set_base_pointer_obj();
set_func_id();
set_func_pos();
function_bar.clear_drag_mode();
if(DEF_SIDE_TV){
if(side_w_mode){
side_window.tv_area.set_size(TV_WIDTH,TV_HEIGHT);}else{
side_window.tv_area.set_size(0,0);}
}
this.brw.switch_screen(param);}
var loading=new container({components:[
new gimage({src:PALTINUM_PATH_IMG+"loading_circle.png",
color:[129,142,149,255],
}),
],
translate:[0,0,0.1],
rotation:[0,0,0,1],
visible_p:false,
});
loading.on=function(){
this.visible_p=true;
delete_timer(this);
append_timer(this,50,function (obj,count){
if(count>3600){
delete_timer(obj);
loading.visible_p=false;}else {
loading.rotation[0]-=30;}
force_redraw();});}
loading.off=function(){
this.visible_p=false;
delete_timer(this);}
common_popup=new pkg_common.common_popup_panel();
tooltip_item=new pkg_common.tooltip_item();
var error_popup=new pkg_common.popup_panel();
var error_popup_test_key_hook=function(up_down,key){
if(up_down!=KEY_PRESS){
return true;}
switch(key){
case TXK_D1:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},416);
break;
case TXK_D2:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},417);
break;
case TXK_D3:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},500);
break;
case TXK_D4:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},501);
break;
case TXK_D5:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},502);
break;
case TXK_D6:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},503);
break;
case TXK_D7:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},504);
break;
case TXK_D8:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},505);
break;
case TXK_D9:
console_log("TXK_D1");
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},506);
break;}
}
popup_disp_mgr={};
popup_disp_mgr.init=function(){
this.ary_popup_info=new Array();
};
popup_disp_mgr.init();
popup_disp_mgr.is_disp=function(){
if((error_popup.visible_p)
||(common_popup.visible_p)
||(digest_auth.visible_p)
||(prompt.visible_p)){
return true;}
return false;};
popup_disp_mgr.change_disp=function(){
if(error_popup.visible_p){
error_popup.disappear(null,true);
common_key.set_cursor(platinum_main,null);}else if(digest_auth.visible_p){
digest_auth.enter_cancel_btm();}else if(prompt.visible_p){
prompt.enter_cancel_btm();}
};
popup_disp_mgr.re_disp=function(){
if(this.ary_popup_info.length>0){
this.ary_popup_info.splice(this.ary_popup_info.length-1,1);
if(this.ary_popup_info.length!=0){
var popup_info=this.ary_popup_info.pop();
brw_disp.show_popup_cb({type:popup_info.type,msg:popup_info.msg},popup_info.code);
return;}
}
set_base_pointer_obj();
};
popup_disp_mgr.push_info_array=function(param){
var popup_info={
type:param.type,
msg:param.msg,
code:param.error_code
}
this.ary_popup_info.push(popup_info);
};
popup_disp_mgr.clear_info_array=function(){
this.ary_popup_info.splice(0,this.ary_popup_info.length);
};
InputDevManager={};
InputDevManager.init=function(){
this.move_mode="key";
this.state_point=true;};
InputDevManager.init();
InputDevManager.set_move_mode=function(mode){
if(mode==this.move_mode)return;
if(mode=="free"){
this.pointer_appear();
this.move_mode="free";
this.set_free();}else if(mode=="key"){
this.pointer_disappear();
this.move_mode="key";
this.set_key();}else{
this.pointer_appear();
this.move_mode="hybrid";
this.set_hybrid();}
};
InputDevManager.get_move_mode=function(){
console_log("[InputDevManager.get_move_mode]"+this.move_mode);
return this.move_mode;};
InputDevManager.pointer_appear=function(){
if(system.cursor_pointer){
system.cursor_pointer.set_current_index(0);
system.cursor_pointer.set_timeout(0);
system.cursor_pointer.force_show();
this.set_pointer_status(true);}
};
InputDevManager.pointer_disappear=function(){
if(system.cursor_pointer){
system.cursor_pointer.set_current_index(CURSOR_INVISIBLE_INDEX);
system.cursor_pointer.set_timeout(1);
system.cursor_pointer.force_show();
this.set_pointer_status(false);}
point_base.disappear();};
InputDevManager.set_pointer_status=function(state){
this.state_point=state;};
InputDevManager.get_pointer_status=function(){
return this.state_point;};
InputDevManager.set_key=function(){
if(system.input_dev)
system.input_dev.key.set_dispatch({destination:system.input_dev.DISPATCH_DEFAULT});
if(system.input_dev&&system.input_dev.mouse)
system.input_dev.mouse.set_dispatch({destination:system.input_dev.DISPATCH_TXK_KEY});
if(system.input_dev)
system.input_dev.touchpad.set_dispatch({destination:system.input_dev.DISPATCH_TXK_KEY});
if(system.input_dev&&system.input_dev.kbd)
system.input_dev.kbd.set_dispatch({destination:system.input_dev.DISPATCH_DEFAULT});
if(system.input_dev)
system.input_dev.touchpen.set_dispatch({destination:system.input_dev.DISPATCH_TXK_KEY});
console_log("[ROOT][InputDevManager.set_key]Remocon KEY dev:");};
InputDevManager.set_free=function(){
if(system.input_dev)
system.input_dev.key.set_dispatch({
destination:system.input_dev.DISPATCH_EBUS_MOUSE,unused_to_default:true,
right_click_time:750});
if(system.input_dev&&system.input_dev.mouse)
system.input_dev.mouse.set_dispatch({
destination:system.input_dev.DISPATCH_EBUS_MOUSE,unused_to_default:true});
if(system.input_dev)
system.input_dev.touchpad.set_dispatch({
destination:system.input_dev.DISPATCH_EBUS_MOUSE,unused_to_default:true});
if(system.input_dev&&system.input_dev.kbd)
system.input_dev.kbd.set_dispatch({
destination:system.input_dev.DISPATCH_EBUS_MOUSE,unused_to_default:true});
if(system.input_dev)
system.input_dev.touchpen.set_dispatch({
destination:system.input_dev.DISPATCH_EBUS_MOUSE,unused_to_default:true});
console_log("[ROOT][InputDevManager.set_free]Remocon FREE POINT dev:");};
InputDevManager.set_hybrid=function(){
system.input_dev.key.set_dispatch({destination:system.input_dev.DISPATCH_DEFAULT});
if(system.input_dev&&system.input_dev.kbd)
system.input_dev.kbd.set_dispatch({destination:system.input_dev.DISPATCH_DEFAULT});
if(system.input_dev&&system.input_dev.mouse)
system.input_dev.mouse.set_dispatch({
destination:system.input_dev.DISPATCH_EBUS_MOUSE,unused_to_default:true});
if(system.input_dev)
system.input_dev.touchpad.set_dispatch({
destination:system.input_dev.DISPATCH_EBUS_MOUSE,unused_to_default:true});
if(system.input_dev)
system.input_dev.touchpen.set_dispatch({
destination:system.input_dev.DISPATCH_EBUS_MOUSE,unused_to_default:true});
console_log("[ROOT][InputDevManager.set_free]Remocon FREE POINT dev:");};
var point_base=new container({visible_p:false});
point_base.create=function(){
this.components=[
this.img=new gimage({translate:[0,0,0.3],src:PALTINUM_PATH_IMG+"circle_out.png"})
];};
point_base.init=function(){
this.img.width=10;
this.img.height=10;
this.img.color[3]=255;
this.add_size_val=40;
this.add_color_val=0;
this.stop_count=0;
this.direction="enlarge";};
point_base.appear=function(){
if(this.visible_p)return;
console_log("[point_base.appear]");
this.translate[0]=system.cursor_pointer.get_pos_x();
this.translate[1]=system.cursor_pointer.get_pos_y();
this.max=280;
append_timer(this,1000,function(obj,count){
delete_timer(obj);
obj.init();
obj.visible_p=true;
force_redraw();
append_timer(obj,70,function(obj,count){
if(obj.direction=="enlarge"){
if(obj.img.width<obj.max*3/7){
obj.add_color_val=0;}else if(obj.img.width<obj.max*5/7){
obj.add_color_val=10;}else if(obj.img.width<obj.max*6/7){
obj.add_color_val=40;}else if(obj.img.width<obj.max){
obj.add_color_val=70;}else{
obj.add_size_val1=0;
obj.add_color_val=100;}
obj.img.width+=obj.add_size_val;
obj.img.height+=obj.add_size_val;
obj.img.color[3]-=obj.add_color_val;
if(obj.img.color[3]<0){
obj.img.color[3]=0;
obj.direction="stop";}
}else{
obj.visible_p=false;
obj.stop_count++;
if(obj.stop_count>=50){
obj.init();
obj.visible_p=true;}
}
force_redraw();});});};
point_base.disappear=function(){
delete_timer(this);
if(!this.visible_p)return;
this.visible_p=false;
force_redraw();};
point_base.free=function(){
if(!this.components.length)return;
this.img.src="";};
var under_mask=new container({});
under_mask.create=function(){
this.height=SCREEN_HEIGHT/2;
this.components=[
this.bg=new gbox({translate:[0,-(SCREEN_HEIGHT/2+this.height/2),0],
width:SCREEN_WIDTH,height:this.height,color:[221,221,221,255]
}),
];
if(NAGARA_LAUNCH){
this.bg.width=SCREEN_WIDTH-SIDE_WINDOW_WIDTH;
this.bg.translate[0]=SCREEN_WIDTH/2-this.bg.width/2;}
};
under_mask.appear=function(){
if(this.visible_p)return;
this.visible_p=true;};
under_mask.disappear=function(){
if(!this.visible_p)return;
this.visible_p=false;};
under_mask.move_up=function(param){
this.translate[1]+=param;};
under_mask.move_down=function(param){
this.translate[1]-=param;};
var animation_mask=new container({});
animation_mask.create=function(){
this.components=[
this.bg=new gbox({translate:[0,0,0.1],
width:SCREEN_WIDTH,height:SCREEN_HEIGHT,color:[0,0,0,120]
}),
];};
animation_mask.appear=function(){
this.create();
this.set_alpha();};
animation_mask.disappear=function(){
this.visible_p=false;
this.free();};
animation_mask.set_alpha=function(){
delete_timer(this);
append_timer(this,100,function (obj,count){
obj.bg.color[3]=obj.bg.color[3]-10;
if(count>10){
delete_timer(obj);
obj.disappear();}
});};
animation_mask.free=function(){
this.components.splice(0,this.components.length);};
var StageShow=function(obj){
console_log("[START][StageShow]");
check_launch();
if(DEF_MULTI_USER){
try{
var profile=system.user_profile.get({mhc:{id:null}});
USER_PROFILE_ID=(profile.mhc.id=="undefined")?-1:profile.mhc.id;
if(USER_PROFILE_ID<0)USER_PROFILE_ID=-1;}catch(e){
USER_PROFILE_ID=-1;}
}else{
USER_PROFILE_ID=-1;}
if(DEF_SIDE_WINDOW){
NAGARA_LAUNCH=true;
system.key_control.set_key_mode(system.key_control.MODE_HOME);}
smapho_listener.start();
socket_mgr.init();
if(system.mdl_cfg.with_pen_support_web_browser)
system.touchpen.start();
try{
}catch(e){
console_log("[ROOT][StageShow]error:"+e);}
if(ebus.mouse)platinum_main.add_event_hook(ebus.mouse,mouse_hook);
if(system.multitask)platinum_main.add_event_hook(system.multitask,multitask_hook);
obj.fg_long=false;
common_key.set_cursor(platinum_main,null);
pkg_toolbars.get_nv_search_data();
if(nv_search_data_flag){
if(apps_nvram.read("SEARCH_ENGINE","home")!=null){
pkg_toolbars.conv_search_id_to_idx(apps_nvram.read("SEARCH_ENGINE","home"));}else{
SEARCH_ENGINE=0;
display_search_engine_name=true;}
}else{
pkg_toolbars.search_engine_update();
if(apps_nvram.read("SEARCH_ENGINE","home")!=null){
}else{
SEARCH_ENGINE=0;
display_search_engine_name=true;
if(apps_nvram.read("SEARCH_UPDATE","home")==1){
apps_nvram.write("SEARCH_ENGINE",ENGINE_LIST[SEARCH_ENGINE].id,"home");}
}
}
if(apps_nvram.read("TOU_DISP","home")!=null)
tou_panel.state_disp=apps_nvram.read("TOU_DISP","home");
if(apps_nvram.read("TOU_VER","home")!=null)
tou_panel.version=apps_nvram.read("TOU_VER","home");

tou_panel.server_error=false;
if(PLATINUM_BOOT_OPTION){
if(PLATINUM_BOOT_OPTION.launch_from!=weblink.CODE.BOOKMARK||
PLATINUM_BOOT_OPTION.extra_data=="yes"){
if(apps_nvram.read("TOU_DISP","home")!=null){
tou_panel.state_disp=apps_nvram.read("TOU_DISP","home");
tou_panel.server_version=Server_json.get_tou_version();
if(tou_panel.server_version){
TOU_VERSION=tou_panel.server_version;
if(!tou_panel.state_disp){
tou_panel.server_text=Server_json.get_tou_text();
if(tou_panel.server_text==null){
tou_panel.server_error=true;}
}else{
if(TOU_VERSION>tou_panel.version){
tou_panel.server_text=Server_json.get_tou_text();
if(tou_panel.server_text==null){
tou_panel.server_error=true;}
}else{
tou_panel.server_text=null;}
}
}else{
tou_panel.server_text=Server_json.get_tou_text();
if(tou_panel.server_text==null){
tou_panel.server_error=true;}
}
}else{
tou_panel.server_text=Server_json.get_tou_text();
if(tou_panel.server_text==null){
tou_panel.server_error=true;}
}
if(tou_panel.server_error){
brw_disp.create();
var status=1111;
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},status);
return;}
if((!tou_panel.state_disp)||(TOU_VERSION>tou_panel.version)||(TOU_VERSION==null))
tou_panel.starting_disp=true;
if((apps_nvram.read("TOU_DISP","home")!=null)
||(TOU_VERSION>tou_panel.version)||(TOU_VERSION==null))
tou_panel.fg_disp_first=true;}
}
if(!this.bplayer)this.bplayer=new BroadcastPlayer();
if(DEF_SIDE_TV){
this.bplayer.set_browser_mode(BR_SRC_DEFAULT);
this.bplayer.set_browser_mode(BR_SRC_TVS_V);}else{
this.bplayer.set_browser_mode(BR_SRC_VS);
console_log("video box mode ( BR_SRC_VS )");}
if(TOU_VERSION==null){
tou_panel.server_version=Server_json.get_tou_version();
if(tou_panel.server_version)
TOU_VERSION=tou_panel.server_version;
else
TOU_VERSION=tou_panel.version;}
DIRECT_LAUNCH=true;
pointer_table=get_pointer_table("browser");
brw_disp.create();
bookmark.create();
function_bar.create();
if(NAGARA_LAUNCH){
side_window.create();
side_window.init();}
display_TOU_panel();
if(!tou_panel.starting_disp){
var bar_obj=brw_disp.brw.get_scrollbar_obj();
var list=null;
var list=[brw_disp.brw.get_brw_obj(),
bar_obj.bar_w_btn_left,
bar_obj.bar_w_btn_right,
bar_obj.bar_h_btn_top,
bar_obj.bar_h_btn_btm,
bar_obj.bar_w_base,
bar_obj.bar_h_base];
if(NAGARA_LAUNCH){
var tmp_list=side_window.get_obj();
list=tmp_list.concat(list);}
pointer_table=get_pointer_table("browser");
set_pointer_obj(function_bar.ary_item,0);
if(DEF_TOOLTIP){
set_pointer_obj(list,function_bar.ary_item.length);}else{
set_pointer_obj(list,function_bar.ary_item.length-1);}
}
function_bar.appear();
point_base.create();
under_mask.create();
obj.moveTo=pkg_common.MoveTo;
if(!tou_panel.starting_disp){
function_bar.set_btn_state();}
if(ebus&&ebus.asr&&ebus.asr.supported){
console.log("****************  add_event_hook asr");
ebus.asr.set_listener(1);platinum_main.add_event_hook(ebus.asr,brw_disp.usb_hook);}
if(system.effect){
console.log("****************  add_event_hook effect");
platinum_main.add_event_hook(system.effect,effect_hook);}
enable_keyhook=true;
complete_on_stage(obj);
prepare_package("kbd");
prepare_package("textarea");
system.cursor_pointer.set_current_index(0);
if(DEF_SIDE_TV){
append_timer(side_window,100,function(obj){
delete_timer(obj);
if(SHOW_TVINFO)add_default_stage_event_hook(tvplayer,side_window.tv_info.default_tvplayer_event_hook);});}
console_log("[END][StageShow]");};
var display_TOU_panel=function(){
if(tou_panel.starting_disp){
tou_panel.appear({mode:TOU_PANEL_MODE_STARTING});
brw_disp.brw.appear(brw_disp.param);}else{
browser_disp_starting();}
};
browser_disp_starting=function(){
brw_disp.set_bookmark(bookmark.data);
if((brw_disp.brw.appear(brw_disp.param)==1)
&&(brw_disp.brw.is_connect())){
brw_disp.direct_launch_load();
brw_disp.brw.show();}
brw_disp.full.create(brw_disp.full_param);
if(tou_panel.starting_disp){
function_bar.set_btn_state();}
};
var StageHide=function(obj){
smapho_listener.close();
socket_mgr.close();
brw_disp.disappear();
if(brw_disp.brw)brw_disp.brw.components.length=0;
bookmark.free();
function_bar.free();
discard_package("kbd");
discard_package("pkg_bookmark");
complete_off_stage(obj);};
var effect_out_key=TXK_RETURN;
common_effect_out=function(key){
console_log("[common_effect_out]");
if(DEF_SIDE_TV){
effect_out_key=key;
system.effect.fade(system.effect.FADE_OUT);
if(SHOW_TVINFO)del_default_stage_event_hook(tvplayer);
enable_keyhook=false;}else if(key==TXK_RED){
effect_out_key=key;
system.effect.fade(system.effect.FADE_OUT);
enable_keyhook=false;}else{
common_out_hook(key);}
};
var effect_hook=function(stage,obj,event){
console_log("[effect_hook]");
if(event==system.effect.FADE_OUT_END){
if(effect_out_key==TXK_RED){
return true;}
common_out_hook(effect_out_key);
return true;}
return false;};
var common_out_hook=function(key){
if(brw_disp.fg_boot_animation){
var bplayer=new BroadcastPlayer();
bplayer.stop_transit();
brw_disp.fg_boot_animation=false;}
for(var i=0;i<platinum_main.components.length;i++){
if(platinum_main.components[i].free)platinum_main.components[i].free();}
var bplayer=new BroadcastPlayer();
bplayer.set_browser_mode(BR_SRC_DEFAULT);
console_log("video box mode ( BR_SRC_DEFAULT )");
smapho_listener.close();
socket_mgr.close();
if(system.mdl_cfg.with_pen_support_web_browser)
system.touchpen.stop();
if(InputDevManager.get_pointer_status()){
InputDevManager.pointer_disappear();}
if(ebus&&ebus.asr&&ebus.asr.supported){
ebus.asr.set_listener(0);}
if(key==TXK_RETURN||(key==TXK_EXIT&&COUNTRY.indexOf("JP")==-1)){
var hb_mode=system.home_browser.get_mode();
if(hb_mode==system.home_browser.MODE_TV_BROWSER){
if(DEF_SIDE_TV){
system.effect.fade(system.effect.FADE_IN);}
launch_appli("0387878700000001");}else if((hb_mode==system.home_browser.MODE_HOME_MYSTREAM_BROWSER)||
(hb_mode==system.home_browser.MODE_TV_MYSTREAM_BROWSER)){
if(system.mdl_cfg.with_mystream&&
(key==TXK_RETURN||key==TXK_EXIT)){
launch_appli("0387878700000056");}
}
else {
this.visible_p=false;
on_stage("HOME");
}
}
else{

this.visible_p=false;
on_stage("HOME");
}
};
var return_func_from_apps=function(){
var mode=InputDevManager.get_move_mode();
InputDevManager.move_mode="";
InputDevManager.set_move_mode(mode);
brw_disp.brw.update_cursor_img();
system.cursor_pointer.force_show();};
var multitask_hook=function(){
var stg=arguments[0];
var obj=arguments[1];
var ev=arguments[2];
switch(ev){
case obj.POST_SUSPEND:
console_log("JS EV POST_SUSPEND  ("+stg.symbol+")");
smapho_listener.close();
socket_mgr.close();
return false;
case obj.PRE_RESUME:
console_log("JS EV PRE_RESUME    ("+stg.symbol+")");
smapho_listener.start();;
return false;
default:
console_log("JS EV UNKNOWN EVENT ("+stg.symbol+")");
return false;}
};
var obutton=0;
var left_action=false;
var mouse_hook=function(){
if((system.is_menu_launch())||(system.is_apps_launch())){
return false;}
var ret=false;
var button=arguments[3];
var mouse_pos_x=system.cursor_pointer.get_pos_x();
var mouse_pos_y=system.cursor_pointer.get_pos_y();
var display_mode=check_display_mode();
if(brw_disp.brw.asr_fg_link){
button=obutton;
return true;}
if(!InputDevManager.get_pointer_status()){
if((button&ebus.mouse.DOWN_LEFT_BUTTON)&&!(obutton&ebus.mouse.DOWN_LEFT_BUTTON)){
button=obutton;
return;}
if((button&ebus.mouse.DOWN_RIGHT_BUTTON)&&!(obutton&ebus.mouse.DOWN_RIGHT_BUTTON)){
button=obutton;
return;}
InputDevManager.pointer_appear();}

if(brw_disp.full.visible_p){
brw_disp.full.mouse_hook(arguments);
return false;}
if((NAGARA_LAUNCH)&&(brw_disp.brw.is_fullscreen())){
brw_disp.brw.mouse_hook_fullscreen(arguments);
return false;}
if((!enable_keyhook)&&(arguments[3]))
return true;

if(sft_kbd.visible_p){
sft_kbd.set_move_mode("free");
ret=sft_kbd.kbd_item.mouse_hook(arguments);}else{
if(popup_disp_mgr.is_disp()){
if(((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE))
&&(side_window.replace_bookmark_mode)){
ret=side_window.mouse_hook(arguments);}
}else if(tou_panel.is_disp()){
ret=tou_panel.mouse_hook(arguments);}else if(((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE))
&&(side_window.is_scroll_area())
&&(!search_engine.visible_p)&&(!guide_menu.visible_p)&&(!tou_panel.is_disp())
&&(!submenu.visible_p)
&&(!popup_disp_mgr.is_disp())){
ret=side_window.mouse_hook(arguments);}else{
if(((brw_disp.brw.is_disp())||(brw_disp.brw.is_loading()))
&&(!search_engine.visible_p)&&(!guide_menu.visible_p)&&(!tou_panel.is_disp())
&&(!submenu.visible_p)
&&!(((display_mode==DEF_NAGARA_COMN)||(display_mode==DEF_NAGARA_4K2K)||
(display_mode==DEF_NAGARA_COMN_CHANGE))
&&(side_window.replace_bookmark_mode))
&&(!popup_disp_mgr.is_disp())){
brw_disp.brw.mouse_hook(arguments);}
}
if(!(button&ebus.mouse.DOWN_LEFT_BUTTON)
&&!(obutton&ebus.mouse.DOWN_LEFT_BUTTON)){
var id=SearchObj(mouse_pos_x,mouse_pos_y);
if((id!=null)&&(pointer_table[id].obj)){
if((pointer_id==null)||(pointer_id!=id)){
if((pointer_id!=null)&&
(pointer_table[pointer_id])&&
(pointer_table[pointer_id].obj)){
if(typeof pointer_table[pointer_id].obj.mouseout=="function"){
pointer_table[pointer_id].obj.mouseout(pointer_table[pointer_id].obj);}
}
if(typeof pointer_table[id].obj.mouseover=="function"){
pointer_table[id].obj.mouseover(pointer_table[id].obj);}
pointer_id=id;}
}else{
if((pointer_id!=null)&&
(pointer_table[pointer_id])&&
(pointer_table[pointer_id].obj)){
if(typeof pointer_table[pointer_id].obj.mouseout=="function"){
pointer_table[pointer_id].obj.mouseout(pointer_table[pointer_id].obj);}
}
pointer_id=null;}
}
if((button&ebus.mouse.DOWN_LEFT_BUTTON)
&&!(obutton&ebus.mouse.DOWN_LEFT_BUTTON)){
var id=SearchObj(mouse_pos_x,mouse_pos_y);
if((id!=null)&&(pointer_table[id].obj)){
if((pointer_id==null)||(pointer_id!=id)){
if((pointer_id!=null)&&
(pointer_table[pointer_id])&&
(pointer_table[pointer_id].obj)){
if(typeof pointer_table[pointer_id].obj.mouseout=="function"){
pointer_table[pointer_id].obj.mouseout(pointer_table[pointer_id].obj);}
}
if(typeof pointer_table[id].obj.mouseover=="function"){
pointer_table[id].obj.mouseover(pointer_table[id].obj);}
pointer_id=id;}
}else{
if((pointer_id!=null)&&
(pointer_table[pointer_id])&&
(pointer_table[pointer_id].obj)){
if(typeof pointer_table[pointer_id].obj.mouseout=="function"){
pointer_table[pointer_id].obj.mouseout(pointer_table[pointer_id].obj);}
}
pointer_id=null;}
if(!brw_disp.brw.is_scrollbar_area()){
var id=SearchObj(mouse_pos_x,mouse_pos_y);
if((id!=null)&&(pointer_table[id].obj)){
if(typeof pointer_table[id].obj.action=="function"){
pointer_table[id].obj.action(pointer_table[id].obj);
brw_disp.brw.clear_asr_link("all");
ret=true;}
}else{
if(submenu.visible_p){
submenu.disappear();}
if(guide_menu.visible_p){
if(common_popup.visible_p){
common_popup.disappear(common_popup.return_cb,true);}else{
guide_menu.cancel_action();
force_redraw();}
}
if(search_engine.visible_p){
if(common_popup.visible_p){
common_popup.disappear(common_popup.return_cb,true);}else{
search_engine.disappear();}
}
}
left_action=true;}else{
if(guide_menu.visible_p){
if(common_popup.visible_p){
common_popup.disappear(common_popup.return_cb,true);}else{
guide_menu.cancel_action();
force_redraw();}
left_action=true;}
if(search_engine.visible_p){
if(common_popup.visible_p){
common_popup.disappear(common_popup.return_cb,true);}else{
search_engine.disappear();}
left_action=true;}
}
}else if(!(button&ebus.mouse.DOWN_LEFT_BUTTON)
&&(obutton&ebus.mouse.DOWN_LEFT_BUTTON)){
if(!brw_disp.brw.get_drag_scroll_mode()&&!left_action){
if(brw_disp.brw.is_scrollbar_area()){
var id=SearchObj(mouse_pos_x,mouse_pos_y);
if((id!=null)&&(pointer_table[id].obj)){
if(typeof pointer_table[id].obj.action=="function"){
pointer_table[id].obj.action(pointer_table[id].obj);
ret=true;}
}else{
if(submenu.visible_p){
submenu.disappear();}
}
left_action=false;}
}else{
brw_disp.brw.set_drag_scroll_mode(false);
left_action=false;}
}else if((button&ebus.mouse.DOWN_RIGHT_BUTTON)
&&!(obutton&ebus.mouse.DOWN_RIGHT_BUTTON)){
var id=SearchObj(mouse_pos_x,mouse_pos_y);
if((id!=null)&&(pointer_table[id].obj)){
if(typeof pointer_table[id].obj.right_mousedown=="function"){
pointer_table[id].obj.right_mousedown(pointer_table[id].obj);}
}
}
}
if(!(button&ebus.mouse.DOWN_LEFT_BUTTON)
&&!(button&ebus.mouse.DOWN_RIGHT_BUTTON)){
point_base.edge_state=false;
if(mouse_pos_y<=-525){
point_base.edge_state=true;}
if(mouse_pos_x>=944){
point_base.edge_state=true;}
if(point_base.edge_state){
delete_timer(point_base);
point_base.disappear();
if(!brw_disp.scroll_state){
append_timer(point_base,300,function(obj,count){
delete_timer(obj);
if((obj.edge_state)&&(!brw_disp.scroll_state)){
obj.appear();}
});}
}else{
point_base.disappear();}
}else{
point_base.edge_state=true;
point_base.disappear();}
if(brw_disp.scroll_state){
brw_disp.brw.focus_obj.setShow(false);brw_disp.brw.tts_stop();
return true;}
if((button&ebus.mouse.DOWN_LEFT_BUTTON)
&&!(obutton&ebus.mouse.DOWN_LEFT_BUTTON)&&(!ret)){
if((popup_disp_mgr.is_disp())||(tou_panel.is_disp())){
var obj=platinum_main.cursor;
if(obj.cursor&&(typeof obj.cursor.action=="function"))
obj.cursor.action(obj.cursor);}
}
obutton=button;
return ret;};
var usb_key_hook=function(){
console_log("[START][usb_key_hook]");
console_log("[ROOT][usb_key_hook]"+arguments);
pkg_browser.usb_kbd.key_hook(arguments);};
mybutton_profile_id=-99;
var mybutton_ev_hook=function(){
InputDevManager.set_move_mode("free");
console.log('mybutton_ev_hook');
console.log(arguments[2]);
if(arguments[2]==system.mybutton.EV_UPDATE_FAVORITE){
var key=arguments[3];
var pid=arguments[4];
var reg=(arguments[5]==1)?system.mybutton.REGIST:system.mybutton.UNREGIST;
system.mybutton.set_fav_status_by_profid(12,key,pid,reg);
if(bookmark.get_index_all_from_url()==-1){
mybutton_profile_id=pid;
function_bar.add_bookmark_action();
return;}
var obj=system.mybutton.get_fav_content_usr_list(key);
var index=bookmark.get_index_from_url();
var url=key.slice("bookmark://".length);
if(obj.length>1){
if(obj[0]==-1){
obj.splice(0,1);
system.mybutton.set_fav_status_by_profid(
12,key,-1,system.mybutton.UNREGIST);}
bookmark.update_all_data(url,[].concat(obj),reg);
bookmark.get_bookmark_req();
side_window.update_data();
side_window.reset_data();}else{
bookmark.update_all_data(url,[].concat(obj),reg);
bookmark.get_bookmark_req();
side_window.update_data();
side_window.reset_data();}
}
}
var mybutton_action=function(){
var index=bookmark.get_index_all_from_url();
var pid=-1;
if(index>=0){
pid=bookmark.all_data.bookmarkpanel[index].profile_id;}else{
if(bookmark.all_data.bookmarkpanel.length>=BOOK_MARK_MAX){
brw_disp.show_popup_cb({type:BROWSER_ERROR_EV},9990);
return;}
}
InputDevManager.set_move_mode("key");
function_bar.clear_drag_mode();
var url_dt="bookmark://"+URL_STR;
system.mybutton.invoke_mybutton(url_dt,"["+pid+"]",
USER_PROFILE_ID,system.mybutton.LAUNCH_FROM_BROWSER);
add_event_hook(system.mybutton,mybutton_ev_hook);}
var key_hook=function (up_down,key){
if((system.is_menu_launch())||(system.is_apps_launch())){
if(!((key==TXK_MIC_TP)||(key==TXK_MIC_NRC)||(key==TXK_MIC_EMB))){
return false;}
}
if(up_down==KEY_PRESS){
if((key==TXK_UP)||(key==TXK_DOWN)||(key==TXK_LEFT)||(key==TXK_RIGHT)){
if(InputDevManager.get_pointer_status()){
InputDevManager.pointer_disappear();}
}
}
if(!enable_keyhook)return true;
if((key==TXK_HOME)&&(up_down==KEY_PRESS)){
common_effect_out(TXK_HOME);
return true;}
if((key==TXK_EXIT)&&(up_down==KEY_DOWN)){
common_effect_out(TXK_EXIT);
return false;}
if(this.cursor&&this.cursor.key_hook&&this.cursor.key_hook(up_down,key)){
if(up_down==KEY_PRESS){
force_redraw();
if((key==TXK_ENTER)||(key==TXK_RETURN)){
console_log("[key_hook]sound");}
}
return true;}
if(DEF_MULTI_USER){
if((key==TXK_MYBUTTON)&&(up_down==KEY_UP)){
if((!sft_kbd.visible_p)&&(!submenu.visible_p)&&
(!search_engine.visible_p)&&(!guide_menu.visible_p)&&
(!popup_disp_mgr.is_disp())&&(!tou_panel.is_disp())){
mybutton_action();
return true;}
}
}

if(up_down==KEY_PRESS){
if((!sft_kbd.visible_p)&&(!popup_disp_mgr.is_disp())
&&(!tou_panel.visible_p)){
switch(key){
case get_COLOR_KEY(0).symbol:
if(DEF_CHANGE_SCREEN){
function_bar.ary_item[FUNC_CHANGE_SCREEN].action();
return true;}
break;
case get_COLOR_KEY(1).symbol:
function_bar.ary_item[FUNC_REDUNTION].action();
return true;
case get_COLOR_KEY(2).symbol:
function_bar.ary_item[FUNC_ENLARGE].action();
return true;
case get_COLOR_KEY(3).symbol:
function_bar.ary_item[FUNC_DRAG].action();
return true;
case TXK_RETURN:
function_bar.ary_item[FUNC_BACK].action();
return true;
default:
break;}
if(ebus.asr&&ebus.asr.supported){
if((key==TXK_MIC_TP)||(key==TXK_MIC_NRC)||(key==TXK_MIC_EMB)){
ebus.asr.req_recog(ebus.asr.DIC_TYPE_BROWSER,key,0);
return true;}
}
}
}
return false;}
bookmark_bg_image=new gimage({translate:[0,0,-1661.036724459*2],width:SCREEN_WIDTH*3,height:SCREEN_HEIGHT*3,
src:PALTINUM_PATH_IMG+"bookmark_bg.png",draw_type:DIRECT});
var platinum_main=stage({
"symbol":"platinum_main",
"in":
[
{
"from":["default"],
"hook":StageShow,
},
],
"out":
[
{
"to":["default"],
"hook":StageHide,
},
],
"bg_image":[
bookmark_bg_image,
],
"components":[
animation_mask,
brw_disp,
function_bar,
side_window,
bookmark,
pop_show_url,
submenu,
MultiUserSelection,
MultiUserFavorite,
search_engine,
guide_menu,
tou_panel,
textarea_box,
prompt,
digest_auth,
error_popup,
common_popup,
loading,
Cursor,
under_mask,
sft_kbd,
tooltip_item,
point_base
],
"key_hook":key_hook,
});
if(NAGARA_LAUNCH){
var brw_bg_image=new gbox({width:1920,height:1080,color:[0,0,0,255]});
platinum_main.bg_image.unshift(brw_bg_image);}
PLATINUM_MAIN_READY=true;

