ERROR:



Javascript not activated





**u000d****u000a** debug(loadBrandHotpsot, %1, %2, %3, %4, %5, %6);**u000d****u000a** **u000d****u000a** addhotspot(%1);**u000d****u000a**set(hotspot[%1].url, **u0027**https://s3.amazonaws.com/in3sixty-project-media/in3sixty-staging/5b335d5633838144e430012e/DA-Currie-Cup-Super-Sport-Banners-20180629160332.gif?v=9490**u0027**);**u000d****u000a**set(hotspot[%1].zorder,50);**u000d****u000a**set(hotspot[%1].align,center);**u000d****u000a**set(hotspot[%1].ath,%2);**u000d****u000a**set(hotspot[%1].atv,%3);**u000d****u000a**set(hotspot[%1].width,%4);**u000d****u000a**set(hotspot[%1].height,%5);**u000d****u000a**set(hotspot[%1].rotate,%6);**u000d****u000a**set(hotspot[%1].handcursor,true);**u000d****u000a**set(hotspot[%1].enabled,true);**u000d****u000a**set(hotspot[%1].distorted,true);**u000d****u000a**set(hotspot[%1].visible,true);**u000d****u000a**set(hotspot[%1].alpha,0);**u000d****u000a**set(hotspot[%1].zoom,true);**u000d****u000a**set(hotspot[%1].onclick, openurl(**u0027**https://ad.doubleclick.net/ddm/trackclk/N417007.289800DQNA16/B21581260.227314740;dc_trk_aid=425251838;dc_trk_cid=104923427;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=**u0027**,_blank); js(xml_log(other, brand-website-called,,1)); );**u000d****u000a** **u000d****u000a**

**u000d****u000a** debug(**u0027**loadMainSceneBrandHotspots**u0027**);**u000d****u000a** **u000d****u000a** loadBrandHotspot(**u0027**led_hotspot_one**u0027**, -121.9, -0.2, 9, 270, 91);**u000d****u000a** loadBrandHotspot(**u0027**led_hotspot_two**u0027**, -97.61, 0.6, 17, 735, 90);**u000d****u000a** loadBrandHotspot(**u0027**led_hotspot_three**u0027**, -55, 0.1, 15, 290, 89);**u000d****u000a**

**u000d****u000a** debug(**u0027**removeMainSceneBrandHotspots**u0027**);**u000d****u000a** removehotspot(**u0027**led_hotspot_one**u0027**);**u000d****u000a** removehotspot(**u0027**led_hotspot_two**u0027**);**u000d****u000a** removehotspot(**u0027**led_hotspot_three**u0027**);**u000d****u000a**

TODO add more init settings/variables here */ /* post xml parsing vars i.e. get(startscene);*/ var vars = {}; vars.idletime = 2; vars.currScene = "field-view"; vars.projectId = "5ba1f73f28f55b3d91bcd00b"; vars.fancamId = "5ba1f73f28f55b3d91bcd00b"; // backwards compatable vars.APIPATH = "https://directaxis.fancam.com/api"; vars.THEMEPATH = "https://s3.amazonaws.com/in3sixty-themes/basic-fancam"; vars.PUBLICPATH = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/public" vars.STARTSCENE = "field-view"; vars.NOCACHE = "966"; vars.RAND = "1361"; vars.visibility = "live"; vars.event = {"name":"DirectAxis Fancam: DHL Western Province vs Cell C Sharks","shortname":"DHL Western Province vs Cell C Sharks","date":"2018-09-29T00:00:00.000Z","category":"Other","venue":"Newlands Rugby Stadium","city":"Cape Town","country":"South Africa","featuring":"WP ,Sharks","keywords":"Currie Cup ,Direct Axis"}; vars.relatedProjects = []; vars.relatedProjects[0] = { name:"DirectAxis Fancam: DHL Western Province vs Cell C Sharks", shortname:"DHL Western Province vs Cell C Sharks", url:"https://directaxis.fancam.com/201810227" }; vars.relatedProjects[1] = { name:"DirectAxis Fancam: Cell C Sharks vs Xerox Golden Lions", shortname:"Cell C Sharks vs Xerox Golden Lions", url:"https://directaxis.fancam.com/201810201" }; vars.relatedProjects[2] = { name:"DirectAxis Fancam: DHL Western Province vs Vodacom Blue Bulls", shortname:"DHL Western Province vs Vodacom Blue Bulls", url:"https://directaxis.fancam.com/201810202" }; vars.relatedProjects[3] = { name:"DirectAxis Fancam: DHL Western Province vs Cell C Sharks", shortname:"DHL Western Province vs Cell C Sharks", url:"https://directaxis.fancam.com/20180929" }; vars.relatedProjects[4] = { name:"DirectAxis Fancam: Cell C Sharks vs Xerox Golden Lions", shortname:"Cell C Sharks vs Xerox Golden Lions", url:"https://directaxis.fancam.com/20180922" }; vars.relatedProjects[5] = { name:"DirectAxis Fancam: Xerox Golden Lions vs DHL Western Province", shortname:"Xerox Golden Lions vs DHL Western Province", url:"https://directaxis.fancam.com/20180915" }; vars.relatedProjects[6] = { name:"DirectAxis Fancam: Xerox Golden Lions vs Toyota Free State Cheetahs", shortname:"Xerox Golden Lions vs Toyota Free State Cheetahs", url:"https://directaxis.fancam.com/20180908" }; vars.relatedProjects[7] = { name:"DirectAxis Fancam: Vodacom Blue Bulls vs Xerox Golden Lions", shortname:"Vodacom Blue Bulls vs Xerox Golden Lions", url:"https://directaxis.fancam.com/20180901" }; vars.relatedProjects[8] = { name:"DirectAxis Fancam: DHL Western Province vs Toyota Free State Cheetahs", shortname:"DHL Western Province vs Toyota Free State Cheetahs", url:"https://directaxis.fancam.com/20180825" }; vars.relatedProjects[9] = { name:"Currie Cup Rugby - DHL Western Province vs Cell C Sharks", shortname:"DHL Western Province vs Cell C Sharks", url:"https://directaxis.fancam.com/20171028" }; vars.relatedProjects[10] = { name:"Currie Cup Rugby - DHL Western Province vs Xerox Golden Lions", shortname:"DHL Western Province vs Xerox Golden Lions", url:"https://directaxis.fancam.com/20171021" }; vars.relatedProjects[11] = { name:"Currie Cup Rugby - False Bay RFC vs Progress George", shortname:"False Bay RFC vs Progress George", url:"https://directaxis.fancam.com/20171014" }; vars.relatedProjects[12] = { name:"Currie Cup Rugby - Xerox Golden Lions vs DHL Western Province", shortname:"Xerox Golden Lions vs DHL Western Province", url:"https://directaxis.fancam.com/20171008" }; vars.relatedProjects[13] = { name:"Currie Cup Rugby - DHL Western Province vs Tafel Lager Griquas", shortname:" DHL Western Province vs Tafel Lager Griquas", url:"https://directaxis.fancam.com/20170923" }; vars.relatedProjects[14] = { name:"Currie Cup Rugby - Xerox Golden Lions vs Vodacom Blue Bulls", shortname:"Xerox Golden Lions vs Vodacom Blue Bulls", url:"https://directaxis.fancam.com/20170916" }; vars.relatedProjects[15] = { name:"Currie Cup Rugby - DHL Western Province vs Toyota Free State Cheetahs", shortname:"DHL Western Province vs Toyota Free State Cheetahs", url:"https://directaxis.fancam.com/20170909" }; vars.relatedProjects[16] = { name:"Currie Cup Rugby - DHL Western Province vs Cell C Sharks", shortname:"DHL Western Province vs Cell C Sharks", url:"https://directaxis.fancam.com/20170826" }; vars.query = {}; vars.query.s = "field-view"; /* ---> TODO add more startup settings/variables here */ /* stored options */ vars.options = {}; vars.options.show_splash_onstart = false; // type=boolean vars.options.more_fancams_enabled = true; // type=boolean vars.options.share_view_enabled = true; // type=boolean vars.options.video_booth_enabled = true; // type=boolean vars.options.ecard_enabled = true; // type=boolean vars.options.wally_comp_enabled = false; // type=boolean vars.options.webvr_enabled = true; // type=boolean vars.options.banner_enabled = true; // type=boolean vars.options.banner_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/logo-20180628095449.png?v=%$NOCACHE%"; // type=image unescaped vars.options.banner_website_link = decodeSingleQuoteSafeString('https://ad.doubleclick.net/ddm/trackclk/N417007.289800DQNA16/B21581260.227064788;dc_trk_aid=425251079;dc_trk_cid=104923427;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=');// type=string vars.options.side_banner_enabled = true; // type=boolean vars.options.side_banner_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5ba1f73f28f55b3d91bcd00b/DA_CurrieCup_banner-20181017174248.gif?v=%$NOCACHE%"; // type=image unescaped vars.options.side_banner_website_link = decodeSingleQuoteSafeString('https://ad.doubleclick.net/ddm/trackclk/N417007.289800DQNA16/B21581260.227321757;dc_trk_aid=425251544;dc_trk_cid=104923427;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=');// type=string vars.options.favicon_image = decodeSingleQuoteSafeString('https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/fav-icon-20180628095512.png');// type=favicon vars.options.favicon_html = decodeSingleQuoteSafeString('');// type=string vars.options.email_header_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/logo-20180821190624.png?v=%$NOCACHE%"; // type=image unescaped vars.options.login_facebook_enabled = true; // type=boolean vars.options.login_email_enabled = true; // type=boolean vars.options.login_share_enabled = false; // type=boolean vars.options.main_font_family = decodeSingleQuoteSafeString('Roboto');// type=string vars.options.main_font_url = decodeSingleQuoteSafeString('https://fonts.googleapis.com/css?family=Roboto:400,700');// type=string vars.options.second_font_family = decodeSingleQuoteSafeString('PT Sans, sans-serif');// type=string vars.options.second_font_url = decodeSingleQuoteSafeString('https://fonts.googleapis.com/css?family=PT+Sans');// type=string vars.options.loader_bg_color = "0xffffff" ;// type=color vars.options.header_txt_color = "0xffffff" ;// type=color vars.options.title_txt_color = "0xffffff" ;// type=color vars.options.subtitle_txt_color = "0xffffff" ;// type=color vars.options.header_icon_color = "0xffffff" ;// type=color vars.options.footer_icon_color = "0xffffff" ;// type=color vars.options.footer_btn_bg_color = "0x1d5e4a" ;// type=color vars.options.footer_tag_color = "0xffffff" ;// type=color vars.options.btn_close_color = "0xffffff" ;// type=color vars.options.btn_close_color_hover = "0xc53b33" ;// type=color vars.options.btn_txt_color = "0xffffff" ;// type=color vars.options.btn_color = "0x1d5e4a" ;// type=color vars.options.btn_color_hover = "0xc53b33" ;// type=color vars.options.btn_color_disabled = "0x2b9374" ;// type=color vars.options.btn_color_disabled_hover = "0xe9453d" ;// type=color vars.options.splash_btn_txt = "0x1d5e4a" ;// type=color vars.options.splash_btn_color = "0xffffff" ;// type=color vars.options.splash_active_color = "0xc53b33" ;// type=color vars.options.splash_btn_txt_hover = "0xffffff" ;// type=color vars.options.splash_btn_color_hover = "0xc53b33" ;// type=color vars.options.splash_btn_cs_color = "0x1d5e4a" ;// type=color vars.options.splash_btn_cs_txt = "0xffffff" ;// type=color vars.options.menu_txt_color = "0xffffff" ;// type=color vars.options.menu_main_btn_color = "0x1d5e4a" ;// type=color vars.options.menu_btn_color = "0x1d5e4a" ;// type=color vars.options.menu_bg_color = "0x1d5e4a" ;// type=color vars.options.menu_close_color = "0xffffff" ;// type=color vars.options.menu_divider_color = "0x808084" ;// type=color vars.options.header_bg_color = "0x1d5e4a" ;// type=color vars.options.popup_bg_color = "0x124435" ;// type=color vars.options.popup_txt_color = "0xffffff" ;// type=color vars.options.backdrop_color = "0x000000" ;// type=color vars.options.tagging_enabled = true; // type=boolean vars.options.tagging_place_your_face = false; // type=boolean vars.options.tagging_disable_emails = false; // type=boolean vars.options.multitags_enabled = true; // type=boolean vars.options.sharetagtofacebook = true; // type=boolean vars.options.neutral_tag_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/neutral-20180628095602.png?v=%$NOCACHE%"; // type=image unescaped vars.options.team1_tag_enabled = true; // type=boolean vars.options.team1_tag_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b8d0e525d2eb514122b4c5c/team_2-20180910165030.png?v=%$NOCACHE%"; // type=image unescaped vars.options.team2_tag_enabled = true; // type=boolean vars.options.team2_tag_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5ba1f73f28f55b3d91bcd00b/team-1-20180919071747.png?v=%$NOCACHE%"; // type=image unescaped vars.options.tagcounter_enabled = true; // type=boolean vars.options.tagcounter_min = decodeSingleQuoteSafeString('0');// type=string vars.options.tagging_disabled_scenes = decodeSingleQuoteSafeString('locker-room');// type=string vars.options.seperate_tags_per_scene = true; // type=boolean vars.options.place_your_face_tag_size = decodeSingleQuoteSafeString('5');// type=string vars.options.tags_load_mode = decodeSingleQuoteSafeString('mixed');// type=string vars.options.tag_sensitivity = decodeSingleQuoteSafeString('5');// type=string vars.options.tag_min_update_time = decodeSingleQuoteSafeString('2000');// type=string vars.options.tags_max = decodeSingleQuoteSafeString('50');// type=string vars.options.tags_max_fov = decodeSingleQuoteSafeString('50');// type=string vars.options.tags_fov_distance = decodeSingleQuoteSafeString('5');// type=string vars.options.tags_persistent = decodeSingleQuoteSafeString('50');// type=string vars.options.tags_per_update = decodeSingleQuoteSafeString('25');// type=string vars.options.character_team1_hat1_overlay = "%$THEMEPATH%/assets/img/face/head-team1-hat1.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team1_hat1_overlay_icon = "%$THEMEPATH%/assets/img/face/head-team1-hat1-icon.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team1_hat2_overlay = "%$THEMEPATH%/assets/img/face/head-team1-hat2.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team1_hat2_overlay_icon = "%$THEMEPATH%/assets/img/face/head-team1-hat2-icon.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team1_shirt1_overlay = "%$THEMEPATH%/assets/img/face/body-team1-shirt1.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team1_shirt1_overlay_icon = "%$THEMEPATH%/assets/img/face/body-team1-shirt1-icon.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team1_shirt2_overlay = "%$THEMEPATH%/assets/img/face/body-team1-shirt2.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team1_shirt2_overlay_icon = "%$THEMEPATH%/assets/img/face/body-team1-shirt2-icon.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team2_hat1_overlay = "%$THEMEPATH%/assets/img/face/head-team2-hat1.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team2_hat1_overlay_icon = "%$THEMEPATH%/assets/img/face/head-team2-hat1-icon.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team2_hat2_overlay = "%$THEMEPATH%/assets/img/face/head-team2-hat2.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team2_hat2_overlay_icon = "%$THEMEPATH%/assets/img/face/head-team2-hat2-icon.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team2_shirt1_overlay = "%$THEMEPATH%/assets/img/face/body-team2-shirt1.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team2_shirt1_overlay_icon = "%$THEMEPATH%/assets/img/face/body-team2-shirt1-icon.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team2_shirt2_overlay = "%$THEMEPATH%/assets/img/face/body-team2-shirt2.png?v=%$NOCACHE%"; // type=image unescaped vars.options.character_team2_shirt2_overlay_icon = "%$THEMEPATH%/assets/img/face/body-team2-shirt2-icon.png?v=%$NOCACHE%"; // type=image unescaped vars.options.scene_switcher_enabled = false; // type=boolean vars.options.scenes_in_menu_enabled = true; // type=boolean vars.options.scene_labels_enabled = false; // type=boolean vars.options.scene_slideshow_enabled = false; // type=boolean vars.options.same_view_position_for_scenes = false; // type=boolean vars.options.scene_switcher_menu_button = true; // type=boolean vars.options.scenes_slideshow_speed = decodeSingleQuoteSafeString('3');// type=string vars.options.scenes_slideshow_blend_time = decodeSingleQuoteSafeString('1.5');// type=string vars.options.interface_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/interface-20180628114623.png?v=%$NOCACHE%"; // type=image unescaped vars.options.tutorial_zoom_image = "%$THEMEPATH%/assets/img/tutorial_zoom.png?v=%$NOCACHE%"; // type=image unescaped vars.options.tutorial_move_image = "%$THEMEPATH%/assets/img/tutorial_move.png?v=%$NOCACHE%"; // type=image unescaped vars.options.tutorial_mobi_image = "%$THEMEPATH%/assets/img/tutorial_mobile.png?v=%$NOCACHE%"; // type=image unescaped vars.options.menu_buttons_show_icons = true; // type=boolean vars.options.menu_buttons_width = decodeSingleQuoteSafeString('185');// type=string vars.options.vr_audio_background_enabled = false; // type=boolean vars.options.vr_audio_background_file = ""; // type=file unescaped vars.options.vr_audio_background_volume = decodeSingleQuoteSafeString('0.4');// type=string vars.options.video1_enabled = true; // type=boolean vars.options.video_url_1 = decodeSingleQuoteSafeString('SslwHP7Wq6c');// type=string vars.options.video_image_1 = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/videoThumbnail_1-20180817093300.png?v=%$NOCACHE%"; // type=image unescaped vars.options.video2_enabled = true; // type=boolean vars.options.video_url_2 = decodeSingleQuoteSafeString('rOZflJ7sal8');// type=string vars.options.video_image_2 = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/videoThumbnail_2-20180817093339.png?v=%$NOCACHE%"; // type=image unescaped vars.options.video3_enabled = true; // type=boolean vars.options.video_url_3 = decodeSingleQuoteSafeString('pRqJnO6RWpk');// type=string vars.options.video_image_3 = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/videoThumbnail_19-20180903103359.png?v=%$NOCACHE%"; // type=image unescaped vars.options.video4_enabled = false; // type=boolean vars.options.video_url_4 = decodeSingleQuoteSafeString('vPXmfqRp4k4');// type=string vars.options.video_image_4 = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/videoThumbnail_4-20180628095905.png?v=%$NOCACHE%"; // type=image unescaped vars.options.video5_enabled = false; // type=boolean vars.options.video_url_5 = decodeSingleQuoteSafeString('zLmPMyguZBo');// type=string vars.options.video_image_5 = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/videoThumbnail_5-20180628095917.png?v=%$NOCACHE%"; // type=image unescaped vars.options.comp_hidden_object = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/comp_object-20180628095718.png?v=%$NOCACHE%"; // type=image unescaped vars.options.comp_prize = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/comp_object-20180628095728.png?v=%$NOCACHE%"; // type=image unescaped vars.options.mob_comp_btn_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/comp_object-20180817093410.png?v=%$NOCACHE%"; // type=image unescaped vars.options.age_gate_enabled = false; // type=boolean vars.options.age_gate_age = decodeSingleQuoteSafeString('21');// type=string vars.options.tel_number_enabled = true; // type=boolean vars.options.address_enabled = false; // type=boolean vars.options.address_country_enabled = false; // type=boolean vars.options.comp_disable_emails = false; // type=boolean vars.options.client_promotions_enabled = false; // type=boolean vars.options.client_link = false; // type=boolean vars.options.client_link_url = decodeSingleQuoteSafeString('');// type=string vars.options.comp_hotspot_1_enabled = true; // type=boolean vars.options.comp_hotspot_1_ath = decodeSingleQuoteSafeString('103.56');// type=string vars.options.comp_hotspot_1_atv = decodeSingleQuoteSafeString('1.53');// type=string vars.options.comp_hotspot_1_scale = decodeSingleQuoteSafeString('0.04');// type=string vars.options.comp_hotspot_1_crop = decodeSingleQuoteSafeString('0|0|300|300');// type=string vars.options.comp_hotspot_2_enabled = false; // type=boolean vars.options.comp_hotspot_2_ath = decodeSingleQuoteSafeString('-128.48');// type=string vars.options.comp_hotspot_2_atv = decodeSingleQuoteSafeString('-2.02');// type=string vars.options.comp_hotspot_2_scale = decodeSingleQuoteSafeString('0.04');// type=string vars.options.comp_hotspot_2_crop = decodeSingleQuoteSafeString('0|0|300|300');// type=string vars.options.comp_hotspot_3_enabled = false; // type=boolean vars.options.comp_hotspot_3_ath = decodeSingleQuoteSafeString('-118.48');// type=string vars.options.comp_hotspot_3_atv = decodeSingleQuoteSafeString('-2.02');// type=string vars.options.comp_hotspot_3_scale = decodeSingleQuoteSafeString('0.04');// type=string vars.options.comp_hotspot_3_crop = decodeSingleQuoteSafeString('0|0|300|300');// type=string vars.options.comp_hotspot_4_enabled = false; // type=boolean vars.options.comp_hotspot_4_ath = decodeSingleQuoteSafeString('-100.48');// type=string vars.options.comp_hotspot_4_atv = decodeSingleQuoteSafeString('-2.02');// type=string vars.options.comp_hotspot_4_scale = decodeSingleQuoteSafeString('0.04');// type=string vars.options.comp_hotspot_4_crop = decodeSingleQuoteSafeString('0|0|300|300');// type=string vars.options.comp_hotspot_5_enabled = false; // type=boolean vars.options.comp_hotspot_5_ath = decodeSingleQuoteSafeString('-100.48');// type=string vars.options.comp_hotspot_5_atv = decodeSingleQuoteSafeString('-2.02');// type=string vars.options.comp_hotspot_5_scale = decodeSingleQuoteSafeString('0.04');// type=string vars.options.comp_hotspot_5_crop = decodeSingleQuoteSafeString('0|0|300|300');// type=string vars.options.custom_actions_xml = decodeSingleQuoteSafeString('**u000d****u000a****u000d****u000a****u000d****u000a****u000d****u000a****u000d****u000a****u000d****u000a****u000d****u000a****u000d****u000a**');// type=string vars.options.on_scene_loaded_custom_xml = decodeSingleQuoteSafeString('debug(onSceneLoaded, %1);**u000d****u000a**if (**u0027**%1**u0027** EQ **u0027**field-view**u0027**,**u000d****u000a** loadFieldViewBrandHotspots();**u000d****u000a** ,**u000d****u000a** removeFieldViewBrandHotspots();**u000d****u000a**);');// type=string vars.options.on_scene_loaded_end_custom_xml = decodeSingleQuoteSafeString('');// type=string vars.options.on_startup_custom_xml = decodeSingleQuoteSafeString('');// type=string vars.options.on_startup_end_custom_xml = decodeSingleQuoteSafeString('');// type=string vars.options.on_interface_loaded_xml = decodeSingleQuoteSafeString('LoadCompButtonIcon();');// type=string vars.options.on_window_resized_xml = decodeSingleQuoteSafeString('');// type=string vars.options.head_html = decodeSingleQuoteSafeString('');// type=string vars.options.body_html = decodeSingleQuoteSafeString('**u000d****u000a****u000d****u000a**');// type=string vars.options.footer_html = decodeSingleQuoteSafeString('');// type=string /* in an application browser (Facebook/Twitter) */ /* * i18n (international) strings for krpano. */ vars.i18n = {}; vars.i18n.en = {}; vars.i18n.en.site_title = decodeSingleQuoteSafeString('Direct Axis Currie Cup Fancam');// type=string vars.i18n.en.site_description = decodeSingleQuoteSafeString('DirectAxis is bringing Fancam to the #CurrieCup this season! Zoom, tag, and share to stand a chance to win R1000 every week. Find the hidden Currie Cup to stand a chance to win awesome prizes! #DirectAxisFancam ');// type=string vars.i18n.en.share_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5ba1f73f28f55b3d91bcd00b/cps-image-20180919071613.png"; // type=image unescaped vars.i18n.en.site_title_fb = decodeSingleQuoteSafeString('Click the Post button now to enter the competition for a R1000 shopping voucher!');// type=string vars.i18n.en.site_description_fb = decodeSingleQuoteSafeString('The DirectAxis FanCam is back at the Currie Cup! Zoom in, tag yourself and share your pic on Facebook and you could win a R1000 shopping voucher. Winners announced every Thursday on the DirectAxis Facebook page. Then play Find the Cup to stand a chance of getting a VIP experience at the Currie Cup Finals #DirectAxisFancam #WhereLegendsRise #wpjoulekkerding');// type=string vars.i18n.en.site_title_twtr = decodeSingleQuoteSafeString('Click the Post button now to enter the competition for a R1000 shopping voucher!');// type=string vars.i18n.en.site_description_twtr = decodeSingleQuoteSafeString('Explore the ultimate crowd selfie of Saturday**u0027**s Currie Cup game! #DirectAxisFancam #WhereLegendsRise #wpjoulekkerding');// type=string vars.i18n.en.twtr_handle = decodeSingleQuoteSafeString('#DirectAxisFancam ');// type=string vars.i18n.en.share_title_email = decodeSingleQuoteSafeString('DirectAxis FanCam - The Ultimate Crowd Selfie');// type=string vars.i18n.en.share_description_email = decodeSingleQuoteSafeString('Click here to have a look at what I found on this incredible, interactive, 360-degree image taken on Saturday, by the DirectAxis FanCam! You can zoom in and explore every part of it, tag yourself and share what you find via email, Facebook and Twitter! Great prizes up for grabs at directaxis.fancam.com.');// type=string vars.i18n.en.string_splash_notify = decodeSingleQuoteSafeString('');// type=string vars.i18n.en.string_character_texts_btn = decodeSingleQuoteSafeString('Character Selfie ');// type=string vars.i18n.en.string_cutout_texts_btn = decodeSingleQuoteSafeString('Custom Cutout');// type=string vars.i18n.en.siteloader_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5ba1f73f28f55b3d91bcd00b/site-loader-20180919071700.gif?v=%$NOCACHE%"; // type=image unescaped vars.i18n.en.overlay_default_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5ba1f73f28f55b3d91bcd00b/ecardShareFrame-20180919071722.png?v=%$NOCACHE%"; // type=image unescaped vars.i18n.en.overlay_sview_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5ba1f73f28f55b3d91bcd00b/ecardShareFrame-20180919071726.png?v=%$NOCACHE%"; // type=image unescaped vars.i18n.en.overlay_tview_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5ba1f73f28f55b3d91bcd00b/ecardShareFrame-20180919071730.png?v=%$NOCACHE%"; // type=image unescaped vars.i18n.en.ecard_frame = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/ecard_frame-20180628100026.png?v=%$NOCACHE%"; // type=image unescaped vars.i18n.en.overlay_ecard_view_image = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5ba1f73f28f55b3d91bcd00b/ecardShareFrame-20180919071735.png?v=%$NOCACHE%"; // type=image unescaped vars.i18n.en.string_tagyourself_button = decodeSingleQuoteSafeString('TAG [br/] [div style=**u0027**font-size:20px;**u0027**] YOURSELF [/div]');// type=string vars.i18n.en.string_tagyourself_button_mobile = decodeSingleQuoteSafeString('TAG [br/] [div style=**u0027**font-size:30px;**u0027**] YOURSELF [/div]');// type=string vars.i18n.en.string_take_a_seat_button = decodeSingleQuoteSafeString('TAKE [br/] [div style=**u0027**font-size:20px;**u0027**] A SEAT [/div]');// type=string vars.i18n.en.string_take_a_seat_button_mobile = decodeSingleQuoteSafeString('TAKE [br/] [div style=**u0027**font-size:30px;**u0027**] A SEAT [/div]');// type=string vars.i18n.en.string_return_tot_fc_button = decodeSingleQuoteSafeString('RETURN TO [br/] [div style=**u0027**font-size:20px;**u0027**] FANCAM [/div]');// type=string vars.i18n.en.string_return_to_fc_button_mobile = decodeSingleQuoteSafeString('RETURN TO [br/] [div style=**u0027**font-size:30px;**u0027**] FANCAM [/div]');// type=string vars.i18n.en.more_fc_title = decodeSingleQuoteSafeString('View More Fancams');// type=string vars.i18n.en.more_scenes_title = decodeSingleQuoteSafeString('More Scenes');// type=string vars.i18n.en.string_videobooth = decodeSingleQuoteSafeString('The Future of Rugby');// type=string vars.i18n.en.string_ecard = decodeSingleQuoteSafeString('Digital Postcard');// type=string vars.i18n.en.string_ecard_instruct = decodeSingleQuoteSafeString('Use the controls to find yourself and snap your selfie, then share it with friends!');// type=string vars.i18n.en.string_ecard_confirm = decodeSingleQuoteSafeString('CAPTURE');// type=string vars.i18n.en.string_ecard_shared = decodeSingleQuoteSafeString('Share your Digital Postcard');// type=string vars.i18n.en.string_next = decodeSingleQuoteSafeString('Next');// type=string vars.i18n.en.string_cancel = decodeSingleQuoteSafeString('Cancel');// type=string vars.i18n.en.string_tag = decodeSingleQuoteSafeString('TAG');// type=string vars.i18n.en.string_showtags = decodeSingleQuoteSafeString('SHOW TAGS');// type=string vars.i18n.en.string_hidetags = decodeSingleQuoteSafeString('HIDE TAGS');// type=string vars.i18n.en.string_selectatag = decodeSingleQuoteSafeString('Select a tag [br/]to tag yourself!');// type=string vars.i18n.en.string_resend_email = decodeSingleQuoteSafeString('Resend Email');// type=string vars.i18n.en.string_sending_email = decodeSingleQuoteSafeString('Sending');// type=string vars.i18n.en.string_sent_email = decodeSingleQuoteSafeString('Sent');// type=string vars.i18n.en.string_error_sending_email = decodeSingleQuoteSafeString('Error Sending Email');// type=string vars.i18n.en.string_verify_email_address = decodeSingleQuoteSafeString('Please check your email to verify your tag');// type=string vars.i18n.en.string_tutorial = decodeSingleQuoteSafeString('TUTORIAL');// type=string vars.i18n.en.string_termsandconditions = decodeSingleQuoteSafeString('TERMS AND CONDITIONS');// type=string vars.i18n.en.string_removemytag = decodeSingleQuoteSafeString('REMOVE MY TAG');// type=string vars.i18n.en.string_viewthetutorial = decodeSingleQuoteSafeString('VIEW THE TUTORIAL');// type=string vars.i18n.en.string_tutorial_subtitle = decodeSingleQuoteSafeString('Let us show you around with our beginners guide.');// type=string vars.i18n.en.string_date_format = decodeSingleQuoteSafeString('MMM DD, YYYY');// type=string vars.i18n.en.next_scene_title = decodeSingleQuoteSafeString('Locker Room');// type=string vars.i18n.en.previous_scene_title = decodeSingleQuoteSafeString('Field View');// type=string vars.i18n.en.signup_optin_promotions_enabled = false; // type=boolean vars.i18n.en.string_signup_optin_promotions = decodeSingleQuoteSafeString('Please send me Team News and Promotions');// type=string vars.i18n.en.signup_optin_promotions_sponsor_enabled = false; // type=boolean vars.i18n.en.string_signup_optin_promotions_sponsor = decodeSingleQuoteSafeString('Please send me Sponsor News and Promotions');// type=string vars.i18n.en.signup_email_age_gate_enabled = false; // type=boolean vars.i18n.en.signup_email_age_gate_age = decodeSingleQuoteSafeString('13');// type=string vars.i18n.en.login_terms_of_use_url = decodeSingleQuoteSafeString('https://www.fancam.com/fancam-terms-and-conditions-privacy-policy/');// type=string vars.i18n.en.login_privacy_policy_url = decodeSingleQuoteSafeString('https://www.fancam.com/fancam-terms-and-conditions-privacy-policy/');// type=string vars.i18n.en.splash_screen_coming_soon_texts_enabled = false; // type=boolean vars.i18n.en.string_comp = decodeSingleQuoteSafeString('FIND ME TO WIN!');// type=string vars.i18n.en.string_comp_icon_title = decodeSingleQuoteSafeString('FIND ME TO WIN!');// type=string vars.i18n.en.string_comp_small_icon_title = decodeSingleQuoteSafeString('FIND ME [br] TO WIN!');// type=string vars.i18n.en.string_comp_header = decodeSingleQuoteSafeString('Find the hidden Currie Cup Trophy in the crowd and STAND A CHANCE TO WIN TWO VIP TICKETS TO THE FINALS');// type=string vars.i18n.en.string_comp_info = decodeSingleQuoteSafeString('');// type=string vars.i18n.en.string_comp_footnote = decodeSingleQuoteSafeString('You can use the tracker that will appear at the bottom of the screen to help you with your search. Click on the Cup to secure your entry. [br] Good Luck!');// type=string vars.i18n.en.string_comp_start_btn = decodeSingleQuoteSafeString('Let**u0027**s Go!');// type=string vars.i18n.en.string_comp_optin_comp = decodeSingleQuoteSafeString('I agree to the terms and conditions ');// type=string vars.i18n.en.string_comp_optin_more = decodeSingleQuoteSafeString('Please send me promotional information');// type=string vars.i18n.en.string_comp_instructions_header = decodeSingleQuoteSafeString('Lets Go!');// type=string vars.i18n.en.string_comp_instructions = decodeSingleQuoteSafeString('Time to find the Cup hidden in the crowd! [br] You can use the tracker that will appear at the bottom of the screen to help you with your search. [br] Click on the Cup to secure your entry. [br] Good Luck!');// type=string vars.i18n.en.string_comp_message_found_header = decodeSingleQuoteSafeString('Congratulations!');// type=string vars.i18n.en.string_comp_message_found_text = decodeSingleQuoteSafeString('You have found Currie Cup and are now one step closer to winning amazing prizes!');// type=string vars.i18n.en.string_comp_message_found_first_footnote = decodeSingleQuoteSafeString('But first we**u0027**ll need to know more about you![br] Please fill in your details to enter.');// type=string vars.i18n.en.string_comp_message_found_more_footnote = decodeSingleQuoteSafeString('For each you find we**u0027**ll add a new entry into the draw for you![br] So the more you find the higher your chances of winning are.');// type=string vars.i18n.en.string_comp_message_found_all_header = decodeSingleQuoteSafeString('Congratulations!');// type=string vars.i18n.en.string_comp_message_found_all_text = decodeSingleQuoteSafeString('You have found Currie Cup and now one step closer to winning those amazing prizes!');// type=string vars.i18n.en.string_comp_message_found_all_footnote = decodeSingleQuoteSafeString('Thanks for playing![br] Winners will be notified via Email.');// type=string vars.i18n.en.string_comp_message_already_found_header = decodeSingleQuoteSafeString('Already Entered!');// type=string vars.i18n.en.string_comp_message_already_found_text = decodeSingleQuoteSafeString('You**u0027**ve already found this using this email address!');// type=string vars.i18n.en.string_comp_message_welcome_header = decodeSingleQuoteSafeString('Welcome Back!');// type=string vars.i18n.en.string_comp_message_welcome_text = decodeSingleQuoteSafeString('You have already found Currie Cup.[br] [br]Winners will be notified vie Email.');// type=string vars.i18n.en.string_comp_age_gate_text = decodeSingleQuoteSafeString('You must be over the age of 18 to enter the site');// type=string vars.i18n.en.comp_terms_cond_pdf = "https://s3.amazonaws.com/in3sixty-project-media/in3sixty/5b34af90a807714a102087c2/Terms+and+Conditions+FanCam+Competitions+2018-20180817143625.pdf"; // type=image unescaped vars.i18n.en.title_video1 = decodeSingleQuoteSafeString('Breaking stereotypes of what it means to be female athletes');// type=string vars.i18n.en.subtitle_video1 = decodeSingleQuoteSafeString('');// type=string vars.i18n.en.title_video2 = decodeSingleQuoteSafeString('Gold-youth: The message givers');// type=string vars.i18n.en.subtitle_video2 = decodeSingleQuoteSafeString('');// type=string vars.i18n.en.title_video3 = decodeSingleQuoteSafeString('The Future of Rugby: Vusa Academy');// type=string vars.i18n.en.subtitle_video3 = decodeSingleQuoteSafeString('');// type=string vars.i18n.en.title_video4 = decodeSingleQuoteSafeString('Currie Cup Clips: JD Schickerling');// type=string vars.i18n.en.subtitle_video4 = decodeSingleQuoteSafeString('');// type=string vars.i18n.en.title_video5 = decodeSingleQuoteSafeString('Currie Cup Clips: DHL Western Province Shoutout');// type=string vars.i18n.en.subtitle_video5 = decodeSingleQuoteSafeString('');// type=string vars.i18n.en.email_subscription_body = decodeSingleQuoteSafeString('

We’ll let you know when the DirectAxis FanCam is live so you can find yourself in the 360 degree pic! Then Zoom, tag and share your pic to Facebook and you could win a R1000 shopping voucher! Winners will be announced on Thursday on the DirectAxis Facebook page.**u000d****u000a**

**u000d****u000a**

Even if you didn’t make it to the game, play Find the Cup on the DirectAxis FanCam site to enter to win VIP tickets to the Finals on 27 October 2018.**u000d****u000a**

**u000d****u000a**

Full terms and conditions at www.directaxis.co.za/competitions**u000d****u000a**

');// type=string vars.i18n.en.email_tag_subject = decodeSingleQuoteSafeString('You found yourself in the crowd!');// type=string vars.i18n.en.email_take_seat_subject = decodeSingleQuoteSafeString('You**u0027**ve taken your seat!');// type=string vars.i18n.en.email_tag_header = decodeSingleQuoteSafeString('Congratulations! You**u0027**ve tagged yourself in');// type=string vars.i18n.en.email_take_seat_header = decodeSingleQuoteSafeString('Congratulations! You**u0027**ve found your seat in');// type=string vars.i18n.en.email_tag_body = decodeSingleQuoteSafeString('

If you**u0027**ve shared the image to Facebook you are now in the running for the R1000 shopping voucher. Visit the DirectAxis Facebook page on Thursday afternoon to check if you**u0027**ve won!**u000d****u000a**

**u000d****u000a**

**u000d****u000a**If you haven**u0027**t already, don**u0027**t forget to play Find The Cup on the DirectAxis FanCam site and you could win a VIP EXPERIENCE at the Currie Cup Finals on 27 October 2018. Terms and conditions apply.**u000d****u000a**

**u000d****u000a**

**u000d****u000a**Click to play Find The Cup at http://directaxis.fancam.com**u000d****u000a**

');// type=string vars.i18n.en.email_competition_body = decodeSingleQuoteSafeString('

Congratulations! You**u0027**ve won one entry in the Find The Cup competition. **u000d****u000a**

**u000d****u000a**

**u000d****u000a**To get more entries, come back every week to find the Currie Cup trophy in the new DirectAxis Fancam. **u000d****u000a**

**u000d****u000a**

Full terms and conditions, as well as prize details and the draw date, can be found at www.directaxis.co.za/competitions. **u000d****u000a**

**u000d****u000a**

Good luck!

');// type=string vars.i18n.en.email_verification_body = decodeSingleQuoteSafeString('We will let you know if you**u0027**re a winner.');// type=string vars.i18n.en.string_ok = decodeSingleQuoteSafeString('OK');// type=string vars.i18n.en.string_nothanks = decodeSingleQuoteSafeString('No, thanks!');// type=string vars.i18n.en.string_zoomusing = decodeSingleQuoteSafeString('Zoom using');// type=string vars.i18n.en.string_moveusing = decodeSingleQuoteSafeString('Move using');// type=string vars.i18n.en.string_zoomandexplore = decodeSingleQuoteSafeString('Zoom & Explore');// type=string vars.i18n.en.string_trackpadscroll = decodeSingleQuoteSafeString('Trackpad scroll');// type=string vars.i18n.en.string_mousetoscroll = decodeSingleQuoteSafeString('Mouse scroll');// type=string vars.i18n.en.string_keyboardkeys = decodeSingleQuoteSafeString('Keyboard keys');// type=string vars.i18n.en.string_spread = decodeSingleQuoteSafeString('Spread');// type=string vars.i18n.en.string_select = decodeSingleQuoteSafeString('Select');// type=string vars.i18n.en.string_no_tag_zone = decodeSingleQuoteSafeString('You can**u0027**t sit here');// type=string vars.i18n.en.string_failed_tagging_message = decodeSingleQuoteSafeString('Unable to use image, try another image');// type=string vars.i18n.en.string_tapanddrag = decodeSingleQuoteSafeString('Tap + Drag');// type=string vars.i18n.en.string_pinch = decodeSingleQuoteSafeString('Pinch');// type=string vars.i18n.en.string_orthesecontrols = decodeSingleQuoteSafeString('or these controls');// type=string vars.i18n.en.string_trackpressdrag = decodeSingleQuoteSafeString('Trackpad: Press + Drag');// type=string vars.i18n.en.string_mousepressdrag = decodeSingleQuoteSafeString('Mouse: Press + Drag');// type=string vars.i18n.en.string_keyboardarrowkeys = decodeSingleQuoteSafeString('Keyboard Arrow Keys');// type=string vars.i18n.en.string_tagyourselfusingthis = decodeSingleQuoteSafeString('Tag Yourself[br]Using This');// type=string vars.i18n.en.string_moreoptionshere = decodeSingleQuoteSafeString('More[br]Options[br]Here');// type=string vars.i18n.en.string_sharewhatyoufind = decodeSingleQuoteSafeString('Share What[br]You Find[br]Using This');// type=string vars.i18n.en.string_skip_tutorial = decodeSingleQuoteSafeString('Skip Tutorial');// type=string vars.i18n.en.string_enjoythefancam = decodeSingleQuoteSafeString('Enjoy the[br]Fancam');// type=string vars.i18n.en.string_sharethisview = decodeSingleQuoteSafeString('Share This View');// type=string vars.i18n.en.string_shareyourtag = decodeSingleQuoteSafeString('Share Your Tag');// type=string vars.i18n.en.string_tagyourself = decodeSingleQuoteSafeString('');// type= vars.languages = []; vars.languages[0] = { code:"en", name:"en" }; vars.lang = 'en'; /* LANGUAGE SWITCHER */ i18next .init({ resources: {'en' : { 'translation' : vars.i18n['en'] }}, lng: 'en', fallbackLng: 'en' }, function(err, t) { console.log('localising'); localize = locI18next.init(i18next); localize('[data-i18n]'); }); /* language switching */ function fc_changelang(lang, oncompleteaction){ console.log('changing language to ', lang); if ((lang === undefined )){ console.log('fc_changelang: undefined language "'+ lang + '"'); return; } function _updateCurrentOptions(opts){ } function _replaceQueryParam (param, newval, search) { var regex = new RegExp( '([?;&])' + param + '=[^&;]*([;&]?)'); var query = search.replace(regex, '$1' + param + '=' + newval + '$2'); if (!regex.test(query)){ query = (query.length > 2 ? (query + '&') : '?') + (newval ? param + '=' + newval : ''); } return query; } function _fetchOptionsForLang(lng, callback){ try { var x = new (XMLHttpRequest || ActiveXObject)('MSXML2.XMLHTTP.3.0'); x.open('GET', '/20180929/options.json' + '?lang=' + lng, 1); x.withCredentials = true; x.onreadystatechange = function () { if(this.readyState > 3){ if (this.status == 200 && this.responseText){ // console.log('resources loaded for "%s"', lng ); callback(JSON.parse(this.responseText)); } else{ console.log('error loading options for lang'); callback({}); } } }; x.send(); } catch (e) { console.log(e); } } function _applyOptions(lang, opts){ //console.log('_applyOptions for lang', lang, opts ); i18next.changeLanguage(lang); localize('[data-i18n]'); for(var key in opts){ // just override/store on top. if (opts.hasOwnProperty(key)) { //console.log(key, opts[key]); // convert any colors from hash to hex format 0x000 vars.options[key] = (typeof opts[key] === 'string') ? opts[key].replace(/^#([0-9a-f]{6}|[0-9a-f]{3})$/i, '0x\$1') : opts[key]; } } if (pano()){ // and update krpano pano().set('options', vars.options); pano().set('lang', lang); if (oncompleteaction !== undefined){ pano().call(oncompleteaction); } } if (vars.languages && vars.languages.length > 1){ window.history.replaceState({}, // update the main url /* don't change site title */null , window.location.pathname + _replaceQueryParam('lng',lang, window.location.search)); } } if (vars.i18n[lang] !== undefined){ //console.log('already have resources cached for', lang); _applyOptions(lang, vars.i18n[lang]); } else{ // console.log('caching new resources for', lang); _fetchOptionsForLang(lang, function(opts){ vars.i18n[lang] = opts; // cache i18next.addResources(lang, 'translation'/* TODO set the ns somewhere else*/, opts); //add to i18next _applyOptions(lang, opts); }); } } fc_changelang('en'); /* END LANGUAGE SWTICHER */ /* viewer */ embedpano({ html5:"only", id:"panoSWFObject", target:"panoDIV", xml: "/20180929/pano.xml", mobilescale:0.5, initVars:initVars, vars:vars, onready:_onPanoReady, onerror:_onPanoError }); // for backwards compatibility function fc_updateUrlQuery(atv, ath, fov, scene){ fc.updateUrlQuery(atv, ath, fov, scene); } /* TODO workaround, snapshot server not always receiving the events before 5 seconds, send many */ var loaded_evt_count = 0; var loaded_evt_max = 20; var loaded_timer_interval = 1500;//ms function _sendPanoLoadedEvt(){ // for the snapshot server.. var evt = document.createEvent("Event"); evt.initEvent("pano-loaded",true,true); document.dispatchEvent(evt); //console.log('sent pano loaded event'); loaded_evt_count++; if (loaded_evt_count < loaded_evt_max){ setTimeout(_sendPanoLoadedEvt,loaded_timer_interval); } } function fc_hideLoadingScreen(){ document.getElementById("panoDIV").style.visibility = 'visible'; document.body.style.background = 'none'; setTimeout(_sendPanoLoadedEvt,loaded_timer_interval); } function _onPanoError(message){ console.log('pano error'); _sendPanoLoadedEvt(); // nothing more to do.. } function _onPanoReady(krpano){ console.log('pano ready'); } /* TODO move these functions out to the js library. - END */