var NO_API=false;
var SILK_ICON_SIDE=16;
var TRUE=true;
var FALSE=false;
var WINDOW_SIDE_BUFFER=12;
var WINDOW_BOTTOM_BUFFER=7;
var WINDOW_TOP_BUFFER=60;
var MINIMUM_WINDOW_WIDTH=150;
var MINIMUM_WINDOW_HEIGHT=150;
var MAXIMUM_WINDOW_WIDTH=15000;
var MAXIMUM_WINDOW_HEIGHT=15000;
var TITLE_BAR_WIDTH=60;
var WIDGET_STANDARD_WIDTH=20;
var WIDGET_SPACER=5;
var NR_TICKS_AUTOPAN=14;
var REFRESH_USER_LOCATIONS_SECONDS=10000;
var AVATAR_PADDING_X=100;
var AVATAR_PADDING_Y=140;
var ITEM_DOM_INITIAL_LEFT=300;
var SUB_RIBBON_TOP=85;
var SUB_RIBBON_HEIGHT=100;
var SETTINGS_TAB_INDEX=0;
var NOTIFICATION_TAB_INDEX=1;
var LAYOUT_TAB_INDEX=2;
var MATE_GROUP_START_INDEX=3;
var MAP_LAYOUT_MENU_WIDTH=80;
var MAP_LAYOUT_TEMPLATE_WIDTH=100;
var MAPMARK_TYPE=0;
var MATE_TYPE=1;
var ALL_MATES_ID=-1;
var NOTIFICATION_GROUP_ID=-2;
var SETTINGS_GROUP_ID=-4;
var LAYOUT_GROUP_ID=-5;
var PHONE_GROUP_ID=-6;
var ALL_MAPMARKS_ID=-7;
var PICTURE_DIV_ICON_LEFT=100;
var PICTURE_DIV_ICON_TOP=SUB_RIBBON_TOP+(SUB_RIBBON_HEIGHT/2)+20;
var PICTURE_DIV_ICON_HEIGHT=170;
var PICTURE_DIV_ICON_WIDTH=120;
var PICTURE_DIV_AVATAR_LEFT=270;
var PICTURE_DIV_AVATAR_TOP=PICTURE_DIV_ICON_TOP;
var PICTURE_DIV_AVATAR_HEIGHT=300;
var PICTURE_DIV_AVATAR_WIDTH=200;
var MAPMARK_MENU_WIDTH=235;
var REALTIME_POI_UPDATE=true;
var POI_FRAME_COUNTER=3;
var OFFMAP_TRACKING_TOLERANCE=6000;
var INTERNET_EXPLORER=0;
var W3C=1;
var UNKNOWN_EVENT_MODEL=2;
var TRACKED_OFFSCREEN_ALPHA=0.5;
var DRAG_OBJECT_HEIGHT=100;
var DRAG_OBJECT_WIDTH=100;
var WIDGET_WIDTH=20;
var WIDGET_HEIGHT=20;
var AUTO_PAN_DEFAULT=0.5;
var SELECT_LIST_BACKGROUND_IMG="img/site/global/dropbg.png";
var BUTTON_WIDTH=40;
var BUTTON_HEIGHT=57;
var APP_ID_DIALOGUE=1;
var APP_ID_NETWORK=2;
var APP_ID_IFRAME=3;
var APP_ID_MAP=101;
var APP_ID_SPREADSHEET=102;
var APP_ID_WRITER=103;
var APP_ID_CALCULATOR=104;
var APP_ID_SPELLCHECKER=105;
var APP_ID_QUICKHELP=106;
var APP_ID_FEEDBACK=107;
var APP_ID_BROWSER=108;
var APP_ID_IMPORT=109;
var APP_ID_BLOG=110;
var APP_ID_TASK_MANAGER=111;
var APP_ID_CONTACT_VIEW=112;
var APP_ID_POINT_VIEW=113;
var APP_ID_MEDIA_VIEW=114;
var APP_ID_MEDIA_GALLERY=115;
var APP_ID_API=116;
var APP_ID_TRACKING_CACHE=117;
var APP_ID_WORKSPACE_MANAGER=201;
var APP_ID_PEEPELPOINT_MANAGER=202;
var APP_ID_FILE_MANAGER=203;
var APP_ID_ACCOUNT_MANAGER=204;
var APP_ID_CONTACT_MANAGER=205;
var APP_ID_SETTINGS=206;
var APP_ID_AUTH=207;
var APP_ID_TEST=345;
var APP_ID_TEST_MAP=346346;
var APP_ID_TEXT=841838;
var TOOLTIP_ZINDEX=1000;
var DRAG_AVATAR_ZINDEX=1000;
var LAUNCHER_ZINDEX=999;
var TASK_MANAGER_ZINDEX=998;
var ATOP_INTERFACE_COVER_ZINDEX=997;
var DISABLE_DIV_ZINDEX=996;
var PANEL_ZINDEX=996;
var SELECT_LIST_ZINDEX=996;
var HIGHLIGHT_FRAME_ZINDEX=995;
var NOTIFIER_ONTOP_ZINDEX=994;
var MAPLINK_ZINDEX=993;
var FLOCK_ERR_XML_TAG="fle";
var FLOCK_ERR_XML_SUCCESS_TAG="success";
var FLOCK_ERR_XML_ERROR_TAG="error";
var FLOCK_ERR_XML_ATT="flc";
var FLOCK_SUCCESS=1;
var FLOCK_ERR_POLL_AGAIN=2;
var FLOCK_ERR_POLL_AGAIN_LONG=3;
var FLOCK_ERR_POLL_ERROR=4;
var FLOCK_ERR_LOCK_ERROR=5;
var FLOCK_ERR_UNKNOWN_ERROR=6;
var FLOCK_ERR_NO_CONNECTION=7;
var FLOCK_ERR_BAD_XML=8;
var FLOCK_ERR_MAX=8;
var EMAIL_REGEX=new RegExp("^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9_]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$");
var INVALID_CHAR_REGEX=/(&|%|:|\/|,|\<|\>|\?)/g;
var INVALID_CHAR_STRING="& % : / , < > ?";
var MAX_LASTNAME_LENGTH=50;
var MAX_FIRSTNAME_LENGTH=50;
var MAX_USERNAME_LENGTH=100;
var MIN_PASSWORD_LENGTH=5;
var MAX_PASSWORD_LENGTH=255;
var MAX_ABOUT_LENGTH=600;
var SPREADSHEET_TEMPLATES=[];
SPREADSHEET_TEMPLATES["s_1.xml"]="Simple Budget";
var WRITER_TEMPLATES=[];
WRITER_TEMPLATES["w_1.xml"]="Resume";
WRITER_TEMPLATES["w_2.xml"]="Letter";
WRITER_TEMPLATES["w_3.xml"]="Business Cards";
var NO_LOCATION_DATE_STRING="0001-01-01T00:00:00";
var WELCOME_MSG=[];
WELCOME_MSG.push("Glad to have you back!");
WELCOME_MSG.push("Where are your friends right now?");
WELCOME_MSG.push("Remember, its peepel that make your world.");
WELCOME_MSG.push("Welcome to peepel, where you`re @.");
WELCOME_MSG.push("Welcome To Peepel, where are you?");
WELCOME_MSG.push("Welcome to Peepel, where are you now?");
WELCOME_MSG.push("Welcome to Peepel, keep track of your people.");
WELCOME_MSG.push("Welcome to Peepel, keeping track of your people.");
WELCOME_MSG.push("Welcome to the peepelverse.");
WELCOME_MSG.push("A different kind of website. for a new generation of peepel.");
WELCOME_MSG.push("There is always room for more peepel.");
WELCOME_MSG.push("Where peepel meet places.");
WELCOME_MSG.push("When finding people gets tough, the tough get peepel.");
WELCOME_MSG.push("Are you a Peepel person?");
WELCOME_MSG.push("Tip: Got something you'd like to tell us? Use the Feedback application.");
WELCOME_MSG.push("Tip: Having a problem? Check out the Quick Help application.");
WELCOME_MSG.push("Tip: You can change your Peepel Desktop background colour/image in your 'Appearance' Settings.");
WELCOME_MSG.push("Tip: You can use a Quick Launch Address to open your files as soon as Peepel starts up.");
WELCOME_MSG.push("Tip: You can use a Quick Launch Address to open your workspaces as soon as Peepel starts up.");
WELCOME_MSG.push("Tip: You can use a Quick Launch Address to open a WebMap as soon as Peepel starts up.");
WELCOME_MSG.push("Tip: You can use a Quick Launch Address to view a users location as soon as Peepel starts up.");
WELCOME_MSG.push("Tip: You can change your avatar in the Profile application.");
WELCOME_MSG.push("Tip: Did you know that you can log in to Peepel using OpenID?");
WELCOME_MSG.push("Tip: To search for public files, use the FileManager and go to the 'Public Files' folder.");
WELCOME_MSG.push("Tip: Have you tried using another theme? You can preview and change to a new theme in your 'Appearance' Settings.");
WELCOME_MSG.push("Tip: When you leave Peepel all of the applications that you have open are saved, so when you come back they will be there for you to use.");
WELCOME_MSG.push("Tip: Notifications are your friend! Make sure you have looked at your 'Notification' Settings to customise what you do and do not receive.");
WELCOME_MSG.push("Tip: Have you tried using the MapLinker? Check out the Quick Help for more information.");
WELCOME_MSG.push("Tip: Have you tried the WebSheet Location functions? You can track your contacts using them.");
WELCOME_MSG.push("Tip: Get to your recently opened files through the launcher. Click the 'more' link underneath the WebWriter or WebSheet.");
WELCOME_MSG.push("Tip: To manager your PeepelPoints use the PointManager application. Open the launcher and click 'more' link underneath WebMap to find it.");
WELCOME_MSG.push("Peepel make the world go round.");
var SATELLITE_DATA="{satellite}";
var COPYRIGHT_TEXT_BELOW_12=[];
COPYRIGHT_TEXT_BELOW_12[11]=SATELLITE_DATA;
COPYRIGHT_TEXT_BELOW_12[13]=SATELLITE_DATA;
var COPYRIGHT_TEXT_ABOVE_11=[];
COPYRIGHT_TEXT_ABOVE_11[0]=[];
COPYRIGHT_TEXT_ABOVE_11[0].push({left:12768041,right:17063190,top:-1340400,bottom:-5322463,source:"{australia}"});
var CUSTOM_TILE_SERVER=[];
CUSTOM_TILE_SERVER["all"]=[];
var ZOOM_ANIMATION_TILE_INCREMENT=25;
var START_ZOOM=7;
var START_TILESET_X="0";
var START_TILESET_Y="0";
var ZINDEX_FOREGROUND="50";
var ZINDEX_SECOND_FOREGROUND=49;
var ZINDEX_BACKGROUND=10;
var WINDOW_SPACER=20;
var RIBBON_BOTTOM_PIXEL=235;
var POI_HEIGHT=50;
var POI_WIDTH=50;
var POI_CONTROL_WIDTH=25;
var MIN_CAMERA_WIDTH=20;
var MIN_CAMERA_HEIGHT=20;
var TILE_WIDTH=256;
var TILE_HEIGHT=256;
var TILESET_WIDTH=64;
var TILESET_HEIGHT=64;
var TILESET_PIXEL_WIDTH=TILESET_WIDTH*TILE_WIDTH;
var TILESET_PIXEL_HEIGHT=TILESET_HEIGHT*TILE_WIDTH;
var PRELOAD_SCROLL_X=TILESET_WIDTH*0.65;
var PRELOAD_SCROLL_Y=TILESET_HEIGHT*0.65;
var PRELOAD_SCROLL_NEG_X=TILESET_WIDTH*0.25;
var PRELOAD_SCROLL_NEG_Y=TILESET_HEIGHT*0.25;
var OPEN_ID_DISCLAIMER="Although Peepel.com supports OpenID authentication (login) there will be OpenID providers or methods of using OpenID that will not work here.<br/><br/>If your OpenID does not work with Peepel.com and you think it should, please send an email to <a href=\"mailto: support@peepel.com\">support@peepel.com</a> and provide us with a description of the problem, we will do our best to find out why.";

try{
peepelObject_t.prototype.constructor=peepelObject_t;
peepelObject_t.prototype.cleanUp=peepelObject_cleanUp;
peepelObject_t.prototype.toString=peepelObject_toString;
}
catch(ex){
jsExDebug("peepelObject_t.prototype",ex);
}
var peepelObjectsCount=0;
function peepelObject_t(_1){
try{
if(typeof FRAMEWORK_INITIALISED=="undefined"||!FRAMEWORK_INITIALISED){
return;
}
this.SYSTEM=SYSTEM;
this.FRAMEWORK_INITIALISED=FRAMEWORK_INITIALISED;
if(this.SYSTEM.Event){
this.cleanUpIndex=this.SYSTEM.Event.registerCleanup(this);
}
this.pad=(this.SYSTEM.Style?this.SYSTEM.Style.WIDGET_PADDING:5);
peepelObjectsCount++;
this.debugMode=(_1?true:false);
if(this.debugMode){
this.initObjCount=peepelObjectsCount;
if(this.SYSTEM.Event){
this.SYSTEM.Event.registerCleanup({toString:function(){
return "MARKER";
}});
jsDebugText("init: "+this.initObjCount+" ("+this.cleanUpIndex+")");
}
}
}
catch(ex){
jsExDebug("peepelObject_t",ex);
}
}
var MEM_DEBUG_KEY_PRINT=true;
var MEM_DEBUG_MAX_MISSED="";
var MEM_DEBUG_MAX_MISSED_COUNT=0;
var MEM_DEBUG_USER_ID=23;
function peepelObject_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.cleanUpIndex!=null){
if(me.SYSTEM&&me.SYSTEM.Event){
me.SYSTEM.Event.unregisterCleanup(me.cleanUpIndex);
}
me.cleanUpIndex=null;
}
me.SYSTEM=null;
me.FRAMEWORK_INITIALISED=null;
me.pad=null;
peepelObjectsCount--;
if(me.debugMode){
jsDebugText(me.initObjCount+": "+peepelObjectsCount);
me.debugMode=null;
me.initObjCount=null;
}
if(DEBUG_MESSAGES&&SYSTEM.UserDetails&&SYSTEM.UserDetails.id==MEM_DEBUG_USER_ID){
var _3=0;
var _4="";
var _5=[];
_5["array"]=true;
_5["object"]=true;
for(var _6 in me){
if(me[_6]!=null&&(_5[typeof me[_6]])){
_3++;
_4+=_6+";";
}
}
if(_3>0){
var _7=this.constructor.toString().split("function ")[1].split("(")[0];
jsDebugText(_7+" => "+_3+(MEM_DEBUG_KEY_PRINT?" => "+_4:""));
if(_3>MEM_DEBUG_MAX_MISSED_COUNT){
MEM_DEBUG_MAX_MISSED=_7+" => "+MEM_DEBUG_MAX_MISSED_COUNT;
}
}
}
}
catch(ex){
jsExDebug("peepelObject_cleanUp",ex);
}
}
function peepelObject_toString(){
try{
var _8=this.constructor.toString().split("function ")[1];
_8=_8.split("(")[0];
return _8+";";
}
catch(ex){
jsExDebug("peepelObject_toString",ex);
}
}
function mt(_9){
if(!_9){
_9=0;
}
var _a=SYSTEM.Event.registeredCleanups.slice(_9);
return _a;
}
var cleanUpData=[];
function debugObj(_b){
try{
var _c="";
var _d=0;
var _e=0;
for(var p in _b){
if(_b[p]&&typeof _b[p]!="function"&&!p.match(/^[A-Z_0-9]*$/)){
if(_b[p].cleanUpIndex){
_c+="(C)";
_e++;
}
_c+=p+", ";
_d++;
}
}
if(_d){
cleanUpData.push({summ:_b.toString()+" - Refs: "+_d+", Not cleaned up: "+_e,data:_c});
}
}
catch(ex){
}
}

try{
darkMagic_t.prototype.constructor=darkMagic_t;
darkMagic_t.prototype.cleanUp=darkMagic_cleanUp;
darkMagic_t.prototype.registerCleanup=darkMagic_registerCleanup;
darkMagic_t.prototype.unregisterCleanup=darkMagic_unregisterCleanup;
darkMagic_t.prototype.debugRegisteredCleanups=darkMagic_debugRegisteredCleanups;
darkMagic_t.prototype.attachEvent=darkMagic_attachEvent;
darkMagic_t.prototype.detachEvent=darkMagic_detachEvent;
darkMagic_t.prototype.detachIEEvent=darkMagic_detachIEEvent;
darkMagic_t.prototype.detachW3CEvent=darkMagic_detachW3CEvent;
darkMagic_t.prototype.attachIEEvent=darkMagic_attachIEEvent;
darkMagic_t.prototype.attachW3CEvent=darkMagic_attachW3CEvent;
darkMagic_t.prototype.registerDomElementForEventCleanUp=darkMagic_registerDomElementForEventCleanUp;
darkMagic_t.prototype.unregisterDomElementEventCleanUp=darkMagic_unregisterDomElementEventCleanUp;
darkMagic_t.prototype.endDragSession=darkMagic_endDragSession;
darkMagic_t.prototype.executeClickHandlers=darkMagic_executeClickHandlers;
darkMagic_t.prototype.dragOutWindow=darkMagic_dragOutWindow;
darkMagic_t.prototype.generateDragId=darkMagic_generateDragId;
darkMagic_t.prototype.makeDropTarget=darkMagic_makeDropTarget;
darkMagic_t.prototype.disableDropTarget=darkMagic_disableDropTarget;
darkMagic_t.prototype.createDragEnabledElement=darkMagic_createDragEnabledElement;
darkMagic_t.prototype.disableDragEnabledElement=darkMagic_disableDragEnabledElement;
darkMagic_t.prototype.dragEnableElement=darkMagic_dragEnableElement;
darkMagic_t.prototype.bindDragEventHandlers=darkMagic_bindDragEventHandlers;
darkMagic_t.prototype.removeDragEventHandlers=darkMagic_removeDragEventHandlers;
darkMagic_t.prototype.keyDownHandler=darkMagic_keyDownHandler;
darkMagic_t.prototype.keyUpHandler=darkMagic_keyUpHandler;
darkMagic_t.prototype.keyPressHandler=darkMagic_keyPressHandler;
darkMagic_t.prototype.notifyKeyPressEvent=darkMagic_notifyKeyPressEvent;
darkMagic_t.prototype.removeKeyPressHandler=darkMagic_removeKeyPressHandler;
darkMagic_t.prototype.notifyKeyDownEvent=darkMagic_notifyKeyDownEvent;
darkMagic_t.prototype.removeKeyDownHandler=darkMagic_removeKeyDownHandler;
darkMagic_t.prototype.notifyKeyUpEvent=darkMagic_notifyKeyUpEvent;
darkMagic_t.prototype.removeKeyUpHandler=darkMagic_removeKeyUpHandler;
darkMagic_t.prototype.useDragElement=darkMagic_useDragElement;
darkMagic_t.prototype.disableDragElement=darkMagic_disableDragElement;
darkMagic_t.prototype.setPosition=darkMagic_setPosition;
darkMagic_t.prototype.setDropData=darkMagic_setDropData;
darkMagic_t.prototype.showGlobalDragAvatar=darkMagic_showGlobalDragAvatar;
darkMagic_t.prototype.setDragEnablingParameters=darkMagic_setDragEnablingParameters;
darkMagic_t.prototype.enableTextSelect=darkMagic_enableTextSelect;
darkMagic_t.prototype.dragEnableIFrame=darkMagic_dragEnableIFrame;
darkMagic_t.prototype.dragDisableIFrame=darkMagic_dragDisableIFrame;
darkMagic_t.prototype.setWindowDimensions=darkMagic_setWindowDimensions;
darkMagic_t.prototype.getMouseCoords=darkMagic_getMouseCoords;
darkMagic_t.prototype.isRightClick=darkMagic_isRightClick;
darkMagic_t.prototype.getEventName=darkMagic_getEventName;
darkMagic_t.prototype.getWindowScrollValues=darkMagic_getWindowScrollValues;
darkMagic_t.prototype.mouseScrollHandler=darkMagic_mouseScrollHandler;
darkMagic_t.prototype.notifyMouseScrollUp=darkMagic_notifyMouseScrollUp;
darkMagic_t.prototype.notifyMouseScrollDown=darkMagic_notifyMouseScrollDown;
darkMagic_t.prototype.removeMouseScrollUpHandler=darkMagic_removeMouseScrollUpHandler;
darkMagic_t.prototype.removeMouseScrollDownHandler=darkMagic_removeMouseScrollDownHandler;
darkMagic_t.prototype.enableMouseScrollEvents=darkMagic_enableMouseScrollEvents;
darkMagic_t.prototype.disableMouseScrollEvents=darkMagic_disableMouseScrollEvents;
darkMagic_t.prototype.registerKeyDownOverride=darkMagic_registerKeyDownOverride;
darkMagic_t.prototype.unregisterKeyDownOverride=darkMagic_unregisterKeyDownOverride;
darkMagic_t.prototype.registerKeyPressOverride=darkMagic_registerKeyPressOverride;
darkMagic_t.prototype.unregisterKeyPressOverride=darkMagic_unregisterKeyPressOverride;
darkMagic_t.prototype.disableAllEvents=darkMagic_disableAllEvents;
darkMagic_t.prototype.notifyWindowResize=darkMagic_notifyWindowResize;
darkMagic_t.prototype.removeWindowResizeHandler=darkMagic_removeWindowResizeHandler;
darkMagic_t.prototype.setDragElementPosition=darkMagic_setDragElementPosition;
darkMagic_t.prototype.setDragElementDimensions=darkMagic_setDragElementDimensions;
darkMagic_t.prototype.attemptRemoveDragSettingsFromElement=darkMagic_attemptRemoveDragSettingsFromElement;
darkMagic_t.prototype.cancelDragEvent=darkMagic_cancelDragEvent;
darkMagic_t.prototype.CLICK_EVENT=1;
darkMagic_t.prototype.MOUSE_ENTER_EVENT=2;
darkMagic_t.prototype.MOUSE_HOVER_EVENT=4;
darkMagic_t.prototype.MOUSE_EXIT_EVENT=8;
darkMagic_t.prototype.MOUSE_DOWN_EVENT=16;
darkMagic_t.prototype.MOUSE_UP_EVENT=32;
darkMagic_t.prototype.FOCUS_EVENT=64;
darkMagic_t.prototype.BLUR_EVENT=128;
darkMagic_t.prototype.DRAG_EVENT=256;
darkMagic_t.prototype.VALUE_CHANGED_EVENT=512;
darkMagic_t.prototype.LIST_EXPAND_EVENT=1024;
darkMagic_t.prototype.LIST_COLLAPSE_EVENT=2048;
darkMagic_t.prototype.LIST_ITEM_SELECT_EVENT=4096;
darkMagic_t.prototype.LIST_ITEM_ENTER_EVENT=8192;
darkMagic_t.prototype.LIST_ITEM_EXIT_EVENT=16384;
darkMagic_t.prototype.LIST_ITEM_HIDE_EVENT=32768;
darkMagic_t.prototype.LIST_ITEM_SHOW_EVENT=65536;
darkMagic_t.prototype.LIST_ITEM_EXPAND_EVENT=131072;
darkMagic_t.prototype.LIST_ITEM_COLLAPSE_EVENT=262144;
darkMagic_t.prototype.LIST_ITEM_WIDGET_EVENT=524288;
darkMagic_t.prototype.DOUBLE_CLICK_EVENT=1048572;
darkMagic_t.prototype.LIST_ITEM_DELETE_EVENT=2097144;
darkMagic_t.prototype.INTERNET_EXPLORER=0;
darkMagic_t.prototype.W3C=1;
darkMagic_t.prototype.ALLOW_PROPAGATE=1;
darkMagic_t.prototype.OPAQUE_ORIGINAL=1;
darkMagic_t.prototype.OPAQUE_DRAG_AVATAR=2;
darkMagic_t.prototype.DEFAULT_OPACITY=0.25;
}
catch(ex){
jsExDebug("darkmagic_t:prototype",ex);
}
function darkMagic_t(){
try{
this.dragIdCounter=1;
this.mouseX=0;
this.mouseY=0;
this.dropDataType="nodata";
this.dropDataReference=null;
this.dragSession=null;
this.dragSessionDom=null;
this.dragSessionHandler=null;
this.dragSessionInstance=null;
this.keyDownHandlers=[];
this.keyPressHandlers=[];
this.keyUpHandlers=[];
this.registeredCleanups=[];
this.eventCleanups=[];
this.mouseScrollUpHandlers=[];
this.mouseScrollDownHandlers=[];
this.windowResizeHandlers=[];
this.eventsDisabled=false;
this.SYSTEM=SYSTEM;
this.registeredDomElements=[];
this.stateMouseScrollEventsEnabled=true;
this.globalDragAvatar=this.createDragEnabledElement("img",0,0);
this.globalDragAvatar.style.zIndex=DRAG_AVATAR_ZINDEX;
this.clickCallbackList=new Array();
if(document.attachEvent){
this.eventModel=this.INTERNET_EXPLORER;
this.attachIEEvent(this.globalDragAvatar,"onload",this.showGlobalDragAvatar,this);
this.attachIEEvent(document,"onkeypress",this.keyPressHandler,this);
this.attachIEEvent(document,"onkeydown",this.keyDownHandler,this);
this.attachIEEvent(document,"onkeyup",this.keyUpHandler,this);
this.attachIEEvent(document,"onmousewheel",this.mouseScrollHandler,this,true);
this.attachIEEvent(document,"onmouseup",this.endDragSession,this,this.ALLOW_PROPAGATE);
}else{
if(document.addEventListener){
this.eventModel=this.W3C;
this.attachW3CEvent(document,"mouseupcatchall",this.endDragSession,this,this.ALLOW_PROPAGATE);
this.attachW3CEvent(window,"mouseout",this.dragOutWindow,this);
this.attachW3CEvent(window,"keypress",this.keyPressHandler,this);
this.attachW3CEvent(window,"keydown",this.keyDownHandler,this);
this.attachW3CEvent(window,"keyup",this.keyUpHandler,this);
this.attachW3CEvent(window,"DOMMouseScroll",this.mouseScrollHandler,this,true);
}else{
unsupportedBrowserAlert();
}
}
this.attachEvent(window,"onresize","resize",this.setWindowDimensions,this,false);
this.attachEvent(document,"onclick","click",null,this,true);
this.attachEvent(document.body,"onselectstart","selectstart",this.cancelDragEvent,this,false);
this.window=window;
this.currentDmDragSettings=null;
if(this.eventModel==this.INTERNET_EXPLORER){
window.attachEvent("onunload",this.cleanUp);
}else{
if(this.eventModel==this.W3C){
window.addEventListener("unload",darkMagic_cleanUp,false);
}
}
this.setWindowDimensions();
}
catch(ex){
jsExDebug("darkMagic_t",ex);
}
return;
}
function darkMagic_cleanUp(){
var me=SYSTEM.Event;
var _2=window.event;
if(me.eventModel==me.INTERNET_EXPLORER){
window.detachEvent("onunload",me.cleanUp);
}else{
if(me.eventModel==me.W3C){
window.removeEventListener("unload",me.cleanUp,false);
}
}
for(var j=0;j<me.registeredDomElements.length;j++){
if(me.registeredDomElements[j]&&me.registeredDomElements[j].cleanUpCount){
for(var _4 in me.registeredDomElements[j].cleanUp){
if(me.registeredDomElements[j].cleanUp[_4]){
me.registeredDomElements[j].cleanUp[_4].invokeWith();
me.registeredDomElements[j].cleanUp[_4].cleanUp();
me.registeredDomElements[j].cleanUp[_4]=null;
delete me.registeredDomElements[j].cleanUp[_4];
}
}
me.registeredDomElements[j].cleanUp=null;
me.registeredDomElements[j].cleanUpCount=null;
me.registeredDomElements[j]=null;
delete me.registeredDomElements[j];
}
}
me.registeredDomElements=null;
me.stateMouseScrollEventsEnabled=null;
for(var i=0;i<me.registeredCleanups.length;i++){
if(me.registeredCleanups[i]&&me.registeredCleanups[i].cleanUp){
me.registeredCleanups[i].cleanUp();
me.registeredCleanups[i]=null;
delete me.registeredCleanups[i];
}
}
me.registeredCleanups=null;
for(var k in me.keyDownHandlers){
if(me.keyDownHandlers[k]){
me.keyDownHandlers[k].callback=null;
me.keyDownHandlers[k].instance=null;
me.keyDownHandlers[k]=null;
delete me.keyDownHandlers[k];
}
}
me.keyDownHandlers=null;
for(var k in me.keyPressHandlers){
if(me.keyPressHandlers[k]){
me.keyPressHandlers[k].callback=null;
me.keyPressHandlers[k].instance=null;
me.keyPressHandlers[k]=null;
delete me.keyPressHandlers[k];
}
}
me.keyPressHandlers=null;
for(var k in me.keyUpHandlers){
if(me.keyUpHandlers[k]){
me.keyUpHandlers[k].callback=null;
me.keyUpHandlers[k].instance=null;
me.keyUpHandlers[k]=null;
delete me.keyUpHandlers[k];
}
}
for(var k=0;k<me.windowResizeHandlers.length;k++){
if(me.windowResizeHandlers[k]){
me.windowResizeHandlers[k].cleanUp();
me.windowResizeHandlers[k]=null;
delete me.windowResizeHandlers[k];
}
}
me.windowResizeHandlers=null;
try{
me.dragIdCounter=null;
me.mouseX=null;
me.mouseY=null;
me.dropDataType=null;
me.dropDataReference=null;
me.dragSession=null;
me.dragSessionDom=null;
me.dragSessionHandler=null;
me.dragSessionInstance=null;
me.dragDistanceX=null;
me.dragDistanceY=null;
me.dragStartX=null;
me.dragStartY=null;
me.screenWidth=null;
me.screenHeight=null;
me.window=null;
me.dropBubbling=null;
me.userAgentWindows=null;
}
catch(ex){
}
try{
for(var i in me.clickCallbackList){
me.clickCallbackList[i].handler=null;
me.clickCallbackList[i].instance=null;
me.clickCallbackList[i].parameter=null;
me.clickCallbackList[i]=null;
delete me.clickCallbackList[i];
}
me.clickCallbackList=null;
}
catch(ex){
}
try{
if(me.globalDragAvatar.parentNode==document.body){
document.body.removeChild(me.globalDragAvatar);
}
focusedFrame=null;
topFrame=null;
}
catch(ex){
}
if(me==SYSTEM.Event){
SYSTEM.Event=null;
}
me.globalDragAvatar=null;
me.eventModel=null;
me.SYSTEM=null;
}
function darkMagic_registerCleanup(_7){
try{
return this.registeredCleanups.push(_7)-1;
}
catch(ex){
jsExDebug("darkMagic_registerCleanup",ex);
}
}
function darkMagic_unregisterCleanup(_8){
try{
if(this.registeredCleanups[_8]){
this.registeredCleanups[_8]=null;
delete this.registeredCleanups[_8];
}
}
catch(ex){
jsExDebug("darkMagic_unregisterCleanup",ex);
}
}
function darkMagic_debugRegisteredCleanups(){
try{
var _9=0;
for(var i=0;i<this.registeredCleanups.length;i++){
var _b=this.registeredCleanups[i];
if(_b){
_9++;
}else{
}
}
jsDebugText("====================");
jsDebugText("TOTAL: "+_9);
}
catch(ex){
jsExDebug("darkMagic_debugRegisteredCleanups",ex);
}
}
function darkMagic_attachEvent(_c,_d,_e,_f,_10,_11,_12){
try{
if(!_c){
return false;
}
if(this.eventModel==this.INTERNET_EXPLORER&&_d){
return this.attachIEEvent(_c,_d,_f,_10,_11,_12);
}else{
if(_e){
return this.attachW3CEvent(_c,_e,_f,_10,_11,_12);
}
}
}
catch(ex){
jsExDebug("darkMagic_attachEvent",ex);
}
return;
}
function darkMagic_detachEvent(_13,_14,_15){
try{
if(!_13.cleanUp){
return;
}
var _16=null;
if(this.eventModel==this.INTERNET_EXPLORER&&_14&&_13.cleanUp[_14]){
_13.cleanUp[_14].invokeWith();
_16=_14;
}else{
if(this.eventModel==this.W3C&&_15&&_13.cleanUp[_15]){
_13.cleanUp[_15].invokeWith();
_16=_15;
}
}
if(_16){
_13.cleanUp[_16].cleanUp();
_13.cleanUp[_16]=null;
delete _13.cleanUp[_16];
_13.cleanUpCount--;
if(!_13.cleanUpCount){
for(var str in _13.cleanUp){
_13.cleanUp[str]=null;
delete _13.cleanUp[str];
}
_13.cleanUp=null;
_13.cleanUpCount=null;
this.unregisterDomElementEventCleanUp(_13);
}
}
}
catch(ex){
jsExDebug("darkMagic_detachEvent "+darkMagic_detachEvent.caller.name,ex);
}
}
function darkMagic_detachIEEvent(_18,_19){
try{
if(this.eventModel!=this.INTERNET_EXPLORER){
return;
}
switch(_19){
case "ondrop":
if(_18.dragOverHandler){
_18.detachEvent("ondragover",_18.dragOverHandler);
_18.detachEvent("ondragenter",_18.dragEnterHandler);
_18.detachEvent("ondrop",_18.dropHandler);
_18.dragOverHandler=null;
_18.dragEnterHandler=null;
_18.dropHandler=null;
}
break;
case "ondragstart":
if(_18.dragStartHandler){
_18.detachEvent("onmousedown",_18.dragStartHandler);
_18.detachEvent("ondragstart",this.cancelDragEvent);
_18.detachEvent("ondragenter",this.cancelDragEvent);
_18.detachEvent("ondragover",this.cancelDragEvent);
_18.detachEvent("ondrop",this.cancelDragEvent);
_18.dragStartHandler=null;
this.attemptRemoveDragSettingsFromElement(_18);
}
break;
case "ondrag":
if(_18.dragHandler){
document.detachEvent("onmousemove",_18.dragHandler);
_18.dragHandler=null;
this.attemptRemoveDragSettingsFromElement(_18);
}
break;
case "ondragend":
if(_18.dragEndHandler){
_18.dragEndEvent=null;
_18.dragEndHandler=null;
_18.dragEndInstance=null;
_18.dragEndParameter=null;
this.attemptRemoveDragSettingsFromElement(_18);
}
break;
case "onclick":
if(_18.clickHandler){
_18.detachEvent("onclick",_18.clickHandler);
_18.clickHandler=null;
}
break;
case "allclickprop":
if(_18.allClickPropIndex==null){
break;
}
var _1a=_18.allClickPropIndex;
this.clickCallbackList[_1a].handler=null;
this.clickCallbackList[_1a].instance=null;
this.clickCallbackList[_1a].parameter=null;
this.clickCallbackList[_1a]=null;
delete this.clickCallbackList[_1a];
_18.allClickPropIndex=null;
break;
case "onkeydown":
if(_18.keyPressEvent){
_18.detachEvent("onkeydown",_18.keyPressEvent);
_18.keyPressHandler=null;
}
break;
case "onkeyup":
break;
case "onkeypress":
if(_18.keyPressEvent){
_18.detachEvent("onkeypress",_18.keyPressEvent);
_18.keyPressHandler=null;
}
break;
default:
if(!_18.eventHandlers){
break;
}
for(var i=0;i<_18.eventHandlers.length;i++){
if(_18.eventHandlers[i]&&_18.eventHandlers[i].eventStr==_19){
_18.detachEvent(_18.eventHandlers[i].eventStr,_18.eventHandlers[i].handler,false);
_18.eventHandlers[i].eventStr=null;
_18.eventHandlers[i].handler=null;
_18.eventHandlers[i]=null;
delete _18.eventHandlers[i];
break;
}
}
}
}
catch(ex){
jsExDebug("darkMagic_detachIEEvent",ex);
}
}
function darkMagic_detachW3CEvent(_1c,_1d){
try{
if(this.eventModel!=this.W3C){
return;
}
switch(_1d){
case "drag":
if(_1c.dragHandler){
window.removeEventListener("mousemove",_1c.dragHandler,false);
_1c.dragHandler=null;
this.attemptRemoveDragSettingsFromElement(_1c);
}
break;
case "dragstart":
if(_1c.dragGestureHandler){
_1c.removeEventListener("mousedown",_1c.dragGestureHandler,false);
_1c.removeEventListener("draggesture",this.cancelDragEvent,false);
_1c.removeEventListener("dragstart",this.cancelDragEvent,false);
_1c.dragGestureHandler=null;
this.attemptRemoveDragSettingsFromElement(_1c);
}
break;
case "dragend":
_1c.dragEndEvent=null;
_1c.dragEndHandler=null;
_1c.dragEndInstance=null;
_1c.dragEndParameter=null;
this.attemptRemoveDragSettingsFromElement(_1c);
break;
case "drop":
if(_1c.dropHandler){
_1c.removeEventListener("mouseup",_1c.dropHandler,true);
_1c.dropHandler=null;
}
break;
case "mouseupcatchall":
if(_1c.mouseUpHandler){
_1c.removeEventListener("mouseup",_1c.mouseUpHandler,true);
_1c.mouseUpHandler=null;
}
break;
case "dragover":
if(_1c.dragOverHandler){
_1c.removeEventListener("mousemove",_1c.dragOverHandler,false);
_1c.dragOverHandler=null;
}
break;
case "click":
if(_1c.clickHandler){
_1c.removeEventListener("click",_1c.clickHandler,false);
_1c.clickHandler=null;
}
break;
case "allclickprop":
if(_1c.allClickPropIndex==null){
break;
}
var _1e=_1c.allClickPropIndex;
this.clickCallbackList[_1e].handler=null;
this.clickCallbackList[_1e].instance=null;
this.clickCallbackList[_1e].parameter=null;
this.clickCallbackList[_1e]=null;
delete this.clickCallbackList[_1e];
_1c.allClickPropIndex=null;
break;
default:
if(!_1c.eventHandlers){
break;
}
for(var i=0;i<_1c.eventHandlers.length;i++){
if(_1c.eventHandlers[i]&&_1c.eventHandlers[i].eventStr==_1d){
_1c.removeEventListener(_1c.eventHandlers[i].eventStr,_1c.eventHandlers[i].handler,false);
_1c.eventHandlers[i].eventStr=null;
_1c.eventHandlers[i].handler=null;
_1c.eventHandlers[i]=null;
delete _1c.eventHandlers[i];
break;
}
}
}
}
catch(ex){
jsExDebug("darkMagic_detachW3CEvent: "+_1d,ex);
}
}
function darkMagic_IEPreventDefault(){
try{
this.returnValue=false;
try{
this.keyCode=0;
}
catch(ex){
}
}
catch(ex){
jsExDebug("darkMagic_IEPreventDefault",ex);
}
}
function darkMagic_attachIEEvent(dom,_21,_22,_23,_24,_25){
function doStartDragEvent(){
try{
if(me.eventsDisabled){
return;
}
var _27=window.event;
if(dom.dragEndEvent){
me.dragEndEvent=dom.dragEndEvent;
}
me.currentDmDragSettings=dom.dmDragSettings;
me.dragSession=dom.dragSessionId;
me.dragStartX=_27.clientX+document.body.scrollLeft;
me.dragStartY=_27.clientY+document.body.scrollTop;
me.dragDistanceX=0;
me.dragDistanceY=0;
if(me.currentDmDragSettings){
me.dropDataType=me.currentDmDragSettings.dropDataType;
me.dropDataReference=me.currentDmDragSettings.dropDataReference;
}
if(me.currentDmDragSettings&&me.currentDmDragSettings.useDragElement){
var _28=dom.dragElement;
_28.startPixelX=_28.pixelX;
_28.startPixelY=_28.pixelY;
}
if(!_24){
_27.cancelBubble=true;
}
if(_22){
_22(_27,_23,_25);
}
}
catch(ex){
jsExDebug("darkMagic_attachIEEvent; doStartDragEvent",ex);
}
return;
}
function doDragEvent(){
try{
if(me.eventsDisabled){
return;
}
if(me.dragSession==dom.dragSessionId){
var _29=window.event;
me.mouseX=_29.clientX+document.body.scrollLeft;
me.mouseY=_29.clientY+document.body.scrollTop;
var mX=me.mouseX;
var mY=me.mouseY;
me.dragDistanceX=mX-me.dragStartX;
me.dragDistanceY=mY-me.dragStartY;
if(!_24){
_29.cancelBubble=true;
}
if(me.currentDmDragSettings&&me.currentDmDragSettings.useDragElement){
var _2c=dom.dragElement;
me.setDragElementPosition(_2c);
_2c.style.left=_2c.pixelX+"px";
_2c.style.top=_2c.pixelY+"px";
}
if(_22){
_22(_29,_23,_25);
}
}
}
catch(ex){
jsExDebug("darkMagic_attachIEEvent; doDragEvent",ex);
}
return;
}
function doEndDragEvent(){
try{
if(me.eventsDisabled){
return;
}
var _2d=window.event;
if(!_24){
_2d.cancelBubble=true;
}
if(me.currentDmDragSettings&&me.currentDmDragSettings.useDragElement){
dom.dragElement.startPixelX+=me.dragDistanceX;
dom.dragElement.startPixelY+=me.dragDistanceY;
}
me.currentDmDragSettings=null;
if(_22){
_22(_2d,_23,_25);
}
me.mouseX=null;
me.mouseY=null;
me.dragDistanceX=0;
me.dragDistanceY=0;
}
catch(ex){
jsExDebug("darkMagic_attachIEEvent; doEndDragEvent",ex);
}
return;
}
function doEvent(){
try{
if(me.eventsDisabled){
return;
}
var _2e=window.event;
if(!_24){
_2e.cancelBubble=true;
}
me.mouseX=_2e.clientX+document.body.scrollLeft;
me.mouseY=_2e.clientY+document.body.scrollTop;
if(_22){
_22(_2e,_23,_25);
}
}
catch(ex){
jsExDebug("darkMagic_attachIEEvent; doEvent",ex);
}
return;
}
function doClickEvent(){
try{
if(me.eventsDisabled){
return;
}
var _2f=window.event;
if(!_24){
_2f.cancelBubble=true;
}
me.mouseX=_2f.clientX+document.body.scrollLeft;
me.mouseY=_2f.clientY+document.body.scrollTop;
me.SYSTEM.Tooltip.hideTooltip();
me.executeClickHandlers(_2f);
if(_22){
_22(_2f,_23,_25);
}
}
catch(ex){
jsExDebug("darkMagic_attachIEEvent; doClickEvent",ex);
}
}
function discardEvent(){
return false;
}
function doKeyboardEvent(){
try{
if(me.eventsDisabled){
return;
}
var _30=window.event;
if(!_24){
_30.cancelBubble=true;
}
_30.which=_30.keyCode;
_30.preventDefault=darkMagic_IEPreventDefault;
if(_22){
_22(_30,_23,_25);
}
}
catch(ex){
jsExDebug("darkMagic_attachIEEvent; doKeyboardEvent",ex);
}
}
function doDropEvent(){
try{
if(me.eventsDisabled){
return;
}
var _31=window.event;
if(!_24){
_31.cancelBubble=true;
}
if(_22){
_22(_31,_23,_25);
}
me.dropDataType=null;
me.dropDataReference=null;
}
catch(ex){
jsExDebug("darkMagic_attachIEEvent; doDropEvent",ex);
}
return;
}
try{
var me=this;
if(me.eventModel!=me.INTERNET_EXPLORER||me.eventsDisabled){
return;
}
switch(_21){
case "ondrop":
dom.attachEvent("ondragover",discardEvent);
dom.attachEvent("ondragenter",discardEvent);
dom.attachEvent("ondrop",doDropEvent);
dom.dragOverHandler=discardEvent;
dom.dragEnterHandler=discardEvent;
dom.dropHandler=doDropEvent;
break;
case "ondragstart":
dom.attachEvent("onmousedown",doStartDragEvent);
dom.attachEvent("ondragstart",this.cancelDragEvent);
dom.attachEvent("ondragenter",this.cancelDragEvent);
dom.attachEvent("ondragover",this.cancelDragEvent);
dom.attachEvent("ondrop",this.cancelDragEvent);
dom.dragSessionId=this.generateDragId();
dom.dragStartHandler=doStartDragEvent;
break;
case "ondrag":
document.attachEvent("onmousemove",doDragEvent);
dom.dragHandler=doDragEvent;
break;
case "ondragend":
dom.dragEndEvent=doEndDragEvent;
dom.dragEndHandler=_22;
dom.dragEndInstance=_23;
dom.dragEndParameter=_25;
break;
case "onclick":
dom.attachEvent("onclick",doClickEvent);
dom.clickHandler=doClickEvent;
break;
case "allclickprop":
var _32=this.clickCallbackList.length;
this.clickCallbackList[_32]=new Object();
this.clickCallbackList[_32].handler=_22;
this.clickCallbackList[_32].instance=_23;
this.clickCallbackList[_32].parameter=_25;
dom.allClickPropIndex=_32;
break;
case "onkeydown":
case "onkeyup":
case "onkeypress":
dom.attachEvent(_21,doKeyboardEvent);
dom.keyPressEvent=doKeyboardEvent;
break;
default:
dom.attachEvent(_21,doEvent);
var _33=new Object();
_33.eventStr=_21;
_33.handler=doEvent;
if(!dom.eventHandlers){
dom.eventHandlers=new Array();
}
dom.eventHandlers[dom.eventHandlers.length]=_33;
}
if(!dom.cleanUp){
dom.cleanUp=[];
dom.cleanUpCount=0;
this.registerDomElementForEventCleanUp(dom);
}
dom.cleanUp[_21]=new me.SYSTEM.Delegate(this,this.detachIEEvent,[0,1],[dom,_21]);
dom.cleanUpCount++;
}
catch(ex){
jsExDebug("darkMagic_attachIEEvent ("+_21+")",ex);
}
}
function darkMagic_attachW3CEvent(dom,_35,_36,_37,_38,_39){
function doStartDragEvent(_3a){
try{
if(me.eventsDisabled){
return;
}
me.currentDmDragSettings=dom.dmDragSettings;
me.dragSession=dom.dragSessionId;
me.dragSessionDom=dom;
if(dom.dragEndEvent){
me.dragEndEvent=dom.dragEndEvent;
}
me.dragSessionInstance=_37;
me.dragStartX=_3a.pageX+document.documentElement.scrollLeft;
me.dragStartY=_3a.pageY+document.documentElement.scrollTop;
me.dragDistanceX=0;
me.dragDistanceY=0;
if(me.currentDmDragSettings){
me.dropDataType=me.currentDmDragSettings.dropDataType;
me.dropDataReference=me.currentDmDragSettings.dropDataReference;
}
if(!_38){
_3a.stopPropagation();
}
if(me.currentDmDragSettings&&me.currentDmDragSettings.useDragElement){
var _3c=me.dragSessionDom.dragElement;
_3c.startPixelX=_3c.pixelX;
_3c.startPixelY=_3c.pixelY;
}
if(_36){
_36(_3a,_37,_39);
}
}
catch(ex){
jsExDebug("darkMagic_attachW3CEvent; doStartDragEvent",ex);
}
return;
}
function doDragEvent(_3d,_3e,_3f){
try{
if(me.eventsDisabled){
return;
}
if(me.dragSession==dom.dragSessionId){
me.mouseX=_3d.pageX+document.documentElement.scrollLeft+(_3e?_3e:0);
me.mouseY=_3d.pageY+document.documentElement.scrollTop+(_3f?_3f:0);
me.dragDistanceX=me.mouseX-me.dragStartX;
me.dragDistanceY=me.mouseY-me.dragStartY;
if(me.currentDmDragSettings&&me.currentDmDragSettings.useDragElement){
var _40=me.dragSessionDom.dragElement;
me.setDragElementPosition(_40);
_40.style.left=_40.pixelX+"px";
_40.style.top=_40.pixelY+"px";
}
if(_36){
_36(_3d,_37,_39);
}
}
}
catch(ex){
jsExDebug("darkMagic_attachW3CEvent; doDragEvent",ex);
}
return;
}
function doDragEndEvent(_41,me){
try{
if(me.eventsDisabled){
return;
}
if(!me.dropBubbling){
return;
}
if(!me.dragSessionDom){
jsDebug("darkMagic_t warning: drag session dom not set.");
}
if(me.currentDmDragSettings&&me.currentDmDragSettings.useDragElement){
me.dragSessionDom.dragElement.startPixelX+=me.dragDistanceX;
me.dragSessionDom.dragElement.startPixelY+=me.dragDistanceY;
}
if(me.dragSessionDom.dragEndHandler){
me.dragSessionDom.dragEndHandler(_41,me.dragSessionDom.dragEndInstance,me.dragSessionDom.dragEndParameter);
}
me.mouseX=null;
me.mouseY=null;
me.dragDistanceX=0;
me.dragDistanceY=0;
me.currentDmDragSettings=null;
}
catch(ex){
jsExDebug("darkMagic_attachW3CEvent; doDragEndEvent",ex);
}
}
function doDragOverEvent(_43){
try{
}
catch(ex){
jsExDebug("darkMagic_attachW3CEvent; doDragOVerevent",ex);
}
}
function doEvent(_44){
try{
if(me.eventsDisabled){
return;
}
if(!_38){
_44.stopPropagation();
}
me.mouseX=_44.pageX+document.documentElement.scrollLeft;
me.mouseY=_44.pageY+document.documentElement.scrollTop;
if(_36){
_36(_44,_37,_39);
}
}
catch(ex){
jsExDebug("darkMagic_attachW3CEvent; doEvent",ex);
}
return;
}
function doClickEvent(_45){
try{
if(me.eventsDisabled){
return;
}
if(!_38){
_45.stopPropagation();
}
me.SYSTEM.Tooltip.hideTooltip();
me.executeClickHandlers(_45);
if(_36){
_36(_45,_37,_39);
}
}
catch(ex){
jsExDebug("darkMagic_attachW3CEvent; doClickEvent",ex);
}
}
function doDropEvent(_46){
try{
if(me.eventsDisabled){
return;
}
if(dom.dmDragSettings.isDropTarget){
me.dropBubbling=false;
if(_36){
_36(_46,_37,_39);
}
me.dropDataType=null;
me.dropDataReference=null;
}
}
catch(ex){
jsExDebug("darkMagic_attachW3CEvent; doDropEvent",ex);
}
}
var me=this;
try{
if(me.eventModel!=me.W3C||me.eventsDisabled){
return;
}
switch(_35){
case "drag":
window.addEventListener("mousemove",doDragEvent,false);
dom.dragHandler=doDragEvent;
break;
case "dragstart":
dom.addEventListener("mousedown",doStartDragEvent,false);
dom.addEventListener("draggesture",this.cancelDragEvent,false);
dom.addEventListener("dragstart",this.cancelDragEvent,false);
dom.dragSessionId=this.generateDragId();
dom.dragGestureHandler=doStartDragEvent;
break;
case "dragend":
dom.dragEndEvent=doDragEndEvent;
dom.dragEndHandler=_36;
dom.dragEndInstance=_37;
dom.dragEndParameter=_39;
break;
case "drop":
dom.addEventListener("mouseup",doDropEvent,false);
dom.dropHandler=doDropEvent;
break;
case "mouseupcatchall":
dom.addEventListener("mouseup",doEvent,true);
dom.mouseUpHandler=doEvent;
break;
case "dragover":
dom.addEventListener("mousemove",doDragOverEvent,false);
dom.dragOverHandler=doDragOverEvent;
break;
case "click":
dom.addEventListener("click",doClickEvent,false);
dom.clickHandler=doClickEvent;
break;
case "allclickprop":
var _47=this.clickCallbackList.length;
me.clickCallbackList[_47]={};
me.clickCallbackList[_47].handler=_36;
me.clickCallbackList[_47].instance=_37;
me.clickCallbackList[_47].parameter=_39;
dom.allClickPropIndex=_47;
break;
default:
dom.addEventListener(_35,doEvent,false);
var _48={};
_48.eventStr=_35;
_48.handler=doEvent;
if(!dom.eventHandlers){
dom.eventHandlers=[];
}
dom.eventHandlers[dom.eventHandlers.length]=_48;
}
if(!dom.cleanUp){
dom.cleanUp=[];
dom.cleanUpCount=0;
this.registerDomElementForEventCleanUp(dom);
}
dom.cleanUp[_35]=new me.SYSTEM.Delegate(this,this.detachW3CEvent,[0,1],[dom,_35]);
dom.cleanUpCount++;
}
catch(ex){
jsExDebug("darkMagic_attachW3CEvent; ",ex);
}
}
function darkMagic_registerDomElementForEventCleanUp(_49){
try{
if(!this.registeredDomElements){
alert("attachEvent instead of detachEvent: "+darkMagic_registerDomElementForEventCleanUp.caller.caller.caller.name);
return;
}
this.registeredDomElements.push(_49);
}
catch(ex){
jsExDebug("darkMagic_registerDomElementForEventCleanUp",ex);
}
}
function darkMagic_unregisterDomElementEventCleanUp(_4a){
try{
if(!this.registeredDomElements){
return;
}
for(var i=0;i<this.registeredDomElements.length;i++){
if(this.registeredDomElements[i]==_4a){
this.registeredDomElements[i]=null;
delete this.registeredDomElements[i];
}
}
}
catch(ex){
jsExDebug("darkMagic_unregisterDomElementEventCleanUp",ex);
}
}
function darkMagic_endDragSession(_4c,me){
try{
if(!me){
var me=this;
}
if(me.dragSession){
me.dragSession=false;
me.dropBubbling=true;
if(me.dragEndEvent&&_4c){
me.dragEndEvent(_4c,me);
me.dragEndEvent=null;
}
}else{
me.dropBubbling=false;
}
}
catch(ex){
jsExDebug("darkMagic_endDragSession",ex);
}
return;
}
function darkMagic_executeClickHandlers(_4e){
try{
for(var i=0;i<this.clickCallbackList.length;i++){
if(this.clickCallbackList[i]&&this.clickCallbackList[i].handler){
this.clickCallbackList[i].handler(_4e,this.clickCallbackList[i].instance,this.clickCallbackList[i].parameter);
}
}
}
catch(ex){
jsExDebug("darkMagic_executeClickHandlers",ex);
}
}
function darkMagic_dragOutWindow(_50,me){
try{
if(!me){
var me=this;
}
if(!_50.relatedTarget){
me.endDragSession(_50,me);
}
}
catch(ex){
jsExDebug("darkMagic_dragOutWindow",ex);
}
return;
}
function darkMagic_generateDragId(){
try{
this.dragIdCounter++;
return this.dragIdCounter;
}
catch(ex){
jsExDebug("darkMagic_generateDragId",ex);
}
}
function darkMagic_makeDropTarget(_52,_53,_54,_55){
try{
if(!_52.dmDragSettings){
_52.dmDragSettings={};
}
_52.dmDragSettings.isDropTarget=true;
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
this.attachIEEvent(_52,"ondrop",_53,_54,false,_55);
}else{
this.attachW3CEvent(_52,"drop",_53,_54,false,_55);
}
}
catch(ex){
jsExDebug("darkMagic_makeDropTarget",ex);
}
}
function darkMagic_disableDropTarget(_56){
try{
if(!_56.dmDragSettings){
_56.dmDragSettings={};
}
_56.dmDragSettings.isDropTarget=null;
this.detachEvent(_56,"ondrop","drop");
}
catch(ex){
jsExDebug("darkMagic_disableDropTarget",ex);
}
}
function darkMagic_createDragEnabledElement(_57,_58,_59,_5a,_5b){
try{
var _5c=document.createElement(_57);
_5c.style.position="absolute";
_5c.dragElement=null;
_5c.pixelX=_58;
_5c.pixelY=_59;
var _5d={};
_5d.isDraggable=true;
_5d.fromRight=_5a;
_5d.fromBottom=_5b;
_5d.useDragAvatar=false;
_5d.dragAvatarPath=null;
_5d.useDragElement=false;
_5c.dmDragSettings=_5d;
if(_5a){
_5c.style.right=_58+"px";
}else{
_5c.style.left=_58+"px";
}
if(_5b){
_5c.style.bottom=_59+"px";
}else{
_5c.style.top=_59+"px";
}
}
catch(ex){
jsExDebug("darkMagic_createDragEnabledElement",ex);
}
return _5c;
}
function darkMagic_disableDragEnabledElement(_5e){
try{
if(!_5e.dmDragSettings||!_5e.dmDragSettings.isDraggable){
return;
}
_5e.pixelX=null;
_5e.pixelY=null;
_5e.dragElement=null;
_5e.dmDragSettings.isDraggable=null;
_5e.dmDragSettings.fromRight=null;
_5e.dmDragSettings.fromBottom=null;
_5e.dmDragSettings.useDragAvatar=null;
_5e.dmDragSettings.dragAvatarPath=null;
_5e.dmDragSettings.useDragElement=null;
_5e.dmDragSettings.dropDataType=null;
_5e.dmDragSettings.dropDataReference=null;
}
catch(ex){
jsExDebug("darkMagic_disableDragEnabledElement",ex);
}
}
function darkMagic_setDragEnablingParameters(_5f){
try{
if(!_5f.dmDragSettings){
_5f.dmDragSettings={};
}
_5f.dmDragSettings.isDraggable=true;
_5f.dmDragSettings.useDragAvatar=false;
_5f.dmDragSettings.dragAvatarPath=null;
_5f.dmDragSettings.useDragElement=false;
_5f.dragElement=null;
}
catch(ex){
jsExDebug("darkMagic_setDragEnablingParameters",ex);
}
return;
}
function darkMagic_dragEnableElement(_60,_61,_62,_63,_64,_65){
try{
var _66;
if(_60.dmDragSettings){
_66=_60.dmDragSettings;
}else{
_66={};
}
_60.pixelX=_61;
_60.pixelY=_62;
_60.dragElement=null;
_66.isDraggable=true;
_66.fromRight=_63;
_66.fromBottom=_64;
_66.useDragAvatar=false;
_66.dragAvatarPath=null;
_66.useDragElement=false;
_60.dmDragSettings=_66;
if(!_65){
_60.style.position="absolute";
if(_63){
_60.style.right=_61+"px";
}else{
_60.style.left=_61+"px";
}
if(_64){
_60.style.bottom=_62+"px";
}else{
_60.style.top=_62+"px";
}
}
}
catch(ex){
jsExDebug("darkMagic_dragEnableElement",ex);
}
return _60;
}
function darkMagic_bindDragEventHandlers(_67,_68,_69,_6a,_6b,_6c){
try{
this.attachEvent(_67,"ondragstart","dragstart",_68,_6b,false,_6c);
this.attachEvent(_67,"ondrag","drag",_69,_6b,false,_6c);
this.attachEvent(_67,"ondragend","dragend",_6a,_6b,false,_6c);
}
catch(ex){
jsExDebug("darkMagic_bindDragEventHandlers",ex);
}
return;
}
function darkMagic_removeDragEventHandlers(_6d){
try{
this.detachEvent(_6d,"ondragstart","dragstart");
this.detachEvent(_6d,"ondrag","drag");
this.detachEvent(_6d,"ondragend","dragend");
}
catch(ex){
jsExDebug("darkMagic_removeDragEventHandlers",ex);
}
return;
}
function darkMagic_keyDownHandler(_6e,me){
try{
_6e.dmKey=(_6e.which?_6e.which:_6e.keyCode);
switch(_6e.dmKey){
case 27:
me.endDragSession(_6e,me);
break;
case 112:
_6e.cancelBubble=true;
_6e.returnValue=false;
cancelEvent(_6e);
_6e.preventDefault();
break;
case 33:
_6e.preventDefault();
break;
case 34:
_6e.preventDefault();
break;
case 77:
if(_6e.ctrlKey&&_6e.shiftKey&&DEBUG_MESSAGES){
window.location="verifydb.php";
}
break;
default:
break;
}
if(me.keyDownOverride){
me.keyDownOverride.handler(_6e,me.keyDownOverride.instance);
}else{
for(var i=0;i<me.keyDownHandlers.length;i++){
if(me.keyDownHandlers[i]&&me.keyDownHandlers[i].callback){
me.keyDownHandlers[i].callback(_6e,me.keyDownHandlers[i].instance);
}
}
}
}
catch(ex){
jsExDebug("darkMagic_keyDownHandler",ex);
}
}
function darkMagic_keyPressHandler(_71,me){
try{
_71.dmKey=(_71.which?_71.which:_71.keyCode);
if(me.keyPressOverride){
me.keyPressOverride.handler(_71,me.keyPressOverride.instance);
}else{
for(var i=0;i<me.keyPressHandlers.length;i++){
if(me.keyPressHandlers[i]&&me.keyPressHandlers[i].callback){
me.keyPressHandlers[i].callback(_71,me.keyPressHandlers[i].instance);
}
}
}
}
catch(ex){
jsExDebug("darkMagic_keyPressHandler",ex);
}
}
function darkMagic_keyUpHandler(_74,me){
try{
_74.dmKey=(_74.which?_74.which:_74.keyCode);
for(var i=0;i<me.keyUpHandlers.length;i++){
if(me.keyUpHandlers[i]&&me.keyUpHandlers[i].callback){
me.keyUpHandlers[i].callback(_74,me.keyUpHandlers[i].instance);
}
}
}
catch(ex){
jsExDebug("darkMagic_keyUpHandler",ex);
}
}
function darkMagic_notifyKeyPressEvent(_77,_78){
try{
var _79=this.keyPressHandlers.length;
this.keyPressHandlers[_79]={callback:_77,instance:_78};
return _79;
}
catch(ex){
jsExDebug("darkMagic_notifyKeyPressEvent",ex);
}
}
function darkMagic_removeKeyPressHandler(_7a){
try{
if(this.keyPressHandlers[_7a]){
this.keyPressHandlers[_7a].callback=null;
this.keyPressHandlers[_7a].instance=null;
this.keyPressHandlers[_7a]=null;
delete this.keyPressHandlers[_7a];
}
}
catch(ex){
jsExDebug("darkMagic_removeKeyPressHandler",ex);
}
}
function darkMagic_notifyKeyDownEvent(_7b,_7c){
try{
var _7d=this.keyDownHandlers.length;
this.keyDownHandlers[_7d]={callback:_7b,instance:_7c};
return _7d;
}
catch(ex){
jsExDebug("darkMagic_notifyKeydownEvent",ex);
}
}
function darkMagic_removeKeyDownHandler(_7e){
try{
if(this.keyDownHandlers[_7e]){
this.keyDownHandlers[_7e].callback=null;
this.keyDownHandlers[_7e].instance=null;
this.keyDownHandlers[_7e]=null;
delete this.keyDownHandlers[_7e];
}
}
catch(ex){
jsExDebug("darkMagic_removeKeyDownHandler",ex);
}
}
function darkMagic_notifyKeyUpEvent(_7f,_80){
try{
var _81=this.keyUpHandlers.length;
this.keyUpHandlers[_81]={callback:_7f,instance:_80};
return _81;
}
catch(ex){
jsExDebug("darkMagic_notifyKeyUpEvent",ex);
}
}
function darkMagic_removeKeyUpHandler(_82){
try{
if(this.keyUpHandlers[_82]){
this.keyUpHandlers[_82].callback=null;
this.keyUpHandlers[_82].instance=null;
this.keyUpHandlers[_82]=null;
delete this.keyDownHandlers[_82];
}
}
catch(ex){
jsExDebug("darkMagic_removeKeyUpHandler",ex);
}
}
function darkMagic_useDragElement(_83,_84){
try{
if(!_83.dmDragSettings){
_83.dmDragSettings={};
}
_83.dmDragSettings.useDragElement=true;
_83.dragElement=_84;
}
catch(ex){
jsExDebug("darkMagic_useDragAvatar",ex);
}
return;
}
function darkMagic_disableDragElement(_85){
try{
if(!_85.dmDragSettings||!_85.useDragElement){
return;
}
_85.dragElement.pixelX=null;
_85.dragElement.pixelY=null;
_85.dragElement.dragWidth=null;
_85.dragElement.dragHeight=null;
_85.dmDragSettings.useDragElement=null;
_85.dragElement=null;
}
catch(ex){
jsExDebug("darkMagic_disableDragElement",ex);
}
}
function darkMagic_setPosition(_86,_87,_88){
try{
if(!_86.dmDragSettings){
_86.dmDragSettings={};
}
_86.pixelX=_87;
_86.pixelY=_88;
if(_86.dmDragSettings.fromRight){
_86.style.right=_87+"px";
}else{
_86.style.left=_87+"px";
}
if(_86.dmDragSettings.fromBottom){
_86.style.bottom=_88+"px";
}else{
_86.style.top=_88+"px";
}
}
catch(ex){
jsExDebug("darkMagic_setPosition",ex);
}
return;
}
function darkMagic_setDropData(_89,_8a,_8b){
try{
if(!_89.dmDragSettings){
_89.dmDragSettings={};
}
_89.dmDragSettings.dropDataType=_8a;
_89.dmDragSettings.dropDataReference=_8b;
}
catch(ex){
jsExDebug("darkMagic_setDropData",ex);
}
return;
}
function darkMagic_showGlobalDragAvatar(_8c,me){
try{
me.globalDragAvatar.style.visibility="visible";
}
catch(ex){
jsExDebug("showDragAvatar",ex);
}
}
function darkMagic_enableTextSelect(_8e){
try{
this.attachEvent(_8e,"onselectstart",null,cancelEvent,this,false);
}
catch(ex){
jsExDebug("darkMagic_enableTextSelect",ex);
}
}
function darkMagic_dragEnableIFrame(_8f,_90){
try{
function iFrameDragEvent(_91,me){
try{
if(me.dragSession&&me.dragSessionDom&&me.dragSessionDom.dragHandler){
if(_90&&_90.getIFramePosition){
var pos=_90.getIFramePosition();
}
me.dragSessionDom.dragHandler(_91,pos.x-_8f.body.scrollLeft,pos.y-_8f.body.scrollTop);
}
}
catch(ex){
jsExDebug("iFrameDragEvent",ex);
}
}
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
return;
}
this.attachW3CEvent(_8f,"mousemove",iFrameDragEvent,this,false);
this.attachW3CEvent(_8f,"mouseupcatchall",this.endDragSession,this,this.ALLOW_PROPAGATE);
this.attachEvent(_8f,"onclick","click",null,this,true);
}
catch(ex){
jsExDebug("darkMagic_dragEnableIFrame",ex);
}
}
function darkMagic_dragDisableIFrame(_94){
try{
if(this.eventModel==this.INTERNET_EXPLORER){
return;
}
this.detachW3CEvent(_94,"mousemove");
this.detachW3CEvent(_94,"mouseupcatchall");
this.detachEvent(_94,"onclick","click");
}
catch(ex){
jsExDebug("darkMagic_dragDisableIFrame",ex);
}
}
function darkMagic_setWindowDimensions(_95,me){
try{
if(!me){
me=this;
}
if(me.SYSTEM.Environment.AGENT_STRING.match(/iPhone/)){
me.SYSTEM.Environment.SCREEN_WIDTH=900;
me.SYSTEM.Environment.SCREEN_HEIGHT=1000;
return;
}
me.SYSTEM.Environment.SCREEN_WIDTH=window.innerWidth||(window.document.documentElement.clientWidth||window.document.body.clientWidth);
me.SYSTEM.Environment.SCREEN_HEIGHT=window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight);
for(var i=0;i<me.windowResizeHandlers.length;i++){
if(me.windowResizeHandlers[i]){
me.windowResizeHandlers[i].invoke(me.SYSTEM.Environment.SCREEN_WIDTH,me.SYSTEM.Environment.SCREEN_HEIGHT);
}
}
}
catch(ex){
jsExDebug("darkMagic_setWindowDimensions",ex);
}
}
function darkMagic_getMouseCoords(_98){
try{
if(!_98){
return;
}
var _99=_98.clientX+document.documentElement.scrollLeft;
var _9a=_98.clientY+document.documentElement.scrollTop;
return {x:_99,y:_9a};
}
catch(ex){
jsExDebug("darkMagic_getMouseCoords",ex);
}
}
function darkMagic_isRightClick(_9b){
try{
if(this.SYSTEM.Environment.userAgentIsIE()&&_9b.button==2){
return true;
}else{
if(_9b.which==3){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("darkMagic_isRightClick",ex);
}
}
function darkMagic_getEventName(_9c){
try{
switch(_9c){
case this.CLICK_EVENT:
return "click";
case this.MOUSE_DOWN_EVENT:
return "mouseDown";
case this.MOUSE_UP_EVENT:
return "mouseUp";
case this.MOUSE_ENTER_EVENT:
return "mouseEnter";
case this.MOUSE_EXIT_EVENT:
return "mouseExit";
case this.MOUSE_HOVER_EVENT:
return "mouseHover";
case this.FOCUS_EVENT:
return "focus";
case this.BLUR_EVENT:
return "blur";
case this.DRAG_EVENT:
return "drag";
case this.VALUE_CHANGED_EVENT:
return "valueChange";
case this.LIST_EXPAND_EVENT:
return "listExpand";
case this.LIST_COLLAPSE_EVENT:
return "listCollapse";
case this.LIST_ITEM_SELECT_EVENT:
return "itemSelect";
case this.LIST_ITEM_ENTER_EVENT:
return "itemEnter";
case this.LIST_ITEM_EXIT_EVENT:
return "itemExit";
case this.LIST_ITEM_HIDE_EVENT:
return "itemHide";
case this.LIST_ITEM_SHOW_EVENT:
return "itemShow";
case this.LIST_ITEM_EXPAND_EVENT:
return "itemExpand";
case this.LIST_ITEM_COLLAPSE_EVENT:
return "itemCollapse";
case this.LIST_ITEM_WIDGET_EVENT:
return "itemWidget";
case this.DOUBLE_CLICK_EVENT:
return "dblClick";
case this.LIST_ITEM_DELETE_EVENT:
return "itemDelete";
}
}
catch(ex){
jsExDebug("darkMagic_getEventName",ex);
}
}
function darkMagic_getWindowScrollValues(){
try{
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
return {left:document.body.scrollLeft,top:document.body.scrollTop};
}else{
return {left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop};
}
}
catch(ex){
jsExDebug("darkMagic_getWindowScrollValues",ex);
}
}
function darkMagic_mouseScrollHandler(_9d,me){
try{
if(me.stateMouseScrollEventsEnabled){
var _9f=null;
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
_9d.preventDefault=darkMagic_IEPreventDefault;
}
if(me.SYSTEM.Environment.USER_AGENT==me.SYSTEM.Environment.INTERNET_EXPLORER){
_9f=_9d.wheelDelta/120;
}else{
_9f=-(_9d.detail/3);
}
if(_9f>0){
for(var i=0;i<me.mouseScrollUpHandlers.length;i++){
var _a1=me.mouseScrollUpHandlers[i];
if(_a1){
_a1.handler(_9d,_9f,_a1.instance,_a1.parameter);
}
}
}else{
if(_9f<0){
for(var i=0;i<me.mouseScrollDownHandlers.length;i++){
var _a1=me.mouseScrollDownHandlers[i];
if(_a1){
_a1.handler(_9d,_9f,_a1.instance,_a1.parameter);
}
}
}
}
}
}
catch(ex){
jsExDebug("darkMagic_mouseScrollHandler",ex);
}
}
function darkMagic_notifyMouseScrollUp(_a2,_a3,_a4){
try{
if(_a2){
var _a5=this.mouseScrollUpHandlers.push({handler:_a2,instance:_a3,parameter:_a4});
return _a5-1;
}
}
catch(ex){
jsExDebug("darkMagic_notifyMouseScrollUp",ex);
}
}
function darkMagic_notifyMouseScrollDown(_a6,_a7,_a8){
try{
if(_a6){
var _a9=this.mouseScrollDownHandlers.push({handler:_a6,instance:_a7,parameter:_a8});
return _a9-1;
}
}
catch(ex){
jsExDebug("darkMagic_notifyMouseScrollDown",ex);
}
}
function darkMagic_removeMouseScrollUpHandler(_aa){
try{
var _ab=this.mouseScrollUpHandlers[_aa];
if(_ab){
_ab.handler=null;
_ab.instance=null;
_ab.parameter=null;
this.mouseScrollUpHandlers[_aa]=null;
delete this.mouseScrollUpHandlers[_aa];
}
}
catch(ex){
jsExDebug("darkMagic_removeMouseScrollUpHandler",ex);
}
}
function darkMagic_removeMouseScrollDownHandler(_ac){
try{
var _ad=this.mouseScrollDownHandlers[_ac];
if(_ad){
_ad.handler=null;
_ad.instance=null;
_ad.parameter=null;
this.mouseScrollDownHandlers[_ac]=null;
delete this.mouseScrollDownHandlers[_ac];
}
}
catch(ex){
jsExDebug("darkMagic_removeMouseScrollDownHandler",ex);
}
}
function darkMagic_enableMouseScrollEvents(){
try{
this.stateMouseScrollEventsEnabled=true;
}
catch(ex){
jsExDebug("darkMagic_enableMouseScrollEvents",ex);
}
}
function darkMagic_disableMouseScrollEvents(){
try{
this.stateMouseScrollEventsEnabled=false;
}
catch(ex){
jsExDebug("darkMagic_disableMouseScrollEvents",ex);
}
}
function darkMagic_registerKeyDownOverride(_ae,_af){
try{
this.keyDownOverride={handler:_ae,instance:_af};
}
catch(ex){
jsExDebug("darkMagic_registerKeyDownOverride",ex);
}
}
function darkMagic_unregisterKeyDownOverride(_b0){
try{
if(!this.keyDownOverride){
return;
}
if(this.keyDownOverride.handler==_b0){
this.keyDownOverride.handler=null;
this.keyDownOverride.instance=null;
this.keyDownOverride=null;
}
}
catch(ex){
jsExDebug("darkMagic_unregisterKeyDownOverride",ex);
}
}
function darkMagic_registerKeyPressOverride(_b1,_b2){
try{
this.keyPressOverride={handler:_b1,instance:_b2};
}
catch(ex){
jsExDebug("darkMagic_registerKeyPressOverride",ex);
}
}
function darkMagic_unregisterKeyPressOverride(_b3){
try{
if(!this.keyPressOverride){
return;
}
if(this.keyPressOverride.handler==_b3){
this.keyPressOverride.handler=null;
this.keyPressOverride.instance=null;
this.keyPressOverride=null;
}
}
catch(ex){
jsExDebug("darkMagic_unregisterKeyPressOverride",ex);
}
}
function darkMagic_disableAllEvents(){
try{
this.eventsDisabled=true;
}
catch(ex){
jsExDebug("darkMagic_disableAllEvents",ex);
}
}
function darkMagic_notifyWindowResize(_b4){
try{
if(_b4){
var _b5=this.windowResizeHandlers.push(_b4);
return _b5-1;
}
}
catch(ex){
jsExDebug("darkMagic_notifyWindowResize",ex);
}
}
function darkMagic_removeWindowResizeHandler(_b6){
try{
if(this.windowResizeHandlers[_b6]){
this.windowResizeHandlers[_b6].cleanUp();
this.windowResizeHandlers[_b6]=null;
delete this.windowResizeHandlers[_b6];
}
}
catch(ex){
jsExDebug("darkMagic_removeWindowResizeHandler",ex);
}
}
function darkMagic_setDragElementPosition(_b7,_b8,_b9){
try{
if(!_b8&&!_b9){
_b8=_b7.startPixelX+this.dragDistanceX;
_b9=_b7.startPixelY+this.dragDistanceY;
}
var _ba=_b8;
var _bb=_b9;
var _bc=_b7.dragWidth;
var _bd=_b7.dragHeight;
if(_b8<0){
_ba=0;
}
if(_b9<this.SYSTEM.Panel.getHeight()){
_bb=this.SYSTEM.Panel.getHeight();
}
var _be=this.SYSTEM.Environment.SCREEN_WIDTH-_bc+(document.body.scrollLeft?document.body.scrollLeft:document.documentElement.scrollLeft);
if(_b8>=_be){
_ba=_be;
}
var _bf=this.SYSTEM.Environment.SCREEN_HEIGHT-_bd-this.SYSTEM.Launcher.HEIGHT+(document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop);
if(_b9>=_bf){
_bb=_bf;
if(_bb<this.SYSTEM.Panel.getHeight()){
_bb=this.SYSTEM.Panel.getHeight();
}
}
_b7.pixelX=_ba;
_b7.pixelY=_bb;
}
catch(ex){
jsExDebug("darkMagic_setDragElementPosition",ex);
}
}
function darkMagic_setDragElementDimensions(_c0,_c1,_c2){
try{
_c0.dragWidth=_c1;
_c0.dragHeight=_c2;
}
catch(ex){
jsExDebug("darkMagic_setDragElementDimensions",ex);
}
}
function darkMagic_attemptRemoveDragSettingsFromElement(_c3){
try{
if(!_c3.dragStartHandler&&!_c3.dragHandler&&!_c3.dragHandler&&_c3.dmDragSettings){
_c3.dmDragSettings=null;
}
}
catch(ex){
jsExDebug("darkMagic_attemptRemoveDragSettingsFromElement",ex);
}
}
function darkMagic_cancelDragEvent(_c4){
try{
_c4.returnValue=false;
if(_c4.stopPropagation){
_c4.stopPropagation();
}
if(_c4.preventDefault){
_c4.preventDefault();
}
return false;
}
catch(ex){
jsExDebug("darkMagic_cancelDragEvent",ex);
}
}

try{
dom_t.prototype=new peepelObject_t();
dom_t.prototype.constructor=dom_t;
dom_t.prototype.cleanUp=dom_cleanUp;
dom_t.prototype.dom_super=peepelObject_t.prototype.constructor;
dom_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
dom_t.prototype.createElement=dom_createElement;
dom_t.prototype.createClassElement=dom_createClassElement;
dom_t.prototype.createDiv=dom_createDiv;
dom_t.prototype.createForm=dom_createForm;
dom_t.prototype.createFormInput=dom_createFormInput;
dom_t.prototype.createImage=dom_createImage;
dom_t.prototype.freeDom=dom_freeDom;
dom_t.prototype.createTransparentImage=dom_createTransparentImage;
dom_t.prototype.setTransparentImageSrc=dom_setTransparentImageSrc;
dom_t.prototype.setElementOpacity=dom_setElementOpacity;
dom_t.prototype.urlEncode=dom_urlEncode;
dom_t.prototype.showInterfaceCover=dom_showInterfaceCover;
dom_t.prototype.hideInterfaceCover=dom_hideInterfaceCover;
dom_t.prototype.setElementClass=dom_setElementClass;
dom_t.prototype.elementIsChildOf=dom_elementIsChildOf;
dom_t.prototype.setElementFloat=dom_setElementFloat;
dom_t.prototype.getCurrentStyle=dom_getCurrentStyle;
dom_t.prototype.dom_imageLoadEvent=dom_imageLoadEvent;
dom_t.prototype.BLANK_IMG="img/blank.png";
dom_t.prototype.INTERFACE_COVER_OPACITY=0.75;
}
catch(ex){
jsExDebug("dom_t.prototype",ex);
}
function dom_t(){
try{
this.dom_super();
this.peepelImageCount=0;
this.peepelLoadedImageCount=0;
this.interfaceCoverDiv=this.createDiv("absolute");
this.interfaceCoverDiv.style.width="100%";
this.interfaceCoverDiv.style.height="100%";
this.interfaceCoverDiv.style.zIndex=DISABLE_DIV_ZINDEX;
this.setElementOpacity(this.interfaceCoverDiv,this.INTERFACE_COVER_OPACITY);
}
catch(ex){
jsExDebug("dom_t",ex);
}
}
function dom_cleanUp(me){
try{
if(!me){
me=this;
}
me.peepelImageCount=null;
me.peepelLoadedImageCount=null;
me.interfaceCoverDiv=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("dom_cleanUp",ex);
}
}
function dom_createElement(_2,_3,_4,_5,_6,_7){
try{
var _8=document.createElement(_2);
if(_3){
_8.style.position=_3;
}else{
if(_3==null){
_8.style.position="absolute";
}
}
if(_4!=null){
if(_4.toString().match(/%$/)){
_8.style.width=_4;
}else{
_8.style.width=_4+"px";
}
}
if(_5!=null){
if(_5.toString().match(/%$/)){
_8.style.height=_5;
}else{
_8.style.height=_5+"px";
}
}
if(_6!=null){
if(_6.toString().match(/%$/)){
_8.style.left=_6;
}else{
_8.style.left=_6+"px";
}
}
if(_7!=null){
if(_7.toString().match(/%$/)){
_8.style.top=_7;
}else{
_8.style.top=_7+"px";
}
}
return _8;
}
catch(ex){
jsExDebug("createDiv",ex);
}
}
function dom_createClassElement(_9,_a,_b){
try{
var el=this.createElement(_9,(_b?_b:false));
this.setElementClass(el,_a);
return el;
}
catch(ex){
jsExDebug("dom_createClassElement",ex);
}
}
function dom_createDiv(_d,_e,_f,_10,top){
try{
return this.createElement("div",_d,_e,_f,_10,top);
}
catch(ex){
jsExDebug("createDiv",ex);
}
}
function dom_createForm(_12,_13,_14,_15,_16,_17,top){
try{
var _19=this.createElement("form","absolute",_15,_16,_17,top);
_19.setAttribute("action",_12);
_19.setAttribute("method",_13);
if(_14){
_19.setAttribute("encoding",_14);
}
return _19;
}
catch(ex){
jsExDebug("dom_createForm",ex);
}
}
function dom_createFormInput(_1a,_1b,_1c,_1d,_1e,_1f,top){
try{
var _21=this.createElement("input","absolute",_1d,_1e,_1f,top);
_21.setAttribute("type",_1a);
if(_1b!=null){
_21.setAttribute("name",_1b);
}
if(_1c!=null){
_21.setAttribute("value",_1c);
}
return _21;
}
catch(ex){
jsExDebug("dom_createFormInput",ex);
}
}
function dom_createImage(src,_23,_24,_25,_26,top){
try{
var img=this.createElement("img",_23,_24,_25,_26,top);
if(src){
img.src=src;
}
return img;
}
catch(ex){
jsExDebug("dom_createImage",ex);
}
}
function dom_freeDom(dom){
try{
if(dom&&dom.childNodes){
while(dom.childNodes.length>0){
if(dom.childNodes[0].childNodes.length>0){
this.freeDom(dom.childNodes[0]);
}
dom.removeChild(dom.childNodes[0]);
}
}
}
catch(ex){
jsExDebug("freeDom",ex);
}
}
function dom_createTransparentImage(src,_2b,_2c,_2d,top){
try{
var _2f=null;
if(document.all){
_2f=this.createElement("span","absolute",_2b,_2c,_2d,top);
}else{
_2f=this.createElement("img","absolute",_2b,_2c,_2d,top);
}
if(src){
this.setTransparentImageSrc(_2f,src);
}
return _2f;
}
catch(ex){
jsExDebug("createTransparentImage",ex);
}
}
function dom_setTransparentImageSrc(_30,src,_32){
try{
if(document.all){
this.peepelImageCount++;
_30.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+(_32?"', sizingMethod='scale')":")");
this.peepelLoadedImageCount++;
}else{
this.peepelImageCount++;
this.SYSTEM.Event.attachEvent(_30,"onload","load",new this.SYSTEM.Delegate(this,imageLoadEvent),false,_30);
_30.src=src;
}
}
catch(ex){
jsExDebug("setTransparentImageSrc",ex);
}
}
function dom_setElementOpacity(_33,_34){
try{
_34=(_34<1?_34:_34/100);
if(document.all){
_33.style.filter="alpha(opacity="+(_34*100)+")";
}else{
_33.style.opacity=_34;
}
}
catch(ex){
jsExDebug("setElementOpacity",ex);
}
}
function dom_urlEncode(str){
try{
var div=document.createElement("div");
var _37=document.createTextNode(str);
div.appendChild(_37);
return div.innerHTML;
}
catch(ex){
jsExDebug("dom_urlEncode",ex);
}
}
function dom_showInterfaceCover(_38,_39){
try{
this.interfaceCoverDiv.style.backgroundColor=(_38?_38:"rgb(100,100,100)");
this.setElementOpacity(this.interfaceCoverDiv,(_39?_39:0.75));
document.body.appendChild(this.interfaceCoverDiv);
}
catch(ex){
jsExDebug("dom_showInterfaceCover",ex);
}
}
function dom_hideInterfaceCover(){
try{
if(this.interfaceCoverDiv.parentNode==document.body){
document.body.removeChild(this.interfaceCoverDiv);
}
}
catch(ex){
jsExDebug("dom_hideInterfaceCover",ex);
}
}
function dom_setElementClass(_3a,_3b){
try{
if(!_3a){
return;
}
if(this.SYSTEM.Environment.userAgentIsIE()){
_3a.setAttribute("className",_3b);
}else{
_3a.setAttribute("class",_3b);
}
}
catch(ex){
jsExDebug("dom_setElementClass",ex);
}
}
function dom_elementIsChildOf(_3c,_3d){
try{
var el=_3c;
while(el!=_3d&&el!=document.body){
try{
el=el.parentNode;
}
catch(ex1){
break;
}
}
return el==_3d;
}
catch(ex){
jsExDebug("dom_elementIsChildOf",ex);
}
}
function dom_setElementFloat(_3f,_40){
try{
if(this.SYSTEM.Environment.userAgentIsIE()){
_3f.style.styleFloat=_40;
}else{
_3f.style.cssFloat=_40;
}
}
catch(ex){
jsExDebug("dom_setElementFloat",ex);
}
}
function dom_getCurrentStyle(_41){
try{
if(_41.currentStyle){
return _41.currentStyle;
}else{
return window.getComputedStyle(_41,null);
}
}
catch(ex){
jsExDebug("dom_getCurrentStyle",ex);
}
}
function dom_imageLoadEvent(_42,_43){
try{
this.peepelLoadedImageCount++;
this.SYSTEM.Event.detachEvent(_43);
}
catch(ex){
jsExDebug("imageLoadEvent",ex);
}
}

try{
delegate_t.prototype=new peepelObject_t();
delegate_t.prototype.constructor=delegate_t;
delegate_t.prototype.cleanUp=delegate_cleanUp;
delegate_t.prototype.delegate_super=peepelObject_t.prototype.constructor;
delegate_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
delegate_t.prototype.invoke=delegate_invoke;
delegate_t.prototype.invokeResult=delegate_invokeResult;
delegate_t.prototype.invokeWith=delegate_invokeWith;
delegate_t.prototype.asyncInvoke=delegate_asyncInvoke;
delegate_t.prototype.getScope=delegate_getScope;
delegate_t.prototype.setScope=delegate_setScope;
delegate_t.prototype.toString=delegate_toString;
}
catch(ex){
jsExDebug("delegate_prototype",ex);
}
function delegate_t(_1,_2,_3,_4){
try{
this.delegate_super();
this.instance=_1;
this.handler=_2;
this.isDelegate=true;
this.paramMask=(_3?_3:[]);
this.paramDefault=(_4?_4:[]);
}
catch(ex){
jsExDebug("delegate_t",ex);
}
}
function delegate_cleanUp(me){
try{
if(!me){
var me=this;
}
if(!me.cleanUpIndex){
jsDebugText("double delegate cleanup: "+delegate_cleanUp.caller.toString().split("function ")[1].split("(")[0]);
return;
}
me.instance=null;
me.handler=null;
me.isDelegate=null;
for(var i=0;i<me.paramMask.length;i++){
me.paramMask[i]=null;
}
me.paramMask=null;
for(var i=0;i<me.paramDefault.length;i++){
me.paramDefault[i]=null;
}
me.paramDefault=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("delegate_cleanUp",ex);
}
}
function delegate_invoke(){
try{
if(this.handler){
this.handler.apply(this.instance,arguments);
}
}
catch(ex){
jsExDebug("delegate_invoke",ex);
}
}
function delegate_invokeResult(){
try{
if(this.handler){
return this.handler.apply(this.instance,arguments);
}
}
catch(ex){
jsExDebug("delegate_invokeResult",ex);
}
}
function delegate_invokeWith(_7){
try{
if(this.handler){
if(this.paramMask&&(this.paramMask.length>0)){
var _8=[];
var i;
for(i=0;i<this.paramMask.length;i++){
_8[i]=null;
if(this.paramDefault[i]!=null){
_8[i]=this.paramDefault[i];
}else{
if(this.paramMask[i]!=null){
if(_7[this.paramMask[i]]){
_8[i]=_7[this.paramMask[i]];
}
}
}
}
this.handler.apply(this.instance,_8);
}else{
this.handler.apply(this.instance,_7);
}
}
}
catch(ex){
jsExDebug("delegate_invokeWith",ex);
}
}
function delegate_asyncInvoke(){
function handler(me){
try{
me.invoke();
}
catch(ex){
jsExDebug("delegate_asyncInvoke: handler",ex);
}
}
try{
if(this.handler){
var _b=new timer_t(handler,this,null,1);
_b.startSingle();
}
}
catch(ex){
jsExDebug("delegate_asyncInvoke",ex);
}
}
function delegate_getScope(){
try{
return this.instance;
}
catch(ex){
jsExDebug("delegate_getScope");
}
}
function delegate_setScope(_c){
try{
this.instance=_c;
}
catch(ex){
jsExDebug("delegate_setScope");
}
}
function delegate_toString(){
try{
if(this.handler){
var _d=this.handler.toString().split("function ")[1];
_d=_d.split("(")[0];
return "Delegate: "+_d+" (handler);";
}else{
if(this.instance){
var _e=this.instance.constructor.toString().split("function ")[1];
_e=_e.split("(")[0];
return "Delegate: "+_e+" (instance);";
}
}
}
catch(ex){
jsExDebug("",ex);
}
}

try{
requestObject_t.prototype.constructor=requestObject_t;
requestObject_t.prototype.cleanUp=requestObject_cleanUp;
}
catch(ex){
jsExDebug("requestObject:prototype",ex);
}
function requestObject_t(_1,_2,_3,_4,_5){
try{
this.url=(_1)?_1:null;
this.data=(_2)?_2:null;
this.callback=(_3)?_3:null;
this.instance=(_4)?_4:null;
this.isJSONRequest=(_5)?_5:null;
}
catch(ex){
jsExDebug("requestObject_t",ex);
}
}
function requestObject_cleanUp(){
try{
this.url=null;
this.data=null;
this.callback=null;
this.instance=null;
this.isJSONRequest=null;
}
catch(ex){
jsExDebug("requestObject_cleanUp",ex);
}
}
try{
network_t.prototype=new peepelObject_t();
network_t.prototype.constructor=network_t;
network_t.prototype.cleanUp=network_cleanUp;
network_t.prototype.network_super=peepelObject_t.prototype.constructor;
network_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
network_t.prototype.registerCleanUp=network_registerCleanUp;
network_t.prototype.initialise=network_initialise;
network_t.prototype.setOnline=network_setOnline;
network_t.prototype.setOffline=network_setOffline;
network_t.prototype.getStatus=network_getStatus;
network_t.prototype.registerNetworkObject=network_registerNetworkObject;
network_t.prototype.unRegisterNetworkObject=network_unRegisterNetworkObject;
network_t.prototype.request=network_request;
network_t.prototype.ping=network_ping;
network_t.prototype.isOnline=network_isOnline;
network_t.prototype.onBeforeUnloadEvent=network_onBeforeUnloadEvent;
network_t.prototype.bufferRequest=network_bufferRequest;
network_t.prototype.notifyNetworkStatus=network_notifyNetworkStatus;
network_t.prototype.doBufferedRequests=network_doBufferedRequests;
network_t.prototype.asyncRequest=network_asyncRequest;
network_t.prototype.handleBadResponse=network_handleBadResponse;
network_t.prototype.JSONRequest=network_JSONRequest;
network_t.prototype.syncRequest=network_syncRequest;
network_t.prototype.registerNetworkStatusApp=network_registerNetworkStatusApp;
network_t.prototype.unregisterNetworkStatusApp=network_unregisterNetworkStatusApp;
network_t.prototype.processXmlFilters=network_processXmlFilters;
network_t.prototype.processJSONFilters=network_processJSONFilters;
network_t.prototype.PING_PATH="/php/ping.php";
network_t.prototype.PROXY_PATH="/php/proxy.php";
network_t.prototype.SERVICES_PATH="peepel_services.php";
network_t.prototype.OFFLINE=1;
network_t.prototype.ONLINE=2;
network_t.prototype.REQUEST_FAILED_FEED_ERR=1;
network_t.prototype.REQUEST_FAILED_DB_ERR=2;
network_t.prototype.REQUEST_FAILED_AUTH_ERR=3;
network_t.prototype.REQUEST_FAILED_FEED_DEEP_ERR=4;
}
catch(ex){
jsExDebug("network:prototype",ex);
}
function network_t(_6){
try{
this.network_super();
this.initialised=false;
this.badResponseCount=0;
this.badPingCount=0;
this.networkStatus=this.OFFLINE;
this.networkStatusApp=null;
this.UNLOADING=false;
this.networkObjectRegistry=[];
this.requestBuffer=[];
}
catch(ex){
jsExDebug("network_t",ex);
}
}
function network_cleanUp(me){
try{
if(!me){
var me=this;
}
me.initialised=null;
me.networkStatus=null;
me.networkStatusApp=null;
me.badResponseCount=null;
me.badPingCount=null;
delete me.networkObjectRegistry;
delete me.requestBuffer;
me.networkObjectRegistry=null;
me.requestBuffer=null;
me.SYSTEM.Network=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("network_cleanUp",ex);
}
}
function network_registerCleanUp(){
try{
}
catch(ex){
jsExDebug("network_registerCleanUp",ex);
}
}
function network_initialise(_8){
try{
if(!this.initialised){
this.ping(arguments,this.initialise);
return;
}
if(_8){
_8.invoke((this.initialised&&(this.networkStatus==this.ONLINE))?true:false);
}
}
catch(ex){
jsExDebug("network_initialise",ex);
}
}
function network_setOnline(){
try{
if(this.networkStatus!=this.ONLINE){
this.badResponseCount=0;
this.badPingCount=0;
this.networkStatus=this.ONLINE;
this.notifyNetworkStatus();
}
}
catch(ex){
jsExDebug("network_setOnline",ex);
}
}
function network_setOffline(){
function offlinePeriodicHandler(){
try{
if(this.networkStatus!=this.OFFLINE){
return;
}else{
this.ping();
this.offlineTimer.startSingle();
}
}
catch(ex){
jsExDebug("network_setOffline",ex);
}
}
try{
if(this.networkStatus!=this.OFFLINE&&this.SYSTEM){
this.networkStatus=this.OFFLINE;
this.notifyNetworkStatus();
this.offlineTimerDelegate=new this.SYSTEM.Delegate(this,offlinePeriodicHandler);
this.offlineTimer=new timer_t(this.offlineTimerDelegate,null,null,20000);
this.offlineTimer.startSingle();
}
}
catch(ex){
jsExDebug("network_setOffline",ex);
}
}
function network_getStatus(){
try{
return this.networkStatus;
}
catch(ex){
jsExDebug("network_getStatus",ex);
}
}
function network_registerNetworkObject(_9){
try{
var _a;
var _b=this.networkObjectRegistry.length;
this.networkObjectRegistry.push(_9);
if(this.networkObjectRegistry[_b]){
_a=this.networkObjectRegistry[_b];
if(_a){
if(_a.networkStatusChanged){
_a.networkStatusChanged(this.networkStatus);
}
}
}else{
jsDebug("network_registerNetworkObject - no object at this index");
}
return _b;
}
catch(ex){
jsExDebug("network_registerNetworkObject",ex);
}
}
function network_unRegisterNetworkObject(_c){
try{
this.networkObjectRegistry[_c]=null;
}
catch(ex){
jsExDebug("network_unRegisterNetworkObject",ex);
}
}
function network_notifyNetworkStatus(){
try{
var i;
var _e;
var _f=this.networkStatus;
for(i=0;i<this.networkObjectRegistry.length;i++){
_e=this.networkObjectRegistry[i];
if(_e){
if(_e.networkStatusChanged){
_e.networkStatusChanged(_f);
}
}
}
}
catch(ex){
jsExDebug("network_notifyNetworkStatus",ex);
}
}
function network_bufferRequest(_10,_11,_12,_13,_14){
try{
this.requestBuffer.push(new requestObject_t(_10,_11,_12,_13,_14));
jsDebugText(_10+": "+this.requestBuffer.length+" isJSON = "+_14);
if(this.SYSTEM.NetworkStatus){
this.SYSTEM.NetworkStatus.newBufferedRequest();
}
}
catch(ex){
jsExDebug("network_bufferRequests",ex);
}
}
function network_doBufferedRequests(){
function doNext(_15,_16,_17){
try{
_18.invoke.call(_18,_15,_18.instance,_17);
if(_19==(me.requestBuffer.length-1)){
me.requestBuffer.splice(0,me.requestBuffer.length);
}
_19++;
doBufferedRequest.call(me);
}
catch(ex){
jsExDebug("doNext",ex);
}
}
function doBufferedRequest(){
try{
var _1b=false;
var _1c=this.requestBuffer[_19];
if(!_1c){
return;
}
if(!_18){
_18=new this.SYSTEM.Delegate(_1c.instance,_1c.callback);
}else{
_18.instance=_1c.instance;
_18.handler=_1c.callback;
}
if(_1c.isJSONRequest){
_1b=this.JSONRequest(_1c.url,_1c.data,doNext,this);
}else{
_1b=this.request(_1c.url,_1c.data,doNext,this);
}
if(_1b){
if(this.SYSTEM.NetworkStatus){
this.SYSTEM.NetworkStatus.removeBufferedRequest();
}
}else{
jsDebugText("doBufferedRequests:could not send request - splice out successfully sent requests, break");
this.requestBuffer.splice(0,_19);
}
}
catch(ex){
jsExDebug("doBufferedRequest",ex);
}
}
try{
var me=this;
var _19=0;
var _18;
doBufferedRequest.call(this);
}
catch(ex){
jsExDebug("network_doBufferedRequests",ex);
}
}
function network_request(_1d,_1e,_1f,_20,_21){
try{
if(this.UNLOADING){
return;
}
var _22;
if(_21){
_22=_21;
}else{
_22=false;
}
if(!this.initialised){
this.ping(arguments,this.request);
return;
}
if(this.networkStatus==this.ONLINE){
if(_1f&&_1f.isDelegate){
this.asyncRequest(_1d,_1e,_1f.handler,_1f.instance,_22);
}else{
this.asyncRequest(_1d,_1e,_1f,_20,_22);
}
}else{
if(_22){
if(_1f&&_1f.isDelegate){
this.bufferRequest(_1d,_1e,_1f.handler,_1f.instance);
}else{
this.bufferRequest(_1d,_1e,_1f,_20);
}
this.ping();
}else{
this.ping();
}
return false;
}
return true;
}
catch(ex){
jsExDebug("network_request",ex);
}
}
function network_ping(_23,_24){
function pingCallback(_25,me){
try{
var _27=false;
var _28=me.networkStatus;
if(!_25){
}else{
if(!_25.firstChild){
}else{
if(_25.firstChild.nodeName!="p"){
}else{
_27=true;
}
}
}
if(_27){
if(_28!=me.ONLINE){
me.setOnline();
}
me.doBufferedRequests();
}else{
if(_28!=me.OFFLINE){
me.setOffline();
}
}
if(_24){
_24.apply(me,_23);
}
}
catch(ex){
jsExDebug("network_ping:pingCallback",ex);
}
}
try{
this.initialised=true;
this.asyncRequest(this.PING_PATH,1,pingCallback,this);
}
catch(ex){
jsExDebug("network_ping",ex);
}
}
function network_isOnline(){
try{
return (this.networkStatus==this.ONLINE);
}
catch(ex){
jsExDebug("network_isOnline",ex);
}
}
function network_dudHandler(){
return false;
}
function network_onBeforeUnloadEvent(){
SYSTEM.Network.UNLOADING=true;
}
function network_handleBadResponse(_29,_2a,_2b,_2c,_2d,_2e){
try{
if(this.UNLOADING){
return;
}
this.badResponseCount++;
if(this.badResponseCount<=1){
if(_2d){
this.bufferRequest(_29,_2a,_2b,_2c,_2e);
}
this.ping();
}else{
if(this.networkStatus!=this.OFFLINE){
this.setOffline();
}
}
}
catch(ex){
jsExDebug("network_handleBadResponse",ex);
}
}
function network_asyncRequest(_2f,_30,_31,_32,_33){
try{
function responseHandler(){
try{
var _34=false;
if(_35.readyState==4){
if(_35.status==200){
if(!_35.responseXML){
jsDebug("Non xml response from server: "+_35.responseText);
_34=true;
}
me.processXmlFilters(_35.responseXML);
if(_31){
_31(_35.responseXML,_32,_35.responseText);
}
_35.onreadystatechange=network_dudHandler;
_35=null;
}else{
me.handleBadResponse(_2f,_30,_31,_32,_33);
}
}
if(_34){
me.ping();
}
}
catch(ex){
me.handleBadResponse(_2f,_30,_31,_32,_33);
}
}
if(this.UNLOADING){
return;
}
try{
var me=this;
var _35=createRequestObject();
if(!_35){
jsDebug("contents; xmlHttp object failed creation.");
}
try{
if(_30){
_35.open("POST",_2f,true);
}else{
_35.open("GET",_2f,true);
}
}
catch(ex1){
jsExDebug("network_asyncRequest",ex1);
}
_35.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
_35.setRequestHeader("Peepel-Auth",1);
_35.onreadystatechange=responseHandler;
try{
_35.send(_30);
}
catch(ex){
}
}
catch(ex){
jsExDebug("network_asyncRequest",ex);
}
}
catch(ex){
jsExDebug("network:network_asyncRequest",ex);
}
}
function network_JSONRequest(_37,_38,_39,_3a,_3b){
function responseHandler(){
try{
var _3c=false;
if(_3d.readyState==4){
if(_3d.status==200){
if(_3d.responseText){
var _3e=_3d.responseText.toString().replace(/^(\r|\n)+/,"");
if(_3e.match(/^\s*\{/)){
_3e="["+_3e+"]";
}
try{
var _3f=eval(_3e);
}
catch(ex){
jsDebug("JSON eval Error: "+_3e);
return;
}
me.processJSONFilters(_3f);
if(_39){
_39.call(_3a,_3f);
}
}else{
_3c=true;
}
}else{
me.handleBadResponse(_37,_38,_39,_3a,_3b,true);
}
if(_3c){
me.ping();
}
}
}
catch(ex){
me.handleBadResponse(_37,_38,_39,_3a,_3b,true);
}
}
if(this.UNLOADING){
return;
}
try{
var me=this;
var _3d=createRequestObject();
if(!_3d){
jsDebug("contents; xmlHttp object failed creation.");
}
_37+="&repres=json";
try{
if(_38){
_3d.open("POST",_37,true);
}else{
_3d.open("GET",_37,true);
}
}
catch(ex1){
jsExDebug("network_JSONRequest - opening xhr object",ex1);
}
_3d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
_3d.setRequestHeader("Peepel-Auth",1);
_3d.onreadystatechange=responseHandler;
try{
_3d.send(_38);
}
catch(ex){
}
}
catch(ex){
jsExDebug("network_JSONRequest",ex);
}
}
function network_syncRequest(_41,_42){
if(this.UNLOADING){
return;
}
try{
var _43=createRequestObject();
try{
if(_42){
_43.open("POST",_41,false);
}else{
_43.open("GET",_41,false);
}
}
catch(ex1){
jsDebug("network_syncRequest: Error opening xmlHttp object: "+_41);
_43=null;
return;
}
_43.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
_43.setRequestHeader("Content-length",(_42?_42.length:0));
try{
_43.send(_42);
}
catch(ex){
jsDebug("network_syncRequest: Error sending request to: "+_41);
_43.onreadystatechange=network_dudHandler;
_43=null;
}
var _44=_43.responseXML;
if(!_44){
jsDebug("network_syncRequest: Non xml response from server: "+_43.responseText+"("+_41+")");
me.ping();
}
_43=null;
return _44;
}
catch(ex){
jsExDebug("network_syncRequest",ex);
}
}
function network_registerNetworkStatusApp(app){
try{
if(this.networkStatusApp){
return false;
}
this.networkStatusApp=app;
return true;
}
catch(ex){
jsExDebug("network_registerNetworkStatusApp",ex);
}
}
function network_unregisterNetworkStatusApp(){
try{
this.networkStatusApp=null;
}
catch(ex){
jsExDebug("network_unregisterNetworkStatusApp",ex);
}
}
function network_processXmlFilters(_46){
try{
if(!_46||!SYSTEM.Security){
return;
}
var _47=getChildNode(_46,"security",0);
if(_47){
var _48=getChildNode(_47,"error",0);
if(_48&&_48.getAttribute("nr")==this.REQUEST_FAILED_AUTH_ERR){
SYSTEM.Security.handleDeauthentication(1);
}
}
}
catch(ex){
jsExDebug("network_processXmlFilters",ex);
}
}
function network_processJSONFilters(_49){
try{
if(!_49||!SYSTEM.Security){
return;
}
if(_49[0]&&_49[0].code&&_49[0].code==this.REQUEST_FAILED_AUTH_ERR){
SYSTEM.Security.handleDeauthentication(1);
}
}
catch(ex){
jsExDebug("network_processJSONFilters",ex);
}
}

try{
security_t.prototype.constructor=new peepelObject_t();
security_t.prototype.security_super=peepelObject_t.prototype.constructor;
security_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
security_t.prototype.constructor=security_t;
security_t.prototype.cleanUp=security_cleanUp;
security_t.prototype.getAuthenticationStatus=security_getAuthenticationStatus;
security_t.prototype.signInAsUser=security_signInAsUser;
security_t.prototype.upgradeToKnownEmail=security_upgradeToKnownEmail;
security_t.prototype.deauthenticate=security_deauthenticate;
security_t.prototype.handleDeauthentication=security_handleDeauthentication;
security_t.prototype.openIDAuthenticate=security_openIDAuthenticate;
security_t.prototype.simpleOpenIDAuthenticate=security_simpleOpenIDAuthenticate;
security_t.prototype.checkOpenIDAuthenticateResponse=security_checkOpenIDAuthenticateResponse;
security_t.prototype.detachOpenIDFromAccount=security_detachOpenIDFromAccount;
security_t.prototype.overwriteUserPassword=security_overwriteUserPassword;
security_t.prototype.overwriteNonEmailPassUserPassword=security_overwriteNonEmailPassUserPassword;
security_t.prototype.updateUserPassword=security_updateUserPassword;
security_t.prototype.signUpEmailPass=security_signUpEmailPass;
security_t.prototype.signUpOpenID=security_signUpOpenID;
security_t.prototype.userId=null;
security_t.prototype.TEMP_USER_MASK=256;
security_t.prototype.EMAIL_USER_MASK=512;
security_t.prototype.EMAILPASS_USER_MASK=1024;
security_t.prototype.OPENID_USER_MASK=2048;
security_t.prototype.SECURITY_URL="peepel_services.php?service=security";
security_t.prototype.ACTION_GET_AUTH_STATUS=101;
security_t.prototype.ACTION_SIGNIN_AS_USER=102;
security_t.prototype.ACTION_UPGRADE_TO_KNOWN_EMAIL=103;
security_t.prototype.ACTION_DEAUTHENTICATE=105;
security_t.prototype.ACTION_ATTACH_OPEN_ID=107;
security_t.prototype.ACTION_LOGIN_OPEN_ID=108;
security_t.prototype.ACTION_DETACH_OPENID=109;
security_t.prototype.ACTION_OVERWRITE_USER_PASSWORD=110;
security_t.prototype.ACTION_SIGN_UP_EMAIL_PASS=112;
security_t.prototype.ACTION_SIGN_UP_OPEN_ID=113;
security_t.prototype.ACTION_UPDATE_USER_PASSWORD=114;
}
catch(ex){
jsExDebug("network:prototype",ex);
}
function security_t(_1){
try{
this.security_super();
if(!_1){
alert("no userid - error!");
return;
}else{
this.userId=_1;
}
}
catch(ex){
jsExDebug("security_t",ex);
}
}
function security_cleanUp(me){
try{
if(!me){
var me=this;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("security_cleanUp",ex);
}
}
function security_getAuthenticationStatus(_3){
function getAuthenticationStatusCallback(_4){
try{
if(!_4){
}
if(!_4.hasChildNodes()){
}
var _5,i,_7;
var _8=[];
var _9=_4.firstChild;
if((_9.nodeName=="security")&&_9.hasChildNodes()){
_8=_9.childNodes;
for(i=0;i<_8.length;i++){
_7=_8[i];
if((_7.nodeName=="status")&&(_7.hasChildNodes())){
_3.invoke(_7.firstChild.nodeValue);
return;
}
}
}
}
catch(ex){
jsExDebug("security_getAuthenticationStatus:getAuthenticationStatus",ex);
}
}
try{
SYSTEM.Network.request(this.SECURITY_URL+"&action="+this.ACTION_GET_AUTH_STATUS,null,getAuthenticationStatusCallback);
}
catch(ex){
jsExDebug("security_getAuthenticationStatus",ex);
}
}
function security_signInAsUser(_a,_b,_c){
function signInAsUserCallback(_d){
try{
var _e,_f,_10,i,_12;
var _13=[];
if(_d&&_d.hasChildNodes()){
var _14=_d.firstChild;
if((_14.nodeName=="security")&&_14.hasChildNodes()){
_13=_14.childNodes;
for(i=0;i<_13.length;i++){
_12=_13[i];
if((_12.nodeName=="userchange")&&(_12.hasChildNodes())){
if(_12.firstChild.nodeValue=="success"){
_e=true;
}else{
_e=false;
}
}else{
if((_12.nodeName=="status")&&(_12.hasChildNodes())){
_f=_12.firstChild.nodeValue;
}else{
if((_12.nodeName=="userid")&&(_12.hasChildNodes())){
_10=_12.firstChild.nodeValue;
}
}
}
}
}
}else{
_e=false;
}
if(_f&&_10){
this.userId=_10;
}
_c.invoke(_e,_10,_f);
}
catch(ex){
jsExDebug("security_t:signInAsUserCallback",ex);
}
}
try{
SYSTEM.Network.request(this.SECURITY_URL+"&action="+this.ACTION_SIGNIN_AS_USER,"&user="+secureStringForRequest(_a)+"&pass="+_b,signInAsUserCallback);
}
catch(ex){
jsExDebug("security_signInAsDifferentUser",ex);
}
}
function security_upgradeToKnownEmail(_15,_16){
function upgradeToKnownEmailCallback(_17){
try{
if(!_17){
}
var _18=_17.getElementsByTagName("status")[0];
if(_18){
_16.invoke(_18.firstChild.nodeValue);
}else{
_16.invoke(false);
}
}
catch(ex){
jsExDebug("security_t:upgradeToKnownEmailCallback",ex);
}
}
try{
SYSTEM.Network.request(this.SECURITY_URL+"&action="+this.ACTION_UPGRADE_TO_KNOWN_EMAIL+"&email="+_15,null,upgradeToKnownEmailCallback);
}
catch(ex){
jsExDebug("security_upgradeToKnownEmail",ex);
}
}
function security_deauthenticate(_19){
function deauthenticateCallback(_1a){
try{
if(!_1a||!_19){
return;
}
var _1b,i,_1d;
var _1e=[];
var _1f=_1a.firstChild;
if(_1f&&(_1f.nodeName=="security")&&_1f.hasChildNodes()){
_1e=_1f.childNodes;
for(i=0;i<_1e.length;i++){
_1d=_1e[i];
if((_1d.nodeName=="status")&&(_1d.hasChildNodes())){
_19.invoke(true);
return;
}
}
}
}
catch(ex){
jsExDebug("security_t:deauthenticateCallback",ex);
}
}
try{
SYSTEM.Network.request(this.SECURITY_URL+"&action="+this.ACTION_DEAUTHENTICATE,null,deauthenticateCallback);
}
catch(ex){
jsExDebug("security_deauthenticate",ex);
}
}
function security_handleDeauthentication(_20){
try{
showExitMessage(false);
window.location="peepel_login.php?deauth="+(_20?1:0);
}
catch(ex){
jsExDebug("security_handleDeauthentication",ex);
}
}
function security_openIDAuthenticate(_21,_22,_23){
function response(xml,me){
try{
if(xml.getElementsByTagName("v1")[0]){
showExitMessage(false);
window.location=URLDecode(getNodeValue(xml,"v1"));
}else{
if(xml.getElementsByTagName("v2")[0]){
var _26=getNodeValue(xml,"v2");
var _27=_26.indexOf("<form");
var _28=_26.indexOf("</form>");
var _29=_26.substr(_27,_28-_27+7);
var _2a=_29.match(/id="[\w]*"/)[0].replace(/id="([\w]*)"/,"$1");
document.body.innerHTML+=_29;
var _2b=document.getElementById(_2a);
_2b.style.visibility="hidden";
_2b.submit();
}else{
if(_23){
_23.invoke(xml);
}
}
}
}
catch(ex){
jsExDebug("security_openIDAuthenticate: response");
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=security&action="+_22+"&oidurl="+_21,null,response,this);
}
catch(ex){
jsExDebug("security_openIDAuthenticate");
}
}
function security_simpleOpenIDAuthenticate(_2c,_2d,_2e){
function response(xml,me){
try{
var url=getNodeValue(getChildNode(xml,"security",0),"url");
if(url){
showExitMessage(false);
window.location=URLDecode(url);
}else{
me.checkOpenIDAuthenticateResponse(xml);
if(_2e){
_2e.invoke();
}
}
}
catch(ex){
jsExDebug("security_simpleOpenIDAuthenticate: response");
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=security&action="+_2d+"&oidurl="+_2c,null,response,this);
}
catch(ex){
jsExDebug("security_simpleOpenIDAuthenticate");
}
}
function security_checkOpenIDAuthenticateResponse(xml){
try{
var _33="";
if(xml.getElementsByTagName("existing")[0]){
_33="You already have an OpenID attached to your account, detach it before attaching another.";
}else{
_33="There is something wrong with your OpenID, either it does not exist or that provider is not supported by peepel.com.";
}
var d=new this.SYSTEM.Dialogue.Error(null,"OpenID",_33,null,400);
}
catch(ex){
jsExDebug("security_checkOpenIDAuthenticateResponse");
}
}
function security_detachOpenIDFromAccount(_35,_36){
function response(xml,me){
try{
var _39=getChildNode(xml,"status",0);
if(_39){
_36.invoke(_39.firstChild.nodeValue);
}else{
_36.invoke(false,getChildNode(xml,"error",0));
}
}
catch(ex){
jsExDebug("security_openIDAuthenticate: response",ex);
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=security&action="+this.ACTION_DETACH_OPENID,"oidurl="+_35,response,this);
}
catch(ex){
jsExDebug("security_detachOpenIDFromAccount");
}
}
function security_overwriteUserPassword(_3a,_3b,_3c,_3d){
function response(xml,me){
try{
if(_3d){
_3d.invoke(getNodeValue(xml,"success")=="0");
}
}
catch(ex){
jsExDebug("security_overwriteUserPassword: response");
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=security&action="+this.ACTION_OVERWRITE_USER_PASSWORD,"forgotuser="+_3a+"&pass="+_3c+"&forgotguid="+_3b,response,this);
}
catch(ex){
jsExDebug("security_overwriteUserPassword");
}
}
function security_overwriteNonEmailPassUserPassword(_40,_41){
function response(xml,me){
try{
if(_41){
_41.invoke(getNodeValue(xml,"success")=="0");
}
}
catch(ex){
jsExDebug("security_overwriteNonEmailPassUserPassword: response");
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=security&action="+this.ACTION_OVERWRITE_USER_PASSWORD,"&pass="+_40,response,this);
}
catch(ex){
jsExDebug("security_overwriteNonEmailPassUserPassword");
}
}
function security_updateUserPassword(_44,_45,_46){
function response(xml,me){
try{
if(_46){
var _49=getChildNode(xml,"invalid",0);
if(_49){
var _4a=[];
if(getChildNode(_49,"oldpassinvalid",0)){
_4a.push("The old password was incorrect.");
}
if(getChildNode(_49,"upgradeerror",0)){
_4a.push("A server error occured upgrading your password.");
}
_46.invoke(false,_4a);
}else{
_46.invoke(true);
}
}
}
catch(ex){
jsExDebug("security_overwriteUserPassword: response");
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=security&action="+this.ACTION_UPDATE_USER_PASSWORD,"pass="+_45+"&oldpass="+_44,response,this);
}
catch(ex){
jsExDebug("security_updateUserPassword");
}
}
function security_signUpEmailPass(_4b,_4c,_4d){
function response(xml,me){
try{
if(_4d){
var _50=getChildNode(xml,"invalid",0);
if(_50){
var _51=[];
if(getChildNode(_50,"emailmissing",0)){
_51.push("Email missing");
}
if(getChildNode(_50,"passwordmissing",0)){
_51.push("Password missing");
}
if(getChildNode(_50,"useriderror",0)){
_51.push("Server error getting your userid");
}
if(getChildNode(_50,"emailtaken",0)){
_51.push("The email address is taken");
}
if(getChildNode(_50,"emailerror",0)||getChildNode(_50,"failurereautherror1",0)||getChildNode(_50,"failurereautherror1",0)){
_51.push("Server error upgrading email address");
}
_4d.invoke(false,_51);
}else{
_4d.invoke(true);
}
}
}
catch(ex){
jsExDebug("security_signUpEmailPass: response",ex);
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=security&action="+this.ACTION_SIGN_UP_EMAIL_PASS,"email="+_4b+"&pass="+_4c,response,this);
}
catch(ex){
jsExDebug("security_signUpEmailPass",ex);
}
}
function security_signUpOpenID(_52,_53){
function response(xml,me){
try{
var _56=getNodeValue(getChildNode(xml,"security",0),"url");
if(_56){
showExitMessage(false);
window.location=URLDecode(_56);
}else{
var _57=getChildNode(xml,"invalid",0);
var _58=[];
if(getChildNode(_57,"openidinvalid",0)){
_58.push("Your OpenID is either invalid or your provider is not supported by Peepel.com.");
}
if(getChildNode(_57,"openidtaken",0)){
_58.push("Your OpenID is already being used by another user.");
}
_53.invoke(_58);
}
}
catch(ex){
jsExDebug("security_signUpOpenID: response",ex);
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=security&action="+this.ACTION_SIGN_UP_OPEN_ID,"oidurl="+_52,response,this);
}
catch(ex){
jsExDebug("security_signUpOpenID",ex);
}
}

try{
actionListener_t.prototype=new peepelObject_t();
actionListener_t.prototype.constructor=actionListener_t;
actionListener_t.prototype.cleanUp=actionListener_cleanUp;
actionListener_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
actionListener_t.prototype.actionListener_super=peepelObject_t.prototype.constructor;
actionListener_t.prototype.registerActionListener=actionListener_registerActionListener;
actionListener_t.prototype.unregisterActionListener=actionListener_unregisterActionListener;
actionListener_t.prototype.invokeActionListeners=actionListener_invokeActionListeners;
}
catch(ex){
jsExDebug("actionListener_t.prototype",ex);
}
function actionListener_t(){
try{
this.actionListener_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.delegateRegistry=[];
this.objectRegistry=[];
this.objectCount=1;
}
catch(ex){
jsExDebug("actionListener_t",ex);
}
}
function actionListener_cleanUp(me){
try{
if(!me){
me=this;
}
for(var _2 in me.objectRegistry){
me.unregisterActionListener(_2);
}
me.objectRegistry=null;
for(var _3 in me.delegateRegistry){
for(var i in me.delegateRegistry[_3]){
if(me.delegateRegistry[_3][i]){
if(me.delegateRegistry[_3][i].isDelegate){
me.delegateRegistry[_3][i].cleanUp();
me.delegateRegistry[_3][i]=null;
}
}
}
me.delegateRegistry[_3]=null;
}
me.delegateRegistry=null;
me.objectCount=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("actionListener_cleanUp",ex);
}
}
function actionListener_registerActionListener(_5,_6,_7){
try{
var _8;
var _9=(_7)?_7:false;
if(!_9){
this.objectRegistry[this.objectCount]={};
this.objectRegistry[this.objectCount].actions=[];
_9=this.objectCount;
this.objectCount++;
}
if(!this.delegateRegistry[_5]){
this.delegateRegistry[_5]=[];
}
_8=this.delegateRegistry[_5].push(_6)-1;
if(!this.objectRegistry[_9].actions[_5]){
this.objectRegistry[_9].actions[_5]={};
this.objectRegistry[_9].actions[_5].delegates=[];
}
this.objectRegistry[_9].actions[_5].delegates[_8]=true;
return _9;
}
catch(ex){
jsExDebug("actionListener_registerActionListener",ex);
}
}
function actionListener_unregisterActionListener(_a){
try{
if(!this.objectRegistry){
return;
}
var _b;
var _c;
if(this.objectRegistry[_a]){
for(_b in this.objectRegistry[_a].actions){
for(_c in this.objectRegistry[_a].actions[_b].delegates){
if(this.delegateRegistry[_b][_c]){
if(this.delegateRegistry[_b][_c].isDelegate){
this.delegateRegistry[_b][_c].cleanUp();
this.delegateRegistry[_b][_c]=null;
}
}
}
}
this.objectRegistry[_a]=null;
}
this.objectRegistry[_a]=false;
}
catch(ex){
jsExDebug("actionListener_unregisterActionListener",ex);
}
}
function actionListener_invokeActionListeners(_d){
try{
if(this.delegateRegistry[_d]){
var _e=[];
for(var i=1;i<arguments.length;i++){
_e.push(arguments[i]);
}
for(delegate in this.delegateRegistry[_d]){
if(!this.delegateRegistry[_d][delegate]){
continue;
}
if(!this.delegateRegistry[_d][delegate].isDelegate){
continue;
}
this.delegateRegistry[_d][delegate].invokeWith(_e);
}
}
}
catch(ex){
jsExDebug("actionListener_invokeActionListeners",ex);
}
}

try{
rssItem_t.prototype=new peepelObject_t();
rssItem_t.prototype.constructor=rssItem_t;
rssItem_t.prototype.cleanUp=rssItem_cleanUp;
rssItem_t.prototype.rssItem_super=peepelObject_t.prototype.constructor;
rssItem_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
rssItem_t.prototype.processItemRssXml=rssItem_processItemRssXml;
rssItem_t.prototype.processMessage=rssItem_processMessage;
}
catch(ex){
jsExDebug("notifier_t:prototype",ex);
}
function rssItem_t(){
try{
this.rssItem_super();
this.initialised=false;
this.title=null;
this.link=null;
this.date=null;
this.guid=null;
this.messageText=null;
this.messageCode=null;
this.messageParams=null;
}
catch(ex){
jsExDebug("rssItem_t",ex);
}
}
function rssItem_cleanUp(me){
try{
if(!me){
me=this;
}
me.initialised=null;
me.title=null;
me.link=null;
me.date=null;
me.guid=null;
me.messageText=null;
me.messageCode=null;
me.messageParams=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("rssItem_cleanUp",ex);
}
}
function rssItem_processItemRssXml(_2){
try{
if(!_2){
return;
}
if(!_2.hasChildNodes()){
return;
}
var _3,_4,_5;
_3=_2;
_4=_3.childNodes;
for(_5=0;_5<_4.length;_5++){
if(_4[_5].nodeName=="title"){
if(_4[_5].hasChildNodes()){
if(_4[_5].firstChild.nodeValue){
this.title=_4[_5].firstChild.nodeValue;
}
}
}else{
if(_4[_5].nodeName=="link"){
if(_4[_5].hasChildNodes()){
if(_4[_5].firstChild.nodeValue){
this.link=_4[_5].firstChild.nodeValue;
}
}
}else{
if(_4[_5].nodeName=="description"){
if(_4[_5].hasChildNodes()){
if(_4[_5].firstChild.nodeValue){
this.initialised=this.processMessage(_4[_5].firstChild.nodeValue);
}
}
}else{
if(_4[_5].nodeName=="pubDate"){
if(_4[_5].hasChildNodes()){
if(_4[_5].firstChild.nodeValue){
this.date=_4[_5].firstChild.nodeValue;
}
}
}else{
if(_4[_5].nodeName=="guid"){
if(_4[_5].hasChildNodes()){
if(_4[_5].firstChild.nodeValue){
this.guid=_4[_5].firstChild.nodeValue;
}
}
}
}
}
}
}
}
}
catch(ex){
jsExDebug("rssItem_processItemRssXml",ex);
}
}
function rssItem_processMessage(_6){
try{
var _7;
if(_7=_6.match(/^([^\[\]]*)\[([^\[\]]*):([^\[\]]*)\]/)){
this.messageText=_7[1];
this.messageCode=_7[2];
this.messageParams=_7[3];
return true;
}else{
this.messageText=_6;
this.messageCode="";
this.messageParams="";
return false;
}
}
catch(ex){
jsExDebug("rssItem_processMessage",ex);
}
}

try{
rssChannel_t.prototype=new peepelObject_t();
rssChannel_t.prototype.constructor=rssChannel_t;
rssChannel_t.prototype.cleanUp=rssChannel_cleanUp;
rssChannel_t.prototype.rssChannel_super=peepelObject_t.prototype.constructor;
rssChannel_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
rssChannel_t.prototype.processChannelRssXml=rssChannel_processChannelRssXml;
rssChannel_t.prototype.mergeItemsFromChannel=rssChannel_mergeItemsFromChannel;
rssChannel_t.prototype.appendItemsFromChannel=rssChannel_appendItemsFromChannel;
}
catch(ex){
jsExDebug("rssChannel_t:prototype",ex);
}
function rssChannel_t(){
try{
this.rssChannel_super();
this.initialised=false;
this.isRssChannel=true;
this.title=null;
this.link=null;
this.description=null;
this.language=null;
this.pubDate=null;
this.lastBuildDate=null;
this.docs=null;
this.generator=null;
this.managingEditor=null;
this.webMaster=null;
this.items=[];
this.maxItemNumber=0;
}
catch(ex){
jsExDebug("rssChannel_t",ex);
}
}
function rssChannel_cleanUp(me){
try{
if(!me){
me=this;
}
for(var i in me.items){
if(me.items[i]){
if(me.items[i].guid){
me.items[i].cleanUp();
}
}
}
me.initialised=null;
me.isRssChannel=null;
me.title=null;
me.link=null;
me.description=null;
me.language=null;
me.pubDate=null;
me.lastBuildDate=null;
me.docs=null;
me.generator=null;
me.managingEditor=null;
me.webMaster=null;
me.items=null;
me.maxItemNumber=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("rssChannel_cleanUp",ex);
}
}
function rssChannel_processChannelRssXml(_3,me){
try{
if(!_3){
return "";
}
if(!_3.hasChildNodes()){
return "";
}
var _5=this.SYSTEM.Notifier.getNotifierWidget();
var _6=0;
var _7,_8,_9;
var _a;
_7=_3;
_8=_7.childNodes;
for(_9=0;_9<_8.length;_9++){
if(_8[_9].nodeName=="item"){
_a=new rssItem_t();
_a.processItemRssXml(_8[_9]);
if(_a.initialised){
this.items[_a.guid]=_a;
if(parseInt(_a.guid)>parseInt(this.maxItemNumber)){
this.maxItemNumber=parseInt(_a.guid);
}
if(_5){
var _b=_5.addNotification(_a.title,_a.date,_a.messageText,_a.messageCode,_a.messageParams);
if(_b){
_6++;
}
}
}
}else{
if(_8[_9].nodeName=="title"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.title=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="link"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.link=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="description"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.description=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="language"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.language=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="pubDate"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.pubDate=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="lastBuildDate"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.lastBuildDate=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="docs"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.docs=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="generator"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.generator=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="managingEditor"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.managingEditor=_8[_9].firstChild.nodeValue;
}
}
}else{
if(_8[_9].nodeName=="webMaster"){
if(_8[_9].hasChildNodes()){
if(_8[_9].firstChild.nodeValue){
this.webMaster=_8[_9].firstChild.nodeValue;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if(_5&&_6){
_5.showLastUnread();
}
return this.title;
}
catch(ex){
jsExDebug("rssChannel_processMessage",ex);
}
}
function rssChannel_mergeItemsFromChannel(_c){
try{
if(_c){
if(_c.isRssChannel){
for(var i in _c.items){
if(_c.items[i]){
if(_c.items[i].guid){
if(this.items[_c.items[i].guid]){
}else{
this.items[_c.items[i].guid]=_c.items[i];
}
}
}
}
if(_c.maxItemNumber>this.maxItemNumber){
this.maxItemNumber=_c.maxItemNumber;
}
}
}
}
catch(ex){
jsExDebug("rssChannel_appendItemsFromChannel",ex);
}
}
function rssChannel_appendItemsFromChannel(_e){
try{
if(_e){
if(_e.isRssChannel){
this.items.concat(_e.items);
if(_e.maxItemNumber>this.maxItemNumber){
this.maxItemNumber=_e.maxItemNumber;
}
}
}
}
catch(ex){
jsExDebug("rssChannel_appendItemsFromChannel",ex);
}
}

try{
rss_t.prototype=new peepelObject_t();
rss_t.prototype.constructor=rss_t;
rss_t.prototype.cleanUp=rss_cleanUp;
rss_t.prototype.rss_super=peepelObject_t.prototype.constructor;
rss_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
rss_t.prototype.processRssXml=rss_processRssXml;
rss_t.prototype.getMaxNotificationId=rss_getMaxNotificationId;
}
catch(ex){
jsExDebug("rss_t:prototype",ex);
}
function rss_t(){
try{
this.rss_super();
this.channels=[];
}
catch(ex){
jsExDebug("rss_t",ex);
}
}
function rss_cleanUp(me){
try{
if(!me){
me=this;
}
var i=null;
for(i in me.channels){
if(me.channels[i]){
if(me.channels[i].maxItemNumber){
me.channels[i].cleanUp();
}
}
}
me.channels=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("rss_t",ex);
}
}
function rss_processRssXml(_3){
try{
if(!_3){
return;
}
if(!_3.hasChildNodes()){
return;
}
var _4=_3.firstChild;
var _5;
var _6;
if(_4.hasChildNodes()){
for(_5=0;_5<_4.childNodes.length;_5++){
if(_4.childNodes[_5].nodeName){
if(_4.childNodes[_5].nodeName=="channel"){
_6=new rssChannel_t();
_6.processChannelRssXml(_4.childNodes[_5]);
if(!this.channels[_6.title]){
this.channels[_6.title]=_6;
}else{
this.channels[_6.title].mergeItemsFromChannel(_6);
}
_6=null;
}
}
}
}
}
catch(ex){
jsExDebug("rss_t",ex);
}
}
function rss_getMaxNotificationId(){
try{
var i;
var _8=0;
for(i in this.channels){
if(this.channels[i]){
if(this.channels[i].maxItemNumber){
if(_8<this.channels[i].maxItemNumber){
_8=this.channels[i].maxItemNumber;
}
}
}
}
return _8;
}
catch(ex){
jsExDebug("rss_getMaxNotificationId",ex);
}
}

try{
notifier_t.prototype=new actionListener_t();
notifier_t.prototype.constructor=notifier_t;
notifier_t.prototype.cleanUp=notifier_cleanUp;
notifier_t.prototype.notifier_super=actionListener_t.prototype.constructor;
notifier_t.prototype.actionListener_cleanUp=actionListener_t.prototype.cleanUp;
notifier_t.prototype.initialise=notifier_initialise;
notifier_t.prototype.raiseNotification=notifier_raiseNotification;
notifier_t.prototype.start=notifier_start;
notifier_t.prototype.stop=notifier_stop;
notifier_t.prototype.notifyApplications=notifier_notifyApplications;
notifier_t.prototype.checkForNotifications=notifier_checkForNotifications;
notifier_t.prototype.getNotifications=notifier_getNotifications;
notifier_t.prototype.networkStatusChanged=notifier_networkStatusChanged;
notifier_t.prototype.registerNotifierWidget=notifier_registerNotifierWidget;
notifier_t.prototype.getNotifierWidget=notifier_getNotifierWidget;
notifier_t.prototype.SECURITY_DEAUTH=990;
notifier_t.prototype.SECURITY_REAUTH=991;
notifier_t.prototype.SYSTEM_API_STARTUP=900;
notifier_t.prototype.SYSTEM_MAX=999;
notifier_t.prototype.CONTACTS_REQUEST=1000;
notifier_t.prototype.CONTACTS_ACCEPT=1001;
notifier_t.prototype.CONTACTS_REJECT=1002;
notifier_t.prototype.CONTACTS_BLOCK=1003;
notifier_t.prototype.CONTACTS_UNBLOCK=1004;
notifier_t.prototype.CONTACTS_REMOVE=1005;
notifier_t.prototype.CONTACTS_TRACK_STATUS=1006;
notifier_t.prototype.CONTACTS_MISC=1007;
notifier_t.prototype.CONTACTS_MAX=1999;
notifier_t.prototype.SHARING_SHARED_R_FILE=2000;
notifier_t.prototype.SHARING_SHARED_RW_FILE=2001;
notifier_t.prototype.SHARING_UNSHARED_FILE=2002;
notifier_t.prototype.SHARING_MAX=2999;
notifier_t.prototype.COLLAB_OPENED_FILE=3000;
notifier_t.prototype.COLLAB_CLOSED_FILE=3001;
notifier_t.prototype.COLLAB_SAVED_FILE=3002;
notifier_t.prototype.COLLAB_TAKEN_WRITE=3003;
notifier_t.prototype.COLLAB_GIVEN_WRITE=3004;
notifier_t.prototype.COLLAB_REQUEST_WRITE=3005;
notifier_t.prototype.COLLAB_RELEASE_WRITE=3006;
notifier_t.prototype.COLLAB_MAX=3999;
notifier_t.prototype.CHAT_START=4000;
notifier_t.prototype.CHAT_INVITE_X=4001;
notifier_t.prototype.CHAT_JOINED=4002;
notifier_t.prototype.CHAT_LEFT=4003;
notifier_t.prototype.CHAT_MAX=4999;
notifier_t.prototype.TRACK_NEW_LOCATION=5000;
notifier_t.prototype.TRACK_NEW_MEDIA=5001;
notifier_t.prototype.TRACK_NEW_PUB_LOCATION=5002;
notifier_t.prototype.TRACK_NEW_PUB_MEDIA=5003;
notifier_t.prototype.TRACK_MAX=5999;
notifier_t.prototype.PEEPELPOINT_ADD=6000;
notifier_t.prototype.PEEPELPOINT_DELETE=6001;
notifier_t.prototype.PEEPELPOINT_MAX=6999;
notifier_t.prototype.USER_AVATAR_CHANGE=7000;
notifier_t.prototype.USER_NAME_CHANGE=7001;
notifier_t.prototype.USER_MAX=7999;
notifier_t.prototype.PP_INFO=8000;
notifier_t.prototype.PP_NEW_VERSION=8001;
notifier_t.prototype.PP_MAX=8999;
notifier_t.prototype.FEED_URL="peepel_services.php?service=feed";
notifier_t.prototype.ACTION_WRITE_NOTES=1;
notifier_t.prototype.ACTION_READ_NOTES_INTERNAL=2;
notifier_t.prototype.ACTION_READ_NOTES_EXTERNAL=3;
notifier_t.prototype.ACTION_CHECK_NEW_NOTES=4;
notifier_t.prototype.STATE_INACTIVE=false;
notifier_t.prototype.STATE_SLEEPING=1;
notifier_t.prototype.STATE_POLLING=2;
notifier_t.prototype.INTERVAL_INITIAL=10000;
notifier_t.prototype.INTERVAL_SHORT=2000;
notifier_t.prototype.INTERVAL_MEDIUM=10000;
notifier_t.prototype.INTERVAL_LONG=300000;
notifier_t.prototype.INTERVAL_THRESHOLD=100;
notifier_t.prototype.SETTING_TYPE_INTERNAL=1;
notifier_t.prototype.SETTING_TYPE_EXTERNAL=2;
notifier_t.prototype.SETTING_TYPE_EMAIL=3;
}
catch(ex){
jsExDebug("notifier_t:prototype",ex);
}
function notifier_t(){
try{
this.notifier_super();
this.notifications=new rss_t();
this.processedNotificationMaxId=0;
this.timer=null;
this.state=this.STATE_INACTIVE;
this.interval=this.INTERVAL_INITIAL;
this.intervalCount=0;
this.wasActive=false;
this.networkObjectIndex=this.SYSTEM.Network.registerNetworkObject(this);
this.notifierWidget=null;
}
catch(ex){
jsExDebug("notifier_t",ex);
}
}
function notifier_cleanUp(me){
try{
if(!me){
me=this;
}
me.notifications.cleanUp();
me.notifications=null;
if(me.pollingDelegate){
me.pollingDelegate.cleanUp();
me.pollingDelegate=null;
}
if(me.checkForNotificationsDelegate){
me.checkForNotificationsDelegate.cleanUp();
me.checkForNotificationsDelegate=null;
}
if(me.getNoficationsDelegate){
me.getNoficationsDelegate.cleanUp();
me.getNoficationsDelegate=null;
}
if(me.timer){
me.timer.cleanUp();
me.timer=null;
}
me.notifierWidget=null;
SYSTEM.Notifier=null;
me.actionListener_cleanUp();
}
catch(ex){
jsExDebug("notifier_cleanUp",ex);
}
}
function notifier_initialise(){
try{
this.start();
}
catch(ex){
jsExDebug("notifier_initialise",ex);
}
}
function notifier_raiseNotification(_2){
try{
var i;
var _4=[];
if(this.delegateRegistry[_2]){
_4=this.delegateRegistry[_2];
for(i=0;i<_4.length;i++){
if(_4[i].isDelegate){
_4[i].invoke();
}
}
}
}
catch(ex){
jsExDebug("notifier_raiseNotification",ex);
}
}
function notifier_start(){
function operatePollingStateMachine(_5){
try{
switch(this.state){
case this.STATE_SLEEPING:
this.state=this.STATE_POLLING;
this.intervalCount++;
this.checkForNotifications();
break;
case this.STATE_POLLING:
if(_5){
this.interval=this.INTERVAL_SHORT;
this.intervalCount=0;
}else{
if(this.interval==this.INTERVAL_INITIAL){
this.interval=this.INTERVAL_SHORT;
this.intervalCount=1;
}else{
if(this.intervalCount>this.INTERVAL_THRESHOLD){
switch(this.interval){
case this.INTERVAL_SHORT:
this.interval=this.INTERVAL_MEDIUM;
break;
case this.INTERVAL_MEDIUM:
this.interval=this.INTERVAL_LONG;
break;
case this.INTERVAL_LONG:
this.interval=this.INTERVAL_LONG;
break;
}
this.intervalCount=0;
}
}
}
this.state=this.STATE_SLEEPING;
this.timer.setInterval(this.interval);
this.timer.startSingle();
break;
case this.STATE_INACTIVE:
if(this.timer){
this.timer.cleanUp();
this.timer=null;
}
break;
}
}
catch(ex){
jsExDebug("notifier_start: operatePollingStateMachine",ex);
}
}
try{
if(this.state==this.STATE_INACTIVE){
if(this.timer){
this.state=this.STATE_SLEEPING;
}else{
this.pollingDelegate=new this.SYSTEM.Delegate(this,operatePollingStateMachine);
this.state=this.STATE_SLEEPING;
this.timer=new timer_t(this.pollingDelegate,null,null,this.INTERVAL_INITIAL);
this.timer.startSingle();
}
}
}
catch(ex){
jsExDebug("notifier_start",ex);
}
}
function notifier_stop(){
try{
this.state=this.STATE_INACTIVE;
this.interval=this.INTERVAL_INITIAL;
}
catch(ex){
jsExDebug("notifier_stop",ex);
}
}
function notifier_notifyApplications(){
try{
var _6,_7;
var _8,_9;
var _a;
var _b=[];
var _c;
var _d=this.notifications.getMaxNotificationId();
if(this.processedNotificationMaxId<_d){
for(_6 in this.notifications.channels){
if(!this.notifications.channels[_6].items){
continue;
}
for(_7 in this.notifications.channels[_6].items){
if(_7<=this.processedNotificationMaxId){
continue;
}
if(!this.notifications.channels[_6].items[_7].messageCode){
continue;
}
_8=this.notifications.channels[_6].items[_7].messageCode;
_9=this.notifications.channels[_6].items[_7].messageParams;
_c=_8.toString()+":"+_9.toString();
if(_c.length>0){
if(!_b[_c]){
_b[_c]=true;
}else{
continue;
}
}
if(_9){
_9=_9.toString().split(",");
}
if(this.delegateRegistry[_8]){
for(_a in this.delegateRegistry[_8]){
if(!this.delegateRegistry[_8][_a]){
continue;
}
if(!this.delegateRegistry[_8][_a].isDelegate){
continue;
}
this.delegateRegistry[_8][_a].invokeWith(_9);
}
}
}
}
this.processedNotificationMaxId=_d;
}
}
catch(ex){
jsExDebug("notifier_notifyApplications",ex);
}
}
function notifier_checkForNotifications(){
function checkForNotificationsHandler(_e,me){
try{
if(!_e){
return;
}
if(!_e.hasChildNodes()){
return;
}
var _10=me.pollingDelegate;
if(_e.getElementsByTagName("y")[0]){
me.getNotifications();
if(_10){
_10.invoke(true);
}
}else{
if(_e.getElementsByTagName("n")[0]){
if(_10){
_10.invoke(false);
}
}else{
jsDebug("notifier_t:checkForNotificationsHandler:\n unexpected response");
}
}
}
catch(ex){
jsExDebug("checkForNotificationsHandler",ex);
}
}
try{
if(!this.checkForNotificationsDelegate){
this.checkForNotificationsDelegate=new this.SYSTEM.Delegate(this,checkForNotificationsHandler);
}
this.SYSTEM.Network.request(this.FEED_URL+"&action="+this.ACTION_CHECK_NEW_NOTES+"&mn="+this.processedNotificationMaxId,null,this.checkForNotificationsDelegate);
}
catch(ex){
jsExDebug("notifier_checkForNotifications",ex);
}
}
function notifier_getNotifications(){
function getNotificationsHandler(_11,me){
try{
if(!_11){
jsDebugText("getNotificationsHandler: No xml");
return;
}
if(!_11.hasChildNodes()){
jsDebugText("getNotificationsHandler: No child nodes");
return;
}
me.notifications.processRssXml(_11);
me.notifyApplications();
}
catch(ex){
jsExDebug("notifier_getNotifications: getNotificationsHandler",ex);
}
}
try{
if(!this.getNoficationsDelegate){
this.getNoficationsDelegate=new this.SYSTEM.Delegate(this,getNotificationsHandler);
}
this.SYSTEM.Network.request(this.FEED_URL+"&action="+this.ACTION_READ_NOTES_INTERNAL,null,this.getNoficationsDelegate);
}
catch(ex){
jsExDebug("notifier_getRss",ex);
}
}
function notifier_networkStatusChanged(_13){
try{
switch(_13){
case this.SYSTEM.Network.OFFLINE:
if(this.state!=this.STATE_INACTIVE){
this.wasActive=true;
this.stop();
}
break;
case this.SYSTEM.Network.ONLINE:
if(this.wasActive==true){
if(this.timer){
this.timer.cleanUp();
this.timer=null;
}
this.start();
}
break;
default:
jsDebug("notifier_networkStatusChanged: unknown network status");
break;
}
}
catch(ex){
jsExDebug("notifier_networkStatusChanged",ex);
}
}
function notifier_registerNotifierWidget(_14){
try{
if(this.notifierWidget||!_14){
return;
}
this.notifierWidget=_14;
}
catch(ex){
jsExDebug("notifier_registerNotifierWidget",ex);
}
}
function notifier_getNotifierWidget(){
try{
return this.notifierWidget;
}
catch(ex){
jsExDebug("notifier_getNotifierWidget",ex);
}
}

try{
apiRegistry_t.prototype=new peepelObject_t();
apiRegistry_t.prototype.constructor=apiRegistry_t;
apiRegistry_t.prototype.apiRegistry_super=peepelObject_t.prototype.constructor;
apiRegistry_t.prototype.cleanUp=apiRegistry_cleanUp;
apiRegistry_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
apiRegistry_t.prototype.register=apiRegistry_register;
apiRegistry_t.prototype.deRegister=apiRegistry_deRegister;
apiRegistry_t.prototype.resetAfterUserChange=apiRegistry_resetAfterUserChange;
apiRegistry_t.prototype.stop=apiRegistry_stop;
apiRegistry_t.prototype.start=apiRegistry_start;
apiRegistry_t.prototype.finishInitialisation=apiRegistry_finishInitialisation;
apiRegistry_t.prototype.registerResponse=apiRegistry_registerResponse;
apiRegistry_t.prototype.timerCallback=apiRegistry_timerCallback;
apiRegistry_t.prototype.contactsRefreshCallback=apiRegistry_contactsRefreshCallback;
apiRegistry_t.prototype.userDetailsSaveCallback=apiRegistry_userDetailsSaveCallback;
apiRegistry_t.prototype.apiStartupCallback=apiRegistry_apiStartupCallback;
apiRegistry_t.prototype.ACTION_REGISTER_FOR_USER_UPDATES=18;
apiRegistry_t.prototype.ACTION_DEREGISTER_USER_UPDATES=19;
}
catch(ex){
jsExDebug("apiRegistry_t.prototype",ex);
}
function apiRegistry_t(_1){
try{
this.apiRegistry_super();
this.initialised=false;
this.initialisationDelegate=_1;
this.lastUserString=null;
this.lastStatusString=null;
this.lastPublicString=null;
this.lastUserId=null;
this.lastRequestTime=0;
this.legalTrackingAgeFlag=this.SYSTEM.UserDetails.isLegalTrackingAge();
this.enabled=true;
this.contactsIndex=this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ,new this.SYSTEM.Delegate(this,this.contactsRefreshCallback));
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ_CONTACT,new this.SYSTEM.Delegate(this,this.contactsRefreshCallback),this.contactsIndex);
this.userDetailsIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_SAVE,new this.SYSTEM.Delegate(this,this.userDetailsSaveCallback));
this.notifierIndex=this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SYSTEM_API_STARTUP,new this.SYSTEM.Delegate(this,this.apiStartupCallback));
if(this.SYSTEM.Contacts.initialised&&this.SYSTEM.Tracking.initialised){
this.register();
}
}
catch(ex){
jsExDebug("apiRegistry_t",ex);
}
}
function apiRegistry_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.SYSTEM.Contacts){
me.SYSTEM.Contacts.unregisterActionListener(me.contactsIndex);
me.contactsIndex=null;
}
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsIndex);
me.userDetailsIndex=null;
}
if(me.SYSTEM.Notifier){
me.SYSTEM.Notifier.unregisterActionListener(me.notifierIndex);
me.notifierIndex=null;
}
me.initialised=null;
me.lastUserString=null;
me.lastStatusString=null;
me.lastPublicString=null;
me.lastRequestTime=null;
me.legalTrackingAgeFlag=null;
me.enabled=null;
if(me.timer){
me.timer.cleanUp();
me.timer=null;
}
if(me.initialisationDelegate){
me.initialisationDelegate.cleanUp();
me.initialisationDelegate=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("apiRegistry_cleanUp",ex);
}
}
function apiRegistry_register(_3){
function deRegisterCallback(){
try{
if(this.SYSTEM.UserDetails.isLegalTrackingAge()){
this.SYSTEM.Network.JSONRequest(this.SYSTEM.Network.SERVICES_PATH+"?service=tracking&action="+this.ACTION_REGISTER_FOR_USER_UPDATES+"&user="+_4+"&status="+_5+"&pubuser="+_6+"&init="+(this.SYSTEM.UserDetails.id!=this.lastUserId?"1":"0"),null,this.registerResponse,this);
this.lastRequestTime=new Date().getTime();
this.lastUserId=this.SYSTEM.UserDetails.id;
}else{
this.finishInitialisation();
return;
}
}
catch(ex){
jsExDebug("apiRegistry_register: deRegisterCallback",ex);
}
}
try{
if(!this.enabled&&this.timer){
this.timer.startSingle();
return;
}
var _7=new Date().getTime();
var _8=_7-this.lastRequestTime;
if(_8<this.timerInterval&&!_3){
return;
}
var _9=[];
var _a=[];
var _b=[];
var _c=this.SYSTEM.Contacts.getAcceptedContacts();
for(var i=0;i<_c.length;i++){
if(_c[i].myTrackStatus!=this.SYSTEM.Contacts.TRACKING_STATUS_OFF){
_9.push(_c[i].userId);
_b.push(_c[i].myTrackStatus);
}
}
_9.push(this.SYSTEM.UserDetails.id);
_b.push(this.SYSTEM.Contacts.TRACKING_STATUS_TRUSTED);
var _4=_9.join();
var _5=_b.join();
var _6=this.SYSTEM.Tracking.getPublicUserIds().join();
if(_3&&(_4==this.lastUserString&&_5==this.lastStatusString&&_6==this.lastPublicString)){
return;
}
this.lastUserString=_4;
this.lastStatusString=_5;
this.lastPublicString=_6;
this.deRegister(new this.SYSTEM.Delegate(this,deRegisterCallback));
}
catch(ex){
jsExDebug("apiRegistry_register",ex);
}
}
function apiRegistry_deRegister(_e){
function deRegisterResponse(_f){
try{
if(_f&&_f[0]&&_f[0].code==200){
if(_e){
_e.invoke();
}
}
}
catch(ex){
jsExDebug("apiRegistry_deRegister: deRegisterResponse",ex);
}
}
try{
this.SYSTEM.Network.JSONRequest(this.SYSTEM.Network.SERVICES_PATH+"?service=tracking&action="+this.ACTION_DEREGISTER_USER_UPDATES,null,deRegisterResponse,this);
}
catch(ex){
jsExDebug("apiRegistry_deRegister",ex);
}
}
function apiRegistry_resetAfterUserChange(){
try{
if(this.timer){
this.timer.cleanUp();
this.timer=null;
}
this.lastRequestTime=0;
this.legalTrackingAgeFlag=this.SYSTEM.UserDetails.isLegalTrackingAge();
}
catch(ex){
jsExDebug("apiRegistry_resetAfterUserChange",ex);
}
}
function apiRegistry_stop(){
try{
this.enabled=false;
}
catch(ex){
jsExDebug("apiRegistry_resetAfterUserChange",ex);
}
}
function apiRegistry_start(){
try{
this.enabled=true;
}
catch(ex){
jsExDebug("apiRegistry_start",ex);
}
}
function apiRegistry_finishInitialisation(){
try{
if(!this.initialised){
this.initialised=true;
this.initialisationDelegate.invoke();
this.initialisationDelegate.cleanUp();
this.initialisationDelegate=null;
}
}
catch(ex){
jsExDebug("apiRegistry_finishInitialisation",ex);
}
}
function apiRegistry_registerResponse(_10){
try{
var _11=1;
if(_10&&_10[0]&&_10[0].code==200){
_11=_10[0].message;
}
this.timerInterval=_11*60000;
if(!this.timer){
this.timer=new timer_t(new this.SYSTEM.Delegate(this,this.timerCallback),null,null,this.timerInterval);
}
if(this.timerInterval!=this.timer.interval){
this.timer.setInterval(this.timerInterval);
}
this.finishInitialisation();
this.timer.startSingle();
}
catch(ex){
jsExDebug("apiRegistry_registerResponse",ex);
}
}
function apiRegistry_timerCallback(){
try{
this.register();
}
catch(ex){
jsExDebug("apiRegistry_timerCallback",ex);
}
}
function apiRegistry_contactsRefreshCallback(){
try{
if(this.initialised){
this.register(true);
}
}
catch(ex){
jsExDebug("apiRegistry_contactsRefreshCallback",ex);
}
}
function apiRegistry_userDetailsSaveCallback(){
function deRegisterCallback(){
}
try{
var _12=this.SYSTEM.UserDetails.isLegalTrackingAge();
if(_12){
this.register(this.legalTrackingAgeFlag==_12);
}else{
this.deRegister(new this.SYSTEM.Delegate(this,deRegisterCallback));
if(this.timer){
this.timer.cleanUp();
this.timer=null;
}
this.lastRequestTime=0;
}
this.legalTrackingAgeFlag=_12;
}
catch(ex){
jsExDebug("apiRegistry_userDetailsSaveCallback",ex);
}
}
function apiRegistry_apiStartupCallback(){
try{
this.lastUserString=null;
this.lastStatusString=null;
this.lastPublicString=null;
this.register(true);
}
catch(ex){
jsExDebug("apiRegistry_apiStartupCallback",ex);
}
}

systemEvent_t.prototype.constructor=systemEvent_t;
systemEvent_t.prototype.setCoordinate=systemEvent_setCoordinate;
systemEvent_t.prototype.setDragData=systemEvent_setDragData;
function systemEvent_t(x,y){
try{
this.x=x;
this.y=y;
this.clientX=x;
this.clientY=y;
}
catch(ex){
jsExDebug("systemEvent_t",ex);
}
}
function systemEvent_setCoordinate(x,y){
try{
this.x=x;
this.y=y;
this.clientX=x;
this.clientY=y;
}
catch(ex){
jsExDebug("systemEvent_setCoordinate",ex);
}
}
function systemEvent_setDragData(_5,_6){
return;
}

try{
stats_t.prototype=new peepelObject_t();
stats_t.prototype.constructor=stats_t;
stats_t.prototype.cleanUp=stats_cleanUp;
stats_t.prototype.stats_super=peepelObject_t.prototype.constructor;
stats_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
stats_t.prototype.logApp=stats_logApp;
stats_t.prototype.logJsError=stats_logJsError;
stats_t.prototype.STATS_PATH="peepel_services.php?service=stats";
stats_t.prototype.ACTION_LOG_APP=1;
stats_t.prototype.ACTION_LOG_FILE=2;
stats_t.prototype.ACTION_LOG_JS=3;
stats_t.prototype.APP_EVENT_OPEN=1;
stats_t.prototype.APP_EVENT_CLOSED=2;
}
catch(ex){
jsExDebug("stats_t.prototype",ex);
}
function stats_t(){
try{
this.stats_super();
}
catch(ex){
jsExDebug("stats_t",ex);
}
}
function stats_cleanUp(me){
try{
if(!me){
me=this;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("stats_cleanup",ex);
}
}
function stats_logApp(_2,_3,_4){
function appHandler(_5,me){
try{
_4.invoke(true);
}
catch(ex){
jsExDebug("stats_logApp: appHandler",ex);
}
}
try{
if(!this.SYSTEM.Network){
return;
}
if(_4){
this.SYSTEM.Network.request(this.STATS_PATH,["action=",this.ACTION_LOG_APP,"&appid=",_2.APP_ID,"&actid=",_3].join(""),appHandler,this);
}else{
this.SYSTEM.Network.request(this.STATS_PATH,["action=",this.ACTION_LOG_APP,"&appid=",_2.APP_ID,"&actid=",_3].join(""));
}
}
catch(ex){
jsExDebug("stats_logApp",ex);
}
}
function stats_logJsError(_7){
try{
if(_7){
this.SYSTEM.Network.request(this.STATS_PATH,"action="+this.ACTION_LOG_JS+"&message="+_7);
}
}
catch(ex){
jsExDebug("stats_logJsError",ex);
}
}

var DEBUG_MESSAGES=false;
if(!DEBUG_MESSAGES){
function alert(){
return;
}
NO_API=false;
}
var DEBUG_NOW_ON=false;
var limitOne=false;
function jsDebug(_1){
if(!DEBUG_MESSAGES){
return;
}
alert(_1);
}
function debugIf(_2){
if(_2&&DEBUG_MESSAGES){
}
}
function debugNowOn(){
DEBUG_NOW_ON=true;
}
function debugNowOff(){
DEBUG_NOW_ON=false;
}
function debugNow(){
if(!DEBUG_MESSAGES){
return;
}
if(DEBUG_NOW_ON){
DEBUG_NOW_ON=false;
}
}
function jsDebugValues(){
if(!DEBUG_MESSAGES){
return;
}
var _3="";
for(var i=0;i<arguments.length;i++){
_3+=arguments[i]+" : ";
}
alert(_3);
}
function jsDebugText(_5,_6){
if(!DEBUG_MESSAGES){
return;
}
try{
if(typeof debugText=="undefined"){
return;
}
if(debugText.style.visibility!="visible"){
debugText.style.visibility="visible";
clr1.style.visibility="visible";
top1.style.visibility="visible";
}
_5="> "+_5;
if(_6){
debugText.value=_5+"\n";
}else{
debugText.value+=_5+"\n";
}
}
catch(ex){
jsDebug("jsDebugText; "+ex.message);
}
}
function jsExDebug(_7,ex){
if(!DEBUG_MESSAGES){
try{
var _9=((ex.message)?ex.message:ex);
_9="Exception @ "+_7+"::"+((ex.message)?ex.message+" @ line: "+ex.lineNumber:ex);
if(typeof stats_t!="undefined"){
var _a=new stats_t();
_a.logJsError(_9+"\n");
_a=null;
}
}
catch(ex){
_9="Exception @ "+_7+"::"+_9;
if(typeof stats_t!="undefined"){
var _a=new stats_t();
_a.logJsError(_9+"\n");
_a=null;
}
}
return;
}
try{
var _9=((ex.message)?ex.message:ex);
alert("Exception @ "+_7+"::"+((ex.message)?ex.message+" @ line: "+ex.lineNumber:ex));
}
catch(ex2){
alert("Exception @ "+_7+"::"+_9);
}
}
function jsObsoleteDebug(_b,_c){
try{
jsDebug(_b.toString()+":"+_c.toString()+"\n\nThis function is obsolete.\n\nIf you're a tester and see this, please get one of the developers to fix it.\n\nIf you're a user reading our source code, any suggestions/improvements can be sent to us by using the feedback form provided within Peepel.");
}
catch(ex){
jsExDebug("jsObsoleteDebug",ex);
}
}
function alertOnce(_d){
if(!DEBUG_MESSAGES){
return;
}
if(!limitOne){
alert(_d);
limitOne=true;
}
}
function jsDebugArray(_e,_f){
try{
for(var i in _e){
if(_e[i]==SYSTEM||_e[i]==FRAMEWORK_INITIALISED){
continue;
}
if(_f){
jsDebugText2(" - ["+i+"] = "+_e[i]);
}else{
jsDebugText(" - ["+i+"] = "+_e[i]);
}
}
}
catch(ex){
}
}
function objectDebug(obj,_12){
try{
if(!DEBUG_MESSAGES){
return;
}
var _13="";
for(var i in obj){
try{
if(obj[i]==SYSTEM||obj[i]==FRAMEWORK_INITIALISED){
continue;
}
}
catch(ex){
}
try{
if(typeof obj[i]=="object"){
try{
var _15=obj[i];
_13+="["+i+"]\n";
for(k in _15){
_13+=" -"+k+"\n";
}
}
catch(ex){
continue;
}
}else{
if(obj[i].length){
}else{
_13+=i+" = "+obj[i]+"\n";
}
}
}
catch(ex){
continue;
}
}
jsDebugText(_13,_12);
}
catch(ex){
jsExDebug("objectDebug",ex);
}
}
function debugOnce(){
if(!limitOne){
limitOne=true;
}else{
return;
}
}
function prepareTextForXHR(_16){
try{
while(_16.match(/[+]/)){
_16=_16.replace(/[+]/,"%2B");
}
return _16;
}
catch(ex){
jsExDebug("prepareTextForXHR",ex);
}
}
function recoverTextFromXHR(_17){
try{
if(_17.match(/%2B/)){
_17=_17.replace(/%2B/,"+");
}
return _17;
}
catch(ex){
jsExDebug("prepareTextForXHR",ex);
}
}
function strTest(_18,_19){
try{
if(_18<_19){
jsDebugText(_18+" < "+_19);
}else{
if(_18>_19){
jsDebugText(_18+" > "+_19);
}else{
jsDebugText(_18+" == "+_19);
}
}
}
catch(ex){
jsExDebug("strTest",ex);
}
}
function parseIntURL(_1a,_1b){
var _1c=_1a.indexOf(_1b+"=")+_1b.length+1;
_1a=_1a.slice(_1c);
return parseInt(_1a);
}
var alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
function sprint(_1d){
try{
for(var i=1;i<arguments.length;i++){
_1d=_1d.replace(new RegExp("([$]["+i+"])","gi"),arguments[i]);
}
return _1d;
}
catch(ex){
jsExDebug("sprint",ex);
}
}
function alphaToNumeric(_1f){
try{
_1f=_1f.toUpperCase();
var _20=_1f.charAt(0);
var _21=_1f.charAt(1);
if(_21){
var _22=alphabet.indexOf(_20)+1;
var _23=_22*26;
return _23+alphabet.indexOf(_21)+1;
}else{
return alphabet.indexOf(_20)+1;
}
}
catch(ex){
jsExDebug("alphaToNumeric"+_1f,ex);
}
}
function numericToAlpha(_24){
try{
var _25=_24%26;
if(_24==0){
_25="";
}else{
_25--;
if(_25<0){
_25=25;
}
_25=alphabet.charAt(_25);
}
if(_24>26){
var _26=parseInt((_24-1)/26)-1;
_26=alphabet.charAt(_26);
}else{
_26="";
}
return _26+_25;
}
catch(ex){
jsExDebug("numericToAlpha",ex);
}
}
Math.roundPlaces=Math_roundPlaces;
Math.roundPlacesNoPadding=Math_roundPlacesNoPadding;
Math.addSeparators=Math_addSeparators;
function Math_roundPlaces(_27,_28){
try{
if(_28<0){
return _27;
}
if(_28>30){
_28=30;
}
var _29="1";
for(var i=0;i<_28;i++){
_29+="0";
}
var _2b=parseInt(_29);
var _2c=Math.round(_27*_2b)/_2b+"";
var _2d=_2c.indexOf(".");
if(_2d>0){
for(var i=_2c.length-_2d-1;i<_28;i++){
_2c+="0";
}
}else{
if(_28){
_2c+="."+_29.slice(1);
}
}
return _2c;
}
catch(ex){
jsExDebug("math_roundPlaces",ex);
}
}
function Math_roundPlacesNoPadding(_2e,_2f){
try{
if(_2f<0){
return _2e;
}
var _30=1;
for(var i=0;i<_2f;i++){
_30+="0";
}
var _32=parseInt(_30);
var _33=Math.round(_2e*_32)/_32+"";
return _33;
var _34=_33.indexOf(".");
if(_34>0){
for(var i=_33.length-_34-1;i<_2f;i++){
_33+="0";
}
}else{
if(_2f){
_33+="."+_30.slice(1);
}
}
return _33;
}
catch(ex){
jsExDebug("math_roundPlaces",ex);
}
}
function Math_addSeparators(_35){
try{
var _36="";
var arr=_35.toString().split(".");
var _38=arr[0];
if(_38.charAt(0)=="-"){
_38=_38.slice(1);
}
for(var i=_38.length-1;i>=0;i--){
_36=_38.charAt(i)+_36;
if(i!=0&&!((i-_38.length)%3)){
_36=","+_36;
}
}
if(_35<0){
_36="-"+_36;
}
if(arr.length>1){
return _36+"."+arr[1];
}
return _36;
}
catch(ex){
jsExDebug(ex);
}
}
function Math_average(){
try{
var _3a=0;
for(var i=0;i<arguments.length;i++){
_3a+=parseFloat(arguments[i]);
}
return _3a/arguments.length;
}
catch(ex){
jsExDebug("Math_average",ex);
}
}
function getDateObjectFromUTCString(_3c){
try{
var _3d=_3c.split("T");
var _3e=_3d[0].split("-");
var _3f=_3e[1]+"/"+_3e[2]+"/"+_3e[0]+" "+_3d[1].replace(/\.\d+$/,"");
if(Date.parse(_3f)!=Date.parse(_3f)){
jsDebug("contact_setLocation: Invalid location date: "+_3f);
return;
}
var _40=Date.parse(_3f);
var _41=new Date();
_41.setTime(_40);
return _41;
}
catch(ex){
jsExDebug("getDateObjectFromUTCString",ex);
}
}
var lastWindowId=0;
function newBrowserWindow(url){
try{
var _43=window.open(url,"Peepel_"+lastWindowId,"width="+SYSTEM.Event.screenWidth+",height="+SYSTEM.Event.screenHeight+",resizable=1");
lastWindowId++;
return _43;
}
catch(ex){
jsExDebug("newBrowserWindow",ex);
}
}
function getOneOrZeroFromDbTorF(_44){
try{
if(_44=="t"){
return 1;
}else{
if(_44=="f"){
return 0;
}else{
jsDebug("getOneOrZeroFromDbTorF (functions) was passed invalid option");
return "err";
}
}
}
catch(ex){
jsExDebug("getOneOrZeroFromDbTorF",ex);
}
}
var timer;
var timeStart;
var timeEnd;
function startTiming(){
try{
timer=new Date();
timeStart=timer.getTime();
}
catch(ex){
jsExDebug("startTiming",ex);
}
}
function stopTiming(){
try{
timer=new Date();
timeEnd=timer.getTime();
return timeEnd-timeStart;
}
catch(ex){
jsExDebug("stopTiming",ex);
}
}
function cancelEvent(_45){
try{
if(SYSTEM.Event.eventModel==SYSTEM.Event.INTERNET_EXPLORER){
window.event.cancelBubble=true;
}else{
_45.stopPropagation();
}
}
catch(ex){
jsExDebug("darkMagic_enableTextSelect:cancelEvent",ex);
}
}
function object_t(){
}
function request(){
try{
jsObsoleteDebug("function.js","request()");
}
catch(ex){
jsExDebug("request",ex);
}
}
function discardEvent(_46){
var e=_46?_46:window.event;
e.returnValue=false;
return false;
}
function unsupportedBrowserAlert(_48){
alert("Your browser does not appear to support a core functionality required to continue: "+_48);
}
function createRequestObject(){
var _49;
if(window.ActiveXObject){
try{
_49=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
_49=new ActiveXObject("Msxml2.XMLHTTP");
}
}else{
if(window.XMLHttpRequest){
_49=new XMLHttpRequest();
}else{
if(window.createRequest()){
_49=window.createRequest();
}
}
}
return _49;
}
function notImplemented(){
jsDebug("hullo! this don't work yet! :D");
}
function onErrorResumeNext(msg){
if(msg){
alert(msg);
}else{
alert("onErrorResumeNext");
}
}
var hexDecTable="0123456789ABCDEF";
function decimal2Hex(dec){
var hex=hexDecTable.substr(dec&15,1);
while(dec>15){
dec>>=4;
hex=hexDecTable.substr(dec&15,1)+hex;
}
if(hex==0){
return "00";
}else{
return hex;
}
}
function stackTrace(){
try{
var _4d=stackTrace.caller;
if(!_4d){
return;
}
var _4e=_4d.caller;
var _4f="";
while(_4e){
var _50=_4e.toString().split(")")[0].split("function")[1];
_4f+="  "+_50+")\n";
_4e=_4e.caller;
}
var _51=_4d.toString().split(")")[0].split("function")[1];
_4f="START::\n  "+_51+")\n"+_4f+"\n::END";
var _52=new SYSTEM.Dialogue.Debug(null,"Stack trace",_4f,500,300);
}
catch(ex){
jsDebug("Exception @ stackTrace: "+(ex.message?ex.message:ex));
}
}
function getLineIntersection(p1X,p1Y,p2X,p2Y,p3X,p3Y,p4X,p4Y){
try{
var uA=((p4X-p3X)*(p1Y-p3Y)-(p4Y-p3Y)*(p1X-p3X))/((p4Y-p3Y)*(p2X-p1X)-(p4X-p3X)*(p2Y-p1Y));
var x=p1X+(uA*(p2X-p1X));
var y=p1Y+(uA*(p2Y-p1Y));
return {x:x,y:y};
}
catch(ex){
jsExDebug("getLineIntersection",ex);
}
}
function sortListAsc(_5e,_5f){
try{
var val=null;
var _61=null;
for(x=0;x<_5e.length;x++){
for(y=0;y<(_5e.length-1);y++){
val=_5e[y];
_61=_5e[y+1];
if(_5f){
val=val.toLowerCase();
_61=_61.toLowerCase();
}
if(val>_61){
holder=_5e[y+1];
_5e[y+1]=_5e[y];
_5e[y]=holder;
}
}
}
}
catch(ex){
jsExDebug("sortListAsc",ex);
}
}
function sortListDesc(_62,_63){
try{
var val=null;
var _65=null;
for(x=0;x<_62.length;x++){
for(y=0;y<(_62.length-1);y++){
val=_62[y];
_65=_62[y+1];
if(_63){
val=val.toLowerCase();
_65=_65.toLowerCase();
}
if(val<_65){
holder=_62[y+1];
_62[y+1]=_62[y];
_62[y]=holder;
}
}
}
}
catch(ex){
jsExDebug("sortListDesc",ex);
}
}
function getSecondsFromUTCDateString(_66){
try{
var _67=_66.split("T");
var _68=_67[0].split("-");
var _69=Date.parse(_68[1]+"/"+_68[2]+"/"+_68[0]+" "+_67[1].replace(/\.\d+$/,""));
return _69;
}
catch(ex){
jsExDebug("getSecondsFromUTCDateString",ex);
}
}
function getAgeTextFromMilliseconds(_6a,_6b){
function getNumberString(_6c){
return _6c;
}
try{
var _6d=new Date();
var _6e=(_6d.getTime()-_6a)/1000;
var _6f=_6e/60;
var _70=_6f/60;
var _71=_70/24;
var _72="";
if(_71>=1){
_70=Math.floor((_71%1)*24);
_71=Math.floor(_71);
if(_70>=1){
_72=getNumberString(_71)+(_6b?" day ":(_71>1?" days ":" day "))+getNumberString(_70)+(_6b?" hr ":(_70>1?" hours ":" hour "))+(_6b?"":"ago");
}else{
_72=getNumberString(_71)+(_6b?" day ":(_71>1?" days ":" day "))+(_6b?"":"ago");
}
}else{
if(_70>=1){
_6f=Math.floor((_70%1)*60);
_70=Math.floor(_70);
if(_6f>=1){
_72=getNumberString(_70)+(_6b?" hr ":(_70>1?" hours ":" hour "))+getNumberString(_6f)+(_6b?" min ":(_6f>1?" minutes ":" minute "))+(_6b?"":"ago");
}else{
_72=getNumberString(_70)+(_6b?" hr ":(_70>1?" hours ":" hour "))+(_6b?"":"ago");
}
}else{
if(_6f>=1){
_6e=Math.floor((_6f%1)*60);
_6f=Math.floor(_6f);
if(_6e>=1){
_72=getNumberString(_6f)+(_6b?" min ":(_6f>1?" minutes ":" minute "))+getNumberString(_6e)+(_6b?" sec ":(_6e>1?" seconds ":" second "))+(_6b?"":"ago");
}else{
_72=getNumberString(_6f)+(_6b?" min ":(_6f>1?" minutes ":" minute "))+(_6b?"":"ago");
}
}else{
if(_6e>1){
_6e=Math.floor(_6e);
_72=getNumberString(_6e)+(_6b?" sec ":(_6e>1?" seconds ":" second "))+(_6b?"":"ago");
}else{
_72="Now";
}
}
}
}
return _72;
}
catch(ex){
jsExDebug("getAgeTextFromMilliseconds",ex);
}
}
function getNodeValue(_73,_74){
try{
if(_73&&_73.getElementsByTagName(_74)[0]&&_73.getElementsByTagName(_74)[0].firstChild){
return _73.getElementsByTagName(_74)[0].firstChild.nodeValue;
}else{
return null;
}
}
catch(ex){
jsExDebug("getNodeValue",ex);
}
}
function getChildNode(_75,_76,_77){
try{
if(_75){
if(_76.match(/:/)){
if(!SYSTEM.Environment.userAgentIsIE()&&!SYSTEM.Environment.AGENT_STRING.match(/Firefox\/3/)){
_76=_76.split(":")[1];
}
}
return (_77!=null?_75.getElementsByTagName(_76)[_77]:_75.getElementsByTagName(_76));
}else{
return null;
}
}
catch(ex){
jsExDebug("getChildNode",ex);
}
}
function copyArray(_78){
try{
var _79=[];
for(var i in _78){
_79[i]=_78[i];
}
return _79;
}
catch(ex){
jsExDebug("copyArray",ex);
}
}
function setCoordinateMediaFromXML(xml,_7c){
try{
var _7d=new trackingEnclosureList_t(xml.getElementsByTagName("Enclosures")[0]);
var _7e=_7d.getUrlsByLocationGuid(_7c.guid);
if(_7e.length){
_7c.setImageURL(_7e);
}
_7d.cleanUp();
}
catch(ex){
jsExDebug("setCoordinateMediaFromXML",ex);
}
}
function getUTCMilliseconds(_7f){
try{
return _7f.getTime()-(_7f.getTimezoneOffset()*60000);
}
catch(ex){
jsExDebug("getUTCMillseconds",ex);
}
}
function at(_80,_81,_82){
function response(){
jsDebugText(arguments[2]);
}
SYSTEM.Network.request("peepel_services.php?service="+_80+"&action="+_81,_82,response);
}
function URLDecode(_83){
var _84=_83;
var _85,_86;
var _87=/(%[^%]{2})/;
while((match=_87.exec(_84))!=null&&match.length>1&&match[1]!=""){
_85=parseInt(match[1].substr(1),16);
_86=String.fromCharCode(_85);
_84=_84.replace(match[1],_86);
}
return _84;
}
function truncateText(_88,_89){
try{
if(_88.charLimit&&_89.length>_88.charLimit){
return _89.substr(0,_88.charLimit)+"...";
}else{
return _89;
}
}
catch(ex){
jsExDebug("truncateText",ex);
}
}
function secureStringForRequest(str){
try{
str=str.replace(/&|%|:|\/|,|\<|\>|\?/g,"");
str=escape(str);
return str;
}
catch(ex){
jsExDebug("secureStringForRequest");
}
}
function checkStringForInvalidCharacters(_8b,_8c,_8d){
function dialogueCallback(){
try{
_8b.focus();
}
catch(ex){
jsExDebug("checkStringForInvalidCharacters: dialogueCallback",ex);
}
}
try{
var str=_8b.getContent();
if(str.match(INVALID_CHAR_REGEX)){
if(_8d){
var d=new SYSTEM.Dialogue.Error(_8d,_8d.APP_NAME,"The following characters are not allowed in a "+_8c+": <b>"+INVALID_CHAR_STRING+"<b/>",new SYSTEM.Delegate(null,dialogueCallback));
}
_8b.setContent(str.replace(INVALID_CHAR_REGEX,""));
return false;
}
return true;
}
catch(ex){
jsExDebug("checkStringForInvalidCharacters",ex);
}
}
function getDateString(d){
try{
var _91=parseInt(d.getMinutes());
return d.getDate()+"/"+(d.getMonth()+1)+"/"+d.getFullYear()+" "+d.getHours()+":"+(_91<10?"0"+_91:_91);
}
catch(ex){
jsExDebug("getDateString",ex);
}
}
function d2h(d){
return d.toString(16);
}
function h2d(h){
return parseInt(h,16);
}
function getBrightness(r,g,b){
return 100*(((r*299+g*587+b*114)/1000)/255);
}
function getContrastingColour(_97){
try{
var hex=null;
var rgb=null;
if(_97.match(/rgb\(.*\)/)){
rgb=_97;
}else{
if(_97.match(/#[a-z0-9]/i)){
hex=_97;
}
}
var r=0;
var g=0;
var b=0;
if(hex){
hex=hex.substr(1,hex.length);
var h1=hex.substr(0,2);
var h2=hex.substr(2,2);
var h3=hex.substr(4,2);
r=h2d(h1);
g=h2d(h2);
b=h2d(h3);
}else{
if(rgb){
rgb=rgb.match(/\d+\s?,\s?\d+\s?,\s?\d+/)[0].toString();
rgbSplit=rgb.split(",");
r=parseInt(rgbSplit[0]);
g=parseInt(rgbSplit[1]);
b=parseInt(rgbSplit[2]);
}
}
var _a0=getBrightness(r,g,b);
if(_a0<50){
return "rgb(255,255,255)";
}else{
return "rgb(0,0,0)";
}
}
catch(ex){
jsExDebug("getDateString",ex);
}
}
function isDark(_a1){
try{
var hex=null;
var rgb=null;
if(_a1.match(/rgb\(.*\)/)){
rgb=_a1;
}else{
if(_a1.match(/#[a-z0-9]/i)){
hex=_a1;
}
}
var r=0;
var g=0;
var b=0;
if(hex){
hex=hex.substr(1,hex.length);
var h1=hex.substr(0,2);
var h2=hex.substr(2,2);
var h3=hex.substr(4,2);
r=h2d(h1);
g=h2d(h2);
b=h2d(h3);
}else{
if(rgb){
rgb=rgb.match(/\d+\s?,\s?\d+\s?,\s?\d+/)[0].toString();
rgbSplit=rgb.split(",");
r=parseInt(rgbSplit[0]);
g=parseInt(rgbSplit[1]);
b=parseInt(rgbSplit[2]);
}
}
var _aa=getBrightness(r,g,b);
if(_aa<50){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("getDateString",ex);
}
}

try{
timer_t.prototype=new peepelObject_t();
timer_t.prototype.constructor=timer_t;
timer_t.prototype.cleanUp=timer_cleanUp;
timer_t.prototype.timer_super=peepelObject_t.prototype.constructor;
timer_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
timer_t.prototype.setInterval=timer_setInterval;
timer_t.prototype.startSingle=timer_startSingle;
timer_t.prototype.start=timer_start;
timer_t.prototype.stop=timer_stop;
timer_t.prototype.tick=timer_tick;
timer_t.prototype.tickSingle=timer_tickSingle;
}
catch(ex){
jsExDebug("timer_t:prototype",ex);
}
function timer_t(_1,_2,_3,_4,_5){
try{
this.timer_super();
this.name=_5;
if(_1.isDelegate){
this.tickDelegate=_1;
this.tickCallback=null;
this.tickCallbackInstance=null;
this.tickCallbackParam=null;
}else{
this.tickCallback=_1;
this.tickCallbackInstance=_2;
this.tickCallbackParam=_3;
}
if(_4){
this.setInterval(_4);
}
}
catch(ex){
jsExDebug("timer_t",ex);
}
}
function timer_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.tickDelegate){
me.tickDelegate.cleanUp();
me.tickDelegate=null;
}
me.tickCallback=null;
me.tickCallbackInstance=null;
me.tickCallbackParam=null;
me.isRunning=null;
me.interval=null;
me.restart=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("timer_cleanUp",ex);
}
}
function timer_setInterval(_7){
try{
if(!_7||(_7<0)){
jsExDebug("timer_setInterval","Interval must be a positive integer");
return;
}
this.interval=_7;
if(this.isRunning){
this.restart=true;
}
}
catch(ex){
jsExDebug("timer_setInterval",ex);
}
}
function timer_start(){
try{
if(!this.interval){
jsExDebug("timer_start","Interval must be a positive integer");
}
this.isRunning=true;
this.tick();
}
catch(ex){
jsExDebug("timer_start",ex);
}
}
function timer_stop(){
try{
this.isRunning=false;
}
catch(ex){
jsExDebug("timer_stop",ex);
}
}
function timer_tick(){
var _8;
function tickEventHandler(){
try{
if(!me.isRunning){
clearInterval(_8);
return;
}else{
if(me.restart){
clearInterval(_8);
_8=setInterval(tickEventHandler,me.interval);
me.restart=false;
}
}
if(me.tickDelegate){
me.tickDelegate.invoke();
}else{
if(me.tickCallback&&me.tickCallbackInstance){
me.tickCallback(me.tickCallbackInstance);
}
}
}
catch(ex){
jsExDebug("timer_getSetTimeoutClosure:closureFunction",ex);
}
}
try{
var me=this;
_8=setInterval(tickEventHandler,this.interval);
}
catch(ex){
jsExDebug("timer_tick",ex);
}
}
function timer_startSingle(){
try{
if(!this.interval){
jsExDebug("timer_startSingle","Interval must be a positive integer");
}
this.isRunning=true;
this.tickSingle();
}
catch(ex){
jsExDebug("timer_start",ex);
}
}
function timer_tickSingle(){
function tickSingleEventHandler(){
try{
if(!me.isRunning){
return;
}
if(me.tickDelegate){
me.tickDelegate.invoke();
}else{
if(me.tickCallback&&me.tickCallbackInstance){
me.tickCallback(me.tickCallbackInstance);
}
}
}
catch(ex){
jsExDebug("timer_getSetTimeoutClosure:closureFunction",ex);
}
}
try{
var me=this;
setTimeout(tickSingleEventHandler,me.interval);
}
catch(ex){
jsExDebug("timer_tick",ex);
}
}

function serialToTime(_1){
try{
var _2=_1-parseInt(_1);
var _3=0;
var _4=0;
var _5=0;
if(_2){
_3=_2*24;
_4=(_3-Math.floor(_3))*60;
_5=parseInt((_4-Math.floor(_4))*60);
_3=parseInt(_3);
_4=parseInt(_4);
}
}
catch(ex){
jsExDebug("getTimeString",ex);
}
return {hour:_3,minute:_4,second:_5};
}
function serialToDate(_6){
try{
var _7=parseInt(_6);
var _8=0;
var _9=0;
var _a=0;
if(_7){
if(_7==60){
_a=29;
_9=2;
_8=1900;
return {year:_8,month:_9,day:_a};
}else{
if(_7<60){
_7++;
}
}
var l=_7+68569+2415019;
var n=parseInt((4*l)/146097);
l=l-parseInt((146097*n+3)/4);
var i=parseInt((4000*(l+1))/1461001);
l=l-parseInt((1461*i)/4)+31;
var j=parseInt((80*l)/2447);
_a=l-parseInt((2447*j)/80);
l=parseInt((j/11));
_9=j+2-(12*l);
_8=100*(n-49)+i+l;
}
}
catch(ex){
jsExDebug("getDateString",ex);
}
return {year:_8,month:_9,day:_a};
}
function getHumanMonth(_f){
try{
var _10=parseInt(_f);
if(_10){
switch(_10){
case 1:
return "January";
case 2:
return "February";
case 3:
return "March";
case 4:
return "April";
case 5:
return "May";
case 6:
return "June";
case 7:
return "July";
case 8:
return "August";
case 9:
return "September";
case 10:
return "October";
case 11:
return "November";
case 12:
return "December";
}
}
return "January";
}
catch(ex){
jsExDebug("getHumanMonth",ex);
}
}
function getShortHumanMonth(_11){
try{
var _12=parseInt(_11);
if(_12){
switch(_12){
case 1:
return "Jan";
case 2:
return "Feb";
case 3:
return "Mar";
case 4:
return "Apr";
case 5:
return "May";
case 6:
return "Jun";
case 7:
return "Jul";
case 8:
return "Aug";
case 9:
return "Sep";
case 10:
return "Oct";
case 11:
return "Nov";
case 12:
return "Dec";
}
}
return "Jan";
}
catch(ex){
jsExDebug("getShortHumanMonth",ex);
}
}
function getMonthLetter(_13){
try{
var _14=parseInt(_13);
if(_14){
switch(_14){
case 1:
return "J";
case 2:
return "F";
case 3:
return "M";
case 4:
return "A";
case 5:
return "M";
case 6:
return "J";
case 7:
return "J";
case 8:
return "A";
case 9:
return "S";
case 10:
return "O";
case 11:
return "N";
case 12:
return "D";
}
}
return "January";
}
catch(ex){
jsExDebug("getShortHumanMonth",ex);
}
}
function getHumanDay(_15){
try{
var _16=parseInt(_15);
if(_16){
switch(_16%7){
case 0:
return "Saturday";
case 1:
return "Sunday";
case 2:
return "Monday";
case 3:
return "Tuesday";
case 4:
return "Wednesday";
case 5:
return "Thursday";
case 6:
return "Friday";
}
}
return "Sunday";
}
catch(ex){
jsExDebug("getHumanDay",ex);
}
}
function getShortHumanDay(_17){
try{
var _18=parseInt(_17);
if(_18){
switch(_18%7){
case 0:
return "Sat";
case 1:
return "Sun";
case 2:
return "Mon";
case 3:
return "Tue";
case 4:
return "Wed";
case 5:
return "Thu";
case 6:
return "Fri";
}
}
return "Sun";
}
catch(ex){
jsExDebug("getHumanDay",ex);
}
}
function formatDateString(_19,_1a){
try{
var _1b=serialToTime(_19);
var _1c=serialToDate(_19);
var _1d=_1a;
_1d=_1d.replace(/M/g,"m");
if(_1d.match(/AM\/PM/i)||_1d.match(/A\/P/i)){
var _1e=true;
if(_1b.hour>12){
_1b.hour-=12;
_1d=_1d.replace(/AM\/PM/i,"PM");
_1d=_1d.replace(/A\/P/i,"P");
}else{
if(_1b.hour==12){
_1d=_1d.replace(/AM\/PM/i,"PM");
_1d=_1d.replace(/A\/P/i,"P");
}else{
if(_1b.hour==0){
_1b.hour=12;
}
_1d=_1d.replace(/AM\/PM/i,"AM");
_1d=_1d.replace(/A\/P/i,"A");
}
}
}
_1c.elapsedHours=(_1b.hour+(parseInt(_19)*24));
_1d=_1d.replace(/\[m{1,2}\]/g,((_1c.elapsedHours*60)+_1b.minute<10?"0"+((_1c.elapsedHours*60)+_1b.minute):((_1c.elapsedHours*60)+_1b.minute)));
_1d=_1d.replace(/([hs][^m]*)(m{1,2})/g,"$1"+(_1b.minute<10?"0"+_1b.minute:_1b.minute));
_1d=_1d.replace(/(m{1,2})([^m][hs])/g,(_1b.minute<10?"0"+_1b.minute:_1b.minute)+"$2");
_1d=_1d.replace(/\[h{2,}\]/ig,(_1c.elapsedHours<10?"0"+_1c.elapsedHours:_1c.elapsedHours));
_1d=_1d.replace(/\[h{1}\]/ig,_1c.elapsedHours);
_1d=_1d.replace(/h{2,}/ig,(_1b.hour<10?"0"+_1b.hour:_1b.hour));
_1d=_1d.replace(/h{1}/ig,_1b.hour);
_1d=_1d.replace(/\[s{1,}\]/ig,(((_1c.elapsedHours*60)*60)+_1b.second<10?"0"+(((_1c.elapsedHours*60)*60)+_1b.second):((_1c.elapsedHours*60)*60)+_1b.second));
_1d=_1d.replace(/s{2,}/ig,(_1b.second<10?"0"+_1b.second:_1b.second));
_1d=_1d.replace(/s{1}/ig,_1b.second);
_1d=_1d.replace(/y{3,}/ig,_1c.year);
_1d=_1d.replace(/y+/ig,_1c.year.toString().slice(2));
_1d=_1d.replace(/d/ig,"vdv");
_1d=_1d.replace(/m/g,"vsv");
_1d=_1d.replace(/(vsv){6,}/g,getHumanMonth(_1c.month));
_1d=_1d.replace(/(vsv){5}/g,getMonthLetter(_1c.month));
_1d=_1d.replace(/(vsv){4}/g,getHumanMonth(_1c.month));
_1d=_1d.replace(/(vsv){3}/g,getShortHumanMonth(_1c.month));
_1d=_1d.replace(/(vsv){2}/g,(_1c.month<10?"0"+_1c.month:_1c.month));
_1d=_1d.replace(/(vsv){1}/g,_1c.month);
_1d=_1d.replace(/(vdv){4,}/g,getHumanDay(_19));
_1d=_1d.replace(/(vdv){3}/g,getShortHumanDay(_19));
_1d=_1d.replace(/(vdv){2}/g,(_1c.day<10?"0"+_1c.day:_1c.day));
_1d=_1d.replace(/(vdv){1}/g,_1c.day);
return _1d;
}
catch(ex){
jsExDebug("formatDateString",ex);
}
}
function getSerialFromTime(_1f,_20,_21){
try{
_20+=(_21*0.01)/0.6;
_1f+=(_20*0.01)/0.6;
var _22=(_1f*0.01)/0.24;
return _22;
}
catch(ex){
jsExDebug("getSerialFromTime",ex);
}
}
function getSerialFromDate(_23,_24,day){
try{
var day=parseInt(day);
var _24=parseInt(_24);
var _23=parseInt(_23);
if(_23<100){
if(_23<30){
_23=2000+_23;
}else{
_23=1900+_23;
}
}
if((day==29)&&(_24==2)&&(_23==1900)){
return 60;
}
if(_24<=2){
_23--;
_24+=12;
}
var _26=(Math.floor((365.25*(_23+4716)))+Math.floor((30.6001*(_24+1)))+day)-1526.5-15029.5-2400000;
return parseInt(_26);
}
catch(ex){
jsExDebug("getSerialFromDate",ex);
}
}
function getSerialFromDateTime(_27,_28,day,_2a,_2b,_2c){
try{
return getSerialFromDate(_27,_28,day)+getSerialFromTime(_2a,_2b,_2c);
}
catch(ex){
jsExDebug("getSerialFromDateTime",ex);
}
}
function getSerialFromNow(){
try{
var _2d=new Date();
return getSerialFromDateTime(_2d.getFullYear(),_2d.getMonth()+1,_2d.getDate(),_2d.getHours()+1,_2d.getMinutes()+1,_2d.getSeconds()+1);
}
catch(ex){
jsExDebug("getSerialNow",ex);
}
}
function isDateSerial(_2e){
try{
if(!isNaN(_2e*1)&&_2e>=0){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("isDateSerial",ex);
}
}
function getDateDiff(_2f,_30){
try{
pDate1=serialToDate(_2f);
pDate2=serialToDate(_30);
var _31=0;
if(pDate2.year>pDate1.year){
_31=2;
}else{
if(pDate1.year>pDate2.year){
_31=1;
}else{
if(pDate2.month>pDate1.month){
_31=2;
}else{
if(pDate1.month>pDate2.month){
_31=1;
}else{
if(pDate2.day>pDate1.day){
_31=2;
}else{
if(pDate1.day>pDate2.day){
_31=1;
}
}
}
}
}
}
var _32;
var _33;
switch(_31){
case 0:
return {years:0,months:0,days:0,remainderMonths:0,remainderDays:0,annualRemainderDays:0};
case 1:
_33=pDate1;
_32=pDate2;
break;
case 2:
_33=pDate2;
_32=pDate1;
break;
}
var _34=_33.year-_32.year;
var _35=_33.day-_32.day;
var _36=_33.month-_32.month;
if(_35<0){
_36-=1;
var _37=30;
var _38=_33.month-1;
if(_38==0){
_38=12;
}
switch(_33.month){
case 1:
_37=31;
break;
case 2:
if(_33.year%4==0){
_37=29;
}else{
_37=28;
}
break;
case 3:
_37=31;
break;
case 4:
_37=30;
break;
case 5:
_37=31;
break;
case 6:
_37=30;
break;
case 7:
_37=31;
break;
case 8:
_37=31;
break;
case 9:
_37=30;
break;
case 10:
_37=31;
break;
case 11:
_37=30;
break;
case 12:
_37=31;
break;
}
_35=_37+_35;
}
if(_36<0){
_34-=1;
_36=12+_36;
}
var _39=(_34*12)+_36;
var _3a=getSerialFromDate(_33.year,_33.month,_33.day)-getSerialFromDate(_32.year,_32.month,_32.day);
var _3b=_3a-Math.floor(_34*365.25);
return {years:_34,months:_39,days:_3a,remainderMonths:_36,remainderDays:_35,annualRemainderDays:_3b};
}
catch(ex){
jsExDebug("getDateDiff",ex);
}
}
function checkDate(_3c){
try{
var _3d=0;
var _3e=1;
var _3f=2;
var _40=3;
var _41=4;
var _42=5;
var _43=6;
var _44=0;
var _45=1;
var _46=2;
var _47=3;
function parseDate(str){
var _49="";
var _4a=2007;
var _4b=null;
var _4c=0;
var _4d="";
var day;
var _4f=/(mon|tue|wed|thu|fri|sat|sun)+([A-Z])*/i;
if(str.match(_4f)){
day=RegExp.$1;
str=str.replace(_4f,"");
if(!RegExp.$2){
_49="ddd ";
}else{
_49="dddd ";
}
}
var _50=/\s*([0-9]{1,2}){1}\s*(?:\:){1}\s*([0-9]{2}){1}\s*(?:\:\s*([0-9]{2}){1})?\s*(am|pm)?\s*$/i;
var res=str.match(_50);
if(res){
if(res[1]&&res[2]){
var _52="hh:mm";
var _53=parseInt(res[1]);
var _54=parseInt(res[2]);
var _55;
var _56;
if(_53>24||_53<0||_54>60||_54<0){
return _4b;
}
if(res[3]){
_55=parseInt(res[3]);
if(_55>60||_55<0){
return _4b;
}
_52+=":ss";
}
if(res[4]){
_56=res[4];
if(_53>12){
return _4b;
}
if(_56.toLowerCase()=="pm"){
_53+=12;
}else{
if(_53==12){
_53=0;
}
}
_52+=" AM/PM";
}
if(_56&&_53>12){
return _4b;
}
_4d=" "+_52;
_4c=getSerialFromTime(_53,_54,(_55)?_55:0);
str=str.replace(res[0],"");
if(str==""){
if(day){
return _4b;
}
var _57=getSerialFromNow();
var _58=Math.floor(_57)+_4c;
return {format:_52,serial:_58};
}
}
}
var reg=/(?:\s*((jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)+[A-Z]*|[0-9]{1,4}(rd|th|st|nd)?){1}\s*[\/\-]{1}\s*((jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)+[A-Z]*|[0-9]{1,4}(rd|th|st|nd)?){1}\s*(?:[\/\-]{1}|$)\s*((jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)+[A-Z]*|[0-9]{1,4}(rd|th|st|nd)?)?()|(?:((jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)+[A-Z]*){1}()?\s{0,3}([0-9]{1,2}()?(rd|th|st|nd)?){1}[,]?\s{0,3}([0-9]{2,4}){1}()?()?()?)|(?:([0-9]{1,2}()?(rd|th|st|nd)?){1}\s{0,3}((jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)+[A-Z]*){1}()?[,]?\s{0,3}([0-9]{2,4}){1}()?()?()?)?\s*)?(?!\s*[^\s])\s*/i;
var _5a=str.match(reg);
if(!_5a||_5a.input!=_5a[0]){
return _4b;
}
var sep="/";
var _5c;
if(_5a[1]){
_5c=0;
}else{
if(_5a[11]){
_5c=10;
sep=" ";
}else{
if(_5a[21]){
_5c=20;
sep=" ";
}
}
}
if(_5a[1+_5c]&&_5a[4+_5c]){
var _53=getDateType(_5a[1+_5c],_5a[2+_5c],_5a[3+_5c]);
var _54=getDateType(_5a[4+_5c],_5a[5+_5c],_5a[6+_5c]);
if(_53.type==_41||_54.type==_41){
return _4b;
}
if(!_5a[7+_5c]){
switch(_53.type){
case _3e:
if(_54.type==_40||_54.type==_42||_54.type==_3e||(_54.format!=_45&&_54.format!=_3f)){
return _4b;
}else{
_49+=(_54.type==_3f)?((_54.format==_46)?"dd"+sep+"mmmm":"dd"+sep+"mmm"):"dd"+sep+"mm";
var _5d=getSerialFromDate(_4a,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
}
case _3f:
if(_54.type==_40||_54.type==_42||_54.type==_3d){
_49+=(_53.format==_46)?"mmmm":"mmm";
_49+=(_54.format==_45)?sep+"yy":sep+"yyyy";
var _5d=getSerialFromDate(_54.value,_53.value,1);
return {format:_49+_4d,serial:_5d+_4c};
}
case _40:
return _4b;
case _42:
if(_54.type==_42||_54.type==_40||_54.type==_3e){
return _4b;
}
_49+=(_54.type==_3f)?((_54.format==_46)?"dd"+sep+"mmmm":"dd"+sep+"mmm"):"dd"+sep+"mm";
var _5d=getSerialFromDate(_4a,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
}
switch(_54.type){
case _3e:
return _4b;
case _3f:
_49+=(_54.format==_45)?"dd"+sep+"mmm":"dd"+sep+"mmmm";
var _5d=getSerialFromDate(_4a,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
case _42:
_49+=(_54.format==_45)?"mm"+sep+"yy":"mm"+sep+"yyyy";
var _5d=getSerialFromDate(_54.value,_53.value,1);
return {format:_49+_4d,serial:_5d+_4c};
case _40:
if(_53.type==_42){
return _4b;
}
_49+=(_54.format==_45)?"mm"+sep+"yy":"mm"+sep+"yyyy";
var _5d=getSerialFromDate(_54.value,_53.value,1);
return {format:_49+_4d,serial:_5d+_4c};
}
_49+="dd"+sep+"mm";
var _5d=getSerialFromDate(_4a,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
}
var _55=getDateType(_5a[7+_5c],_5a[8+_5c],_5a[9+_5c]);
if(_54.type==_40||_55.type==_41||_55.type==_3f){
return _4b;
}
switch(_53.type){
case _3e:
if(_54.type==_42||_54.type==_3e||_55.type==_3e||_55.type==_43){
return _4b;
}
_49+="dd"+sep;
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm"+sep:"mmmm"+sep):"mm"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
case _3f:
if(_54.type==_3f||_55.type==_3e||_55.type==_43){
return _4b;
}
_49+=(_53.format==_45)?"mmm"+sep:"mmmm"+sep;
_49+="dd"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_53.value,_54.value);
return {format:_49+_4d,serial:_5d+_4c};
case _40:
if(_54.type==_42||_54.type==_3e||_55.type==_40||_53.format!=_46){
return _4b;
}
_49+="yyyy-";
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm-":"mmmm-"):"mm-";
_49+="dd";
var _5d=getSerialFromDate(_53.value,_54.value,_55.value);
return {format:_49+_4d,serial:_5d+_4c};
case _42:
if(_54.type==_42){
return _4b;
}
if(_54.type==_3f||_54.type==_3d||_54.type==_43){
if(_55.type==_3e||_55.type==_43){
return _4b;
}
_49+="dd"+sep;
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm"+sep:"mmmm"+sep):"mm"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
}
}
switch(_54.type){
case _3e:
if(_55.type==_43||_55.type==_3e){
return _4b;
}
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm"+sep:"mmmm"+sep):"mm"+sep;
_49+="dd"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_53.value,_54.value);
return {format:_49+_4d,serial:_5d+_4c};
case _3f:
if(_53.type==_43){
if(_55.type==_43){
return _4b;
}
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm"+sep:"mmmm"+sep):"mm"+sep;
_49+="dd"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
}
if((_55.type==_43||_55.type==_3e)&&_53.format==_46){
_49+="yyyy-";
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm-":"mmmm-"):"mm-";
_49+="dd";
var _5d=getSerialFromDate(_53.value,_54.value,_55.value);
return {format:_49+_4d,serial:_5d+_4c};
}
_49+="dd"+sep;
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm"+sep:"mmmm"+sep):"mm"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
case _42:
if(_55.type==_43||_55.type==_3e){
return _4b;
}
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm"+sep:"mmmm"+sep):"mm"+sep;
_49+="dd"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_53.value,_54.value);
return {format:_49+_4d,serial:_5d+_4c};
}
switch(_55.type){
case _3e:
_49+="yyyy-";
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm-":"mmmm-"):"mm-";
_49+="dd";
var _5d=getSerialFromDate(_53.value,_54.value,_55.value);
return {format:_49+_4d,serial:_5d+_4c};
case _40:
_49+="dd"+sep;
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm"+sep:"mmmm"+sep):"mm"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
case _43:
if(_53.type!=_43&&_53.format==_46){
_49+="yyyy-";
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm-":"mmmm-"):"mm-";
_49+="dd";
var _5d=getSerialFromDate(_53.value,_54.value,_55.value);
return {format:_49+_4d,serial:_5d+_4c};
}
}
if(_55.type==_43){
return _4b;
}
_49+="dd"+sep;
_49+=(_54.type==_3f)?((_54.format==_45)?"mmm"+sep:"mmmm"+sep):"mm"+sep;
_49+=(_55.format==_45)?"yy":"yyyy";
var _5d=getSerialFromDate(_55.value,_54.value,_53.value);
return {format:_49+_4d,serial:_5d+_4c};
}
return _4b;
function getDateType(_5e,_5f,_60){
if(!_5e){
return {type:_41,value:_5e};
}
if(_5f){
_5f=_5f.toLowerCase();
switch(_5f){
case "jan":
_5f=1;
break;
case "feb":
_5f=2;
break;
case "mar":
_5f=3;
break;
case "apr":
_5f=4;
break;
case "may":
_5f=5;
break;
case "jun":
_5f=6;
break;
case "jul":
_5f=7;
break;
case "aug":
_5f=8;
break;
case "sep":
_5f=9;
break;
case "oct":
_5f=10;
break;
case "nov":
_5f=11;
break;
case "dec":
_5f=12;
break;
}
return {type:_3f,value:_5f,format:((_5e.length>3)?_46:_45)};
}
var _61=_5e.length;
_5e=parseInt(_5e,10);
if(_60){
if(_5e>31){
return {type:_41,value:_5e};
}
return {type:_3e,value:_5e,format:_47,suffix:_5f};
}
if(_61==3||_61>4){
return {type:_41,value:_5e};
}
if(_5e>31){
if(_5e>99&&(_5e<1900||_5e>9999)){
return {type:_41,value:_5e};
}
return {type:_40,value:_5e,format:((_5e<100)?_45:_46)};
}
if(_5e<1){
return {type:_41,value:_5e};
}
if(_61==2){
if(_5e>12){
return {type:_42,value:_5e,format:((_61==2)?_45:_44)};
}
return {type:_3d,value:_5e,format:_45};
}
if(_61==4){
if(_5e<100){
return {type:_41,value:_5e};
}
return {type:_40,value:_5e,format:_46};
}
return {type:_43,value:_5e,format:_44};
}
}
var _62=parseDate(_3c);
return _62;
if(!_62){
return "Not a date";
}
var _63=serialToDate(_62.serial);
return _62.format+" "+_62.serial+" : "+_63.day+"/"+_63.month+"/"+_63.year;
}
catch(ex){
jsExDebug("checkDate",ex);
}
}

try{
formulaHelp_t.prototype=new peepelObject_t();
formulaHelp_t.prototype.constructor=formulaHelp_t;
formulaHelp_t.prototype.cleanUp=formula_cleanUp;
formulaHelp_t.prototype.formulaHelp_super=peepelObject_t.prototype.constructor;
formulaHelp_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
formulaHelp_t.prototype.getAllFormulaNames=formula_getAllFormulaNames;
formulaHelp_t.prototype.getCategoryNames=formula_getCategoryNames;
formulaHelp_t.prototype.getFormulasInCategory=formula_getFormulasInCategory;
formulaHelp_t.prototype.getFormulaDetails=formula_getFormulaDetails;
formulaHelp_t.prototype.fillFormulaNameList=formula_fillFormulaNameList;
formulaHelp_t.prototype.createFormulaObject=formula_createFormulaObject;
formulaHelp_t.prototype.CATEGORY_FINANCIAL=1;
formulaHelp_t.prototype.CATEGORY_AUTO_SUM=2;
formulaHelp_t.prototype.CATEGORY_LOGICAL=3;
formulaHelp_t.prototype.CATEGORY_TEXT=4;
formulaHelp_t.prototype.CATEGORY_DATETIME=5;
formulaHelp_t.prototype.CATEGORY_LOOKUP=6;
formulaHelp_t.prototype.CATEGORY_MATH=7;
formulaHelp_t.prototype.CATEGORY_INFORMATION=8;
formulaHelp_t.prototype.CATEGORY_NUMBER_THEORY=9;
formulaHelp_t.prototype.CATEGORY_RANDOM=10;
formulaHelp_t.prototype.CATEGORY_STATISTICS=11;
formulaHelp_t.prototype.CATEGORY_LOCATION=12;
formulaHelp_t.prototype.CATEGORY_AUTO_SUM_STRING="AutoSum";
formulaHelp_t.prototype.CATEGORY_LOGICAL_STRING="Logical";
formulaHelp_t.prototype.CATEGORY_TEXT_STRING="Text";
formulaHelp_t.prototype.CATEGORY_DATETIME_STRING="DateTime";
formulaHelp_t.prototype.CATEGORY_LOOKUP_STRING="Lookup";
formulaHelp_t.prototype.CATEGORY_MATH_STRING="Math";
formulaHelp_t.prototype.CATEGORY_INFORMATION_STRING="Information";
formulaHelp_t.prototype.CATEGORY_NUMBER_THEORY_STRING="Number Theory";
formulaHelp_t.prototype.CATEGORY_RANDOM_STRING="Random Numbers";
formulaHelp_t.prototype.CATEGORY_STATISTICS_STRING="Statistics";
formulaHelp_t.prototype.CATEGORY_LOCATION_STRING="Location";
}
catch(ex){
jsExDebug("formulaHelp_t.prototype",ex);
}
function formulaHelp_t(){
try{
this.formulaHelp_super();
this.baseUrl="js/xml/formula.xml";
this.detailUrl="js/xml/formula_details.xml";
this.categoryList=[];
this.listFull=false;
}
catch(ex){
jsExDebug("formulaHelp_t",ex);
}
}
function formula_cleanUp(me){
try{
if(!me){
me=this;
}
me.baseUrl=null;
me.detailUrl=null;
me.listFull=null;
me.autoSumIndex=null;
me.logicalIndex=null;
me.lookupIndex=null;
me.textIndex=null;
me.dateTimeIndex=null;
me.mathIndex=null;
me.informationIndex=null;
me.numberTheoryIndex=null;
me.randomIndex=null;
me.statisticsIndex=null;
me.locationIndex=null;
for(var i=0;i<me.categoryList.length;i++){
if(!me.categoryList[i]){
continue;
}
for(var j=0;j<me.categoryList[i].formulas.length;j++){
if(me.categoryList[i].formulas[j]){
me.categoryList[i].formulas[j].name=null;
me.categoryList[i].formulas[j].quick=null;
me.categoryList[i].formulas[j]=null;
}
}
me.categoryList[i].name=null;
me.categoryList[i]=null;
}
me.categoryList=null;
if(me==SYSTEM.Formula){
SYSTEM.Formula=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("formula_cleanUp",ex);
}
}
function formula_getAllFormulaNames(_4){
try{
if(!this.listFull){
this.formulaListFullDelegate=_4;
this.SYSTEM.Network.request(this.baseUrl,null,this.fillFormulaNameList,this);
}
}
catch(ex){
jsExDebug("formula_getAllFormulaNames",ex);
}
}
function formula_getCategoryNames(){
try{
var _5=[];
for(var i=0;i<this.categoryList.length;i++){
_5[i]=this.categoryList[i].name;
}
return _5;
}
catch(ex){
jsExDebug("formula_getCategoryNames",ex);
}
}
function formula_getFormulasInCategory(_7,_8){
try{
var _9;
if(_7){
switch(_7){
case this.CATEGORY_AUTO_SUM:
_9=this.autoSumIndex;
break;
case this.CATEGORY_LOGICAL:
_9=this.logicalIndex;
break;
case this.CATEGORY_TEXT:
_9=this.textIndex;
break;
case this.CATEGORY_DATETIME:
_9=this.dateTimeIndex;
break;
case this.CATEGORY_MATH:
_9=this.mathIndex;
break;
case this.CATEGORY_INFORMATION:
_9=this.informationIndex;
break;
case this.CATEGORY_NUMBER_THEORY:
_9=this.numberTheoryIndex;
break;
case this.CATEGORY_RANDOM:
_9=this.randomIndex;
break;
case this.CATEGORY_STATISTICS:
_9=this.statisticsIndex;
break;
case this.CATEGORY_LOOKUP:
_9=this.lookupIndex;
break;
case this.CATEGORY_LOCATION:
_9=this.locationIndex;
break;
default:
}
}else{
if(_8){
switch(_8){
case this.CATEGORY_AUTO_SUM_STRING:
_9=this.autoSumIndex;
break;
case this.CATEGORY_LOGICAL_STRING:
_9=this.logicalIndex;
break;
case this.CATEGORY_TEXT_STRING:
_9=this.textIndex;
break;
case this.CATEGORY_DATETIME_STRING:
_9=this.dateTimeIndex;
break;
case this.CATEGORY_MATH_STRING:
_9=this.mathIndex;
break;
case this.CATEGORY_INFORMATION_STRING:
_9=this.informationIndex;
break;
case this.CATEGORY_NUMBER_THEORY_STRING:
_9=this.numberTheoryIndex;
break;
case this.CATEGORY_RANDOM_STRING:
_9=this.randomIndex;
break;
case this.CATEGORY_STATISTICS_STRING:
_9=this.statisticsIndex;
break;
case this.CATEGORY_LOOKUP_STRING:
_9=this.lookupIndex;
break;
case this.CATEGORY_LOCATION_STRING:
_9=this.locationIndex;
break;
default:
}
}
}
if(this.categoryList[_9]){
return this.categoryList[_9].formulas;
}else{
return null;
}
}
catch(ex){
jsExDebug("formula_getFormulasInCategory",ex);
}
}
function formula_getFormulaDetails(_a,_b){
function responseHandler(_c,_d){
try{
var _e={};
for(var _f=_c.firstChild.firstChild;_f!=null;_f=_f.nextSibling){
if(_f.nodeType!=_f.TEXT_NODE){
for(var _10=_f.firstChild;_10!=null;_10=_10.nextSibling){
if((_10.nodeType!=_10.TEXT_NODE)&&(_10.getAttribute("name")==_a)){
_e.name=_10.getAttribute("name");
_e.example=_10.getAttribute("example");
_e.synopsis=_10.getAttribute("synopsis");
_e.description=_10.getAttribute("description");
}
}
}
}
if(_b){
_b.invoke(_e);
}
}
catch(ex){
jsExDebug("formula_getFormulaDetails: responseHandler",ex);
}
}
try{
this.SYSTEM.Network.request(this.detailUrl,null,responseHandler,this);
}
catch(ex){
jsExDebug("formula_getFormulaDetails",ex);
}
}
function formula_fillFormulaNameList(_11,me){
try{
var _13=_11.firstChild;
for(var _14=_13.firstChild;_14!=null;_14=_14.nextSibling){
if(_14.nodeType!=_14.TEXT_NODE){
var _15=me.categoryList.length;
var _16={};
_16.name=_14.getAttribute("name");
_16.formulas=[];
switch(_16.name){
case me.CATEGORY_AUTO_SUM_STRING:
me.autoSumIndex=_15;
break;
case me.CATEGORY_LOGICAL_STRING:
me.logicalIndex=_15;
break;
case me.CATEGORY_TEXT_STRING:
me.textIndex=_15;
break;
case me.CATEGORY_DATETIME_STRING:
me.dateTimeIndex=_15;
break;
case me.CATEGORY_MATH_STRING:
me.mathIndex=_15;
break;
case me.CATEGORY_INFORMATION_STRING:
me.informationIndex=_15;
break;
case me.CATEGORY_NUMBER_THEORY_STRING:
me.numberTheoryIndex=_15;
break;
case me.CATEGORY_RANDOM_STRING:
me.randomIndex=_15;
break;
case me.CATEGORY_STATISTICS_STRING:
me.statisticsIndex=_15;
break;
case me.CATEGORY_LOOKUP_STRING:
me.lookupIndex=_15;
break;
case me.CATEGORY_LOCATION_STRING:
me.locationIndex=_15;
break;
}
for(var _17=_14.firstChild;_17!=null;_17=_17.nextSibling){
if(_17.nodeType!=_17.TEXT_NODE){
var _18=_17.getAttribute("incomplete");
if(_18&&_18=="1"){
continue;
}
var _19=_16.formulas.length;
var _1a=[];
_1a.name=_17.getAttribute("name");
_1a.quick=_17.getAttribute("quick");
_16.formulas[_19]=_1a;
}
}
me.categoryList[_15]=_16;
}
}
me.listFull=true;
if(me.formulaListFullDelegate){
me.formulaListFullDelegate.invoke();
}
}
catch(ex){
jsExDebug("formula_fillFormulaNameList",ex);
}
}
function formula_createFormulaObject(_1b,me,_1d){
try{
var _1e={};
for(var _1f=_1b.data.firstChild.firstChild;_1f!=null;_1f=_1f.nextSibling){
if(_1f.nodeType!=_1f.TEXT_NODE){
for(var _20=_1f.firstChild;_20!=null;_20=_20.nextSibling){
if((_20.nodeType!=_20.TEXT_NODE)&&(_20.getAttribute("name")==_1d.formulaName)){
_1e.name=_20.getAttribute("name");
_1e.example=_20.getAttribute("example");
_1e.synopsis=_20.getAttribute("synopsis");
_1e.description=_20.getAttribute("description");
}
}
}
}
if(_1d&&_1d.callback&&_1e){
_1d.callback(_1d.instance,_1e);
}
}
catch(ex){
jsExDebug("formula_createFormulaObject",ex);
}
}

try{
formula_t.prototype=new peepelObject_t();
formula_t.prototype.constructor=formula_t;
formula_t.prototype.cleanUp=formula_cleanUp;
formula_t.prototype.formula_super=peepelObject_t.prototype.constructor;
formula_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
formula_t.prototype.cloneParameterType=formula_cloneParameterType;
formula_t.prototype.GENERAL_TYPE=1;
formula_t.prototype.CURRENCY_TYPE=2;
formula_t.prototype.NUMBER_TYPE=3;
formula_t.prototype.ACCOUNTING_TYPE=4;
formula_t.prototype.PERCENTAGE_TYPE=8;
formula_t.prototype.STRING_TYPE=16;
formula_t.prototype.TEXT_TYPE=16;
formula_t.prototype.TIME_TYPE=32;
formula_t.prototype.DATE_TYPE=64;
formula_t.prototype.ERROR_TYPE=128;
formula_t.prototype.STRING_TYPE=256;
formula_t.prototype.BOOLEAN_TYPE=512;
formula_t.prototype.TOO_MANY_PARAMETERS=2;
formula_t.prototype.BAD_NR_PARAMETERS=3;
formula_t.prototype.NOT_ENOUGH_PARAMETERS=4;
formula_t.prototype.NOT_IMPLEMENTED=5;
formula_t.prototype.NUM_ERROR=6;
formula_t.prototype.VALUE_ERROR=7;
formula_t.prototype.BAD_PARAMATER_TYPE=7;
formula_t.prototype.INTERNAL_ERROR=8;
formula_t.prototype.NA_ERROR=9;
formula_t.prototype.DIVIDE_ZERO_ERROR=10;
formula_t.prototype.AJAX_ERROR=11;
formula_t.prototype.TOO_MANY_PARAMETERS_TEXT="#ERROR?";
formula_t.prototype.BAD_NR_PARAMETERS_TEXT="#ERROR?";
formula_t.prototype.NOT_ENOUGH_PARAMETERS_TEXT="#ERROR?";
formula_t.prototype.NOT_IMPLEMENTED_TEXT="#ERROR?";
formula_t.prototype.NUM_ERROR_TEXT="#NUM!";
formula_t.prototype.VALUE_ERROR_TEXT="#ERROR?";
formula_t.prototype.BAD_PARAMATER_TYPE_TEXT="#ERROR?";
formula_t.prototype.INTERNAL_ERROR_TEXT="#ERROR?";
formula_t.prototype.NA_ERROR_TEXT="#N/A";
formula_t.prototype.DIVIDE_ZERO_ERROR_TEXT="#DIV/0";
}
catch(ex){
jsExDebug("formula_t.prototype",ex);
}
function formula_t(_1,_2){
try{
this.formula_super();
this.settingType=null;
this.settingTypeAdditional=null;
this.error=null;
this.cell=_1;
this.spreadsheet=_2;
}
catch(ex){
jsExDebug("formula_t",ex);
}
}
function formula_cleanUp(me){
try{
if(!me){
me=this;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("formula_cleanUp",ex);
}
}
function formula_cloneParameterType(){
try{
if(this.cell.settingType==this.cell.GENERAL_TYPE){
for(var i=0;i<arguments.length;i++){
var _5=arguments[i];
if(typeof _5=="object"&&_5.isBlank(this.spreadsheet)!=1){
return _5.getCell().settingType;
}
}
}
}
catch(ex){
jsExDebug("formula_cloneParameterType",ex);
}
return null;
}

String.prototype.stripMarkup=string_stripMarkup;
String.prototype.stripWhiteSpace=string_stripWhiteSpace;
String.prototype.toSentenceCase=string_toSentenceCase;
String.prototype.toProperCase=string_toTitleCase;
String.prototype.toTitleCase=string_toTitleCase;
String.prototype.countWords=string_countWords;
String.prototype.countSentences=string_countSentences;
String.prototype.countSentencesAndHeadings=string_countSentencesAndHeadings;
String.prototype.countParagraphs=string_countParagraphs;
String.prototype.countNotSpaceCharacters=string_countNotSpaceCharacters;
String.prototype.replaceEmoticons=string_replaceEmoticons;
String.prototype.getGibberish=string_getGibberish;
function string_toSentenceCase(){
return this.toLowerCase().replace(/^\s*(.)|[?!.\n]\s*(.)/g,function($0){
return $0.toUpperCase();
});
}
function string_toTitleCase(){
return this.toLowerCase().replace(/(\s+|^)(.)/g,function($0){
return $0.toUpperCase();
});
}
function string_getGibberish(){
try{
var _3=this;
var _4=this;
if(!_4.length){
return;
}
var i=65;
while(_4==_3){
_3=_3.replace(/^(.)/,String.fromCharCode(i));
if(i>10){
break;
}
i++;
}
return _3;
}
catch(ex){
jsExDebug("string_getGibberish",ex);
}
}
function string_stripMarkup(){
try{
var _6=this.replace(/(<([^>]+)>)/ig," ");
while(_6.match(/(<[^>]*.)/)){
_6=_6.replace(/(<[^>]*.)/," ");
}
return _6+"\n";
}
catch(ex){
jsExDebug("string_stripMarkup",ex);
}
}
function string_stripWhiteSpace(){
try{
var _7=this;
_7=_7.replace(/\s+/g,"");
return _7;
}
catch(ex){
jsExDebug("string_stripWhiteSpace"+ex);
}
}
function string_countWords(){
try{
var _8=0;
var _9=this;
while(_9.match(/[\w]+/)){
_9=_9.replace(/[\w]+/," ");
_8++;
}
return _8;
}
catch(ex){
jsExDebug("string_countWords",ex);
}
}
function string_countSentences(){
try{
var _a=0;
var _b=this;
while(_b.match(/\w+[.!?]+\s+/)){
_b=_b.replace(/\w+[.!?]+\s+/," ");
_a++;
}
return _a;
}
catch(ex){
jsExDebug("string_countSentences"+ex);
}
}
function string_countSentencesAndHeadings(){
try{
var _c=0;
var _d=this;
while(_d.match(/\w+[.!?]+\s+|\w+\s*\n+\s*/)){
_d=_d.replace(/\w+[.!?]+\s+|\w+\s*\n+\s*/," ");
_c++;
}
return _c;
}
catch(ex){
jsExDebug("string_countSentencesAndHeadings"+ex);
}
}
function string_countParagraphs(){
try{
var _e=0;
var _f=this;
_f=_f.replace(/\n\s*\n/g,"\n");
alert(_f);
while(_f.match(/\n/)){
_f=_f.replace(/(\n)/," ");
_e++;
}
return _e;
}
catch(ex){
jsExDebug("string_countParagraphs"+ex);
}
}
function string_countNotSpaceCharacters(){
try{
var _10=0;
var _11=this.stripWhiteSpace();
return _11.length;
}
catch(ex){
jsExDebug("string_countNotSpaceCharacters"+ex);
}
}
function string_replaceEmoticons(){
try{
var _12=this;
_12=_12.replace(/:\)/g,"<img src='img/emoticons/smiley.png'/>");
_12=_12.replace(/:D/g,"<img src='img/emoticons/bigsmiley.png'/>");
_12=_12.replace(/:\(/g,"<img src='img/emoticons/sad.png'/>");
_12=_12.replace(/:P/g,"<img src='img/emoticons/poketounge.png'/>");
_12=_12.replace(/;\)/g,"<img src='img/emoticons/wink.png'/>");
_12=_12.replace(/:\|/g,"<img src='img/emoticons/stunned.png'/>");
return _12;
}
catch(ex){
jsExDebug("string_replaceEmoticons",ex);
}
}

xmlWriter_t.prototype.constructor=xmlWriter_t;
xmlWriter_t.prototype.addAttribute=xmlWriter_addAttribute;
xmlWriter_t.prototype.createClosedElement=xmlWriter_createClosedElement;
xmlWriter_t.prototype.createElement=xmlWriter_createElement;
xmlWriter_t.prototype.closeElement=xmlWriter_closeElement;
function xmlWriter_t(){
try{
this.attributes=new Array();
this.openElements=new Array();
}
catch(ex){
jsExDebug("xmlWriter_t",ex);
}
}
function xmlWriter_addAttribute(_1,_2){
try{
if(!_2||!_1){
return;
}
var _3=this.attributes.length;
this.attributes[_3]=new Array();
this.attributes[_3].name=_1;
this.attributes[_3].value=_2;
}
catch(ex){
jsExDebug("xmlWriter_addAttribute",ex);
}
}
function xmlWriter_createClosedElement(_4){
try{
var _5="\n<"+_4+" ";
if(this.attributes.length){
for(var i=0;i<this.attributes.length;i++){
if(this.attributes[i]){
_5+=this.attributes[i].name+"=\""+this.attributes[i].value+"\" ";
}
}
}
this.attributes=new Array();
_5+="/>";
return _5;
}
catch(ex){
jsExDebug("xmlWriter_createClosedElement",ex);
}
}
function xmlWriter_createElement(_7){
try{
var _8="\n<"+_7;
this.openElements[this.openElements.length]=_7;
if(this.attributes.length){
for(var i=0;i<this.attributes.length;i++){
if(this.attributes[i]){
_8+=" "+this.attributes[i].name+"=\""+this.attributes[i].value+"\" ";
}
}
}
this.attributes=new Array();
_8+=">";
return _8;
}
catch(ex){
jsExDebug("xmlWriter_createElement",ex);
}
}
function xmlWriter_closeElement(_a){
try{
var _b="</"+this.openElements[this.openElements.length-1]+">\n";
this.openElements[this.openElements.length-1]=null;
if(this.openElements.length){
this.openElements.length--;
}
return _b;
}
catch(ex){
jsExDebug("xmlWriter_closeElement",ex);
}
}

cssWriter_t.prototype.constructor=cssWriter_t;
cssWriter_t.prototype.addProperty=cssWriter_addProperty;
cssWriter_t.prototype.toString=cssWriter_toString;
function cssWriter_t(){
try{
this.properties=new Array();
this.openElements=new Array();
}
catch(ex){
jsExDebug("cssWriter_t",ex);
}
}
function cssWriter_addProperty(_1,_2){
try{
if(!_2||!_1){
return;
}
var _3=this.properties.length;
this.properties[_3]=new Array();
this.properties[_3].name=_1;
this.properties[_3].value=_2;
}
catch(ex){
jsExDebug("cssWriter_addProperty",ex);
}
}
function cssWriter_toString(){
try{
var _4="";
for(var i=0;i<this.properties.length;i++){
if(this.properties[i]){
_4+=this.properties[i].name+":"+this.properties[i].value+";";
}
}
return _4;
}
catch(ex){
jsExDebug("cssWriter_toString",ex);
}
}

formula_t.prototype.ABS=formula_abs;
formula_t.prototype.ACOS=formula_acos;
formula_t.prototype.ACOSH=formula_acosh;
formula_t.prototype.ASIN=formula_asin;
formula_t.prototype.ASINH=formula_asinh;
formula_t.prototype.ATAN=formula_atan;
formula_t.prototype.ATANtwo=formula_atan2;
formula_t.prototype.ATANH=formula_atanh;
formula_t.prototype.CEILING=formula_ceiling;
formula_t.prototype.COMBIN=formula_combin;
formula_t.prototype.COS=formula_cos;
formula_t.prototype.COSH=formula_cosh;
formula_t.prototype.COUNTIF=formula_countif;
formula_t.prototype.DEGREES=formula_degrees;
formula_t.prototype.EVEN=formula_even;
formula_t.prototype.EXP=formula_exp;
formula_t.prototype.FACT=formula_fact;
formula_t.prototype.FACTDOUBLE=formula_factdouble;
formula_t.prototype.FLOOR=formula_floor;
formula_t.prototype.GCD=formula_gcd;
formula_t.prototype.INT=formula_int;
formula_t.prototype.LCM=formula_lcm;
formula_t.prototype.LN=formula_ln;
formula_t.prototype.LOG=formula_log;
formula_t.prototype.LOGonezero=formula_log10;
formula_t.prototype.MDETERM=formula_mdeterm;
formula_t.prototype.MINVERSE=formula_minverse;
formula_t.prototype.MMULT=formula_mmult;
formula_t.prototype.MOD=formula_mod;
formula_t.prototype.MROUND=formula_mround;
formula_t.prototype.MULTINOMIAL=formula_multinomial;
formula_t.prototype.ODD=formula_odd;
formula_t.prototype.PI=formula_pi;
formula_t.prototype.POWER=formula_power;
formula_t.prototype.PRODUCT=formula_product;
formula_t.prototype.QUOTIENT=formula_quotient;
formula_t.prototype.RADIANS=formula_radians;
formula_t.prototype.ROMAN=formula_roman;
formula_t.prototype.ROUND=formula_round;
formula_t.prototype.ROUNDDOWN=formula_rounddown;
formula_t.prototype.ROUNDUP=formula_roundup;
formula_t.prototype.SERIESSUM=formula_seriessum;
formula_t.prototype.SIGN=formula_sign;
formula_t.prototype.SIN=formula_sin;
formula_t.prototype.SINH=formula_sinh;
formula_t.prototype.SQRT=formula_sqrt;
formula_t.prototype.SQRTPI=formula_sqrtpi;
formula_t.prototype.SUBTOTAL=formula_subtotal;
formula_t.prototype.SUM=formula_sum;
formula_t.prototype.SUMIF=formula_sumif;
formula_t.prototype.SUMA=formula_suma;
formula_t.prototype.SUMPRODUCT=formula_sumproduct;
formula_t.prototype.SUMSQ=formula_sumsq;
formula_t.prototype.SUMXtwoMYtwo=formula_sumx2my2;
formula_t.prototype.SUMXtwoPYtwo=formula_sumx2py2;
formula_t.prototype.SUMXMYtwo=formula_sumxmy2;
formula_t.prototype.TAN=formula_tan;
formula_t.prototype.TANH=formula_tanh;
formula_t.prototype.TRUNC=formula_trunc;
function formula_abs(_1){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _1=="object"){
_1=_1.getValue(this.spreadsheet);
}
if(isNaN(_1*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.abs(_1);
}
catch(ex){
jsExDebug("formula_abs",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_acos(_2){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _2=="object"){
_2=_2.getValue(this.spreadsheet);
}
if(isNaN(_2*1)||_2<-1||_2>1){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.acos(_2);
}
catch(ex){
jsExDebug("formula_acos",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_acosh(_3){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _3=="object"){
if(_3.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_3=_3.getValue(this.spreadsheet);
}
if(isNaN(_3*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_3<=1){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return formula_atanh(Math.sqrt((_3*_3)-1)/_3);
}
catch(ex){
jsExDebug("formula_acosh",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_asin(_4){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _4=="object"){
_4=_4.getValue(this.spreadsheet);
}
if(isNaN(_4*1)||_4<-1||_4>1){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.asin(_4);
}
catch(ex){
jsExDebug("formula_asin",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_asinh(_5){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _5=="object"){
_5=_5.getValue(this.spreadsheet);
}
if(isNaN(_5*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return formula_atanh(_5/Math.sqrt(1+(_5*_5)));
}
catch(ex){
jsExDebug("formula_asinh",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_atan(_6){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _6=="object"){
_6=_6.getValue(this.spreadsheet);
}
if(isNaN(_6*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.atan(_6);
}
catch(ex){
jsExDebug("formula_atan",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_atan2(x,y){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(typeof y=="object"){
y=y.getValue(this.spreadsheet);
}
if(isNaN(x*1)||isNaN(y*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(x==0&&y==0){
this.error=this.DIVIDE_ZERO_ERROR;
return this.DIVIDE_ZERO_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
if(x>=0&&y>=0){
return Math.atan(y/x);
}else{
if(x<0&&y>=0){
return this.RADIANS(this.DEGREES(Math.atan(y/x))+180);
}else{
if(x<0&&y<0){
return (-1*(this.RADIANS(this.DEGREES(Math.atan((y*-1)/x))+180)));
}else{
if(x>=0&&y<0){
return (-1*Math.atan((y*-1)/x));
}
}
}
}
}
catch(ex){
jsExDebug("formula_atan2",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_atanh(_9){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _9=="object"){
_9=_9.getValue(this.spreadsheet);
}
if(isNaN(_9*1)||_9<=-1||_9>=1){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return (Math.log((1+_9)/(1-_9)))/2;
}
catch(ex){
jsExDebug("formula_atanh",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_ceiling(_a,_b){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
if(typeof _a=="object"){
if(_a.isBlank(this.spreadsheet)!=1){
this.settingType=_a.getCell().settingType;
}else{
this.settingType=NUMBER_TYPE;
}
_a=_a.getValue(this.spreadsheet);
}else{
this.settingType=NUMBER_TYPE;
}
if(typeof _b=="object"){
_b=_b.getValue(this.spreadsheet);
}
if(isNaN(_a*1)||isNaN(_b*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if((_a>=0&&_b<0)||(_b>=0&&_a<0)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(Math.ceil(_a)%_b==0){
return Math.ceil(_a);
}else{
var _c=Math.ceil(_a);
while(!isNaN(_c%_b)&&_c%_b!=0){
_c++;
}
return _c;
}
}
catch(ex){
jsExDebug("formula_ceiling",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_combin(_d,_e){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
if(typeof _d=="object"){
_d=_d.getValue(this.spreadsheet);
}
if(typeof _e=="object"){
_e=_e.getValue(this.spreadsheet);
}
if(isNaN(_d*1)||isNaN(_e*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_d<0||_e<0||(_d<_e)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
if(_e==0){
return 1;
}
var _f=_d;
for(var i=1;i<_e;i++){
_f=_f*(_d-i);
}
for(var i=_e;i>1;i--){
_f=_f/i;
}
return _f;
}
catch(ex){
jsExDebug("formula_combin",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_cos(_11){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _11=="object"){
_11=_11.getValue(this.spreadsheet);
}
if(isNaN(_11*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.cos(_11);
}
catch(ex){
jsExDebug("formula_cos",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_cosh(_12){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _12=="object"){
_12=_12.getValue(this.spreadsheet);
}
if(isNaN(_12*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return (Math.exp(_12)+Math.exp(-_12))/2;
}
catch(ex){
jsExDebug("formula_cosh",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_countif(){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}
this.settingType=this.NUMBER_TYPE;
var _13=arguments[arguments.length-1]+"";
var _14=0;
if(_13.match(/^\s*(<|>|<=|>=|==).+$/)){
_13=_13.replace(/^\s*(<=|>=|<>|<|>|==)(.+)$/,"$1\"$2\"");
_13=_13.replace(/^\s*<>/,"!=");
}else{
_13="==\""+_13.replace(/"/g,"\"")+"\"";
}
for(var i=0;i<arguments.length-1;i++){
var _16=arguments[i];
if(typeof _16=="object"){
if(_16.isBlank(this.spreadsheet)){
_16=null;
}else{
_16=_16.getValue(this.spreadsheet);
}
}
if(eval("\""+_16+"\""+_13)){
_14++;
}
}
return _14;
}
catch(ex){
jsExDebug("formula_countif",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_degrees(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return (180/Math.PI)*x;
}
catch(ex){
jsExDebug("formula_degrees",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_even(_18){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _18=="object"){
_18=_18.getValue(this.spreadsheet);
}
if(isNaN(_18*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
if(_18%2){
return (_18-(_18%2))+2;
}else{
return _18;
}
}
catch(ex){
jsExDebug("formula_even",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_exp(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.exp(x);
}
catch(ex){
jsExDebug("formula_exp",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_fact(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=parseInt(x.getValue(this.spreadsheet));
}
if(isNaN(x*1)||x<0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
function calculate(_1b){
if((_1b==0)||(_1b==1)){
return 1;
}else{
var _1c=(_1b*calculate(_1b-1));
return _1c;
}
}
this.settingType=this.NUMBER_TYPE;
return calculate(x);
}
catch(ex){
jsExDebug("formula_fact",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_factdouble(_1d){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _1d=="object"){
_1d=parseInt(_1d.getValue(this.spreadsheet));
}
if(isNaN(_1d*1)||_1d<0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
function calculate(_1e){
if((_1e==0)||(_1e==1)){
return 1;
}else{
var _1f=(_1e*calculate(_1e-2));
return _1f;
}
}
return calculate(_1d);
}
catch(ex){
jsExDebug("formula_factdouble",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_floor(x,_21){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof x=="object"){
if(x.isBlank(this.spreadsheet)!=1){
this.settingType=x.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
x=x.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof _21=="object"){
_21=_21.getValue(this.spreadsheet);
}
if(isNaN(x*1)||isNaN(_21*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if((x<0&&_21>=0)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if((x>0&&_21<=0)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
var _22=x+"";
var _23;
var _24=1;
if(_22.match(/-?\d+\.\d+/)){
_23=_22.replace(/-?\d+\.(\d+)/,"$1");
if(parseInt(_23)>0){
var _25="1";
for(var i=0;i<_23.length;i++){
_25+="0";
}
}
_24=parseInt(_25);
}
var _27=x*_24;
var _28=_21*_24;
var _29=_27;
if(_29==0&&_28==0){
return 0;
}else{
while(_29%_28!=0){
if(_29>0){
_29--;
}else{
_29++;
}
}
return (_29/_24);
}
}
catch(ex){
jsExDebug("formula_floor",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_gcd(){
try{
if(arguments.length==0){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>29){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(i==arguments.length){
this.settingType=this.NUMBER_TYPE;
}
for(var i=0;i<arguments.length;i++){
var _2b=arguments[i];
if(typeof _2b=="object"){
_2b=parseInt(_2b.getValue(this.spreadsheet));
}
if(isNaN(_2b*1)||_2b<0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
}
for(var _2c,_2d,i=arguments.length-1,_2e=arguments[i];i;){
for(_2d=arguments[--i];_2c=_2d%_2e;_2d=_2e,_2e=_2c){
}
}
return _2e;
}
catch(ex){
jsExDebug("formula_gcd",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_int(a){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof a=="object"){
a=a.getValue(this.spreadsheet);
}
if(isNaN(a*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.floor(a);
}
catch(ex){
jsExDebug("formula_int",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_lcm(){
try{
if(arguments.length==0){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>29){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(i==arguments.length){
this.settingType=this.NUMBER_TYPE;
}
for(var i=0;i<arguments.length;i++){
var _31=arguments[i];
if(typeof _31=="object"){
_31=parseInt(_31.getValue(this.spreadsheet));
}
if(isNaN(_31*1)||_31<0){
alert(_31);
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
}
for(var _32,_33,i=arguments.length-1,_34=arguments[i];i;){
for(_33=arguments[--i];_32=_33%_34;_33=_34,_34=_32){
}
}
var _35=_34;
var _36=arguments[0];
for(var i=1;i<arguments.length;i++){
_36=_36*arguments[i];
}
return _36/_35;
}
catch(ex){
jsExDebug("formula_lcm",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_ln(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x*1)||x<=0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.log(x);
}
catch(ex){
jsExDebug("formula_ln",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_log(x,_39){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
if(typeof x=="object"){
if(x.isBlank(this.spreadsheet)!=1){
this.settingType=x.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
x=x.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof _39=="object"){
_39=_39.getValue(this.spreadsheet);
}
if(!_39){
_39=10;
}
if(isNaN(x*1)||x<=0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(isNaN(_39*1)||_39<=0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
return (Math.log(x)/Math.log(_39));
}
catch(ex){
jsExDebug("formula_log",ex);
}
}
function formula_log10(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x*1)||x<=0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return (Math.log(x)/Math.log(10));
}
catch(ex){
jsExDebug("formula_log10",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_mdeterm(_3b){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
throw NOT_IMPLEMENTED;
}
catch(ex){
jsExDebug("formula_mdeterm",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_minverse(_3c){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
throw NOT_IMPLEMENTED;
}
catch(ex){
jsExDebug("formula_minverse",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_mmult(_3d,_3e){
try{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
throw NOT_IMPLEMENTED;
}
catch(ex){
jsExDebug("formula_mmult",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_mod(_3f,_40){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof _3f=="object"){
if(_3f.isBlank(this.spreadsheet)!=1){
this.settingType=_3f.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
_3f=_3f.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof _40=="object"){
_40=_40.getValue(this.spreadsheet);
}
if(isNaN(_3f*1)||isNaN(_40*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_40==0){
this.error=this.DIVIDE_ZERO_ERROR;
return this.DIVIDE_ZERO_ERROR_TEXT;
}
return (_3f-_40*Math.floor(_3f/_40));
}
catch(ex){
jsExDebug("formula_mod",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_mround(_41,_42){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof _41=="object"){
if(_41.isBlank(this.spreadsheet)!=1){
this.settingType=_41.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
_41=_41.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof _42=="object"){
_42=_42.getValue(this.spreadsheet);
}
if(isNaN(_41*1)||isNaN(_42*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if((_41<0&&_42>=0)||(_41>=0&&_42<0)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
var _43=1;
if(_41<0){
_41=Math.abs(_41);
_42=Math.abs(_42);
_43=-1;
}
var _44=(_41-this.FLOOR(_41,_42)).toFixed(2);
if(_44==0){
result=_41;
}else{
if(_44<(_42/2)){
result=(_41-_44).toFixed(2);
}else{
result=((_41-_44)+_42).toFixed(2);
}
}
return (result*_43);
}
catch(ex){
jsExDebug("formula_mround",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_multinomial(){
try{
if(!arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(arguments.length>29){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(i==arguments.length){
this.settingType=this.NUMBER_TYPE;
}
var _46=[];
for(var i=0;i<arguments.length;i++){
var _47=arguments[i];
if(typeof _47=="object"){
_47=_47.getValue(this.spreadsheet);
}
if(isNaN(_47*1)||_47<0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}else{
_46.push(_47);
}
}
var sum=0;
var _49=0;
for(var i=0;i<_46.length;i++){
var _4a=parseFloat(this.FACT(_46[i]));
sum+=_46[i];
_49=(_49==0?_4a:_49*_4a);
}
return (parseFloat(this.FACT(sum))/_49);
}
catch(ex){
jsExDebug("formula_multinomial",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_odd(_4b){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _4b=="object"){
_4b=_4b.getValue(this.spreadsheet);
}
if(isNaN(_4b*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
if(Math.round(_4b)%2){
return Math.round(_4b);
}else{
if(_4b>=0){
return (Math.round(_4b)+1);
}else{
return (Math.round(_4b)-1);
}
}
}
catch(ex){
jsExDebug("formula_odd",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_pi(){
try{
if(arguments.length){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.PI;
}
catch(ex){
jsExDebug("formula_pi",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_power(x,y){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof x=="object"){
if(x.isBlank(this.spreadsheet)!=1){
this.settingType=x.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
x=x.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof y=="object"){
y=y.getValue(this.spreadsheet);
}
if(isNaN(x*1)||isNaN(y*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
return Math.pow(x,y);
}
catch(ex){
jsExDebug("formula_power",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_product(){
try{
if(!arguments.length){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>30){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(i==arguments.length){
this.settingType=this.NUMBER_TYPE;
}
var _4f=[];
for(var i=0;i<arguments.length;i++){
var _50=arguments[i];
if(typeof _50=="object"){
_50=_50.getValue(this.spreadsheet);
}
if(isNaN(_50*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}else{
_4f.push(_50);
}
}
var _51=1;
for(var i=_4f.length-1;i>=0;i--){
var val=parseFloat(_4f[i]);
_51*=val;
}
return _51;
}
catch(ex){
jsExDebug("formula_product",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_quotient(_53,_54){
try{
if(arguments.length<2){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof _53=="object"){
if(_53.isBlank(this.spreadsheet)!=1){
this.settingType=_53.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
_53=_53.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof _54=="object"){
_54=_54.getValue(this.spreadsheet);
}
if(isNaN(_53*1)||isNaN(_54*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_54==0){
this.error=this.DIVIDE_ZERO_ERROR;
return this.DIVIDE_ZERO_ERROR_TEXT;
}
return parseInt(_53/_54);
}
catch(ex){
jsExDebug("formula_quotient",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_radians(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return (x*Math.PI)/180;
}
catch(ex){
jsExDebug("formula_radians",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_roman(_56){
function level(_57,_58){
try{
this.one=_57;
this.five=_58;
return this;
}
catch(ex){
jsExDebug("formula_roman: level",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function translateDigit(_59,_5a){
try{
if(_5b){
_5b=false;
return "";
}
if(_5c){
_5c=false;
return "";
}
var _5d=_5a.charAt(_5a.length-(_59+1));
if(_59>=3){
var _5e=_5d*(Math.pow(10,_59-3));
var _5f="";
for(var i=0;i<_5e;i++){
_5f+="M";
}
return _5f;
}
var _61=_62[_59].one;
var _63=_62[_59].five;
switch(_5d){
case "0":
return "";
case "1":
return _61;
case "2":
return _61+_61;
case "3":
return _61+_61+_61;
case "4":
return _61+_63;
case "5":
return _63;
case "6":
return _63+_61;
case "7":
return _63+_61+_61;
case "8":
return _63+_61+_61+_61;
case "9":
if(_5a.charAt(_5a.length-_59-2)=="9"){
_5b=true;
if(_5a.charAt(_5a.length-_59-3)=="9"){
_5c=true;
return _61+_62[_59+3].one;
}else{
if(_5a.charAt(_5a.length-_59-3)=="4"){
_5c=true;
return _61+_62[_59+2].five;
}else{
return _61+_62[_59+2].one;
}
}
}else{
if(_5a.charAt(_5a.length-_59-2)=="4"){
_5b=true;
return _61+_62[_59+1].five;
}else{
return _61+_62[_59+1].one;
}
}
default:
return _5d;
}
}
catch(ex){
jsExDebug("formula_roman: translateDigit",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _56=="object"){
_56=_56.getValue(this.spreadsheet);
}
if(isNaN(_56*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_56<0||_56>3999){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
var _5b=false;
var _5c=false;
var _62=[];
var _64="";
_62[0]=new level("I","V");
_62[1]=new level("X","L");
_62[2]=new level("C","D");
_62[3]=new level("M",null);
_56=_56.toString();
for(var i=0;i<_56.length;i++){
_64=translateDigit(i,_56)+_64;
}
this.settingType=this.STRING_TYPE;
return _64;
}
catch(ex){
jsExDebug("formula_roman",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_round(_66,_67){
try{
if(arguments.length<1){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof _66=="object"){
if(_66.isBlank(this.spreadsheet)!=1){
this.settingType=_66.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
_66=_66.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof _67=="object"){
_67=_67.getValue(this.spreadsheet);
}
if(isNaN(_66*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if((_67!=null)&&isNaN(_67*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(arguments.length==1){
return Math.round(_66);
}else{
if(_67>0){
var _68=10*_67;
return (Math.round(_66*_68)/_68);
}else{
var _69=Math.pow(10,Math.abs(_67));
var _6a=this.MOD(_66,_69);
var _6b=(_66-_6a);
if(_6a>(_69/2)){
_6b=_6b+_69;
}
return _6b;
}
}
}
catch(ex){
jsExDebug("formula_round",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_rounddown(_6c,_6d){
try{
if(arguments.length<1){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof _6c=="object"){
if(_6c.isBlank(this.spreadsheet)!=1){
this.settingType=_6c.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
_6c=_6c.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof _6d=="object"){
_6d=_6d.getValue(this.spreadsheet);
}
if(isNaN(_6c*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if((_6d!=null)&&isNaN(_6d*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
if(arguments.length==1){
return (_6c-this.MOD(_6c,1));
}else{
if(_6d>0){
var _6e=Math.pow(10,_6d);
var _6f=_6c*_6e;
var _70=this.MOD(_6f,1);
_6f-=_70;
return (_6f/_6e);
}else{
var _71=Math.pow(10,Math.abs(_6d));
return (_6c-this.MOD(_6c,_71));
}
}
}
catch(ex){
jsExDebug("formula_rounddown",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_roundup(_72,_73){
try{
if(arguments.length<1){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>2){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof _72=="object"){
if(_72.isBlank(this.spreadsheet)!=1){
this.settingType=_72.getCell().settingType;
}else{
this.settingType=this.NUMBER_TYPE;
}
_72=_72.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
}
if(typeof _73=="object"){
_73=_73.getValue(this.spreadsheet);
}
if(isNaN(_72*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if((_73!=null)&&isNaN(_73*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
if(arguments.length==1){
var _74=this.MOD(_72,1);
if(_74>0){
return (_72-_74)+1;
}else{
return (_72-_74);
}
}else{
if(_73>0){
return (((_72*(10*_73))-this.MOD((_72*(10*_73)),1)+1)/(10*_73));
}else{
var _75=Math.pow(10,Math.abs(_73));
var _74=this.MOD(_72,_75);
var _76=(_72-_74);
if(_74>0){
_76=_76+_75;
}
return _76;
}
}
}
catch(ex){
jsExDebug("formula_roundup",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_seriessum(x,n,m){
try{
if(arguments.length<4){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}else{
if(arguments.length>34){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(typeof n=="object"){
n=n.getValue(this.spreadsheet);
}
if(typeof m=="object"){
m=m.getValue(this.spreadsheet);
}
var _7a=[];
for(var i=3;i<arguments.length;i++){
var _7c=arguments[i];
if(typeof _7c=="object"){
_7c=_7c.getValue(this.spreadsheet);
}
if(isNaN(_7c*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}else{
_7a.push(_7c);
}
}
var _7d=x;
var sum=0;
for(var i=0;i<_7a.length;i++){
sum+=_7a[i]*(Math.pow(_7d,(i*m)+n));
}
this.settingType=this.NUMBER_TYPE;
return sum;
}
catch(ex){
jsExDebug("formula_seriessum",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sign(_7f){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _7f=="object"){
_7f=_7f.getValue(this.spreadsheet);
}
if(isNaN(_7f*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
if(_7f>0){
return 1;
}else{
if(_7f<0){
return -1;
}
}
if(_7f==0){
return 0;
}
}
catch(ex){
jsExDebug("formula_sign",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sin(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.sin(x);
}
catch(ex){
jsExDebug("formula_sin",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sinh(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return (Math.exp(x)-Math.exp(-x))/2;
}
catch(ex){
jsExDebug("formula_sinh",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sqrt(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.sqrt(x);
}
catch(ex){
jsExDebug("formula_sqrt",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sqrtpi(_83){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _83=="object"){
_83=_83.getValue(this.spreadsheet);
}
if(isNaN(_83)||_83<0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return Math.sqrt(_83*Math.PI);
}
catch(ex){
jsExDebug("formula_sqrtpi",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_subtotal(_84){
try{
if(!arguments.length<2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _84=="object"){
_84=_84.getValue(this.spreadsheet);
}
var _85=null;
switch(_84){
case 1:
_85=this.AVERAGE;
break;
case 2:
_85=this.COUNT;
break;
case 3:
_85=this.COUNTA;
break;
case 4:
_85=this.MAX;
break;
case 5:
_85=this.MIN;
break;
case 6:
_85=this.PRODUCT;
break;
case 7:
_85=this.STDEV;
break;
case 8:
_85=this.STDEVP;
break;
case 9:
_85=this.SUM;
break;
case 10:
_85=this.VAR;
break;
case 11:
_85=this.VARP;
break;
}
var _86=[];
for(var i=1;i<arguments.length;i++){
var _88=arguments[i];
var _89=null;
var _8a=null;
if(typeof _88=="object"){
_8a=_88.getValue(this.spreadsheet);
_89=_88.getRangeId();
}else{
_8a=_88;
}
if(!isNaN(_8a*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(!_86[_89]){
_86[_89]=[];
}
_86[_89].push(_8a);
}
var _8b=[];
for(var i=0;i<_86.length;i++){
var _8c=_86[i];
for(var j=0;j<_8c.length;j++){
_8b.push(_85.apply(this,_8c));
}
}
this.settingType=this.NUMBER_TYPE;
var _8e=_85.apply(this,_8b);
return _8e;
}
catch(ex){
jsExDebug("formula_subtotal",ex);
}
}
function formula_sum(){
try{
if(!arguments.length){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var _8f=0;
for(var i=0;i<arguments.length;i++){
var _91=arguments[i];
if(typeof _91=="object"){
if(_91.isBlank(this.spreadsheet)){
continue;
}
_91=_91.getValue(this.spreadsheet);
}
if(isNaN(_91*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
_8f+=_91;
}
return _8f;
}
catch(ex){
jsExDebug("formula_sum",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_suma(){
try{
if(!arguments.length){
this.error=this.NOT_ENOUGH_PARAMETERS;
return this.NOT_ENOUGH_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var _92=0;
for(var i=0;i<arguments.length;i++){
var _94=arguments[i];
if(typeof _94=="object"){
if(_94.isBlank(this.spreadsheet)){
continue;
}
_94=_94.getValue(this.spreadsheet);
}
if(isNaN(_94*1)){
if(_94===true){
_94=1;
}else{
_94=0;
}
}
_92+=_94;
}
return _92;
}
catch(ex){
jsExDebug("formula_suma",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sumif(){
try{
if(!arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
var _95=null;
var _96=null;
for(var i=0;i<arguments.length;i++){
var _98=arguments[i];
if(typeof _98=="object"){
_98=_98.getValue(this.spreadsheet);
}
if(arguments[i].match(/^\s*(<|>|<=|>=|==).+$/)){
_95=arguments[i].replace(/"/g,"\"");
_96=i;
}
}
var _99=[];
for(var i=0;i<_96;i++){
var _9a=arguments[i];
if(typeof _9a=="object"){
_9a=_9a.getValue(this.spreadsheet);
}
if(isNaN(_9a*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}else{
_99.push(_9a);
}
}
var _9b=[];
for(var i=_96;i<arguments.length;i++){
var _9a=arguments[i];
if(typeof _9a=="object"){
_9a=_9a.getValue(this.spreadsheet);
}
if(isNaN(_9a*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}else{
_99.push(_9a);
}
}
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_sumif",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sumproduct(){
try{
if(!arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_sumproduct",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sumsq(){
try{
if(!arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
throw NOT_IMPLEMENTED;
}
catch(ex){
jsExDebug("formula_sumsq",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sumx2my2(_9c,_9d){
try{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
throw NOT_IMPLEMENTED;
}
catch(ex){
jsExDebug("formula_sumx2my2",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sumx2py2(_9e,_9f){
try{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
throw NOT_IMPLEMENTED;
}
catch(ex){
jsExDebug("formula_sumx2py2",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_sumxmy2(_a0,_a1){
try{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
throw NOT_IMPLEMENTED;
}
catch(ex){
jsExDebug("formula_sumxmy2",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_tan(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
this.settingType=this.NUMBER_TYPE;
return Math.tan(x);
}
catch(ex){
jsExDebug("formula_tan",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_tanh(x){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof x=="object"){
x=x.getValue(this.spreadsheet);
}
if(isNaN(x*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
return this.SINH(x)/this.COSH(x);
}
catch(ex){
jsExDebug("formula_tanh",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_trunc(_a4,_a5){
try{
if(arguments.length!=1&&arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _a4=="object"){
_a4=_a4.getValue(this.spreadsheet);
}
if(typeof _a5=="object"){
_a5=_a5.getValue(this.spreadsheet);
}
if(isNaN(_a4*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_a5!=null&&isNaN(_a5*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
if(arguments.length==1){
return _a4-(_a4%1);
}else{
return ((_a4*(10*_a5))-((_a4*(10*_a5))%1))/(10*_a5);
}
}
catch(ex){
jsExDebug("formula_trunc",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}

formula_t.prototype.DATE=Formula_date;
formula_t.prototype.DATEDIF=Formula_datedif;
formula_t.prototype.DATEVALUE=Formula_datevalue;
formula_t.prototype.DAY=Formula_day;
formula_t.prototype.DAYSthreesixzero=Formula_days360;
formula_t.prototype.EDATE=Formula_edate;
formula_t.prototype.EOMONTH=Formula_eomonth;
formula_t.prototype.HOUR=Formula_hour;
formula_t.prototype.MINUTE=Formula_minute;
formula_t.prototype.MONTH=Formula_month;
formula_t.prototype.NETWORKDAYS=Formula_networkDays;
formula_t.prototype.NOW=Formula_now;
formula_t.prototype.SECOND=Formula_second;
formula_t.prototype.TIME=Formula_time;
formula_t.prototype.TIMEVALUE=Formula_timeValue;
formula_t.prototype.TODAY=Formula_today;
formula_t.prototype.WEEKDAY=Formula_weekday;
formula_t.prototype.WEEKNUM=Formula_weeknum;
formula_t.prototype.WORKDAY=Formula_workday;
formula_t.prototype.YEAR=Formula_year;
function Formula_date(_1,_2,_3){
try{
if(arguments.length!=3){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
var _4=false;
if(typeof _1=="object"){
if(_1.isBlank(this.spreadsheet)==1){
_4=true;
_1=1;
}else{
_1=_1.getValue(this.spreadsheet);
}
}
if(typeof _2=="object"){
if(_2.isBlank(this.spreadsheet)==1){
if(_4){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}else{
_2=1;
}
}else{
_2=_2.getValue(this.spreadsheet);
}
}
if(typeof _3=="object"){
if(_3.isBlank(this.spreadsheet)==1){
_3=1;
}else{
_3=_3.getValue(this.spreadsheet);
}
}
if(isNaN(_1+_2+_3)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_1<0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.DATE_TYPE;
this.settingTypeAdditional="mm/dd/yyyy";
return getSerialFromDate(_1,_2,_3);
}
catch(ex){
jsExDebug("Formula_date",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_datedif(_5,_6,_7){
try{
if(arguments.length!=3){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _5=="object"){
if(_5.isBlank(this.spreadsheet)==1){
_5=this.NOW();
}
_5=_5.getValue(this.spreadsheet);
}
if(typeof _6=="object"){
if(_6.isBlank(this.spreadsheet)==1){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
_6=_6.getValue(this.spreadsheet);
}
if(typeof _7=="object"){
_7=_7.getValue(this.spreadsheet);
}
if(!isDateSerial(_5)||!isDateSerial(_6)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.DATE_TYPE;
var _8=getDateDiff(_5,_6);
switch(_7){
case "y":
return _8.years;
case "m":
return _8.months;
case "d":
return _8.days;
case "ym":
return _8.remainderMonths;
case "md":
return _8.remainderDays;
case "yd":
return _8.annualRemainderDays;
default:
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
}
catch(ex){
jsExDebug("Formula_datedif",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_datevalue(_9){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(arguments.length==3){
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
if(typeof _9=="object"){
if(_9.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_9=_9.getValue(this.spreadsheet);
}
this.settingType=this.NUMBER_TYPE;
var _a=new Array(11);
var _b=new Date(_9);
_a[0]=31;
_a[1]=28;
_a[2]=31;
_a[3]=30;
_a[4]=31;
_a[5]=30;
_a[6]=31;
_a[7]=31;
_a[8]=30;
_a[9]=31;
_a[10]=30;
_a[11]=31;
if(_b.getYear()%4==0){
_a[1]=29;
}
var _c=_b.getYear();
var _d=_b.getMonth();
var _e=_b.getDate();
var _f=((_c*365)+((_c-(_c%4))/4));
var _10=0;
if(_b.getMonth()>1){
for(var i=1;i<_b.getMonth();i++){
_10=_10+_a[i-1];
}
}
return (_f+_10+_e);
}
catch(ex){
jsExDebug("Formula_datevalue",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_day(_12){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _12=="object"){
_12=_12.getValue(this.spreadsheet);
}
if(!isDateSerial(_12)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.NUMBER_TYPE;
var _13=serialToDate(_12);
return _13.day;
}
catch(ex){
jsExDebug("Formula_day",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_days360(_14,_15,_16){
try{
if(typeof _14=="object"){
_14=_14.getValue(this.spreadsheet);
}
if(typeof _15=="object"){
_15=_15.getValue(this.spreadsheet);
}
if(typeof _16=="object"){
_16=_16.getValue(this.spreadsheet);
}
var _17=false;
if(arguments.length==3){
_17=_16;
}else{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
}
this.settingType=this.NUMBER_TYPE;
var _18=0;
if(_14>_15){
_18=1;
}else{
if(_15>_14){
_18=2;
}else{
_18=0;
}
}
var _19;
var _1a;
switch(_18){
case 0:
return 0;
case 1:
_19=serialToDate(_14);
_1a=serialToDate(_15);
break;
case 2:
_19=serialToDate(_15);
_1a=serialToDate(_14);
break;
}
if(_17){
if(_1a.day==31){
if(_19.day>29){
_1a.day=30;
}else{
_1a.day=1;
_1a.month+=1;
}
}
if(_19.day==31){
_19.day==30;
}
}else{
if(_19.day==31){
_19.day=1;
_19.month+=1;
}
if(_1a.day==31){
_1a.day=1;
_1a.month+=1;
}
}
var _1b=_19.year-_1a.year;
var _1c=_19.month-_1a.month;
var _1d=_19.day-_1a.day;
if(_1d<0){
_1c-=1;
_1d=30+_1d;
}
if(_1c<0){
_1b-=1;
_1c=12+_1c;
}
if(_18==1){
return ((_1b*360)+(_1c*30)+_1d)*-1;
}else{
return ((_1b*360)+(_1c*30)+_1d);
}
}
catch(ex){
jsExDebug("Formula_days360",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_edate(_1e,_1f){
try{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("Formula_edate",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_eomonth(_20,_21){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _20=="object"){
_20=_20.getValue(this.spreadsheet);
}
if(typeof _21=="object"){
_21=_21.getValue(this.spreadsheet);
}
if(!_20||!parseInt(_21)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.DATE_TYPE;
this.settingTypeAdditional="dd/mm/yyyy";
var _22=new Array(11);
_22[0]=31;
_22[1]=28;
_22[2]=31;
_22[3]=30;
_22[4]=31;
_22[5]=30;
_22[6]=31;
_22[7]=31;
_22[8]=30;
_22[9]=31;
_22[10]=30;
_22[11]=31;
var _23=new Date(_20);
_23.setMonth(_23.getMonth()+_21);
_23.setDate(_22[_23.getMonth()-1]);
return _23.getDate()+"/"+_23.getMonth()+"/"+_23.getFullYear();
}
catch(ex){
jsExDebug("Formula_eomonth",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_hour(_24){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _24=="object"){
_24=_24.getValue(this.spreadsheet);
}
if(!isDateSerial(_24)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.TIME_TYPE;
this.settingTypeAdditional="h";
var _25=serialToTime(_24);
return _25.hour;
}
catch(ex){
jsExDebug("Formula_hour",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_minute(_26){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _26=="object"){
_26=_26.getValue(this.spreadsheet);
}
if(!isDateSerial(_26)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.TIME_TYPE;
this.settingTypeAdditional="mm";
var _27=serialToTime(_26);
return _27.minute;
}
catch(ex){
jsExDebug("Formula_minute",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_month(_28){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _28=="object"){
_28=_28.getValue(this.spreadsheet);
}
if(!isDateSerial(_28)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.DATE_TYPE;
this.cell.setTypeTime("mm");
var _29=serialToDate(_28);
return _28;
}
catch(ex){
jsExDebug("Formula_month",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_networkDays(_2a,_2b,_2c){
try{
if(arguments.length<2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("Formula_networkDays",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_now(){
try{
if(arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.settingType=this.DATE_TYPE;
var _2d=new Date();
return getSerialFromDate(_2d.getFullYear(),_2d.getMonth()+1,_2d.getDate())+getSerialFromTime(_2d.getHours(),_2d.getMinutes(),_2d.getSeconds());
}
catch(ex){
jsExDebug("Formula_now",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_second(_2e){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _2e=="object"){
_2e=_2e.getValue(this.spreadsheet);
}
if(!isDateSerial(_2e)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.TIME_TYPE;
this.settingTypeAdditional="ss";
var _2f=serialToTime(_2e);
return _2f.second;
}
catch(ex){
jsExDebug("Formula_second",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_time(_30,_31,_32){
try{
if(arguments.length!=3){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _30=="object"){
_30=_30.getValue(this.spreadsheet);
}
if(typeof _31=="object"){
_31=_31.getValue(this.spreadsheet);
}
if(typeof _32=="object"){
_32=_32.getValue(this.spreadsheet);
}
if(isNaN(_30+_31+_32)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.TIME_TYPE;
this.cell.setTypeTime("hh:mm AM/PM");
return getSerialFromTime(_30,_31,_32);
}
catch(ex){
jsExDebug("Formula_time",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_timeValue(_33){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("Formula_timeValue",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_today(){
try{
if(arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.settingType=this.DATE_TYPE;
this.cell.setTypeTime("dd/mm/yyyy");
var _34=new Date();
return getSerialFromDate(_34.getFullYear(),_34.getMonth()+1,_34.getDate());
}
catch(ex){
jsExDebug("Formula_today",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_weekday(_35,_36){
try{
if(arguments.length<1||arguments.length>2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("Formula_weekday",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_weeknum(_37,_38){
try{
if(arguments.length<1||arguments.length>2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("Formula_weeknum",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_workday(_39,_3a,_3b){
try{
if(arguments.length<2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("Formula_workday",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function Formula_year(_3c){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
if(typeof _3c=="object"){
_3c=_3c.getValue(this.spreadsheet);
}
if(!isDateSerial(_3c)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.DATE_TYPE;
this.settingTypeAdditional="yyyy";
var _3d=serialToDate(_3c);
return _3d.year;
}
catch(ex){
jsExDebug("Formula_year",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}

formula_t.prototype.AND=formula_and;
formula_t.prototype.FALSE=formula_false;
formula_t.prototype.IF=formula_if;
formula_t.prototype.NOT=formula_not;
formula_t.prototype.OR=formula_or;
formula_t.prototype.TRUE=formula_true;
formula_t.prototype.XOR=formula_xor;
function formula_and(){
try{
if(!arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
for(var i=arguments.length-1;i>=0;i--){
var _2=arguments[i];
if(typeof _2=="object"){
_2=_2.getValue(this.spreadsheet);
}
if(_2==false){
return false;
}else{
if(!isNaN(_2*1)&&parseInt(_2)==0){
return false;
}
}
}
return true;
}
catch(ex){
jsExDebug("formula_and",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_false(){
try{
if(arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
return false;
}
catch(ex){
jsExDebug("formula_false",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_if(_3,_4,_5){
try{
if(arguments.length!=3){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _3=="object"){
_3=_3.getValue(this.spreadsheet);
if(_3.toString()===_3){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
}
var _6;
if(_3){
_6=_4;
}else{
_6=_5;
}
if(typeof _6=="object"){
var _7=_6.getCell(this.spreadsheet);
if(_7){
this.settingType=_7.settingType;
return _6.getValue(this.spreadsheet);
}else{
this.settingType=this.NUMBER_TYPE;
return 0;
}
}
if(!isNaN(_6*1)){
this.settingType=this.NUMBER_TYPE;
}else{
if(_6===true||_6==false){
this.settingType=this.BOOLEAN_TYPE;
}else{
this.settingType=this.STRING_TYPE;
}
}
return _6;
}
catch(ex){
jsExDebug("formula_if",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_not(_8){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _8=="object"){
_8=_8.getValue(this.spreadsheet);
}
this.settingType=this.BOOLEAN_TYPE;
if(_8==0){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("formula_not",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_or(){
try{
if(!arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
for(var i=arguments.length-1;i>=0;i--){
var _a=arguments[i];
if(typeof _a=="object"){
_a=_a.getValue(this.spreadsheet);
}
if(!isNaN(_a*1)&&_a!==true&&_a!==false){
_a=parseInt(_a);
}
if(_a){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("formula_or",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_true(){
try{
if(arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
return true;
}
catch(ex){
jsExDebug("formula_true",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_xor(){
try{
if(!arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
var _b=0;
for(var i=arguments.length-1;i>=0;i--){
var _d=arguments[i];
if(typeof _d=="object"){
_d=_d.getValue(this.spreadsheet);
}
if(!isNaN(_d*1)&&_d!==true&&_d!==false){
_d=parseInt(_d);
}
if(_d){
_b++;
}
}
if(_b%2==1){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("formula_xor",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}

try{
formula_t.prototype.CODE=formula_code;
formula_t.prototype.CONCATENATE=formula_concatenate;
formula_t.prototype.DOLLAR=formula_dollar;
formula_t.prototype.EXACT=formula_exact;
formula_t.prototype.FIND=formula_find;
formula_t.prototype.FIXED=formula_fixed;
formula_t.prototype.LEFT=formula_left;
formula_t.prototype.LEN=formula_len;
formula_t.prototype.LENB=formula_len;
formula_t.prototype.LOWER=formula_lower;
formula_t.prototype.MID=formula_mid;
formula_t.prototype.PROPER=formula_proper;
formula_t.prototype.REPT=formula_rept;
formula_t.prototype.RIGHT=formula_right;
formula_t.prototype.T=formula_TisText;
formula_t.prototype.TRIM=formula_trim;
formula_t.prototype.UPPER=formula_upper;
}
catch(ex){
jsExDebug("Formula:String prototype",ex);
}
function formula_code(_1){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _1=="object"){
if(_1.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_1=_1.getValue(this.spreadsheet);
}
var _1=_1.toString();
if(_1.length){
this.settingType=this.NUMBER_TYPE;
return _1.charCodeAt(0);
}
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
catch(ex){
jsExDebug("formula_code",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_concatenate(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
for(var i=0;i<arguments.length;i++){
if(typeof arguments[i]=="object"){
if(arguments[i].isBlank(this.spreadsheet)){
arguments[i]="";
}else{
arguments[i]=arguments[i].getValue(this.spreadsheet);
}
}
}
this.settingType=this.STRING_TYPE;
var _3="";
for(var i=0;i<arguments.length;i++){
_3+=arguments[i];
}
return _3;
}
catch(ex){
jsExDebug("formula_concatenate",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_dollar(_4,_5){
try{
if(arguments.length!=1&&arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _4=="object"){
if(_4.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_4=_4.getValue(this.spreadsheet);
}
if(_5=="object"){
if(_5.isBlank(this.spreadsheet)==1){
_5=0;
}
_5=_5.getValue(this.spreadsheet);
}
if(isNaN(_4*-1)){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
if(!(parseInt(_5)>0)){
_5=0;
}
this.settingType=this.STRING_TYPE;
if(_4<0){
return "-$"+Math.addSeparators(Math.roundPlaces(_4,_5));
}else{
return "$"+Math.addSeparators(Math.roundPlaces(_4,_5));
}
}
catch(ex){
jsExDebug("formula_dollar",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_exact(_6,_7){
try{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if(typeof _6=="object"){
if(_6.isBlank(this.spreadsheet)==1){
_6=null;
}else{
_6=_6.getValue(this.spreadsheet);
}
}
if(typeof _7=="object"){
jsDebug("Text 2 is object");
if(_7.isBlank(this.spreadsheet)==1){
_7=null;
}else{
_7=_7.getValue(this.spreadsheet);
}
}
if(_6==null||_7==null){
if(_6==null&&_7==null){
return true;
}
return false;
}
if(_6.toString()===_7.toString()){
return true;
}
return false;
}
catch(ex){
jsExDebug("formula_exact",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_find(_8,_9,_a){
try{
return;
if(arguments.length!=2&&arguments.length!=3){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(_a==null){
_a=1;
}
if(isNaN(_a*1)){
this.error=this.VALUE_ERROR;
return;
}
_a--;
var _8=_8.toString();
var _9=_9.toString();
this.settingType=this.NUMBER_TYPE;
var re=new RegExp(_8);
var _c=re.exec(_9.substr(_a));
if(_c){
return _c.index+1;
}
this.error=this.VALUE_ERROR;
return;
}
catch(ex){
jsExDebug("formula_find",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_fixed(_d,_e,_f){
try{
if(arguments.length!=1&&arguments.length!=2&&arguments.length!=3){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _d=="object"){
if(_d.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_d=_d.getCell(this.spreadsheet);
}
if(typeof _e=="object"){
if(_e.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_e=_e.getCell(this.spreadsheet);
}
if(typeof _f=="object"){
if(_f.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_f=_f.getCell(this.spreadsheet);
}
if(_e==null){
_e=2;
}
var _10="";
if(!_f){
_10=",";
}
if(isNaN(_d*1)){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
this.cell.setTypeNumber(null,_e,_10);
this.settingType=this.NUMBER_TYPE;
return _d;
}
catch(ex){
jsExDebug("formula_fixed",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_left(_11,_12){
try{
if(arguments.length!=1&&arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _11=="object"){
if(_11.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_11=_11.getValue(this.spreadsheet);
}
if(typeof _12=="object"){
_12=_12.getValue(this.spreadsheet);
}
if(_12==null){
_12=1;
}
if(_12<0){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
this.settingType=this.STRING_TYPE;
return _11.toString().substr(0,_12);
}
catch(ex){
jsExDebug("formula_left",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_len(_13){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _13=="object"){
if(_13.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_13=_13.getValue(this.spreadsheet);
}
this.settingType=this.NUMBER_TYPE;
return _13.toString().length;
}
catch(ex){
jsExDebug("formula_len",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_lower(_14){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _14=="object"){
if(_14.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_14=_14.getValue(this.spreadsheet);
}
this.settingType=this.STRING_TYPE;
return _14.toString().toLowerCase();
}
catch(ex){
jsExDebug("formula_lower",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_mid(_15,_16,_17){
try{
if(arguments.length!=3){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _15=="object"){
if(_15.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_15=_15.getValue(this.spreadsheet);
}
if(typeof _16=="object"){
_16=_16.getValue(this.spreadsheet);
}
if(typeof _17=="object"){
_17=_17.getValue(this.spreadsheet);
}
_16=parseInt(_16)-1;
_17=parseInt(_17);
if(isNaN(_16*1)||isNaN(_17*1)||_16<0||_17<0){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
this.settingType=this.STRING_TYPE;
return _15.toString().substr(_16,_17);
}
catch(ex){
jsExDebug("formula_mid",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_proper(_18){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _18=="object"){
if(_18.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_18=_18.getValue(this.spreadsheet);
}
this.settingType=this.STRING_TYPE;
return _18.toString().toProperCase();
}
catch(ex){
jsExDebug("formula_proper",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_rept(_19,_1a){
try{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(isNaN(_1a*1)){
this.error=this.VALUE_ERROR;
return;
}
if(typeof _19=="object"){
if(_19.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_19=_19.getValue(this.spreadsheet);
}
if(typeof _1a=="object"){
_1a=_1a.getValue(this.spreadsheet);
}
var _19=_19.toString();
var _1b="";
for(var i=0;i<_1a;i++){
_1b+=_19;
}
this.settingType=this.STRING_TYPE;
return _1b;
}
catch(ex){
jsExDebug("formula_rept",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_right(_1d,_1e){
try{
if(arguments.length!=1&&arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _1d=="object"){
if(_1d.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_1d=_1d.getValue(this.spreadsheet);
}
if(typeof _1e=="object"){
_1e=_1e.getValue(this.spreadsheet);
}
var _1d=_1d.toString();
if(_1e==null){
_1e=-1;
}else{
if(_1e>0){
_1e*=-1;
}else{
if(_1e==0){
return "";
}else{
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
}
}
this.settingType=this.STRING_TYPE;
return _1d.substr(_1e);
}
catch(ex){
jsExDebug("formula_right",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_TisText(_1f){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _1f=="object"){
if(_1f.isBlank(this.spreadsheet)==1){
_1f="";
}else{
_1f=_1f.getValue(this.spreadsheet);
}
}
this.settingType=this.STRING_TYPE;
if(_1f.toString()===_1f){
return _1f;
}else{
return "";
}
}
catch(ex){
jsExDebug("formula_isText",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_trim(_20){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _20=="object"){
if(_20.isBlank(this.spreadsheet)==1){
_20="";
}else{
_20=_20.getValue(this.spreadsheet);
}
}
this.settingType=this.STRING_TYPE;
var _20=_20.toString();
return _20.replace(/\s{2,}/g," ");
}
catch(ex){
jsExDebug("formula_trim",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}
function formula_upper(_21){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _21=="object"){
if(_21.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_21=_21.getValue(this.spreadsheet);
}
this.settingType=this.STRING_TYPE;
return _21.toString().toUpperCase();
}
catch(ex){
jsExDebug("formula_upper",ex);
this.error=this.INTERNAL_ERROR;
return;
}
}


try{
formula_t.prototype.COUNTBLANK=formula_countblank;
formula_t.prototype.INFO=formula_info;
formula_t.prototype.ISBLANK=formula_isblank;
formula_t.prototype.ISERROR=formula_iserror;
formula_t.prototype.ISEVEN=formula_iseven;
formula_t.prototype.ISLOGICAL=formula_islogical;
formula_t.prototype.ISNONTEXT=formula_isnontext;
formula_t.prototype.ISNUMBER=formula_isnumber;
formula_t.prototype.ISODD=formula_isodd;
formula_t.prototype.ISREF=formula_isref;
formula_t.prototype.ISTEXT=formula_istext;
formula_t.prototype.N=formula_n;
}
catch(ex){
jsExDebug("formula_t.prototype",ex);
}
function formula_countblank(){
try{
if(!arguments.length){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
var _1=0;
for(var i=0;i<arguments.length;i++){
cell=arguments[i];
if(typeof cell!="object"){
continue;
}else{
if(cell.isBlank(this.spreadsheet)==1){
_1++;
}
}
}
this.settingType=this.NUMBER_TYPE;
return _1;
}
catch(ex){
jsExDebug("formula_countblank",ex);
}
}
function formula_info(_3){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _3=="object"){
if(_3.isBlank(this.spreadsheet)==1){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
_3=_3.getValue(this.spreadsheet);
}
switch(_3){
case "memavail":
this.settingType=this.NUMBER_TYPE;
return -1;
case "memused":
this.settingType=this.NUMBER_TYPE;
return -1;
case "numfile":
this.settingType=this.NUMBER_TYPE;
return -1;
case "osversion":
this.settingType=this.STRING_TYPE;
return this.SYSTEM.Environment.UNAME;
case "recalc":
this.settingType=this.STRING_TYPE;
return "automatic";
case "release":
this.settingType=this.NUMBER_TYPE;
return this.SYSTEM.Environment.RELEASE;
case "system":
this.settingType=this.STRING_TYPE;
return this.SYSTEM.Environment.UNAME;
case "totmem":
this.settingType=this.NUMBER_TYPE;
return -1;
}
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
catch(ex){
jsExDebug("formula_info",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_isblank(_4){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if(typeof _4=="object"){
return _4.isBlank(this.spreadsheet);
}
return false;
}
catch(ex){
jsExDebug("formula_isblank",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_iserror(_5){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if(typeof _5=="object"){
if(_5.isBlank(this.spreadsheet)==1){
return false;
}
var _6=_5.getCell(this.spreadsheet);
if(_6.resultType==_6.ERROR_TYPE){
return true;
}else{
return false;
}
}
if(_5&&_5.length&&_5.charAt(0)=="#"){
this.error=null;
return true;
}
return false;
}
catch(ex){
jsExDebug("formula_iserror",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_iseven(_7){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _7=="object"){
_7=_7.getValue(this.spreadsheet);
}
if(isNaN(_7*1)){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if((parseInt(_7)%2)==0){
return true;
}
return false;
}
catch(ex){
jsExDebug("formula_iseven",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_islogical(_8){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if(typeof _8=="object"){
if(_8.isBlank(this.spreadsheet)==1){
return false;
}
var _9=_8.getCell(this.spreadsheet);
if(_9.resultType==_9.BOOLEAN_TYPE){
return true;
}else{
return false;
}
}
if(_8===true||_8===false){
return true;
}
return false;
}
catch(ex){
jsExDebug("formula_islogical",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_isnontext(_a){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMTERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if(typeof _a=="object"){
if(_a.isBlank(this.spreadsheet)==1){
return true;
}
_a=_a.getValue(this.spreadsheet);
}
if(_a.toString()===_a){
return false;
}
return true;
}
catch(ex){
jExDebug("formula_isnontext",ex);
}
}
function formula_isnumber(_b){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if(typeof _b=="object"){
if(_b.isBlank(this.spreadsheet)){
return false;
}
var _c=_b.getCell(this.spreadsheet);
if(_c.resultType==_c.BOOLEAN_TYPE){
return false;
}
_b=_b.getValue(this.spreadsheet);
}
if(_b===true||_b===false){
return false;
}
if(isNaN(_b*1)){
return false;
}
if(_b.toString()===_b){
return false;
}else{
return true;
}
}
catch(ex){
jsExDebug("formula_isnumber",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_isodd(_d){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _d=="object"){
_d=_d.getValue(this.spreadsheet);
}
if(isNaN(_d*1)){
this.error=this.VALUE_ERROR;
return this.VALUE_ERROR_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if((parseInt(_d)%2)==0){
return false;
}
return true;
}
catch(ex){
jsExDebug("formula_isodd",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_isref(_e){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.BOOLEAN_TYPE;
if(typeof _e=="object"){
return true;
}
return false;
}
catch(ex){
jsExDebug("formula_isref",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_istext(_f){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _f=="object"){
_f=_f.getValue(this.spreadsheet);
}
this.settingType=this.BOOLEAN_TYPE;
if(_f.toString()===_f){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("formula_istext",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_n(_10){
try{
if(arguments.length!=1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _10=="object"){
_10=_10.getValue(this.spreadsheet);
}
this.settingType=this.NUMBER_TYPE;
if(parseFloat(_10)==_10.toString()){
return parseFloat(_10);
}else{
return 0;
}
}
catch(ex){
jsExDebug("formula_n",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}

try{
formula_t.prototype.AVEDEV=formula_avedev;
formula_t.prototype.AVERAGE=formula_average;
formula_t.prototype.AVERAGEA=formula_averagea;
formula_t.prototype.COUNT=formula_count;
formula_t.prototype.COUNTA=formula_counta;
formula_t.prototype.LARGE=formula_large;
formula_t.prototype.MAX=formula_max;
formula_t.prototype.MAXA=formula_maxa;
formula_t.prototype.MEDIAN=formula_median;
formula_t.prototype.MIN=formula_min;
formula_t.prototype.MINA=formula_mina;
formula_t.prototype.RAND=formula_rand;
formula_t.prototype.RANDBETWEEN=formula_randbetween;
formula_t.prototype.SMALL=formula_small;
}
catch(ex){
jsExDebug("formula_t.prototype",ex);
}
function formula_avedev(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var x=0;
var u=0;
var _3=[];
for(var i=0;i<arguments.length;i++){
var _5=arguments[i];
if(typeof _5=="object"){
if(_5.isBlank(this.spreadsheet)){
continue;
}
_5=_5.getValue(this.spreadsheet);
}
if(isNaN(_5*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
_3[_3.length]=_5;
x+=_5;
}
x/=_3.length;
for(var i=0;i<_3.length;i++){
u+=Math.abs(x-_3[i]);
}
return (u/_3.length);
}
catch(ex){
jsExDebug("formula_avedev",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_average(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var x=0;
var _7=0;
for(var i=0;i<arguments.length;i++){
var _9=arguments[i];
if(typeof _9=="object"){
if(_9.isBlank(this.spreadsheet)){
continue;
}
_9=_9.getValue(this.spreadsheet);
}
if(!isNaN(_9*1)){
x+=_9;
_7+=1;
}
}
if(_7==0){
this.error=this.DIVIDE_ZERO_ERROR;
return this.DIVIDE_ZERO_TEXT;
}
return (x/_7);
}
catch(ex){
jsExDebug("formula_average",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_averagea(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var x=0;
var _b=0;
for(var i=0;i<arguments.length;i++){
var _d=arguments[i];
if(typeof _d=="object"){
if(_d.isBlank(this.spreadsheet)){
continue;
}
_d=_d.getValue(this.spreadsheet);
}
if(isNaN(_d*1)){
if(_d===true){
_d=1;
}else{
_d=0;
}
}
x+=_d;
_b+=1;
}
if(_b==0){
this.error=this.DIVIDE_ZERO_ERROR;
return this.DIVIDE_ZERO_TEXT;
}
return (x/_b);
}
catch(ex){
jsExDebug("formula_averagea",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_count(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
var _e=0;
for(var i=0;i<arguments.length;i++){
var _10=arguments[i];
if(typeof _10=="object"){
if(_10.isBlank(this.spreadsheet)){
continue;
}
_10=_10.getValue(this.spreadsheet);
}
if(isNaN(_10*1)){
continue;
}
_e+=1;
}
this.settingType=this.NUMBER_TYPE;
this.cell.setTypeGeneral();
return _e;
}
catch(ex){
jsExDebug("formula_count",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_counta(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
var _11=0;
for(var i=0;i<arguments.length;i++){
var _13=arguments[i];
if(typeof _13=="object"){
if(_13.isBlank(this.spreadsheet)){
continue;
}
_13=_13.getValue(this.spreadsheet);
}
_11+=1;
}
this.settingType=this.NUMBER_TYPE;
this.cell.setTypeGeneral();
return _11;
}
catch(ex){
jsExDebug("formula_counta",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_large(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var _14=[];
var k=0;
for(var i=0;i<arguments.length;i++){
var _17=arguments[i];
if(typeof _17=="object"){
if(_17.isBlank(this.spreadsheet)){
continue;
}
_17=_17.getValue(this.spreadsheet);
}
if(isNaN(_17*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(i==arguments.length-1){
k=_17;
if(k>_14.length||k<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
}else{
_14[_14.length]=_17;
}
}
function sortNumbers(a,b){
return b-a;
}
return _14.sort(sortNumbers)[k-1];
}
catch(ex){
jsExDebug("formula_large",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_max(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
var _1a="NaN";
for(var i=0;i<arguments.length;i++){
var _1c=arguments[i];
if(typeof _1c=="object"){
if(_1c.isBlank(this.spreadsheet)){
continue;
}
_1c=_1c.getValue(this.spreadsheet);
}
if(isNaN(_1c*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_1a=="NaN"){
_1a=_1c;
}
if(_1c>_1a){
_1a=_1c;
}
}
return _1a;
}
catch(ex){
jsExDebug("formula_max",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_maxa(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
var _1d="NaN";
for(var i=0;i<arguments.length;i++){
var _1f=arguments[i];
if(typeof _1f=="object"){
if(_1f.isBlank(this.spreadsheet)){
continue;
}
_1f=_1f.getValue(this.spreadsheet);
}
if(isNaN(_1f*1)){
if(_1f===true){
_1f=1;
}else{
_1f=0;
}
}
if(_1d=="NaN"){
_1d=_1f;
}
if(_1f>_1d){
_1d=_1f;
}
}
return _1d;
}
catch(ex){
jsExDebug("formula_max",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_median(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var _20=[];
for(var i=0;i<arguments.length;i++){
var _22=arguments[i];
if(typeof _22=="object"){
if(_22.isBlank(this.spreadsheet)){
continue;
}
_22=_22.getValue(this.spreadsheet);
}
if(isNaN(_22*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
_20[_20.length]=_22;
}
function sortNumbers(a,b){
return a-b;
}
_20=_20.sort(sortNumbers);
if(_20.length%2==0){
var _25=_20.length/2;
return ((_20[_25-1]+_20[_25])/2);
}
return _20[Math.floor(_20.length/2)];
}
catch(ex){
jsExDebug("formula_median",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_min(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var _26="NaN";
for(var i=0;i<arguments.length;i++){
var _28=arguments[i];
if(typeof _28=="object"){
if(_28.isBlank(this.spreadsheet)){
continue;
}
_28=_28.getValue(this.spreadsheet);
}
if(isNaN(_28*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(_26=="NaN"){
_26=_28;
}
if(_28<_26){
_26=_28;
}
}
return _26;
}
catch(ex){
jsExDebug("formula_min",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_mina(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var _29="NaN";
for(var i=0;i<arguments.length;i++){
var _2b=arguments[i];
if(typeof _2b=="object"){
if(_2b.isBlank(this.spreadsheet)){
continue;
}
_2b=_2b.getValue(this.spreadsheet);
}
if(isNaN(_2b*1)){
if(_2b===true){
_2b=1;
}else{
_2b=0;
}
}
if(_29=="NaN"){
_29=_2b;
}
if(_2b<_29){
_29=_2b;
}
}
return _29;
}
catch(ex){
jsExDebug("formula_mina",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_rand(){
try{
if(arguments.length){
this.error=this.TOO_MANY_PARAMETERS;
return this.TOO_MANY_PARAMETERS_TEXT;
}
return Math.random();
}
catch(ex){
jsExDebug("formula_rand",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_randbetween(_2c,top){
try{
if(arguments.length!=2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
return Math.floor((Math.random()*(top-_2c+1))+_2c);
}
catch(ex){
jsExDebug("formula_rand",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_small(){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
this.settingType=this.cloneParameterType.apply(this,arguments);
if(this.settingType==null){
this.settingType=this.NUMBER_TYPE;
}
var _2e=[];
var k=0;
for(var i=0;i<arguments.length;i++){
var _31=arguments[i];
if(typeof _31=="object"){
if(_31.isBlank(this.spreadsheet)){
continue;
}
_31=_31.getValue(this.spreadsheet);
}
if(isNaN(_31*1)){
this.error=this.NUM_ERROR;
return this.NUM_ERROR_TEXT;
}
if(i==arguments.length-1){
k=_31;
if(k>_2e.length||k<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
}else{
_2e[_2e.length]=_31;
}
}
function sortNumbers(a,b){
return a-b;
}
return _2e.sort(sortNumbers)[k-1];
}
catch(ex){
jsExDebug("formula_small",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}

try{
formula_t.prototype.ADDRESS=formula_address;
formula_t.prototype.AREAS=formula_areas;
formula_t.prototype.CHOOSE=formula_choose;
formula_t.prototype.COLUMN=formula_column;
formula_t.prototype.COLUMNS=formula_columns;
formula_t.prototype.HLOOKUP=formula_hlookup;
formula_t.prototype.HYPERLINK=formula_hyperlink;
formula_t.prototype.INDIRECT=formula_indirect;
formula_t.prototype.LOOKUP=formula_lookup;
formula_t.prototype.MATCH=formula_match;
formula_t.prototype.OFFSET=formula_offset;
formula_t.prototype.ROW=formula_row;
formula_t.prototype.ROWS=formula_rows;
formula_t.prototype.TRANSPOSE=formula_transpose;
formula_t.prototype.VLOOKUP=formula_vlookup;
}
catch(ex){
jsExDebug("formula_t.prototype",ex);
}
function formula_address(_1,_2,_3,_4,_5){
try{
}
catch(ex){
jsExDebug("formula_address",ex);
}
}
function formula_areas(){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_areas",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_choose(_6){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_choose",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_column(_7){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_column",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_columns(){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_columns",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_hlookup(_8,_9,_a,_b){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_hlookup",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_hyperlink(_c,_d){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_hyperlink",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_indirect(_e,_f){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_indirect",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_lookup(_10,_11,_12){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_lookup",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_match(_13,_14,_15){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_match",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_offset(_16,_17,_18,_19,_1a){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_offset",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_row(){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_row",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_rows(){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_rows",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_transpose(){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_transpose",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}
function formula_vlookup(){
try{
this.error=this.NOT_IMPLEMENTED;
return this.NOT_IMPLEMENTED_TEXT;
}
catch(ex){
jsExDebug("formula_vlookup",ex);
this.error=this.INTERNAL_ERROR;
return this.INTERNAL_ERROR_TEXT;
}
}

try{
formula_t.prototype.LOCATEBYNAME=formula_locateByName;
formula_t.prototype.DISTANCE=formula_distance;
}
catch(ex){
jsExDebug("formula_t.prototype",ex);
}
function formula_locateByName(_1,_2){
try{
if(arguments.length<1){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _1=="object"){
if(_1.isBlank(this.spreadsheet)){
_1="";
}else{
_1=_1.getValue(this.spreadsheet);
}
}
if(typeof _2=="object"){
if(_2.isBlank(this.spreadsheet)){
_2="";
}else{
_2=_2.getValue(this.spreadsheet);
}
}
var _3=this.SYSTEM.Contacts.getContactIdFromName(_1);
var _4=this.SYSTEM.PeepelPoints.getPointFromName(_1);
var _5=null;
var _6=false;
_1=_1.toString();
if(_1&&_1.toLowerCase()=="me"||_1==this.SYSTEM.UserDetails.userName){
_5=this.SYSTEM.Tracking.getMyLocation();
_6=true;
}else{
if(_3){
_5=this.SYSTEM.Contacts.getContactLocation(_3);
}else{
if(_4){
_5=_4.coordinate;
}else{
}
}
}
var _7="";
if(_5){
switch(_2){
case "datetime":
if(_3||_6){
var _8=_5.dateFound;
var _9=getSerialFromTime(_8.getHours(),_8.getMinutes(),_8.getSeconds());
var _a=getSerialFromDate(_8.getFullYear(),_8.getMonth()+1,_8.getDate());
_7=_a+_9;
}
this.settingType=this.DATE_TYPE;
break;
case "place":
if(_3||_6){
_7=_5.placeLabel;
}
this.settingType=this.STRING_TYPE;
break;
case "accuracy":
if(_3||_6){
_7=_5.confidencePercentage;
}
break;
case "type":
if(_3||_6){
_7=_5.locationMethod;
}else{
if(_4){
_7=_4.getPrivacyText();
}
}
this.settingType=this.STRING_TYPE;
break;
case "peepelpoint":
if(_3||_6){
var _4=this.SYSTEM.PeepelPoints.getNearestPoint(_5);
_7=_4.name;
}
this.settingType=this.STRING_TYPE;
break;
default:
_7=[_5.mercY,_5.mercX].join();
this.settingType=this.STRING_TYPE;
break;
}
}else{
this.settingType==this.STRING_TYPE;
}
return _7;
}
catch(ex){
jsExDebug("formula_locateByName",ex);
}
}
function formula_distance(_b,to,_d){
try{
if(arguments.length<2){
this.error=this.BAD_NR_PARAMETERS;
return this.BAD_NR_PARAMETERS_TEXT;
}
if(typeof _b=="object"){
if(_b.isBlank(this.spreadsheet)){
_b="";
}else{
_b=_b.getValue(this.spreadsheet);
}
}
if(typeof to=="object"){
if(to.isBlank(this.spreadsheet)){
to="";
}else{
to=to.getValue(this.spreadsheet);
}
}
var _e=0;
this.settingType=this.STRING_TYPE;
if(_b&&to){
var _f=_b.toString().split(",");
var _10=to.toString().split(",");
if(_f[0]&&_f[1]&&_10[0]&&_10[1]){
_e=distanceBetweenToMercatorCoordinates(parseFloat(_f[0]),parseFloat(_f[1]),parseFloat(_10[0]),parseFloat(_10[1]));
switch(_d){
case "km":
_e=_e/1000;
break;
default:
_e=_e;
break;
}
}
}
this.settingType=this.NUMBER_TYPE;
return _e;
}
catch(ex){
jsExDebug("formula_distance",ex);
}
}

try{
windowManager_t.prototype=new peepelObject_t();
windowManager_t.prototype.constructor=windowManager_t;
windowManager_t.prototype.cleanUp=windowManager_cleanUp;
windowManager_t.prototype.windowManager_super=peepelObject_t.prototype.constructor;
windowManager_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
windowManager_t.prototype.register=windowManager_register;
windowManager_t.prototype.unregister=windowManager_unregister;
windowManager_t.prototype.focus=windowManager_focus;
windowManager_t.prototype.close=windowManager_close;
windowManager_t.prototype.cascadeFrames=windowManager_cascadeFrames;
windowManager_t.prototype.stackFrames=windowManager_stackFrames;
windowManager_t.prototype.setFocusedFrame=windowManager_setFocusedFrame;
windowManager_t.prototype.getFocusedFrame=windowManager_getFocusedFrame;
windowManager_t.prototype.getTopFrame=windowManager_getTopFrame;
windowManager_t.prototype.getFocusedApplication=windowManager_getFocusedApplication;
windowManager_t.prototype.setStartPosition=windowManager_setStartPosition;
windowManager_t.prototype.minimise=windowManager_minimise;
windowManager_t.prototype.registerAlwaysOnTop=windowManager_registerAlwaysOnTop;
windowManager_t.prototype.unregisterAlwaysOnTop=windowManager_unregisterAlwaysOnTop;
windowManager_t.prototype.focusTopFrameStack=windowManager_focusTopFrameStack;
windowManager_t.prototype.isWindowId=windowManager_isWindowId;
windowManager_t.prototype.isRunId=windowManager_isRunId;
windowManager_t.prototype.highlight=windowManager_highlight;
windowManager_t.prototype.dim=windowManager_dim;
windowManager_t.prototype.makeWindowId=windowManager_makeWindowId;
windowManager_t.prototype.windowResizeEvent=windowManager_windowResizeEvent;
windowManager_t.prototype.getPreviousFrame=windowManager_getPreviousFrame;
windowManager_t.prototype.CASCADE_X_INC=25;
windowManager_t.prototype.CASCADE_Y_INC=25;
windowManager_t.prototype.CASCADE_X_OFFSET=40;
windowManager_t.prototype.RUNID_MASK=65536;
}
catch(ex){
jsExDebug("windowManager_t.prototype",ex);
}
function windowManager_t(){
try{
this.windowManager_super();
this.framesByRunId=[];
this.framesByWindowId=[];
this.frameStack=new linkedList_t();
this.topFrameStack=new linkedList_t();
this.windowCounter=0;
this.focusedFrame=null;
this.focusedApp=null;
this.topFrame=null;
this.highlightedRunId=null;
this.windowResizeIndex=this.SYSTEM.Event.notifyWindowResize(new this.SYSTEM.Delegate(this,this.windowResizeEvent));
}
catch(ex){
jsExDebug("windowManager_t",ex);
}
}
function windowManager_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.removeWindowResizeHandler(me.windowResizeIndex);
me.windowResizeIndex=null;
for(var i=0;i<me.framesByRunId.length;i++){
var _3=me.framesByRunId[i];
if(_3){
for(var j=0;j<_3.length;j++){
if(_3[i]){
_3[i]=null;
delete _3[i];
}
}
me.framesByRunId[i]=null;
delete me.framesByRunId[i];
}
}
me.framesByRunId=null;
for(var i=0;i<me.framesByWindowId.length;i++){
if(me.framesByWindowId[i]){
me.framesByWindowId[i]=null;
delete me.framesByWindowId[i];
}
}
me.framesByWindowId=null;
me.frameStack.cleanUp();
me.topFrameStack.cleanUp();
me.frameStack=null;
me.topFrameStack=null;
me.topFrame=null;
me.windowCounter=null;
me.focusedFrame=null;
me.highlightedRunId=null;
me.focusedApp=null;
if(me==SYSTEM.WINDOW_MANAGER){
SYSTEM.WINDOW_MANAGER=null;
SYSTEM.WindowManager=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("windowManager_cleanUp",ex);
}
}
function windowManager_register(_5){
try{
if(!_5){
return null;
}
var _6=_5.getRunId();
if(_6!=null){
_6^=this.RUNID_MASK;
var _7=_5.setWindowId(this.makeWindowId());
if(typeof this.framesByRunId[_6]!="object"){
this.framesByRunId[_6]=[];
}
this.framesByRunId[_6].push(_5);
this.framesByWindowId[_7]=_5;
}
if(!_5.settingAlwaysOnTop){
_5.node=new node_t(_5);
this.focus(_5);
}
}
catch(ex){
jsExDebug("windowManager_register",ex);
}
}
function windowManager_unregister(_8){
try{
if(!_8){
return;
}
var _9=_8.getWindowId();
var _a=_8.getRunId();
if(_a){
_a=_a^this.RUNID_MASK;
if(_9){
this.framesByWindowId[_9]=null;
delete this.framesByWindowId[_9];
}
var _b=0;
for(var i=0;i<this.framesByRunId[_a].length;i++){
var _d=this.framesByRunId[_a][i];
if(!_d){
continue;
}
_b++;
if(_d.getWindowId()==_9){
this.framesByRunId[_a][i]=null;
delete this.framesByRunId[_a][i];
_b--;
}
}
if(_8==this.focusedFrame){
var _e=this.getPreviousFrame(_8);
if(_e){
this.focus(_e);
}else{
this.setFocusedFrame(null);
}
}
if(_b==0){
this.framesByRunId[_a]=null;
delete this.framesByRunId[_a];
if(this.SYSTEM.Panel){
this.SYSTEM.Panel.removeApplicationPanel(_a);
}
var _f=_8.getApplication();
var _10=this.SYSTEM.APPLICATION_MANAGER.getTaskListWidget();
if(_10){
_10.removeTask(_f);
}
_f._SIG_CLOSE();
}
}
this.frameStack.unlink(_8.node);
_8.node.cleanUp();
_8.node=null;
}
catch(ex){
jsExDebug("windowManager_unregister",ex);
}
}
function windowManager_focus(){
function o1_withFrame(_11){
try{
if(_11==this.focusedFrame||_11.settingAlwaysOnTop||!_11.application){
return null;
}
if(this.focusedFrame){
this.focusedFrame.applyBlurShadow();
this.focusedFrame.fireEvent("_onBlur");
}
var _12=_11.getRunId();
if(_12!=this.focusedApp&&this.SYSTEM.Panel&&!_11.application.isSystemApp){
this.SYSTEM.Panel.show(_12^this.RUNID_MASK);
}
this.frameStack.append(_11.node);
_11.applyFocusShadow();
_11.preHighlightZIndex=null;
this.setFocusedFrame(_11);
var _13=1;
for(var _14=this.frameStack.getFirst();_14!=null;_14=_14.getNext()){
var _11=_14.item;
_11.frame.style.zIndex=_13;
_13++;
}
if(this.topFrame){
this.focusTopFrameStack(_13);
return;
}
_11.fireEvent("_onFocus");
return _11;
}
catch(ex){
jsExDebug("windowManager_focus:o1_withFrame",ex);
}
}
function o1_withWindowId(_15){
try{
var _16=this.framesByWindowId[_15];
if(_16){
return o1_withFrame.call(this,_16);
}
}
catch(ex){
jsExDebug("windowManager_focus:o1_withWindowId",ex);
}
}
function o1_withRunId(_17){
try{
var _18=_17^this.RUNID_MASK;
var _19=this.framesByRunId[_18].length;
for(var i=0;i<_19;i++){
for(var _1b=this.frameStack.getFirst();_1b!=null;_1b=_1b.getNext()){
var _1c=_1b.item;
if(_1c.getRunId()==_17){
o1_withFrame.call(this,_1c);
break;
}
}
}
return;
}
catch(ex){
jsExDebug("windowManager_focus:o1_withRunId",ex);
}
}
try{
if(!arguments.length){
return null;
}
if(typeof arguments[0]=="object"&&arguments[0] instanceof frame_t){
return o1_withFrame.apply(this,arguments);
}
if(this.isWindowId(arguments[0])){
return o1_withWindowId.apply(this,arguments);
}
if(this.isRunId(arguments[0])){
return o1_withRunId.apply(this,arguments);
}
}
catch(ex){
jsExDebug("windowManager_focus",ex);
}
}
function windowManager_close(_1d){
function o1_withFrame(_1e){
try{
if(!_1e){
return;
}
me.unregister(_1e);
}
catch(ex){
jsExDebug("windowManager_close:o1_withFrame",ex);
}
}
function o1_withWindowId(_20){
try{
var _21=me.framesByWindowId[_20];
if(_21){
return o1_withFrame(_21);
}
}
catch(ex){
jsExDebug("windowManager_close:o1_withWindowId",ex);
}
}
function o1_withRunId(_22){
try{
_22^=me.RUNID_MASK;
if(!me.framesByRunId[_22]){
return;
}
for(var i=0;i<me.framesByRunId[_22].length;i++){
if(me.framesByRunId[_22][i]){
o1_withFrame(me.framesByRunId[_22][i]);
}
}
}
catch(ex){
jsExDebug("windowManager_close:o1_withRunId",ex);
}
}
try{
var me=this;
if(!arguments.length){
return null;
}
if(typeof arguments[0]=="object"&&arguments[0] instanceof frame_t){
return o1_withFrame(arguments[0]);
}
if(this.isWindowId(arguments[0])){
return o1_withWindowId(arguments[0]);
}
if(this.isRunId(arguments[0])){
return o1_withRunId(arguments[0]);
}
}
catch(ex){
jsExDebug("windowManager_close",ex);
}
}
function windowManager_setFocusedFrame(_24){
try{
this.focusedFrame=_24;
if(_24){
this.focusedApp=_24.getRunId();
}else{
this.focusedApp=null;
}
}
catch(ex){
jsExDebug("windowManager_setFocusedFrame",ex);
}
}
function windowManager_getFocusedFrame(){
try{
return this.focusedFrame;
}
catch(ex){
jsExDebug("windowManager_setFocusedFrame",ex);
}
}
function windowManager_getTopFrame(){
try{
return this.topFrame;
}
catch(ex){
jsExDebug("windowManager_getTopFrame",ex);
}
}
function windowManager_getFocusedApplication(){
try{
if(this.focusedFrame&&this.focusedFrame.getApplication){
return this.focusedFrame.getApplication();
}
}
catch(ex){
jsExDebug("windowManager_getFocusedApplication",ex);
}
}
function windowManager_setStartPosition(_25){
try{
var _26=widgetNotifier_t.prototype.HIDDEN_DIV_WIDTH;
var _27=this.SYSTEM.Panel.getHeight()+this.SYSTEM.Panel.SWITCHER_TOP;
var _28=this.SYSTEM.Environment.SCREEN_WIDTH;
var _29=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Launcher.HEIGHT;
var _2a=false;
if(_26+_25.width>_28){
_26=_28-_25.width;
if(_26<0){
_26=0;
}
}
if(_27+_25.height>_29){
_27=_29-_25.height;
if(_27<0){
_27=0;
}
}
if(!_2a&&this.focusedFrame&&this.focusedFrame.node.previous){
var _2b=this.focusedFrame.node.previous.item;
if(_2b){
if((_26>=_2b.positionX&&_26<=_2b.positionX+40)||(_27>=_2b.positionY&&_27<=_2b.positionY+40)){
_26+=40;
_27+=40;
}
}
}
_25.setPosition(_26,_27);
}
catch(ex){
jsExDebug("windowManager_setStartPosition",ex);
}
}
function windowManager_minimise(){
function o1_withFrame(_2c){
try{
if(_2d){
if(_2c==this.focusedFrame){
var _2e=this.getPreviousFrame(_2c);
if(_2e){
this.focus(_2e);
}else{
this.setFocusedFrame(null);
}
}
_2c.minimise();
}else{
_2c.restore();
}
var app=_2c.getApplication();
var _30=this.SYSTEM.APPLICATION_MANAGER.getTaskListWidget();
if(_30){
_30.setTaskMinimised(app,_2d);
}
}
catch(ex){
jsExDebug("windowManager_minimise:o1_withFrame",ex);
}
}
function o1_withWindowId(_31){
try{
var _32=this.framesByWindowId[_31];
if(_32){
return o1_withFrame.call(this,_32);
}
}
catch(ex){
jsExDebug("windowManager_minimise:o1_withWindowId",ex);
}
}
function o1_withRunId(_33){
try{
var _34=_33^this.RUNID_MASK;
for(var _35=this.frameStack.getFirst();_35!=null;_35=_35.getNext()){
var _36=_35.item;
if(_36.getRunId()==_33){
o1_withFrame.call(this,_36);
}
}
return;
}
catch(ex){
jsExDebug("windowManager_minimise:o1_withRunId",ex);
}
}
try{
if(!arguments.length){
return null;
}
var _2d=arguments[1];
if(typeof arguments[0]=="object"&&arguments[0] instanceof frame_t){
return o1_withFrame.apply(this,arguments);
}
if(this.isWindowId(arguments[0])){
return o1_withWindowId.apply(this,arguments);
}
if(this.isRunId(arguments[0])){
return o1_withRunId.apply(this,arguments);
}
}
catch(ex){
jsExDebug("windowManager_minimise",ex);
}
}
function windowManager_cascadeFrames(){
try{
var _37=0;
var _38=null;
for(var _39=this.frameStack.getFirst();_39!=null;_39=_39.getNext()){
var _3a=_39.item;
if(_3a.settingAllowResize){
_3a.setDimensions(_3a.minimumWidth,_3a.minimumHeight);
}
_3a.setPosition((_37*this.CASCADE_X_INC)+this.CASCADE_X_OFFSET,(_37*this.CASCADE_Y_INC)+this.SYSTEM.Panel.getHeight());
_37++;
}
}
catch(ex){
jsExDebug("windowManager_cascadeFrames",ex);
}
}
function windowManager_stackFrames(){
try{
for(var _3b=this.frameStack.getFirst();_3b!=null;_3b=_3b.getNext()){
var _3c=_3b.item;
if(_3c!=this.focusedFrame){
_3c.halfMaximise(this.SYSTEM.Frame.HALF_MAXIMISE_LEFT);
}
}
if(this.focusedFrame){
this.focusedFrame.halfMaximise(this.SYSTEM.Frame.HALF_MAXIMISE_RIGHT);
}
}
catch(ex){
jsExDebug("windowManager_stackFrames",ex);
}
}
function windowManager_makeWindowId(){
try{
this.windowCounter++;
return this.windowCounter;
}
catch(ex){
jsExDebug("windowManager_makeWindowId",ex);
}
}
function windowManager_windowResizeEvent(_3d,_3e){
try{
var _3f=null;
var _40=null;
var _41=null;
var _42=null;
var _43=null;
for(var i=0;i<this.framesByWindowId.length;i++){
_3f=this.framesByWindowId[i];
if(_3f){
_42=_3f.width;
_43=_3f.height;
if((_3f.positionX+_3f.width)>_3d){
_42=_3d-_3f.positionX-_3f.getVerticalShadowWidths();
}
if((_3f.positionY+_3f.height)>(_3e-this.SYSTEM.Launcher.HEIGHT)){
_43=_3e-this.SYSTEM.Launcher.HEIGHT-_3f.positionY-_3f.getHorizontalShadowHeights();
}
_40=_3f.positionX;
_41=_3f.positionY;
if(_42<=_3f.minimumWidth){
_40=_40-(_3f.minimumWidth-_42);
}
if(_43<=_3f.minimumHeight){
_41=_41-(_3f.minimumHeight-_43);
}
_3f.setDimensions(_42,_43);
_3f.setPosition(_40,_41);
}
}
}
catch(ex){
jsExDebug("windowManager_makeWindowId",ex);
}
}
function windowManager_getPreviousFrame(_45){
try{
var _46=_45.node.getPrevious();
while(_46&&(_46.getItem().isMinimised||!_46.getItem().isVisible)){
_46=_46.getItem().node.getPrevious();
}
return (_46?_46.getItem():false);
}
catch(ex){
jsExDebug("windowManager_getPreviousFrame",ex);
}
}
function windowManager_isWindowId(_47){
try{
if(_47&this.RUNID_MASK){
return false;
}
for(var i in this.framesByWindowId){
if(i==_47){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("windowManager_isWindowId",ex);
}
}
function windowManager_isRunId(_49){
try{
if(!(_49&this.RUNID_MASK)){
return false;
}
var _4a=_49^this.RUNID_MASK;
for(var i in this.framesByRunId){
if(i==_4a){
return true;
}
}
}
catch(ex){
jsExDebug("windowManager_isRunId",ex);
}
}
function windowManager_highlight(_4c){
try{
if(this.highlightedRunId==_4c){
return;
}
this.highlightedRunId=_4c;
var _4d=_4c^this.RUNID_MASK;
var _4e=this.framesByRunId[_4d];
if(_4e){
for(var i=0;i<_4e.length;i++){
var _50=_4e[i];
if(_50&&_50.isVisible&&!_50.isMinimised){
_50.preHighlightZIndex=_50.frame.style.zIndex;
_50.frame.style.zIndex=HIGHLIGHT_FRAME_ZINDEX;
_50.applyFocusShadow();
}else{
_50=null;
}
}
}
if(_50&&(_50!=this.focusedFrame)){
this.focusedFrame.applyBlurShadow();
}
}
catch(ex){
jsExDebug("windowManager_highlight",ex);
}
}
function windowManager_dim(){
try{
if(this.highlightedRunId==null){
return;
}
var _51=this.highlightedRunId^this.RUNID_MASK;
var _52=this.framesByRunId[_51];
if(_52){
for(var i=0;i<_52.length;i++){
var _54=_52[i];
if(_54){
_54.applyBlurShadow();
if(_54.preHighlightZIndex){
_54.frame.style.zIndex=_54.preHighlightZIndex;
_54.preHighlightZIndex=null;
}
}
}
}
if(_54&&this.focusedFrame){
this.focusedFrame.applyFocusShadow();
}
this.highlightedRunId=null;
}
catch(ex){
jsExDebug("windowManager_dim",ex);
}
}
function windowManager_registerAlwaysOnTop(){
function o1_withFrame(_55){
try{
if(!_55.node){
_55.node=new node_t(_55);
}
var _56=1;
for(var _57=this.frameStack.getFirst();_57!=null;_57=_57.getNext()){
_57.item.applyBlurShadow();
_57.item.frame.style.zIndex=_56;
_56++;
}
for(var _57=this.topFrameStack.getFirst();_57!=null;_57=_57.getNext()){
_57.item.applyBlurShadow();
_57.item.frame.style.zIndex=_56;
_56++;
}
this.topFrameStack.append(_55.node);
_55.frame.style.zIndex=_56;
this.topFrame=_55;
}
catch(ex){
jsExDebug("windowManager_registerAlwaysOnTop: o1_withFrame",ex);
}
}
function o1_withRunId(_58){
try{
var _59=_58^this.RUNID_MASK;
var _5a=this.framesByRunId[_59].length;
for(var i=0;i<_5a;i++){
for(var _5c=this.frameStack.getFirst();_5c!=null;_5c=_5c.getNext()){
var _5d=_5c.item;
if(_5d.getRunId()==_58){
o1_withFrame.call(this,_5d);
break;
}
}
}
return;
}
catch(ex){
jsExDebug("windowManager_registerAlwaysOnTop: o1_withRunId",ex);
}
}
try{
var _5e=arguments[0];
if(_5e instanceof frame_t){
o1_withFrame.call(this,_5e);
}else{
if(this.isRunId(_5e)){
o1_withRunId.call(this,_5e);
}
}
}
catch(ex){
jsExDebug("windowManager_registerAlwaysOnTop",ex);
}
}
function windowManager_unregisterAlwaysOnTop(){
function o1_withFrame(_5f){
try{
if(!_5f){
return;
}
var _60=_5f.getWindowId();
var _61=_5f.getRunId();
if(_61){
_61=_61^this.RUNID_MASK;
if(_60){
this.framesByWindowId[_60]=null;
delete this.framesByWindowId[_60];
}
var _62=0;
for(var i=0;i<this.framesByRunId[_61].length;i++){
var _64=this.framesByRunId[_61][i];
if(!_64){
continue;
}
_62++;
if(_64.getWindowId()==_60){
this.framesByRunId[_61][i]=null;
delete this.framesByRunId[_61][i];
_62--;
}
}
if(_5f==this.topFrame){
var _65=_5f.node.getPrevious();
if(_65){
_65.getItem().applyFocusShadow();
_65.getItem().fireEvent("_onFocus");
this.topFrame=_65.getItem();
}else{
this.topFrame=null;
if(this.focusedFrame){
this.focusedFrame.applyFocusShadow();
this.focusedFrame.fireEvent("_onFocus");
}
}
}
if(_62==0){
this.framesByRunId[_61]=null;
delete this.framesByRunId[_61];
var app=_5f.getApplication();
app._SIG_CLOSE();
}
}
this.topFrameStack.unlink(_5f.node);
_5f.node.cleanUp();
_5f.node=null;
}
catch(ex){
jsExDebug("windowManager_unregisterAlwaysOnTop: o1_withFrame",ex);
}
}
function o1_withRunId(_67){
try{
var _68=_67^this.RUNID_MASK;
var _69=this.framesByRunId[_68].length;
for(var i=0;i<_69;i++){
for(var _6b=this.frameStack.getFirst();_6b!=null;_6b=_6b.getNext()){
var _6c=_6b.item;
if(_6c.getRunId()==_67){
o1_withFrame.call(this,_6c);
break;
}
}
}
return;
}
catch(ex){
jsExDebug("windowManager_unregisterAlwaysOnTop: o1_withRunId",ex);
}
}
try{
var _6d=arguments[0];
if(_6d instanceof frame_t){
o1_withFrame.call(this,_6d);
}else{
if(this.isRunId(_6d)){
o1_withRunId.call(this,_6d);
}
}
}
catch(ex){
jsExDebug("windowManager_unregisterAlwaysOnTop",ex);
}
}
function windowManager_focusTopFrameStack(_6e){
try{
for(var _6f=this.frameStack.getFirst();_6f!=null;_6f=_6f.getNext()){
var _70=_6f.item;
_70.applyBlurShadow();
_70.fireEvent("_onBlur");
}
for(var _6f=this.topFrameStack.getFirst();_6f!=null;_6f=_6f.getNext()){
var _70=_6f.item;
if(this.topFrame){
this.topFrame.applyBlurShadow();
this.topFrame.fireEvent("_onBlur");
}
_70.frame.style.zIndex=_6e;
_6e++;
_70.applyFocusShadow();
this.topFrame=_70;
}
}
catch(ex){
jsExDebug("windowManager_focusTopFrameStack",ex);
}
}

try{
node_t.prototype=node_t;
node_t.prototype.cleanUp=node_cleanUp;
node_t.prototype.setNext=node_setNext;
node_t.prototype.setPrevious=node_setPrevious;
node_t.prototype.unlink=node_unlink;
node_t.prototype.setItem=node_setItem;
node_t.prototype.getItem=node_getItem;
node_t.prototype.getNext=node_getNext;
node_t.prototype.getPrevious=node_getPrevious;
}
catch(ex){
jsExDebug("node_t.prototype",ex);
}
function node_t(_1){
try{
this.next=null;
this.previous=null;
this.item=_1;
this.inList=false;
}
catch(ex){
jsExDebug("node_t",ex);
}
}
function node_cleanUp(me){
try{
if(!me){
me=this;
}
me.next=null;
me.previous=null;
me.item=null;
me.inList=null;
}
catch(ex){
jsExDebug("node_cleanUp",ex);
}
}
function node_setNext(_3){
try{
this.next=_3;
}
catch(ex){
jsExDebug("node_setNext",ex);
}
}
function node_setPrevious(_4){
try{
this.previous=_4;
}
catch(ex){
jsExDebug("node_setPrevious",ex);
}
}
function node_unlink(){
try{
this.next=null;
this.previous=null;
}
catch(ex){
jsExDebug("node_unlink",ex);
}
}
function node_setItem(_5){
try{
this.item=_5;
}
catch(ex){
jsExDebug("node_setItem",ex);
}
}
function node_getItem(){
try{
return this.item;
}
catch(ex){
jsExDebug("node_getItem",ex);
}
}
function node_getNext(){
try{
return this.next;
}
catch(ex){
jsExDebug("node_getNext",ex);
}
}
function node_getPrevious(){
try{
return this.previous;
}
catch(ex){
jsExDebug("node_getNext",ex);
}
}

try{
linkedList_t.prototype=new peepelObject_t();
linkedList_t.prototype.constructor=linkedList_t;
linkedList_t.prototype.cleanUp=linkedList_cleanUp;
linkedList_t.prototype.linkedList_super=peepelObject_t.prototype.constructor;
linkedList_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
linkedList_t.prototype.insert=linkedList_insert;
linkedList_t.prototype.append=linkedList_append;
linkedList_t.prototype.prepend=linkedList_prepend;
linkedList_t.prototype.unlink=linkedList_unlink;
linkedList_t.prototype.seek=linkedList_seek;
linkedList_t.prototype.getNext=linkedList_getNext;
linkedList_t.prototype.debug=linkedList_debug;
linkedList_t.prototype.insertBefore=linkedList_insertBefore;
linkedList_t.prototype.getFirst=linkedList_getFirst;
linkedList_t.prototype.getLast=linkedList_getLast;
linkedList_t.prototype.getLength=linkedList_getLength;
}
catch(ex){
jsExDebug("linkedList_t.prototype.",ex);
}
function linkedList_t(){
try{
this.linkedList_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.length=0;
this.seekPosition=0;
this.seekNode=null;
this.first=null;
this.last=null;
}
catch(ex){
jsExDebug("linkedList_t",ex);
}
}
function linkedList_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var _2=me.first;_2!=null;_2=_2.getNext()){
_2.cleanUp();
}
me.length=null;
me.seekPosition=null;
me.seekNode=null;
me.first=null;
me.last=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("linkedList_cleanUp",ex);
}
}
function linkedList_insert(_3,_4){
try{
jsDebug("linkedList_insert not implemented.");
}
catch(ex){
jsExDebug("linkedList_insert",ex);
}
}
function linkedList_append(_5){
try{
if(!_5){
return;
}
this.unlink(_5);
if(this.last){
_5.setPrevious(this.last);
this.last.setNext(_5);
}
this.last=_5;
if(!this.first){
this.first=_5;
}
this.length++;
_5.inList=true;
}
catch(ex){
jsExDebug("linkedList_append",ex);
}
}
function linkedList_prepend(_6){
try{
if(this.first){
_6.setNext(this.first);
this.first.setPrevious(_6);
}
this.first=_6;
if(!this.last){
this.last=_6;
}
this.length++;
_6.inList=true;
}
catch(ex){
jsExDebug("linkedList_prepend",ex);
}
}
function linkedList_unlink(_7){
try{
if(!_7){
return false;
}
if(_7.inList){
this.length--;
}else{
return false;
}
if(_7.next){
_7.next.setPrevious(_7.previous);
}
if(_7.previous){
_7.previous.setNext(_7.next);
}
if(_7==this.last){
this.last=_7.previous;
}
if(_7==this.first){
this.first=_7.next;
}
_7.setNext(null);
_7.setPrevious(null);
_7.inList=false;
return true;
}
catch(ex){
jsExDebug("linkedList_unlink",ex);
}
}
function linkedList_seek(_8){
try{
this.seekPosition=0;
this.seekNode=null;
for(this.seekNode=this.first;this.seekNode!=null;this.seekNode=this.seekNode.getNext()){
if(this.seekPosition==_8){
return this.seekNode;
}
this.seekPosition++;
}
return null;
}
catch(ex){
jsExDebug("linkedList_seek",ex);
}
}
function linkedList_insertBefore(_9,_a){
try{
this.unlink(_9);
var _b=_a.getPrevious();
if(_b){
_b.setNext(_9);
}
_9.setPrevious(_b);
_a.setPrevious(_9);
_9.setNext(_a);
_9.inList=true;
if(this.first==_a){
this.first=_9;
}
}
catch(ex){
jsExDebug("linkedList_insertBefore",ex);
}
}
function linkedList_debug(_c,_d){
try{
if(!this.first){
return;
}
var _e=this.first.getItem().titleWidget.getText();
for(var _f=this.first.getNext();_f!=null;_f=_f.getNext()){
_e+=" -> "+_f.getItem().titleWidget.getText();
}
if(_c){
var _10=this.last.getItem().titleWidget.getText();
for(_f=this.last.getPrevious();_f!=null;_f=_f.getPrevious()){
_10+=" -> "+_f.getItem().titleWidget.getText();
}
}
}
catch(ex){
jsExDebug("linkedList_debug",ex);
}
}
function linkedList_getNext(){
try{
if(this.seekNode){
this.seekNode=this.seekNode.getNext();
}
return this.seekNode;
}
catch(ex){
jsExDebug("linkedList_getNext",ex);
}
}
function linkedList_getFirst(){
try{
return this.first;
}
catch(ex){
jsExDebug("linkedList_getFirst",ex);
}
}
function linkedList_getLast(){
try{
return this.last;
}
catch(ex){
jsExDebug("linkedList_getLast",ex);
}
}
function linkedList_getLength(){
try{
return this.length;
}
catch(ex){
jsExDebug("linkedList_getLength",ex);
}
}

try{
application_t.prototype=new peepelObject_t();
application_t.prototype.constructor=application_t;
application_t.prototype.cleanUp=application_cleanUp;
application_t.prototype.application_super=peepelObject_t.prototype.constructor;
application_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
application_t.prototype.setRunId=application_setRunId;
application_t.prototype.capture=application_capture;
application_t.prototype.restore=application_restore;
application_t.prototype.isDirty=application_isDirty;
application_t.prototype.cleanAction=application_cleanAction;
application_t.prototype.registerFrame=application_registerFrame;
application_t.prototype.unregisterFrame=application_unregisterFrame;
application_t.prototype.addBrowserIncompatibility=application_addBrowserIncompatibility;
application_t.prototype.getRunId=application_getRunId;
application_t.prototype.initialise=application_initialise;
application_t.prototype.createPanelObject=application_createPanelObject;
application_t.prototype.registerDialogue=application_registerDialogue;
application_t.prototype.unregisterDialogue=application_unregisterDialogue;
application_t.prototype.closeAllFrames=application_closeAllFrames;
application_t.prototype.closeAllDialogues=application_closeAllDialogues;
application_t.prototype.showBrowserIncompatibility=application_showBrowserIncompatibility;
application_t.prototype._SIG_KILL=application__SIG_KILL;
application_t.prototype._SIG_CUSTOM=application__SIG_CUSTOM;
application_t.prototype._SIG_CLOSE=application__SIG_CLOSE;
application_t.prototype.ICON_SRC="img/app/app/taskmanager/off.gif";
application_t.prototype.RUNID_MASK=65536;
application_t.prototype.AD_IMAGE="img/site/friends/sjk";
application_t.prototype.AD_URL="http://www.sjk.net.au/sjk.php";
application_t.prototype.APP_NAME="Application";
}
catch(ex){
jsExDebug("application_t.prototype",ex);
}
function application_t(){
try{
this.application_super(false);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!this.APP_ID){
return;
}
this.browserIncompatibilityMessages=[];
this.browserIncompatibilityMessages["msie 7"]=[];
this.browserIncompatibilityMessages["msie 8"]=[];
this.browserIncompatibilityMessages["msie 6"]=[];
this.browserIncompatibilityMessages["opera"]=[];
this.browserIncompatibilityMessages["chrome"]=[];
this.browserIncompatibilityMessages["safari"]=[];
this.browserIncompatibilityMessages["mozilla"]=[];
this.applicationId=this.APP_ID;
this.initialise();
}
catch(ex){
jsExDebug("application_t",ex);
}
}
function application_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.APPLICATION_MANAGER){
me.SYSTEM.APPLICATION_MANAGER.close(me.runId);
}
if(me.APPLICATION.openFrames){
me.APPLICATION.openFrames.close.apply(me);
}
if(me.APPLICATION.openDialogues){
me.APPLICATION.openDialogues.close.apply(me);
}
me.APPLICATION.Panel=null;
me.APPLICATION=null;
me.applicationId=null;
me.runId=null;
me.iconSrc=null;
me.highlightIconSrc=null;
me.captureString=null;
for(var _2 in me.browserIncompatibilityMessages){
me.browserIncompatibilityMessages[_2]=null;
}
me.browserIncompatibilityMessages=null;
if(me.stats){
me.stats.logApp(me,me.stats.APP_EVENT_CLOSED);
me.stats.cleanUp();
me.stats=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("application_cleanUp",ex);
}
}
function application_closeAllFrames(){
try{
var _3=this.APPLICATION.openFrames;
for(var i=0;i<_3.length;i++){
if(_3[i]){
_3[i].cleanUp();
this.APPLICATION.openFrames[i]=null;
delete this.APPLICATION.openFrames[i];
}
}
this.APPLICATION.openFrames=null;
}
catch(ex){
jsExDebug("application_closeAllFrames",ex);
}
}
function application_closeAllDialogues(){
try{
var _5=this.APPLICATION.openDialogues;
for(var i=0;i<_5.length;i++){
if(_5[i]){
_5[i].registrationIndex=null;
_5[i].cleanUp();
this.APPLICATION.openDialogues[i]=null;
delete this.APPLICATION.openDialogues[i];
}
}
this.APPLICATION.openDialogues=null;
}
catch(ex){
jsExDebug("application_closeAllDialogues",ex);
}
}
function application_showBrowserIncompatibility(){
try{
if(this.SYSTEM.Settings&&this.SYSTEM.Settings.get("browser_compat_msgs")&&this.APPLICATION.openFrames){
var _7=null;
var _8=this.SYSTEM.Environment.AGENT_STRING;
for(var _9 in this.browserIncompatibilityMessages){
var _a=new RegExp(_9,"i");
if(_8.match(_a)){
_7=this.browserIncompatibilityMessages[_9];
break;
}
}
if(_7&&_7.length){
var d=new this.SYSTEM.Dialogue.BrowserMessages(this,_7.join("<br/>"));
}
}
}
catch(ex){
jsExDebug("application_showBrowserIncompatibility",ex);
}
}
function application_initialise(){
try{
this.iconSrc=this.ICON_SRC;
this.captureString=null;
this.APPLICATION={};
this.APPLICATION.openFrames=[];
this.APPLICATION.openFrames.close=this.closeAllFrames;
this.APPLICATION.openDialogues=[];
this.APPLICATION.openDialogues.close=this.closeAllDialogues;
this.stats=new stats_t();
this.stats.logApp(this,this.stats.APP_EVENT_OPEN);
if(this.SYSTEM.APPLICATION_MANAGER){
this.runId=this.SYSTEM.APPLICATION_MANAGER.register(this);
}
if(this.SYSTEM.Panel){
var _c=this.SYSTEM.Environment.SCREEN_WIDTH-this.SYSTEM.Panel.panelSwitcher.positionX;
this.APPLICATION.Panel=new this.SYSTEM.Widget.ApplicationPanel("ApplicationPanel",this,_c);
this.SYSTEM.Panel.addApplicationPanel(this.APPLICATION.Panel,this.runId^this.RUNID_MASK);
}
}
catch(ex){
jsExDebug("application_initialise",ex);
}
}
function application_createPanelObject(){
try{
}
catch(ex){
jsExDebug("application_createPanelObject",ex);
}
}
function application_setRunId(_d){
try{
this.runId=_d;
}
catch(ex){
jsExDebug("application_setRunId",ex);
}
}
function application_getRunId(){
try{
return this.runId;
}
catch(ex){
jsExDebug("application_getRunId",ex);
}
}
function application_registerDialogue(_e){
try{
var _f=this.APPLICATION.openFrames[0];
if(_f){
_e.setPosition(_f.positionX+50,_f.positionY+50);
}
return this.APPLICATION.openDialogues.push(_e)-1;
}
catch(ex){
jsExDebug("application_registerDialogue",ex);
}
}
function application_unregisterDialogue(_10){
try{
this.APPLICATION.openDialogues[_10]=null;
delete this.APPLICATION.openDialogues[_10];
}
catch(ex){
jsExDebug("application_unregisterDialogue",ex);
}
}
function application_capture(){
try{
return null;
}
catch(ex){
jsExDebug("application_capture",ex);
}
}
function application_restore(_11){
try{
}
catch(ex){
jsExDebug("application_restore",ex);
}
}
function application_isDirty(){
try{
return false;
}
catch(ex){
jsExDebug("application_isDirty",ex);
}
}
function application_cleanAction(){
try{
}
catch(ex){
jsExDebug("application_cleanAction",ex);
}
}
function application_registerFrame(_12){
try{
this.APPLICATION.openFrames.push(_12);
this.SYSTEM.WINDOW_MANAGER.setStartPosition(_12);
if(this.SYSTEM.Environment.AGENT_STRING.match(/iPhone/)){
_12.maximise();
}
}
catch(ex){
jsExDebug("application_registerFrame",ex);
}
}
function application_unregisterFrame(_13){
try{
var _14=this.APPLICATION.openFrames;
for(var i=0;i<_14.length;i++){
if(_14[i]&&_14[i]==_13){
_14[i]=null;
delete _14[i];
}
}
}
catch(ex){
jsExDebug("application_unregisterFrame",ex);
}
}
function application_addBrowserIncompatibility(_16,_17){
try{
if(this.browserIncompatibilityMessages[_16]){
this.browserIncompatibilityMessages[_16].push(_17);
}
}
catch(ex){
jsExDebug("application_addBrowserIncompatibility",ex);
}
}
function application__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("application__SIG_KILL",ex);
}
}
function application__SIG_CUSTOM(_18){
try{
switch(_18){
case "THEME":
var _19=this.APPLICATION.openFrames;
for(var i=0;i<_19.length;i++){
if(_19[i]){
_19[i].refreshEdgeWidths();
}
}
if(this.APPLICATION.Panel){
this.APPLICATION.Panel.updatePosition();
this.APPLICATION.Panel.resizeAllToolgroups();
}
break;
}
var _1b=this["_SIG_"+_18];
if(_1b){
_1b.call(this);
}
}
catch(ex){
jsExDebug("application__SIG_CUSTOM",ex);
}
}
function application__SIG_CLOSE(){
try{
}
catch(ex){
jsExDebug("application__SIG_CLOSE",ex);
}
}

try{
applicationManager_t.prototype=new peepelObject_t();
applicationManager_t.prototype.constructor=applicationManager_t;
applicationManager_t.prototype.cleanUp=applicationManager_cleanUp;
applicationManager_t.prototype.applicationManager_super=peepelObject_t.prototype.constructor;
applicationManager_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
applicationManager_t.prototype.keyDownHandler=applicationManager_keyDownHandler;
applicationManager_t.prototype.keyPressHandler=applicationManager_keyPressHandler;
applicationManager_t.prototype.keyUpHandler=applicationManager_keyUpHandler;
applicationManager_t.prototype.mouseScrollEvent=applicationManager_mouseScrollEvent;
applicationManager_t.prototype.declare=applicationManager_declare;
applicationManager_t.prototype.revoke=applicationManager_revoke;
applicationManager_t.prototype.register=applicationManager_register;
applicationManager_t.prototype.registerSystemApplication=applicationManager_registerSystemApplication;
applicationManager_t.prototype.get=applicationManager_get;
applicationManager_t.prototype.close=applicationManager_close;
applicationManager_t.prototype.kill=applicationManager_kill;
applicationManager_t.prototype.launch=applicationManager_launch;
applicationManager_t.prototype.launchWithTooltip=applicationManager_launchWithTooltip;
applicationManager_t.prototype.setTaskListWidget=applicationManager_setTaskListWidget;
applicationManager_t.prototype.getTaskListWidget=applicationManager_getTaskListWidget;
applicationManager_t.prototype.makeRunId=applicationManager_makeRunId;
applicationManager_t.prototype.closeAll=applicationManager_closeAll;
applicationManager_t.prototype.checkForDirtyApps=applicationManager_checkForDirtyApps;
applicationManager_t.prototype.quickLaunch=applicationManager_quickLaunch;
applicationManager_t.prototype.registerTaskManagerApp=applicationManager_registerTaskManagerApp;
applicationManager_t.prototype.unregisterTaskManagerApp=applicationManager_unregisterTaskManagerApp;
applicationManager_t.prototype.getTaskManagerApp=applicationManager_getTaskManagerApp;
applicationManager_t.prototype.getRunningApps=applicationManager_getRunningApps;
applicationManager_t.prototype.notifyThemeChange=applicationManager_notifyThemeChange;
applicationManager_t.prototype.getRunningAppCount=applicationManager_getRunningAppCount;
applicationManager_t.prototype.checkIfExitMessageNeeded=applicationManager_checkIfExitMessageNeeded;
applicationManager_t.prototype.calculateHighestRunId=applicationManager_calculateHighestRunId;
applicationManager_t.prototype.RUNID_MASK=65536;
applicationManager_t.prototype.MOUSE_SCROLL_UP=1;
applicationManager_t.prototype.MOUSE_SCROLL_DOWN=2;
}
catch(ex){
jsExDebug("applications_t.prototype",ex);
}
function applicationManager_t(){
try{
this.applicationManager_super();
this.appArray=[];
this.runningApps=[];
this.runCounter=0;
this.taskManager=null;
this.highestRunId=null;
this.taskManagerApplication=null;
this.keyDownIndex=this.SYSTEM.Event.notifyKeyDownEvent(this.keyDownHandler,this);
this.keyPressIndex=this.SYSTEM.Event.notifyKeyPressEvent(this.keyPressHandler,this);
this.keyUpIndex=this.SYSTEM.Event.notifyKeyUpEvent(this.keyUpHandler,this);
this.mouseScrollUpIndex=this.SYSTEM.Event.notifyMouseScrollUp(this.mouseScrollEvent,this,this.MOUSE_SCROLL_UP);
this.mouseScrollDownIndex=this.SYSTEM.Event.notifyMouseScrollDown(this.mouseScrollEvent,this,this.MOUSE_SCROLL_DOWN);
}
catch(ex){
jsExDebug("applicationManager_t",ex);
}
}
function applicationManager_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.removeKeyDownHandler(me.keyDownIndex);
me.SYSTEM.Event.removeKeyPressHandler(me.keyPressIndex);
me.SYSTEM.Event.removeKeyUpHandler(me.keyUpIndex);
me.SYSTEM.Event.removeMouseScrollUpHandler(me.mouseScrollUpIndex);
me.SYSTEM.Event.removeMouseScrollDownHandler(me.mouseScrollDownIndex);
me.taskManagerApplication=null;
for(var i=0;i<me.appArray.length;i++){
if(me.appArray[i]){
me.appArray[i].constructor=null;
me.appArray[i].appId=null;
me.appArray[i]=null;
delete me.appArray[i];
}
}
for(var i=0;i<me.runningApps.length;i++){
if(me.runningApps[i]){
me.runningApps[i]=null;
delete me.runningApps[i];
}
}
me.runningApps=null;
me.appArray=null;
me.runCounter=null;
if(me.taskManager){
me.taskManager.cleanUp();
me.taskManager=null;
}
if(me==SYSTEM.APPLICATION_MANAGER){
SYSTEM.APPLICATION_MANAGER=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("applicationManager_cleanUp",ex);
}
}
function applicationManager_keyDownHandler(_3){
try{
var _4=_3.keyCode;
var _5=SYSTEM.WindowManager.getFocusedApplication();
var _6=SYSTEM.WindowManager.getFocusedFrame();
var _7=SYSTEM.WindowManager.getTopFrame();
if(_7){
_6=_7;
_5=_7.application;
}
if(_5&&_6.name&&_5[_6.name+"_keyDown"]){
_5[_6.name+"_keyDown"](_3);
}
}
catch(ex){
jsExDebug("applicationManager_keyDownHandler",ex);
}
}
function applicationManager_keyPressHandler(_8){
try{
var _9=_8.keyCode;
var _a=SYSTEM.WindowManager.getFocusedApplication();
var _b=SYSTEM.WindowManager.getFocusedFrame();
var _c=SYSTEM.WindowManager.getTopFrame();
if(_c){
_b=_c;
_a=_c.application;
}
if(_a&&_b.name&&_a[_b.name+"_keyPress"]){
_a[_b.name+"_keyPress"](_8);
}
}
catch(ex){
jsExDebug("applicationManager_keyPressHandler",ex);
}
}
function applicationManager_keyUpHandler(_d){
try{
var _e=_d.keyCode;
var _f=SYSTEM.WindowManager.getFocusedApplication();
var _10=SYSTEM.WindowManager.getFocusedFrame();
var _11=SYSTEM.WindowManager.getTopFrame();
if(_11){
_10=_11;
_f=_11.application;
}
if(_f&&_10.name&&_f[_10.name+"_keyUp"]){
_f[_10.name+"_keyUp"](_d);
}
}
catch(ex){
jsExDebug("applicationManager_keyUpHandler",ex);
}
}
function applicationManager_mouseScrollEvent(_12,_13,me,_15){
try{
var _16=SYSTEM.WindowManager.getFocusedFrame();
var _17=SYSTEM.WindowManager.getTopFrame();
if(_17){
_16=_17;
focusedApplication=_17.application;
}
if(_16){
_16.mouseScrollEvent(_12,_13,_15);
}
}
catch(ex){
jsExDebug("applicationManager_mouseScrollEvent",ex);
}
}
function applicationManager_declare(_18,_19){
try{
var app={};
app.constructor=_18;
app.appId=_19;
this.appArray.push(app);
}
catch(ex){
jsExDebug("applicationManager_declare",ex);
}
}
function applicationManager_revoke(_1b){
try{
for(var i=0;i<this.appArray.length;i++){
if(this.appArray[i]&&this.appArray[i].appId==_1b){
this.appArray.splice(i,1);
}
}
}
catch(ex){
jsExDebug("applicationManager_revoke",ex);
}
}
function applicationManager_register(_1d){
try{
if(!_1d){
return null;
}
var _1e=this.makeRunId();
_1e^=this.RUNID_MASK;
this.runningApps[_1e]=_1d;
if(this.taskManager){
var _1f=new this.SYSTEM.Widget.Task("task"+_1e,_1d);
this.taskManager.addTask(_1f);
}
this.checkIfExitMessageNeeded();
return (_1e|this.RUNID_MASK);
}
catch(ex){
jsExDebug("applicationManager_register",ex);
}
}
function applicationManager_registerSystemApplication(_20){
try{
if(!_20){
return null;
}
var _21=this.makeRunId();
_21^=this.RUNID_MASK;
this.runningApps[_21]=_20;
return (_21|this.RUNID_MASK);
}
catch(ex){
jsExDebug("applicationManager_registerSystemApplication",ex);
}
}
function applicationManager_get(_22){
try{
var _23;
for(var i in this.appArray){
var app=this.appArray[i];
if(app.appId==_22){
_23=app.constructor;
break;
}
}
return _23;
}
catch(ex){
jsExDebug("applicationManager_get",ex);
}
}
function applicationManager_close(){
function o1_withApp(app){
try{
if(!app){
return;
}
var _27=app.getRunId();
_27^=me.RUNID_MASK;
me.runningApps[_27]=null;
delete me.runningApps[_27];
me.calculateHighestRunId();
}
catch(ex){
jsExDebug("applicationManager_close: o1_withApp",ex);
}
}
function o1_withRunId(_29){
try{
_29^=me.RUNID_MASK;
me.runningApps[_29]=null;
delete me.runningApps[_29];
me.calculateHighestRunId();
}
catch(ex){
jsExDebug("applicationManager_close: o1_withRunId",ex);
}
}
try{
var me=this;
if(!arguments[0]){
return;
}
if(typeof arguments[0]=="object"&&arguments[0] instanceof application_t){
o1_withApp(arguments[0]);
this.checkIfExitMessageNeeded();
}else{
o1_withRunId(arguments[0]);
this.checkIfExitMessageNeeded();
}
}
catch(ex){
jsExDebug("applicationManager_close",ex);
}
}
function applicationManager_kill(){
function o1_withApp(app){
try{
if(!app){
return;
}
app._SIG_KILL();
}
catch(ex){
jsExDebug("applicationManager_kill: o1_withApp",ex);
}
}
function o1_withRunId(_2b){
try{
o1_withApp(this.runningApps[_2b]);
}
catch(ex){
jsExDebug("applicationManager_kill: o1_withRunId",ex);
}
}
try{
if(!arguments[0]){
return;
}
if(typeof arguments[0]=="object"&&arguments[0] instanceof application_t){
return o1_withApp.apply(this,arguments);
}
return o1_withRunId.apply(this,arguments);
}
catch(ex){
jsExDebug("applicationManager_kill",ex);
}
}
function applicationManager_launch(_2c){
try{
var _2d=this.get(_2c);
if(_2d){
var _2e=[];
for(var i=1;i<arguments.length;i++){
_2e.push(arguments[i]);
arguments[i]=null;
}
var app=new _2d(_2e);
if(app.cleanUpIndex){
app.showBrowserIncompatibility();
}
return app;
}
}
catch(ex){
jsExDebug("applicationManager_launch",ex);
}
}
function applicationManager_launchWithTooltip(_31,_32,_33){
function timeout(){
try{
this.launch.apply(this,_34);
}
catch(ex){
jsExDebug("applicationManager_launchWithTooltip: timeout",ex);
}
}
try{
var _34=[_31];
for(var i=3;i<arguments.length;i++){
_34.push(arguments[i]);
}
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,timeout),_32,_33);
}
catch(ex){
jsExDebug("applicationManager_launchWithTooltip",ex);
}
}
function applicationManager_setTaskListWidget(_36){
try{
this.taskManager=_36;
}
catch(ex){
jsExDebug("applicationManager_setTaskListWidget",ex);
}
}
function applicationManager_getTaskListWidget(){
try{
return this.taskManager;
}
catch(ex){
jsExDebug("applicationManager_getTaskListWidget",ex);
}
}
function applicationManager_makeRunId(){
try{
var _37=(this.highestRunId?(this.highestRunId^this.RUNID_MASK)+1:0);
var _38=(_37|this.RUNID_MASK);
this.highestRunId=_38;
return _38;
}
catch(ex){
jsExDebug("applicationManager_makeRunId",ex);
}
}
function applicationManager_closeAll(_39,_3a){
function dirtyCheckCallback(){
try{
for(var i=0;i<this.runningApps.length;i++){
if(this.runningApps[i]){
this.kill(this.runningApps[i]);
}
}
SYSTEM.NetworkStatus=new networkApp_t();
SYSTEM.NetworkStatus.hide();
if(_39){
_39.invoke(true);
}
}
catch(ex){
jsExDebug("applicationManager_closeAll: dirtyCheckCallback",ex);
}
}
try{
if(_3a){
dirtyCheckCallback.call(this);
}else{
this.checkForDirtyApps(new this.SYSTEM.Delegate(this,dirtyCheckCallback));
}
}
catch(ex){
jsExDebug("applicationManager_closeAll",ex);
}
}
function applicationManager_checkForDirtyApps(_3c){
try{
var _3d=[];
for(var i=0;i<this.runningApps.length;i++){
var app=this.runningApps[i];
if(app){
if(app.isDirty()&&app.getFileName){
_3d.push({fileName:app.getFileName(),application:app});
}
}
}
if(_3d.length){
var _40=new this.SYSTEM.Dialogue.DirtyAppAlert(null,_3d,_3c);
}else{
_3c.invoke();
}
}
catch(ex){
jsExDebug("applicationManager_checkForDirtyApps",ex);
}
}
function applicationManager_quickLaunch(_41){
function publicFileInfoCallback(id,_43,_44){
try{
if(id&&_43&&_44!=null){
switch(parseInt(_44)){
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
this.launchWithTooltip(APP_ID_SPREADSHEET,"WebSheet","Opening "+_43,id,null,true);
break;
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
this.launchWithTooltip(APP_ID_WRITER,"WebWriter","Opening "+_43,id,null,true);
break;
case this.SYSTEM.Filesystem.File.TYPE_IMAGE:
this.launchWithTooltip(APP_ID_MEDIA_VIEW,"MediaView","Opening "+_43,null,id);
break;
}
}
}
catch(ex){
jsExDebug("applicationManager_quickLaunch: publicFileIdCallback",ex);
}
}
try{
var _45=_41.split(";");
var _46=null;
var _47=null;
var _48=false;
for(var i=0;i<_45.length;i++){
_46=_45[i];
_47=_46.split("=");
switch(_47[0]){
case "f":
var _4a=_47[1].split(",");
var _4b=null;
for(var j=0;j<_4a.length;j++){
_4b=this.SYSTEM.Filesystem.getFileFromFileGuid(_4a[j]);
if(_4b){
switch(parseInt(_4b.fileType)){
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
this.launchWithTooltip(APP_ID_SPREADSHEET,"WebSheet","Opening "+_4b.fileName,_4b.fileId);
_48=true;
break;
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
this.launchWithTooltip(APP_ID_WRITER,"WebWriter","Opening "+_4b.fileName,_4b.fileId);
_48=true;
break;
case this.SYSTEM.Filesystem.File.TYPE_IMAGE:
this.launchWithTooltip(APP_ID_MEDIA_VIEW,"MediaView","Opening "+_4b.fileName,_4b.fileId);
_48=true;
break;
}
}else{
this.SYSTEM.Filesystem.getPublicFileDetailsFromGuid(_4a[j],new this.SYSTEM.Delegate(this,publicFileInfoCallback));
_48=true;
}
}
break;
case "w":
var _4d=_47[1].split(",");
if(_47[1]==this.SYSTEM.Workspaces.BLANK_WORKSPACE_NAME){
_48=true;
continue;
}
for(var j=0;j<_4d.length;j++){
if(this.SYSTEM.Workspaces.workspaceArray.length){
this.SYSTEM.Workspaces.openWorkspace(_4d[j]);
}else{
this.SYSTEM.Workspaces.addQuickLaunchWorkspaceName(_4d[j]);
}
_48=true;
}
break;
case "m":
var _4e=_47[1].split(",");
var x=null;
var y=null;
var _51=null;
var _52=null;
for(var i=0;i<_4e.length;i++){
if(_4e[i].match(/^x:/)){
x=parseInt(_4e[i].split(":")[1]);
}else{
if(_4e[i].match(/^y:/)){
y=parseInt(_4e[i].split(":")[1]);
}else{
if(_4e[i].match(/^z:/)){
_52=parseInt(_4e[i].split(":")[1]);
}else{
if(_4e[i].match(/^s:/)){
_51=_4e[i].split(":")[1];
}
}
}
}
}
if((x!=null)&&(y!=null)){
var _53=new mapCoordinate_t(y,x,mapCoordinate_t.prototype.COORD_MERCATOR);
if(_52){
_53.setZoom(_52);
}
this.launchWithTooltip(APP_ID_MAP,"Webmap","Opening Webmap...",null,null,_53,_51);
_48=true;
}
break;
case "mp":
this.launchWithTooltip(APP_ID_MAP,"Webmap","Opening Webmap...",null,null,null,null,_47[1].split(","));
_48=true;
break;
case "mu":
this.launchWithTooltip(APP_ID_MAP,"Webmap","Opening Webmap...",null,null,null,null,null,_47[1].split(","));
_48=true;
break;
case "muz":
this.launchWithTooltip(APP_ID_MAP,"Webmap","Opening Webmap...",null,null,null,null,null,null,null,_47[1].split(","));
_48=true;
break;
}
}
return _48;
}
catch(ex){
jsExDebug("applicationManager_quickLaunch",ex);
}
}
function applicationManager_registerTaskManagerApp(app){
try{
this.taskManagerApplication=app;
}
catch(ex){
jsExDebug("applicationManager_registerTaskManagerApp",ex);
}
}
function applicationManager_unregisterTaskManagerApp(app){
try{
if(this.taskManagerApplication==app){
this.taskManagerApplication=null;
}
}
catch(ex){
jsExDebug("applicationManager_unregisterTaskManagerApp",ex);
}
}
function applicationManager_getTaskManagerApp(){
try{
return this.taskManagerApplication;
}
catch(ex){
jsExDebug("applicationManager_getTaskManagerApp",ex);
}
}
function applicationManager_getRunningApps(_56){
try{
var _57=[];
for(var _58 in this.runningApps){
if(this.runningApps[_58].APP_ID==_56){
_57.push(this.runningApps[_58]);
}
}
return _57;
}
catch(ex){
jsExDebug("applicationManager_getRunningApps",ex);
}
}
function applicationManager_notifyThemeChange(_59){
function reOpenWorkspace(){
try{
_5a.open(true);
_5a.cleanUp();
_5a=null;
SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("applicationManager_notifyThemeChange: reOpenWorkspace",ex);
}
}
function tooltipTimeout(){
try{
var _5b=getChildNode(document.childNodes[1],"link");
var _5c=_5b[2];
var _5d=_5c.getAttribute("href");
_5c.setAttribute("href",_5d.replace(/(styles\/theme_)(\w+)(.css)/,"$1"+this.SYSTEM.Settings.get("theme_name")+"$3"));
this.SYSTEM.Environment.TabHeight=null;
this.SYSTEM.Desktop.setBackgroundImage(this.SYSTEM.Settings.get("desktop_image"));
if(_5a){
setTimeout(reOpenWorkspace,500);
}
}
catch(ex){
jsExDebug("applicationManager_notifyThemeChange: tooltipTimeout",ex);
}
}
function closeAllCallback(){
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Re-opening your applications...");
}
catch(ex){
jsExDebug("applicationManager_notifyThemeChange: closeAllCallback",ex);
}
}
function dirtyCheckCallback(){
try{
_5a=new workspace_t();
_5a.saveCurrentWorkspace();
this.closeAll(new this.SYSTEM.Delegate(this,closeAllCallback));
}
catch(ex){
jsExDebug("applicationManager_notifyThemeChange: dirtyCheckCallback",ex);
}
}
function dialogueCallback(_5e){
try{
if(_5e){
this.checkForDirtyApps(new this.SYSTEM.Delegate(this,dirtyCheckCallback));
}
}
catch(ex){
jsExDebug("applicationManager_notifyThemeChange: dialogueCallback",ex);
}
}
try{
var _5a=null;
if(_59){
tooltipTimeout.call(this);
}else{
var d=new this.SYSTEM.Dialogue.YesNoAlert(null,"Theme Change","You have changed your theme. To view the theme properly you must close all of your applications and re-open them. Would you like this to be done for you?<br/><br/>If you click 'No', you will need to refresh your page to see the new theme.",new this.SYSTEM.Delegate(this,dialogueCallback),450);
}
}
catch(ex){
jsExDebug("applicationManager_notifyThemeChange",ex);
}
}
function applicationManager_getRunningAppCount(){
try{
var _60=0;
for(var _61 in this.runningApps){
if(this.runningApps[_61]){
_60++;
}
}
return _60;
}
catch(ex){
jsExDebug("applicationManager_getRunningAppCount",ex);
}
}
function applicationManager_checkIfExitMessageNeeded(){
try{
showExitMessage(this.SYSTEM.Settings&&this.SYSTEM.Settings.get("exit_message")&&(this.getRunningAppCount()>1));
}
catch(ex){
jsExDebug("applicationManager_checkIfExitMessageNeeded",ex);
}
}
function applicationManager_calculateHighestRunId(){
try{
var _62=this.RUNID_MASK;
for(var _63 in this.runningApps){
if(_63=="FRAMEWORK_INITIALISED"||_63=="SYSTEM"){
continue;
}
var _64=parseInt(_63)|this.RUNID_MASK;
_62=(_64>_62?_64:_62);
}
this.highestRunId=_62;
}
catch(ex){
jsExDebug("applicationManager_calculateHighestRunId",ex);
}
}

try{
settings_t.prototype=new peepelObject_t();
settings_t.prototype.constructor=settings_t;
settings_t.prototype.cleanUp=settings_cleanUp;
settings_t.prototype.settings_super=peepelObject_t.prototype.constructor;
settings_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
settings_t.prototype.commit=settings_commit;
settings_t.prototype.refresh=settings_refresh;
settings_t.prototype.set=settings_set;
settings_t.prototype.get=settings_get;
settings_t.prototype.applySettings=settings_applySettings;
settings_t.prototype.checkInternalNotificationValidity=settings_checkInternalNotificationValidity;
settings_t.prototype.ACTION_LOAD=1;
settings_t.prototype.ACTION_SAVE=2;
settings_t.prototype.ACTION_SAVE_NOTIFY=3;
settings_t.prototype.LOCALE_AUS=1;
settings_t.prototype.LOCALE_UK=2;
settings_t.prototype.LOCALE_US=3;
settings_t.prototype.LOW_PERFORMANCE=1;
settings_t.prototype.NORMAL_PERFORMANCE=2;
settings_t.prototype.HIGH_PERFORMANCE=3;
settings_t.prototype.OVERVIEW_IF_FITS=1;
settings_t.prototype.OVERVIEW_ALWAYS=2;
settings_t.prototype.OVERVIEW_NEVER=3;
settings_t.prototype.UNDERVIEW_IF_FITS=1;
settings_t.prototype.UNDERVIEW_ALWAYS=2;
settings_t.prototype.UNDERVIEW_NEVER=3;
settings_t.prototype.DBL_CLICK_ZOOM=1;
settings_t.prototype.DBL_CLICK_PAN=2;
settings_t.prototype.DBL_CLICK_INFO=3;
settings_t.prototype.DBL_CLICK_PANZOOM=4;
settings_t.prototype.DBL_CLICK_JUMP=5;
settings_t.prototype.SINGLE_CLICK_NOTHING=1;
settings_t.prototype.SINGLE_CLICK_INFO=2;
settings_t.prototype.DRAG_PAN=1;
settings_t.prototype.DRAG_ZOOM_BOX=2;
settings_t.prototype.NO_DEFAULT_TRACK_STATUS=-1;
settings_t.prototype.DEFAULT_DESKTOP_IMAGE=-1;
settings_t.prototype.NO_DESKTOP_IMAGE=-2;
settings_t.prototype.DEFAULT_DESKTOP_COLOUR="rgb(255,255,255)";
settings_t.prototype.NOTIFICATION_SETTING_PREFIX="notify_";
}
catch(ex){
jsExDebug("settings_t.prototype",ex);
}
function settings_t(_1,_2,_3){
try{
this.settings_super();
this.settings=[];
for(var _4 in _1){
var _5=_1[_4];
var _6=(_5.value!=null?_5.value:_5.defaultValue);
this.settings[_4]={value:_6,dirty:false,defaultValue:_5.defaultValue,applySettingsAfterSet:false,isInteger:(_6===""?false:!isNaN(_6))};
}
this.notificationSettings=[];
var ns=_2;
for(var i=0;i<ns.length;i++){
var _4=this.NOTIFICATION_SETTING_PREFIX+ns[i].notification+"_"+ns[i].type;
this.notificationSettings[_4]={value:ns[i].status,dirty:false};
}
this.notificationNameCheckRegex=new RegExp(this.NOTIFICATION_SETTING_PREFIX);
for(var _9 in _3){
for(var _a in _3[_9]){
var _4=this.NOTIFICATION_SETTING_PREFIX+_9+"_"+_a;
if(!this.notificationSettings[_4]){
this.notificationSettings[_4]={value:_3[_9][_a],dirty:false};
}
}
}
this.settings["exit_message"].applySettingsAfterSet=true;
this.settings["desktop_colour"].applySettingsAfterSet=true;
this.settings["desktop_image"].applySettingsAfterSet=true;
this.settings["desktop_image_stretch"].applySettingsAfterSet=true;
this.settings["map_object_labels"].applySettingsAfterSet=true;
this.settings["map_location_decay"].applySettingsAfterSet=true;
this.settings["theme_name"].applySettingsAfterSet=true;
this.applySettings(true,true);
}
catch(ex){
jsExDebug("settings_t",ex);
}
}
function settings_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var _c in me.settings){
if(me.settings[_c]){
me.settings[_c].value=null;
me.settings[_c].dirty=null;
me.settings[_c].defaultValue=null;
me.settings[_c].applySettingsAfterSet=null;
me.settings[_c].isInteger=null;
me.settings[_c]=null;
}
}
me.settings=null;
for(_c in me.notificationSettings){
me.notificationSettings[_c].value=null;
me.notificationSettings[_c].dirty=null;
me.notificationSettings[_c]=null;
}
me.notificationSettings=null;
me.notificationNameCheckRegex=null;
if(me==SYSTEM.Settings){
SYSTEM.Settings=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("settings_cleanUp",ex);
}
}
function settings_set(_d,_e){
try{
if(_d.match(this.notificationNameCheckRegex)){
if(!this.notificationSettings[_d]){
this.notificationSettings[_d]={};
}
this.notificationSettings[_d].value=_e;
this.notificationSettings[_d].dirty=true;
}else{
if(this.settings[_d]){
if(arguments.length!=2){
_e=this.settings[_d].defaultValue;
}
this.settings[_d].value=_e;
this.settings[_d].dirty=true;
if(this.settings[_d].applySettingsAfterSet){
this.applySettings();
}
}
}
}
catch(ex){
jsExDebug("settings_set",ex);
}
}
function settings_get(_f){
try{
if(_f.match(this.notificationNameCheckRegex)&&this.notificationSettings[_f]){
return this.notificationSettings[_f].value;
}
if(this.settings[_f]){
return this.settings[_f].value;
}else{
return null;
}
}
catch(ex){
jsExDebug("settings_get",ex);
}
}
function settings_commit(_10,_11){
function commitAppResponse(xml,me,_14){
try{
if(getNodeValue(xml,"success")){
if(_10){
_10.invoke();
}
}else{
}
}
catch(ex){
jsExDebug("settings_commit: commitResponse",ex);
}
}
function commitNotificationResponse(xml,me){
try{
if(getNodeValue(xml,"success")){
if(_11){
_11.invoke();
}
}else{
}
}
catch(ex){
jsExDebug("settings_commit: commitNotificationResponse",ex);
}
}
try{
var _17="";
for(var _18 in this.settings){
if(this.settings[_18]&&this.settings[_18].dirty){
_17+="&"+_18+"="+this.settings[_18].value;
this.settings[_18].dirty=false;
}
}
if(_17!=""){
this.SYSTEM.Network.request("peepel_services.php?service=settings&action="+this.ACTION_SAVE,_17,commitAppResponse,this);
}else{
if(_10){
_10.invoke();
}
}
_17="";
for(var _18 in this.notificationSettings){
if(this.notificationSettings[_18]&&this.notificationSettings[_18].dirty){
_17+="&"+_18+"="+this.notificationSettings[_18].value;
this.notificationSettings[_18].dirty=false;
}
}
if(_17!=""){
this.SYSTEM.Network.request("peepel_services.php?service=settings&action="+this.ACTION_SAVE_NOTIFY,_17,commitNotificationResponse,this);
}else{
if(_11){
_11.invoke();
}
}
}
catch(ex){
jsExDebug("settings_commit",ex);
}
}
function settings_refresh(_19){
function response(xml,me){
try{
var _1c=xml.firstChild.childNodes;
for(var i=0;i<_1c.length;i++){
var _1e=_1c[i];
var _1f=_1e.nodeName;
if(_1f.match(me.notificationNameCheckRegex)){
me.notificationSettings[_1f]={value:parseInt(_1e.firstChild.nodeValue),dirty:false};
}else{
if(me.settings[_1f]){
if(me.settings[_1f].isInteger){
me.settings[_1f].value=parseInt(_1e.firstChild.nodeValue);
}else{
var _20=_1e.firstChild.nodeValue;
if(_20){
_20=_20.replace(/^'(.*)'$/,"$1");
}
me.settings[_1f].value=_20;
}
me.settings[_1f].dirty=false;
}
}
}
me.applySettings(true);
if(_19){
_19.invoke();
}
}
catch(ex){
jsExDebug("settings_refresh: response",ex);
}
}
try{
for(var _21 in this.notificationSettings){
this.notificationSettings[_21]=null;
}
this.notificationSettings=[];
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=settings&action="+this.ACTION_LOAD,null,response,this);
}
catch(ex){
jsExDebug("settings_refresh",ex);
}
}
function settings_applySettings(_22,_23){
try{
if(_22||this.settings["exit_message"].dirty){
if(!_23){
showExitMessage(this.settings["exit_message"].value);
}
}
if(_22||this.settings["desktop_image"].dirty||this.settings["desktop_image_stretch"].dirty){
if(this.SYSTEM.Desktop){
this.SYSTEM.Desktop.setBackgroundImage(this.settings["desktop_image"].value);
}
}
if(_22||this.settings["desktop_colour"].dirty){
if(this.SYSTEM.Desktop){
this.SYSTEM.Desktop.setBackgroundColour(this.settings["desktop_colour"].value);
}
}
if(_22||this.settings["map_object_labels"].dirty||this.settings["map_location_decay"].dirty){
var _24=this.SYSTEM.APPLICATION_MANAGER.getRunningApps(APP_ID_MAP);
for(var i=0;i<_24.length;i++){
if(_24[i]&&_24[i].map){
_24[i].map.drawMapObjects();
}
}
}
}
catch(ex){
jsExDebug("settings_applySettings",ex);
}
}
function settings_checkInternalNotificationValidity(_26){
try{
var _27=this.SYSTEM.Notifier.SETTING_TYPE_INTERNAL;
var _28=this.NOTIFICATION_SETTING_PREFIX+_26+"_"+_27;
if(this.notificationSettings&&this.notificationSettings[_28]){
return this.notificationSettings[_28].value;
}else{
return false;
}
}
catch(ex){
jsExDebug("settings_checkInternalNotificationValidity",ex);
}
}

try{
animation_t.prototype=new peepelObject_t();
animation_t.prototype.constructor=animation_t;
animation_t.prototype.cleanUp=animation_cleanUp;
animation_t.prototype.animation_super=peepelObject_t.prototype.constructor;
animation_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
animation_t.prototype.fadeIn=animation_fadeIn;
animation_t.prototype.FADE_IN_INTERVAL=10;
animation_t.prototype.OPACITY_INCREMENT=0.4;
}
catch(ex){
jsExDebug("animation_t.prototype",ex);
}
function animation_t(){
try{
this.animation_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
}
catch(ex){
jsExDebug("animation_t",ex);
}
}
function animation_cleanUp(me){
try{
if(!me){
var me=this;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("animation_cleanUp",ex);
}
}
function animation_fadeIn(_2){
function fade(){
try{
me.opacity+=this.FADEIN_INCREMENT;
_2.style.opacity=me.opacity;
_2.style.filter="alpha(opacity="+(me.opacity*100)+")";
if(me.opacity>=1){
clearInterval(_4);
}
}
catch(ex){
jsExDebug("animation_fadeIn:fade",ex);
}
}
try{
var me=this;
this.opacity=0;
_2.style.opacity="0.0";
_2.style.filter="alpha(opacity=0)";
var _4=setInterval(fade,this.FADE_IN_INTERVAL);
}
catch(ex){
jsExDebug("animation_fadeIn",ex);
}
}

SYSTEM.Symbol={};
SYSTEM.Symbol.Dollar="$";
SYSTEM.Symbol.Euro="\xe2\u201a\xac";
SYSTEM.Symbol.Pound="\xc2\xa3";
SYSTEM.Symbol.Yen="\xc2\xa5";
SYSTEM.Symbol.YuanRenminbi="\u5143";

try{
userDetails_t.prototype=new actionListener_t();
userDetails_t.prototype.constructor=userDetails_t;
userDetails_t.prototype.cleanUp=userDetails_cleanUp;
userDetails_t.prototype.userDetails_super=actionListener_t.prototype.constructor;
userDetails_t.prototype.actionListener_cleanUp=actionListener_t.prototype.cleanUp;
userDetails_t.prototype.updateUsername=userDetails_updateUsername;
userDetails_t.prototype.updateEmailAddress=userDetails_updateEmailAddress;
userDetails_t.prototype.updateFirstName=userDetails_updateFirstName;
userDetails_t.prototype.updateLastName=userDetails_updateLastName;
userDetails_t.prototype.updateMobile=userDetails_updateMobile;
userDetails_t.prototype.updateImei=userDetails_updateImei;
userDetails_t.prototype.updateAvatar=userDetails_updateAvatar;
userDetails_t.prototype.updateDobDay=userDetails_updateDobDay;
userDetails_t.prototype.updateDobMonth=userDetails_updateDobMonth;
userDetails_t.prototype.updateDobYear=userDetails_updateDobYear;
userDetails_t.prototype.updatePassword=userDetails_updatePassword;
userDetails_t.prototype.updateMailingList=userDetails_updateMailingList;
userDetails_t.prototype.updateStatus=userDetails_updateStatus;
userDetails_t.prototype.updateLegalGuardian=userDetails_updateLegalGuardian;
userDetails_t.prototype.updateLegalAgree=userDetails_updateLegalAgree;
userDetails_t.prototype.updatePublicAbout=userDetails_updatePublicAbout;
userDetails_t.prototype.updateSharedAbout=userDetails_updateSharedAbout;
userDetails_t.prototype.hasChanged=userDetails_hasChanged;
userDetails_t.prototype.getAvatarPath=userDetails_getAvatarPath;
userDetails_t.prototype.isEmailVerified=userDetails_isEmailVerified;
userDetails_t.prototype.isEmailPassUser=userDetails_isEmailPassUser;
userDetails_t.prototype.isTempUser=userDetails_isTempUser;
userDetails_t.prototype.isUsingTempEmail=userDetails_isUsingTempEmail;
userDetails_t.prototype.isLegalTrackingAge=userDetails_isLegalTrackingAge;
userDetails_t.prototype.calculateYearsOld=userDetails_calculateYearsOld;
userDetails_t.prototype.getScreenName=userDetails_getScreenName;
userDetails_t.prototype.refresh=userDetails_refresh;
userDetails_t.prototype.commit=userDetails_commit;
userDetails_t.prototype.USERDETAILS_PATH="peepel_services.php?service=userdetails";
userDetails_t.prototype.DOB_DEFAULT_DAY=1;
userDetails_t.prototype.DOB_DEFAULT_MONTH=1;
userDetails_t.prototype.DOB_DEFAULT_YEAR=1900;
userDetails_t.prototype.SIDE_21=26;
userDetails_t.prototype.SIDE_21_DEFAULT_AVATAR="img/app/system/avatars/default_2.png";
userDetails_t.prototype.SIDE_21_REVISION=3;
userDetails_t.prototype.SIDE_32=30;
userDetails_t.prototype.SIDE_32_DEFAULT_AVATAR="img/app/system/avatars/default_1.png";
userDetails_t.prototype.SIDE_32_REVISION=2;
userDetails_t.prototype.SIDE_50=50;
userDetails_t.prototype.SIDE_50_DEFAULT_AVATAR="img/app/system/avatars/default_0.png";
userDetails_t.prototype.SIDE_50_REVISION=1;
userDetails_t.prototype.LEGAL_TRACKING_AGE=13;
userDetails_t.prototype.ACTION_LOAD=1;
userDetails_t.prototype.ACTION_SAVE=2;
}
catch(ex){
jsExDebug("userDetails_t:prototype",ex);
}
function userDetails_t(_1){
try{
this.userDetails_super();
this.id=null;
this.userName="";
this.emailAddress="";
this.firstName="";
this.lastName="";
this.mobile="";
this.imei="";
this.avatar="";
this.dobDay=this.DOB_DEFAULT_DAY;
this.dobMonth=this.DOB_DEFAULT_MONTH;
this.dobYear=this.DOB_DEFAULT_YEAR;
this.status="";
this.addToMailingList=false;
this.legalAgree=false;
this.legalGuardian=false;
this.aboutPublic="";
this.aboutShared="";
this.openIDArray=null;
this.userNameDirty=false;
this.firstNameDirty=false;
this.lastNameDirty=false;
this.mobileDirty=false;
this.imeiDirty=false;
this.avatarDirty=false;
this.dobDayDirty=false;
this.dobMonthDirty=false;
this.dobYearDirty=false;
this.newPasswordDirty=false;
this.statusDirty=false;
this.addToMailingListDirty=false;
this.legalGuardianDirty=false;
this.legalAgreeDirty=false;
this.aboutPublicDirty=false;
this.aboutSharedDirty=false;
this.initialised=false;
this.refresh(_1);
}
catch(ex){
jsExDebug("userDetails_t",ex);
}
}
function userDetails_cleanUp(me){
try{
if(!me){
me=this;
}
me.id=null;
me.userName=null;
me.emailAddress=null;
me.firstName=null;
me.lastName=null;
me.mobile=null;
me.imei=null;
me.avatar=null;
me.dobDay=null;
me.dobMonth=null;
me.dobYear=null;
me.status=null;
me.statusText=null;
me.addToMailingList=null;
me.legalGuardian=null;
me.legalAgree=null;
me.aboutPublic=null;
me.aboutShared=null;
me.openIDArray=null;
me.firstNameDirty=null;
me.lastNameDirty=null;
me.mobileDirty=null;
me.imeiDirty=null;
me.avatarDirty=null;
me.dobDayDirty=null;
me.dobMonthDirty=null;
me.dobYearDirty=null;
me.newPasswordDirty=null;
me.statusDirty=null;
me.addToMailingListDirty=null;
me.legalGuardianDirty=null;
me.legalAgreeDirty=null;
me.aboutPublicDirty=null;
me.aboutSharedDirty=null;
me.yearsOld=null;
me.initialised=null;
if(SYSTEM.UserDetails){
SYSTEM.UserDetails=null;
}
me.actionListener_cleanUp();
}
catch(ex){
jsExDebug("userDetails_cleanUp",ex);
}
}
function userDetails_hasChanged(){
try{
return this.firstNameDirty||this.lastNameDirty||this.mobileDirty||this.imeiDirty||this.avatarDirty||this.dobDayDirty||this.dobMonthDirty||this.dobYearDirty||this.newPasswordDirty||this.addToMailingListDirty||this.legalGuardianDirty||this.legalAgreeDirty||this.aboutPublicDirty||this.aboutSharedDirty;
}
catch(ex){
jsExDebug("userDetails_hasChanged",ex);
}
}
function userDetails_getAvatarPath(_3){
try{
var _4=this.SYSTEM.Icon.Avatar[this.avatar];
var _5=this.SYSTEM.Filesystem.getFileFromFileId(this.avatar);
var _6=this.SYSTEM.Environment.USER_DATA_PATH+"revision/";
switch(_3){
case this.SIDE_21:
if(_5){
return _6+_5.location+"/"+_5.fileGuid+"_"+this.SIDE_21_REVISION+".s";
}else{
if(_4){
return _4+"_"+this.SIDE_21_REVISION+".png";
}else{
return this.SIDE_21_DEFAULT_AVATAR;
}
}
case this.SIDE_32:
if(_5){
return _6+_5.location+"/"+_5.fileGuid+"_"+this.SIDE_32_REVISION+".s";
}else{
if(_4){
return _4+"_"+this.SIDE_32_REVISION+".png";
}else{
return this.SIDE_32_DEFAULT_AVATAR;
}
}
case this.SIDE_50:
if(_5){
return _6+_5.location+"/"+_5.fileGuid+"_"+this.SIDE_50_REVISION+".s";
}else{
if(_4){
return _4+"_"+this.SIDE_50_REVISION+".png";
}else{
return this.SIDE_50_DEFAULT_AVATAR;
}
}
}
}
catch(ex){
jsExDebug("userDetails_getAvatarPath",ex);
}
}
function userDetails_isEmailVerified(){
try{
return (this.status&this.SYSTEM.Security.EMAIL_USER_MASK);
}
catch(ex){
jsExDebug("userDetails_isEmailVerified",ex);
}
}
function userDetails_isEmailPassUser(){
try{
return (this.status&this.SYSTEM.Security.EMAILPASS_USER_MASK);
}
catch(ex){
jsExDebug("userDetails_isEmailPassUser",ex);
}
}
function userDetails_isTempUser(){
try{
var _7=this.SYSTEM.Security;
return ((this.status&_7.TEMP_USER_MASK)&&!(this.status&_7.EMAIL_USER_MASK)&&!(this.status&_7.EMAILPASS_USER_MASK)&&!(this.status&_7.OPENID_USER_MASK));
}
catch(ex){
jsExDebug("userDetails_isTempUser",ex);
}
}
function userDetails_isUsingTempEmail(){
try{
if(this.emailAddress=="PeepelPerson"+this.id+"@peepel.com"){
return true;
}
}
catch(ex){
jsExDebug("userDetails_isUsingTempEmail",ex);
}
}
function userDetails_isLegalTrackingAge(){
try{
return (this.yearsOld>this.LEGAL_TRACKING_AGE)||this.legalGuardian;
}
catch(ex){
jsExDebug("userDetails_isLegalTrackingAge",ex);
}
}
function userDetails_updateEmailAddress(_8){
try{
this.emailAddress=_8;
}
catch(ex){
jsExDebug("userDetails_updateEmail",ex);
}
}
function userDetails_updateUsername(_9){
try{
this.userName=unescape(secureStringForRequest(_9));
this.userNameDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateUsername",ex);
}
}
function userDetails_updateFirstName(_a){
try{
this.firstName=unescape(secureStringForRequest(_a));
this.firstNameDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateFirstName",ex);
}
}
function userDetails_updateLastName(_b){
try{
this.lastName=unescape(secureStringForRequest(_b));
this.lastNameDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateLastName",ex);
}
}
function userDetails_updateMobile(_c){
try{
this.mobile=unescape(secureStringForRequest(_c));
this.mobileDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateMobile",ex);
}
}
function userDetails_updateImei(_d){
try{
this.imei=_d;
this.imeiDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateImei",ex);
}
}
function userDetails_updateAvatar(_e){
try{
this.avatar=_e;
this.avatarDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateAvatar",ex);
}
}
function userDetails_updateDobDay(_f){
try{
this.dobDay=_f;
this.dobDayDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateDobDay",ex);
}
}
function userDetails_updateDobMonth(_10){
try{
this.dobMonth=_10;
this.dobMonthDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateDobMonth",ex);
}
}
function userDetails_updateDobYear(_11){
try{
this.dobYear=_11;
this.dobYearDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateDobYear",ex);
}
}
function userDetails_updatePassword(_12,_13){
try{
this.oldPassword=_12;
this.newPassword=_13;
this.newPasswordDirty=true;
}
catch(ex){
jsExDebug("userDetails_updatePassword");
}
}
function userDetails_updateMailingList(_14){
try{
this.addToMailingList=_14;
this.addToMailingListDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateMailingList",ex);
}
}
function userDetails_updateStatus(_15){
try{
this.status=parseInt(_15);
this.statusText="";
var _16=this.status&security_t.prototype.EMAILPASS_USER_MASK;
var _17=this.status&security_t.prototype.EMAIL_USER_MASK;
var _18=this.status&security_t.prototype.OPENID_USER_MASK;
if(_16||_18){
if(_17){
this.statusText+="Email verified";
}else{
this.statusText+="Email unverified";
this.SYSTEM.Contacts.clearArrays(true);
this.SYSTEM.Tracking.reset();
this.SYSTEM.Contacts.refresh();
}
_18=_18&&this.openIDArray.length;
if(_16&&_18){
this.statusText+=", Login with email & password or OpenID";
}else{
if(_16){
this.statusText+=", Login with email & password";
}else{
if(_18){
this.statusText+=", Login with OpenID";
}else{
this.statusText+=", Unable to login";
}
}
}
}else{
this.statusText="Temporary user";
}
}
catch(ex){
jsExDebug("userDetails_updateStatus",ex);
}
}
function userDetails_updateLegalGuardian(_19){
try{
this.legalGuardian=_19;
this.legalGuardianDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateLegalGuardian",ex);
}
}
function userDetails_updateLegalAgree(_1a){
try{
return;
this.legalAgree=_1a;
this.legalAgreeDirty=true;
}
catch(ex){
jsExDebug("userDetails_updateLegalAgree",ex);
}
}
function userDetails_updatePublicAbout(_1b){
try{
if(_1b&&_1b.length&&_1b.length<=MAX_ABOUT_LENGTH){
this.aboutPublic=_1b;
this.aboutPublicDirty=true;
}
}
catch(ex){
jsExDebug("userDetails_updatePublicAbout",ex);
}
}
function userDetails_updateSharedAbout(_1c){
try{
if(_1c&&_1c.length&&_1c.length<=MAX_ABOUT_LENGTH){
this.aboutShared=_1c;
this.aboutSharedDirty=true;
}
}
catch(ex){
jsExDebug("userDetails_updateSharedAbout",ex);
}
}
function userDetails_calculateYearsOld(){
try{
var dob=new Date();
dob.setDate(this.dobDay);
dob.setMonth(this.dobMonth);
dob.setFullYear(this.dobYear);
var ms=new Date().getTime()-dob.getTime();
this.yearsOld=ms/(1000*60*60*24*365);
}
catch(ex){
jsExDebug("userDetails_calculateYearsOld",ex);
}
}
function userDetails_getScreenName(){
try{
if(this.isTempUser()){
return "Guest";
}else{
return this.userName;
}
}
catch(ex){
jsExDebug("userDetails_getScreenName",ex);
}
}
function userDetails_refresh(_1f){
function refreshHandler(_20,me){
try{
if(!_20||!_20.firstChild){
return;
}
var _22=getChildNode(_20,"userdetails",0);
me.id=parseInt(getNodeValue(_22,"id"));
me.userName=URLDecode(getNodeValue(_22,"username"));
me.emailAddress=URLDecode(getNodeValue(_22,"email"));
me.firstName=URLDecode(getNodeValue(_22,"firstname"));
me.lastName=URLDecode(getNodeValue(_22,"lastname"));
me.mobile=getNodeValue(_22,"mobile");
me.imei=getNodeValue(_22,"imei");
me.avatar=getNodeValue(_22,"avatar");
me.legalGuardian=getNodeValue(_22,"guardian");
me.legalGuardian=(me.legalGuardian=="t"?true:false);
me.legalAgree=getNodeValue(_22,"legalagree");
me.legalAgree=(me.legalAgree=="t"?true:false);
me.aboutPublic=getNodeValue(_22,"aboutpub");
me.aboutShared=getNodeValue(_22,"aboutshared");
var _23=getNodeValue(_22,"openid");
me.openIDArray=(_23?_23.split(","):[]);
var _24=null;
if(_24=getNodeValue(_22,"birthday").toString().match(/^([0-9]{4})\-([0-9]{1,2})\-([0-9]{1,2})/)){
_24[2]=_24[2].replace(/^(0)/,"");
_24[3]=_24[3].replace(/^(0)/,"");
me.dobDay=parseInt(_24[3]);
me.dobMonth=parseInt(_24[2]);
me.dobYear=parseInt(_24[1]);
}else{
me.dobDay=null;
me.dobMonth=null;
me.dobYear=null;
}
me.calculateYearsOld();
me.updateStatus(parseInt(getNodeValue(_22,"status")));
me.addToMailingList=parseInt(getNodeValue(_22,"maillist"));
me.initialised=true;
me.userNameDirty=false;
me.firstNameDirty=false;
me.lastNameDirty=false;
me.mobileDirty=false;
me.imeiDirty=false;
me.avatarDirty=false;
me.dobDayDirty=false;
me.dobMonthDirty=false;
me.dobYearDirty=false;
me.addToMailingListDirty=false;
me.legalGuardianDirty=false;
me.legalAgreeDirty=false;
if(_1f){
_1f.invoke(true);
}
me.invokeActionListeners(me.ACTION_LOAD);
}
catch(ex){
jsExDebug("userDetails_refresh: refreshHandler",ex);
}
}
try{
this.SYSTEM.Network.request(this.USERDETAILS_PATH+"&action="+this.ACTION_LOAD,null,refreshHandler,this);
}
catch(ex){
jsExDebug("userDetails_refresh",ex);
}
}
function userDetails_commit(_25,_26){
function userDetails_commitHandler(_27,me){
try{
var _29;
var _2a;
var _2b;
var _2c=false;
var _2d=false;
if(!_27){
}
if(!_27.firstChild){
}
_29=_27.firstChild;
if((_29.nodeName=="user")&&(_29.hasChildNodes())){
_2b=_29.firstChild;
if(_2b.nodeName=="success"){
me.userNameDirty=_2d;
me.firstNameDirty=_2d;
me.lastNameDirty=_2d;
me.mobileDirty=_2d;
me.imeiDirty=_2d;
me.avatarDirty=_2d;
me.dobDayDirty=_2d;
me.dobMonthDirty=_2d;
me.dobYearDirty=_2d;
me.newPasswordDirty=_2d;
me.addToMailingListDirty=_2d;
me.legalGuardianDirty=_2d;
me.legalAgreeDirty=_2d;
me.aboutPublicDirty=_2d;
me.aboutSharedDirty=_2d;
_2c=true;
}else{
_2c=false;
}
}
me.calculateYearsOld();
me.invokeActionListeners(me.ACTION_SAVE);
if(_26){
if(_25){
me.refresh(_25);
}
}else{
if(_25){
_25.invoke(_2c);
}
}
}
catch(ex){
jsExDebug("userDetails_commitHandler",ex);
}
}
try{
var _2e="";
var _2f=false;
if(this.userNameDirty){
_2e+="&username="+this.userName.toString();
_2f|=true;
}
if(this.firstNameDirty){
_2e+="&firstname="+secureStringForRequest(this.firstName.toString());
_2f|=true;
}
if(this.lastNameDirty){
_2e+="&lastname="+secureStringForRequest(this.lastName.toString());
_2f|=true;
}
if(this.mobileDirty){
_2e+="&mobile="+(this.mobile?this.mobile.toString():"");
_2f|=true;
}
if(this.imeiDirty){
_2e+="&imei="+this.imei.toString();
_2f|=true;
}
if(this.avatarDirty){
_2e+="&avatar="+this.avatar.toString();
_2f|=true;
}
if(this.dobDayDirty){
_2e+="&dob_day="+this.dobDay.toString();
_2f|=true;
}
if(this.dobMonthDirty){
_2e+="&dob_month="+this.dobMonth.toString();
_2f|=true;
}
if(this.dobYearDirty){
_2e+="&dob_year="+this.dobYear.toString();
_2f|=true;
}
if(this.addToMailingListDirty){
_2e+="&ml="+(this.addToMailingList?"1":"0");
_2f|=true;
}
if(this.legalGuardianDirty){
_2e+="&lg="+(this.legalGuardian?"1":"0");
_2f|=true;
}
if(this.legalAgreeDirty){
_2e+="&la="+(this.legalAgree?"1":"0");
_2f|=true;
}
if(this.aboutPublicDirty){
_2e+="&aboutpub="+(this.aboutPublic?this.aboutPublic:"");
_2f|=true;
}
if(this.aboutSharedDirty){
_2e+="&aboutshared="+(this.aboutShared?this.aboutShared:"");
_2f|=true;
}
if(_2f){
this.SYSTEM.Network.request(this.USERDETAILS_PATH+"&action="+this.ACTION_SAVE,_2e,userDetails_commitHandler,this);
}else{
_25.invoke(true);
}
}
catch(ex){
jsExDebug("userDetails_commit",ex);
}
}

var TOOLTIP_TIMER=650;
var TOOLTIP_MIN_WIDTH=250;
var TOOLTIP_MIN_HEIGHT=90;
var TOOLTIP_MAX_WIDTH=300;
var TOOLTIP_MAX_HEIGHT=200;
var TOOLTIP_MED_HEIGHT=140;
var TOOLTIP_TR_IMG="url('img/app/panel/common/tooltips/tr.png')";
var TOOLTIP_RR_IMG="url('img/app/panel/common/tooltips/rr.png')";
var TOOLTIP_HELP_IMG="img/app/panel/common/tooltips/help.png";
var TOOLTIP_BR_IMG="url('img/app/panel/common/tooltips/br.png')";
var TOOLTIP_BL_IMG="url('img/app/panel/common/tooltips/bl.png')";
var TOOLTIP_BB_IMG="url('img/app/panel/common/tooltips/bb.png')";
var globalTooltipElement=null;
var globalTooltipShadowDivTR=null;
var globalTooltipShadowDivRR=null;
var globalTooltipShadowDivBL=null;
var globalTooltipShadowDivBB=null;
var globalTooltipShadowDivBR=null;
var globalTooltipFlower=null;
var tooltipVisible=null;
function createTooltip(_1,_2,_3,_4,_5,_6,_7,_8){
try{
if(SYSTEM.loadingVisible){
return;
}
if(!globalTooltipElement){
globalTooltipShadowDivTR=document.createElement("div");
globalTooltipShadowDivTR.style.zIndex=TOOLTIP_ZINDEX;
globalTooltipShadowDivTR.style.position="absolute";
globalTooltipShadowDivTR.style.height="5px";
globalTooltipShadowDivTR.style.width="5px";
globalTooltipShadowDivTR.style.backgroundImage=TOOLTIP_TR_IMG;
globalTooltipShadowDivTR.style.backgroundRepeat="no-repeat";
document.body.appendChild(globalTooltipShadowDivTR);
globalTooltipShadowDivRR=document.createElement("div");
globalTooltipShadowDivRR.style.zIndex=TOOLTIP_ZINDEX;
globalTooltipShadowDivRR.style.position="absolute";
globalTooltipShadowDivRR.style.backgroundImage=TOOLTIP_RR_IMG;
globalTooltipShadowDivRR.style.width="5px";
document.body.appendChild(globalTooltipShadowDivRR);
globalTooltipShadowDivBL=document.createElement("div");
globalTooltipShadowDivBL.style.zIndex=TOOLTIP_ZINDEX;
globalTooltipShadowDivBL.style.position="absolute";
globalTooltipShadowDivBL.style.backgroundImage=TOOLTIP_BL_IMG;
globalTooltipShadowDivBL.style.backgroundRepeat="no-repeat";
globalTooltipShadowDivBL.style.height="5px";
globalTooltipShadowDivBL.style.width="5px";
document.body.appendChild(globalTooltipShadowDivBL);
globalTooltipShadowDivBB=document.createElement("div");
globalTooltipShadowDivBB.style.zIndex=TOOLTIP_ZINDEX;
globalTooltipShadowDivBB.style.position="absolute";
globalTooltipShadowDivBB.style.backgroundImage=TOOLTIP_BB_IMG;
globalTooltipShadowDivBB.style.backgroundRepeat="repeat-x";
globalTooltipShadowDivBB.style.height="5px";
document.body.appendChild(globalTooltipShadowDivBB);
globalTooltipShadowDivBR=document.createElement("div");
globalTooltipShadowDivBR.style.zIndex=TOOLTIP_ZINDEX;
globalTooltipShadowDivBR.style.position="absolute";
globalTooltipShadowDivBR.style.backgroundImage=TOOLTIP_BR_IMG;
globalTooltipShadowDivBR.style.backgroundRepeat="no-repeat";
globalTooltipShadowDivBR.style.height="10px";
globalTooltipShadowDivBR.style.width="10px";
document.body.appendChild(globalTooltipShadowDivBR);
globalTooltipElement=document.createElement("div");
globalTooltipElement.style.zIndex=TOOLTIP_ZINDEX+1;
globalTooltipElement.className="ToolTip";
globalTooltipElement.style.position="absolute";
globalTooltipElement.style.background="transparent";
var _9=document.createElement("b");
_9.className="b1t";
globalTooltipElement.appendChild(_9);
var _a=document.createElement("b");
_a.className="b2t";
globalTooltipElement.appendChild(_a);
var _b=document.createElement("b");
_b.className="b3t";
globalTooltipElement.appendChild(_b);
var _c=document.createElement("b");
_c.className="b3t";
globalTooltipElement.appendChild(_c);
var _d=document.createElement("b");
_d.className="b3t";
globalTooltipElement.appendChild(_d);
globalTooltipContentDiv=document.createElement("div");
globalTooltipContentDiv.className="boxcontent";
globalTooltipContentDiv.style.overflow="hidden";
globalTooltipElement.appendChild(globalTooltipContentDiv);
var _e=document.createElement("b");
_e.className="b3b";
globalTooltipElement.appendChild(_e);
var _f=document.createElement("b");
_f.className="b3b";
globalTooltipElement.appendChild(_f);
var _10=document.createElement("b");
_10.className="b2b";
globalTooltipElement.appendChild(_10);
var _11=document.createElement("b");
_11.className="b2b";
globalTooltipElement.appendChild(_11);
var b1b=document.createElement("b");
b1b.className="b1b";
globalTooltipElement.appendChild(b1b);
globalTooltipFlower=SYSTEM.Dom.createImage("img/site/ajax-loader.gif","absolute",24,24,null,15);
globalTooltipFlower.style.right="10px";
globalTooltipFlower.style.display="none";
globalTooltipElement.appendChild(globalTooltipFlower);
document.body.appendChild(globalTooltipElement);
}
if(!_3){
_3=TOOLTIP_MIN_WIDTH;
}else{
if(_3>this.TOOLTIP_MAX_WIDTH){
_3=TOOLTIP_MAX_WIDTH;
}
}
if(!_4){
_4=TOOLTIP_MIN_HEIGHT;
}else{
if(_4>TOOLTIP_MAX_HEIGHT){
_4=TOOLTIP_MAX_HEIGHT;
}
}
var _13;
var _14;
if(!_7&&((_5+_3)>SYSTEM.Environment.SCREEN_WIDTH)){
_13=_5-_3;
if(_13>=0){
_5=_13;
}
}
if(!_8&&((_6+_4)>SYSTEM.Environment.SCREEN_HEIGHT)){
_14=_6-_4;
if(_14>=0){
_6=_14;
}
}
if(_7){
globalTooltipElement.style.right=_5+"px";
}else{
globalTooltipElement.style.left=_5+"px";
}
if(_8){
globalTooltipElement.style.bottom=_6+"px";
}else{
globalTooltipElement.style.top=_6+"px";
}
globalTooltipShadowDivTR.style.top=(_6+5)+"px";
globalTooltipShadowDivTR.style.left=(_5+_3)+"px";
globalTooltipShadowDivRR.style.top=(_6+10)+"px";
globalTooltipShadowDivRR.style.left=(_5+_3)+"px";
globalTooltipShadowDivRR.style.height=(_4-15)+"px";
globalTooltipShadowDivBL.style.top=(_6+_4)+"px";
globalTooltipShadowDivBL.style.left=(_5+5)+"px";
globalTooltipShadowDivBB.style.top=(_6+_4)+"px";
globalTooltipShadowDivBB.style.left=(_5+10)+"px";
globalTooltipShadowDivBB.style.width=(_3-15)+"px";
globalTooltipShadowDivBR.style.top=(_6+_4-5)+"px";
globalTooltipShadowDivBR.style.left=(_5+_3-5)+"px";
globalTooltipElement.style.width=_3+"px";
globalTooltipElement.style.height=_4+"px";
globalTooltipContentDiv.style.height=(_4-35)+"px";
if(_1==null){
globalTooltipContentDiv.innerHTML="<p>"+(_2?_2:"")+"</p>";
}else{
globalTooltipContentDiv.innerHTML="<h1>"+_1+"</h1><p>"+(_2?_2:"")+"</p>";
}
if(!tooltipVisible){
tooltipVisible=true;
globalTooltipElement.style.visibility="visible";
globalTooltipShadowDivTR.style.visibility="visible";
globalTooltipShadowDivRR.style.visibility="visible";
globalTooltipShadowDivBL.style.visibility="visible";
globalTooltipShadowDivBB.style.visibility="visible";
globalTooltipShadowDivBR.style.visibility="visible";
}
}
catch(ex){
jsExDebug("createTooltip",ex);
}
}
function forceHideLoading(){
try{
if(globalTooltipElement!=null&&tooltipVisible==true){
tooltipVisible=false;
globalTooltipElement.style.visibility="hidden";
globalTooltipShadowDivTR.style.visibility="hidden";
globalTooltipShadowDivRR.style.visibility="hidden";
globalTooltipShadowDivBL.style.visibility="hidden";
globalTooltipShadowDivBB.style.visibility="hidden";
globalTooltipShadowDivBR.style.visibility="hidden";
}
}
catch(ex){
jsExDebug("forceHideLoading",ex);
}
}
function hideTooltip(){
try{
if(globalTooltipElement!=null&&tooltipVisible==true&&!SYSTEM.loadingVisible){
tooltipVisible=false;
globalTooltipElement.style.visibility="hidden";
globalTooltipShadowDivTR.style.visibility="hidden";
globalTooltipShadowDivRR.style.visibility="hidden";
globalTooltipShadowDivBL.style.visibility="hidden";
globalTooltipShadowDivBB.style.visibility="hidden";
globalTooltipShadowDivBR.style.visibility="hidden";
}
}
catch(ex){
jsExDebug("hideTooltip",ex);
}
}
function showLoading(_15,_16,_17,_18,_19){
function timeoutFunction(){
try{
_15.invoke();
_15.cleanUp();
}
catch(ex){
jsExDebug("showLoading: timeoutFunction",ex);
}
}
try{
var _1a=false;
if(SYSTEM.Network&&SYSTEM.Network.networkStatus==SYSTEM.Network.ONLINE){
_1a=true;
}else{
if(!SYSTEM.Network){
_1a=true;
}
}
if(_1a){
_18=(_18?_18:TOOLTIP_MIN_WIDTH);
_19=(_19?_19:TOOLTIP_MIN_HEIGHT);
var x=(SYSTEM.Environment.SCREEN_WIDTH/2)-(_18/2)+document.documentElement.scrollLeft;
var y=(SYSTEM.Environment.SCREEN_HEIGHT/2)-(_19/2)+document.documentElement.scrollTop;
createTooltip(_16,_17,_18,_19,x,y);
globalTooltipFlower.style.display="block";
SYSTEM.loadingVisible=true;
}
if(_15){
if(_15.isDelegate){
setTimeout(timeoutFunction,50);
}else{
setTimeout(_15,50);
}
}
}
catch(ex){
jsExDebug("showLoading",ex);
}
}
function hideLoading(){
try{
if(SYSTEM.loadingVisible){
SYSTEM.loadingVisible=false;
globalTooltipFlower.style.display="none";
hideTooltip();
}
}
catch(ex){
jsExDebug("hideLoading",ex);
}
}

try{
desktop_t.prototype=new peepelObject_t();
desktop_t.prototype.constructor=desktop_t;
desktop_t.prototype.cleanUp=desktop_cleanUp;
desktop_t.prototype.desktop_super=peepelObject_t.prototype.constructor;
desktop_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
desktop_t.prototype.setBackgroundImage=desktop_setBackgroundImage;
desktop_t.prototype.setBackgroundColour=desktop_setBackgroundColour;
desktop_t.prototype.windowResizeEvent=desktop_windowResizeEvent;
desktop_t.prototype.DEFAULT_BG_IMAGE="img/app/system/default_bg.png";
desktop_t.prototype.DEFAULT_BG_WIDTH=800;
desktop_t.prototype.DEFAULT_BG_HEIGHT=600;
desktop_t.prototype.BG_IMAGE_REVISION=0;
}
catch(ex){
jsExDebug("desktop_t.prototype",ex);
}
function desktop_t(){
try{
this.desktop_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
var _1=this.SYSTEM.Dom.createElement("div","absolute",this.SYSTEM.Environment.SCREEN_WIDTH,this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight(),0,this.SYSTEM.Panel.getHeight());
_1.style.backgroundRepeat="no-repeat";
_1.style.backgroundPosition="50% 50%";
var _2=this.SYSTEM.Dom.createImage(null,"absolute");
_2.style.width="100%";
_2.style.height="100%";
_1.appendChild(_2);
document.body.appendChild(_1);
this.backgroundDiv=_1;
this.image=_2;
this.width=this.SYSTEM.Environment.SCREEN_WIDTH;
this.height=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
this.backgroundLeftPercentage=null;
this.backgroundTopPercentage=null;
this.windowResizeIndex=this.SYSTEM.Event.notifyWindowResize(new this.SYSTEM.Delegate(this,this.windowResizeEvent));
this.setBackgroundColour(this.SYSTEM.Settings.get("desktop_colour"));
this.setBackgroundImage(this.SYSTEM.Settings.get("desktop_image"));
}
catch(ex){
jsExDebug("desktop_t",ex);
}
}
function desktop_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.removeWindowResizeHandler(me.windowResizeIndex);
me.windowResizeIndex=null;
me.width=null;
me.height=null;
me.SYSTEM.Dom.freeDom(me.backgroundDiv);
me.backgroundDiv=null;
me.backgroundLeftPercentage=null;
me.backgroundTopPercentage=null;
me.image=null;
me.SYSTEM.Desktop=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("desktop_cleanUp",ex);
}
}
function desktop_windowResizeEvent(_4,_5){
try{
this.width=_4;
this.height=_5-this.SYSTEM.Panel.getHeight();
var _6=this.SYSTEM.Panel.getHeight();
this.backgroundDiv.style.width=_4+"px";
this.backgroundDiv.style.height=(_5-_6)+"px";
this.backgroundDiv.style.top=_6+"px";
}
catch(ex){
jsExDebug("desktop_windowResizeEvent",ex);
}
}
function desktop_setBackgroundImage(_7){
try{
var _8=null;
var _9=false;
if(_7==this.SYSTEM.Settings.DEFAULT_DESKTOP_IMAGE){
_9=true;
}else{
if(_7==this.SYSTEM.Settings.NO_DESKTOP_IMAGE){
this.image.style.visibility="hidden";
this.backgroundDiv.style.backgroundImage="";
this.backgroundDiv.setAttribute("id","");
return;
}else{
if(_7){
var _a=this.SYSTEM.Filesystem.getFileFromFileId(_7);
if(!_a){
return;
}
_8=this.SYSTEM.Environment.USER_DATA_PATH+"revision/"+_a.location+"/"+_a.fileGuid+"_"+this.BG_IMAGE_REVISION+".s";
}
}
}
if(_9){
this.backgroundDiv.style.backgroundImage="";
this.backgroundDiv.style.backgroundRepeat="";
this.backgroundDiv.setAttribute("id","desktop_background");
_8=this.SYSTEM.Dom.getCurrentStyle(this.backgroundDiv).backgroundImage;
_8=_8.substr(4);
_8=_8.split(")")[0];
if(this.SYSTEM.Settings.get("desktop_image_stretch")){
this.image.src=_8;
this.image.style.visibility="visible";
this.backgroundDiv.style.backgroundImage="";
this.backgroundDiv.setAttribute("id","");
}else{
this.image.style.visibility="hidden";
}
}else{
this.backgroundDiv.style.backgroundRepeat="no-repeat";
if(this.SYSTEM.Settings.get("desktop_image_stretch")){
this.image.src=_8;
this.image.style.visibility="visible";
this.backgroundDiv.style.backgroundImage="";
this.backgroundDiv.setAttribute("id","");
}else{
this.backgroundDiv.setAttribute("id","");
this.backgroundDiv.style.backgroundImage="url('"+_8+"')";
this.image.style.visibility="hidden";
}
}
}
catch(ex){
jsExDebug("desktop_setBackgroundImage",ex);
}
}
function desktop_setBackgroundColour(_b){
try{
document.body.style.backgroundColor=_b;
}
catch(ex){
jsExDebug("desktop_setBackgroundColour",ex);
}
}

function setup(){
try{
}
catch(ex){
jsExDebug("setup",ex);
}
}
function resetSYSTEMAfterUserChange(_1){
var _2=4;
var _3=new this.SYSTEM.Delegate(null,response);
function contactsResponse(){
try{
var _4=SYSTEM.Contacts.getAcceptedContacts();
for(var i=0;i<_4.length;i++){
SYSTEM.Tracking.addUser(_4[i].userId);
}
response();
}
catch(ex){
jsExDebug("resetSYSTEMAfterUserChange: contactsResponse",ex);
}
}
function filesystemResponse(){
try{
SYSTEM.Settings.refresh(_3);
response();
}
catch(ex){
jsExDebug("resetSYSTEMAfterUserChange: filesystemResponse",ex);
}
}
function response(){
_2--;
if(!_2){
this.SYSTEM.APPLICATION_MANAGER.notifyThemeChange(true);
global_processQuickLaunchString();
var _6=true;
if(SYSTEM.Settings.get("default_workspace")){
var _7=new workspace_t();
_7.fromContentString(SYSTEM.Settings.get("default_workspace"));
if(_7.getAppCount()){
_6=false;
}
_7.open();
}
if(_6&&!SYSTEM.Launcher.cancelAutoOpen){
SYSTEM.Launcher.openMenu();
}
SYSTEM.Tooltip.hideLoading();
if(_1){
_1.invoke();
}
}
}
function userDetailsRefreshCallback(){
try{
SYSTEM.Security.userId=SYSTEM.UserDetails.id;
SYSTEM.ApiRegistry.resetAfterUserChange();
SYSTEM.Contacts.refresh(new SYSTEM.Delegate(null,contactsResponse));
SYSTEM.Filesystem.refresh(filesystemResponse);
SYSTEM.PeepelPoints.refresh();
SYSTEM.Workspaces.refresh(response);
}
catch(ex){
jsExDebug("resetSYSTEMAfterUserChange: userDetailsRefreshCallback",ex);
}
}
function tooltipTimeout(){
try{
SYSTEM.Tracking.reset();
SYSTEM.UserDetails.refresh(new SYSTEM.Delegate(null,userDetailsRefreshCallback));
SYSTEM.Notifier.processedNotificationMaxId=0;
}
catch(ex){
jsExDebug("resetSYSTEMAfterUserChange: tooltipTimeout",ex);
}
}
function closeAllCallback(){
try{
SYSTEM.Tooltip.showLoading(new SYSTEM.Delegate(null,tooltipTimeout),"Peepel","Changing logged in user...");
}
catch(ex){
jsExDebug("resetSYSTEMAfterUserChange: closeAllCallback",ex);
}
}
try{
SYSTEM.APPLICATION_MANAGER.closeAll(new this.SYSTEM.Delegate(null,closeAllCallback));
}
catch(ex){
jsExDebug("resetSYSTEMAfterUserChange",ex);
}
}
function resetSYSTEMAfterAccountUpgrade(_8){
function userDetailsRefreshCallback(){
try{
if(_8){
_8.invoke();
}
}
catch(ex){
jsExDebug("resetSYSTEMAfterAccountUpgrade: userDetailsRefreshCallback",ex);
}
}
try{
SYSTEM.UserDetails.refresh(new this.SYSTEM.Delegate(null,userDetailsRefreshCallback));
}
catch(ex){
jsExDebug("resetSYSTEMAfterAccountUpgrade",ex);
}
}
function showExitMessage(_9){
window.onbeforeunload=(_9&&(SYSTEM.APPLICATION_MANAGER.getRunningAppCount()>0)?confirmNavigateAway:SYSTEM.Network.onBeforeUnloadEvent);
}
function confirmNavigateAway(){
SYSTEM.Network.onBeforeUnloadEvent();
return "Please ensure that you've saved all of your files, Thank you for using Peepel";
}
function global_contactsInitialisationCallback(){
try{
if(NO_API){
global_startApp();
return;
}
var _a=SYSTEM.Contacts.getAcceptedContacts();
for(var i=0;i<_a.length;i++){
SYSTEM.Tracking.addUser(_a[i].userId);
}
SYSTEM.ApiRegistry.register();
}
catch(ex){
jsExDebug("contactsInitialisationCallback",ex);
}
}
function global_filesystemHandler(){
try{
if(SYSTEM.Filesystem.initialised){
global_startApp();
}
}
catch(ex){
jsExDebug("global_filesystemHandler",ex);
}
}
function global_userDetailsInitialisationCallback(){
try{
SYSTEM.Contacts.refresh(new SYSTEM.Delegate(null,global_contactsInitialisationCallback));
}
catch(ex){
jsExDebug("global_userDetailsInitialisationCallback",ex);
}
}
function global_trackingInitialisationCallback(){
try{
}
catch(ex){
jsExDebug("global_trackingInitialisationCallback",ex);
}
}
function global_globalInitialisationCallback(){
try{
global_startApp();
}
catch(ex){
jsExDebug("global_globalInitialisationCallback",ex);
}
}
function showOpenIDResponseDialogue(){
try{
var d=new SYSTEM.Dialogue.OkAlert(null,"OpenID Operation","OpenID operation result: <b>"+OPEN_ID_AUTH_MESSAGE_FLAG+"</b>");
}
catch(ex){
jsExDebug("SYSTEMResetCallback",ex);
}
}
function global_startAppComplete(){
try{
if(SYSTEM.snapshotStartupFunctions){
for(var i=0;i<SYSTEM.snapshotStartupFunctions.length;i++){
SYSTEM.snapshotStartupFunctions[i]();
SYSTEM.snapshotStartupFunctions[i]=null;
}
SYSTEM.snapshotStartupFunctions=null;
}
if(SYSTEM.Settings.get("browser_compat_msgs")&&SYSTEM.Environment.AGENT_STRING.match(/msie 6|msie 8|safari|opera|chrome/i)){
var d=new this.SYSTEM.Dialogue.BrowserMessages(null,"Your browser is not fully compatible with Peepel, "+"we apologise for any inconvenience. We aim to fully support as many "+"browsers as possible so your browser may be compatible in the near "+"future.");
}
if(DEBUG_MESSAGES){
global_startUpTestCodeGoesHere();
}
}
catch(ex){
jsExDebug("global_startAppComplete",ex);
}
}
function global_startUpTestCodeGoesHere(){
try{
if(DEBUG_MESSAGES){
}
}
catch(ex){
jsExDebug("global_startUpTestCodeGoesHere",ex);
}
}
function global_createInterface(){
try{
SYSTEM.Desktop=new desktop_t();
SYSTEM.Launcher=new launcher_t("PeepelLauncher",SYSTEM.UserDetails.getScreenName());
var _f=new widgetNotifier_t("notifierWidget");
_f.setPosition(0,0,true,true);
_f.attach(document.body);
SYSTEM.Notifier.registerNotifierWidget(_f);
var _10=new SYSTEM.Widget.Login("loginWidget");
_10.setPosition(_f.width,0,true,true);
_10.attach(document.body);
_10.setName(SYSTEM.UserDetails.userName);
SYSTEM.Login=_10;
var _11=new SYSTEM.Widget.TaskManager("taskManager");
_11.setPosition(SYSTEM.Launcher.WIDTH,0,false,true);
_11.attach(document.body);
SYSTEM.APPLICATION_MANAGER.setTaskListWidget(_11);
SYSTEM.NetworkStatus=new networkApp_t();
SYSTEM.NetworkStatus.hide();
SYSTEM.INTERFACE_INITIALISED=true;
}
catch(ex){
jsExDebug("global_createInterface",ex);
}
}
function global_readyToShowInterface(){
if(NO_API){
return (SYSTEM.Filesystem.initialised&&SYSTEM.Contacts.initialised);
}else{
return (SYSTEM.Filesystem.initialised&&SYSTEM.Contacts.initialised&&SYSTEM.ApiRegistry.initialised&&SYSTEM.PeepelPoints.initialised);
}
}
function global_disableInterface(){
try{
global_stopTimedServiceRequests();
SYSTEM.Dom.showInterfaceCover();
SYSTEM.Launcher.hide();
SYSTEM.Notifier.getNotifierWidget().hide();
SYSTEM.Login.hide();
SYSTEM.APPLICATION_MANAGER.getTaskListWidget().hide();
}
catch(ex){
jsExDebug("global_disableInterface",ex);
}
}
function global_startApp(){
try{
if(global_readyToShowInterface()){
SYSTEM.Tooltip.hideLoading();
global_createInterface();
if(forgotPasswordFlag!=null||newInvitationFlag!=null){
if(forgotPasswordFlag==0){
jsDebug("Forgot password error");
}else{
global_disableInterface();
if(forgotPasswordFlag){
var _12=new newPassword_t("newPassword",forgotPasswordFlag);
_12.setPosition(SYSTEM.Environment.SCREEN_WIDTH/2-(_12.width/2),SYSTEM.Environment.SCREEN_HEIGHT/2-(_12.height/2));
_12.attach(document.body);
}else{
if(newInvitationFlag){
var _13=new widgetSignUp_t("signUp",false,(this.SYSTEM.UserDetails.isEmailPassUser()?false:true));
_13.setPosition(this.SYSTEM.Environment.SCREEN_WIDTH/2-(_13.width/2),this.SYSTEM.Environment.SCREEN_HEIGHT/2-(_13.height/2));
_13.attach(document.body);
}
}
}
}else{
if(verifiedEmailAddress&&verifiedEmailAddress.length&&verifiedEmailAddress==this.SYSTEM.UserDetails.emailAddress){
var d=new SYSTEM.Dialogue.OkAlert(null,"Email Verification","Your email address: <b>"+verifiedEmailAddress+"</b> has been verified");
}
if(SYSTEM.Environment.AGENT_STRING.match(/iPhone/)){
SYSTEM.APPLICATION_MANAGER.launch(APP_ID_MAP);
global_startAppComplete();
}else{
global_processQuickLaunchString();
var _15=true;
if(OPEN_ID_AUTH_MESSAGE_FLAG&&OPEN_ID_AUTH_MESSAGE_FLAG.length){
if(OPEN_ID_USER_CHANGE_REQUIRED){
resetSYSTEMAfterUserChange(new SYSTEM.Delegate(null,showOpenIDResponseDialogue));
}else{
if(OPEN_ID_AUTH_MESSAGE_FLAG=="signup_success"){
var _13=new widgetSignUp_t("signUp",true);
_13.setPosition(this.SYSTEM.Environment.SCREEN_WIDTH/2-(_13.width/2),this.SYSTEM.Environment.SCREEN_HEIGHT/2-(_13.height/2));
_13.attach(document.body);
_15=false;
}else{
showOpenIDResponseDialogue();
}
}
}else{
if(SYSTEM.Settings.get("default_workspace")){
var _16=new workspace_t();
_16.fromContentString(SYSTEM.Settings.get("default_workspace"));
if(_16.getAppCount()){
_15=false;
}
_16.open();
}
}
if(_15&&!SYSTEM.Launcher.cancelAutoOpen){
SYSTEM.Launcher.openMenu();
}
global_startAppComplete();
}
}
}
}
catch(ex){
jsExDebug("global_startApp",ex);
}
}
function global_processQuickLaunchString(){
try{
if(quickLaunchString){
if(SYSTEM.APPLICATION_MANAGER.quickLaunch(quickLaunchString)){
global_startAppComplete();
return true;
}else{
quickLaunchString=null;
return false;
}
}else{
return false;
}
}
catch(ex){
jsExDebug("global_processQuickLaunchString",ex);
}
}
function global_continueAfterForgotPasswordSuccess(_17){
function callback(){
try{
SYSTEM.Launcher.show();
SYSTEM.Notifier.getNotifierWidget().show();
SYSTEM.Login.show();
SYSTEM.APPLICATION_MANAGER.getTaskListWidget().show();
resetSYSTEMAfterUserChange();
}
catch(ex){
jsExDebug("global_continueAfterForgotPasswordSuccess: callback",ex);
}
}
try{
SYSTEM.Dom.hideInterfaceCover();
global_restartTimedServiceRequests();
SYSTEM.Security.signInAsUser(_17.usernameValue,_17.passwordValue,new SYSTEM.Delegate(null,callback));
_17.cleanUp();
}
catch(ex){
jsExDebug("global_continueAfterForgotPasswordSuccess",ex);
}
}
function global_continueAfterNewInvitationUpgrade(_18){
try{
SYSTEM.Dom.hideInterfaceCover();
global_restartTimedServiceRequests();
_18.cleanUp();
SYSTEM.Launcher.show();
SYSTEM.Notifier.getNotifierWidget().show();
SYSTEM.Login.show();
SYSTEM.APPLICATION_MANAGER.getTaskListWidget().show();
resetSYSTEMAfterUserChange();
}
catch(ex){
jsExDebug("global_continueAfterNewInvitationUpgrade",ex);
}
}
function global_stopTimedServiceRequests(){
try{
SYSTEM.Notifier.stop();
SYSTEM.Workspaces.stopDefaultWorkspaceUpdate();
SYSTEM.ApiRegistry.stop();
}
catch(ex){
jsExDebug("global_stopTimedServiceRequests",ex);
}
}
function global_restartTimedServiceRequests(){
try{
SYSTEM.Notifier.start();
SYSTEM.Workspaces.startDefaultWorkspaceUpdate();
SYSTEM.ApiRegistry.start();
}
catch(ex){
jsExDebug("global_restartTimedServiceRequests",ex);
}
}

try{
revision_t.prototype=new peepelObject_t();
revision_t.prototype.constructor=revision_t;
revision_t.prototype.cleanUp=revision_cleanUp;
revision_t.prototype.revision_super=peepelObject_t.prototype.constructor;
revision_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
revision_t.prototype.saveRevision=revision_saveRevision;
revision_t.prototype.loadRevision=revision_loadRevision;
revision_t.prototype.processRevisionResponse=revision_processRevisionResponse;
revision_t.prototype.REVISION_PATH="peepel_services.php?service=revision";
revision_t.prototype.REVISION_SAVE=1;
revision_t.prototype.REVISION_LOAD=2;
}
catch(ex){
jsExDebug("revision_prototype",ex);
}
function revision_t(_1,_2){
try{
this.revision_super();
this.fileid=_1;
if(!_2){
this.online=true;
}else{
this.online=_2;
}
}
catch(ex){
jsExDebug("revision_t",ex);
}
}
function revision_cleanUp(me){
try{
if(!me){
me=this;
}
me.fileid=null;
me.onlineMode=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("revision_cleanUp",ex);
}
}
function revision_saveRevision(_4,_5,_6){
try{
function handleSaveRevisionSuccess(_7,me){
try{
if(_5){
var _9=me.processRevisionResponse(_7,me);
_5(_9,_6);
}
}
catch(ex){
jsExDebug("handleSaveRevisionSuccess",ex);
}
}
data="action="+this.REVISION_SAVE+"&fileid="+this.fileid+"&data="+_4;
this.SYSTEM.Network.request(this.REVISION_PATH,data,handleSaveRevisionSuccess,this,true);
}
catch(ex){
jsExDebug("revision_saveRevision",ex);
}
}
function revision_loadRevision(_a,_b){
try{
function handleLoadRevisionSuccess(_c,me,_e){
try{
var _f=me.processRevisionResponse(_c,me,_e);
if(_a){
if(_f==FLOCK_SUCCESS){
_a(_c.firstChild,_b,_e);
}else{
_a(_f,_b);
}
}
}
catch(ex){
jsExDebug("handleSaveRevisionSuccess",ex);
}
}
data="action="+this.REVISION_LOAD+"&fileid="+this.fileid;
this.SYSTEM.Network.request(this.REVISION_PATH,data,handleLoadRevisionSuccess,this);
}
catch(ex){
jsExDebug("revision_saveRevision",ex);
}
}
function revision_processRevisionResponse(_10,me){
try{
if(!_10){
return FLOCK_ERR_NO_CONNECTION;
}
if(!_10.hasChildNodes()){
return FLOCK_ERR_NO_CONNECTION;
}
var _12;
var _13;
if(_10.firstChild.hasChildNodes()){
_12=_10.firstChild.childNodes;
for(var i=(_12.length-1);i>=0;i--){
_13=_12[i].nodeName;
if(_13==FLOCK_ERR_XML_SUCCESS_TAG){
_10.firstChild.removeChild(_12[i]);
return FLOCK_SUCCESS;
}else{
if(_13==FLOCK_ERR_XML_TAG){
if(_12[i].hasChildNodes()){
if(_12[i].firstChild.nodeValue){
return parseInt(_12[i].firstChild.nodeValue);
}
}
}else{
if(_13==FLOCK_ERR_XML_ERROR_TAG){
return FLOCK_ERR_UNKNOWN_ERROR;
}
}
}
}
}
return FLOCK_ERR_BAD_XML;
}
catch(ex){
jsExDebug("revision_processRevisionResponse",ex);
}
}

try{
file_t.prototype=new peepelObject_t();
file_t.prototype.constructor=file_t;
file_t.prototype.cleanUp=file_cleanUp;
file_t.prototype.file_super=peepelObject_t.prototype.constructor;
file_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
file_t.prototype.newFileId=file_newFileId;
file_t.prototype.rename=file_rename;
file_t.prototype.saveRevision=file_saveRevision;
file_t.prototype.save=file_saveRevision;
file_t.prototype.loadRevision=file_loadRevision;
file_t.prototype.load=file_loadRevision;
file_t.prototype.ensureFileId=file_ensureFileId;
file_t.prototype.addToFolder=file_addToFolder;
file_t.prototype.networkStatusChanged=file_networkStatusChanged;
file_t.prototype.hasReadAccess=file_hasReadAccess;
file_t.prototype.hasWriteAccess=file_hasWriteAccess;
file_t.prototype.isShared=file_isShared;
file_t.prototype.getCurrentWriter=file_getCurrentWriter;
file_t.prototype.takeWriteToken=file_takeWriteToken;
file_t.prototype.releaseWriteToken=file_releaseWriteToken;
file_t.prototype.setTokenOwner=file_setTokenOwner;
file_t.prototype.getTokenOwner=file_getTokenOwner;
file_t.prototype.clearTokenOwner=file_clearTokenOwner;
file_t.prototype.getDataAndSaveRevision=file_getDataAndSaveRevision;
file_t.prototype.setLoadRevisionDelegate=file_setLoadRevisionDelegate;
file_t.prototype.saveNextInRevisionBuffer=file_saveNextInRevisionBuffer;
file_t.prototype.readRevision=file_readRevision;
file_t.prototype.open=file_open;
file_t.prototype.close=file_close;
file_t.prototype.saveRevisionHandler=file_saveRevisionHandler;
file_t.prototype.loadRevisionHandler=file_loadRevisionHandler;
file_t.prototype.randomiseWithinTenPercent=file_randomiseWithinTenPercent;
file_t.prototype.exportFormat=file_exportFormat;
file_t.prototype.FILTER_RAW=1;
file_t.prototype.FILTER_ODS=2;
file_t.prototype.FILTER_MSWORD11HTML=3;
file_t.prototype.FILTER_MSWORD11HTML_ODT=4;
file_t.prototype.FILTER_MSWORD11HTML_PDF=5;
file_t.prototype.FILTER_ODS_XLS=6;
file_t.prototype.TYPE_SPREADSHEET=1;
file_t.prototype.TYPE_WRITER=2;
file_t.prototype.TYPE_IMAGE=3;
}
catch(ex){
jsExDebug("file_t:prototype",ex);
}
function file_t(_1,_2,_3,_4,_5,_6,_7,_8){
function constructorPhase2(){
try{
this.folderIds=[];
if(_6){
for(var i=0;i<_6.length;i++){
if(_6[i]){
this.folderIds.push(_6[i]);
}
}
}
if(_7){
this.filename=_7;
}
if(_8){
this.filetype=_8;
}
this.networkObjectIndex=this.SYSTEM.Network.registerNetworkObject(this);
if(_4){
_4.asyncInvoke();
}
}
catch(ex){
jsExDebug("constructorPhase2",ex);
}
}
try{
this.file_super();
if(_2){
this.dataRetrievalDelegate=_2;
}
if(_3){
this.tokenChangeDelegate=_3;
}
if(_5){
this.isDirtyDelegate=_5;
}
this.isRevisionSavePolling=false;
this.revisionBuffer=[];
this.lastSavedRevision=null;
this.saveRevisionDelegate=null;
this.loadRevisionDelegate=null;
this.revisionReadPollingTimer=null;
this.revisionSavePollingTimer=null;
this.hasFileId=false;
this.newFileIdFailed=false;
this.errorBadFileName=false;
this.fileid=null;
this.filename=null;
this.revision=null;
this.filetype=null;
this.fileaccess=null;
this.fileRegistryIndex=null;
if(_1){
var _a=this.SYSTEM.Filesystem.getFilePermsisionsById(_1);
if(_a<this.SYSTEM.Filesystem.FILE_ACCESS_READ){
this.fileaccess=this.SYSTEM.Filesystem.FILE_ACCESS_MAX;
constructorPhase2.call(this);
return;
}else{
this.fileid=_1;
this.revision=new revision_t(this.fileid,this.isOnline);
this.filename=this.SYSTEM.Filesystem.getFileNameFromId(this.fileid);
this.hasFileId=true;
this.fileaccess=this.SYSTEM.Filesystem.getFilePermsisionsById(this.fileid);
this.open(new delegate_t(this,constructorPhase2));
}
}else{
this.fileaccess=this.SYSTEM.Filesystem.FILE_ACCESS_MAX;
constructorPhase2.call(this);
}
}
catch(ex){
jsExDebug("file_t",ex);
}
}
function file_hasReadAccess(){
try{
if(this.fileaccess){
if(this.fileaccess>=this.SYSTEM.Filesystem.FILE_ACCESS_READ){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("file_hasReadAccess",ex);
}
}
function file_hasWriteAccess(){
try{
if(this.fileaccess){
if(this.fileaccess>=this.SYSTEM.Filesystem.FILE_ACCESS_WRITE){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("file_hasWriteAccess",ex);
}
}
function file_open(_b){
function openCallbackTokenOwnerPhase1(_c){
try{
if(_c.hasOwner){
this.setTokenOwner(_c);
}else{
this.SYSTEM.Filesystem.takeWriteToken(this.fileid,new delegate_t(this,openCallbackTokenOwnerPhase2));
return;
}
this.fileRegistryIndex=this.SYSTEM.Filesystem.FileRegistry.registerFile(this);
if(_b){
_b.invoke();
}
}
catch(ex){
jsExDebug("openCallbackTokenOwnerPhase1",ex);
}
}
function openCallbackTokenOwnerPhase2(_d){
try{
if(_d){
var _e={};
_e.userId=this.SYSTEM.UserDetails.id;
_e.userName=this.SYSTEM.UserDetails.userName;
_e.dateObtained=null;
_e.hasOwner=true;
_e.error=false;
this.setTokenOwner(_e);
}else{
this.setTokenOwner(false);
}
this.fileRegistryIndex=this.SYSTEM.Filesystem.FileRegistry.registerFile(this);
if(_b){
_b.invoke();
}
}
catch(ex){
jsExDebug("openCallbackTokenOwnerPhase2",ex);
}
}
try{
this.SYSTEM.Filesystem.getCurrentWriteTokenOwner(this.fileid,new delegate_t(this,openCallbackTokenOwnerPhase1));
}
catch(ex){
jsExDebug("file_open",ex);
}
}
function file_setTokenOwner(_f){
try{
if(_f){
this.currentTokenOwner=_f;
}
if(this.tokenChangeDelegate){
this.tokenChangeDelegate.invoke(this.currentTokenOwner);
}
}
catch(ex){
jsExDebug("file_setTokenOwner",ex);
}
}
function file_getTokenOwner(){
try{
if(this.currentTokenOwner){
return this.currentTokenOwner;
}else{
return null;
}
}
catch(ex){
jsExDebug("file_getTokenOwner",ex);
}
}
function file_clearTokenOwner(){
try{
this.currentTokenOwner.userId=false;
this.currentTokenOwner.userName=false;
this.currentTokenOwner.dateObtained=false;
this.currentTokenOwner.hasOwner=false;
this.currentTokenOwner.error=false;
}
catch(ex){
jsExDebug("file_clearTokenOwner",ex);
}
}
function file_close(){
try{
if(this.fileRegistryIndex){
this.SYSTEM.Filesystem.FileRegistry.unregisterFile(this);
}
}
catch(ex){
jsExDebug("file_close",ex);
}
}
function file_isShared(){
try{
if(this.fileid){
return this.SYSTEM.Filesystem.isSharedFile(this.fileid);
}else{
}
}
catch(ex){
jsExDebug("file_isShared",ex);
}
}
function file_takeWriteToken(_10){
try{
if(this.fileid){
this.SYSTEM.Filesystem.takeWriteToken(this.fileid,_10);
}else{
}
}
catch(ex){
jsExDebug("file_takeWriteToken",ex);
}
}
function file_releaseWriteToken(_11){
try{
if(this.fileid){
this.SYSTEM.Filesystem.releaseWriteToken(this.fileid,_11);
}else{
}
}
catch(ex){
jsExDebug("file_releaseWriteToken",ex);
}
}
function file_getCurrentWriter(_12){
try{
if(this.fileid){
return this.SYSTEM.Filesystem.getCurrentWriteTokenOwner(this.fileid,_12);
}else{
}
}
catch(ex){
jsExDebug("file_getCurrentWriter",ex);
}
}
function file_newFileId(_13,_14){
function newFileOpenHandler(){
try{
_14.apply(this,_13);
}
catch(ex){
jsExDebug("newFileIdHandler",ex);
}
}
function newFileIdHandler(_15,me,_17){
try{
if(_15){
me.fileid=_15;
me.revision=new revision_t(_15,me.isOnline);
me.hasFileId=true;
me.fileaccess=this.SYSTEM.Filesystem.FILE_ACCESS_MAX;
me.open(new delegate_t(me,newFileOpenHandler));
if(me.badFileName){
me.errorBadFileName=false;
}
}else{
me.hasFileId=false;
me.newFileIdFailed=true;
if(_17){
me.errorBadFileName=true;
}else{
me.errorBadFileName=false;
}
if(me.saveRevisionDelegate){
me.saveRevisionDelegate.invoke(false);
}else{
if(me.saveRevisionCompleteDelegate){
me.saveRevisionCompleteDelegate.invoke(false);
}
}
me.fileaccess=this.SYSTEM.Filesystem.FILE_ACCESS_MAX;
}
}
catch(ex){
jsExDebug("newFileIdHandler",ex);
}
}
try{
SYSTEM.Filesystem.createFile(newFileIdHandler,this,this.folderIds,this.filename,this.filetype);
}
catch(ex){
jsExDebug("file_newFileId",ex);
}
}
function file_addToFolder(_18,_19){
try{
var i;
if(this.hasFileId){
if(_19){
if(typeof (_18)=="number"){
SYSTEM.Filesystem.copyFileToFolder(this.fileid,_18,_19.handler,_19.instance);
}else{
if(_18.length){
for(var i=0;i<_18.length;i++){
SYSTEM.Filesystem.copyFileToFolder(this.fileid,_18[i],_19.handler,_19.instance);
}
}
}
}
return true;
}else{
if(_19){
this.folderIds.push(_18);
_19.invoke(true);
}
}
}
catch(ex){
jsExDebug("file_addToFolder",ex);
}
}
function file_rename(_1b,_1c){
try{
if(!this.hasFileId){
if(_1c){
this.filename=_1b;
_1c.invoke(true);
}
}else{
if(_1c){
SYSTEM.Filesystem.renameFile(this.fileid,_1b,_1c.handler,_1c.instance);
}else{
SYSTEM.Filesystem.renameFile(this.fileid,_1b);
}
}
}
catch(ex){
jsExDebug("file_rename",ex);
}
}
function file_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.SYSTEM.Network){
me.SYSTEM.Network.unRegisterNetworkObject(me.networkObjectIndex);
}
me.networkObjectIndex=null;
me.close();
me.isOnline=null;
me.isRevisionSavePolling=null;
me.lastSavedRevision=null;
if(me.revisionBuffer){
for(var i=0;i<me.revisionBuffer.length;i++){
me.revisionBuffer[i]=null;
delete me.revisionBuffer[i];
}
}
me.revisionBuffer=null;
if(me.saveRevisionDelegate){
me.saveRevisionDelegate=null;
}
if(me.saveRevisionCompleteDelegate){
me.saveRevisionCompleteDelegate=null;
}
if(me.loadRevisionDelegate){
me.loadRevisionDelegate.cleanUp();
me.loadRevisionDelegate=null;
}
if(me.dataRetrievalDelegate){
me.dataRetrievalDelegate=null;
}
if(me.tokenChangeDelegate){
me.tokenChangeDelegate=null;
}
if(me.isDirtyDelegate){
me.isDirtyDelegate=null;
}
if(me.revisionReadPollingTimer){
me.revisionReadPollingTimer.cleanUp();
}
if(me.revisionSavePollingTimer){
me.revisionSavePollingTimer.cleanUp();
}
me.revisionReadPollingTimer=null;
me.revisionSavePollingTimer=null;
me.pollApplicationForNewData=null;
if(me.priorityDelay){
for(var i=0;i<me.priorityDelay.length;i++){
var _1f=me.priorityDelay[i];
for(var j=0;j<_1f.length;j++){
_1f[j]=null;
delete _1f[j];
}
me.priorityDelay[i]=null;
delete me.priorityDelay[i];
}
}
me.priorityDelay=null;
me.newFileIdFailed=null;
me.errorBadFileName=null;
me.filename=null;
me.filetype=null;
me.hasFileId=null;
me.fileid=null;
me.location=null;
if(me.revision){
me.revision.cleanUp();
}
me.revision=null;
for(var i=0;i<me.folderIds.length;i++){
if(me.folderIds[i]){
me.folderIds[i]=null;
delete me.folderIds[i];
}
}
me.folderIds=null;
if(me.currentTokenOwner){
me.currentTokenOwner.userId=null;
me.currentTokenOwner.userName=null;
me.currentTokenOwner.dateObtained=null;
me.currentTokenOwner.hasOwner=null;
me.currentTokenOwner.error=null;
me.currentTokenOwner=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("file_cleanUp",ex);
}
}
function file_networkStatusChanged(_21){
try{
if(_21==this.SYSTEM.Network.ONLINE){
this.isOnline=true;
}else{
this.isOnline=false;
}
}
catch(ex){
jsExDebug("file_networkStatusChanged",ex);
}
}
function file_ensureFileId(_22,_23){
try{
if(!this.hasFileId){
if(this.newFileIdFailed){
this.newFileIdFailed=false;
}else{
this.newFileId(_22,_23);
}
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("file_ensureFileId",ex);
}
}
function file_saveRevision(_24,_25,_26){
try{
if(_25){
this.saveRevisionDelegate=_25;
}
if(_26){
this.saveRevisionCompleteDelegate=_26;
}
if(this.ensureFileId(arguments,this.saveRevision)){
return;
}
if(!_24||(_24.length==0)){
jsDebug("file_saveRevision: content zero length or not set.");
return;
}
if(this.lastSavedRevision){
if(this.lastSavedRevision==_24){
if(_25){
_25.invoke(true);
return;
}
}
}
this.revision.saveRevision(_24,this.saveRevisionHandler,this);
this.lastSavedRevision=_24;
}
catch(ex){
jsExDebug("file_saveRevision",ex);
}
}
function file_getDataAndSaveRevision(_27,_28){
try{
if(this.dataRetrievalDelegate){
var _29=this.dataRetrievalDelegate.invokeResult();
this.saveRevision(_29,_27,_28);
}
}
catch(ex){
jsExDebug("file_getDataAndRevision",ex);
}
}
function file_setLoadRevisionDelegate(_2a){
try{
if(_2a){
this.loadRevisionDelegate=_2a;
}
}
catch(ex){
jsExDebug("file_setLoadRevisionDelegate",ex);
}
}
function file_loadRevision(_2b,_2c){
function loadRevisionDialogueHandler(_2d){
try{
if(_2d){
this.loadRevision(_2b);
}
}
catch(ex){
jsExDebug("loadRevisionDialogueHandler",ex);
}
}
try{
if(this.ensureFileId(arguments,this.loadRevision)){
return;
}
if(this.isDirtyDelegate){
if(_2c&&this.isDirtyDelegate.invokeResult()&&(this.getTokenOwner().userId==this.SYSTEM.UserDetails.id)){
var _2e=new this.SYSTEM.Dialogue.YesNoAlert(null,"Reload File Contents","Filename: "+this.filename+"<br/><br/>"+"Another user has saved changes to this document even though "+"you currently have edit control. If you've just recently "+"taken edit control, the changes probably represent the "+"most recent version of the document.<br/><br/>"+"Do you want to reload and lose your changes?",new this.SYSTEM.Delegate(this,loadRevisionDialogueHandler));
return;
}
}
if(_2b){
this.loadRevisionDelegate=_2b;
}else{
if(this.loadRevisionDelegate){
}
}
this.readRevision(this);
}
catch(ex){
jsExDebug("file_loadRevision",ex);
}
}
function file_saveNextInRevisionBuffer(me){
try{
if((me.revisionBuffer.length!=0)&&(me.hasFileId)){
me.revision.saveRevision(me.revisionBuffer[0],me.saveRevisionHandler,me);
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("file_saveNextInRevisionBuffer",ex);
}
}
function file_readRevision(me){
try{
if(me.hasFileId){
me.revision.loadRevision(file_loadRevisionHandler,me);
}
}
catch(ex){
jsExDebug("file_readRevision",ex);
}
}
function file_saveRevisionHandler(_31,me){
try{
var _33=(_31==FLOCK_SUCCESS?true:false);
if(me.saveRevisionDelegate){
me.saveRevisionDelegate.invoke(_33);
}
if(me.saveRevisionCompleteDelegate){
me.saveRevisionCompleteDelegate.invoke(_33);
}
}
catch(ex){
jsExDebug("file_saveRevisionHandler",ex);
}
}
function file_loadRevisionHandler(_34,me,_36){
try{
if(!_34){
if(me.loadRevisionDelegate){
me.loadRevisionDelegate.invoke(false);
}
}else{
if((typeof (_34)=="number")&&(_34<=FLOCK_ERR_MAX)){
if(me.loadRevisionDelegate){
me.loadRevisionDelegate.invoke(false);
}
}else{
me.filename=me.SYSTEM.Filesystem.getFileNameFromId(me.fileid);
if(me.loadRevisionDelegate){
me.loadRevisionDelegate.invoke(_34,_36);
}
}
}
}
catch(ex){
jsExDebug("file_loadRevisionHandler",ex);
}
}
function file_randomiseWithinTenPercent(_37){
try{
var _38;
if(!_37){
_38=me.POLL_INTERVAL;
}else{
_38=_37;
}
return Math.floor((Math.random()*(_38/5))-(_38/10)+_38);
}
catch(ex){
jsExDebug("file_randomiseWithinTenPercent",ex);
}
}
function file_exportFormat(_39,_3a){
function exportFileHandler(_3b){
try{
if(!_3b){
}
if(!_3b.hasChildNodes()){
}
var _3c;
var _3d;
var _3e;
var _3f;
var i;
var _41=_3b.getElementsByTagName("path");
if(_41.length){
_3a.invoke(_41[0].firstChild.nodeValue);
return;
}else{
_3a.invoke(false);
}
}
catch(ex){
jsExDebug("file_export:exportFileHandler",ex);
}
}
try{
if(this.hasFileId){
var url="peepel_services.php?service=fileconversion";
var _43="action=1&fileid="+this.fileid+"&filter="+_39;
this.SYSTEM.Network.request(url,_43,exportFileHandler,this);
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("file_exportFormat",ex);
}
}

try{
publicFile_t.prototype=new peepelObject_t();
publicFile_t.prototype.constructor=publicFile_t;
publicFile_t.prototype.cleanUp=publicFile_cleanUp;
publicFile_t.prototype.publicFile_super=peepelObject_t.prototype.constructor;
publicFile_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
publicFile_t.prototype.rename=publicFile_rename;
publicFile_t.prototype.saveRevision=publicFile_saveRevision;
publicFile_t.prototype.save=publicFile_saveRevision;
publicFile_t.prototype.loadRevision=publicFile_loadRevision;
publicFile_t.prototype.load=publicFile_loadRevision;
publicFile_t.prototype.addToFolder=publicFile_addToFolder;
publicFile_t.prototype.networkStatusChanged=publicFile_networkStatusChanged;
publicFile_t.prototype.hasReadAccess=publicFile_hasReadAccess;
publicFile_t.prototype.hasWriteAccess=publicFile_hasWriteAccess;
publicFile_t.prototype.isShared=publicFile_isShared;
publicFile_t.prototype.getCurrentWriter=publicFile_getCurrentWriter;
publicFile_t.prototype.takeWriteToken=publicFile_takeWriteToken;
publicFile_t.prototype.releaseWriteToken=publicFile_releaseWriteToken;
publicFile_t.prototype.setTokenOwner=publicFile_setTokenOwner;
publicFile_t.prototype.getTokenOwner=publicFile_getTokenOwner;
publicFile_t.prototype.clearTokenOwner=publicFile_clearTokenOwner;
publicFile_t.prototype.getDataAndSaveRevision=publicFile_getDataAndSaveRevision;
publicFile_t.prototype.setLoadRevisionDelegate=publicFile_setLoadRevisionDelegate;
publicFile_t.prototype.saveNextInRevisionBuffer=publicFile_saveNextInRevisionBuffer;
publicFile_t.prototype.readRevision=publicFile_readRevision;
publicFile_t.prototype.open=publicFile_open;
publicFile_t.prototype.close=publicFile_close;
publicFile_t.prototype.saveRevisionHandler=publicFile_saveRevisionHandler;
publicFile_t.prototype.loadRevisionHandler=publicFile_loadRevisionHandler;
publicFile_t.prototype.randomiseWithinTenPercent=publicFile_randomiseWithinTenPercent;
publicFile_t.prototype.exportFormat=publicFile_exportFormat;
publicFile_t.prototype.FILTER_RAW=1;
publicFile_t.prototype.FILTER_ODS=2;
publicFile_t.prototype.FILTER_MSWORD11HTML=3;
publicFile_t.prototype.FILTER_MSWORD11HTML_ODT=4;
publicFile_t.prototype.FILTER_MSWORD11HTML_PDF=5;
publicFile_t.prototype.FILTER_ODS_XLS=6;
publicFile_t.prototype.TYPE_SPREADSHEET=1;
publicFile_t.prototype.TYPE_WRITER=2;
publicFile_t.prototype.TYPE_IMAGE=3;
}
catch(ex){
jsExDebug("publicFile_t:prototype",ex);
}
function publicFile_t(_1,_2,_3,_4,_5){
function constructorPhase2(){
try{
this.networkObjectIndex=this.SYSTEM.Network.registerNetworkObject(this);
this.SYSTEM.Filesystem.getPublicFileDetails(_1,new this.SYSTEM.Delegate(this,constructorPhase3));
}
catch(ex){
jsExDebug("publicFile_t: constructorPhase2",ex);
}
}
function constructorPhase3(_6,_7,_8,_9){
try{
if(_6){
this.filename=_6;
}
if(_7){
this.filetype=_7;
}
if(_8){
this.fileguid=_8;
}
if(_9){
this.location=_9;
}
if(_4){
_4.asyncInvoke();
}
}
catch(ex){
jsExDebug("publicFile_t: constructorPhase3",ex);
}
}
try{
this.publicFile_super();
if(_2){
this.dataRetrievalDelegate=_2;
}
if(_3){
this.tokenChangeDelegate=_3;
}
if(_5){
this.isDirtyDelegate=_5;
}
this.isRevisionSavePolling=false;
this.revisionBuffer=[];
this.lastSavedRevision=null;
this.saveRevisionDelegate=null;
this.loadRevisionDelegate=null;
this.revisionReadPollingTimer=null;
this.revisionSavePollingTimer=null;
this.hasFileId=false;
this.errorBadFileName=false;
this.fileid=null;
this.fileguid=null;
this.filename=null;
this.revision=null;
this.filetype=null;
this.fileaccess=null;
if(_1){
this.fileid=_1;
this.revision=new revision_t(this.fileid,this.isOnline);
this.hasFileId=true;
this.fileaccess=this.SYSTEM.Filesystem.FILE_ACCESS_READ;
this.open(new delegate_t(this,constructorPhase2));
}
}
catch(ex){
jsExDebug("publicFile_t",ex);
}
}
function publicFile_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Network.unRegisterNetworkObject(me.networkObjectIndex);
me.networkObjectIndex=null;
me.close();
me.isOnline=null;
me.isRevisionSavePolling=null;
me.lastSavedRevision=null;
if(me.revisionBuffer){
for(var i=0;i<me.revisionBuffer.length;i++){
me.revisionBuffer[i]=null;
delete me.revisionBuffer[i];
}
}
me.revisionBuffer=null;
if(me.saveRevisionDelegate){
me.saveRevisionDelegate=null;
}
if(me.saveRevisionCompleteDelegate){
me.saveRevisionCompleteDelegate=null;
}
if(me.loadRevisionDelegate){
me.loadRevisionDelegate.cleanUp();
me.loadRevisionDelegate=null;
}
if(me.dataRetrievalDelegate){
me.dataRetrievalDelegate=null;
}
if(me.tokenChangeDelegate){
me.tokenChangeDelegate=null;
}
if(me.isDirtyDelegate){
me.isDirtyDelegate=null;
}
if(me.revisionReadPollingTimer){
me.revisionReadPollingTimer.cleanUp();
}
if(me.revisionSavePollingTimer){
me.revisionSavePollingTimer.cleanUp();
}
me.revisionReadPollingTimer=null;
me.revisionSavePollingTimer=null;
me.pollApplicationForNewData=null;
if(me.priorityDelay){
for(var i=0;i<me.priorityDelay.length;i++){
var _c=me.priorityDelay[i];
for(var j=0;j<_c.length;j++){
_c[j]=null;
delete _c[j];
}
me.priorityDelay[i]=null;
delete me.priorityDelay[i];
}
}
me.priorityDelay=null;
me.errorBadFileName=null;
me.filename=null;
me.filetype=null;
me.hasFileId=null;
me.fileid=null;
me.fileguid=null;
me.location=null;
if(me.revision){
me.revision.cleanUp();
}
me.revision=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("publicFile_cleanUp",ex);
}
}
function publicFile_hasReadAccess(){
try{
if(this.fileaccess){
if(this.fileaccess>=this.SYSTEM.Filesystem.FILE_ACCESS_READ){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("publicFile_hasReadAccess",ex);
}
}
function publicFile_hasWriteAccess(){
try{
if(this.fileaccess){
if(this.fileaccess>=this.SYSTEM.Filesystem.FILE_ACCESS_WRITE){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("publicFile_hasWriteAccess",ex);
}
}
function publicFile_open(_e){
function openCallbackTokenOwnerPhase1(_f){
try{
if(_f.hasOwner){
this.setTokenOwner(_f);
}else{
this.SYSTEM.Filesystem.takeWriteToken(this.fileid,new delegate_t(this,openCallbackTokenOwnerPhase2));
return;
}
if(_e){
_e.invoke();
}
}
catch(ex){
jsExDebug("openCallbackTokenOwnerPhase1",ex);
}
}
function openCallbackTokenOwnerPhase2(_10){
try{
if(_10){
var _11={};
_11.userId=this.SYSTEM.UserDetails.id;
_11.userName=this.SYSTEM.UserDetails.userName;
_11.dateObtained=null;
_11.hasOwner=true;
_11.error=false;
this.setTokenOwner(_11);
}else{
this.setTokenOwner(false);
}
if(_e){
_e.invoke();
}
}
catch(ex){
jsExDebug("openCallbackTokenOwnerPhase2",ex);
}
}
try{
this.SYSTEM.Filesystem.getCurrentWriteTokenOwner(this.fileid,new delegate_t(this,openCallbackTokenOwnerPhase1));
}
catch(ex){
jsExDebug("publicFile_open",ex);
}
}
function publicFile_setTokenOwner(_12){
try{
if(_12){
this.currentTokenOwner=_12;
}
if(this.tokenChangeDelegate){
this.tokenChangeDelegate.invoke(this.currentTokenOwner);
}
}
catch(ex){
jsExDebug("publicFile_setTokenOwner",ex);
}
}
function publicFile_getTokenOwner(){
try{
if(this.currentTokenOwner){
return this.currentTokenOwner;
}else{
return null;
}
}
catch(ex){
jsExDebug("publicFile_getTokenOwner",ex);
}
}
function publicFile_clearTokenOwner(){
try{
this.currentTokenOwner.userId=false;
this.currentTokenOwner.userName=false;
this.currentTokenOwner.dateObtained=false;
this.currentTokenOwner.hasOwner=false;
this.currentTokenOwner.error=false;
}
catch(ex){
jsExDebug("publicFile_clearTokenOwner",ex);
}
}
function publicFile_close(){
try{
}
catch(ex){
jsExDebug("publicFile_close",ex);
}
}
function publicFile_isShared(){
try{
if(this.fileid){
return this.SYSTEM.Filesystem.isSharedFile(this.fileid);
}else{
}
}
catch(ex){
jsExDebug("publicFile_isShared",ex);
}
}
function publicFile_takeWriteToken(_13){
try{
if(this.fileid){
this.SYSTEM.Filesystem.takeWriteToken(this.fileid,_13);
}else{
}
}
catch(ex){
jsExDebug("publicFile_takeWriteToken",ex);
}
}
function publicFile_releaseWriteToken(_14){
try{
if(this.fileid){
this.SYSTEM.Filesystem.releaseWriteToken(this.fileid,_14);
}else{
}
}
catch(ex){
jsExDebug("publicFile_releaseWriteToken",ex);
}
}
function publicFile_getCurrentWriter(_15){
try{
if(this.fileid){
return this.SYSTEM.Filesystem.getCurrentWriteTokenOwner(this.fileid,_15);
}else{
}
}
catch(ex){
jsExDebug("publicFile_getCurrentWriter",ex);
}
}
function publicFile_addToFolder(_16,_17){
try{
var i;
if(this.hasFileId){
if(_17){
if(typeof (_16)=="number"){
SYSTEM.Filesystem.copyFileToFolder(this.fileid,_16,_17.handler,_17.instance);
}else{
if(_16.length){
for(var i=0;i<_16.length;i++){
SYSTEM.Filesystem.copyFileToFolder(this.fileid,_16[i],_17.handler,_17.instance);
}
}
}
}
return true;
}else{
if(_17){
this.folderIds.push(_16);
_17.invoke(true);
}
}
}
catch(ex){
jsExDebug("publicFile_addToFolder",ex);
}
}
function publicFile_rename(_19,_1a){
try{
if(!this.hasFileId){
if(_1a){
this.filename=_19;
_1a.invoke(true);
}
}else{
if(_1a){
SYSTEM.Filesystem.renameFile(this.fileid,_19,_1a.handler,_1a.instance);
}else{
SYSTEM.Filesystem.renameFile(this.fileid,_19);
}
}
}
catch(ex){
jsExDebug("publicFile_rename",ex);
}
}
function publicFile_networkStatusChanged(_1b){
try{
if(_1b==this.SYSTEM.Network.ONLINE){
this.isOnline=true;
}else{
this.isOnline=false;
}
}
catch(ex){
jsExDebug("publicFile_networkStatusChanged",ex);
}
}
function publicFile_saveRevision(_1c,_1d,_1e){
try{
if(_1d){
this.saveRevisionDelegate=_1d;
}
if(_1e){
this.saveRevisionCompleteDelegate=_1e;
}
if(!_1c||(_1c.length==0)){
jsDebug("publicFile_saveRevision: content zero length or not set.");
return;
}
if(this.lastSavedRevision){
if(this.lastSavedRevision==_1c){
if(_1d){
_1d.invoke(true);
return;
}
}
}
this.revision.saveRevision(_1c,this.saveRevisionHandler,this);
this.lastSavedRevision=_1c;
}
catch(ex){
jsExDebug("publicFile_saveRevision",ex);
}
}
function publicFile_getDataAndSaveRevision(_1f,_20){
try{
if(this.dataRetrievalDelegate){
var _21=this.dataRetrievalDelegate.invokeResult();
this.saveRevision(_21,_1f,_20);
}
}
catch(ex){
jsExDebug("publicFile_getDataAndRevision",ex);
}
}
function publicFile_setLoadRevisionDelegate(_22){
try{
if(_22){
this.loadRevisionDelegate=_22;
}
}
catch(ex){
jsExDebug("publicFile_setLoadRevisionDelegate",ex);
}
}
function publicFile_loadRevision(_23,_24){
function loadRevisionDialogueHandler(_25){
try{
if(_25){
this.loadRevision(_23);
}
}
catch(ex){
jsExDebug("loadRevisionDialogueHandler",ex);
}
}
try{
if(this.isDirtyDelegate){
if(_24&&this.isDirtyDelegate.invokeResult()&&(this.getTokenOwner().userId==this.SYSTEM.UserDetails.id)){
var _26=new this.SYSTEM.Dialogue.YesNoAlert(null,"Reload File Contents","Filename: "+this.filename+"<br/><br/>"+"Another user has saved changes to this document even though "+"you currently have edit control. If you've just recently "+"taken edit control, the changes probably represent the "+"most recent version of the document.<br/><br/>"+"Do you want to reload and lose your changes?",new this.SYSTEM.Delegate(this,loadRevisionDialogueHandler));
return;
}
}
if(_23){
this.loadRevisionDelegate=_23;
}else{
if(this.loadRevisionDelegate){
}
}
this.readRevision(this);
}
catch(ex){
jsExDebug("publicFile_loadRevision",ex);
}
}
function publicFile_saveNextInRevisionBuffer(me){
try{
if((me.revisionBuffer.length!=0)&&(me.hasFileId)){
me.revision.saveRevision(me.revisionBuffer[0],me.saveRevisionHandler,me);
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("publicFile_saveNextInRevisionBuffer",ex);
}
}
function publicFile_readRevision(me){
try{
if(me.hasFileId){
me.revision.loadRevision(publicFile_loadRevisionHandler,me);
}
}
catch(ex){
jsExDebug("publicFile_readRevision",ex);
}
}
function publicFile_saveRevisionHandler(_29,me){
try{
var _2b=(_29==FLOCK_SUCCESS?true:false);
if(me.saveRevisionDelegate){
me.saveRevisionDelegate.invoke(_2b);
}
if(me.saveRevisionCompleteDelegate){
me.saveRevisionCompleteDelegate.invoke(_2b);
}
}
catch(ex){
jsExDebug("publicFile_saveRevisionHandler",ex);
}
}
function publicFile_loadRevisionHandler(_2c,me,_2e){
try{
if(!_2c){
if(me.loadRevisionDelegate){
me.loadRevisionDelegate.invoke(false);
}
}else{
if((typeof (_2c)=="number")&&(_2c<=FLOCK_ERR_MAX)){
if(me.loadRevisionDelegate){
me.loadRevisionDelegate.invoke(false);
}
}else{
if(me.loadRevisionDelegate){
me.loadRevisionDelegate.invoke(_2c,_2e);
}
}
}
}
catch(ex){
jsExDebug("publicFile_loadRevisionHandler",ex);
}
}
function publicFile_randomiseWithinTenPercent(_2f){
try{
var _30;
if(!_2f){
_30=me.POLL_INTERVAL;
}else{
_30=_2f;
}
return Math.floor((Math.random()*(_30/5))-(_30/10)+_30);
}
catch(ex){
jsExDebug("publicFile_randomiseWithinTenPercent",ex);
}
}
function publicFile_exportFormat(_31,_32){
function exportFileHandler(_33){
try{
if(!_33){
}
if(!_33.hasChildNodes()){
}
var _34;
var _35;
var _36;
var _37;
var i;
var _39=_33.getElementsByTagName("path");
if(_39.length){
_32.invoke(_39[0].firstChild.nodeValue);
return;
}else{
_32.invoke(false);
}
}
catch(ex){
jsExDebug("publicFile_export:exportFileHandler",ex);
}
}
try{
if(this.hasFileId){
var url="peepel_services.php?service=fileconversion";
var _3b="action=1&fileid="+this.fileid+"&filter="+_31;
this.SYSTEM.Network.request(url,_3b,exportFileHandler,this);
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("publicFile_exportFormat",ex);
}
}

try{
folder_t.prototype.constructor=folder_t;
folder_t.prototype.next=folder_next;
folder_t.prototype.reset=folder_reset;
folder_t.prototype.union=folder_union;
folder_t.prototype.intersection=folder_intersection;
}
catch(ex){
jsExDebug("folder_prototype",ex);
}
function folder_t(_1){
try{
var _2=0;
this.contents=[];
for(var i in _1){
this.contents[i]=_1[i];
_2++;
}
this.length=_2;
this.count=0;
}
catch(ex){
jsExDebug("folder_t",ex);
}
}
function folder_next(){
try{
var _4=0;
for(var i in this.contents){
if(this.count>this.length){
return false;
}
if((_4==this.count)&&this.contents[i].fileId){
this.count++;
return this.contents[i];
}else{
_4++;
}
}
}
catch(ex){
jsExDebug("folder_next",ex);
}
}
function folder_reset(){
try{
this.count=0;
}
catch(ex){
jsExDebug("folder_reset",ex);
}
}
function folder_union(_6){
try{
if(_6.contents){
var _7;
while(_7=_6.next()){
if(!this.contents[_7.fileId]){
this.contents[_7.fileId]=_7;
this.length++;
}
}
}
}
catch(ex){
jsExDebug("folder_union",ex);
}
}
function folder_intersection(_8){
try{
if(_8.contents){
var _9;
var _a;
var _b=[];
var _c=false;
_b=this.contents.slice();
this.contents=new Array();
this.length=0;
for(var _d in _b){
while(_a=_8.next()){
if(_b[_d].fileId==_a.fileId){
if(!this.contents[_d]){
this.contents[_d]=_a;
this.length++;
}
}
}
_8.reset();
}
this.reset();
}
}
catch(ex){
jsExDebug("folder_intersection",ex);
}
}

try{
fileregistry_t.prototype=new peepelObject_t();
fileregistry_t.prototype.constructor=fileregistry_t;
fileregistry_t.prototype.cleanUp=fileregistry_cleanUp;
fileregistry_t.prototype.fileregistry_super=peepelObject_t.prototype.constructor;
fileregistry_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
fileregistry_t.prototype.registerFile=fileregistry_registerFile;
fileregistry_t.prototype.unregisterFile=fileregistry_unregisterFile;
fileregistry_t.prototype.saveFile=fileregistry_saveFile;
fileregistry_t.prototype.loadFile=fileregistry_loadFile;
fileregistry_t.prototype.writeTokenHasBeenReleased=fileregistry_writeTokenHasBeenReleased;
fileregistry_t.prototype.setWriteTokenOwnerForFile=fileregistry_setWriteTokenOwnerForFile;
fileregistry_t.prototype.writeTokenHasBeenTaken=fileregistry_writeTokenHasBeenTaken;
fileregistry_t.prototype.readOnlyFileShare=fileregistry_readOnlyFileShare;
fileregistry_t.prototype.readWriteFileShare=fileregistry_readWriteFileShare;
fileregistry_t.prototype.fileUnshare=fileregistry_fileUnshare;
}
catch(ex){
jsExDebug("fileregistry:prototype",ex);
}
function fileregistry_t(){
try{
this.fileregistry_super();
this.registry=[];
this.latestIndex=1;
this.notificationObjectIndex=this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.COLLAB_SAVED_FILE,new delegate_t(this,this.loadFile,[0]));
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.COLLAB_TAKEN_WRITE,new delegate_t(this,this.writeTokenHasBeenTaken,[0,1]),this.notificationObjectIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.COLLAB_RELEASE_WRITE,new delegate_t(this,this.writeTokenHasBeenReleased,[0]),this.notificationObjectIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_SHARED_R_FILE,new delegate_t(this,this.readOnlyFileShare,[0]));
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_SHARED_RW_FILE,new delegate_t(this,this.readWriteFileShare,[0]),this.notificationObjectIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_UNSHARED_FILE,new delegate_t(this,this.fileUnshare,[0]),this.notificationObjectIndex);
}
catch(ex){
jsExDebug("fileregistry_t",ex);
}
}
function fileregistry_cleanUp(me){
try{
if(!me){
me=this;
}
for(var _2 in me.registry){
for(var i=0;i<me.registry[_2].length;i++){
me.registry[_2][i]=null;
}
me.registry[_2]=null;
}
me.registry=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("fileregistry_cleanUp",ex);
}
}
function fileregistry_registerFile(_4){
try{
if(!_4){
jsDebug("fileregistry_registerFile: no file obejct passed");
}
if(!_4.fileid){
jsDebug("fileregistry_registerFile: no file with id passed");
}
if(!this.registry[_4.fileid]){
this.registry[_4.fileid]=[];
}
this.registry[_4.fileid][this.latestIndex]=_4;
this.latestIndex++;
return this.latestIndex--;
}
catch(ex){
jsExDebug("fileregistry_registerFile",ex);
}
}
function fileregistry_unregisterFile(_5){
try{
if(!this.registry){
return;
}
if(!_5){
jsDebug("fileregistry_registerFile: no file object passed");
}
if(!_5.fileid){
jsDebug("fileregistry_registerFile: no file with id passed");
}
if(!_5.fileRegistryIndex){
return;
}
if(this.registry[_5.fileid]){
if(this.registry[_5.fileid][_5.fileRegistryIndex]){
this.registry[_5.fileid][_5.fileRegistryIndex]=null;
}
this.registry[_5.fileid]=[];
}
}
catch(ex){
jsExDebug("fileregistry_unregisterFile",ex);
}
}
function fileregistry_saveFile(_6){
}
function fileregistry_loadFile(_7){
}
function fileregistry_writeTokenHasBeenReleased(_8){
try{
var i;
var _a,_b;
if(this.registry[_8]){
for(i=1;i<this.registry[_8].length;i++){
if(this.registry[_8][i]){
var _c={};
_c.userId=null;
_c.userName=null;
_c.dateObtained=null;
_c.hasOwner=false;
_c.error=false;
this.registry[_8][i].setTokenOwner(_c);
this.registry[_8][i].loadRevision(null,true);
}
}
}
}
catch(ex){
jsExDebug("fileregistry_writeTokenHasBeenReleased",ex);
}
}
function fileregistry_setWriteTokenOwnerForFile(_d,_e){
try{
if(this.registry[_d]){
for(i=1;i<this.registry[_d].length;i++){
if(this.registry[_d][i]){
this.registry[_d][i].setTokenOwner(_e);
}
}
}
}
catch(ex){
jsExDebug("fileregistry_setWriteTokenOwnerForFile",ex);
}
}
function fileregistry_writeTokenHasBeenTaken(_f,_10){
function setTokenOwnerHandler(_11){
try{
if(this.registry==null){
}
var i;
for(i=1;i<this.registry[_f].length;i++){
if(this.registry[_f][i]){
this.registry[_f][i].setTokenOwner(_11);
}
}
}
catch(ex){
jsExDebug("setTokenOwnerHandler",ex);
}
}
function updateTokenOwner(){
try{
this.SYSTEM.Filesystem.getCurrentWriteTokenOwner(_f,new delegate_t(this,setTokenOwnerHandler));
}
catch(ex){
jsExDebug("updateTokenOwner",ex);
}
}
try{
var i;
var _14;
if(this.registry[_f]){
for(i=1;i<this.registry[_f].length;i++){
if(this.registry[_f][i]){
_14=this.registry[_f][i].getTokenOwner();
if(_14&&_14.hasOwner){
if(_14.userId==this.SYSTEM.UserDetails.id){
this.registry[_f][i].getDataAndSaveRevision(new delegate_t(this,updateTokenOwner));
return;
}
}
updateTokenOwner.call(this);
}
}
}
}
catch(ex){
jsExDebug("fileregistry_writeTokenHasBeenTaken",ex);
}
}
function fileregistry_readOnlyFileShare(_15){
try{
var _16=this.registry[_15];
if(_16){
for(var i=0;i<_16.length;i++){
if(_16[i]){
_16[i].fileaccess=this.SYSTEM.Filesystem.FILE_ACCESS_READ;
}
}
}
}
catch(ex){
jsExDebug("fileregistry_readOnlyFileShare",ex);
}
}
function fileregistry_readWriteFileShare(_18){
try{
var _19=this.registry[_18];
if(_19){
for(var i=0;i<_19.length;i++){
if(_19[i]){
_19[i].fileaccess=this.SYSTEM.Filesystem.FILE_ACCESS_WRITE;
}
}
}
}
catch(ex){
jsExDebug("fileregistry_readWriteFileShare",ex);
}
}
function fileregistry_fileUnshare(_1b){
try{
var _1c=this.registry[_1b];
if(_1c){
for(var i=0;i<_1c.length;i++){
if(_1c[i]){
_1c[i].fileaccess=this.SYSTEM.Filesystem.FILE_ACCESS_NONE;
}
}
}
}
catch(ex){
jsExDebug("fileregistry_fileUnshare",ex);
}
}

try{
filesystem_t.prototype=new peepelObject_t();
filesystem_t.prototype.constructor=filesystem_t;
filesystem_t.prototype.cleanup=filesystem_cleanup;
filesystem_t.prototype.filesystem_super=peepelObject_t.prototype.constructor;
filesystem_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
filesystem_t.prototype.getFolderContentsByName=filesystem_getFolderContentsByName;
filesystem_t.prototype.getFolderContentsByNames=filesystem_getFolderContentsByNames;
filesystem_t.prototype.getFolderContentsById=filesystem_getFolderContentsById;
filesystem_t.prototype.getFolderContentsByIds=filesystem_getFolderContentsByIds;
filesystem_t.prototype.getFolderContents=filesystem_getFolderContents;
filesystem_t.prototype.getFileFromFileId=filesystem_getFileFromFileId;
filesystem_t.prototype.getFileFromFileGuid=filesystem_getFileFromFileGuid;
filesystem_t.prototype.getRecentFiles=filesystem_getRecentFiles;
filesystem_t.prototype.refresh=filesystem_refresh;
filesystem_t.prototype.refreshRecentFiles=filesystem_refreshRecentFiles;
filesystem_t.prototype.addFolder=filesystem_addFolder;
filesystem_t.prototype.addFile=filesystem_addFile;
filesystem_t.prototype.createFile=filesystem_createFile;
filesystem_t.prototype.deleteFile=filesystem_deleteFile;
filesystem_t.prototype.renameFile=filesystem_renameFile;
filesystem_t.prototype.copyFileToFolder=filesystem_copyFileToFolder;
filesystem_t.prototype.deleteFileFromFolder=filesystem_deleteFileFromFolder;
filesystem_t.prototype.createFolder=filesystem_createFolder;
filesystem_t.prototype.renameFolder=filesystem_renameFolder;
filesystem_t.prototype.deleteFolder=filesystem_deleteFolder;
filesystem_t.prototype.registerSystemFolder=filesystem_registerSystemFolder;
filesystem_t.prototype.isSystemFolder=filesystem_isSystemFolder;
filesystem_t.prototype.getFolderIdFromName=filesystem_getFolderIdFromName;
filesystem_t.prototype.getFileNameFromId=filesystem_getFileNameFromId;
filesystem_t.prototype.getFileGuidFromId=filesystem_getFileGuidFromId;
filesystem_t.prototype.getFileTypeFromId=filesystem_getFileTypeFromId;
filesystem_t.prototype.setFileAccess=filesystem_setFileAccess;
filesystem_t.prototype.deleteFileAccess=filesystem_deleteFileAccess;
filesystem_t.prototype.setPublicAccess=filesystem_setPublicAccess;
filesystem_t.prototype.getPublicAccess=filesystem_getPublicAccess;
filesystem_t.prototype.findPublicFiles=filesystem_findPublicFiles;
filesystem_t.prototype.getPublicFileDetails=filesystem_getPublicFileDetails;
filesystem_t.prototype.getPublicFileDetailsFromGuid=filesystem_getPublicFileDetailsFromGuid;
filesystem_t.prototype.checkResponseSuccessHandler=filesystem_checkResponseSuccessHandler;
filesystem_t.prototype.isValidFileName=filesystem_isValidFileName;
filesystem_t.prototype.isValidFolderName=filesystem_isValidFolderName;
filesystem_t.prototype.ownsFile=filesystem_ownsFile;
filesystem_t.prototype.addFileUserEmail=filesystem_addFileUserEmail;
filesystem_t.prototype.addFileUser=filesystem_addFileUser;
filesystem_t.prototype.getUsersWithReadAccessById=filesystem_getUsersWithReadAccessById;
filesystem_t.prototype.getUsersWithReadWriteAccessById=filesystem_getUsersWithReadWriteAccessById;
filesystem_t.prototype.getUsersWithOwnerAccessById=filesystem_getUsersWithOwnerAccessById;
filesystem_t.prototype.getFilePermsisionsById=filesystem_getFilePermsisionsById;
filesystem_t.prototype.clearRecentFilesArray=filesystem_clearRecentFilesArray;
filesystem_t.prototype.checkInitialisation=filesystem_checkInitialisation;
filesystem_t.prototype.File=file_t;
filesystem_t.prototype.File.TYPE_SPREADSHEET=1;
filesystem_t.prototype.File.TYPE_WRITER=2;
filesystem_t.prototype.File.TYPE_IMAGE=3;
filesystem_t.prototype.PublicFile=publicFile_t;
filesystem_t.prototype.Folder=folder_t;
filesystem_t.prototype.takeWriteToken=filesystem_takeWriteToken;
filesystem_t.prototype.releaseWriteToken=filesystem_releaseWriteToken;
filesystem_t.prototype.isSharedFile=filesystem_isSharedFile;
filesystem_t.prototype.getCurrentWriteTokenOwner=filesystem_getCurrentWriteTokenOwner;
filesystem_t.prototype.FILESYSTEM_PATH="peepel_services.php?service=filesystem";
filesystem_t.prototype.NEW_FILE_FOLDER="File";
filesystem_t.prototype.FILE_ACCESS_NONE=0;
filesystem_t.prototype.FILE_ACCESS_VIEW=1;
filesystem_t.prototype.FILE_ACCESS_READ=2;
filesystem_t.prototype.FILE_ACCESS_WRITE=4;
filesystem_t.prototype.FILE_ACCESS_OWNER=8;
filesystem_t.prototype.FILE_ACCESS_MAX=15;
filesystem_t.prototype.ACTION_LOAD_FOLDER_CONTENTS=1;
filesystem_t.prototype.ACTION_LOAD_SYSTEM_FOLDERS=2;
filesystem_t.prototype.ACTION_NEW_FILE=3;
filesystem_t.prototype.ACTION_RENAME_FILE=4;
filesystem_t.prototype.ACTION_COPY_FILE=5;
filesystem_t.prototype.ACTION_REMOVE_FILE=6;
filesystem_t.prototype.ACTION_CREATE_FOLDER=7;
filesystem_t.prototype.ACTION_RENAME_FOLDER=8;
filesystem_t.prototype.ACTION_DELETE_FOLDER=9;
filesystem_t.prototype.ACTION_DELETE_FILE=10;
filesystem_t.prototype.ACTION_SET_ACCESS=11;
filesystem_t.prototype.ACTION_DELETE_ACCESS=12;
filesystem_t.prototype.ACTION_SET_WRITE_TOKEN_OWNER=13;
filesystem_t.prototype.ACTION_CLEAR_WRITE_TOKEN_OWNER=14;
filesystem_t.prototype.ACTION_CURRENT_WRITE_TOKEN_OWNER=15;
filesystem_t.prototype.ACTION_GET_RECENT_FILES=16;
filesystem_t.prototype.ACTION_SET_PUBLIC_ACCESS=17;
filesystem_t.prototype.ACTION_SEARCH_PUBLIC_FILES=18;
filesystem_t.prototype.ACTION_GET_PUBLIC_FILE_DETAILS=19;
filesystem_t.prototype.ACTION_GET_PUBLIC_FILE_FROM_GUID=20;
}
catch(ex){
jsExDebug("filesystem_prototype",ex);
}
function filesystem_t(){
try{
this.filesystem_super();
this.initialisedState=0;
this.initialised=false;
this.foldersInitialised=false;
this.fileUsers={};
this.fileUsers.read=[];
this.fileUsers.readWrite=[];
this.fileUsers.owner=[];
this.folders=[];
this.systemFolderRegistry=[];
this.recentFiles=[];
this.refreshCallback=null;
this.refreshInstance=null;
this.createFileCallback=null;
this.createFileInstance=null;
this.FileRegistry=new fileregistry_t();
this.notificationObjectIndex=this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_SHARED_R_FILE,new delegate_t(this,this.refresh,[null,null,null,0]));
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_SHARED_RW_FILE,new delegate_t(this,this.refresh,[null,null,null,0]),this.notificationObjectIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_UNSHARED_FILE,new delegate_t(this,this.refresh,[null,null,null,0]),this.notificationObjectIndex);
}
catch(ex){
jsExDebug("filesystem_t",ex);
}
}
function filesystem_cleanup(me){
try{
if(!me){
me=this;
}
for(var id in me.recentFiles){
me.recentFiles[id].name=null;
me.recentFiles[id].type=null;
me.recentFiles[id]=null;
}
me.recentFiles=null;
me.foldersInitialised=null;
for(var _3 in me.fileUsers){
for(var _4 in me.fileUsers[_3]){
for(var i in me.fileUsers[_3][_4]){
me.fileUsers[_3][_4][i]=null;
}
me.fileUsers[_3][_4]=null;
}
me.fileUsers[_3]=null;
}
me.fileUsers=null;
var _6={};
_6.contents=[];
_6.fileCount=0;
_6.folderId=_7;
_6.folderName=folderName;
this.folders[_7]=_6;
for(var _7 in me.folders){
me.folders[_7].fileCount=null;
me.folders[_7].folderId=null;
me.folders[_7].folderName=null;
for(var _4 in me.folders[_7].contents){
me.folders[_7].contents[_4]=null;
}
me.folders[_7].contents=null;
me.folders[_7]=null;
}
me.folders=null;
for(var _7 in me.systemFolderRegistry){
me.systemFolderRegistry[_7].folderId=null;
me.systemFolderRegistry[_7].folderName=null;
me.systemFolderRegistry[_7]=null;
}
me.systemFolderRegistry=null;
me.FileRegistry.cleanUp();
me.FileRegistry=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("filesystem_cleanup",ex);
}
}
function filesystem_getFolderContentsByName(_8){
try{
return this.getFolderContentsById(this.getFolderIdFromName(_8));
}
catch(ex){
jsExDebug("filesystem_getFolderContentsByName",ex);
}
}
function filesystem_getFolderContentsById(_9){
try{
if(this.folders[_9]){
return new this.Folder(this.folders[_9].contents);
}else{
return false;
}
}
catch(ex){
jsExDebug("filesystem_getFolderContentsById",ex);
}
}
function filesystem_getUsersWithReadAccessById(_a){
try{
if(this.fileUsers.read[_a]){
return this.fileUsers.read[_a];
}
return [];
}
catch(ex){
jsExDebug("filesystem_getFolderContentsById",ex);
}
}
function filesystem_getUsersWithReadWriteAccessById(_b){
try{
if(this.fileUsers.readWrite[_b]){
return this.fileUsers.readWrite[_b];
}
return [];
}
catch(ex){
jsExDebug("filesystem_getUsersWithReadWriteAccessById",ex);
}
}
function filesystem_getUsersWithOwnerAccessById(_c){
try{
if(this.fileUsers.owner[_c]){
return this.fileUsers.owner[_c];
}
return [];
}
catch(ex){
jsExDebug("filesystem_getUsersWithOwnerAccessById",ex);
}
}
function filesystem_getFolderContentsByIds(_d,_e,_f){
try{
if(_f){
var _10=_f;
}
if(_d){
for(var u=0;u<_d.length;u++){
if(!_10){
var _10=this.getFolderContentsById(_d[u]);
continue;
}else{
_10.union(this.getFolderContentsById(_d[u]));
}
}
}
if(_e){
for(var i=0;i<_e.length;i++){
if(!_10){
var _10=this.getFolderContentsById(_e[i]);
continue;
}else{
_10.intersection(this.getFolderContentsById(_e[i]));
}
}
}
return _10;
}
catch(ex){
jsExDebug("filesystem_getFolderContentsByIds",ex);
}
}
function filesystem_getFolderContentsByNames(_13,_14,_15){
try{
var i;
if(_15){
var _17=_15;
}else{
_17=false;
}
if(_13){
var _18=[];
for(i=0;i<_13.length;i++){
_18.push(this.getFolderIdFromName(_13[i]));
}
}else{
var _18=false;
}
if(_14){
var _19=[];
for(i=0;i<_14.length;i++){
_19.push(this.getFolderIdFromName(_14[i]));
}
}else{
var _19=false;
}
return this.getFolderContentsByIds(_18,_19,_17);
}
catch(ex){
jsExDebug("filesystem_getFolderContentsByNames",ex);
}
}
function filesystem_getFolderContents(){
try{
if(arguments){
if(arguments.length>0){
if(typeof (arguments[0])=="number"){
this.getFolderContentsById(arguments[0]);
}else{
if(typeof (arguments[0])=="string"){
this.getFolderContentsByName(arguments[0]);
}else{
if(arguments[0].length){
if(typeof (arguments[0][0])=="string"){
this.getFolderContentsByNames.apply(this,arguments);
}else{
if(typeof (arguments[0][0])=="number"){
this.getFolderContentsByIds.apply(this,arguments);
}
}
}
}
}
}
}
return false;
}
catch(ex){
jsExDebug("filesystem_getFolderContents",ex);
}
}
function filesystem_getFileFromFileId(_1a){
try{
if(this.folders[1]){
if(this.folders[1].contents){
if(this.folders[1].contents[_1a]){
return this.folders[1].contents[_1a];
}
}
}
}
catch(ex){
jsExDebug("filesystem_getFileFromFileId",ex);
}
}
function filesystem_getFileFromFileGuid(_1b){
try{
if(this.folders[1]){
if(this.folders[1].contents){
for(var id in this.folders[1].contents){
if(this.folders[1].contents[id]&&this.folders[1].contents[id].fileGuid==_1b){
return this.folders[1].contents[id];
}
}
}
}
}
catch(ex){
jsExDebug("filesystem_getFileFromFileGuid",ex);
}
}
function filesystem_getRecentFiles(){
try{
return this.recentFiles;
}
catch(ex){
jsExDebug("filesystem_getRecentFiles",ex);
}
}
function filesystem_refresh(_1d,_1e,_1f){
function refreshHandlerSystemFiles(_20,me){
try{
if(!_20){
}
if(!_20.hasChildNodes()){
}
delete me.systemFolderRegistry;
me.systemFolderRegistry=[];
var _22;
var _23,_24,_25;
var _26,_27,_28;
var i,j;
var _2b,_2c,_2d,_2e,_2f,_30,_31,_32,_33;
_22=_20.firstChild;
if((_22.nodeName=="filesystem")&&_22.hasChildNodes()){
_23=_22.childNodes;
for(i=0;i<_23.length;i++){
_26=_23[i];
if((_26.nodeName=="file")&&_26.hasChildNodes()&&_26.attributes){
if(_26.attributes.getNamedItem("id")){
_2b=_26.attributes.getNamedItem("id").nodeValue;
}
if(_26.attributes.getNamedItem("name")){
_2c=_26.attributes.getNamedItem("name").nodeValue;
}else{
_2c=""+_2b;
}
if(_26.attributes.getNamedItem("access")){
_2e=_26.attributes.getNamedItem("access").nodeValue;
}
if(_26.attributes.getNamedItem("type")){
_2d=parseInt(_26.attributes.getNamedItem("type").nodeValue);
}
if(_26.attributes.getNamedItem("guid")){
_33=_26.attributes.getNamedItem("guid").nodeValue;
}
_24=_26.childNodes;
for(j=0;j<_24.length;j++){
_27=_24[j];
if((_27.nodeName=="folder")&&_27.hasChildNodes()&&_27.attributes){
_2f=_27.firstChild.nodeValue;
if(_27.attributes.getNamedItem("id")){
_30=_27.attributes.getNamedItem("id").nodeValue;
}
me.addFile(_30,_2f,_2c,_2b,_2e,_2d,_33);
}
}
}else{
if((_26.nodeName=="folder")&&_26.hasChildNodes()&&_26.attributes){
_27=_23[i];
_2f=_27.firstChild.nodeValue;
if(_27.attributes.getNamedItem("id")){
_30=_27.attributes.getNamedItem("id").nodeValue;
}
me.addFolder(_30,_2f);
me.foldersInitialised=true;
}else{
if((_26.nodeName=="systemfolder")&&_26.hasChildNodes()&&_26.attributes){
_28=_23[i];
_31=_28.firstChild.nodeValue;
if(_28.attributes.getNamedItem("id")){
_32=_28.attributes.getNamedItem("id").nodeValue;
}
me.registerSystemFolder(_32,_31);
}
}
}
}
}
me.checkInitialisation();
if(_1d){
_1d(_1e);
}
}
catch(ex){
jsExDebug("filesystem_refresh:refreshHandlerSystemFiles",ex);
}
}
function refreshHandler(_34,me){
try{
if(!_34){
}
if(!_34.hasChildNodes()){
}
delete me.folders;
delete me.fileUsers;
me.fileUsers={};
me.fileUsers.read=[];
me.fileUsers.readWrite=[];
me.fileUsers.owner=[];
me.folders=[];
var _36=null;
var _37=null;
var _38=null;
var _39=null;
var i=null;
var j=null;
var _3c=null;
var _3d=null;
var _3e=null;
var _3f=null;
var _40=null;
var _41=null;
var _42=null;
var _43=null;
var _44=null;
var _45=null;
var _46=null;
var _47=_34.firstChild;
if((_47.nodeName=="filesystem")&&_47.hasChildNodes()){
for(i=0;i<_47.childNodes.length;i++){
_37=_47.childNodes[i];
if((_37.nodeName=="file")&&_37.hasChildNodes()&&_37.attributes){
if(_37.attributes.getNamedItem("id")){
_3c=_37.attributes.getNamedItem("id").nodeValue;
}
if(_37.attributes.getNamedItem("name")){
_3d=_37.attributes.getNamedItem("name").nodeValue;
}else{
_3d=""+_3c;
}
if(_37.attributes.getNamedItem("access")){
_42=_37.attributes.getNamedItem("access").nodeValue;
}
if(_37.attributes.getNamedItem("type")){
_3e=_37.attributes.getNamedItem("type").nodeValue;
}
if(_37.attributes.getNamedItem("loc")){
_3f=_37.attributes.getNamedItem("loc").nodeValue;
}
if(_37.attributes.getNamedItem("guid")){
_40=_37.attributes.getNamedItem("guid").nodeValue;
}
if(_37.attributes.getNamedItem("public")){
_41=_37.attributes.getNamedItem("public").nodeValue;
}
for(j=0;j<_37.childNodes.length;j++){
_38=_37.childNodes[j];
if((_38.nodeName=="folder")&&_38.hasChildNodes()&&_38.attributes){
_43=_38.firstChild.nodeValue;
if(_38.attributes.getNamedItem("id")){
_44=_38.attributes.getNamedItem("id").nodeValue;
}
me.addFile(_44,_43,_3d,_3c,_42,_3e,_3f,_40,_41);
}else{
if((_38.nodeName=="rw")&&_38.hasChildNodes()){
var _48=_38.getAttribute("userid");
var _49=_38.getAttribute("username");
me.addFileUser(_3c,false,true,false,_48,_49,_38.firstChild.nodeValue);
}else{
if((_38.nodeName=="r")&&_38.hasChildNodes()){
var _48=_38.getAttribute("userid");
var _49=_38.getAttribute("username");
me.addFileUser(_3c,true,false,false,_48,_49,_38.firstChild.nodeValue);
}else{
if((_38.nodeName=="o")&&_38.hasChildNodes()){
var _48=_38.getAttribute("userid");
var _49=_38.getAttribute("username");
me.addFileUser(_3c,false,false,true,_48,_49,_38.firstChild.nodeValue);
me.addFileUser(_3c,false,true,false,_48,_49,_38.firstChild.nodeValue);
}
}
}
}
}
}else{
if((_37.nodeName=="folder")&&_37.hasChildNodes()&&_37.attributes){
_38=_47.childNodes[i];
_43=_38.firstChild.nodeValue;
if(_38.attributes.getNamedItem("id")){
_44=_38.attributes.getNamedItem("id").nodeValue;
}
me.addFolder(_44,_43);
me.foldersInitialised=true;
}else{
if((_37.nodeName=="systemfolder")&&_37.hasChildNodes()&&_37.attributes){
_39=_47.childNodes[i];
_45=_39.firstChild.nodeValue;
if(_39.attributes.getNamedItem("id")){
_46=_39.attributes.getNamedItem("id").nodeValue;
}
me.registerSystemFolder(_46,_45);
}
}
}
}
}
me.checkInitialisation();
if(_1d){
_1d(_1e);
}
}
catch(ex){
jsExDebug("filesystem_refresh:refreshHandler",ex);
}
}
try{
this.SYSTEM.Network.request(this.FILESYSTEM_PATH+"&action="+this.ACTION_LOAD_FOLDER_CONTENTS,"",refreshHandler,this);
if(_1f){
this.SYSTEM.Network.request(this.FILESYSTEM_PATH+"&action="+this.ACTION_LOAD_SYSTEM_FOLDERS,"",refreshHandlerSystemFiles,this);
}
}
catch(ex){
jsExDebug("filesystem_refresh",ex);
}
}
function filesystem_refreshRecentFiles(_4a){
function getRecentFilesResponse(xml,me,_4d){
try{
if(!xml){
return;
}
me.clearRecentFilesArray(true);
var _4e=xml.getElementsByTagName("f");
for(var i=0;i<_4e.length;i++){
me.recentFiles[_4e[i].getAttribute("id")]={name:_4e[i].getAttribute("name"),type:parseInt(_4e[i].getAttribute("type"))};
}
if(_4a){
_4a.invoke(me.recentFiles);
}
}
catch(ex){
jsExDebug("filesystem_refreshRecentFiles: getRecentFilesResponse",ex);
}
}
try{
this.SYSTEM.Network.request(this.FILESYSTEM_PATH+"&action="+this.ACTION_GET_RECENT_FILES,"",getRecentFilesResponse,this);
}
catch(ex){
jsExDebug("filesystem_refreshRecentFiles",ex);
}
}
function filesystem_createFolder(_50,_51,_52){
function createFolderHandler(_53,me){
try{
if(!_53){
}
if(!_53.hasChildNodes()){
}
var _55;
var _56;
var i;
_55=_53.firstChild;
if((_55.nodeName=="filesystem")&&_55.hasChildNodes()){
_56=_55.childNodes;
for(i=0;i<_56.length;i++){
if(_56[i].nodeName=="folderId"){
if(_56[i].firstChild){
if(_56[i].firstChild.nodeValue){
var _58=_56[i].firstChild.nodeValue;
me.addFolder(_58,_50);
_51(_58,_52);
return;
}
}
}
}
}
_51(false,_52);
}
catch(ex){
jsExDebug("filesystem_createFolder:createFolderHandler",ex);
}
}
try{
if(this.isValidFolderName(_50)){
var _59="action="+this.ACTION_CREATE_FOLDER+"&name="+_50;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_59,createFolderHandler,this);
}else{
_51(false,_52);
}
}
catch(ex){
jsExDebug("filesystem_createFolder",ex);
}
}
function filesystem_renameFolder(_5a,_5b,_5c,_5d){
function renameFolderHandler(_5e,me){
try{
_5c(me.checkResponseSuccessHandler(_5e,me),_5d);
}
catch(ex){
jsExDebug("filesystem_renameFolder:renameFolderHandler",ex);
}
}
try{
if(this.isValidFolderName(_5b)){
var _60="action="+this.ACTION_RENAME_FOLDER+"&folderids="+_5a+"&name="+_5b;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_60,renameFolderHandler,this);
}else{
_5c(false,_5d);
}
}
catch(ex){
jsExDebug("filesystem_renameFolder",ex);
}
}
function filesystem_deleteFolder(_61,_62,_63){
function deleteFolderHandler(_64,me){
try{
_62(me.checkResponseSuccessHandler(_64,me),_63);
}
catch(ex){
jsExDebug("filesystem_deleteFolder:deleteFolderHandler",ex);
}
}
try{
var _66="action="+this.ACTION_DELETE_FOLDER+"&folderids="+_61;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_66,deleteFolderHandler,this);
}
catch(ex){
jsExDebug("filesystem_deleteFolder",ex);
}
}
function filesystem_addFolder(_67,_68){
try{
if(!this.folders[_67]){
var _69={};
_69.contents=[];
_69.fileCount=0;
_69.folderId=_67;
_69.folderName=_68;
this.folders[_67]=_69;
}
}
catch(ex){
jsExDebug("filesystem_addFolder",ex);
}
}
function filesystem_addFile(_6a,_6b,_6c,_6d,_6e,_6f,_70,_71,_72){
try{
this.addFolder(_6a,_6b);
if(!this.folders[_6a].contents[_6d]){
var _73={};
_73.fileName=_6c;
_73.fileId=_6d;
_73.filePermissions=_6e;
_73.fileType=_6f;
_73.location=_70;
_73.fileGuid=_71;
_73.publicAccess=_72;
this.folders[_6a].contents[_6d]=_73;
this.folders[_6a].fileCount++;
}
}
catch(ex){
jsExDebug("filesystem_addFile",ex);
}
}
function filesystem_isSharedFile(_74){
try{
var sum=0;
var _76=2;
if(this.fileUsers.read){
if(this.fileUsers.read[_74]){
sum+=this.fileUsers.read[_74].length;
}
}
if(this.fileUsers.readWrite){
if(this.fileUsers.readWrite[_74]){
sum+=this.fileUsers.readWrite[_74].length;
}
}
if(this.fileUsers.owner){
if(this.fileUsers.owner[_74]){
sum+=this.fileUsers.owner[_74].length;
}
}
if(this.folders[1].contents[_74]){
if(this.folders[1].contents[_74].publicAccess==this.FILE_ACCESS_READ){
sum++;
}
}
if(sum>_76){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("filesystem_isSharedFile",ex);
}
}
function filesystem_takeWriteToken(_77,_78){
function takeWriteTokenCallback(_79,me){
try{
var _7b;
if(_78){
_7b=me.checkResponseSuccessHandler(_79,me);
if(_7b){
var _7c={};
_7c.userId=me.SYSTEM.UserDetails.id;
_7c.userName=me.SYSTEM.UserDetails.userName;
_7c.dateObtained=null;
_7c.hasOwner=true;
_7c.error=false;
me.FileRegistry.setWriteTokenOwnerForFile(_77,_7c);
}
_78.invoke(_7b);
}
}
catch(ex){
jsExDebug("filesystem_takeWriteToken: takeWriteTokenCallback",ex);
}
}
try{
if(_77){
var _7d="action="+this.ACTION_SET_WRITE_TOKEN_OWNER+"&fileid="+_77;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_7d,takeWriteTokenCallback,this);
}else{
_78.invoke(false);
}
}
catch(ex){
jsExDebug("filesystem_takeWriteToken",ex);
}
}
function filesystem_releaseWriteToken(_7e,_7f){
function releaseWriteTokenCallback(_80,me){
try{
if(_7f){
_7f.invoke(me.checkResponseSuccessHandler(_80,me));
}
}
catch(ex){
jsExDebug("filesystem_releaseWriteToken: releaseWriteTokenCallback",ex);
}
}
try{
if(_7e){
var _82="action="+this.ACTION_CLEAR_WRITE_TOKEN_OWNER+"&fileid="+_7e;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_82,releaseWriteTokenCallback,this);
}else{
_7f.invoke(false);
}
}
catch(ex){
jsExDebug("filesystem_releaseWriteToken",ex);
}
}
function filesystem_getCurrentWriteTokenOwner(_83,_84){
function getCurrentWriteTokenOwnerCallback(_85,me){
try{
if(!_85){
}
if(!_85.hasChildNodes()){
}
var _87=_85.firstChild;
var _88;
var _89;
var _8a={};
_8a.userId=false;
_8a.userName=false;
_8a.error=false;
_8a.hasOwner=false;
_8a.dateObtained=false;
if(_87.hasChildNodes()){
_88=_87.childNodes[0];
do{
if(_88.nodeName=="wo"&&_88.attributes){
var _8b=_88;
if(_8b.attributes.getNamedItem("u")){
_8a.userId=_8b.attributes.getNamedItem("u").nodeValue;
}
if(_8b.attributes.getNamedItem("n")){
_8a.userName=_8b.attributes.getNamedItem("n").nodeValue;
}
if(_8b.attributes.getNamedItem("d")){
_8a.dateObtained=_8b.attributes.getNamedItem("d").nodeValue;
}
_8a.hasOwner=true;
break;
}else{
if(_88.nodeName=="no"){
_8a.hasOwner=false;
break;
}else{
_8a.error=true;
}
}
}while(_88=_88.nextSibling);
}
if(_84){
_84.invoke(_8a);
}
}
catch(ex){
jsExDebug("filesystem_getCurrentWriteTokenOwner: getCurrentWriteTokenOwnerCallback",ex);
}
}
try{
if(_83){
var _8c="action="+this.ACTION_CURRENT_WRITE_TOKEN_OWNER+"&fileid="+_83;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_8c,getCurrentWriteTokenOwnerCallback,this);
}else{
_84.invoke(false);
}
}
catch(ex){
jsExDebug("filesystem_getCurrentWriteTokenOwner",ex);
}
}
function filesystem_addFileUserEmail(_8d,_8e,_8f,_90,_91){
try{
if(_8f){
if(!this.fileUsers.readWrite[_8d]){
this.fileUsers.readWrite[_8d]=[];
}
this.fileUsers.readWrite[_8d].push(_91);
return;
}
if(_8e){
if(!this.fileUsers.read[_8d]){
this.fileUsers.read[_8d]=[];
}
this.fileUsers.read[_8d].push(_91);
return;
}
if(_90){
if(!this.fileUsers.owner[_8d]){
this.fileUsers.owner[_8d]=[];
}
this.fileUsers.owner[_8d].push(_91);
return;
}
}
catch(ex){
jsExDebug("filesystem_addFileUserEmail",ex);
}
}
function filesystem_addFileUser(_92,_93,_94,_95,_96,_97,_98){
try{
var _99={userId:_96,userName:_97,email:_98};
if(_94){
if(!this.fileUsers.readWrite[_92]){
this.fileUsers.readWrite[_92]=[];
}
this.fileUsers.readWrite[_92].push(_99);
return;
}
if(_93){
if(!this.fileUsers.read[_92]){
this.fileUsers.read[_92]=[];
}
this.fileUsers.read[_92].push(_99);
return;
}
if(_95){
if(!this.fileUsers.owner[_92]){
this.fileUsers.owner[_92]=[];
}
this.fileUsers.owner[_92].push(_99);
return;
}
}
catch(ex){
jsExDebug("filesystem_addFileUser",ex);
}
}
function filesystem_createFile(_9a,_9b,_9c,_9d,_9e){
function createFileRefreshHandler(_9f,me){
try{
_9a(_a1,_9b);
}
catch(ex){
jsExDebug("createFileRefreshHandler",ex);
}
}
function createFileHandler(_a2,me){
try{
if(!_a2){
}
if(!_a2.hasChildNodes()){
}
var _a4;
var _a5;
var _a6=false;
var i;
_a4=_a2.firstChild;
if((_a4.nodeName=="filesystem")&&_a4.hasChildNodes()){
_a5=_a4.childNodes;
for(i=0;i<_a5.length;i++){
if((_a5[i].nodeName=="fileid")&&_a5[i].hasChildNodes()){
if(_a5[i].firstChild.nodeValue){
_a6=_a5[i].firstChild.nodeValue;
break;
}
}
}
}
if(_a6){
me.addFile(me.NEW_FILE_FOLDER,"",_a6,me.FILE_ACCESS_MAX);
}
_a1=_a6;
me.refresh(createFileRefreshHandler,me,false);
}
catch(ex){
jsExDebug("filesystem_createFile:createFileHandler",ex);
}
}
try{
var _a1;
var _a8="&folderids=";
var _a9="&name=";
var _aa="&type=";
var _ab=",";
if(_9c){
if(_9c.length){
if(_9c.length>0){
for(var i=0;i<_9c.length;i++){
if(i==(_9c.length-1)){
_ab="";
}
_a8+=_9c[i]+_ab;
}
}else{
_a8="";
}
}else{
_a8="";
}
}else{
_a8="";
}
if(_9d){
if(this.isValidFileName(_9d)){
_a9+=_9d;
}else{
_9a(false,_9b,true);
return;
}
}else{
_a9="";
}
if(_9e){
_aa+=_9e;
}else{
_aa="";
}
var _ad="action="+this.ACTION_NEW_FILE+_a8+_a9+_aa;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_ad,createFileHandler,this);
}
catch(ex){
jsExDebug("filesystem_createFile",ex);
}
}
function filesystem_deleteFile(_ae,_af,_b0){
function deleteFileHandler(_b1,me){
try{
_af(me.checkResponseSuccessHandler(_b1,me),_b0);
}
catch(ex){
jsExDebug("filesystem_deleteFile:deleteFileHandler",ex);
}
}
try{
var _b3="action="+this.ACTION_DELETE_FILE+"&fileid="+_ae;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_b3,deleteFileHandler,this);
}
catch(ex){
jsExDebug("filesystem_deleteFile",ex);
}
}
function filesystem_renameFile(_b4,_b5,_b6,_b7){
function renameFileHandler(_b8,me){
try{
if(!_b8){
}
if(!_b8.hasChildNodes()){
}
var _ba;
var _bb;
var _bc=false;
var _bd="";
var i,j;
_ba=_b8.firstChild;
if((_ba.nodeName=="filesystem")&&_ba.hasChildNodes()){
_bb=_ba.childNodes;
for(i=0;i<_bb.length;i++){
if((_bb[i].nodeName=="filename")&&(_bb[i].hasChildNodes())){
if(_bb[i].firstChild.nodeValue){
_bd=_bb[i].firstChild.nodeValue;
continue;
}
}
if((_bb[i].nodeName=="fileid")&&(_bb[i].hasChildNodes())){
if(_bb[i].firstChild.nodeValue){
_bc=_bb[i].firstChild.nodeValue;
continue;
}
}
}
}
if(_bc){
var _c0=me.folders;
for(i in _c0){
for(j in _c0[i].contents){
if(_c0[i].contents[j].fileId==_bc){
_c0[i].contents[j].fileName=_bd;
}
}
}
}
if(_b6){
_b6(_bc,_b7);
}
}
catch(ex){
jsExDebug("filesystem_renameFile:renameFileHandler",ex);
}
}
try{
if(this.isValidFileName(_b5)){
var _c1="action="+this.ACTION_RENAME_FILE+"&fileid="+_b4+"&name="+_b5;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_c1,renameFileHandler,this);
}else{
if(_b6){
_b6(false,_b7);
}
}
}
catch(ex){
jsExDebug("filesystem_renameFile",ex);
}
}
function filesystem_getFilePermsisionsById(_c2){
try{
if(this.folders[1]){
if(this.folders[1].contents){
if(this.folders[1].contents[_c2]){
if(this.folders[1].contents[_c2].filePermissions){
return this.folders[1].contents[_c2].filePermissions;
}
}
}
}
return this.FILE_ACCESS_NONE;
}
catch(ex){
jsExDebug("filesystem_getFilePermsisionsById",ex);
}
}
function filesystem_copyFileToFolder(_c3,_c4,_c5,_c6){
function copyFileToFolderHandler(_c7,me){
try{
if(_c5){
_c5(me.checkResponseSuccessHandler(_c7,me),_c6);
}
}
catch(ex){
jsExDebug("filesystem_copyFileToFolder:copyFileToFolderHandler",ex);
}
}
try{
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,"action="+this.ACTION_COPY_FILE+"&fileid="+_c3+"&folderids="+_c4,copyFileToFolderHandler,this);
}
catch(ex){
jsExDebug("filesystem_copyFileToFolder",ex);
}
}
function filesystem_deleteFileFromFolder(_c9,_ca,_cb,_cc){
function deleteFileFromFolderHandler(_cd,me){
try{
_cb(me.checkResponseSuccessHandler(_cd,me),_cc);
}
catch(ex){
jsExDebug("filesystem_copyFileToFolder:deleteFileFromFolderHandler",ex);
}
}
try{
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,"action="+this.ACTION_REMOVE_FILE+"&fileid="+_c9+"&folderids="+_ca,deleteFileFromFolderHandler,this);
}
catch(ex){
jsExDebug("filesystem_deleteFileFromFolder",ex);
}
}
function filesystem_setFileAccess(_cf,_d0,_d1,_d2,_d3,_d4){
function setFileAccessHandler(xml,me,_d7){
try{
if(_d4){
if(getChildNode(xml,"invaliduser",0)){
_d4.invoke(false);
}else{
if(getNodeValue(xml,"success")=="0"){
_d4.invoke(true);
}
}
}
}
catch(ex){
jsExDebug("setFileAccessHandler",ex);
}
}
try{
if(!this.ownsFile(_cf)){
_d4.invoke(false);
}
var _d8="action="+this.ACTION_SET_ACCESS;
if(_d1){
if(_d1.toString().length>0){
_d8+="&userid="+_d1;
}
}else{
if(_d2){
if(_d2.toString().length>0){
_d8+="&username="+_d2;
}
}else{
if(_d3.toString().length>0){
_d8+="&email="+_d3;
}else{
if(_d4){
_d4.invoke(false);
}
return;
}
}
}
_d8+="&fileid="+_cf+"&access="+_d0;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_d8,new delegate_t(this,setFileAccessHandler));
}
catch(ex){
jsExDebug("filesystem_setFileAccess",ex);
}
}
function filesystem_deleteFileAccess(_d9,_da,_db,_dc,_dd){
function deleteFileAccessHandler(_de,me,_e0){
try{
var _e1;
var _e2;
if(!_de){
}
if(!_de.hasChildNodes()){
}
_e1=_de.firstChild;
if(_e1.hasChildNodes()){
_e2=_e1.firstChild;
if(_e2.nodeName=="success"){
if(_dd){
_dd.invoke(true);
}
}else{
if(_dd){
_dd.invoke(false);
}
}
}
}
catch(ex){
jsExDebug("deleteFileAccessHandler",ex);
}
}
try{
if(!this.ownsFile(_d9)){
if(_dd){
_dd.invoke(false);
}
}
var _e3="action="+this.ACTION_DELETE_ACCESS;
if(_da){
if(_da.toString().length>0){
_e3+="&userid="+_da;
}
}else{
if(_db&&_db.toString().length>0){
_e3+="&username="+_db;
}else{
if(_dc.toString().length>0){
_e3+="&email="+_dc;
}else{
if(_dd){
_dd.invoke(false);
}
return;
}
}
}
_e3+="&fileid="+_d9;
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,_e3,new delegate_t(this,deleteFileAccessHandler));
}
catch(ex){
jsExDebug("filesystem_deleteFileAccess",ex);
}
}
function filesystem_setPublicAccess(_e4,_e5,_e6){
function response(xml,me){
try{
if(getNodeValue(xml,"success")=="0"&&_e6){
me.folders[1].contents[_e4].publicAccess=_e5;
_e6.invoke();
}
}
catch(ex){
jsExDebug("filesystem_setPublicAccess: response",ex);
}
}
try{
if(this.folders[1].contents[_e4]){
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,"action="+this.ACTION_SET_PUBLIC_ACCESS+"&fileid="+_e4+"&access="+_e5,response,this);
}
}
catch(ex){
jsExDebug("filesystem_setPublicAccess",ex);
}
}
function filesystem_getPublicAccess(_e9){
try{
if(this.folders[1].contents[_e9]){
return this.folders[1].contents[_e9].publicAccess;
}
}
catch(ex){
jsExDebug("filesystem_getPublicAccess",ex);
}
}
function filesystem_findPublicFiles(_ea,_eb){
function response(xml,me){
try{
if(getNodeValue(xml,"success")=="0"&&_eb){
var _ee=getChildNode(xml,"pf");
var _ef=[];
for(var i=0;i<_ee.length;i++){
_ef.push({fileId:parseFloat(_ee[i].getAttribute("id")),fileName:_ee[i].getAttribute("name"),fileAccess:_ee[i].getAttribute("access"),fileType:parseFloat(_ee[i].getAttribute("type")),location:_ee[i].getAttribute("loc"),fileGuid:_ee[i].getAttribute("guid"),isPublic:true});
}
_eb.invoke(_ef);
}
}
catch(ex){
jsExDebug("filesystem_setPublicAccess: response",ex);
}
}
try{
if(_ea&&_ea.length){
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,"action="+this.ACTION_SEARCH_PUBLIC_FILES+"&name="+_ea,response,this);
}
}
catch(ex){
jsExDebug("filesystem_findPublicFiles",ex);
}
}
function filesystem_getPublicFileDetails(_f1,_f2){
function response(xml,me){
try{
if(getNodeValue(xml,"success")=="0"&&_f2){
var _f5=getChildNode(xml,"f",0);
_f2.invoke(_f5.getAttribute("name"),parseFloat(_f5.getAttribute("type")),_f5.getAttribute("guid"),_f5.getAttribute("loc"));
}
}
catch(ex){
jsExDebug("filesystem_getPublicFileDetails: response",ex);
}
}
try{
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,"action="+this.ACTION_GET_PUBLIC_FILE_DETAILS+"&fileid="+_f1,response,this);
}
catch(ex){
jsExDebug("filesystem_getPublicFileDetails",ex);
}
}
function filesystem_getPublicFileDetailsFromGuid(_f6,_f7){
function response(xml,me){
try{
if(getNodeValue(xml,"success")=="0"&&_f7){
var _fa=getChildNode(xml,"f",0);
if(_fa){
_f7.invoke(parseFloat(_fa.getAttribute("id")),_fa.getAttribute("name"),parseFloat(_fa.getAttribute("type")));
}else{
_f7.invoke(false);
}
}
}
catch(ex){
jsExDebug("filesystem_getPublicFileIdFromGuid: response",ex);
}
}
try{
this.SYSTEM.Network.request(this.FILESYSTEM_PATH,"action="+this.ACTION_GET_PUBLIC_FILE_FROM_GUID+"&guid="+_f6,response,this);
}
catch(ex){
jsExDebug("filesystem_getPublicFileDetailsFromGuid",ex);
}
}
function filesystem_registerSystemFolder(_fb,_fc){
try{
var _fd={};
_fd.folderId=_fb;
_fd.folderName=_fc;
this.systemFolderRegistry[_fb]=_fd;
}
catch(ex){
jsExDebug("filesystem_registerSystemFolder",ex);
}
}
function filesystem_checkResponseSuccessHandler(_fe,me){
try{
if(!_fe){
}
if(!_fe.hasChildNodes()){
}
var _100;
var _101;
var i;
_100=_fe.firstChild;
if(_100&&(_100.nodeName=="filesystem")&&_100.hasChildNodes()){
_101=_100.childNodes;
for(i=_101.length-1;i>=0;i--){
if(_101[i].nodeName=="success"){
return true;
}
}
}
return false;
}
catch(ex){
jsExDebug("filesystem_checkResponseSuccessHandler",ex);
}
}
function filesystem_isValidFileName(_103){
try{
var _104=/[\?\*\+\/\\\$\(\)\[\]\{\}\|;:,%@&'"]/g;
if(_104.test(_103)){
return false;
}else{
return true;
}
}
catch(ex){
jsExDebug("file_isValidFileName",ex);
}
}
function filesystem_isValidFolderName(_105){
try{
if(this.isValidFileName(_105)){
for(var i in this.systemFolderRegistry){
if(this.systemFolderRegistry[i].folderName==_105){
return false;
}
}
for(var i in this.folders){
if(this.folders[i].folderName==_105){
return false;
}
}
return true;
}
return false;
}
catch(ex){
jsExDebug("file_isValidFileName",ex);
}
}
function filesystem_ownsFile(_107){
try{
if(this.folders[1]){
if(this.folders[1].contents){
if(this.folders[1].contents[_107]){
if(this.folders[1].contents[_107].filePermissions>=this.FILE_ACCESS_OWNER){
return true;
}
}
}
}
return false;
}
catch(ex){
jsExDebug("filesystem_ownsFile",ex);
}
}
function filesystem_isSystemFolder(_108){
try{
if(this.systemFolderRegistry[_108]){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("filesystem_isSystemFolder",ex);
}
}
function filesystem_getFilesInFolder(_109){
try{
if(this.folders[_109]){
return this.folders[_109].fileCount;
}else{
return false;
}
}
catch(ex){
jsExDebug("filesystem_getFilesInFolder",ex);
}
}
function filesystem_getFileNameFromId(_10a){
try{
if(this.folders[1]){
if(this.folders[1].contents){
if(this.folders[1].contents[_10a]){
return this.folders[1].contents[_10a].fileName;
}
}
}
return false;
}
catch(ex){
jsExDebug("filesystem_getFileNameFromId",ex);
}
}
function filesystem_getFileGuidFromId(_10b){
try{
if(this.folders[1]){
if(this.folders[1].contents){
if(this.folders[1].contents[_10b]){
return this.folders[1].contents[_10b].fileGuid;
}
}
}
return false;
}
catch(ex){
jsExDebug("filesystem_getFileGuidFromId",ex);
}
}
function filesystem_getFolderIdFromName(_10c){
try{
for(var i in this.folders){
if(this.folders[i].folderName){
if(this.folders[i].folderName.toString().toLowerCase()==_10c.toString().toLowerCase()){
return this.folders[i].folderId;
}
}
}
return false;
}
catch(ex){
jsExDebug("filesystem_getFolderIdFromName",ex);
}
}
function filesystem_getFileTypeFromId(_10e){
try{
if(this.folders[1]){
if(this.folders[1].contents){
if(this.folders[1].contents[_10e]){
return this.folders[1].contents[_10e].fileType;
}
}
}
return false;
}
catch(ex){
jsExDebug("filesystem_getFileTypeById",ex);
}
}
function filesystem_clearRecentFilesArray(_10f){
try{
for(var id in this.recentFiles){
this.recentFiles[id].name=null;
this.recentFiles[id].type=null;
this.recentFiles[id]=null;
}
if(_10f){
this.recentFiles=[];
}else{
this.recentFiles=null;
}
}
catch(ex){
jsExDebug("filesystem_clearRecentFilesArray",ex);
}
}
function filesystem_checkInitialisation(){
try{
this.initialisedState++;
switch(this.initialisedState){
case 1:
this.initialised=false;
break;
case 2:
this.initialised=true;
break;
}
}
catch(ex){
jsExDebug("filesystem_checkInitialisation",ex);
}
}

try{
contacts_t.prototype=new actionListener_t();
contacts_t.prototype.constructor=contacts_t;
contacts_t.prototype.cleanUp=contacts_cleanUp;
contacts_t.prototype.contacts_super=actionListener_t.prototype.constructor;
contacts_t.prototype.actionListener_cleanUp=actionListener_t.prototype.cleanUp;
contacts_t.prototype.refresh=contacts_refresh;
contacts_t.prototype.refreshReceived=contacts_refreshReceived;
contacts_t.prototype.refreshContact=contacts_refreshContact;
contacts_t.prototype.sendRequest=contacts_sendRequest;
contacts_t.prototype.acceptRequest=contacts_acceptRequest;
contacts_t.prototype.rejectRequest=contacts_rejectRequest;
contacts_t.prototype.blockContact=contacts_blockContact;
contacts_t.prototype.removeContact=contacts_removeContact;
contacts_t.prototype.unblockContact=contacts_unblockContact;
contacts_t.prototype.getRequestingContacts=contacts_getRequestingContacts;
contacts_t.prototype.getRequestedContacts=contacts_getRequestedContacts;
contacts_t.prototype.getAcceptedContacts=contacts_getAcceptedContacts;
contacts_t.prototype.getBlockedContacts=contacts_getBlockedContacts;
contacts_t.prototype.isAccepted=contacts_isAccepted;
contacts_t.prototype.getContactIdFromName=contacts_getContactIdFromName;
contacts_t.prototype.getContactIdFromEmail=contacts_getContactIdFromEmail;
contacts_t.prototype.getContactFromUserId=contacts_getContactFromUserId;
contacts_t.prototype.getAnyContact=contacts_getAnyContact;
contacts_t.prototype.getContactLocation=contacts_getContactLocation;
contacts_t.prototype.getContact=contacts_getContact;
contacts_t.prototype.getContactUserName=contacts_getContactUserName;
contacts_t.prototype.getContactIdFromUserId=contacts_getContactIdFromUserId;
contacts_t.prototype.setContactTrackStatus=contacts_setContactTrackStatus;
contacts_t.prototype.getContactTrackStatusFromUsername=contacts_getContactTrackStatusFromUsername;
contacts_t.prototype.getContactAcceptedContacts=contacts_getContactAcceptedContacts;
contacts_t.prototype.getContactUserId=contacts_getContactUserId;
contacts_t.prototype.isContact=contacts_isContact;
contacts_t.prototype.saveContactMeta=contacts_saveContactMeta;
contacts_t.prototype.clearArrays=contacts_clearArrays;
contacts_t.prototype.insertInto=contacts_insertInto;
contacts_t.prototype.removeContactFromList=contacts_removeContactFromList;
contacts_t.prototype.avatarChangeNotificationCallback=contacts_avatarChangeNotificationCallback;
contacts_t.prototype.requestNotificationCallback=contacts_requestNotificationCallback;
contacts_t.prototype.acceptNotificationCallback=contacts_acceptNotificationCallback;
contacts_t.prototype.unblockNotificationCallback=contacts_unblockNotificationCallback;
contacts_t.prototype.removeNotificationCallback=contacts_removeNotificationCallback;
contacts_t.prototype.userNameChangeNotificationCallback=contacts_userNameChangeNotificationCallback;
contacts_t.prototype.miscNotificationCallback=contacts_miscNotificationCallback;
contacts_t.prototype.SERVICE_PATH="peepel_services.php?service=usercontacts";
contacts_t.prototype.TRACKING_SERVICE_PATH="peepel_services.php?service=tracking";
contacts_t.prototype.ACTION_READ=1;
contacts_t.prototype.ACTION_REQUEST=2;
contacts_t.prototype.ACTION_RESPOND=3;
contacts_t.prototype.ACTION_REMOVE=4;
contacts_t.prototype.ACTION_BLOCK=5;
contacts_t.prototype.ACTION_UNBLOCK=6;
contacts_t.prototype.ACTION_READ_CONTACT=7;
contacts_t.prototype.ACTION_READ_RECEIVED=8;
contacts_t.prototype.ACTION_SET_AVATAR=9;
contacts_t.prototype.ACTION_SEARCH_FOR_USER=10;
contacts_t.prototype.ACTION_SET_TRACK_STATUS=11;
contacts_t.prototype.ACTION_SET_META=14;
contacts_t.prototype.ACTION_GET_USER_LOCATION=2;
contacts_t.prototype.ACTION_GET_CONTACT_LOCATION_HISTORY=3;
contacts_t.prototype.STATUS_REQUEST_SENT=1;
contacts_t.prototype.STATUS_REQUEST_RECEIVED=2;
contacts_t.prototype.STATUS_ACCEPTED=3;
contacts_t.prototype.STATUS_REJECT_SENT=4;
contacts_t.prototype.STATUS_REJECT_RECEIVED=5;
contacts_t.prototype.STATUS_BLOCK_SENT=6;
contacts_t.prototype.STATUS_BLOCK_RECEIVED=7;
contacts_t.prototype.REPLY_ACCEPT=1;
contacts_t.prototype.REPLY_REJECT=2;
contacts_t.prototype.TRACKING_STATUS_OFF=0;
contacts_t.prototype.TRACKING_STATUS_ACQUAINTANCE=5;
contacts_t.prototype.TRACKING_STATUS_FRIEND=10;
contacts_t.prototype.TRACKING_STATUS_TRUSTED=15;
contacts_t.prototype.TRACK_STATUS_OBFUSCATION=[];
contacts_t.prototype.TRACK_STATUS_OBFUSCATION[contacts_t.prototype.TRACKING_STATUS_OFF]=-1;
contacts_t.prototype.TRACK_STATUS_OBFUSCATION[contacts_t.prototype.TRACKING_STATUS_ACQUAINTANCE]=5000;
contacts_t.prototype.TRACK_STATUS_OBFUSCATION[contacts_t.prototype.TRACKING_STATUS_FRIEND]=2000;
contacts_t.prototype.TRACK_STATUS_OBFUSCATION[contacts_t.prototype.TRACKING_STATUS_TRUSTED]=0;
}
catch(ex){
jsExDebug("contacts_t.prototype",ex);
}
function contacts_t(){
try{
this.contacts_super();
this.requestedContacts=[];
this.requestingContacts=[];
this.acceptedContacts=[];
this.blockedContacts=[];
this.contactsBlockedBy=[];
this.contactsRejectedBy=[];
this.contactsFromName=[];
this.contactsFromUserId=[];
var _1=new this.SYSTEM.Delegate(this,this.refreshContact,[0]);
this.notifierIndex=this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.USER_AVATAR_CHANGE,new this.SYSTEM.Delegate(this,this.avatarChangeNotificationCallback,[0,1]));
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_REQUEST,new this.SYSTEM.Delegate(this,this.requestNotificationCallback,[0]),this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_ACCEPT,new this.SYSTEM.Delegate(this,this.acceptNotificationCallback,[0,1]),this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_REJECT,_1,this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_BLOCK,_1,this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_UNBLOCK,new this.SYSTEM.Delegate(this,this.unblockNotificationCallback,[0]),this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_REMOVE,new this.SYSTEM.Delegate(this,this.removeNotificationCallback,[0]),this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_TRACK_STATUS,_1,this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_MISC,new this.SYSTEM.Delegate(this,this.miscNotificationCallback),this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.USER_NAME_CHANGE,new this.SYSTEM.Delegate(this,this.userNameChangeNotificationCallback,[0]),this.notifierIndex);
this.initialised=false;
}
catch(ex){
jsExDebug("contacts_t",ex);
}
}
function contacts_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.Notifier){
me.SYSTEM.Notifier.unregisterActionListener(me.notifierIndex);
me.notifierIndex=null;
}
me.clearArrays();
me.initialised=null;
if(me==SYSTEM.Contacts){
SYSTEM.Contacts=null;
}
me.actionListener_cleanUp();
}
catch(ex){
jsExDebug("contacts_cleanUp",ex);
}
}
function contacts_refresh(_3){
var me=this;
function complete(){
try{
if(!this.initialised){
this.initialised=true;
}
if(_3){
_3.invoke();
}
this.invokeActionListeners(this.ACTION_READ);
}
catch(ex){
jsExDebug("contacts_refresh: complete",ex);
}
}
function refreshCallback(_5,me,_7){
try{
if(!_5){
jsDebug("contacts_refresh: refreshCallback - No xml in response. "+_7);
}
if(!_5.hasChildNodes()){
jsDebug("contacts_refresh: refreshCallback - No xml in response. "+_7);
}
me.clearArrays(true);
var _8=_5.firstChild;
var _9=0;
if(_8.nodeName=="contacts"){
for(var i=0;i<_8.childNodes.length;i++){
var _b=_8.childNodes[i];
if(_b&&_b.nodeName=="contact"){
var _c=new contact_t();
_c.fromXml(_b);
switch(_c.getStatus()){
case me.STATUS_REQUEST_SENT:
me.requestedContacts[_c.contactId]=_c;
break;
case me.STATUS_REQUEST_RECEIVED:
me.requestingContacts[_c.contactId]=_c;
break;
case me.STATUS_ACCEPTED:
me.acceptedContacts[_c.contactId]=_c;
me.SYSTEM.Tracking.addUser(_c.userId);
break;
case me.STATUS_BLOCK_SENT:
me.blockedContacts[_c.contactId]=_c;
break;
case me.STATUS_BLOCK_RECEIVED:
me.contactsBlockedBy[_c.contactId]=_c;
break;
case me.STATUS_REJECT_RECEIVED:
me.contactsRejectedBy[_c.contactId]=_c;
break;
}
me.contactsFromName[_c.userName]=_c;
me.contactsFromUserId[_c.userId]=_c;
}
}
}
complete.call(me);
}
catch(ex){
jsExDebug("contacts_refresh: refreshCallback",ex);
}
}
try{
if(this.SYSTEM.UserDetails.isEmailVerified()){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_READ,null,refreshCallback,this);
}else{
complete.call(this);
}
}
catch(ex){
jsExDebug("contacts_refresh",ex);
}
}
function contacts_refreshReceived(_d){
function refreshReceivedCallback(_e,me,_10){
try{
if(!_e||!_e.hasChildNodes()){
jsDebug("contacts_refreshReceived: refreshReceivedCallback - No xml in response - "+_10);
return;
}
var _11=_e.firstChild;
if(_11.nodeName=="contacts"){
for(var i=0;i<_11.childNodes.length;i++){
var _13=_11.childNodes[i];
if(_13&&_13.nodeName=="contact"){
var _14=new contact_t();
_14.fromXml(_13);
if(_14.status==me.STATUS_REQUEST_RECEIVED){
me.insertInto("requestingContacts",_14);
}else{
jsDebug("contacts_refreshReceived: refreshReceivedCallback - Contact has not sent a request.");
}
me.contactsFromName[_14.userName]=_14;
me.contactsFromUserId[_14.userId]=_14;
}
}
}
if(_d){
_d.invoke();
}
me.invokeActionListeners(me.ACTION_READ_RECEIVED);
}
catch(ex){
jsExDebug("contacts_refreshReceived: refreshReceivedCallback",ex);
}
}
try{
if(this.SYSTEM.UserDetails.isEmailVerified()){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_READ_RECEIVED,null,refreshReceivedCallback,this);
}
}
catch(ex){
jsExDebug("contacts_refreshReceived",ex);
}
}
function contacts_refreshContact(_15,_16){
function refreshContactCallback(xml,me,_19){
try{
if(!xml||!xml.hasChildNodes()){
jsDebug("contacts_refreshContact: refreshContactCallback - No xml in response - "+_19);
return;
}
var _1a=xml.firstChild;
if(_1a.nodeName=="contacts"){
var _1b=_1a.firstChild;
if(_1b&&_1b.nodeName=="contact"){
var _1c=new contact_t();
_1c.fromXml(_1b);
switch(_1c.getStatus()){
case me.STATUS_REQUEST_SENT:
me.insertInto("requestedContacts",_1c);
break;
case me.STATUS_REQUEST_RECEIVED:
me.insertInto("requestingContacts",_1c);
break;
case me.STATUS_ACCEPTED:
me.insertInto("acceptedContacts",_1c);
me.contactsFromUserId[_1c.userId]=_1c;
me.SYSTEM.Tracking.addUser(_1c.userId);
break;
case me.STATUS_BLOCK_SENT:
me.insertInto("blockedContacts",_1c);
break;
case me.STATUS_BLOCK_RECEIVED:
me.insertInto("contactsBlockedBy",_1c);
break;
case me.STATUS_REJECT_RECEIVED:
me.insertInto("contactsRejectedBy",_1c);
break;
default:
me.removeContactFromList(_15);
break;
}
}
}
if(_16){
_16.invoke(true);
}
me.invokeActionListeners(me.ACTION_READ_CONTACT,_15);
}
catch(ex){
jsExDebug("contacts_refreshContact: refreshContactCallback",ex);
}
}
try{
if(this.SYSTEM.UserDetails.isEmailVerified()){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_READ_CONTACT,"contactId="+_15,refreshContactCallback,this);
}
}
catch(ex){
jsExDebug("contacts_refreshContact",ex);
}
}
function contacts_sendRequest(_1d,_1e,_1f,_20){
function requestCallback(xml,me){
try{
_23--;
if(!_23){
me.refresh(_1f);
}
}
catch(ex){
jsExDebug("contacts_sendRequest: requestCallback",ex);
}
}
try{
var _24=((this.contactsBlockedBy.length>this.contactsRejectedBy.length)?this.contactsBlockedBy.length:this.contactsRejectedBy.length);
_24=((this.acceptedContacts.length>_24)?this.acceptedContacts.length:_24);
_24=((this.requestedContacts.length>_24)?this.requestedContacts.length:_24);
var _23=0;
var _25="";
_1e=(_1e?_1e:this.TRACKING_STATUS_OFF);
for(var j=0;j<_1d.length;j++){
var _27=true;
for(var i=0;i<_24;i++){
if(this.contactsBlockedBy[i]&&this.contactsBlockedBy[i].username==_1d[j]){
_25+="You have been blocked by <b>"+_1d[j]+"</b><br/>";
_27=false;
}else{
if(this.acceptedContacts[i]&&this.acceptedContacts[i].username==_1d[j]){
_25+="You already have that user as a contact : <b>"+this.acceptedContacts[i].username+"</b><br/>";
_27=false;
}else{
if(this.requestedContacts[i]&&this.requestedContacts[i].username==_1d[j]){
_25+="You have already sent a request to that user. Please wait for <b>"+_1d[j]+"</b> to respond<br/>";
_27=false;
}
}
}
}
if(_27){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_REQUEST,"user="+_1d[j]+"&trackstatus="+_1e,requestCallback,this);
_23++;
}
}
if(_25.length){
var _29=(_25.split("<br/>").length*20)+75;
var _2a=new this.SYSTEM.Dialogue.Error(_20,"Peepel",_25,null,600);
}
return _23;
}
catch(ex){
jsExDebug("contacts_sendRequest",ex);
}
}
function contacts_acceptRequest(_2b,_2c,_2d){
function acceptCallback(xml,me){
try{
_30--;
if(!_30){
me.refresh(_2d);
}
}
catch(ex){
jsExDebug("contacts_acceptRequest: acceptCallback",ex);
}
}
try{
var _30=0;
for(var i=0;i<_2b.length;i++){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_RESPOND,"contactId="+_2b[i]+"&reply="+this.REPLY_ACCEPT+"&trackstatus="+(_2c?_2c:this.TRACKING_STATUS_OFF),acceptCallback,this);
_30++;
}
}
catch(ex){
jsExDebug("contacts_acceptRequest",ex);
}
}
function contacts_rejectRequest(_32,_33){
function rejectCallback(xml,me){
try{
_36--;
if(!_36){
me.refresh(_33);
}
}
catch(ex){
jsExDebug("contacts_rejectRequest: rejectCallback",ex);
}
}
try{
var _36=0;
for(var i=0;i<_32.length;i++){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_RESPOND,"contactId="+_32[i]+"&reply="+this.REPLY_REJECT,rejectCallback,this);
_36++;
}
}
catch(ex){
jsExDebug("contacts_rejectRequest",ex);
}
}
function contacts_blockContact(_38,_39){
function blockCallback(xml,me){
try{
_3c--;
if(!_3c){
me.refresh(_39);
}
}
catch(ex){
jsExDebug("contacts_rejectRequest: rejectCallback",ex);
}
}
try{
var _3c=0;
for(var i=0;i<_38.length;i++){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_BLOCK,"contactId="+_38[i],blockCallback,this);
_3c++;
}
}
catch(ex){
jsExDebug("contacts_blockContact",ex);
}
}
function contacts_removeContact(_3e,_3f){
function removeCallback(xml,me){
try{
_42--;
if(!_42){
me.refresh(_3f);
}
}
catch(ex){
jsExDebug("contacts_removeContact: removeCallback",ex);
}
}
try{
if(!_3e||!_3e.length){
return;
}
var _42=0;
for(var i=0;i<_3e.length;i++){
var _44=this.getContactUserId(_3e[i]);
this.SYSTEM.Tracking.removeUser(_44);
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_REMOVE,"contactId="+_3e[i],removeCallback,this);
_42++;
}
}
catch(ex){
jsExDebug("contacts_removeContact",ex);
}
}
function contacts_unblockContact(_45,_46){
function unblockCallback(xml,me){
try{
me.refresh(_46);
}
catch(ex){
jsExDebug("contacts_unblockContact: unblockCallback",ex);
}
}
try{
var _49=0;
for(var i=0;i<_45.length;i++){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_UNBLOCK,"contactId="+_45[i],unblockCallback,this);
_49++;
}
}
catch(ex){
jsExDebug("contacts_unblockContact",ex);
}
}
function contacts_getRequestingContacts(){
try{
var _4b=[];
for(var i=0;i<this.requestingContacts.length;i++){
if(this.requestingContacts[i]){
_4b.push(this.requestingContacts[i]);
}
}
return _4b;
}
catch(ex){
jsExDebug("contacts_getRequestingContacts",ex);
}
}
function contacts_getRequestedContacts(){
try{
var _4d=[];
for(var i=0;i<this.requestedContacts.length;i++){
if(this.requestedContacts[i]){
_4d.push(this.requestedContacts[i]);
}
}
return _4d;
}
catch(ex){
jsExDebug("contacts_getRequestedContacts",ex);
}
}
function contacts_getAcceptedContacts(){
try{
var _4f=[];
for(var i=0;i<this.acceptedContacts.length;i++){
if(this.acceptedContacts[i]){
_4f.push(this.acceptedContacts[i]);
}
}
return _4f;
}
catch(ex){
jsExDebug("contacts_getAcceptedContacts",ex);
}
}
function contacts_getBlockedContacts(){
try{
var _51=[];
for(var i=0;i<this.blockedContacts.length;i++){
if(this.blockedContacts[i]){
_51.push(this.blockedContacts[i]);
}
}
return _51;
}
catch(ex){
jsExDebug("contacts_getBlockedContacts",ex);
}
}
function contacts_isAccepted(_53){
try{
for(var i=0;i<this.acceptedContacts.length;i++){
if(this.acceptedContacts[i]&&this.acceptedContacts[i].userId==_53){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("contacts_isAccepted",ex);
}
}
function contacts_getContactIdFromName(_55){
try{
var _56=this.contactsFromName[_55];
return (_56?_56.contactId:null);
}
catch(ex){
jsExDebug("contacts_getContactIdFromName",ex);
}
}
function contacts_getContactIdFromEmail(_57){
try{
for(var i=0;i<this.acceptedContacts.length;i++){
if(this.acceptedContacts[i]&&this.acceptedContacts[i].email==_57){
return this.acceptedContacts[i].contactId;
}
}
return false;
}
catch(ex){
jsExDebug("contacts_getContactIdFromEmail",ex);
}
}
function contacts_getContactFromUserId(_59){
try{
return this.contactsFromUserId[_59];
}
catch(ex){
jsExDebug("contacts_getContactFromUserId",ex);
}
}
function contacts_getAnyContact(_5a){
try{
if(this.requestedContacts[_5a]){
return this.requestedContacts[_5a];
}else{
if(this.requestingContacts[_5a]){
return this.requestingContacts[_5a];
}else{
if(this.acceptedContacts[_5a]){
return this.acceptedContacts[_5a];
}else{
if(this.blockedContacts[_5a]){
return this.blockedContacts[_5a];
}else{
if(this.contactsBlockedBy[_5a]){
return this.contactsBlockedBy[_5a];
}else{
if(this.contactsRejectedBy[_5a]){
return this.contactsRejectedBy[_5a];
}
}
}
}
}
}
}
catch(ex){
jsExDebug("contacts_getAnyContact",ex);
}
}
function contacts_getLocationHistory(_5b,_5c,_5d,_5e){
function locationHistoryResponse(_5f){
try{
if(_5e){
_5e.invoke(_60.userId,_5f);
}
}
catch(ex){
jsExDebug("contacts_getLocationHistory: locationHistoryResponse",ex);
}
}
try{
if(_5c.getTime()>=_5d.getTime()){
return;
}
var _60=this.getContact(_5b);
if(_60){
var _61=_5c.getTime()-(_5c.getTimezoneOffset()*60000);
var _62=_5d.getTime()-(_5d.getTimezoneOffset()*60000);
this.SYSTEM.Network.JSONRequest(this.TRACKING_SERVICE_PATH+"&action="+this.ACTION_GET_CONTACT_LOCATION_HISTORY,"contactId="+_5b+"&startMS="+_61+"&endMS="+_62,locationHistoryResponse,this);
}
}
catch(ex){
jsExDebug("contacts_getLocationHistory",ex);
}
}
function contacts_getContactLocation(_63){
try{
if(this.acceptedContacts[_63]&&this.acceptedContacts[_63].userId){
var _64=this.SYSTEM.Tracking.getUserLocation(this.acceptedContacts[_63].userId);
return _64;
}
}
catch(ex){
jsExDebug("contacts_getContactLocation",ex);
}
}
function contacts_getContact(_65){
try{
if(this.acceptedContacts[_65]){
return this.acceptedContacts[_65];
}
return null;
}
catch(ex){
jsExDebug("contacts_getContact",ex);
}
}
function contacts_getContactUserName(_66){
try{
if(this.acceptedContacts[_66]){
return this.acceptedContacts[_66].userName;
}
return "";
}
catch(ex){
jsExDebug("contacts_getContact",ex);
}
}
function contacts_getContactIdFromUserId(_67){
try{
for(var _68 in this.acceptedContacts){
if(this.acceptedContacts[_68]&&this.acceptedContacts[_68].userId==_67){
return _68;
}
}
return null;
}
catch(ex){
jsExDebug("contacts_getContact",ex);
}
}
function contacts_setContactTrackStatus(_69,_6a,_6b){
function response(xml,me){
try{
var _6e=false;
if(xml&&getNodeValue(xml,"success")=="0"){
for(var i=0;i<_69.length;i++){
var _70=me.getContact(_69[i]);
_70.setTrackStatus(_6a);
}
_6e=true;
}
if(_6b){
_6b.invoke(_6e);
}
}
catch(ex){
jsExDebug("contacts_setContactTrackStatus: response",ex);
}
}
try{
if(_69.length){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_SET_TRACK_STATUS,"trackstatus="+_6a+"&contactId="+_69.join(),response,this);
}
}
catch(ex){
jsExDebug("contacts_setContactTrackStatus",ex);
}
}
function contacts_getContactTrackStatusFromUsername(_71){
try{
if(this.contactsFromName[_71]){
return this.contactsFromName[_71].status;
}else{
return null;
}
}
catch(ex){
jsExDebug("contacts_getContactTrackStatusFromUsername",ex);
}
}
function contacts_getContactAcceptedContacts(_72,_73){
function response(xml,me){
try{
var _76=null;
var _77=null;
if(xml){
_76=[];
var _77=getNodeValue(xml,"user");
var _78=getChildNode(xml,"contact");
var _79=null;
for(var i=0;i<_78.length;i++){
_79=new contact_t();
_79.fromXml(_78[i]);
_76.push(_79);
}
}
if(_73){
_73.invoke(_77,_76);
}
}
catch(ex){
jsExDebug("contacts_getContactAcceptedContacts: response",ex);
}
}
try{
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action=12","contactId="+_72,response,this);
}
catch(ex){
jsExDebug("contacts_getContactAcceptedContacts",ex);
}
}
function contacts_getContactUserId(_7b){
try{
var _7c=null;
if(this.requestedContacts[_7b]){
_7c=this.requestedContacts[_7b].userId;
}else{
if(this.requestingContacts[_7b]){
_7c=this.requestingContacts[_7b].userId;
}else{
if(this.acceptedContacts[_7b]){
_7c=this.acceptedContacts[_7b].userId;
}else{
if(this.blockedContacts[_7b]){
_7c=this.blockedContacts[_7b].userId;
}else{
if(this.contactsBlockedBy[_7b]){
_7c=this.contactsBlockedBy[_7b].userId;
}else{
if(this.contactsRejectedBy[_7b]){
_7c=this.contactsRejectedBy[_7b].userId;
}
}
}
}
}
}
return _7c;
}
catch(ex){
jsExDebug("contacts_getContactUserId",ex);
}
}
function contacts_isContact(_7d,_7e){
try{
if(_7d){
if(this.requestedContacts[_7d]||this.requestingContacts[_7d]||this.acceptedContacts[_7d]||this.blockedContacts[_7d]||this.contactsBlockedBy[_7d]||this.contactsRejectedBy[_7d]){
return true;
}
}else{
if(_7e){
if(this.contactsFromName[_7e]){
return true;
}
}
}
return false;
}
catch(ex){
jsExDebug("contacts_isContact",ex);
}
}
function contacts_saveContactMeta(_7f,_80){
function response(xml,me){
try{
if(getNodeValue(xml,"success")=="0"){
if(_80){
_80.invoke();
}
}
}
catch(ex){
jsExDebug("contacts_saveContactMeta: response",ex);
}
}
try{
var _83=this.acceptedContacts[_7f];
if(_83){
var _84=_83.getMetaString();
if(_84){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_SET_META,"contactId="+_7f+"&meta="+_84,response,this);
}
}
}
catch(ex){
jsExDebug("contacts_saveContactMeta",ex);
}
}
function contacts_clearArrays(_85){
try{
for(var id in this.requestedContacts){
if(this.requestedContacts[id]){
this.requestedContacts[id].cleanUp();
this.requestedContacts[id]=null;
delete this.requestedContacts[id];
}
}
for(id in this.requestingContacts){
if(this.requestingContacts[id]){
this.requestingContacts[id].cleanUp();
this.requestingContacts[id]=null;
delete this.requestingContacts[id];
}
}
for(id in this.acceptedContacts){
if(this.acceptedContacts[id]){
this.acceptedContacts[id].cleanUp();
this.acceptedContacts[id]=null;
delete this.acceptedContacts[id];
}
}
for(id in this.blockedContacts){
if(this.blockedContacts[id]){
this.blockedContacts[id].cleanUp();
this.blockedContacts[id]=null;
delete this.blockedContacts[id];
}
}
for(id in this.contactsBlockedBy){
if(this.contactsBlockedBy[id]){
this.contactsBlockedBy[id].cleanUp();
this.contactsBlockedBy[id]=null;
delete this.contactsBlockedBy[id];
}
}
for(id in this.contactsRejectedBy){
if(this.contactsRejectedBy[id]){
this.contactsRejectedBy[id].cleanUp();
this.contactsRejectedBy[id]=null;
delete this.contactsRejectedBy[id];
}
}
for(var _87 in this.contactsFromName){
if(this.contactsFromName[_87]&&this.contactsFromName[_87].contactId){
this.contactsFromName[_87]=null;
delete this.contactsFromName[_87];
}
}
for(var _88 in this.contactsFromUserId){
if(this.contactsFromUserId[_88]&&this.contactsFromUserId[_88].contactId){
this.contactsFromUserId[_88]=null;
delete this.contactsFromUserId[_88];
}
}
if(_85){
this.requestedContacts=[];
this.requestingContacts=[];
this.acceptedContacts=[];
this.blockedContacts=[];
this.contactsBlockedBy=[];
this.contactsRejectedBy=[];
this.contactsFromName=[];
this.contactsFromUserId=[];
}else{
this.requestedContacts=null;
this.requestingContacts=null;
this.acceptedContacts=null;
this.blockedContacts=null;
this.contactsBlockedBy=null;
this.contactsRejectedBy=null;
this.contactsFromName=null;
this.contactsFromUserId=null;
}
}
catch(ex){
jsExDebug("contacts_clearArrays",ex);
}
}
function contacts_insertInto(_89,_8a){
try{
var _8b=this[_89];
var _8c=_8a.contactId;
this.removeContactFromList(_8c);
if(_8b){
this[_89][_8c]=_8a;
}
}
catch(ex){
jsExDebug("contacts_insertInto",ex);
}
}
function contacts_removeContactFromList(_8d){
try{
if(this.requestedContacts[_8d]){
this.requestedContacts[_8d].cleanUp();
this.requestedContacts[_8d]=null;
}else{
if(this.requestingContacts[_8d]){
this.requestingContacts[_8d].cleanUp();
this.requestingContacts[_8d]=null;
}else{
if(this.acceptedContacts[_8d]){
this.contactsFromUserId[this.acceptedContacts[_8d].userId]=null;
this.acceptedContacts[_8d].cleanUp();
this.acceptedContacts[_8d]=null;
}else{
if(this.blockedContacts[_8d]){
this.blockedContacts[_8d].cleanUp();
this.blockedContacts[_8d]=null;
}else{
if(this.contactsBlockedBy[_8d]){
this.contactsBlockedBy[_8d].cleanUp();
this.contactsBlockedBy[_8d]=null;
}else{
if(this.contactsRejectedBy[_8d]){
this.contactsRejectedBy[_8d].cleanUp();
this.contactsRejectedBy[_8d]=null;
}
}
}
}
}
}
}
catch(ex){
jsExDebug("contacts_removeContactFromList",ex);
}
}
function contacts_avatarChangeNotificationCallback(_8e,_8f){
try{
if(_8e&&_8f){
var _90=this.getContactFromUserId(parseInt(_8f));
if(_90){
_90.setAvatarPath(_8e);
this.invokeActionListeners(this.ACTION_SET_AVATAR,_90.contactId);
}
}
}
catch(ex){
jsExDebug("contacts_avatarChangeNotificationCallback",ex);
}
}
function contacts_requestNotificationCallback(_91){
try{
this.refreshReceived();
}
catch(ex){
jsExDebug("contacts_requestNotificationCallback",ex);
}
}
function contacts_acceptNotificationCallback(_92,_93){
try{
this.refreshContact(_92);
}
catch(ex){
jsExDebug("contacts_acceptNotificationCallback",ex);
}
}
function contacts_unblockNotificationCallback(_94){
try{
this.removeContactFromList(_94);
this.invokeActionListeners(this.ACTION_UNBLOCK);
}
catch(ex){
jsExDebug("contacts_unblockNotificationCallback",ex);
}
}
function contacts_removeNotificationCallback(_95){
try{
this.SYSTEM.Tracking.removeUser(this.getContactUserId(_95));
this.removeContactFromList(_95);
this.invokeActionListeners(this.ACTION_REMOVE);
}
catch(ex){
jsExDebug("contacts_removeNotificationCallback",ex);
}
}
function contacts_userNameChangeNotificationCallback(_96){
try{
var _97=this.getContactFromUserId(_96);
if(_97){
this.refreshContact(_97.contactId);
}
}
catch(ex){
jsExDebug("contacts_userNameChangeNotificationCallback",ex);
}
}
function contacts_miscNotificationCallback(){
try{
this.refresh();
}
catch(ex){
jsExDebug("contacts_miscNotificationCallback",ex);
}
}

try{
contact_t.prototype=new peepelObject_t();
contact_t.prototype.constructor=contact_t;
contact_t.prototype.cleanUp=contact_cleanUp;
contact_t.prototype.contact_super=peepelObject_t.prototype.constructor;
contact_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
contact_t.prototype.fromXml=contact_fromXml;
contact_t.prototype.getStatus=contact_getStatus;
contact_t.prototype.getTrackStatus=contact_getTrackStatus;
contact_t.prototype.getContactId=contact_getContactId;
contact_t.prototype.getUserName=contact_getUserName;
contact_t.prototype.getEmailAddress=contact_getEmailAddress;
contact_t.prototype.getAvatarPath=contact_getAvatarPath;
contact_t.prototype.getMetaString=contact_getMetaString;
contact_t.prototype.getMetaValue=contact_getMetaValue;
contact_t.prototype.match=contact_match;
contact_t.prototype.setTrackStatus=contact_setTrackStatus;
contact_t.prototype.setAvatarPath=contact_setAvatarPath;
contact_t.prototype.setMetaValue=contact_setMetaValue;
contact_t.prototype.clearMeta=contact_clearMeta;
contact_t.prototype.toString=contact_toString;
contact_t.prototype.AVATAR_MAP_OBJECT=1;
contact_t.prototype.AVATAR_CONTACT_PROFILE=2;
contact_t.prototype.AVATAR_TIMELINE=3;
}
catch(ex){
jsExDebug("contact_t.prototype",ex);
}
function contact_t(){
try{
this.contact_super();
this.contactId=null;
this.status=null;
this.userId=null;
this.userName="";
this.username="";
this.email="";
this.firstName="";
this.lastName="";
this.statusChangeTime="";
this.avatarPath=null;
this.trackStatus=null;
this.myTrackStatus=null;
this.mobile=null;
this.aboutMePublic="";
this.aboutMePrivate="";
this.meta=[];
}
catch(ex){
jsExDebug("contact_t",ex);
}
}
function contact_cleanUp(me){
try{
if(!me){
me=this;
}
me.contactId=null;
me.status=null;
me.userId=null;
me.userName=null;
me.username=null;
me.email=null;
me.firstName=null;
me.lastName=null;
me.avatarPath=null;
me.statusChangeTime=null;
me.trackStatus=null;
me.myTrackStatus=null;
me.mobile=null;
me.aboutMePublic=null;
me.aboutMePrivate=null;
for(var i=0;i<me.meta.length;i++){
for(var _3 in me.meta[i]){
me.meta[i][_3]=null;
}
me.meta[i]=null;
}
me.meta=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("contact_cleanUp",ex);
}
}
function contact_fromXml(_4){
try{
if(_4&&_4.nodeName=="contact"){
this.contactId=parseInt(_4.getAttribute("id"));
this.status=parseInt(_4.getAttribute("status"));
this.userId=parseInt(_4.getAttribute("userid"));
this.statusChangeTime=_4.getAttribute("time");
this.userName=_4.getAttribute("username");
this.username=_4.getAttribute("username");
this.email=_4.getAttribute("email");
this.firstName=(_4.getAttribute("fname")?_4.getAttribute("fname"):"");
this.lastName=(_4.getAttribute("lname")?_4.getAttribute("lname"):"");
this.avatarPath=_4.getAttribute("avatar");
this.trackStatus=parseInt(_4.getAttribute("trackstatus"));
this.myTrackStatus=parseInt(_4.getAttribute("mytrackstatus"));
this.mobile=_4.getAttribute("mobile");
this.aboutMePublic=_4.getAttribute("aboutpub");
this.aboutMePrivate=_4.getAttribute("aboutshared");
this.userName=(this.userName?this.userName:"");
this.firstName=(this.firstName?this.firstName:"");
this.lastName=(this.lastName?this.lastName:"");
this.email=(this.email?this.email:"");
var _5=URLDecode(_4.getAttribute("meta"));
if(_5&&_5.length){
try{
this.meta=eval("["+_5+"]");
}
catch(ex){
this.meta=[];
jsDebug("Invalid meta for contact: "+this.contactId+" -- "+_5);
}
}
}
}
catch(ex){
jsExDebug("contact_fromXml",ex);
}
}
function contact_getStatus(){
try{
return this.status;
}
catch(ex){
jsExDebug("contact_getStatus",ex);
}
}
function contact_getTrackStatus(){
try{
return this.trackStatus;
}
catch(ex){
jsExDebug("contact_getTrackStatus",ex);
}
}
function contact_getContactId(){
try{
return this.contactId;
}
catch(ex){
jsExDebug("contact_getContactId",ex);
}
}
function contact_getUserName(){
try{
return this.userName;
}
catch(ex){
jsExDebug("contact_getUserName",ex);
}
}
function contact_getUserName(){
try{
return this.userName;
}
catch(ex){
jsExDebug("contact_getUserName",ex);
}
}
function contact_getEmailAddress(){
try{
return this.email;
}
catch(ex){
jsExDebug("contact_getEmailAddress",ex);
}
}
function contact_getAvatarPath(_6){
try{
if(this.avatarPath){
var _7=(this.avatarPath.match(/img\/app\/system\/avatars\//)?".png":".s");
switch(_6){
case this.AVATAR_CONTACT_PROFILE:
return this.avatarPath+"_"+this.SYSTEM.UserDetails.SIDE_50_REVISION+_7;
case this.AVATAR_MAP_OBJECT:
return this.avatarPath+"_"+this.SYSTEM.UserDetails.SIDE_32_REVISION+_7;
case this.AVATAR_TIMELINE:
return this.avatarPath+"_"+this.SYSTEM.UserDetails.SIDE_21_REVISION+_7;
}
}else{
switch(_6){
case this.AVATAR_CONTACT_PROFILE:
return this.SYSTEM.UserDetails.SIDE_50_DEFAULT_AVATAR;
case this.AVATAR_MAP_OBJECT:
return this.SYSTEM.UserDetails.SIDE_32_DEFAULT_AVATAR;
case this.AVATAR_TIMELINE:
return this.SYSTEM.UserDetails.SIDE_21_DEFAULT_AVATAR;
}
}
}
catch(ex){
jsExDebug("contact_getAvatarPath",ex);
}
}
function contact_getMetaString(){
try{
var _8=[];
var _9=null;
var _a=null;
var _b=null;
var _c=null;
for(var i=0;i<this.meta.length;i++){
_c=this.meta[i];
_9="{";
for(var _e in _c){
_a=_c[_e];
if(_a==null){
_b="null";
}else{
if(isNaN(_a)||_a.length!=null){
_b="\""+_a+"\"";
}else{
_b=_a;
}
}
_9+="\""+_e+"\":"+_b;
break;
}
_9+="}";
_8.push(_9);
}
return _8.join();
}
catch(ex){
jsExDebug("contact_getMetaString",ex);
}
}
function contact_getMetaValue(_f){
try{
for(var i=0;i<this.meta.length;i++){
if(this.meta[i]&&this.meta[i][_f]!=null){
return this.meta[i][_f];
}
}
return null;
}
catch(ex){
jsExDebug("contact_getMetaValue",ex);
}
}
function contact_match(_11,_12){
try{
var txt=[this.userName,this.firstName,this.lastName,this.email].join(" ");
if(txt.match(_11)){
if(_12){
if(this.trackStatus!=null&&this.trackStatus.toString().match(_12)!=null){
return true;
}
return false;
}
return true;
}
}
catch(ex){
jsExDebug("contact_match",ex);
}
}
function contact_setTrackStatus(_14){
try{
this.trackStatus=_14;
}
catch(ex){
jsExDebug("contact_setTrackStatus",ex);
}
}
function contact_setAvatarPath(_15){
try{
this.avatarPath=_15;
}
catch(ex){
jsExDebug("contact_setAvatarPath",ex);
}
}
function contact_setMetaValue(key,_17){
try{
if(_17==null){
return;
}
var _18=false;
for(var i=0;i<this.meta.length;i++){
if(this.meta[i]&&this.meta[i][key]!=null){
this.meta[i][key]=_17;
_18=true;
break;
}
}
if(!_18){
var obj={};
obj[key]=_17;
this.meta.push(obj);
}
}
catch(ex){
jsExDebug("contact_setMetaValue",ex);
}
}
function contact_clearMeta(){
try{
this.meta=[];
}
catch(ex){
jsExDebug("contact_clearMeta",ex);
}
}
function contact_toString(){
try{
return "contact_t: "+this.contactId+", "+this.userName;
}
catch(ex){
jsExDebug("contact_toString",ex);
}
}

try{
widget_t.prototype=new peepelObject_t();
widget_t.prototype.constructor=widget_t;
widget_t.prototype.cleanUp=widget_cleanUp;
widget_t.prototype.widget_super=peepelObject_t.prototype.constructor;
widget_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
widget_t.prototype.setDimensions=widget_setDimensions;
widget_t.prototype.setOpacity=widget_setOpacity;
widget_t.prototype.setPercentageWidth=widget_setPercentageWidth;
widget_t.prototype.setPercentageHeight=widget_setPercentageHeight;
widget_t.prototype.setPosition=widget_setPosition;
widget_t.prototype.makeRelativePositioned=widget_makeRelativePositioned;
widget_t.prototype.attach=widget_attach;
widget_t.prototype.detach=widget_detach;
widget_t.prototype.hide=widget_hide;
widget_t.prototype.show=widget_show;
widget_t.prototype.setCursor=widget_setCursor;
widget_t.prototype.setBackgroundStyle=widget_setBackgroundStyle;
widget_t.prototype.setBackgroundColour=widget_setBackgroundColour;
widget_t.prototype.setBackgroundColor=widget_setBackgroundColour;
widget_t.prototype.setBackgroundImage=widget_setBackgroundImage;
widget_t.prototype.setBorder=widget_setBorder;
widget_t.prototype.redraw=widget_redraw;
widget_t.prototype.notifyEvent=widget_addEventHandler;
widget_t.prototype.addEventHandler=widget_addEventHandler;
widget_t.prototype.fireEvent=widget_fireEvent;
widget_t.prototype.setValue=widget_setValue;
widget_t.prototype.getValue=widget_getValue;
widget_t.prototype.setContainerObject=widget_setContainerObject;
widget_t.prototype.getContainerObject=widget_getContainerObject;
widget_t.prototype.getScreenPosition=widget_getScreenPosition;
widget_t.prototype.isVisible=widget_isVisible;
widget_t.prototype.getClientWidth=widget_getClientWidth;
widget_t.prototype.getClientHeight=widget_getClientHeight;
widget_t.prototype.createDom=widget_createDom;
widget_t.prototype.bindEvents=widget_bindEvents;
widget_t.prototype.RELATIVE=1;
widget_t.prototype.ABSOLUTE=2;
widget_t.prototype.DEFAULT_EVENT=null;
widget_t.prototype.SUPPORTED_EVENTS=[];
widget_t.prototype.DEFAULT_CURSOR="";
}
catch(ex){
jsExDebug("widget_t:prototype",ex);
}
function widget_t(_1,_2){
try{
this.widget_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.name=_1;
this.widgetElement=document.createElement("div");
this.widgetElement.style.position="absolute";
this.widgetElement.style.cursor=this.DEFAULT_CURSOR;
this.width=0;
this.height=0;
this.fromRight=0;
this.fromBottom=0;
this.positionX=0;
this.positionY=0;
this.positionBy=this.ABSOLUTE;
this.opacity=0;
this.settingAllowFadeIn=true;
this.settingAllowBgColour=true;
this.eventBindings=[];
this.containerObject=null;
this.visible=true;
this.cleanUpString="";
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetBase_t; createDom; ",ex);
}
return;
}
function widget_cleanUp(me){
try{
if(!me){
var me=this;
}
me.cleanUpString=null;
if(me.stateMouseOverAttached){
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmouseover","mouseover");
}
if(me.stateMouseOutAttached){
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmouseout","mouseout");
}
me.width=null;
me.height=null;
me.fromRight=null;
me.fromBottom=null;
me.positionX=null;
me.positionY=null;
me.positionBy=null;
me.opacity=null;
me.settingAllowFadeIn=null;
me.settingAllowBgColour=null;
me.backgroundImage=null;
me.backgroundHoverImage=null;
me.value=null;
me.containerObject=null;
me.visible=null;
me.detach();
me.SYSTEM.Dom.freeDom(me.widgetElement);
me.widgetElement=null;
for(var _4 in me.eventBindings){
if(me.eventBindings[_4].length){
for(var i=0;i<me.eventBindings[_4].length;i++){
me.eventBindings[_4][i].cleanUp();
me.eventBindings[_4][i]=null;
delete me.eventBindings[_4][i];
}
me.eventBindings[_4]=null;
delete me.eventBindings[_4];
}
}
me.eventBindings=null;
me.name=null;
me.SUPPORTED_EVENTS=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("widget_cleanUp",ex);
}
}
function widget_createDom(){
try{
}
catch(ex){
jsExDebug("widget_createDom",ex);
}
}
function widget_bindEvents(){
try{
}
catch(ex){
jsExDebug("widget_bindEvents",ex);
}
}
function widget_setOpacity(_6){
try{
if(document.all){
this.widgetElement.style.filter="alpha(opacity="+_6+")";
}else{
this.widgetElement.style.opacity=_6/100;
}
}
catch(ex){
jsExDebug("widget_setOpacity",ex);
}
}
function widget_setDimensions(_7,_8){
try{
if(_7!=null){
this.width=_7;
this.widgetElement.style.width=_7+"px";
}
if(_8!=null){
this.height=_8;
this.widgetElement.style.height=_8+"px";
}
}
catch(ex){
jsExDebug("widget_setDimensions: "+this.name,ex);
}
return;
}
function widget_setPercentageWidth(_9){
try{
this.widgetElement.style.width=_9+"%";
}
catch(ex){
jsExDebug("widget_setPercentageWidth",ex);
}
return;
}
function widget_setPercentageHeight(_a){
try{
this.widgetElement.style.height=_a+"%";
}
catch(ex){
jsExDebug("widget_setPercentageHeight",ex);
}
return;
}
function widget_setPosition(_b,_c,_d,_e){
try{
if(_b!=null){
if(_d){
this.widgetElement.style.right=_b+"px";
}else{
this.widgetElement.style.left=_b+"px";
}
this.positionX=_b;
this.fromRight=_d;
}
if(_c!=null){
if(_e){
this.widgetElement.style.bottom=_c+"px";
}else{
this.widgetElement.style.top=_c+"px";
}
this.positionY=_c;
this.fromBottom=_e;
}
}
catch(ex){
jsExDebug("widget_setPosition: "+this.name,ex);
}
return;
}
function widget_makeRelativePositioned(){
try{
this.positionBy=this.RELATIVE;
this.widgetElement.style.position="relative";
}
catch(ex){
jsExDebug("widget_makeRelativePositioned",ex);
}
}
function widget_attach(_f){
try{
this.parentDiv=_f;
this.parentDiv.appendChild(this.widgetElement);
}
catch(ex){
jsExDebug("widget_attach",ex);
}
return;
}
function widget_detach(){
try{
if(!this.widgetElement||!this.widgetElement.parentNode){
this.parentDiv=null;
return;
}
if(!this.parentDiv&&this.widgetElement.parentNode){
this.parentDiv=this.widgetElement.parentNode;
}
if(!this.parentDiv||!this.widgetElement.parentNode){
this.parentDiv=null;
return;
}
if(this.parentDiv!=this.widgetElement.parentNode){
this.parentDiv=null;
return;
}
this.parentDiv.removeChild(this.widgetElement);
this.parentDiv=null;
}
catch(ex){
}
return;
}
function widget_hide(_10){
try{
if(_10){
this.widgetElement.style.display="none";
}else{
this.widgetElement.style.visibility="hidden";
}
this.visible=false;
}
catch(ex){
jsExDebug("widget_hide - "+this.name,ex);
}
return;
}
function widget_show(_11){
try{
if(_11){
this.widgetElement.style.display="block";
}else{
this.widgetElement.style.visibility="visible";
}
this.visible=true;
}
catch(ex){
jsExDebug("widget_show; ",ex);
}
return;
}
function widget_setCursor(_12){
try{
this.widgetElement.style.cursor=_12;
}
catch(ex){
jsExDebug("widget_cursor",ex);
}
return;
}
function widget_setBackgroundStyle(_13){
try{
this.widgetElement.style.background=_13;
}
catch(ex){
jsExDebug("widget_setBackgroundStyle",ex);
}
}
function widget_setBackgroundColour(_14,_15){
if(!this.settingAllowBgColour){
return;
}
if(!_15){
try{
this.widgetElement.style.backgroundColor=_14;
}
catch(ex){
jsExDebug("widget_setBackgroundColour",ex);
}
}else{
this.widgetElement.style.backgroundColor=_14;
}
}
function widget_setBackgroundImage(_16){
try{
this.widgetElement.style.backgroundImage="url('"+_16+"')";
}
catch(ex){
jsExDebug("widget_setBackgroundImage",ex);
}
}
function widget_setBorder(_17){
try{
if(_17!=null){
this.widgetElement.style.border=_17;
}
}
catch(ex){
jsExDebug("widget_setBorder",ex);
}
}
function widget_redraw(){
try{
this.parentDiv.removeChild(this.widgetElement);
this.parentDiv.appendChild(this.widgetElement);
}
catch(ex){
jsExDebug("widget_setBorder",ex);
}
}
function widget_addEventHandler(_18,_19){
try{
if(_19.handler){
if(!this.eventBindings[_18]){
this.eventBindings[_18]=[];
_1a=0;
}
var _1a=this.eventBindings[_18].length;
this.eventBindings[_18][_1a]=_19;
}
}
catch(ex){
jsExDebug("widget_addEventHandler",ex);
}
}
function widget_fireEvent(_1b,_1c){
try{
if(!this.eventBindings||!this.eventBindings[_1b]){
return;
}
if(_1c){
var _1d=new SYSTEM.Event.Event(_1c.clientX,_1c.clientY);
if(document.all){
_1d.relatedTarget=_1c.toElement;
}else{
_1d.relatedTarget=_1c.relatedTarget;
}
}else{
var _1d=new SYSTEM.Event.Event();
}
for(var i=this.eventBindings[_1b].length-1;i>=0;i--){
var _1f=this.eventBindings[_1b][i];
_1f.invoke(_1d,this);
}
}
catch(ex){
jsExDebug("widget_fireEvent "+this.name+" "+SYSTEM.Event.getEventName(_1b),ex);
}
}
function widget_setValue(_20){
try{
this.value=_20;
}
catch(ex){
jsExDebug("widget_setValue",ex);
}
}
function widget_getValue(){
try{
return this.value;
}
catch(ex){
jsExDebug("widget_getValue",ex);
}
}
function widget_setContainerObject(_21){
try{
this.containerObject=_21;
}
catch(ex){
jsExDebug("widget_setContainerObject",ex);
}
}
function widget_getContainerObject(){
try{
return this.containerObject;
}
catch(ex){
jsExDebug("widget_getContainerObject",ex);
}
}
function widget_getScreenPosition(){
try{
var dom=this.widgetElement.parentNode;
var x=this.positionX;
var y=this.positionY;
var _25=null;
var _26=null;
while(dom!=document.body){
dom=dom.parentNode;
if(_25){
x+=parseInt(dom.style.width)-_25;
_25=null;
}
if(_26){
y+=parseInt(dom.style.height)-_26;
_26=null;
}
if(dom.style.left){
x+=parseInt(dom.style.left);
}else{
if(dom.style.right){
_25=parseInt(dom.style.right)+(parseInt(dom.style.width)?parseInt(dom.style.width):0);
}
}
if(dom.style.top){
y+=parseInt(dom.style.top);
}else{
if(dom.style.bottom){
_26=parseInt(dom.style.bottom)+(parseInt(dom.style.height)?parseInt(dom.style.height):0);
}
}
}
return {x:x,y:y};
}
catch(ex){
jsExDebug("widget_getScreenPosition",ex);
}
}
function widget_isVisible(){
try{
return this.visible;
}
catch(ex){
jsExDebug("widget_isVisible",ex);
}
}
function widget_getClientWidth(){
try{
return this.widgetElement.clientWidth;
}
catch(ex){
jsExDebug("widget_getClientWidth",ex);
}
}
function widget_getClientHeight(){
try{
return this.widgetElement.clientHeight;
}
catch(ex){
jsExDebug("widget_getClientHeight",ex);
}
}

try{
buttonBase_t.prototype=new widget_t();
buttonBase_t.prototype.buttonBase_super=widget_t.prototype.constructor;
buttonBase_t.prototype.constructor=buttonBase_t;
buttonBase_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
buttonBase_t.prototype.cleanUp=buttonBase_cleanUp;
buttonBase_t.prototype.createDom=buttonBase_createDom;
buttonBase_t.prototype.bindEvents=buttonBase_bindEvents;
buttonBase_t.prototype.enableTypematic=buttonBase_enableTypematic;
buttonBase_t.prototype.allowTooltip=buttonBase_allowTooltip;
buttonBase_t.prototype.setState=buttonBase_setState;
buttonBase_t.prototype.flash=buttonBase_flash;
buttonBase_t.prototype.toggleState=buttonBase_toggleState;
buttonBase_t.prototype.turnOn=buttonBase_turnOn;
buttonBase_t.prototype.turnOff=buttonBase_turnOff;
buttonBase_t.prototype.isOn=buttonBase_isOn;
buttonBase_t.prototype.startTypematicMode=buttonBase_startTypematicMode;
buttonBase_t.prototype.showOffImage=buttonBase_showOffImage;
buttonBase_t.prototype.showOffHoverImage=buttonBase_showOffHoverImage;
buttonBase_t.prototype.showOnImage=buttonBase_showOnImage;
buttonBase_t.prototype.showOnHoverImage=buttonBase_showOnHoverImage;
buttonBase_t.prototype.mouseDownEvent=buttonBase_mouseDownEvent;
buttonBase_t.prototype.enterEvent=buttonBase_enterEvent;
buttonBase_t.prototype.exitEvent=buttonBase_exitEvent;
buttonBase_t.prototype.hoverEvent=buttonBase_hoverEvent;
buttonBase_t.prototype.clickEvent=buttonBase_clickEvent;
buttonBase_t.prototype.doubleClickEvent=buttonBase_doubleClickEvent;
buttonBase_t.prototype.ON_STATE=1;
buttonBase_t.prototype.OFF_STATE=0;
buttonBase_t.prototype.ON_IMAGE=1;
buttonBase_t.prototype.HOVER_IMAGE=2;
buttonBase_t.prototype.HOVER_ON_IMAGE=4;
buttonBase_t.prototype.TOOLTIP_TIMER=650;
buttonBase_t.prototype.TYPEMATIC_START=100;
buttonBase_t.prototype.DEFAULT_EVENT=SYSTEM.Event.CLICK_EVENT;
buttonBase_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.MOUSE_DOWN_EVENT,SYSTEM.Event.MOUSE_UP_EVENT,SYSTEM.Event.MOUSE_ENTER_EVENT,SYSTEM.Event.MOUSE_EXIT_EVENT,SYSTEM.Event.MOUSE_HOVER_EVENT,SYSTEM.Event.DOUBLE_CLICK_EVENT];
}
catch(ex){
jsExDebug("buttonBase_t.prototype",ex);
}
function buttonBase_t(_1,_2,_3,_4,_5,_6,_7,_8){
try{
this.buttonBase_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.buttonState=this.OFF_STATE;
this.settingAllowTypematic=false;
this.settingAllowTooltip=false;
this.stateShowTooltip=false;
this.stateInTypematicMode=false;
this.setDimensions(_2,_3);
this.allowTooltip(_4,_5,_6,_7);
if(!_8){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("buttonBase_t",ex);
}
}
function buttonBase_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmousedown","mousedown");
me.SYSTEM.Event.detachEvent(me.widgetElement,"onclick","click");
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondblclick","dblclick");
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmouseout","mouseout");
me.buttonState=null;
me.settingAllowTypematic=null;
me.settingAllowTooltip=null;
me.stateShowTooltip=null;
me.stateInTypematicMode=null;
me.tooltipTitle=null;
me.tooltipContent=null;
me.tooltipWidth=null;
me.tooltipHeight=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("buttonBase_cleanUp",ex);
}
}
function buttonBase_createDom(){
try{
}
catch(ex){
jsExDebug("buttonBase_createDom",ex);
}
}
function buttonBase_allowTooltip(_a,_b,_c,_d){
try{
if(_a||_b){
this.tooltipTitle=(_a?_a:"");
this.tooltipContent=(_b?_b:"");
this.tooltipWidth=(_c?_c:TOOLTIP_MIN_WIDTH);
this.tooltipHeight=(_d?_d:TOOLTIP_MIN_HEIGHT);
this.settingAllowTooltip=true;
}
}
catch(ex){
jsExDebug("buttonBase_allowTooltip",ex);
}
}
function buttonBase_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmousedown","mousedown",this.mouseDownEvent,this,true);
this.SYSTEM.Event.attachEvent(this.widgetElement,"onclick","click",this.clickEvent,this,false);
this.SYSTEM.Event.attachEvent(this.widgetElement,"ondblclick","dblclick",this.doubleClickEvent,this,false);
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmouseover","mouseover",this.enterEvent,this);
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmouseout","mouseout",this.exitEvent,this);
}
catch(ex){
jsExDebug("buttonBase_bindEvents",ex);
}
}
function buttonBase_enableTypematic(_e){
try{
this.settingAllowTypematic=true;
this.stateTypematicPeriod=_e;
}
catch(ex){
jsExDebug("buttonBase_enableTypematic",ex);
}
}
function buttonBase_setState(_f,me){
try{
if(!me){
me=this;
}
me.buttonState=_f;
switch(me.buttonState){
case me.OFF_STATE:
me.showOffImage();
break;
case me.ON_STATE:
me.showOnImage();
break;
}
}
catch(ex){
jsExDebug("buttonBase_setState",ex);
}
}
function buttonBase_flash(){
function dim(){
try{
me.showOffImage();
}
catch(ex){
jsExDebug("buttonBase_flash.dim",ex);
}
}
var me=this;
me.showOnImage();
setTimeout(dim,100);
return;
}
function buttonBase_toggleState(){
try{
switch(this.buttonState){
case this.OFF_STATE:
this.setState(this.ON_STATE);
break;
case this.ON_STATE:
this.setState(this.OFF_STATE);
break;
}
return this.buttonState;
}
catch(ex){
jsExDebug("buttonBase_toggleState",ex);
}
}
function buttonBase_turnOn(){
try{
this.setState(this.ON_STATE);
}
catch(ex){
jsExDebug("buttonBase_turnOn",ex);
}
}
function buttonBase_turnOff(){
try{
this.setState(this.OFF_STATE);
}
catch(ex){
jsExDebug("buttonBase_turnOff",ex);
}
}
function buttonBase_isOn(){
try{
return (this.buttonState==this.ON_STATE);
}
catch(ex){
jsExDebug("buttonBase_isOn",ex);
}
}
function buttonBase_mouseDownEvent(_12,me){
try{
if(me.settingAllowTypematic){
me.startTypematicMode();
}
me.showOnImage();
me.fireEvent(me.SYSTEM.Event.MOUSE_DOWN_EVENT,_12);
}
catch(ex){
jsExDebug("buttonBase_mouseDownEvent",ex);
}
}
function buttonBase_enterEvent(_14,me){
function hover(){
try{
if(me.stateShowTooltip){
me.hoverEvent(_16.x,_16.y);
}
}
catch(ex){
jsExDebug("buttonBase_enterEvent: hover",ex);
}
}
try{
var _16=me.SYSTEM.Event.getMouseCoords(_14);
switch(me.buttonState){
case me.ON_STATE:
me.showOnHoverImage();
break;
case me.OFF_STATE:
me.showOffHoverImage();
break;
}
me.fireEvent(me.SYSTEM.Event.MOUSE_ENTER_EVENT,_14);
me.stateShowTooltip=true;
setTimeout(hover,me.TOOLTIP_TIMER);
}
catch(ex){
jsExDebug("buttonBase_enterEvent",ex);
}
}
function buttonBase_exitEvent(_17,me){
try{
if(!me.cleanUpIndex){
return;
}
if(me.settingAllowTooltip){
me.stateShowTooltip=false;
me.SYSTEM.Tooltip.hideTooltip();
}
if(me.settingAllowTypematic){
me.stateInTypematicMode=false;
}
switch(me.buttonState){
case me.ON_STATE:
me.showOnImage();
break;
case me.OFF_STATE:
me.showOffImage();
break;
}
me.fireEvent(me.SYSTEM.Event.MOUSE_EXIT_EVENT,_17);
}
catch(ex){
jsExDebug("buttonBase_exitEvent",ex);
}
}
function buttonBase_clickEvent(_19,me){
try{
if(me.settingAllowTypematic){
me.stateInTypematicMode=false;
}
if(me.settingAllowTooltip){
me.stateShowTooltip=false;
}
switch(me.buttonState){
case me.ON_STATE:
me.showOnHoverImage();
break;
case me.OFF_STATE:
me.showOffHoverImage();
break;
}
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_19,"click");
}
catch(ex){
jsExDebug("buttonBase_clickEvent",ex);
}
}
function buttonBase_doubleClickEvent(_1b,me){
try{
me.fireEvent(me.SYSTEM.Event.DOUBLE_CLICK_EVENT,_1b);
}
catch(ex){
jsExDebug("buttonBase_doubleClickEvent",ex);
}
}
function buttonBase_hoverEvent(_1d,_1e){
try{
if(!this.cleanUpIndex){
return;
}
if(this.settingAllowTooltip){
this.SYSTEM.Tooltip.createTooltip(this.tooltipTitle,this.tooltipContent,this.tooltipWidth,this.tooltipHeight,_1d+15,_1e+15);
}
this.fireEvent(this.SYSTEM.Event.MOUSE_HOVER_EVENT,{clientX:_1d,clientY:_1e});
}
catch(ex){
jsExDebug("buttonBase_hoverEvent",ex);
}
}
function buttonBase_startTypematicMode(){
function repeatClickHandler(){
try{
if(me.stateInTypematicMode){
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT);
setTimeout(repeatClickHandler,me.stateTypematicPeriod);
}
return;
}
catch(ex){
jsExDebug("buttonBase_startTypematicMode: repeatClickHandler",ex);
}
}
try{
var me=this;
this.stateInTypematicMode=true;
if(this.eventBindings.length){
setTimeout(repeatClickHandler,this.TYPEMATIC_START);
}
return;
}
catch(ex){
jsExDebug("buttonBase_startTypematicMode",ex);
}
}
function buttonBase_showOffImage(){
try{
}
catch(ex){
jsExDebug("buttonBase_showOffImage",ex);
}
}
function buttonBase_showOffHoverImage(){
try{
}
catch(ex){
jsExDebug("buttonBase_showOffHoverImage",ex);
}
}
function buttonBase_showOnImage(){
try{
}
catch(ex){
jsExDebug("buttonBase_showOnImage",ex);
}
}
function buttonBase_showOnHoverImage(){
try{
}
catch(ex){
jsExDebug("buttonBase_showOnHoverImage",ex);
}
}

try{
classButton_t.prototype=new buttonBase_t();
classButton_t.prototype.classButton_super=buttonBase_t.prototype.constructor;
classButton_t.prototype.constructor=classButton_t;
classButton_t.prototype.buttonBase_cleanUp=buttonBase_t.prototype.cleanUp;
classButton_t.prototype.cleanUp=classButton_cleanUp;
classButton_t.prototype.createDom=classButton_createDom;
classButton_t.prototype.setDimensions=classButton_setDimensions;
classButton_t.prototype.setImage=classButton_setImage;
classButton_t.prototype.buttonBase_setDimensions=buttonBase_t.prototype.setDimensions;
classButton_t.prototype.setBackgroundColour=classButton_setBackgroundColour;
classButton_t.prototype.buttonBase_setBackgroundColour=buttonBase_t.prototype.setBackgroundColour;
classButton_t.prototype.showOffImage=classButton_showOffImage;
classButton_t.prototype.showOffHoverImage=classButton_showOffHoverImage;
classButton_t.prototype.showOnImage=classButton_showOnImage;
classButton_t.prototype.showOnHoverImage=classButton_showOnHoverImage;
classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON=0;
classButton_t.prototype.TYPE_CUSTOM_WIDTH_TEXT_BUTTON=1;
classButton_t.prototype.TYPE_PANEL_BUTTON=2;
classButton_t.prototype.TYPE_PANEL_BUTTON_BG_COLOUR=3;
classButton_t.prototype.TYPE_CLASS_NAMES=["textbutton","textbutton custom_width","panelbutton","panelbutton"];
}
catch(ex){
jsExDebug("classButton_t.prototype",ex);
}
function classButton_t(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b){
try{
this.classButton_super(_1,_3,_4,_7,_8,_9,_a,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.type=_2;
this.baseClass=this.TYPE_CLASS_NAMES[_2];
this.content=_6;
this.extraClassInfo=(_5?_5:"");
if(!_b){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("classButton_t",ex);
}
}
function classButton_cleanUp(me){
try{
if(!me){
var me=this;
}
me.type=null;
me.baseClass=null;
me.content=null;
me.extraClassInfo=null;
me.offClass=null;
me.onClass=null;
me.offHoverClass=null;
me.onHoverClass=null;
me.textDiv=null;
if(me.bgDiv){
me.bgDiv=null;
}
for(var i=0;i<me.TYPE_CLASS_NAMES;i++){
me.TYPE_CLASS_NAMES[i]=null;
}
me.TYPE_CLASS_NAMES=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("classButton_cleanUp",ex);
}
}
function classButton_createDom(){
try{
switch(this.type){
case this.TYPE_FIXED_TEXT_BUTTON:
var _e=this.SYSTEM.Dom.createClassElement("div",this.baseClass+"_text");
_e.innerHTML=this.content;
this.widgetElement.appendChild(_e);
this.offClass=this.baseClass+" w"+this.width+"h"+this.height+this.extraClassInfo;
this.onClass=this.offClass+" button_on";
this.offHoverClass=this.offClass+" button_hover";
this.onHoverClass=this.onClass;
break;
case this.TYPE_CUSTOM_WIDTH_TEXT_BUTTON:
var _e=this.SYSTEM.Dom.createClassElement("div","textbutton_background");
_e.innerHTML="&nbsp;";
var _f=this.SYSTEM.Dom.createClassElement("div","textbutton_text");
_f.innerHTML=this.content;
this.textDiv=_f;
var _10=this.SYSTEM.Dom.createClassElement("div","button_left");
var _11=this.SYSTEM.Dom.createClassElement("div","button_right");
this.widgetElement.appendChild(_10);
this.widgetElement.appendChild(_e);
this.widgetElement.appendChild(_11);
this.widgetElement.appendChild(_f);
this.offClass=this.baseClass+" h"+this.height+this.extraClassInfo;
this.onClass=this.offClass+" button_on";
this.offHoverClass=this.offClass+" button_hover";
this.onHoverClass=this.onClass+"_hover";
break;
case this.TYPE_PANEL_BUTTON:
var _12=this.SYSTEM.Dom.createImage(this.content,false);
this.widgetElement.appendChild(_12);
if(this.extraClassInfo=="custom_button"){
this.SYSTEM.Dom.setElementClass(_12,this.extraClassInfo);
}else{
this.SYSTEM.Dom.setElementClass(_12,"button");
}
this.offClass=this.baseClass+" w"+this.width+"h"+this.height;
this.onClass=this.offClass+" button_on";
this.offHoverClass=this.offClass+" button_hover";
this.onHoverClass=this.onClass+"_hover";
break;
case this.TYPE_PANEL_BUTTON_BG_COLOUR:
var _13=Math.round(this.height)/6;
var _14=Math.round(this.width)-8;
var _15=this.SYSTEM.Dom.createDiv(null,_14,_13,_13,_14);
var _12=this.SYSTEM.Dom.createImage(this.content,false);
this.widgetElement.appendChild(_15);
this.widgetElement.appendChild(_12);
this.bgDiv=_15;
this.offClass=this.baseClass+" w"+this.width+"h"+this.height+this.extraClassInfo;
this.onClass=this.offClass+" button_on";
this.offHoverClass=this.offClass+" button_hover";
this.onHoverClass=this.onClass+"_hover";
break;
}
this.showOffImage();
}
catch(ex){
jsExDebug("classButton_createDom",ex);
}
}
function classButton_setDimensions(_16,_17){
try{
this.buttonBase_setDimensions(_16,_17);
switch(this.type){
case this.TYPE_CUSTOM_WIDTH_TEXT_BUTTON:
case this.TYPE_PANEL_BUTTON:
case this.TYPE_FIXED_TEXT_BUTTON:
break;
}
}
catch(ex){
jsExDebug("classButton_setDimensions",ex);
}
}
function classButton_setImage(src){
try{
switch(this.type){
case this.TYPE_PANEL_BUTTON:
var _19=getChildNode(this.widgetElement,"img",0);
if(_19){
_19.src=src;
}
this.content=src;
break;
}
}
catch(ex){
jsExDebug("classButton_setImage",ex);
}
}
function classButton_setBackgroundColour(_1a){
try{
switch(this.type){
case this.TYPE_CUSTOM_WIDTH_TEXT_BUTTON:
case this.TYPE_PANEL_BUTTON:
case this.TYPE_FIXED_TEXT_BUTTON:
this.buttonBase_setBackgroundColour(_1a);
break;
case this.TYPE_PANEL_BUTTON_BG_COLOUR:
this.bgDiv.style.backgroundColor=_1a;
break;
}
}
catch(ex){
jsExDebug("classButton_setBackgroundColour",ex);
}
}
function classButton_showOffImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,this.offClass);
}
catch(ex){
jsExDebug("classButton_showOffImage",ex);
}
}
function classButton_showOffHoverImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,this.offHoverClass);
}
catch(ex){
jsExDebug("classButton_showOffHoverImage",ex);
}
}
function classButton_showOnImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,this.onClass);
}
catch(ex){
jsExDebug("classButton_showOnImage",ex);
}
}
function classButton_showOnHoverImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,this.onHoverClass);
}
catch(ex){
jsExDebug("classButton_showOnHoverImage",ex);
}
}

try{
classDropButton_t.prototype=new widget_t();
classDropButton_t.prototype.classDropButton_super=widget_t.prototype.constructor;
classDropButton_t.prototype.constructor=classDropButton_t;
classDropButton_t.prototype.cleanUp=classDropButton_cleanUp;
classDropButton_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
classDropButton_t.prototype.createDom=classDropButton_createDom;
classDropButton_t.prototype.bindEvents=classDropButton_bindEvents;
classDropButton_t.prototype.setTooltip=classDropButton_setTooltip;
classDropButton_t.prototype.setDefaultImage=classDropButton_setDefaultImage;
classDropButton_t.prototype.defaultBtnClickEvent=classDropButton_defaultBtnClickEvent;
classDropButton_t.prototype.dropBtnClickEvent=classDropButton_dropBtnClickEvent;
classDropButton_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_EXPAND_EVENT;
classDropButton_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.CLICK_EVENT];
}
catch(ex){
jsExDebug("classDropButton_t.prototype",ex);
}
function classDropButton_t(_1,_2,_3,_4,_5,_6,_7,_8){
try{
this.classDropButton_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=_2;
this.defaultHeight=_3;
this.defaultImage=_4;
this.defaultImageTypeOverride=_6;
this.extraDefaultImageInfo=_7;
this.settingAllowDropButton=_5;
if(!_8){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("classDropButton_t",ex);
}
}
function classDropButton_cleanUp(me){
try{
if(!me){
var me=this;
}
me.defaultBtn.cleanUp();
me.defaultBtn=null;
if(me.dropBtn){
me.dropBtn.cleanUp();
me.dropBtn=null;
}
me.width=null;
me.defaultHeight=null;
me.defaultImage=null;
me.dropWidth=null;
me.settingAllowDropButton=null;
me.defaultImageTypeOverride=null;
me.extraDefaultImageInfo=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("classDropButton_cleanUp",ex);
}
}
function classDropButton_createDom(){
try{
var _a=new this.SYSTEM.Widget.ClassButton("defaultBtn",(this.defaultImageTypeOverride?this.defaultImageTypeOverride:classButton_t.prototype.TYPE_PANEL_BUTTON),this.width,this.defaultHeight,this.extraDefaultImageInfo,this.defaultImage);
_a.setPosition(0,0);
_a.attach(this.widgetElement);
this.defaultBtn=_a;
if(this.settingAllowDropButton){
var _b="img/app/system/icons/";
var _c=null;
switch(this.width){
case 12:
_b+="24x24/12_drop_down.png";
_c=24;
break;
case 24:
_b+="24x24/24_drop_arrow.png";
_c=24;
case 40:
_b+="40x40/wide_drop.png";
_c=20;
break;
}
var _d=new this.SYSTEM.Widget.ClassButton("dropBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.width,_c,null,_b);
_d.setPosition(0,this.defaultHeight);
_d.attach(this.widgetElement);
this.dropBtn=_d;
_a.notifyEvent(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.defaultBtnClickEvent));
_d.notifyEvent(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.dropBtnClickEvent));
this.setDimensions(this.width,this.defaultHeight+_c);
}else{
_a.notifyEvent(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.dropBtnClickEvent));
this.setDimensions(this.width,this.defaultHeight);
}
}
catch(ex){
jsExDebug("classDropButton_createDom",ex);
}
}
function classDropButton_setTooltip(_e,_f,_10,_11){
try{
this.defaultBtn.allowTooltip(_e,_f,_10,_11);
}
catch(ex){
jsExDebug("classDropButton_setTooltip",ex);
}
}
function classDropButton_bindEvents(){
try{
}
catch(ex){
jsExDebug("classDropButton_createDom",ex);
}
}
function classDropButton_setDefaultImage(_12){
try{
this.defaultImage=_12;
this.defaultBtn.setImage(this.defaultImage);
}
catch(ex){
jsExDebug("classDropButton_setDefaultImage",ex);
}
}
function classDropButton_defaultBtnClickEvent(_13,_14){
try{
this.fireEvent(this.SYSTEM.Event.CLICK_EVENT,_13);
}
catch(ex){
jsExDebug("classDropButton_defaultBtnClickEvent",ex);
}
}
function classDropButton_dropBtnClickEvent(_15,_16){
try{
this.fireEvent(this.SYSTEM.Event.LIST_EXPAND_EVENT,_15);
}
catch(ex){
jsExDebug("classDropButton_defaultBtnClickEvent",ex);
}
}

try{
classSlidebar_t.prototype=new widget_t();
classSlidebar_t.prototype.classSlidebar_super=widget_t.prototype.constructor;
classSlidebar_t.prototype.constructor=classSlidebar_t;
classSlidebar_t.prototype.cleanUp=classSlidebar_cleanUp;
classSlidebar_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
classSlidebar_t.prototype.createDom=classSlidebar_createDom;
classSlidebar_t.prototype.bindEvents=classSlidebar_bindEvents;
classSlidebar_t.prototype.allowValueDisplay=classSlidebar_allowValueDisplay;
classSlidebar_t.prototype.displayValue=classSlidebar_displayValue;
classSlidebar_t.prototype.setSlideValue=classSlidebar_setSlideValue;
classSlidebar_t.prototype.quantify=classSlidebar_quantify;
classSlidebar_t.prototype.setSlidebarPosition=classSlidebar_setSlidebarPosition;
classSlidebar_t.prototype.setBarLength=classSlidebar_setBarLength;
classSlidebar_t.prototype.setUpperLimit=classSlidebar_setUpperLimit;
classSlidebar_t.prototype.setScreenPosition=classSlidebar_setScreenPosition;
classSlidebar_t.prototype.getDisplayValue=classSlidebar_getDisplayValue;
classSlidebar_t.prototype.hideValue=classSlidebar_hideValue;
classSlidebar_t.prototype.calculateSize=classSlidebar_calculateSize;
classSlidebar_t.prototype.slideSelectEvent=classSlidebar_slideSelectEvent;
classSlidebar_t.prototype.slideMoveEvent=classSlidebar_slideMoveEvent;
classSlidebar_t.prototype.slideMoveEndEvent=classSlidebar_slideMoveEndEvent;
classSlidebar_t.prototype.slideHoverEvent=classSlidebar_slideHoverEvent;
classSlidebar_t.prototype.slideHoverEndEvent=classSlidebar_slideHoverEndEvent;
classSlidebar_t.prototype.slideMouseDownEvent=classSlidebar_slideMouseDownEvent;
classSlidebar_t.prototype.slideMouseUpEvent=classSlidebar_slideMouseUpEvent;
classSlidebar_t.prototype.HORIZONTAL=0;
classSlidebar_t.prototype.VERTICAL=1;
classSlidebar_t.prototype.DISPLAY_BG_COLOUR="rgb( 251, 240, 198 )";
classSlidebar_t.prototype.DEFAULT_BAR_HEIGHT=15;
classSlidebar_t.prototype.SLIDE_IMG="img/app/system/widgets/new_scrollbar/scroll";
classSlidebar_t.prototype.DEFAULT_EVENT=SYSTEM.Event.VALUE_CHANGED_EVENT;
classSlidebar_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.DRAG_EVENT];
}
catch(ex){
jsExDebug("classSlidebar_t.prototype",ex);
}
function classSlidebar_t(_1,_2,_3,_4,_5){
try{
this.classSlidebar_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.slideWidth=0;
this.slideHeight=0;
this.sliderHalfLength=0;
this.inDrag=false;
if(!_5){
this.createDom(_2,_3);
this.bindEvents();
}
if(_4){
this.quantify(_4);
}
}
catch(ex){
jsExDebug("classSlidebar_t",ex);
}
return;
}
function classSlidebar_cleanUp(me){
try{
if(!me){
me=this;
}
me.cleanUpString+=" - slider - ";
me.SYSTEM.Event.detachEvent(me.widgetElement,"onclick","click");
me.SYSTEM.Event.detachEvent(me.slideImage,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.slideImage,"onmouseout","mouseout");
me.SYSTEM.Event.detachEvent(me.slideImage,"onmousedown","mousedown");
me.SYSTEM.Event.detachEvent(me.slideImage,"onmouseup","mouseup");
me.SYSTEM.Event.removeDragEventHandlers(me.slideImage);
me.maxPosition=null;
me.screenPositionX=null;
me.screenPositionY=null;
me.direction=null;
me.barHeight=null;
me.barLength=null;
me.upperLimitPosition=null;
me.upperLimitValue=null;
me.slideValue=null;
me.slidePercentage=null;
me.slidePositionX=null;
me.slidePositionY=null;
me.quantified=null;
me.quantifiedValue=null;
me.slideWidth=null;
me.slideHeight=null;
me.sliderHalfLength=null;
me.displayVisible=null;
me.displayDiv=null;
me.displayCount=null;
me.mouseOver=null;
me.settingAutomaticValueDisplay=null;
me.minimumValue=null;
me.SYSTEM.Event.disableDragEnabledElement(me.slideImage);
me.slideImage=null;
me.slideElement=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("classSlidebar_cleanUp",ex);
}
}
function classSlidebar_createDom(_7,_8){
try{
this.widgetElement=document.createElement("div");
this.widgetElement.style.position="absolute";
this.maxPosition=_7;
this.screenPositionX=null;
this.screenPositionY=null;
this.settingNotifyPanelOfEvent=false;
this.displayCount=0;
this.barHeight=this.DEFAULT_BAR_HEIGHT;
this.barLength=_7;
this.upperLimitPosition=this.barLength;
this.upperLimitValue=this.barLength;
if(_8){
this.direction=this.VERTICAL;
}else{
this.direction=this.HORIZONTAL;
}
this.slideElement=this.SYSTEM.Dom.createDiv();
this.slideImage=this.SYSTEM.Event.createDragEnabledElement("img",0,0);
this.slideElement.appendChild(this.slideImage);
this.widgetElement.appendChild(this.slideElement);
if(this.direction==this.HORIZONTAL){
this.widgetElement.style.width=this.barLength+"px";
this.widgetElement.style.height=this.DEFAULT_BAR_HEIGHT+"px";
this.SYSTEM.Dom.setElementClass(this.slideElement,"h_scrollbar");
this.SYSTEM.Dom.setElementClass(this.widgetElement,"h_scroll");
this.slideImage.src=this.SLIDE_IMG+"_h.png";
}else{
this.widgetElement.style.width=this.DEFAULT_BAR_HEIGHT+"px";
this.widgetElement.style.height=this.barLength+"px";
this.SYSTEM.Dom.setElementClass(this.slideElement,"v_scrollbar");
this.SYSTEM.Dom.setElementClass(this.widgetElement,"v_scroll");
this.slideImage.src=this.SLIDE_IMG+"_v.png";
}
this.setSlidebarPosition(0,0);
}
catch(ex){
jsExDebug("classSlidebar_createDom",ex);
}
}
function classSlidebar_bindEvents(_9){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"onclick","click",this.slideSelectEvent,this);
this.SYSTEM.Event.attachEvent(this.slideImage,"onclick","click",cancelEvent);
this.SYSTEM.Event.attachEvent(this.slideImage,"onmouseover","mouseover",this.slideHoverEvent,this);
this.SYSTEM.Event.attachEvent(this.slideImage,"onmouseout","mouseout",this.slideHoverEndEvent,this);
this.SYSTEM.Event.attachEvent(this.slideImage,"onmousedown","mousedown",this.slideMouseDownEvent,this,true);
this.SYSTEM.Event.attachEvent(this.slideImage,"onmouseup","mouseup",this.slideMouseUpEvent,this);
this.SYSTEM.Event.bindDragEventHandlers(this.slideImage,null,this.slideMoveEvent,this.slideMoveEndEvent,this);
}
catch(ex){
jsExDebug("classSlidebar_bindEvents",ex);
}
}
function classSlidebar_allowValueDisplay(_a,_b,_c,_d,_e){
try{
if(_c==null){
var _c=this.DEFAULT_BAR_HEIGHT;
}
this.displayDiv=document.createElement("div");
this.displayDiv.style.position="absolute";
this.displayDiv.style.backgroundColor=this.DISPLAY_BG_COLOUR;
this.displayDiv.style.width=_a+"px";
this.displayDiv.style.height=_b+"px";
this.displayDiv.style.border="solid 1px #AAAAAA";
this.displayDiv.style.textAlign="center";
this.displayVisible=false;
if(this.direction==this.HORIZONTAL){
this.displayDiv.style.left=this.slideElement.style.left;
if(_d){
this.displayDiv.style.top=(parseInt(this.slideElement.style.top)+this.DEFAULT_BAR_HEIGHT+_c)+"px";
}else{
this.displayDiv.style.top=(parseInt(this.slideElement.style.top)-(_b+_c))+"px";
}
}else{
this.displayDiv.style.top=this.slideElement.style.top;
if(_d){
this.displayDiv.style.left=(parseInt(this.slideElement.style.left)+this.DEFAULT_BAR_HEIGHT+_c)+"px";
}else{
this.displayDiv.style.left=(parseInt(this.slideElement.style.left)-(_a+_c))+"px";
}
}
this.settingAutomaticValueDisplay=!_e;
}
catch(ex){
jsExDebug("classSlidebar_allowValueDisplay",ex);
}
}
function classSlidebar_displayValue(_f,_10){
function hideValue(){
if(me.displayCount==1){
me.hideValue();
}
me.displayCount--;
}
try{
var me=this;
var _12;
if(_f){
this.displayDiv.innerHTML=_f;
}else{
this.displayDiv.innerHTML=this.slideValue;
}
if(this.direction==this.HORIZONTAL){
this.displayDiv.style.left=this.slideElement.style.left;
}else{
this.displayDiv.style.top=this.slideElement.style.top;
}
if(!this.displayVisible){
this.widgetElement.appendChild(this.displayDiv);
this.displayVisible=true;
}
if(_10){
this.displayCount++;
setTimeout(hideValue,1000);
}
}
catch(ex){
jsExDebug("classSlidebar_displayValue",ex);
}
}
function classSlidebar_hideValue(){
try{
if(this.displayVisible){
this.displayDiv.innerHTML="";
this.widgetElement.removeChild(this.displayDiv);
this.displayVisible=false;
}
}
catch(ex){
jsExDebug("classSlidebar_hideValue",ex);
}
}
function classSlidebar_calculateSize(){
try{
if(this.slideWidth||this.slideHeight){
return;
}
this.slideWidth=this.slideElement.clientWidth;
this.slideHeight=this.slideElement.clientHeight;
this.slideImage.style.width=this.slideElement.clientWidth+"px";
this.slideImage.style.height=this.slideElement.clientHeight+"px";
if(this.direction==this.HORIZONTAL){
this.sliderHalfLength=Math.round(this.slideWidth/2);
}else{
this.sliderHalfLength=Math.round(this.slideHeight/2);
}
}
catch(ex){
jsExDebug("classSlidebar_calculateSize",ex);
}
}
function classSlidebar_setSlideValue(_13){
try{
if(_13==null){
return;
}
this.calculateSize();
var _14;
if(_13>=this.upperLimitValue){
_13=this.upperLimitValue;
_14=this.upperLimitPosition;
}else{
_14=_13/this.quantifiedValue*this.barLength;
}
if((_14+this.sliderHalfLength)>this.maxPosition){
_14=this.maxPosition-this.sliderHalfLength;
}
if(_14<this.sliderHalfLength){
_14=this.sliderHalfLength;
}
if(this.direction==this.HORIZONTAL){
this.slidePositionX=_14;
this.slideElement.style.left=(this.sliderHalfLength?_14-this.sliderHalfLength:0)+"px";
}else{
this.slidePositionY=_14;
this.slideElement.style.top=(this.sliderHalfLength?_14-this.sliderHalfLength:0)+"px";
}
this.slideValue=_13;
}
catch(ex){
jsExDebug("classSlidebar_setSlideValue");
}
}
function classSlidebar_quantify(_15){
try{
this.quantified=true;
this.quantifiedValue=_15;
if(!this.upperLimitValue){
this.upperLimitValue=this.quantifiedValue;
}
this.minimumValue=parseInt(this.sliderHalfLength/this.barLength*this.quantifiedValue);
}
catch(ex){
jsExDebug("classSlidebar_quantify",ex);
}
return;
}
function classSlidebar_setBarLength(_16){
try{
this.barLength=_16;
if(this.direction==this.HORIZONTAL){
this.widgetElement.style.width=_16+"px";
}else{
this.widgetElement.style.height=_16+"px";
}
this.maxPosition=_16;
this.upperLimitPosition=_16-this.upperLimitOffset;
}
catch(ex){
jsExDebug("classSlidebar_setBarLength\t",ex);
}
}
function classSlidebar_setUpperLimit(_17,_18){
try{
this.upperLimitPosition=_17;
this.upperLimitValue=_18;
this.upperLimitOffset=this.maxPosition-_17;
}
catch(ex){
jsExDebug("classSlidebar_setUpperLimit",ex);
}
}
function classSlidebar_setScreenPosition(_19,_1a){
try{
this.screenPositionX=_19;
this.screenPositionY=_1a;
}
catch(ex){
jsExDebug("classSlidebar_setScreenPosition",ex);
}
}
function classSlidebar_getDisplayValue(){
try{
return this.slideValue;
}
catch(ex){
jsExDebug("classSlidebar_getDisplayValue",ex);
}
}
function classSlidebar_setSlidebarPosition(_1b,_1c){
try{
if(this.direction==this.HORIZONTAL){
if(_1b<this.sliderHalfLength){
_1b=this.sliderHalfLength;
this.slidePercentage=0;
}
if((_1b+this.sliderHalfLength)>this.maxPosition){
_1b=this.maxPosition-this.sliderHalfLength;
}
if(_1b>this.upperLimitPosition){
this.slideValue=this.upperLimitValue;
_1b=this.upperLimitPosition;
}
this.slideElement.style.left=(this.slideWidth?_1b-(this.slideWidth/2):0)+"px";
this.slideElement.style.top=_1c+"px";
this.slidePercentage=_1b/this.barLength;
}else{
if(_1c<this.sliderHalfLength){
_1c=this.sliderHalfLength;
this.slidePercentage=0;
}
if((_1c+this.sliderHalfLength)>this.maxPosition){
_1c=this.maxPosition-this.sliderHalfLength;
}
if(_1c>this.upperLimitPosition){
this.slideValue=this.upperLimitValue;
_1c=this.upperLimitPosition;
}
this.slideElement.style.left=_1b+"px";
this.slideElement.style.top=(this.slideHeight?_1c-(this.slideHeight/2):0)+"px";
this.slidePercentage=_1c/this.barLength;
}
if(this.quantified){
this.slideValue=Math.round(this.slidePercentage*this.quantifiedValue);
}else{
if(this.direction==this.HORIZONTAL){
this.slideValue=_1b-(this.slideWidth/2);
}else{
this.slideValue=_1c-(this.slideHeight/2);
}
}
this.slidePositionX=_1b;
this.slidePositionY=_1c;
}
catch(ex){
jsExDebug("classSlidebar_setSlidebarPosition "+_1b+","+_1c,ex);
}
}
function classSlidebar_slideSelectEvent(_1d,me){
try{
if(!me.screenPositionX||!me.screenPositionY){
return;
}
me.calculateSize();
var _1f;
if(me.direction==me.HORIZONTAL){
if(me.inDrag){
_1f=parseFloat(me.slideElement.style.left)+me.sliderHalfLength;
}else{
_1f=me.SYSTEM.Event.mouseX-me.screenPositionX;
}
}else{
if(me.inDrag){
_1f=parseFloat(me.slideElement.style.top)+me.sliderHalfLength;
}else{
_1f=me.SYSTEM.Event.mouseY-me.screenPositionY;
}
}
me.slidePercentage=(_1f-me.sliderHalfLength)/(me.barLength-(2*me.sliderHalfLength));
if((_1f+me.sliderHalfLength)>me.maxPosition){
_1f=me.maxPosition-me.sliderHalfLength;
me.slidePercentage=1;
}
if(_1f<me.sliderHalfLength){
_1f=me.sliderHalfLength;
me.slidePercentage=0;
}
if(!me.quantified){
me.slideValue=_1f;
}else{
if(_1f>me.upperLimitPosition){
me.slideValue=me.upperLimitValue;
_1f=me.upperLimitPosition;
}else{
me.slideValue=Math.round(me.slidePercentage*me.quantifiedValue);
}
}
if(me.direction==me.HORIZONTAL){
me.slidePositionX=_1f;
me.slideElement.style.left=(_1f-me.sliderHalfLength)+"px";
}else{
me.slidePositionY=_1f;
me.slideElement.style.top=(_1f-me.sliderHalfLength)+"px";
}
if(me.settingAutomaticValueDisplay){
me.displayValue(null,1);
}
me.fireEvent(me.SYSTEM.Event.VALUE_CHANGED_EVENT,_1d);
me.inDrag=false;
}
catch(ex){
jsExDebug("classSlidebar_slideSelectEvent",ex);
}
}
function classSlidebar_slideMoveEvent(_20,me){
try{
me.calculateSize();
me.inDrag=true;
if(me.direction==me.HORIZONTAL){
me.SYSTEM.Dom.setElementClass(me.slideElement,"h_scrollbar on");
}else{
me.SYSTEM.Dom.setElementClass(me.slideElement,"v_scrollbar on");
}
var _22;
if(me.direction==me.HORIZONTAL){
_22=me.slidePositionX+me.SYSTEM.Event.dragDistanceX;
}else{
_22=me.slidePositionY+me.SYSTEM.Event.dragDistanceY;
}
me.slidePercentage=(_22-me.sliderHalfLength)/(me.barLength-(2*me.sliderHalfLength));
if((_22+me.sliderHalfLength)>me.maxPosition){
_22=me.maxPosition-me.sliderHalfLength;
me.slidePercentage=1;
}
if(_22<me.sliderHalfLength){
_22=me.sliderHalfLength;
me.slidePercentage=0;
}
if(me.direction==me.HORIZONTAL){
me.slideElement.style.left=(_22-me.sliderHalfLength)+"px";
}else{
me.slideElement.style.top=(_22-me.sliderHalfLength)+"px";
}
if(me.quantified){
me.slideValue=Math.round(me.slidePercentage*me.quantifiedValue);
}else{
me.slideValue=_22;
}
if(me.settingAutomaticValueDisplay){
me.displayValue();
}
me.fireEvent(me.SYSTEM.Event.DRAG_EVENT,_20);
}
catch(ex){
jsExDebug("classSlidebar_slideMoveEvent",ex);
}
}
function classSlidebar_slideMoveEndEvent(_23,me){
try{
me.slideSelectEvent(_23,me);
}
catch(ex){
jsExDebug("classSlidebar_slideMoveEndEvent",ex);
}
}
function classSlidebar_slideHoverEvent(_25,me){
try{
me.calculateSize();
me.mouseOver=true;
if(me.direction==me.HORIZONTAL){
me.SYSTEM.Dom.setElementClass(me.slideElement,"h_scrollbar hover");
me.slideImage.src=me.SLIDE_IMG+"_h_hover.png";
}else{
me.SYSTEM.Dom.setElementClass(me.slideElement,"v_scrollbar hover");
me.slideImage.src=me.SLIDE_IMG+"_v_hover.png";
}
}
catch(ex){
jsExDebug("classSlidebar_slideHoverEvent",ex);
}
}
function classSlidebar_slideHoverEndEvent(_27,me){
try{
me.calculateSize();
me.mouseOver=false;
if(me.direction==me.HORIZONTAL){
me.SYSTEM.Dom.setElementClass(me.slideElement,"h_scrollbar");
me.slideImage.src=me.SLIDE_IMG+"_h.png";
}else{
me.SYSTEM.Dom.setElementClass(me.slideElement,"v_scrollbar");
me.slideImage.src=me.SLIDE_IMG+"_v.png";
}
}
catch(ex){
jsExDebug("classSlidebar_slideHoverEndEvent",ex);
}
}
function classSlidebar_slideMouseDownEvent(_29,me){
try{
me.calculateSize();
if(me.direction==me.HORIZONTAL){
me.SYSTEM.Dom.setElementClass(me.slideElement,"h_scrollbar on");
me.slideImage.src=me.SLIDE_IMG+"_h.png";
}else{
me.SYSTEM.Dom.setElementClass(me.slideElement,"v_scrollbar on");
me.slideImage.src=me.SLIDE_IMG+"_v.png";
}
}
catch(ex){
jsExDebug("classSlidebar_slideMouseDownEvent",ex);
}
}
function classSlidebar_slideMouseUpEvent(_2b,me){
try{
if(me.mouseOver){
if(me.direction==me.HORIZONTAL){
me.SYSTEM.Dom.setElementClass(me.slideElement,"h_scrollbar hover");
me.slideImage.src=me.SLIDE_IMG+"_h_hover.png";
}else{
me.SYSTEM.Dom.setElementClass(me.slideElement,"v_scrollbar hover");
me.slideImage.src=me.SLIDE_IMG+"_v_hover.png";
}
}else{
if(me.direction==me.HORIZONTAL){
me.SYSTEM.Dom.setElementClass(me.slideElement,"h_scrollbar");
me.slideImage.src=me.SLIDE_IMG+"_h.png";
}else{
me.SYSTEM.Dom.setElementClass(me.slideElement,"v_scrollbar");
me.slideImage.src=me.SLIDE_IMG+"_v.png";
}
}
}
catch(ex){
jsExDebug("classSlidebar_slideMouseDownEvent",ex);
}
}

try{
customClassButton_t.prototype=new buttonBase_t();
customClassButton_t.prototype.customClassButton_super=buttonBase_t.prototype.constructor;
customClassButton_t.prototype.constructor=customClassButton_t;
customClassButton_t.prototype.buttonBase_cleanUp=buttonBase_t.prototype.cleanUp;
customClassButton_t.prototype.cleanUp=customClassButton_cleanUp;
customClassButton_t.prototype.createDom=customClassButton_createDom;
customClassButton_t.prototype.showOffImage=customClassButton_showOffImage;
customClassButton_t.prototype.showOffHoverImage=customClassButton_showOffHoverImage;
customClassButton_t.prototype.showOnImage=customClassButton_showOnImage;
customClassButton_t.prototype.showOnHoverImage=customClassButton_showOnHoverImage;
}
catch(ex){
jsExDebug("customClassButton_t.prototype",ex);
}
function customClassButton_t(_1,_2,_3,_4,_5,_6,_7,_8,_9){
try{
this.customClassButton_super(_1,_2,_3,_5,_6,_7,_8,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.baseClass=_4;
if(!_9){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("customClassButton_t",ex);
}
}
function customClassButton_cleanUp(me){
try{
if(!me){
var me=this;
}
me.baseClass=null;
me.offClass=null;
me.onClass=null;
me.offHoverClass=null;
me.onHoverClass=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("customClassButton_cleanUp",ex);
}
}
function customClassButton_createDom(){
try{
this.offClass=this.baseClass;
this.onClass=this.offClass;
this.offHoverClass=this.offClass+" hov";
this.onHoverClass=this.offHoverClass;
this.showOffImage();
}
catch(ex){
jsExDebug("customClassButton_createDom",ex);
}
}
function customClassButton_showOffImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,this.offClass);
}
catch(ex){
jsExDebug("customClassButton_showOffImage",ex);
}
}
function customClassButton_showOffHoverImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,this.offHoverClass);
}
catch(ex){
jsExDebug("customClassButton_showOffHoverImage",ex);
}
}
function customClassButton_showOnImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,this.onClass);
}
catch(ex){
jsExDebug("customClassButton_showOnImage",ex);
}
}
function customClassButton_showOnHoverImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,this.onHoverClass);
}
catch(ex){
jsExDebug("customClassButton_showOnHoverImage",ex);
}
}

try{
button_t.prototype=new buttonBase_t();
button_t.prototype.button_super=buttonBase_t.prototype.constructor;
button_t.prototype.constructor=button_t;
button_t.prototype.buttonBase_cleanUp=buttonBase_t.prototype.cleanUp;
button_t.prototype.cleanUp=button_cleanUp;
button_t.prototype.createDom=button_createDom;
button_t.prototype.setDimensions=button_setDimensions;
button_t.prototype.allowText=button_allowText;
button_t.prototype.allowHighlightText=button_allowHighlightText;
button_t.prototype.setOpacity=button_setOpacity;
button_t.prototype.setAltText=button_setAltText;
button_t.prototype.setCursor=button_setCursor;
button_t.prototype.setImage=button_setImage;
button_t.prototype.isOn=button_isOn;
button_t.prototype.overrideImages=button_overrideImages;
button_t.prototype.applyImage=button_applyImage;
button_t.prototype.showOffImage=button_showOffImage;
button_t.prototype.showOffHoverImage=button_showOffHoverImage;
button_t.prototype.showOnImage=button_showOnImage;
button_t.prototype.showOnHoverImage=button_showOnHoverImage;
button_t.prototype.DEFAULT_WIDTH=24;
button_t.prototype.DEFAULT_HEIGHT=24;
}
catch(ex){
jsExDebug("button_t.prototype",ex);
}
function button_t(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){
try{
this.button_super(_1,_4,_5,_6,_7,_8,_9,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.buttonState=this.OFF_STATE;
this.settingAllowText=false;
this.settingAllowHighlightText=false;
this.stateText=null;
this.stateTextFont=null;
this.stateTextColour=null;
this.stateHighlightText=null;
this.stateHighlightTextFont=null;
this.stateHighlightTextColour=null;
this.stateImageOptions=_3;
this.stateOffImage=_2+"_off.png";
if(_3&this.ON_IMAGE){
this.stateOnImage=_2+"_on.png";
}else{
this.stateOnImage=this.stateOffImage;
}
if(_3&this.HOVER_IMAGE){
this.stateOffHighlightImage=_2+"_hov.png";
}else{
this.stateOffHighlightImage=null;
}
if(_3&this.HOVER_ON_IMAGE){
this.stateOnHighlightImage=_2+"_on_hov.png";
}else{
this.stateOnHighlightImage=null;
}
if(!_a){
this.createDom(this.stateOffImage,_4,_5,_6,_7,_8,_9);
this.bindEvents();
}
}
catch(ex){
jsExDebug("button_t",ex);
}
return;
}
function button_cleanUp(me){
try{
if(!me){
var me=this;
}
me.settingAllowText=null;
me.settingAllowHighlightText=null;
me.stateText=null;
me.stateTextFont=null;
me.stateTextColour=null;
me.stateHighlightText=null;
me.stateHighlightTextFont=null;
me.stateHighlightTextColour=null;
me.stateImageOptions=null;
me.stateHighlighted=null;
me.stateOffImage=null;
me.stateOnImage=null;
me.stateOffHighlightImage=null;
me.stateOnHighlightImage=null;
me.imageElement=null;
me.buttonText=null;
me.buttonBase_cleanUp();
}
catch(ex){
jsExDebug("button_cleanUp",ex);
}
}
function button_createDom(_c,_d,_e,_f,_10,_11,_12){
try{
var _13=document.createElement("img");
_13.style.position="absolute";
_13.style.cursor="pointer";
_13.src=(_c?_c:"");
this.widgetElement.appendChild(_13);
this.imageElement=_13;
this.setDimensions(_d,_e);
}
catch(ex){
jsExDebug("button_createDom",ex);
}
}
function button_setOpacity(_14){
try{
if(document.all){
this.widgetElement.style.filter="alpha(opacity="+_14+")";
this.imageElement.style.filter="alpha(opacity="+_14+")";
}else{
this.widgetElement.style.opacity=(_14/100).toString();
this.imageElement.style.opacity=(_14/100).toString();
}
}
catch(ex){
jsExDebug("widget_setOpacity",ex);
}
}
function button_setDimensions(_15,_16){
try{
if(!this.imageElement){
return;
}
if(_15==null){
_15=this.DEFAULT_WIDTH;
}
if(_16==null){
_16=this.DEFAULT_HEIGHT;
}
this.width=_15;
this.height=_16;
this.widgetElement.style.width=_15+"px";
this.widgetElement.style.height=_16+"px";
this.imageElement.style.width=_15+"px";
this.imageElement.style.height=_16+"px";
}
catch(ex){
jsExDebug("button_setDimensions",ex);
}
}
function button_allowText(_17,_18,_19){
try{
this.stateText=_17;
if(_18){
this.stateTextFont=_18;
}
if(_19){
this.stateTextColour=_19;
}
this.settingAllowText=true;
if(!this.buttonText){
var _1a=document.createElement("div");
_1a.style.position="absolute";
_1a.style.left="0px";
_1a.style.top="0px";
_1a.style.width="100%";
_1a.style.height="100%";
_1a.style.textAlign="center";
this.buttonText=_1a;
}
if(_18){
this.buttonText.style.font=_18;
}
if(_19){
this.buttonText.style.color=_19;
}
this.buttonText.style.lineHeight=this.height+"px";
this.buttonText.innerHTML=_17;
this.buttonText.style.cursor="default";
this.widgetElement.appendChild(this.buttonText);
}
catch(ex){
jsExDebug("button_allowText",ex);
}
return;
}
function button_allowHighlightText(_1b,_1c,_1d){
try{
this.stateHighlightText=_1b;
if(_1c){
this.stateHighlightTextFont=_1c;
}
if(_1d){
this.stateHighlightTextColour=_1d;
}
this.settingAllowHighlightText=true;
}
catch(ex){
jsExDebug("button_allowHighlightText",ex);
}
return;
}
function button_setAltText(_1e){
try{
this.imageElement.alt=_1e;
}
catch(ex){
jsExDebug("button_setAltText",ex);
}
return;
}
function button_setCursor(_1f){
try{
this.imageElement.style.cursor=_1f;
}
catch(ex){
jsExDebug("button_setCursor",ex);
}
}
function button_setImage(_20,_21){
try{
if(!_21){
var _21=this.stateImageOptions;
}
this.stateOffImage=_20+"_off.png";
if(_21&this.ON_IMAGE){
this.stateOnImage=_20+"_on.png";
}else{
this.stateOnImage=this.stateOffImage;
}
if(_21&this.HOVER_IMAGE){
this.stateOffHighlightImage=_20+"_hov.png";
}else{
this.stateOffHighlightImage=null;
}
if(_21&this.HOVER_ON_IMAGE){
this.stateOnHighlightImage=_20+"_on_hov.png";
}else{
this.stateOnHighlightImage=null;
}
this.setState(this.buttonState);
}
catch(ex){
jsExDebug("button_setImage",ex);
}
}
function button_isOn(){
try{
return (this.buttonState==this.ON_STATE);
}
catch(ex){
jsExDebug("button_isOn",ex);
}
}
function button_overrideImages(_22,_23,_24,_25){
try{
this.stateOffImage=(_22?_22:this.stateOffImage);
this.stateOffHighlightImage=(_23?_23:this.stateOffHighlightImage);
this.stateOnImage=(_24?_24:this.stateOnImage);
this.stateOnHighlightImage=(_25?_25:this.stateOnHighlightImage);
}
catch(ex){
jsExDebug("button_overrideImages",ex);
}
}
function button_applyImage(_26){
try{
if(this.SYSTEM.Network&&this.SYSTEM.Network.networkStatus==this.SYSTEM.Network.ONLINE){
this.imageElement.src=_26;
}else{
if(!this.SYSTEM.Network){
this.imageElement.src=_26;
}
}
}
catch(ex){
jsExDebug("button_applyImage",ex);
}
}
function button_showOffImage(){
try{
this.imageElement.src=this.stateOffImage;
}
catch(ex){
jsExDebug("buttonBase_showOffImage",ex);
}
}
function button_showOffHoverImage(){
try{
if(this.stateImageOptions&this.HOVER_IMAGE){
this.imageElement.src=this.stateOffHighlightImage;
}
}
catch(ex){
jsExDebug("buttonBase_showOffHoverImage",ex);
}
}
function button_showOnImage(){
try{
if(this.stateImageOptions&this.ON_IMAGE){
this.imageElement.src=this.stateOnImage;
}
}
catch(ex){
jsExDebug("buttonBase_showOnImage",ex);
}
}
function button_showOnHoverImage(){
try{
if(this.stateImageOptions&this.HOVER_ON_IMAGE){
this.imageElement.src=this.stateOnHighlightImage;
}
}
catch(ex){
jsExDebug("buttonBase_showOnHoverImage",ex);
}
}

try{
widgetText_t.prototype=new widget_t();
widgetText_t.prototype.widgetText_super=widget_t.prototype.constructor;
widgetText_t.prototype.constructor=widgetText_t;
widgetText_t.prototype.cleanUp=widgetText_cleanUp;
widgetText_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetText_t.prototype.createDom=widgetText_createDom;
widgetText_t.prototype.bindEvents=widgetText_bindEvents;
widgetText_t.prototype.setWidth=widgetText_setDimensions;
widgetText_t.prototype.setDimensions=widgetText_setDimensions;
widgetText_t.prototype.setContent=widgetText_setContent;
widgetText_t.prototype.clearContent=widgetText_clearContent;
widgetText_t.prototype.styleAlign=widgetText_styleAlign;
widgetText_t.prototype.styleFontFace=widgetText_styleFontFace;
widgetText_t.prototype.styleFontSize=widgetText_styleFontSize;
widgetText_t.prototype.getContent=widgetText_getContent;
widgetText_t.prototype.focus=widgetText_focus;
widgetText_t.prototype.allowWrapText=widgetText_allowWrapText;
widgetText_t.prototype.allowPassword=widgetText_allowPassword;
widgetText_t.prototype.allowReadOnly=widgetText_allowReadOnly;
widgetText_t.prototype.disallowReadOnly=widgetText_disallowReadOnly;
widgetText_t.prototype.allowOverflow=widgetText_allowOverflow;
widgetText_t.prototype.appendContent=widgetText_appendContent;
widgetText_t.prototype.hide=widgetText_hide;
widgetText_t.prototype.show=widgetText_show;
widgetText_t.prototype.hasFocus=widgetText_hasFocus;
widgetText_t.prototype.getClientHeight=widgetText_getClientHeight;
widgetText_t.prototype.focusEvent=widgetText_focusEvent;
widgetText_t.prototype.blurEvent=widgetText_blurEvent;
widgetText_t.prototype.ALIGN_LEFT=1;
widgetText_t.prototype.ALIGN_RIGHT=2;
widgetText_t.prototype.ALIGN_CENTRE=3;
widgetText_t.prototype.BORDER_WIDTH=1;
widgetText_t.prototype.DEFAULT_HEIGHT=6;
widgetText_t.prototype.DEFAULT_WIDTH=80;
widgetText_t.prototype.LEFT_CORNER_IMG_SRC="img/site/global/right_curve_text.bmp";
widgetText_t.prototype.RIGHT_CORNER_IMG_SRC="img/site/global/left_curve_text.bmp";
widgetText_t.prototype.DEFAULT_EVENT=SYSTEM.Event.FOCUS_EVENT;
widgetText_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.BLUR_EVENT];
}
catch(ex){
jsExDebug("widgetText_t.prototype",ex);
}
function widgetText_t(_1,_2,_3,_4,_5){
try{
this.widgetText_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.settingDisabled=false;
this.stateHasFocus=false;
if(!_5){
this.createDom(_2,_3,_4);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetText_t",ex);
}
return;
}
function widgetText_cleanUp(me){
try{
if(!me){
var me=this;
}
if(this.stateIsDiv){
me.SYSTEM.Event.detachEvent(me.textBox,"onclick","click");
me.SYSTEM.Event.detachEvent(me.textBox,"allclickprop","allclickprop");
}else{
me.SYSTEM.Event.detachEvent(me.textBox,"onfocus","focus");
me.SYSTEM.Event.detachEvent(me.textBox,"onblur","blur");
}
me.textBox=null;
me.stateIsDiv=null;
me.stateHasFocus=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetText_cleanUp",ex);
}
}
function widgetText_createDom(_7,_8,_9){
try{
if(_7){
this.textBox=document.createElement("textarea");
this.stateIsDiv=false;
}else{
if(_8){
this.textBox=document.createElement("div");
this.textBox.style.position="absolute";
this.textBox.style.backgroundColor="white";
this.stateIsDiv=true;
}else{
if(_9){
this.textBox=document.createElement("input");
this.textBox.type="password";
this.stateIsDiv=false;
}else{
this.textBox=document.createElement("input");
this.stateIsDiv=false;
}
}
}
this.textBox.style.border="solid "+this.BORDER_WIDTH+"px #AAAAAA";
if(!this.stateIsDiv){
this.widgetElement.style.overflow="auto";
}
this.widgetElement.appendChild(this.textBox);
this.SYSTEM.Event.enableTextSelect(this.textBox);
}
catch(ex){
jsDebug("widgetText_createDom",ex);
}
}
function widgetText_bindEvents(){
try{
if(this.stateIsDiv){
this.SYSTEM.Event.attachEvent(this.textBox,"onclick","click",this.focusEvent,this,false);
this.SYSTEM.Event.attachEvent(this.textBox,"allclickprop","allclickprop",this.blurEvent,this);
}else{
this.SYSTEM.Event.attachEvent(this.textBox,"onfocus","focus",this.focusEvent,this,true);
this.SYSTEM.Event.attachEvent(this.textBox,"onblur","blur",this.blurEvent,this,false);
}
}
catch(ex){
jsDebug("widgetText_bindEvents",ex);
}
}
function widgetText_setDimensions(_a,_b){
try{
this.width=_a;
this.widgetElement.style.width="auto";
this.textBox.style.width=_a+"px";
if(_b){
this.height=_b;
this.widgetElement.style.height=(_b+8)+"px";
this.textBox.style.height=_b+"px";
}else{
this.widgetElement.style.height="auto";
}
}
catch(ex){
jsExDebug("widgetText_setDimensions",ex);
}
}
function widgetText_setContent(_c){
try{
if(!this.stateIsDiv){
this.textBox.value=_c;
}else{
this.textBox.innerHTML=_c;
}
}
catch(ex){
jsExDebug("widgetText_setContent",ex);
}
}
function widgetText_clearContent(){
try{
if(!this.stateIsDiv){
this.textBox.value="";
}else{
this.textBox.innerHTML="";
}
}
catch(ex){
jsExDebug("widgetText_clearContent",ex);
}
}
function widgetText_styleAlign(_d){
try{
switch(_d){
case this.ALIGN_LEFT:
this.textBox.style.textAlign="left";
break;
case this.ALIGN_RIGHT:
this.textBox.style.textAlign="right";
break;
case this.ALIGN_CENTRE:
this.textBox.style.textAlign="center";
break;
default:
this.textBox.style.textAlign="left";
break;
}
}
catch(ex){
jsExDebug("widgetText_styleAlign",ex);
}
}
function widgetText_styleFontFace(_e){
try{
this.textBox.style.fontFamily=_e;
}
catch(ex){
jsExDebug("widgetText_styleFontFace",ex);
}
}
function widgetText_styleFontSize(_f){
try{
if(_f){
var _10;
switch(_f){
case 1:
_10=8;
break;
case 2:
_10=10;
break;
case 3:
_10=12;
break;
case 4:
_10=14;
break;
case 5:
_10=18;
break;
case 6:
_10=24;
break;
case 7:
_10=36;
break;
}
this.textBox.style.fontSize=_10+"pt";
}
}
catch(ex){
jsExDebug("widgetText_styleFontSize",ex);
}
}
function widgetText_getContent(){
try{
return (this.stateIsDiv?this.textBox.innerHTML:this.textBox.value);
}
catch(ex){
jsExDebug("widgetText_getContent",ex);
}
}
function widgetText_focus(){
try{
if(this.visible&&!this.stateIsDiv){
this.textBox.focus();
}
}
catch(ex){
jsExDebug("widgetText_focus",ex);
}
}
function widgetText_allowWrapText(){
try{
this.textBox.style.whiteSpace="normal";
}
catch(ex){
jsExDebug("widgetText_allowWrapText",ex);
}
}
function widgetText_allowPassword(){
try{
if(!this.stateIsDiv){
this.textBox.type="password";
}
}
catch(ex){
jsExDebug("widgetText_allowPassword",ex);
}
}
function widgetText_allowReadOnly(){
try{
if(!this.stateIsDiv){
this.settingDisabled=true;
this.textBox.readOnly=true;
}
}
catch(ex){
jsExDebug("widgetText_allowReadOnly",ex);
}
}
function widgetText_disallowReadOnly(){
try{
if(!this.stateIsDiv){
this.settingDisabled=false;
this.textBox.readOnly=false;
}
}
catch(ex){
jsExDebug("widgetText_disallowReadOnly",ex);
}
}
function widgetText_allowOverflow(_11){
try{
this.textBox.style.overflow=_11;
}
catch(ex){
jsExDebug("widgetText_allowOverflow",ex);
}
}
function widgetText_appendContent(_12){
try{
if(this.stateIsDiv){
this.textBox.innerHTML+=_12;
}else{
this.textBox.value+=_12;
}
}
catch(ex){
jsExDebug("widgetText_appendContent",ex);
}
}
function widgetText_hide(){
try{
this.widgetElement.style.visibility="hidden";
if(this.textBox.parentNode){
this.widgetElement.removeChild(this.textBox);
}
}
catch(ex){
jsExDebug("widgetText_hide",ex);
}
}
function widgetText_show(){
try{
this.widgetElement.style.visibility="visible";
if(!this.textBox.parentNode){
this.widgetElement.appendChild(this.textBox);
}
}
catch(ex){
jsExDebug("widgetText_show",ex);
}
}
function widgetText_hasFocus(){
try{
return this.stateHasFocus;
}
catch(ex){
jsExDebug("widgetText_hasFocus",ex);
}
}
function widgetText_getClientHeight(){
try{
return this.textBox.clientHeight+2;
}
catch(ex){
jsExDebug("widgetText_getClientHeight",ex);
}
}
function widgetText_focusEvent(_13,me){
try{
me.stateHasFocus=true;
me.fireEvent(me.SYSTEM.Event.FOCUS_EVENT,_13);
}
catch(ex){
jsExDebug("widgetText_onFocusBinding",ex);
}
}
function widgetText_blurEvent(_15,me){
try{
me.stateHasFocus=false;
me.fireEvent(me.SYSTEM.Event.BLUR_EVENT,_15);
}
catch(ex){
jsExDebug("widgetText_onBlurBinding",ex);
}
}

widgetSearch_t.prototype=new widgetText_t(1);
widgetSearch_t.prototype.widgetSearch_super=widgetText_t.prototype.constructor;
widgetSearch_t.prototype.constructor=widgetSearch_t;
widgetSearch_t.prototype.dataChange=widgetSearch_dataChange;
widgetSearch_t.prototype.notifyResultsChange=widgetSearch_notifyResultsChange;
widgetSearch_t.prototype.SEARCH_THRESHOLD=3;
function widgetSearch_t(){
try{
this.widgetSearch_super(1);
this.content="";
this.searchData=new search_t();
this.SYSTEM.attachEvent(this.textBox,"onkeyup","keyup",this.dataChange,this);
}
catch(ex){
jsExDebug("widgetSearch_t",ex);
}
return;
}
function widgetSearch_dataChange(_1,me){
try{
if(!me){
var me=this;
}
if((me.content.length+1)==me.textBox.value.length){
var _3=me.textBox.value.charAt(me.content.length);
me.content=me.textBox.value;
if(me.searchData.populated){
me.searchData.filterByCharacterIndex(me.content.length-1,_3);
if(me.notifyChangeCallback){
me.notifyChangeCallback(me.notifyChangeInstance,me.searchData);
}
}else{
if(me.content.length>=me.SEARCH_THRESHOLD){
me.searchData.lookup(me.content,me.notifyChangeCallback,me.notifyChangeInstance);
}
}
}else{
if((me.content.length-1)==me.textBox.value.length){
me.content=me.textBox.value;
if(me.searchData.populated){
if(me.content.length>=me.SEARCH_THRESHOLD){
me.searchData.removeFilterAtCharacterIndex(me.content.length);
if(me.notifyChangeCallback){
me.notifyChangeCallback(me.notifyChangeInstance,me.searchData);
}
}else{
me.searchData.emptyData();
}
}
}else{
if(me.textBox.value.length>=me.SEARCH_THRESHOLD){
me.content=me.textBox.value;
me.searchData.lookup(me.content,me.notifyChangeCallback,me.notifyChangeInstance);
}
}
}
return;
}
catch(ex){
jsExDebug("widgetSearch_dataChange",ex);
}
}
function widgetSearch_notifyResultsChange(_4,_5){
try{
this.notifyChangeCallback=_4;
this.notifyChangeInstance=_5;
}
catch(ex){
jsExDebug("widgetSearch_notifyResultsChange",ex);
}
return;
}

try{
itemList_t.prototype=new widget_t();
itemList_t.prototype.itemList_super=widget_t.prototype.constructor;
itemList_t.prototype.constructor=itemList_t;
itemList_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
itemList_t.prototype.cleanUp=itemList_cleanUp;
itemList_t.prototype.createDom=itemList_createDom;
itemList_t.prototype.bindEvents=itemList_bindEvents;
itemList_t.prototype.widget_attach=widget_t.prototype.attach;
itemList_t.prototype.widget_detach=widget_t.prototype.detach;
itemList_t.prototype.attach=itemList_attach;
itemList_t.prototype.detach=itemList_detach;
itemList_t.prototype.allowMouseOverHighlight=itemList_allowMouseOverHighlight;
itemList_t.prototype.disallowMouseOverHighlight=itemList_disallowMouseOverHighlight;
itemList_t.prototype.allowBorder=itemList_allowBorder;
itemList_t.prototype.disallowBorder=itemList_disallowBorder;
itemList_t.prototype.disallowItemBorder=itemList_disallowItemBorder;
itemList_t.prototype.disallowFirstItemPad=itemList_disallowFirstItemPad;
itemList_t.prototype.disallowItemHighlight=itemList_disallowItemHighlight;
itemList_t.prototype.disallowBackgroundImage=itemList_disallowBackgroundImage;
itemList_t.prototype.disallowPadding=itemList_disallowPadding;
itemList_t.prototype.disallowItemTextPadding=itemList_disallowItemTextPadding;
itemList_t.prototype.allowListOverflow=itemList_allowListOverflow;
itemList_t.prototype.setHorizontal=itemList_setHorizontal;
itemList_t.prototype.setVertical=itemList_setVertical;
itemList_t.prototype.addItem=itemList_addItem;
itemList_t.prototype.addTemporaryWidget=itemList_addTemporaryWidget;
itemList_t.prototype.addWidget=itemList_addWidget;
itemList_t.prototype.prependWidget=itemList_prependWidget;
itemList_t.prototype.addSeparator=itemList_addSeparator;
itemList_t.prototype.setHorizontalPadding=itemList_setHorizontalPadding;
itemList_t.prototype.setVerticalPadding=itemList_setVerticalPadding;
itemList_t.prototype.align=itemList_align;
itemList_t.prototype.vAlign=itemList_vAlign;
itemList_t.prototype.setBackgroundImage=itemList_setBackgroundImage;
itemList_t.prototype.setItemPadding=itemList_setItemPadding;
itemList_t.prototype.clearList=itemList_clearList;
itemList_t.prototype.setHighlightColour=itemList_setHighlightColour;
itemList_t.prototype.setBackgroundColour=itemList_setBackgroundColour;
itemList_t.prototype.setItemBorderColour=itemList_setItemBorderColour;
itemList_t.prototype.alignItem=itemList_alignItem;
itemList_t.prototype.removeItem=itemList_removeItem;
itemList_t.prototype.setItemText=itemList_setItemText;
itemList_t.prototype.getItemCount=itemList_getItemCount;
itemList_t.prototype.getItem=itemList_getItem;
itemList_t.prototype.getItemValue=itemList_getItemValue;
itemList_t.prototype.getValues=itemList_getValues;
itemList_t.prototype.getItemText=itemList_getItemText;
itemList_t.prototype.highlight=itemList_highlight;
itemList_t.prototype.dim=itemList_dim;
itemList_t.prototype.itemEnterEvent=itemList_itemEnterEvent;
itemList_t.prototype.itemExitEvent=itemList_itemExitEvent;
itemList_t.prototype.itemClickEvent=itemList_itemClickEvent;
itemList_t.prototype.HORIZONTAL=1;
itemList_t.prototype.VERTICAL=2;
itemList_t.prototype.LEFT_ALIGN=1;
itemList_t.prototype.RIGHT_ALIGN=2;
itemList_t.prototype.HCENTRE_ALIGN=3;
itemList_t.prototype.BOTTOM_ALIGN=1;
itemList_t.prototype.TOP_ALIGN=2;
itemList_t.prototype.VCENTRE_ALIGN=3;
itemList_t.prototype.ITEM_VPADDING=1;
itemList_t.prototype.ITEM_HPADDING=3;
itemList_t.prototype.H_SEPARATOR_SRC="img/site/global/separator_h.bmp";
itemList_t.prototype.V_SEPARATOR_SRC="img/site/global/separator_v.bmp";
itemList_t.prototype.SEPARATOR_PADDING=5;
itemList_t.prototype.DEFAULT_BORDER_COLOUR="#AAAAAA";
itemList_t.prototype.DEFAULT_HIGHLIGHT_COLOUR=SYSTEM.Style.ITEM_LIST_HIGHLIGHT;
itemList_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
itemList_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.LIST_ITEM_ENTER_EVENT,SYSTEM.Event.LIST_ITEM_EXIT_EVENT];
}
catch(ex){
jsExDebug("itemList_t:prototype",ex);
}
function itemList_t(_1,_2){
try{
this.itemList_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.items=[];
this.verticalAlign=this.VCENTRE_ALIGN;
this.horizontalAlign=this.HCENTRE_ALIGN;
this.layoutDirection=this.HORIZONTAL;
this.highlightColour=this.DEFAULT_HIGHLIGHT_COLOUR;
this.itemBorderColour=this.DEFAULT_BORDER_COLOUR;
this.settingAllowPadding=true;
this.settingAllowBorder=true;
this.settingAllowItemBorder=true;
this.settingAllowFirstItemPad=true;
this.settingAllowItemBuffer=false;
this.settingAllowTextPadding=true;
this.currentInsertIndex=0;
this.clickedIndex=null;
this.lastEnteredIndex=null;
this.verticalPadding=0;
this.horizontalPadding=0;
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("itemList_t",ex);
}
}
function itemList_cleanUp(me){
try{
if(!me){
var me=this;
}
me.cleanUpString+=" - item list - ";
for(var j=0;j<me.items.length;j++){
var _5=me.items[j];
if(!_5){
continue;
}
if(_5.isSelectable){
me.SYSTEM.Event.detachEvent(_5,"onclick","click");
_5.isSelectable=null;
}
if(me.settingAllowMouseOverHighlight){
me.SYSTEM.Event.detachEvent(_5,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(_5,"onmouseout","mouseout");
}
_5.textContentReference=null;
_5.isSelectable=null;
_5.itemListValueReference=null;
_5.value=null;
_5.allowHighlight=null;
if(_5.isWidgetItem){
_5.isWidgetItem=null;
if(!_5.isTemporary){
_5.widgetObjectReference.cleanUp();
}else{
if(_5.isTemporary){
_5.widgetObjectReference.detach();
}
}
me.SYSTEM.Event.detachEvent(_5,"onclick","click");
_5.widgetObjectReference=null;
}
me.items[j]=null;
delete me.items[j];
}
me.items=null;
me.highLightColour=null;
me.verticalAlign=null;
me.horizontalAlign=null;
me.layoutDirection=null;
me.currentInsertIndex=null;
me.highlightColour=null;
me.itemBorderColour=null;
me.verticalPadding=null;
me.horizontalPadding=null;
me.settingAllowMouseOverHighlight=null;
me.settingAllowPadding=null;
me.settingAllowBorder=null;
me.settingAllowItemBorder=null;
me.settingAllowFirstItemPad=null;
me.settingAllowItemBuffer=null;
me.settingAllowTextPadding=null;
me.borderColour=null;
me.clickedIndex=null;
me.lastEnteredIndex=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("itemList_cleanUp",ex);
}
}
function itemList_createDom(){
try{
this.borderColour=this.DEFAULT_BORDER_COLOUR;
this.widgetElement.style.border="solid 1px "+this.borderColour;
}
catch(ex){
jsExDebug("itemList_createDom",ex);
}
}
function itemList_bindEvents(){
try{
}
catch(ex){
jsExDebug("itemList_bindEvents",ex);
}
}
function itemList_attach(_6){
try{
var _7=this.items;
if(_7){
for(var i=0;i<_7.length;i++){
if(_7[i]&&_7[i].isWidgetItem&&_7[i].isTemporary){
this.items[i].widgetObjectReference.attach(this.items[i]);
}
}
}
this.widget_attach(_6);
}
catch(ex){
jsExDebug("itemList_attach",ex);
}
}
function itemList_detach(){
try{
var _9=this.items;
if(_9){
for(var i=0;i<_9.length;i++){
if(_9[i]&&_9[i].isWidgetItem&&_9[i].isTemporary){
_9[i].widgetObjectReference.detach();
}
}
}
this.widget_detach();
}
catch(ex){
jsExDebug("itemList_detach",ex);
}
}
function itemList_allowMouseOverHighlight(){
try{
this.settingAllowMouseOverHighlight=true;
}
catch(ex){
jsExDebug("itemList_allowMouseOverHighlight",ex);
}
}
function itemList_disallowMouseOverHighlight(){
try{
this.settingAllowMouseOverHighlight=false;
}
catch(ex){
jsExDebug("itemList_disallowMouseOverHighlight",ex);
}
}
function itemList_allowBorder(_b){
try{
this.borderColour=_b;
this.widgetElement.style.border="solid 1px "+this.borderColour;
}
catch(ex){
jsExDebug("itemList_allowBorder",ex);
}
}
function itemList_disallowBorder(){
try{
this.settingAllowBorder=false;
this.widgetElement.style.border="none";
}
catch(ex){
jsExDebug("itemList_disallowBorder",ex);
}
}
function itemList_disallowItemBorder(){
try{
this.settingAllowItemBorder=false;
}
catch(ex){
jsExDebug("itemList_disallowBorder",ex);
}
}
function itemList_disallowFirstItemPad(){
try{
this.settingAllowFirstItemPad=false;
}
catch(ex){
jsExDebug("itemList_disallowFirstItemPad",ex);
}
}
function itemList_disallowItemHighlight(_c){
try{
this.items[_c].allowHighlight=false;
}
catch(ex){
jsExDebug("itemList_disallowItemHighlight",ex);
}
}
function itemList_disallowBackgroundImage(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"droplist_select");
}
catch(ex){
jsExDebug("itemList_disallowBackgroundImage",ex);
}
}
function itemList_disallowPadding(){
try{
this.settingAllowPadding=false;
}
catch(ex){
jsExDebug("itemList_disallowPadding",ex);
}
}
function itemList_disallowItemTextPadding(){
try{
this.settingAllowTextPadding=false;
}
catch(ex){
jsExDebug("itemList_disallowItemTextPadding",ex);
}
}
function itemList_allowListOverflow(){
try{
this.widgetElement.style.overflow="auto";
}
catch(ex){
jsExDebug("itemList_allowListOverflow",ex);
}
}
function itemList_setHorizontal(_d){
try{
this.layoutDirection=this.HORIZONTAL;
this.width=_d;
if(_d){
this.widgetElement.style.width=_d+"px";
}
}
catch(ex){
jsExDebug("itemList_setHorizontal",ex);
}
}
function itemList_setVertical(_e){
try{
this.layoutDirection=this.VERTICAL;
this.width=_e;
if(_e){
this.widgetElement.style.width=_e;
}else{
this.widgetElement.style.width="10px";
}
}
catch(ex){
jsExDebug("itemList_setVertical",ex);
}
}
function itemList_addItem(_f,_10,_11,_12,_13,_14,_15,_16){
try{
var _17=this.SYSTEM.Dom.createClassElement("div","option");
var _18=this.currentInsertIndex;
this.currentInsertIndex++;
if(this.settingAllowPadding){
if(!this.settingAllowFirstItemPad&&(_18==0)&&this.layoutDirection==this.HORIZONTAL){
_17.style.marginLeft="0px";
}else{
_17.style.marginLeft=(this.ITEM_HPADDING+this.horizontalPadding)+"px";
}
_17.style.marginRight=(this.ITEM_HPADDING+this.horizontalPadding)+"px";
if(!this.settingAllowFirstItemPad&&(_18==0)&&this.layoutDirection==this.VERTICAL){
_17.style.marginTop="0px";
}else{
_17.style.marginTop=(this.ITEM_VPADDING+this.verticalPadding)+"px";
}
_17.style.marginBottom=(this.ITEM_VPADDING+this.verticalPadding)+"px";
}
if(this.settingAllowItemBorder){
_17.style.padding="1px";
}
_17.style.whiteSpace="nowrap";
_17.style.cursor="pointer";
switch(this.horizontalAlign){
case this.RIGHT_ALIGN:
_17.style.textAlign="right";
break;
case this.LEFT_ALIGN:
_17.style.textAlign="left";
break;
default:
_17.style.textAlign="center";
}
var _19="middle";
switch(this.verticalAlign){
case this.TOP_ALIGN:
_19="top";
break;
case this.BOTTOM_ALIGN:
_19="bottom";
break;
}
if(this.layoutDirection==this.HORIZONTAL){
_17.style.display="inline";
}
var _1a="";
var _1b="";
if(this.settingAllowTextPadding){
_1a="&nbsp;&nbsp;&nbsp;&nbsp;";
_1b="&nbsp;&nbsp";
}
if(_11){
_1a="";
_1b="";
var _1c=document.createElement("img");
_1c.src=_11;
_1c.style.width=_13+"px";
_1c.style.height=_14+"px";
_1c.style.verticalAlign=_19;
_17.appendChild(_1c);
}
if(_10!=null){
var _1d=document.createElement("span");
_1d.innerHTML=_1a+_10+_1b;
_1d.style.verticalAlign=_19;
_17.textContentReference=_1d;
_17.appendChild(_1d);
}
if(_12){
var _1e=document.createElement("img");
_1e.style.verticalAlign=_19;
_1e.src=_12;
_1e.style.width=_15+"px";
_1e.style.height=_16+"px";
this.SYSTEM.Dom.setElementFloat(_1e,"right");
_17.appendChild(_1e);
_17.appendChild(_1d);
}
if(_f!=null){
this.SYSTEM.Event.attachEvent(_17,"onclick","click",this.itemClickEvent,this,true,_18);
if(this.settingAllowMouseOverHighlight){
this.SYSTEM.Event.attachEvent(_17,"onmouseover","mouseover",this.itemEnterEvent,this,false,_18);
this.SYSTEM.Event.attachEvent(_17,"onmouseout","mouseout",this.itemExitEvent,this,false,_18);
}
_17.isSelectable=true;
}else{
_17.isSelectable=false;
}
_17.itemListValueReference=_f;
_17.value=_f;
this.items[_18]=_17;
this.items[_18].allowHighlight=true;
this.widgetElement.appendChild(_17);
return _18;
}
catch(ex){
jsExDebug("itemList_addItem",ex);
}
}
function itemList_addTemporaryWidget(_1f,_20,_21){
try{
var _22=this.addWidget(_1f,_20,_21);
this.items[_22].isTemporary=true;
}
catch(ex){
jsExDebug("itemList_addTemporaryWidget",ex);
}
}
function itemList_addWidget(_23,_24,_25,_26){
try{
var _27=document.createElement("div");
var _28=this.currentInsertIndex;
this.currentInsertIndex++;
if(this.settingAllowPadding){
if(!this.settingAllowFirstItemPad&&(_28==0)&&this.layoutDirection==this.HORIZONTAL){
_27.style.marginLeft="0px";
}else{
_27.style.marginLeft=(this.ITEM_HPADDING+this.horizontalPadding)+"px";
}
_27.style.marginRight=(this.ITEM_HPADDING+this.horizontalPadding)+"px";
if(!this.settingAllowFirstItemPad&&(_28==0)&&this.layoutDirection==this.VERTICAL){
_27.style.marginTop="0px";
}else{
_27.style.marginTop=(this.ITEM_VPADDING+this.verticalPadding)+"px";
}
_27.style.marginBottom=(this.ITEM_VPADDING+this.verticalPadding)+"px";
}
if(this.settingAllowItemBorder){
_27.style.border="solid 1px "+this.itemBorderColour;
}
switch(this.horizontalAlign){
case this.RIGHT_ALIGN:
_24.widgetElement.style.marginLeft="auto";
break;
case this.LEFT_ALIGN:
_24.widgetElement.style.marginRight="auto";
break;
default:
if(this.SYSTEM.DM.eventModel!=this.SYSTEM.DM.INTERNET_EXPLORER){
_24.widgetElement.style.marginLeft="auto";
_24.widgetElement.style.marginRight="auto";
}
}
var _29="middle";
switch(this.verticalAlign){
case this.TOP_ALIGN:
_29="top";
break;
case this.BOTTOM_ALIGN:
_29="bottom";
break;
}
if(this.layoutDirection==this.HORIZONTAL){
_27.style.display="inline";
this.SYSTEM.Dom.setElementFloat(_27,"left");
}
if(_23!=null){
_27.isSelectable=false;
this.SYSTEM.DM.attachEvent(_27,"onclick","click",this.itemClickEvent,this,true,_28);
if(this.settingAllowMouseOverHighlight){
this.SYSTEM.DM.attachEvent(_27,"onmouseover","mouseover",this.itemEnterEvent,this,false,_28);
this.SYSTEM.DM.attachEvent(_27,"onmouseout","mouseout",this.itemExitEvent,this,false,_28);
}
}
_27.itemListValueReference=_23;
_27.value=_23;
_27.isWidgetItem=true;
_27.widgetObjectReference=_24;
this.items[_28]=_27;
this.items[_28].allowHighlight=true;
_24.makeRelativePositioned();
_24.attach(_27);
if(_25){
var _2a=document.createElement("span");
if(!_26){
if(this.SYSTEM.Environment.userAgentIsIE()){
_24.widgetElement.style.styleFloat="left";
}else{
_24.widgetElement.style.cssFloat="left";
}
}
_2a.innerHTML=_25;
_27.textContentReference=_2a;
_27.style.cursor="pointer";
_27.appendChild(_2a);
}
this.widgetElement.appendChild(_27);
return _28;
}
catch(ex){
jsExDebug("itemList_addWidget",ex);
}
}
function itemList_prependWidget(_2b,_2c,_2d){
try{
var _2e=document.createElement("div");
var _2f=0;
this.currentInsertIndex++;
if(this.settingAllowPadding){
if(!this.settingAllowFirstItemPad&&(_2f==0)&&this.layoutDirection==this.HORIZONTAL){
_2e.style.marginLeft="0px";
}else{
_2e.style.marginLeft=(this.ITEM_HPADDING+this.horizontalPadding)+"px";
}
_2e.style.marginRight=(this.ITEM_HPADDING+this.horizontalPadding)+"px";
if(!this.settingAllowFirstItemPad&&(_2f==0)&&this.layoutDirection==this.VERTICAL){
_2e.style.marginTop="0px";
}else{
_2e.style.marginTop=(this.ITEM_VPADDING+this.verticalPadding)+"px";
}
_2e.style.marginBottom=(this.ITEM_VPADDING+this.verticalPadding)+"px";
}
if(this.settingAllowItemBorder){
_2e.style.border="solid 1px "+this.itemBorderColour;
}
switch(this.horizontalAlign){
case this.RIGHT_ALIGN:
_2c.widgetElement.style.marginLeft="auto";
break;
case this.LEFT_ALIGN:
_2c.widgetElement.style.marginRight="auto";
break;
default:
if(this.SYSTEM.Event.eventModel!=this.SYSTEM.Event.INTERNET_EXPLORER){
_2c.widgetElement.style.marginLeft="auto";
_2c.widgetElement.style.marginRight="auto";
}
}
var _30="middle";
switch(this.verticalAlign){
case this.TOP_ALIGN:
_30="top";
break;
case this.BOTTOM_ALIGN:
_30="bottom";
break;
}
if(this.layoutDirection==this.HORIZONTAL){
_2e.style.display="inline";
if(this.SYSTEM.Event.eventModel==this.SYSTEM.Event.INTERNET_EXPLORER){
_2e.style.styleFloat="left";
}else{
_2e.style.cssFloat="left";
}
}
if(_2b!=null){
_2e.isSelectable=false;
this.SYSTEM.Event.attachEvent(_2e,"onclick","click",this.itemClickEvent,this,true,_2f);
if(this.settingAllowMouseOverHighlight){
this.SYSTEM.Event.attachEvent(_2e,"onmouseover","mouseover",this.itemEnterEvent,this,false,_2f);
this.SYSTEM.Event.attachEvent(_2e,"onmouseout","mouseout",this.itemExitEvent,this,false,_2f);
}
}
_2e.itemListValueReference=_2b;
_2e.value=_2b;
_2e.isWidgetItem=true;
_2e.widgetObjectReference=_2c;
_2c.makeRelativePositioned();
_2c.attach(_2e);
for(var i=this.items.length;i>0;i--){
this.items[i]=this.items[i-1];
}
this.items[_2f]=_2e;
this.items[_2f].allowHighlight=true;
if(_2d){
var _32=document.createElement("span");
if(this.SYSTEM.Event.eventModel==this.SYSTEM.Event.INTERNET_EXPLORER){
_2c.widgetElement.style.styleFloat="left";
}else{
_2c.widgetElement.style.cssFloat="left";
}
_32.innerHTML=_2d;
_2e.textContentReference=_32;
_2e.style.cursor="pointer";
_2e.appendChild(_32);
}
if(this.items[_2f+1]){
this.widgetElement.insertBefore(_2e,this.items[_2f+1]);
}else{
this.widgetElement.appendChild(_2e);
}
return _2f;
}
catch(ex){
jsExDebug("itemList_prependWidget",ex);
}
}
function itemList_addSeparator(){
try{
var _33=document.createElement("img");
if(this.layoutDirection==this.HORIZONTAL){
_33.src=this.V_SEPARATOR_SRC;
_33.style.width="2px";
_33.style.height=(this.height?this.height+"px":"100%");
_33.style.paddingLeft=this.SEPARATOR_PADDING;
_33.style.paddingRight=this.SEPARATOR_PADDING;
_33.style.position="";
if(this.SYSTEM.Event.eventModel==this.SYSTEM.Event.INTERNET_EXPLORER){
_33.style.styleFloat="left";
}else{
_33.style.cssFloat="left";
}
}else{
if(this.layoutDirection==this.VERTICAL){
_33.src=this.H_SEPARATOR_SRC;
_33.style.width=(this.width?this.width+"px":"100%");
_33.style.height="2px";
_33.style.paddingBottom=this.SEPARATOR_PADDING;
_33.style.paddingTop=this.SEPARATOR_PADDING;
}
}
this.widgetElement.appendChild(_33);
}
catch(ex){
jsExDebug("itemList_addSeparator",ex);
}
return;
}
function itemList_setHorizontalPadding(_34){
try{
this.horizontalPadding=_34;
}
catch(ex){
jsExDebug("itemList_setHorizontalPadding",ex);
}
}
function itemList_setVerticalPadding(_35){
try{
this.verticalPadding=_35;
}
catch(ex){
jsExDebug("itemList_setVerticalPadding",ex);
}
}
function itemList_align(_36){
try{
this.horizontalAlign=_36;
}
catch(ex){
jsExDebug("itemList_align",ex);
}
}
function itemList_vAlign(_37){
try{
this.verticalAlign=_37;
}
catch(ex){
jsExDebug("itemList_vAlign",ex);
}
}
function itemList_setBackgroundImage(_38){
try{
this.backgroundImageSrc=_38;
if(_38){
this.widgetElement.style.backgroundColor="white";
this.widgetElement.style.backgroundImage="url('"+_38+"')";
this.widgetElement.style.backgroundRepeat="repeat-y";
}
}
catch(ex){
jsExDebug("itemList_setBackgroundImage",ex);
}
}
function itemList_setItemPadding(_39,_3a){
try{
if(_39!=null){
var _3b=this.items[_39];
if(!this.settingAllowFirstItemPad&&(_39==0)&&this.layoutDirection==this.HORIZONTAL){
_3b.style.marginLeft="0px";
}else{
_3b.style.marginLeft=_3a+"px";
}
_3b.style.marginRight=_3a+"px";
if(!this.settingAllowFirstItemPad&&(_39==0)&&this.layoutDirection==this.VERTICAL){
_3b.style.marginTop="0px";
}else{
_3b.style.marginTop=_3a+"px";
}
_3b.style.marginBottom=_3a+"px";
}
}
catch(ex){
jsExDebug("itemList_setItemPadding",ex);
}
}
function itemList_clearList(){
try{
for(var i=0;i<this.items.length;i++){
var _3d=this.items[i];
if(_3d){
if(_3d.isWidgetItem){
_3d.widgetObjectReference.detach(_3d);
_3d.widgetObjectReference.cleanUp();
}
this.SYSTEM.Dom.freeDom(_3d);
this.widgetElement.removeChild(_3d);
this.items[i]=null;
delete this.items[i];
}
}
this.SYSTEM.Dom.freeDom(this.widgetElement);
this.currentInsertIndex=0;
}
catch(ex){
jsExDebug("itemList_clearList: "+ex.lineNumber,ex);
}
}
function itemList_setHighlightColour(_3e){
try{
this.highlightColor=_3e;
}
catch(ex){
jsExDebug("itemList_setHighlightColour",ex);
}
}
function itemList_setBackgroundColour(_3f){
try{
this.widgetElement.style.backgroundColor=_3f;
}
catch(ex){
jsExDebug("itemList_setBackgroundColour",ex);
}
}
function itemList_setItemBorderColour(_40){
try{
this.itemBorderColour=_40;
}
catch(ex){
jsExDebug("itemList_setItemBorderColour",ex);
}
}
function itemList_alignItem(_41,_42){
try{
switch(_42){
case this.RIGHT_ALIGN:
this.items[_41].style.textAlign="right";
break;
case this.LEFT_ALIGN:
this.items[_41].style.textAlign="left";
break;
default:
this.items[_41].style.textAlign="center";
}
}
catch(ex){
jsExDebug("itemList_alignItem",ex);
}
}
function itemList_removeItem(_43,_44){
try{
if(_43==null&&_44!=null){
for(var i=0;i<this.items.length;i++){
if(this.items[i]&&this.items[i].value==_44){
_43=i;
}
}
}
if(!this.items[_43]){
return;
}
if(this.selectedIndex==_43){
this.selectedIndex=null;
}
var _46=this.items[_43];
if(_46.isSelectable){
this.SYSTEM.Event.detachEvent(_46,"onclick","click");
_46.isSelectable=null;
}
if(this.settingAllowMouseOverHighlight){
this.SYSTEM.Event.detachEvent(_46,"onmouseover","mouseover");
this.SYSTEM.Event.detachEvent(_46,"onmouseout","mouseout");
}
_46.textContentReference=null;
_46.isSelectable=null;
_46.itemListValueReference=null;
_46.value=null;
_46.allowHighlight=null;
if(_46.isWidgetItem){
_46.isWidgetItem=null;
if(!_46.isTemporary){
_46.widgetObjectReference.cleanUp();
}else{
if(_46.isTemporary){
_46.widgetObjectReference.detach();
}
}
this.SYSTEM.Event.detachEvent(_46,"onclick","click");
_46.widgetObjectReference=null;
}
this.SYSTEM.Dom.freeDom(_46);
this.widgetElement.removeChild(_46);
this.items[_43]=null;
delete this.items[_43];
}
catch(ex){
jsExDebug("itemList_removeItem",ex);
}
}
function itemList_setItemText(_47,_48){
try{
if(this.settingAllowTextPadding){
_48="&nbsp;&nbsp;&nbsp;&nbsp;"+_48+"&nbsp;&nbsp";
}
this.items[_47].textContentReference.innerHTML=_48;
}
catch(ex){
jsExDebug("itemList_setItemText",ex);
}
}
function itemList_getItemCount(){
try{
var _49=0;
for(var i=0;i<this.items.length;i++){
if(this.items[i]){
_49++;
}
}
return _49;
}
catch(ex){
jsExDebug("itemList_getItemCount",ex);
}
}
function itemList_getItem(_4b){
try{
return this.items[_4b];
}
catch(ex){
jsExDebug("itemList_getItem",ex);
}
}
function itemList_getItemValue(_4c){
try{
if(this.items[_4c]){
return this.items[_4c].itemListValueReference;
}else{
return null;
}
}
catch(ex){
jsExDebug("itemList_getItemValue",ex);
}
}
function itemList_getValues(){
try{
var _4d=[];
for(var i=0;i<this.items.length;i++){
if(this.items[i]){
_4d.push(this.items[i].value);
}
}
return _4d;
}
catch(ex){
jsExDebug("itemList_getValues",ex);
}
}
function itemList_getItemText(_4f){
try{
if(this.items[_4f]){
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
return this.items[_4f].textContentReference.innerText;
}else{
return this.items[_4f].textContentReference.textContent;
}
}
}
catch(ex){
jsExDebug("itemList_getItemText",ex);
}
}
function itemList_highlight(_50){
try{
this.SYSTEM.Dom.setElementClass(this.items[_50],"option hover");
if(this.settingAllowItemBorder){
this.items[_50].style.padding="1px";
}
}
catch(ex){
jsExDebug("itemList_highlight",ex);
}
}
function itemList_dim(_51){
try{
this.SYSTEM.Dom.setElementClass(this.items[_51],"option");
if(this.settingAllowItemBorder){
this.items[_51].style.padding="1px";
}
}
catch(ex){
jsExDebug("itemList_dim",ex);
}
}
function itemList_itemClickEvent(_52,me,_54){
try{
me.clickedIndex=_54;
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_52);
}
catch(ex){
jsExDebug("itemList_itemClickEvent",ex);
}
}
function itemList_itemEnterEvent(_55,me,_57){
try{
if(me.items[_57].allowHighlight){
me.highlight(_57);
}
me.lastEnteredIndex=_57;
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_ENTER_EVENT,_55);
}
catch(ex){
jsExDebug("itemList_itemEnterEvent",ex);
}
}
function itemList_itemExitEvent(_58,me,_5a){
try{
if(me.items[_5a].allowHighlight){
me.dim(_5a);
}
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_EXIT_EVENT,_58);
}
catch(ex){
jsExDebug("itemList_itemExitEvent",ex);
}
}

try{
selectListWidget_t.prototype=new itemList_t();
selectListWidget_t.prototype.selectListWidget_super=itemList_t.prototype.constructor;
selectListWidget_t.prototype.constructor=selectListWidget_t;
selectListWidget_t.prototype.cleanUp=selectListWidget_cleanUp;
selectListWidget_t.prototype.itemList_cleanUp=itemList_t.prototype.cleanUp;
selectListWidget_t.prototype.itemList_createDom=itemList_t.prototype.createDom;
selectListWidget_t.prototype.createDom=selectListWidget_createDom;
selectListWidget_t.prototype.bindEvents=selectListWidget_bindEvents;
selectListWidget_t.prototype.setDimensions=selectListWidget_setDimensions;
selectListWidget_t.prototype.removeItem=selectListWidget_removeItem;
selectListWidget_t.prototype.clearList=selectListWidget_clearList;
selectListWidget_t.prototype.allowSelect=selectListWidget_allowSelect;
selectListWidget_t.prototype.allowStartVisible=selectListWidget_allowStartVisible;
selectListWidget_t.prototype.disallowSelectedHighlight=selectListWidget_disallowSelectedHighlight;
selectListWidget_t.prototype.disallowItemTextPadding=selectListWidget_disallowItemTextPadding;
selectListWidget_t.prototype.setGlobalClickHideStatus=selectListWidget_setGlobalClickHideStatus;
selectListWidget_t.prototype.setSelectedIndex=selectListWidget_setSelectedIndex;
selectListWidget_t.prototype.setSelectedValue=selectListWidget_setSelectedValue;
selectListWidget_t.prototype.addItem=selectListWidget_addItem;
selectListWidget_t.prototype.addWidget=selectListWidget_addWidget;
selectListWidget_t.prototype.addItem_super=itemList_t.prototype.addItem;
selectListWidget_t.prototype.addWidget_super=itemList_t.prototype.addWidget;
selectListWidget_t.prototype.setWidth=selectListWidget_setWidth;
selectListWidget_t.prototype.extendItemContents=selectListWidget_extendItemContents;
selectListWidget_t.prototype.collapseItemContents=selectListWidget_collapseItemContents;
selectListWidget_t.prototype.showExtendedItemContents=selectListWidget_showExtendedItemContents;
selectListWidget_t.prototype.hideList=selectListWidget_hideList;
selectListWidget_t.prototype.expandList=selectListWidget_expandList;
selectListWidget_t.prototype.scrollToSelectedIndex=selectListWidget_scrollToSelectedIndex;
selectListWidget_t.prototype.disallowFadeIn=selectListWidget_disallowFadeIn;
selectListWidget_t.prototype.getSelectedValues=selectListWidget_getSelectedValues;
selectListWidget_t.prototype.getSelectedIndexes=selectListWidget_getSelectedIndexes;
selectListWidget_t.prototype.getSelectedIndex=selectListWidget_getSelectedIndex;
selectListWidget_t.prototype.getSelectedValue=selectListWidget_getSelectedValue;
selectListWidget_t.prototype.dimAll=selectListWidget_dimAll;
selectListWidget_t.prototype.highlightSelectedItem=selectListWidget_highlightSelectedItem;
selectListWidget_t.prototype.isSelected=selectListWidget_isSelected;
selectListWidget_t.prototype.deselectItem=selectListWidget_deselectItem;
selectListWidget_t.prototype.highlight=selectListWidget_highlight;
selectListWidget_t.prototype.dim=selectListWidget_dim;
selectListWidget_t.prototype.deselectAll=selectListWidget_deselectAll;
selectListWidget_t.prototype.hideListEvent=selectListWidget_hideListEvent;
selectListWidget_t.prototype.keyDownEvent=selectListWidget_keyDownEvent;
selectListWidget_t.prototype.keyUpEvent=selectListWidget_keyUpEvent;
selectListWidget_t.prototype.itemClickEvent=selectListWidget_itemClickEvent;
selectListWidget_t.prototype.selectionChangeEvent=selectListWidget_selectionChangeEvent;
selectListWidget_t.prototype.itemWidgetEvent=selectListWidget_itemWidgetEvent;
selectListWidget_t.prototype.SINGLE_SELECT=1;
selectListWidget_t.prototype.STICKY_SELECT=2;
selectListWidget_t.prototype.MULTIPLE_SELECT=3;
selectListWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
selectListWidget_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.LIST_COLLAPSE_EVENT,SYSTEM.Event.LIST_ITEM_WIDGET_EVENT];
}
catch(ex){
jsExDebug("selectListWidget_t.prototype",ex);
}
function selectListWidget_t(_1,_2){
try{
this.selectListWidget_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.selectedIndexes=[];
this.selectedHighlightColour="#0072bc";
this.selectedTextColour="#ffffff";
this.defaultTextColour="black";
this.selectionStyle=this.SINGLE_SELECT;
this.settingAllowStartVisible=false;
this.multipleSelectAllowed=false;
this.settingAllowSelectHighlight=true;
this.settingAllowGlobalClickHide=true;
this.settingAllowFadeIn=true;
this.settingNotifyPanelOfEvent=false;
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("selectListWidget_t",ex);
}
}
function selectListWidget_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.removeKeyDownHandler(me.keyDownIndex);
me.SYSTEM.Event.removeKeyUpHandler(me.keyUpIndex);
me.SYSTEM.Event.detachEvent(me.widgetElement,"allclickprop","allclickprop");
me.selectedHighlightColour=null;
me.selectionStyle=null;
me.selectedValue=null;
me.selectedIndex=null;
me.selectedTextColour=null;
me.defaultTextColour=null;
me.settingAllowStartVisible=null;
me.settingAllowFadeIn=null;
me.settingAllowSelectHighlight=null;
me.multipleSelectAllowed=null;
me.stateStyleSet=null;
me.globalClickAttached=null;
me.isExpanded=null;
for(var j=0;j<me.items.length;j++){
if(me.items[j]){
me.items[j].widthExtend=null;
me.items[j].heightExtend=null;
}
}
for(var i=0;i<me.selectedIndexes.length;i++){
me.selectedIndexes[i]=null;
delete me.selectedIndexes[i];
}
me.selectedIndexes=null;
me.settingAllowGlobalClickHide=null;
me.keyDownIndex=null;
me.keyUpIndex=null;
me.eventWidget=null;
me.itemList_cleanUp();
}
catch(ex){
jsExDebug("selectListWidget_cleanUp",ex);
}
}
function selectListWidget_createDom(){
try{
this.itemList_createDom();
this.allowMouseOverHighlight();
this.SYSTEM.Dom.setElementClass(this.widgetElement,"droplist");
this.setVertical();
this.widgetElement.style.width="auto";
this.widgetElement.style.height="auto";
this.widgetElement.style.zIndex=SELECT_LIST_ZINDEX;
this.widgetElement.style.display="none";
}
catch(ex){
jsExDebug("selectListWidget_createDom",ex);
}
}
function selectListWidget_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"allclickprop","allclickprop",this.hideListEvent,this,false);
this.keyDownIndex=this.SYSTEM.Event.notifyKeyDownEvent(this.keyDownEvent,this);
this.keyUpIndex=this.SYSTEM.Event.notifyKeyUpEvent(this.keyUpEvent,this);
}
catch(ex){
jsExDebug("selectListWidget_bindEvents",ex);
}
}
function selectListWidget_setDimensions(_6,_7){
try{
if(_6!=null){
this.width=_6;
this.widgetElement.style.width=this.width+"px";
}
if(_7!=null){
this.height=_7;
this.widgetElement.style.height=this.height+"px";
this.widgetElement.style.overflow="auto";
}
if(this.SYSTEM.DM.eventModel==this.SYSTEM.Event.W3C){
this.widgetElement.style.zIndex="auto";
}else{
this.widgetElement.style.zIndex=0;
}
this.disallowBackgroundImage();
}
catch(ex){
jsExDebug("selectListWidget_setDimensions",ex);
}
return;
}
function selectListWidget_removeItem(_8,_9){
try{
if(_8==null&&_9!=null){
for(var i=0;i<this.items.length;i++){
if(this.items[i]&&this.items[i].value==_9){
_8=i;
}
}
}
if(!this.items[_8]){
return;
}
if(this.selectedIndex==_8){
this.selectedIndex=null;
}
for(var i=0;i<this.selectedIndexes.length;i++){
if(this.selectedIndexes[i]==_8){
this.selectedIndexes[i]=null;
break;
}
}
var _b=this.items[_8];
if(_b.isSelectable){
this.SYSTEM.Event.detachEvent(_b,"onclick","click");
_b.isSelectable=null;
}
if(this.settingAllowMouseOverHighlight){
this.SYSTEM.Event.detachEvent(_b,"onmouseover","mouseover");
this.SYSTEM.Event.detachEvent(_b,"onmouseout","mouseout");
}
_b.textContentReference=null;
_b.isSelectable=null;
_b.itemListValueReference=null;
_b.value=null;
_b.allowHighlight=null;
if(_b.isWidgetItem){
_b.isWidgetItem=null;
if(!_b.isTemporary){
_b.widgetObjectReference.cleanUp();
}else{
if(_b.isTemporary){
_b.widgetObjectReference.detach();
}
}
this.SYSTEM.Event.detachEvent(_b,"onclick","click");
_b.widgetObjectReference=null;
}
this.SYSTEM.Dom.freeDom(_b);
this.widgetElement.removeChild(_b);
this.items[_8]=null;
delete this.items[_8];
}
catch(ex){
jsExDebug("selectListWidget_removeItem",ex);
}
}
function selectListWidget_clearList(){
try{
for(var _c=0;_c<this.items.length;_c++){
var _d=this.items[_c];
if(!_d){
continue;
}
if(_d.isSelectable){
this.SYSTEM.Event.detachEvent(_d,"onclick","click");
_d.isSelectable=null;
}
if(this.settingAllowMouseOverHighlight){
this.SYSTEM.Event.detachEvent(_d,"onmouseover","mouseover");
this.SYSTEM.Event.detachEvent(_d,"onmouseout","mouseout");
}
_d.textContentReference=null;
_d.isSelectable=null;
_d.itemListValueReference=null;
_d.value=null;
_d.allowHighlight=null;
if(_d.isWidgetItem){
_d.isWidgetItem=null;
if(!_d.isTemporary){
_d.widgetObjectReference.cleanUp();
}else{
if(_d.isTemporary){
_d.widgetObjectReference.detach();
}
}
this.SYSTEM.Event.detachEvent(_d,"onclick","click");
_d.widgetObjectReference=null;
}
this.SYSTEM.Dom.freeDom(_d);
this.widgetElement.removeChild(_d);
this.items[_c]=null;
delete this.items[_c];
}
this.SYSTEM.Dom.freeDom(this.widgetElement);
this.currentInsertIndex=0;
this.selectedIndex=null;
for(var i=0;i<this.selectedIndexes.length;i++){
this.selectedIndexes[i]=null;
}
}
catch(ex){
jsExDebug("selectListWidget_clearList",ex);
}
}
function selectListWidget_allowSelect(_f){
try{
this.selectionStyle=_f;
this.stateStyleSet=true;
}
catch(ex){
jsExDebug("selectListWidget_allowSelect",ex);
}
}
function selectListWidget_allowStartVisible(){
try{
this.settingAllowStartVisible=true;
this.widgetElement.style.display="block";
}
catch(ex){
jsExDebug("selectListWidget_allowStartVisible",ex);
}
}
function selectListWidget_disallowSelectedHighlight(){
try{
this.settingAllowSelectHighlight=false;
}
catch(ex){
jsExDebug("selectListWidget_disallowSelectedHighlight",ex);
}
}
function selectListWidget_disallowItemTextPadding(){
try{
this.settingAllowTextPadding=false;
}
catch(ex){
jsExDebug("selectListWidget_disallowItemTextPadding",ex);
}
}
function selectListWidget_setGlobalClickHideStatus(_10){
try{
this.settingAllowGlobalClickHide=_10;
}
catch(ex){
jsExDebug("selectListWidget_setGlobalClickHideStatus",ex);
}
}
function selectListWidget_setSelectedIndex(_11){
try{
if(!this.items[_11]){
return;
}
switch(this.selectionStyle){
case this.SINGLE_SELECT:
if(this.selectedIndex!=null){
this.deselectItem(this.selectedIndex);
}
this.selectedIndex=_11;
this.highlightSelectedItem(_11);
this.hideList();
break;
case this.STICKY_SELECT:
if(!this.isSelected(_11)){
this.selectedIndexes[this.selectedIndexes.length]=_11;
this.highlightSelectedItem(_11);
}else{
this.deselectItem(_11);
}
break;
case this.MULTIPLE_SELECT:
if(this.multipleSelectAllowed||(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER&&window.event.ctrlKey)){
if(!this.isSelected(_11)){
this.selectedIndexes[this.selectedIndexes.length]=_11;
this.highlightSelectedItem(_11);
}else{
this.deselectItem(_11);
}
}else{
this.deselectAll();
this.selectedIndexes[this.selectedIndexes.length]=_11;
this.highlightSelectedItem(_11);
}
break;
}
}
catch(ex){
jsExDebug("selectListWidget_setSelectedIndex",ex);
}
}
function selectListWidget_setSelectedValue(_12,_13){
try{
for(var i in this.items){
if(this.items[i].itemListValueReference==_12){
this.setSelectedIndex(i);
if(_13){
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT);
}
}
}
}
catch(ex){
jsExDebug("selectListWidget_setSelectedValue",ex);
}
}
function selectListWidget_addItem(_15,_16,_17,_18,_19,_1a,_1b,_1c){
try{
var _1d=this.addItem_super(_15,_16,_17,_18,_19,_1a,_1b,_1c);
return _1d;
}
catch(ex){
jsExDebug("selectListWidget_addItem",ex);
}
}
function selectListWidget_addWidget(_1e,_1f,_20,_21){
try{
var _22=this.addWidget_super(_1e,_1f,_20,_21);
var _23=new this.SYSTEM.Delegate(this,this.itemWidgetEvent);
_1f.addEventHandler(_1f.DEFAULT_EVENT,_23);
return _22;
}
catch(ex){
jsExDebug("selectListWidget_addWidget",ex);
}
}
function selectListWidget_setWidth(_24){
try{
this.width=_24;
this.widgetElement.style.width=this.width+"px";
}
catch(ex){
jsExDebug("selectListWidget_setWidth",ex);
}
}
function selectListWidget_extendItemContents(_25,_26,_27,_28){
try{
if(_26){
this.items[_25].widthExtend=_26;
}
if(_27){
this.items[_25].heightExtend=_27;
}
_28.style.position="relative";
this.items[_25].extendedContentReference=_28;
}
catch(ex){
jsExDebug("selectListWidget_extendItemContents",ex);
}
}
function selectListWidget_showExtendedItemContents(_29){
try{
if(this.items[_29].widthExtend){
this.items[_29].style.width=this.items[_29].widthExtend+"px";
}
if(this.items[_29].heightExtend){
this.items[_29].style.height=this.items[_29].heightExtend+"px";
}
this.items[_29].appendChild(this.items[_29].extendedContentReference);
}
catch(ex){
jsExDebug("selectListWidget_showExtendedItemContents",ex);
}
}
function selectListWidget_collapseItemContents(_2a){
try{
this.items[_2a].style.width="auto";
this.items[_2a].style.height="auto";
this.items[_2a].removeChild(this.items[_2a].extendedContentReference);
}
catch(ex){
jsExDebug("selectListWidget_collapseItemContents",ex);
}
}
function selectListWidget_getSelectedIndexes(){
try{
if(this.selectionStyle==this.STICKY_SELECT||this.selectionStyle==this.MULTIPLE_SELECT){
return this.selectedIndexes;
}
}
catch(ex){
jsExDebug("selectListWidget_getSelectedIndexes",ex);
}
}
function selectListWidget_getSelectedValues(){
try{
if(this.selectionStyle!=this.STICKY_SELECT&&this.selectionStyle!=this.MULTIPLE_SELECT){
return false;
}
var _2b=[];
for(var i=0;i<this.selectedIndexes.length;i++){
if(this.selectedIndexes[i]!=null){
var _2d=this.selectedIndexes[i];
_2b.push(this.items[_2d].itemListValueReference);
}
}
return _2b;
}
catch(ex){
jsExDebug("selectListWidget_getSelectedValues",ex);
}
}
function selectListWidget_getSelectedIndex(){
try{
return this.selectedIndex;
}
catch(ex){
jsExDebug("selectListWidget_getSelectedIndex",ex);
}
}
function selectListWidget_getSelectedValue(){
try{
if(this.selectedIndex!=null&&this.items[this.selectedIndex]!=null){
return this.items[this.selectedIndex].itemListValueReference;
}else{
return false;
}
}
catch(ex){
jsExDebug("selectListWidget_getSelectedValue",ex);
}
}
function selectListWidget_hideList(){
try{
if(this.isExpanded&&this.selectionStyle==this.SINGLE_SELECT){
this.widgetElement.style.display="none";
this.isExpanded=false;
}
}
catch(ex){
jsExDebug("selectListWidget_hideList",ex);
}
}
function selectListWidget_expandList(){
try{
if(this.SYSTEM.Event.eventModel==this.SYSTEM.Event.INTERNET_EXPLORER){
window.event.cancelBubble=true;
}
this.widgetElement.style.display="block";
this.isExpanded=true;
}
catch(ex){
jsExDebug("selectListWidget_expandList",ex);
}
}
function selectListWidget_scrollToSelectedIndex(){
try{
if(this.selectionStyle==this.SINGLE_SELECT&&this.selectedIndex!=null){
var _2e=this.widgetElement.scrollHeight;
var _2f=this.getItemCount();
var _30=parseFloat(this.selectedIndex)/_2f;
var _31=_30*_2e;
if(_31>(this.height/2)){
this.widgetElement.scrollTop=_31;
}
}
}
catch(ex){
jsExDebug("selectListWidget_scrollToSelectedIndex",ex);
}
}
function selectListWidget_disallowFadeIn(){
try{
this.settingAllowFadeIn=false;
}
catch(ex){
jsExDebug("selectListWidget_disallowFadeIn",ex);
}
}
function selectListWidget_dimAll(){
try{
for(var i in this.selectedIndexes){
this.dim(this.selectedIndexes[i]);
}
}
catch(ex){
jsExDebug("selectListWidget_dimAll",ex);
}
}
function selectListWidget_highlightSelectedItem(_33){
try{
if(this.settingAllowSelectHighlight){
if(this.items[_33].allowHighlight){
if(this.items[_33].textContentReference){
this.SYSTEM.Dom.setElementClass(this.items[_33],"option on");
this.items[_33].isSelected=true;
}
}
}
}
catch(ex){
jsExDebug("selectListWidget_highlightSelectedItem",ex);
}
}
function selectListWidget_isSelected(_34){
try{
var _35=false;
for(var i=0;i<this.selectedIndexes.length;i++){
if(this.selectedIndexes[i]==_34){
_35=true;
break;
}
}
return _35;
}
catch(ex){
jsExDebug("selectListWidget_isSelected",ex);
}
}
function selectListWidget_deselectItem(_37){
try{
if(this.items[_37]){
this.items[_37].isSelected=false;
this.dim(_37);
for(var i=0;i<this.selectedIndexes.length;i++){
if(this.selectedIndexes[i]==_37&&this.selectedIndexes[i]!=null){
this.selectedIndexes[i]=null;
delete this.selectedIndexes[i];
break;
}
}
}
}
catch(ex){
jsExDebug("selectListWidget_deselectItem",ex);
}
}
function selectListWidget_highlight(_39){
try{
if(this.items[_39]){
if(this.items[_39].isSelected){
this.SYSTEM.Dom.setElementClass(this.items[_39],"option on_hover");
}else{
this.SYSTEM.Dom.setElementClass(this.items[_39],"option hover");
if(this.settingAllowItemBorder){
this.items[_39].style.padding="1px";
}
}
}
}
catch(ex){
jsExDebug("selectListWidget_highlight",ex);
}
}
function selectListWidget_dim(_3a){
try{
if(this.items[_3a]){
if(this.items[_3a].isSelected){
this.SYSTEM.Dom.setElementClass(this.items[_3a],"option on");
}else{
this.SYSTEM.Dom.setElementClass(this.items[_3a],"option");
if(this.settingAllowItemBorder){
this.items[_3a].style.padding="1px";
}
}
}
}
catch(ex){
jsExDebug("itemList_dim",ex);
}
}
function selectListWidget_deselectAll(){
try{
for(var i in this.selectedIndexes){
this.deselectItem(this.selectedIndexes[i]);
}
}
catch(ex){
jsExDebug("selectListWidget_deselectAll",ex);
}
}
function selectListWidget_selectionChangeEvent(_3c,_3d){
try{
this.setSelectedIndex(_3d);
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_3c);
}
catch(ex){
jsExDebug("selectListWidget_selectionChangeEvent",ex);
}
}
function selectListWidget_hideListEvent(_3e,me){
try{
if(me.settingAllowGlobalClickHide){
me.hideList();
me.fireEvent(me.SYSTEM.Event.LIST_COLLAPSE_EVENT);
}
}
catch(ex){
jsExDebug("selectListWidget_hideListEvent",ex);
}
}
function selectListWidget_keyDownEvent(_40,me){
try{
if(_40.ctrlKey==1){
me.multipleSelectAllowed=true;
}else{
me.multipleSelectAllowed=false;
}
}
catch(ex){
jsExDebug("selectListWidget_keyDownEvent",ex);
}
}
function selectListWidget_keyUpEvent(_42,me){
try{
if(_42.ctrlKey==1){
me.multipleSelectAllowed=true;
}else{
me.multipleSelectAllowed=false;
}
}
catch(ex){
jsExDebug("selectListWidget_keyUpEvent",ex);
}
}
function selectListWidget_itemClickEvent(_44,me,_46){
try{
me.selectionChangeEvent(_44,_46);
}
catch(ex){
jsExDebug("selectListWidget_itemClickEvent",ex);
}
}
function selectListWidget_itemWidgetEvent(_47,_48){
try{
this.eventWidget=_48;
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_WIDGET_EVENT,_47);
}
catch(ex){
jsExDebug("selectListWidget_itemWidgetEvent",ex);
}
}

try{
widgetToolbar_t.prototype=new itemList_t();
widgetToolbar_t.prototype.widgetToolbar_super=itemList_t.prototype.constructor;
widgetToolbar_t.prototype.constructor=widgetToolbar_t;
widgetToolbar_t.prototype.itemList_cleanUp=itemList_t.prototype.cleanUp;
widgetToolbar_t.prototype.cleanUp=widgetToolbar_cleanUp;
widgetToolbar_t.prototype.itemList_createDom=itemList_t.prototype.createDom;
widgetToolbar_t.prototype.createDom=widgetToolbar_createDom;
widgetToolbar_t.prototype.bindEvents=widgetToolbar_bindEvents;
widgetToolbar_t.prototype.addTool=widgetToolbar_addTool;
widgetToolbar_t.prototype.prependTool=widgetToolbar_prependTool;
widgetToolbar_t.prototype.setWidth=widgetToolbar_setWidth;
widgetToolbar_t.prototype.adjustWidth=widgetToolbar_adjustWidth;
}
catch(ex){
jsExDebug("widgetToolbar_t.prototype",ex);
}
function widgetToolbar_t(_1,_2){
try{
this.widgetToolbar_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetToolbar_t",ex);
}
}
function widgetToolbar_cleanUp(me){
try{
if(!me){
var me=this;
}
me.itemList_cleanUp();
}
catch(ex){
jsExDebug("widgetToolbar_cleanUp",ex);
}
}
function widgetToolbar_createDom(){
try{
this.itemList_createDom();
}
catch(ex){
jsExDebug("widgetToolbar_createDom",ex);
}
}
function widgetToolbar_bindEvents(){
try{
}
catch(ex){
jsExDebug("widgetToolbar_bindEvents",ex);
}
}
function widgetToolbar_addTool(_4,_5){
try{
_4.makeRelativePositioned();
if(this.layoutDirection==this.HORIZONTAL){
_4.widgetElement.style.position="";
if(this.SYSTEM.Environment.userAgentIsIE()){
_4.widgetElement.style.styleFloat="left";
}else{
_4.widgetElement.style.cssFloat="left";
}
}else{
if(this.layoutDirection==this.VERTICAL){
_4.widgetElement.style.position="";
}
}
var _6=this.items.length;
if(_5){
this.addTemporaryWidget(_6,_4);
}else{
this.addWidget(_6,_4);
}
return _6;
}
catch(ex){
jsExDebug("widgetToolbar_addTool "+_4,ex);
}
}
function widgetToolbar_prependTool(_7){
try{
_7.makeRelativePositioned();
if(this.layoutDirection==this.HORIZONTAL){
_7.widgetElement.style.position="";
if(this.SYSTEM.Environment.userAgentIsIE()){
_7.widgetElement.style.styleFloat="left";
}else{
_7.widgetElement.style.cssFloat="left";
}
}else{
if(this.layoutDirection==this.VERTICAL){
_7.widgetElement.style.position="";
}
}
var _8=this.items.length;
this.prependWidget(_8,_7);
return _8;
}
catch(ex){
jsExDebug("widgetToolbar_prependTool",ex);
}
}
function widgetToolbar_setWidth(_9){
try{
this.adjustWidth();
if(_9>=this.width){
this.widgetElement.style.width=_9+"px";
}
}
catch(ex){
jsExDebug("widgetToolbar_setWidth",ex);
}
}
function widgetToolbar_adjustWidth(){
try{
var _a=0;
for(var i=0;i<this.items.length;i++){
if(this.items[i]){
_a+=this.items[i].widgetObjectReference.getClientWidth()+(2*(this.ITEM_HPADDING+this.horizontalPadding+2));
}
}
this.width=_a;
this.widgetElement.style.width=this.width+"px";
}
catch(ex){
jsExDebug("widgetToolbar_adjustWidth",ex);
}
}

try{
widgetSlidebar_t.prototype=new widget_t();
widgetSlidebar_t.prototype.widgetSlidebar_super=widget_t.prototype.constructor;
widgetSlidebar_t.prototype.constructor=widgetSlidebar_t;
widgetSlidebar_t.prototype.cleanUp=widgetSlidebar_cleanUp;
widgetSlidebar_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetSlidebar_t.prototype.createDom=widgetSlidebar_createDom;
widgetSlidebar_t.prototype.bindEvents=widgetSlidebar_bindEvents;
widgetSlidebar_t.prototype.allowValueDisplay=widgetSlidebar_allowValueDisplay;
widgetSlidebar_t.prototype.displayValue=widgetSlidebar_displayValue;
widgetSlidebar_t.prototype.setSlideValue=widgetSlidebar_setSlideValue;
widgetSlidebar_t.prototype.quantify=widgetSlidebar_quantify;
widgetSlidebar_t.prototype.setSlidebarPosition=widgetSlidebar_setSlidebarPosition;
widgetSlidebar_t.prototype.setSlideElementDimensions=widgetSlidebar_setSlideElementDimensions;
widgetSlidebar_t.prototype.setBarLength=widgetSlidebar_setBarLength;
widgetSlidebar_t.prototype.setUpperLimit=widgetSlidebar_setUpperLimit;
widgetSlidebar_t.prototype.setScreenPosition=widgetSlidebar_setScreenPosition;
widgetSlidebar_t.prototype.getDisplayValue=widgetSlidebar_getDisplayValue;
widgetSlidebar_t.prototype.hideValue=widgetSlidebar_hideValue;
widgetSlidebar_t.prototype.slideSelectEvent=widgetSlidebar_slideSelectEvent;
widgetSlidebar_t.prototype.slideMoveEvent=widgetSlidebar_slideMoveEvent;
widgetSlidebar_t.prototype.slideMoveEndEvent=widgetSlidebar_slideMoveEndEvent;
widgetSlidebar_t.prototype.slideHoverEvent=widgetSlidebar_slideHoverEvent;
widgetSlidebar_t.prototype.slideHoverEndEvent=widgetSlidebar_slideHoverEndEvent;
widgetSlidebar_t.prototype.slideMouseDownEvent=widgetSlidebar_slideMouseDownEvent;
widgetSlidebar_t.prototype.slideMouseUpEvent=widgetSlidebar_slideMouseUpEvent;
widgetSlidebar_t.prototype.HORIZONTAL=0;
widgetSlidebar_t.prototype.VERTICAL=1;
widgetSlidebar_t.prototype.DISPLAY_BG_COLOUR="rgb( 251, 240, 198 )";
widgetSlidebar_t.prototype.SLIDE_HEIGHT=15;
widgetSlidebar_t.prototype.SLIDE_WIDTH=35;
widgetSlidebar_t.prototype.HORIZONTAL_BAR_SRC="img/app/system/widgets/scrollbar/scroll_bg_h.png";
widgetSlidebar_t.prototype.HORIZONTAL_SLIDE_SRC="img/app/system/widgets/scrollbar/scroll_bar_h_off.png";
widgetSlidebar_t.prototype.HORIZONTAL_SLIDE_SRC_HOVER="img/app/system/widgets/scrollbar/scroll_bar_h_hov.png";
widgetSlidebar_t.prototype.HORIZONTAL_SLIDE_SRC_CLICK="img/app/system/widgets/scrollbar/scroll_bar_h_on.png";
widgetSlidebar_t.prototype.VERTICAL_BAR_SRC="img/app/system/widgets/scrollbar/scroll_bg_v.png";
widgetSlidebar_t.prototype.VERTICAL_SLIDE_SRC="img/app/system/widgets/scrollbar/scroll_bar_v_off.png";
widgetSlidebar_t.prototype.VERTICAL_SLIDE_SRC_HOVER="img/app/system/widgets/scrollbar/scroll_bar_v_hov.png";
widgetSlidebar_t.prototype.VERTICAL_SLIDE_SRC_CLICK="img/app/system/widgets/scrollbar/scroll_bar_v_on.png";
widgetSlidebar_t.prototype.DEFAULT_BAR_HEIGHT=15;
widgetSlidebar_t.prototype.DEFAULT_EVENT=SYSTEM.Event.VALUE_CHANGED_EVENT;
widgetSlidebar_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.DRAG_EVENT];
}
catch(ex){
jsExDebug("widgetSlidebar_t.prototype",ex);
}
function widgetSlidebar_t(_1,_2,_3,_4){
try{
this.widgetSlidebar_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_4){
this.createDom(_2,_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetSlidebar_t",ex);
}
return;
}
function widgetSlidebar_cleanUp(me){
try{
if(!me){
me=this;
}
me.cleanUpString+=" - slider - ";
me.SYSTEM.Event.detachEvent(me.barElement,"onclick","click");
me.SYSTEM.Event.detachEvent(me.slideElement,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.slideElement,"onmouseout","mouseout");
me.SYSTEM.Event.detachEvent(me.slideElement,"onmousedown","mousedown");
me.SYSTEM.Event.detachEvent(me.slideElement,"onmouseup","mouseup");
me.SYSTEM.DM.removeDragEventHandlers(me.slideElement);
me.maxPosition=null;
me.screenPositionX=null;
me.screenPositionY=null;
me.direction=null;
me.barHeight=null;
me.barLength=null;
me.upperLimitPosition=null;
me.upperLimitValue=null;
me.slideValue=null;
me.slidePercentage=null;
me.slidePositionX=null;
me.slidePositionY=null;
me.quantified=null;
me.quantifiedValue=null;
me.slideWidth=null;
me.slideHeight=null;
me.sliderHalfLength=null;
me.displayVisible=null;
me.displayDiv=null;
me.displayCount=null;
me.mouseOver=null;
me.settingAutomaticValueDisplay=null;
me.minimumValue=null;
me.SYSTEM.Event.disableDragEnabledElement(me.slideElement);
me.slideElement=null;
me.barElement=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetSlidebar_cleanUp",ex);
}
}
function widgetSlidebar_createDom(_6,_7){
try{
this.widgetElement=document.createElement("div");
this.widgetElement.style.position="absolute";
this.maxPosition=_6;
this.screenPositionX=null;
this.screenPositionY=null;
this.settingNotifyPanelOfEvent=false;
this.displayCount=0;
this.barHeight=this.DEFAULT_BAR_HEIGHT;
this.barLength=_6;
this.upperLimitPosition=this.barLength;
this.upperLimitValue=this.barLength;
if(_7){
this.direction=this.VERTICAL;
}else{
this.direction=this.HORIZONTAL;
}
this.barElement=document.createElement("img");
this.barElement.style.position="absolute";
this.barElement.style.cursor="pointer";
this.widgetElement.appendChild(this.barElement);
this.slideElement=this.SYSTEM.Event.createDragEnabledElement("img",0,0);
this.slideElement.style.cursor="pointer";
this.widgetElement.appendChild(this.slideElement);
if(this.direction==this.HORIZONTAL){
this.slideWidth=this.SLIDE_WIDTH;
this.slideHeight=this.SLIDE_HEIGHT;
this.sliderHalfLength=Math.round(this.slideWidth/2);
this.barElement.src=this.HORIZONTAL_BAR_SRC;
this.barElement.style.width=this.barLength+"px";
this.barElement.style.height=this.DEFAULT_BAR_HEIGHT+"px";
this.slideElement.src=this.HORIZONTAL_SLIDE_SRC;
}else{
this.slideWidth=this.SLIDE_HEIGHT;
this.slideHeight=this.SLIDE_WIDTH;
this.sliderHalfLength=Math.round(this.slideHeight/2);
this.barElement.src=this.VERTICAL_BAR_SRC;
this.barElement.style.height=this.barLength+"px";
this.barElement.style.width=this.DEFAULT_BAR_HEIGHT+"px";
this.slideElement.src=this.VERTICAL_SLIDE_SRC;
}
this.widgetElement.style.width=this.barElement.style.width;
this.widgetElement.style.height=this.barElement.style.height;
this.slideElement.style.width=this.slideWidth+"px";
this.slideElement.style.height=this.slideHeight+"px";
this.setSlidebarPosition(0,0);
}
catch(ex){
jsExDebug("widgetSlidebar_createDom",ex);
}
}
function widgetSlidebar_bindEvents(_8){
try{
this.SYSTEM.DM.attachEvent(this.barElement,"onclick","click",this.slideSelectEvent,this);
this.SYSTEM.DM.attachEvent(this.slideElement,"onmouseover","mouseover",this.slideHoverEvent,this);
this.SYSTEM.DM.attachEvent(this.slideElement,"onmouseout","mouseout",this.slideHoverEndEvent,this);
this.SYSTEM.DM.attachEvent(this.slideElement,"onmousedown","mousedown",this.slideMouseDownEvent,this,true);
this.SYSTEM.DM.attachEvent(this.slideElement,"onmouseup","mouseup",this.slideMouseUpEvent,this);
this.SYSTEM.DM.bindDragEventHandlers(this.slideElement,null,this.slideMoveEvent,this.slideMoveEndEvent,this);
}
catch(ex){
jsExDebug("widgetSlidebar_bindEvents",ex);
}
}
function widgetSlidebar_allowValueDisplay(_9,_a,_b,_c,_d){
try{
if(_b==null){
var _b=this.DEFAULT_BAR_HEIGHT;
}
this.displayDiv=document.createElement("div");
this.displayDiv.style.position="absolute";
this.displayDiv.style.backgroundColor=this.DISPLAY_BG_COLOUR;
this.displayDiv.style.width=_9+"px";
this.displayDiv.style.height=_a+"px";
this.displayDiv.style.border="solid 1px #AAAAAA";
this.displayDiv.style.textAlign="center";
this.displayVisible=false;
if(this.direction==this.HORIZONTAL){
this.displayDiv.style.left=this.slideElement.style.left;
if(_c){
this.displayDiv.style.top=(parseInt(this.slideElement.style.top)+this.DEFAULT_BAR_HEIGHT+_b)+"px";
}else{
this.displayDiv.style.top=(parseInt(this.slideElement.style.top)-(_a+_b))+"px";
}
}else{
this.displayDiv.style.top=this.slideElement.style.top;
if(_c){
this.displayDiv.style.left=(parseInt(this.slideElement.style.left)+this.DEFAULT_BAR_HEIGHT+_b)+"px";
}else{
this.displayDiv.style.left=(parseInt(this.slideElement.style.left)-(_9+_b))+"px";
}
}
this.settingAutomaticValueDisplay=!_d;
}
catch(ex){
jsExDebug("widgetSlidebar_allowValueDisplay",ex);
}
}
function widgetSlidebar_displayValue(_e,_f){
function hideValue(){
if(me.displayCount==1){
me.hideValue();
}
me.displayCount--;
}
try{
var me=this;
var _11;
if(_e){
this.displayDiv.innerHTML=_e;
}else{
this.displayDiv.innerHTML=this.slideValue;
}
if(this.direction==this.HORIZONTAL){
this.displayDiv.style.left=this.slideElement.style.left;
}else{
this.displayDiv.style.top=this.slideElement.style.top;
}
if(!this.displayVisible){
this.widgetElement.appendChild(this.displayDiv);
this.displayVisible=true;
}
if(_f){
this.displayCount++;
setTimeout(hideValue,1000);
}
}
catch(ex){
jsExDebug("widgetSlidebar_displayValue",ex);
}
}
function widgetSlidebar_hideValue(){
try{
if(this.displayVisible){
this.displayDiv.innerHTML="";
this.widgetElement.removeChild(this.displayDiv);
this.displayVisible=false;
}
}
catch(ex){
jsExDebug("widgetSlidebar_hideValue",ex);
}
}
function widgetSlidebar_setSlideValue(_12){
try{
if(_12==null){
return;
}
var _13;
if(_12>=this.upperLimitValue){
_12=this.upperLimitValue;
_13=this.upperLimitPosition;
}else{
_13=_12/this.quantifiedValue*this.barLength;
}
if((_13+this.sliderHalfLength)>this.maxPosition){
_13=this.maxPosition-this.sliderHalfLength;
}
if(_13<this.sliderHalfLength){
_13=this.sliderHalfLength;
}
if(this.direction==this.HORIZONTAL){
this.slidePositionX=_13;
this.slideElement.style.left=(_13-this.sliderHalfLength)+"px";
}else{
this.slidePositionY=_13;
this.slideElement.style.top=(_13-this.sliderHalfLength)+"px";
}
this.slideValue=_12;
}
catch(ex){
jsExDebug("widgetSlidebar_setSlideValue",ex);
}
}
function widgetSlidebar_quantify(_14){
try{
this.quantified=true;
this.quantifiedValue=_14;
if(!this.upperLimitValue){
this.upperLimitValue=this.quantifiedValue;
}
this.minimumValue=parseInt(this.sliderHalfLength/this.barLength*this.quantifiedValue);
}
catch(ex){
jsExDebug("widgetSlidebar_quantify",ex);
}
return;
}
function widgetSlidebar_setSlideElementDimensions(_15,_16){
try{
this.slideWidth=_15;
this.slideHeight=_16;
this.slideElement.style.width=this.slideWidth+"px";
this.slideElement.style.height=this.slideHeight+"px";
}
catch(ex){
jsExDebug("widgetSlidebar_setSlideElementHeight",ex);
}
}
function widgetSlidebar_setBarLength(_17){
try{
this.barLength=_17;
if(this.direction==this.HORIZONTAL){
this.barElement.style.width=_17+"px";
}else{
this.barElement.style.height=_17+"px";
}
this.maxPosition=_17;
this.upperLimitPosition=_17-this.upperLimitOffset;
}
catch(ex){
jsExDebug("widgetSlidebar_setBarLength\t",ex);
}
}
function widgetSlidebar_setUpperLimit(_18,_19){
try{
this.upperLimitPosition=_18;
this.upperLimitValue=_19;
this.upperLimitOffset=this.maxPosition-_18;
}
catch(ex){
jsExDebug("widgetSlidebar_setUpperLimit",ex);
}
}
function widgetSlidebar_setScreenPosition(_1a,_1b){
try{
this.screenPositionX=_1a;
this.screenPositionY=_1b;
}
catch(ex){
jsExDebug("widgetSlidebar_setScreenPosition",ex);
}
}
function widgetSlidebar_getDisplayValue(){
try{
return this.slideValue;
}
catch(ex){
jsExDebug("widgetSlidebar_getDisplayValue",ex);
}
}
function widgetSlidebar_setSlidebarPosition(_1c,_1d){
try{
if(this.direction==this.HORIZONTAL){
if(_1c<this.sliderHalfLength){
_1c=this.sliderHalfLength;
this.slidePercentage=0;
}
if((_1c+this.sliderHalfLength)>this.maxPosition){
_1c=this.maxPosition-this.sliderHalfLength;
}
if(_1c>this.upperLimitPosition){
this.slideValue=this.upperLimitValue;
_1c=this.upperLimitPosition;
}
this.slideElement.style.left=(_1c-(this.slideWidth/2))+"px";
this.slideElement.style.top=_1d+"px";
this.slidePercentage=_1c/this.barLength;
}else{
if(_1d<this.sliderHalfLength){
_1d=this.sliderHalfLength;
this.slidePercentage=0;
}
if((_1d+this.sliderHalfLength)>this.maxPosition){
_1d=this.maxPosition-this.sliderHalfLength;
}
if(_1d>this.upperLimitPosition){
this.slideValue=this.upperLimitValue;
_1d=this.upperLimitPosition;
}
this.slideElement.style.left=_1c+"px";
this.slideElement.style.top=(_1d-(this.slideHeight/2))+"px";
this.slidePercentage=_1d/this.barLength;
}
if(this.quantified){
this.slideValue=Math.round(this.slidePercentage*this.quantifiedValue);
}else{
if(this.direction==this.HORIZONTAL){
this.slideValue=_1c-(this.slideWidth/2);
}else{
this.slideValue=_1d-(this.slideHeight/2);
}
}
this.slidePositionX=_1c;
this.slidePositionY=_1d;
}
catch(ex){
jsExDebug("widgetSlidebar_setSlidebarPosition",ex);
}
}
function widgetSlidebar_slideSelectEvent(_1e,me){
try{
if(!me.screenPositionX||!me.screenPositionY){
return;
}
var _20;
if(me.direction==me.HORIZONTAL){
_20=me.SYSTEM.Event.mouseX-me.screenPositionX;
}else{
_20=me.SYSTEM.Event.mouseY-me.screenPositionY;
}
me.slidePercentage=(_20-me.sliderHalfLength)/(me.barLength-(2*me.sliderHalfLength));
if((_20+me.sliderHalfLength)>me.maxPosition){
_20=me.maxPosition-me.sliderHalfLength;
me.slidePercentage=1;
}
if(_20<me.sliderHalfLength){
_20=me.sliderHalfLength;
me.slidePercentage=0;
}
if(!me.quantified){
me.slideValue=_20;
}else{
if(_20>me.upperLimitPosition){
me.slideValue=me.upperLimitValue;
_20=me.upperLimitPosition;
}else{
me.slideValue=Math.round(me.slidePercentage*me.quantifiedValue);
}
}
if(me.direction==me.HORIZONTAL){
me.slidePositionX=_20;
me.slideElement.style.left=(_20-me.sliderHalfLength)+"px";
}else{
me.slidePositionY=_20;
me.slideElement.style.top=(_20-me.sliderHalfLength)+"px";
}
if(me.settingAutomaticValueDisplay){
me.displayValue(null,1);
}
me.fireEvent(me.SYSTEM.Event.VALUE_CHANGED_EVENT,_1e);
}
catch(ex){
jsExDebug("widgetSlidebar_slideSelectEvent",ex);
}
}
function widgetSlidebar_slideMoveEvent(_21,me){
try{
if(me.direction==me.HORIZONTAL){
me.slideElement.src=me.HORIZONTAL_SLIDE_SRC_CLICK;
}else{
me.slideElement.src=me.VERTICAL_SLIDE_SRC_CLICK;
}
var _23;
if(me.direction==me.HORIZONTAL){
_23=me.slidePositionX+me.SYSTEM.Event.dragDistanceX;
}else{
_23=me.slidePositionY+me.SYSTEM.Event.dragDistanceY;
}
me.slidePercentage=(_23-me.sliderHalfLength)/(me.barLength-(2*me.sliderHalfLength));
if((_23+me.sliderHalfLength)>me.maxPosition){
_23=me.maxPosition-me.sliderHalfLength;
me.slidePercentage=1;
}
if(_23<me.sliderHalfLength){
_23=me.sliderHalfLength;
me.slidePercentage=0;
}
if(me.direction==me.HORIZONTAL){
me.slideElement.style.left=(_23-me.sliderHalfLength)+"px";
}else{
me.slideElement.style.top=(_23-me.sliderHalfLength)+"px";
}
if(me.quantified){
me.slideValue=Math.round(me.slidePercentage*me.quantifiedValue);
}else{
me.slideValue=_23;
}
if(me.settingAutomaticValueDisplay){
me.displayValue();
}
me.fireEvent(me.SYSTEM.Event.DRAG_EVENT,_21);
}
catch(ex){
jsExDebug("widgetSlidebar_slideMoveEvent",ex);
}
}
function widgetSlidebar_slideMoveEndEvent(_24,me){
try{
if(me.mouseOver){
if(me.direction==me.HORIZONTAL){
me.slideElement.src=me.HORIZONTAL_SLIDE_SRC_HOVER;
}else{
me.slideElement.src=me.VERTICAL_SLIDE_SRC_HOVER;
}
}else{
if(me.direction==me.HORIZONTAL){
me.slideElement.src=me.HORIZONTAL_SLIDE_SRC;
}else{
me.slideElement.src=me.VERTICAL_SLIDE_SRC;
}
}
var _26;
if(me.direction==me.HORIZONTAL){
_26=me.slidePositionX+me.SYSTEM.DM.dragDistanceX;
}else{
_26=me.slidePositionY+me.SYSTEM.DM.dragDistanceY;
}
me.slidePercentage=(_26-me.sliderHalfLength)/(me.barLength-(2*me.sliderHalfLength));
if((_26+me.sliderHalfLength)>me.maxPosition){
_26=me.maxPosition-me.sliderHalfLength;
me.slidePercentage=1;
}
if(_26<me.sliderHalfLength){
_26=me.sliderHalfLength;
me.slidePercentage=0;
}
if(_26>me.upperLimitPosition){
me.slideValue=me.upperLimitValue;
_26=me.upperLimitPosition;
}else{
if(me.quantified){
me.slideValue=Math.round(me.slidePercentage*me.quantifiedValue);
}else{
me.slideValue=_26;
}
}
if(me.direction==me.HORIZONTAL){
me.slidePositionX=_26;
me.slideElement.style.left=(_26-me.sliderHalfLength)+"px";
}else{
me.slidePositionY=_26;
me.slideElement.style.top=(_26-me.sliderHalfLength)+"px";
}
if(me.displayDiv){
me.hideValue();
}
me.fireEvent(me.SYSTEM.Event.VALUE_CHANGED_EVENT,_24);
}
catch(ex){
jsExDebug("widgetSlidebar_slideMoveEndEvent",ex);
}
}
function widgetSlidebar_slideHoverEvent(_27,me){
try{
me.mouseOver=true;
if(me.direction==me.HORIZONTAL){
me.slideElement.src=me.HORIZONTAL_SLIDE_SRC_HOVER;
}else{
me.slideElement.src=me.VERTICAL_SLIDE_SRC_HOVER;
}
}
catch(ex){
jsExDebug("widgetSlidebar_slideHoverEvent",ex);
}
}
function widgetSlidebar_slideHoverEndEvent(_29,me){
try{
me.mouseOver=false;
if(me.direction==me.HORIZONTAL){
me.slideElement.src=me.HORIZONTAL_SLIDE_SRC;
}else{
me.slideElement.src=me.VERTICAL_SLIDE_SRC;
}
}
catch(ex){
jsExDebug("widgetSlidebar_slideHoverEndEvent",ex);
}
}
function widgetSlidebar_slideMouseDownEvent(_2b,me){
try{
if(me.direction==me.HORIZONTAL){
me.slideElement.src=me.HORIZONTAL_SLIDE_SRC_CLICK;
}else{
me.slideElement.src=me.VERTICAL_SLIDE_SRC_CLICK;
}
}
catch(ex){
jsExDebug("widgetSlidebar_slideMouseDownEvent",ex);
}
}
function widgetSlidebar_slideMouseUpEvent(_2d,me){
try{
if(me.mouseOver){
if(me.direction==me.HORIZONTAL){
me.slideElement.src=me.HORIZONTAL_SLIDE_SRC_HOVER;
}else{
me.slideElement.src=me.VERTICAL_SLIDE_SRC_HOVER;
}
}else{
if(me.direction==me.HORIZONTAL){
me.slideElement.src=me.HORIZONTAL_SLIDE_SRC;
}else{
me.slideElement.src=me.VERTICAL_SLIDE_SRC;
}
}
}
catch(ex){
jsExDebug("widgetSlidebar_slideMouseDownEvent",ex);
}
}

try{
tabListWidget_t.prototype=new itemList_t();
tabListWidget_t.prototype.tabListWidget_super=itemList_t.prototype.constructor;
tabListWidget_t.prototype.constructor=tabListWidget_t;
tabListWidget_t.prototype.cleanUp=tabListWidget_cleanUp;
tabListWidget_t.prototype.itemList_cleanUp=itemList_t.prototype.cleanUp;
tabListWidget_t.prototype.itemList_createDom=itemList_t.prototype.createDom;
tabListWidget_t.prototype.createDom=tabListWidget_createDom;
tabListWidget_t.prototype.bindEvents=tabListWidget_bindEvents;
tabListWidget_t.prototype.addWidget=tabListWidget_addWidget;
tabListWidget_t.prototype.addTab=tabListWidget_addTab;
tabListWidget_t.prototype.selectTab=tabListWidget_selectTab;
tabListWidget_t.prototype.bindTabSelectEvent=tabListWidget_bindTabSelectEvent;
tabListWidget_t.prototype.fireEvent=tabListWidget_fireEvent;
tabListWidget_t.prototype.getSelectedTabIndex=tabListWidget_getSelectedTabIndex;
tabListWidget_t.prototype.getSelectedTabName=tabListWidget_getSelectedTabName;
tabListWidget_t.prototype.getSelectedTabData=tabListWidget_getSelectedTabData;
tabListWidget_t.prototype.disallowTabZIndex=tabListWidget_disallowTabZIndex;
tabListWidget_t.prototype.getWidth=tabListWidget_getWidth;
tabListWidget_t.prototype.getHeight=tabListWidget_getHeight;
tabListWidget_t.prototype.tabSelectEvent=tabListWidget_tabSelectEvent;
tabListWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
tabListWidget_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("tabListWidget_t.prototype",ex);
}
function tabListWidget_t(_1,_2,_3,_4){
try{
this.tabListWidget_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_2){
this.disallowPadding();
}
this.tabObjects=[];
this.tabDataArray=[];
this.tabIndexesByName=[];
this.selectedTab=null;
this.settingSelectedTabZIndex=1;
this.selectedIndex=null;
if(!_4){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("tabListWidget_t",ex);
}
}
function tabListWidget_cleanUp(me){
try{
if(!me){
me=this;
}
me.cleanUpString+=" - tab list - ";
for(var i=0;i<me.tabDataArray.length;i++){
if(me.tabDataArray[i]){
me.tabDataArray[i]=null;
delete me.tabDataArray[i];
}
}
for(var i=0;i<me.tabObjects.length;i++){
if(me.tabObjects[i]){
me.tabObjects[i]=null;
delete me.tabObjects[i];
}
}
for(var _7 in me.tabIndexesByName){
me.tabIndexesByName[_7]=null;
}
me.tabObjects=null;
me.tabDataArray=null;
me.tabIndexesByName=null;
me.selectedTab=null;
me.selectedIndex=null;
me.itemList_cleanUp();
}
catch(ex){
jsExDebug("tabListWidget_cleanUp",ex);
}
}
function tabListWidget_createDom(){
try{
this.itemList_createDom();
this.disallowItemBorder();
this.disallowBorder();
this.SYSTEM.Dom.setElementClass(this.widgetElement,"tab_container");
}
catch(ex){
jsExDebug("tabListWidget_createDom",ex);
}
}
function tabListWidget_bindEvents(){
try{
}
catch(ex){
jsExDebug("tabListWidget_bindEvents",ex);
}
}
function tabListWidget_addWidget(_8,_9){
try{
var _a=document.createElement("div");
var _b=this.currentInsertIndex;
this.currentInsertIndex++;
if(_8!=null){
_a.isSelectable=false;
this.SYSTEM.Event.attachEvent(_a,"onclick","click",this.itemClickEvent,this,true,_b);
if(this.settingAllowMouseOverHighlight){
this.SYSTEM.Event.attachEvent(_a,"onmouseover","mouseover",this.itemEnterEvent,this,false,_b);
this.SYSTEM.Event.attachEvent(_a,"onmouseout","mouseout",this.itemExitEvent,this,false,_b);
}
}
_a.itemListValueReference=_8;
_a.value=_8;
_a.isWidgetItem=true;
_a.widgetObjectReference=_9;
this.items[_b]=_a;
this.items[_b].allowHighlight=true;
_9.makeRelativePositioned();
_9.attach(_a);
this.widgetElement.appendChild(_a);
return _b;
}
catch(ex){
jsExDebug("itemList_addWidget",ex);
}
}
function tabListWidget_addTab(_c,_d,_e){
try{
var _f=new this.SYSTEM.Widget.Tab("newTab");
_f.setTabStyle(_f.TEXT_STYLE);
_f.setTabName(_c);
var _10=this.addWidget(_e,_f);
_f.makeDeselected();
this.tabObjects[_10]=_f;
this.tabDataArray[_10]=_e;
this.tabIndexesByName[_c]=_10;
if(_10==0){
_f.makeFirst();
}
var _11=this.bindTabSelectEvent(_10);
_f.notifyEvent(this.SYSTEM.Event.CLICK_EVENT,_11);
return _10;
}
catch(ex){
jsExDebug("tabListWidget_addTab",ex);
}
}
function tabListWidget_selectTab(_12,_13){
try{
if(_12==null&&_13){
_12=this.tabIndexesByName[_13];
}
var tab=this.tabObjects[_12];
if(!tab){
return;
}
if(this.selectedTab){
this.selectedTab.makeDeselected();
}
tab.makeSelected();
this.selectedTab=tab;
this.selectedIndex=_12;
this.tabSelectEvent(_12);
}
catch(ex){
jsExDebug("tabListWidget_selectTab",ex);
}
}
function tabListWidget_bindTabSelectEvent(_15){
function handler(_16,_17){
try{
this.selectTab(_15);
}
catch(ex){
jsExDebug("tabListWidget_bindTabEvent: handler",ex);
}
}
try{
return new this.SYSTEM.Delegate(this,handler);
}
catch(ex){
jsExDebug("tabListWidget_bindTabSelectEvent",ex);
}
}
function tabListWidget_tabSelectEvent(_18){
try{
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,null,this.tabDataArray[_18]);
}
catch(ex){
jsExDebug("tabListWidget_tabSelectEvent",ex);
}
}
function tabListWidget_fireEvent(_19,_1a,_1b){
try{
if(_1b==null){
return;
}
if(!this.eventBindings[_19]){
return;
}
if(_1a){
var _1c=new SYSTEM.Event.Event(_1a.mouseX,_1a.mouseY);
}else{
var _1c=new SYSTEM.Event.Event();
}
for(var i=0;i<this.eventBindings[_19].length;i++){
var _1e=this.eventBindings[_19][i];
_1e.invoke(_1c,this,_1b);
}
}
catch(ex){
jsExDebug("tabListWidget_fireEvent",ex);
}
}
function tabListWidget_getSelectedTabIndex(){
try{
return this.selectedIndex;
}
catch(ex){
jsExDebug("tabListWidget_getSelectedTabIndex",ex);
}
}
function tabListWidget_getSelectedTabName(){
try{
if(this.tabObjects[this.selectedIndex]){
return this.tabObjects[this.selectedIndex].label;
}else{
return "";
}
}
catch(ex){
jsExDebug("tabListWidget_getSelectedTabName",ex);
}
}
function tabListWidget_getSelectedTabData(){
try{
return this.tabDataArray[this.selectedIndex];
}
catch(ex){
jsExDebug("tabListWidget_getSelectedTabIndex",ex);
}
}
function tabListWidget_disallowTabZIndex(){
try{
}
catch(ex){
jsExDebug("tabListWidget_disallowTabZIndex",ex);
}
}
function tabListWidget_getWidth(){
try{
var _1f=0;
for(var _20 in this.tabObjects){
_1f+=this.tabObjects[_20].getClientWidth();
}
return _1f;
}
catch(ex){
jsExDebug("tabListWidget_getWidth",ex);
}
}
function tabListWidget_getHeight(){
try{
if(!this.SYSTEM.Environment.TabHeight){
if(this.tabObjects.length){
this.SYSTEM.Environment.TabHeight=this.tabObjects[0].getClientHeight();
}else{
var _21=this.SYSTEM.Dom.createDiv();
var _22=new this.SYSTEM.Widget.Tab("testTab");
_22.attach(_21);
_22.setTabStyle(_22.TEXT_STYLE);
_22.setTabName("test");
_22.makeFirst();
document.body.appendChild(_21);
this.SYSTEM.Environment.TabHeight=_22.getClientHeight();
_22.cleanUp();
}
}
return this.SYSTEM.Environment.TabHeight;
}
catch(ex){
jsExDebug("tabListWidget_getHeight",ex);
}
}

try{
tabWidget_t.prototype=new widget_t();
tabWidget_t.prototype.tabWidget_super=widget_t.prototype.constructor;
tabWidget_t.prototype.constructor=tabWidget_t;
tabWidget_t.prototype.cleanUp=tabWidget_cleanUp;
tabWidget_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
tabWidget_t.prototype.createDom=tabWidget_createDom;
tabWidget_t.prototype.bindEvents=tabWidget_bindEvents;
tabWidget_t.prototype.setTabStyle=tabWidget_setTabStyle;
tabWidget_t.prototype.setTabName=tabWidget_setTabName;
tabWidget_t.prototype.makeSelected=tabWidget_makeSelected;
tabWidget_t.prototype.makeDeselected=tabWidget_makeDeselected;
tabWidget_t.prototype.makeFirst=tabWidget_makeFirst;
tabWidget_t.prototype.getClientHeight=tabWidget_getClientHeight;
tabWidget_t.prototype.tabClickEvent=tabWidget_tabClickEvent;
tabWidget_t.prototype.FONT="10px Verdana";
tabWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.CLICK_EVENT;
tabWidget_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.MOUSE_ENTER_EVENT,SYSTEM.Event.MOUSE_EXIT_EVENT];
}
catch(ex){
jsExDebug("tabWidget_t.prototype",ex);
}
function tabWidget_t(_1,_2,_3,_4,_5){
try{
this.tabWidget_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.stateIsFirstTab=false;
this.width=_2;
this.height=_3;
if(!_5){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("tabWidget_t",ex);
}
}
function tabWidget_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.widgetElement,"onclick","click");
me.label=null;
me.selected=null;
me.tabName=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("tabWidget_cleanUp",ex);
}
}
function tabWidget_createDom(_7){
try{
}
catch(ex){
jsExDebug("tabWidget_createDom",ex);
}
}
function tabWidget_bindEvents(_8){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"onclick","click",this.tabClickEvent,this,false);
}
catch(ex){
jsExDebug("tabWidget_bindEvents",ex);
}
}
function tabWidget_setTabStyle(_9){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"tab_left");
this.tabName=document.createElement("span");
this.SYSTEM.Dom.setElementClass(this.tabName,"tab_right");
this.widgetElement.appendChild(this.tabName);
}
catch(ex){
jsExDebug("tabWidget_setTabStyle",ex);
}
}
function tabWidget_setTabName(_a){
try{
this.label=_a;
this.tabName.innerHTML=_a;
}
catch(ex){
jsExDebug("tabWidget_setTabName",ex);
}
}
function tabWidget_makeSelected(){
try{
this.selected=true;
if(this.stateIsFirstTab){
this.SYSTEM.Dom.setElementClass(this.parentDiv,"tab first on");
}else{
this.SYSTEM.Dom.setElementClass(this.parentDiv,"tab on");
}
}
catch(ex){
jsExDebug("tabWidget_makeSelected",ex);
}
}
function tabWidget_makeDeselected(){
try{
this.selected=false;
if(this.stateIsFirstTab){
this.SYSTEM.Dom.setElementClass(this.parentDiv,"tab first");
}else{
this.SYSTEM.Dom.setElementClass(this.parentDiv,"tab");
}
}
catch(ex){
jsExDebug("tabWidget_makeDeselected",ex);
}
}
function tabWidget_makeFirst(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"tab_left first");
this.SYSTEM.Dom.setElementClass(this.parentDiv,"tab first");
this.stateIsFirstTab=true;
}
catch(ex){
jsExDebug("tabWidget_makeFirst",ex);
}
}
function tabWidget_getClientHeight(){
try{
return this.widgetElement.clientHeight;
}
catch(ex){
jsExDebug("tabWidget_getClientHeight",ex);
}
}
function tabWidget_tabClickEvent(_b,me){
try{
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_b);
}
catch(ex){
jsExDebug("tabWidget_tabEnterEvent",ex);
}
}

try{
colourChooserWidget_t.prototype=new widget_t();
colourChooserWidget_t.prototype.colourChooserWidget_super=widget_t.prototype.constructor;
colourChooserWidget_t.prototype.constructor=colourChooserWidget_t;
colourChooserWidget_t.prototype.cleanUp=colourChooserWidget_cleanUp;
colourChooserWidget_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
colourChooserWidget_t.prototype.createDom=colourChooserWidget_createDom;
colourChooserWidget_t.prototype.setSelectedColour=colourChooserWidget_setSelectedColour;
colourChooserWidget_t.prototype.generateTableElement=colourChooserWidget_generateTableElement;
colourChooserWidget_t.prototype.generateDynamicTableElement=colourChooserWidget_generateDynamicTableElement;
colourChooserWidget_t.prototype.generateDynamicTableElement2=colourChooserWidget_generateDynamicTableElement2;
colourChooserWidget_t.prototype.clickEvent=colourChooserWidget_clickEvent;
colourChooserWidget_t.prototype.cellClickEvent=colourChooserWidget_cellClickEvent;
colourChooserWidget_t.prototype.DEFAULT_RED_COVERAGE=1;
colourChooserWidget_t.prototype.DEFAULT_BLUE_COVERAGE=1;
colourChooserWidget_t.prototype.DEFAULT_GREEN_COVERAGE=1;
colourChooserWidget_t.prototype.LIMIT_WIDTH=4;
colourChooserWidget_t.prototype.LIMIT_HEIGHT=4;
colourChooserWidget_t.prototype.LIMIT_COLOUR=[];
colourChooserWidget_t.prototype.LIMIT_COLOUR[0]=[];
colourChooserWidget_t.prototype.LIMIT_COLOUR[0][0]="rgb( 0, 0, 0 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[0][1]="rgb( 99, 99, 99 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[0][2]="rgb( 222, 222, 222 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[0][3]="rgb( 254, 254, 254 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[1]=[];
colourChooserWidget_t.prototype.LIMIT_COLOUR[1][0]="rgb( 255, 0, 0 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[1][1]="rgb( 255, 100, 0 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[1][2]="rgb( 150, 150, 0 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[1][3]="rgb( 255, 255, 0 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[2]=[];
colourChooserWidget_t.prototype.LIMIT_COLOUR[2][0]="rgb( 0, 255, 0 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[2][1]="rgb( 0, 255, 100 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[2][2]="rgb( 0, 150, 150 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[2][3]="rgb( 0, 255, 255 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[3]=[];
colourChooserWidget_t.prototype.LIMIT_COLOUR[3][0]="rgb( 0, 0, 255 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[3][1]="rgb( 100, 0, 255 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[3][2]="rgb( 150, 0, 150 )";
colourChooserWidget_t.prototype.LIMIT_COLOUR[3][3]="rgb( 255, 0, 255 )";
colourChooserWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.CLICK_EVENT;
colourChooserWidget_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("colourChooserWidget_c",ex);
}
function colourChooserWidget_t(_1,_2,_3,_4,_5,_6,_7){
try{
this.colourChooserWidget_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.selectedColour=null;
this.width=_4;
this.height=_5;
this.redCoverage=this.DEFAULT_RED_COVERAGE;
this.greenCoverage=this.DEFAULT_GREEN_COVERAGE;
this.blueCoverage=this.DEFAULT_BLUE_COVERAGE;
this.settingNotifyPanelOfEvent=false;
this.maxColourRange=255;
this.minColourRange=0;
if(!_7){
this.createDom(_2,_3,_6);
}
}
catch(ex){
jsExDebug("colourChooserWidget_t",ex);
}
}
function colourChooserWidget_cleanUp(me){
try{
if(!me){
me=this;
}
me.selectedColour=null;
me.redCoverage=null;
me.greenCoverage=null;
me.blueCoverage=null;
me.maxColourRange=null;
me.minColourRange=null;
me.cellsWide=null;
me.cellsHigh=null;
if(me.tableElement){
for(var i=0;i<me.tableElement.rows.length;i++){
var _a=me.tableElement.rows[i];
for(var j=0;j<_a.cells.length;j++){
var _c=_a.cells[j];
if(_c){
me.SYSTEM.Event.detachEvent(_c,"onclick","click");
}
}
}
me.SYSTEM.Dom.freeDom(me.tableElement);
}else{
if(me.dynamicTableElement){
for(var i=0;i<me.dynamicTableElement.rows.length;i++){
var _a=me.dynamicTableElement.rows[i];
for(var j=0;j<_a.cells.length;j++){
var _c=_a.cells[j];
if(_c){
_c.cellRed=null;
_c.cellGreen=null;
_c.cellBlue=null;
if(_c.widgetReference){
_c.widgetReference.cleanUp();
_c.widgetReference=null;
}
}
}
}
me.SYSTEM.Dom.freeDom(me.dynamicTableElement);
}
}
me.LIMIT_COLOUR=null;
me.tableElement=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("colourChooserWidget_cleanUp",ex);
}
}
function colourChooserWidget_createDom(_d,_e,_f){
try{
if(_f){
this.cellsWide=this.LIMIT_WIDTH;
this.cellsHigh=this.LIMIT_HEIGHT;
this.generateTableElement();
}else{
this.cellsWide=_d;
this.cellsHigh=_e;
this.generateDynamicTableElement2();
}
}
catch(ex){
jsExDebug("colourChooserWidget_createDom",ex);
}
}
function colourChooserWidget_setSelectedColour(_10){
try{
this.selectedColour=_10;
}
catch(ex){
jsExDebug("colourChooserWidget_setSelectedColour",ex);
}
}
function colourChooserWidget_generateTableElement(){
try{
this.tableElement=document.createElement("table");
this.tableElement.width=this.width;
this.tableElement.height=this.height;
var _11=this.width/this.cellsWide;
var _12=this.height/this.cellsHigh;
for(var y=0;y<this.cellsHigh;y++){
var row=this.tableElement.insertRow(y);
for(var x=0;x<this.cellsWide;x++){
var _16=row.insertCell(x);
_16.style.backgroundColor=this.LIMIT_COLOUR[y][x];
_16.style.border="solid 1px black";
_16.style.cursor="pointer";
_16.width=_11+"px";
_16.height=_12+"px";
this.SYSTEM.Event.attachEvent(_16,"onclick","click",this.cellClickEvent,this,true,_16.style.backgroundColor);
}
}
this.widgetElement.appendChild(this.tableElement);
}
catch(ex){
jsExDebug("colourChooserWidget_generateTableElement",ex);
}
}
function colourChooserWidget_generateDynamicTableElement(){
try{
this.redDecrement=parseInt(this.maxColourRange/this.cellsHigh);
this.greenDecrement=parseInt(this.maxColourRange/this.cellsHigh);
this.blueDecrement=parseInt(this.maxColourRange/this.cellsHigh);
this.toneDecrement=parseInt(this.maxColourRange/this.cellsHigh);
this.dynamicTableElement=document.createElement("table");
this.dynamicTableElement.style.width=this.width;
this.dynamicTableElement.style.height=this.height;
this.dynamicTableElement.cellSpacing="0";
this.dynamicTableElement.cellPadding="0";
var _17=this.width/this.cellsWide;
var _18=this.height/this.cellsHigh;
for(var y=0;y<this.cellsHigh;y++){
var row=this.dynamicTableElement.insertRow(y);
for(var x=0;x<this.cellsWide;x++){
var _1c=row.insertCell(x);
_1c.style.width=_17+"px";
_1c.style.height=_18+"px";
_1c.style.padding="0px";
_1c.style.margin="0px";
if(y==0){
_1c.cellRed=this.maxColourRange-(x*this.redDecrement);
_1c.cellGreen=this.maxColourRange-((this.cellsHigh-1-x)*this.greenDecrement);
_1c.cellBlue=this.maxColourRange-((this.cellsHigh-1)*this.blueDecrement);
}else{
if(x==0){
_1c.cellRed=this.maxColourRange-(y*this.redDecrement);
_1c.cellGreen=this.dynamicTableElement.rows[y-1].cells[x+1].cellGreen-this.greenDecrement;
_1c.cellBlue=this.maxColourRange-((this.cellsHigh-1-y)*this.blueDecrement);
}else{
if(x==this.cellsWide-1){
_1c.cellGreen=this.maxColourRange-(y*this.greenDecrement);
_1c.cellRed=this.dynamicTableElement.rows[y-1].cells[x-1].cellRed-this.redDecrement;
_1c.cellBlue=this.maxColourRange-((this.cellsHigh-1)*this.blueDecrement);
}else{
if(y>0&&x>0){
_1c.cellRed=this.dynamicTableElement.rows[y-1].cells[x-1].cellRed-this.redDecrement;
_1c.cellGreen=this.dynamicTableElement.rows[y-1].cells[x+1].cellGreen-this.greenDecrement;
_1c.cellBlue=this.dynamicTableElement.rows[y-1].cells[x+1].cellBlue+this.blueDecrement;
}
}
}
}
var _1d="rgb("+(_1c.cellRed)+", "+(_1c.cellGreen)+", "+(_1c.cellBlue)+")";
var _1e=new this.SYSTEM.Widget.Button();
_1e.makeRelativePositioned();
_1e.setPosition(0,0);
_1e.setDimensions(_17,_18);
_1e.setImage("img/site/global/pixel_off.png");
_1e.imageElement.style.opacity=0;
_1e.imageElement.style.filter="alpha(opacity=0)";
_1e.widgetElement.style.backgroundColor=_1d;
_1e.setValue(_1d);
_1e.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.clickEvent));
_1e.attach(_1c);
_1c.widgetReference=_1e;
}
}
this.widgetElement.appendChild(this.dynamicTableElement);
}
catch(ex){
jsExDebug("colourChooserWidget_generateDynamicTableElement",ex);
}
}
function colourChooserWidget_generateDynamicTableElement2(){
try{
this.dynamicTableElement=document.createElement("table");
this.dynamicTableElement.style.width=this.width;
this.dynamicTableElement.style.height=this.height;
this.dynamicTableElement.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
this.dynamicTableElement.cellSpacing="0";
this.dynamicTableElement.cellPadding="0";
var _1f=this.width/this.cellsWide;
var _20=this.height/this.cellsHigh;
var _21=this.cellsWide/2;
var _22=this.cellsHigh/2;
if(_21%2!=0){
_21--;
}
if(_22%2!=0){
_22--;
}
for(var y=0;y<this.cellsHigh;y++){
var row=this.dynamicTableElement.insertRow(y);
for(var x=0;x<this.cellsWide;x++){
var _26=row.insertCell(x);
_26.style.width=_1f+"px";
_26.style.height=_20+"px";
_26.style.padding="0px";
_26.style.margin="0px";
var _27=null;
var _28=null;
var _29=null;
if(y==(this.cellsHigh-1)){
_27=parseInt((x/(this.cellsWide-1))*this.maxColourRange);
_28=_27;
_29=_27;
}else{
if(x<=_21){
if(y<=_22){
_27=parseInt(this.maxColourRange*(x/_21));
_28=parseInt(this.maxColourRange*(y/_22));
_29=this.maxColourRange;
}else{
_27=parseInt(this.maxColourRange*(x/_21));
_28=this.maxColourRange;
_29=parseInt(this.maxColourRange*(1-((y-_22)/_22)));
}
}else{
_27=this.maxColourRange;
var _2a=null;
var _2b=null;
if(y<=_22){
var _2c=this.cellsWide-_21;
var _2d=_22;
var _2e=parseInt(this.maxColourRange*(y/_2d));
var _2f=parseInt(this.maxColourRange*(1-((x-_2c)/_2c)));
_28=(_2e>_2f?_2f:_2e);
_29=_2f;
}else{
var _2c=this.cellsWide-_21;
var _2d=this.cellsHigh-_22;
var _30=parseInt(this.maxColourRange*(1-((y-_2d)/_2d)));
var _31=parseInt(this.maxColourRange*(1-((x-_2c)/_2c)));
_29=(_30>_31?_31:_30);
_28=_31;
}
}
}
var _32="rgb("+_27+","+_28+","+_29+")";
var _33=new this.SYSTEM.Widget.Button();
_33.makeRelativePositioned();
_33.setPosition(0,0);
_33.setDimensions(_1f,_20);
_33.setImage("img/site/global/pixel_off.png");
_33.imageElement.style.opacity=0;
_33.imageElement.style.filter="alpha(opacity=0)";
_33.widgetElement.style.backgroundColor=_32;
_33.setValue(_32);
_33.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.clickEvent));
_33.attach(_26);
_26.widgetReference=_33;
}
}
this.widgetElement.appendChild(this.dynamicTableElement);
}
catch(ex){
jsExDebug("colourChooserWidget_generateDynamicTableElement2",ex);
}
}
function colourChooserWidget_clickEvent(_34,_35){
try{
this.selectedColour=_35.getValue();
this.fireEvent(this.SYSTEM.Event.CLICK_EVENT,_34);
}
catch(ex){
jsExDebug("colourChooserWidget_clickEvent",ex);
}
}
function colourChooserWidget_cellClickEvent(_36,me,_38){
try{
me.selectedColour=_38;
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_36);
}
catch(ex){
jsExDebug("colourChooserWidget_cellClickEvent",ex);
}
}

try{
widgetToolgroup_t.prototype=new widget_t();
widgetToolgroup_t.prototype.widgetToolgroup_super=widget_t.prototype.constructor;
widgetToolgroup_t.prototype.constructor=widgetToolgroup_t;
widgetToolgroup_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetToolgroup_t.prototype.cleanUp=widgetToolgroup_cleanUp;
widgetToolgroup_t.prototype.createDom=widgetToolgroup_createDom;
widgetToolgroup_t.prototype.bindEvents=widgetToolgroup_bindEvents;
widgetToolgroup_t.prototype.setDimensions=widgetToolgroup_setDimensions;
widgetToolgroup_t.prototype.allowLabel=widgetToolgroup_allowLabel;
widgetToolgroup_t.prototype.allowOverflow=widgetToolgroup_allowOverflow;
widgetToolgroup_t.prototype.allowBorder=widgetToolgroup_allowBorder;
widgetToolgroup_t.prototype.disallowBorder=widgetToolgroup_disallowBorder;
widgetToolgroup_t.prototype.addWidget=widgetToolgroup_addWidget;
widgetToolgroup_t.prototype.addDomElement=widgetToolgroup_addDomElement;
widgetToolgroup_t.prototype.setWidgetPosition=widgetToolgroup_setWidgetPosition;
widgetToolgroup_t.prototype.highlight=widgetToolgroup_highlight;
widgetToolgroup_t.prototype.dim=widgetToolgroup_dim;
widgetToolgroup_t.prototype.cleanUpWidgetArray=widgetToolgroup_cleanUpWidgetArray;
widgetToolgroup_t.prototype.mouseOverEvent=widgetToolgroup_mouseOverEvent;
widgetToolgroup_t.prototype.mouseExitEvent=widgetToolgroup_mouseExitEvent;
widgetToolgroup_t.prototype.DEFAULT_WIDTH=400;
widgetToolgroup_t.prototype.DEFAULT_HEIGHT=84;
widgetToolgroup_t.prototype.LABEL_HEIGHT=15;
widgetToolgroup_t.prototype.DEFAULT_BORDER_COLOUR="#606060";
widgetToolgroup_t.prototype.DEFAULT_BORDER_COLOUR_HIGHLIGHT="#000066";
widgetToolgroup_t.prototype.LABEL_TEXT_COLOUR="rgb(100, 100, 100)";
widgetToolgroup_t.prototype.LABEL_TEXT_COLOUR="#606060";
widgetToolgroup_t.prototype.LABEL_TEXT_COLOUR_HIGHLIGHT="#000066";
widgetToolgroup_t.prototype.HOVER_BG="url('img/app/system/panel/toolgroup_on.png') repeat-x";
widgetToolgroup_t.prototype.NO_HOVER_BG="url('img/app/system/panel/toolgroup_off.png') repeat-x";
widgetToolgroup_t.prototype.LABEL_BACKGROUND_COLOR="#d8e0e9";
widgetToolgroup_t.prototype.LABEL_BACKGROUND_COLOR_HIGHLIGHT="#d9ecff";
widgetToolgroup_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.LIST_ITEM_ENTER_EVENT,SYSTEM.Event.LIST_ITEM_EXIT_EVENT];
}
catch(ex){
jsExDebug("widgetToolgroup_t.prototype",ex);
}
function widgetToolgroup_t(_1,_2,_3,_4,_5){
try{
this.widgetToolgroup_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.buttonObjectArray=[];
this.widgetArray=[];
this.domArray=[];
if(!_5){
this.createDom(_2,_3,_4);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetToolgroup_t",ex);
}
}
function widgetToolgroup_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.contentElement,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.contentElement,"onmouseout","mouseout");
for(var i=0;i<me.buttonObjectArray.length;i++){
me.buttonObjectArray[i]=null;
delete me.buttonObjectArray[i];
}
me.cleanUpWidgetArray();
me.buttonObjectArray=null;
me.contentElement=null;
me.leftDiv=null;
me.rightDiv=null;
me.labelElement=null;
me.widget_cleanUp();
}
catch(ex){
onErrorResumeNext("u9pjmse "+ex);
}
}
function widgetToolgroup_createDom(_8,_9,_a){
try{
if(_8){
this.width=_8;
this.widgetElement.style.width=this.width+"px";
}else{
this.width=this.DEFAULT_WIDTH;
this.widgetElement.style.width=this.width+"px";
}
if(_9){
this.height=_9;
this.widgetElement.style.height=this.height+"px";
}else{
this.height=this.DEFAULT_HEIGHT;
this.widgetElement.style.height=this.height+"px";
}
this.widgetElement.style.overflow="hidden";
if(_a){
this.widgetElement.style.zIndex=_a;
}
this.leftDiv=this.SYSTEM.Dom.createClassElement("div","toolgroup_left",false);
this.rightDiv=this.SYSTEM.Dom.createClassElement("div","toolgroup_right",false);
this.contentElement=this.SYSTEM.Dom.createClassElement("div","toolgroup_background","absolute");
this.contentElement.style.width=this.width+"px";
this.contentElement.style.height=this.height+"px";
this.widgetElement.appendChild(this.leftDiv);
this.widgetElement.appendChild(this.contentElement);
this.widgetElement.appendChild(this.rightDiv);
this.SYSTEM.Dom.setElementClass(this.widgetElement,"toolgroup");
}
catch(ex){
jsExDebug("widgetToolgroup_createDom",ex);
}
}
function widgetToolgroup_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.contentElement,"onmouseover","mouseover",this.mouseOverEvent,this,false);
this.SYSTEM.Event.attachEvent(this.contentElement,"onmouseout","mouseout",this.mouseExitEvent,this,false);
}
catch(ex){
jsExDebug("widgetToolgroup_bindEvents",ex);
}
}
function widgetToolgroup_setDimensions(_b,_c){
try{
if(_b){
this.width=_b;
this.widgetElement.style.width=(this.width+this.leftDiv.clientWidth+this.rightDiv.clientWidth)+"px";
}else{
this.width=this.DEFAULT_WIDTH;
this.widgetElement.style.width=(this.width+this.leftDiv.clientWidth+this.rightDiv.clientWidth)+"px";
}
if(_c){
this.height=_c;
this.widgetElement.style.height=this.height+"px";
}else{
this.height=this.DEFAULT_HEIGHT;
this.widgetElement.style.height=this.height+"px";
}
this.contentElement.style.width=this.width+"px";
this.contentElement.style.height=this.height+"px";
}
catch(ex){
jsExDebug("widgetToolgroup_setDimensions",ex);
}
}
function widgetToolgroup_allowLabel(_d){
try{
this.labelElement=this.SYSTEM.Dom.createClassElement("div","labelDiv","absolute");
this.labelElement.style.left="0px";
this.labelElement.style.bottom="0px";
this.labelElement.style.width=this.width+"px";
this.labelElement.style.height=this.LABEL_HEIGHT+"px";
this.labelElement.style.textAlign="center";
this.labelElement.innerHTML=_d;
this.labelElement.style.verticalAlign="middle";
this.contentElement.appendChild(this.labelElement);
}
catch(ex){
jsExDebug("widgetToolgroup_allowLabel",ex);
}
}
function widgetToolgroup_allowOverflow(){
try{
this.widgetElement.style.overflow="visible";
}
catch(ex){
jsExDebug("widgetToolgroup_allowOverflow",ex);
}
}
function widgetToolgroup_allowBorder(_e){
try{
this.widgetElement.style.border="solid 1px "+_e;
}
catch(ex){
jsExDebug("widgetToolgroup_allowBorder",ex);
}
}
function widgetToolgroup_disallowBorder(){
try{
this.widgetElement.style.border="none";
}
catch(ex){
jsExDebug("widgetToolgroup_disallowBorder",ex);
}
}
function widgetToolgroup_addWidget(_f,_10,_11,_12,_13,_14){
try{
var _15=this.widgetArray.length;
if(_10!=null&&_11!=null){
_f.setPosition(_10,_11,_12,_13);
}else{
var _16=0;
var _17=0;
var _18=false;
var _19=0;
while(!_18){
for(var i=0;i<this.widgetArray.length;i++){
var _1b=this.widgetArray[i];
if(_1b){
var _1c=(_1b.positionX);
var top=(_1b.positionY);
_1c=(_1b.fromRight?this.width-(_1c+_1b.width):_1c);
top=(_1b.fromBottom?this.height-(top+_1b.height):top);
var _1e=_16+_f.width;
var _1f=_17+_f.height;
if((_1c>=_16)&&(_1c<=_1e)&&(top>=_17)&&(top<=_1f)){
continue;
}
_19++;
}
}
if(_19==this.widgetArray.length){
_18=true;
_10=_16;
_11=_17;
}else{
var _20=_16+_f.width;
var _21=_17;
var _22=_20+_f.width;
if(_22>this.width){
this.setDimensions(this.width+_f.width,this.height);
_16=_20;
_17=_21;
}else{
_16=_20;
_17=_21;
}
}
_19=0;
}
_f.setPosition(_10,_11);
}
this.widgetArray[_15]=_f;
_f.attach(this.contentElement);
}
catch(ex){
jsExDebug("widgetToolgroup_addWidget",ex);
}
}
function widgetToolgroup_addDomElement(_23,_24,_25,_26,_27){
try{
if(!_26){
_23.style.left=_24+"px";
}else{
_23.style.right=_24+"px";
}
if(!_27){
_23.style.top=_25+"px";
}else{
_23.style.bottom=_25+"px";
}
this.contentElement.appendChild(_23);
var _28=this.domArray.length;
this.domArray[_28]=_23;
_23.highlightToolgroup=this.name;
return _28;
}
catch(ex){
jsExDebug("widgetToolgroup_addDomElement",ex);
}
}
function widgetToolgroup_setWidgetPosition(_29,_2a,_2b,_2c,_2d){
try{
this.widgetArray[_29].setPosition(_2a,_2b,_2c,_2d);
}
catch(ex){
jsExDebug("widgetToolgroup_setWidgetPosition",ex);
}
}
function widgetToolgroup_highlight(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"toolgroup hover");
}
catch(ex){
jsExDebug("widgetToolgroup_highlight",ex);
}
}
function widgetToolgroup_dim(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"toolgroup");
}
catch(ex){
jsExDebug("widgetToolgroup_dim",ex);
}
}
function widgetToolgroup_cleanUpWidgetArray(){
try{
var _2e=0;
for(var j=0;j<this.widgetArray.length;j++){
if(this.widgetArray[j]){
this.widgetArray[j].cleanUp();
this.widgetArray[j]=null;
delete this.widgetArray[j];
_2e++;
}
}
this.widgetArray=null;
for(var k=0;k<this.domArray.length;k++){
if(this.domArray[k]){
this.domArray[k]=null;
}
}
this.domArray=null;
return _2e;
}
catch(ex){
jsExDebug("widgetToolgroup_cleanUpWidgetArray",ex);
}
}
function widgetToolgroup_mouseOverEvent(_31,me){
try{
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_ENTER_EVENT,_31);
}
catch(ex){
jsExDebug("widgetToolgroup_mouseOverEvent",ex);
}
}
function widgetToolgroup_mouseExitEvent(_33,me){
try{
var _35=(_33.relatedTarget?_33.relatedTarget:_33.toElement);
if(!me.SYSTEM.Dom.elementIsChildOf(_35,me.contentElement)){
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_EXIT_EVENT,_33);
}
}
catch(ex){
jsExDebug("widgetToolgroup_mouseExitEvent",ex);
}
}

try{
widgetSwitcher_t.prototype=new widget_t();
widgetSwitcher_t.prototype.widgetSwitcher_super=widget_t.prototype.constructor;
widgetSwitcher_t.prototype.constructor=widgetSwitcher_t;
widgetSwitcher_t.prototype.cleanUp=widgetSwitcher_cleanUp;
widgetSwitcher_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetSwitcher_t.prototype.createDom=widgetSwitcher_createDom;
widgetSwitcher_t.prototype.bindEvents=widgetSwitcher_bindEvents;
widgetSwitcher_t.prototype.addPlaceholder=widgetSwitcher_addPlaceholder;
widgetSwitcher_t.prototype.fillPlaceholder=widgetSwitcher_fillPlaceholder;
widgetSwitcher_t.prototype.addWidget=widgetSwitcher_addWidget;
widgetSwitcher_t.prototype.showWidget=widgetSwitcher_showWidget;
widgetSwitcher_t.prototype.hideWidget=widgetSwitcher_hideWidget;
widgetSwitcher_t.prototype.removeWidget=widgetSwitcher_removeWidget;
widgetSwitcher_t.prototype.getWidget=widgetSwitcher_getWidget;
}
catch(ex){
jsExDebug("widgetSwitcher_t.prototype",ex);
}
function widgetSwitcher_t(_1,_2){
try{
this.widgetSwitcher_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.widgetList=[];
this.currentAttachedWidget=null;
this.currentAttachedIndex=null;
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetSwitcher_t",ex);
}
}
function widgetSwitcher_cleanUp(me){
try{
if(!me){
me=this;
}
me.currentAttachedWidget=null;
me.currentAttachedIndex=null;
for(var i=0;i<me.widgetList.length;i++){
if(me.widgetList[i]){
me.widgetList[i].cleanUp();
me.widgetList[i]=null;
delete me.widgetList[i];
}
}
me.widgetList=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetSwitcher_cleanUp",ex);
}
}
function widgetSwitcher_createDom(_5){
try{
}
catch(ex){
jsExDebug("widgetSwitcher_createDom",ex);
}
}
function widgetSwitcher_bindEvents(_6){
try{
}
catch(ex){
jsExDebug("widgetSwitcher_bindEvents",ex);
}
}
function widgetSwitcher_addPlaceholder(){
try{
var _7=this.widgetList.length;
this.widgetList[_7]=null;
return _7;
}
catch(ex){
jsExDebug("widgetSwitcher_addPlaceholder",ex);
}
}
function widgetSwitcher_fillPlaceholder(_8,_9){
try{
this.widgetList[_8]=_9;
if(_9.width&&_9.width>this.width){
this.width=_9.width;
}
}
catch(ex){
jsExDebug("widgetSwitcher_fillPlaceholder",ex);
}
}
function widgetSwitcher_addWidget(_a){
try{
var _b=this.widgetList.length;
this.widgetList[_b]=_a;
_a.setContainerObject(this);
if(_a.width&&_a.width>this.width){
this.width=_a.width;
}
return _b;
}
catch(ex){
jsExDebug("widgetSwitcher_addWidget",ex);
}
}
function widgetSwitcher_showWidget(_c){
try{
if(this.widgetList[_c]){
this.widgetList[_c].attach(this.widgetElement);
this.currentAttachedWidget=this.widgetList[_c];
this.currentAttachedIndex=_c;
}
}
catch(ex){
jsExDebug("widgetSwitcher_showWidget",ex);
}
}
function widgetSwitcher_hideWidget(){
try{
if(this.currentAttachedWidget){
this.currentAttachedWidget.detach();
this.currentAttachedWidget=null;
this.currentAttachedIndex=null;
}
}
catch(ex){
jsExDebug("widgetSwitcher_hideAll",ex);
}
}
function widgetSwitcher_removeWidget(_d){
try{
if(this.widgetList[_d]){
if(this.currentAttachedWidget==this.widgetList[_d]){
this.currentAttachedWidget=null;
this.currentAttachedIndex=null;
}
this.widgetList[_d].cleanUp();
this.widgetList[_d]=null;
delete this.widgetList[_d];
}
}
catch(ex){
jsExDebug("widgetSwitcher_removeWidget",ex);
}
}
function widgetSwitcher_getWidget(_e){
try{
return this.widgetList[_e];
}
catch(ex){
jsExDebug("widgetSwitcher_getWidget",ex);
}
}

try{
widgetPanel_t.prototype=new widget_t();
widgetPanel_t.prototype.widgetPanel_super=widget_t.prototype.constructor;
widgetPanel_t.prototype.constructor=widgetPanel_t;
widgetPanel_t.prototype.cleanUp=widgetPanel_cleanUp;
widgetPanel_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetPanel_t.prototype.createDom=widgetPanel_createDom;
widgetPanel_t.prototype.addApplicationPanel=widgetPanel_addApplicationPanel;
widgetPanel_t.prototype.removeApplicationPanel=widgetPanel_removeApplicationPanel;
widgetPanel_t.prototype.show=widgetPanel_show;
widgetPanel_t.prototype.fitToScreenWidth=widgetPanel_fitToScreenWidth;
widgetPanel_t.prototype.getHeight=widgetPanel_getHeight;
widgetPanel_t.prototype.MAIN_MENU_LEFT=15;
widgetPanel_t.prototype.MAIN_MENU_TOP=0;
widgetPanel_t.prototype.SWITCHER_LEFT=0;
widgetPanel_t.prototype.SWITCHER_TOP=0;
}
catch(ex){
jsExDebug("widgetPanel_t.prototype",ex);
}
function widgetPanel_t(_1,_2){
try{
this.widgetPanel_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.currentPanelIndex=null;
this.calculatedHeight=null;
this.runIdArray=[];
this.numberOfApplications=0;
this.windowResizeIndex=this.SYSTEM.Event.notifyWindowResize(new this.SYSTEM.Delegate(this,this.fitToScreenWidth));
if(!_2){
this.createDom();
}
}
catch(ex){
jsExDebug("widgetPanel_t",ex);
}
}
function widgetPanel_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.removeWindowResizeHandler(me.windowResizeIndex);
me.windowResizeIndex=null;
for(var i=0;i<me.runIdArray.length;i++){
me.runIdArray[i]=null;
delete me.runIdArray[i];
}
me.runIdArray=null;
me.currentPanelIndex=null;
me.calculatedHeight=null;
me.panelSwitcher.cleanUp();
me.panelSwitcher=null;
if(me==SYSTEM.Panel){
SYSTEM.Panel=null;
}
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetPanel_cleanUp",ex);
}
}
function widgetPanel_createDom(){
try{
this.setDimensions(this.SYSTEM.Environment.SCREEN_WIDTH,0);
this.widgetElement.style.zIndex=PANEL_ZINDEX;
this.panelSwitcher=new this.SYSTEM.Widget.Switcher("panelSwitcher");
this.panelSwitcher.setPosition(this.SWITCHER_LEFT,this.SWITCHER_TOP);
this.panelSwitcher.attach(this.widgetElement);
}
catch(ex){
jsExDebug("widgetPanel_createDom",ex);
}
}
function widgetPanel_addApplicationPanel(_5,_6){
try{
this.runIdArray[_6]=this.panelSwitcher.addWidget(_5);
this.numberOfApplications++;
}
catch(ex){
jsExDebug("widgetPanel_addApplicationPanel",ex);
}
}
function widgetPanel_removeApplicationPanel(_7){
try{
this.panelSwitcher.removeWidget(this.runIdArray[_7]);
this.runIdArray[_7]=null;
delete this.runIdArray[_7];
this.numberOfApplications--;
}
catch(ex){
jsExDebug("widgetPanel_removeApplicationPanel",ex);
}
}
function widgetPanel_show(_8){
try{
var _9=this.runIdArray[_8];
if(this.currentPanelIndex==_9||!this.panelSwitcher){
return;
}
this.panelSwitcher.hideWidget();
this.panelSwitcher.showWidget(_9);
this.currentPanelIndex=_9;
var _a=this.panelSwitcher.getWidget(_9);
if(_a&&!_a.getSelectedTab()){
var _b=_a.getDefaultTab();
if(_b){
_a.showTab(_b.name);
}
}
_a.updatePosition();
}
catch(ex){
jsExDebug("widgetPanel_show",ex);
}
}
function widgetPanel_fitToScreenWidth(_c){
try{
if(!_c){
_c=this.SYSTEM.Environment.SCREEN_WIDTH;
}
var _d=_c-this.panelSwitcher.positionX;
for(var i=0;i<this.runIdArray.length;i++){
if(this.runIdArray[i]!=null){
var _f=this.panelSwitcher.getWidget(this.runIdArray[i]);
_f.setWidth(_d);
}
}
}
catch(ex){
jsExDebug("widgetPanel_fitToScreenWidth",ex);
}
}
function widgetPanel_getHeight(){
try{
if(!this.calculatedHeight){
var _10=this.panelSwitcher.getWidget(this.currentPanelIndex);
if(_10){
var _11=_10.tabList.getHeight();
var _12=this.SYSTEM.Style.TEXT_BTN_HEIGHT+2;
var _13=(_11<_12?_12:_11);
if(_11){
this.calculatedHeight=_10.HEIGHT+_13;
}else{
return _10.HEIGHT+_13;
}
}else{
return 0;
}
}
return this.calculatedHeight;
}
catch(ex){
jsExDebug("widgetPanel_getHeight",ex);
}
}

try{
panelObject_t.prototype=new widget_t();
panelObject_t.prototype.constructor=panelObject_t;
panelObject_t.prototype.panelObject_super=widget_t.prototype.constructor;
panelObject_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
panelObject_t.prototype.cleanUp=panelObject_cleanUp;
panelObject_t.prototype.createDom=panelObject_createDom;
panelObject_t.prototype.bindEvents=panelObject_bindEvents;
panelObject_t.prototype.addTab=panelObject_addTab;
panelObject_t.prototype.addUtility=panelObject_addUtility;
panelObject_t.prototype.insertToolgroup=panelObject_insertToolgroup;
panelObject_t.prototype.addToolgroup=panelObject_addToolgroup;
panelObject_t.prototype.addWidget=panelObject_addWidget;
panelObject_t.prototype.showTab=panelObject_showTab;
panelObject_t.prototype.getTab=panelObject_getTab;
panelObject_t.prototype.getSelectedTab=panelObject_getSelectedTab;
panelObject_t.prototype.getDefaultTab=panelObject_getDefaultTab;
panelObject_t.prototype.getToolgroup=panelObject_getToolgroup;
panelObject_t.prototype.setWidth=panelObject_setWidth;
panelObject_t.prototype.bindEventHandlers=panelObject_bindEventHandlers;
panelObject_t.prototype.updatePosition=panelObject_updatePosition;
panelObject_t.prototype.resizeAllToolgroups=panelObject_resizeAllToolgroups;
panelObject_t.prototype.bindEvent=panelObject_bindEvent;
panelObject_t.prototype.tabListItemSelectEvent=panelObject_tabListItemSelectEvent;
panelObject_t.prototype.toolgroupEnterEvent=panelObject_toolgroupEnterEvent;
panelObject_t.prototype.toolgroupExitEvent=panelObject_toolgroupExitEvent;
panelObject_t.prototype.START_SUBPANEL_NAME="start";
panelObject_t.prototype.SWITCHER_LEFT=0;
panelObject_t.prototype.SWITCHER_TOP=tabWidget_t.prototype.HEIGHT;
panelObject_t.prototype.UTILITY_LIST_LEFT=0;
panelObject_t.prototype.UTILITY_LIST_TOP=0;
panelObject_t.prototype.DEFAULT_TAB_LIST_LEFT=20;
panelObject_t.prototype.HEIGHT=90;
panelObject_t.prototype.TAB_LIST_PADDING=5;
panelObject_t.prototype.LIST_PADDING=20;
panelObject_t.prototype.TOOLBAR_VERTICAL_PADDING=2;
panelObject_t.prototype.MAX_TOOLGROUP_ZINDEX=200;
}
catch(ex){
jsExDebug("panelObject_t.prototype",ex);
}
function panelObject_t(_1,_2,_3,_4,_5){
try{
this.panelObject_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.application=_2;
this.subpanelArray=[];
this.utilityArray=[];
this.selectedSubpanel=null;
this.numberOfToolgroups=0;
this.highlightedToolgroup=null;
this.settingUseApplicationAd=false;
if(!_5){
this.createDom(_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("panelObject_t",ex);
}
}
function panelObject_cleanUp(me){
try{
if(!me){
var me=this;
}
me.application=null;
me.selectedSubpanel=null;
me.defaultSubpanel=null;
me.settingUseApplicationAd=null;
me.numberOfToolgroups=null;
me.highlightedToolgroup=null;
me.tabListLeft=null;
for(var i in me.subpanelArray){
var _8=me.subpanelArray[i];
if(!_8.name){
continue;
}
_8.name=null;
_8.index=null;
_8.toolbar=null;
_8.tabIndex=null;
_8.defaultToolgroup=null;
for(var j in _8.toolgroupArray){
_8.toolgroupArray[j]=null;
}
_8.toolgroupArray=null;
me.subpanelArray[i]=null;
delete me.subpanelArray[i];
}
me.subpanelArray=null;
for(var i=0;i<me.utilityArray.length;i++){
if(me.utilityArray[i]){
me.utilityArray[i]=null;
delete me.utilityArray[i];
}
}
me.utilityArray=null;
me.tabList.cleanUp();
me.utilityList.cleanUp();
me.toolbarSwitcher.cleanUp();
me.tabList=null;
me.utilityList=null;
me.toolbarSwitcher=null;
me.rightDiv=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("panelObject_cleanUp",ex);
}
}
function panelObject_createDom(_a){
try{
this.widgetElement.style.width=_a+"px";
this.width=_a;
var _b=new this.SYSTEM.Widget.ItemList("utilityList");
_b.setHorizontal();
_b.disallowBorder();
_b.disallowItemBorder();
_b.setPosition(this.UTILITY_LIST_LEFT,this.HEIGHT,false,true);
_b.attach(this.widgetElement);
this.utilityList=_b;
this.tabListLeft=this.DEFAULT_TAB_LIST_LEFT;
var _c=this.SYSTEM.Environment.SCREEN_WIDTH-(this.tabListLeft+this.positionX);
this.tabList=new this.SYSTEM.Widget.TabList("tabList",_c);
this.tabList.setPosition(this.tabListLeft,null);
this.tabList.disallowBorder();
this.tabList.disallowItemBorder();
var _d=new this.SYSTEM.Delegate(this,this.tabListItemSelectEvent);
this.tabList.notifyEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_d);
this.toolbarSwitcher=new this.SYSTEM.Widget.Switcher("toolbarSwitcher");
this.toolbarSwitcher.setPosition(this.SWITCHER_LEFT,null);
this.toolbarSwitcher.setDimensions(null,this.HEIGHT);
this.toolbarSwitcher.widgetElement.setAttribute("id","panel_left");
this.toolbarSwitcher.attach(this.widgetElement);
this.updatePosition();
var _e=new this.SYSTEM.Widget.Toolbar("toolbar_default");
_e.disallowBorder();
_e.disallowItemBorder();
_e.setVerticalPadding(this.TOOLBAR_VERTICAL_PADDING);
_e.setDimensions(_a-this.toolbarSwitcher.getClientWidth(),this.HEIGHT);
_e.widgetElement.setAttribute("id","panel");
var _f=this.SYSTEM.Dom.createDiv(false);
_f.setAttribute("id","panel_right");
this.rightDiv=_f;
this.toolbarSwitcher.widgetElement.appendChild(_f);
var _10=new this.SYSTEM.Widget.AdToolgroup(null,this.application);
_10.addEventHandler(this.SYSTEM.Event.LIST_ITEM_ENTER_EVENT,new this.SYSTEM.Delegate(this,this.toolgroupEnterEvent));
_10.addEventHandler(this.SYSTEM.Event.LIST_ITEM_EXIT_EVENT,new this.SYSTEM.Delegate(this,this.toolgroupExitEvent));
_e.addTool(_10);
var _11=this.toolbarSwitcher.addWidget(_e);
this.tabList.attach(this.widgetElement);
var _12={};
_12.name=this.START_SUBPANEL_NAME;
_12.index=_11;
_12.toolbar=_e;
_12.tabIndex=null;
_12.toolgroupArray=[];
_12.defaultToolgroup=null;
this.subpanelArray[_12.name]=_12;
}
catch(ex){
jsExDebug("panelObject_createDom",ex);
}
}
function panelObject_bindEvents(_13){
try{
}
catch(ex){
jsExDebug("panelObject_bindEvents",ex);
}
}
function panelObject_addTab(_14){
try{
var _15=new this.SYSTEM.Widget.Toolbar("toolbar_"+_14);
_15.disallowBorder();
_15.disallowItemBorder();
_15.setVerticalPadding(this.TOOLBAR_VERTICAL_PADDING);
_15.setDimensions(this.width-this.toolbarSwitcher.getClientWidth(),this.HEIGHT);
_15.widgetElement.setAttribute("id","panel");
var _16=new this.SYSTEM.Widget.AdToolgroup(null,this.application);
_16.addEventHandler(this.SYSTEM.Event.LIST_ITEM_ENTER_EVENT,new this.SYSTEM.Delegate(this,this.toolgroupEnterEvent));
_16.addEventHandler(this.SYSTEM.Event.LIST_ITEM_EXIT_EVENT,new this.SYSTEM.Delegate(this,this.toolgroupExitEvent));
_15.addTool(_16);
var _17=this.toolbarSwitcher.addWidget(_15);
var _18=this.tabList.addTab(_14,true,_17);
var _19={};
_19.name=_14;
_19.index=_17;
_19.toolbar=_15;
_19.tabIndex=_18;
_19.toolgroupArray=[];
_19.defaultToolgroup=null;
this.subpanelArray[_14]=_19;
if(!this.defaultSubpanel){
this.defaultSubpanel=_19;
}
return _19;
}
catch(ex){
jsExDebug("panelObject_addTab",ex);
}
}
function panelObject_addUtility(_1a){
try{
var _1b=_1a.width+(this.utilityList.ITEM_HPADDING+this.utilityList.horizontalPadding)+this.TAB_LIST_PADDING;
this.utilityList.addWidget(this.utilityArray.length,_1a);
this.tabList.setPosition(this.tabList.positionX+_1b,this.tabList.positionY);
var _1c=this.getContainerObject();
var _1d=this.SYSTEM.Environment.SCREEN_WIDTH-(_1c.positionX+this.tabList.positionX+this.positionX);
this.tabList.setDimensions(_1d,this.tabList.height);
this.utilityArray.push(_1a);
this.bindEventHandlers(_1a);
}
catch(ex){
jsExDebug("panelObject_addUtility",ex);
}
}
function panelObject_insertToolgroup(_1e,_1f,_20){
try{
var _21=this.getTab(_1e);
if(!_21){
return;
}
if(_1f){
_21.toolbar.addTool(_1f,_20);
}
_21.toolbar.adjustWidth();
_1f.addEventHandler(this.SYSTEM.Event.LIST_ITEM_ENTER_EVENT,new this.SYSTEM.Delegate(this,this.toolgroupEnterEvent));
_1f.addEventHandler(this.SYSTEM.Event.LIST_ITEM_EXIT_EVENT,new this.SYSTEM.Delegate(this,this.toolgroupExitEvent));
if(_21.toolbar.width<this.width){
_21.toolbar.setWidth(this.width);
}
}
catch(ex){
jsExDebug("panelObject_insertToolgroup",ex);
}
}
function panelObject_addToolgroup(_22,_23,_24,_25){
try{
var _26=this.getTab(_24);
if(!_26){
_26=this.subpanelArray[this.START_SUBPANEL_NAME];
if(!this.defaultSubpanel){
this.defaultSubpanel=_26;
}
}
var _27=this.MAX_TOOLGROUP_ZINDEX-this.numberOfToolgroups;
var _28=new this.SYSTEM.Widget.Toolgroup("toolgroup_"+_22,_23,null,_27);
_28.allowOverflow();
_28.addEventHandler(this.SYSTEM.Event.LIST_ITEM_ENTER_EVENT,new this.SYSTEM.Delegate(this,this.toolgroupEnterEvent));
_28.addEventHandler(this.SYSTEM.Event.LIST_ITEM_EXIT_EVENT,new this.SYSTEM.Delegate(this,this.toolgroupExitEvent));
if(_22){
_28.allowLabel(_22);
}
var _29=_26.toolbar;
_29.addTool(_28,_25);
this.numberOfToolgroups++;
_29.adjustWidth();
if(_29.width<this.width){
_29.setWidth(this.width);
}
_26.toolgroupArray[_22]=_28;
if(!_26.defaultToolgroup){
_26.defaultToolgroup=_28;
}
return _28;
}
catch(ex){
jsExDebug("panelObject_addToolgroup",ex);
}
}
function panelObject_addWidget(_2a,_2b,_2c,_2d,_2e,_2f){
try{
var _30;
if(!_2d){
if(!this.defaultSubpanel){
this.addToolgroup();
}
_30=this.defaultSubpanel.defaultToolgroup;
}
for(var i in this.subpanelArray){
if(!this.subpanelArray[i].toolgroupArray){
continue;
}
if(this.subpanelArray[i].toolgroupArray[_2d]){
_30=this.subpanelArray[i].toolgroupArray[_2d];
}
}
if(!_30){
jsDebug("ERROR: no toolgroup found (panelObject_addWidget)");
return;
}
_30.addWidget(_2a,_2b,_2c,_2e,_2f);
this.bindEventHandlers(_2a);
_2a.setContainerObject(this);
}
catch(ex){
jsExDebug("panelObject_addWidget",ex);
}
}
function panelObject_showTab(_32){
try{
var _33=this.getTab(_32);
if(!_33){
return;
}
if(_32==this.START_SUBPANEL_NAME){
this.toolbarSwitcher.hideWidget();
this.toolbarSwitcher.showWidget(_33.index);
this.toolbarSwitcher.widgetElement.appendChild(this.rightDiv);
this.resizeAllToolgroups();
}else{
this.tabList.selectTab(_33.tabIndex);
}
this.selectedSubpanel=_33;
}
catch(ex){
jsExDebug("panelObject_showTab",ex);
}
}
function panelObject_getTab(_34){
try{
var _35;
if(this.subpanelArray[_34]){
_35=this.subpanelArray[_34];
}else{
for(var i in this.subpanelArray){
var _37=this.subpanelArray[i];
if(_37==_34){
_35=_37;
break;
}
}
}
return _35;
}
catch(ex){
jsExDebug("panelObject_getTab",ex);
}
}
function panelObject_getSelectedTab(){
try{
return this.selectedSubpanel;
}
catch(ex){
jsExDebug("panelObject_getSelectedTab",ex);
}
}
function panelObject_getDefaultTab(){
try{
if(this.defaultSubpanel){
return this.defaultSubpanel;
}else{
return this.subpanelArray[this.START_SUBPANEL_NAME];
}
}
catch(ex){
jsExDebug("panelObject_getDefaultTab",ex);
}
}
function panelObject_getToolgroup(_38){
try{
for(var i in this.subpanelArray){
if(!this.subpanelArray[i].toolgroupArray){
continue;
}
if(this.subpanelArray[i].toolgroupArray[_38]){
return this.subpanelArray[i].toolgroupArray[_38];
}
}
return null;
}
catch(ex){
jsExDebug("panelObject_getToolgroup",ex);
}
}
function panelObject_setWidth(_3a){
try{
if(!_3a||_3a<0){
return;
}
_3a-=this.toolbarSwitcher.getClientWidth();
for(var i in this.subpanelArray){
if(this.subpanelArray[i].toolbar){
this.subpanelArray[i].toolbar.setWidth(_3a);
}
}
this.tabList.setDimensions(this.SYSTEM.Environment.SCREEN_WIDTH-(this.tabListLeft+this.positionX));
this.widgetElement.style.width=_3a+"px";
this.width=_3a;
}
catch(ex){
jsExDebug("panelObject_setWidth",ex);
}
}
function panelObject_bindEventHandlers(_3c){
try{
var _3d=this.bindEvent(_3c.DEFAULT_EVENT);
_3c.notifyEvent(_3c.DEFAULT_EVENT,_3d);
for(var i=0;i<_3c.SUPPORTED_EVENTS.length;i++){
var _3f=this.bindEvent(_3c.SUPPORTED_EVENTS[i]);
_3c.notifyEvent(_3c.SUPPORTED_EVENTS[i],_3f);
}
}
catch(ex){
jsExDebug("panelObject_bindEventHandlers "+_3c.name,ex);
}
}
function panelObject_updatePosition(){
try{
var _40=this.tabList.getHeight();
var _41=this.SYSTEM.Style.TEXT_BTN_HEIGHT+2;
var _42=(_40<_41?_41:_40);
this.tabList.setPosition(null,_42-_40);
this.toolbarSwitcher.setPosition(null,_42);
this.widgetElement.style.height=(this.HEIGHT+_42)+"px";
}
catch(ex){
jsExDebug("panelObject_updatePosition",ex);
}
}
function panelObject_resizeAllToolgroups(){
try{
var _43=this.toolbarSwitcher.getWidget(this.toolbarSwitcher.currentAttachedIndex);
for(var i=0;i<_43.items.length;i++){
if(_43.items[i]){
var _45=_43.items[i].widgetObjectReference;
_45.setDimensions(_45.width,_45.height);
}
}
this.setWidth(this.SYSTEM.Environment.SCREEN_WIDTH);
}
catch(ex){
jsExDebug("panelObject_resizeAllToolgroups",ex);
}
}
function panelObject_bindEvent(_46){
function handler(_47,_48){
try{
var _49=this.SYSTEM.Event.getEventName(_46);
var _4a=this.application["binding_"+_48.name+"_"+_49];
if(_4a){
_4a.call(this.application,_48);
}
}
catch(ex){
jsExDebug("panelObject_bindEvent: handler",ex);
}
}
try{
return new this.SYSTEM.Delegate(this,handler);
}
catch(ex){
jsExDebug("panelObject_bindEvent",ex);
}
}
function panelObject_tabListItemSelectEvent(_4b,_4c,_4d){
try{
this.toolbarSwitcher.hideWidget();
this.toolbarSwitcher.showWidget(_4d);
this.toolbarSwitcher.widgetElement.appendChild(this.rightDiv);
this.resizeAllToolgroups();
}
catch(ex){
jsExDebug("panelObject_tabListItemSelectEvent",ex);
}
}
function panelObject_toolgroupEnterEvent(_4e,_4f){
try{
if(this.highlightedToolgroup){
this.highlightedToolgroup.dim();
}
_4f.highlight();
this.highlightedToolgroup=_4f;
}
catch(ex){
jsExDebug("panelObject_toolgroupEnterEvent",ex);
}
}
function panelObject_toolgroupExitEvent(_50,_51){
try{
if(this.highlightedToolgroup==_51){
this.highlightedToolgroup=null;
}
_51.dim();
}
catch(ex){
jsExDebug("panelObject_toolgroupExitEvent",ex);
}
}

try{
widgetCheckbox_t.prototype=new widget_t();
widgetCheckbox_t.prototype.widgetCheckbox_super=widget_t.prototype.constructor;
widgetCheckbox_t.prototype.constructor=widgetCheckbox_t;
widgetCheckbox_t.prototype.cleanUp=widgetCheckbox_cleanUp;
widgetCheckbox_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetCheckbox_t.prototype.createDom=widgetCheckbox_createDom;
widgetCheckbox_t.prototype.bindEvents=widgetCheckbox_bindEvents;
widgetCheckbox_t.prototype.isChecked=widgetCheckbox_isChecked;
widgetCheckbox_t.prototype.setCheckedState=widgetCheckbox_setCheckedState;
widgetCheckbox_t.prototype.highlight=widgetCheckbox_highlight;
widgetCheckbox_t.prototype.allowLabel=widgetCheckbox_allowLabel;
widgetCheckbox_t.prototype.disallowHighlight=widgetCheckbox_disallowHighlight;
widgetCheckbox_t.prototype.valueChangeEvent=widgetCheckbox_valueChangeEvent;
widgetCheckbox_t.prototype.LABEL_LEFT=1;
widgetCheckbox_t.prototype.LABEL_RIGHT=2;
widgetCheckbox_t.prototype.DEFAULT_EVENT=SYSTEM.Event.VALUE_CHANGED_EVENT;
widgetCheckbox_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("widgetCheckbox_t.prototype",ex);
}
function widgetCheckbox_t(_1,_2,_3){
try{
this.widgetCheckbox_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.settingAllowHighlight=true;
this.settingCheckboxOnly=_2;
if(!_3){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetCheckbox_t",ex);
}
}
function widgetCheckbox_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.checkboxElement,"onclick","click");
me.width=null;
me.checkboxElement=null;
me.labelElement=null;
me.settingAllowHighlight=null;
me.settingCheckboxOnly=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetCheckbox_cleanUp",ex);
}
}
function widgetCheckbox_createDom(){
try{
this.width=18;
var IE=this.SYSTEM.Environment.userAgentIsIE();
var _6=document.createElement("input");
_6.type="checkbox";
_6.style.border="";
_6.style.width=(IE?this.width:(this.width-4))+"px";
_6.style.height=(IE?this.width:(this.width-4))+"px";
_6.style.margin="0px 2px 0px 0px";
_6.style.padding="0px";
if(this.settingCheckboxOnly){
this.SYSTEM.Dom.freeDom(this.widgetElement);
this.widgetElement=_6;
}else{
_6.style.position="absolute";
_6.style.left="2px";
_6.style.top="2px";
this.widgetElement.style.width=this.width+"px";
this.widgetElement.style.height=this.width+"px";
this.widgetElement.appendChild(_6);
}
this.checkboxElement=_6;
}
catch(ex){
jsExDebug("widgetCheckbox_createDom",ex);
}
}
function widgetCheckbox_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.checkboxElement,"onclick","click",this.valueChangeEvent,this);
}
catch(ex){
jsExDebug("widgetCheckbox_bindEvents",ex);
}
}
function widgetCheckbox_isChecked(){
try{
return this.checkboxElement.checked;
}
catch(ex){
jsExDebug("widgetCheckbox_isChecked",ex);
}
}
function widgetCheckbox_setCheckedState(_7,_8){
try{
this.checkboxElement.checked=_7;
if(!_8){
this.valueChangeEvent(null,this);
}
}
catch(ex){
jsExDebug("widgetCheckbox_setCheckedState",ex);
}
}
function widgetCheckbox_highlight(_9){
try{
if(this.settingAllowHighlight){
if(this.settingCheckboxOnly){
}else{
this.widgetElement.style.backgroundColor=_9;
}
}
}
catch(ex){
jsExDebug("widgetCheckbox_highlight",ex);
}
}
function widgetCheckbox_allowLabel(_a,_b,_c){
try{
if(this.settingCheckboxOnly){
return;
}
this.labelElement=document.createElement("span");
this.labelElement.style.position="absolute";
this.labelElement.style.top=this.checkboxElement.style.top;
if(_c){
this.labelElement.style.width=_c+"px";
}else{
this.labelElement.style.width="100px";
_c=100;
}
switch(_b){
case this.LABEL_LEFT:
this.labelElement.style.left="0px";
this.checkboxElement.style.left=(_c+4)+"px";
break;
case this.LABEL_RIGHT:
this.labelElement.style.left=(this.width+4)+"px";
break;
}
if(_a){
this.labelElement.innerHTML=_a;
}
this.widgetElement.appendChild(this.labelElement);
}
catch(ex){
jsExDebug("widgetCheckbox_allowLabel",ex);
}
}
function widgetCheckbox_disallowHighlight(){
try{
this.settingAllowHighlight=false;
}
catch(ex){
jsExDebug("widgetCheckbox_disallowHighlight",ex);
}
}
function widgetCheckbox_valueChangeEvent(_d,me){
try{
me.fireEvent(me.SYSTEM.Event.VALUE_CHANGED_EVENT,_d);
}
catch(ex){
jsExDebug("widgetCheckbox_valueChangeEvent",ex);
}
}

try{
tableSizeWidget_t.prototype=new widget_t();
tableSizeWidget_t.prototype.tableSizeWidget_super=widget_t.prototype.constructor;
tableSizeWidget_t.prototype.constructor=tableSizeWidget_t;
tableSizeWidget_t.prototype.cleanUp=tableSizeWidget_cleanUp;
tableSizeWidget_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
tableSizeWidget_t.prototype.createDom=tableSizeWidget_createDom;
tableSizeWidget_t.prototype.bindEvents=tableSizeWidget_bindEvents;
tableSizeWidget_t.prototype.fillGridSquares=tableSizeWidget_fillGridSquares;
tableSizeWidget_t.prototype.getSelectedColumns=tableSizeWidget_getSelectedColumns;
tableSizeWidget_t.prototype.getSelectedRows=tableSizeWidget_getSelectedRows;
tableSizeWidget_t.prototype.clearCellBorders=tableSizeWidget_clearCellBorders;
tableSizeWidget_t.prototype.setBackgroundImage=tableSizeWidget_setBackgroundImage;
tableSizeWidget_t.prototype.show=tableSizeWidget_show;
tableSizeWidget_t.prototype.allowMoreOption=tableSizeWidget_allowMoreOption;
tableSizeWidget_t.prototype.allowHideOnDocumentClick=tableSizeWidget_allowHideOnDocumentClick;
tableSizeWidget_t.prototype.moreClickEvent=tableSizeWidget_moreClickEvent;
tableSizeWidget_t.prototype.moreMouseOverEvent=tableSizeWidget_moreMouseOverEvent;
tableSizeWidget_t.prototype.moreMouseOutEvent=tableSizeWidget_moreMouseOutEvent;
tableSizeWidget_t.prototype.clickEvent=tableSizeWidget_clickEvent;
tableSizeWidget_t.prototype.hideEvent=tableSizeWidget_hideEvent;
tableSizeWidget_t.prototype.mouseOverSquareEvent=tableSizeWidget_mouseOverSquareEvent;
tableSizeWidget_t.prototype.SQUARE_SIDE_LENGTH=18;
tableSizeWidget_t.prototype.SQUARE_PADDING=3;
tableSizeWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
tableSizeWidget_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.CLICK_EVENT];
}
catch(ex){
jsExDebug("tableSizeWidget_t.prototype",ex);
}
function tableSizeWidget_t(_1,_2,_3,_4,_5){
try{
this.tableSizeWidget_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.rowArray=[];
this.numberOfColumns=_2;
this.numberOfRows=_3;
this.currentRow=0;
this.currentColumn=0;
this.highlightColour="#6da5c9";
if(!_5){
this.createDom(_2,_3,_4);
this.bindEvents();
}
}
catch(ex){
jsExDebug("tableSizeWidget_t",ex);
}
}
function tableSizeWidget_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.widgetElement,"onclick","click");
if(me.settingHideOnDocumentClick){
me.SYSTEM.Event.detachEvent(me.widgetElement,"allclickprop","allclickprop");
me.settingHideOnDocumentClick=false;
}
me.SYSTEM.Event.detachEvent(me.moreOptionDiv,"onclick","click");
me.SYSTEM.Event.detachEvent(me.moreOptionDiv,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.moreOptionDiv,"onmouseout","mouseout");
for(var _7=0;_7<me.rowArray.length;_7++){
for(var _8=0;_8<me.rowArray[_7].length;_8++){
me.SYSTEM.Event.detachEvent(me.rowArray[_7][_8],"onmouseover","mouseover");
me.rowArray[_7][_8].objectReference.row=null;
me.rowArray[_7][_8].objectReference.column=null;
me.rowArray[_7][_8].objectReference=null;
me.rowArray[_7][_8]=null;
delete me.rowArray[_7][_8];
}
me.rowArray[_7]=null;
delete me.rowArray[_7];
}
me.rowArray=null;
me.numberOfColumns=null;
me.numberOfRows=null;
me.selectedRows=null;
me.selectedColumns=null;
me.currentRow=null;
me.currentColumn=null;
me.backgroundImageSrc=null;
me.SYSTEM.Dom.freeDom(me.gridDiv);
me.gridDiv=null;
me.SYSTEM.Dom.freeDom(me.moreOptionDiv);
me.moreOptionDiv=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("tableSizeWidget_cleanUp",ex);
}
}
function tableSizeWidget_createDom(_9,_a,_b){
try{
var _c=document.createElement("div");
_c.style.position="absolute";
_c.style.top="10px";
_c.style.left="10px";
_c.style.width=(_9*(this.SQUARE_SIDE_LENGTH+(2*this.SQUARE_PADDING))-(2*this.SQUARE_PADDING))+"px";
_c.style.height=(_a*(this.SQUARE_SIDE_LENGTH+(2*this.SQUARE_PADDING))-(2*this.SQUARE_PADDING))+"px";
for(var _d=0;_d<_a;_d++){
this.rowArray[_d]=[];
for(var _e=0;_e<_9;_e++){
var _f=document.createElement("div");
_f.style.position="absolute";
_f.style.left=(_e*(this.SQUARE_SIDE_LENGTH+(2*this.SQUARE_PADDING)))+"px";
_f.style.top=(_d*(this.SQUARE_SIDE_LENGTH+(2*this.SQUARE_PADDING)))+"px";
_f.style.width=this.SQUARE_SIDE_LENGTH+"px";
_f.style.height=this.SQUARE_SIDE_LENGTH+"px";
_f.style.border="solid 1px black";
var _10={};
_10.row=_d;
_10.column=_e;
_f.objectReference=_10;
this.SYSTEM.Event.attachEvent(_f,"onmouseover","mouseover",this.mouseOverSquareEvent,this,false,_10);
_c.appendChild(_f);
this.rowArray[_d][_e]=_f;
}
}
var _11=document.createElement("div");
_11.style.position="absolute";
_11.style.left="10px";
_11.style.top=(parseInt(_c.style.height)+20)+"px";
_11.style.width=(parseInt(_c.style.width)+3)+"px";
_11.style.height="20px";
_11.style.verticalAlign="middle";
_11.innerHTML="More...";
_11.style.cursor="pointer";
this.widgetElement.style.border="solid 1px black";
this.widgetElement.style.width=(parseInt(_c.style.width)+20)+"px";
this.widgetElement.style.height=(parseInt(_c.style.height)+45)+"px";
this.widgetElement.appendChild(_c);
this.SYSTEM.Dom.setElementClass(this.widgetElement,"droplist");
this.gridDiv=_c;
this.moreOptionDiv=_11;
}
catch(ex){
jsExDebug("tableSizeWidget_createDom",ex);
}
}
function tableSizeWidget_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"onclick","click",this.clickEvent,this);
this.SYSTEM.Event.attachEvent(this.moreOptionDiv,"onclick","click",this.moreClickEvent,this,false);
this.SYSTEM.Event.attachEvent(this.moreOptionDiv,"onmouseover","mouseover",this.moreMouseOverEvent,this,false);
this.SYSTEM.Event.attachEvent(this.moreOptionDiv,"onmouseout","mouseout",this.moreMouseOutEvent,this,false);
}
catch(ex){
jsExDebug("tableSizeWidget_bindEvents",ex);
}
}
function tableSizeWidget_allowHideOnDocumentClick(){
try{
this.settingHideOnDocumentClick=true;
this.SYSTEM.Event.attachEvent(this.widgetElement,"allclickprop","allclickprop",this.hideEvent,this);
}
catch(ex){
jsExDebug("tableSizeWidget_allowHideOnDocumentClick",ex);
}
}
function tableSizeWidget_fillGridSquares(_12,_13){
try{
for(var row=0;row<this.rowArray.length;row++){
for(var _15=0;_15<this.rowArray[row].length;_15++){
if(row<=_12&&_15<=_13){
this.rowArray[row][_15].style.borderColor="rgb(252, 222, 145)";
}else{
this.rowArray[row][_15].style.borderColor="black";
}
}
}
}
catch(ex){
jsExDebug("tableSizeWidget_fillGridSquares",ex);
}
}
function tableSizeWidget_getSelectedColumns(){
try{
return this.selectedColumns;
}
catch(ex){
jsExDebug("tableSizeWidget_getSelectedColumns",ex);
}
}
function tableSizeWidget_getSelectedRows(){
try{
return this.selectedRows;
}
catch(ex){
jsExDebug("tableSizeWidget_getSelectedRows",ex);
}
}
function tableSizeWidget_clearCellBorders(){
try{
for(var row=0;row<this.rowArray.length;row++){
for(var _17=0;_17<this.rowArray[row].length;_17++){
this.rowArray[row][_17].style.borderColor="black";
}
}
}
catch(ex){
jsExDebug("tableSizeWidget_clearCellBorders",ex);
}
}
function tableSizeWidget_setBackgroundImage(_18){
try{
this.backgroundImageSrc=_18;
if(_18){
this.widgetElement.style.backgroundColor="white";
this.widgetElement.style.backgroundImage="url('"+_18+"')";
this.widgetElement.style.backgroundRepeat="repeat-y";
}
}
catch(ex){
jsExDebug("tableSizeWidget_setBackgroundImage",ex);
}
}
function tableSizeWidget_show(me,_1a){
try{
if(!me){
me=this;
}
me.widgetElement.style.visibility="visible";
if(_1a){
me.fillGridSquares(me.currentRow,me.currentColumn);
}
}
catch(ex){
jsExDebug("tableSizeWidget_show",ex);
}
}
function tableSizeWidget_allowMoreOption(){
try{
this.widgetElement.appendChild(this.moreOptionDiv);
}
catch(ex){
jsExDebug("tableSizeWidget_allowMoreOption",ex);
}
}
function tableSizeWidget_moreClickEvent(_1b,me){
try{
me.hide();
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_1b);
}
catch(ex){
jsExDebug("tableSizeWidget_moreClickEvent",ex);
}
}
function tableSizeWidget_moreMouseOverEvent(_1d,me){
try{
me.moreOptionDiv.style.backgroundColor=me.highlightColour;
}
catch(ex){
jsExDebug("tableSizeWidget_moreMouseOverBinding",ex);
}
}
function tableSizeWidget_moreMouseOutEvent(_1f,me){
try{
me.moreOptionDiv.style.backgroundColor="";
}
catch(ex){
jsExDebug("tableSizeWidget_moreMouseOutEvent",ex);
}
}
function tableSizeWidget_clickEvent(_21,me){
try{
me.selectedRows=me.currentRow+1;
me.selectedColumns=me.currentColumn+1;
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_21);
}
catch(ex){
jsExDebug("tableSizeWidget_clickEvent",ex);
}
}
function tableSizeWidget_hideEvent(_23,me){
try{
me.hide();
}
catch(ex){
jsExDebug("tableSizeWidget_hideEvent",ex);
}
}
function tableSizeWidget_mouseOverSquareEvent(_25,me,_27){
try{
me.currentRow=_27.row;
me.currentColumn=_27.column;
me.fillGridSquares(me.currentRow,me.currentColumn);
}
catch(ex){
jsExDebug("tableSizeWidget_mouseOverSquareEvent",ex);
}
}

try{
widgetLabel_t.prototype=new widget_t();
widgetLabel_t.prototype.widgetLabel_super=widget_t.prototype.constructor;
widgetLabel_t.prototype.constructor=widgetLabel_t;
widgetLabel_t.prototype.cleanUp=widgetLabel_cleanUp;
widgetLabel_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetLabel_t.prototype.createDom=widgetLabel_createDom;
widgetLabel_t.prototype.bindEvents=widgetLabel_bindEvents;
widgetLabel_t.prototype.setText=widgetLabel_setText;
widgetLabel_t.prototype.setAlignment=widgetLabel_setAlignment;
widgetLabel_t.prototype.setLineHeight=widgetLabel_setLineHeight;
widgetLabel_t.prototype.setFontSize=widgetLabel_setFontSize;
widgetLabel_t.prototype.setBold=widgetLabel_setBold;
widgetLabel_t.prototype.setFontWeight=widgetLabel_setFontWeight;
widgetLabel_t.prototype.setItalics=widgetLabel_setItalics;
widgetLabel_t.prototype.disallowBold=widgetLabel_disallowBold;
widgetLabel_t.prototype.setColour=widgetLabel_setColour;
widgetLabel_t.prototype.setUnderline=widgetLabel_setUnderline;
widgetLabel_t.prototype.getText=widgetLabel_getText;
widgetLabel_t.prototype.setOverflow=widgetLabel_setOverflow;
widgetLabel_t.prototype.disallowWrap=widgetLabel_disallowWrap;
widgetLabel_t.prototype.setCharacterLimit=widgetLabel_setCharacterLimit;
widgetLabel_t.prototype.getCharacterLimit=widgetLabel_getCharacterLimit;
widgetLabel_t.prototype.clickEvent=widgetLabel_clickEvent;
widgetLabel_t.prototype.enterEvent=widgetLabel_enterEvent;
widgetLabel_t.prototype.exitEvent=widgetLabel_exitEvent;
widgetLabel_t.prototype.dblClickEvent=widgetLabel_dblClickEvent;
widgetLabel_t.prototype.DEFAULT_EVENT=SYSTEM.Event.CLICK_EVENT;
widgetLabel_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.MOUSE_ENTER_EVENT,SYSTEM.Event.MOUSE_EXIT_EVENT,SYSTEM.Event.DOUBLE_CLICK_EVENT];
}
catch(ex){
jsExDebug("widgetLabel_t.prototype",ex);
}
function widgetLabel_t(_1,_2,_3,_4){
try{
this.widgetLabel_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.setCharacterLimit(_3);
if(!_4){
this.createDom(_2);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetLabel_t; createDom; ",ex);
}
return;
}
function widgetLabel_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.widgetElement,"onclick","click");
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmouseout","mouseout");
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondblclick","dblclick");
me.SYSTEM.Dom.freeDom(me.fullTextDiv);
if(me.fullTextDiv.parentNode==document.body){
document.body.removeChild(me.fullTextDiv);
}
me.fullTextDiv=null;
me.textValue=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetLabel_cleanUp",ex);
}
}
function widgetLabel_createDom(_6){
try{
this.widgetElement.style.cursor="default";
this.widgetElement.style.height="auto";
var _7=this.SYSTEM.Dom.createDiv();
_7.style.height="auto";
_7.style.width="auto";
_7.style.backgroundColor=this.SYSTEM.Style.BLUE_TOOLGROUP_BG;
_7.style.color="#000000";
_7.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
_7.style.zIndex=TOOLTIP_ZINDEX;
_7.style.padding="2px";
this.fullTextDiv=_7;
if(_6){
this.setText(_6);
}
}
catch(ex){
jsExDebug("widgetLabel_createDom",ex);
}
}
function widgetLabel_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"onclick","click",this.clickEvent,this,true);
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmouseover","mouseover",this.enterEvent,this,true);
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmouseout","mouseout",this.exitEvent,this,true);
this.SYSTEM.Event.attachEvent(this.widgetElement,"ondblclick","dblclick",this.dblClickEvent,this,true);
}
catch(ex){
jsExDebug("widgetLabel_bindEvents",ex);
}
}
function widgetLabel_setText(_8){
try{
this.textValue=_8;
_8=truncateText(this.widgetElement,_8);
this.widgetElement.innerHTML=_8;
}
catch(ex){
jsExDebug("widgetLabel_setText",ex);
}
return;
}
function widgetLabel_setAlignment(_9){
try{
if(_9=="left"||_9=="center"||_9=="right"){
this.widgetElement.style.textAlign=_9;
}
}
catch(ex){
jsExDebug("widgetLabel_setAlignment",ex);
}
}
function widgetLabel_setLineHeight(_a){
try{
this.widgetElement.style.lineHeight=_a+"px";
}
catch(ex){
jsExDebug("widgetLabel_setLineHeight",ex);
}
}
function widgetLabel_setFontSize(_b,pt,px,em){
try{
if(_b){
var _f;
switch(_b){
case 1:
_f=8;
break;
case 2:
_f=10;
break;
case 3:
_f=12;
break;
case 4:
_f=14;
break;
case 5:
_f=18;
break;
case 6:
_f=24;
break;
case 7:
_f=36;
break;
}
this.widgetElement.style.fontSize=_f+"pt";
}else{
if(pt){
this.widgetElement.style.fontSize=pt+"pt";
}else{
if(px){
this.widgetElement.style.fontSize=px+"px";
}else{
if(em){
this.widgetElement.style.fontSize=em+"em";
}
}
}
}
}
catch(ex){
jsExDebug("widgetLabel_setFontSize",ex);
}
}
function widgetLabel_setBold(){
try{
this.setFontWeight("bold");
}
catch(ex){
jsExDebug("widgetLabel_setBold",ex);
}
}
function widgetLabel_setFontWeight(_10){
try{
this.widgetElement.style.fontWeight=_10;
}
catch(ex){
jsExDebug("widgetLabel_setFontWeight",ex);
}
}
function widgetLabel_setItalics(){
try{
this.widgetElement.style.fontStyle="italic";
}
catch(ex){
jsExDebug("widgetLabel_setItalics",ex);
}
}
function widgetLabel_disallowBold(){
try{
this.widgetElement.style.fontWeight="normal";
}
catch(ex){
jsExDebug("widgetLabel_disallowBold",ex);
}
}
function widgetLabel_setColour(_11){
try{
this.widgetElement.style.color=_11;
}
catch(ex){
jsExDebug("widgetLabel_setColour",ex);
}
}
function widgetLabel_setUnderline(){
try{
this.widgetElement.style.textDecoration="underline";
}
catch(ex){
jsExDebug("widgetLabel_setUnderline",ex);
}
}
function widgetLabel_clickEvent(_12,me){
try{
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_12);
}
catch(ex){
jsExDebug("widgetLabel_clickEvent",ex);
}
}
function widgetLabel_enterEvent(_14,me){
try{
if(me.widgetElement.innerHTML.match(/(\.){3}$/)){
me.fullTextDiv.style.left=(me.SYSTEM.Event.mouseX-(me.width/2))+"px";
me.fullTextDiv.style.bottom=(me.SYSTEM.Environment.SCREEN_HEIGHT-(me.SYSTEM.Event.mouseY-20))+"px";
me.fullTextDiv.innerHTML=me.textValue;
document.body.appendChild(me.fullTextDiv);
}
me.fireEvent(me.SYSTEM.Event.MOUSE_ENTER_EVENT,_14);
}
catch(ex){
jsExDebug("widgetLabel_enterEvent",ex);
}
}
function widgetLabel_exitEvent(_16,me){
try{
var _18=me.widgetElement.innerHTML;
if(_18&&_18.match(/(\.){3}$/)&&me.fullTextDiv.parentNode==document.body){
document.body.removeChild(me.fullTextDiv);
}
me.fireEvent(me.SYSTEM.Event.MOUSE_EXIT_EVENT,_16);
}
catch(ex){
jsExDebug("widgetLabel_exitEvent",ex);
}
}
function widgetLabel_dblClickEvent(_19,me){
try{
me.fireEvent(me.SYSTEM.Event.DOUBLE_CLICK_EVENT,_19);
}
catch(ex){
jsExDebug("widgetLabel_dblClickEvent",ex);
}
}
function widgetLabel_getText(){
try{
return this.textValue;
}
catch(ex){
jsExDebug("widgetLabel_getText",ex);
}
}
function widgetLabel_setOverflow(_1b){
try{
if(_1b=="hidden"||_1b=="auto"){
this.widgetElement.style.overflow=_1b;
this.widgetElement.style.whitespace="nowrap";
}
}
catch(ex){
jsExDebug("widgetLabel_setOverflow",ex);
}
}
function widgetLabel_disallowWrap(){
try{
this.widgetElement.style.whiteSpace="nowrap";
}
catch(ex){
jsExDebug("widgetLabel_disallowWrap",ex);
}
}
function widgetLabel_setCharacterLimit(_1c){
try{
if(!isNaN(_1c)){
this.widgetElement.charLimit=_1c;
}
}
catch(ex){
jsExDebug("widgetLabel_setCharacterLimit",ex);
}
}
function widgetLabel_getCharacterLimit(){
try{
return this.widgetElement.charLimit;
}
catch(ex){
jsExDebug("widgetLabel_getCharacterLimit",ex);
}
}

try{
widgetLink_t.prototype=new widget_t();
widgetLink_t.prototype.widgetLink_super=widget_t.prototype.constructor;
widgetLink_t.prototype.constructor=widgetLink_t;
widgetLink_t.prototype.cleanUp=widgetLink_cleanUp;
widgetLink_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetLink_t.prototype.createDom=widgetLink_createDom;
widgetLink_t.prototype.bindEvents=widgetLink_bindEvents;
widgetLink_t.prototype.setText=widgetLink_setText;
widgetLink_t.prototype.widget_setDimensions=widget_t.prototype.setDimensions;
widgetLink_t.prototype.setDimensions=widgetLink_setDimensions;
widgetLink_t.prototype.getText=widgetLink_getText;
widgetLink_t.prototype.setFontSize=widgetLink_setFontSize;
widgetLink_t.prototype.setColour=widgetLink_setColour;
widgetLink_t.prototype.setAlignment=widgetLink_setAlignment;
widgetLink_t.prototype.setLocation=widgetLink_setLocation;
widgetLink_t.prototype.getLocation=widgetLink_getLocation;
widgetLink_t.prototype.clickEvent=widgetLink_clickEvent;
widgetLink_t.prototype.LIGHT_COLOUR="#880000";
widgetLink_t.prototype.DARK_COLOUR="#FF5E99";
widgetLink_t.prototype.DEFAULT_EVENT=SYSTEM.Event.CLICK_EVENT;
widgetLink_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("widgetLink_t.prototype",ex);
}
function widgetLink_t(_1,_2,_3,_4){
try{
this.widgetLink_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.location=null;
this.settingGoToLocation=false;
if(!_4){
this.createDom(_2,_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetLink_t",ex);
}
}
function widgetLink_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.linkElement,"onclick","click");
me.linkElement=null;
me.text=null;
me.location=null;
me.settingGoToLocation=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetLink_cleanUp",ex);
}
}
function widgetLink_createDom(_6,_7){
try{
this.widgetElement.style.width="auto";
this.widgetElement.style.height="auto";
var _8=this.SYSTEM.Dom.getCurrentStyle(document.body).color;
if(isDark(_8)){
this.widgetElement.style.color=this.LIGHT_COLOUR;
}else{
this.widgetElement.style.color=this.DARK_COLOUR;
}
this.linkElement=document.createElement("a");
this.linkElement.style.position="absolute";
this.linkElement.style.cursor="pointer";
if(_7){
this.width=_7;
this.linkElement.style.width=_7+"px";
}else{
this.linkElement.style.width=(7*_6.length)+"px";
}
this.widgetElement.style.width=this.linkElement.style.width;
if(_6){
this.linkElement.innerHTML=_6;
this.text=_6;
}
this.widgetElement.appendChild(this.linkElement);
}
catch(ex){
jsExDebug("widgetLink_createDom",ex);
}
}
function widgetLink_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.linkElement,"onclick","click",this.clickEvent,this,true);
}
catch(ex){
jsExDebug("widgetLink_bindEvents",ex);
}
}
function widgetLink_setText(_9){
try{
if(_9!=null){
this.linkElement.innerHTML=_9;
this.text=_9;
}
}
catch(ex){
jsExDebug("widgetLink_setText",ex);
}
}
function widgetLink_setDimensions(_a,_b){
try{
this.widget_setDimensions(_a,_b);
if(this.width){
this.linkElement.style.width=this.width+"px";
}
if(this.height){
this.linkElement.style.height=this.height+"px";
}
}
catch(ex){
jsExDebug("widgetLink_setDimensions",ex);
}
}
function widgetLink_getText(){
try{
return this.text;
}
catch(ex){
jsExDebug("widgetLink_getText",ex);
}
}
function widgetLink_setFontSize(_c,_d){
try{
if(_c){
this.linkElement.style.fontSize=_c+"pt";
}else{
if(_d){
this.linkElement.style.fontSize=_d+"px";
}
}
}
catch(ex){
jsExDebug("widgetLink_setFontSize",ex);
}
}
function widgetLink_setColour(_e){
try{
this.linkElement.style.color=_e;
}
catch(ex){
jsExDebug("widgetLink_setColour",ex);
}
}
function widgetLink_setAlignment(_f){
try{
this.linkElement.style.textAlign=_f;
}
catch(ex){
jsExDebug("widgetLink_setAlignment",ex);
}
}
function widgetLink_setLocation(_10,_11){
try{
this.location=_10;
this.settingGoToLocation=_11;
}
catch(ex){
jsExDebug("widgetLink_setLocation",ex);
}
}
function widgetLink_getLocation(){
try{
return this.location;
}
catch(ex){
jsExDebug("widgetLink_setLocation",ex);
}
}
function widgetLink_clickEvent(_12,me){
try{
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_12);
if(me.settingGoToLocation&&me.location){
window.location=me.location;
}
}
catch(ex){
jsExDebug("widgetLink_clickEvent",ex);
}
}

try{
widgetCheckboxList_t.prototype=new selectListWidget_t();
widgetCheckboxList_t.prototype.widgetCheckboxList_super=selectListWidget_t.prototype.constructor;
widgetCheckboxList_t.prototype.constructor=widgetCheckboxList_t;
widgetCheckboxList_t.prototype.cleanUp=widgetCheckboxList_cleanUp;
widgetCheckboxList_t.prototype.selectListWidget_cleanUp=selectListWidget_t.prototype.cleanUp;
widgetCheckboxList_t.prototype.selectListWidget_createDom=selectListWidget_t.prototype.createDom;
widgetCheckboxList_t.prototype.createDom=widgetCheckboxList_createDom;
widgetCheckboxList_t.prototype.selectListWidget_bindEvents=selectListWidget_t.prototype.bindEvents;
widgetCheckboxList_t.prototype.bindEvents=widgetCheckboxList_bindEvents;
widgetCheckboxList_t.prototype.fireEvent=widgetCheckboxList_fireEvent;
widgetCheckboxList_t.prototype.itemList_removeItem=itemList_t.prototype.removeItem;
widgetCheckboxList_t.prototype.removeItem=widgetCheckboxList_removeItem;
widgetCheckboxList_t.prototype.selectionChangeEvent=widgetCheckboxList_selectionChangeEvent;
widgetCheckboxList_t.prototype.selectListWidget_selectionChangeEvent=selectListWidget_t.prototype.selectionChangeEvent;
widgetCheckboxList_t.prototype.selectListWidget_clearList=selectListWidget_t.prototype.clearList;
widgetCheckboxList_t.prototype.clearList=widgetCheckboxList_clearList;
widgetCheckboxList_t.prototype.addCheckboxItem=widgetCheckboxList_addCheckboxItem;
widgetCheckboxList_t.prototype.isItemChecked=widgetCheckboxList_isItemChecked;
widgetCheckboxList_t.prototype.getSelectedValues=widgetCheckboxList_getSelectedValues;
widgetCheckboxList_t.prototype.itemValueChangeEvent=widgetCheckboxList_itemValueChangeEvent;
widgetCheckboxList_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
widgetCheckboxList_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.LIST_ITEM_ENTER_EVENT,SYSTEM.Event.LIST_ITEM_EXIT_EVENT];
}
catch(ex){
jsExDebug("widgetCheckboxList_t.prototype",ex);
}
function widgetCheckboxList_t(_1,_2){
try{
this.widgetCheckboxList_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.selectedValues=[];
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetCheckboxList_t",ex);
}
}
function widgetCheckboxList_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var i=0;i<me.items.length;i++){
if(me.items[i]){
me.items[i].checkboxElementReference=null;
}
}
for(var i=0;i<me.selectedValues.length;i++){
me.selectedValues[i]=null;
}
me.selectedValues=null;
me.selectListWidget_cleanUp();
}
catch(ex){
jsExDebug("widgetCheckboxList_cleanUp",ex);
}
}
function widgetCheckboxList_createDom(){
try{
this.selectListWidget_createDom();
this.align(this.LEFT_ALIGN);
this.allowStartVisible();
this.setHorizontalPadding(0);
this.disallowPadding();
this.disallowItemBorder();
}
catch(ex){
jsExDebug("widgetCheckboxList_createDom",ex);
}
}
function widgetCheckboxList_bindEvents(){
try{
this.selectListWidget_bindEvents();
}
catch(ex){
jsExDebug("widgetCheckboxList_bindEvents",ex);
}
}
function widgetCheckboxList_addCheckboxItem(_5,_6,_7){
try{
var _8=new this.SYSTEM.Widget.Checkbox("checkbox",true);
var _9=this.addWidget(_5,_8,_6,true);
_8.widgetElement.style.marginRight="";
var _a=new this.SYSTEM.Delegate(this,this.itemValueChangeEvent(_9));
_8.setCheckedState(_7);
_8.notifyEvent(this.SYSTEM.Event.VALUE_CHANGED_EVENT,_a);
if(_7){
this.selectedValues[_9]=_5;
}
this.dim(_9);
this.items[_9].checkboxElementReference=_8;
return _9;
}
catch(ex){
jsExDebug("widgetCheckboxList_addCheckboxItem",ex);
}
}
function widgetCheckboxList_isItemChecked(_b){
try{
var _c=this.items[_b];
if(_c.checkboxElementReference){
return _c.checkboxElementReference.isChecked();
}else{
return false;
}
}
catch(ex){
jsExDebug("widgetCheckboxList_isItemChecked",ex);
}
}
function widgetCheckboxList_getSelectedValues(){
try{
return this.selectedValues;
}
catch(ex){
jsExDebug("widgetCheckboxList_getSelectedValues",ex);
}
}
function widgetCheckboxList_fireEvent(_d,_e,_f){
try{
if(!this.eventBindings[_d]){
return;
}
if(_e){
var _10=new SYSTEM.Event.Event(_e.mouseX,_e.mouseY);
}else{
var _10=new SYSTEM.Event.Event();
}
for(var i=0;i<this.eventBindings[_d].length;i++){
var _12=this.eventBindings[_d][i];
_12.invoke(_10,this,_f);
}
}
catch(ex){
jsExDebug("widgetCheckboxList_fireEvent",ex);
}
}
function widgetCheckboxList_removeItem(_13,_14){
try{
this.itemList_removeItem(_13,_14);
for(var i=0;i<this.selectedValues.length;i++){
if(this.selectedValues[i]&&this.selectedValues[i]==_14){
this.selectedValues[i]=null;
}
}
}
catch(ex){
jsExDebug("widgetCheckboxList_removeItem",ex);
}
}
function widgetCheckboxList_selectionChangeEvent(_16,_17){
try{
var _18=this.items[_17].checkboxElementReference;
if(!_18){
return;
}
_18.setCheckedState(!_18.isChecked(),true);
if(_18.isChecked()){
this.selectedValues[_17]=this.getItemValue(_17);
}else{
this.selectedValues[_17]=null;
}
this.selectListWidget_selectionChangeEvent(_16,_17);
}
catch(ex){
jsExDebug("widgetCheckboxList_selectionChangeEvent",ex);
}
}
function widgetCheckboxList_clearList(){
try{
this.selectListWidget_clearList();
for(var i=0;i<this.selectedValues.length;i++){
this.selectedValues[i]=null;
}
this.selectedValues=[];
}
catch(ex){
jsExDebug("widgetCheckboxList_clearList",ex);
}
}
function widgetCheckboxList_itemValueChangeEvent(_1a){
function handler(_1b,_1c){
try{
if(_1c.isChecked()){
this.selectedValues[_1a]=this.getItemValue(_1a);
}else{
this.selectedValues[_1a]=null;
}
this.selectListWidget_selectionChangeEvent(_1b,_1a);
}
catch(ex){
jsExDebug("widgetCheckboxList_itemValueChangeEvent: handler",ex);
}
}
try{
var me=this;
return handler;
}
catch(ex){
jsExDebug("widgetCheckboxList_itemValueChangeEvent",ex);
}
}

try{
gridSelectWidget_t.prototype=new widget_t();
gridSelectWidget_t.prototype.gridSelectWidget_super=widget_t.prototype.constructor;
gridSelectWidget_t.prototype.constructor=gridSelectWidget_t;
gridSelectWidget_t.prototype.cleanUp=gridSelectWidget_cleanUp;
gridSelectWidget_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
gridSelectWidget_t.prototype.createDom=gridSelectWidget_createDom;
gridSelectWidget_t.prototype.bindEvents=gridSelectWidget_bindEvents;
gridSelectWidget_t.prototype.addItemContainer=gridSelectWidget_addItemContainer;
gridSelectWidget_t.prototype.addItem=gridSelectWidget_addItem;
gridSelectWidget_t.prototype.addWidget=gridSelectWidget_addWidget;
gridSelectWidget_t.prototype.addImage=gridSelectWidget_addImage;
gridSelectWidget_t.prototype.setSelectedValue=gridSelectWidget_setSelectedValue;
gridSelectWidget_t.prototype.getSelectedValue=gridSelectWidget_getSelectedValue;
gridSelectWidget_t.prototype.adjustDimensions=gridSelectWidget_adjustDimensions;
gridSelectWidget_t.prototype.highlight=gridSelectWidget_highlight;
gridSelectWidget_t.prototype.dim=gridSelectWidget_dim;
gridSelectWidget_t.prototype.align=gridSelectWidget_align;
gridSelectWidget_t.prototype.vAlign=gridSelectWidget_vAlign;
gridSelectWidget_t.prototype.allowSelectedHighlight=gridSelectWidget_allowSelectedHighlight;
gridSelectWidget_t.prototype.clearGrid=gridSelectWidget_clearGrid;
gridSelectWidget_t.prototype.itemSelectEvent=gridSelectWidget_itemSelectEvent;
gridSelectWidget_t.prototype.itemMouseOverEvent=gridSelectWidget_itemMouseOverEvent;
gridSelectWidget_t.prototype.itemMouseOutEvent=gridSelectWidget_itemMouseOutEvent;
gridSelectWidget_t.prototype.LEFT_ALIGN="left";
gridSelectWidget_t.prototype.RIGHT_ALIGN="right";
gridSelectWidget_t.prototype.HCENTRE_ALIGN="center";
gridSelectWidget_t.prototype.BOTTOM_ALIGN="bottom";
gridSelectWidget_t.prototype.TOP_ALIGN="top";
gridSelectWidget_t.prototype.VCENTRE_ALIGN="middle";
gridSelectWidget_t.prototype.IMAGE_BORDER_WIDTH=3;
gridSelectWidget_t.prototype.HIGHLIGHT_BORDER="solid 2px rgb(244,189,25)";
gridSelectWidget_t.prototype.DEFAULT_LABEL_HEIGHT=30;
gridSelectWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
gridSelectWidget_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("gridSelectWidget_t.prototype",ex);
}
function gridSelectWidget_t(_1,_2,_3,_4,_5){
try{
this.gridSelectWidget_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.columns=_2;
this.itemWidth=_3;
this.itemHeight=_4;
this.rowArray=[];
this.items=[];
this.currentRow=0;
this.currentColumn=0;
this.selectCallbacks=[];
this.itemBorderColour="white";
this.highlightColour="#6da5c9";
this.stateAlign=this.HCENTRE_ALIGN;
this.stateVAlign=this.VCENTRE_ALIGN;
this.settingNotifyPanelOfEvent=false;
if(!_5){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("gridSelectWidget_t",ex);
}
}
function gridSelectWidget_cleanUp(me){
try{
if(!me){
me=this;
}
me.columns=null;
me.itemWidth=null;
me.itemHeight=null;
me.currentRow=null;
me.currentColumn=null;
me.selectedValue=null;
me.selectedDiv=null;
me.itemBorderColour=null;
me.highlightColour=null;
me.stateAlign=null;
me.stateVAlign=null;
me.settingAllowSelectedHighlight=null;
for(var j=0;j<me.items.length;j++){
var _8=me.items[j];
if(_8){
_8.itemValueReference=null;
_8.imageReference=null;
me.SYSTEM.Event.detachEvent(_8,"onclick","click");
me.SYSTEM.Event.detachEvent(_8,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(_8,"onmouseout","mouseout");
me.items[j]=null;
delete me.items[j];
}
}
for(var _9=0;_9<me.rowArray.length;_9++){
me.SYSTEM.Dom.freeDom(me.rowArray[_9]);
me.rowArray[_9]=null;
delete me.rowArray[_9];
}
me.items=null;
me.rowArray=null;
me.selectCallbacks=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("gridSelectWidget_cleanUp",ex);
}
}
function gridSelectWidget_createDom(){
try{
}
catch(ex){
jsExDebug("gridSelectWidget_createDom",ex);
}
}
function gridSelectWidget_bindEvents(){
try{
}
catch(ex){
jsExDebug("gridSelectWidget_bindEvents",ex);
}
}
function gridSelectWidget_addItemContainer(_a){
try{
var _b;
if(this.currentColumn==0){
var _c=document.createElement("div");
_c.style.position="absolute";
_c.style.width=((this.itemWidth+this.IMAGE_BORDER_WIDTH)*this.columns)+"px";
_c.style.height=this.itemHeight+"px";
_c.style.top=(this.currentRow*this.itemHeight)+"px";
_c.style.left="0px";
this.rowArray[this.currentRow]=_c;
this.widgetElement.appendChild(_c);
}
if(this.currentColumn<this.columns){
var _b=this.SYSTEM.Dom.createClassElement("div","panelbutton w24h24");
_b.style.position="absolute";
_b.style.top="0px";
_b.style.left=(this.currentColumn*(this.itemWidth+this.IMAGE_BORDER_WIDTH))+"px";
_b.itemValueReference=_a;
var _d=this.SYSTEM.Dom.createClassElement("div","textbutton_text");
_d.style.color=this.SYSTEM.Dom.getCurrentStyle(document.body).color;
_b.appendChild(_d);
this.SYSTEM.Event.attachEvent(_b,"onclick","click",this.itemSelectEvent,this,true,_a);
this.SYSTEM.Event.attachEvent(_b,"onmouseover","mouseover",this.itemMouseOverEvent,this,true,_b);
this.SYSTEM.Event.attachEvent(_b,"onmouseout","mouseout",this.itemMouseOutEvent,this,true,_b);
this.rowArray[this.currentRow].appendChild(_b);
this.items[this.items.length]=_b;
this.currentColumn++;
}
return _b;
}
catch(ex){
jsExDebug("gridSelectWidget_addItemContainer",ex);
}
}
function gridSelectWidget_addItem(_e,_f){
try{
if(this.currentColumn==this.columns){
this.currentColumn=0;
this.currentRow++;
}
var _10=this.addItemContainer(_e);
getChildNode(_10,"div",0).innerHTML=_f;
}
catch(ex){
jsExDebug("gridSelectWidget_addItem",ex);
}
}
function gridSelectWidget_addWidget(_11,_12){
try{
if(this.currentColumn==this.columns){
this.currentColumn=0;
this.currentRow++;
}
var _13=this.addItemContainer(_11);
_12.attach(_13);
_13.widgetReference=_12;
}
catch(ex){
jsExDebug("gridSelectWidget_addWidget",ex);
}
}
function gridSelectWidget_addImage(_14,_15,_16,_17,_18,_19){
try{
if(this.currentColumn==this.columns){
this.currentColumn=0;
this.currentRow++;
}
var _1a=document.createElement("img");
_1a.src=_15;
_1a.style.width=_16+"px";
_1a.style.height=_17+"px";
_1a.alt=_19;
_1a.style.borderStyle="solid";
_1a.style.borderWidth=this.IMAGE_BORDER_WIDTH+"px";
_1a.style.borderColor=this.itemBorderColour;
if(_18){
var _1b=document.createElement("span");
_1b.style.position="absolute";
_1b.style.top=(_17+2)+"px";
_1b.style.left="0px";
_1b.style.width=_16+"px";
_1b.style.height=(this.itemHeight-_17)+"px";
_1b.style.overflow="hidden";
_1b.innerHTML=_18;
_1b.style.font="8pt arial";
}
var _1c=this.addItemContainer(_14);
_1c.appendChild(_1a);
if(_18){
_1c.appendChild(_1b);
}
_1c.imageReference=_1a;
}
catch(ex){
jsExDebug("gridSelectWidget_addImage",ex);
}
}
function gridSelectWidget_allowSelectedHighlight(){
try{
this.settingAllowSelectedHighlight=true;
}
catch(ex){
jsExDebug("gridSelectWidget_allowSelectedHighlight",ex);
}
}
function gridSelectWidget_setSelectedValue(_1d){
try{
var _1e=this.selectedDiv;
this.selectedValue=_1d;
if(this.settingAllowSelectedHighlight){
for(var i in this.items){
if(this.items[i].itemValueReference==_1d){
this.selectedDiv=this.items[i];
this.items[i].imageReference.style.border=this.HIGHLIGHT_BORDER;
break;
}
}
}
if(_1e){
this.dim(_1e);
}
}
catch(ex){
jsExDebug("gridSelectWidget_setSelectedValue",ex);
}
}
function gridSelectWidget_getSelectedValue(){
try{
return this.selectedValue;
}
catch(ex){
jsExDebug("gridSelectWidget_getSelectedValue",ex);
}
}
function gridSelectWidget_adjustDimensions(){
try{
this.setDimensions((this.itemWidth+this.IMAGE_BORDER_WIDTH)*this.columns,(this.rowArray.length*this.itemHeight));
}
catch(ex){
jsExDebug("gridSelectWidget_adjustDimensions",ex);
}
}
function gridSelectWidget_highlight(div){
try{
if(div==this.selectedDiv){
return;
}
if(div.imageReference){
div.imageReference.style.borderColor=this.highlightColour;
}else{
this.SYSTEM.Dom.setElementClass(div,"panelbutton w24h24 button_hover");
}
}
catch(ex){
jsExDebug("gridSelectWidget_highlight",ex);
}
}
function gridSelectWidget_dim(div){
try{
if(div==this.selectedDiv){
return;
}
if(div.imageReference){
div.imageReference.style.borderColor=this.itemBorderColour;
}else{
this.SYSTEM.Dom.setElementClass(div,"panelbutton w24h24");
}
}
catch(ex){
jsExDebug("gridSelectWidget_dim",ex);
}
}
function gridSelectWidget_align(_22){
try{
this.stateAlign=_22;
}
catch(ex){
jsExDebug("gridSelectWidget_align",ex);
}
}
function gridSelectWidget_vAlign(_23){
try{
this.stateVAlign=_23;
}
catch(ex){
jsExDebug("gridSelectWidget_vAlign",ex);
}
}
function gridSelectWidget_clearGrid(_24){
try{
for(var i=0;i<this.items;i++){
var _26=this.items[i];
if(_26){
_26.itemValueReference=null;
_26.imageReference=null;
this.SYSTEM.Event.detachEvent(_26,"onclick","click");
this.SYSTEM.Event.detachEvent(_26,"onmouseover","mouseover");
this.SYSTEM.Event.detachEvent(_26,"onmouseout","mouseout");
this.items[i]=null;
delete this.items[i];
}
}
for(var i=0;i<this.rowArray.length;i++){
this.SYSTEM.Dom.freeDom(this.rowArray[i]);
this.rowArray[i]=null;
delete this.rowArray[i];
}
if(_24){
this.items=[];
this.rowArray=[];
this.currentColumn=0;
this.currentRow=0;
}else{
this.items=null;
this.rowArray=null;
this.currentColumn=null;
this.currentRow=null;
}
}
catch(ex){
jsExDebug("gridSelectWidget_clearGrid",ex);
}
}
function gridSelectWidget_itemSelectEvent(_27,me,_29){
try{
me.setSelectedValue(_29);
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_27);
}
catch(ex){
jsExDebug("gridSelectWidget_itemSelectEvent",ex);
}
}
function gridSelectWidget_itemMouseOverEvent(_2a,me,_2c){
try{
me.highlight(_2c);
}
catch(ex){
jsExDebug("gridSelectWidget_itemMouseOverEvent",ex);
}
}
function gridSelectWidget_itemMouseOutEvent(_2d,me,_2f){
try{
me.dim(_2f);
}
catch(ex){
jsExDebug("gridSelectWidget_itemMouseOutEvent",ex);
}
}

try{
selectBoxWidget_t.prototype=new widget_t();
selectBoxWidget_t.prototype.selectBoxWidget_super=widget_t.prototype.constructor;
selectBoxWidget_t.prototype.constructor=selectBoxWidget_t;
selectBoxWidget_t.prototype.cleanUp=selectBoxWidget_cleanUp;
selectBoxWidget_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
selectBoxWidget_t.prototype.createDom=selectBoxWidget_createDom;
selectBoxWidget_t.prototype.bindEvents=selectBoxWidget_bindEvents;
selectBoxWidget_t.prototype.addItem=selectBoxWidget_addItem;
selectBoxWidget_t.prototype.setValue=selectBoxWidget_setValue;
selectBoxWidget_t.prototype.setContent=selectBoxWidget_setContent;
selectBoxWidget_t.prototype.getCurrentText=selectBoxWidget_getCurrentText;
selectBoxWidget_t.prototype.disallowTextEntry=selectBoxWidget_disallowTextEntry;
selectBoxWidget_t.prototype.upClickEvent=selectBoxWidget_upClickEvent;
selectBoxWidget_t.prototype.downClickEvent=selectBoxWidget_downClickEvent;
selectBoxWidget_t.prototype.itemTextChangeEvent=selectBoxWidget_itemTextChangeEvent;
selectBoxWidget_t.prototype.UP_IMG="img/app/system/icons/24x24/scroll_up.png";
selectBoxWidget_t.prototype.DOWN_IMG="img/app/system/icons/24x24/scroll_down.png";
selectBoxWidget_t.prototype.DIV_HEIGHT=20;
selectBoxWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.VALUE_CHANGED_EVENT;
}
catch(ex){
jsExDebug("widgetEmpty_t.prototype",ex);
}
function selectBoxWidget_t(_1,_2,_3,_4){
try{
this.selectBoxWidget_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.items=[];
this.currentItem=null;
this.highestItemIndex=0;
this.currentValue=null;
this.currentIndex=0;
this.selectCallbacks=[];
if(!_4){
this.createDom(_2,_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("selectBoxWidget_t",ex);
}
}
function selectBoxWidget_cleanUp(me){
try{
if(!me){
me=this;
}
if(!me.useDiv){
me.SYSTEM.Event.detachEvent(me.itemText,"onchange","change");
}
for(var i in me.items){
if(me.items[i]){
me.items[i].value=null;
me.items[i].text=null;
me.items[i].index=null;
me.items[i]=null;
delete me.items[i];
}
}
for(var j in me.selectCallbacks){
if(me.selectCallbacks[j]){
me.selectCallbacks[j].handler=null;
me.selectCallbacks[j].instance=null;
me.selectCallbacks[j].parameter=null;
me.selectCallbacks[j]=null;
delete me.selectCallbacks[j];
}
}
me.itemText=null;
me.upBtn.cleanUp();
me.upBtn=null;
me.downBtn.cleanUp();
me.downBtn=null;
me.items=null;
me.selectCallbacks=null;
me.currentItem=null;
me.highestItemIndex=null;
me.currentValue=null;
me.currentIndex=null;
me.useDiv=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("selectBoxWidget_cleanUp",ex);
}
}
function selectBoxWidget_createDom(_8,_9){
try{
this.useDiv=_9;
if(_9){
this.itemText=document.createElement("div");
this.itemText.style.position="absolute";
this.itemText.style.border="solid 1px #AAAAAA";
this.itemText.style.height=this.DIV_HEIGHT+"px";
this.itemText.style.backgroundColor="rgb(255,255,255)";
}else{
this.itemText=document.createElement("input");
this.itemText.style.position="absolute";
this.itemText.style.border="solid 1px #AAAAAA";
}
if(_8){
this.width=_8;
this.itemText.style.width=_8+"px";
}else{
this.width=100;
this.itemText.style.width="100px";
}
this.widgetElement.appendChild(this.itemText);
var _a=new this.SYSTEM.Widget.ClassButton("upBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,20,10,null,this.UP_IMG);
_a.setPosition(this.width+4,0);
_a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.upClickEvent));
_a.attach(this.widgetElement);
var _b=new this.SYSTEM.Widget.ClassButton("downBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,20,10,null,this.DOWN_IMG);
_b.setPosition(this.width+4,_a.height);
_b.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.downClickEvent));
_b.attach(this.widgetElement);
this.upBtn=_a;
this.downBtn=_b;
}
catch(ex){
jsExDebug("selectBoxWidget_createDom",ex);
}
}
function selectBoxWidget_bindEvents(){
try{
if(!this.useDiv){
this.SYSTEM.Event.attachEvent(this.itemText,"onchange","change",this.itemTextChangeEvent,this);
}
}
catch(ex){
jsExDebug("selectBoxWidget_bindEvents",ex);
}
}
function selectBoxWidget_addItem(_c,_d){
try{
var _e=this.items.length;
this.items[_e]=new Object();
this.items[_e].value=_c;
this.items[_e].text=_d;
this.items[_e].index=_e;
this.highestItemIndex=_e;
if(_e==0){
this.currentItem=this.items[_e];
this.currentValue=_c;
this.setContent(_d);
}
}
catch(ex){
jsExDebug("selectBoxWidget_addItem",ex);
}
}
function selectBoxWidget_setValue(_f){
try{
for(var i in this.items){
if(this.items[i].value==_f){
this.currentItem=this.items[i];
this.currentValue=_f;
this.currentIndex=i;
this.setContent(this.currentItem.text);
break;
}
}
return;
}
catch(ex){
jsExDebug("selectBoxWidget_setValue",ex);
}
}
function selectBoxWidget_setContent(_11){
try{
if(this.useDiv){
this.itemText.innerHTML=_11;
}else{
this.itemText.value=_11;
}
}
catch(ex){
jsExDebug("selectBoxWidget_setContent",ex);
}
}
function selectBoxWidget_getCurrentText(_12){
try{
return this.itemText.value;
}
catch(ex){
jsExDebug("selectBoxWidget_getCurrentText",ex);
}
}
function selectBoxWidget_disallowTextEntry(){
try{
if(this.useDiv){
return;
}
this.itemText.disabled=true;
this.itemText.style.backgroundColor="rgb(255,255,255)";
this.itemText.style.color="rgb(0,0,0)";
}
catch(ex){
jsExDebug("selectBoxWidget_disallowTextEntry",ex);
}
}
function selectBoxWidget_upClickEvent(_13,_14){
try{
if(this.currentIndex<this.highestItemIndex){
this.currentIndex++;
this.currentItem=this.items[this.currentIndex];
this.setContent(this.currentItem.text);
this.currentValue=this.currentItem.value;
this.fireEvent(this.SYSTEM.Event.VALUE_CHANGED_EVENT,_13);
}
}
catch(ex){
jsExDebug("selectBoxWidget_upClickEvent",ex);
}
}
function selectBoxWidget_downClickEvent(_15,_16){
try{
if(this.currentIndex>0){
this.currentIndex--;
this.currentItem=this.items[this.currentIndex];
this.setContent(this.currentItem.text);
this.currentValue=this.currentItem.value;
this.fireEvent(this.SYSTEM.Event.VALUE_CHANGED_EVENT,_15);
}
}
catch(ex){
jsExDebug("selectBoxWidget_downClickEvent",ex);
}
}
function selectBoxWidget_itemTextChangeEvent(_17,me){
try{
me.currentValue=me.itemText.value;
me.fireEvent(me.SYSTEM.Event.VALUE_CHANGED_EVENT,_17);
}
catch(ex){
jsExDebug("selectBoxWidget_itemTextChangeEvent",ex);
}
}

try{
widgetDropList_t.prototype=new widget_t();
widgetDropList_t.prototype.constructor=widgetDropList_t;
widgetDropList_t.prototype.widgetDropList_super=widget_t.prototype.constructor;
widgetDropList_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetDropList_t.prototype.cleanUp=widgetDropList_cleanUp;
widgetDropList_t.prototype.createDom=widgetDropList_createDom;
widgetDropList_t.prototype.bindEvents=widgetDropList_bindEvents;
widgetDropList_t.prototype.allowTooltip=widgetDropList_allowTooltip;
widgetDropList_t.prototype.allowSelect=widgetDropList_allowSelect;
widgetDropList_t.prototype.allowStartVisible=widgetDropList_allowStartVisible;
widgetDropList_t.prototype.disallowSelectedHighlight=widgetDropList_disallowSelectedHighlight;
widgetDropList_t.prototype.disallowItemBorder=widgetDropList_disallowItemBorder;
widgetDropList_t.prototype.allowBorder=widgetDropList_allowBorder;
widgetDropList_t.prototype.alignLeft=widgetDropList_alignLeft;
widgetDropList_t.prototype.alignRight=widgetDropList_alignRight;
widgetDropList_t.prototype.alignCentre=widgetDropList_alignCentre;
widgetDropList_t.prototype.verticalAlignCentre=widgetDropList_verticalAlignCentre;
widgetDropList_t.prototype.setListDimensions=widgetDropList_setListDimensions;
widgetDropList_t.prototype.setSelectedIndex=widgetDropList_setSelectedIndex;
widgetDropList_t.prototype.setSelectedValue=widgetDropList_setSelectedValue;
widgetDropList_t.prototype.expandList=widgetDropList_expandList;
widgetDropList_t.prototype.hideList=widgetDropList_hideList;
widgetDropList_t.prototype.clearList=widgetDropList_clearList;
widgetDropList_t.prototype.addItem=widgetDropList_addItem;
widgetDropList_t.prototype.addWidget=widgetDropList_addWidget;
widgetDropList_t.prototype.setWidth=widgetDropList_setWidth;
widgetDropList_t.prototype.extendItemContents=widgetDropList_extendItemContents;
widgetDropList_t.prototype.collapseItemContents=widgetDropList_collapseItemContents;
widgetDropList_t.prototype.showExtendedItemContents=widgetDropList_showExtendedItemContents;
widgetDropList_t.prototype.getSelectedValues=widgetDropList_getSelectedValues;
widgetDropList_t.prototype.getSelectedIndexes=widgetDropList_getSelectedIndexes;
widgetDropList_t.prototype.getSelectedIndex=widgetDropList_getSelectedIndex;
widgetDropList_t.prototype.getSelectedValue=widgetDropList_getSelectedValue;
widgetDropList_t.prototype.disallowPadding=widgetDropList_disallowPadding;
widgetDropList_t.prototype.disallowMouseOverHighlight=widgetDropList_disallowMouseOverHighlight;
widgetDropList_t.prototype.setItemPadding=widgetDropList_setItemPadding;
widgetDropList_t.prototype.disallowFadeIn=widgetDropList_disallowFadeIn;
widgetDropList_t.prototype.addSeparator=widgetDropList_addSeparator;
widgetDropList_t.prototype.setButtonTooltip=widgetDropList_setButtonTooltip;
widgetDropList_t.prototype.dropBtnClickEvent=widgetDropList_dropBtnClickEvent;
widgetDropList_t.prototype.dropBtnExpandEvent=widgetDropList_dropBtnExpandEvent;
widgetDropList_t.prototype.listItemSelectEvent=widgetDropList_listItemSelectEvent;
widgetDropList_t.prototype.listItemWidgetEvent=widgetDropList_listItemWidgetEvent;
widgetDropList_t.prototype.fireEvent=widgetDropList_fireEvent;
widgetDropList_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
widgetDropList_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.CLICK_EVENT,SYSTEM.Event.LIST_ITEM_WIDGET_EVENT,SYSTEM.Event.LIST_EXPAND_EVENT];
}
catch(ex){
jsExDebug("widgetDropList_t.prototype",ex);
}
function widgetDropList_t(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){
try{
this.widgetDropList_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_a){
this.createDom(_2,_3,_4,_5,_6,_7,_8,_9);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetDropList_t",ex);
}
}
function widgetDropList_cleanUp(me){
try{
if(!me){
var me=this;
}
me.dropBtn.cleanUp();
me.list.cleanUp();
me.dropBtn=null;
me.list=null;
me.eventWidget=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetDropList_cleanUp",ex);
}
}
function widgetDropList_createDom(_c,_d,_e,_f,_10,_11,_12,_13){
try{
var _14=new SYSTEM.Widget.ClassDropButton("dropBtn",_c,_d,_e,_f,_12,_13);
_14.setPosition(0,0);
_14.attach(this.widgetElement);
this.dropBtn=_14;
this.list=new this.SYSTEM.Widget.SelectList();
this.list.setPosition(0,this.dropBtn.height,_11,_10);
this.list.attach(this.widgetElement);
this.setDimensions(this.dropBtn.width,this.dropBtn.height);
var _15=new this.SYSTEM.Delegate(this,this.dropBtnClickEvent);
var _16=new this.SYSTEM.Delegate(this,this.dropBtnExpandEvent);
var _17=new this.SYSTEM.Delegate(this,this.listItemSelectEvent);
var _18=new this.SYSTEM.Delegate(this,this.listItemWidgetEvent);
this.dropBtn.notifyEvent(this.SYSTEM.Event.CLICK_EVENT,_15);
this.dropBtn.notifyEvent(this.SYSTEM.Event.LIST_EXPAND_EVENT,_16);
this.list.notifyEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_17);
this.list.notifyEvent(this.SYSTEM.Event.LIST_ITEM_WIDGET_EVENT,_18);
}
catch(ex){
jsExDebug("widgetDropList_createDom",ex);
}
}
function widgetDropList_bindEvents(){
try{
}
catch(ex){
jsExDebug("widgetDropList_bindEvents",ex);
}
}
function widgetDropList_allowTooltip(_19,_1a,_1b,_1c){
try{
if(_19){
this.dropBtn.defaultBtn.allowTooltip(_19,_1a,_1b,_1c);
}
}
catch(ex){
jsExDebug("widgetDropList_allowTooltip",ex);
}
}
function widgetDropList_allowBorder(_1d){
try{
this.list.allowBorder(_1d);
}
catch(ex){
jsExDebug("widgetDropList_allowBorder",ex);
}
}
function widgetDropList_alignLeft(){
try{
this.list.align(this.list.LEFT_ALIGN);
}
catch(ex){
jsExDebug("widgetDropList_alignLeft",ex);
}
}
function widgetDropList_alignRight(){
try{
this.list.align(this.list.RIGHT_ALIGN);
}
catch(ex){
jsExDebug("widgetDropList_alignRight",ex);
}
}
function widgetDropList_alignCentre(){
try{
this.list.align(this.list.HCENTRE_ALIGN);
}
catch(ex){
jsExDebug("widgetDropList_alignCentre",ex);
}
}
function widgetDropList_verticalAlignCentre(){
try{
this.list.vAlign(this.list.VCENTRE_ALIGN);
}
catch(ex){
jsExDebug("widgetDropList_verticalAlignCentre",ex);
}
}
function widgetDropList_allowSelect(_1e){
try{
this.list.allowSelect(_1e);
}
catch(ex){
jsExDebug("widgetDropList_allowSelect",ex);
}
}
function widgetDropList_allowStartVisible(){
try{
this.list.allowStartVisible();
}
catch(ex){
jsExDebug("widgetDropList_allowStartVisible",ex);
}
}
function widgetDropList_disallowSelectedHighlight(){
try{
this.list.disallowSelectedHighlight();
}
catch(ex){
jsExDebug("widgetDropList_disallowSelectedHighlight",ex);
}
}
function widgetDropList_disallowItemBorder(){
try{
this.list.disallowItemBorder();
}
catch(ex){
jsExDebug("widgetDropList_disallowItemBorder",ex);
}
}
function widgetDropList_setListDimensions(_1f,_20){
try{
this.list.setDimensions(_1f,_20);
}
catch(ex){
jsExDebug("widgetDropList_setListDimensions",ex);
}
}
function widgetDropList_setSelectedIndex(_21,_22){
try{
this.list.setSelectedIndex(_21,this.list,_22);
}
catch(ex){
jsExDebug("widgetDropList_setSelectedIndex",ex);
}
}
function widgetDropList_setSelectedValue(_23,_24){
try{
this.list.setSelectedValue(_23,this.list,_24);
}
catch(ex){
jsExDebug("widgetDropList_setSelectedValue",ex);
}
}
function widgetDropList_expandList(){
try{
this.list.expandList();
}
catch(ex){
jsExDebug("widgetDropList_expandList",ex);
}
}
function widgetDropList_clearList(){
try{
this.list.clearList();
}
catch(ex){
jsExDebug("widgetDropList_clearList",ex);
}
}
function widgetDropList_hideList(){
try{
this.list.hideList();
}
catch(ex){
jsExDebug("widgetDropList_hideList",ex);
}
}
function widgetDropList_addItem(_25,_26,_27,_28,_29,_2a,_2b,_2c){
try{
return this.list.addItem(_25,_26,_27,_28,_29,_2a,_2b,_2c);
}
catch(ex){
jsExDebug("widgetDropList_addItem",ex);
}
}
function widgetDropList_addWidget(_2d,_2e,_2f){
try{
return this.list.addWidget(_2d,_2e,_2f);
}
catch(ex){
jsExDebug("widgetDropList_addWidget",ex);
}
}
function widgetDropList_setWidth(_30){
try{
this.list.setWidth(_30);
}
catch(ex){
jsExDebug("widgetDropList_setWidth",ex);
}
}
function widgetDropList_extendItemContents(_31,_32,_33,_34){
try{
this.list.extendItemContents(_31,_32,_33,_34);
}
catch(ex){
jsExDebug("widgetDropList_extendItemContents",ex);
}
}
function widgetDropList_collapseItemContents(_35){
try{
this.list.collapseItemContents(_35);
}
catch(ex){
jsExDebug("widgetDropList_collapseItemContents",ex);
}
}
function widgetDropList_showExtendedItemContents(_36){
try{
this.list.showExtendedItemContents(_36);
}
catch(ex){
jsExDebug("widgetDropList_showExtendedItemContents",ex);
}
}
function widgetDropList_getSelectedValues(){
try{
return this.list.getSelectedValues();
}
catch(ex){
jsExDebug("widgetDropList_getSelectedValues",ex);
}
}
function widgetDropList_disallowPadding(){
try{
this.list.disallowPadding();
}
catch(ex){
jsExDebug("widgetDropList_disallowPadding",ex);
}
}
function widgetDropList_disallowMouseOverHighlight(){
try{
this.list.disallowMouseOverHighlight();
}
catch(ex){
jsExDebug("widgetDropList_disallowMouseOverHighlight",ex);
}
}
function widgetDropList_getSelectedIndexes(){
try{
return this.list.getSelectedIndexes();
}
catch(ex){
jsExDebug("widgetDropList_getSelectedIndexes",ex);
}
}
function widgetDropList_getSelectedIndex(){
try{
return this.list.getSelectedIndex();
}
catch(ex){
jsExDebug("widgetDropList_getSelectedIndex",ex);
}
}
function widgetDropList_getSelectedValue(){
try{
return this.list.getSelectedValue();
}
catch(ex){
jsExDebug("widgetDropList_getSelectedValue",ex);
}
}
function widgetDropList_setItemPadding(_37,_38){
try{
this.list.setItemPadding(_37,_38);
}
catch(ex){
jsExDebug("widgetDropList_setItemPadding",ex);
}
}
function widgetDropList_disallowFadeIn(){
try{
this.list.disallowFadeIn();
}
catch(ex){
jsExDebug("widgetDropList_disallowFadeIn",ex);
}
}
function widgetDropList_addSeparator(){
try{
this.list.addSeparator();
}
catch(ex){
jsExDebug("widgetDropList_addSeparator",ex);
}
}
function widgetDropList_setButtonTooltip(_39,_3a,_3b,_3c){
try{
this.dropBtn.setTooltip(_39,_3a,_3b,_3c);
}
catch(ex){
jsExDebug("widgetDropList_setButtonTooltip",ex);
}
}
function widgetDropList_dropBtnClickEvent(_3d,_3e){
try{
this.fireEvent(this.SYSTEM.Event.CLICK_EVENT);
}
catch(ex){
jsExDebug("widgetDropList_dropBtnClickEvent",ex);
}
}
function widgetDropList_dropBtnExpandEvent(_3f,_40){
try{
this.list.expandList();
this.fireEvent(this.SYSTEM.Event.LIST_EXPAND_EVENT);
}
catch(ex){
jsExDebug("widgetDropList_dropBtnExpandEvent",ex);
}
}
function widgetDropList_listItemSelectEvent(_41,_42){
try{
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT);
}
catch(ex){
jsExDebug("widgetDropList_listItemSelectEvent",ex);
}
}
function widgetDropList_listItemWidgetEvent(_43,_44){
try{
this.eventWidget=_44.eventWidget;
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_WIDGET_EVENT,null,_44);
}
catch(ex){
jsExDebug("widgetDropList_listItemWidgetEvent",ex);
}
}
function widgetDropList_fireEvent(_45,_46,_47){
try{
if(!this.eventBindings[_45]){
return;
}
if(_46){
var _48=new SYSTEM.Event.Event(_46.mouseX,_46.mouseY);
}else{
var _48=new SYSTEM.Event.Event();
}
for(var i=0;i<this.eventBindings[_45].length;i++){
var _4a=this.eventBindings[_45][i];
_4a.invoke(_48,this,_47);
}
}
catch(ex){
jsExDebug("widgetDropList_fireEvent",ex);
}
}

try{
widgetTable_t.prototype=new widget_t();
widgetTable_t.prototype.widgetTable_super=widget_t.prototype.constructor;
widgetTable_t.prototype.constructor=widgetTable_t;
widgetTable_t.prototype.cleanUp=widgetTable_cleanUp;
widgetTable_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetTable_t.prototype.createDom=widgetTable_createDom;
widgetTable_t.prototype.bindEvents=widgetTable_bindEvents;
widgetTable_t.prototype.setDimensions=widgetTable_setDimensions;
widgetTable_t.prototype.allowSelection=widgetTable_allowSelection;
widgetTable_t.prototype.notifySelectionChange=widgetTable_notifySelectionChange;
widgetTable_t.prototype.notifySelectionRangeExpand=widgetTable_notifySelectionRangeExpand;
widgetTable_t.prototype.notifyDirtyStatusChange=widgetTable_notifyDirtyStatusChange;
widgetTable_t.prototype.notifyStateChange=widgetTable_notifyStateChange;
widgetTable_t.prototype.refitTable=widgetTable_refitTable;
widgetTable_t.prototype.refitColumns=widgetTable_refitColumns;
widgetTable_t.prototype.refitRows=widgetTable_refitRows;
widgetTable_t.prototype.loadDataModule=widgetTable_loadDataModule;
widgetTable_t.prototype.loadDataEntryModule=widgetTable_loadDataEntryModule;
widgetTable_t.prototype.refreshTable=widgetTable_refreshTable;
widgetTable_t.prototype.refreshTableStyles=widgetTable_refreshTableStyles;
widgetTable_t.prototype.refreshRow=widgetTable_refreshRow;
widgetTable_t.prototype.refreshColumnSizes=widgetTable_refreshColumnSizes;
widgetTable_t.prototype.refreshRowSizes=widgetTable_refreshRowSizes;
widgetTable_t.prototype.refreshColumn=widgetTable_refreshColumn;
widgetTable_t.prototype.refreshCell=widgetTable_refreshCell;
widgetTable_t.prototype.refreshCellStyle=widgetTable_refreshCellStyle;
widgetTable_t.prototype.editCell=widgetTable_editCell;
widgetTable_t.prototype.setContent=widgetTable_setContent;
widgetTable_t.prototype.setContentByRef=widgetTable_setContentByRef;
widgetTable_t.prototype.moveContent=widgetTable_moveContent;
widgetTable_t.prototype.moveRowContent=widgetTable_moveRowContent;
widgetTable_t.prototype.moveColumnContent=widgetTable_moveColumnContent;
widgetTable_t.prototype.hideContent=widgetTable_hideContent;
widgetTable_t.prototype.showContent=widgetTable_showContent;
widgetTable_t.prototype.addDimension=widgetTable_addDimension;
widgetTable_t.prototype.setDimensionName=widgetTable_setDimensionName;
widgetTable_t.prototype.getDimensionName=widgetTable_getDimensionName;
widgetTable_t.prototype.getVisibleDimension=widgetTable_getVisibleDimension;
widgetTable_t.prototype.clearDimensions=widgetTable_clearDimensions;
widgetTable_t.prototype.setDirty=widgetTable_setDirty;
widgetTable_t.prototype.hasChanged=widgetTable_hasChanged;
widgetTable_t.prototype.getSettings=widgetTable_getSettings;
widgetTable_t.prototype.getDimensionList=widgetTable_getDimensionList;
widgetTable_t.prototype.getSelection=widgetTable_getSelection;
widgetTable_t.prototype.getVisibleCellExtents=widgetTable_getVisibleCellExtents;
widgetTable_t.prototype.appendColumn=widgetTable_appendColumn;
widgetTable_t.prototype.appendRow=widgetTable_appendRow;
widgetTable_t.prototype.removeColumnsAfter=widgetTable_removeColumnsAfter;
widgetTable_t.prototype.removeRowsAfter=widgetTable_removeRowsAfter;
widgetTable_t.prototype.removeRow=widgetTable_removeRow;
widgetTable_t.prototype.removeCell=widgetTable_removeCell;
widgetTable_t.prototype.attachEventsToCell=widgetTable_attachEventsToCell;
widgetTable_t.prototype.detachEventsFromCell=widgetTable_detachEventsFromCell;
widgetTable_t.prototype.setColumnWidth=widgetTable_setColumnWidth;
widgetTable_t.prototype.setRowHeight=widgetTable_setRowHeight;
widgetTable_t.prototype.calculateTableWidth=widgetTable_calculateTableWidth;
widgetTable_t.prototype.createTable=widgetTable_createTable;
widgetTable_t.prototype.cellHighlight=widgetTable_cellHighlight;
widgetTable_t.prototype.cellHighlightByRef=widgetTable_cellHighlightByRef;
widgetTable_t.prototype.cellDim=widgetTable_cellDim;
widgetTable_t.prototype.cellDimByRef=widgetTable_cellDimByRef;
widgetTable_t.prototype.pendHighlight=widgetTable_pendHighlight;
widgetTable_t.prototype.pendDim=widgetTable_pendDim;
widgetTable_t.prototype.applyPendingHighlights=widgetTable_applyPendingHighlights;
widgetTable_t.prototype.drawBorder=widgetTable_drawBorder;
widgetTable_t.prototype.addColumnResizeControl=widgetTable_addColumnResizeControl;
widgetTable_t.prototype.addRowResizeControl=widgetTable_addRowResizeControl;
widgetTable_t.prototype.cleanUpResizeControl=widgetTable_cleanUpResizeControl;
widgetTable_t.prototype.redraw=widgetTable_redraw;
widgetTable_t.prototype.highlightActive=widgetTable_highlightActive;
widgetTable_t.prototype.dimActive=widgetTable_dimActive;
widgetTable_t.prototype.cellFlash=widgetTable_cellFlash;
widgetTable_t.prototype.calculateWidthAtColumn=widgetTable_calculateWidthAtColumn;
widgetTable_t.prototype.calculateHeightAtRow=widgetTable_calculateHeightAtRow;
widgetTable_t.prototype.doubleClickEvent=widgetTable_doubleClickEvent;
widgetTable_t.prototype.clickEventHandler=widgetTable_clickEventHandler;
widgetTable_t.prototype.mouseDownHandler=widgetTable_mouseDownHandler;
widgetTable_t.prototype.dragOverHandler=widgetTable_dragOverHandler;
widgetTable_t.prototype.dragEndHandler=widgetTable_dragEndHandler;
widgetTable_t.prototype.resizeStartHandler=widgetTable_resizeStartHandler;
widgetTable_t.prototype.resizeColumnEventHandler=widgetTable_resizeColumnEventHandler;
widgetTable_t.prototype.resizeColumnEndEventHandler=widgetTable_resizeColumnEndEventHandler;
widgetTable_t.prototype.resizeRowEventHandler=widgetTable_resizeRowEventHandler;
widgetTable_t.prototype.resizeRowEndEventHandler=widgetTable_resizeRowEndEventHandler;
widgetTable_t.prototype.keyPressHandler=widgetTable_keyPressHandler;
widgetTable_t.prototype.keyDownHandler=widgetTable_keyDownHandler;
widgetTable_t.prototype.keyUpHandler=widgetTable_keyUpHandler;
widgetTable_t.prototype.newDataEntryHandler=widgetTable_newDataEntryHandler;
widgetTable_t.prototype.dataModuleNewDataHandler=widgetTable_dataModuleNewDataHandler;
widgetTable_t.prototype.dataModuleNewStyleHandler=widgetTable_dataModuleNewStyleHandler;
widgetTable_t.prototype.selectionActiveChangeHandler=widgetTable_selectionActiveChangeHandler;
widgetTable_t.prototype.refocusSelection=widgetTable_refocusSelection;
widgetTable_t.prototype.MIN_ROW_HEIGHT=23;
widgetTable_t.prototype.MIN_COL_WIDTH=15;
widgetTable_t.prototype.DEFAULT_CELL_WIDTH=70;
widgetTable_t.prototype.DEFAULT_CELL_HEADING_WIDTH=45;
widgetTable_t.prototype.DEFAULT_CELL_HEIGHT=24;
widgetTable_t.prototype.DEFAULT_CELL_BORDER="solid 1px #BBBBBB";
widgetTable_t.prototype.HIDDEN_CELL_BUFFER=3;
widgetTable_t.prototype.CELL_ACTIVE_COLOUR="#c1e0fc";
widgetTable_t.prototype.CELL_HIGHLIGHT_COLOUR="#eeeeee";
widgetTable_t.prototype.CELL_DEFAULT_COLOUR="#ffffff";
widgetTable_t.prototype.CELL_FLASH_COLOUR="rgb( 242, 244, 142 )";
widgetTable_t.prototype.HEADING_DEFAULT_COLOUR="#e7e1d4";
widgetTable_t.prototype.HEADING_HIGHLIGHT_COLOUR="#ffe473";
widgetTable_t.prototype.HEADING_SELECTED_COLOUR="#3250a0";
widgetTable_t.prototype.HEADING_TEXT_COLOUR="#000000";
widgetTable_t.prototype.HEADING_TEXT_HIGHLIGHT_COLOUR="#ffffff";
widgetTable_t.prototype.PIXEL_IMG="img/site/global/pixel.png";
}
catch(ex){
jsExDebug("widgetTable_t.prototype",ex);
}
function widgetTable_t(_1,_2,_3,_4,_5){
try{
this.widgetTable_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(_4){
this.document=_4;
}else{
this.document=document;
}
this.tableRowCount=0;
this.tableColumnCount=0;
this.frozenX=null;
this.frozenY=null;
this.nrFrozenRows=0;
this.nrFrozenColumns=0;
this.dragSession=null;
this.cellDragSession=null;
this.z=1;
this.dirty=false;
this.table={};
this.table.columnArray=[];
this.table.rowArray=[];
this.zList=[];
this.zNames=[];
this.highestZListIndex=0;
if(!_5){
this.createDom(_2,_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetTable_t",ex);
}
}
function widgetTable_cleanUp(me){
try{
if(!me){
me=this;
}
for(var x=0;x<me.table.columnArray.length;x++){
if(me.table.columnArray[x]){
me.table.columnArray[x].domElement=null;
me.table.columnArray[x]=null;
delete me.table.columnArray[x];
}
}
var _8=null;
var _9=null;
if(me.table&&me.table.rowArray){
for(var y=0;y<me.table.rowArray.length;y++){
_8=me.table.rowArray[y];
if(_8){
for(var x=0;x<_8.cells.length;x++){
_9=_8.cells[x];
me.detachEventsFromCell(_9);
if(_9.resizeDom){
me.cleanUpResizeControl(_9);
}
_9.x=null;
_9.y=null;
_9.cellDom=null;
_9.contentDom=null;
_9.attached=null;
_9.isHighlighted=null;
_9.isActive=null;
_9.hasContent=null;
_9.content=null;
if(_9.columnHeading){
_9.columnHeading.isReflectingHighlight=null;
_9.columnHeading=null;
}
if(_9.rowHeading){
_9.rowHeading.isReflectingHighlight=null;
_9.rowHeading=null;
}
_8.cells[x]=null;
delete _8.cells[x];
}
_8.cells=null;
_8.rowDom=null;
me.table.rowArray[y]=null;
delete me.table.rowArray[y];
}
}
me.table.columnArray=null;
me.table.rowArray=null;
me.table.domElement=null;
me.table.columnGroupDom=null;
me.table=null;
}
if(me.selection){
me.selection.cleanUp();
me.selection=null;
}
if(me.selectionChangeDelegate){
me.selectionChangeDelegate.cleanUp();
me.selectionChangeDelegate=null;
}
me.dragSession=null;
me.cellDragSession=null;
me.tableRowCount=null;
me.tableColumnCount=null;
me.frozenX=null;
me.frozenY=null;
me.nrFrozenRows=null;
me.nrFrozenColumns=null;
me.activeCell=null;
me.dirty=null;
me.stateChangeCallback=null;
me.stateChangeInstance=null;
me.dataEntryModule=null;
me.dataModule=null;
for(var i=0;i<me.zList.length;i++){
if(me.zList[i]){
me.zNames[me.zList[i]]=null;
delete me.zNames[me.zList[i]];
me.zList[i]=null;
delete me.zList[i];
}
}
me.z=null;
me.zList=null;
me.zNames=null;
me.highestZListIndex=null;
me.document=null;
me.tableContainer=null;
if(me.dirtyStatusDelegate){
me.dirtyStatusDelegate.cleanUp();
me.dirtyStatusDelegate=null;
}
if(me.selectionRangeExpandDelegate){
me.selectionRangeExpandDelegate.cleanUp();
me.selectionRangeExpandDelegate=null;
}
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetTable_cleanUp",ex);
}
}
function widgetTable_createDom(_c,_d){
try{
this.width=_c;
this.height=_d;
this.setDimensions(this.width,this.height);
this.widgetElement.style.overflow="hidden";
this.widgetElement.style.backgroundColor="#eeeeee";
this.widgetElement.style.borderRight="solid 1px rgb( 125, 120, 175 )";
this.widgetElement.style.borderBottom="solid 1px rgb( 125, 120, 175 )";
if(!this.document.all){
this.widgetElement.style.borderLeft="solid 1px rgb( 125, 120, 175 )";
this.widgetElement.style.borderTop="solid 1px rgb( 125, 120, 175 )";
}
this.createTable();
}
catch(ex){
jsExDebug("widgetTable_createDom",ex);
}
}
function widgetTable_bindEvents(){
try{
}
catch(ex){
jsExDebug("widgetTable_bindEvents",ex);
}
}
function widgetTable_setDimensions(_e,_f){
try{
if(_e){
this.width=_e;
this.widgetElement.style.width=_e+"px";
}
if(_f){
this.height=_f;
this.widgetElement.style.height=_f+"px";
}
}
catch(ex){
jsExDebug("widgetTable_setDimensions",ex);
}
}
function widgetTable_allowSelection(){
try{
this.selection=new selection_t();
this.selection.notifyActiveChange(this.selectionActiveChangeHandler,this);
this.selection.applyOnClear(this.cellDimCallback,this);
this.selection.applyOnFill(this.cellHighlightCallback,this);
}
catch(eX){
jsExDebug("widgetTable_allowSelection",ex);
}
}
function widgetTable_notifySelectionChange(_10){
try{
if(_10){
this.selectionChangeDelegate=_10;
}
}
catch(ex){
jsExDebug("widgetTable_notifySelectionChange",ex);
}
}
function widgetTable_notifySelectionRangeExpand(_11){
try{
if(_11){
this.selectionRangeExpandDelegate=_11;
}
}
catch(ex){
jsExDebug("widgetTable_notifySelectionRangeExpand",ex);
}
}
function widgetTable_notifyDirtyStatusChange(_12){
try{
if(_12){
this.dirtyStatusDelegate=_12;
}
}
catch(ex){
jsExDebug("widgetTable_notifyDirtyStatusChange",ex);
}
}
function widgetTable_notifyStateChange(_13,_14){
try{
this.stateChangeCallback=_13;
this.stateChangeInstance=_14;
}
catch(ex){
jsExDebug("widgetTable_notifyStateChange",ex);
}
}
function widgetTable_refitColumns(){
try{
if(!this.dataModule){
return;
}
var _15=this.DEFAULT_CELL_HEADING_WIDTH;
var _16=this.scrollX+1;
var _17=false;
var _18=_16+(this.tableColumnCount-2);
var _19=null;
for(var col=_16;col<=_18;col++){
_19=this.dataModule.getColumnWidth(col,this.z);
if(_19==null){
_19=this.DEFAULT_CELL_WIDTH;
}
_15+=_19;
if(_15>this.width){
var _1b=_18-this.HIDDEN_CELL_BUFFER+1;
if(col<_1b){
this.removeColumnsAfter(col+this.HIDDEN_CELL_BUFFER);
}
_17=true;
break;
}
}
if(!_17&&_15<this.width){
var _1c=parseInt((this.width-_15)/this.DEFAULT_CELL_WIDTH)+this.HIDDEN_CELL_BUFFER;
for(var i=0;i<_1c;i++){
this.appendColumn();
}
}
this.refreshTable();
this.selection.applyFunction(this.cellHighlightCallback,this);
}
catch(ex){
jsExDebug("widgetTable_refitColumns",ex);
}
}
function widgetTable_refitRows(){
try{
if(!this.dataModule){
return;
}
var _1e=this.DEFAULT_CELL_HEIGHT;
var _1f=this.scrollY+1;
var _20=_1f+this.tableRowCount-2;
var _21=null;
var _22=false;
for(var row=_1f;row<=_20;row++){
_21=this.dataModule.getRowHeight(row,this.z);
if(_21==null){
_21=this.DEFAULT_CELL_HEIGHT;
}
_1e+=_21;
if(_1e>this.height){
var _24=_20-this.HIDDEN_CELL_BUFFER+1;
if(row<_24){
this.removeRowsAfter(row+this.HIDDEN_CELL_BUFFER);
}
_22=true;
break;
}
}
if(!_22&&_1e<this.height){
var _25=parseInt((this.height-_1e)/this.DEFAULT_CELL_HEIGHT)+this.HIDDEN_CELL_BUFFER;
for(i=0;i<_25;i++){
this.appendRow();
}
}
this.refreshTable();
this.selection.applyFunction(this.cellHighlightCallback,this);
}
catch(ex){
jsExDebug("widgetTable_refitRows",ex);
}
}
function widgetTable_refitTable(){
try{
if(!this.dataModule){
return;
}
var _26=this.DEFAULT_CELL_HEIGHT;
var _27=this.scrollY+1;
var _28=_27+this.tableRowCount-2;
var _29=null;
var _2a=false;
for(var row=_27;row<=_28;row++){
_29=this.dataModule.getRowHeight(row,this.z);
if(_29==null){
_29=this.DEFAULT_CELL_HEIGHT;
}
_26+=_29;
if(_26>this.height){
var _2c=_28-this.HIDDEN_CELL_BUFFER+1;
if(row<_2c){
this.removeRowsAfter(row+this.HIDDEN_CELL_BUFFER);
}
_2a=true;
break;
}
}
if(!_2a&&_26<this.height){
var _2d=parseInt((this.height-_26)/this.DEFAULT_CELL_HEIGHT)+this.HIDDEN_CELL_BUFFER;
for(i=0;i<_2d;i++){
this.appendRow();
}
}
var _2f=this.DEFAULT_CELL_HEADING_WIDTH;
var _30=this.scrollX+1;
var _31=false;
var _32=_30+(this.tableColumnCount-2);
var _33=null;
for(var col=_30;col<=_32;col++){
_33=this.dataModule.getColumnWidth(col,this.z);
if(_33==null){
_33=this.DEFAULT_CELL_WIDTH;
}
_2f+=_33;
if(_2f>this.width){
var _35=_32-this.HIDDEN_CELL_BUFFER+1;
if(col<_35){
this.removeColumnsAfter(col+this.HIDDEN_CELL_BUFFER);
}
_31=true;
break;
}
}
if(!_31&&_2f<this.width){
var _36=parseInt((this.width-_2f)/this.DEFAULT_CELL_WIDTH)+this.HIDDEN_CELL_BUFFER;
for(var i=0;i<_36;i++){
this.appendColumn();
}
}
this.refreshTable();
this.selection.applyFunction(this.cellHighlightCallback,this);
}
catch(ex){
jsExDebug("widgetTable_refitTable",ex);
}
}
function widgetTable_loadDataModule(_37){
try{
this.dataModule=_37;
this.dataModule.setDisplayModule(this);
this.dataModule.notifyContentChange(new SYSTEM.Delegate(this,this.dataModuleNewDataHandler),new SYSTEM.Delegate(this,this.dataModuleNewStyleHandler));
this.refreshTable();
}
catch(ex){
jsExDebug("widgetTable_loadDataModule",ex);
}
}
function widgetTable_loadDataEntryModule(_38){
try{
this.dataEntryModule=_38;
this.dataEntryModule.notifyNewData(this.newDataEntryHandler,this);
}
catch(ex){
jsExDebug("widgetTable_dataEntryModule",ex);
}
}
function widgetTable_refreshTable(){
try{
if(this.dataModule){
for(var y=0;y<this.tableRowCount;y++){
for(var x=0;x<this.tableColumnCount;x++){
var _3b=this.translateDisplayToData(x,y);
var _3c=this.dataModule.getContent(_3b.y,_3b.x,this.z);
this.setContent(x,y,_3c);
this.refreshCellStyle(x,y);
}
}
}
}
catch(ex){
jsExDebug("widgetTable_refreshTable",ex);
}
}
function widgetTable_refreshTableStyles(){
try{
if(this.dataModule){
for(var y=0;y<this.tableRowCount;y++){
if(this.table.rowArray[y]){
var row=this.table.rowArray[y];
for(var x=0;x<this.tableColumnCount;x++){
if(row.cells[x]&&row.cells[x].contentDom){
var _40=this.translateDisplayToData(x,y);
this.dataModule.applyStyle(_40.y,_40.x,this.z,row.cells[x].contentDom);
}
}
}
}
}
}
catch(ex){
jsExDebug("widgetTable_refreshTableStyles",ex);
}
}
function widgetTable_refreshRow(row){
try{
var _42=null;
var _43=null;
if(this.dataModule){
for(var x=0;x<this.tableColumnCount;x++){
_42=this.translateDisplayToData(x,row);
_43=this.dataModule.getContent(_42.y,_42.x,this.z);
this.setContent(x,row,_43);
}
}
}
catch(ex){
jsExDebug("widgetTable_refreshRow:"+row,ex);
}
}
function widgetTable_refreshColumnSizes(){
try{
var _45;
for(var x=0;x<this.tableColumnCount;x++){
var _47=this.translateDisplayToData(x,null);
if(x==0){
_45=this.DEFAULT_CELL_HEADING_WIDTH;
}else{
_45=this.dataModule.getColumnWidth(_47.x,this.z);
if(_45==null){
_45=this.DEFAULT_CELL_WIDTH;
}
}
this.table.columnArray[x].domElement.style.width=_45+"px";
this.table.columnArray[x].width=_45;
}
this.redraw();
}
catch(ex){
jsExDebug("widgetTable_refreshColumnSizes",ex);
}
}
function widgetTable_refreshRowSizes(){
try{
var _48=null;
var _49=this.scrollY;
var _4a=null;
for(var y=0;y<this.tableRowCount;y++){
if(y==0){
_48=this.DEFAULT_CELL_HEIGHT;
}else{
_48=this.dataModule.getRowHeight(y+_49,this.z);
if(_48==null){
_48=this.DEFAULT_CELL_HEIGHT;
}
}
this.table.rowArray[y].rowDom.style.height=_48+"px";
this.table.rowArray[y].height=_48;
}
this.redraw();
}
catch(ex){
jsExDebug("widgetTable_refreshRowSizes",ex);
}
}
function widgetTable_refreshColumn(_4c){
try{
if(this.dataModule){
for(var y=0;y<this.tableRowCount;y++){
var _4e=this.translateDisplayToData(_4c,y);
var _4f=this.dataModule.getContent(_4e.y,_4e.x,this.z);
this.setContent(_4c,y,_4f);
}
}
}
catch(ex){
jsExDebug("widgetTable_refreshColumn",ex);
}
}
function widgetTable_refreshCell(_50,_51){
try{
if(this.dataModule){
var _52=this.translateDisplayToData(_50,_51);
var _53=this.dataModule.getContent(_52.y,_52.x,this.z);
this.setContent(_50,_51,_53);
this.refreshCellStyle(_50,_51);
}
}
catch(ex){
jsExDebug("widgetTable_refreshCell",ex);
}
}
function widgetTable_refreshCellStyle(_54,_55){
try{
if(!this.table.rowArray[_55]||!this.table.rowArray[_55].cells[_54]){
return;
}
var _56=this.table.rowArray[_55].cells[_54];
if(this.dataModule&&_56.contentDom){
var _57=this.translateDisplayToData(_54,_55);
this.dataModule.applyStyle(_57.y,_57.x,this.z,_56.contentDom);
}
}
catch(ex){
jsExDebug("widgetTable_refreshCellStyle",ex);
}
}
function widgetTable_editCell(_58,_59,_5a){
try{
var _5b=this.table.rowArray[_59].cells[_58];
this.hideContent();
if(this.dataModule){
var _5c=this.dataModule.getFormula(_59,_58,this.z);
this.dataEntryModule.edit(_5b.cellDom,_5a,_5b,"showContent",this);
}
}
catch(ex){
jsExDebug("widgetTable_editCell",ex);
}
}
function widgetTable_setContent(_5d,_5e,_5f){
try{
var row=this.table.rowArray[_5e];
if(row&&row.cells[_5d]){
this.setContentByRef(row.cells[_5d],_5f);
}
}
catch(ex){
jsExDebug("widgetTable_setContent",ex);
}
}
function widgetTable_setContentByRef(_61,_62){
try{
if(_61){
if(_62.toString()!=""){
if(!_61.contentDom){
var _63=document.createElement("div");
_63.style.whiteSpace="nowrap";
_63.style.paddingLeft="2px";
_63.style.paddingRight="2px";
_63.style.cursor="default";
_63.style.overflow="hidden";
if(_61.x==0){
_61.cellDom.insertBefore(_63,_61.cellDom.firstChild);
}else{
_61.cellDom.appendChild(_63);
}
_61.contentDom=_63;
if(this.dataModule){
var _64=this.translateDisplayToData(_61.x,_61.y);
this.dataModule.applyStyle(_64.y,_64.x,this.z,_63);
}
}
_61.hasContent=true;
_61.content=_62;
_61.contentDom.innerHTML=_62;
}else{
if(_61.hasContent){
_61.hasContent=false;
try{
_61.cellDom.removeChild(_61.contentDom);
}
catch(ex){
}
_61.contentDom=null;
_61.content="";
}
}
}else{
jsDebug("no cell in widgetTable_setContentByRef, stack: "+caller);
}
}
catch(ex){
jsExDebug("widgetTable_setContentByRef : ",ex);
}
}
function widgetTable_moveContent(_65,_66,toX,toY){
try{
if(_65==toX&&_66==toY){
return false;
}
var _69=this.table.rowArray[_66].cells[_65];
var _6a=this.table.rowArray[toY].cells[toX];
if(_69.hasContent){
if(_6a.hasContent){
_6a.cellDom.removeChild(_6a.contentDom);
}
_69.hasContent=false;
_69.cellDom.removeChild(_69.contentDom);
_6a.contentDom=_69.contentDom;
if(_6a.x==0){
_6a.cellDom.insertBefore(_6a.contentDom,_6a.cellDom.firstChild);
}else{
_6a.cellDom.appendChild(_6a.contentDom);
}
_6a.content=_69.content;
_6a.hasContent=true;
_69.contentDom=null;
_69.content="";
return true;
}else{
if(_6a.hasContent){
_6a.cellDom.removeChild(_6a.contentDom);
_6a.contentDom=null;
_6a.hasContent=false;
_6a.content="";
}
}
}
catch(ex){
jsExDebug("widgetTable_moveContent : fromY = "+_66,ex);
}
}
function widgetTable_moveRowContent(_6b,_6c){
try{
}
catch(ex){
jsExDebug("widgetTable_moveRowContent",ex);
}
}
function widgetTable_moveColumnContent(_6d,_6e){
try{
}
catch(ex){
jsExDebug("widgetTable_moveColumnContent",ex);
}
}
function widgetTable_hideContent(_6f,_70){
try{
if(arguments.length==0){
var _71=this.activeCell;
}else{
var _71=this.table.rowArray[_70].cells[_6f];
}
if(_71&&_71.contentDom&&(_71.contentDom.attached!=false)){
_71.cellDom.removeChild(_71.contentDom);
_71.contentDom.attached=false;
}
}
catch(ex){
jsExDebug("widgetTable_hideContent",ex);
}
}
function widgetTable_showContent(_72,_73){
try{
if(arguments.length==0){
var _74=this.activeCell;
}else{
var _74=this.table.rowArray[_73].cells[_72];
}
if(_74&&_74.contentDom&&!_74.contentDom.attached){
_74.cellDom.insertBefore(_74.contentDom,null);
_74.contentDom.attached=true;
}
}
catch(ex){
jsExDebug("widgetTable_showContent",ex);
}
}
function widgetTable_addDimension(_75,_76){
try{
if(_75==null){
var _75=this.zList.length;
}else{
_75=Math.abs(_75);
}
if(_75>this.highestZListIndex){
this.highestZListIndex=_75;
}
if(!_76){
var _76="Sheet"+_75;
}else{
_76=_76.replace(/[^A-Z_0-9]/ig,"");
}
if(this.zList[_75]){
for(var i=this.highestZListIndex;i>=_75;i--){
if(this.zList[i]){
this.zList[i+1]=this.zList[i];
this.zList[i]=null;
}
}
this.highestZListIndex++;
}
if(!this.dataModule.sheetExists(_75,_76)){
this.dataModule.addDimension(_75,_76);
}
this.zList[_75]=_76;
this.zNames[_76]=this.zList[_75];
}
catch(ex){
jsExDebug("widgetTable_addDimension",ex);
}
}
function widgetTable_setDimensionName(_78,_79){
try{
if(!this.zList[_78]){
return false;
}
_79=_79.replace(/[^A-Z_0-9]/ig,"");
if(this.dataModule){
this.dataModule.setDimensionName(_78,_79);
}
this.zList[_78]=_79;
return true;
}
catch(ex){
jsExDebug("widgetTable_setDimensionName",ex);
}
}
function widgetTable_getDimensionName(_7a){
try{
return this.zList[_7a];
}
catch(ex){
jsExDebug("widgetTable_getDimensionName",ex);
}
}
function widgetTable_getVisibleDimension(){
try{
return this.z;
}
catch(ex){
jsExDebug("widgetTable_getVisibleDimension",ex);
}
}
function widgetTable_clearDimensions(){
try{
for(var i=0;i<this.zList.length;i++){
if(this.zList[i]){
this.zNames[this.zList[i]]=null;
delete this.zNames[this.zList[i]];
this.zList[i]=null;
delete this.zList[i];
}
}
this.z=null;
this.zList=[];
this.zNames=[];
this.highestZListIndex=null;
}
catch(ex){
jsExDebug("widgetTable_clearDimensions",ex);
}
}
function widgetTable_setDirty(_7c){
try{
this.dirty=_7c;
if(this.dirtyStatusDelegate){
this.dirtyStatusDelegate.invoke(_7c);
}
}
catch(ex){
jsExDebug("widgetTable_setDirty",ex);
}
}
function widgetTable_hasChanged(){
try{
return this.dirty;
}
catch(ex){
jsExDebug("widgetTable_hasChanged",ex);
}
}
function widgetTable_getSettings(){
try{
}
catch(ex){
jsExDebug("widgetTable_getSettings",ex);
}
}
function widgetTable_getDimensionList(){
try{
return this.zList;
}
catch(ex){
jsExDebug("widgetTable_getDimensionList",ex);
}
}
function widgetTable_getSelection(){
try{
return this.selection;
}
catch(ex){
jsExDebug("widgetTable_getSelection",ex);
}
}
function widgetTable_getVisibleCellExtents(){
try{
var _7d=this.translateDisplayToData(1,1);
var _7e=this.translateDisplayToData(this.tableColumnCount-this.HIDDEN_CELL_BUFFER,this.tableRowCount-this.HIDDEN_CELL_BUFFER);
return {x1:_7d.x,x2:_7e.x,y1:_7d.y,y2:_7e.y};
}
catch(ex){
jsExDebug("widgetTable_getVisibleCellExtents",ex);
}
}
function widgetTable_appendColumn(){
try{
var _7f=this.tableColumnCount;
var _80=this.table.rowArray[0];
var _81=new Object();
_81.domElement=document.createElement("col");
this.table.columnGroupDom.appendChild(_81.domElement);
this.table.columnArray.push(_81);
for(var y=0;y<this.tableRowCount;y++){
var _83=new Object();
_83.cellDom=this.table.rowArray[y].rowDom.insertCell(_7f);
_83.cellDom.style.border=this.DEFAULT_CELL_BORDER;
_83.cellDom.style.overflow="hidden";
_83.contentDom=null;
_83.x=_7f;
_83.y=y;
_83.rowHeading=_80.cells[_7f];
_83.columnHeading=this.table.rowArray[y].cells[0];
this.table.rowArray[y].cells[_7f]=_83;
this.attachEventsToCell(_7f,y,_83.cellDom);
}
var _84=this.table.rowArray[0].cells[_7f].cellDom;
_84.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
_84.style.color=this.HEADING_TEXT_COLOUR;
_84.style.textAlign="center";
this.addColumnResizeControl(_7f,0);
this.calculateTableWidth();
this.table.domElement.style.width=this.tableWidth+"px";
this.tableColumnCount++;
if(this.dataModule){
var _85=this.translateDisplayToData(_7f).x;
var _86=this.dataModule.getColumnWidth(_85,this.z);
if(_86==null){
_86=this.DEFAULT_CELL_WIDTH;
}
}else{
_86=this.DEFAULT_CELL_WIDTH;
}
this.setColumnWidth(_7f,_86);
}
catch(ex){
jsExDebug("widgetTable_appendColumn ("+_7f+")",ex);
}
}
function widgetTable_appendRow(){
try{
var _87=this.tableRowCount;
var _88=this.table.rowArray[0];
var row=new Object();
row.rowDom=this.table.domElement.insertRow(_87);
row.cells=new Array();
this.table.rowArray[_87]=row;
for(var x=0;x<this.tableColumnCount;x++){
var _8b=new Object();
_8b.cellDom=row.rowDom.insertCell(x);
_8b.cellDom.style.border=this.DEFAULT_CELL_BORDER;
_8b.cellDom.style.overflow="hidden";
_8b.contentDom=null;
_8b.x=x;
_8b.y=_87;
row.cells[x]=_8b;
_8b.rowHeading=row.cells[0];
_8b.columnHeading=_88.cells[x];
this.attachEventsToCell(x,_87,_8b.cellDom);
}
var _8c=row.cells[0].cellDom;
_8c.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
_8c.style.color=this.HEADING_TEXT_COLOUR;
_8c.style.textAlign="center";
this.addRowResizeControl(0,_87);
this.tableRowCount++;
if(this.dataModule){
var _8d=this.translateDisplayToData(null,_87).y;
var _8e=this.dataModule.getRowHeight(_8d,this.z);
if(_8e==null){
_8e=this.DEFAULT_CELL_HEIGHT;
}
}else{
_8e=this.DEFAULT_CELL_HEIGHT;
}
this.setRowHeight(_87,_8e);
}
catch(ex){
jsExDebug("widgetTable_appendRow",ex);
}
}
function widgetTable_removeColumnsAfter(_8f){
try{
for(var y=0;y<this.table.rowArray.length;y++){
if(!this.table.rowArray[y]){
continue;
}
for(var x=this.tableColumnCount-1;x>_8f;x--){
this.removeCell(x,y);
}
}
this.calculateTableWidth();
this.table.domElement.style.width=this.tableWidth+"px";
this.tableColumnCount=_8f+1;
}
catch(ex){
jsExDebug("widgetTable_removeColumnsAfter",ex);
}
}
function widgetTable_removeRowsAfter(_92){
try{
for(var y=this.tableRowCount-1;y>_92;y--){
this.removeRow(y);
}
this.tableRowCount=_92+1;
}
catch(ex){
jsExDebug("widgetTable_removeRowsAfter",ex);
}
}
function widgetTable_removeRow(_94){
try{
for(var x=0;x<this.table.rowArray[_94].cells.length;x++){
if(this.table.rowArray[_94].cells[x]){
this.removeCell(x,_94);
}
}
this.SYSTEM.Dom.freeDom(this.table.rowArray[_94].rowDom);
this.table.domElement.deleteRow(_94);
this.table.rowArray[_94].rowDom=null;
this.table.rowArray[_94].cells=null;
this.table.rowArray[_94]=null;
delete this.table.rowArray[_94];
}
catch(ex){
jsExDebug("widgetTable_removeRow "+_94,ex);
}
}
function widgetTable_removeCell(_96,_97){
try{
if(!this.table.rowArray[_97]){
return;
}else{
if(!this.table.rowArray[_97].cells[_96]){
return;
}
}
this.table.rowArray[_97].rowDom.removeChild(this.table.rowArray[_97].cells[_96].cellDom);
this.detachEventsFromCell(this.table.rowArray[_97].cells[_96].cellDom);
this.SYSTEM.Dom.freeDom(this.table.rowArray[_97].cells[_96].cellDom);
this.table.rowArray[_97].cells[_96].contentDom=null;
this.table.rowArray[_97].cells[_96].isHighlighted=null;
this.table.rowArray[_97].cells[_96].cellDom=null;
this.table.rowArray[_97].cells[_96]=null;
delete this.table.rowArray[_97].cells[_96];
this.table.rowArray[_97].cells.length--;
}
catch(ex){
jsExDebug("widgetTable_removeCell",ex);
}
}
function widgetTable_attachEventsToCell(_98,_99,_9a){
try{
this.SYSTEM.Event.setDragEnablingParameters(_9a);
this.SYSTEM.Event.attachEvent(_9a,"onmousedown","mousedown",this.mouseDownHandler,this,true,{x:_98,y:_99});
this.SYSTEM.Event.attachEvent(_9a,"onmouseenter","mouseover",this.dragOverHandler,this,false,{x:_98,y:_99});
this.SYSTEM.Event.attachEvent(_9a,"onmouseup","mouseup",this.dragEndHandler,this,true,{x:_98,y:_99});
this.SYSTEM.Event.attachEvent(_9a,"ondblclick","dblclick",this.doubleClickEvent,this,false,{x:_98,y:_99});
this.SYSTEM.Event.attachEvent(_9a,"onclick","click",this.clickEvent,this,false,{x:_98,y:_99});
}
catch(ex){
jsExDebug("widgetTable_attachEventsToCell",ex);
}
}
function widgetTable_detachEventsFromCell(_9b){
try{
this.SYSTEM.Event.detachEvent(_9b,"onmousedown","mousedown");
this.SYSTEM.Event.detachEvent(_9b,"onmouseenter","mouseover");
this.SYSTEM.Event.detachEvent(_9b,"onmouseup","mouseup");
this.SYSTEM.Event.detachEvent(_9b,"ondblclick","dblclick");
}
catch(ex){
jsExDebug("widgetTable_detachEventsFromCell",ex);
}
}
function widgetTable_setColumnWidth(_9c,_9d){
try{
this.table.columnArray[_9c].domElement.style.width=_9d+"px";
this.table.columnArray[_9c].width=_9d;
if(this.dataModule){
this.dataModule.setColumnWidth(_9c,this.z,_9d);
}
}
catch(ex){
jsExDebug("widgetTable_setRowWidth",ex);
}
}
function widgetTable_setRowHeight(_9e,_9f){
try{
this.table.rowArray[_9e].rowDom.style.height=_9f+"px";
this.table.rowArray[_9e].height=_9f;
if(this.dataModule){
this.dataModule.setRowHeight(_9e,this.z,_9f);
}
}
catch(ex){
jsExDebug("widgetTable_setRowHeight",ex);
}
}
function widgetTable_calculateTableWidth(){
try{
return;
var _a0=0;
for(var x=0;x<this.table.columnArray.length;x++){
var _a2=this.table.columnArray[x];
if(_a2){
_a0+=(_a2.width?_a2.width:this.DEFAULT_CELL_WIDTH);
}
}
return this.tableWidth;
}
catch(ex){
jsExDebug("widgetTable_calculateTableWidth",ex);
}
}
function widgetTable_createTable(){
try{
this.tableContainer=document.createElement("div");
this.widgetElement.appendChild(this.tableContainer);
this.tableWidth=0;
var _a3=this.document.createElement("table");
_a3.style.backgroundColor="#ffffff";
_a3.style.emptyCells="show";
_a3.style.borderCollapse="collapse";
_a3.style.tableLayout="fixed";
_a3.cellpadding="0px";
_a3.style.width=this.tableWidth+"px";
_a3.style.overflow="hidden";
this.table.domElement=_a3;
var _a4=parseInt((this.width+(this.HIDDEN_CELL_BUFFER*this.DEFAULT_CELL_WIDTH))/this.DEFAULT_CELL_WIDTH);
var _a5=parseInt((this.height+(this.HIDDEN_CELL_BUFFER*this.DEFAULT_CELL_HEIGHT))/this.DEFAULT_CELL_HEIGHT);
this.table.columnGroupDom=document.createElement("colgroup");
this.table.domElement.appendChild(this.table.columnGroupDom);
for(var i=0;i<_a4;i++){
var _a7=new Object();
_a7.domElement=document.createElement("col");
this.table.columnGroupDom.appendChild(_a7.domElement);
if(i==0){
_a7.domElement.style.width=this.DEFAULT_CELL_HEADING_WIDTH+"px";
_a7.width=this.DEFAULT_CELL_HEADING_WIDTH;
}else{
_a7.domElement.style.width=this.DEFAULT_CELL_WIDTH+"px";
_a7.width=this.DEFAULT_CELL_WIDTH;
}
this.table.columnArray.push(_a7);
this.setColumnWidth(i,this.DEFAULT_CELL_WIDTH);
}
for(var y=0;y<_a5;y++){
var row=new Object();
row.rowDom=this.table.domElement.insertRow(y);
row.cells=new Array();
this.table.rowArray[y]=row;
for(var x=0;x<_a4;x++){
var _ab=new Object();
_ab.cellDom=row.rowDom.insertCell(x);
_ab.cellDom.style.border=this.DEFAULT_CELL_BORDER;
_ab.cellDom.style.overflow="hidden";
_ab.contentDom=null;
_ab.x=x;
_ab.y=y;
row.cells[x]=_ab;
_ab.rowHeading=row.cells[0];
_ab.columnHeading=this.table.rowArray[0].cells[x];
this.attachEventsToCell(x,y,_ab.cellDom);
if(!x&&y){
this.addRowResizeControl(x,y);
_ab.cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
_ab.cellDom.style.color=this.HEADING_TEXT_COLOUR;
_ab.cellDom.style.textAlign="center";
}
if(!y&&x){
this.addColumnResizeControl(x,y);
_ab.cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
_ab.cellDom.style.color=this.HEADING_TEXT_COLOUR;
_ab.cellDom.style.textAlign="center";
}
if(!x&&!y){
_ab.cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
_ab.cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
}
}
this.tableRowCount=_a5;
this.tableColumnCount=_a4;
for(var y=0;y<this.tableRowCount;y++){
this.setRowHeight(y,this.DEFAULT_CELL_HEIGHT);
}
this.calculateTableWidth();
_a3.style.width=this.tableWidth+"px";
this.tableContainer.appendChild(_a3);
this.redraw();
}
catch(ex){
jsExDebug("widgetTable_createTable",ex);
}
}
function widgetTable_cellHighlight(x,y){
try{
if(x>=0&&y>=0&&x<this.tableColumnCount&&y<this.tableRowCount){
this.cellHighlightByRef(this.table.rowArray[y].cells[x]);
}else{
if(x<0&&y<0){
return;
}
y=(y<0?0:y);
x=(x<0?0:x);
if(y==0||y>this.tableRowCount){
if(x<this.tableColumnCount&&!this.table.rowArray[0].cells[x].columnHeading.isReflectingHighlight){
this.table.rowArray[0].cells[x].columnHeading.isReflectingHighlight=true;
this.table.rowArray[0].cells[x].columnHeading.cellDom.style.backgroundColor=this.HEADING_HIGHLIGHT_COLOUR;
}
}
if(x==0||x>this.tableColumnCount){
if(y<this.tableRowCount&&!this.table.rowArray[y].cells[1].rowHeading.isReflectingHighlight){
this.table.rowArray[y].cells[1].rowHeading.isReflectingHighlight=true;
this.table.rowArray[y].cells[1].rowHeading.cellDom.style.backgroundColor=this.HEADING_HIGHLIGHT_COLOUR;
}
}
}
}
catch(ex){
jsExDebug("widgetTable_cellHighlight",ex);
}
}
function widgetTable_cellHighlightByRef(_ae){
try{
var _af=new Array();
var x=_ae.x;
var y=_ae.y;
var _b2=this.tableRowCount;
var _b3=this.tableColumnCount;
if(x<0&&y<0){
return;
}
if(!x&&!y){
for(var y=0;y<_b2;y++){
var row=this.table.rowArray[y];
if(y){
row.cells[0].cellDom.style.backgroundColor=this.HEADING_SELECTED_COLOUR;
row.cells[0].cellDom.style.color=this.HEADING_TEXT_HIGHLIGHT_COLOUR;
}
for(var x=0;x<_b3;x++){
if(!y&&x){
row.cells[x].cellDom.style.backgroundColor=this.HEADING_SELECTED_COLOUR;
row.cells[x].cellDom.style.color=this.HEADING_TEXT_HIGHLIGHT_COLOUR;
}else{
if(x){
if(!row.cells[x].isHighlighted){
row.cells[x].isHighlighted=true;
if(!row.cells[x].isActive){
row.cells[x].cellDom.style.backgroundColor=this.CELL_HIGHLIGHT_COLOUR;
}
}
}
}
}
}
}
if(!x){
var row=this.table.rowArray[y];
for(var xi=1;xi<_b3;xi++){
row.cells[xi].isHighlighted=true;
if(!row.cells[xi].isActive){
row.cells[xi].cellDom.style.backgroundColor=this.CELL_HIGHLIGHT_COLOUR;
}
}
row.cells[0].isHighlighted=true;
row.cells[0].cellDom.style.backgroundColor=this.HEADING_SELECTED_COLOUR;
row.cells[0].cellDom.style.color=this.HEADING_TEXT_HIGHLIGHT_COLOUR;
}
if(!y){
for(var yi=1;yi<_b2;yi++){
this.table.rowArray[yi].cells[x].isHighlighted=true;
if(!this.table.rowArray[yi].cells[x].isActive){
this.table.rowArray[yi].cells[x].cellDom.style.backgroundColor=this.CELL_HIGHLIGHT_COLOUR;
}
}
this.table.rowArray[0].cells[x].isHighlighted=true;
this.table.rowArray[0].cells[x].cellDom.style.backgroundColor=this.HEADING_SELECTED_COLOUR;
this.table.rowArray[0].cells[x].cellDom.style.color=this.HEADING_TEXT_HIGHLIGHT_COLOUR;
}
if(!_ae.isHighlighted){
if(x>0&&y>0&&x<_b3&&y<_b2){
_ae.isHighlighted=true;
if(!_ae.isActive){
_ae.cellDom.style.backgroundColor=this.CELL_HIGHLIGHT_COLOUR;
}
}
if(!_ae.columnHeading.isReflectingHighlight){
_ae.columnHeading.isReflectingHighlight=true;
_ae.columnHeading.cellDom.style.backgroundColor=this.HEADING_HIGHLIGHT_COLOUR;
}
if(!_ae.rowHeading.isReflectingHighlight){
_ae.rowHeading.isReflectingHighlight=true;
_ae.rowHeading.cellDom.style.backgroundColor=this.HEADING_HIGHLIGHT_COLOUR;
}
}
}
catch(ex){
jsExDebug("widgetTable_cellHighlightByRef;",ex);
}
}
function widgetTable_cellDim(x,y){
try{
if(x>=0&&y>=0&&x<this.tableColumnCount&&y<this.tableRowCount){
this.cellDimByRef(this.table.rowArray[y].cells[x]);
}else{
if(x<0&&y<0){
return;
}
y=(y<0?0:y);
x=(x<0?0:x);
if(y==0||y>this.tableRowCount){
if(x<this.tableColumnCount&&this.table.rowArray[0].cells[x].columnHeading.isReflectingHighlight){
this.table.rowArray[0].cells[x].columnHeading.isReflectingHighlight=false;
this.table.rowArray[0].cells[x].columnHeading.cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
this.table.rowArray[0].cells[x].columnHeading.cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
}
if(x==0||x>this.tableColumnCount){
if(y<this.tableRowCount&&this.table.rowArray[y].cells[1].rowHeading.isReflectingHighlight){
this.table.rowArray[y].cells[1].rowHeading.isReflectingHighlight=false;
this.table.rowArray[y].cells[1].rowHeading.cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
this.table.rowArray[y].cells[1].rowHeading.cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
}
}
}
catch(ex){
jsExDebug("widgetTable_cellDim",ex);
}
}
function widgetTable_cellDimByRef(_b9){
try{
var _ba=new Array();
var x=_b9.x;
var y=_b9.y;
var _bd=this.tableRowCount;
var _be=this.tableColumnCount;
if(x<0&&y<0){
return;
}
if(!x&&!y){
for(var y=0;y<_bd;y++){
var row=this.table.rowArray[y];
if(y){
row.cells[0].cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
row.cells[0].cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
for(var x=0;x<_be;x++){
if(!y&&x){
row.cells[x].cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
row.cells[x].cellDom.style.color=this.HEADING_TEXT_COLOUR;
}else{
if(x){
if(row.cells[x].isHighlighted){
row.cells[x].isHighlighted=false;
if(!row.cells[x].isActive){
row.cells[x].cellDom.style.backgroundColor=this.CELL_DEFAULT_COLOUR;
}
}
}
}
}
}
}
if(!x){
var row=this.table.rowArray[y];
for(var xi=1;xi<_be;xi++){
row.cells[xi].isHighlighted=false;
if(!row.cells[xi].isActive){
row.cells[xi].cellDom.style.backgroundColor=this.CELL_DEFAULT_COLOUR;
}
}
row.cells[0].isHighlighted=false;
row.cells[0].cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
row.cells[0].cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
if(!y){
for(var yi=1;yi<_bd;yi++){
this.table.rowArray[yi].cells[x].isHighlighted=false;
if(!this.table.rowArray[yi].cells[x].isActive){
this.table.rowArray[yi].cells[x].cellDom.style.backgroundColor=this.CELL_DEFAULT_COLOUR;
}
}
this.table.rowArray[0].cells[x].isHighlighted=false;
this.table.rowArray[0].cells[x].cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
this.table.rowArray[0].cells[x].cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
if(_b9.isHighlighted){
if(x>0&&y>0&&x<_be&&y<_bd){
_b9.isHighlighted=false;
if(!_b9.isActive){
_b9.cellDom.style.backgroundColor=this.CELL_DEFAULT_COLOUR;
}
}
if(_b9.columnHeading.isReflectingHighlight){
_b9.columnHeading.isReflectingHighlight=false;
_b9.columnHeading.cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
_b9.columnHeading.cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
if(_b9.rowHeading.isReflectingHighlight){
_b9.rowHeading.isReflectingHighlight=false;
_b9.rowHeading.cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
_b9.rowHeading.cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
}
}
catch(ex){
jsExDebug("widgetTable_cellDim",ex);
}
}
function widgetTable_pendHighlight(_c2,x,y){
try{
var _c5=this.table.rowArray[y].cells[x];
_c5.pendHighlight=true;
_c5.pendDim=false;
_c2.push(_c5);
}
catch(ex){
jsExDebug("widgetTable_pendHighlight",ex);
}
}
function widgetTable_pendDim(_c6,x,y){
try{
var _c9=this.table.rowArray[y].cells[x];
_c9.pendHighlight=false;
_c9.pendDim=true;
_c6.push(_c9);
}
catch(ex){
jsExDebug("widgetTable_pendDim",ex);
}
}
function widgetTable_applyPendingHighlights(_ca){
try{
for(var i=0;i<_ca.length;i++){
if(!_ca[i]){
continue;
}
var _cc=_ca[i];
if(_cc.pendHighlight){
this.cellHighlightByRef(_cc);
_cc.pendHighlight=0;
}else{
if(_ca[i].pendDim){
this.cellDimByRef(_ca[i]);
_ca[i].pendDim=0;
}
}
_ca[i]=null;
}
}
catch(ex){
jsExDebug("widgetTable_applyPendingHighlights",ex);
}
}
function widgetTable_drawBorder(_cd,_ce,_cf,_d0){
try{
}
catch(ex){
jsExDebug("widgetTable_drawBorder",ex);
}
}
function widgetTable_addColumnResizeControl(_d1,_d2){
try{
var _d3=document.createElement("img");
_d3.src=this.PIXEL_IMG;
if(document.all){
_d3.style.styleFloat="right";
}else{
_d3.style.cssFloat="right";
}
_d3.style.width="4px";
_d3.style.height="19px";
_d3.style.cursor="w-resize";
_d3.style.borderRight="solid 1px white";
this.table.rowArray[_d2].cells[_d1].cellDom.style.paddingLeft="0px";
this.table.rowArray[_d2].cells[_d1].cellDom.style.paddingRight="0px";
this.table.rowArray[_d2].cells[_d1].resizeDom=_d3;
this.table.rowArray[_d2].cells[_d1].cellDom.insertBefore(_d3,this.table.rowArray[_d2].cells[_d1].contentDom);
this.SYSTEM.Event.setDragEnablingParameters(_d3);
this.SYSTEM.Event.bindDragEventHandlers(_d3,this.resizeStartHandler,this.resizeColumnEventHandler,this.resizeColumnEndEventHandler,this,this.table.rowArray[_d2].cells[_d1]);
this.SYSTEM.Event.attachEvent(_d3,"onmousedown","mousedown",cancelEvent,this);
}
catch(ex){
jsExDebug("widgetTable_addColumnResizeControl",ex);
}
}
function widgetTable_addRowResizeControl(_d4,_d5){
try{
var _d6=document.createElement("img");
_d6.src=this.PIXEL_IMG;
if(document.all){
_d6.style.styleFloat="right";
}else{
_d6.style.cssFloat="right";
}
_d6.style.width="100%";
_d6.style.height="4px";
_d6.style.cursor="s-resize";
_d6.style.position="absolute";
_d6.style.bottom="0px";
var _d7=document.createElement("div");
_d7.style.width="100%";
_d7.style.height="3px";
_d7.style.position="relative";
_d7.style.overflow="hidden";
_d7.style.borderBottom="solid 1px white";
_d7.appendChild(_d6);
this.table.rowArray[_d5].cells[_d4].cellDom.appendChild(_d7);
this.table.rowArray[_d5].cells[_d4].cellDom.vAlign="bottom";
this.table.rowArray[_d5].cells[_d4].cellDom.style.fontSize="0.8em";
this.table.rowArray[_d5].cells[_d4].cellDom.style.paddingLeft="0px";
this.table.rowArray[_d5].cells[_d4].cellDom.style.paddingRight="0px";
this.table.rowArray[_d5].cells[_d4].cellDom.style.paddingBottom="0px";
this.table.rowArray[_d5].cells[_d4].innerDiv=_d7;
this.table.rowArray[_d5].cells[_d4].resizeDom=_d6;
this.SYSTEM.DM.setDragEnablingParameters(_d6);
this.SYSTEM.DM.bindDragEventHandlers(_d6,this.resizeStartHandler,this.resizeRowEventHandler,this.resizeRowEndEventHandler,this,this.table.rowArray[_d5].cells[_d4]);
this.SYSTEM.DM.attachEvent(_d6,"onmousedown","mousedown",cancelEvent,this);
}
catch(ex){
jsExDebug("widgetTable_addRowResizeControl",ex);
}
}
function widgetTable_cleanUpResizeControl(_d8){
try{
this.SYSTEM.Event.removeDragEventHandlers(_d8.resizeDom);
this.SYSTEM.Event.detachEvent(_d8.resizeDom,"onmousedown","mousedown");
if(_d8.x==0){
if(_d8.innerDiv){
if(_d8.resizeDom.parentNode==_d8.innerDiv){
_d8.innerDiv.removeChild(_d8.resizeDom);
}
if(_d8.innerDiv.parentNode==_d8.cellDom){
_d8.cellDom.removeChild(_d8.innerDiv);
}
}
_d8.innerDiv=null;
}else{
if(_d8.resizeDom.parentNode==_d8.cellDom){
_d8.cellDom.removeChild(_d8.resizeDom);
}
}
_d8.resizeDom=null;
}
catch(ex){
jsExDebug("widgetTable_cleanUpResizeControl",ex);
}
}
function widgetTable_redraw(){
try{
this.widgetElement.removeChild(this.tableContainer);
if(this.parentDiv){
this.parentDiv.removeChild(this.widgetElement);
this.parentDiv.appendChild(this.widgetElement);
}
this.widgetElement.appendChild(this.tableContainer);
}
catch(ex){
jsExDebug("widgetTable_redraw",ex);
}
}
function widgetTable_highlightActive(_d9,_da){
try{
if(_d9!=null&&_da!=null){
var _db=this.translateDataToDisplay(_d9,_da);
var _dc=_db.x;
var _dd=_db.y;
if(_dc==0){
_dc=1;
}
if(_dd==0){
_dd=1;
}
if(_dc>0&&_dd>0&&_dc<this.tableColumnCount&&_dd<this.tableRowCount){
var _de=this.table.rowArray[_dd].cells[_dc];
if(_de){
_de.cellDom.style.backgroundColor=this.CELL_ACTIVE_COLOUR;
_de.cellDom.style.overflow="auto";
_de.isActive=true;
if(this.activeCell!=_de){
this.activeCell=_de;
if(document.all){
this.tableContainer.style.display="none";
this.tableContainer.style.display="";
}
}
}
}
}
}
catch(ex){
jsExDebug("widgetTable_highlightActive",ex);
}
}
function widgetTable_dimActive(_df,_e0){
try{
if(_df!=null&&_e0!=null){
var _e1=this.translateDataToDisplay(_df,_e0);
var _e2=_e1.x;
var _e3=_e1.y;
if(_e2==0){
_e2=1;
}
if(_e3==0){
_e3=1;
}
if(_e2>0&&_e3>0&&_e2<this.tableColumnCount&&_e3<this.tableRowCount){
var _e4=this.table.rowArray[_e3].cells[_e2];
if(_e4){
if(_e4.isHighlighted){
_e4.cellDom.style.backgroundColor=this.CELL_HIGHLIGHT_COLOUR;
}else{
_e4.cellDom.style.backgroundColor=this.CELL_DEFAULT_COLOUR;
}
_e4.cellDom.style.overflow="hidden";
if(_e4.contentDom){
_e4.contentDom.style.overflow="hidden";
var _e5=this.dataModule.createCell(_e0,_df,this.z);
_e4.contentDom.style.backgroundColor=_e5.style.getColour().background;
_e4.contentDom.style.position="static";
_e4.contentDom.style.display="block";
_e4.contentDom.style.zIndex=0;
}
_e4.isActive=false;
}
}
}
}
catch(ex){
jsExDebug("widgetTable_dimActive",ex);
}
}
function widgetTable_cellFlash(_e6,_e7){
function resetColour(){
try{
_e8.cellDom.style.backgroundColor=me.CELL_DEFAULT_COLOUR;
if(_e8.contentDom){
_e8.contentDom.style.backgroundColor=me.CELL_DEFAULT_COLOUR;
}
}
catch(ex){
jsExDebug("cell_flash:resetColour",ex);
}
}
try{
var _e8=this.table.rowArray[_e7].cells[_e6];
if(!_e8){
return;
}
var me=this;
_e8.cellDom.style.backgroundColor=me.CELL_FLASH_COLOUR;
if(_e8.contentDom){
_e8.contentDom.style.backgroundColor=me.CELL_FLASH_COLOUR;
}
setTimeout(resetColour,350);
}
catch(ex){
jsExDebug("widgetTable_cellFlash",ex);
}
}
function widgetTable_calculateWidthAtColumn(_ea){
try{
if(!this.dataModule){
return;
}
var _eb=this.DEFAULT_CELL_HEADING_WIDTH;
for(var i=(this.scrollX+1);i<=_ea;i++){
var _ed=this.dataModule.getColumnWidth(i,this.z);
if(_ed==null){
_ed=this.DEFAULT_CELL_WIDTH;
}
_eb+=_ed;
}
return _eb;
}
catch(ex){
jsExDebug("widgetTable_calculateWidthAtColumn",ex);
}
}
function widgetTable_calculateHeightAtRow(row){
try{
if(!this.dataModule){
return;
}
var _ef=this.DEFAULT_CELL_HEIGHT;
for(var i=(this.scrollY+1);i<=row;i++){
var _f1=this.dataModule.getRowHeight(i,this.z);
if(_f1==null){
_f1=this.DEFAULT_CELL_HEIGHT;
}
_ef+=_f1;
}
return _ef;
}
catch(ex){
jsExDebug("widgetTable_calculateHeightAtRow",ex);
}
}
function widgetTable_doubleClickEvent(_f2,me,_f4){
try{
if(me.editActiveCell){
me.editActiveCell();
}
if(me.dataEntryModule){
me.dataEntryModule.setEditMode(me.dataEntryModule.EDIT_MODE_UPDATE);
}
}
catch(ex){
jsExDebug("widgetTable_doubleClickEvent",ex);
}
}
function widgetTable_clickEventHandler(_f5,me,_f7){
try{
}
catch(ex){
jsExDebug("widgetTable_clickEventHandler",ex);
}
}
function widgetTable_mouseDownHandler(_f8,me,_fa){
try{
if(me.dragSession){
return;
}
if(!me.selection){
return;
}
if(me.table.rowArray[_fa.y].cells[_fa.x]!=me.activeCell){
if(me.dataEntryModule){
me.dataEntryModule.save();
}
}
me.dragSession=true;
if(_fa.x==0||_fa.y==0){
me.activeCell=null;
}
if(_f8.shiftKey){
me.selection.applyFunction(me.cellDimCallback,me);
me.selection.expandLastRangeTo(_fa.x,_fa.y,me.z);
me.selection.applyFunction(me.cellHighlightCallback,me,null);
}else{
if(_f8.ctrlKey){
me.cellHighlight(_fa.x,_fa.y);
me.selection.addItem(_fa.x,_fa.y,me.z);
}else{
me.selection.clear();
me.selection.addItem(_fa.x,_fa.y,me.z);
me.cellHighlight(_fa.x,_fa.y);
}
}
}
catch(ex){
jsExDebug("widgetTable_mouseDownHandler",ex);
}
}
function widgetTable_dragOverHandler(_fb,me,_fd){
try{
if(me.dragSession){
me.selection.applyFunction(me.cellDimCallback,me);
me.selection.expandLastRangeTo(_fd.x,_fd.y,me.z);
me.selection.applyFunction(me.cellHighlightCallback,me);
if(me.selectionRangeExpandDelegate){
me.selectionRangeExpandDelegate.invoke(true);
}
}
}
catch(ex){
jsExDebug("widgetTable_dragOverHandler",ex);
}
}
function widgetTable_dragEndHandler(_fe,me,_100){
try{
if(!me.dragSession){
return;
}
me.dragSession=false;
if(me.selectionRangeExpandDelegate){
me.selectionRangeExpandDelegate.invoke(false);
}
if(me.table.rowArray[_100.y].cells[_100.x]!=me.activeCell&&me.dataEntryModule&&me.dataEntryModule.stateIsEditing){
me.dataEntryModule.focus();
}
}
catch(ex){
jsExDebug("widgetTable_dragEndHandler",ex);
}
}
function widgetTable_resizeStartHandler(_101,me){
try{
me.dragSession=false;
me.cellDragSession=true;
}
catch(ex){
jsExDebug("widgetTable_resizeStartHandler",ex);
}
}
function widgetTable_resizeColumnEventHandler(_103,me,cell){
try{
if(me.cellDragSession){
var _106=(me.table.columnArray[cell.x].width?me.table.columnArray[cell.x].width:me.DEFAULT_CELL_WIDTH);
var _107=_106+me.SYSTEM.DM.dragDistanceX;
if(_107>me.MIN_COL_WIDTH){
me.table.columnArray[cell.x].domElement.style.width=_107+"px";
}
me.redraw();
}
}
catch(ex){
jsExDebug("widgetTable_resizeColumnEventHandler",ex);
}
}
function widgetTable_resizeColumnEndEventHandler(_108,me,cell){
try{
if(me.cellDragSession){
var _10b=(me.table.columnArray[cell.x].width?me.table.columnArray[cell.x].width:me.DEFAULT_CELL_WIDTH);
var _10c=_10b+me.SYSTEM.DM.dragDistanceX;
if(_10c<me.MIN_COL_WIDTH){
_10c=me.MIN_COL_WIDTH;
}
me.setColumnWidth(cell.x,_10c);
me.cellDragSession=false;
if(me.dataModule){
var _10d=me.translateDisplayToData(me.tableColumnCount-1);
var _10e=me.calculateWidthAtColumn(_10d.x);
var _10f=me.width-_10e;
if(_10f>0){
var _110=parseInt(_10f/me.DEFAULT_CELL_WIDTH)+me.HIDDEN_CELL_BUFFER;
for(var i=0;i<_110;i++){
me.appendColumn();
}
me.redraw();
me.refreshTable();
me.selection.applyFunction(me.cellHighlightCallback,me);
}
}
me.setDirty(true);
}
}
catch(ex){
jsExDebug("widgetTable_resizeColumnEndEventHandler",ex);
}
}
function widgetTable_resizeRowEventHandler(_112,me,cell){
try{
if(me.cellDragSession){
var _115=me.table.rowArray[cell.y].height+me.SYSTEM.DM.dragDistanceY;
if(_115>me.MIN_ROW_HEIGHT){
me.table.rowArray[cell.y].rowDom.style.height=_115+"px";
}
}
}
catch(ex){
jsExDebug("cell_resizeRowEventHandler",ex);
}
}
function widgetTable_resizeRowEndEventHandler(_116,me,cell){
try{
if(me.cellDragSession){
var _119=me.table.rowArray[cell.y].height+me.SYSTEM.DM.dragDistanceY;
if(_119<me.MIN_ROW_HEIGHT){
_119=me.MIN_ROW_HEIGHT;
}
me.setRowHeight(cell.y,_119);
me.cellDragSession=false;
me.setDirty(true);
}
}
catch(ex){
jsExDebug("cell_resizeRowEndEventHandler",ex);
}
}
function widgetTable_keyPressHandler(key){
try{
if(key.ctrlKey){
return;
}
if((key.which>=65&&key.which<=90)||(key.which>=97&&key.which<=122)||(key.which==61)||(key.which==187)||(key.which>=40&&key.which<=57)||(key.which==188)||(key.which>=33&&key.which<=39)||(key.which>=123&&key.which<=126)||(key.which>=58&&key.which<=64)||(key.which>=91&&key.which<=96)||(key.which>=161)){
if(this.dataEntryModule&&this.activeCell){
this.hideContent();
if(!this.dataEntryModule.isEditing()){
this.dataEntryModule.setEditMode(this.dataEntryModule.EDIT_MODE_NEW);
}
if(!document.all){
this.dataEntryModule.edit(this.activeCell.cellDom,String.fromCharCode(key.which),this.activeCell,"showContent",this);
}else{
this.dataEntryModule.edit(this.activeCell.cellDom,"",this.activeCell,"showContent",this);
}
this.refocusSelection();
}
}
}
catch(ex){
jsExDebug("widgetTable_keyPressHandler",ex);
}
}
function widgetTable_keyDownHandler(key){
try{
switch(key.which){
case 8:
if(this.dataEntryModule&&this.activeCell){
this.hideContent();
this.dataEntryModule.edit(this.activeCell.cellDom,"",this.activeCell,"showContent",this);
}
this.refocusSelection();
break;
case 9:
if(this.dataEntryModule){
this.dataEntryModule.save();
}
if(key.shiftKey){
this.selection.previousHorizontalActive();
if(this.activeCell){
this.refocusSelection();
if(this.activeCell.x<1){
this.scrollLeft();
}
}
}else{
this.selection.nextHorizontalActive();
if(this.activeCell){
this.refocusSelection();
var _11c=this.translateDisplayToData(this.activeCell.x,null);
var _11d=this.calculateWidthAtColumn(_11c.x);
if(_11d>this.width){
this.scrollRight();
}
}
}
this.selection.applyFunction(this.cellHighlightCallback,this);
cancelEvent(key);
if(key.preventDefault){
key.preventDefault();
}
break;
case 13:
if(this.dataEntryModule){
this.dataEntryModule.save();
}
if(key.shiftKey){
var _11e=this.activeCell;
this.selection.previousActive();
if(this.activeCell){
if(_11e.y==1&&this.activeCell.y==1){
this.scrollUp();
}
this.refocusSelection();
}
}else{
this.selection.nextActive();
if(this.activeCell){
this.refocusSelection();
var _11c=this.translateDisplayToData(null,this.activeCell.y);
var _11f=this.calculateHeightAtRow(_11c.y);
var _120=0;
if(this.dataModule){
_120=this.dataModule.getRowHeight(_11c.y,this.z);
if(_120==null){
_120=this.DEFAULT_CELL_HEIGHT;
}
}
if(_11f>(this.height-_120)){
var _121=this.translateDisplayToData(null,1);
var _122=this.dataModule.getRowHeight(_121.y,this.z);
var _123=Math.floor(_120/_122);
if(_120>_122){
_123=Math.floor(_120/_122);
}else{
if(_120<=_122){
_123=1;
}
}
this.scrollDown(_123);
}
}
}
this.selection.applyFunction(this.cellHighlightCallback,this);
cancelEvent(key);
if(key.preventDefault){
key.preventDefault();
}
break;
case 27:
if(this.dataEntryModule){
this.dataEntryModule.unedit();
}
break;
case 37:
if(this.dataEntryModule&&this.dataEntryModule.getEditMode()==this.dataEntryModule.EDIT_MODE_UPDATE){
break;
}else{
this.dataEntryModule.save();
}
var _124=this.selection.getLastRange();
if(key.shiftKey){
if(_124.toX>0){
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.expandLastRange(-1,0,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
var _125=this.translateDisplayToData(2);
if(_124.toX<_125.x){
this.scrollLeft();
}
if(this.selectionRangeExpandDelegate){
this.selectionRangeExpandDelegate.invoke(true);
}
}
}else{
if(key.ctrlKey){
if(this.jumpToPreviousRowContent){
this.jumpToPreviousRowContent();
}
}else{
this.selection.previousHorizontal();
this.selection.applyFunction(this.cellHighlightCallback,this);
if(this.activeCell){
this.refocusSelection();
if(this.activeCell.x<1){
this.scrollLeft();
}
}
}
}
if(key.preventDefault){
key.preventDefault();
}
break;
case 38:
if(this.dataEntryModule&&this.dataEntryModule.getEditMode()==this.dataEntryModule.EDIT_MODE_UPDATE){
break;
}else{
this.dataEntryModule.save();
}
var _124=this.selection.getLastRange();
if(key.shiftKey){
if(_124.toY>0){
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.expandLastRange(0,-1,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
var _125=this.translateDisplayToData(null,2);
if(_124.toY<_125.y){
this.scrollUp();
}
if(this.selectionRangeExpandDelegate){
this.selectionRangeExpandDelegate.invoke(true);
}
}
}else{
if(key.ctrlKey){
if(this.jumpToPreviousColumnContent){
this.jumpToPreviousColumnContent();
}
}else{
var _11e=this.activeCell;
this.selection.previous();
this.selection.applyFunction(this.cellHighlightCallback,this);
if(this.activeCell){
if(_11e.y==1&&this.activeCell.y==1){
this.scrollUp();
}
this.refocusSelection();
}
}
}
if(key.preventDefault){
key.preventDefault();
}
break;
case 39:
if(this.dataEntryModule&&this.dataEntryModule.getEditMode()==this.dataEntryModule.EDIT_MODE_UPDATE){
break;
}else{
this.dataEntryModule.save();
}
if(key.shiftKey){
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.expandLastRange(1,0,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
var _125=this.translateDisplayToData((this.tableColumnCount-(this.HIDDEN_CELL_BUFFER+1)));
if(this.selection.getLastRange().toX>_125.x){
this.scrollRight();
}
if(this.selectionRangeExpandDelegate){
this.selectionRangeExpandDelegate.invoke(true);
}
}else{
if(key.ctrlKey){
if(this.jumpToNextRowContent){
this.jumpToNextRowContent();
}
}else{
this.selection.nextHorizontal();
this.selection.applyFunction(this.cellHighlightCallback,this);
if(this.activeCell){
this.refocusSelection();
var _11c=this.translateDisplayToData(this.activeCell.x,null);
var _11d=this.calculateWidthAtColumn(_11c.x);
if(_11d>this.width){
this.scrollRight();
}
}
}
}
if(key.preventDefault){
key.preventDefault();
}
break;
case 40:
if(this.dataEntryModule&&this.dataEntryModule.getEditMode()==this.dataEntryModule.EDIT_MODE_UPDATE){
break;
}else{
this.dataEntryModule.save();
}
if(key.shiftKey){
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.expandLastRange(0,1,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
var _125=this.translateDisplayToData(null,(this.tableRowCount-(this.HIDDEN_CELL_BUFFER+1)));
if(this.selection.getLastRange().toY>_125.y){
this.scrollDown();
}
if(this.selectionRangeExpandDelegate){
this.selectionRangeExpandDelegate.invoke(true);
}
}else{
if(key.ctrlKey){
if(this.jumpToNextColumnContent){
this.jumpToNextColumnContent();
}
}else{
this.selection.next();
this.selection.applyFunction(this.cellHighlightCallback,this);
if(this.activeCell){
this.refocusSelection();
var _11c=this.translateDisplayToData(null,this.activeCell.y);
var _11f=this.calculateHeightAtRow(_11c.y);
var _120=0;
if(this.dataModule){
_120=this.dataModule.getRowHeight(_11c.y,this.z);
if(_120==null){
_120=this.DEFAULT_CELL_HEIGHT;
}
}
if(_11f>(this.height-_120)){
var _121=this.translateDisplayToData(null,1);
var _122=this.dataModule.getRowHeight(_121.y,this.z);
var _123=Math.floor(_120/_122);
if(_120>_122){
_123=Math.floor(_120/_122);
}else{
if(_120<=_122){
_123=1;
}
}
this.scrollDown(_123);
}
}
}
}
if(key.preventDefault){
key.preventDefault();
}
break;
case 32:
break;
default:
}
}
catch(ex){
jsExDebug("widgetTable_keyDownHandler",ex);
}
}
function widgetTable_keyUpHandler(_126,me){
try{
var key=(_126.which?_126.which:_126.keyCode);
if(key==16&&me.selectionRangeExpandDelegate){
me.selectionRangeExpandDelegate.invoke(false);
}
}
catch(ex){
jsExDebug("widgetTable_keyUpHandler",ex);
}
}
function widgetTable_newDataEntryHandler(_129,cell){
try{
this.setContentByRef(cell,_129);
if(this.dataModule){
var _12b=this.translateDisplayToData(cell.x,cell.y);
this.dataModule.setFormula(_12b.y,_12b.x,this.z,_129);
}
this.setDirty(true);
}
catch(ex){
jsExDebug("widgetTable_newDataEntryHandler",ex);
}
}
function widgetTable_dataModuleNewDataHandler(_12c,_12d,_12e,_12f){
try{
if(_12e==this.z){
this.setContentByAddress(_12c,_12d,_12f);
}
}
catch(ex){
jsExDebug("widgetTable_dataModuleNewDataHandler",ex);
}
}
function widgetTable_dataModuleNewStyleHandler(_130,_131,_132){
try{
if(_132==this.z){
var _133=this.translateDataToDisplay(_130,_131);
this.refreshCellStyle(_133.x,_133.y);
}
}
catch(ex){
jsExDebug("widgetTable_dataModuleNewStyleHandler",ex);
}
}
function widgetTable_selectionActiveChangeHandler(me,_135,_136,oldZ,_138,_139,newZ){
try{
me.dimActive(_135,_136,oldZ);
me.highlightActive(_138,_139,newZ);
if(me.selectionChangeDelegate&&_138&&_139){
me.selectionChangeDelegate.invoke();
}
}
catch(ex){
jsExDebug("widgetTable_selectionActiveChangeHandler",ex);
}
}
function widgetTable_refocusSelection(){
try{
if(!this.selection){
return;
}
if(this.selection.activeY<this.scrollY){
this.scrollToRow(this.selection.activeY);
}
if(this.selection.activeY>(this.scrollY+this.tableRowCount-this.HIDDEN_CELL_BUFFER)){
this.scrollToRow(this.selection.activeY-(this.tableRowCount-this.HIDDEN_CELL_BUFFER-4));
}
if(this.selection.activeX<this.scrollX){
this.scrollToColumn(this.selection.activeX);
}
if(this.selection.activeX>(this.scrollX+this.tableColumnCount-this.HIDDEN_CELL_BUFFER)){
this.scrollToColumn(this.selection.activeX-(this.tableColumnCount-this.HIDDEN_CELL_BUFFER-4));
}
}
catch(ex){
jsExDebug("widgetTable_refocusSelection",ex);
}
}
function widgetTable_applyStyle(_13b,_13c,_13d,_13e,_13f){
try{
var _140=this.translateDataToDisplay(_13b,_13c);
var cell=this.table.rowArray[_140.y].cells[_140.x];
if(cell.contentDom){
cell.contentDom.style.setAttribute(_13d,_13e);
}
}
catch(ex){
jsExDebug("widgetTable_applyStyle",ex);
}
}

try{
widgetScrollTable_t.prototype=new widgetTable_t();
widgetScrollTable_t.prototype.constructor=widgetScrollTable_t;
widgetScrollTable_t.prototype.widgetScrollTable_super=widgetTable_t.prototype.constructor;
widgetScrollTable_t.prototype.widgetTable_cleanUp=widgetTable_t.prototype.cleanUp;
widgetScrollTable_t.prototype.super_keyPressHandler=widgetTable_t.prototype.keyPressHandler;
widgetScrollTable_t.prototype.super_keyDownHandler=widgetTable_t.prototype.keyDownHandler;
widgetScrollTable_t.prototype.cleanUp=widgetScrollTable_cleanUp;
widgetScrollTable_t.prototype.widgetTable_createDom=widgetTable_t.prototype.createDom;
widgetScrollTable_t.prototype.createDom=widgetScrollTable_createDom;
widgetScrollTable_t.prototype.setDimensions=widgetScrollTable_setDimensions;
widgetScrollTable_t.prototype.cellDimCallback=widgetScrollTable_cellDimCallback;
widgetScrollTable_t.prototype.cellHighlightCallback=widgetScrollTable_cellHighlightCallback;
widgetScrollTable_t.prototype.cellPendHighlightCallback=widgetScrollTable_cellPendHighlightCallback;
widgetScrollTable_t.prototype.cellPendDimCallback=widgetScrollTable_cellPendDimCallback;
widgetScrollTable_t.prototype.scrollToPosition=widgetScrollTable_scrollToPosition;
widgetScrollTable_t.prototype.scrollToRow=widgetScrollTable_scrollToRow;
widgetScrollTable_t.prototype.scrollToColumn=widgetScrollTable_scrollToColumn;
widgetScrollTable_t.prototype.scrollUp=widgetScrollTable_scrollUp;
widgetScrollTable_t.prototype.scrollDown=widgetScrollTable_scrollDown;
widgetScrollTable_t.prototype.scrollLeft=widgetScrollTable_scrollLeft;
widgetScrollTable_t.prototype.scrollRight=widgetScrollTable_scrollRight;
widgetScrollTable_t.prototype.setContentByAddress=widgetScrollTable_setContentByAddress;
widgetScrollTable_t.prototype.setScrollbarScreenPosition=widgetScrollTable_setScrollbarScreenPosition;
widgetScrollTable_t.prototype.super_editCell=widgetTable_editCell;
widgetScrollTable_t.prototype.editCell=widgetScrollTable_editCell;
widgetScrollTable_t.prototype.translateDataToDisplay=widgetScrollTable_translateDataToDisplay;
widgetScrollTable_t.prototype.translateDisplayToData=widgetScrollTable_translateDisplayToData;
widgetScrollTable_t.prototype.displayVerticalScrollValue=widgetScrollTable_displayVerticalScrollValue;
widgetScrollTable_t.prototype.displayHorizontalScrollValue=widgetScrollTable_displayHorizontalScrollValue;
widgetScrollTable_t.prototype.mouseDownHandler=widgetScrollTable_mouseDownHandler;
widgetScrollTable_t.prototype.dragOverHandler=widgetScrollTable_dragOverHandler;
widgetScrollTable_t.prototype.keyPressHandler=widgetScrollTable_keyPressHandler;
widgetScrollTable_t.prototype.rightScrollEvent=widgetScrollTable_rightScrollEvent;
widgetScrollTable_t.prototype.leftScrollEvent=widgetScrollTable_leftScrollEvent;
widgetScrollTable_t.prototype.upScrollEvent=widgetScrollTable_upScrollEvent;
widgetScrollTable_t.prototype.downScrollEvent=widgetScrollTable_downScrollEvent;
widgetScrollTable_t.prototype.verticalScrollSelectEvent=widgetScrollTable_verticalScrollSelectEvent;
widgetScrollTable_t.prototype.verticalScrollDragEvent=widgetScrollTable_verticalScrollDragEvent;
widgetScrollTable_t.prototype.horizontalScrollSelectEvent=widgetScrollTable_horizontalScrollSelectEvent;
widgetScrollTable_t.prototype.horizontalScrollDragEvent=widgetScrollTable_horizontalScrollDragEvent;
widgetScrollTable_t.prototype.setRowHeight=widgetScrollTable_setRowHeight;
widgetScrollTable_t.prototype.setColumnWidth=widgetScrollTable_setColumnWidth;
widgetScrollTable_t.prototype.SLIDEBAR_DISPLAY_WIDTH=50;
widgetScrollTable_t.prototype.SLIDEBAR_DISPLAY_HEIGHT=20;
widgetScrollTable_t.prototype.SCROLL_QUANTITY_VERT=200;
widgetScrollTable_t.prototype.SCROLL_LIMIT_VALUE_VERT=160;
widgetScrollTable_t.prototype.SCROLL_QUANTITY_HOR=30;
widgetScrollTable_t.prototype.SCROLL_LIMIT_VALUE_HOR=24;
widgetScrollTable_t.prototype.SCROLL_MAX_VALUE_INCR=40;
widgetScrollTable_t.prototype.SLIDER_LENGTH_PERCENT=0.3;
widgetScrollTable_t.prototype.SCROLL_BTN_WIDTH=15;
widgetScrollTable_t.prototype.SCROLL_BTN_HEIGHT=15;
widgetScrollTable_t.prototype.BTN_SCROLL_INCREMENT=2;
widgetScrollTable_t.prototype.LEFT_IMG="img/app/system/widgets/scrollbar/scroll_left";
widgetScrollTable_t.prototype.RIGHT_IMG="img/app/system/widgets/scrollbar/scroll_right";
widgetScrollTable_t.prototype.UP_IMG="img/app/system/widgets/scrollbar/scroll_up";
widgetScrollTable_t.prototype.DOWN_IMG="img/app/system/widgets/scrollbar/scroll_down";
widgetScrollTable_t.prototype.LEFT_SCROLL=1;
widgetScrollTable_t.prototype.RIGHT_SCROLL=2;
widgetScrollTable_t.prototype.UP_SCROLL=3;
widgetScrollTable_t.prototype.DOWN_SCROLL=4;
widgetScrollTable_t.prototype.VERTICAL_SLIDER_RIGHT=0;
widgetScrollTable_t.prototype.VERTICAL_SLIDER_BOTTOM=15;
widgetScrollTable_t.prototype.HORIZONTAL_SLIDER_RIGHT=15;
widgetScrollTable_t.prototype.HORIZONTAL_SLIDER_BOTTOM=0;
widgetScrollTable_t.prototype.SLIDER_UPPER_LIMIT_OFFSET=40;
widgetScrollTable_t.prototype.TYPEMATIC_PERIOD=50;
}
catch(ex){
jsExDebug("widgetScrollTable_t.prototype",ex);
}
function widgetScrollTable_t(_1,_2,_3,_4,_5,_6){
try{
this.widgetScrollTable_super(_1,_2,_3,_5,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.scrollX=0;
this.scrollY=0;
this.displayX=0;
this.displayY=0;
if(!_6){
this.createDom(_2,_3,_4);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetScrollTable_t "+ex.lineNumber,ex);
}
}
function widgetScrollTable_cleanUp(me){
try{
if(!me){
me=this;
}
me.scrollX=null;
me.scrollY=null;
me.displayX=null;
me.displayY=null;
me.dragSession=null;
me.verticalSlider.cleanUp();
me.upScrollAboveBtn.cleanUp();
me.upScrollBtn.cleanUp();
me.downScrollBtn.cleanUp();
me.horizontalSlider.cleanUp();
me.leftScrollBtn.cleanUp();
me.leftScrollLeftBtn.cleanUp();
me.rightScrollBtn.cleanUp();
me.verticalSlider=null;
me.upScrollAboveBtn=null;
me.upScrollBtn=null;
me.downScrollBtn=null;
me.horizontalSlider=null;
me.leftScrollBtn=null;
me.leftScrollLeftBtn=null;
me.rightScrollBtn=null;
me.widgetTable_cleanUp();
}
catch(ex){
jsExDebug("widgetScrollTable_cleanUp",ex);
}
}
function widgetScrollTable_createDom(_8,_9,_a){
try{
this.widgetTable_createDom(_8,_9);
var _b=Math.round(0.3*this.height);
var _c=new this.SYSTEM.Widget.SpreadSlider("verticalSlider",_b,1);
_c.setPosition(this.VERTICAL_SLIDER_RIGHT,this.VERTICAL_SLIDER_BOTTOM+(2*this.SCROLL_BTN_HEIGHT),1,1);
_c.setUpperLimit(_b-this.SLIDER_UPPER_LIMIT_OFFSET,this.SCROLL_LIMIT_VALUE_VERT);
_c.quantify(this.SCROLL_QUANTITY_VERT);
_c.allowValueDisplay(this.SLIDEBAR_DISPLAY_WIDTH,this.SLIDEBAR_DISPLAY_HEIGHT,null);
_c.attach(this.widgetElement);
var _d=new this.SYSTEM.Delegate(this,this.verticalScrollSelectEvent);
var _e=new this.SYSTEM.Delegate(this,this.verticalScrollDragEvent);
_c.addEventHandler(this.SYSTEM.Event.VALUE_CHANGED_EVENT,_d);
_c.addEventHandler(this.SYSTEM.Event.DRAG_EVENT,_e);
var _f=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE;
var _10=new this.SYSTEM.Widget.Button("upScrollAboveBtn",this.UP_IMG,_f,this.SCROLL_BTN_WIDTH,this.SCROLL_BTN_HEIGHT);
_10.setPosition(this.VERTICAL_SLIDER_RIGHT,this.VERTICAL_SLIDER_BOTTOM+_b+(2*this.SCROLL_BTN_HEIGHT),1,1);
_10.attach(this.widgetElement);
var _11=new this.SYSTEM.Delegate(this,this.upScrollEvent);
_10.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_11);
var _12=new this.SYSTEM.Widget.Button("upScrollBtn",this.UP_IMG,_f,this.SCROLL_BTN_WIDTH,this.SCROLL_BTN_HEIGHT);
_12.setPosition(this.VERTICAL_SLIDER_RIGHT,this.VERTICAL_SLIDER_BOTTOM+this.SCROLL_BTN_HEIGHT,1,1);
_12.attach(this.widgetElement);
_12.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_11);
var _13=new this.SYSTEM.Widget.Button("downScrollBtn",this.DOWN_IMG,_f,this.SCROLL_BTN_WIDTH,this.SCROLL_BTN_HEIGHT);
_13.setPosition(this.VERTICAL_SLIDER_RIGHT,this.VERTICAL_SLIDER_BOTTOM,1,1);
_13.attach(this.widgetElement);
var _14=new this.SYSTEM.Delegate(this,this.downScrollEvent);
_13.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_14);
var _15=Math.round(this.SLIDER_LENGTH_PERCENT*this.width);
var _16=new this.SYSTEM.Widget.SpreadSlider("horizontalSlider",_15);
_16.setPosition(this.HORIZONTAL_SLIDER_RIGHT+(2*this.SCROLL_BTN_WIDTH),this.HORIZONTAL_SLIDER_BOTTOM,1,1);
_16.quantify(this.SCROLL_QUANTITY_HOR);
_16.setUpperLimit(_15-this.SLIDER_UPPER_LIMIT_OFFSET,this.SCROLL_LIMIT_VALUE_HOR);
_16.allowValueDisplay(this.SLIDEBAR_DISPLAY_WIDTH,this.SLIDEBAR_DISPLAY_HEIGHT,null);
_16.allowAlphaNumericValue();
_16.attach(this.widgetElement);
var _17=new this.SYSTEM.Delegate(this,this.horizontalScrollSelectEvent);
var _18=new this.SYSTEM.Delegate(this,this.horizontalScrollDragEvent);
_16.addEventHandler(this.SYSTEM.Event.VALUE_CHANGED_EVENT,_17);
_16.addEventHandler(this.SYSTEM.Event.DRAG_EVENT,_18);
var _19=new this.SYSTEM.Widget.Button("leftScrollBtn",this.LEFT_IMG,_f,this.SCROLL_BTN_WIDTH,this.SCROLL_BTN_HEIGHT);
_19.setPosition(this.HORIZONTAL_SLIDER_RIGHT+this.SCROLL_BTN_WIDTH,this.HORIZONTAL_SLIDER_BOTTOM,1,1);
_19.attach(this.widgetElement);
var _1a=new this.SYSTEM.Delegate(this,this.leftScrollEvent);
_19.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_1a);
var _1b=new this.SYSTEM.Widget.Button("leftScrollLeftBtn",this.LEFT_IMG,_f,this.SCROLL_BTN_WIDTH,this.SCROLL_BTN_HEIGHT);
_1b.setPosition(this.HORIZONTAL_SLIDER_RIGHT+_15+(2*this.SCROLL_BTN_WIDTH),this.HORIZONTAL_SLIDER_BOTTOM,1,1);
_1b.attach(this.widgetElement);
_1b.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_1a);
var _1c=new this.SYSTEM.Widget.Button("rightScrollBtn",this.RIGHT_IMG,_f,this.SCROLL_BTN_WIDTH,this.SCROLL_BTN_HEIGHT);
_1c.setPosition(this.HORIZONTAL_SLIDER_RIGHT,this.HORIZONTAL_SLIDER_BOTTOM,1,1);
_1c.attach(this.widgetElement);
var _1d=new this.SYSTEM.Delegate(this,this.rightScrollEvent);
_1c.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_1d);
this.verticalSlider=_c;
this.upScrollAboveBtn=_10;
this.upScrollBtn=_12;
this.downScrollBtn=_13;
this.horizontalSlider=_16;
this.leftScrollBtn=_19;
this.leftScrollLeftBtn=_1b;
this.rightScrollBtn=_1c;
if(_a){
this.setScrollbarScreenPosition(_a);
}
var _1e=document.createElement("div");
_1e.style.width="15px";
_1e.style.height="15px";
_1e.style.backgroundColor="#fdfdfd";
_1e.style.position="absolute";
_1e.style.right="0px";
_1e.style.bottom="0px";
this.widgetElement.appendChild(_1e);
_10.enableTypematic(this.TYPEMATIC_PERIOD);
_12.enableTypematic(this.TYPEMATIC_PERIOD);
_13.enableTypematic(this.TYPEMATIC_PERIOD);
_19.enableTypematic(this.TYPEMATIC_PERIOD);
_1b.enableTypematic(this.TYPEMATIC_PERIOD);
_1c.enableTypematic(this.TYPEMATIC_PERIOD);
}
catch(ex){
jsExDebug("widgetScrollTable_createDom",ex);
}
}
function widgetScrollTable_setDimensions(_1f,_20){
try{
if(_1f){
this.width=_1f;
this.widgetElement.style.width=_1f+"px";
}
if(_20){
this.height=_20;
this.widgetElement.style.height=_20+"px";
}
if(this.horizontalSlider){
var _21=Math.round(this.SLIDER_LENGTH_PERCENT*_1f);
this.horizontalSlider.barLength=_21;
this.horizontalSlider.barElement.style.width=this.horizontalSlider.barLength+"px";
this.horizontalSlider.widgetElement.style.width=this.horizontalSlider.barElement.style.width;
this.horizontalSlider.maxPosition=_21;
this.horizontalSlider.setUpperLimit(_21-40,this.SCROLL_LIMIT_VALUE_HOR);
this.horizontalSlider.setSlideValue(this.scrollX);
this.horizontalSlider.setPosition(this.HORIZONTAL_SLIDER_RIGHT+(2*this.SCROLL_BTN_WIDTH),this.HORIZONTAL_SLIDER_BOTTOM,1,1);
this.leftScrollLeftBtn.setPosition(this.HORIZONTAL_SLIDER_RIGHT+_21+(2*this.SCROLL_BTN_WIDTH),this.HORIZONTAL_SLIDER_BOTTOM,1,1);
}
if(this.verticalSlider){
var _22=Math.round(0.3*_20);
this.verticalSlider.barLength=_22;
this.verticalSlider.barElement.style.height=this.verticalSlider.barLength+"px";
this.verticalSlider.widgetElement.style.height=this.verticalSlider.barElement.style.height;
this.verticalSlider.maxPosition=_22;
this.verticalSlider.setUpperLimit(_22-40,this.SCROLL_LIMIT_VALUE_VERT);
this.verticalSlider.setSlideValue(this.scrollY);
this.verticalSlider.setPosition(this.VERTICAL_SLIDER_RIGHT,this.VERTICAL_SLIDER_BOTTOM+(2*this.SCROLL_BTN_HEIGHT),1,1);
this.upScrollAboveBtn.setPosition(this.VERTICAL_SLIDER_RIGHT,this.VERTICAL_SLIDER_BOTTOM+_22+(2*this.SCROLL_BTN_HEIGHT),1,1);
}
}
catch(ex){
jsExDebug("widgetScrollTable_setDimensions",ex);
}
}
function widgetScrollTable_cellDimCallback(_23,_24,z,me){
try{
var _27=me.translateDataToDisplay(_23,_24);
if(_27.x==0&&_23!=0){
_27.x=-1;
}
if(_27.y==0&&_24!=0){
_27.y=-1;
}
me.cellDim(_27.x,_27.y,z);
}
catch(ex){
jsExDebug("widgetScrollTable_cellDimCallback",ex);
}
}
function widgetScrollTable_cellHighlightCallback(_28,_29,z,me){
try{
var _2c=me.translateDataToDisplay(_28,_29);
if(_2c.x==0&&_28!=0){
_2c.x=-1;
}
if(_2c.y==0&&_29!=0){
_2c.y=-1;
}
if(z==me.z){
me.cellHighlight(_2c.x,_2c.y);
}
}
catch(ex){
jsExDebug("widgetScrollTable_cellHighlightCallback",ex);
}
}
function widgetScrollTable_cellPendHighlightCallback(_2d,_2e,z,me,_31){
try{
var _32=me.translateDataToDisplay(_2d,_2e);
var x=_32.x;
var y=_32.y;
if(x==0&&_2d!=0){
x=-1;
}
if(y==0&&_2e!=0){
y=-1;
}
if(x>=0&&y>=0&&x<me.tableColumnCount&&y<me.tableRowCount){
me.pendHighlight(_31,x,y,z);
}
}
catch(ex){
jsExDebug("widgetScrollTable_cellPendHighlightCallback",ex);
}
}
function widgetScrollTable_cellPendDimCallback(_35,_36,z,me,_39){
try{
var _3a=me.translateDataToDisplay(_35,_36);
var x=_3a.x;
var y=_3a.y;
if(x==0&&_35!=0){
x=-1;
}
if(y==0&&_36!=0){
y=-1;
}
if(x>=0&&y>=0&&x<me.tableColumnCount&&y<me.tableRowCount){
me.pendDim(_39,x,y,z);
}
}
catch(ex){
jsExDebug("widgetScrollTable_cellPendDimCallback ",ex);
}
}
function widgetScrollTable_scrollToPosition(_3d,_3e){
try{
var _3f=(_3d-1)-this.scrollX;
var _40=(_3e-1)-this.scrollY;
if(!_3f&&!_40){
return;
}
if(_3f<0&&_40==0){
this.scrollLeft(Math.abs(_3f));
return;
}else{
if(_3f==0&&_40<0){
this.scrollUp(Math.abs(_40));
return;
}else{
if(_3f>0&&_40==0){
this.scrollRight(_3f);
return;
}else{
if(_3f==0&&_40>0){
this.scrollDown(_40);
return;
}
}
}
}
var _41=[];
this.selection.applyFunction(this.cellPendDimCallback,this,_41);
var _42=this.selection.getActive();
if(_42){
this.dimActive(_42.x,_42.y);
}
this.scrollX+=_3f;
this.scrollY+=_40;
if(_3f<0&&_40<0){
_3f=Math.abs(_3f);
_40=Math.abs(_40);
for(var y=this.tableRowCount-1;y>=0;y--){
if(y>_40){
for(var x=this.tableColumnCount-1;x>0;x--){
if(x>_3f){
this.moveContent(x-_3f,y-_40,x,y);
}else{
this.refreshCell(y,x);
}
}
}else{
this.refreshRow(y);
}
}
}else{
if(_3f>0&&_40<0){
_40=Math.abs(_40);
for(var y=this.tableRowCount-1;y>=0;y--){
if(y>_40){
for(var x=0;x<this.tableColumnCount;x++){
if(x<(this.tableColumnCount-_3f)){
this.moveContent(x+_3f,y-_40,x,y);
}else{
this.refreshCell(y,x);
}
}
}else{
this.refreshRow(y);
}
}
}else{
if(_3f>0&&_40>0){
for(var y=0;y<this.tableRowCount;y++){
if(y<(this.tableRowCount-_40)){
for(var x=0;x<this.tableColumnCount;x++){
if(x<(this.tableColumnCount-_3f)){
this.moveContent(x+_3f,y+_40,x,y);
}else{
this.refreshCell(y,x);
}
}
}else{
this.refreshRow(y);
}
}
}else{
if(_3f<0&&_40>0){
_3f=Math.abs(_3f);
for(var y=0;y<this.tableRowCount;y++){
if(y<(this.tableRowCount-_40)){
for(var x=this.tableColumnCount-1;x>0;x--){
if(x>_3f){
this.moveContent(x-_3f,y+_40,x,y);
}else{
this.refreshCell(y,x);
}
}
}else{
this.refreshRow(y);
}
}
}
}
}
}
this.selection.applyFunction(this.cellPendHighlightCallback,this,_41);
this.applyPendingHighlights(_41);
if(_42){
this.highlightActive(_42.x,_42.y);
}
this.verticalSlider.setSlideValue(this.scrollY+1);
this.horizontalSlider.setSlideValue(this.scrollX+1);
}
catch(ex){
jsExDebug("widgetScrollTable_scrollToPosition",ex);
}
}
function widgetScrollTable_scrollToRow(_45){
try{
var _46=(_45-1)-this.scrollY;
if(_46>0){
this.scrollDown(_46);
}else{
if(_46<0){
this.scrollUp(_46*-1);
}
}
}
catch(ex){
jsExDebug("widgetScrollTable_scrollToRow",ex);
}
}
function widgetScrollTable_scrollToColumn(_47){
try{
var _48=(_47-1)-this.scrollX;
if(_48>0){
this.scrollRight(_48);
}else{
if(_48<0){
this.scrollLeft(Math.abs(_48));
}
}
}
catch(ex){
jsExDebug("widgetScrollTable_scrollToColumn",ex);
}
}
function widgetScrollTable_scrollUp(_49){
try{
if(!_49){
_49=1;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _4a=[];
this.selection.applyFunction(this.cellPendDimCallback,this,_4a);
var _4b=this.selection.getActive();
if(_4b){
this.dimActive(_4b.x,_4b.y);
}
var _4c=this.scrollY-_49;
if(_4c<0){
_49=this.scrollY;
this.scrollY=0;
}else{
this.scrollY=_4c;
}
this.refreshRowSizes();
for(var y=this.tableRowCount-1;y>_49;y--){
for(var x=0;x<this.tableColumnCount;x++){
this.moveContent(x,y-_49,x,y);
}
}
var _4f=_49;
if(_4f>this.tableRowCount){
_4f=this.tableRowCount-1;
}
for(var y=1;y<=_4f;y++){
this.refreshRow(y);
}
this.selection.applyFunction(this.cellPendHighlightCallback,this,_4a);
this.applyPendingHighlights(_4a);
if(_4b){
this.highlightActive(_4b.x,_4b.y);
}
this.verticalSlider.setSlideValue(this.scrollY+1);
this.displayVerticalScrollValue(this.scrollY+1);
}
catch(ex){
jsExDebug("widgetScrollTable_scrollUp",ex);
}
}
function widgetScrollTable_scrollDown(_50){
try{
if(!_50){
_50=1;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _51=[];
this.selection.applyFunction(this.cellPendDimCallback,this,_51);
var _52=this.selection.getActive();
if(_52){
this.dimActive(_52.x,_52.y);
}
this.scrollY+=_50;
this.refreshRowSizes();
var _53=this.tableRowCount-_50;
for(var y=1;y<_53;y++){
for(var x=0;x<this.tableColumnCount;x++){
this.moveContent(x,y+_50,x,y);
}
}
var _56=this.tableRowCount-_50;
if(_56<=0){
_56=1;
}
for(var y=_56;y<this.tableRowCount;y++){
this.refreshRow(y);
}
this.selection.applyFunction(this.cellPendHighlightCallback,this,_51);
this.applyPendingHighlights(_51);
if(_52){
this.highlightActive(_52.x,_52.y);
}
this.verticalSlider.setSlideValue(this.scrollY+1);
this.displayVerticalScrollValue(this.scrollY+1);
if(this.dataModule){
var _57=this.translateDisplayToData(null,this.tableRowCount-1);
var _58=this.calculateHeightAtRow(_57.y);
if(this.height>_58){
var _59=this.height-_58;
var _5a=parseInt(_59/this.DEFAULT_CELL_HEIGHT)+this.HIDDEN_CELL_BUFFER;
for(var i=0;i<_5a;i++){
this.appendRow();
}
this.redraw();
this.refreshTable();
this.selection.applyFunction(this.cellHighlightCallback,this);
}
}
}
catch(ex){
jsExDebug("widgetScrollTable_scrollDown",ex);
}
}
function widgetScrollTable_scrollLeft(_5c){
try{
if(!_5c){
_5c=1;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _5d=[];
this.selection.applyFunction(this.cellPendDimCallback,this,_5d);
var _5e=this.selection.getActive();
if(_5e){
this.dimActive(_5e.x,_5e.y);
}
var _5f=this.scrollX-_5c;
if(_5f<0){
_5c=this.scrollX;
this.scrollX=0;
}else{
this.scrollX=_5f;
}
this.refreshColumnSizes();
for(var y=0;y<this.tableRowCount;y++){
for(var x=this.tableColumnCount-1;x>_5c;x--){
this.moveContent(x-_5c,y,x,y);
}
}
var _62=_5c;
if(_62>this.tableColumnCount){
_62=this.tableColumnCount-1;
}
for(var x=1;x<=_62;x++){
this.refreshColumn(x);
}
this.selection.applyFunction(this.cellPendHighlightCallback,this,_5d);
this.applyPendingHighlights(_5d);
if(_5e){
this.highlightActive(_5e.x,_5e.y);
}
this.horizontalSlider.setSlideValue(this.scrollX+1);
this.displayHorizontalScrollValue(this.scrollX+1);
}
catch(ex){
jsExDebug("widgetScrollTable_scrollLeft",ex);
}
}
function widgetScrollTable_scrollRight(_63){
try{
if(!_63){
_63=1;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _64=[];
this.selection.applyFunction(this.cellPendDimCallback,this,_64);
var _65=this.selection.getActive();
if(_65){
this.dimActive(_65.x,_65.y);
}
this.scrollX+=_63;
var _66=this.tableRowCount;
var _67=this.tableColumnCount;
this.refreshColumnSizes();
for(var y=0;y<_66;y++){
for(var x=1;x<_67-_63;x++){
this.moveContent(x+_63,y,x,y);
}
}
var _6a=_67-_63;
if(_6a<=0){
_6a=1;
}
for(x=_6a;x<_67;x++){
this.refreshColumn(x);
}
this.selection.applyFunction(this.cellPendHighlightCallback,this,_64);
this.applyPendingHighlights(_64);
if(_65){
this.highlightActive(_65.x,_65.y);
}
this.horizontalSlider.setSlideValue(this.scrollX+1);
this.displayHorizontalScrollValue(this.scrollX+1);
}
catch(ex){
jsExDebug("widgetScrollTable_scrollRight",ex);
}
}
function widgetScrollTable_setContentByAddress(_6b,_6c,_6d,_6e){
try{
var _6f=this.translateDataToDisplay(_6b,_6c);
if(_6f.x==0||_6f.y==0){
return;
}
this.setContent(_6f.x,_6f.y,_6d);
if(this.dataModule&&_6e){
this.dataModule.setFormula(_6c,_6b,this.z,_6d);
}
}
catch(ex){
jsExDebug("widgetScrollTable_setContentByAddress",ex);
}
}
function widgetScrollTable_setScrollbarScreenPosition(_70){
try{
this.verticalSlider.setScreenPosition(_70.positionX+this.positionX+this.width-(this.verticalSlider.positionX+this.SCROLL_BTN_WIDTH),_70.positionY+this.positionY+this.height-(this.verticalSlider.positionY+this.verticalSlider.barLength));
this.horizontalSlider.setScreenPosition(_70.positionX+this.positionX+this.width-(this.horizontalSlider.positionX+this.horizontalSlider.barLength),_70.positionY+this.positionY+this.height-(this.horizontalSlider.positionY+this.SCROLL_BTN_HEIGHT));
}
catch(ex){
jsExDebug("widgetScrollTable_setScrollbarScreenPosition",ex);
}
}
function widgetScrollTable_editCell(_71,_72,_73){
try{
var _74=this.translateDataToDisplay(_71,_72);
var _75=this.table.rowArray[_74.y].cells[_74.x];
if(this.dataModule){
var _76=this.dataModule.getFormula(_72,_71,this.z);
this.dataEntryModule.edit(_75.cellDom,_73,_75,"showContent",this);
}
}
catch(ex){
jsExDebug("widgetScrollTable_editCell",ex);
}
}
function widgetScrollTable_translateDataToDisplay(_77,_78){
try{
if(_77!=null){
_77=(_77?(_77-this.scrollX):0);
}
if(_78!=null){
_78=(_78?(_78-this.scrollY):0);
}
return {x:_77,y:_78};
}
catch(ex){
jsExDebug("widgetScrollTable_translateDataToDisplay",ex);
}
}
function widgetScrollTable_translateDisplayToData(_79,_7a){
try{
if(_79!=null){
_79=(_79?(_79+this.scrollX):0);
}
if(_7a!=null){
_7a=(_7a?(_7a+this.scrollY):0);
}
return {x:_79,y:_7a};
}
catch(ex){
jsExDebug("widgetScrollTable_translateDisplayToData",ex);
}
}
function widgetScrollTable_mouseDownHandler(_7b,me,_7d){
try{
if(me.dragSession){
return;
}
if(!me.selection){
return;
}
if(me.table.rowArray[_7d.y].cells[_7d.x]!=me.activeCell){
if(me.dataEntryModule){
me.dataEntryModule.save();
}
}
var _7e=me.translateDisplayToData(_7d.x,_7d.y);
me.dragSession=true;
if(_7d.x==0||_7d.y==0){
me.activeCell=null;
}
if(_7b.shiftKey){
me.selection.applyFunction(me.cellDimCallback,me);
me.selection.expandLastRangeTo(_7e.x,_7e.y,me.z);
me.selection.applyFunction(me.cellHighlightCallback,me);
}else{
if(_7b.ctrlKey){
me.cellHighlight(_7d.x,_7d.y);
me.selection.addItem(_7e.x,_7e.y,me.z);
}else{
me.selection.applyFunction(me.cellDimCallback,me);
me.selection.clear();
me.selection.addItem(_7e.x,_7e.y,me.z);
me.cellHighlight(_7d.x,_7d.y);
}
}
}
catch(ex){
jsExDebug("widgetScrollTable_mouseDownHandler",ex);
}
}
function widgetScrollTable_dragOverHandler(_7f,me,_81){
try{
if(me.dragSession){
var _82=me.translateDisplayToData(_81.x,_81.y);
var _83=[];
me.selection.applyFunction(me.cellPendDimCallback,me,_83);
me.selection.expandLastRangeTo(_82.x,_82.y,me.z);
me.selection.applyFunction(me.cellPendHighlightCallback,me,_83);
me.applyPendingHighlights(_83);
}
}
catch(ex){
jsExDebug("widgetScrollTable_dragOverHandler",ex);
}
}
function widgetScrollTable_keyPressHandler(key){
try{
this.super_keyPressHandler(key);
}
catch(ex){
jsExDebug("widgetScrollTable_keyPressHandler",ex);
}
}
function widgetScrollTable_displayVerticalScrollValue(_85){
try{
this.displayY=_85;
var row=this.displayY;
var _87=numericToAlpha((this.displayX?this.displayX:1));
this.verticalSlider.displayValue(_87+""+row,1);
}
catch(ex){
jsExDebug("widgetScrollTable_displayVerticalScrollValue",ex);
}
}
function widgetScrollTable_displayHorizontalScrollValue(_88){
try{
this.displayX=_88;
var row=(this.displayY?this.displayY:1);
var _8a=numericToAlpha(this.displayX);
this.horizontalSlider.displayValue(_8a+""+row,1);
}
catch(ex){
jsExDebug("widgetScrollTable_displayHorizontalScrollValue",ex);
}
}
function widgetScrollTable_rightScrollEvent(_8b,_8c){
try{
this.scrollRight();
}
catch(ex){
jsExDebug("widgetScrollTable_rightScrollEvent",ex);
}
}
function widgetScrollTable_leftScrollEvent(_8d,_8e){
try{
this.scrollLeft();
}
catch(ex){
jsExDebug("widgetScrollTable_leftScrollEvent",ex);
}
}
function widgetScrollTable_upScrollEvent(_8f,_90){
try{
this.scrollUp();
}
catch(ex){
jsExDebug("widgetScrollTable_upScrollEvent",ex);
}
}
function widgetScrollTable_downScrollEvent(_91,_92){
try{
this.scrollDown();
}
catch(ex){
jsExDebug("widgetScrollTable_downScrollEvent",ex);
}
}
function widgetScrollTable_verticalScrollSelectEvent(_93,_94){
try{
var row=this.verticalSlider.slideValue;
if(row<=this.verticalSlider.minimumValue){
row=1;
}else{
if(row==this.SCROLL_LIMIT_VALUE_VERT&&this.scrollY>=(this.SCROLL_LIMIT_VALUE_VERT-1)){
row=this.scrollY+this.SCROLL_MAX_VALUE_INCR;
}
}
this.displayVerticalScrollValue(row);
this.scrollToRow(row);
}
catch(ex){
jsExDebug("widgetScrollTable_verticalScrollSelectEvent",ex);
}
}
function widgetScrollTable_verticalScrollDragEvent(_96,_97){
try{
var row=this.verticalSlider.slideValue;
if(row<=this.verticalSlider.minimumValue){
row=1;
}else{
if(row>this.SCROLL_LIMIT_VALUE_VERT&&this.scrollY>=(this.SCROLL_LIMIT_VALUE_VERT-1)){
row=this.scrollY+this.SCROLL_MAX_VALUE_INCR;
}
}
this.displayVerticalScrollValue(row);
}
catch(ex){
jsExDebug("widgetScrollTable_verticalScrollDragEvent",ex);
}
}
function widgetScrollTable_horizontalScrollSelectEvent(_99,_9a){
try{
var _9b=this.horizontalSlider.slideValue;
if(_9b<=this.horizontalSlider.minimumValue){
_9b=1;
}else{
if(_9b==this.SCROLL_LIMIT_VALUE_HOR&&this.scrollX>=(this.SCROLL_LIMIT_VALUE_HOR-1)){
_9b=this.scrollX+this.SCROLL_MAX_VALUE_INCR;
}
}
this.displayHorizontalScrollValue(_9b);
this.scrollToColumn(_9b);
}
catch(ex){
jsExDebug("widgetScrollTable_horizontalScrollSelectEvent",ex);
}
}
function widgetScrollTable_horizontalScrollDragEvent(_9c,_9d){
try{
var _9e=this.horizontalSlider.slideValue;
if(_9e<=this.horizontalSlider.minimumValue){
_9e=1;
}else{
if(_9e>this.SCROLL_LIMIT_VALUE_HOR&&this.scrollX>=(this.SCROLL_LIMIT_VALUE_HOR-1)){
_9e=this.scrollX+this.SCROLL_MAX_VALUE_INCR;
}
}
this.displayHorizontalScrollValue(_9e);
}
catch(ex){
jsExDebug("widgetScrollTable_horizontalScrollDragEvent",ex);
}
}
function widgetScrollTable_setRowHeight(_9f,_a0){
try{
this.table.rowArray[_9f].rowDom.style.height=_a0+"px";
this.table.rowArray[_9f].height=_a0;
var _a1=this.translateDisplayToData(null,_9f);
if(this.dataModule){
this.dataModule.setRowHeight(_a1.y,this.z,_a0);
}
this.redraw();
}
catch(ex){
jsExDebug("widgetScrollTable_setRowHeight",ex);
}
}
function widgetScrollTable_setColumnWidth(_a2,_a3){
try{
this.table.columnArray[_a2].domElement.style.width=_a3+"px";
this.table.columnArray[_a2].width=_a3;
var _a4=this.translateDisplayToData(_a2,null);
if(this.dataModule){
this.dataModule.setColumnWidth(_a4.x,this.z,_a3);
}
this.redraw();
}
catch(ex){
jsExDebug("widgetScrollTable_setColumnWidth",ex);
}
}

try{
widgetRadioBtn_t.prototype=new widget_t();
widgetRadioBtn_t.prototype.widgetRadioBtn_super=widget_t.prototype.constructor;
widgetRadioBtn_t.prototype.constructor=widgetRadioBtn_t;
widgetRadioBtn_t.prototype.cleanUp=widgetRadioBtn_cleanUp;
widgetRadioBtn_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetRadioBtn_t.prototype.createDom=widgetRadioBtn_createDom;
widgetRadioBtn_t.prototype.bindEvents=widgetRadioBtn_bindEvents;
widgetRadioBtn_t.prototype.isChecked=widgetRadioBtn_isChecked;
widgetRadioBtn_t.prototype.setCheckedState=widgetRadioBtn_setCheckedState;
widgetRadioBtn_t.prototype.highlight=widgetRadioBtn_highlight;
widgetRadioBtn_t.prototype.allowLabel=widgetRadioBtn_allowLabel;
widgetRadioBtn_t.prototype.disable=widgetRadioBtn_disable;
widgetRadioBtn_t.prototype.valueChangeEvent=widgetRadioBtn_valueChangeEvent;
widgetRadioBtn_t.prototype.LABEL_LEFT=1;
widgetRadioBtn_t.prototype.LABEL_RIGHT=2;
widgetRadioBtn_t.prototype.DEFAULT_EVENT=SYSTEM.Event.VALUE_CHANGED_EVENT;
widgetRadioBtn_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("widgetRadioBtn_t.prototype",ex);
}
function widgetRadioBtn_t(_1,_2,_3,_4,_5){
try{
this.widgetRadioBtn_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_5){
this.createDom(_2,_3,_4);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetRadioBtn_t",ex);
}
}
function widgetRadioBtn_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.widgetElement,"onclick","click");
me.buttonWidth=null;
me.buttonElement=null;
me.labelElement=null;
me.labelWidth=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetRadioBtn_cleanUp",ex);
}
}
function widgetRadioBtn_createDom(_7,_8,_9){
try{
if(_7){
this.widgetElement.style.width=_7+"px";
this.widgetElement.style.textAlign="center";
this.buttonWidth=_7;
}else{
this.buttonWidth=20;
}
if(_8){
this.widgetElement.style.height=_8+"px";
}else{
this.widgetElement.style.height="15px";
}
if(document.all){
this.buttonElement=document.createElement("<input type=\"radio\" name=\""+_9+"\" />");
}else{
this.buttonElement=document.createElement("input");
this.buttonElement.setAttribute("type","radio");
this.buttonElement.name=_9;
}
this.buttonElement.style.position="absolute";
this.buttonElement.style.height="15px";
this.buttonElement.style.top=_8?(parseInt(_8/2)-10)+"px":"0px";
this.buttonElement.style.left=_7?(parseInt(_7/2)-10)+"px":"0px";
this.buttonElement.style.border="";
this.widgetElement.appendChild(this.buttonElement);
}
catch(ex){
jsExDebug("widgetRadioBtn_createDom",ex);
}
}
function widgetRadioBtn_bindEvents(_a){
try{
this.SYSTEM.DM.attachEvent(this.widgetElement,"onclick","click",this.valueChangeEvent,this,false);
}
catch(ex){
jsExDebug("widgetRadioBtn_bindEvents",ex);
}
}
function widgetRadioBtn_valueChangeEvent(_b,me){
try{
me.fireEvent(me.SYSTEM.Event.VALUE_CHANGED_EVENT,_b);
}
catch(ex){
jsExDebug("widgetRadioBtn_valueChangeEvent",ex);
}
}
function widgetRadioBtn_isChecked(){
try{
return this.buttonElement.checked;
}
catch(ex){
jsExDebug("widgetRadioBtn_isChecked",ex);
}
}
function widgetRadioBtn_setCheckedState(_d,_e){
try{
this.buttonElement.checked=_d;
if(!_e){
this.valueChangeEvent(null,this);
}
}
catch(ex){
jsExDebug("widgetRadioBtn_setCheckedState",ex);
}
}
function widgetRadioBtn_highlight(_f){
try{
this.widgetElement.style.backgroundColor=_f;
}
catch(ex){
jsExDebug("widgetRadioBtn_highlight",ex);
}
}
function widgetRadioBtn_allowLabel(_10,_11,_12,_13){
try{
this.labelElement=document.createElement("span");
this.labelElement.style.position="absolute";
this.labelElement.style.bottom="0px";
if(_12){
this.labelElement.style.width=_12+"px";
this.labelWidth=_12;
}else{
this.labelElement.style.width="100px";
this.labelWidth=100;
_12=100;
}
switch(_11){
case this.LABEL_LEFT:
this.labelElement.style.left="0px";
this.buttonElement.style.left=(_12+4)+"px";
break;
case this.LABEL_RIGHT:
this.labelElement.style.left=(this.buttonWidth+4)+"px";
break;
}
if(_10){
this.labelElement.innerHTML=_10;
}
this.widgetElement.appendChild(this.labelElement);
}
catch(ex){
jsExDebug("widgetRadioBtn_allowLabel",ex);
}
}
function widgetRadioBtn_disable(){
try{
this.buttonElement.enabled=false;
}
catch(ex){
jsExDebug("widgetRadioBtn_disable",ex);
}
}

try{
radioBtnGroup_t.prototype=new widget_t();
radioBtnGroup_t.prototype.radioBtnGroup_super=widget_t.prototype.constructor;
radioBtnGroup_t.prototype.constructor=radioBtnGroup_t;
radioBtnGroup_t.prototype.cleanUp=radioBtnGroup_cleanUp;
radioBtnGroup_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
radioBtnGroup_t.prototype.setHorizontal=radioBtnGroup_setHorizontal;
radioBtnGroup_t.prototype.setVertical=radioBtnGroup_setVertical;
radioBtnGroup_t.prototype.addRadioButton=radioBtnGroup_addRadioButton;
radioBtnGroup_t.prototype.setSelectedValue=radioBtnGroup_setSelectedValue;
radioBtnGroup_t.prototype.disable=radioBtnGroup_disable;
radioBtnGroup_t.prototype.getSelectedValue=radioBtnGroup_getSelectedValue;
radioBtnGroup_t.prototype.buttonEvent=radioBtnGroup_buttonEvent;
radioBtnGroup_t.prototype.HORIZONTAL=1;
radioBtnGroup_t.prototype.VERTICAL=2;
radioBtnGroup_t.prototype.BUTTON_WIDTH=20;
radioBtnGroup_t.prototype.BUTTON_HEIGHT=20;
radioBtnGroup_t.prototype.LABEL_LEFT=widgetRadioBtn_t.prototype.LABEL_LEFT;
radioBtnGroup_t.prototype.LABEL_RIGHT=widgetRadioBtn_t.prototype.LABEL_RIGHT;
radioBtnGroup_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
radioBtnGroup_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("radioBtnGroup_t.prototype",ex);
}
function radioBtnGroup_t(_1,_2,_3){
try{
this.radioBtnGroup_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.radioButtonArray=[];
this.nextButtonOffset=0;
this.selectedValue=null;
this.direction=this.HORIZONTAL;
this.groupName=_2;
if(!_3){
}
}
catch(ex){
jsExDebug("radioBtnGroup_t",ex);
}
}
function radioBtnGroup_cleanUp(me){
try{
if(!me){
me=this;
}
for(var i=0;i<me.radioButtonArray.length;i++){
if(me.radioButtonArray[i]){
me.radioButtonArray[i].button.cleanUp();
me.radioButtonArray[i].value=null;
me.radioButtonArray[i].button=null;
me.radioButtonArray[i]=null;
}
}
me.radioButtonArray=null;
me.nextButtonOffset=null;
me.direction=null;
me.selectedValue=null;
me.groupName=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("radioBtnGroup_cleanUp",ex);
}
}
function radioBtnGroup_setHorizontal(){
try{
this.direction=this.HORIZONTAL;
}
catch(ex){
jsExDebug("radioBtnGroup_setHorizontal",ex);
}
}
function radioBtnGroup_setVertical(){
try{
this.direction=this.VERTICAL;
}
catch(ex){
jsExDebug("radioBtnGroup_setVertical",ex);
}
}
function radioBtnGroup_addRadioButton(_6,_7,_8,_9){
try{
var _a=this.radioButtonArray.length;
var _b=new this.SYSTEM.Widget.RadioButton("button",null,null,this.groupName+"_"+_a);
_b.allowLabel(_7,_8,_9);
_b.attach(this.widgetElement);
if(this.direction==this.HORIZONTAL){
_b.setPosition(this.nextButtonOffset,0);
this.nextButtonOffset+=(this.BUTTON_WIDTH+_9);
}else{
if(this.direction==this.VERTICAL){
_b.setPosition(0,this.nextButtonOffset);
this.nextButtonOffset+=this.BUTTON_HEIGHT;
}
}
var _c=new this.SYSTEM.Delegate(this,this.buttonEvent(_a));
_b.notifyEvent(this.SYSTEM.Event.VALUE_CHANGED_EVENT,_c);
this.radioButtonArray[_a]={value:_6,button:_b};
return _b;
}
catch(ex){
jsExDebug("radioBtnGroup_addRadioButton",ex);
}
}
function radioBtnGroup_setSelectedValue(_d){
try{
if(_d==null){
return;
}
for(var i in this.radioButtonArray){
if(this.radioButtonArray[i].value==_d){
this.radioButtonArray[i].button.setCheckedState(true);
break;
}
}
}
catch(ex){
jsExDebug("radioBtnGroup_setSelectedValue",ex);
}
}
function radioBtnGroup_disable(){
try{
for(var i=0;i<this.radioButtonArray.length;i++){
if(this.radioButtonArray[i]){
this.radioButtonArray[i].button.disable();
}
}
}
catch(ex){
jsExDebug("radioBtnGroup_disable",ex);
}
}
function radioBtnGroup_getSelectedValue(){
try{
return this.selectedValue;
}
catch(ex){
jsExDebug("radioBtnGroup_getSelectedValue",ex);
}
}
function radioBtnGroup_buttonEvent(_10){
function handler(_11,_12){
try{
me.selectedValue=me.radioButtonArray[_10].value;
for(var i=0;i<me.radioButtonArray.length;i++){
if(me.radioButtonArray[i]&&i!=_10){
me.radioButtonArray[i].button.setCheckedState(false,1);
}
}
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_SELECT_EVENT);
}
catch(ex){
jsExDebug("radioBtnGroup_buttonEvent: handler",ex);
}
}
try{
var me=this;
return handler;
}
catch(ex){
jsExDebug("radioBtnGroup_buttonEvent",ex);
}
}

try{
spreadSlidebar_t.prototype=new widgetSlidebar_t();
spreadSlidebar_t.prototype.constructor=spreadSlidebar_t;
spreadSlidebar_t.prototype.spreadSlidebar_super=widgetSlidebar_t.prototype.constructor;
spreadSlidebar_t.prototype.cleanUp=spreadSlidebar_cleanUp;
spreadSlidebar_t.prototype.widgetSlidebar_cleanUp=widgetSlidebar_t.prototype.cleanUp;
spreadSlidebar_t.prototype.widgetSlidebar_createDom=widgetSlidebar_t.prototype.createDom;
spreadSlidebar_t.prototype.createDom=spreadSlidebar_createDom;
spreadSlidebar_t.prototype.widgetSlidebar_bindEvents=widgetSlidebar_t.prototype.bindEvents;
spreadSlidebar_t.prototype.bindEvents=spreadSlidebar_bindEvents;
spreadSlidebar_t.prototype.allowAlphaNumericValue=spreadSlidebar_allowAlphaNumericValue;
spreadSlidebar_t.prototype.getDisplayValue=spreadSlidebar_getDisplayValue;
}
catch(ex){
jsExDebug("spreadSlidebar_t.prototype",ex);
}
function spreadSlidebar_t(_1,_2,_3,_4){
try{
this.spreadSlidebar_super(_1,_2,_3,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.settingAllowAlphaNumericValue=false;
if(!_4){
this.createDom(_2,_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("spreadSlidebar_t",ex);
}
}
function spreadSlidebar_cleanUp(me){
try{
if(!me){
var me=this;
}
me.settingAllowAlphaNumericValue=null;
me.widgetSlidebar_cleanUp();
}
catch(ex){
jsExDebug("spreadSlidebar_cleanUp",ex);
}
}
function spreadSlidebar_createDom(_6,_7){
try{
this.widgetSlidebar_createDom(_6,_7);
}
catch(ex){
jsExDebug("spreadSlidebar_createDom",ex);
}
}
function spreadSlidebar_bindEvents(){
try{
this.widgetSlidebar_bindEvents();
}
catch(ex){
jsExDebug("spreadSlidebar_bindEvents",ex);
}
}
function spreadSlidebar_allowAlphaNumericValue(){
try{
this.settingAllowAlphaNumeric=true;
}
catch(ex){
jsExDebug("spreadSlidebar_allowAlphaNumericValue",ex);
}
}
function spreadSlidebar_getDisplayValue(){
try{
if(!this.slideValue){
this.slideValue=1;
}
if(this.settingAllowAlphaNumeric){
return numericToAlpha(this.slideValue);
}else{
return this.slideValue;
}
}
catch(ex){
jsExDebug("spreadSlidebar_getDisplayValue",ex);
}
}

try{
widgetScalebar_t.prototype=new widget_t();
widgetScalebar_t.prototype.widgetScalebar_super=widget_t.prototype.constructor;
widgetScalebar_t.prototype.constructor=widgetScalebar_t;
widgetScalebar_t.prototype.cleanUp=widgetScalebar_cleanUp;
widgetScalebar_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetScalebar_t.prototype.createDom=widgetScalebar_createDom;
widgetScalebar_t.prototype.bindEvents=widgetScalebar_bindEvents;
widgetScalebar_t.prototype.setDimensions=widgetScalebar_setDimensions;
widgetScalebar_t.prototype.setUnits=widgetScalebar_setUnits;
widgetScalebar_t.prototype.setValue=widgetScalebar_setValue;
widgetScalebar_t.prototype.setValuePosition=widgetScalebar_setValuePosition;
widgetScalebar_t.prototype.DEFAULT_WIDTH=100;
widgetScalebar_t.prototype.HEIGHT=35;
widgetScalebar_t.prototype.BAR_HEIGHT=4;
widgetScalebar_t.prototype.TOP_LEFT=1;
widgetScalebar_t.prototype.TOP_RIGHT=2;
widgetScalebar_t.prototype.BOTTOM_LEFT=3;
widgetScalebar_t.prototype.BOTTOM_RIGHT=4;
widgetScalebar_t.prototype.DEFAULT_BG_COLOUR="#AAAAAA";
widgetScalebar_t.prototype.DEFAULT_BORDER="solid 1px black";
}
catch(ex){
jsExDebug("widgetScalebar_t.prototype",ex);
}
function widgetScalebar_t(_1,_2){
try{
this.widgetScalebar_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.value=null;
this.units=null;
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetScalebar_t",ex);
}
}
function widgetScalebar_cleanUp(me){
try{
if(!me){
me=this;
}
me.value=null;
me.units=null;
me.barElement=null;
me.valueLabel.cleanUp();
me.valueLabel=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetScalebar_cleanUp",ex);
}
}
function widgetScalebar_createDom(){
try{
this.widgetElement.style.width=this.DEFAULT_WIDTH+"px";
this.widgetElement.style.height=this.HEIGHT+"px";
var _4=document.createElement("div");
_4.style.position="absolute";
_4.style.left="0px";
_4.style.top="0px";
_4.style.width=this.DEFAULT_WIDTH+"px";
_4.style.height=this.BAR_HEIGHT+"px";
_4.style.backgroundColor=this.DEFAULT_BG_COLOUR;
_4.style.border=this.DEFAULT_BORDER;
this.barElement=_4;
this.widgetElement.appendChild(this.barElement);
this.valueLabel=new this.SYSTEM.Widget.Label("lbl");
this.valueLabel.setDimensions(this.DEFAULT_WIDTH,(this.HEIGHT-this.BAR_HEIGHT-2));
this.valueLabel.setAlignment("right");
this.valueLabel.setPosition(0,0,1,1);
this.valueLabel.attach(this.widgetElement);
}
catch(ex){
jsExDebug("widgetScalebar_createDom",ex);
}
}
function widgetScalebar_bindEvents(){
try{
}
catch(ex){
jsExDebug("widgetScalebar_bindEvents",ex);
}
}
function widgetScalebar_setDimensions(_5){
try{
this.width=_5;
this.widgetElement.style.width=_5+"px";
this.widgetElement.style.height=this.HEIGHT+"px";
this.barElement.style.width=_5+"px";
this.valueLabel.setDimensions(_5,(this.HEIGHT-this.BAR_HEIGHT));
}
catch(ex){
jsExDebug("widgetScalebar_setDimensions",ex);
}
}
function widgetScalebar_setUnits(_6){
try{
this.units=_6;
this.valueLabel.setText(this.value+" "+_6);
}
catch(ex){
jsExDebug("widgetScalebar_setUnits",ex);
}
}
function widgetScalebar_setValue(_7){
try{
this.value=_7;
this.valueLabel.setText(_7+" "+this.units);
}
catch(ex){
jsExDebug("widgetScalebar_setValue",ex);
}
}
function widgetScalebar_setValuePosition(_8){
try{
switch(_8){
case this.TOP_LEFT:
this.valueLabel.setAlignment("left");
this.valueLabel.setPosition(0,0);
this.barElement.style.top=(this.HEIGHT-this.BAR_HEIGHT)+"px";
break;
case this.TOP_RIGHT:
this.valueLabel.setAlignment("right");
this.valueLabel.setPosition(0,0,1);
this.barElement.style.top=(this.HEIGHT-this.BAR_HEIGHT)+"px";
break;
case this.BOTTOM_LEFT:
this.valueLabel.setAlignment("left");
this.valueLabel.setPosition(0,0,0,1);
this.barElement.style.top="0px";
break;
case this.BOTTOM_RIGHT:
this.valueLabel.setAlignment("right");
this.valueLabel.setPosition(0,0,1,1);
this.barElement.style.top="0px";
break;
}
}
catch(ex){
jsExDebug("widgetScalebar_setValuePosition",ex);
}
}

try{
widgetTask_t.prototype=new widget_t();
widgetTask_t.prototype.widgetTask_super=widget_t.prototype.constructor;
widgetTask_t.prototype.constructor=widgetTask_t;
widgetTask_t.prototype.cleanUp=widgetTask_cleanUp;
widgetTask_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetTask_t.prototype.createDom=widgetTask_createDom;
widgetTask_t.prototype.bindEvents=widgetTask_bindEvents;
widgetTask_t.prototype.setDimensions=widgetTask_setDimensions;
widgetTask_t.prototype.makeBig=widgetTask_makeBig;
widgetTask_t.prototype.makeMedium=widgetTask_makeMedium;
widgetTask_t.prototype.restoreSize=widgetTask_restoreSize;
widgetTask_t.prototype.getApplication=widgetTask_getApplication;
widgetTask_t.prototype.applyImage=widgetTask_applyImage;
widgetTask_t.prototype.makeMinimised=widgetTask_makeMinimised;
widgetTask_t.prototype.selectEvent=widgetTask_selectEvent;
widgetTask_t.prototype.enterEvent=widgetTask_enterEvent;
widgetTask_t.prototype.exitEvent=widgetTask_exitEvent;
widgetTask_t.prototype.SMALL_WIDTH=32;
widgetTask_t.prototype.SMALL_HEIGHT=32;
widgetTask_t.prototype.MEDIUM_WIDTH=48;
widgetTask_t.prototype.MEDIUM_HEIGHT=48;
widgetTask_t.prototype.BIG_WIDTH=64;
widgetTask_t.prototype.BIG_HEIGHT=64;
widgetTask_t.prototype.SMALL=1;
widgetTask_t.prototype.MEDIUM=2;
widgetTask_t.prototype.BIG=3;
widgetTask_t.prototype.LEFT_ALIGN=1;
widgetTask_t.prototype.RIGHT_ALIGN=2;
widgetTask_t.prototype.CENTRE_ALIGN=3;
widgetTask_t.prototype.DEFAULT_EVENT=SYSTEM.Event.CLICK_EVENT;
widgetTask_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.MOUSE_ENTER_EVENT,SYSTEM.Event.MOUSE_EXIT_EVENT];
}
catch(ex){
jsExDebug("widgetTask_t.prototype",ex);
}
function widgetTask_t(_1,_2,_3){
try{
this.widgetTask_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.stateCurrentSize=this.SMALL;
this.stateApplication=_2;
if(_2){
this.stateSmallImage=_2.iconSrc+"_small_off.png";
this.stateMediumImage=_2.iconSrc+"_med_off.png";
this.stateBigImage=_2.iconSrc+"_big_off.png";
}
if(!_3){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetTask_t",ex);
}
}
function widgetTask_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.imageElement,"onclick","click");
me.SYSTEM.Event.detachEvent(me.imageElement,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.imageElement,"onmouseout","mouseout");
me.stateSmallImage=null;
me.stateMediumImage=null;
me.stateBigImage=null;
me.stateCurrentSize=null;
me.stateApplication=null;
me.widgetElement.taskManagerDontRetract=null;
me.imageElement.taskManagerDontRetract=null;
me.imageElement=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetTask_cleanUp",ex);
}
}
function widgetTask_createDom(){
try{
this.imageElement=document.createElement("img");
this.imageElement.style.position="absolute";
this.imageElement.style.cursor="pointer";
this.imageElement.src=this.stateSmallImage;
this.widgetElement.appendChild(this.imageElement);
this.setDimensions(this.SMALL_WIDTH,this.SMALL_HEIGHT);
this.widgetElement.taskManagerDontRetract=true;
this.imageElement.taskManagerDontRetract=true;
}
catch(ex){
jsExDebug("widgetTask_createDom",ex);
}
}
function widgetTask_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.imageElement,"onclick","click",this.selectEvent,this);
this.SYSTEM.Event.attachEvent(this.imageElement,"onmouseover","mouseover",this.enterEvent,this);
this.SYSTEM.Event.attachEvent(this.imageElement,"onmouseout","mouseout",this.exitEvent,this);
}
catch(ex){
jsExDebug("widgetTask_bindEvents",ex);
}
}
function widgetTask_setDimensions(_5,_6){
try{
this.width=_5;
this.height=_6;
this.widgetElement.style.width=_5+"px";
this.widgetElement.style.height=_6+"px";
this.imageElement.style.width=_5+"px";
this.imageElement.style.height=_6+"px";
}
catch(ex){
jsExDebug("widgetTask_setDimensions",ex);
}
}
function widgetTask_makeMedium(){
try{
var _7=(this.width-this.MEDIUM_HEIGHT)/2;
var _8=(this.height-this.MEDIUM_HEIGHT);
this.setPosition(this.positionX+_7,this.positionY+_8);
this.setDimensions(this.MEDIUM_WIDTH,this.MEDIUM_HEIGHT);
this.applyImage(this.stateMediumImage);
this.stateCurrentSize=this.MEDIUM;
}
catch(ex){
jsExDebug("widgetTask_makeMedium",ex);
}
}
function widgetTask_makeBig(){
try{
var _9=(this.width-this.BIG_HEIGHT)/2;
var _a=(this.height-this.BIG_HEIGHT);
this.setPosition(this.positionX+_9,this.positionY+_a);
this.setDimensions(this.BIG_WIDTH,this.BIG_HEIGHT);
this.applyImage(this.stateBigImage);
this.stateCurrentSize=this.BIG;
}
catch(ex){
jsExDebug("widgetTask_makeBig",ex);
}
}
function widgetTask_restoreSize(){
try{
var _b=(this.width-this.SMALL_HEIGHT)/2;
var _c=(this.height-this.SMALL_HEIGHT);
this.setPosition(this.positionX+_b,this.positionY+_c);
this.setDimensions(this.SMALL_WIDTH,this.SMALL_HEIGHT);
this.applyImage(this.stateSmallImage);
this.stateCurrentSize=this.SMALL;
}
catch(ex){
jsExDebug("widgetTask_restoreSize",ex);
}
}
function widgetTask_selectEvent(_d,me){
try{
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_d);
}
catch(ex){
jsExDebug("widgetTask_selectEvent",ex);
}
}
function widgetTask_enterEvent(_f,me){
try{
me.fireEvent(me.SYSTEM.Event.MOUSE_ENTER_EVENT,_f);
}
catch(ex){
jsExDebug("widgetTask_enterEvent",ex);
}
}
function widgetTask_exitEvent(_11,me){
try{
me.fireEvent(me.SYSTEM.Event.MOUSE_EXIT_EVENT,_11);
}
catch(ex){
jsExDebug("widgetTask_exitEvent",ex);
}
}
function widgetTask_getApplication(app){
try{
return this.stateApplication;
}
catch(ex){
jsExDebug("widgetTask_getApplication",ex);
}
}
function widgetTask_applyImage(_14){
try{
if(this.SYSTEM.Network.networkStatus==this.SYSTEM.Network.ONLINE){
this.imageElement.src=_14;
}
}
catch(ex){
jsExDebug("widgetTask_applyImage",ex);
}
}
function widgetTask_makeMinimised(_15){
try{
this.SYSTEM.Dom.setElementOpacity(this.widgetElement,(_15?50:100));
}
catch(ex){
jsExDebug("widgetTask_makeMinimised",ex);
}
}

try{
widgetTaskManager_t.prototype=new widget_t();
widgetTaskManager_t.prototype.widgetTaskManager_super=widget_t.prototype.constructor;
widgetTaskManager_t.prototype.constructor=widgetTaskManager_t;
widgetTaskManager_t.prototype.cleanUp=widgetTaskManager_cleanUp;
widgetTaskManager_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetTaskManager_t.prototype.createDom=widgetTaskManager_createDom;
widgetTaskManager_t.prototype.bindEvents=widgetTaskManager_bindEvents;
widgetTaskManager_t.prototype.addTask=widgetTaskManager_addTask;
widgetTaskManager_t.prototype.removeTask=widgetTaskManager_removeTask;
widgetTaskManager_t.prototype.isLocked=widgetTaskManager_isLocked;
widgetTaskManager_t.prototype.setTaskMinimised=widgetTaskManager_setTaskMinimised;
widgetTaskManager_t.prototype.restoreAllTasksSize=widgetTaksManager_restoreAllTasksSize;
widgetTaskManager_t.prototype.makeTaskBig=widgetTaskManager_makeTaskBig;
widgetTaskManager_t.prototype.checkRelatedTarget=widgetTaskManager_checkRelatedTarget;
widgetTaskManager_t.prototype.windowResizeEvent=widgetTaskManager_windowResizeEvent;
widgetTaskManager_t.prototype.checkForTaskOverflow=widgetTaskManager_checkForTaskOverflow;
widgetTaskManager_t.prototype.userDetailsRefreshCallback=widgetTaskManager_userDetailsRefreshCallback;
widgetTaskManager_t.prototype.mouseOutEvent=widgetTaskManager_mouseOutEvent;
widgetTaskManager_t.prototype.endMouseOverEvent=widgetTaskManager_endMouseOverEvent;
widgetTaskManager_t.prototype.taskClickEvent=widgetTaskManager_taskClickEvent;
widgetTaskManager_t.prototype.taskMouseEnterEvent=widgetTaskManager_taskMouseEnterEvent;
widgetTaskManager_t.prototype.taskMouseExitEvent=widgetTaskManager_taskMouseExitEvent;
widgetTaskManager_t.prototype.mouseExitHandler=widgetTaskManager_mouseExitHandler;
widgetTaskManager_t.prototype.moreTasksBtnClickEvent=widgetTaskManager_moreTasksBtnClickEvent;
widgetTaskManager_t.prototype.HEIGHT=32;
widgetTaskManager_t.prototype.HIDE_SHOW_BTN_WIDTH=15;
widgetTaskManager_t.prototype.HIDE_SHOW_BTN_HEIGHT=490;
widgetTaskManager_t.prototype.HIDE_SHOW_BTN_LEFT=0;
widgetTaskManager_t.prototype.SHOW_IMG="img/app/system/taskbar/sidebar";
widgetTaskManager_t.prototype.BACKGROUND_IMG="img/app/system/launcher/bar_bg.png";
widgetTaskManager_t.prototype.CURVE_IMG_WIDTH=60;
widgetTaskManager_t.prototype.CURVE_IMG_HEIGHT=5;
widgetTaskManager_t.prototype.TOP_CURVE_IMG="img/app/system/taskbar/top.png";
widgetTaskManager_t.prototype.BOTTOM_CURVE_IMG="img/app/system/taskbar/bottom.png";
widgetTaskManager_t.prototype.LOCK_IMG="img/app/system/taskbar/lock";
widgetTaskManager_t.prototype.MORE_TASKS_IMG="img/app/system/taskbar/more";
widgetTaskManager_t.prototype.MORE_TASKS_SIDE=16;
widgetTaskManager_t.prototype.TASK_TOP=0;
widgetTaskManager_t.prototype.TASK_V_PADDING=0;
widgetTaskManager_t.prototype.SMALL_OFFSET=5;
widgetTaskManager_t.prototype.LARGE_OFFSET=10;
widgetTaskManager_t.prototype.BIG_HEIGHT_DIFF=widgetTask_t.prototype.BIG_HEIGHT-widgetTask_t.prototype.MEDIUM_HEIGHT;
widgetTaskManager_t.prototype.SMALL_HEIGHT_DIFF=widgetTask_t.prototype.MEDIUM_HEIGHT-widgetTask_t.prototype.SMALL_HEIGHT;
widgetTaskManager_t.prototype.DEFAULT_EVENT=null;
widgetTaskManager_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("widgetTaskManager_t.prototype",ex);
}
function widgetTaskManager_t(_1,_2){
try{
this.widgetTaskManager_super(_1,true);
this.visible=null;
this.taskArray=[];
this.reallyBigIndex=null;
this.lowBigIndex=null;
this.highBigIndex=null;
this.numTasks=0;
this.nextIndex=0;
this.highestIndex=0;
this.smallXOffset=(this.BIG_HEIGHT_DIFF/2)+(this.SMALL_HEIGHT_DIFF);
this.largeXOffset=(this.BIG_HEIGHT_DIFF/2)+(this.SMALL_HEIGHT_DIFF*1.5);
if(!_2){
this.createDom();
this.bindEvents();
}
this.windowResizeEvent(this.SYSTEM.Environment.SCREEN_WIDTH);
this.windowResizeIndex=this.SYSTEM.Event.notifyWindowResize(new this.SYSTEM.Delegate(this,this.windowResizeEvent));
this.userDetailsIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_LOAD,new this.SYSTEM.Delegate(this,this.userDetailsRefreshCallback));
}
catch(ex){
jsExDebug("widgetTaskManager_t",ex);
}
}
function widgetTaskManager_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.removeWindowResizeHandler(me.windowResizeIndex);
me.windowResizeIndex=null;
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsIndex);
me.userDetailsIndex=null;
}
me.visible=null;
me.reallyBigIndex=null;
me.lowBigIndex=null;
me.highBigIndex=null;
me.numTasks=null;
me.nextIndex=null;
me.highestIndex=null;
me.initialInvisibility=null;
me.smallXOffset=null;
me.largeXOffset=null;
for(var i=0;i<me.taskArray.length;i++){
if(me.taskArray[i]){
me.taskArray[i].cleanUp();
me.taskArray[i]=null;
delete me.taskArray[i];
}
}
me.taskArray=null;
me.moreTasksBtn.cleanUp();
me.moreTasksBtn=null;
me.widgetElement.taskManagerDontRetract=null;
if(SYSTEM.APPLICATION_MANAGER.getTaskListWidget()==me){
SYSTEM.APPLICATION_MANAGER.setTaskListWidget(null);
}
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetTaskManager_cleanUp",ex);
}
}
function widgetTaskManager_createDom(){
try{
this.widgetElement.style.zIndex=TASK_MANAGER_ZINDEX;
var _5=this.SYSTEM.Dom.createDiv("absolute");
_5.style.width="100%";
_5.style.height="100%";
_5.style.backgroundColor="rgb(0,0,0)";
this.SYSTEM.Dom.setElementOpacity(_5,this.SYSTEM.Launcher.OPACITY);
this.widgetElement.appendChild(_5);
var _6=new this.SYSTEM.Widget.Button("moreTasksBtn",this.MORE_TASKS_IMG,this.SYSTEM.Widget.Button.HOVER_IMAGE,this.MORE_TASKS_SIDE,this.MORE_TASKS_SIDE);
_6.setPosition(0,(this.HEIGHT-this.MORE_TASKS_SIDE)/2,true);
_6.hide();
_6.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.moreTasksBtnClickEvent));
_6.attach(this.widgetElement);
this.moreTasksBtn=_6;
this.widgetElement.taskManagerDontRetract=true;
}
catch(ex){
jsExDebug("widgetTaskManager_createDom",ex);
}
}
function widgetTaskManager_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmouseout","mouseout",this.mouseOutEvent,this);
}
catch(ex){
jsExDebug("widgetTaskManager_bindEvents",ex);
}
}
function widgetTaskManager_addTask(_7){
try{
var _8=this.largeXOffset+(this.TASK_V_PADDING+this.CURVE_IMG_HEIGHT)+(this.numTasks*_7.width)+(this.numTasks*this.TASK_V_PADDING);
this.highestIndex=this.nextIndex;
var _9=this.highestIndex;
_7.setPosition(_8,this.TASK_TOP);
if(_8>(this.width-_7.width-this.MORE_TASKS_SIDE)){
this.moreTasksBtn.show();
}else{
_7.attach(this.widgetElement);
}
var _a=new this.SYSTEM.Delegate(this,this.taskClickEvent(_9));
var _b=new this.SYSTEM.Delegate(this,this.taskMouseEnterEvent(_9));
var _c=new this.SYSTEM.Delegate(this,this.taskMouseExitEvent);
_7.notifyEvent(this.SYSTEM.Event.CLICK_EVENT,_a);
_7.notifyEvent(this.SYSTEM.Event.MOUSE_ENTER_EVENT,_b);
_7.notifyEvent(this.SYSTEM.Event.MOUSE_EXIT_EVENT,_c);
this.taskArray[_9]=_7;
this.nextIndex++;
this.numTasks++;
return _9;
}
catch(ex){
jsExDebug("widgetTaskManager_addTask",ex);
}
}
function widgetTaskManager_removeTask(){
function o1_withTask(_d){
try{
for(var i=0;i<me.taskArray.length;i++){
if(me.taskArray[i]&&me.taskArray[i]==_d){
o1_withIndex(i);
break;
}
}
}
catch(ex){
jsExDebug("widgetTaskManager_removeTask: o1_withTask",ex);
}
}
function o1_withApp(app){
try{
for(var i=0;i<me.taskArray.length;i++){
if(me.taskArray[i]&&me.taskArray[i].getApplication()==app){
o1_withIndex(i);
break;
}
}
}
catch(ex){
jsExDebug("widgetTaskManager_removeTask: o1_withApp",ex);
}
}
function o1_withIndex(_12){
try{
if(!me.taskArray[_12]){
return;
}
_13=parseInt(_12);
_14=me.taskArray[_12].width;
me.taskArray[_12].cleanUp();
me.taskArray[_12]=null;
me.numTasks--;
delete me.taskArray[_12];
}
catch(ex){
jsExDebug("widgetTaskManager_removeTask: o1_withIndex",ex);
}
}
try{
var me=this;
var _13;
var _14;
if(arguments[0]==null){
return false;
}
if(typeof arguments[0]=="object"&&arguments[0] instanceof widgetTask_t){
o1_withTask(arguments[0]);
}else{
if(typeof arguments[0]=="object"&&arguments[0] instanceof application_t){
o1_withApp(arguments[0]);
}else{
o1_withIndex(arguments[0]);
}
}
if(_13==null){
return;
}
for(var i=(_13+1);i<=this.highestIndex;i++){
if(this.taskArray[i]){
var _16=this.taskArray[i];
_16.setPosition(_16.positionX-_14,_16.positionY);
}
}
this.checkForTaskOverflow();
}
catch(ex){
jsExDebug("widgetTaskManager_removeTask",ex);
}
}
function widgetTaskManager_isLocked(){
try{
return this.locked;
}
catch(ex){
jsExDebug("widgetTaskManager_isLocked",ex);
}
}
function widgetTaskManager_setTaskMinimised(app,_18){
try{
for(var i=0;i<this.taskArray.length;i++){
if(this.taskArray[i]&&this.taskArray[i].getApplication()==app){
this.taskArray[i].makeMinimised(_18);
break;
}
}
}
catch(ex){
jsExDebug("widgetTaskManager_setTaskMinimised",ex);
}
}
function widgetTaksManager_restoreAllTasksSize(){
try{
var _1a=this.taskArray[this.reallyBigIndex];
var _1b=this.taskArray[this.lowBigIndex];
var _1c=this.taskArray[this.highBigIndex];
if(_1a){
_1a.restoreSize();
}
if(_1b){
_1b.restoreSize();
_1b.setPosition(_1b.positionX+this.smallXOffset,_1b.positionY);
}
if(_1c){
_1c.restoreSize();
_1c.setPosition(_1c.positionX-this.smallXOffset,_1c.positionY);
}
for(var i=0;i<this.taskArray.length;i++){
var _1e=this.taskArray[i];
if(_1e&&_1e.name){
if(i<this.lowBigIndex){
_1e.setPosition(_1e.positionX+this.largeXOffset,_1e.positionY);
}else{
if(this.highBigIndex&&i>this.highBigIndex){
_1e.setPosition(_1e.positionX-this.largeXOffset,_1e.positionY);
}
}
}
}
}
catch(ex){
jsExDebug("widgetTaksManager_restoreAllTasksSize",ex);
}
}
function widgetTaskManager_makeTaskBig(_1f){
try{
this.reallyBigIndex=_1f;
this.lowBigIndex=null;
this.highBigIndex=null;
for(var i=_1f-1;i>=0;i--){
if(this.taskArray[i]){
this.lowBigIndex=i;
break;
}
}
for(var i=_1f+1;i<=this.highestIndex;i++){
if(this.taskArray[i]){
this.highBigIndex=i;
break;
}
}
var _21=this.taskArray[this.reallyBigIndex];
_21.makeBig();
if(this.taskArray[this.lowBigIndex]){
var _22=this.taskArray[this.lowBigIndex];
_22.makeMedium();
_22.setPosition(_22.positionX-this.smallXOffset,_22.positionY);
}
if(this.taskArray[this.highBigIndex]){
var _23=this.taskArray[this.highBigIndex];
_23.makeMedium();
_23.setPosition(_23.positionX+this.smallXOffset,_23.positionY);
}
for(var i=0;i<this.taskArray.length;i++){
var _24=this.taskArray[i];
if(!_24){
continue;
}
if(i<this.lowBigIndex){
_24.setPosition(_24.positionX-this.largeXOffset,_24.positionY);
}else{
if(this.highBigIndex&&i>this.highBigIndex){
_24.setPosition(_24.positionX+this.largeXOffset,_24.positionY);
}
}
}
this.SYSTEM.WINDOW_MANAGER.highlight(_21.getApplication().getRunId());
}
catch(ex){
jsExDebug("widgetTaskManager_makeTaskBig",ex);
}
}
function widgetTaskManager_checkRelatedTarget(_25){
try{
}
catch(ex){
jsExDebug("widgetTaskManager_checkRelatedTarget",ex);
}
}
function widgetTaskManager_windowResizeEvent(_26){
try{
this.setDimensions(_26-this.SYSTEM.Launcher.WIDTH-this.SYSTEM.Notifier.getNotifierWidget().width-this.SYSTEM.Login.width,this.HEIGHT);
this.checkForTaskOverflow();
}
catch(ex){
jsExDebug("widgetTaskManager_windowResizeEvent",ex);
}
}
function widgetTaskManager_checkForTaskOverflow(){
try{
var _27=null;
var _28=0;
var _29=null;
var _2a=false;
for(var i=0;i<this.taskArray.length;i++){
if(!this.taskArray[i]){
continue;
}
_27=this.taskArray[i];
_29=this.largeXOffset+(this.TASK_V_PADDING+this.CURVE_IMG_HEIGHT)+(_28*_27.width)+(_28*this.TASK_V_PADDING);
_28++;
if(_29>(this.width-_27.width)){
_2a=true;
_27.detach();
}else{
_27.setPosition(_29,this.TASK_TOP);
_27.attach(this.widgetElement);
}
}
if(_2a){
this.moreTasksBtn.show();
}else{
this.moreTasksBtn.hide();
}
}
catch(ex){
jsExDebug("widgetTaskManager_checkForTaskOverflow",ex);
}
}
function widgetTaskManager_userDetailsRefreshCallback(){
try{
this.windowResizeEvent(this.SYSTEM.Environment.SCREEN_WIDTH);
}
catch(ex){
jsExDebug("widgetTaskManager_userDetailsRefreshCallback",ex);
}
}
function widgetTaskManager_endMouseOverEvent(_2c,me){
try{
}
catch(ex){
jsExDebug("widgetTaskManager_endMouseOverEvent",ex);
}
}
function widgetTaskManager_mouseOutEvent(_2e,me){
try{
me.checkRelatedTarget(_2e);
}
catch(ex){
jsExDebug("widgetTaskManager_mouseOutEvent",ex);
}
}
function widgetTaskManager_taskClickEvent(_30){
function handler(_31,_32){
try{
me.SYSTEM.WINDOW_MANAGER.focus(me.taskArray[_30].getApplication().getRunId());
}
catch(ex){
jsExDebug("widgetTaskManager_taskClickEvent: handler",ex);
}
}
try{
var me=this;
return handler;
}
catch(ex){
jsExDebug("widgetTaskManager_taskClickEvent",ex);
}
}
function widgetTaskManager_taskMouseEnterEvent(_34){
function handler(_35,_36){
try{
me.makeTaskBig(_34);
}
catch(ex){
jsExDebug("widgetTaskManager_taskMouseEnterEvent: handler",ex);
}
}
try{
var me=this;
return handler;
}
catch(ex){
jsExDebug("widgetTaskManager_taskMouseEnterEvent",ex);
}
}
function widgetTaskManager_taskMouseExitEvent(_38,_39){
try{
this.SYSTEM.WINDOW_MANAGER.dim();
this.restoreAllTasksSize();
this.mouseExitHandler(_38,_39);
}
catch(ex){
jsExDebug("widgetTaskManager_taskMouseExitEvent",ex);
}
}
function widgetTaskManager_mouseExitHandler(_3a,_3b){
try{
}
catch(ex){
jsExDebug("widgetTaskManager_taskMouseExitEvent",ex);
}
}
function widgetTaskManager_moreTasksBtnClickEvent(_3c,_3d){
try{
var _3e=this.SYSTEM.APPLICATION_MANAGER.getTaskManagerApp();
if(_3e){
this.SYSTEM.WINDOW_MANAGER.focus(_3e.getRunId());
}else{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_TASK_MANAGER,"Peepel","Launching TaskManager...");
}
}
catch(ex){
jsExDebug("widgetTaskManager_moreTasksBtnClickEvent",ex);
}
}

try{
listItem_t.prototype=new widget_t();
listItem_t.prototype.constructor=listItem_t;
listItem_t.prototype.listItem_super=widget_t.prototype.constructor;
listItem_t.prototype.cleanUp=listItem_cleanUp;
listItem_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
listItem_t.prototype.createDom=listItem_createDom;
listItem_t.prototype.bindEvents=listItem_bindEvents;
listItem_t.prototype.setDimensions=listItem_setDimensions;
listItem_t.prototype.setPosition=listItem_setPosition;
listItem_t.prototype.hide=listItem_hide;
listItem_t.prototype.show=listItem_show;
listItem_t.prototype.allowSelection=listItem_allowSelection;
listItem_t.prototype.allowHighlight=listItem_allowHighlight;
listItem_t.prototype.setData=listItem_setData;
listItem_t.prototype.setListIndex=listItem_setListIndex;
listItem_t.prototype.setListReference=listItem_setListReference;
listItem_t.prototype.setCollapsedDimensions=listItem_setCollapsedDimensions;
listItem_t.prototype.collapse=listItem_collapse;
listItem_t.prototype.expand=listItem_expand;
listItem_t.prototype.moveDown=listItem_moveDown;
listItem_t.prototype.moveUp=listItem_moveUp;
listItem_t.prototype.getData=listItem_getData;
listItem_t.prototype.getCollapsedDimensions=listItem_getCollapsedDimensions;
listItem_t.prototype.highlight=listItem_highlight;
listItem_t.prototype.dim=listItem_dim;
listItem_t.prototype.hideEvent=listItem_hideEvent;
listItem_t.prototype.showEvent=listItem_showEvent;
listItem_t.prototype.collapseEvent=listItem_collapseEvent;
listItem_t.prototype.expandEvent=listItem_expandEvent;
listItem_t.prototype.mouseOverEvent=listItem_mouseOverEvent;
listItem_t.prototype.selectEvent=listItem_selectEvent;
listItem_t.prototype.HIGHLIGHT_COLOUR="rgb(109,165,201)";
listItem_t.prototype.DEFAULT_EVENT=SYSTEM.Event.CLICK_EVENT;
listItem_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.LIST_ITEM_EXPAND_EVENT,SYSTEM.Event.LIST_ITEM_COLLAPSE_EVENT,SYSTEM.Event.LIST_ITEM_HIDE_EVENT,SYSTEM.Event.LIST_ITEM_SHOW_EVENT,SYSTEM.Event.MOUSE_ENTER_EVENT];
}
catch(ex){
jsExDebug("listItem_t.prototype",ex);
}
function listItem_t(_1,_2,_3){
try{
this.listItem_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.collapsed=false;
this.settingAllowSelection=false;
if(_2){
this.setData(_2);
}
if(!_3){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("listItem_t",ex);
}
}
function listItem_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.widgetElement,"onclick","click");
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmouseover","mouseover");
me.collapsedWidth=null;
me.collapsedHeight=null;
me.expandedWidth=null;
me.expandedHeight=null;
me.data=null;
me.collapsed=null;
me.highlightColour=null;
me.settingAllowSelection=null;
me.top=null;
me.contentSpan=null;
me.listReference=null;
me.listIndex=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("listItem_cleanUp",ex);
}
}
function listItem_createDom(){
try{
this.contentSpan=document.createElement("span");
this.contentSpan.style.position="absolute";
this.contentSpan.style.width="100%";
this.contentSpan.style.height="100%";
this.contentSpan.innerHTML=(this.data?this.data:"");
this.widgetElement.appendChild(this.contentSpan);
}
catch(ex){
jsExDebug("listItem_createDom",ex);
}
}
function listItem_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"onclick","click",this.selectEvent,this);
}
catch(ex){
jsExDebug("listItem_bindEvents",ex);
}
}
function listItem_setData(_5){
try{
this.data=_5;
}
catch(ex){
jsExDebug("listItem_setData",ex);
}
}
function listItem_setListIndex(_6){
try{
this.listIndex=_6;
}
catch(ex){
jsExDebug("listItem_setListIndex",ex);
}
}
function listItem_setListReference(_7){
try{
this.listReference=_7;
}
catch(ex){
jsExDebug("listItem_setListReference",ex);
}
}
function listItem_getData(){
try{
return this.data;
}
catch(ex){
jsExDebug("listItem_getData",ex);
}
}
function listItem_setDimensions(_8,_9){
try{
this.expandedWidth=_8;
this.expandedHeight=_9;
this.width=_8;
this.height=_9;
this.widgetElement.style.width=_8+"px";
this.widgetElement.style.height=_9+"px";
}
catch(ex){
jsExDebug("listItem_setDimensions",ex);
}
return;
}
function listItem_setCollapsedDimensions(_a,_b){
try{
this.collapsedWidth=_a;
this.collapsedHeight=_b;
}
catch(ex){
jsExDebug("listItem_setCollapsedDimensions",ex);
}
}
function listItem_getCollapsedDimensions(){
try{
return {width:this.collapsedWidth,height:this.collapsedHeight};
}
catch(ex){
jsExDebug("listItem_getCollapsedDimensions",ex);
}
}
function listItem_setPosition(_c){
try{
this.top=_c;
this.widgetElement.style.top=_c+"px";
}
catch(ex){
jsExDebug("listItem_setPosition",ex);
}
}
function listItem_allowSelection(){
try{
this.settingAllowSelection=true;
}
catch(ex){
jsExDebug("listItem_allowSelection",ex);
}
}
function listItem_allowHighlight(_d){
try{
this.highlightColour=_d;
this.widgetElement.style.cursor="pointer";
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmouseover","mouseover",this.mouseOverEvent,this);
}
catch(ex){
jsExDebug("listItem_allowHighlight",ex);
}
}
function listItem_expand(){
try{
this.height=this.expandedHeight;
this.widgetElement.style.height=this.height+"px";
this.collapsed=false;
this.expandEvent();
}
catch(ex){
jsExDebug("listItem_expand",ex);
}
}
function listItem_collapse(){
try{
this.height=this.collapsedHeight;
this.widgetElement.style.height=this.height+"px";
this.collapsed=true;
this.collapseEvent();
}
catch(ex){
jsExDebug("listItem_collapse",ex);
}
}
function listItem_hide(_e){
try{
this.collapse();
this.widgetElement.style.visibility="hidden";
this.height=0;
if(!_e){
this.hideEvent();
}
}
catch(ex){
jsExDebug("listItem_hide",ex);
}
}
function listItem_show(_f){
try{
this.widgetElement.style.visibility="visible";
this.height=(this.collapsed?this.collapsedHeight:this.expandedHeight);
if(!_f){
this.showEvent();
}
}
catch(ex){
jsExDebug("listItem_show",ex);
}
}
function listItem_moveDown(_10){
try{
this.setPosition(this.top+_10);
}
catch(ex){
jsExDebug("listItem_moveDown",ex);
}
}
function listItem_moveUp(_11){
try{
this.setPosition(this.top-_11);
}
catch(ex){
jsExDebug("listItem_moveUp",ex);
}
}
function listItem_highlight(){
function showTooltip(){
try{
if(!this.tooltipVisible){
this.tooltipVisible=true;
createTooltip(this.tooltipTitle,this.tooltipContent,this.tooltipWidth,this.tooltipHeight,x,y);
}
}
catch(ex){
jsExDebug("listItem_highlight: showTooltip",ex);
}
}
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"option hover");
if(this.tooltipTitle){
setTimeout(showTooltip,650);
var x=aEvent.clientX+15;
var y=aEvent.clientY+15;
}
}
catch(ex){
jsExDebug("listItem_highlight",ex);
}
}
function listItem_dim(){
try{
this.SYSTEM.Tooltip.hideTooltip();
this.tooltipVisible=false;
this.SYSTEM.Dom.setElementClass(this.widgetElement,"option");
}
catch(ex){
jsExDebug("listItem_dim",ex);
}
}
function listItem_mouseOverEvent(_14,me){
try{
me.fireEvent(me.SYSTEM.Event.MOUSE_ENTER_EVENT,_14);
}
catch(ex){
jsExDebug("listItem_mouseOverEvent",ex);
}
}
function listItem_hideEvent(){
try{
}
catch(ex){
jsExDebug("listItem_hideEvent",ex);
}
}
function listItem_showEvent(_16){
try{
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SHOW_EVENT);
}
catch(ex){
jsExDebug("listItem_showEvent",ex);
}
}
function listItem_collapseEvent(_17){
try{
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_COLLAPSE_EVENT);
}
catch(ex){
jsExDebug("listItem_collapseEvent",ex);
}
}
function listItem_expandEvent(_18){
try{
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_EXPAND_EVENT);
}
catch(ex){
jsExDebug("listItem_expandEvent",ex);
}
}
function listItem_selectEvent(_19){
try{
this.fireEvent(this.SYSTEM.Event.CLICK_EVENT);
}
catch(ex){
jsExDebug("listItem_selectEvent",ex);
}
}

try{
workspaceItem_t.prototype=new listItem_t();
workspaceItem_t.prototype.constructor=workspaceItem_t;
workspaceItem_t.prototype.workspaceItem_super=listItem_t.prototype.constructor;
workspaceItem_t.prototype.cleanUp=workspaceItem_cleanUp;
workspaceItem_t.prototype.listItem_cleanUp=listItem_t.prototype.cleanUp;
workspaceItem_t.prototype.createDom=workspaceItem_createDom;
workspaceItem_t.prototype.listItem_bindEvents=listItem_t.prototype.bindEvents;
workspaceItem_t.prototype.bindEvents=workspaceItem_bindEvents;
workspaceItem_t.prototype.expand=workspaceItem_expand;
workspaceItem_t.prototype.collapse=workspaceItem_collapse;
workspaceItem_t.prototype.selectEvent=workspaceItem_selectEvent;
workspaceItem_t.prototype.openButtonClickEvent=workspaceItem_openButtonClickEvent;
workspaceItem_t.prototype.deleteButtonClickEvent=workspaceItem_deleteButtonClickEvent;
workspaceItem_t.prototype.OPEN_IMG="img/app/system/widgets/blankbutton/40x30";
}
catch(ex){
jsExDebug("workspaceItem_t.prototype",ex);
}
function workspaceItem_t(_1,_2,_3){
try{
this.workspaceItem_super(_1,_2,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_3){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("workspaceItem_t",ex);
}
}
function workspaceItem_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.buttonDiv,"onmouseover","mouseover");
me.nameLabel.cleanUp();
me.numAppsLabel.cleanUp();
me.openBtn.cleanUp();
me.deleteBtn.cleanUp();
me.nameLabel=null;
me.numAppsLabel=null;
me.openBtn=null;
me.deleteBtn=null;
me.buttonDiv=null;
me.listItem_cleanUp();
}
catch(ex){
jsExDebug("workspaceItem_cleanUp",ex);
}
}
function workspaceItem_createDom(){
try{
var _5=new this.SYSTEM.Widget.Label("nameLabel","<b>WorkSpace</b>: "+this.data.name);
_5.setPosition(3,3);
_5.setOverflow("hidden");
_5.setDimensions(170,18);
_5.attach(this.widgetElement);
var _6=new this.SYSTEM.Widget.Label("numAppsLabel","Number of applications: "+this.data.contentArray.length);
_6.setPosition(3,20);
_6.attach(this.widgetElement);
var _7=document.createElement("div");
_7.style.position="absolute";
_7.style.right="0px";
_7.style.top=10+"px";
_7.style.width=78+"px";
_7.style.height=24+"px";
this.SYSTEM.Event.attachEvent(_7,"onmouseover","mouseover",cancelEvent,null,false);
var _8=new this.SYSTEM.Widget.TextButton("openBtn",50,"Open","Open","Open this WorkSpace.");
_8.attach(_7);
var _9=new this.SYSTEM.Delegate(this,this.openButtonClickEvent);
_8.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_9);
var _a=new this.SYSTEM.Widget.ClassButton("deleteBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.SYSTEM.Icon.Small.DELETE,"Delete","Delete this WorkSpace.");
_a.setPosition(54,0);
_a.attach(_7);
var _b=new this.SYSTEM.Delegate(this,this.deleteButtonClickEvent);
_a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_b);
this.widgetElement.appendChild(_7);
this.nameLabel=_5;
this.numAppsLabel=_6;
this.openBtn=_8;
this.deleteBtn=_a;
this.buttonDiv=_7;
this.allowHighlight(this.HIGHLIGHT_COLOUR);
this.allowSelection();
}
catch(ex){
jsExDebug("workspaceItem_createDom",ex);
}
}
function workspaceItem_bindEvents(){
try{
this.listItem_bindEvents();
}
catch(ex){
jsExDebug("workspaceItem_bindEvents",ex);
}
}
function workspaceItem_expand(){
try{
this.height=this.expandedHeight;
this.widgetElement.style.height=this.height+"px";
this.collapsed=false;
this.expandEvent();
}
catch(ex){
jsExDebug("workspaceItem_expand",ex);
}
}
function workspaceItem_collapse(){
try{
this.height=this.collapsedHeight;
this.widgetElement.style.height=this.height+"px";
this.collapsed=true;
this.collapseEvent();
}
catch(ex){
jsExDebug("workspaceItem_collapse",ex);
}
}
function workspaceItem_selectEvent(_c,me){
try{
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_c);
}
catch(ex){
jsExDebug("workspaceItem_selectEvent",ex);
}
}
function workspaceItem_openButtonClickEvent(_e,_f){
try{
this.SYSTEM.Workspaces.openWorkspace(null,this.data.listIndex);
}
catch(ex){
jsExDebug("workspaceItem_openButtonClickEvent",ex);
}
}
function workspaceItem_deleteButtonClickEvent(_10,_11){
function deleteCallback(_12){
try{
if(_12){
this.SYSTEM.Workspaces.deleteWorkspace(this.data.listIndex);
}
}
catch(ex){
jsExDebug("workspaceItem_deleteButtonClickEvent: deleteCallback",ex);
}
}
try{
var _13=new this.SYSTEM.Dialogue.YesNoAlert(null,"Delete WorkSpace","Are you sure you want to delete this WorkSpace?",new this.SYSTEM.Delegate(this,deleteCallback));
}
catch(ex){
jsExDebug("workspaceItem_deleteButtonClickEvent",ex);
}
}

try{
fixedList_t.prototype=new widget_t();
fixedList_t.prototype.constructor=fixedList_t;
fixedList_t.prototype.fixedList_super=widget_t.prototype.constructor;
fixedList_t.prototype.cleanUp=fixedList_cleanUp;
fixedList_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
fixedList_t.prototype.createDom=fixedList_createDom;
fixedList_t.prototype.bindEvents=fixedList_bindEvents;
fixedList_t.prototype.setDimensions=fixedList_setDimensions;
fixedList_t.prototype.setItemDimensions=fixedList_setItemDimensions;
fixedList_t.prototype.addItem=fixedList_addItem;
fixedList_t.prototype.expandAllItems=fixedList_expandAllItems;
fixedList_t.prototype.expandItem=fixedList_expandItem;
fixedList_t.prototype.collapseItem=fixedList_collapseItem;
fixedList_t.prototype.collapseAllItems=fixedList_collapseAllItems;
fixedList_t.prototype.removeItem=fixedList_removeItem;
fixedList_t.prototype.removeAllItems=fixedList_removeAllItems;
fixedList_t.prototype.redrawList=fixedList_redrawList;
fixedList_t.prototype.hideItem=fixedList_hideItem;
fixedList_t.prototype.hideAllItems=fixedList_hideAllItems;
fixedList_t.prototype.showItem=fixedList_showItem;
fixedList_t.prototype.showAllItems=fixedList_showAllItems;
fixedList_t.prototype.getItem=fixedList_getItem;
fixedList_t.prototype.getItemData=fixedList_getItemData;
fixedList_t.prototype.getSelectedIndex=fixedList_getSelectedIndex;
fixedList_t.prototype.itemExpandEvent=fixedList_itemExpandEvent;
fixedList_t.prototype.itemCollapseEvent=fixedList_itemCollapseEvent;
fixedList_t.prototype.itemHideEvent=fixedList_itemHideEvent;
fixedList_t.prototype.itemShowEvent=fixedList_itemShowEvent;
fixedList_t.prototype.itemSelectEvent=fixedList_itemSelectEvent;
fixedList_t.prototype.itemWidgetEvent=fixedList_itemWidgetEvent;
fixedList_t.prototype.itemMouseEnterEvent=fixedList_itemMouseEnterEvent;
fixedList_t.prototype.ITEM_OUTER_VPADDING=4;
fixedList_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
fixedList_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.LIST_ITEM_DELETE_EVENT,SYSTEM.Event.LIST_ITEM_WIDGET_EVENT];
}
catch(ex){
jsExDebug("fixedList_t.prototype",ex);
}
function fixedList_t(_1,_2,_3,_4,_5,_6){
try{
this.fixedList_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.items=[];
this.numItems=0;
this.visibleItems=[];
this.itemWidth=_2;
this.itemHeight=_3;
if(_4&&_5){
this.collapsedItemWidth=_4;
this.collapsedItemHeight=_5;
}else{
this.collapsedItemWidth=_2;
this.collapsedItemHeight=_3;
}
this.highlightedIndex=null;
if(!_6){
this.createDom(_2);
this.bindEvents();
}
}
catch(ex){
jsExDebug("fixedList_t",ex);
}
}
function fixedList_cleanUp(me){
try{
if(!me){
var me=this;
}
me.removeAllItems();
me.visibleItems=null;
me.items=null;
me.numItems=null;
me.imageElement=null;
me.itemWidth=null;
me.itemHeight=null;
me.collapsedItemWidth=null;
me.collapsedItemHeight=null;
me.selectedIndex=null;
me.highlightedIndex=null;
me.eventWidget=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("fixedList_cleanUp",ex);
}
}
function fixedList_createDom(_8){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"droplist");
this.widgetElement.style.overflow="auto";
this.imageElement=document.createElement("img");
this.imageElement.style.position="absolute";
this.imageElement.style.top="0px";
this.imageElement.style.left="0px";
if(_8){
this.imageElement.style.width=_8+"px";
}
this.imageElement.src="img/site/global/pixel.png";
}
catch(ex){
jsExDebug("fixedList_createDom",ex);
}
}
function fixedList_bindEvents(){
try{
}
catch(ex){
jsExDebug("fixedList_bindEvents",ex);
}
}
function fixedList_setDimensions(_9,_a){
try{
this.width=_9;
this.height=_a;
this.widgetElement.style.width=_9+"px";
this.widgetElement.style.height=_a+"px";
this.imageElement.style.height=_a+"px";
}
catch(ex){
jsExDebug("fixedList_setDimensions",ex);
}
}
function fixedList_setItemDimensions(_b,_c,_d,_e){
try{
this.itemWidth=_b;
this.itemHeight=_c;
if(_d&&_e){
this.collapsedItemWidth=_d;
this.collapsedItemHeight=_e;
}else{
this.collapsedItemWidth=_b;
this.collapsedItemHeight=_c;
}
}
catch(ex){
jsExDebug("fixedList_setItemDimensions",ex);
}
}
function fixedList_addItem(_f){
try{
var _10=this.items.length;
var _11=((this.numItems*this.itemHeight)+(this.numItems*this.ITEM_OUTER_VPADDING));
_f.setListReference(this);
_f.setListIndex(_10);
var _12=new this.SYSTEM.Delegate(this,this.itemSelectEvent);
var _13=new this.SYSTEM.Delegate(this,this.itemExpandEvent);
var _14=new this.SYSTEM.Delegate(this,this.itemCollapseEvent);
var _15=new this.SYSTEM.Delegate(this,this.itemHideEvent);
var _16=new this.SYSTEM.Delegate(this,this.itemShowEvent);
var _17=new this.SYSTEM.Delegate(this,this.itemWidgetEvent);
_f.addEventHandler(SYSTEM.Event.CLICK_EVENT,_12);
_f.addEventHandler(SYSTEM.Event.LIST_ITEM_EXPAND_EVENT,_13);
_f.addEventHandler(SYSTEM.Event.LIST_ITEM_COLLAPSE_EVENT,_14);
_f.addEventHandler(SYSTEM.Event.LIST_ITEM_HIDE_EVENT,_15);
_f.addEventHandler(SYSTEM.Event.LIST_ITEM_SHOW_EVENT,_16);
_f.addEventHandler(SYSTEM.Event.LIST_ITEM_WIDGET_EVENT,_17);
_f.addEventHandler(SYSTEM.Event.MOUSE_ENTER_EVENT,new this.SYSTEM.Delegate(this,this.itemMouseEnterEvent));
_f.setDimensions(this.itemWidth,this.itemHeight);
_f.setCollapsedDimensions(this.collapsedItemWidth,this.collapsedItemHeight);
_f.setPosition(_11);
_f.attach(this.widgetElement);
this.items[_10]=_f;
this.visibleItems[_10]=true;
this.numItems++;
return _10;
}
catch(ex){
jsExDebug("fixedList_addItem",ex);
}
}
function fixedList_expandAllItems(){
try{
for(var i in this.items){
this.items[i].collapsed=false;
}
this.redrawList();
}
catch(ex){
jsExDebug("fixedList_expandAllItems",ex);
}
}
function fixedList_expandItem(_19){
try{
this.items[_19].expand();
}
catch(ex){
jsExDebug("fixedList_expandItem",ex);
}
}
function fixedList_collapseItem(_1a){
try{
this.items[_1a].collapse();
}
catch(ex){
jsExDebug("fixedList_collapseItem",ex);
}
}
function fixedList_collapseAllItems(){
try{
for(var i in this.items){
this.items[i].collapsed=true;
}
this.redrawList();
}
catch(ex){
jsExDebug("fixedList_collapseAllItems",ex);
}
}
function fixedList_removeItem(_1c){
try{
if(!this.items[_1c]){
jsDebug("fixedList_removeItem- No item at index : "+_1c);
return;
}
this.items[_1c].collapsed=null;
this.items[_1c].cleanUp();
this.items[_1c]=null;
delete this.items[_1c];
this.visibleItems[_1c]=null;
delete this.visibleItems[_1c];
this.redrawList();
this.numItems--;
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_DELETE_EVENT);
}
catch(ex){
jsExDebug("fixedList_removeItem",ex);
}
}
function fixedList_removeAllItems(){
try{
for(var i=0;i<this.items.length;i++){
if(this.items[i]){
this.items[i].collapsed=null;
this.items[i].cleanUp();
this.items[i]=null;
delete this.items[i];
this.visibleItems[i]=null;
delete this.visibleItems[i];
this.numItems--;
}
}
this.items=[];
}
catch(ex){
jsExDebug("fixedList_removeAllItems",ex);
}
}
function fixedList_redrawList(){
try{
var _1e=0;
for(var i=0;i<this.items.length;i++){
if(this.visibleItems[i]){
this.items[i].setPosition(_1e);
if(this.items[i].collapsed){
this.items[i].collapse();
_1e+=this.items[i].collapsedHeight+this.ITEM_OUTER_VPADDING;
}else{
this.items[i].expand();
_1e+=this.items[i].height+this.ITEM_OUTER_VPADDING;
}
}
}
}
catch(ex){
jsExDebug("fixedList_redrawList",ex);
}
}
function fixedList_hideItem(_20){
try{
this.items[_20].hide();
}
catch(ex){
jsExDebug("fixedList_hideItem",ex);
}
}
function fixedList_hideAllItems(){
try{
for(var i in this.items){
this.items[i].hide();
}
}
catch(ex){
jsExDebug("fixedList_hideAllItems",ex);
}
}
function fixedList_showItem(_22){
try{
this.items[_22].show();
}
catch(ex){
jsExDebug("fixedList_hideItem",ex);
}
}
function fixedList_showAllItems(){
try{
for(var i in this.items){
this.items[i].show();
}
}
catch(ex){
jsExDebug("fixedList_hideAllItems",ex);
}
}
function fixedList_getItem(_24){
try{
return this.items[_24];
}
catch(ex){
jsExDebug("fixedList_getItem",ex);
}
}
function fixedList_getItemData(_25){
try{
if(this.items[_25]&&this.items[_25].data){
return this.items[_25].data;
}else{
return null;
}
}
catch(ex){
jsExDebug("fixedList_getItemData",ex);
}
}
function fixedList_getSelectedIndex(){
try{
return this.selectedIndex;
}
catch(ex){
jsExDebug("fixedList_getSelectedIndex",ex);
}
}
function fixedList_itemExpandEvent(_26,_27){
try{
var _28=_27.listIndex;
var _29=null;
var _2a=null;
for(var i=(_28+1);i<this.items.length;i++){
if(this.items[i]){
if(!_29){
_29=_27;
}else{
_29=_2a;
}
_2a=this.items[i];
_2a.setPosition(_29.top+_29.height);
}
}
}
catch(ex){
jsExDebug("fixedList_itemExpandEvent",ex);
}
}
function fixedList_itemCollapseEvent(_2c,_2d){
try{
var _2e=_2d.listIndex;
var _2f=null;
var _30=null;
for(var i=(_2e+1);i<this.items.length;i++){
if(this.items[i]){
if(!_2f){
_2f=_2d;
}else{
_2f=_30;
}
_30=this.items[i];
_30.setPosition(_2f.top+_2f.height);
}
}
}
catch(ex){
jsExDebug("fixedList_itemCollapseEvent",ex);
}
}
function fixedList_itemHideEvent(_32,_33){
try{
var _34=_33.listIndex;
this.visibleItems[_34]=false;
for(var i=(_34+1);i<this.items.length;i++){
if(this.items[i]){
var _36=this.items[i-1];
if(_36){
this.items[i].setPosition(_36.top+_36.height);
}
}
}
}
catch(ex){
jsExDebug("fixedList_itemHideEvent",ex);
}
}
function fixedList_itemShowEvent(_37,_38){
try{
var _39=_38.listIndex;
this.visibleItems[_39]=true;
for(var i=(_39+1);i<this.items.length;i++){
if(this.items[i]){
var _3b=this.items[i-1];
this.items[i].setPosition(_3b.top+_3b.height);
}
}
}
catch(ex){
jsExDebug("fixedList_itemShowEvent",ex);
}
}
function fixedList_itemSelectEvent(_3c,_3d){
try{
if(_3d.listIndex!=null){
this.selectedIndex=_3d.listIndex;
}
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_3c);
}
catch(ex){
jsExDebug("fixedList_itemSelectEvent",ex);
}
}
function fixedList_itemWidgetEvent(_3e,_3f){
try{
this.eventWidget=_3f;
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_WIDGET_EVENT,_3e);
}
catch(ex){
jsExDebug("fixedList_itemWidgetEvent",ex);
}
}
function fixedList_itemMouseEnterEvent(_40,_41){
try{
if(this.highlightedIndex!=null&&this.highlightedIndex!=_41.listIndex&&this.items[this.highlightedIndex]){
this.items[this.highlightedIndex].dim();
}
_41.highlight();
this.highlightedIndex=_41.listIndex;
}
catch(ex){
jsExDebug("fixedList_itemMouseEnterEvent",ex);
}
}

try{
fileBrowser_t.prototype=new fixedList_t();
fileBrowser_t.prototype.fileBrowser_super=fixedList_t.prototype.constructor;
fileBrowser_t.prototype.constructor=fileBrowser_t;
fileBrowser_t.prototype.cleanUp=fileBrowser_cleanUp;
fileBrowser_t.prototype.fixedList_cleanUp=fixedList_t.prototype.cleanUp;
fileBrowser_t.prototype.fixedList_createDom=fixedList_t.prototype.createDom;
fileBrowser_t.prototype.createDom=fileBrowser_createDom;
fileBrowser_t.prototype.bindEvents=fileBrowser_bindEvents;
fileBrowser_t.prototype.addItem_super=fixedList_t.prototype.addItem;
fileBrowser_t.prototype.addItem=fileBrowser_addItem;
fileBrowser_t.prototype.hideItemByTag=fileBrowser_hideItemByTag;
fileBrowser_t.prototype.showItemByTag=fileBrowser_showItemByTag;
fileBrowser_t.prototype.removeAll=fileBrowser_removeAll;
fileBrowser_t.prototype.ITEM_HEIGHT=150;
fileBrowser_t.prototype.COLLAPSED_ITEM_HEIGHT=80;
fileBrowser_t.prototype.SCROLLBAR_WIDTH=25;
}
catch(ex){
jsExDebug("fileBrowser_t.prototype",ex);
}
function fileBrowser_t(_1,_2,_3,_4){
try{
this.fileBrowser_super(_1,_2-this.SCROLLBAR_WIDTH,this.ITEM_HEIGHT,_2-this.SCROLLBAR_WIDTH,this.COLLAPSED_ITEM_HEIGHT,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.allTagArray=[];
this.tagArray=[];
if(!_4){
this.createDom(_2-this.SCROLLBAR_WIDTH,_2,_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("fileBrowser_t",ex);
}
}
function fileBrowser_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var i=0;i<me.allTagArray.length;i++){
me.allTagArray[i]=null;
delete me.allTagArray[i];
}
for(var j in me.tagArray){
var _8=me.tagArray[j];
for(var k in _8){
_8[k]=null;
delete _8[k];
}
me.tagArray[j]=null;
delete me.tagArray[j];
}
me.tagArray=null;
me.allTagArray=null;
me.fixedList_cleanUp();
}
catch(ex){
jsExDebug("fileBrowser_t",ex);
}
}
function fileBrowser_createDom(_a,_b,_c){
try{
this.fixedList_createDom(_a);
this.setDimensions(_b,_c);
}
catch(ex){
jsExDebug("fileBrowser_createDom",ex);
}
}
function fileBrowser_bindEvents(){
try{
}
catch(ex){
jsExDebug("fileBrowser_bindEvents",ex);
}
}
function fileBrowser_addItem(_d,_e){
try{
this.addItem_super(_d);
for(var i=0;i<_e.length;i++){
var tag=_e[i];
if(!this.tagArray[tag]){
this.tagArray[tag]=[];
}
this.tagArray[tag].push(_d);
this.allTagArray.push(_d);
}
}
catch(ex){
jsExDebug("fileBrowser_addItem",ex);
}
}
function fileBrowser_hideItemByTag(tag){
try{
var _12;
if(tag){
_12=this.tagArray[tag];
}else{
_12=this.allTagArray;
}
for(var i in _12){
if(_12[i].hide){
_12[i].hide();
}
}
}
catch(ex){
jsExDebug("fileBrowser_hideItemByTag",ex);
}
}
function fileBrowser_showItemByTag(tag){
try{
var _15;
if(tag){
_15=this.tagArray[tag];
}else{
_15=this.allTagArray;
}
for(var i in _15){
if(_15.show){
_15[i].show();
}
}
}
catch(ex){
jsExDebug("fileBrowser_showItemByTag",ex);
}
}
function fileBrowser_removeAll(_17){
try{
for(var i=0;i<this.allTagArray.length;i++){
this.allTagArray.splice(i,1);
}
this.allTagArray=(_17?[]:null);
for(var j in this.tagArray){
var tag=this.tagArray[j];
for(var k in tag){
tag[k]=null;
delete tag[k];
}
this.tagArray[j]=null;
delete this.tagArray[j];
}
this.tagArray=(_17?[]:null);
this.removeAllItems();
}
catch(ex){
jsExDebug("fileBrowser_removeAll",ex);
}
}

try{
widgetCharacterDisplay_t.prototype=new widget_t();
widgetCharacterDisplay_t.prototype.constructor=widgetCharacterDisplay_t;
widgetCharacterDisplay_t.prototype.widgetCharacterDisplay_super=widget_t.prototype.constructor;
widgetCharacterDisplay_t.prototype.cleanUp=widgetCharacterDisplay_cleanUp;
widgetCharacterDisplay_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetCharacterDisplay_t.prototype.createDom=widgetCharacterDisplay_createDom;
widgetCharacterDisplay_t.prototype.bindEvents=widgetCharacterDisplay_bindEvents;
widgetCharacterDisplay_t.prototype.widget_setDimensions=widget_t.prototype.setDimensions;
widgetCharacterDisplay_t.prototype.setDimensions=widgetCharacterDisplay_setDimensions;
widgetCharacterDisplay_t.prototype.setContent=widgetCharacterDisplay_setContent;
widgetCharacterDisplay_t.prototype.brownOut=widgetCharacterDisplay_brownOut;
widgetCharacterDisplay_t.prototype.DEFAULT_EVENT=null;
widgetCharacterDisplay_t.prototype.SUPPORTED_EVENTS=[];
}
catch(ex){
jsExDebug("widgetCharacterDisplay_t.prototype",ex);
}
function widgetCharacterDisplay_t(_1,_2,_3,_4){
try{
this.widgetCharacterDisplay_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_4){
this.createDom(_2,_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetCharacterDisplay_t",ex);
}
}
function widgetCharacterDisplay_cleanUp(){
try{
if(!me){
var me=this;
}
me.inputFieldDiv=null;
me.inputFieldSpan=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetCharacterDisplay_cleanUp",ex);
}
}
function widgetCharacterDisplay_createDom(_6,_7){
try{
var _8=document.createElement("div");
_8.style.position="absolute";
_8.style.left="0px";
_8.style.top="0px";
_8.style.border="solid 1px #000066";
_8.style.overflow="hidden";
_8.style.backgroundColor="white";
_8.style.paddingLeft="5px";
var _9=document.createElement("span");
_9.style.position="absolute";
_9.style.right="0px";
_9.style.bottom="-2px";
_9.style.fontSize="22pt";
_9.style.marginRight="5px";
_9.style.backgroundColor="white";
this.inputFieldDiv=_8;
this.inputFieldSpan=_9;
_8.appendChild(_9);
this.widgetElement.appendChild(_8);
this.setDimensions(_6,_7);
}
catch(ex){
jsExDebug("widgetCharacterDisplay_createDom",ex);
}
}
function widgetCharacterDisplay_bindEvents(){
try{
}
catch(ex){
jsExDebug("widgetCharacterDisplay_bindEvents",ex);
}
}
function widgetCharacterDisplay_setDimensions(_a,_b){
try{
this.widget_setDimensions(_a,_b);
this.inputFieldDiv.style.width=this.width+"px";
this.inputFieldDiv.style.height=this.height+"px";
}
catch(ex){
jsExDebug("widgetCharacterDisplay_setDimensions",ex);
}
}
function widgetCharacterDisplay_setContent(_c){
try{
this.inputFieldSpan.innerHTML=_c;
}
catch(ex){
jsExDebug("widgetCharacterDisplay_setContent",ex);
}
}
function widgetCharacterDisplay_brownOut(){
function lightUp(){
me.inputFieldSpan.style.opacity="";
}
try{
this.inputFieldSpan.style.opacity="0.5";
var me=this;
setTimeout(lightUp,20);
}
catch(ex){
jsExDebug("widgetCharacterDisplay_setContent",ex);
}
}

try{
widgetDropText_t.prototype=new widget_t();
widgetDropText_t.prototype.constructor=widgetDropText_t;
widgetDropText_t.prototype.widgetDropText_super=widget_t.prototype.constructor;
widgetDropText_t.prototype.cleanUp=widgetDropText_cleanUp;
widgetDropText_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetDropText_t.prototype.setDimensions=widgetDropText_setDimensions;
widgetDropText_t.prototype.createDom=widgetDropText_createDom;
widgetDropText_t.prototype.bindEvents=widgetDropText_bindEvents;
widgetDropText_t.prototype.disable=widgetDropText_disable;
widgetDropText_t.prototype.enable=widgetDropText_enable;
widgetDropText_t.prototype.allowListOnTop=widgetDropText_allowListOnTop;
widgetDropText_t.prototype.allowSelect=widgetDropText_allowSelect;
widgetDropText_t.prototype.allowStartVisible=widgetDropText_allowStartVisible;
widgetDropText_t.prototype.disallowSelectedHighlight=widgetDropText_disallowSelectedHighlight;
widgetDropText_t.prototype.allowBorder=widgetDropText_allowBorder;
widgetDropText_t.prototype.alignLeft=widgetDropText_alignLeft;
widgetDropText_t.prototype.alignRight=widgetDropText_alignRight;
widgetDropText_t.prototype.alignCentre=widgetDropText_alignCentre;
widgetDropText_t.prototype.verticalAlignCentre=widgetDropText_verticalAlignCentre;
widgetDropText_t.prototype.setListDimensions=widgetDropText_setListDimensions;
widgetDropText_t.prototype.setSelectedIndex=widgetDropText_setSelectedIndex;
widgetDropText_t.prototype.setSelectedValue=widgetDropText_setSelectedValue;
widgetDropText_t.prototype.expandList=widgetDropText_expandList;
widgetDropText_t.prototype.hideList=widgetDropText_hideList;
widgetDropText_t.prototype.addItem=widgetDropText_addItem;
widgetDropText_t.prototype.setWidth=widgetDropText_setWidth;
widgetDropText_t.prototype.extendItemContents=widgetDropText_extendItemContents;
widgetDropText_t.prototype.collapseItemContents=widgetDropText_collapseItemContents;
widgetDropText_t.prototype.showExtendedItemContents=widgetDropText_showExtendedItemContents;
widgetDropText_t.prototype.getSelectedValues=widgetDropText_getSelectedValues;
widgetDropText_t.prototype.getSelectedIndexes=widgetDropText_getSelectedIndexes;
widgetDropText_t.prototype.getSelectedIndex=widgetDropText_getSelectedIndex;
widgetDropText_t.prototype.getSelectedValue=widgetDropText_getSelectedValue;
widgetDropText_t.prototype.getDisplayText=widgetDropText_getDisplayText;
widgetDropText_t.prototype.disallowPadding=widgetDropText_disallowPadding;
widgetDropText_t.prototype.disallowMouseOverHighlight=widgetDropText_disallowMouseOverHighlight;
widgetDropText_t.prototype.setItemPadding=widgetDropText_setItemPadding;
widgetDropText_t.prototype.disallowFadeIn=widgetDropText_disallowFadeIn;
widgetDropText_t.prototype.addSeparator=widgetDropText_addSeparator;
widgetDropText_t.prototype.clearList=widgetDropText_clearList;
widgetDropText_t.prototype.setDisplayOverrideText=widgetDropText_setDisplayOverrideText;
widgetDropText_t.prototype.getItems=widgetDropText_getItems;
widgetDropText_t.prototype.removeItem=widgetDropText_removeItem;
widgetDropText_t.prototype.getItemValue=widgetDropText_getItemValue;
widgetDropText_t.prototype.getItemCount=widgetDropText_getItemCount;
widgetDropText_t.prototype.getItemDisplayText=widgetDropText_getItemDisplayText;
widgetDropText_t.prototype.setItemText=widgetDropText_setItemText;
widgetDropText_t.prototype.deSelectSelectedItem=widgetDropText_deSelectSelectedItem;
widgetDropText_t.prototype.dropBtnClickEvent=widgetDropText_dropBtnClickEvent;
widgetDropText_t.prototype.listItemSelectEvent=widgetDropText_listItemSelectEvent;
widgetDropText_t.prototype.listCollapseEvent=widgetDropText_listCollapseEvent;
widgetDropText_t.prototype.DROP_IMG="img/app/system/icons/24x24/24_drop_arrow.png";
widgetDropText_t.prototype.DROP_SIDE=24;
widgetDropText_t.prototype.DIV_HEIGHT=16;
widgetDropText_t.prototype.DIV_BORDER_WIDTH=1;
widgetDropText_t.prototype.DIV_BORDER_COLOUR="#606060";
widgetDropText_t.prototype.DIV_HIGHLIGHT_BORDER_COLOUR="#000066";
widgetDropText_t.prototype.TEXT_DIV_BG_COLOUR="#FFFFFF";
widgetDropText_t.prototype.TEXT_DIV_COLOUR="#000000";
widgetDropText_t.prototype.TEXT_DIV_DISABLED_BG_COLOUR="#BBBBBB";
widgetDropText_t.prototype.LIST_LEFT=0;
widgetDropText_t.prototype.BTN_TOP=0;
widgetDropText_t.prototype.TEXT_PADDING=5;
widgetDropText_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
widgetDropText_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.LIST_EXPAND_EVENT,SYSTEM.Event.LIST_COLLAPSE_EVENT];
}
catch(ex){
jsExDebug("widgetDropText_t.prototype",ex);
}
function widgetDropText_t(_1,_2,_3,_4,_5,_6){
try{
this.widgetDropText_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.selectedTextArray=[];
this.displayOverrideText=null;
this.enabled=true;
if(!_6){
this.createDom(_2,_3,_4,_5);
this.bindEvents();
}
}
catch(ex){
jsExDebug("widgetDropText_t.prototype",ex);
}
}
function widgetDropText_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var i=0;i<me.selectedTextArray.length;i++){
me.selectedTextArray[i]=null;
delete me.selectedTextArray[i];
}
me.selectedTextArray=null;
me.selectedIndex=null;
me.selectedValue=null;
me.displayOverrideText=null;
me.enabled=null;
me.dropBtn.cleanUp();
me.list.cleanUp();
me.dropBtn=null;
me.list=null;
me.textDiv=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetDropText_cleanUp",ex);
}
}
function widgetDropText_createDom(_9,_a,_b,_c){
try{
var _d=document.createElement("div");
_d.style.position="absolute";
_d.style.borderStyle="solid";
_d.style.borderWidth=this.DIV_BORDER_WIDTH+"px";
_d.style.borderColor=this.DIV_BORDER_COLOUR;
_d.style.left="0px";
_d.style.top="0px";
_d.style.overflow="hidden";
_d.style.whiteSpace="nowrap";
_d.style.backgroundColor=this.TEXT_DIV_BG_COLOUR;
_d.style.paddingLeft=this.TEXT_PADDING+"px";
_d.style.color=this.TEXT_DIV_COLOUR;
this.textDiv=_d;
this.setDimensions(_9,(_a?_a:this.DROP_SIDE-(this.DIV_BORDER_WIDTH*2)));
this.widgetElement.appendChild(_d);
var _e=(_a?(_a+(this.DIV_BORDER_WIDTH*2)):this.DROP_SIDE);
var _f=_e;
var _10=new this.SYSTEM.Widget.ClassButton("dropBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.DROP_SIDE,this.DROP_SIDE,null,this.DROP_IMG);
_10.setPosition(_9+(this.DIV_BORDER_WIDTH*2)+this.TEXT_PADDING,this.BTN_TOP);
_10.attach(this.widgetElement);
this.dropBtn=_10;
var _11=_e;
var _12=new this.SYSTEM.Widget.SelectList(this.name+"_selectList");
_12.setPosition(this.LIST_LEFT,_11);
_12.align(_12.LEFT_ALIGN);
_12.allowBorder("black");
_12.disallowItemTextPadding();
_12.attach(this.widgetElement);
_b+=this.TEXT_PADDING;
if(_b&&_c){
_12.setDimensions(_b,_c);
}else{
if(_b){
_12.setWidth(_b);
}
}
this.list=_12;
}
catch(ex){
jsExDebug("widgetDropText_createDom",ex);
}
}
function widgetDropText_bindEvents(){
try{
var _13=new this.SYSTEM.Delegate(this,this.dropBtnClickEvent);
var _14=new this.SYSTEM.Delegate(this,this.listItemSelectEvent);
var _15=new this.SYSTEM.Delegate(this,this.listCollapseEvent);
this.dropBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_13);
this.list.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_14);
this.list.addEventHandler(this.SYSTEM.Event.LIST_COLLAPSE_EVENT,_15);
}
catch(ex){
jsExDebug("widgetDropText_bindEvents",ex);
}
}
function widgetDropText_disable(){
try{
this.list.deselectItem(this.list.selectedIndex);
this.list.selectedIndex=null;
this.list.selectedValue=null;
this.textDiv.innerHTML="";
this.textDiv.style.backgroundColor=this.TEXT_DIV_DISABLED_BG_COLOUR;
this.enabled=false;
}
catch(ex){
jsExDebug("widgetDropText_disable",ex);
}
}
function widgetDropText_enable(){
try{
this.textDiv.style.backgroundColor=this.TEXT_DIV_BG_COLOUR;
this.enabled=true;
}
catch(ex){
jsExDebug("widgetDropText_enable",ex);
}
}
function widgetDropText_allowListOnTop(){
try{
this.list.widgetElement.style.top=null;
this.list.setPosition(this.LIST_LEFT,0,false,true);
}
catch(ex){
jsExDebug("widgetDropText_allowListOnTop",ex);
}
}
function widgetDropText_setDimensions(_16,_17){
try{
if(_16){
this.width=_16;
this.textDiv.style.width=_16+"px";
}
if(_17){
this.height=_17;
this.textDiv.style.height=_17+"px";
}
}
catch(ex){
jsExDebug("widgetDropText_setDimensions",ex);
}
}
function widgetDropText_allowTooltip(_18,_19){
try{
if(_18){
this.dropBtn.defaultBtn.allowTooltip(_18,_19);
}
}
catch(ex){
jsExDebug("widgetDropText_allowTooltip",ex);
}
}
function widgetDropText_allowBorder(_1a){
try{
this.list.allowBorder(_1a);
}
catch(ex){
jsExDebug("widgetDropText_allowBorder",ex);
}
}
function widgetDropText_alignLeft(){
try{
this.list.align(this.list.LEFT_ALIGN);
}
catch(ex){
jsExDebug("widgetDropText_alignLeft",ex);
}
}
function widgetDropText_alignRight(){
try{
this.list.align(this.list.RIGHT_ALIGN);
}
catch(ex){
jsExDebug("widgetDropText_alignRight",ex);
}
}
function widgetDropText_alignCentre(){
try{
this.list.align(this.list.HCENTRE_ALIGN);
}
catch(ex){
jsExDebug("widgetDropText_alignCentre",ex);
}
}
function widgetDropText_verticalAlignCentre(){
try{
this.list.vAlign(this.list.VCENTRE_ALIGN);
}
catch(ex){
jsExDebug("widgetDropText_verticalAlignCentre",ex);
}
}
function widgetDropText_allowSelect(_1b){
try{
this.list.allowSelect(_1b);
}
catch(ex){
jsExDebug("widgetDropText_allowSelect",ex);
}
}
function widgetDropText_allowStartVisible(){
try{
this.list.allowStartVisible();
}
catch(ex){
jsExDebug("widgetDropText_allowStartVisible",ex);
}
}
function widgetDropText_disallowSelectedHighlight(){
try{
this.list.disallowSelectedHighlight();
}
catch(ex){
jsExDebug("widgetDropText_disallowSelectedHighlight",ex);
}
}
function widgetDropText_setListDimensions(_1c,_1d){
try{
this.list.setDimensions(_1c,_1d);
}
catch(ex){
jsExDebug("widgetDropText_setListDimensions",ex);
}
}
function widgetDropText_setSelectedIndex(_1e,_1f){
try{
this.list.setSelectedIndex(_1e,this.list,_1f);
this.selectedIndex=this.list.getSelectedIndex();
this.selectedValue=this.list.getSelectedValue();
if(this.displayOverrideText){
this.textDiv.innerHTML=this.displayOverrideText;
}else{
if(this.selectedTextArray[this.selectedIndex]){
this.textDiv.innerHTML=this.selectedTextArray[this.selectedIndex];
}else{
this.textDiv.innerHTML="";
}
}
}
catch(ex){
jsExDebug("widgetDropText_setSelectedIndex",ex);
}
}
function widgetDropText_setSelectedValue(_20){
try{
this.list.setSelectedValue(_20);
this.selectedIndex=this.list.getSelectedIndex();
this.selectedValue=this.list.getSelectedValue();
if(this.displayOverrideText){
this.textDiv.innerHTML=this.displayOverrideText;
}else{
if(this.selectedTextArray[this.selectedIndex]){
this.textDiv.innerHTML=this.selectedTextArray[this.selectedIndex];
}else{
this.textDiv.innerHTML="";
}
}
}
catch(ex){
jsExDebug("widgetDropText_setSelectedValue",ex);
}
}
function widgetDropText_expandList(){
try{
this.list.expandList();
}
catch(ex){
jsExDebug("widgetDropText_expandList",ex);
}
}
function widgetDropText_hideList(){
try{
this.list.hideList();
}
catch(ex){
jsExDebug("widgetDropText_hideList",ex);
}
}
function widgetDropText_addItem(_21,_22,_23){
try{
if(!_23){
_23=_22;
}
var _24=this.list.addItem(_21,_22);
this.selectedTextArray[_24]=_23;
return _24;
}
catch(ex){
jsExDebug("widgetDropText_addItem",ex);
}
}
function widgetDropText_setWidth(_25){
try{
this.list.setWidth(_25);
}
catch(ex){
jsExDebug("widgetDropText_setWidth",ex);
}
}
function widgetDropText_extendItemContents(_26,_27,_28,_29){
try{
this.list.extendItemContents(_26,_27,_28,_29);
}
catch(ex){
jsExDebug("widgetDropText_extendItemContents",ex);
}
}
function widgetDropText_collapseItemContents(_2a){
try{
this.list.collapseItemContents(_2a);
}
catch(ex){
jsExDebug("widgetDropText_collapseItemContents",ex);
}
}
function widgetDropText_showExtendedItemContents(_2b){
try{
this.list.showExtendedItemContents(_2b);
}
catch(ex){
jsExDebug("widgetDropText_showExtendedItemContents",ex);
}
}
function widgetDropText_getSelectedValues(){
try{
return this.list.getSelectedValues();
}
catch(ex){
jsExDebug("widgetDropText_getSelectedValues",ex);
}
}
function widgetDropText_getDisplayText(){
try{
return this.selectedTextArray[this.selectedIndex];
}
catch(ex){
jsExDebug("widgetDropText_getDisplayText",ex);
}
}
function widgetDropText_disallowPadding(){
try{
this.list.disallowPadding();
}
catch(ex){
jsExDebug("widgetDropText_disallowPadding",ex);
}
}
function widgetDropText_disallowMouseOverHighlight(){
try{
this.list.disallowMouseOverHighlight();
}
catch(ex){
jsExDebug("widgetDropText_disallowMouseOverHighlight",ex);
}
}
function widgetDropText_getSelectedIndexes(){
try{
return this.list.getSelectedIndexes();
}
catch(ex){
jsExDebug("widgetDropText_getSelectedIndexes",ex);
}
}
function widgetDropText_getSelectedIndex(){
try{
return this.list.getSelectedIndex();
}
catch(ex){
jsExDebug("widgetDropText_getSelectedIndex",ex);
}
}
function widgetDropText_getSelectedValue(){
try{
return this.list.getSelectedValue();
}
catch(ex){
jsExDebug("widgetDropText_getSelectedValue",ex);
}
}
function widgetDropText_setItemPadding(_2c,_2d){
try{
this.list.setItemPadding(_2c,_2d);
}
catch(ex){
jsExDebug("widgetDropText_setItemPadding",ex);
}
}
function widgetDropText_disallowFadeIn(){
try{
this.list.disallowFadeIn();
}
catch(ex){
jsExDebug("widgetDropText_disallowFadeIn",ex);
}
}
function widgetDropText_addSeparator(){
try{
this.list.addSeparator();
}
catch(ex){
jsExDebug("widgetDropText_addSeparator",ex);
}
}
function widgetDropText_clearList(){
try{
this.list.clearList();
if(this.displayOverrideText){
this.textDiv.innerHTML=this.displayOverrideText;
}else{
this.textDiv.innerHTML="";
}
}
catch(ex){
jsExDebug("widgetDropText_clearList",ex);
}
}
function widgetDropText_setDisplayOverrideText(_2e){
try{
this.displayOverrideText=_2e;
this.textDiv.innerHTML=_2e;
}
catch(ex){
jsExDebug("widgetDropText_setDisplayOverrideText",ex);
}
}
function widgetDropText_getItems(){
try{
return this.list.items;
}
catch(ex){
jsExDebug("widgetDropText_getItems",ex);
}
}
function widgetDropText_removeItem(_2f,_30){
try{
if(this.selectedIndex==_2f||this.selectedValue==_30){
this.textDiv.innerHTML="";
}
this.list.removeItem(_2f,_30);
}
catch(ex){
jsExDebug("widgetDropText_removeItem",ex);
}
}
function widgetDropText_getItemValue(_31){
try{
return this.list.getItemValue(_31);
}
catch(ex){
jsExDebug("widgetDropText_getItemValue",ex);
}
}
function widgetDropText_getItemCount(){
try{
return this.list.getItemCount();
}
catch(ex){
jsExDebug("widgetDropText_getItemCount",ex);
}
}
function widgetDropText_getItemDisplayText(_32){
try{
return this.selectedTextArray[_32];
}
catch(ex){
jsExDebug("widgetDropText_getItemDisplayText",ex);
}
}
function widgetDropText_setItemText(_33,_34){
try{
this.list.setItemText(_33,_34);
if(_33==this.list.selectedIndex){
this.textDiv.innerHTML=_34;
}
}
catch(ex){
jsExDebug("widgetDropText_setItemText",ex);
}
}
function widgetDropText_deSelectSelectedItem(){
try{
this.list.deselectItem(this.selectedIndex);
this.list.selectedIndex=null;
this.list.selectedValue=null;
this.selectedIndex=null;
this.selectedValue=null;
this.textDiv.innerHTML="";
}
catch(ex){
jsExDebug("widgetDropText_deSelectSelectedItem",ex);
}
}
function widgetDropText_dropBtnClickEvent(_35,_36){
try{
if(this.enabled&&this.list.getItemCount()){
this.list.expandList();
this.textDiv.style.borderColor=this.DIV_HIGHLIGHT_BORDER_COLOUR;
}
this.fireEvent(this.SYSTEM.Event.LIST_EXPAND_EVENT,_35);
}
catch(ex){
jsExDebug("widgetDropText_dropBtnClickEvent",ex);
}
}
function widgetDropText_listItemSelectEvent(_37,_38){
try{
this.selectedIndex=this.list.getSelectedIndex();
this.selectedValue=this.list.getSelectedValue();
if(this.displayOverrideText){
this.textDiv.innerHTML=this.displayOverrideText;
}else{
this.textDiv.innerHTML=this.selectedTextArray[this.selectedIndex];
}
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_37);
}
catch(ex){
jsExDebug("widgetDropText_listItemSelectEvent",ex);
}
}
function widgetDropText_listCollapseEvent(_39,_3a){
try{
this.textDiv.style.borderColor=this.DIV_BORDER_COLOUR;
this.fireEvent(this.SYSTEM.Event.LIST_COLLAPSE_EVENT,_39);
}
catch(ex){
jsExDebug("widgetDropText_listCollapseEvent",ex);
}
}

try{
fontFaceSelect_t.prototype=new widgetDropText_t();
fontFaceSelect_t.prototype.constructor=fontFaceSelect_t;
fontFaceSelect_t.prototype.fontFaceSelect_super=widgetDropText_t.prototype.constructor;
fontFaceSelect_t.prototype.cleanUp=fontFaceSelect_cleanUp;
fontFaceSelect_t.prototype.widgetDropText_cleanUp=widgetDropText_t.prototype.cleanUp;
fontFaceSelect_t.prototype.widgetDropText_createDom=widgetDropText_t.prototype.createDom;
fontFaceSelect_t.prototype.createDom=fontFaceSelect_createDom;
fontFaceSelect_t.prototype.widgetDropText_bindEvents=widgetDropText_t.prototype.bindEvents;
fontFaceSelect_t.prototype.bindEvents=fontFaceSelect_bindEvents;
fontFaceSelect_t.prototype.setSelectedValue=fontFaceSelect_setSelectedValue;
fontFaceSelect_t.prototype.TEXT_WIDTH=130;
fontFaceSelect_t.prototype.TEXT_HEIGHT=22;
}
catch(ex){
jsExDebug("fontFaceSelect_t.prototype",ex);
}
function fontFaceSelect_t(_1,_2){
try{
this.fontFaceSelect_super(_1,null,null,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("fontFaceSelect_t",ex);
}
}
function fontFaceSelect_cleanUp(me){
try{
if(!me){
var me=this;
}
me.widgetDropText_cleanUp();
}
catch(ex){
jsExDebug("fontFaceSelect_cleanUp",ex);
}
}
function fontFaceSelect_createDom(){
try{
this.widgetDropText_createDom(this.TEXT_WIDTH,this.TEXT_HEIGHT);
this.textDiv.style.lineHeight=this.TEXT_HEIGHT+"px";
this.textDiv.style.width=this.width+"px";
var _4=[];
_4["Arial"]="Arial, Helvetica, sans-serif";
_4["Arial Black"]="'Arial Black', Gadget, sans-serif";
_4["Bookman Old Style"]="'Bookman Old Style', serif";
_4["Comic Sans"]="'Comic Sans MS', cursive";
_4["Courier"]="Courier, monospace";
_4["Courier New"]="'Courier New', Courier, monospace";
_4["Garamond"]="Garamond, serif";
_4["Georgia"]="Georgia, serif";
_4["Impact"]="Impact, Charcoal, sans-serif";
_4["Lucida Console"]="'Lucida Console', Monaco, monospace";
_4["Lucida Sans Unicode"]="'Lucida Sans Unicode', 'Lucida Grande', sans-serif";
_4["Sans Serif"]="'MS Sans Serif', Geneva, sans-serif";
_4["Serif"]="'MS Serif', 'New York', sans-serif";
_4["Palatino Linotype"]="'Palatino Linotype', 'Book Antiqua', Palatino, serif";
_4["Tahoma"]="Tahoma, Geneva, sans-serif";
_4["Times New Roman"]="'Times New Roman', Times, serif";
_4["Trebuchet MS"]="'Trebuchet MS', Helvetica, sans-serif";
_4["Verdana"]="Verdana, Geneva, sans-serif";
var _5=null;
for(var _6 in _4){
_5="<span style=\"font-family:"+_4[_6]+"\">"+_6+"</span>";
this.addItem(_4[_6],_5,_5);
}
}
catch(ex){
jsExDebug("fontFaceSelect_createDom",ex);
}
}
function fontFaceSelect_bindEvents(){
try{
this.widgetDropText_bindEvents();
}
catch(ex){
jsExDebug("fontFaceSelect_bindEvents",ex);
}
}
function fontFaceSelect_setSelectedValue(_7,_8){
try{
var _9=this.list.items;
var _a=new RegExp(_7,"i");
for(var i in _9){
if(_9[i].itemListValueReference.match(_a)){
this.setSelectedIndex(i);
if(_8){
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT);
}
break;
}
}
this.selectedIndex=this.list.getSelectedIndex();
this.selectedValue=this.list.getSelectedValue();
if(this.displayOverrideText){
this.textDiv.innerHTML=this.displayOverrideText;
}else{
this.textDiv.innerHTML=this.selectedTextArray[this.selectedIndex];
}
}
catch(ex){
jsExDebug("fontFaceSelect_setSelectedValue",ex);
}
}

try{
fontSizeSelect_t.prototype=new widgetDropText_t();
fontSizeSelect_t.prototype.constructor=fontSizeSelect_t;
fontSizeSelect_t.prototype.fontSizeSelect_super=widgetDropText_t.prototype.constructor;
fontSizeSelect_t.prototype.cleanUp=fontSizeSelect_cleanUp;
fontSizeSelect_t.prototype.widgetDropText_cleanUp=widgetDropText_t.prototype.cleanUp;
fontSizeSelect_t.prototype.widgetDropText_createDom=widgetDropText_t.prototype.createDom;
fontSizeSelect_t.prototype.createDom=fontSizeSelect_createDom;
fontSizeSelect_t.prototype.widgetDropText_bindEvents=widgetDropText_t.prototype.bindEvents;
fontSizeSelect_t.prototype.bindEvents=fontSizeSelect_bindEvents;
fontSizeSelect_t.prototype.TEXT_WIDTH=26;
fontSizeSelect_t.prototype.TEXT_HEIGHT=22;
fontSizeSelect_t.prototype.VALUE_8=1;
fontSizeSelect_t.prototype.VALUE_10=2;
fontSizeSelect_t.prototype.VALUE_12=3;
fontSizeSelect_t.prototype.VALUE_14=4;
fontSizeSelect_t.prototype.VALUE_18=5;
fontSizeSelect_t.prototype.VALUE_24=6;
fontSizeSelect_t.prototype.VALUE_36=7;
fontSizeSelect_t.prototype.SIZE_8="<span style='font-size:8pt'>8</span>";
fontSizeSelect_t.prototype.SIZE_8_TEXT="8";
fontSizeSelect_t.prototype.SIZE_10="<span style='font-size:10pt'>10</span>";
fontSizeSelect_t.prototype.SIZE_10_TEXT="10";
fontSizeSelect_t.prototype.SIZE_12="<span style='font-size:12pt'>12</span>";
fontSizeSelect_t.prototype.SIZE_12_TEXT="12";
fontSizeSelect_t.prototype.SIZE_14="<span style='font-size:14pt'>14</span>";
fontSizeSelect_t.prototype.SIZE_14_TEXT="14";
fontSizeSelect_t.prototype.SIZE_18="<span style='font-size:18pt'>18</span>";
fontSizeSelect_t.prototype.SIZE_18_TEXT="18";
fontSizeSelect_t.prototype.SIZE_24="<span style='font-size:24pt'>24</span>";
fontSizeSelect_t.prototype.SIZE_24_TEXT="24";
fontSizeSelect_t.prototype.SIZE_36="<span style='font-size:36pt'>36</span>";
fontSizeSelect_t.prototype.SIZE_36_TEXT="36";
fontSizeSelect_t.prototype.VALUE_TO_PT=[];
fontSizeSelect_t.prototype.VALUE_TO_PT[fontSizeSelect_t.prototype.VALUE_8]=fontSizeSelect_t.prototype.SIZE_8_TEXT;
fontSizeSelect_t.prototype.VALUE_TO_PT[fontSizeSelect_t.prototype.VALUE_10]=fontSizeSelect_t.prototype.SIZE_10_TEXT;
fontSizeSelect_t.prototype.VALUE_TO_PT[fontSizeSelect_t.prototype.VALUE_12]=fontSizeSelect_t.prototype.SIZE_12_TEXT;
fontSizeSelect_t.prototype.VALUE_TO_PT[fontSizeSelect_t.prototype.VALUE_14]=fontSizeSelect_t.prototype.SIZE_14_TEXT;
fontSizeSelect_t.prototype.VALUE_TO_PT[fontSizeSelect_t.prototype.VALUE_18]=fontSizeSelect_t.prototype.SIZE_18_TEXT;
fontSizeSelect_t.prototype.VALUE_TO_PT[fontSizeSelect_t.prototype.VALUE_24]=fontSizeSelect_t.prototype.SIZE_24_TEXT;
fontSizeSelect_t.prototype.VALUE_TO_PT[fontSizeSelect_t.prototype.VALUE_36]=fontSizeSelect_t.prototype.SIZE_36_TEXT;
}
catch(ex){
jsExDebug("fontSizeSelect_t.prototype",ex);
}
function fontSizeSelect_t(_1,_2){
try{
this.fontSizeSelect_super(_1,null,null,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("fontSizeSelect_t",ex);
}
}
function fontSizeSelect_cleanUp(me){
try{
if(!me){
var me=this;
}
me.widgetDropText_cleanUp();
}
catch(ex){
jsExDebug("fontSizeSelect_cleanUp",ex);
}
}
function fontSizeSelect_createDom(){
try{
this.widgetDropText_createDom(this.TEXT_WIDTH,this.TEXT_HEIGHT);
this.textDiv.style.lineHeight=this.TEXT_HEIGHT+"px";
this.textDiv.style.width=this.width+"px";
this.addItem(this.VALUE_8,this.SIZE_8,this.SIZE_8_TEXT);
this.addItem(this.VALUE_10,this.SIZE_10,this.SIZE_10_TEXT);
this.addItem(this.VALUE_12,this.SIZE_12,this.SIZE_12_TEXT);
this.addItem(this.VALUE_14,this.SIZE_14,this.SIZE_14_TEXT);
this.addItem(this.VALUE_18,this.SIZE_18,this.SIZE_18_TEXT);
this.addItem(this.VALUE_24,this.SIZE_24,this.SIZE_24_TEXT);
this.addItem(this.VALUE_36,this.SIZE_36,this.SIZE_36_TEXT);
}
catch(ex){
jsExDebug("fontSizeSelect_createDom",ex);
}
}
function fontSizeSelect_bindEvents(){
try{
this.widgetDropText_bindEvents();
}
catch(ex){
jsExDebug("fontSizeSelect_bindEvents",ex);
}
}

try{
spreadsheetTabListWidget_t.prototype=new widget_t();
spreadsheetTabListWidget_t.prototype.constructor=spreadsheetTabListWidget_t;
spreadsheetTabListWidget_t.prototype.spreadsheetTabListWidget_super=widget_t.prototype.constructor;
spreadsheetTabListWidget_t.prototype.cleanUp=spreadsheetTabListWidget_cleanUp;
spreadsheetTabListWidget_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
spreadsheetTabListWidget_t.prototype.createDom=spreadsheetTabListWidget_createDom;
spreadsheetTabListWidget_t.prototype.addTab=spreadsheetTabListWidget_addTab;
spreadsheetTabListWidget_t.prototype.clearTabs=spreadsheetTabListWidget_clearTabs;
spreadsheetTabListWidget_t.prototype.selectTab=spreadsheetTabListWidget_selectTab;
spreadsheetTabListWidget_t.prototype.createTabDom=spreadsheetTabListWidget_createTabDom;
spreadsheetTabListWidget_t.prototype.leftScrollClickEvent=spreadsheetTabListWidget_leftScrollClickEvent;
spreadsheetTabListWidget_t.prototype.rightScrollClickEvent=spreadsheetTabListWidget_rightScrollClickEvent;
spreadsheetTabListWidget_t.prototype.tabClickEvent=spreadsheetTabListWidget_tabClickEvent;
spreadsheetTabListWidget_t.prototype.addSheetClickEvent=spreadsheetTabListWidget_addSheetClickEvent;
spreadsheetTabListWidget_t.prototype.TAB_HEIGHT=15;
spreadsheetTabListWidget_t.prototype.SCROLL_IMG_WIDTH=15;
spreadsheetTabListWidget_t.prototype.SCROLL_IMG_HEIGHT=15;
spreadsheetTabListWidget_t.prototype.DEFAULT_WIDTH=150;
spreadsheetTabListWidget_t.prototype.ADD_SHEET_DIV_WIDTH=70;
spreadsheetTabListWidget_t.prototype.SCROLL_INCREMENT=8;
spreadsheetTabListWidget_t.prototype.TAB_PADDING=15;
spreadsheetTabListWidget_t.prototype.CHARACTER_WIDTH=15;
spreadsheetTabListWidget_t.prototype.BACKGROUND="url('img/app/system/widgets/scrollbar/scroll_bg_h.png')";
spreadsheetTabListWidget_t.prototype.ADD_SHEET_BORDER="solid 1px rgb(106,107,108)";
spreadsheetTabListWidget_t.prototype.TAB_FONT_SIZE="10px";
spreadsheetTabListWidget_t.prototype.TAB_BORDER="solid 1px rgb(159,156,193)";
spreadsheetTabListWidget_t.prototype.LEFT_IMG="img/app/system/widgets/scrollbar/scroll_left";
spreadsheetTabListWidget_t.prototype.RIGHT_IMG="img/app/system/widgets/scrollbar/scroll_right";
spreadsheetTabListWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
spreadsheetTabListWidget_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.CLICK_EVENT];
}
catch(ex){
jsExDebug("spreadsheetTabWidget_t.prototype",ex);
}
function spreadsheetTabListWidget_t(_1,_2,_3){
try{
this.spreadsheetTabListWidget_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.tabArray=[];
this.selectedTabValue=null;
this.approximateWidth=0;
if(!_3){
this.createDom(_2);
}
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_t",ex);
}
}
function spreadsheetTabListWidget_cleanUp(me){
try{
if(!me){
var me=this;
}
me.leftScrollBtn.cleanUp();
me.leftScrollBtn=null;
me.rightScrollBtn.cleanUp();
me.rightScrollBtn=null;
me.SYSTEM.Event.detachEvent(me.addSheetDiv,"onclick","click");
me.clearTabs();
me.tabArray=null;
me.approximateWidth=null;
me.tabListDiv=null;
me.selectedIndex=null;
me.selectedTabValue=null;
me.selectedDiv=null;
me.addSheetDiv=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_cleanUp",ex);
}
}
function spreadsheetTabListWidget_createDom(_5){
try{
if(_5){
this.setDimensions(_5,this.TAB_HEIGHT);
}else{
this.setDimensions(this.DEFAULT_WIDTH,this.TAB_HEIGHT);
}
this.setBackgroundStyle(this.BACKGROUND);
this.widgetElement.style.overflow="hidden";
var _6=document.createElement("div");
_6.style.position="absolute";
_6.style.right="0px";
_6.style.top="0px";
_6.style.width=this.ADD_SHEET_DIV_WIDTH+"px";
_6.style.height=this.TAB_HEIGHT+"px";
_6.style.backgroundImage=this.BACKGROUND;
_6.style.border=this.ADD_SHEET_BORDER;
_6.style.lineHeight=this.TAB_HEIGHT+"px";
_6.style.textAlign="center";
_6.style.cursor="pointer";
_6.style.fontSize=this.TAB_FONT_SIZE;
_6.innerHTML="Add sheet";
this.addSheetDiv=_6;
this.SYSTEM.Event.attachEvent(_6,"onclick","click",this.addSheetClickEvent,this);
var _7=document.createElement("div");
_7.style.position="absolute";
_7.style.left=this.SCROLL_IMG_WIDTH+"px";
_7.style.top="0px";
_7.style.height=this.TAB_HEIGHT+"px";
this.tabListDiv=_7;
this.widgetElement.appendChild(_7);
this.widgetElement.appendChild(_6);
var _8=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE;
var _9=new this.SYSTEM.Widget.Button("leftScrollBtn",this.LEFT_IMG,_8,this.SCROLL_IMG_WIDTH,this.SCROLL_IMG_HEIGHT);
_9.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.leftScrollClickEvent));
_9.setPosition(0,0);
_9.enableTypematic();
_9.attach(this.widgetElement);
var _a=new this.SYSTEM.Widget.Button("rightScrollBtn",this.RIGHT_IMG,_8,this.SCROLL_IMG_WIDTH,this.SCROLL_IMG_HEIGHT);
_a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.rightScrollClickEvent));
_a.setPosition(this.ADD_SHEET_DIV_WIDTH+2,0,1);
_a.enableTypematic();
_a.attach(this.widgetElement);
this.leftScrollBtn=_9;
this.rightScrollBtn=_a;
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_createDom",ex);
}
}
function spreadsheetTabListWidget_addTab(_b,_c){
try{
if(_c==null){
return;
}
var _d=this.tabArray.length;
var _e=this.createTabDom(_d,_c);
this.tabListDiv.appendChild(_e);
var _f={};
_f.div=_e;
_f.value=_b;
this.tabArray.push(_f);
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_addTab",ex);
}
}
function spreadsheetTabListWidget_clearTabs(){
try{
for(var i=0;i<this.tabArray.length;i++){
var tab=this.tabArray[i];
this.SYSTEM.Event.detachEvent(tab.div.tabName,"onclick","click");
this.SYSTEM.Dom.freeDom(tab.div);
this.tabListDiv.removeChild(tab.div);
tab.div.tabName=null;
tab.div=null;
tab.value=null;
this.tabArray[i]=null;
delete this.tabArray[i];
}
this.SYSTEM.Dom.freeDom(this.tabListDiv);
this.tabArray=[];
this.approximateWidth=0;
this.selectedIndex=null;
this.selectedTabValue=null;
this.selectedDiv=null;
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_clearList",ex);
}
}
function spreadsheetTabListWidget_selectTab(_12,_13){
try{
if(_13!=null){
for(var i=0;i<this.tabArray.length;i++){
if(this.tabArray[i]&&this.tabArray[i].value==_13){
_12=i;
break;
}
}
}
if(_12==null){
return;
}
var tab=this.tabArray[_12];
this.selectedIndex=_12;
this.selectedTabValue=tab.value;
this.selectedDiv=tab.div.tabName;
this.selectedDiv.style.fontWeight="bold";
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_selectTab",ex);
}
}
function spreadsheetTabListWidget_createTabDom(_16,_17){
try{
var _18=document.createElement("div");
_18.style.margin="0px";
_18.style.cursor="pointer";
_18.style.height=this.TAB_HEIGHT+"px";
_18.style.textAlign="center";
_18.style.vAlign="middle";
_18.style.position="relative";
_18.style.borderTop=this.TAB_BORDER;
_18.style.borderRight=this.TAB_BORDER;
if(this.tabArray.length==0){
_18.style.borderLeft=this.TAB_BORDER;
}
var _19=document.createElement("span");
_19.style.width="auto";
_19.style.display="block";
_19.style.textDecoration="none";
_19.style.cursor="pointer";
_19.style.height=this.TAB_HEIGHT+"px";
_19.style.lineHeight=this.TAB_HEIGHT+"px";
_19.style.paddingLeft=this.TAB_PADDING+"px";
_19.style.paddingRight=this.TAB_PADDING+"px";
_19.style.vAlign="bottom";
_19.style.fontSize=this.TAB_FONT_SIZE;
_19.innerHTML=_17;
_18.tabName=_19;
if(this.SYSTEM.DM.eventModel==this.SYSTEM.DM.INTERNET_EXPLORER){
_18.style.styleFloat="left";
_19.style.styleFloat="left";
}else{
_18.style.cssFloat="left";
_19.style.cssFloat="left";
}
if(_16!=null){
this.SYSTEM.Event.attachEvent(_19,"onclick","click",this.tabClickEvent,this,false,_16);
}
_18.appendChild(_19);
this.approximateWidth+=((_17.length*this.CHARACTER_WIDTH)+(2*this.TAB_PADDING));
return _18;
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_createTabDom",ex);
}
}
function spreadsheetTabListWidget_leftScrollClickEvent(_1a,_1b){
try{
if(!this.tabArray.length){
return;
}
var _1c=parseInt(this.tabListDiv.style.left)+this.SCROLL_INCREMENT;
if(_1c<this.SCROLL_IMG_WIDTH){
this.tabListDiv.style.left=_1c+"px";
}else{
this.tabListDiv.style.left=this.SCROLL_IMG_WIDTH+"px";
}
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_leftScrollClickEvent",ex);
}
}
function spreadsheetTabListWidget_rightScrollClickEvent(_1d,_1e){
try{
if(!this.tabArray.length){
return;
}
var _1f=parseInt(this.tabListDiv.style.left)-this.SCROLL_INCREMENT;
if(_1f>(this.approximateWidth*-1)){
this.tabListDiv.style.left=_1f+"px";
}
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_rightScrollClickEvent",ex);
}
}
function spreadsheetTabListWidget_tabClickEvent(_20,me,_22){
try{
if(me.selectedDiv){
me.selectedDiv.style.fontWeight="normal";
}
var _23=me.tabArray[_22];
me.selectedIndex=_22;
me.selectedTabValue=_23.value;
me.selectedDiv=_23.div.tabName;
me.selectedDiv.style.fontWeight="bold";
me.fireEvent(me.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_20);
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_tabClickEvent",ex);
}
}
function spreadsheetTabListWidget_addSheetClickEvent(_24,me){
try{
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_24);
}
catch(ex){
jsExDebug("spreadsheetTabListWidget_addSheetClickEvent",ex);
}
}

try{
numberSelectWidget_t.prototype=new selectBoxWidget_t();
numberSelectWidget_t.prototype.numberSelectWidget_super=selectBoxWidget_t.prototype.constructor;
numberSelectWidget_t.prototype.constructor=numberSelectWidget_t;
numberSelectWidget_t.prototype.cleanUp=numberSelectWidget_cleanUp;
numberSelectWidget_t.prototype.selectBoxWidget_cleanUp=selectBoxWidget_t.prototype.cleanUp;
numberSelectWidget_t.prototype.selectBoxWidget_createDom=selectBoxWidget_t.prototype.createDom;
numberSelectWidget_t.prototype.createDom=numberSelectWidget_createDom;
numberSelectWidget_t.prototype.upClickEvent=numberSelectWidget_upClickEvent;
numberSelectWidget_t.prototype.downClickEvent=numberSelectWidget_downClickEvent;
numberSelectWidget_t.prototype.setRange=numberSelectWidget_setRange;
numberSelectWidget_t.prototype.getValue=numberSelectWidget_getValue;
}
catch(ex){
jsExDebug("numberSelectWidget_t.prototype",ex);
}
function numberSelectWidget_t(_1,_2,_3,_4,_5){
try{
this.numberSelectWidget_super(_1,_2,true,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.minimumValue=(_3!=null?_3:0);
this.maximumValue=(_4!=null?_4:100);
this.currentValue=this.minimumValue;
if(!_5){
this.createDom(_2);
}
}
catch(ex){
jsExDebug("numberSelectWidget_t",ex);
}
}
function numberSelectWidget_cleanUp(me){
try{
if(!me){
me=this;
}
me.minimumValue=null;
me.maximumValue=null;
me.currentValue=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("numberSelectWidget_cleanUp",ex);
}
}
function numberSelectWidget_createDom(_7){
try{
this.selectBoxWidget_createDom(_7,true);
this.setContent(this.currentValue);
}
catch(ex){
jsExDebug("selectBoxWidget_createDom",ex);
}
}
function numberSelectWidget_setRange(_8,_9){
try{
this.minimumValue=_8;
this.maximumValue=_9;
}
catch(ex){
jsExDebug("numberSelectWidget_setRange",ex);
}
}
function numberSelectWidget_getValue(){
try{
return this.currentValue;
}
catch(ex){
jsExDebug("numberSelectWidget_getValue",ex);
}
}
function numberSelectWidget_upClickEvent(_a,_b){
try{
var _c=this.currentValue+1;
if(_c<=this.maximumValue){
this.currentValue=_c;
this.setContent(this.currentValue);
}
}
catch(ex){
jsExDebug("numberSelectWidget_upClickEvent",ex);
}
}
function numberSelectWidget_downClickEvent(_d,_e){
try{
var _f=this.currentValue-1;
if(_f>=this.minimumValue){
this.currentValue=_f;
this.setContent(this.currentValue);
}
}
catch(ex){
jsExDebug("numberSelectWidget_downClickEvent",ex);
}
}

try{
symbolDropList_t.prototype=new widgetDropList_t();
symbolDropList_t.prototype.symbolDropList_super=widgetDropList_t.prototype.constructor;
symbolDropList_t.prototype.constructor=symbolDropList_t;
symbolDropList_t.prototype.cleanUp=symbolDropList_cleanUp;
symbolDropList_t.prototype.widgetDropList_cleanUp=widgetDropList_t.prototype.cleanUp;
symbolDropList_t.prototype.widgetDropList_createDom=widgetDropList_t.prototype.createDom;
symbolDropList_t.prototype.createDom=symbolDropList_createDom;
symbolDropList_t.prototype.BUTTON_WIDTH=40;
symbolDropList_t.prototype.BUTTON_HEIGHT=60;
symbolDropList_t.prototype.BUTTON_IMG="img/app/system/icons/40x60/insert_symbol.png";
symbolDropList_t.prototype.GRID_ITEM_WIDTH=24;
symbolDropList_t.prototype.GRID_ITEM_HEIGHT=24;
}
catch(ex){
jsExDebug("symbolDropList_t.prototype",ex);
}
function symbolDropList_t(_1,_2){
try{
this.symbolDropList_super(_1,null,null,null,null,null,null,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_2){
this.createDom();
}
}
catch(ex){
jsExDebug("symbolDropList_t",ex);
}
}
function symbolDropList_cleanUp(me){
try{
if(!me){
me=this;
}
me.symbolGrid=null;
me.widgetDropList_cleanUp();
}
catch(ex){
jsExDebug("symbolDropList_cleanUp",ex);
}
}
function symbolDropList_createDom(){
try{
this.widgetDropList_createDom(this.BUTTON_WIDTH,this.BUTTON_HEIGHT,this.BUTTON_IMG);
this.alignLeft();
this.allowBorder("black");
this.disallowSelectedHighlight();
this.disallowMouseOverHighlight();
this.disallowItemBorder();
this.dropBtn.defaultBtn.stateOnImage=this.dropBtn.defaultBtn.stateOffImage;
var _4=new this.SYSTEM.Widget.GridSelect("symbolGrid",5,this.GRID_ITEM_WIDTH,this.GRID_ITEM_HEIGHT);
_4.addItem("\xe2\u201a\xac","\xe2\u201a\xac");
_4.addItem("\xc2\xa3","\xc2\xa3");
_4.addItem("\xc2\xa5","\xc2\xa5");
_4.addItem("\xc2\xa9","\xc2\xa9");
_4.addItem("\xc2\xae","\xc2\xae");
_4.addItem("\xe2\u201e\xa2","\xe2\u201e\xa2");
_4.addItem("\xc2\xb1","\xc2\xb1");
_4.addItem("\xe2\u2030\xa0","\xe2\u2030\xa0");
_4.addItem("\xe2\u2030\xa4","\xe2\u2030\xa4");
_4.addItem("\xe2\u2030\xa5","\xe2\u2030\xa5");
_4.addItem("\xe2\u02c6\u017e","\xe2\u02c6\u017e");
_4.addItem("\xce\xb1","\xce\xb1");
_4.addItem("\xc2\xbc","\xc2\xbc");
_4.addItem("\xc2\xbd","\xc2\xbd");
_4.addItem("\xc2\xbe","\xc2\xbe");
_4.addItem("\xe2\u201e\xa6","\xe2\u201e\xa6");
_4.addItem("\xc2\xa7","\xc2\xa7");
_4.addItem("\xc2\xb6","\xc2\xb6");
_4.addItem("\xc2\xbf","\xc2\xbf");
_4.addItem("\xcf\u20ac","\xcf\u20ac");
_4.addItem("\xe2\u2020\ufffd","\xe2\u2020\ufffd");
_4.addItem("\xe2\u2020\u2018","\xe2\u2020\u2018");
_4.addItem("\xe2\u2020\u2019","\xe2\u2020\u2019");
_4.addItem("\xe2\u2020\u201c","\xe2\u2020\u201c");
_4.addItem("\xe2\u2020\u201d","\xe2\u2020\u201d");
_4.addItem("\xe2\u2020\u2022","\xe2\u2020\u2022");
_4.addItem("\xe2\u02c6\u0161","\xe2\u02c6\u0161");
_4.addItem("\xe2\u2026\u201c","\xe2\u2026\u201c");
_4.addItem("\xe2\u2026\u201d","\xe2\u2026\u201d");
_4.addItem("\xe2\u2026\u203a","\xe2\u2026\u203a");
_4.addItem("\xe2\u2026\u0153","\xe2\u2026\u0153");
_4.addItem("\xe2\u2026\ufffd","\xe2\u2026\ufffd");
_4.addItem("\xe2\u2026\u017e","\xe2\u2026\u017e");
_4.addItem("\xe2\u02c6\u2018","\xe2\u02c6\u2018");
_4.addItem("\xe2\u2030\u02c6","\xe2\u2030\u02c6");
_4.addItem("\xe2\u2022\u2018","\xe2\u2022\u2018");
_4.addItem("\xc3\xb7","\xc3\xb7");
_4.addItem("\xc3\u2014","\xc3\u2014");
_4.addItem("\xc2\xb5","\xc2\xb5");
_4.addItem("\xc3\u0178","\xc3\u0178");
_4.adjustDimensions();
this.addWidget(null,_4);
this.symbolGrid=_4;
}
catch(ex){
jsExDebug("symbolDropList_createDom",ex);
}
}

try{
textButton_t.prototype=new classButton_t();
textButton_t.prototype.textButton_super=classButton_t.prototype.constructor;
textButton_t.prototype.constructor=textButton_t;
textButton_t.prototype.select=textButton_select;
textButton_t.prototype.deselect=textButton_deselect;
textButton_t.prototype.setText=textButton_setText;
}
catch(ex){
jsExDebug("textButton_t.prototype",ex);
}
function textButton_t(_1,_2,_3,_4,_5,_6,_7){
try{
this.textButton_super(_1,this.TYPE_CUSTOM_WIDTH_TEXT_BUTTON,_2,SYSTEM.Style.TEXT_BTN_HEIGHT,null,_3,_4,_5,_6,_7);
}
catch(ex){
jsExDebug("textButton_t",ex);
}
}
function textButton_select(){
try{
this.turnOn();
}
catch(ex){
jsExDebug("textButton_select",ex);
}
}
function textButton_deselect(){
try{
this.turnOff();
}
catch(ex){
jsExDebug("textButton_deselect",ex);
}
}
function textButton_setText(_8){
try{
this.textDiv.innerHTML=_8;
this.content=_8;
}
catch(ex){
jsExDebug("textButton_setText",ex);
}
}

try{
tabGroup_t.prototype=new widget_t();
tabGroup_t.prototype.constructor=tabGroup_t;
tabGroup_t.prototype.tabGroup_super=widget_t.prototype.constructor;
tabGroup_t.prototype.cleanUp=tabGroup_cleanUp;
tabGroup_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
tabGroup_t.prototype.addTextWidget=tabGroup_addTextWidget;
tabGroup_t.prototype.focusNext=tabGroup_focusNext;
tabGroup_t.prototype.attach=tabGroup_attach;
tabGroup_t.prototype.detach=tabGroup_detach;
tabGroup_t.prototype.enable=tabGroup_enable;
tabGroup_t.prototype.disable=tabGroup_disable;
tabGroup_t.prototype.mouseDownEvent=tabGroup_mouseDownEvent;
tabGroup_t.prototype.keyDownEvent=tabGroup_keyDownEvent;
}
catch(ex){
jsExDebug("tabGroup_t.prototype",ex);
}
function tabGroup_t(_1,_2,_3){
try{
this.tabGroup_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.inputArray=[];
this.lastInput=null;
this.focusedInput=null;
this.enabled=true;
this.overrideEvents=_2;
if(_2){
this.SYSTEM.Event.registerKeyDownOverride(this.keyDownEvent,this);
}else{
this.keyDownIndex=this.SYSTEM.Event.notifyKeyDownEvent(this.keyDownEvent,this);
}
}
catch(ex){
jsExDebug("tabGroup_t",ex);
}
}
function tabGroup_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.overrideEvents){
me.SYSTEM.Event.unregisterKeyDownOverride(me.keyDownEvent);
}else{
me.SYSTEM.Event.removeKeyDownHandler(me.keyDownIndex);
me.keyDownIndex=null;
}
for(var i=0;i<me.inputArray.length;i++){
if(me.inputArray[i].widget.textBox){
me.SYSTEM.Event.detachEvent(me.inputArray[i].widget.textBox,"onmousedown","mousedown");
}
me.inputArray[i].widget=null;
me.inputArray[i].tabIndex=null;
me.inputArray[i].prev=null;
me.inputArray[i].next=null;
me.inputArray[i]=null;
delete me.inputArray[i];
}
me.inputArray=null;
me.lastInput=null;
me.focusedInput=null;
me.overrideEvents=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("tabGroup_cleanUp",ex);
}
}
function tabGroup_addTextWidget(_6){
try{
if(!_6.focus){
return;
}
var _7=this.inputArray.length;
var _8={widget:_6,tabIndex:_7,prev:null,next:null};
if(this.lastInput){
_8.prev=this.lastInput;
this.lastInput.next=_8;
}
this.inputArray[_7]=_8;
this.lastInput=_8;
this.SYSTEM.Event.attachEvent(_6.textBox,"onmousedown","mousedown",this.mouseDownEvent,this,false,_7);
}
catch(ex){
jsExDebug("tabGroup_addTextWidget",ex);
}
}
function tabGroup_focusNext(){
try{
var _9=null;
if(this.focusedInput&&this.focusedInput.next){
_9=this.focusedInput.next;
}else{
_9=this.inputArray[0];
}
if(_9&&_9.widget.isVisible()){
_9.widget.focus();
this.focusedInput=_9;
}
}
catch(ex){
jsExDebug("tabGroup_focusNext "+this.name,ex);
}
}
function tabGroup_mouseDownEvent(_a,me,_c){
try{
me.focusedInput=me.inputArray[_c];
}
catch(ex){
jsExDebug("tabGroup_mouseDownEvent",ex);
}
}
function tabGroup_keyDownEvent(_d,me){
try{
if(_d.which==9){
if(me.enabled){
_d.preventDefault();
me.focusNext();
}
}
}
catch(ex){
jsExDebug("tabGroup_keyDownEvent",ex);
}
}
function tabGroup_attach(_f){
try{
return;
}
catch(ex){
jsExDebug("tabGroup_attach",ex);
}
}
function tabGroup_detach(){
try{
return;
}
catch(ex){
jsExDebug("tabGroup_detach",ex);
}
}
function tabGroup_disable(){
try{
this.enabled=false;
}
catch(ex){
jsExDebug("tabGroup_disable",ex);
}
}
function tabGroup_enable(){
try{
this.enabled=true;
}
catch(ex){
jsExDebug("tabGroup_enable",ex);
}
}

try{
collaborationIcon_t.prototype=new button_t();
collaborationIcon_t.prototype.collaborationIcon_super=button_t.prototype.constructor;
collaborationIcon_t.prototype.constructor=collaborationIcon_t;
collaborationIcon_t.prototype.cleanUp=collaborationIcon_cleanUp;
collaborationIcon_t.prototype.button_cleanUp=button_t.prototype.cleanUp;
collaborationIcon_t.prototype.button_createDom=button_t.prototype.createDom;
collaborationIcon_t.prototype.button_bindEvents=button_t.prototype.bindEvents;
collaborationIcon_t.prototype.createDom=collaborationIcon_createDom;
collaborationIcon_t.prototype.bindEvents=collaborationIcon_bindEvents;
collaborationIcon_t.prototype.go=collaborationIcon_go;
collaborationIcon_t.prototype.stop=collaborationIcon_stop;
collaborationIcon_t.prototype.wait=collaborationIcon_wait;
collaborationIcon_t.prototype.off=collaborationIcon_off;
collaborationIcon_t.prototype.WIDTH=20;
collaborationIcon_t.prototype.HEIGHT=20;
collaborationIcon_t.prototype.GO=1;
collaborationIcon_t.prototype.STOP=2;
collaborationIcon_t.prototype.WAIT=3;
collaborationIcon_t.prototype.OFF=4;
collaborationIcon_t.prototype.GO_IMG="img/app/system/frame/edit_go";
collaborationIcon_t.prototype.STOP_IMG="img/app/system/frame/edit_stop";
collaborationIcon_t.prototype.WAIT_IMG="img/app/system/frame/edit_wait";
collaborationIcon_t.prototype.OFF_IMG="img/app/system/frame/edit_none";
}
catch(ex){
jsExDebug("collaborationIcon_t:prototype",ex);
}
function collaborationIcon_t(_1,_2){
try{
this.collaborationIcon_super(_1,this.GO_IMG,null,this.WIDTH,this.HEIGHT,null,null,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.state=this.GO;
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("collaborationIcon_t",ex);
}
}
function collaborationIcon_cleanUp(me){
try{
if(!me){
me=this;
}
me.state=null;
me.button_cleanUp();
}
catch(ex){
jsExDebug("collaborationIcon_cleanUp",ex);
}
}
function collaborationIcon_createDom(){
try{
this.button_createDom(this.stateOffImage,this.WIDTH,this.HEIGHT,"No Collaboration","To begin collaboration, save this file and share it with another Peepel user.",null,110);
}
catch(ex){
jsExDebug("collaborationIcon_createDom",ex);
}
}
function collaborationIcon_bindEvents(){
try{
this.button_bindEvents();
}
catch(ex){
jsExDebug("collaborationIcon_bindEvents",ex);
}
}
function collaborationIcon_go(){
try{
this.state=this.GO;
this.setImage(this.GO_IMG);
this.allowTooltip("You have edit control","Red: No control,<br/>"+"Orange: Transferring control,<br/>"+"Green: You have control,<br/>"+"Red & Green: No one has control.",null,140);
}
catch(ex){
jsExDebug("collaborationIcon_go",ex);
}
}
function collaborationIcon_stop(_4){
try{
this.state=this.STOP;
this.setImage(this.STOP_IMG);
this.allowTooltip("You don't have edit control",(_4?_4:"?")+" currently has edit control of the document.<br/><br/>"+"Red: No control,<br/>"+"Orange: Transferring control,<br/>"+"Green: You have control,<br/>"+"Red & Green: No one has control.",null,200);
}
catch(ex){
jsExDebug("collaborationIcon_stop",ex);
}
}
function collaborationIcon_wait(){
try{
this.state=this.WAIT;
this.setImage(this.WAIT_IMG);
this.allowTooltip("You are about to receive edit control","Red: No control,<br/>"+"Orange: Transferring control,<br/>"+"Green: You have control,<br/>"+"Red & Green: No one has control.",null,140);
}
catch(ex){
jsExDebug("collaborationIcon_wait",ex);
}
}
function collaborationIcon_off(){
try{
this.state=this.OFF;
this.setImage(this.OFF_IMG);
this.allowTooltip("No one has edit control","To take it, click on 'Take Edit Control' in the 'Sharing' tab.<br/><br/>"+"Red: No control,<br/>"+"Orange: Transferring control,<br/>"+"Green: You have control,<br/>"+"Red & Green: No one has control.",null,180);
}
catch(ex){
jsExDebug("collaborationIcon_off",ex);
}
}

try{
sharingToolgroup_t.prototype=new widgetToolgroup_t();
sharingToolgroup_t.prototype.constructor=sharingToolgroup_t;
sharingToolgroup_t.prototype.cleanUp=sharingToolgroup_cleanUp;
sharingToolgroup_t.prototype.sharingToolgroup_super=widgetToolgroup_t.prototype.constructor;
sharingToolgroup_t.prototype.widgetToolgroup_cleanUp=widgetToolgroup_t.prototype.cleanUp;
sharingToolgroup_t.prototype.widgetToolgroup_createDom=widgetToolgroup_t.prototype.createDom;
sharingToolgroup_t.prototype.widgetToolgroup_bindEvents=widgetToolgroup_t.prototype.bindEvents;
sharingToolgroup_t.prototype.createDom=sharingToolgroup_createDom;
sharingToolgroup_t.prototype.bindEvents=sharingToolgroup_bindEvents;
sharingToolgroup_t.prototype.setFileId=sharingToolgroup_setFileId;
sharingToolgroup_t.prototype.shareBtnClickEvent=sharingToolgroup_shareBtnClickEvent;
sharingToolgroup_t.prototype.WIDTH=192;
sharingToolgroup_t.prototype.SHARE_WIDTH=40;
sharingToolgroup_t.prototype.SHARE_HEIGHT=60;
sharingToolgroup_t.prototype.SHARE_LBL_WIDTH=140;
sharingToolgroup_t.prototype.SHARE_LBL_HEIGHT=62;
sharingToolgroup_t.prototype.SHARE_LBL_LEFT=48;
sharingToolgroup_t.prototype.SHARE_LBL_TOP=4;
sharingToolgroup_t.prototype.SHARE_LEFT=4;
sharingToolgroup_t.prototype.SHARE_TOP=4;
sharingToolgroup_t.prototype.SHARE_IMG="img/app/system/icons/40x60/share.png";
}
catch(ex){
jsExDebug("sharingToolgroup_t.prototype",ex);
}
function sharingToolgroup_t(_1,_2,_3){
try{
this.sharingToolgroup_super(_1,this.WIDTH,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.application=_2;
if(!_3){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("sharingToolgroup_t",ex);
}
}
function sharingToolgroup_cleanUp(me){
try{
if(!me){
var me=this;
}
me.fileId=null;
me.application=null;
me.shareDialogue=null;
me.stateShareOpen=null;
me.shareBtn=null;
me.shareLabel=null;
me.widgetToolgroup_cleanUp();
}
catch(ex){
jsExDebug("sharingToolgroup_cleanUp",ex);
}
}
function sharingToolgroup_createDom(){
try{
this.widgetToolgroup_createDom(this.WIDTH,this.HEIGHT);
this.allowLabel("File Sharing");
var _5=new this.SYSTEM.Widget.ClassButton("shareBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SHARE_WIDTH,this.SHARE_HEIGHT,null,this.SHARE_IMG,"File Sharing","Show the file sharing options for this file");
_5.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.shareBtnClickEvent));
var _6=new this.SYSTEM.Widget.Label("shareLabel");
_6.setDimensions(this.SHARE_LBL_WIDTH,this.SHARE_LBL_HEIGHT);
_6.setText("Click on the button to show the file sharing options for this file.");
this.addWidget(_5,this.SHARE_LEFT,this.SHARE_TOP);
this.addWidget(_6,this.SHARE_LBL_LEFT,this.SHARE_LBL_TOP);
this.shareBtn=_5;
this.shareLabel=_6;
}
catch(ex){
jsExDebug("sharingToolgroup_createDom",ex);
}
}
function sharingToolgroup_bindEvents(){
try{
this.widgetToolgroup_bindEvents();
}
catch(ex){
jsExDebug("sharingToolgroup_bindEvents",ex);
}
}
function sharingToolgroup_setFileId(_7){
try{
this.fileId=_7;
}
catch(ex){
jsExDebug("sharingToolgroup_setFileId",ex);
}
}
function sharingToolgroup_shareBtnClickEvent(){
function closeCallback(){
try{
this.shareDialogue=null;
this.stateShareOpen=false;
}
catch(ex){
jsExDebug("sharingToolgroup_shareBtnClickEvent: closeCallback",ex);
}
}
try{
if(this.stateShareOpen){
this.shareDialogue.close();
this.shareDialogue=null;
this.stateShareOpen=false;
}else{
this.shareDialogue=new this.SYSTEM.Dialogue.ContactShare(this.application,new this.SYSTEM.Delegate(this,closeCallback));
this.shareDialogue.setNoFileMessage("You must save this file before you can share it with other users.");
this.shareDialogue.setFile(null,this.fileId,this.application.getFileName());
this.stateShareOpen=true;
}
}
catch(ex){
jsExDebug("sharingToolgroup_shareBtnClickEvent",ex);
}
}

try{
sendToolgroup_t.prototype=new widgetToolgroup_t();
sendToolgroup_t.prototype.constructor=sendToolgroup_t;
sendToolgroup_t.prototype.cleanUp=sendToolgroup_cleanUp;
sendToolgroup_t.prototype.sendToolgroup_super=widgetToolgroup_t.prototype.constructor;
sendToolgroup_t.prototype.widgetToolgroup_cleanUp=widgetToolgroup_t.prototype.cleanUp;
sendToolgroup_t.prototype.widgetToolgroup_createDom=widgetToolgroup_t.prototype.createDom;
sendToolgroup_t.prototype.widgetToolgroup_bindEvents=widgetToolgroup_t.prototype.bindEvents;
sendToolgroup_t.prototype.createDom=sendToolgroup_createDom;
sendToolgroup_t.prototype.bindEvents=sendToolgroup_bindEvents;
sendToolgroup_t.prototype.setFileId=sendToolgroup_setFileId;
sendToolgroup_t.prototype.linkTextFocusEvent=sendToolgroup_linkTextFocusEvent;
sendToolgroup_t.prototype.sendBtnClickEvent=sendToolgroup_sendBtnClickEvent;
sendToolgroup_t.prototype.WIDTH=300;
sendToolgroup_t.prototype.SEND_IMG="img/app/system/icons/silk/email";
}
catch(ex){
jsExDebug("sendToolgroup_t.prototype",ex);
}
function sendToolgroup_t(_1,_2,_3){
try{
this.sendToolgroup_super(_1,this.WIDTH,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.application=_2;
if(!_3){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("sendToolgroup_t",ex);
}
}
function sendToolgroup_cleanUp(me){
try{
if(!me){
var me=this;
}
me.linkText=null;
me.quickLinkText=null;
me.application=null;
me.sendBtn=null;
me.widgetToolgroup_cleanUp();
}
catch(ex){
jsExDebug("sendToolgroup_cleanUp",ex);
}
}
function sendToolgroup_createDom(){
try{
this.widgetToolgroup_createDom(this.WIDTH,this.HEIGHT);
this.allowLabel("File Quick Launch");
var _5=4;
var _6=new this.SYSTEM.Widget.Label("label","Paste this link in the address bar of your browser to come to peepel.com and open this file.");
_6.setDimensions(this.WIDTH-(2*_5));
var _7=new this.SYSTEM.Widget.Text("linkText");
_7.setDimensions(this.WIDTH-SILK_ICON_SIDE-(4*_5));
_7.addEventHandler(this.SYSTEM.Event.FOCUS_EVENT,new this.SYSTEM.Delegate(this,this.linkTextFocusEvent));
var _8=new this.SYSTEM.Widget.Button("sendBtn",this.SEND_IMG,null,SILK_ICON_SIDE,SILK_ICON_SIDE,"Send","Send this file quick launch address to another user (via email).");
_8.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.sendBtnClickEvent));
this.addWidget(_6,_5,_5);
this.addWidget(_7,_5,40);
this.addWidget(_8,_5,_7.positionY+_5,true);
this.linkText=_7;
this.sendBtn=_8;
}
catch(ex){
jsExDebug("sendToolgroup_createDom",ex);
}
}
function sendToolgroup_bindEvents(){
try{
this.widgetToolgroup_bindEvents();
}
catch(ex){
jsExDebug("sendToolgroup_bindEvents",ex);
}
}
function sendToolgroup_setFileId(_9){
try{
var _a=this.SYSTEM.Filesystem.getFileFromFileId(_9);
if(_a){
this.quickLinkText="f="+_a.fileGuid;
this.linkText.setContent(this.SYSTEM.Environment.DOCUMENT_NAME+"?"+this.quickLinkText);
}
}
catch(ex){
jsExDebug("sendToolgroup_setFileId",ex);
}
}
function sendToolgroup_linkTextFocusEvent(_b,_c){
try{
_c.textBox.select();
}
catch(ex){
jsExDebug("sendToolgroup_linkTextFocusEvent",ex);
}
}
function sendToolgroup_sendBtnClickEvent(){
try{
var _d=new this.SYSTEM.Dialogue.QuickLinkSend(this.application,this.quickLinkText);
}
catch(ex){
jsExDebug("sendToolgroup_sendBtnClickEvent",ex);
}
}

try{
fileBrowserControl_t.prototype=new peepelObject_t();
fileBrowserControl_t.prototype.constructor=fileBrowserControl_t;
fileBrowserControl_t.prototype.cleanUp=fileBrowserControl_cleanUp;
fileBrowserControl_t.prototype.fileBrowserControl_super=peepelObject_t.prototype.constructor;
fileBrowserControl_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
fileBrowserControl_t.prototype.setDimensions=fileBrowserControl_setDimensions;
fileBrowserControl_t.prototype.setPosition=fileBrowserControl_setPosition;
fileBrowserControl_t.prototype.attach=fileBrowserControl_attach;
fileBrowserControl_t.prototype.detach=fileBrowserControl_detach;
fileBrowserControl_t.prototype.hide=fileBrowserControl_hide;
fileBrowserControl_t.prototype.show=fileBrowserControl_show;
fileBrowserControl_t.prototype.addEventHandler=fileBrowserControl_addEventHandler;
fileBrowserControl_t.prototype.addFile=fileBrowserControl_addFile;
fileBrowserControl_t.prototype.addFolder=fileBrowserControl_addFolder;
fileBrowserControl_t.prototype.getSelectedFile=fileBrowserControl_getSelectedFile;
fileBrowserControl_t.prototype.getSelectedFolder=fileBrowserControl_getSelectedFolder;
fileBrowserControl_t.prototype.clearSelectedFolder=fileBrowserControl_clearSelectedFolder;
fileBrowserControl_t.prototype.getButtonList=fileBrowserControl_getButtonList;
fileBrowserControl_t.prototype.getFileList=fileBrowserControl_getFileList;
fileBrowserControl_t.prototype.refresh=fileBrowserControl_refresh;
fileBrowserControl_t.prototype.showFilesOwnedBy=fileBrowserControl_showFilesOwnedBy;
fileBrowserControl_t.prototype.listFolders=fileBrowserControl_listFolders;
fileBrowserControl_t.prototype.clearItems=fileBrowserControl_clearItems;
fileBrowserControl_t.prototype.fireEvent=fileBrowserControl_fireEvent;
fileBrowserControl_t.prototype.showFolderContents=fileBrowserControl_showFolderContents;
fileBrowserControl_t.prototype.showPublicFolderContents=fileBrowserControl_showPublicFolderContents;
fileBrowserControl_t.prototype.addBackButton=fileBrowserControl_addBackButton;
fileBrowserControl_t.prototype.hideBackButton=fileBrowserControl_hideBackButton;
fileBrowserControl_t.prototype.openSelectedFolder=fileBrowserControl_openSelectedFolder;
fileBrowserControl_t.prototype.openFolderWithId=fileBrowserControl_openFolderWithId;
fileBrowserControl_t.prototype.toggleAvatarButton=fileBrowserControl_toggleAvatarButton;
fileBrowserControl_t.prototype.searchForPublicFiles=fileBrowserControl_searchForPublicFiles;
fileBrowserControl_t.prototype.updateSearchPosition=fileBrowserControl_updateSearchPosition;
fileBrowserControl_t.prototype.controlClickEvent=fileBrowserControl_controlClickEvent;
fileBrowserControl_t.prototype.fileClickEvent=fileBrowserControl_fileClickEvent;
fileBrowserControl_t.prototype.fileExitEvent=fileBrowserControl_fileExitEvent;
fileBrowserControl_t.prototype.fileHoverEvent=fileBrowserControl_fileHoverEvent;
fileBrowserControl_t.prototype.fileDblClickEvent=fileBrowserControl_fileDblClickEvent;
fileBrowserControl_t.prototype.folderExitEvent=fileBrowserControl_folderExitEvent;
fileBrowserControl_t.prototype.folderHoverEvent=fileBrowserControl_folderHoverEvent;
fileBrowserControl_t.prototype.folderClickEvent=fileBrowserControl_folderClickEvent;
fileBrowserControl_t.prototype.folderDblClickEvent=fileBrowserControl_folderDblClickEvent;
fileBrowserControl_t.prototype.backBtnClickEvent=fileBrowserControl_backBtnClickEvent;
fileBrowserControl_t.prototype.keyPressEvent=fileBrowserControl_keyPressEvent;
fileBrowserControl_t.prototype.DEFAULT_WIDTH=280;
fileBrowserControl_t.prototype.DEFAULT_HEIGHT=250;
fileBrowserControl_t.prototype.BORDER_STYLE="solid 1px black";
fileBrowserControl_t.prototype.ITEM_DIV_WIDTH=60;
fileBrowserControl_t.prototype.ITEM_DIV_HEIGHT=50;
fileBrowserControl_t.prototype.FILE_NAME_HEIGHT=15;
fileBrowserControl_t.prototype.FILE_NAME_FONT_SIZE=8;
fileBrowserControl_t.prototype.FILE_BTN_WIDTH=32;
fileBrowserControl_t.prototype.FILE_BTN_HEIGHT=32;
fileBrowserControl_t.prototype.FILE_BTN_LEFT=14;
fileBrowserControl_t.prototype.ITEM_X_OFFSET=5;
fileBrowserControl_t.prototype.ITEM_Y_OFFSET=5;
fileBrowserControl_t.prototype.SCROLLBAR_WIDTH=25;
fileBrowserControl_t.prototype.FILE_TOOLTIP_WIDTH=130;
fileBrowserControl_t.prototype.FILE_IMG="img/app/system/controls/filebrowser/file";
fileBrowserControl_t.prototype.FILE_SPREADSHEET_IMG="img/app/system/controls/filebrowser/file_spreadsheet";
fileBrowserControl_t.prototype.FILE_WRITER_IMG="img/app/system/controls/filebrowser/file_writer";
fileBrowserControl_t.prototype.FILE_WRITER_READ_IMG="img/app/system/controls/filebrowser/file_writer_ro";
fileBrowserControl_t.prototype.FILE_SPREADSHEET_READ_IMG="img/app/system/controls/filebrowser/file_spreadsheet_ro";
fileBrowserControl_t.prototype.FILE_WRITER_SHARED_IMG="img/app/system/controls/filebrowser/file_writer_shared";
fileBrowserControl_t.prototype.FILE_SPREADSHEET_SHARED_IMG="img/app/system/controls/filebrowser/file_spreadsheet_shared";
fileBrowserControl_t.prototype.FILE_AVATAR_IMG="img/app/system/controls/filebrowser/file_avatar";
fileBrowserControl_t.prototype.FOLDER_NAME_HEIGHT=15;
fileBrowserControl_t.prototype.FOLDER_NAME_FONT_SIZE=8;
fileBrowserControl_t.prototype.FOLDER_BTN_WIDTH=32;
fileBrowserControl_t.prototype.FOLDER_BTN_HEIGHT=32;
fileBrowserControl_t.prototype.FOLDER_BTN_LEFT=14;
fileBrowserControl_t.prototype.INFO_X_OFFSET=30;
fileBrowserControl_t.prototype.INFO_Y_OFFSET=30;
fileBrowserControl_t.prototype.FOLDER_IMG="img/app/system/controls/filebrowser/folder";
fileBrowserControl_t.prototype.ALL_FILES_IMG="img/app/system/controls/filebrowser/all_folder";
fileBrowserControl_t.prototype.OTHERS_FILES_IMG="img/app/system/controls/filebrowser/others_folder";
fileBrowserControl_t.prototype.IMPORTED_FILES_IMG="img/app/system/controls/filebrowser/import_folder";
fileBrowserControl_t.prototype.PUBLIC_FILES_IMG="img/app/system/controls/filebrowser/others_folder";
fileBrowserControl_t.prototype.BACK_IMG="img/app/system/controls/filebrowser/back_folder";
fileBrowserControl_t.prototype.BACK_BTN_WIDTH=32;
fileBrowserControl_t.prototype.BACK_BTN_HEIGHT=32;
fileBrowserControl_t.prototype.BACK_BTN_LEFT=14;
fileBrowserControl_t.prototype.SEARCH_DIV_WIDTH=215;
fileBrowserControl_t.prototype.SEARCH_DIV_HEIGHT=22;
fileBrowserControl_t.prototype.TYPE_OPEN=1;
fileBrowserControl_t.prototype.TYPE_SAVE=2;
fileBrowserControl_t.prototype.OWNER_USER="Me";
fileBrowserControl_t.prototype.PUBLIC_FILES_ID=-1;
fileBrowserControl_t.prototype.ALL_FILES_ID=1;
fileBrowserControl_t.prototype.OTHERS_FILES_ID=2;
fileBrowserControl_t.prototype.FILE_SELECT_EVENT=1;
fileBrowserControl_t.prototype.FOLDER_SELECT_EVENT=2;
fileBrowserControl_t.prototype.BACK_BTN_CLICK_EVENT=4;
fileBrowserControl_t.prototype.FILE_DBL_CLICK_EVENT=8;
fileBrowserControl_t.prototype.FOLDER_DBL_CLICK_EVENT=16;
fileBrowserControl_t.prototype.CONTROL_CLICK_EVENT=32;
fileBrowserControl_t.prototype.FOLDER_CONTENTS_LOADED_EVENT=64;
}
catch(ex){
jsExDebug("fileBrowserControl_t.prototype",ex);
}
function fileBrowserControl_t(_1,_2,_3){
try{
this.fileBrowserControl_super();
this.name=_1;
this.nextItemLeft=this.ITEM_X_OFFSET;
this.nextItemTop=this.ITEM_Y_OFFSET;
this.itemBtnArray=[];
this.selectedFileWidget=null;
this.eventBindings=[];
this.infoVisible=false;
this.selectedFolder=null;
this.selectedFolderWidget=null;
this.openedFolder=null;
this.waitingForFilesystemRefresh=false;
this.importedFolderId=this.SYSTEM.Settings.get("file_import_folder");
this.publicFolder={folderId:this.PUBLIC_FILES_ID,folderName:"Public Files",fileCount:0,contents:[]};
this.filesOwnedBy=[];
this.width=this.DEFAULT_WIDTH;
this.height=this.DEFAULT_HEIGHT;
this.type=_2;
this.fileTypeFilter=_3;
var _4=document.createElement("div");
_4.style.position="absolute";
_4.style.width=this.DEFAULT_WIDTH+"px";
_4.style.height=this.DEFAULT_HEIGHT+"px";
_4.style.border=this.BORDER_STYLE;
_4.style.overflow="auto";
_4.style.backgroundColor="white";
this.controlElement=_4;
this.SYSTEM.Event.attachEvent(this.controlElement,"onclick","click",this.controlClickEvent,this);
var _5=this.SYSTEM.Dom.createDiv("absolute",this.SEARCH_DIV_WIDTH,this.SEARCH_DIV_HEIGHT);
_5.style.backgroundColor="white";
_5.style.zIndex=1;
var _6=new this.SYSTEM.Widget.Label("searchLabel","Search:");
_6.setDimensions(60,15);
_6.setBold();
_6.setPosition(150,1,true,true);
_6.attach(_5);
var _7=new this.SYSTEM.Widget.Text("searchText");
_7.setPosition(0,1,true,true);
_7.setDimensions(150);
_7.attach(_5);
this.searchText=_7;
this.searchLabel=_6;
this.searchDiv=_5;
this.keyPressIndex=this.SYSTEM.Event.notifyKeyPressEvent(this.keyPressEvent,this);
}
catch(ex){
jsExDebug("fileBrowserControl_t",ex);
}
}
function fileBrowserControl_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.controlElement,"onclick","click");
me.SYSTEM.Event.removeKeyPressHandler(me.keyPressIndex);
for(i in me.filesOwnedBy){
var _a=me.filesOwnedBy[i];
if(_a.length>0){
for(var j=0;j<_a.length;j++){
me.filesOwnedBy[i][j]=null;
delete me.filesOwnedBy[i][j];
}
me.filesOwnedBy[i]=null;
delete me.filesOwnedBy[i];
}
}
me.filesOwnedBy=null;
for(var i in me.itemBtnArray){
var _c=me.itemBtnArray[i];
if(!_c.button){
continue;
}
_c.button.cleanUp();
me.SYSTEM.Dom.freeDom(_c.div);
me.controlElement.removeChild(_c.div);
_c.div=null;
_c.button=null;
_c.data=null;
_c.isFile=null;
_c.isFolder=null;
_c.owner=null;
me.itemBtnArray[i]=null;
delete me.itemBtnArray[i];
}
for(var _d in me.eventBindings){
if(me.eventBindings[_d].length){
for(var i=0;i<me.eventBindings[_d].length;i++){
me.eventBindings[_d][i].cleanUp();
me.eventBindings[_d][i]=null;
delete me.eventBindings[_d][i];
}
me.eventBindings[_d]=null;
delete me.eventBindings[_d];
}
}
if(me.backBtn){
me.backBtn.cleanUp();
me.backBtn=null;
me.backDiv=null;
}
me.eventBindings=null;
me.itemBtnArray=null;
me.selectedFileWidget=null;
me.selectedFolder=null;
me.selectedFolderWidget=null;
me.nextItemLeft=null;
me.nextItemTop=null;
me.waitingForFilesystemRefresh=null;
me.name=null;
me.type=null;
me.fileTypeFilter=null;
me.width=null;
me.height=null;
me.fromRight=null;
me.fromBottom=null;
me.publicFolder=null;
me.searchText.cleanUp();
me.searchLabel.cleanUp();
me.searchText=null;
me.searchLabel=null;
me.searchDiv=null;
me.SYSTEM.Dom.freeDom(me.controlElement);
me.detach();
me.controlElement=null;
me.openedFolder=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("fileBrowserControl_cleanUp",ex);
}
}
function fileBrowserControl_setDimensions(_e,_f){
try{
this.width=_e;
this.height=_f;
this.controlElement.style.width=_e+"px";
this.controlElement.style.height=_f+"px";
this.updateSearchPosition();
}
catch(ex){
jsExDebug("fileBrowserControl_setDimensions",ex);
}
}
function fileBrowserControl_setPosition(_10,_11,_12,_13){
try{
this.positionX=_10;
this.positionY=_11;
if(_12){
this.controlElement.style.right=_10+"px";
this.fromRight=true;
}else{
this.controlElement.style.left=_10+"px";
this.fromRight=false;
}
if(_13){
this.controlElement.style.bottom=_11+"px";
this.fromBottom=true;
}else{
this.controlElement.style.top=_11+"px";
this.fromBottom=false;
}
this.updateSearchPosition();
}
catch(ex){
jsExDebug("fileBrowserControl_setPosition",ex);
}
}
function fileBrowserControl_attach(_14){
try{
if(_14){
_14.appendChild(this.controlElement);
_14.appendChild(this.searchDiv);
this.parentDiv=_14;
}
}
catch(ex){
jsExDebug("fileBrowserControl_attach",ex);
}
}
function fileBrowserControl_detach(){
try{
if(this.controlElement.parentNode){
this.controlElement.parentNode.removeChild(this.controlElement);
}
this.parentDiv=null;
}
catch(ex){
jsExDebug("fileBrowserControl_detach",ex);
}
}
function fileBrowserControl_hide(){
try{
this.controlElement.style.visibility="hidden";
}
catch(ex){
jsExDebug("fileBrowserControl_hide",ex);
}
}
function fileBrowserControl_show(){
try{
this.controlElement.style.visibility="visible";
}
catch(ex){
jsExDebug("fileBrowserControl_show",ex);
}
}
function fileBrowserControl_addEventHandler(_15,_16){
try{
if(_16.handler){
if(!this.eventBindings[_15]){
this.eventBindings[_15]=[];
_17=0;
}
var _17=this.eventBindings[_15].length;
this.eventBindings[_15][_17]=_16;
}
}
catch(ex){
jsExDebug("fileBrowserControl_addEventHandler",ex);
}
}
function fileBrowserControl_addFile(_18){
try{
if(!_18){
return;
}
var _19=document.createElement("div");
_19.style.position="absolute";
_19.style.width=this.ITEM_DIV_WIDTH+"px";
_19.style.height=this.ITEM_DIV_HEIGHT+"px";
_19.style.left=this.nextItemLeft+"px";
_19.style.top=this.nextItemTop+"px";
var _1a=(_18.fileName?_18.fileName:"unnamed");
var _1b="Name: "+_1a+"<br>";
var _1c=this.FILE_IMG;
var _1d=parseInt(_18.fileType);
var _1e=false;
var _1f="";
if(this.SYSTEM.Filesystem.ownsFile(_18.fileId)){
_1f=this.OWNER_USER;
_1e=false;
}else{
var _20=this.SYSTEM.Filesystem.getUsersWithOwnerAccessById(_18.fileId);
if(_20[0]){
_1f=_20[0].userName;
}
var _21=this.SYSTEM.Filesystem.getFilePermsisionsById(_18.fileId);
if(_21>=this.SYSTEM.Filesystem.FILE_ACCESS_WRITE){
_1e=false;
}else{
if(_21>=this.SYSTEM.Filesystem.FILE_ACCESS_READ){
_1e=true;
}
}
}
var _22="FILE_";
switch(_1d){
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
_22+="WRITER_";
_1b+="Type: Peepel WebWriter document<br>";
break;
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
_22+="SPREADSHEET_";
_1b+="Type: Peepel WebSheet document<br>";
break;
case this.SYSTEM.Filesystem.File.TYPE_IMAGE:
_1b+="Type: Peepel User Image<br>";
break;
}
if(this.SYSTEM.Filesystem.isSharedFile(_18.fileId)&&_1f==this.OWNER_USER){
_22+="SHARED_";
}else{
if(_1e){
_22+="READ_";
}
}
_1c=this[_22+"IMG"];
_1b+="Owner: "+_1f+"<br>Access: "+(_1e?"Read":"Read & Write");
var _23=new this.SYSTEM.Widget.Button(_1a,_1c,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE|button_t.prototype.HOVER_ON_IMAGE,this.FILE_BTN_WIDTH,this.FILE_BTN_HEIGHT,null,_1b,null,this.FILE_TOOLTIP_WIDTH);
_23.setPosition(this.FILE_BTN_LEFT,0);
if(_1d==this.SYSTEM.Filesystem.File.TYPE_IMAGE){
var _24=this.SYSTEM.Environment.USER_DATA_PATH+"revision/"+_18.location+"/"+_18.fileGuid+"_"+this.SYSTEM.UserDetails.SIDE_32_REVISION+".s";
_23.overrideImages(_24,_24,_24,_24);
_23.turnOff();
}
_23.setValue(_18);
var _25=new this.SYSTEM.Delegate(this,this.fileClickEvent);
var _26=new this.SYSTEM.Delegate(this,this.fileExitEvent);
var _27=new this.SYSTEM.Delegate(this,this.fileHoverEvent);
_23.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_25);
_23.addEventHandler(this.SYSTEM.Event.MOUSE_EXIT_EVENT,_26);
_23.addEventHandler(this.SYSTEM.Event.MOUSE_HOVER_EVENT,_27);
if(this.type==this.TYPE_OPEN){
var _28=new this.SYSTEM.Delegate(this,this.fileDblClickEvent);
_23.addEventHandler(this.SYSTEM.Event.DOUBLE_CLICK_EVENT,_28);
}
var _29=document.createElement("span");
_29.style.position="absolute";
_29.style.bottom="0px";
_29.style.fontSize=this.FILE_NAME_FONT_SIZE+"pt";
_29.style.height=this.FILE_NAME_HEIGHT+"px";
_29.style.width=this.ITEM_DIV_WIDTH+"px";
_29.style.overflow="hidden";
_29.style.whiteSpace="nowrap";
_29.style.textAlign="center";
_29.style.color="black";
_29.innerHTML=_1a;
var _2a={};
_2a.div=_19;
_2a.button=_23;
_2a.data=_18;
_2a.isFile=true;
_2a.owner=_1f;
this.itemBtnArray[_18.fileId]=_2a;
_23.attach(_19);
_19.appendChild(_29);
this.controlElement.appendChild(_19);
this.nextItemLeft+=this.ITEM_DIV_WIDTH+this.ITEM_X_OFFSET;
if((this.nextItemLeft+this.ITEM_DIV_WIDTH+this.ITEM_X_OFFSET)>(this.width-this.SCROLLBAR_WIDTH)){
this.nextItemLeft=this.ITEM_X_OFFSET;
this.nextItemTop+=this.ITEM_DIV_HEIGHT+this.ITEM_Y_OFFSET;
}
}
catch(ex){
jsExDebug("fileBrowserControl_addFile",ex);
}
}
function fileBrowserControl_addFolder(_2b){
try{
if(!_2b){
return;
}
var _2c=document.createElement("div");
_2c.style.position="absolute";
_2c.style.width=this.ITEM_DIV_WIDTH+"px";
_2c.style.height=this.ITEM_DIV_HEIGHT+"px";
_2c.style.left=this.nextItemLeft+"px";
_2c.style.top=this.nextItemTop+"px";
var _2d=0;
for(var i=0;i<_2b.contents.length;i++){
if(_2b.contents[i]){
_2d++;
}
}
var _2f="Name: "+_2b.folderName+"<br>"+"Number of files: "+_2d;
var _30=button_t.prototype.HOVER_IMAGE|button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_ON_IMAGE;
var _31=null;
switch(parseInt(_2b.folderId)){
case this.ALL_FILES_ID:
_31=this.ALL_FILES_IMG;
break;
case this.OTHERS_FILES_ID:
_31=this.OTHERS_FILES_IMG;
break;
case this.importedFolderId:
_31=this.IMPORTED_FILES_IMG;
break;
case this.PUBLIC_FILES_ID:
_31=this.PUBLIC_FILES_IMG;
break;
default:
_31=this.FOLDER_IMG;
}
var _32=new this.SYSTEM.Widget.Button(_2b.folderName,_31,_30,this.FOLDER_BTN_WIDTH,this.FOLDER_BTN_HEIGHT,_2b.folderName,_2f);
_32.setPosition(this.FOLDER_BTN_LEFT,0);
_32.setValue(_2b);
var _33=new this.SYSTEM.Delegate(this,this.folderClickEvent);
var _34=new this.SYSTEM.Delegate(this,this.folderDblClickEvent);
var _35=new this.SYSTEM.Delegate(this,this.folderHoverEvent);
var _36=new this.SYSTEM.Delegate(this,this.folderExitEvent);
_32.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_33);
_32.addEventHandler(this.SYSTEM.Event.DOUBLE_CLICK_EVENT,_34);
_32.addEventHandler(this.SYSTEM.Event.MOUSE_HOVER_EVENT,_35);
_32.addEventHandler(this.SYSTEM.Event.MOUSE_EXIT_EVENT,_36);
var _37=document.createElement("span");
_37.style.position="absolute";
_37.style.bottom="0px";
_37.style.fontSize=this.FOLDER_NAME_FONT_SIZE+"pt";
_37.style.height=this.FOLDER_NAME_HEIGHT+"px";
_37.style.width=this.ITEM_DIV_WIDTH+"px";
_37.style.overflow="hidden";
_37.style.whiteSpace="nowrap";
_37.style.textAlign="center";
_37.style.color="black";
_37.innerHTML=_2b.folderName;
var _38={};
_38.div=_2c;
_38.button=_32;
_38.data=_2b;
_38.isFolder=true;
this.itemBtnArray[_2b.folderId]=_38;
_32.attach(_2c);
_2c.appendChild(_37);
this.controlElement.appendChild(_2c);
this.nextItemLeft+=this.ITEM_DIV_WIDTH+this.ITEM_X_OFFSET;
if((this.nextItemLeft+this.ITEM_DIV_WIDTH+this.ITEM_X_OFFSET)>(this.width-this.SCROLLBAR_WIDTH)){
this.nextItemLeft=this.ITEM_X_OFFSET;
this.nextItemTop+=this.ITEM_DIV_HEIGHT+this.ITEM_Y_OFFSET;
}
}
catch(ex){
jsExDebug("fileBrowserControl_addFolder",ex);
}
}
function fileBrowserControl_getSelectedFile(){
try{
if(this.selectedFileWidget){
var _39=this.selectedFileWidget.getValue();
return {fileid:_39.fileId,filename:_39.fileName,filetype:_39.fileType,location:_39.location,ispublic:_39.isPublic};
}else{
return null;
}
}
catch(ex){
jsExDebug("fileBrowserControl_getSelectedFile",ex);
}
}
function fileBrowserControl_getSelectedFolder(){
try{
if(this.selectedFolder){
return this.selectedFolder;
}else{
return null;
}
}
catch(ex){
jsExDebug("fileBrowserControl_getSelectedFolder",ex);
}
}
function fileBrowserControl_clearSelectedFolder(){
try{
this.selectedFolder=null;
this.selectedFolderWidget=null;
}
catch(ex){
jsExDebug("fileBrowserControl_clearSelectedFolder",ex);
}
}
function fileBrowserControl_getButtonList(){
try{
var _3a=[];
for(var i in this.itemBtnArray){
if(this.itemBtnArray[i]&&this.itemBtnArray[i].button){
_3a.push(this.itemBtnArray[i]);
}
}
return _3a;
}
catch(ex){
jsExDebug("fileBrowserControl_getButtonList",ex);
}
}
function fileBrowserControl_getFileList(){
try{
var _3c=[];
for(var i=0;i<this.itemBtnArray.length;i++){
var _3e=this.itemBtnArray[i];
if(_3e&&_3e.data&&_3e.data.fileId){
_3c.push(_3e.data);
}
}
return _3c;
}
catch(ex){
jsExDebug("fileBrowserControl_getFileList",ex);
}
}
function fileBrowserControl_refresh(_3f,_40){
try{
if(this.openedFolder){
var _41=null;
if(_3f&&this.selectedFileWidget){
_41=this.selectedFileWidget.getValue().fileId;
}
this.clearItems();
this.addBackButton();
this.showFolderContents(this.selectedFolder.folderId,_41,_40);
}else{
this.clearItems();
this.listFolders(_40);
}
}
catch(ex){
jsExDebug("fileBrowserControl_refresh",ex);
}
}
function fileBrowserControl_showFilesOwnedBy(_42){
try{
var _43=this.filesOwnedBy[_42];
this.clearItems();
this.addBackButton();
for(var i=0;i<_43.length;i++){
this.addFile(_43[i]);
}
}
catch(ex){
jsExDebug("fileBrowserControl_showFilesOwnedBy",ex);
}
}
function fileBrowserControl_listFolders(_45){
function refreshCallback(me){
try{
var _47=me.SYSTEM.Filesystem.folders;
for(var i in _47){
var _49=_47[i];
if(_49.folderId){
if(!me.itemBtnArray[_49.folderId]){
me.addFolder(_49);
}
}
}
me.addFolder(me.publicFolder);
me.waitingForFilesystemRefresh=false;
if(_45){
_45.invoke();
}
}
catch(ex){
jsExDebug("refreshCallback",ex);
}
}
try{
if(!this.waitingForFilesystemRefresh){
this.waitingForFilesystemRefresh=true;
this.SYSTEM.Filesystem.refresh(refreshCallback,this);
this.searchDiv.style.display="none";
}
}
catch(ex){
jsExDebug("fileBrowserControl_listFolders",ex);
}
}
function fileBrowserControl_clearItems(){
try{
for(var i in this.itemBtnArray){
var _4b=this.itemBtnArray[i];
if(!_4b.button){
continue;
}
_4b.button.cleanUp();
this.SYSTEM.Dom.freeDom(_4b.div);
this.controlElement.removeChild(_4b.div);
_4b.div=null;
_4b.button=null;
_4b.data=null;
_4b.isFile=null;
_4b.isFolder=null;
this.itemBtnArray[i]=null;
delete this.itemBtnArray[i];
}
this.itemBtnArray=[];
this.selectedFileWidget=null;
this.nextItemLeft=this.ITEM_X_OFFSET;
this.nextItemTop=this.ITEM_Y_OFFSET;
}
catch(ex){
jsExDebug("fileBrowserControl_clearItems",ex);
}
}
function fileBrowserControl_fireEvent(_4c,_4d){
try{
if(!this.eventBindings||!this.eventBindings[_4c]){
return;
}
if(_4d){
var _4e=new SYSTEM.Event.Event(_4d.clientX,_4d.clientY);
if(document.all){
_4e.relatedTarget=_4d.toElement;
}else{
_4e.relatedTarget=_4d.relatedTarget;
}
}else{
var _4e=new SYSTEM.Event.Event();
}
for(var i=this.eventBindings[_4c].length-1;i>=0;i--){
var _50=this.eventBindings[_4c][i];
_50.invoke(_4e,this);
}
}
catch(ex){
jsExDebug("fileBrowserControl_fireEvent",ex);
}
}
function fileBrowserControl_showFolderContents(_51,_52,_53){
function refreshCallback(me){
try{
me.waitingForFilesystemRefresh=false;
if(!_51||!me.selectedFolder||(me.selectedFolder.folderId!=_51)){
me.listFolders();
return;
}
var _55=me.SYSTEM.Filesystem.getFolderContentsById(_51,false);
for(i in me.filesOwnedBy){
var _57=me.filesOwnedBy[i];
if(_57.length>0){
for(var j=0;j<_57.length;j++){
me.filesOwnedBy[i][j]=null;
delete me.filesOwnedBy[i][j];
}
me.filesOwnedBy[i]=null;
delete me.filesOwnedBy[i];
}
}
me.filesOwnedBy=[];
if(_55){
for(var i in _55.contents){
var _59=_55.contents[i];
if(_59.fileId){
if(me.fileTypeFilter&&_59.fileType!=me.fileTypeFilter){
continue;
}
me.addFile(_59);
var _5a=me.itemBtnArray[_59.fileId].owner;
if(_5a&&_5a!=me.OWNER_USER){
if(!me.filesOwnedBy[_5a]){
me.filesOwnedBy[_5a]=[];
}
me.filesOwnedBy[_5a].push(_59);
}
}
}
}
if(_52){
for(i=0;i<me.itemBtnArray.length;i++){
var _5b=me.itemBtnArray[i];
if(_5b&&_5b.data.fileId==_52){
me.fileClickEvent(null,_5b.button);
}
}
}
if(_53){
_53.invoke();
}
me.fireEvent(me.FOLDER_CONTENTS_LOADED_EVENT);
}
catch(ex){
jsExDebug("fileBrowserControl_showFolderContents: refreshCallback",ex);
}
}
try{
if(!this.waitingForFilesystemRefresh){
this.waitingForFilesystemRefresh=true;
if(_51==this.PUBLIC_FILES_ID){
this.showPublicFolderContents(_52,_53);
}else{
this.searchDiv.style.display="none";
this.SYSTEM.Filesystem.refresh(refreshCallback,this);
}
}
}
catch(ex){
jsExDebug("fileBrowserControl_showFolderContents",ex);
}
}
function fileBrowserControl_showPublicFolderContents(_5c,_5d){
try{
this.updateSearchPosition();
this.searchDiv.style.display="block";
if(this.searchText.getContent().length){
this.searchForPublicFiles(this.searchText.getContent());
}
if(_5d){
_5d.invoke();
}
this.fireEvent(this.FOLDER_CONTENTS_LOADED_EVENT);
this.waitingForFilesystemRefresh=false;
}
catch(ex){
jsExDebug("fileBrowserControl_showPublicFolderContents",ex);
}
}
function fileBrowserControl_addBackButton(){
try{
if(this.backDiv){
this.backDiv.style.left=this.nextItemLeft+"px";
this.backDiv.style.top=this.nextItemTop+"px";
this.controlElement.appendChild(this.backDiv);
}else{
var _5e=document.createElement("div");
_5e.style.position="absolute";
_5e.style.width=this.ITEM_DIV_WIDTH+"px";
_5e.style.height=this.ITEM_DIV_HEIGHT+"px";
_5e.style.left=this.nextItemLeft+"px";
_5e.style.top=this.nextItemTop+"px";
var _5f=new this.SYSTEM.Widget.Button("backBtn",this.BACK_IMG,null,this.BACK_BTN_WIDTH,this.BACK_BTN_HEIGHT,"Go Back","Go back to the folder list.");
_5f.setPosition(this.BACK_BTN_LEFT,0);
var _60=new this.SYSTEM.Delegate(this,this.backBtnClickEvent);
var _61=new this.SYSTEM.Delegate(this,this.backBtnHoverEvent);
var _62=new this.SYSTEM.Delegate(this,this.backBtnExitEvent);
_5f.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_60);
_5f.attach(_5e);
this.controlElement.appendChild(_5e);
this.backBtn=_5f;
this.backDiv=_5e;
}
this.nextItemLeft+=this.ITEM_DIV_WIDTH+this.ITEM_X_OFFSET;
if((this.nextItemLeft+this.ITEM_DIV_WIDTH+this.ITEM_X_OFFSET)>(this.width-this.SCROLLBAR_WIDTH)){
this.nextItemLeft=this.ITEM_X_OFFSET;
this.nextItemTop+=this.ITEM_DIV_HEIGHT+this.ITEM_Y_OFFSET;
}
}
catch(ex){
jsExDebug("fileBrowserControl_addBackButton",ex);
}
}
function fileBrowserControl_hideBackButton(){
try{
if(this.backDiv){
this.controlElement.removeChild(this.backDiv);
}
}
catch(ex){
jsExDebug("fileBrowserControl_hideBackButton",ex);
}
}
function fileBrowserControl_controlClickEvent(_63,me){
try{
if(me.selectedFileWidget){
me.selectedFileWidget.toggleState();
if(me.selectedFileWidget.getValue().fileType==me.SYSTEM.Filesystem.File.TYPE_IMAGE){
me.toggleAvatarButton(me.selectedFileWidget,false);
}
me.selectedFileWidget=null;
}else{
if(me.selectedFolderWidget&&!me.openedFolder){
me.selectedFolderWidget.toggleState();
me.selectedFolderWidget=null;
me.selectedFolder=null;
}
}
me.fireEvent(me.CONTROL_CLICK_EVENT,_63);
}
catch(ex){
jsExDebug("fileBrowserControl_controlClickEvent",ex);
}
}
function fileBrowserControl_fileClickEvent(_65,_66){
try{
if(this.selectedFileWidget){
if(this.selectedFileWidget.getValue().fileType==this.SYSTEM.Filesystem.File.TYPE_IMAGE){
this.toggleAvatarButton(this.selectedFileWidget,false);
}
this.selectedFileWidget.toggleState();
this.selectedFileWidget=null;
}
this.selectedFileWidget=_66;
_66.toggleState();
if(_66.getValue().fileType==this.SYSTEM.Filesystem.File.TYPE_IMAGE){
this.toggleAvatarButton(_66,true);
}
this.fireEvent(this.FILE_SELECT_EVENT,_65);
}
catch(ex){
jsExDebug("fileBrowserControl_fileClickEvent",ex);
}
}
function fileBrowserControl_fileExitEvent(_67,_68){
try{
}
catch(ex){
jsExDebug("fileBrowserControl_fileExitEvent",ex);
}
}
function fileBrowserControl_fileHoverEvent(_69,_6a){
try{
}
catch(ex){
jsExDebug("fileBrowserControl_fileHoverEvent",ex);
}
}
function fileBrowserControl_fileDblClickEvent(_6b,_6c){
try{
this.fireEvent(this.FILE_DBL_CLICK_EVENT,_6b);
}
catch(ex){
jsExDebug("fileBrowserControl_fileDblClickEvent",ex);
}
}
function fileBrowserControl_folderExitEvent(_6d,_6e){
try{
this.infoVisible=false;
this.hoverWidget=null;
}
catch(ex){
jsExDebug("fileBrowserControl_folderExitEvent",ex);
}
}
function fileBrowserControl_folderHoverEvent(_6f,_70){
try{
var _71=_70.getValue();
this.infoVisible=true;
this.hoverWidget=_70;
}
catch(ex){
jsExDebug("fileBrowserControl_folderHoverEvent",ex);
}
}
function fileBrowserControl_folderClickEvent(_72,_73){
try{
if(this.selectedFolderWidget){
this.selectedFolderWidget.toggleState();
this.selectedFolderWidget=null;
}
this.selectedFolder=_73.getValue();
this.selectedFolderWidget=_73;
_73.toggleState();
this.fireEvent(this.FOLDER_SELECT_EVENT,_72);
}
catch(ex){
jsExDebug("fileBrowserControl_folderClickEvent",ex);
}
}
function fileBrowserControl_openSelectedFolder(){
try{
this.clearItems();
this.addBackButton();
if(this.selectedFolder){
this.showFolderContents(this.selectedFolder.folderId,null);
this.openedFolder=this.selectedFolder;
}
}
catch(ex){
jsExDebug("fileBrowserControl_openSelectedFolder",ex);
}
}
function fileBrowserControl_openFolderWithId(_74){
try{
if(this.openFolder){
return;
}
if(this.itemBtnArray[_74]){
this.selectedFolder=this.itemBtnArray[_74].data;
this.openSelectedFolder();
}else{
}
}
catch(ex){
jsExDebug("fileBrowserControl_openSelectedFolder",ex);
}
}
function fileBrowserControl_toggleAvatarButton(_75,_76){
try{
if(_76){
_75.setBorder("solid 2px black");
_75.setPosition(_75.positionX-2,_75.positionY-2);
}else{
_75.setBorder("none");
_75.setPosition(_75.positionX+2,_75.positionY+2);
}
}
catch(ex){
jsExDebug("fileBrowserControl_toggleAvatarButton",ex);
}
}
function fileBrowserControl_searchForPublicFiles(_77){
function searchCallback(_78){
try{
if(_78){
for(var i=0;i<_78.length;i++){
var _7a=_78[i];
if(_7a.fileId){
if(this.fileTypeFilter&&_7a.fileType!=this.fileTypeFilter){
continue;
}
this.addFile(_7a);
}
}
}
}
catch(ex){
jsExDebug("fileBrowserControl_keyUpEvent: searchCallback",ex);
}
}
try{
this.SYSTEM.Filesystem.findPublicFiles(_77,new this.SYSTEM.Delegate(this,searchCallback));
}
catch(ex){
jsExDebug("fileBrowserControl_searchForPublicFiles",ex);
}
}
function fileBrowserControl_updateSearchPosition(){
try{
if(this.positionX==null&&this.positionY==null){
return;
}
var _7b=((this.controlElement.scrollWidth>this.controlElement.clientWidth)?20:0);
if(this.fromRight){
this.searchDiv.style.right=(this.positionX+this.width-this.SEARCH_DIV_WIDTH-1)+"px";
}else{
this.searchDiv.style.left=(this.positionX+1)+"px";
}
if(this.fromBottom){
this.searchDiv.style.bottom=(this.positionY+_7b-1)+"px";
}else{
this.searchDiv.style.top=(this.positionY+this.height-this.SEARCH_DIV_HEIGHT-_7b+1)+"px";
}
}
catch(ex){
jsExDebug("fileBrowserControl_updateSearchPosition",ex);
}
}
function fileBrowserControl_folderDblClickEvent(_7c,_7d){
try{
this.openSelectedFolder();
this.fireEvent(this.FOLDER_DBL_CLICK_EVENT,_7c);
}
catch(ex){
jsExDebug("fileBrowserControl_folderDblClickEvent",ex);
}
}
function fileBrowserControl_backBtnClickEvent(_7e,_7f){
try{
this.clearItems();
this.hideBackButton();
this.listFolders();
this.selectedFolder=null;
this.openedFolder=null;
this.fireEvent(this.BACK_BTN_CLICK_EVENT,_7e);
}
catch(ex){
jsExDebug("fileBrowserControl_backBtnClickEvent",ex);
}
}
function fileBrowserControl_keyPressEvent(key,me){
try{
if(key.which==13&&me.searchDiv.style.display=="block"&&me.searchText.hasFocus()){
me.clearItems();
me.addBackButton();
me.searchForPublicFiles(me.searchText.getContent());
}
}
catch(ex){
jsExDebug("fileBrowserControl_keyPressEvent",ex);
}
}

try{
widgetNotifier_t.prototype=new widget_t();
widgetNotifier_t.prototype.constructor=widgetNotifier_t;
widgetNotifier_t.prototype.cleanUp=widgetNotifier_cleanUp;
widgetNotifier_t.prototype.widgetNotifier_super=widget_t.prototype.constructor;
widgetNotifier_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetNotifier_t.prototype.createDom=widgetNotifier_createDom;
widgetNotifier_t.prototype.bindEvents=widgetNotifier_bindEvents;
widgetNotifier_t.prototype.addNotification=widgetNotifier_addNotification;
widgetNotifier_t.prototype.isLocked=widgetNotifier_isLocked;
widgetNotifier_t.prototype.hideFullView=widgetNotifier_hideFullView;
widgetNotifier_t.prototype.showFullView=widgetNotifier_showFullView;
widgetNotifier_t.prototype.displayNotification=widgetNotifier_displayNotification;
widgetNotifier_t.prototype.markAsRead=widgetNotifier_markAsRead;
widgetNotifier_t.prototype.showLastUnread=widgetNotifier_showLastUnread;
widgetNotifier_t.prototype.displayCounts=widgetNotifier_displayCounts;
widgetNotifier_t.prototype.showCurrentPosition=widgetNotifier_showCurrentPosition;
widgetNotifier_t.prototype.getDateDiffString=widgetNotifier_getDateDiffString;
widgetNotifier_t.prototype.getActionLinkText=widgetNotifier_getActionLinkText;
widgetNotifier_t.prototype.closeTimerCallback=widgetNotifier_closeTimerCallback;
widgetNotifier_t.prototype.showBtnEnterEvent=widgetNotifier_showBtnEnterEvent;
widgetNotifier_t.prototype.closeBtnClickEvent=widgetNotifier_closeBtnClickEvent;
widgetNotifier_t.prototype.rightBtnClickEvent=widgetNotifier_rightBtnClickEvent;
widgetNotifier_t.prototype.leftBtnClickEvent=widgetNotifier_leftBtnClickEvent;
widgetNotifier_t.prototype.lockBtnClickEvent=widgetNotifier_lockBtnClickEvent;
widgetNotifier_t.prototype.summaryMouseOutEvent=widgetNotifier_summaryMouseOutEvent;
widgetNotifier_t.prototype.mouseOverEvent=widgetNotifier_mouseOverEvent;
widgetNotifier_t.prototype.mouseOutEvent=widgetNotifier_mouseOutEvent;
widgetNotifier_t.prototype.lockBtnMouseOutEvent=widgetNotifier_lockBtnMouseOutEvent;
widgetNotifier_t.prototype.timeLabelEnterEvent=widgetNotifier_timeLabelEnterEvent;
widgetNotifier_t.prototype.timeLabelExitEvent=widgetNotifier_timeLabelExitEvent;
widgetNotifier_t.prototype.actionLinkClickEvent=widgetNotifier_actionLinkClickEvent;
widgetNotifier_t.prototype.expandBtnClickEvent=widgetNotifier_expandBtnClickEvent;
widgetNotifier_t.prototype.HEIGHT=90;
widgetNotifier_t.prototype.MESSAGE_CHAR_LIMIT=154;
widgetNotifier_t.prototype.HIDDEN_DIV_WIDTH=20;
widgetNotifier_t.prototype.SUMMARY_DIV_WIDTH=60;
widgetNotifier_t.prototype.LOCK_BTN_WIDTH=15;
widgetNotifier_t.prototype.LOCK_BTN_HEIGHT=15;
widgetNotifier_t.prototype.LOCK_BTN_LEFT=43;
widgetNotifier_t.prototype.LOCK_BTN_TOP=2;
widgetNotifier_t.prototype.UNREAD_COUNT_LBL_LEFT=20;
widgetNotifier_t.prototype.UNREAD_COUNT_LBL_TOP=10;
widgetNotifier_t.prototype.UNREAD_COUNT_LBL_WIDTH=20;
widgetNotifier_t.prototype.UNREAD_COUNT_LBL_HEIGHT=40;
widgetNotifier_t.prototype.UNREAD_LBL_LEFT=10;
widgetNotifier_t.prototype.UNREAD_LBL_TOP=45;
widgetNotifier_t.prototype.READ_COUNT_LBL_LEFT=10;
widgetNotifier_t.prototype.READ_COUNT_LBL_TOP=65;
widgetNotifier_t.prototype.FULL_DIV_LEFT=61;
widgetNotifier_t.prototype.FULL_DIV_WIDTH=330;
widgetNotifier_t.prototype.ARROW_WIDTH=24;
widgetNotifier_t.prototype.ARROW_HEIGHT=12;
widgetNotifier_t.prototype.LEFT_BTN_LEFT=180;
widgetNotifier_t.prototype.RIGHT_BTN_LEFT=widgetNotifier_t.prototype.FULL_DIV_WIDTH-widgetNotifier_t.prototype.ARROW_WIDTH-10;
widgetNotifier_t.prototype.ARROW_TOP=widgetNotifier_t.prototype.HEIGHT-widgetNotifier_t.prototype.ARROW_HEIGHT-5;
widgetNotifier_t.prototype.TITLE_LBL_LEFT=10;
widgetNotifier_t.prototype.TITLE_LBL_TOP=5;
widgetNotifier_t.prototype.TIME_LBL_RIGHT=35;
widgetNotifier_t.prototype.TIME_LBL_TOP=5;
widgetNotifier_t.prototype.DESC_LBL_LEFT=10;
widgetNotifier_t.prototype.DESC_LBL_TOP=20;
widgetNotifier_t.prototype.DESC_LBL_WIDTH=widgetNotifier_t.prototype.FULL_DIV_WIDTH-40;
widgetNotifier_t.prototype.DESC_LBL_HEIGHT=widgetNotifier_t.prototype.HEIGHT-widgetNotifier_t.prototype.DESC_LBL_TOP-25;
widgetNotifier_t.prototype.CLOSE_BTN_WIDTH=20;
widgetNotifier_t.prototype.CLOSE_BTN_HEIGHT=20;
widgetNotifier_t.prototype.CLOSE_BTN_LEFT=widgetNotifier_t.prototype.FULL_DIV_WIDTH-widgetNotifier_t.prototype.CLOSE_BTN_WIDTH;
widgetNotifier_t.prototype.CLOSE_BTN_TOP=5;
widgetNotifier_t.prototype.POSITION_LBL_LEFT=235;
widgetNotifier_t.prototype.POSITION_LBL_TOP=widgetNotifier_t.prototype.ARROW_TOP-5;
widgetNotifier_t.prototype.END_IMG_LEFT=widgetNotifier_t.prototype.FULL_DIV_LEFT+widgetNotifier_t.prototype.FULL_DIV_WIDTH;
widgetNotifier_t.prototype.ACTION_LINK_LEFT=10;
widgetNotifier_t.prototype.ACTION_LINK_TOP=widgetNotifier_t.prototype.ARROW_TOP-3;
widgetNotifier_t.prototype.ACTION_LINK_WIDTH=165;
widgetNotifier_t.prototype.BORDER_STYLE="solid 1px rgb(20,22,117)";
widgetNotifier_t.prototype.SHOW_IMG="img/app/system/notifier/show";
widgetNotifier_t.prototype.LOCK_IMG="img/app/system/taskbar/lock";
widgetNotifier_t.prototype.LEFT_IMG="img/app/system/notifier/left";
widgetNotifier_t.prototype.RIGHT_IMG="img/app/system/notifier/right";
widgetNotifier_t.prototype.CLOSE_IMG="img/app/system/notifier/close";
widgetNotifier_t.prototype.SUMMARY_BG_IMG="url(img/app/system/taskbar/middle_vert.png)";
widgetNotifier_t.prototype.FULL_BG_IMG="url(img/app/system/notifier/full_bg.png)";
widgetNotifier_t.prototype.FULL_END_IMG="img/app/system/notifier/full_end.png";
widgetNotifier_t.prototype.DEFAULT_WIDTH=42;
widgetNotifier_t.prototype.DEFAULT_HEIGHT=32;
widgetNotifier_t.prototype.END_IMG="img/app/system/notifier/end.png";
widgetNotifier_t.prototype.EXPAND_BTN_IMG="img/app/system/notifier/expand";
widgetNotifier_t.prototype.CLOSE_BTN_RIGHT=5;
widgetNotifier_t.prototype.EXPAND_BTN_SIDE=16;
widgetNotifier_t.prototype.BACKGROUND_IMG="img/app/system/launcher/bar_bg.png";
widgetNotifier_t.prototype.ITEM_READ_COLOUR="rgb(100,100,100)";
widgetNotifier_t.prototype.ITEM_UNREAD_COLOUR="rgb(0,0,0)";
}
catch(ex){
jsExDebug("notifier_t.prototype",ex);
}
function widgetNotifier_t(_1,_2){
try{
this.widgetNotifier_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.stateFullView=true;
this.currentIndex=0;
this.items=[];
this.readCount=0;
this.unreadCount=0;
this.stateLocked=false;
this.closeTimer=new timer_t(new this.SYSTEM.Delegate(this,this.closeTimerCallback),null,null,10000);
if(!_2){
this.createDom();
this.bindEvents();
}
this.hideFullView();
}
catch(ex){
jsExDebug("widgetNotifier_t",ex);
}
}
function widgetNotifier_cleanUp(me){
try{
if(!me){
var me=this;
}
me.expandBtn.cleanUp();
me.unreadLabel.cleanUp();
me.expandBtn=null;
me.unreadLabel=null;
me.fullDiv=null;
me.titleLabel.cleanUp();
me.titleLabel=null;
me.timeLabel.cleanUp();
me.timeLabel=null;
me.timeDiv=null;
me.descriptionLabel=null;
me.leftBtn.cleanUp();
me.leftBtn=null;
me.rightBtn.cleanUp();
me.rightBtn=null;
me.closeBtn.cleanUp();
me.closeBtn=null;
me.positionLabel.cleanUp();
me.positionLabel=null;
me.endImage=null;
for(var i=0;i<me.items.length;i++){
if(me.items[i]){
me.items[i].title=null;
me.items[i].arrivalTime=null;
me.items[i].description=null;
me.items[i].read=null;
me.items[i].messageCode=null;
me.items[i].messageParams=null;
me.items[i]=null;
delete me.items[i];
}
}
me.items=null;
me.readCount=null;
me.unreadCount=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetNotifier_cleanUp",ex);
}
}
function widgetNotifier_createDom(){
try{
this.widgetElement.style.zIndex=TASK_MANAGER_ZINDEX;
var _5=this.SYSTEM.Dom.createDiv("absolute");
_5.style.width="100%";
_5.style.height="100%";
_5.style.backgroundColor="rgb(0,0,0)";
this.SYSTEM.Dom.setElementOpacity(_5,this.SYSTEM.Launcher.OPACITY);
this.widgetElement.appendChild(_5);
var _6=new this.SYSTEM.Widget.Button("expandBtn",this.EXPAND_BTN_IMG,null,this.EXPAND_BTN_SIDE,this.EXPAND_BTN_SIDE);
_6.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.expandBtnClickEvent));
_6.setPosition(5,8,true);
_6.attach(this.widgetElement);
this.expandBtn=_6;
var _7=new this.SYSTEM.Widget.Label("unreadLabel",this.unreadCount+"");
_7.setPosition(_6.positionX+_6.width+5,8,true);
_7.setDimensions(this.DEFAULT_WIDTH-_7.positionX);
_7.setColour("rgb(255,255,255)");
_7.setAlignment("right");
_7.attach(this.widgetElement);
this.unreadLabel=_7;
this.setDimensions(this.DEFAULT_WIDTH,this.DEFAULT_HEIGHT);
var _8=document.createElement("div");
_8.style.position="absolute";
_8.style.right="0px";
_8.style.bottom=this.height+"px";
_8.style.width=this.FULL_DIV_WIDTH+"px";
_8.style.height=this.HEIGHT+"px";
_8.style.border=this.BORDER_STYLE;
_8.style.backgroundImage=this.FULL_BG_IMG;
_8.style.backgroundRepeat="repeat-x";
this.widgetElement.appendChild(_8);
this.fullDiv=_8;
var _9=new this.SYSTEM.Widget.Label("titleLabel");
_9.setPosition(this.TITLE_LBL_LEFT,this.TITLE_LBL_TOP);
_9.attach(_8);
this.titleLabel=_9;
var _a=new this.SYSTEM.Widget.Label("timeLabel");
_a.setPosition(this.TIME_LBL_RIGHT,this.TIME_LBL_TOP,1);
_a.addEventHandler(this.SYSTEM.Event.MOUSE_ENTER_EVENT,new this.SYSTEM.Delegate(this,this.timeLabelEnterEvent));
_a.addEventHandler(this.SYSTEM.Event.MOUSE_EXIT_EVENT,new this.SYSTEM.Delegate(this,this.timeLabelExitEvent));
_a.attach(_8);
this.timeLabel=_a;
var _b=document.createElement("div");
_b.style.position="absolute";
_b.style.width="auto";
_b.style.height="20px";
_b.style.right=(this.TIME_LBL_RIGHT-5)+"px";
_b.style.top=(this.TIME_LBL_TOP-22)+"px";
_b.style.visibility="hidden";
_b.style.border="solid 1px black";
_b.style.backgroundColor=SYSTEM.Style.BLUE_TOOLGROUP_BG;
this.timeDiv=_b;
var _c=new this.SYSTEM.Widget.Label("descriptionLabel");
_c.setPosition(this.DESC_LBL_LEFT,this.DESC_LBL_TOP);
_c.setDimensions(this.DESC_LBL_WIDTH,this.DESC_LBL_HEIGHT);
_c.attach(_8);
this.descriptionLabel=_c;
var _d=new this.SYSTEM.Widget.Link("actionLink",null,this.ACTION_LINK_WIDTH);
_d.setPosition(this.ACTION_LINK_LEFT,this.ACTION_LINK_TOP);
_d.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.actionLinkClickEvent));
_d.attach(_8);
this.actionLink=_d;
var _e=new this.SYSTEM.Widget.Button("leftBtn",this.LEFT_IMG,button_t.prototype.HOVER_IMAGE|button_t.prototype.ON_IMAGE,this.ARROW_WIDTH,this.ARROW_HEIGHT);
_e.setPosition(this.LEFT_BTN_LEFT,this.ARROW_TOP);
_e.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.leftBtnClickEvent));
_e.attach(_8);
_e.imageElement.dontHide=true;
_e.hide();
this.leftBtn=_e;
var _f=new this.SYSTEM.Widget.Button("rightBtn",this.RIGHT_IMG,button_t.prototype.HOVER_IMAGE|button_t.prototype.ON_IMAGE,this.ARROW_WIDTH,this.ARROW_HEIGHT);
_f.setPosition(this.RIGHT_BTN_LEFT,this.ARROW_TOP);
_f.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.rightBtnClickEvent));
_f.attach(_8);
_f.imageElement.dontHide=true;
_f.hide();
this.rightBtn=_f;
var _10=new this.SYSTEM.Widget.Button("closeBtn",this.CLOSE_IMG,button_t.prototype.HOVER_IMAGE,this.CLOSE_BTN_WIDTH,this.CLOSE_BTN_HEIGHT);
_10.setPosition(this.CLOSE_BTN_RIGHT,this.CLOSE_BTN_TOP,true);
_10.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.closeBtnClickEvent));
_10.attach(_8);
_10.imageElement.dontHide=true;
this.closeBtn=_10;
var _11=new this.SYSTEM.Widget.Label("positionLabel");
_11.setPosition(this.POSITION_LBL_LEFT,this.POSITION_LBL_TOP);
_11.attach(_8);
this.positionLabel=_11;
var _12=document.createElement("img");
_12.style.position="absolute";
_12.style.right=(this.FULL_DIV_WIDTH-1)+"px";
_12.style.bottom=this.height+"px";
_12.src=this.END_IMG;
this.widgetElement.appendChild(_12);
this.endImage=_12;
_8.appendChild(_b);
}
catch(ex){
jsExDebug("widgetNotifier_createDom",ex);
}
}
function widgetNotifier_bindEvents(){
try{
}
catch(ex){
jsExDebug("widgetNotifier_bindEvents",ex);
}
}
function widgetNotifier_addNotification(_13,_14,_15,_16,_17){
try{
if(!this.SYSTEM.Settings.checkInternalNotificationValidity(_16)){
return false;
}
var _18={title:_13,arrivalTime:_14,description:_15,read:false,messageCode:_16,messageParams:_17};
var _19=this.items.push(_18)-1;
this.unreadCount++;
if(this.stateFullView){
this.rightBtn.show();
}
this.showCurrentPosition();
return true;
}
catch(ex){
jsExDebug("widgetNotifier_addNotification",ex);
}
}
function widgetNotifier_isLocked(){
try{
return this.stateLocked;
}
catch(ex){
jsExDebug("widgetNotifier_isLocked",ex);
}
}
function widgetNotifier_hideFullView(){
try{
if(this.stateFullView){
this.fullDiv.style.visibility="hidden";
this.endImage.style.visibility="hidden";
this.rightBtn.hide();
this.leftBtn.hide();
this.stateFullView=false;
}
}
catch(ex){
jsExDebug("widgetNotifier_hideFullView",ex);
}
}
function widgetNotifier_showFullView(){
try{
if(!this.stateFullView){
this.fullDiv.style.visibility="visible";
this.endImage.style.visibility="visible";
this.stateFullView=true;
}
}
catch(ex){
jsExDebug("widgetNotifier_showFullView",ex);
}
}
function widgetNotifier_displayNotification(_1a){
try{
var _1b=this.items[_1a];
this.showFullView();
this.closeTimer.setInterval(this.closeTimer.interval);
if(!this.closeTimer.isRunning){
this.closeTimer.start();
}
if(_1b){
this.titleLabel.setText(_1b.title);
if(_1b.read){
this.titleLabel.setColour(this.ITEM_READ_COLOUR);
this.descriptionLabel.setColour(this.ITEM_READ_COLOUR);
this.timeLabel.setColour(this.ITEM_READ_COLOUR);
this.actionLink.setColour(this.ITEM_READ_COLOUR);
}else{
this.titleLabel.setColour(this.ITEM_UNREAD_COLOUR);
this.descriptionLabel.setColour(this.ITEM_UNREAD_COLOUR);
this.timeLabel.setColour(this.ITEM_UNREAD_COLOUR);
this.actionLink.setColour("");
}
this.timeLabel.setText(this.getDateDiffString(_1b.arrivalTime));
this.descriptionLabel.setText(_1b.description);
this.currentIndex=_1a;
var _1c=new Date(parseInt(_1b.arrivalTime)*1000);
this.timeDiv.innerHTML="&nbsp;@ "+_1c.toLocaleString()+"&nbsp;";
this.actionLink.setText(this.getActionLinkText(_1b.messageCode));
this.actionLink.setValue({messageCode:_1b.messageCode,messageParams:_1b.messageParams});
if(_1a>0){
this.leftBtn.show();
}else{
this.leftBtn.hide();
}
if(_1a<(this.items.length-1)){
this.rightBtn.show();
}else{
this.rightBtn.hide();
}
if(!_1b.read){
this.markAsRead(_1a);
}
this.showCurrentPosition();
}
}
catch(ex){
jsExDebug("widgetNotifier_displayNotification",ex);
}
}
function widgetNotifier_markAsRead(_1d){
try{
if(!this.items[_1d]){
return;
}
this.items[_1d].read=true;
this.readCount++;
this.unreadCount=((this.unreadCount-1>0)?this.unreadCount-1:0);
this.displayCounts();
}
catch(ex){
jsExDebug("widgetNotifier_markAsRead",ex);
}
}
function widgetNotifier_showLastUnread(){
try{
var _1e=null;
for(var i=0;i<this.items.length;i++){
if(!this.items[i].read){
_1e=i;
}
}
if(_1e!=null){
this.displayNotification(this.items.length-1);
}
}
catch(ex){
jsExDebug("widgetNotifier_showLastUnread",ex);
}
}
function widgetNotifier_displayCounts(){
try{
this.unreadLabel.setText(this.unreadCount);
this.SYSTEM.Launcher.updateUnreadNotifications(this.unreadCount);
}
catch(ex){
jsExDebug("widgetNotifier_displayCounts",ex);
}
}
function widgetNotifier_showCurrentPosition(){
try{
var str=(this.currentIndex+1)+" of "+this.items.length;
var _21=str.length;
switch(_21){
case 6:
this.positionLabel.setPosition(this.POSITION_LBL_LEFT);
break;
case 7:
this.positionLabel.setPosition(this.POSITION_LBL_LEFT-3);
break;
case 8:
this.positionLabel.setPosition(this.POSITION_LBL_LEFT-6);
break;
case 9:
this.positionLabel.setPosition(this.POSITION_LBL_LEFT-9);
break;
case 10:
this.positionLabel.setPosition(this.POSITION_LBL_LEFT-12);
break;
}
this.positionLabel.setText(str);
}
catch(ex){
jsExDebug("widgetNotifier_showCurrentPosition",ex);
}
}
function widgetNotifier_getDateDiffString(_22){
try{
var _23=1;
var _24=60;
var _25=3600;
var DAY=86400;
var _27=604800;
var _28=0;
var _29="";
var d=new Date(parseFloat(_22)*1000);
var d=new Date(d.getTime()-(d.getTimezoneOffset()*60000));
var _2b=Math.round(d.getTime()/1000);
var _2c=new Date();
_2c=Math.round(_2c.getTime()/1000);
if(_2b>_2c){
_28=_2b-_2c;
}else{
_28=_2c-_2b;
}
if(_28==0){
return "0 seconds";
}
var _2d=Math.floor(_28/_27);
_28=Math.floor(_28-(_27*_2d));
var _2e=Math.floor(_28/DAY);
_28=Math.floor(_28-(DAY*_2e));
var _2f=Math.floor(_28/_25);
_28=Math.floor(_28-(_25*_2f));
var _30=Math.floor(_28/_24);
_28=Math.floor(_28-(_24*_30));
var _31=Math.floor(_28/_23);
_28=Math.floor(_28-(_23*_31));
if(_2d){
_29=_2d+(_2d>1?" wks":" wk");
if(_2e){
_29+=" "+_2e+(_2e>1?" days":" day");
}
return _29+" ago";
}
if(_2e){
_29+=_2e+(_2e>1?" days":" day");
if(_2f){
_29+=" "+_2f+(_2f>1?" hrs":" hr");
}
return _29+" ago";
}
if(_2f){
_29+=_2f+(_2f>1?" hrs":" hr");
if(_30){
_29+=" "+_30+(_30>1?" mins":" min");
}
return _29+" ago";
}
if(_30){
_29+=_30+(_30>1?" mins":" min");
if(_31){
_29+=" "+_31+(_31>1?" secs":" sec");
}
return _29+" ago";
}
if(_31){
_29+=_31+(_31>1?" secs":" sec");
}
return _29+" ago";
}
catch(ex){
jsExDebug("widgetNotifier_getTimeDiffString",ex);
}
}
function widgetNotifier_getActionLinkText(_32){
try{
switch(parseInt(_32)){
case this.SYSTEM.Notifier.CONTACTS_REJECT:
case this.SYSTEM.Notifier.CONTACTS_BLOCK:
case this.SYSTEM.Notifier.CONTACTS_REMOVE:
return "";
case this.SYSTEM.Notifier.CONTACTS_REQUEST:
return "Accept request";
break;
case this.SYSTEM.Notifier.CONTACTS_ACCEPT:
case this.SYSTEM.Notifier.CONTACTS_UNBLOCK:
return "Open ContactManager";
case this.SYSTEM.Notifier.SHARING_UNSHARED_FILE:
return "";
case this.SYSTEM.Notifier.SHARING_SHARED_R_FILE:
case this.SYSTEM.Notifier.SHARING_SHARED_RW_FILE:
case this.SYSTEM.Notifier.COLLAB_OPENED_FILE:
case this.SYSTEM.Notifier.COLLAB_CLOSED_FILE:
case this.SYSTEM.Notifier.COLLAB_SAVED_FILE:
case this.SYSTEM.Notifier.COLLAB_TAKEN_WRITE:
case this.SYSTEM.Notifier.COLLAB_RELEASE_WRITE:
return "Open the file";
case this.SYSTEM.Notifier.PP_INFO:
case this.SYSTEM.Notifier.PP_NEW_VERSION:
return "Click to download";
}
return "";
}
catch(ex){
jsExDebug("widgetNotifier_getActionLinkText",ex);
}
}
function widgetNotifier_closeTimerCallback(){
try{
if(this.stateFullView){
this.hideFullView();
}
this.closeTimer.stop();
}
catch(ex){
jsExDebug("widgetNotifier_closeTimerCallback",ex);
}
}
function widgetNotifier_showBtnEnterEvent(_33,_34){
try{
this.showLastUnread();
}
catch(ex){
jsExDebug("widgetNotifier_showBtnEnterEvent",ex);
}
}
function widgetNotifier_closeBtnClickEvent(_35,_36){
try{
this.hideFullView();
}
catch(ex){
jsExDebug("widgetNotifier_closeBtnClickEvent",ex);
}
}
function widgetNotifier_rightBtnClickEvent(_37,_38){
try{
this.displayNotification(this.currentIndex+1);
}
catch(ex){
jsExDebug("widgetNotifier_rightBtnClickEvent",ex);
}
}
function widgetNotifier_leftBtnClickEvent(_39,_3a){
try{
this.displayNotification(this.currentIndex-1);
}
catch(ex){
jsExDebug("widgetNotifier_leftBtnClickEvent",ex);
}
}
function widgetNotifier_lockBtnClickEvent(_3b,_3c){
try{
_3c.toggleState();
switch(_3c.buttonState){
case _3c.ON_STATE:
this.stateLocked=true;
break;
case _3c.OFF_STATE:
this.stateLocked=false;
break;
}
}
catch(ex){
jsExDebug("widgetNotifier_lockBtnClickEvent",ex);
}
}
function widgetNotifier_summaryMouseOutEvent(_3d,me){
try{
var _3f=false;
var _40=null;
if(me.SYSTEM.Environment.userAgentIsIE()){
if(_3d.toElement!=document.body){
_40=_3d.toElement;
}else{
_40=_3d.toElement;
_40.dontHide=true;
}
}else{
_40=_3d.relatedTarget;
}
if(_40){
if(!_40.dontHide){
_3f=true;
}
}else{
_3f=true;
}
}
catch(ex){
jsExDebug("widgetNotifier_summaryMouseOutEvent",ex);
}
}
function widgetNotifier_mouseOverEvent(_41,me){
try{
if(me.stateFullView&&!me.stateOnTop){
me.widgetElement.style.zIndex=NOTIFIER_ONTOP_ZINDEX;
me.stateOnTop=true;
}
}
catch(ex){
jsExDebug("widgetNotifier_mouseOverEvent",ex);
}
}
function widgetNotifier_mouseOutEvent(_43,me){
try{
var _45=null;
if(me.SYSTEM.Environment.userAgentIsIE()){
if(_43.toElement!=document.body){
_45=_43.toElement;
}else{
_45=_43.toElement;
}
}else{
_45=_43.relatedTarget;
}
if(me.stateFullView&&(_45!=me.closeBtn.imageElement)&&(_45!=me.lockBtn.imageElement)&&(_45!=me.leftBtn.imageElement)&&(_45!=me.rightBtn.imageElement)&&(_45!=me.fullDiv)&&(_45!=me.timeDiv)&&(_45!=me.descriptionLabel.widgetElement)){
me.widgetElement.style.zIndex=1;
me.stateOnTop=false;
}
}
catch(ex){
jsExDebug("widgetNotifier_mouseOutEvent",ex);
}
}
function widgetNotifier_lockBtnMouseOutEvent(_46,me){
try{
me.summaryMouseOutEvent(_46,me);
}
catch(ex){
jsExDebug("widgetNotifier_lockBtnMouseOutEvent",ex);
}
}
function widgetNotifier_timeLabelEnterEvent(_48,_49){
try{
this.timeDiv.style.visibility="visible";
}
catch(ex){
jsExDebug("widgetNotifier_timeLabelEnterEvent",ex);
}
}
function widgetNotifier_timeLabelExitEvent(_4a,_4b){
try{
this.timeDiv.style.visibility="hidden";
}
catch(ex){
jsExDebug("widgetNotifier_timeLabelExitEvent",ex);
}
}
function widgetNotifier_actionLinkClickEvent(_4c,_4d){
function openFile(){
switch(_4e){
case me.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET,_50);
break;
case me.SYSTEM.Filesystem.File.TYPE_WRITER:
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WRITER,_50);
break;
default:
this.SYSTEM.Tooltip.hideLoading();
}
}
try{
var _51=_4d.getValue();
var _50=null;
var _4e=null;
var me=null;
switch(parseInt(_51.messageCode)){
case this.SYSTEM.Notifier.CONTACTS_REJECT:
case this.SYSTEM.Notifier.CONTACTS_BLOCK:
case this.SYSTEM.Notifier.CONTACTS_REMOVE:
return;
case this.SYSTEM.Notifier.CONTACTS_REQUEST:
var d=new this.SYSTEM.Dialogue.AcceptRequest(null,[_51.messageParams]);
break;
case this.SYSTEM.Notifier.CONTACTS_ACCEPT:
case this.SYSTEM.Notifier.CONTACTS_UNBLOCK:
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_CONTACT_MANAGER);
break;
case this.SYSTEM.Notifier.SHARING_UNSHARED_FILE:
return;
case this.SYSTEM.Notifier.SHARING_SHARED_R_FILE:
case this.SYSTEM.Notifier.SHARING_SHARED_RW_FILE:
case this.SYSTEM.Notifier.COLLAB_OPENED_FILE:
case this.SYSTEM.Notifier.COLLAB_CLOSED_FILE:
case this.SYSTEM.Notifier.COLLAB_SAVED_FILE:
case this.SYSTEM.Notifier.COLLAB_TAKEN_WRITE:
case this.SYSTEM.Notifier.COLLAB_GIVEN_WRITE:
case this.SYSTEM.Notifier.COLLAB_REQUEST_WRITE:
case this.SYSTEM.Notifier.COLLAB_RELEASE_WRITE:
_50=parseInt(_51.messageParams);
_4e=parseInt(this.SYSTEM.Filesystem.getFileTypeFromId(_50));
me=this;
if(_4e){
this.SYSTEM.Tooltip.showLoading(openFile,"Peepel","Opening file...");
}
break;
case this.SYSTEM.Notifier.PP_INFO:
case this.SYSTEM.Notifier.PP_NEW_VERSION:
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_BROWSER,this.SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php"));
break;
}
}
catch(ex){
jsExDebug("widgetNotifier_actionLinkClickEvent",ex);
}
}
function widgetNotifier_expandBtnClickEvent(){
try{
if(this.items.length){
this.displayNotification(this.items.length-1);
}
}
catch(ex){
jsExDebug("widgetNotifier_expandBtnClickEvent",ex);
}
}

try{
widgetSortTable_t.prototype=new widgetTable_t;
widgetSortTable_t.prototype.constructor=widgetSortTable_t;
widgetSortTable_t.prototype.cleanUp=widgetSortTable_cleanUp;
widgetSortTable_t.prototype.widgetSortTable_super=widgetTable_t.prototype.constructor;
widgetSortTable_t.prototype.widgetScrollTable_cleanUp=widgetTable_t.prototype.cleanUp;
widgetSortTable_t.prototype.widgetScrollTable_createDom=widgetTable_t.prototype.createDom;
widgetSortTable_t.prototype.createDom=widgetSortTable_createDom;
widgetSortTable_t.prototype.addRow=widgetSortTable_addRow;
widgetSortTable_t.prototype.refresh=widgetSortTable_refresh;
widgetSortTable_t.prototype.addWidgetToRow=widgetSortTable_addWidgetToRow;
widgetSortTable_t.prototype.getRowData=widgetSortTable_getRowData;
widgetSortTable_t.prototype.scrollUp=widgetSortTable_scrollUp;
widgetSortTable_t.prototype.scrollDown=widgetSortTable_scrollDown;
widgetSortTable_t.prototype.refitTable=widgetSortTable_refitTable;
widgetSortTable_t.prototype.setCellPadding=widgetSortTable_setCellPadding;
widgetSortTable_t.prototype.sortByHeading=widgetSortTable_sortByHeading;
widgetSortTable_t.prototype.sortListAsc=widgetSortTable_sortListAsc;
widgetSortTable_t.prototype.sortListDesc=widgetSortTable_sortListDesc;
widgetSortTable_t.prototype.bindWidgetEvent=widgetSortTable_bindWidgetEvent;
widgetSortTable_t.prototype.fireEvent=widgetSortTable_fireEvent;
widgetSortTable_t.prototype.translateDisplayToData=widgetSortTable_translateDisplayToData;
widgetSortTable_t.prototype.headingClickEvent=widgetSortTable_headingClickEvent;
widgetSortTable_t.prototype.DEFAULT_COL_WIDTH=70;
widgetSortTable_t.prototype.DEFAULT_ROW_HEIGHT=24;
widgetSortTable_t.prototype.HIDDEN_CELL_BUFFER=1;
widgetSortTable_t.prototype.DIR_ASCENDING=1;
widgetSortTable_t.prototype.DIR_DESCENDING=2;
widgetSortTable_t.prototype.DIR_UNSORTED=3;
widgetSortTable_t.prototype.ASC_IMAGE="img/app/system/icons/small/sort_asc_off.png";
widgetSortTable_t.prototype.DESC_IMAGE="img/app/system/icons/small/sort_desc_off.png";
widgetSortTable_t.prototype.INNER_WIDGET_EVENT=1;
}
catch(ex){
jsExDebug("widgetSortTable_t.prototype",ex);
}
function widgetSortTable_t(_1,_2,_3,_4){
try{
this.widgetSortTable_super(_1,null,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.rowData=[];
this.rowData[0]={data:null,values:[],widgets:[]};
this.headings=_2;
this.scrollX=0;
this.scrollY=0;
this.sortData=[];
this.sortDirection=[];
this.sortColumn=null;
this.sortColumnImage=null;
if(!_4){
this.createDom(_2,_3);
}
}
catch(ex){
jsExDebug("widgetSortTable_t",ex);
}
}
function widgetSortTable_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var x=0;x<me.table.rowArray[0].cells.length;x++){
if(me.table.rowArray[0].cells[x]&&me.table.rowArray[0].cells[x].textAndSortDom){
me.SYSTEM.Event.detachEvent(me.table.rowArray[0].cells[x].textAndSortDom,"onclick","click");
me.table.rowArray[0].cells[x].textAndSortDom=null;
me.table.rowArray[0].cells[x].sortImage=null;
}
}
for(var i=0;i<me.rowData.length;i++){
var _8=me.rowData[i];
if(_8){
for(var j=0;j<_8.values.length;j++){
me.rowData[i].values[j]=null;
}
for(j=0;j<_8.widgets.length;j++){
me.rowData[i].widgets[j].cleanUp();
me.rowData[i].widgets[j]=null;
}
me.rowData[i].data=null;
me.rowData[i]=null;
delete me.rowData[i];
}
}
me.rowData=null;
for(var _a in me.sortData){
var _b=me.sortData[_a];
if(_b){
for(i=0;i<_b.length;i++){
me.sortData[_a][i].dataIndex=null;
me.sortData[_a][i].value=null;
me.sortData[_a][i]=null;
delete me.sortData[_a][i];
}
}
me.sortData[_a]=null;
delete me.sortData[_a];
}
me.sortData=null;
for(_a in me.sortDirection){
me.sortDirection[_a]=null;
delete me.sortDirection[_a];
}
me.sortDirection=null;
me.headings=null;
me.scrollX=null;
me.scrollY=null;
me.cellPaddingLeft=null;
me.cellPaddingRight=null;
me.cellPaddingTop=null;
me.cellPaddingBottom=null;
me.cellPaddingString=null;
me.sortColumn=null;
me.sortColumnImage=null;
me.widgetScrollTable_cleanUp();
}
catch(ex){
jsExDebug("widgetSortTable_cleanUp",ex);
}
}
function widgetSortTable_createDom(_c,_d){
try{
var _e=_c.length*this.DEFAULT_COL_WIDTH;
this.widgetScrollTable_createDom(_e,_d);
for(var y=1;y<this.table.rowArray.length;y++){
var _10=this.table.rowArray[y].cells[0].cellDom;
if(!this.SYSTEM.Environment.userAgentIsIE()){
_10.vAlign="";
_10.style.textAlign="";
}
_10.style.color="";
_10.style.backgroundColor="";
_10.style.fontSize="";
_10.style.paddingLeft="";
_10.style.paddingRight="";
_10.style.paddingBottom="";
}
for(var x=0;x<this.table.rowArray[0].cells.length;x++){
var _12=this.table.rowArray[0].cells[x];
if(x==0){
this.addColumnResizeControl(0,0);
_12.cellDom.style.backgroundColor=this.HEADING_DEFAULT_COLOUR;
_12.cellDom.style.color=this.HEADING_TEXT_COLOUR;
}
if(_c[x]){
_12.cellDom.style.textAlign="center";
var _13=document.createElement("div");
_13.style.position="relative";
_13.style.width="100%";
_13.style.height="100%";
if(document.all){
_12.resizeDom.style.styleFloat="";
}else{
_12.resizeDom.style.cssFloat="";
}
_12.resizeDom.style.position="absolute";
_12.resizeDom.style.right="0px";
_12.resizeDom.style.top="0px";
_12.cellDom.removeChild(_12.resizeDom);
_13.appendChild(_12.resizeDom);
var _14=document.createElement("div");
_14.style.cursor="pointer";
var _15=document.createElement("div");
_15.innerHTML=_c[x];
if(document.all){
_15.style.styleFloat="left";
}else{
_15.style.cssFloat="left";
}
_15.style.paddingLeft="5px";
_14.appendChild(_15);
_14.innerHTML+="&nbsp;&nbsp;";
var _16=document.createElement("img");
_16.style.visibility="hidden";
_14.appendChild(_16);
_13.appendChild(_14);
_12.cellDom.appendChild(_13);
this.SYSTEM.Event.attachEvent(_14,"onclick","click",this.headingClickEvent,this,false,x);
_12.textAndSortDom=_14;
_12.sortImage=_16;
}
}
}
catch(ex){
jsExDebug("widgetSortTable_createDom",ex);
}
}
function widgetSortTable_addRow(){
try{
if(!arguments.length){
return;
}
var _17={};
_17.data=arguments[0];
_17.values=[];
_17.widgets=[];
var _18=this.rowData.length;
var _19=null;
var _1a=null;
var _1b=null;
for(var i=1;i<arguments.length;i++){
if(arguments[i]){
_19=parseInt(i)-1;
_1a=this.headings[_19];
_1b=arguments[i];
_17.values[_1a]=_1b;
if(!this.sortData[_1a]){
this.sortData[_1a]=[];
this.sortData[_1a]=this.sortData[_1a];
this.sortDirection[_1a]=this.DIR_UNSORTED;
}
this.sortData[_1a].push({dataIndex:_18,value:_1b});
}
}
this.rowData[_18]=_17;
return _18;
}
catch(ex){
jsExDebug("widgetSortTable_addRow",ex);
}
}
function widgetSortTable_refresh(){
try{
var _1d=null;
var _1e=null;
var _1f=null;
var _20=null;
var _21=null;
var _22=null;
var _23=1;
var _24=this.sortData[this.sortColumn];
if(!_24){
return;
}
var _25=this.rowData;
for(var _26=0;_26<_25.length;_26++){
var _27=_25[_26].widgets;
for(var _28 in _27){
if(_27[_28]){
_27[_28].detach();
}
}
}
for(i=0;i<_24.length;i++){
var _29=_24[i].dataIndex;
if(i<this.scrollY){
continue;
}
if(_23==this.tableRowCount){
break;
}
_22=this.table.rowArray[_23].cells;
if(this.rowData[_29]!=null){
for(var _2a=0;_2a<_22.length;_2a++){
_1f=_22[_2a];
_1d=this.headings[_2a];
_20=this.rowData[_29].values[_1d];
_21=this.rowData[_29].widgets[_1d];
if(_20){
_1f.cellDom.innerHTML=_20;
_1f.cellDom.style.whiteSpace="nowrap";
_1f.cellDom.style.color="#000000";
_1f.cellDom.style.fontWeight="normal";
}else{
if(_21){
_21.attach(_1f.cellDom);
}
}
if(this.cellPaddingString){
_1f.cellDom.style.padding=this.cellPaddingString;
}
}
}else{
for(var _2a=0;_2a<_22.length;_2a++){
_22[_2a].cellDom.innerHTML="";
}
}
_23++;
}
while(_23<this.tableRowCount){
_22=this.table.rowArray[_23].cells;
for(var _2a=0;_2a<_22.length;_2a++){
_22[_2a].cellDom.innerHTML="";
}
_23++;
}
}
catch(ex){
jsExDebug("widgetSortTable_refresh",ex);
}
}
function widgetSortTable_addWidgetToRow(_2b,_2c,_2d){
try{
if(_2b==null||_2c==null){
return;
}
if(this.rowData[_2b].values[_2c]){
this.rowData[_2b].values[_2c]=null;
}
this.rowData[_2b].widgets[_2c]=_2d;
if(_2d.DEFAULT_EVENT){
var _2e=this.bindWidgetEvent(_2d.DEFAULT_EVENT);
_2d.notifyEvent(_2d.DEFAULT_EVENT,_2e);
}
if(_2d.SUPPORTED_EVENTS){
for(var i=0;i<_2d.SUPPORTED_EVENTS.length;i++){
var _30=this.bindWidgetEvent(_2d.SUPPORTED_EVENTS[i]);
_2d.notifyEvent(_2d.SUPPORTED_EVENTS[i],_30);
}
}
}
catch(ex){
jsExDebug("widgetSortTable_addWidgetToRow",ex);
}
}
function widgetSortTable_getRowData(_31){
try{
if(this.rowData[_31]){
return this.rowData[_31].data;
}else{
return null;
}
}
catch(ex){
jsExDebug("widgetSortTable_getRowData",ex);
}
}
function widgetSortTable_scrollUp(){
try{
if(this.scrollY==0){
return;
}
this.scrollY--;
this.refresh();
}
catch(ex){
jsExDebug("widgetSortTable_scrollUp",ex);
}
}
function widgetSortTable_scrollDown(){
try{
var _32=this.rowData.length-(this.tableRowCount-1);
if(this.scrollY>=(_32+2)){
return;
}
this.scrollY++;
this.refresh();
}
catch(ex){
jsExDebug("widgetSortTable_scrollDown",ex);
}
}
function widgetSortTable_refitTable(){
try{
var _33=Math.round((this.height/this.DEFAULT_ROW_HEIGHT)-this.tableRowCount);
var _34=Math.round((this.width/this.DEFAULT_CELL_WIDTH)-this.tableColumnCount);
if(_33>=0){
for(var i=0;i<_33;i++){
this.appendRow();
var row=this.tableRowCount-1;
var _37=this.table.rowArray[row].cells[0].cellDom;
_37.style.color="";
_37.style.backgroundColor="";
_37.style.fontSize="";
_37.style.paddingLeft="";
_37.style.paddingRight="";
_37.style.paddingBottom="";
if(!this.SYSTEM.Environment.userAgentIsIE()){
_37.style.textAlign="";
_37.vAlign="";
}
}
}else{
this.removeRowsAfter(this.tableRowCount-(_33*-1));
}
if(_34>=0){
for(i=0;i<_34;i++){
this.appendColumn();
}
}else{
this.removeColumnsAfter(this.tableColumnCount-(_34*-1));
}
}
catch(ex){
jsExDebug("widgetSortTable_refitTable",ex);
}
}
function widgetSortTable_setCellPadding(_38,_39,top,_3b){
try{
this.cellPaddingLeft=(_38?_38:0);
this.cellPaddingRight=(_39?_39:0);
this.cellPaddingTop=(top?top:0);
this.cellPaddingBottom=(_3b?_3b:0);
this.cellPaddingString=this.cellPaddingTop+"px "+this.cellPaddingRight+"px "+this.cellPaddingBottom+"px "+this.cellPaddingLeft+"px";
}
catch(ex){
jsExDebug("widgetSortTable_setCellPadding",ex);
}
}
function widgetSortTable_sortByHeading(_3c){
try{
if(!this.sortData[_3c]){
return;
}
if(this.sortColumn!=_3c){
this.sortDirection[this.sortColumn]=this.DIR_UNSORTED;
if(this.sortColumnImage){
this.sortColumnImage.style.visibility="hidden";
}
if(this.sortData[_3c]){
this.sortColumn=_3c;
}
}
var _3d=null;
for(var i=0;i<this.headings.length;i++){
if(this.headings[i]==_3c){
_3d=i;
break;
}
}
this.sortColumnImage=this.table.rowArray[0].cells[_3d].sortImage;
this.sortColumnImage.style.visibility="visible";
switch(this.sortDirection[_3c]){
case this.DIR_ASCENDING:
this.sortData[_3c]=this.sortListDesc(this.sortData[_3c]);
this.sortDirection[_3c]=this.DIR_DESCENDING;
this.sortColumnImage.src=this.DESC_IMAGE;
break;
case this.DIR_DESCENDING:
this.sortData[_3c]=this.sortListAsc(this.sortData[_3c]);
this.sortDirection[_3c]=this.DIR_ASCENDING;
this.sortColumnImage.src=this.ASC_IMAGE;
break;
case this.DIR_UNSORTED:
this.sortData[_3c]=this.sortListAsc(this.sortData[_3c]);
this.sortDirection[_3c]=this.DIR_ASCENDING;
this.sortColumnImage.src=this.ASC_IMAGE;
break;
}
}
catch(ex){
jsExDebug("widgetSortTable_sortByHeading",ex);
}
}
function widgetSortTable_sortListAsc(_3f){
try{
for(x=0;x<_3f.length;x++){
for(y=0;y<(_3f.length-1);y++){
if(_3f[y].value>_3f[y+1].value){
holder=_3f[y+1];
_3f[y+1]=_3f[y];
_3f[y]=holder;
}
}
}
return _3f;
}
catch(ex){
jsExDebug("widgetSortTable_sortListAsc",ex);
}
}
function widgetSortTable_sortListDesc(_40){
try{
for(x=0;x<_40.length;x++){
for(y=0;y<(_40.length-1);y++){
if(_40[y].value<_40[y+1].value){
holder=_40[y+1];
_40[y+1]=_40[y];
_40[y]=holder;
}
}
}
return _40;
}
catch(ex){
jsExDebug("widgetSortTable_sortListDesc",ex);
}
}
function widgetSortTable_bindWidgetEvent(_41){
function handler(_42,_43){
try{
this.fireEvent(this.INNER_WIDGET_EVENT,_42,_43,_41);
}
catch(ex){
jsExDebug("widgetSortTable_bindWidgetEvent: handler",ex);
}
}
try{
return new this.SYSTEM.Delegate(this,handler);
}
catch(ex){
jsExDebug("widgetSortTable_bindWidgetEvent",ex);
}
}
function widgetSortTable_fireEvent(_44,_45,_46,_47){
try{
if(!this.eventBindings||!this.eventBindings[_44]){
return;
}
if(_45){
var _48=new SYSTEM.Event.Event(_45.clientX,_45.clientY);
if(document.all){
_48.relatedTarget=_45.toElement;
}else{
_48.relatedTarget=_45.relatedTarget;
}
}else{
var _48=new SYSTEM.Event.Event();
}
_48.eventWidget=_46;
_48.eventType=_47;
for(var i=this.eventBindings[_44].length-1;i>=0;i--){
var _4a=this.eventBindings[_44][i];
_4a.invoke(_48,this);
}
}
catch(ex){
jsExDebug("widgetSortTable_fireEvent",ex);
}
}
function widgetSortTable_translateDisplayToData(_4b,_4c){
try{
if(_4b!=null){
_4b=(_4b?(_4b+this.scrollX):0);
}
if(_4c!=null){
_4c=(_4c?(_4c+this.scrollY):0);
}
return {x:_4b,y:_4c};
}
catch(ex){
jsExDebug("widgetSortTable_translateDisplayToData",ex);
}
}
function widgetSortTable_headingClickEvent(_4d,me,_4f){
try{
me.sortByHeading(me.headings[_4f]);
me.refresh();
}
catch(ex){
jsExDebug("widgetSortTable_headingClickEvent",ex);
}
}

try{
styleItem_t.prototype=new listItem_t();
styleItem_t.prototype.constructor=styleItem_t;
styleItem_t.prototype.cleanUp=styleItem_cleanUp;
styleItem_t.prototype.styleItem_super=listItem_t.prototype.constructor;
styleItem_t.prototype.listItem_cleanUp=listItem_t.prototype.cleanUp;
styleItem_t.prototype.listItem_bindEvents=listItem_t.prototype.bindEvents;
styleItem_t.prototype.createDom=styleItem_createDom;
styleItem_t.prototype.bindEvents=styleItem_bindEvents;
styleItem_t.prototype.makeSelected=styleItem_makeSelected;
styleItem_t.prototype.makeDeselected=styleItem_makeDeselected;
styleItem_t.prototype.selectEvent=styleItem_selectEvent;
styleItem_t.prototype.moreInfoBtnClickEvent=styleItem_moreInfoBtnClickEvent;
styleItem_t.prototype.dim=styleItem_dim;
styleItem_t.prototype.IMAGE_LEFT=4;
styleItem_t.prototype.IMAGE_TOP=4;
styleItem_t.prototype.IMAGE_WIDTH=30;
styleItem_t.prototype.IMAGE_HEIGHT=30;
styleItem_t.prototype.TEXT_LEFT=styleItem_t.prototype.IMAGE_LEFT+styleItem_t.prototype.IMAGE_WIDTH+4;
styleItem_t.prototype.NAME_TOP=4;
styleItem_t.prototype.SUMMARY_TOP=20;
styleItem_t.prototype.NAME_HEIGHT=15;
styleItem_t.prototype.TEXT_WIDTH_DIFF=styleItem_t.prototype.TEXT_LEFT+4;
styleItem_t.prototype.SUMMARY_HEIGHT=15;
styleItem_t.prototype.SELECTED_BORDER="solid 1px rgb(109,165,201)";
styleItem_t.prototype.DESELECTED_BORDER="solid 1px transparent";
styleItem_t.prototype.MORE_INFO_RIGHT=19;
styleItem_t.prototype.MORE_INFO_TOP=4;
styleItem_t.prototype.MORE_INFO_WIDTH=15;
styleItem_t.prototype.MORE_INFO_HEIGHT=30;
styleItem_t.prototype.MORE_INFO_IMG="img/app/app/map/stylelist/long_more_info";
}
catch(ex){
jsExDebug("styleItem_t.prototype",ex);
}
function styleItem_t(_1,_2,_3,_4,_5,_6){
try{
this.styleItem_super(_1,_2,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_6){
this.createDom(_3,_4,_5);
this.bindEvents();
}
}
catch(ex){
jsExDebug("styleItem_t",ex);
}
}
function styleItem_cleanUp(me){
try{
if(!me){
var me=this;
}
me.image=null;
me.nameDiv=null;
me.textDiv=null;
me.moreInfoBtn.cleanUp();
me.moreInfoBtn=null;
me.listItem_cleanUp();
}
catch(ex){
jsExDebug("styleItem_cleanUp",ex);
}
}
function styleItem_createDom(_8,_9,_a){
try{
var _b=document.createElement("img");
_b.style.position="absolute";
_b.style.left=this.IMAGE_LEFT+"px";
_b.style.top=this.IMAGE_TOP+"px";
_b.style.width=this.IMAGE_WIDTH+"px";
_b.style.height=this.IMAGE_HEIGHT+"px";
if(this.data.imageSource){
_b.src=this.data.imageSource;
}
this.widgetElement.appendChild(_b);
var _c=document.createElement("div");
_c.style.position="absolute";
_c.style.left=this.TEXT_LEFT+"px";
_c.style.top=this.NAME_TOP+"px";
_c.style.width=(_8-this.TEXT_WIDTH_DIFF)+"px";
_c.style.height=this.NAME_HEIGHT+"px";
if(this.data.name){
_c.innerHTML=this.data.name;
}
this.widgetElement.appendChild(_c);
var _d=document.createElement("div");
_d.style.position="absolute";
_d.style.left=this.TEXT_LEFT+"px";
_d.style.top=this.SUMMARY_TOP+"px";
_d.style.width=(_8-this.TEXT_WIDTH_DIFF)+"px";
_d.style.height=(_9-this.SUMMARY_HEIGHT)+"px";
if(this.data.summaryText){
_d.innerHTML=this.data.summaryText;
}
this.widgetElement.appendChild(_d);
var _e=new this.SYSTEM.Widget.Button("moreInfoBtn",this.MORE_INFO_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE,this.MORE_INFO_WIDTH,this.MORE_INFO_HEIGHT);
_e.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.moreInfoBtnClickEvent));
_e.setPosition(_8-this.MORE_INFO_RIGHT,this.MORE_INFO_TOP);
_e.attach(this.widgetElement);
this.allowHighlight(this.HIGHLIGHT_COLOUR);
this.allowSelection();
this.widgetElement.style.border=this.DESELECTED_BORDER;
this.image=_b;
this.nameDiv=_c;
this.textDiv=_d;
this.moreInfoBtn=_e;
}
catch(ex){
jsExDebug("styleItem_createDom",ex);
}
}
function styleItem_bindEvents(){
try{
this.listItem_bindEvents();
}
catch(ex){
jsExDebug("styleItem_bindEvents",ex);
}
}
function styleItem_makeSelected(){
try{
this.widgetElement.style.border=this.SELECTED_BORDER;
}
catch(ex){
jsExDebug("styleItem_makeSelected",ex);
}
}
function styleItem_makeDeselected(){
try{
this.widgetElement.style.border=this.DESELECTED_BORDER;
}
catch(ex){
jsExDebug("styleItem_makeDeselected",ex);
}
}
function styleItem_selectEvent(_f,me){
try{
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_f);
}
catch(ex){
jsExDebug("styleItem_selectEvent",ex);
}
}
function styleItem_moreInfoBtnClickEvent(_11,_12){
try{
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_WIDGET_EVENT,_11);
}
catch(ex){
jsExDebug("styleItem_moreInfoBtnClickEvent",ex);
}
}
function styleItem_dim(_13,me){
try{
me.SYSTEM.Tooltip.hideTooltip();
me.tooltipVisible=false;
if(me.SYSTEM.Environment.userAgentIsIE()){
relatedTarget=_13.toElement;
}else{
relatedTarget=_13.relatedTarget;
}
if(relatedTarget!=me.moreInfoBtn.imageElement){
me.widgetElement.style.backgroundColor="";
}
}
catch(ex){
jsExDebug("styleItem_dim",ex);
}
}

try{
launcher_t.prototype=new widget_t();
launcher_t.prototype.constructor=launcher_t;
launcher_t.prototype.cleanUp=launcher_cleanUp;
launcher_t.prototype.launcher_super=widget_t.prototype.constructor;
launcher_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
launcher_t.prototype.createDom=launcher_createDom;
launcher_t.prototype.bindEvents=launcher_bindEvents;
launcher_t.prototype.unbindEvents=launcher_unbindEvents;
launcher_t.prototype.updateUnreadNotifications=launcher_updateUnreadNotifications;
launcher_t.prototype.cascadeWindows=launcher_cascadeWindows;
launcher_t.prototype.stackWindows=launcher_stackWindows;
launcher_t.prototype.createWorkspace=launcher_createWorkspace;
launcher_t.prototype.closeAll=launcher_closeAll;
launcher_t.prototype.launchApp=launcher_launchApp;
launcher_t.prototype.createList=launcher_createList;
launcher_t.prototype.createAccessoryLink=launcher_createAccessoryLink;
launcher_t.prototype.addAppLink=launcher_addAppLink;
launcher_t.prototype.createSmallLink=launcher_createSmallLink;
launcher_t.prototype.fillRecentLists=launcher_fillRecentLists;
launcher_t.prototype.openMenu=launcher_openMenu;
launcher_t.prototype.closeMenu=launcher_closeMenu;
launcher_t.prototype.userDetailsRefreshCallback=launcher_userDetailsRefreshCallback;
launcher_t.prototype.contactsRefreshCallback=launcher_contactsRefreshCallback;
launcher_t.prototype.getRecentContactLocations=launcher_getRecentContactLocations;
launcher_t.prototype.showRecentUpdates=launcher_showRecentUpdates;
launcher_t.prototype.expandAppLink=launcher_expandAppLink;
launcher_t.prototype.addRecentUpdates=launcher_addRecentUpdates;
launcher_t.prototype.launchBtnClickEvent=launcher_launchBtnClickEvent;
launcher_t.prototype.globalClickEvent=launcher_globalClickEvent;
launcher_t.prototype.pocketPeepelClickEvent=launcher_pocketPeepelClickEvent;
launcher_t.prototype.windowResizeEvent=launcher_windowResizeEvent;
launcher_t.prototype.appOpenEvent=launcher_appOpenEvent;
launcher_t.prototype.recentDocumentSelectEvent=launcher_recentDocumentSelectEvent;
launcher_t.prototype.templateSelectEvent=launcher_templateSelectEvent;
launcher_t.prototype.existingFileClickEvent=launcher_existingFileClickEvent;
launcher_t.prototype.importFileClickEvent=launcher_importFileClickEvent;
launcher_t.prototype.createWorkspaceClickEvent=launcher_createWorkspaceClickEvent;
launcher_t.prototype.avatarClickEvent=launcher_avatarClickEvent;
launcher_t.prototype.moreLabelClickEvent=launcher_moreLabelClickEvent;
launcher_t.prototype.bubbleClickEvent=launcher_bubbleClickEvent;
launcher_t.prototype.logoutClickEvent=launcher_logoutClickEvent;
launcher_t.prototype.keyDownEvent=launcher_keyDownEvent;
launcher_t.prototype.keyUpEvent=launcher_keyUpEvent;
launcher_t.prototype.accountBtnClickEvent=launcher_accountBtnClickEvent;
launcher_t.prototype.tacLinkClickEvent=launcher_tacLinkClickEvent;
launcher_t.prototype.WIDTH=160;
launcher_t.prototype.HEIGHT=32;
launcher_t.prototype.LOGO_WIDTH=81;
launcher_t.prototype.LOGO_HEIGHT=34;
launcher_t.prototype.PADDING=5;
launcher_t.prototype.MAIN_APP_PADDING=40;
launcher_t.prototype.ICON_SIDE=16;
launcher_t.prototype.COLUMN_PADDING=15;
launcher_t.prototype.DEFAULT_OPTIONS_HEIGHT=150;
launcher_t.prototype.MAP_OPTIONS_HEIGHT=30;
launcher_t.prototype.SPREADSHEET_OPTIONS_HEIGHT=150;
launcher_t.prototype.WRITER_OPTIONS_HEIGHT=150;
launcher_t.prototype.ACCESSORY_OPTIONS_HEIGHT=80;
launcher_t.prototype.WORKSPACE_MAN_OPTIONS_HEIGHT=40;
launcher_t.prototype.MENU_CHANGE_STEPS=4;
launcher_t.prototype.MENU_CHANGE_INCREMENT=50;
launcher_t.prototype.MIN_MENU_CHANGE_OPACITY=0.2;
launcher_t.prototype.LAUNCH_IMG="img/app/system/launcher/btn";
launcher_t.prototype.LAUNCH_DIV_HEIGHT=28;
launcher_t.prototype.LAUNCH_LEFT=launcher_t.prototype.PADDING;
launcher_t.prototype.WINDOW_CTRL_LEFT=95;
launcher_t.prototype.WINDOW_CTRL_TOP=(launcher_t.prototype.HEIGHT-launcher_t.prototype.ICON_SIDE)/2;
launcher_t.prototype.APP_LINK_HEIGHT=65;
launcher_t.prototype.APP_LINK_LBL_WIDTH=210;
launcher_t.prototype.APP_LINK_DESC_SIZE=11;
launcher_t.prototype.APP_LINK_MORE_HIGHLIGHT_COLOUR="rgb(255,193,10)";
launcher_t.prototype.APP_LINK_OPTIONS_PADDING=15;
launcher_t.prototype.WELCOME_SIZE=24;
launcher_t.prototype.IMG_PADDING=1;
launcher_t.prototype.BORDER_WIDTH=1;
launcher_t.prototype.MENU_WIDTH=872;
launcher_t.prototype.MENU_HEIGHT=520;
launcher_t.prototype.TL_CORNER_IMG="img/app/system/launcher/tl.png";
launcher_t.prototype.TR_CORNER_IMG="img/app/system/launcher/tr.png";
launcher_t.prototype.BL_CORNER_IMG="img/app/system/launcher/bl.png";
launcher_t.prototype.BR_CORNER_IMG="img/app/system/launcher/br.png";
launcher_t.prototype.TL_2_CORNER_IMG="img/app/system/launcher/tl2.png";
launcher_t.prototype.TR_2_CORNER_IMG="img/app/system/launcher/tr2.png";
launcher_t.prototype.BL_2_CORNER_IMG="img/app/system/launcher/bl2.png";
launcher_t.prototype.BR_2_CORNER_IMG="img/app/system/launcher/br2.png";
launcher_t.prototype.MENU_BG_CORNER_SIDE=15;
launcher_t.prototype.MENU_BG_COLOUR="rgb(50,50,50)";
launcher_t.prototype.PROFILE_BG_COLOUR="rgb(100,100,100)";
launcher_t.prototype.COLUMN_WIDTH=270;
launcher_t.prototype.COLUMN_TOP=65;
launcher_t.prototype.COLUMN_HEIGHT=launcher_t.prototype.MENU_HEIGHT-launcher_t.prototype.COLUMN_TOP-launcher_t.prototype.MENU_BG_CORNER_SIDE;
launcher_t.prototype.COLUMN_1_LEFT=0;
launcher_t.prototype.COLUMN_2_LEFT=launcher_t.prototype.COLUMN_1_LEFT+launcher_t.prototype.COLUMN_WIDTH+launcher_t.prototype.COLUMN_PADDING;
launcher_t.prototype.COLUMN_3_LEFT=launcher_t.prototype.COLUMN_2_LEFT+launcher_t.prototype.COLUMN_WIDTH+launcher_t.prototype.COLUMN_PADDING;
launcher_t.prototype.PROFILE_BTN_IMG="img/app/system/launcher/sett";
launcher_t.prototype.PROFILE_BTN_WIDTH=80;
launcher_t.prototype.PROFILE_BTN_HEIGHT=26;
launcher_t.prototype.PROFILE_BTN_LEFT=450;
launcher_t.prototype.PROFILE_BTN_TOP=10;
launcher_t.prototype.BACKGROUND_IMG="img/app/system/launcher/bar_bg.png";
launcher_t.prototype.OPACITY=0.5;
launcher_t.prototype.FONT_COLOUR="rgb(210,210,210)";
launcher_t.prototype.FONT_COLOUR_WHITE="rgb(255,255,255)";
launcher_t.prototype.DISABLED_AREA_BTN_BORDER="solid 1px rgb(100,100,100)";
launcher_t.prototype.ENABLED_AREA_BTN_BORDER="solid 1px "+launcher_t.prototype.FONT_COLOUR;
launcher_t.prototype.APP_ICON_WIDTH=48;
launcher_t.prototype.APP_ICON_HEIGHT=48;
launcher_t.prototype.APP_TITLE_LEFT=53;
launcher_t.prototype.APP_TITLE_TOP=0;
launcher_t.prototype.APP_TITLE_SIZE=12;
launcher_t.prototype.ACCESSORY_ICON_WIDTH=16;
launcher_t.prototype.ACCESSORY_ICON_HEIGHT=16;
launcher_t.prototype.ACCESSORY_TITLE_LEFT=21;
launcher_t.prototype.ACCESSORY_TITLE_TOP=0;
launcher_t.prototype.ACCESSORY_TITLE_SIZE=10;
launcher_t.prototype.HELP_BTN_RIGHT=260;
launcher_t.prototype.MAP_IMG=SYSTEM.Icon.App.MAP+"_med";
launcher_t.prototype.WRITER_IMG=SYSTEM.Icon.App.WRITER+"_med";
launcher_t.prototype.SPREADSHEET_IMG=SYSTEM.Icon.App.SPREADSHEET+"_med";
launcher_t.prototype.ACCESSORY_IMG="img/app/system/icons/apps/accessories_med";
launcher_t.prototype.BROWSER_IMG_SMALL="img/app/system/launcher/browser_small";
launcher_t.prototype.CALCULATOR_IMG_SMALL="img/app/system/launcher/calculator_small";
launcher_t.prototype.FEEDBACK_IMG_SMALL="img/app/system/launcher/feedback_small";
launcher_t.prototype.BLOG_IMG_SMALL="img/app/system/launcher/blog_small";
launcher_t.prototype.SETTINGS_IMG_SMALL="img/app/system/launcher/settings_small";
launcher_t.prototype.API_IMG_SMALL="img/app/system/launcher/API";
launcher_t.prototype.FILE_MANAGER_IMG=SYSTEM.Icon.App.FILE_MANAGER+"_med";
launcher_t.prototype.PROFILE_IMG=SYSTEM.Icon.App.ACCOUNT_MANAGER+"_med";
launcher_t.prototype.CONTACT_MANAGER_IMG=SYSTEM.Icon.App.CONTACT_MANAGER+"_med";
launcher_t.prototype.WORKSPACE_MANAGER_IMG=SYSTEM.Icon.App.WORKSPACE_MANAGER+"_med";
launcher_t.prototype.POINT_MANAGER_IMG=SYSTEM.Icon.App.PEEPELPOINT_MANAGER+"_med";
launcher_t.prototype.POINT_MANAGER_IMG_SMALL=SYSTEM.Icon.App.PEEPELPOINT_MANAGER+"_small";
launcher_t.prototype.MEDIA_GALLERY_IMG=SYSTEM.Icon.App.MEDIA_GALLERY+"_med";
launcher_t.prototype.CREATE_WS_IMG="img/app/system/launcher/create_workspace";
launcher_t.prototype.SCRIPT_IMG="img/app/system/launcher/script";
launcher_t.prototype.RECENT_IMG="img/app/system/launcher/recent";
launcher_t.prototype.RECENT_UPDATE_IMG="img/app/system/launcher/recent_upd";
launcher_t.prototype.MAGNIFY_IMG="img/app/system/launcher/zoom";
launcher_t.prototype.HELP_IMG="img/app/system/launcher/qhelp";
launcher_t.prototype.CASCADE_IMG="img/app/system/launcher/cascade";
launcher_t.prototype.STACK_IMG="img/app/system/launcher/stack";
launcher_t.prototype.CLOSE_ALL_IMG="img/app/system/launcher/closeall";
launcher_t.prototype.LOGIN_IMG="img/app/system/launcher/login";
launcher_t.prototype.SIGNUP_IMG="img/app/system/launcher/signup";
launcher_t.prototype.ACCOUNT_BTN_WIDTH=65;
launcher_t.prototype.ACCOUNT_BTN_HEIGHT=42;
launcher_t.prototype.NUMBER_OF_RECENT_UPDATES_SHOWN=4;
launcher_t.prototype.RECENT_LOCATIONS_TIME_LIMIT=5000;
launcher_t.prototype.RU_CONTACT_AVATAR_SIDE=50;
launcher_t.prototype.RU_UNAME_LBL_SIZE=14;
launcher_t.prototype.LIST_WIDTH=130;
launcher_t.prototype.BUBBLE_IMG="img/app/system/launcher/bubble";
launcher_t.prototype.BUBBLE_WIDTH=228;
launcher_t.prototype.BUBBLE_HEIGHT=155;
launcher_t.prototype.WEBMAP_DESC="Track your friends, create PeepelPoints and explore Earth with an interactive map.";
launcher_t.prototype.WEBSHEET_DESC="Create, edit and collaborate on a spreadsheet.";
launcher_t.prototype.WEBWRITER_DESC="Create, edit and collaborate on an easy to format text document.";
launcher_t.prototype.ACCESSORIES_DESC="Use these applications to customise your Peepel experience.";
launcher_t.prototype.PROFILE_DESC="Customise your account profile.";
launcher_t.prototype.CONTACT_MAN_DESC="Add friends! Expand your Peepel network.";
launcher_t.prototype.FILEMAN_DESC="View and organise your files (WebSheet, WebWriter, Image).";
launcher_t.prototype.WORKSPACE_DESC="Create, open, edit and delete workspaces.";
launcher_t.prototype.MEDIAGALL_DESC="View the photos you have uploaded with PocketPeepel.";
launcher_t.prototype.PP_IMG_SRC="img/app/system/launcher/PocketPeepelAd.png";
launcher_t.prototype.PP_DIV_WIDTH=391;
launcher_t.prototype.PP_DIV_HEIGHT=35;
launcher_t.prototype.PP_DIV_BOTTOM=5;
launcher_t.prototype.ALERT_COLOUR="#B5FFF6";
launcher_t.prototype.TAC_FONT_SIZE=14;
}
catch(ex){
jsExDebug("launcher_t.prototype",ex);
}
function launcher_t(_1,_2,_3){
try{
this.launcher_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.cancelAutoOpen=false;
this.menuVisible=false;
this.menuData=[];
this.isTempUser=this.SYSTEM.UserDetails.isTempUser();
this.appOpenDelegate=new this.SYSTEM.Delegate(this,this.appOpenEvent);
this.recentFilesDelegate=new this.SYSTEM.Delegate(this,this.fillRecentLists);
this.appLinkWidgets=[];
this.listWidgets=[];
this.userDetailsActionIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_LOAD,new this.SYSTEM.Delegate(this,this.userDetailsRefreshCallback));
this.contactsActionIndex=this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.UserDetails.ACTION_READ,new this.SYSTEM.Delegate(this,this.contactsRefreshCallback));
this.waitForContactsToLoadBeforeShowingRecentUpdates=false;
this.lastGetRecentLocationsTime=0;
this.recentUpdatesDom=[];
this.currentRecentContactIds=[];
this.appLinkArray=[];
this.appLinkArray[1]=[];
this.appLinkArray[2]=[];
this.menuOpening=true;
this.ctrlKeyDown=false;
if(!_3){
this.createDom(_2);
this.bindEvents();
}
this.setPosition(0,0,false,true);
this.attach(document.body);
}
catch(ex){
jsExDebug("launcher_t",ex);
}
}
function launcher_cleanUp(me){
try{
if(!me){
me=this;
}
me.unbindEvents();
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsActionIndex);
me.userDetailsActionIndex=null;
}
if(me.SYSTEM.Contacts){
me.SYSTEM.Contacts.unregisterActionListener(me.contactsActionIndex);
me.contactsActionIndex=null;
}
for(var i=0;i<me.menuData.length;i++){
if(me.menuData[i].appId){
me.menuData[i].appId=null;
me.menuData[i].name=null;
}else{
if(me.menuData[i].delegate){
me.menuData[i].text=null;
me.menuData[i].delegate.cleanUp();
me.menuData[i].delegate=null;
}
}
me.menuData[i]=null;
}
me.menuData=null;
me.launchBtn.cleanUp();
me.launchBtn=null;
me.welcomeLabel.cleanUp();
me.welcomeLabel=null;
me.menuVisible=null;
for(var i=0;i<me.appLinkWidgets.length;i++){
me.appLinkWidgets[i].cleanUp();
me.appLinkWidgets[i]=null;
}
me.appLinkWidgets=null;
for(var i=0;i<me.listWidgets.length;i++){
me.listWidgets[i].cleanUp();
me.listWidgets[i]=null;
}
me.listWidgets=null;
me.recentDocumentList=null;
me.templateList=null;
me.profileBtnDiv=null;
me.notifierLabel=null;
me.waitForContactsToLoadBeforeShowingRecentUpdates=null;
me.contactsByUpdateTime=null;
me.lastGetRecentLocationsTime=null;
me.currentRecentContactIds=null;
me.menuOpening=null;
me.ctrlKeyDown=null;
for(var i=0;i<me.recentUpdatesDom.length;i++){
me.SYSTEM.Event.detachEvent(me.recentUpdatesDom[i].avatar,"onclick","click");
me.recentUpdatesDom[i].avatar=null;
me.recentUpdatesDom[i].lastSeenLabel=null;
me.recentUpdatesDom[i].userNameLabel=null;
me.recentUpdatesDom[i]=null;
}
me.recentUpdatesDom=null;
me.openExpandDiv=null;
me.mapOptions=null;
me.spreadsheetOptions=null;
me.writerOptions=null;
me.accessoryOptions=null;
me.profileOptions=null;
me.contactManagerOptions=null;
me.fileManagerOptions=null;
me.workspaceManagerOptions=null;
me.bubbleBtn.cleanUp();
me.bubbleBtn=null;
me.pocketPeepelImage=null;
for(column in me.appLinkArray){
for(var i in me.appLinkArray[column]){
me.appLinkArray[column][i].div=null;
me.appLinkArray[column][i].expandDom=null;
me.appLinkArray[column][i].moreLabel=null;
me.appLinkArray[column][i].optionsHeight=null;
me.appLinkArray[column][i]=null;
}
me.appLinkArray[column]=null;
}
me.hintLabel.cleanUp();
me.hintLabel=null;
if(me.isTempUser){
me.infoLabel.cleanUp();
me.infoLabel=null;
me.signUpBtn.cleanUp();
me.signUpBtn=null;
me.tacLabel.cleanUp();
me.tacLabel=null;
me.tacLink.cleanUp();
me.tacLink=null;
}
me.loginBtn.cleanUp();
me.loginBtn=null;
me.column3Div=null;
me.isTempUser=null;
me.SYSTEM.Dom.freeDom(me.menuDiv);
me.menuDiv=null;
SYSTEM.Launcher=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("launcher_cleanUp",ex);
}
}
function launcher_createDom(_6){
try{
var w=this.SYSTEM.Widget;
var _8=this.SYSTEM.Dom.createDiv("absolute");
_8.style.backgroundColor=this.MENU_BG_COLOUR;
_8.style.zIndex=TASK_MANAGER_ZINDEX;
this.openExpandDiv=_8;
this.setDimensions(this.WIDTH,this.HEIGHT);
this.widgetElement.style.zIndex=TASK_MANAGER_ZINDEX;
var _9=this.SYSTEM.Dom.createDiv("absolute");
_9.style.width="100%";
_9.style.height="100%";
_9.style.backgroundColor="rgb(0,0,0)";
this.SYSTEM.Dom.setElementOpacity(_9,this.OPACITY);
this.widgetElement.appendChild(_9);
var _a=new w.Button("launchBtn",this.LAUNCH_IMG,button_t.prototype.ON_IMAGE,this.LOGO_WIDTH,this.LOGO_HEIGHT);
_a.setPosition(this.LAUNCH_LEFT,this.IMG_PADDING);
_a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.launchBtnClickEvent));
_a.attach(this.widgetElement);
var _b=new w.Button("cascadeBtn",this.CASCADE_IMG,null,this.ICON_SIDE,this.ICON_SIDE,"Cascade Windows","Arrange the windows diagonally from the top left screen corner.");
_b.setPosition(this.WINDOW_CTRL_LEFT,this.WINDOW_CTRL_TOP);
_b.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.cascadeWindows));
_b.attach(this.widgetElement);
var _c=new w.Button("stackBtn",this.STACK_IMG,null,this.ICON_SIDE,this.ICON_SIDE,"Stack Windows","Half maximise all windows to the left, except for the top one which moves to the right.",null,120);
_c.setPosition(_b.positionX+this.ICON_SIDE+this.PADDING,this.WINDOW_CTRL_TOP);
_c.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.stackWindows));
_c.attach(this.widgetElement);
var _d=new w.Button("closeAllBtn",this.CLOSE_ALL_IMG,null,this.ICON_SIDE,this.ICON_SIDE,"Close all applications","Closes all open applications.");
_d.setPosition(_c.positionX+this.ICON_SIDE+this.PADDING,this.WINDOW_CTRL_TOP);
_d.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.closeAll));
_d.attach(this.widgetElement);
var _e=this.SYSTEM.Dom.createDiv("absolute",this.MENU_WIDTH,this.MENU_HEIGHT,(this.SYSTEM.Environment.SCREEN_WIDTH-this.MENU_WIDTH)/2,(this.SYSTEM.Environment.SCREEN_HEIGHT-this.MENU_HEIGHT)/2);
_e.style.display="none";
_e.style.zIndex=LAUNCHER_ZINDEX;
var _f=this.SYSTEM.Dom.createDiv("absolute");
_f.style.width="100%";
_f.style.height="100%";
var _10=this.SYSTEM.Dom.createImage(this.TL_CORNER_IMG,"absolute",this.MENU_BG_CORNER_SIDE,this.MENU_BG_CORNER_SIDE,0,0);
_f.appendChild(_10);
var _11=this.SYSTEM.Dom.createImage(this.TR_CORNER_IMG,"absolute",this.MENU_BG_CORNER_SIDE,this.MENU_BG_CORNER_SIDE,null,0);
_11.style.right="0px";
_f.appendChild(_11);
var _12=this.SYSTEM.Dom.createImage(this.BL_CORNER_IMG,"absolute",this.MENU_BG_CORNER_SIDE,this.MENU_BG_CORNER_SIDE,0);
_12.style.bottom="0px";
_f.appendChild(_12);
var _13=this.SYSTEM.Dom.createImage(this.BR_CORNER_IMG,"absolute",this.MENU_BG_CORNER_SIDE,this.MENU_BG_CORNER_SIDE);
_13.style.right="0px";
_13.style.bottom="0px";
_f.appendChild(_13);
var _14=this.SYSTEM.Dom.createDiv("absolute",this.MENU_WIDTH-(2*this.MENU_BG_CORNER_SIDE),this.MENU_HEIGHT,this.MENU_BG_CORNER_SIDE,0);
_14.style.backgroundColor=this.MENU_BG_COLOUR;
_f.appendChild(_14);
var _15=this.SYSTEM.Dom.createDiv("absolute",this.MENU_BG_CORNER_SIDE,this.MENU_HEIGHT-(2*this.MENU_BG_CORNER_SIDE),0,this.MENU_BG_CORNER_SIDE);
_15.style.backgroundColor=this.MENU_BG_COLOUR;
_f.appendChild(_15);
var _16=this.SYSTEM.Dom.createDiv("absolute",this.MENU_BG_CORNER_SIDE,this.MENU_HEIGHT-(2*this.MENU_BG_CORNER_SIDE),null,this.MENU_BG_CORNER_SIDE);
_16.style.right="0px";
_16.style.backgroundColor=this.MENU_BG_COLOUR;
_f.appendChild(_16);
_e.appendChild(_f);
var _17=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.COLUMN_HEIGHT,this.COLUMN_1_LEFT,this.COLUMN_TOP);
_14.appendChild(_17);
var _18=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.COLUMN_HEIGHT,this.COLUMN_2_LEFT,this.COLUMN_TOP);
_14.appendChild(_18);
var _19=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.COLUMN_HEIGHT,this.COLUMN_3_LEFT,this.COLUMN_TOP);
_14.appendChild(_19);
var _1a=new w.Label("welcomeLabel");
_1a.setFontSize(null,null,this.WELCOME_SIZE);
_1a.setColour(this.FONT_COLOUR);
_1a.setPosition(0,this.MENU_BG_CORNER_SIDE);
_1a.attach(_14);
if(this.isTempUser){
_1a.setText("Welcome <span style='color: "+this.ALERT_COLOUR+";'>"+this.SYSTEM.UserDetails.getScreenName()+"!</span>");
}else{
_1a.setText("Welcome "+this.SYSTEM.UserDetails.getScreenName()+"!");
var _1b=new w.Button("loginBtn",this.LOGIN_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE,this.ACCOUNT_BTN_WIDTH,this.ACCOUNT_BTN_HEIGHT);
_1b.setPosition(this.HELP_BTN_RIGHT+this.ICON_SIDE+this.ICON_SIDE,this.MENU_BG_CORNER_SIDE,true);
_1b.setValue("Login");
_1b.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.accountBtnClickEvent));
_1b.attach(_14);
this.loginBtn=_1b;
}
var _1c=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.MAP_OPTIONS_HEIGHT,0,this.APP_LINK_HEIGHT);
this.createAccessoryLink(APP_ID_PEEPELPOINT_MANAGER,"PointManager",this.POINT_MANAGER_IMG_SMALL,this.APP_LINK_OPTIONS_PADDING,0,_1c);
var _1d=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.SPREADSHEET_OPTIONS_HEIGHT,0,this.APP_LINK_HEIGHT);
var _1e=this.createList("Recent Documents",this.RECENT_IMG,0,0,_1d,null,new this.SYSTEM.Delegate(this,this.recentDocumentSelectEvent));
var _1f=this.createList("Templates",this.SCRIPT_IMG,this.APP_LINK_OPTIONS_PADDING+this.LIST_WIDTH,0,_1d,null,new this.SYSTEM.Delegate(this,this.templateSelectEvent));
for(var _20 in SPREADSHEET_TEMPLATES){
_1f.addItem("{"+this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET+"}"+_20,"<span style=\"color:"+this.FONT_COLOUR+"\">"+SPREADSHEET_TEMPLATES[_20]+"</span>");
}
var _21=this.SPREADSHEET_OPTIONS_HEIGHT-25;
this.createSmallLink("Open a file",this.MAGNIFY_IMG,0,_21,_1d,new this.SYSTEM.Delegate(this,this.existingFileClickEvent));
var _22=this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET;
this.appLinkWidgets[this.appLinkWidgets.length-1].setValue(_22);
this.appLinkWidgets[this.appLinkWidgets.length-2].setValue(_22);
this.createSmallLink("Import a file",this.MAGNIFY_IMG,120,_21,_1d,new this.SYSTEM.Delegate(this,this.importFileClickEvent));
var _23=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.WRITER_OPTIONS_HEIGHT,0,this.APP_LINK_HEIGHT);
var _24=this.createList("Recent Documents",this.RECENT_IMG,0,0,_23,null,new this.SYSTEM.Delegate(this,this.recentDocumentSelectEvent));
var _25=this.createList("Templates",this.SCRIPT_IMG,this.APP_LINK_OPTIONS_PADDING+this.LIST_WIDTH,0,_23,null,new this.SYSTEM.Delegate(this,this.templateSelectEvent));
for(var _20 in WRITER_TEMPLATES){
_25.addItem("{"+this.SYSTEM.Filesystem.File.TYPE_WRITER+"}"+_20,"<span style=\"color:"+this.FONT_COLOUR+"\">"+WRITER_TEMPLATES[_20]+"</span>");
}
var _21=this.SPREADSHEET_OPTIONS_HEIGHT-25;
this.createSmallLink("Open a file",this.MAGNIFY_IMG,0,_21,_23,new this.SYSTEM.Delegate(this,this.existingFileClickEvent));
var _22=this.SYSTEM.Filesystem.File.TYPE_WRITER;
this.appLinkWidgets[this.appLinkWidgets.length-1].setValue(_22);
this.appLinkWidgets[this.appLinkWidgets.length-2].setValue(_22);
this.createSmallLink("Import a file",this.MAGNIFY_IMG,120,_21,_23,new this.SYSTEM.Delegate(this,this.importFileClickEvent));
var _26=150;
var _27=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.ACCESSORY_OPTIONS_HEIGHT,0,this.APP_LINK_HEIGHT);
this.createAccessoryLink(APP_ID_SETTINGS,"SETTINGS",this.SETTINGS_IMG_SMALL,this.APP_LINK_OPTIONS_PADDING,0,_27);
this.createAccessoryLink(APP_ID_BROWSER,"BROWSER",this.BROWSER_IMG_SMALL,_26,0,_27);
this.createAccessoryLink(APP_ID_FEEDBACK,"FEEDBACK",this.FEEDBACK_IMG_SMALL,this.APP_LINK_OPTIONS_PADDING,25,_27);
this.createAccessoryLink(APP_ID_CALCULATOR,"CALCULATOR",this.CALCULATOR_IMG_SMALL,_26,25,_27);
this.createAccessoryLink(APP_ID_BLOG,"BLOG",this.BLOG_IMG_SMALL,this.APP_LINK_OPTIONS_PADDING,50,_27);
this.createAccessoryLink(APP_ID_API,"API",this.API_IMG_SMALL,_26,50,_27);
this.createAccessoryLink(APP_ID_QUICKHELP,"QUICK HELP",this.HELP_IMG,this.APP_LINK_OPTIONS_PADDING,75,_27);
this.addAppLink(1,APP_ID_MAP,"WebMap",this.WEBMAP_DESC,this.MAP_IMG,_17,_1c,this.MAP_OPTIONS_HEIGHT);
this.addAppLink(1,APP_ID_SPREADSHEET,"WebSheet",this.WEBSHEET_DESC,this.SPREADSHEET_IMG,_17,_1d,this.SPREADSHEET_OPTIONS_HEIGHT);
this.addAppLink(1,APP_ID_WRITER,"WebWriter",this.WEBWRITER_DESC,this.WRITER_IMG,_17,_23,this.WRITER_OPTIONS_HEIGHT);
this.addAppLink(1,null,"Accessories",this.ACCESSORIES_DESC,this.ACCESSORY_IMG,_17,_27,this.ACCESSORY_OPTIONS_HEIGHT);
var _28=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.DEFAULT_OPTIONS_HEIGHT,0,this.APP_LINK_HEIGHT);
this.createSmallLink("Create a new workspace",this.CREATE_WS_IMG,this.APP_LINK_OPTIONS_PADDING,0,_28,new this.SYSTEM.Delegate(this,this.createWorkspace));
this.addAppLink(2,APP_ID_ACCOUNT_MANAGER,"Profile",this.PROFILE_DESC,this.PROFILE_IMG,_18,null,this.DEFAULT_OPTIONS_HEIGHT);
this.addAppLink(2,APP_ID_CONTACT_MANAGER,"ContactManager",this.CONTACT_MAN_DESC,this.CONTACT_MANAGER_IMG,_18,null,this.DEFAULT_OPTIONS_HEIGHT);
this.addAppLink(2,APP_ID_FILE_MANAGER,"FileManager",this.FILEMAN_DESC,this.FILE_MANAGER_IMG,_18,null,this.DEFAULT_OPTIONS_HEIGHT);
this.addAppLink(2,APP_ID_WORKSPACE_MANAGER,"WorkspaceManager",this.WORKSPACE_DESC,this.WORKSPACE_MANAGER_IMG,_18,_28,this.WORKSPACE_MAN_OPTIONS_HEIGHT);
this.addAppLink(2,APP_ID_MEDIA_GALLERY,"MediaGallery",this.MEDIAGALL_DESC,this.MEDIA_GALLERY_IMG,_18,null,this.DEFAULT_OPTIONS_HEIGHT);
this.createSmallLink("Recently Updated Contacts",this.RECENT_UPDATE_IMG,0,0,_19,null,21);
this.column3Div=_19;
if(this.isTempUser){
var _29=new w.Label("infoLabel",["<span style='color: "+this.ALERT_COLOUR+";'><b>This is a guest account</b></span>","To add contacts and track them you need to <span style='color: "+this.ALERT_COLOUR+";'><b>Sign Up</b></span>.","Get the full benefits and security of Peepel by creating an account to allow access to your files from anywhere and track your friends."].join("<br/><br/>"));
_29.setColour(this.FONT_COLOUR);
_29.setPosition(0,30);
_29.attach(_19);
var pad=30;
var _2b=new w.Button("signUpBtn",this.SIGNUP_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE,this.ACCOUNT_BTN_WIDTH,this.ACCOUNT_BTN_HEIGHT);
_2b.setPosition((this.COLUMN_WIDTH/2)-(pad/2)-this.ACCOUNT_BTN_WIDTH,160);
_2b.setValue("Sign Up");
_2b.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.accountBtnClickEvent));
_2b.attach(_19);
var _1b=new w.Button("loginBtn",this.LOGIN_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE,this.ACCOUNT_BTN_WIDTH,this.ACCOUNT_BTN_HEIGHT);
_1b.setPosition(_2b.positionX+_2b.width+pad,_2b.positionY);
_1b.setValue("Login");
_1b.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.accountBtnClickEvent));
_1b.attach(_19);
var _2c=new w.Label("tacLabel","By using this site you agree to our ");
_2c.setPosition(23,150,false,true);
_2c.setColour(this.FONT_COLOUR);
_2c.setFontSize(null,null,this.TAC_FONT_SIZE);
_2c.attach(_19);
var _2d=new w.Link("tacLink","Terms and Conditions");
_2d.setPosition(65,_2c.positionY-9,false,true);
_2d.setFontSize(null,null,this.TAC_FONT_SIZE);
_2d.setColour(this.ALERT_COLOUR);
_2d.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.tacLinkClickEvent));
_2d.attach(_19);
this.infoLabel=_29;
this.signUpBtn=_2b;
this.loginBtn=_1b;
this.tacLabel=_2c;
this.tacLink=_2d;
}else{
this.addRecentUpdates();
}
var _2e=this.SYSTEM.Dom.createImage(this.PP_IMG_SRC,null,this.PP_DIV_WIDTH,this.PP_DIV_HEIGHT,0);
_2e.style.bottom=this.PP_DIV_BOTTOM+"px";
_2e.style.cursor="pointer";
_14.appendChild(_2e);
var _2f=new w.Label("hintLabel","<b>Hint</b>: Hold down the control (<b>Ctrl</b>) key to open multiple applications.");
_2f.setPosition(0,0,false,true);
_2f.setColour(this.FONT_COLOUR);
_2f.setFontSize(null,null,10);
_2f.setValue(_2f.getText());
_2f.attach(_19);
this.hintLabel=_2f;
this.createSmallLink("",widgetNotifier_t.prototype.EXPAND_BTN_IMG,this.COLUMN_3_LEFT+30,this.MENU_BG_CORNER_SIDE,_14);
this.notifierLabel=this.appLinkWidgets[this.appLinkWidgets.length-1];
var _30=new w.Label("logOffLabel","Log Off");
_30.setPosition(this.PADDING,this.MENU_BG_CORNER_SIDE,true);
_30.setColour(this.FONT_COLOUR);
_30.setBold();
_30.setCursor("pointer");
_30.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.logoutClickEvent));
_30.attach(_14);
var _31=new w.Button("bubbleBtn",this.BUBBLE_IMG,null,this.BUBBLE_WIDTH,this.BUBBLE_HEIGHT);
_31.setPosition(-100,-100);
_31.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.bubbleClickEvent));
document.body.appendChild(_e);
this.launchBtn=_a;
this.welcomeLabel=_1a;
this.menuDiv=_e;
this.contentDiv=_14;
this.bubbleBtn=_31;
this.pocketPeepelImage=_2e;
this.recentSpreadsheetList=_1e;
this.recentWriterList=_24;
this.spreadsheetTemplateList=_1f;
this.writerTemplateList=_25;
}
catch(ex){
jsExDebug("launcher_createDom",ex);
}
}
function launcher_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"allclickprop","allclickprop",this.globalClickEvent,this);
this.SYSTEM.Event.attachEvent(this.pocketPeepelImage,"onclick","click",this.pocketPeepelClickEvent,this);
this.windowResizeIndex=this.SYSTEM.Event.notifyWindowResize(new this.SYSTEM.Delegate(this,this.windowResizeEvent));
this.keyDownIndex=this.SYSTEM.Event.notifyKeyDownEvent(this.keyDownEvent,this);
this.keyUpIndex=this.SYSTEM.Event.notifyKeyUpEvent(this.keyUpEvent,this);
}
catch(ex){
jsExDebug("launcher_bindEvents",ex);
}
}
function launcher_unbindEvents(){
try{
this.SYSTEM.Event.detachEvent(this.widgetElement,"allclickprop","allclickprop");
this.SYSTEM.Event.detachEvent(this.pocketPeepelImage,"onclick","click");
this.SYSTEM.Event.removeWindowResizeHandler(this.windowResizeIndex);
this.windowResizeIndex=null;
this.SYSTEM.Event.removeKeyDownHandler(this.keyDownIndex);
this.SYSTEM.Event.removeKeyUpHandler(this.keyUpIndex);
}
catch(ex){
jsExDebug("launcher_unbindEvents",ex);
}
}
function launcher_updateUnreadNotifications(_32){
try{
this.notifierLabel.setText(_32+" unread notifications");
}
catch(ex){
jsExDebug("launcher_updateUnreadNotifications",ex);
}
}
function launcher_cascadeWindows(){
try{
this.closeMenu();
this.SYSTEM.WINDOW_MANAGER.cascadeFrames();
}
catch(ex){
jsExDebug("launcher_cascadeWindows",ex);
}
}
function launcher_stackWindows(){
try{
this.closeMenu();
this.SYSTEM.WINDOW_MANAGER.stackFrames();
}
catch(ex){
jsExDebug("launcher_stackWindows",ex);
}
}
function launcher_createWorkspace(){
function goAhead(){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WORKSPACE_MANAGER,true);
}
catch(ex){
jsExDebug("launcher_createWorkspace: goAhead",ex);
}
}
try{
this.closeMenu();
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,goAhead),"Peepel","Launching WorkspaceManager...");
}
catch(ex){
jsExDebug("launcher_createWorkspace",ex);
}
}
function launcher_closeAll(){
try{
this.closeMenu();
this.SYSTEM.APPLICATION_MANAGER.closeAll();
}
catch(ex){
jsExDebug("launcher_closeAll",ex);
}
}
function launcher_launchApp(_33,_34){
function goAhead(){
try{
this.SYSTEM.APPLICATION_MANAGER.launch.apply(this.SYSTEM.APPLICATION_MANAGER,_35);
}
catch(ex){
jsExDebug("launcher_launchApp: goAhead",ex);
}
}
try{
var _35=[_33];
for(var i=2;i<arguments.length;i++){
_35.push(arguments[i]);
}
this.closeMenu();
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,goAhead),"Peepel","Launching "+_34+"...");
}
catch(ex){
jsExDebug("launcher_launchApp",ex);
}
}
function launcher_createList(_37,_38,x,y,_3b,_3c,_3d){
try{
var _3e=new this.SYSTEM.Widget.Label("titleLabel_"+_37,_37);
_3e.setPosition(x+this.PADDING,y);
_3e.setBold();
_3e.setColour(this.FONT_COLOUR_WHITE);
_3e.attach(_3b);
var _3f=new this.SYSTEM.Widget.ItemList("list_"+_37);
_3f.setPosition(x,y+this.ICON_SIDE+this.PADDING);
_3f.setVertical(this.LIST_WIDTH);
_3f.align(_3f.LEFT_ALIGN);
_3f.disallowBorder();
_3f.disallowItemTextPadding();
_3f.attach(_3b);
if(_3c){
_3e.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_3c);
}
if(_3d){
_3f.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_3d);
}
this.listWidgets.push(_3e);
this.listWidgets.push(_3f);
return _3f;
}
catch(ex){
jsExDebug("launcher_createList",ex);
}
}
function launcher_createAccessoryLink(_40,_41,_42,x,y,_45){
try{
var _46=(this.COLUMN_WIDTH/2)-this.ACCESSORY_ICON_WIDTH;
var _47=new this.SYSTEM.Widget.Button("icon_"+_41,_42,null,this.ACCESSORY_ICON_WIDTH,this.ACCESSORY_ICON_HEIGHT);
_47.setValue(_40+"_"+_41);
_47.setPosition(x,y);
_47.attach(_45);
var _48=new this.SYSTEM.Widget.Label("titleLabel_"+_41,_41);
_48.setPosition(x+this.ACCESSORY_TITLE_LEFT,y+this.ACCESSORY_TITLE_TOP);
_48.setDimensions(_46);
_48.setColour(this.FONT_COLOUR_WHITE);
_48.setFontSize(null,this.ACCESSORY_TITLE_SIZE);
_48.setBold();
_48.setValue(_40+"_"+_41);
_48.attach(_45);
if(_40!=null){
_47.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.appOpenEvent));
_48.setCursor("pointer");
_48.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.appOpenEvent));
}else{
_47.imageElement.style.cursor="default";
}
this.appLinkWidgets.push(_47);
this.appLinkWidgets.push(_48);
}
catch(ex){
jsExDebug("launcher_createAccessoryLink",ex);
}
}
function launcher_addAppLink(_49,_4a,_4b,_4c,_4d,_4e,_4f,_50){
try{
var _51=this.appLinkArray[_49].length;
var _52=this.SYSTEM.Dom.createDiv("absolute",this.COLUMN_WIDTH,this.APP_LINK_HEIGHT,0,_51*this.APP_LINK_HEIGHT);
var _53=new this.SYSTEM.Widget.Button("icon_"+_4b,_4d,null,this.APP_ICON_WIDTH,this.APP_ICON_HEIGHT);
_53.setValue(_4a+"_"+_4b);
_53.setPosition(0,0);
_53.attach(_52);
var _54=new this.SYSTEM.Widget.Label("titleLabel_"+_4b,_4b);
_54.setPosition(this.APP_TITLE_LEFT,this.APP_TITLE_TOP);
_54.setDimensions(this.APP_LINK_LBL_WIDTH);
_54.setColour(this.FONT_COLOUR_WHITE);
_54.setFontSize(null,this.APP_TITLE_SIZE);
_54.setBold();
_54.setValue(_53.getValue());
_54.attach(_52);
var _55=new this.SYSTEM.Widget.Label("descLabel_"+_4b,_4c);
_55.setPosition(this.APP_TITLE_LEFT,this.APP_TITLE_TOP+20);
_55.setDimensions(this.APP_LINK_LBL_WIDTH);
_55.setFontSize(null,null,this.APP_LINK_DESC_SIZE);
_55.setColour(this.FONT_COLOUR);
_55.setValue(_53.getValue());
_55.attach(_52);
if(_4f){
var _56=new this.SYSTEM.Widget.Label("moreLabel","more");
_56.setPosition(_53.width+this.APP_LINK_LBL_WIDTH-40,_53.height);
_56.setColour(this.FONT_COLOUR);
_56.setCursor("pointer");
_56.setValue(_49+"_"+_51);
_56.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.moreLabelClickEvent));
_56.attach(_52);
this.appLinkWidgets.push(_56);
}
this.appLinkArray[_49].push({div:_52,expandDom:_4f,moreLabel:_56,optionsHeight:_50});
if(_4a){
_53.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.appOpenEvent));
_54.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.appOpenEvent));
_55.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.appOpenEvent));
_54.setCursor("pointer");
_55.setCursor("pointer");
}else{
_53.imageElement.style.cursor="default";
}
_4e.appendChild(_52);
this.appLinkWidgets.push(_53);
this.appLinkWidgets.push(_54);
this.appLinkWidgets.push(_55);
}
catch(ex){
jsExDebug("launcher_addAppLink",ex);
}
}
function launcher_createSmallLink(_57,_58,x,y,_5b,_5c,_5d){
try{
var _5e=(_5d?_5d:this.ICON_SIDE);
var _58=new this.SYSTEM.Widget.Button("icon_"+_57,_58,null,_5e,_5e);
_58.setPosition(x,y);
_58.attach(_5b);
var _5f=new this.SYSTEM.Widget.Label("titleLabel_"+_57,_57);
_5f.setPosition(x+_58.width+this.PADDING,y);
_5f.setColour(this.FONT_COLOUR);
_5f.setBold();
_5f.attach(_5b);
if(_5c){
_58.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_5c);
_5f.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_5c);
_5f.setCursor("pointer");
}else{
_58.imageElement.style.cursor="default";
_5f.setCursor("default");
}
this.appLinkWidgets.push(_58);
this.appLinkWidgets.push(_5f);
}
catch(ex){
jsExDebug("launcher_createSmallLink",ex);
}
}
function launcher_fillRecentLists(_60){
try{
this.recentSpreadsheetList.clearList();
this.recentWriterList.clearList();
var _61=0;
var _62=0;
var _63=null;
for(var id in _60){
switch(_60[id].type){
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
_63=this.recentSpreadsheetList;
_61++;
break;
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
_63=this.recentWriterList;
_62++;
break;
}
_63.addItem("{"+_60[id].type+"}"+id,"<span style=\"color:"+this.FONT_COLOUR+"\">"+_60[id].name+"</span>");
}
if(!_61){
this.recentSpreadsheetList.addItem(null,"<span style=\"color:"+this.FONT_COLOUR+"\"><i>None</i></span>");
}
if(!_62){
this.recentWriterList.addItem(null,"<span style=\"color:"+this.FONT_COLOUR+"\"><i>None</i></span>");
}
}
catch(ex){
jsExDebug("launcher_fillRecentLists",ex);
}
}
function launcher_openMenu(){
function move(){
try{
if(_65<=_66){
var _67=_65/_66;
me.openExpandDiv.style.left=(_67*parseInt(me.menuDiv.style.left))+"px";
me.openExpandDiv.style.bottom=(_67*parseInt(me.menuDiv.style.top))+"px";
me.openExpandDiv.style.width=(_67*parseInt(me.menuDiv.style.width))+"px";
me.openExpandDiv.style.height=(_67*parseInt(me.menuDiv.style.height))+"px";
me.SYSTEM.Dom.setElementOpacity(me.openExpandDiv,_67+me.MIN_MENU_CHANGE_OPACITY);
if(_65==0){
document.body.appendChild(me.openExpandDiv);
}
_65++;
setTimeout(move,_69);
return;
}else{
if(me.openExpandDiv.parentNode==document.body){
document.body.removeChild(me.openExpandDiv);
setTimeout(move,10);
return;
}
}
me.expandAppLink(1,3);
me.SYSTEM.Dom.showInterfaceCover("black",0.6);
me.menuDiv.style.display="block";
if(!me.recentSpreadsheetList.getItemCount()){
me.recentSpreadsheetList.addItem(null,"<span style=\"color:"+me.FONT_COLOUR+"\"><i>Loading...</i></span>");
}
if(!me.recentWriterList.getItemCount()){
me.recentWriterList.addItem(null,"<span style=\"color:"+me.FONT_COLOUR+"\"><i>Loading...</i></span>");
}
me.SYSTEM.Filesystem.refreshRecentFiles(me.recentFilesDelegate);
me.updateUnreadNotifications(me.SYSTEM.Notifier.getNotifierWidget().unreadCount);
me.getRecentContactLocations();
me.menuVisible=true;
me.menuChanging=false;
}
catch(ex){
jsExDebug("launcher_openMenu: move",ex);
}
}
try{
if(this.menuChanging||this.menuVisible){
return;
}
var _6a=this.isTempUser;
this.isTempUser=this.SYSTEM.UserDetails.isTempUser();
if(_6a&&!this.isTempUser){
this.loginBtn.attach(this.contentDiv);
this.loginBtn.widgetElement.style.left="";
this.loginBtn.setPosition(this.HELP_BTN_RIGHT+this.ICON_SIDE+this.ICON_SIDE,this.MENU_BG_CORNER_SIDE,true);
this.signUpBtn.cleanUp();
this.infoLabel.cleanUp();
this.tacLabel.cleanUp();
this.tacLink.cleanUp();
this.signUpBtn=null;
this.infoLabel=null;
this.tacLabel=null;
this.tacLink=null;
this.addRecentUpdates();
this.userDetailsRefreshCallback();
}
var me=this;
var _69=this.MENU_CHANGE_INCREMENT;
var _66=this.MENU_CHANGE_STEPS;
var _65=(this.SYSTEM.Settings.get("animate_launcher")?0:_66);
this.menuChanging=true;
this.cancelAutoOpen=true;
move();
}
catch(ex){
jsExDebug("launcher_openMenu",ex);
}
}
function launcher_closeMenu(){
function move(){
try{
if(_6b>=0){
var _6c=_6b/_6d;
me.openExpandDiv.style.left=(_6c*parseInt(me.menuDiv.style.left))+"px";
me.openExpandDiv.style.bottom=(_6c*parseInt(me.menuDiv.style.top))+"px";
me.openExpandDiv.style.width=(_6c*parseInt(me.menuDiv.style.width))+"px";
me.openExpandDiv.style.height=(_6c*parseInt(me.menuDiv.style.height))+"px";
me.SYSTEM.Dom.setElementOpacity(me.openExpandDiv,_6c+me.MIN_MENU_CHANGE_OPACITY);
if(_6b==_6d){
document.body.appendChild(me.openExpandDiv);
}
_6b--;
setTimeout(move,_6f);
return;
}else{
if(me.openExpandDiv.parentNode==document.body){
document.body.removeChild(me.openExpandDiv);
setTimeout(move,10);
}
}
me.menuDiv.style.display="none";
me.menuVisible=false;
me.menuChanging=false;
}
catch(ex){
jsExDebug("launcher_closeMenu",ex);
}
}
try{
if(this.menuChanging||!this.menuVisible||this.ctrlKeyDown){
return;
}
var me=this;
var _6f=this.MENU_CHANGE_INCREMENT;
var _6d=this.MENU_CHANGE_STEPS;
var _6b=(this.SYSTEM.Settings.get("animate_launcher")?_6d:0);
this.menuChanging=true;
this.SYSTEM.Dom.hideInterfaceCover();
move();
}
catch(ex){
jsExDebug("launcher_closeMenu",ex);
}
}
function launcher_userDetailsRefreshCallback(){
try{
if(this.welcomeLabel){
var _70="Welcome ";
if(this.isTempUser){
_70+="<span style='color: "+this.ALERT_COLOUR+";'>"+this.SYSTEM.UserDetails.getScreenName()+"!</span>";
}else{
_70+=this.SYSTEM.UserDetails.getScreenName()+"!";
}
this.welcomeLabel.setText(_70);
}
}
catch(ex){
jsExDebug("launcher_userDetailsRefreshCallback",ex);
}
}
function launcher_contactsRefreshCallback(){
try{
if(this.waitForContactsToLoadBeforeShowingRecentUpdates){
this.showRecentUpdates();
}
}
catch(ex){
jsExDebug("launcher_contactsRefreshCallback",ex);
}
}
function launcher_getRecentContactLocations(){
try{
var _71=[];
var _72=[];
var _73=null;
var _74=null;
var _75=null;
var _76=null;
var _77=this.SYSTEM.Contacts.getAcceptedContacts();
var _78=null;
for(var i=0;i<_77.length;i++){
_78=_77[i];
_76=this.SYSTEM.Tracking.getUserLocation(_78.userId);
if(_76&&_76.guid){
_74=_76.dateFound.getTime();
_75=(_76.placeLabel?_76.placeLabel:"Unknown");
_71[_74]={contactId:_78.contactId,place:_75};
_72.push(_74);
}
}
sortListDesc(_72);
this.contactsByUpdateTime=[];
for(var i=0;i<this.NUMBER_OF_RECENT_UPDATES_SHOWN;i++){
if(_72[i]){
this.contactsByUpdateTime[_72[i]]=_71[_72[i]];
}
}
if(this.SYSTEM.Contacts.initialised){
this.showRecentUpdates();
}else{
this.waitForContactsToLoadBeforeShowingRecentUpdates=true;
}
}
catch(ex){
jsExDebug("launcher_getRecentContactLocations",ex);
}
}
function launcher_showRecentUpdates(){
try{
if(this.isTempUser){
return;
}
var _7a=null;
var _7b=0;
var _7c=null;
for(var _7d in this.contactsByUpdateTime){
_7c=this.recentUpdatesDom[_7b];
var _7a=this.SYSTEM.Contacts.getContact(this.contactsByUpdateTime[_7d].contactId);
_7c.avatar.src=_7a.getAvatarPath(_7a.AVATAR_CONTACT_PROFILE);
_7c.avatar.style.display="block";
var _7e="Last seen in: <span style=\"font-size:"+this.RU_UNAME_LBL_SIZE+"px; font-weight: bold; color: white;\">"+this.contactsByUpdateTime[_7d].place+"</span><br/><span style=\"font-size:0.8em;\">"+getAgeTextFromMilliseconds(_7d)+"</span>";
_7c.lastSeenLabel.setText(_7e);
_7c.userNameLabel.setText(_7a.userName);
this.currentRecentContactIds[_7b]=this.contactsByUpdateTime[_7d].contactId;
_7b++;
this.contactsByUpdateTime[_7d].contactId=null;
this.contactsByUpdateTime[_7d].place=null;
this.contactsByUpdateTime[_7d]=null;
}
if(_7b<this.NUMBER_OF_RECENT_UPDATES_SHOWN){
for(var _7b;_7b<this.NUMBER_OF_RECENT_UPDATES_SHOWN;_7b++){
_7c=this.recentUpdatesDom[_7b];
_7c.avatar.src="";
_7c.avatar.style.display="none";
_7c.lastSeenLabel.setText("");
_7c.userNameLabel.setText("");
}
}
this.contactsByUpdateTime=null;
}
catch(ex){
jsExDebug("launcher_showRecentUpdates",ex);
}
}
function launcher_expandAppLink(_7f,_80){
try{
var _81=null;
var top=null;
var _83=this.appLinkArray[_7f][_80].optionsHeight;
for(var i=0;i<this.appLinkArray[_7f].length;i++){
_81=this.appLinkArray[_7f][i];
top=(i*this.APP_LINK_HEIGHT);
if(i==_80){
_81.div.style.height=(_83+this.APP_LINK_HEIGHT)+"px";
_81.div.appendChild(_81.expandDom);
_81.moreLabel.setBold();
_81.moreLabel.setColour(this.APP_LINK_MORE_HIGHLIGHT_COLOUR);
}else{
if(i>_80){
top+=_83;
}
if(_81.expandDom&&_81.expandDom.parentNode==_81.div){
_81.div.removeChild(_81.expandDom);
_81.div.style.height=this.APP_LINK_HEIGHT+"px";
_81.moreLabel.disallowBold();
_81.moreLabel.setColour(this.FONT_COLOUR);
}
}
_81.div.style.top=top+"px";
}
}
catch(ex){
jsExDebug("launcher_expandAppLink",ex);
}
}
function launcher_addRecentUpdates(){
try{
if(this.recentUpdatesDom.length){
return;
}
var _85=null;
var _86=null;
var _87=null;
var top=30;
for(var i=0;i<this.NUMBER_OF_RECENT_UPDATES_SHOWN;i++){
_85=this.SYSTEM.Dom.createImage(null,"absolute",this.RU_CONTACT_AVATAR_SIDE,this.RU_CONTACT_AVATAR_SIDE,0,top);
_85.style.display="none";
_85.style.cursor="pointer";
this.SYSTEM.Event.attachEvent(_85,"onclick","click",this.avatarClickEvent,this,false,i);
this.column3Div.appendChild(_85);
_86=new this.SYSTEM.Widget.Label("userNameLabel");
_86.setPosition(this.RU_CONTACT_AVATAR_SIDE+this.PADDING,top);
_86.setColour(this.FONT_COLOUR);
_86.setFontSize(null,null,this.RU_UNAME_LBL_SIZE);
_86.setBold();
_86.attach(this.column3Div);
_87=new this.SYSTEM.Widget.Label("lastSeenLabel");
_87.setPosition(this.RU_CONTACT_AVATAR_SIDE+this.PADDING,top+17);
_87.setColour(this.FONT_COLOUR);
_87.attach(this.column3Div);
this.recentUpdatesDom.push({avatar:_85,lastSeenLabel:_87,userNameLabel:_86});
top+=(this.RU_CONTACT_AVATAR_SIDE+this.PADDING+30);
}
}
catch(ex){
jsExDebug("launcher_addRecentUpdates",ex);
}
}
function launcher_launchBtnClickEvent(){
try{
if(this.menuVisible){
this.closeMenu();
}else{
this.openMenu();
}
}
catch(ex){
jsExDebug("launcher_launchBtnClickEvent",ex);
}
}
function launcher_globalClickEvent(_8a,me){
function closeIf(_8c){
if(_8c&&_8c.parentNode){
if(_8c.parentNode==me.widgetElement||_8c.parentNode==me.menuDiv){
return;
}else{
closeIf(_8c.parentNode);
}
}else{
me.closeMenu();
}
}
try{
closeIf(_8a?(_8a.target?_8a.target:_8a.srcElement):null);
}
catch(ex){
jsExDebug("launcher_globalClickEvent",ex);
}
}
function launcher_pocketPeepelClickEvent(_8d,me){
try{
me.closeMenu();
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_BROWSER,me.SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php"));
}
catch(ex){
jsExDebug("launcher_pocketPeepelClickEvent",ex);
}
}
function launcher_windowResizeEvent(_8f,_90){
try{
this.menuDiv.style.left=((_8f-this.MENU_WIDTH)/2)+"px";
this.menuDiv.style.top=((_90-this.MENU_HEIGHT)/2)+"px";
}
catch(ex){
jsExDebug("launcher_windowResizeEvent",ex);
}
}
function launcher_appOpenEvent(_91,_92){
try{
var _93=_92.getValue().split("_");
this.launchApp(parseInt(_93[0]),_93[1]);
}
catch(ex){
jsExDebug("launcher_appOpenEvent",ex);
}
}
function launcher_recentDocumentSelectEvent(_94,_95){
try{
var _96=_95.getItemValue(_95.clickedIndex);
var _97=parseInt(_96.replace(/^\{(\d)\}.*$/,"$1"));
var id=_96.split("{"+_97+"}")[1];
switch(_97){
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
this.launchApp(APP_ID_SPREADSHEET,"Spreadsheet",id);
break;
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
this.launchApp(APP_ID_WRITER,"Writer",id);
break;
}
}
catch(ex){
jsExDebug("launcher_recentDocumentSelectEvent",ex);
}
}
function launcher_templateSelectEvent(_99,_9a){
try{
var _9b=_9a.getItemValue(_9a.clickedIndex);
var _9c=parseInt(_9b.replace(/^\{(\d)\}.*$/,"$1"));
var _9d=_9b.split("{"+_9c+"}")[1];
switch(_9c){
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
this.launchApp(APP_ID_SPREADSHEET,"Spreadsheet",null,_9d);
break;
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
this.launchApp(APP_ID_WRITER,"Writer",null,_9d);
break;
}
}
catch(ex){
jsExDebug("launcher_templateSelectEvent",ex);
}
}
function launcher_existingFileClickEvent(_9e,_9f){
try{
var d=new this.SYSTEM.Dialogue.Open(null,null,_9f.getValue());
this.closeMenu();
}
catch(ex){
jsExDebug("launcher_existingFileClickEvent",ex);
}
}
function launcher_importFileClickEvent(){
try{
this.launchApp(APP_ID_IMPORT);
}
catch(ex){
jsExDebug("launcher_importFileClickEvent",ex);
}
}
function launcher_createWorkspaceClickEvent(){
try{
this.launchApp(APP_ID_WORKSPACE_MANAGER,"Workspace Manager",true);
}
catch(ex){
jsExDebug("launcher_createWorkspaceClickEvent",ex);
}
}
function launcher_avatarClickEvent(_a1,me,_a3){
function goAhead(){
try{
var app=me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_MAP);
app.addContactToMap(SYSTEM.Contacts.getContact(me.currentRecentContactIds[_a3]));
}
catch(ex){
jsExDebug("launcher_avatarClickEvent: goAhead",ex);
}
}
try{
me.SYSTEM.Tooltip.showLoading(new me.SYSTEM.Delegate(me,goAhead),"Peepel","Launching Map...");
me.closeMenu();
}
catch(ex){
jsExDebug("launcher_avatarClickEvent",ex);
}
}
function launcher_moreLabelClickEvent(_a5,_a6){
try{
var _a7=_a6.getValue().split("_");
this.expandAppLink(_a7[0],parseInt(_a7[1]));
}
catch(ex){
jsExDebug("launcher_moreLabelClickEvent",ex);
}
}
function launcher_bubbleClickEvent(_a8,_a9){
try{
this.launchApp(APP_ID_FORUM,"Forum");
}
catch(ex){
jsExDebug("launcher_bubbleClickEvent",ex);
}
}
function launcher_logoutClickEvent(){
function apiRegistryCallback(){
try{
this.SYSTEM.Security.handleDeauthentication(0);
}
catch(ex){
jsExDebug("launcher_logoutClickEvent: apiRegistryCallback",ex);
}
}
function logoutCallback(_aa){
try{
if(_aa){
this.SYSTEM.ApiRegistry.deRegister(new this.SYSTEM.Delegate(this,apiRegistryCallback));
}else{
jsDebug("deauth failed: check app/mal logs");
}
}
catch(ex){
jsExDebug("launcher_logoutClickEvent: logoutCallback",ex);
}
}
try{
this.SYSTEM.Security.deauthenticate(new delegate_t(this,logoutCallback));
}
catch(ex){
jsExDebug("launcher_logoutClickEvent",ex);
}
}
function launcher_keyDownEvent(key,me){
try{
if(key.ctrlKey){
me.ctrlKeyDown=true;
me.hintLabel.setColour("red");
me.hintLabel.setText("Launcher locked (<b>Ctrl</b> key down)");
}
}
catch(ex){
jsExDebug("launcher_keyDownEvent",ex);
}
}
function launcher_keyUpEvent(key,me){
try{
if(!key.ctrlKey){
me.ctrlKeyDown=false;
me.hintLabel.setColour(me.FONT_COLOUR);
me.hintLabel.setText(me.hintLabel.getValue());
}
}
catch(ex){
jsExDebug("launcher_keyUpEvent",ex);
}
}
function launcher_accountBtnClickEvent(_af,_b0){
try{
this.closeMenu();
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_AUTH,_b0.getValue());
}
catch(ex){
jsExDebug("launcher_accountBtnClickEvent",ex);
}
}
function launcher_tacLinkClickEvent(_b1,_b2){
try{
this.closeMenu();
var d=new this.SYSTEM.Dialogue.TextDialogue(null,"Peepel.com Terms and Conditions","js/xml/tac.xml",450,450);
}
catch(ex){
jsExDebug("launcher_tacLinkClickEvent",ex);
}
}

try{
widgetLogin_t.prototype=new widget_t();
widgetLogin_t.prototype.constructor=widgetLogin_t;
widgetLogin_t.prototype.cleanUp=widgetLogin_cleanUp;
widgetLogin_t.prototype.widgetLogin_super=widget_t.prototype.constructor;
widgetLogin_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetLogin_t.prototype.createDom=widgetLogin_createDom;
widgetLogin_t.prototype.bindEvents=widgetLogin_bindEvents;
widgetLogin_t.prototype.attach=widgetLogin_attach;
widgetLogin_t.prototype.updateDimensions=widgetLogin_updateDimensions;
widgetLogin_t.prototype.setName=widgetLogin_setName;
widgetLogin_t.prototype.userDetailsRefreshCallback=widgetLogin_userDetailsRefreshCallback;
widgetLogin_t.prototype.logoutClickEvent=widgetLogin_logoutClickEvent;
widgetLogin_t.prototype.btnClickEvent=widgetLogin_btnClickEvent;
widgetLogin_t.prototype.HEIGHT=32;
widgetLogin_t.prototype.LOGOUT_RIGHT=5;
widgetLogin_t.prototype.LOGOUT_TOP=10;
widgetLogin_t.prototype.BTN_IMG="img/app/system/login/person";
widgetLogin_t.prototype.BTN_SIDE=16;
widgetLogin_t.prototype.NAME_TOP=8;
widgetLogin_t.prototype.LBL_COLOUR="rgb(255,255,255)";
}
catch(ex){
jsExDebug("notifier_t.prototype",ex);
}
function widgetLogin_t(_1,_2){
try{
this.widgetLogin_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_2){
this.createDom();
this.bindEvents();
}
this.userDetailsIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_LOAD,new this.SYSTEM.Delegate(this,this.userDetailsRefreshCallback));
this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_SAVE,new this.SYSTEM.Delegate(this,this.userDetailsRefreshCallback),this.userDetailsIndex);
}
catch(ex){
jsExDebug("widgetLogin_t",ex);
}
}
function widgetLogin_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsIndex);
me.userDetailsIndex=null;
}
me.nameLabel.cleanUp();
me.nameLabel=null;
me.btn.cleanUp();
me.btn=null;
me.logoutLabel.cleanUp();
me.logoutLabel=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetLogin_cleanUp",ex);
}
}
function widgetLogin_createDom(){
try{
this.widgetElement.style.zIndex=TASK_MANAGER_ZINDEX;
var _4=this.SYSTEM.Dom.createDiv("absolute");
_4.style.width="100%";
_4.style.height="100%";
_4.style.backgroundColor="rgb(0,0,0)";
this.SYSTEM.Dom.setElementOpacity(_4,this.SYSTEM.Launcher.OPACITY);
this.widgetElement.appendChild(_4);
var _5=new this.SYSTEM.Widget.Label("logoutLabel","(Not you?)");
_5.setPosition(this.LOGOUT_RIGHT,this.LOGOUT_TOP,true);
_5.setColour(this.LBL_COLOUR);
_5.setCursor("pointer");
_5.setFontSize(false,false,11);
_5.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.logoutClickEvent));
_5.attach(this.widgetElement);
var _6=new this.SYSTEM.Widget.Label("nameLabel");
_6.setColour(this.LBL_COLOUR);
_6.setCursor("pointer");
_6.disallowWrap();
_6.setFontSize(false,false,13);
_6.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.btnClickEvent));
_6.attach(this.widgetElement);
var _7=new this.SYSTEM.Widget.Button("btn",this.BTN_IMG,null,this.BTN_SIDE,this.BTN_SIDE);
_7.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.btnClickEvent));
_7.attach(this.widgetElement);
this.nameLabel=_6;
this.btn=_7;
this.logoutLabel=_5;
}
catch(ex){
jsExDebug("widgetLogin_createDom",ex);
}
}
function widgetLogin_bindEvents(){
try{
}
catch(ex){
jsExDebug("widgetLogin_bindEvents",ex);
}
}
function widgetLogin_attach(_8){
try{
this.parentDiv=_8;
this.parentDiv.appendChild(this.widgetElement);
this.updateDimensions();
}
catch(ex){
jsExDebug("widgetLogin_attach",ex);
}
}
function widgetLogin_updateDimensions(){
try{
this.nameLabel.setPosition(this.logoutLabel.positionX+this.logoutLabel.getClientWidth()+this.pad,this.NAME_TOP,true);
this.btn.setPosition(this.nameLabel.positionX+this.nameLabel.getClientWidth()+this.pad,(this.HEIGHT-this.BTN_SIDE)/2,true);
this.setDimensions(this.btn.positionX+this.btn.width+this.pad,this.HEIGHT);
}
catch(ex){
jsExDebug("widgetLogin_updateDimensions",ex);
}
}
function widgetLogin_setName(_9){
try{
this.nameLabel.setText(_9);
this.updateDimensions();
}
catch(ex){
jsExDebug("widgetLogin_setName",ex);
}
}
function widgetLogin_userDetailsRefreshCallback(){
try{
this.setName(this.SYSTEM.UserDetails.userName);
this.SYSTEM.APPLICATION_MANAGER.getTaskListWidget().windowResizeEvent(this.SYSTEM.Environment.SCREEN_WIDTH);
}
catch(ex){
jsExDebug("widgetLogin_userDetailsRefreshCallback",ex);
}
}
function widgetLogin_logoutClickEvent(){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_AUTH);
}
catch(ex){
jsExDebug("widgetLogin_logoutClickEvent",ex);
}
}
function widgetLogin_btnClickEvent(){
try{
this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_ACCOUNT_MANAGER,"Peepel","Launching Profile...");
}
catch(ex){
jsExDebug("widgetLogin_btnClickEvent",ex);
}
}

try{
selectTable_t.prototype=new widget_t();
selectTable_t.prototype.constructor=selectTable_t;
selectTable_t.prototype.cleanUp=selectTable_cleanUp;
selectTable_t.prototype.selectTable_super=widget_t.prototype.constructor;
selectTable_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
selectTable_t.prototype.createDom=selectTable_createDom;
selectTable_t.prototype.bindEvents=selectTable_bindEvents;
selectTable_t.prototype.unbindEvents=selectTable_unbindEvents;
selectTable_t.prototype.setDimensions=selectTable_setDimensions;
selectTable_t.prototype.addRow=selectTable_addRow;
selectTable_t.prototype.clearList=selectTable_clearList;
selectTable_t.prototype.autoSizeColumns=selectTable_autoSizeColumns;
selectTable_t.prototype.allowExtraSelectedRow=selectTable_allowExtraSelectedRow;
selectTable_t.prototype.disallowExtraSelectedRow=selectTable_disallowExtraSelectedRow;
selectTable_t.prototype.getMinimumColumnWidth=selectTable_getMinimumColumnWidth;
selectTable_t.prototype.setColumnWidth=selectTable_setColumnWidth;
selectTable_t.prototype.setColumnNames=selectTable_setColumnNames;
selectTable_t.prototype.setSelectedValue=selectTable_setSelectedValue;
selectTable_t.prototype.setSelectedIndex=selectTable_setSelectedIndex;
selectTable_t.prototype.setCellContent=selectTable_setCellContent;
selectTable_t.prototype.getColumnWidth=selectTable_getColumnWidth;
selectTable_t.prototype.getSelectedIndex=selectTable_getSelectedIndex;
selectTable_t.prototype.getSelectedValue=selectTable_getSelectedValue;
selectTable_t.prototype.getRowIndexFromValue=selectTable_getRowIndexFromValue;
selectTable_t.prototype.getRowCount=selectTable_getRowCount;
selectTable_t.prototype.getScrollTop=selectTable_getScrollTop;
selectTable_t.prototype.sortColumn=selectTable_sortColumn;
selectTable_t.prototype.showExtraSelectedContent=selectTable_showExtraSelectedContent;
selectTable_t.prototype.hideExtraSelectedContent=selectTable_hideExtraSelectedContent;
selectTable_t.prototype.setDefaultRowBackgroundColour=selectTable_setDefaultRowBackgroundColour;
selectTable_t.prototype.scrollToSelectedIndex=selectTable_scrollToSelectedIndex;
selectTable_t.prototype.scrollTo=selectTable_scrollTo;
selectTable_t.prototype.rowMouseOverEvent=selectTable_rowMouseOverEvent;
selectTable_t.prototype.rowMouseDownEvent=selectTable_rowMouseDownEvent;
selectTable_t.prototype.widgetMouseOutEvent=selectTable_widgetMouseOutEvent;
selectTable_t.prototype.resizeColumnStartHandler=selectTable_resizeColumnStartHandler;
selectTable_t.prototype.resizeColumnEventHandler=selectTable_resizeColumnEventHandler;
selectTable_t.prototype.resizeColumnEndEventHandler=selectTable_resizeColumnEndEventHandler;
selectTable_t.prototype.tableContainerScrollEvent=selectTable_tableContainerScrollEvent;
selectTable_t.prototype.headerCellMouseDownEvent=selectTable_headerCellMouseDownEvent;
selectTable_t.prototype.DEFAULT_ROW_HEIGHT=20;
selectTable_t.prototype.SCROLLBAR_WIDTH=25;
selectTable_t.prototype.PIXEL_IMG="img/site/global/pixel.png";
selectTable_t.prototype.RESIZE_COLOUR="rgb(128,128,128)";
selectTable_t.prototype.HEADER_BG_COLOUR="rgb(230,230,230)";
selectTable_t.prototype.CELL_PADDING=5;
selectTable_t.prototype.SORT_ASC_IMG="img/app/app/contactmanager/sort_asc.png";
selectTable_t.prototype.SORT_DESC_IMG="img/app/app/contactmanager/sort_desc.png";
selectTable_t.prototype.SORT_PADDING=4;
selectTable_t.prototype.LIGHT_TEXT_BG="rgb(86,86,86)";
selectTable_t.prototype.LIGHT_TEXT_ALT_COLOUR="rgb(104,104,104)";
selectTable_t.prototype.DARK_TEXT_BG="rgb(255,255,255)";
selectTable_t.prototype.DARK_TEXT_ALT_COLOUR="rgb(204,204,204)";
selectTable_t.prototype.BG_COLOUR="rgb(160,160,160)";
selectTable_t.prototype.COLUMN_HEADING_COLOUR="rgb(0,0,0)";
selectTable_t.prototype.SORT_ASC=1;
selectTable_t.prototype.SORT_DESC=2;
selectTable_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
selectTable_t.prototype.SUPPORTED_EVENTS=[];
selectTable_t.prototype.SORT_EVENT=-1;
selectTable_t.prototype.COLUMN_RESIZE_END_EVENT=-2;
}
catch(ex){
jsExDebug("selectTable_t.prototype",ex);
}
function selectTable_t(_1,_2,_3,_4,_5,_6){
try{
this.selectTable_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.table=null;
this.headerTable=null;
this.columnGroupDom=null;
this.headerColumnGroupDom=null;
this.highlightedRowIndex=null;
this.columnDragSession=null;
this.resizeColumnStartWidth=null;
this.rowHeight=(_3?_3:this.DEFAULT_ROW_HEIGHT);
this.selectedRowIndex=null;
this.lastSelectedRowIndex=null;
this.sortDirection=null;
this.sortImages=null;
this.currentSortColumn=null;
this.settingMaxRows=(_4?_4:100);
this.settingMaxRowsText=_5;
this.maxExceededRow=null;
this.settingExtraSelectedRow=false;
this.settingExtraSelectedRowColspan=0;
this.extraSelectedContent=null;
this.currentExtraSelectedRow=null;
this.currentExtraSelectedCell=null;
this.SORT_VAL_DELIM=":";
this.SORT_VAL_DELIM_REGEX=/(.*):(.*)/;
this.values=[];
this.columnArray=[];
this.rowArray=[];
var _7=getContrastingColour(this.SYSTEM.Dom.getCurrentStyle(document.body).color);
if(_7=="rgb(0,0,0)"){
this.bgColour=this.LIGHT_TEXT_BG;
this.altColour=this.LIGHT_TEXT_ALT_COLOUR;
}else{
this.bgColour=this.DARK_TEXT_BG;
this.altColour=this.DARK_TEXT_ALT_COLOUR;
}
if(!_6){
this.createDom();
this.setColumnNames(_2);
this.bindEvents();
}
}
catch(ex){
jsExDebug("selectTable_t",ex);
}
}
function selectTable_cleanUp(me){
try{
if(!me){
me=this;
}
me.unbindEvents();
var _9=getChildNode(getChildNode(me.headerTable,"tr",0),"td");
for(var i=0;i<_9.length;i++){
var _b=getChildNode(_9[i],"img",0);
me.SYSTEM.Event.disableDragEnabledElement(_b);
me.SYSTEM.Event.removeDragEventHandlers(_b);
me.SYSTEM.Event.detachEvent(_b,"onmousedown","mousedown");
}
me.table=null;
me.headerTable=null;
me.columnGroupDom=null;
me.headerColumnGroupDom=null;
me.columnNames=null;
me.highlightedRowIndex=null;
me.columnDragSession=null;
me.resizeColumnStartWidth=null;
me.rowHeight=null;
me.selectedRowIndex=null;
me.tableContainer=null;
me.headerTableContainer=null;
me.lastSelectedRowIndex=null;
me.currentSortColumn=null;
me.settingMaxRows=null;
me.settingMaxRowsText=null;
me.maxExceededRow=null;
me.settingExtraSelectedRow=null;
me.extraSelectedContent=null;
me.currentExtraSelectedRow=null;
me.currentExtraSelectedCell=null;
me.settingExtraSelectedRowColspan=null;
for(i=0;i<me.columnArray.length;i++){
me.columnArray[i].header=null;
me.columnArray[i].table=null;
me.columnArray[i].headerSpan=null;
me.columnArray[i]=null;
}
me.columnArray=null;
me.clearList();
me.rowArray=null;
me.values=null;
for(i=0;i<me.sortImages.length;i++){
me.sortImages[i]=null;
}
me.sortImages=null;
me.sortDirection=null;
me.SORT_VAL_DELIM_REGEX=null;
me.SORT_VAL_DELIM=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("selectTable_cleanUp",ex);
}
}
function selectTable_createDom(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"droplist");
this.widgetElement.style.border="none";
var _c=this.SYSTEM.Dom.createDiv("absolute");
_c.style.overflow="hidden";
_c.style.height=this.rowHeight+"px";
_c.style.backgroundColor=this.HEADER_BG_COLOUR;
_c.style.border="solid 1px "+this.RESIZE_COLOUR;
this.widgetElement.appendChild(_c);
var _d=document.createElement("table");
_d.style.emptyCells="show";
_d.style.borderCollapse="collapse";
_d.style.tableLayout="fixed";
_d.cellpadding="0px";
_d.style.overflow="hidden";
var _e=_d.insertRow(0);
_e.style.height=this.rowHeight+"px";
this.headerColumnGroupDom=document.createElement("colgroup");
_d.appendChild(this.headerColumnGroupDom);
_c.appendChild(_d);
this.headerTable=_d;
this.headerTableContainer=_c;
var _f=this.SYSTEM.Dom.createDiv("absolute");
_f.style.top=this.rowHeight+"px";
_f.style.backgroundColor=this.bgColour;
_f.style.border=_c.style.border;
this.widgetElement.appendChild(_f);
var _10=document.createElement("table");
_10.style.emptyCells="show";
_10.style.borderCollapse="collapse";
_10.style.tableLayout="fixed";
_10.cellpadding="0px";
_10.style.overflow="hidden";
_f.appendChild(_10);
_f.style.overflow="auto";
this.columnGroupDom=document.createElement("colgroup");
_10.appendChild(this.columnGroupDom);
this.table=_10;
this.tableContainer=_f;
}
catch(ex){
jsExDebug("selectTable_createDom",ex);
}
}
function selectTable_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmouseout","mouseout",this.widgetMouseOutEvent,this);
this.SYSTEM.Event.attachEvent(this.tableContainer,"onscroll","scroll",this.tableContainerScrollEvent,this,true);
}
catch(ex){
jsExDebug("selectTable_bindEvents",ex);
}
}
function selectTable_unbindEvents(){
try{
this.SYSTEM.Event.detachEvent(this.widgetElement,"onmouseout","mouseout");
this.SYSTEM.Event.detachEvent(this.tableContainer,"onscroll","scroll");
}
catch(ex){
jsExDebug("selectTable_unbindEvents",ex);
}
}
function selectTable_setDimensions(_11,_12){
try{
var _13=!this.width;
if(_11!=null){
this.width=_11;
this.widgetElement.style.width=_11+"px";
this.tableContainer.style.width=_11+"px";
this.headerTableContainer.style.width=_11+"px";
this.headerTableContainer.style.height=this.rowHeight+"px";
}
if(_12!=null){
this.height=_12;
this.widgetElement.style.height=_12+"px";
this.tableContainer.style.height=(_12-this.rowHeight)+"px";
}
if(_13){
var _14=this.width-this.SCROLLBAR_WIDTH;
this.headerTable.style.width=_14+"px";
this.table.style.width=this.headerTable.style.width;
var _15=_14/this.columnArray.length;
for(var i=0;i<this.columnArray.length;i++){
this.setColumnWidth(i,_15);
}
}
this.minimumColumnWidth=this.getMinimumColumnWidth();
}
catch(ex){
jsExDebug("selectTable_setDimensions",ex);
}
}
function selectTable_addRow(_17){
try{
var _18=this.rowArray.length;
var _19=null;
var _1a=null;
if(this.maxExceededRow){
return;
}
if(this.SYSTEM.Environment.userAgentIsIE()){
if(this.settingExtraSelectedRow){
var _1b=_18*2;
var _1c=this.table.insertRow(_1b);
var _1d=this.table.insertRow(_1b+1);
_1d.style.visibility="hidden";
_1c.extraRow=_1d;
var _1e=_1d.insertCell(0);
_1e.setAttribute("colspan",this.settingExtraSelectedRowColspan);
_1e.colSpan=this.settingExtraSelectedRowColspan;
}else{
var _1c=this.table.insertRow(_18);
}
_1c.style.cursor="pointer";
_1c.style.height=this.rowHeight+"px";
this.rowArray[_18]=_1c;
this.values[_18]=_17;
this.SYSTEM.Dom.setElementClass(_1c,"option");
this.setDefaultRowBackgroundColour(_18);
this.SYSTEM.Event.attachEvent(_1c,"onmouseover","mouseover",this.rowMouseOverEvent,this,false,_18);
this.SYSTEM.Event.attachEvent(_1c,"onmousedown","mousedown",this.rowMouseDownEvent,this,false,_18);
for(var i=1;i<arguments.length;i++){
_20=_1c.insertCell(i-1);
_20.style.overflow="hidden";
_20.style.whiteSpace="pre";
_20.style.paddingLeft=this.CELL_PADDING+"px";
_1a=arguments[i].split(this.SORT_VAL_DELIM);
_20.innerHTML=_1a[0];
_20.sortValue=(_1a[1]?_1a[1]:null);
}
}else{
var _1c=document.createElement("tr");
_1c.style.cursor="pointer";
_1c.style.height=this.rowHeight+"px";
this.rowArray[_18]=_1c;
this.values[_18]=_17;
this.SYSTEM.Dom.setElementClass(_1c,"option");
this.setDefaultRowBackgroundColour(_18);
this.SYSTEM.Event.attachEvent(_1c,"onmouseover","mouseover",this.rowMouseOverEvent,this,false,_18);
this.SYSTEM.Event.attachEvent(_1c,"onmousedown","mousedown",this.rowMouseDownEvent,this,false,_18);
for(var i=1;i<arguments.length;i++){
_20=document.createElement("td");
_20.style.overflow="hidden";
_20.style.whiteSpace="pre";
_20.style.paddingLeft=this.CELL_PADDING+"px";
_1a=arguments[i].split(this.SORT_VAL_DELIM);
_20.innerHTML=_1a[0];
_20.sortValue=(_1a[1]?_1a[1]:null);
_1c.appendChild(_20);
}
this.table.appendChild(_1c);
if(this.settingExtraSelectedRow){
var _1d=document.createElement("tr");
_1d.style.visibility="hidden";
_1c.extraRow=_1d;
var _1e=document.createElement("td");
_1e.setAttribute("colspan",this.settingExtraSelectedRowColspan);
_1e.colSpan=this.settingExtraSelectedRowColspan;
_1d.appendChild(_1e);
this.table.appendChild(_1d);
}
}
this.table.style.height=(this.rowArray.length*this.rowHeight)+"px";
var _21=_18+1;
if(_21==this.settingMaxRows){
if(this.settingExtraSelectedRow){
var _1c=this.table.insertRow(_21*2);
}else{
var _1c=this.table.insertRow(_21);
}
var _20=_1c.insertCell(0);
_20.innerHTML=this.settingMaxRowsText;
_20.setAttribute("colspan",this.columnArray.length);
_20.colSpan=this.columnArray.length;
this.maxExceededRow=_1c;
}
return _18;
}
catch(ex){
jsExDebug("selectTable_addRow",ex);
}
}
function selectTable_clearList(_22){
try{
for(i=0;i<this.rowArray.length;i++){
this.SYSTEM.Event.detachEvent(this.rowArray[i],"onmouseover","mouseover");
this.SYSTEM.Event.detachEvent(this.rowArray[i],"onmousedown","mousedown");
if(this.settingExtraSelectedRow){
this.rowArray[i].parentNode.removeChild(this.rowArray[i].extraRow);
this.rowArray[i].extraRow=null;
}
this.rowArray[i].parentNode.removeChild(this.rowArray[i]);
this.rowArray[i]=null;
this.values[i]=null;
}
if(this.maxExceededRow){
this.maxExceededRow.parentNode.removeChild(this.maxExceededRow);
this.maxExceededRow=null;
}
this.rowArray=(_22?[]:null);
this.values=(_22?[]:null);
this.highlightedRowIndex=null;
this.selectedRowIndex=null;
this.lastSelectedRowIndex=null;
if(this.settingExtraSelectedRow&&this.currentExtraSelectedRow){
this.showExtraSelectedContent();
}
}
catch(ex){
jsExDebug("selectTable_clearList",ex);
}
}
function selectTable_autoSizeColumns(){
try{
var _23=((this.width-this.SCROLLBAR_WIDTH)/this.columnArray.length)*0.9;
for(var i=0;i<this.columnArray.length;i++){
this.setColumnWidth(i,_23);
}
this.widgetElement.parentNode.appendChild(this.widgetElement);
}
catch(ex){
jsExDebug("selectTable_autoSizeColumns",ex);
}
}
function selectTable_allowExtraSelectedRow(_25,_26){
try{
if((_25==this.extraSelectedContent)&&(_26==this.settingExtraSelectedRowColspan)){
return;
}
var _27=false;
if(this.extraSelectedContent&&this.currentExtraSelectedCell&&this.currentExtraSelectedRow){
this.currentExtraSelectedCell.removeChild(this.extraSelectedContent);
_27=true;
}
this.settingExtraSelectedRow=true;
this.extraSelectedContent=_25;
this.settingExtraSelectedRowColspan=_26;
if(_27){
this.currentExtraSelectedCell.appendChild(this.extraSelectedContent);
}
}
catch(ex){
jsExDebug("selectTable_allowExtraSelectedRow",ex);
}
}
function selectTable_disallowExtraSelectedRow(){
try{
this.settingExtraSelectedRow=false;
this.extraSelectedContent=null;
}
catch(ex){
jsExDebug("selectTable_allowExtraSelectedRow",ex);
}
}
function selectTable_setColumnWidth(_28,_29){
try{
if(this.columnArray[_28]){
this.columnArray[_28].header.style.width=_29+"px";
this.columnArray[_28].table.style.width=_29+"px";
if(_29){
var _2a=_29-(this.rowHeight-this.SORT_PADDING);
this.columnArray[_28].headerSpan.style.width=_2a+"px";
}
}
}
catch(ex){
jsExDebug("selectTable_setColumnWidth",ex);
}
}
function selectTable_setColumnNames(_2b){
try{
if(this.columnNames){
var _2c=true;
for(var i=0;i<_2b.length;i++){
if(_2b[i]!=this.columnNames[i]){
_2c=false;
break;
}
}
if(_2c&&(_2b.length==this.columnNames.length)){
return;
}
}
var _2e=[];
var _2f=getChildNode(this.headerTable,"tr",0);
var _30=getChildNode(_2f,"td");
if(this.columnNames){
for(var i=this.columnNames.length-1;i>=0;i--){
if(this.columnArray[i]){
_2e[i]=this.getColumnWidth(i);
this.headerColumnGroupDom.removeChild(this.columnArray[i].header);
this.columnGroupDom.removeChild(this.columnArray[i].table);
if(i>=_2b.length){
var _31=getChildNode(_30[i],"img",0);
if(_31){
this.SYSTEM.Event.disableDragEnabledElement(_31);
this.SYSTEM.Event.removeDragEventHandlers(_31);
this.SYSTEM.Event.detachEvent(_31,"onmousedown","mousedown");
_2f.removeChild(_30[i]);
}
}
this.columnArray[i].header=null;
this.columnArray[i].table=null;
this.columnArray[i].headerSpan=null;
this.columnArray[i]=null;
this.sortDirection[i]=null;
this.sortImages[i]=null;
}
}
}
var _32=null;
var _33=null;
var _34=null;
var _35=0;
var _36=null;
this.columnArray=[];
this.sortDirection=[];
this.sortImages=[];
this.minimumColumnWidth=this.getMinimumColumnWidth(_2b.length);
for(var i=0;i<_2b.length;i++){
_32=document.createElement("col");
_33=document.createElement("col");
_34=(_2e[i]?_2e[i]:this.minimumColumnWidth);
if(_30&&_30[i]){
_36=getChildNode(_30[i],"span",0);
_36.style.color=this.COLUMN_HEADING_COLOUR;
_36.innerHTML=_2b[i];
}else{
var _37=_2f.insertCell(i);
_37.style.whiteSpace="nowrap";
_37.style.cursor="pointer";
_37.style.paddingLeft=this.CELL_PADDING+"px";
var _31=this.SYSTEM.Dom.createImage(this.PIXEL_IMG,"relative",4,this.rowHeight);
_31.style.cursor="w-resize";
_31.style.borderRight="solid 1px "+this.RESIZE_COLOUR;
var _38=this.SYSTEM.Dom.createImage(null,"relative",this.rowHeight-this.SORT_PADDING,this.rowHeight-this.SORT_PADDING);
_38.style.right="5px";
_38.style.display="none";
if(document.all){
_31.style.styleFloat="right";
_38.style.styleFloat="right";
}else{
_31.style.cssFloat="right";
_38.style.cssFloat="right";
}
var _39=this.SYSTEM.Dom.createElement("span",null,_34,this.rowHeight);
_39.style.color=this.COLUMN_HEADING_COLOUR;
_39.innerHTML=_2b[i];
_39.style.overflow="hidden";
_36=_39;
this.SYSTEM.Event.setDragEnablingParameters(_31);
this.SYSTEM.Event.bindDragEventHandlers(_31,this.resizeColumnStartHandler,this.resizeColumnEventHandler,this.resizeColumnEndEventHandler,this,i);
this.SYSTEM.Event.attachEvent(_31,"onmousedown","mousedown",cancelEvent);
this.SYSTEM.Event.attachEvent(_37,"onmousedown","mousedown",this.headerCellMouseDownEvent,this,false,i);
_37.appendChild(_39);
_37.appendChild(_31);
_37.appendChild(_38);
_2f.appendChild(_37);
}
this.columnGroupDom.appendChild(_32);
this.headerColumnGroupDom.appendChild(_33);
this.columnArray.push({header:_33,table:_32,headerSpan:_36});
this.sortDirection.push(null);
_35+=_34;
this.setColumnWidth(i,_34);
this.sortImages.push(getChildNode(_30[i],"img",1));
}
this.columnNames=_2b;
this.headerTable.style.width=_35+"px";
this.table.style.width=this.headerTable.style.width;
}
catch(ex){
jsExDebug("selectTable_setColumnNames",ex);
}
}
function selectTable_setSelectedValue(_3a){
try{
var _3b=null;
for(var i=0;i<this.values.length;i++){
if(this.values[i]==_3a){
_3b=i;
break;
}
}
this.setSelectedIndex(_3b,null,true);
}
catch(ex){
jsExDebug("selectTable_setSelectedValue",ex);
}
}
function selectTable_setSelectedIndex(_3d,_3e,_3f){
try{
if(_3d!=null){
if(this.selectedRowIndex){
for(var i in this.selectedRowIndex){
if(this.selectedRowIndex[i]){
this.SYSTEM.Dom.setElementClass(this.rowArray[i],"option");
this.setDefaultRowBackgroundColour(i);
}
}
}
this.rowArray[_3d].style.backgroundColor="";
this.SYSTEM.Dom.setElementClass(this.rowArray[_3d],"option on");
this.selectedRowIndex=[];
this.selectedRowIndex[_3d]=true;
this.lastSelectedRowIndex=_3d;
if(this.settingExtraSelectedRow&&(_3f||this.currentExtraSelectedRow)){
this.showExtraSelectedContent(_3d);
}
this.fireEvent(this.DEFAULT_EVENT);
}else{
if(_3e!=null){
if(this.selectedRowIndex){
for(var i in this.selectedRowIndex){
if(this.selectedRowIndex[i]){
this.rowArray[i].style.backgroundColor="";
this.SYSTEM.Dom.setElementClass(this.rowArray[i],"option on");
this.setDefaultRowBackgroundColour(i);
}
}
}
this.selectedRowIndex=[];
var _41=false;
var _42=true;
for(var _3d in _3e){
if(this.rowArray[_3d]){
this.rowArray[_3d].style.backgroundColor="";
this.SYSTEM.Dom.setElementClass(this.rowArray[_3d],"option on");
this.selectedRowIndex[_3d]=true;
_41=true;
this.lastSelectedRowIndex=_3d;
if(_42&&this.settingExtraSelectedRow&&this.currentExtraSelectedRow){
this.showExtraSelectedContent(_3d);
_42=false;
}
}
}
if(_41){
this.fireEvent(this.DEFAULT_EVENT);
}
}
}
}
catch(ex){
jsExDebug("selectTable_setSelectedIndex",ex);
}
}
function selectTable_setCellContent(_43,_44,_45){
try{
if(_43==null||_44==null){
return;
}
var _46=getChildNode(this.rowArray[_43],"td",_44);
if(_45.match(this.SORT_VAL_DELIM_REGEX)){
var _47=_45.split(this.SORT_VAL_DELIM);
_45=_47[0];
_46.sortValue=_47[1];
}
_46.innerHTML=_45;
}
catch(ex){
jsExDebug("selectTable_setCellContent",ex);
}
}
function selectTable_getColumnWidth(_48){
try{
if(this.columnArray[_48]){
return parseFloat(this.columnArray[_48].header.style.width);
}
}
catch(ex){
jsExDebug("selectTable_setColumnWidth",ex);
}
}
function selectTable_getSelectedIndex(){
try{
return this.selectedRowIndex;
}
catch(ex){
jsExDebug("selectTable_getSelectedIndex",ex);
}
}
function selectTable_getSelectedValue(){
try{
if(this.selectedRowIndex){
var _49=[];
for(var _4a in this.selectedRowIndex){
if(this.selectedRowIndex[_4a]){
_49.push(this.values[_4a]);
}
}
return _49;
}
}
catch(ex){
jsExDebug("selectTable_getSelectedValue",ex);
}
}
function selectTable_getRowIndexFromValue(_4b){
try{
for(var i=0;i<this.values.length;i++){
if(this.values[i]==_4b){
return i;
}
}
return null;
}
catch(ex){
jsExDebug("selectTable_getSelectedValue",ex);
}
}
function selectTable_getRowCount(){
try{
return this.rowArray.length;
}
catch(ex){
jsExDebug("selectTable_getRowCount",ex);
}
}
function selectTable_getScrollTop(){
try{
return (this.tableContainer?this.tableContainer.scrollTop:0);
}
catch(ex){
jsExDebug("selectTable_getScrollTop",ex);
}
}
function selectTable_sortColumn(_4d,_4e){
try{
if(this.currentSortColumn!=null&&this.currentSortColumn!=_4d){
this.sortImages[this.currentSortColumn].style.display="none";
this.sortDirection[this.currentSortColumn]=null;
}
var _4f=this.sortImages[_4d];
if(this.sortDirection[_4d]==this.SORT_ASC&&!_4e){
this.sortDirection[_4d]=this.SORT_DESC;
_4f.src=this.SORT_DESC_IMG;
}else{
if(!_4e||!this.sortDirection[_4d]){
this.sortDirection[_4d]=this.SORT_ASC;
_4f.src=this.SORT_ASC_IMG;
}
}
_4f.style.display="block";
var _50=[];
var _51=[];
var _52=[];
var _53=[];
var _54=true;
var _55=null;
var _56=null;
var _57=null;
var _58=null;
for(var i=0;i<this.rowArray.length;i++){
_55=getChildNode(this.rowArray[i],"td",_4d);
_56=(_55.sortValue?_55.sortValue:_55.innerHTML);
if(!isNaN(_56)){
_56=parseFloat(_56);
_54=false;
}
if(!_50[_56]){
_51.push(_56);
_50[_56]=[];
}
_50[_56].push(i);
_53[i]=this.values[i];
_52[i]=[];
for(_58=0;_58<this.columnArray.length;_58++){
_57=getChildNode(this.rowArray[i],"td",_58);
_52[i][_58]=[_57.innerHTML,(_57.sortValue?[this.SORT_VAL_DELIM,_57.sortValue].join(""):"")].join("");
}
}
if(this.sortDirection[_4d]==this.SORT_ASC){
sortListAsc(_51,_54);
}else{
sortListDesc(_51,_54);
}
this.clearList(true);
var _5a=null;
var _5b=null;
var _5c=null;
for(i in _51){
_5a=_50[_51[i]];
for(var j in _5a){
_5b=_5a[j];
_5c=[_53[_5b]];
for(var k in _52[_5b]){
_5c.push(_52[_5b][k]);
}
this.addRow.apply(this,_5c);
}
}
this.currentSortColumn=_4d;
this.fireEvent(this.SORT_EVENT);
}
catch(ex){
jsExDebug("selectTable_sortColumn "+selectTable_sortColumn.caller.name,ex);
}
}
function selectTable_showExtraSelectedContent(_5f){
try{
if(_5f!=null){
this.hideExtraSelectedContent();
var _60=this.rowArray[_5f].extraRow;
var _61=getChildNode(_60,"td",0);
_61.appendChild(this.extraSelectedContent);
_60.style.visibility="visible";
this.currentExtraSelectedRow=_60;
this.currentExtraSelectedCell=_61;
}
}
catch(ex){
jsExDebug("selectTable_showExtraSelectedContent",ex);
}
}
function selectTable_hideExtraSelectedContent(){
try{
if(this.currentExtraSelectedRow&&this.extraSelectedContent){
this.currentExtraSelectedRow.style.visibility="hidden";
this.currentExtraSelectedCell.removeChild(this.extraSelectedContent);
this.currentExtraSelectedRow=null;
this.currentExtraSelectedCell=null;
}
}
catch(ex){
jsExDebug("selectTable_hideExtraSelectedContent",ex);
}
}
function selectTable_setDefaultRowBackgroundColour(_62){
try{
if((_62%2)==0){
this.rowArray[_62].style.backgroundColor=this.altColour;
}else{
this.rowArray[_62].style.backgroundColor="";
}
}
catch(ex){
jsExDebug("selectTable_setDefaultRowBackgroundColour",ex);
}
}
function selectTable_scrollToSelectedIndex(){
try{
if(this.lastSelectedRowIndex!=null&&this.extraSelectedContent){
var _63=this.tableContainer.scrollHeight-this.extraSelectedContent.clientHeight;
var _64=this.rowArray.length;
var _65=parseFloat(this.lastSelectedRowIndex)/_64;
var _66=_65*_63;
this.tableContainer.scrollTop=_66;
}
}
catch(ex){
jsExDebug("selectTable_scrollToSelectedIndex",ex);
}
}
function selectTable_scrollTo(_67){
try{
if(_67){
this.tableContainer.scrollTop=_67;
}
}
catch(ex){
jsExDebug("selectTable_scrollTo",ex);
}
}
function selectTable_getMinimumColumnWidth(_68){
try{
var _69=(this.width?((this.width-this.SCROLLBAR_WIDTH)/(_68?_68:this.columnArray.length))/3:0);
return _69;
}
catch(ex){
jsExDebug("selectTable_getMinimumColumnWidth",ex);
}
}
function selectTable_rowMouseOverEvent(_6a,me,_6c){
try{
if(me.highlightedRowIndex!=null){
if(me.selectedRowIndex&&me.selectedRowIndex[me.highlightedRowIndex]){
for(var _6d in me.selectedRowIndex){
if(me.selectedRowIndex[_6d]){
me.rowArray[_6d].style.backgroundColor="";
me.SYSTEM.Dom.setElementClass(me.rowArray[_6d],"option on");
}
}
}else{
for(var _6d in me.selectedRowIndex){
if(me.selectedRowIndex[_6d]){
me.SYSTEM.Dom.setElementClass(me.rowArray[_6d],"option");
me.setDefaultRowBackgroundColour(_6d);
}
}
}
}
me.rowArray[_6c].style.backgroundColor="";
me.SYSTEM.Dom.setElementClass(me.rowArray[_6c],"option hover");
me.highlightedRowIndex=_6c;
}
catch(ex){
jsExDebug("selectTable_rowMouseOverEvent",ex);
}
}
function selectTable_rowMouseDownEvent(_6e,me,_70){
try{
if(!me.rowArray[_70]){
return;
}
if(_6e.ctrlKey){
if(me.selectedRowIndex&&me.selectedRowIndex[_70]){
me.SYSTEM.Dom.setElementClass(me.rowArray[_70],"option");
me.setDefaultRowBackgroundColour(_70);
me.highlightedRowIndex=null;
me.selectedRowIndex[_70]=false;
me.fireEvent(me.DEFAULT_EVENT,_6e);
}else{
me.rowArray[_70].style.backgroundColor="";
me.SYSTEM.Dom.setElementClass(me.rowArray[_70],"option on");
if(!me.selectedRowIndex){
me.selectedRowIndex=[];
}
me.selectedRowIndex[_70]=true;
me.lastSelectedRowIndex=_70;
me.fireEvent(me.DEFAULT_EVENT,_6e);
}
}else{
if(_6e.shiftKey){
if(me.lastSelectedRowIndex!=null){
var _71=null;
var _72=null;
if(me.lastSelectedRowIndex>=_70){
_71=_70;
_72=me.lastSelectedRowIndex;
}else{
_71=me.lastSelectedRowIndex;
_72=_70;
}
if(!me.selectedRowIndex){
me.selectedRowIndex=[];
}
for(var row=_71;row<=_72;row++){
me.rowArray[row].style.backgroundColor="";
me.SYSTEM.Dom.setElementClass(me.rowArray[row],"option on");
me.selectedRowIndex[row]=true;
}
me.fireEvent(me.DEFAULT_EVENT,_6e);
}
}else{
var _74=true;
if(me.selectedRowIndex){
for(var _75 in me.selectedRowIndex){
if(me.selectedRowIndex[_75]){
if(_75==_70){
_74=false;
}
me.SYSTEM.Dom.setElementClass(me.rowArray[_75],"option");
me.setDefaultRowBackgroundColour(_75);
}
}
}
me.rowArray[_70].style.backgroundColor="";
me.SYSTEM.Dom.setElementClass(me.rowArray[_70],"option on");
me.selectedRowIndex=[];
me.selectedRowIndex[_70]=true;
me.lastSelectedRowIndex=_70;
if(_74||!me.currentExtraSelectedRow){
if(me.settingExtraSelectedRow){
me.showExtraSelectedContent(_70);
}
me.fireEvent(me.DEFAULT_EVENT,_6e);
}else{
me.hideExtraSelectedContent();
}
}
}
}
catch(ex){
jsExDebug("selectTable_rowMouseDownEvent",ex);
}
}
function selectTable_widgetMouseOutEvent(_76,me){
try{
if(me.highlightedRowIndex!=null){
me.SYSTEM.Dom.setElementClass(me.rowArray[me.highlightedRowIndex],"option");
me.setDefaultRowBackgroundColour(me.highlightedRowIndex);
me.highlightedRowIndex=null;
}
if(me.selectedRowIndex!=null){
for(var _78 in me.selectedRowIndex){
if(me.selectedRowIndex[_78]){
me.rowArray[_78].style.backgroundColor="";
me.SYSTEM.Dom.setElementClass(me.rowArray[_78],"option on");
}
}
}
}
catch(ex){
jsExDebug("selectTable_widgetMouseOutEvent",ex);
}
}
function selectTable_resizeColumnStartHandler(_79,me,_7b){
try{
if(me.columnArray[_7b]){
me.columnDragSession=true;
me.resizeColumnStartWidth=me.getColumnWidth(_7b);
me.resizeTableStartWidth=parseFloat(me.table.style.width);
}
}
catch(ex){
jsExDebug("selectTable_resizeColumnStartHandler",ex);
}
}
function selectTable_resizeColumnEventHandler(_7c,me,_7e){
try{
if(me.columnDragSession&&me.columnArray[_7e]){
var _7f=me.SYSTEM.Event.dragDistanceX+me.resizeColumnStartWidth;
if(_7f>me.minimumColumnWidth){
me.setColumnWidth(_7e,_7f);
me.headerTable.style.width=(me.resizeTableStartWidth+me.SYSTEM.Event.dragDistanceX)+"px";
me.table.style.width=me.headerTable.style.width;
}
}
}
catch(ex){
jsExDebug("selectTable_resizeColumnEventHandler",ex);
}
}
function selectTable_resizeColumnEndEventHandler(_80,me,_82){
try{
if(me.columnDragSession){
me.columnDragSession=false;
me.fireEvent(me.COLUMN_RESIZE_END_EVENT,_80);
}
}
catch(ex){
jsExDebug("selectTable_resizeColumnEndEventHandler",ex);
}
}
function selectTable_tableContainerScrollEvent(_83,me){
try{
me.headerTableContainer.scrollLeft=me.tableContainer.scrollLeft;
}
catch(ex){
jsExDebug("selectTable_tableContainerScrollEvent",ex);
}
}
function selectTable_headerCellMouseDownEvent(_85,me,_87){
try{
me.sortColumn(_87);
}
catch(ex){
jsExDebug("selectTable_headerCellMouseDownEvent",ex);
}
}

try{
newPassword_t.prototype=new widget_t();
newPassword_t.prototype.newPassword_super=widget_t.prototype.constructor;
newPassword_t.prototype.constructor=newPassword_t;
newPassword_t.prototype.cleanUp=newPassword_cleanUp;
newPassword_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
newPassword_t.prototype.createDom=newPassword_createDom;
newPassword_t.prototype.saveBtnClickEvent=newPassword_saveBtnClickEvent;
newPassword_t.prototype.usernameResponse=newPassword_usernameResponse;
}
catch(ex){
jsExDebug("newPassword_t.prototype",ex);
}
function newPassword_t(_1,_2,_3){
try{
this.newPassword_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.createDom();
if(_2){
var _4=_2.split(":");
this.forgotPasswordGuid=_4[0];
this.userId=parseInt(_4[1]);
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action=11&u="+this.userId,null,this.usernameResponse,this);
}
this.keyUpIndex=this.SYSTEM.Event.notifyKeyUpEvent(this.keyUpHandler,this);
}
catch(ex){
jsExDebug("newPassword_t",ex);
}
}
function newPassword_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.removeKeyUpHandler(me.keyUpIndex);
me.forgotPasswordGuid=null;
me.userId=null;
me.passwordLabel.cleanUp();
me.passwordText.cleanUp();
me.confirmLabel.cleanUp();
me.confirmText.cleanUp();
me.errorLabel.cleanUp();
me.saveBtn.cleanUp();
me.passwordLabel=null;
me.passwordText=null;
me.confirmLabel=null;
me.confirmText=null;
me.errorLabel=null;
me.saveBtn=null;
me.passwordValue=null;
me.usernameValue=null;
me.newInviteUsername=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("newPassword_cleanUp",ex);
}
}
function newPassword_createDom(){
try{
this.widgetElement.style.zIndex=ATOP_INTERFACE_COVER_ZINDEX;
this.widgetElement.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
this.widgetElement.style.backgroundColor=this.SYSTEM.Style.BLUE_TOOLGROUP_BG;
this.setDimensions(310,110);
var w=this.SYSTEM.Widget;
var _7=new w.Label("passwordLabel","New password");
_7.setColour("#000000");
_7.setPosition(10,10);
_7.attach(this.widgetElement);
var _8=new w.Text("passwordText",false,false,true);
_8.setPosition(130,_7.positionY);
_8.attach(this.widgetElement);
var _9=new w.Label("confirmLabel","Confirm password");
_9.setColour("#000000");
_9.setPosition(_7.positionX,_7.positionY+30);
_9.attach(this.widgetElement);
var _a=new w.Text("confirmText",false,false,true);
_a.setPosition(_8.positionX,_9.positionY);
_a.attach(this.widgetElement);
var _b=new w.Label("errorLabel");
_b.setColour("rgb(255,0,0)");
_b.setFontSize(null,null,10);
_b.setPosition(10,10,false,true);
_b.setDimensions(this.width-80,30);
_b.hide();
_b.attach(this.widgetElement);
var _c=new w.TextButton("saveBtn",50,"Save");
_c.setPosition(_7.positionX,_7.positionY,true,true);
_c.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.saveBtnClickEvent));
_c.attach(this.widgetElement);
this.passwordLabel=_7;
this.passwordText=_8;
this.confirmLabel=_9;
this.confirmText=_a;
this.errorLabel=_b;
this.saveBtn=_c;
}
catch(ex){
jsExDebug("newPassword_createDom",ex);
}
}
function newPassword_saveBtnClickEvent(){
function overwriteCallback(_d){
try{
if(_d){
global_continueAfterForgotPasswordSuccess(this);
}else{
this.errorLabel.show();
this.errorLabel.setText("An error occured updating your password, try clicking on the email link again.");
}
}
catch(ex){
jsExDebug("newPassword_saveBtnClickEvent: overwriteCallback",ex);
}
}
try{
if(this.confirmText.getContent()==this.passwordText.getContent()){
this.passwordValue=this.confirmText.getContent();
if(this.userId){
this.SYSTEM.Security.overwriteUserPassword(this.userId,this.forgotPasswordGuid,this.confirmText.getContent(),new this.SYSTEM.Delegate(this,overwriteCallback));
}
this.errorLabel.hide();
}else{
this.errorLabel.setText("Both password fields must match");
this.errorLabel.show();
}
}
catch(ex){
jsExDebug("newPassword_saveBtnClickEvent",ex);
}
}
function newPassword_usernameResponse(_e,me){
try{
var _10=getNodeValue(_e,"username");
if(_10){
me.usernameValue=_10;
}else{
jsDebug("error getting username");
}
}
catch(ex){
jsExDebug("newPassword_usernameResponse",ex);
}
}

try{
dateSelect_t.prototype=new widget_t();
dateSelect_t.prototype.constructor=dateSelect_t;
dateSelect_t.prototype.cleanUp=dateSelect_cleanUp;
dateSelect_t.prototype.dateSelect_super=widget_t.prototype.constructor;
dateSelect_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
dateSelect_t.prototype.createDom=dateSelect_createDom;
dateSelect_t.prototype.setDate=dateSelect_setDate;
dateSelect_t.prototype.getDay=dateSelect_getDay;
dateSelect_t.prototype.getMonth=dateSelect_getMonth;
dateSelect_t.prototype.getYear=dateSelect_getYear;
dateSelect_t.prototype.listSelectEvent=dateSelect_listSelectEvent;
dateSelect_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
}
catch(ex){
jsExDebug("dateSelect_t.prototype",ex);
}
function dateSelect_t(_1,_2){
try{
this.dateSelect_super(_1,true);
if(!_2){
this.createDom();
}
}
catch(ex){
jsExDebug("dateSelect_t",ex);
}
}
function dateSelect_cleanUp(me){
try{
if(!me){
me=this;
}
me.daySelect.cleanUp();
me.slashLabel1.cleanUp();
me.monthSelect.cleanUp();
me.slashLabel2.cleanUp();
me.yearSelect.cleanUp();
me.daySelect=null;
me.slashLabel1=null;
me.monthSelect=null;
me.slashLabel2=null;
me.yearSelect=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("dateSelect_cleanUp",ex);
}
}
function dateSelect_createDom(){
try{
var wL=this.SYSTEM.Widget;
var _5=new wL.DropText("daySelect",20,null,50,200);
var _6=new wL.Label("sl","/");
_6.setFontSize(null,null,20);
var _7=new wL.DropText("monthSelect",20,null,50,200);
var _8=new wL.Label("sl","/");
_8.setFontSize(null,null,20);
var _9=new wL.DropText("yearSelect",35,null,50,200);
var _a=new Date().getFullYear();
for(var i=1;i<=31;i++){
_5.addItem(i,i);
}
for(var i=1;i<=12;i++){
_7.addItem(i,i);
}
for(var i=1900;i<=_a;i++){
_9.addItem(i,i);
}
_5.setPosition(0,0);
_5.attach(this.widgetElement);
_6.setPosition(_5.positionX+_5.width+35,0);
_6.attach(this.widgetElement);
_7.setPosition(_6.positionX+10,0);
_7.attach(this.widgetElement);
_8.setPosition(_7.positionX+_7.width+35,0);
_8.attach(this.widgetElement);
_9.setPosition(_8.positionX+10,0);
_9.attach(this.widgetElement);
var _c=new this.SYSTEM.Delegate(this,this.listSelectEvent);
_5.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_c);
_7.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_c);
_9.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_c);
this.daySelect=_5;
this.slashLabel1=_6;
this.monthSelect=_7;
this.slashLabel2=_8;
this.yearSelect=_9;
}
catch(ex){
jsExDebug("dateSelect_createDom",ex);
}
}
function dateSelect_setDate(_d,_e,_f){
try{
this.daySelect.setSelectedValue(_d);
this.monthSelect.setSelectedValue(_e);
this.yearSelect.setSelectedValue(_f);
}
catch(ex){
jsExDebug("dateSelect_setDate",ex);
}
}
function dateSelect_getDay(){
try{
return this.daySelect.getSelectedValue();
}
catch(ex){
jsExDebug("dateSelect_getDay",ex);
}
}
function dateSelect_getMonth(){
try{
return this.monthSelect.getSelectedValue();
}
catch(ex){
jsExDebug("dateSelect_getMonth",ex);
}
}
function dateSelect_getYear(){
try{
return this.yearSelect.getSelectedValue();
}
catch(ex){
jsExDebug("dateSelect_getYear",ex);
}
}
function dateSelect_listSelectEvent(){
try{
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT);
}
catch(ex){
jsExDebug("dateSelect_listSelectEvent",ex);
}
}

try{
imagePreview_t.prototype=new widget_t();
imagePreview_t.prototype.constructor=imagePreview_t;
imagePreview_t.prototype.cleanUp=imagePreview_cleanUp;
imagePreview_t.prototype.imagePreview_super=widget_t.prototype.constructor;
imagePreview_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
imagePreview_t.prototype.createDom=imagePreview_createDom;
imagePreview_t.prototype.bindEvents=imagePreview_bindEvents;
imagePreview_t.prototype.unbindEvents=imagePreview_unbindEvents;
imagePreview_t.prototype.setPreviewImage=imagePreview_setPreviewImage;
imagePreview_t.prototype.changePreviewEvent=imagePreview_changePreviewEvent;
imagePreview_t.prototype.imageClickEvent=imagePreview_imageClickEvent;
imagePreview_t.prototype.NAV_BTN_WIDTH=widgetNotifier_t.prototype.ARROW_WIDTH;
imagePreview_t.prototype.NAV_BTN_HEIGHT=widgetNotifier_t.prototype.ARROW_HEIGHT;
imagePreview_t.prototype.NAV_BAR_HEIGHT=widgetNotifier_t.prototype.ARROW_HEIGHT+10;
imagePreview_t.prototype.LEFT_IMG="img/app/system/notifier/left";
imagePreview_t.prototype.RIGHT_IMG="img/app/system/notifier/right";
}
catch(ex){
jsExDebug("imagePreview_t.prototype",ex);
}
function imagePreview_t(_1,_2,_3,_4,_5){
try{
this.imagePreview_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.imageWidth=_2;
this.imageHeight=_3;
this.urlArray=_4;
if(!_5){
this.createDom();
this.bindEvents();
}
this.setPreviewImage(0);
}
catch(ex){
jsExDebug("imagePreview_t",ex);
}
}
function imagePreview_cleanUp(me){
try{
if(!me){
me=this;
}
me.unbindEvents();
me.image=null;
me.leftBtn.cleanUp();
me.leftBtn=null;
me.positionLabel.cleanUp();
me.positionLabel=null;
me.rightBtn.cleanUp();
me.rightBtn=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("imagePreview_cleanUp",ex);
}
}
function imagePreview_createDom(){
try{
this.setDimensions(this.imageWidth,this.imageHeight+this.NAV_BAR_HEIGHT);
var _7=this.SYSTEM.Dom.createImage(null,"absolute",this.imageWidth,this.imageHeight,0,0);
_7.style.border="solid 1px black";
_7.style.cursor="pointer";
this.SYSTEM.Event.attachEvent(_7,"onclick","click",this.imageClickEvent,this);
this.widgetElement.appendChild(_7);
var _8=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE;
var _9=new this.SYSTEM.Widget.Button("leftBtn",this.LEFT_IMG,_8,this.NAV_BTN_WIDTH,this.NAV_BTN_HEIGHT);
_9.setPosition(0,0,false,true);
_9.setValue(-1);
_9.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.changePreviewEvent));
_9.attach(this.widgetElement);
var _a=new this.SYSTEM.Widget.Label("positionLabel");
_a.setDimensions(this.width-(2*this.NAV_BTN_WIDTH),this.NAV_BTN_HEIGHT);
_a.setAlignment("center");
_a.setPosition(this.NAV_BTN_WIDTH,0,false,true);
_a.attach(this.widgetElement);
var _b=new this.SYSTEM.Widget.Button("rightBtn",this.RIGHT_IMG,_8,this.NAV_BTN_WIDTH,this.NAV_BTN_HEIGHT);
_b.setPosition(0,0,true,true);
_b.setValue(1);
_b.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.changePreviewEvent));
_b.attach(this.widgetElement);
this.image=_7;
this.leftBtn=_9;
this.positionLabel=_a;
this.rightBtn=_b;
}
catch(ex){
jsExDebug("imagePreview_createDom",ex);
}
}
function imagePreview_bindEvents(){
try{
}
catch(ex){
jsExDebug("imagePreview_bindEvents",ex);
}
}
function imagePreview_unbindEvents(){
try{
}
catch(ex){
jsExDebug("imagePreview_unbindEvents",ex);
}
}
function imagePreview_setPreviewImage(_c){
try{
if(this.urlArray[_c]){
this.image.src=this.urlArray[_c];
this.currentURLIndex=_c;
this.positionLabel.setText((_c+1)+" of "+this.urlArray.length);
}
}
catch(ex){
jsExDebug("imagePreview_setPreviewImage",ex);
}
}
function imagePreview_changePreviewEvent(_d,_e){
try{
this.setPreviewImage(this.currentURLIndex+_e.getValue());
}
catch(ex){
jsExDebug("imagePreview_changePreviewEvent",ex);
}
}
function imagePreview_imageClickEvent(_f,me){
try{
var d=new me.SYSTEM.Dialogue.OkAlert(null,"Photo","<img src=\""+me.urlArray[me.currentURLIndex]+"\" style=\"width: 640px; height: 480px;\"/>",null,660);
d.hideIcon();
}
catch(ex){
jsExDebug("imagePreview_imageClickEvent",ex);
}
}

try{
adToolgroup_t.prototype=new widgetToolgroup_t();
adToolgroup_t.prototype.adToolgroup_super=widgetToolgroup_t.prototype.constructor;
adToolgroup_t.prototype.constructor=adToolgroup_t;
adToolgroup_t.prototype.cleanUp=adToolgroup_cleanUp;
adToolgroup_t.prototype.toolgroup_cleanUp=widgetToolgroup_t.prototype.cleanUp;
adToolgroup_t.prototype.widgetToolgroup_createDom=widgetToolgroup_t.prototype.createDom;
adToolgroup_t.prototype.createDom=adToolgroup_createDom;
adToolgroup_t.prototype.widgetToolgroup_bindEvents=widgetToolgroup_t.prototype.bindEvents;
adToolgroup_t.prototype.bindEvents=adToolgroup_bindEvents;
adToolgroup_t.prototype.adBtnClickEvent=adToolgroup_adBtnClickEvent;
adToolgroup_t.prototype.WIDTH=154;
adToolgroup_t.prototype.BUTTON_WIDTH=30;
adToolgroup_t.prototype.BUTTON_HEIGHT=30;
}
catch(ex){
jsExDebug("adToolgroup_t:prototype",ex);
}
function adToolgroup_t(_1,_2,_3){
try{
this.adToolgroup_super("adToolgroup",this.WIDTH,this.DEFAULT_HEIGHT,_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.application=_2;
if(!_3){
this.createDom(this.WIDTH,this.DEFAULT_HEIGHT,_1);
this.bindEvents();
}
}
catch(ex){
jsExDebug("adToolgroup_t",ex);
}
}
function adToolgroup_cleanUp(me){
try{
if(!me){
me=this;
}
me.application=null;
me.adImage=null;
me.adBtn=null;
me.iframe=null;
me.toolgroup_cleanUp();
}
catch(ex){
jsExDebug("adToolgroup_cleanUp",ex);
}
}
function adToolgroup_createDom(_5,_6,_7){
try{
this.widgetToolgroup_createDom(_5,_6,_7);
this.allowLabel("Partners");
var _8=new this.SYSTEM.Widget.Button("adBtn",this.application.AD_IMAGE,null,150,62);
_8.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.adBtnClickEvent));
this.addWidget(_8,(this.WIDTH-150)/2,2);
this.adBtn=_8;
}
catch(ex){
jsExDebug("adToolgroup_createDom",ex);
}
}
function adToolgroup_bindEvents(){
try{
this.widgetToolgroup_bindEvents();
}
catch(ex){
jsExDebug("adToolgroup_bindEvents",ex);
}
}
function adToolgroup_adBtnClickEvent(_9,_a){
try{
if(this.application&&this.application.AD_URL){
this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_BROWSER,"Partners","Launching Browser...",this.application.AD_URL);
}
}
catch(ex){
jsExDebug("adToolgroup_adBtnClickEvent",ex);
}
}

try{
collaborationToolgroup_t.prototype=new widgetToolgroup_t();
collaborationToolgroup_t.prototype.constructor=collaborationToolgroup_t;
collaborationToolgroup_t.prototype.cleanUp=collaborationToolgroup_cleanUp;
collaborationToolgroup_t.prototype.collaborationToolgroup_super=widgetToolgroup_t.prototype.constructor;
collaborationToolgroup_t.prototype.widgetToolgroup_cleanUp=widgetToolgroup_t.prototype.cleanUp;
collaborationToolgroup_t.prototype.widgetToolgroup_createDom=widgetToolgroup_t.prototype.createDom;
collaborationToolgroup_t.prototype.widgetToolgroup_bindEvents=widgetToolgroup_t.prototype.bindEvents;
collaborationToolgroup_t.prototype.createDom=collaborationToolgroup_createDom;
collaborationToolgroup_t.prototype.bindEvents=collaborationToolgroup_bindEvents;
collaborationToolgroup_t.prototype.updateFileId=collaborationToolgroup_updateFileId;
collaborationToolgroup_t.prototype.setTokenStatus=collaborationToolgroup_setTokenStatus;
collaborationToolgroup_t.prototype.setWriteAccess=collaborationToolgroup_setWriteAccess;
collaborationToolgroup_t.prototype.getFileId=collaborationToolgroup_getFileId;
collaborationToolgroup_t.prototype.allowedToEdit=collaborationToolgroup_allowedToEdit;
collaborationToolgroup_t.prototype.setCollaborationIcon=collaborationToolgroup_setCollaborationIcon;
collaborationToolgroup_t.prototype.fileReloaded=collaborationToolgroup_fileReloaded;
collaborationToolgroup_t.prototype.takeToken=collaborationToolgroup_takeToken;
collaborationToolgroup_t.prototype.releaseToken=collaborationToolgroup_releaseToken;
collaborationToolgroup_t.prototype.releaseTokenNoCallback=collaborationToolgroup_releaseTokenNoCallback;
collaborationToolgroup_t.prototype.hasWriteAccess=collaborationToolgroup_hasWriteAccess;
collaborationToolgroup_t.prototype.refresh=collaborationToolgroup_refresh;
collaborationToolgroup_t.prototype.updateTokenOwner=collaborationToolgroup_updateTokenOwner;
collaborationToolgroup_t.prototype.takeBtnClickEvent=collaborationToolgroup_takeBtnClickEvent;
collaborationToolgroup_t.prototype.releaseBtnClickEvent=collaborationToolgroup_releaseBtnClickEvent;
collaborationToolgroup_t.prototype.refreshBtnClickEvent=collaborationToolgroup_refreshBtnClickEvent;
collaborationToolgroup_t.prototype.readShareCallback=collaborationToolgroup_readShareCallback;
collaborationToolgroup_t.prototype.writeShareCallback=collaborationToolgroup_writeShareCallback;
collaborationToolgroup_t.prototype.unShareCallback=collaborationToolgroup_unShareCallback;
collaborationToolgroup_t.prototype.TAKE_BTN_WIDTH=150;
collaborationToolgroup_t.prototype.RELEASE_BTN_WIDTH=170;
collaborationToolgroup_t.prototype.SELECT_WIDTH=60;
collaborationToolgroup_t.prototype.SELECT_HEIGHT=22;
collaborationToolgroup_t.prototype.USER_LBL_WIDTH=190;
collaborationToolgroup_t.prototype.READ_LEFT=4;
collaborationToolgroup_t.prototype.READ_TOP=4;
collaborationToolgroup_t.prototype.WRITE_LEFT=4;
collaborationToolgroup_t.prototype.WRITE_TOP=39;
collaborationToolgroup_t.prototype.EDIT_LEFT=100;
collaborationToolgroup_t.prototype.EDIT_TOP=4;
collaborationToolgroup_t.prototype.TAKE_LEFT=collaborationToolgroup_t.prototype.EDIT_LEFT;
collaborationToolgroup_t.prototype.TAKE_TOP=39;
collaborationToolgroup_t.prototype.RELEASE_LEFT=collaborationToolgroup_t.prototype.TAKE_LEFT;
collaborationToolgroup_t.prototype.RELEASE_TOP=collaborationToolgroup_t.prototype.TAKE_TOP;
collaborationToolgroup_t.prototype.REFRESH_LEFT=273;
collaborationToolgroup_t.prototype.REFRESH_TOP=39;
collaborationToolgroup_t.prototype.USER_LEFT=102;
collaborationToolgroup_t.prototype.USER_TOP=20;
collaborationToolgroup_t.prototype.WIDTH=300;
collaborationToolgroup_t.prototype.REFRESH_IMG="img/app/system/icons/24x24/refresh.png";
}
catch(ex){
jsExDebug("collaborationToolgroup_t.prototype",ex);
}
function collaborationToolgroup_t(_1,_2,_3,_4){
try{
this.collaborationToolgroup_super(_1,this.WIDTH,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.name=_1;
this.application=_2;
this.fileId=null;
this.userHasToken=false;
this.userHasWriteAccess=false;
this.icon=_3;
this.tokenOwnerName=null;
this.notifierIndex=this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_SHARED_R_FILE,new this.SYSTEM.Delegate(this,this.readShareCallback,[0]));
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_SHARED_RW_FILE,new this.SYSTEM.Delegate(this,this.writeShareCallback,[0]),this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.SHARING_UNSHARED_FILE,new this.SYSTEM.Delegate(this,this.unShareCallback,[0]),this.notifierIndex);
if(!_4){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("collaborationToolgroup_t",ex);
}
}
function collaborationToolgroup_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Notifier.unregisterActionListener(me.notifierIndex);
me.notifierIndex=null;
me.editing=null;
me.name=null;
me.application=null;
me.fileId=null;
me.tokenOwnerName=null;
me.userHasWriteAccess=null;
me.readSelect=null;
me.writeSelect=null;
me.editControlLabel=null;
me.noWriteAccessLabel=null;
me.takeBtn=null;
me.releaseBtn=null;
me.icon=null;
me.userLabel=null;
me.noFileIdLabel=null;
me.refreshBtn=null;
me.widgetToolgroup_cleanUp();
}
catch(ex){
jsExDebug("collaborationToolgroup_cleanUp",ex);
}
}
function collaborationToolgroup_createDom(){
try{
this.widgetToolgroup_createDom(this.WIDTH,this.HEIGHT);
this.allowOverflow();
this.allowLabel("Edit Control");
var _6=new this.SYSTEM.Widget.DropText("readSelect",this.SELECT_WIDTH,this.SELECT_HEIGHT);
_6.setDisplayOverrideText("Readers");
_6.addItem(null,"None","None");
var _7=new this.SYSTEM.Widget.DropText("writeSelect",this.SELECT_WIDTH,this.SELECT_HEIGHT);
_7.setDisplayOverrideText("Writers");
_7.addItem(null,"None","None");
var _8=new this.SYSTEM.Widget.Label("noWriteAccessLabel");
_8.setText("You do not have write access to this file.");
_8.hide();
var _9=new this.SYSTEM.Widget.Label("noFileIdLabel");
_9.setText("To begin collaboration, save this file and share it with another Peepel user.");
_9.setDimensions(210);
var _a=new this.SYSTEM.Widget.Label("editControlLabel");
_a.setText("<b>Current editor:</b>");
var _b=new this.SYSTEM.Widget.Label("userLabel");
_b.setDimensions(this.USER_LBL_WIDTH,null);
var _c=new this.SYSTEM.Widget.TextButton("takeBtn",this.TAKE_BTN_WIDTH,"Take Edit Control");
_c.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.takeBtnClickEvent));
var _d=new this.SYSTEM.Widget.TextButton("realeaseBtn",this.RELEASE_BTN_WIDTH,"Release Edit Control");
_d.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.releaseBtnClickEvent));
var _e=new this.SYSTEM.Widget.ClassButton("refreshBtn",2,24,24,null,this.REFRESH_IMG,"Refresh","Refresh the collaboration information.");
_e.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.refreshBtnClickEvent));
_c.hide();
_d.hide();
_e.hide();
_a.hide();
_b.hide();
this.addWidget(_8,this.EDIT_LEFT,this.EDIT_TOP);
this.addWidget(_9,this.EDIT_LEFT,this.EDIT_TOP);
this.addWidget(_a,this.EDIT_LEFT,this.EDIT_TOP);
this.addWidget(_b,this.USER_LEFT,this.USER_TOP);
this.addWidget(_c,this.TAKE_LEFT,this.TAKE_TOP);
this.addWidget(_d,this.RELEASE_LEFT,this.RELEASE_TOP);
this.addWidget(_e,this.REFRESH_LEFT,this.REFRESH_TOP);
this.addWidget(_7,this.WRITE_LEFT,this.WRITE_TOP);
this.addWidget(_6,this.READ_LEFT,this.READ_TOP);
this.readSelect=_6;
this.writeSelect=_7;
this.editControlLabel=_a;
this.userLabel=_b;
this.noWriteAccessLabel=_8;
this.noFileIdLabel=_9;
this.takeBtn=_c;
this.releaseBtn=_d;
this.refreshBtn=_e;
}
catch(ex){
jsExDebug("collaborationToolgroup_createDom",ex);
}
}
function collaborationToolgroup_bindEvents(){
try{
this.widgetToolgroup_bindEvents();
}
catch(ex){
jsExDebug("collaborationToolgroup_bindEvents",ex);
}
}
function collaborationToolgroup_updateFileId(_f,_10){
function updateDetails(_11){
try{
if(_11){
this.fileId=_f;
if(!_10){
this.refresh();
}
}
}
catch(ex){
jsExDebug("collaborationToolgroup_updateFileId: updateDetails",ex);
}
}
try{
if(_f==this.fileId){
return;
}
if(this.fileId!=null&&_f!=this.fileId&&this.userHasToken){
this.SYSTEM.Filesystem.releaseWriteToken(this.fileId,new this.SYSTEM.Delegate(this,updateDetails));
}else{
updateDetails.call(this,true);
}
}
catch(ex){
jsExDebug("collaborationToolgroup_updateFileId",ex);
}
}
function collaborationToolgroup_setCollaborationIcon(_12){
try{
this.icon=_12;
}
catch(ex){
jsExDebug("collaborationToolgroup_setCollaborationIcon",ex);
}
}
function collaborationToolgroup_allowedToEdit(){
try{
return this.userHasToken;
}
catch(ex){
jsExDebug("collaborationToolgroup_allowedToEdit",ex);
}
}
function collaborationToolgroup_takeToken(){
function takeTokenCallback(_13){
try{
if(_13){
this.userLabel.setText("Me");
this.takeBtn.hide();
this.releaseBtn.show();
this.setTokenStatus(true);
if(this.application.reload){
this.application.reload();
}
}
}
catch(ex){
jsExDebug("collaborationToolgroup_takeToken: takeTokenCallback",ex);
}
}
try{
if(!this.userHasToken){
this.SYSTEM.Filesystem.takeWriteToken(this.fileId,new this.SYSTEM.Delegate(this,takeTokenCallback));
}
}
catch(ex){
jsExDebug("collaborationToolgroup_takeToken",ex);
}
}
function collaborationToolgroup_releaseToken(_14){
function saveCallback(){
try{
if(_14){
this.SYSTEM.Filesystem.releaseWriteToken(this.fileId,_14);
}else{
this.SYSTEM.Filesystem.releaseWriteToken(this.fileId,new this.SYSTEM.Delegate(this,releaseTokenCallback));
}
}
catch(ex){
jsExDebug("collaborationToolgroup_releaseToken: saveCallback",ex);
}
}
function releaseTokenCallback(_15){
try{
if(_15){
this.userLabel.setText("none");
this.takeBtn.show();
this.releaseBtn.hide();
this.setTokenStatus(false,false,true);
}
}
catch(ex){
jsExDebug("collaborationToolgroup_releaseToken: releaseTokenCallback",ex);
}
}
try{
if(this.userHasToken){
var _16=this.application[this.name+"_tokenRelease"];
if(_16){
_16.call(this.application,new this.SYSTEM.Delegate(this,saveCallback));
}
}else{
if(_14){
_14.invoke(false);
}
}
}
catch(ex){
jsExDebug("collaborationToolgroup_releaseToken",ex);
}
}
function collaborationToolgroup_releaseTokenNoCallback(_17){
try{
if(this.userHasToken){
this.SYSTEM.Filesystem.releaseWriteToken(this.fileId);
if(_17){
this.userLabel.setText("none");
this.takeBtn.show();
this.releaseBtn.hide();
this.setTokenStatus(false,false,true);
}
}
}
catch(ex){
jsExDebug("collaborationToolgroup_forceReleaseToken",ex);
}
}
function collaborationToolgroup_setTokenStatus(_18,_19,_1a){
try{
this.userHasToken=_18;
if(this.icon){
this.icon[(this.userHasToken?(_19?"go":"wait"):(_1a?"off":"stop"))](this.tokenOwnerName);
}
}
catch(ex){
jsExDebug("collaborationToolgroup_setTokenStatus",ex);
}
}
function collaborationToolgroup_setWriteAccess(_1b){
function refreshCallback(me){
try{
me.readSelect.clearList();
me.writeSelect.clearList();
var _1d=me.SYSTEM.Filesystem.getUsersWithReadAccessById(me.fileId);
var _1e=me.SYSTEM.Filesystem.getUsersWithReadWriteAccessById(me.fileId);
for(var i=0;i<_1d.length;i++){
me.readSelect.addItem(_1d[i].userId,_1d[i].userName,_1d[i].userName);
}
for(i=0;i<_1e.length;i++){
me.writeSelect.addItem(_1e[i].userId,_1e[i].userName,_1e[i].userName);
}
if(!me.readSelect.list.getItemCount()){
me.readSelect.addItem(null,"None","None");
}
if(!me.writeSelect.list.getItemCount()){
me.writeSelect.addItem(null,"None","None");
}
}
catch(ex){
jsExDebug("collaborationToolgroup_setWriteAccess: refreshCallback",ex);
}
}
try{
this.userHasWriteAccess=_1b;
var _20=this.SYSTEM.UserDetails;
if(!_1b){
this.takeBtn.hide();
this.releaseBtn.hide();
this.userLabel.hide();
this.editControlLabel.hide();
this.noFileIdLabel.hide();
this.noWriteAccessLabel.show();
this.refreshBtn.hide();
}else{
if(this.userHasToken){
this.releaseBtn.show();
}else{
this.takeBtn.show();
}
this.userLabel.show();
this.editControlLabel.show();
this.noFileIdLabel.hide();
this.noWriteAccessLabel.hide();
this.refreshBtn.show();
}
this.SYSTEM.Filesystem.refresh(refreshCallback,this);
}
catch(ex){
jsExDebug("collaborationToolgroup_setWriteAccess",ex);
}
}
function collaborationToolgroup_getFileId(){
try{
return this.fileId;
}
catch(ex){
jsExDebug("collaborationToolgroup_getFileId",ex);
}
}
function collaborationToolgroup_hasWriteAccess(){
try{
var _21=this.SYSTEM.Filesystem.getFilePermsisionsById(this.fileId);
if(_21>=this.SYSTEM.Filesystem.FILE_ACCESS_WRITE){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("collaborationToolgroup_hasWriteAccess",ex);
}
}
function collaborationToolgroup_fileReloaded(){
try{
if(this.icon){
if(this.userHasToken&&this.icon.state==this.icon.WAIT){
this.icon.go();
}
}
}
catch(ex){
jsExDebug("collaborationToolgroup_fileReloaded",ex);
}
}
function collaborationToolgroup_refresh(){
function showOwner(_22){
try{
if(!_22||_22.error){
return;
}
if(this.hasWriteAccess()){
this.setWriteAccess(true);
this.noFileIdLabel.hide();
this.refreshBtn.show();
if(_22.hasOwner){
this.tokenOwnerName=_22.userName;
if(this.tokenOwnerName==this.SYSTEM.UserDetails.userName){
this.tokenOwnerName="Me";
this.takeBtn.hide();
this.releaseBtn.show();
this.setTokenStatus(true,true);
}else{
this.releaseBtn.hide();
this.takeBtn.show();
this.setTokenStatus(false);
}
this.userLabel.setText(this.tokenOwnerName);
}else{
this.userLabel.setText("none");
this.takeBtn.show();
this.releaseBtn.hide();
this.setTokenStatus(false,false,true);
}
}else{
if(_22.hasOwner){
this.tokenOwnerName=_22.userName;
}else{
this.tokenOwnerName="No one";
}
this.setWriteAccess(false);
this.setTokenStatus(false);
}
}
catch(ex){
jsExDebug("collaborationToolgroup_updateFileId: showOwner",ex);
}
}
function refreshCallback(me){
try{
if(!me.SYSTEM){
return;
}
me.readSelect.clearList();
me.writeSelect.clearList();
var _24=me.SYSTEM.Filesystem.getUsersWithReadAccessById(me.fileId);
var _25=me.SYSTEM.Filesystem.getUsersWithReadWriteAccessById(me.fileId);
for(var i=0;i<_24.length;i++){
me.readSelect.addItem(_24[i].userId,_24[i].userName,_24[i].userName);
}
for(i=0;i<_25.length;i++){
me.writeSelect.addItem(_25[i].userId,_25[i].userName,_25[i].userName);
}
if(!me.readSelect.list.getItemCount()){
me.readSelect.addItem(null,"None","None");
}
if(!me.writeSelect.list.getItemCount()){
me.writeSelect.addItem(null,"None","None");
}
me.SYSTEM.Filesystem.getCurrentWriteTokenOwner(me.fileId,new me.SYSTEM.Delegate(me,showOwner));
}
catch(ex){
jsExDebug("collaborationToolgroup_refresh: refreshCallback",ex);
}
}
try{
this.SYSTEM.Filesystem.refresh(refreshCallback,this);
}
catch(ex){
jsExDebug("collaborationToolgroup_refresh",ex);
}
}
function collaborationToolgroup_updateTokenOwner(_27){
try{
if(!_27||_27.error){
return;
}
if(this.userHasWriteAccess){
var _28=this.userHasToken;
this.noFileIdLabel.hide();
this.refreshBtn.show();
if(_27.hasOwner){
this.tokenOwnerName=_27.userName;
if(_27.userId==this.SYSTEM.UserDetails.id){
this.tokenOwnerName="Me";
this.takeBtn.hide();
this.releaseBtn.show();
this.setTokenStatus(true,true);
}else{
this.releaseBtn.hide();
this.takeBtn.show();
this.setTokenStatus(false);
}
if(_28&&!this.userHasToken){
var _29=this.SYSTEM.Filesystem.getFileNameFromId(this.fileId);
var _2a=new this.SYSTEM.Dialogue.OkAlert(null,"Peepel",this.tokenOwnerName+" has taken edit control of the file: <b>"+_29+"</b>");
}
this.userLabel.setText(this.tokenOwnerName);
}else{
this.userLabel.setText("none");
this.takeBtn.show();
this.releaseBtn.hide();
this.setTokenStatus(false,false,true);
}
}else{
if(_27.hasOwner){
this.tokenOwnerName=_27.userName;
}else{
this.tokenOwnerName="No one";
}
this.setTokenStatus(false);
}
}
catch(ex){
jsExDebug("collaborationToolgroup_updateTokenOwner",ex);
}
}
function collaborationToolgroup_takeBtnClickEvent(){
try{
this.takeToken();
}
catch(ex){
jsExDebug("collaborationToolgroup_takeBtnClickEvent",ex);
}
}
function collaborationToolgroup_releaseBtnClickEvent(){
try{
this.releaseToken();
}
catch(ex){
jsExDebug("collaborationToolgroup_releaseBtnClickEvent",ex);
}
}
function collaborationToolgroup_refreshBtnClickEvent(){
try{
this.refresh();
}
catch(ex){
jsExDebug("collaborationToolgroup_refreshBtnClickEvent",ex);
}
}
function collaborationToolgroup_readShareCallback(_2b){
try{
if(_2b==this.fileId){
this.setWriteAccess(false);
this.setTokenStatus(false);
}
}
catch(ex){
jsExDebug("collaborationToolgroup_readShareCallback",ex);
}
}
function collaborationToolgroup_writeShareCallback(_2c){
function showOwner(_2d){
try{
if(!_2d||_2d.error){
return;
}
if(_2d.hasOwner){
this.tokenOwnerName=_2d.userName;
if(this.tokenOwnerName==this.SYSTEM.UserDetails.userName){
this.tokenOwnerName="Me";
this.takeBtn.hide();
this.releaseBtn.show();
this.setTokenStatus(true,true);
}else{
this.releaseBtn.hide();
this.takeBtn.show();
this.setTokenStatus(false);
}
this.userLabel.setText(this.tokenOwnerName);
}else{
this.userLabel.setText("none");
this.takeBtn.show();
this.releaseBtn.hide();
this.setTokenStatus(false,false,true);
}
}
catch(ex){
jsExDebug("collaborationToolgroup_writeShareCallback: showOwner",ex);
}
}
try{
if(_2c==this.fileId){
this.setWriteAccess(true);
this.SYSTEM.Filesystem.getCurrentWriteTokenOwner(this.fileId,new this.SYSTEM.Delegate(this,showOwner));
}
}
catch(ex){
jsExDebug("collaborationToolgroup_writeShareCallback",ex);
}
}
function collaborationToolgroup_unShareCallback(_2e){
try{
if(_2e==this.fileId&&this.application.close){
this.application.close();
}
}
catch(ex){
jsExDebug("collaborationToolgroup_unShareCallback",ex);
}
}

try{
basicTreeView_t.prototype=new widget_t();
basicTreeView_t.prototype.constructor=basicTreeView_t;
basicTreeView_t.prototype.cleanUp=basicTreeView_cleanUp;
basicTreeView_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
basicTreeView_t.prototype.basicTreeView_super=widget_t.prototype.constructor;
basicTreeView_t.prototype.createDom=basicTreeView_createDom;
basicTreeView_t.prototype.addItem=basicTreeView_addItem;
basicTreeView_t.prototype.removeItem=basicTreeView_removeItem;
basicTreeView_t.prototype.draw=basicTreeView_draw;
basicTreeView_t.prototype.drawFromParent=basicTreeView_drawFromParent;
basicTreeView_t.prototype.toggleItem=basicTreeView_toggleItem;
basicTreeView_t.prototype.findItem=basicTreeView_findItem;
basicTreeView_t.prototype.linkClickEvent=basicTreeView_linkClickEvent;
basicTreeView_t.prototype.btnClickEvent=basicTreeView_btnClickEvent;
basicTreeView_t.prototype.INDENT_PIXELS=25;
basicTreeView_t.prototype.DEFAULT_NEW_LINE_PIXELS=20;
basicTreeView_t.prototype.OPEN_IMG="img/app/system/widgets/treeview/open";
basicTreeView_t.prototype.DEFAULT_EVENT=darkMagic_t.prototype.LIST_ITEM_SELECT_EVENT;
basicTreeView_t.prototype.SUPPORTED_EVENTS=[darkMagic_t.prototype.LIST_EXPAND_EVENT];
}
catch(ex){
jsExDebug("basicTreeView_t.prototype",ex);
}
function basicTreeView_t(_1,_2,_3,_4){
try{
this.basicTreeView_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.tree={name:_1,children:[],value:null,open:true,widget:null};
this.newLinePixels=(_2?_2+2:this.DEFAULT_NEW_LINE_PIXELS);
this.fontPixels=_2;
this.selectedValue=null;
this.closeChildren=_3;
if(!_4){
this.createDom();
}
}
catch(ex){
jsExDebug("basicTreeView_t",ex);
}
}
function basicTreeView_cleanUp(me){
try{
if(!me){
me=this;
}
me.removeItem(me.tree);
me.tree=null;
me.newLinePixels=null;
me.selectedValue=null;
me.closeChildren=null;
me.fontPixels=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("basicTreeView_cleanUp",ex);
}
}
function basicTreeView_createDom(){
try{
this.widgetElement.style.overflow="auto";
}
catch(ex){
jsExDebug("basicTreeView_createDom",ex);
}
}
function basicTreeView_addItem(_6,_7,_8,_9,_a){
try{
if(_7==null){
_7=0;
}
var _b=null;
if(_6){
_b=this.findItem(this.tree,_6);
}else{
_b=this.tree;
}
if(!_b){
return;
}
if(_b.children[_7]){
var _c=null;
for(var _d=_b.children.length;_d>_7;_d--){
_c=parseInt(_d)-1;
_b.children[_d]=_b.children[_c];
_b.children[_c]=null;
}
}
_b.children[_7]={name:_8,children:[],value:_9,open:false,widget:null,position:_7,parent:_b,bold:_a};
}
catch(ex){
jsExDebug("basicTreeView_addItem",ex);
}
}
function basicTreeView_removeItem(_e){
try{
for(var i=0;i<_e.children.length;i++){
if(_e.children[i]){
this.removeItem(_e.children[i]);
_e.children[i]=null;
}
}
var _10=_e.parent;
var _11=_e.position;
_e.name=null;
_e.children=null;
_e.open=null;
if(_e.link){
_e.link.cleanUp();
_e.btn.cleanUp();
}
_e.link=null;
_e.btn=null;
_e.value=null;
_e.position=null;
_e.parent=null;
_e.bold=null;
if(_10){
_10.children[_11]=null;
}
}
catch(ex){
jsExDebug("basicTreeView_removeItem",ex);
}
}
function basicTreeView_draw(){
try{
var _12=this.drawFromParent(this.tree,0,0,false);
this.setDimensions(null,_12.currentTop+10);
}
catch(ex){
jsExDebug("basicTreeView_draw",ex);
}
}
function basicTreeView_drawFromParent(_13,_14,_15,_16){
try{
var _17=null;
var _18=null;
var btn=null;
var pos=null;
var _1b=null;
var _1c=null;
for(var i=0;i<_13.children.length;i++){
_1b=_14;
_1c=_15;
_17=_13.children[i];
if(!_17){
continue;
}
if(!_17.link){
btn=new this.SYSTEM.Widget.Button("treeBtn_"+_17.name,this.OPEN_IMG,button_t.prototype.ON_IMAGE,this.fontPixels,this.fontPixels);
btn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.btnClickEvent));
_17.btn=btn;
_18=new this.SYSTEM.Widget.Link("treeLink_"+_17.name,_17.name);
_18.setFontSize(null,this.fontPixels);
_18.setColour("rgb(0,0,0)");
if(_17.bold){
_18.linkElement.style.fontWeight="bold";
}
_18.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.linkClickEvent));
_17.link=_18;
}else{
_18=_17.link;
btn=_17.btn;
}
btn.setPosition(_14,_15+2);
_18.setPosition(_14+btn.width+3,_15);
btn.setValue(_17);
_18.setValue(_17);
if(!_13.open){
_16=true;
if(this.closeChildren){
_17.open=false;
btn.turnOff();
}
}
pos=this.drawFromParent(_17,_1b+this.INDENT_PIXELS,_1c+this.newLinePixels,_16);
if(_13.open&&!_16){
if(_17.children.length){
btn.attach(this.widgetElement);
}
_18.attach(this.widgetElement);
_15=pos.currentTop;
}else{
_18.detach();
if(_17.children.length){
btn.detach();
}
}
}
return {currentLeft:_14,currentTop:_15};
}
catch(ex){
jsExDebug("basicTreeView_drawFromParent",ex);
}
}
function basicTreeView_toggleItem(_1e){
try{
var _1f=this.findItem(this.tree,_1e);
if(_1f){
_1f.open=!_1f.open;
}
}
catch(ex){
jsExDebug("basicTreeView_toggleItem",ex);
}
}
function basicTreeView_findItem(_20,_21){
try{
if(_20.name==_21){
return _20;
}else{
var _22=null;
for(var i=0;i<_20.children.length;i++){
if(_20.children[i]){
_22=this.findItem(_20.children[i],_21);
}
}
if(_22){
return _22;
}
}
return null;
}
catch(ex){
jsExDebug("basicTreeView_findItem",ex);
}
}
function basicTreeView_linkClickEvent(_24,_25){
try{
this.fireEvent(this.DEFAULT_EVENT,_24);
}
catch(ex){
jsExDebug("basicTreeView_linkClickEvent",ex);
}
}
function basicTreeView_btnClickEvent(_26,_27){
try{
var _28=_27.getValue();
if(_28.open){
_27.turnOff();
}else{
_27.turnOn();
}
_28.open=!_28.open;
this.selectedValue=_28.value;
this.draw();
this.fireEvent(this.SYSTEM.Event.LIST_EXPAND_EVENT,_26);
}
catch(ex){
jsExDebug("basicTreeView_btnClickEvent",ex);
}
}

try{
widgetSignUp_t.prototype=new widget_t();
widgetSignUp_t.prototype.widgetSignUp_super=widget_t.prototype.constructor;
widgetSignUp_t.prototype.constructor=widgetSignUp_t;
widgetSignUp_t.prototype.cleanUp=widgetSignUp_cleanUp;
widgetSignUp_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetSignUp_t.prototype.createDom=widgetSignUp_createDom;
widgetSignUp_t.prototype.completeSignUpProcess=widgetSignUp_completeSignUpProcess;
widgetSignUp_t.prototype.error=widgetSignUp_error;
widgetSignUp_t.prototype.saveEmail=widgetSignUp_saveEmail;
widgetSignUp_t.prototype.savePassword=widgetSignUp_savePassword;
widgetSignUp_t.prototype.saveDetails=widgetSignUp_saveDetails;
widgetSignUp_t.prototype.emailUniquenessResponse=widgetSignUp_emailUniquenessResponse;
widgetSignUp_t.prototype.saveBtnClickEvent=widgetSignUp_saveBtnClickEvent;
widgetSignUp_t.prototype.dateSelectEvent=widgetSignUp_dateSelectEvent;
widgetSignUp_t.prototype.globalClickEvent=widgetSignUp_globalClickEvent;
widgetSignUp_t.prototype.FORM_TOP=30;
widgetSignUp_t.prototype.ACCOUNT_EMAIL_HEIGHT=60;
widgetSignUp_t.prototype.ACCOUNT_PASSWORD_HEIGHT=90;
widgetSignUp_t.prototype.IDENT_HEIGHT=130;
widgetSignUp_t.prototype.AGE_HEIGHT=200;
widgetSignUp_t.prototype.AGE_TEXT_HEIGHT=70;
widgetSignUp_t.prototype.STANDARD_WIDTH=500;
widgetSignUp_t.prototype.STANDARD_HEIGHT=widgetSignUp_t.prototype.FORM_TOP+widgetSignUp_t.prototype.IDENT_HEIGHT+widgetSignUp_t.prototype.AGE_HEIGHT;
widgetSignUp_t.prototype.WITH_EMAIL_HEIGHT=widgetSignUp_t.prototype.STANDARD_HEIGHT+widgetSignUp_t.prototype.ACCOUNT_EMAIL_HEIGHT;
widgetSignUp_t.prototype.WITH_PASSWORD_HEIGHT=widgetSignUp_t.prototype.STANDARD_HEIGHT+widgetSignUp_t.prototype.ACCOUNT_PASSWORD_HEIGHT;
}
catch(ex){
jsExDebug("widgetSignUp_t.prototype",ex);
}
function widgetSignUp_t(_1,_2,_3,_4){
try{
this.widgetSignUp_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.settingIncludeEmail=_2;
this.settingIncludePassword=_3;
this.errorVisible=false;
this.SYSTEM.Dom.showInterfaceCover();
this.SYSTEM.Notifier.getNotifierWidget().hide();
this.SYSTEM.Login.hide();
this.SYSTEM.Launcher.hide();
this.SYSTEM.APPLICATION_MANAGER.getTaskListWidget().hide();
global_stopTimedServiceRequests();
this.SYSTEM.Event.disableMouseScrollEvents();
this.createDom();
this.SYSTEM.Event.attachEvent(this.widgetElement,"allclickprop","allclickprop",this.globalClickEvent,this);
}
catch(ex){
jsExDebug("widgetSignUp_t",ex);
}
}
function widgetSignUp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.widgetElement,"allclickprop","allclickprop");
if(me.settingIncludeEmail){
me.accountLabel.cleanUp();
me.accountLabel=null;
me.emailLabel.cleanUp();
me.emailLabel=null;
me.emailText.cleanUp();
me.emailText=null;
}
me.settingIncludeEmail=null;
if(me.settingIncludePassword){
me.accountLabel.cleanUp();
me.accountLabel=null;
me.passwordLabel.cleanUp();
me.passwordLabel=null;
me.passwordText.cleanUp();
me.passwordText=null;
me.confirmPasswordLabel.cleanUp();
me.confirmPasswordLabel=null;
me.confirmPasswordText.cleanUp();
me.confirmPasswordText=null;
}
me.settingIncludePassword=null;
me.firstNameLabel.cleanUp();
me.firstNameLabel=null;
me.firstNameText.cleanUp();
me.firstNameText=null;
me.lastNameLabel.cleanUp();
me.lastNameLabel=null;
me.lastNameText.cleanUp();
me.lastNameText=null;
me.screenNameLabel.cleanUp();
me.screenNameLabel=null;
me.screenNameText.cleanUp();
me.screenNameText=null;
me.guardianLabel.cleanUp();
me.guardianLabel=null;
me.guardianCheckbox.cleanUp();
me.guardianCheckbox=null;
me.dateLabel.cleanUp();
me.dateLabel=null;
me.dateSelect.cleanUp();
me.dateSelect=null;
me.tabGroup.cleanUp();
me.tabGroup=null;
me.saveBtn.cleanUp();
me.saveBtn=null;
me.errorDiv=null;
if(me.SYSTEM.Notifier){
global_restartTimedServiceRequests();
me.SYSTEM.Dom.hideInterfaceCover();
me.SYSTEM.Notifier.getNotifierWidget().show();
me.SYSTEM.Login.show();
me.SYSTEM.Launcher.show();
me.SYSTEM.APPLICATION_MANAGER.getTaskListWidget().show();
me.SYSTEM.Event.enableMouseScrollEvents();
}
me.errorVisible=false;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetSignUp_cleanUp",ex);
}
}
function widgetSignUp_createDom(){
try{
this.widgetElement.style.zIndex=ATOP_INTERFACE_COVER_ZINDEX;
this.widgetElement.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
this.widgetElement.style.backgroundColor=this.SYSTEM.Style.BLUE_TOOLGROUP_BG;
if(this.settingIncludeEmail){
this.setDimensions(this.STANDARD_WIDTH,this.WITH_EMAIL_HEIGHT);
this.accountSectionTop=this.FORM_TOP;
this.identificationSectionTop=this.accountSectionTop+this.ACCOUNT_EMAIL_HEIGHT;
}else{
if(this.settingIncludePassword){
this.setDimensions(this.STANDARD_WIDTH,this.WITH_PASSWORD_HEIGHT);
this.accountSectionTop=this.FORM_TOP;
this.identificationSectionTop=this.accountSectionTop+this.ACCOUNT_PASSWORD_HEIGHT;
}else{
this.setDimensions(this.STANDARD_WIDTH,this.STANDARD_HEIGHT);
this.identificationSectionTop=this.FORM_TOP;
}
}
this.ageSectionTop=this.identificationSectionTop+this.IDENT_HEIGHT;
var w=this.SYSTEM.Widget;
var _7=this.SYSTEM.Style.WIDGET_PADDING;
var _8=30;
var _9=30;
var _a=60;
var _b=_a+130;
var _c=200;
var _d=new w.Label("introLabel","Please supply these details so they can be added to your profile.");
_d.setPosition(_7,_7);
_d.attach(this.widgetElement);
if(this.settingIncludeEmail){
var _e=new w.Label("accountLabel","Account verification (required)");
_e.setPosition(_9,this.accountSectionTop);
_e.setItalics();
_e.attach(this.widgetElement);
var _f=new w.Label("emailLabel","Email address");
_f.setPosition(_a,_e.positionY+_8);
_f.attach(this.widgetElement);
var _10=new w.Text("emailText");
_10.setPosition(_b,_f.positionY);
_10.setDimensions(_c);
_10.attach(this.widgetElement);
this.accountLabel=_e;
this.emailLabel=_f;
this.emailText=_10;
}else{
if(this.settingIncludePassword){
var _e=new w.Label("accountLabel","Password (required)");
_e.setPosition(_9,this.accountSectionTop);
_e.setItalics();
_e.attach(this.widgetElement);
var _11=new w.Label("passwordLabel","Password");
_11.setPosition(_a,_e.positionY+_8);
_11.attach(this.widgetElement);
var _12=new w.Text("passwordText",false,false,true);
_12.setPosition(_b,_11.positionY);
_12.setDimensions(_c);
_12.attach(this.widgetElement);
var _13=new w.Label("confirmPasswordLabel","Confirm Password");
_13.setPosition(_a,_11.positionY+_8);
_13.attach(this.widgetElement);
var _14=new w.Text("confirmPasswordText",false,false,true);
_14.setPosition(_b,_13.positionY);
_14.setDimensions(_c);
_14.attach(this.widgetElement);
this.accountLabel=_e;
this.passwordLabel=_11;
this.passwordText=_12;
this.confirmPasswordLabel=_13;
this.confirmPasswordText=_14;
}
}
var _15=new w.Label("identLabel","Identification (not required)");
_15.setPosition(_9,this.identificationSectionTop);
_15.setItalics();
_15.attach(this.widgetElement);
var _16=new w.Label("firstnameLabel","First name");
_16.setPosition(_a,this.identificationSectionTop+_8);
_16.attach(this.widgetElement);
var _17=new w.Text("firstnamfirstNameTexteText");
_17.setPosition(_b,_16.positionY);
_17.setDimensions(_c);
_17.attach(this.widgetElement);
var _18=new w.Label("lastNameLabel","Last name");
_18.setPosition(_a,_16.positionY+_8);
_18.attach(this.widgetElement);
var _19=new w.Text("lastNameText");
_19.setPosition(_b,_18.positionY);
_19.setDimensions(_c);
_19.attach(this.widgetElement);
var _1a=new w.Label("screenNameLabel","Screen name");
_1a.setPosition(_a,_18.positionY+_8);
_1a.attach(this.widgetElement);
var _1b=new w.Text("screenNameText");
_1b.setPosition(_b,_1a.positionY);
_1b.setDimensions(_c);
_1b.attach(this.widgetElement);
var _1c=new w.TabGroup("signUpWidgetTabGroup",true);
if(this.settingIncludeEmail){
_1c.addTextWidget(_10);
}else{
if(this.settingIncludePassword){
_1c.addTextWidget(_12);
_1c.addTextWidget(_14);
}else{
_1b.setContent(this.SYSTEM.UserDetails.emailAddress.split("@")[0]);
}
}
_1c.addTextWidget(_17);
_1c.addTextWidget(_19);
_1c.addTextWidget(_1b);
var _1d=new w.Label("ageLabel","Age verification (not required)");
_1d.setPosition(_9,this.ageSectionTop);
_1d.setItalics();
_1d.attach(this.widgetElement);
var _1e=new w.Label("dateLabel","Date of Birth");
_1e.setPosition(_a,this.ageSectionTop+_8+this.AGE_TEXT_HEIGHT+_7);
_1e.attach(this.widgetElement);
var _1f=new w.DateSelect("dateSelect");
_1f.setDate(this.SYSTEM.UserDetails.dobDay,this.SYSTEM.UserDetails.dobMonth,this.SYSTEM.UserDetails.dobYear);
_1f.setPosition(_19.positionX,_1e.positionY);
_1f.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,new this.SYSTEM.Delegate(this,this.dateSelectEvent));
var _20=new w.Label("guardianLabel","Guardian permisson");
_20.setPosition(_a,_1e.positionY+_8);
_20.attach(this.widgetElement);
var _21=new w.Checkbox("guardianCheckbox");
_21.setPosition(_17.positionX,_20.positionY);
_21.attach(this.widgetElement);
_1f.attach(this.widgetElement);
var _22=new w.TextButton("saveBtn",50,"Save");
_22.setPosition(_7,_7,true,true);
_22.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.saveBtnClickEvent));
_22.attach(this.widgetElement);
this.firstNameLabel=_16;
this.firstNameText=_17;
this.screenNameLabel=_1a;
this.screenNameText=_1b;
this.lastNameLabel=_18;
this.lastNameText=_19;
this.tabGroup=_1c;
this.guardianLabel=_20;
this.guardianCheckbox=_21;
this.dateLabel=_1e;
this.dateSelect=_1f;
this.saveBtn=_22;
}
catch(ex){
jsExDebug("widgetSignUp_createDom",ex);
}
}
function widgetSignUp_completeSignUpProcess(){
try{
this.SYSTEM.Tooltip.hideLoading();
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_ACCOUNT_MANAGER);
this.SYSTEM.Launcher.openMenu();
this.cleanUp();
}
catch(ex){
jsExDebug("widgetSignUp_completeSignUpProcess",ex);
}
}
function widgetSignUp_error(msg){
try{
if(!this.errorDiv){
var pad=this.SYSTEM.Style.WIDGET_PADDING;
this.errorDiv=this.SYSTEM.Dom.createDiv();
this.errorDiv.style.padding=pad+"px";
this.errorDiv.style.border=this.widgetElement.style.border;
this.errorDiv.style.backgroundColor="rgb(205, 109, 114)";
this.errorDiv.style.visibility="hidden";
this.widgetElement.appendChild(this.errorDiv);
}
this.errorDiv.style.display="block";
this.errorDiv.innerHTML=msg;
this.errorDiv.style.left=((this.width-this.errorDiv.clientWidth)/2)+"px";
this.errorDiv.style.top=((this.height-this.errorDiv.clientHeight)/2)+"px";
this.errorDiv.style.visibility="visible";
this.errorVisible=true;
SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("widgetSignUp_error",ex);
}
}
function widgetSignUp_saveEmail(){
function emailSaveCallback(_25){
try{
if(_25){
this.saveDetails();
}
}
catch(ex){
jsExDebug("widgetSignUp_saveEmail: emailSaveCallback",ex);
}
}
try{
this.SYSTEM.UserDetails.updateEmailAddress(this.emailText.getContent());
this.SYSTEM.Security.upgradeToKnownEmail(this.SYSTEM.UserDetails.emailAddress,new this.SYSTEM.Delegate(this,emailSaveCallback));
}
catch(ex){
jsExDebug("widgetSignUp_saveEmail",ex);
}
}
function widgetSignUp_savePassword(){
function passwordSaveCallback(){
try{
this.saveDetails();
}
catch(ex){
jsExDebug("widgetSignUp_savePassword: passwordSaveCallback",ex);
}
}
try{
this.SYSTEM.Security.overwriteNonEmailPassUserPassword(this.passwordText.getContent(),new this.SYSTEM.Delegate(this,passwordSaveCallback));
}
catch(ex){
jsExDebug("widgetSignUp_savePassword",ex);
}
}
function widgetSignUp_saveDetails(){
function saveResponse(_26){
try{
if(_26){
this.completeSignUpProcess();
}else{
this.error("Save unsuccessfull");
}
}
catch(ex){
jsExDebug("widgetSignUp_saveDetails: saveResponse",ex);
}
}
try{
this.SYSTEM.UserDetails.commit(new this.SYSTEM.Delegate(this,saveResponse),true);
}
catch(ex){
jsExDebug("widgetSignUp_saveDetails",ex);
}
}
function widgetSignUp_emailUniquenessResponse(xml,me){
try{
var _29=getNodeValue(xml,"avail");
switch(_29){
case "true":
_29=true;
break;
case "false":
default:
_29=false;
}
if(_29){
me.saveEmail();
}else{
me.error("Email address taken");
}
}
catch(ex){
jsExDebug("widgetSignUp_emailUniquenessResponse",ex);
}
}
function widgetSignUp_saveBtnClickEvent(){
function tooltipTimeout(){
try{
var _2a=this.screenNameText.getContent();
var _2b=this.firstNameText.getContent();
var _2c=this.lastNameText.getContent();
var _2d=this.dateSelect.getDay();
var _2e=this.dateSelect.getMonth();
var _2f=this.dateSelect.getYear();
var _30=this.guardianCheckbox.isChecked();
if(_2a.match(INVALID_CHAR_REGEX)){
this.error(INVALID_CHAR_STRING+" are not allowed in screen name");
return;
}
if(_2b.match(INVALID_CHAR_REGEX)){
this.error(INVALID_CHAR_STRING+" are not allowed in first name");
return;
}
if(_2c.match(INVALID_CHAR_REGEX)){
this.error(INVALID_CHAR_STRING+" are not allowed in last name");
return;
}
if(_2a.length){
if(_2a.length<=MAX_USERNAME_LENGTH){
this.SYSTEM.UserDetails.updateUsername(_2a);
}else{
this.SYSTEM.UserDetails.updateUsername(_2a.substr(0,MAX_USERNAME_LENGTH));
}
}
if(_2b.length){
if(_2b.length<=MAX_FIRSTNAME_LENGTH){
this.SYSTEM.UserDetails.updateFirstName(_2b);
}else{
this.SYSTEM.UserDetails.updateFirstName(_2b.substr(0,MAX_FIRSTNAME_LENGTH));
}
}
if(_2c.length){
if(_2c.length<=MAX_LASTNAME_LENGTH){
this.SYSTEM.UserDetails.updateLastName(_2c);
}else{
this.SYSTEM.UserDetails.updateLastName(_2c.substr(0,MAX_LASTNAME_LENGTH));
}
}
this.SYSTEM.UserDetails.updateDobDay(_2d);
this.SYSTEM.UserDetails.updateDobMonth(_2e);
this.SYSTEM.UserDetails.updateDobYear(_2f);
this.SYSTEM.UserDetails.calculateYearsOld();
this.SYSTEM.UserDetails.updateLegalGuardian(_30);
if(this.settingIncludeEmail){
var _31=this.emailText.getContent();
if(_31.match(EMAIL_REGEX)){
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action=12","peepel_email="+_31,this.emailUniquenessResponse,this);
}else{
this.error("please supply a valid email");
}
}else{
if(this.settingIncludePassword){
var _32=this.passwordText.getContent();
var _33=this.confirmPasswordText.getContent();
if(_32.length<MIN_PASSWORD_LENGTH){
this.error("The new password is too short (min. "+MIN_PASSWORD_LENGTH+").");
return;
}else{
if(_32.length>MAX_PASSWORD_LENGTH){
this.error("The new password is too long (max. "+MAX_PASSWORD_LENGTH+").");
return;
}
}
if(_32!=_33){
this.error("The new password and password confirmation are not the same.");
return;
}
this.savePassword();
}else{
this.saveDetails();
}
}
}
catch(ex){
jsExDebug("widgetSignUp_saveBtnClickEvent",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Updating your profile...");
}
catch(ex){
jsExDebug("widgetSignUp_saveBtnClickEvent",ex);
}
}
function widgetSignUp_dateSelectEvent(_34,_35){
try{
var dob=new Date();
dob.setDate(_35.getDay());
dob.setMonth(_35.getMonth());
dob.setFullYear(_35.getYear());
var ms=new Date().getTime()-dob.getTime();
var _38=ms/(1000*60*60*24*365);
if(_38<this.SYSTEM.UserDetails.LEGAL_TRACKING_AGE){
this.guardianLabel.show();
this.guardianCheckbox.show();
}else{
this.guardianLabel.hide();
this.guardianCheckbox.hide();
}
}
catch(ex){
jsExDebug("widgetSignUp_dateSelectEvent",ex);
}
}
function widgetSignUp_globalClickEvent(_39,me){
try{
if(me.errorVisible){
me.errorDiv.style.display="none";
me.errorDiv.style.visibility="hidden";
}
}
catch(ex){
jsExDebug("widgetSignUp_globalClickEvent",ex);
}
}

try{
timeSelect_t.prototype=new widget_t();
timeSelect_t.prototype.constructor=timeSelect_t;
timeSelect_t.prototype.cleanUp=timeSelect_cleanUp;
timeSelect_t.prototype.timeSelect_super=widget_t.prototype.constructor;
timeSelect_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
timeSelect_t.prototype.createDom=timeSelect_createDom;
timeSelect_t.prototype.setTime=timeSelect_setTime;
timeSelect_t.prototype.getHour=timeSelect_getHour;
timeSelect_t.prototype.getMinute=timeSelect_getMinute;
timeSelect_t.prototype.getAMPM=timeSelect_getAMPM;
timeSelect_t.prototype.clear=timeSelect_clear;
timeSelect_t.prototype.getDate=timeSelect_getDate;
timeSelect_t.prototype.listSelectEvent=timeSelect_listSelectEvent;
timeSelect_t.prototype.DEFAULT_EVENT=SYSTEM.Event.LIST_ITEM_SELECT_EVENT;
}
catch(ex){
jsExDebug("timeSelect_t.prototype",ex);
}
function timeSelect_t(_1,_2){
try{
this.timeSelect_super(_1,true);
if(!_2){
this.createDom();
}
}
catch(ex){
jsExDebug("timeSelect_t",ex);
}
}
function timeSelect_cleanUp(me){
try{
if(!me){
me=this;
}
me.hourSelect.cleanUp();
me.slashLabel1.cleanUp();
me.minuteSelect.cleanUp();
me.amPmSelect.cleanUp();
me.hourSelect=null;
me.slashLabel1=null;
me.minuteSelect=null;
me.amPmSelect=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("timeSelect_cleanUp",ex);
}
}
function timeSelect_createDom(){
try{
var wL=this.SYSTEM.Widget;
var _5=new wL.DropText("hourSelect",20,null,50,200);
var _6=new wL.Label("sl",":");
_6.setFontSize(null,null,20);
var _7=new wL.DropText("minuteSelect",20,null,50,200);
var _8=new wL.DropText("amPmSelect",35,null,50);
for(var i=1;i<=12;i++){
_5.addItem(i,i);
}
for(var i=0;i<=60;i++){
if(i<10){
_7.addItem(i,"0"+i);
}else{
_7.addItem(i,i);
}
}
_8.addItem("AM","AM");
_8.addItem("PM","PM");
_5.setPosition(0,0);
_5.attach(this.widgetElement);
_6.setPosition(_5.positionX+_5.width+35,0);
_6.attach(this.widgetElement);
_7.setPosition(_6.positionX+10,0);
_7.attach(this.widgetElement);
_8.setPosition(_7.positionX+_7.width+35,0);
_8.attach(this.widgetElement);
var _a=new this.SYSTEM.Delegate(this,this.listSelectEvent);
_5.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_a);
_7.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_a);
_8.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,_a);
this.hourSelect=_5;
this.slashLabel1=_6;
this.minuteSelect=_7;
this.amPmSelect=_8;
}
catch(ex){
jsExDebug("timeSelect_createDom",ex);
}
}
function timeSelect_setTime(_b,_c,_d){
try{
this.hourSelect.setSelectedValue(_b);
this.minuteSelect.setSelectedValue(_c);
this.amPmSelect.setSelectedValue(_d);
}
catch(ex){
jsExDebug("timeSelect_setTime",ex);
}
}
function timeSelect_getHour(){
try{
return this.hourSelect.getSelectedValue();
}
catch(ex){
jsExDebug("timeSelect_getHour",ex);
}
}
function timeSelect_getMinute(){
try{
return this.minuteSelect.getSelectedValue();
}
catch(ex){
jsExDebug("timeSelect_getMinute",ex);
}
}
function timeSelect_getAMPM(){
try{
return this.amPmSelect.getSelectedValue();
}
catch(ex){
jsExDebug("timeSelect_getAMPM",ex);
}
}
function timeSelect_clear(){
try{
this.hourSelect.deSelectSelectedItem();
this.minuteSelect.deSelectSelectedItem();
this.amPmSelect.deSelectSelectedItem();
}
catch(ex){
jsExDebug("timeSelect_clear",ex);
}
}
function timeSelect_getDate(){
try{
var d=new Date();
var _f=0;
if(this.amPmSelect.getSelectedValue()=="PM"){
_f=12;
}
d.setHours(_f+this.getHour());
d.setMinutes(this.getMinute());
d.setSeconds(0);
return d;
}
catch(ex){
jsExDebug("timeSelect_getDate",ex);
}
}
function timeSelect_listSelectEvent(){
try{
this.fireEvent(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT);
}
catch(ex){
jsExDebug("timeSelect_listSelectEvent",ex);
}
}

try{
peepelAvatarBrowser_t.prototype=new widget_t();
peepelAvatarBrowser_t.prototype.constructor=peepelAvatarBrowser_t;
peepelAvatarBrowser_t.prototype.cleanUp=peepelAvatarBrowser_cleanUp;
peepelAvatarBrowser_t.prototype.peepelAvatarBrowser_super=widget_t.prototype.constructor;
peepelAvatarBrowser_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
peepelAvatarBrowser_t.prototype.createDom=peepelAvatarBrowser_createDom;
peepelAvatarBrowser_t.prototype.bindEvents=peepelAvatarBrowser_bindEvents;
peepelAvatarBrowser_t.prototype.unbindEvents=peepelAvatarBrowser_unbindEvents;
peepelAvatarBrowser_t.prototype.empty=peepelAvatarBrowser_empty;
peepelAvatarBrowser_t.prototype.refresh=peepelAvatarBrowser_refresh;
peepelAvatarBrowser_t.prototype.imageMouseDownEvent=peepelAvatarBrowser_imageMouseDownEvent;
peepelAvatarBrowser_t.prototype.HIGHLIGHT_BORDER="solid 1px black";
peepelAvatarBrowser_t.prototype.DIM_BORDER="solid 1px white";
}
catch(ex){
jsExDebug("peepelAvatarBrowser_t.prototype",ex);
}
function peepelAvatarBrowser_t(_1,_2,_3,_4){
try{
this.peepelAvatarBrowser_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.domArray=[];
this.selectedFile=null;
if(!_4){
this.createDom(_2,_3);
this.bindEvents();
}
}
catch(ex){
jsExDebug("peepelAvatarBrowser_bindEvents",ex);
}
}
function peepelAvatarBrowser_cleanUp(me){
try{
if(!me){
me=this;
}
me.unbindEvents();
me.empty();
me.domArray=null;
me.selectedFile=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("peepelAvatarBrowser_bindEvents",ex);
}
}
function peepelAvatarBrowser_createDom(_6,_7){
try{
this.setDimensions(_6,_7);
this.widgetElement.style.border="solid 1px black";
this.widgetElement.style.overflow="auto";
this.widgetElement.style.backgroundColor="white";
this.refresh();
}
catch(ex){
jsExDebug("peepelAvatarBrowser_createDom",ex);
}
}
function peepelAvatarBrowser_bindEvents(){
try{
}
catch(ex){
jsExDebug("peepelAvatarBrowser_bindEvents",ex);
}
}
function peepelAvatarBrowser_unbindEvents(){
try{
}
catch(ex){
jsExDebug("peepelAvatarBrowser_unbindEvents",ex);
}
}
function peepelAvatarBrowser_empty(){
try{
for(var id in this.domArray){
this.SYSTEM.Event.detachEvent(this.domArray[id],"onmousedown","mousedown");
this.widgetElement.removeChild(this.domArray[id]);
this.domArray[id]=null;
}
}
catch(ex){
jsExDebug("peepelAvatarBrowser_empty",ex);
}
}
function peepelAvatarBrowser_refresh(){
try{
this.empty();
var _9=this.pad;
var _a=this.pad;
var _b=50;
for(var _c in this.SYSTEM.Icon.Avatar){
var _d=this.SYSTEM.Dom.createImage(this.SYSTEM.Icon.Avatar[_c]+"_1.png",null,_b,_b,_9,_a);
_d.style.border=this.DIM_BORDER;
_d.style.cursor="pointer";
this.widgetElement.appendChild(_d);
this.SYSTEM.Event.attachEvent(_d,"onmousedown","mousedown",this.imageMouseDownEvent,this,false,_c);
this.domArray[_c]=_d;
_9+=_b+this.pad;
if(_9>=(this.width-_b)){
_9=this.pad;
_a+=_b+this.pad;
}
}
}
catch(ex){
jsExDebug("peepelAvatarBrowser_refresh",ex);
}
}
function peepelAvatarBrowser_imageMouseDownEvent(_e,me,_10){
try{
if(me.domArray[_10]){
if(me.domArray[me.selectedFile]){
me.domArray[me.selectedFile].style.border=me.DIM_BORDER;
}
me.domArray[_10].style.border=me.HIGHLIGHT_BORDER;
me.selectedFile=_10;
}
}
catch(ex){
jsExDebug("peepelAvatarBrowser_imageMouseDownEvent",ex);
}
}

try{
termsAndConditions_t.prototype=new widget_t();
termsAndConditions_t.prototype.termsAndConditions_super=widget_t.prototype.constructor;
termsAndConditions_t.prototype.constructor=termsAndConditions_t;
termsAndConditions_t.prototype.cleanUp=termsAndConditions_cleanUp;
termsAndConditions_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
termsAndConditions_t.prototype.createDom=termsAndConditions_createDom;
termsAndConditions_t.prototype.bindEvents=termsAndConditions_bindEvents;
termsAndConditions_t.prototype.xmlResponse=termsAndConditions_xmlResponse;
termsAndConditions_t.prototype.agreeOrDisagree=termsAndConditions_agreeOrDisagree;
termsAndConditions_t.prototype.commitCallback=termsAndConditions_commitCallback;
termsAndConditions_t.prototype.WIDTH=450;
termsAndConditions_t.prototype.HEIGHT=450;
}
catch(ex){
jsExDebug("termsAndConditions_t.prototype",ex);
}
function termsAndConditions_t(_1,_2,_3){
try{
this.termsAndConditions_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.createDom();
this.bindEvents();
this.SYSTEM.Network.request("js/xml/tac.xml",null,this.xmlResponse,this);
showExitMessage(false);
}
catch(ex){
jsExDebug("termsAndConditions_t",ex);
}
}
function termsAndConditions_cleanUp(me){
try{
if(!me){
var me=this;
}
me.text.cleanUp();
me.disagreeBtn.cleanUp();
me.agreeBtn.cleanUp();
me.text=null;
me.disagreeBtn=null;
me.agreeBtn=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("termsAndConditions_cleanUp",ex);
}
}
function termsAndConditions_createDom(){
try{
this.widgetElement.style.zIndex=ATOP_INTERFACE_COVER_ZINDEX;
this.widgetElement.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
this.widgetElement.style.backgroundColor=this.SYSTEM.Style.BLUE_TOOLGROUP_BG;
this.setDimensions(this.WIDTH,this.HEIGHT);
var w=this.SYSTEM.Widget;
var _6=new w.Label("label","Before you use Peepel.com, please read our Terms And Conditions:");
_6.setPosition(this.pad,this.pad);
_6.attach(this.widgetElement);
var _7=new w.Text("text",true);
_7.setPosition(this.pad,_6.positionY+this.pad+40);
_7.setDimensions(this.width-(2*this.pad),this.height-this.SYSTEM.Style.TEXT_BTN_HEIGHT-_7.positionY-(2*this.pad));
_7.attach(this.widgetElement);
var _8=new w.TextButton("disagreeBtn",70,"I Disagree");
_8.setPosition(this.pad,this.pad,true,true);
_8.setValue(0);
_8.attach(this.widgetElement);
_8.hide();
var _9=new w.TextButton("agreeBtn",70,"I Agree");
_9.setPosition(_8.positionX+_8.width+this.pad,this.pad,true,true);
_9.setValue(1);
_9.attach(this.widgetElement);
_9.hide();
this.text=_7;
this.disagreeBtn=_8;
this.agreeBtn=_9;
}
catch(ex){
jsExDebug("termsAndConditions_createDom",ex);
}
}
function termsAndConditions_bindEvents(){
try{
this.disagreeBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.agreeOrDisagree));
this.agreeBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.agreeOrDisagree));
}
catch(ex){
jsExDebug("termsAndConditions_bindEvents",ex);
}
}
function termsAndConditions_xmlResponse(_a,me){
try{
var _c=getChildNode(_a,"tac",0).firstChild.nodeValue;
me.text.setContent(_c);
me.disagreeBtn.show();
me.agreeBtn.show();
}
catch(ex){
jsExDebug("termsAndConditions_xmlResponse",ex);
}
}
function termsAndConditions_agreeOrDisagree(_d,_e){
function apiRegistryCallback(){
try{
this.SYSTEM.Security.handleDeauthentication(0);
}
catch(ex){
jsExDebug("termsAndConditions_agreeOrDisagree: apiRegistryCallback",ex);
}
}
function deauthCallback(_f){
try{
if(_f){
this.SYSTEM.ApiRegistry.deRegister(new this.SYSTEM.Delegate(this,apiRegistryCallback));
}else{
jsDebug("deauth failed: check app/mal logs");
}
}
catch(ex){
jsExDebug("termsAndConditions_agreeOrDisagree: logoutCallback",ex);
}
}
try{
if(_e.getValue()){
this.SYSTEM.UserDetails.updateLegalAgree(true);
this.SYSTEM.UserDetails.commit(new this.SYSTEM.Delegate(this,this.commitCallback));
}else{
this.SYSTEM.Security.deauthenticate(new this.SYSTEM.Delegate(this,deauthCallback));
}
}
catch(ex){
jsExDebug("termsAndConditions_agreeOrDisagree",ex);
}
}
function termsAndConditions_commitCallback(_10){
try{
if(_10){
showExitMessage(true);
global_continueAfterTermsAndConditions(this);
}
}
catch(ex){
jsExDebug("termsAndConditions_commitCallback",ex);
}
}

try{
frame_t.prototype=new peepelObject_t();
frame_t.prototype.constructor=frame_t;
frame_t.prototype.cleanUp=frame_cleanUp;
frame_t.prototype.frame_super=peepelObject_t.prototype.constructor;
frame_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
frame_t.prototype.createDom=frame_createDom;
frame_t.prototype.allowRelocation=frame_allowRelocation;
frame_t.prototype.disableRelocation=frame_disableRelocation;
frame_t.prototype.allowResize=frame_allowResize;
frame_t.prototype.disableResize=frame_disableResize;
frame_t.prototype.disallowAutoFocus=frame_disallowAutoFocus;
frame_t.prototype.allowAutoFocus=frame_allowAutoFocus;
frame_t.prototype.allowAlwaysOnTop=frame_allowAlwaysOnTop;
frame_t.prototype.allowWindowOverflow=frame_allowWindowOverflow;
frame_t.prototype.disallowWindowOverflow=frame_disallowWindowOverflow;
frame_t.prototype.close=frame_close;
frame_t.prototype.setTitle=frame_setTitle;
frame_t.prototype.refreshTitleWidth=frame_refreshTitleWidth;
frame_t.prototype.enableControlGroup=frame_enableControlGroup;
frame_t.prototype.addCustomControl=frame_addCustomControl;
frame_t.prototype.setDimensions=frame_setDimensions;
frame_t.prototype.setPosition=frame_setPosition;
frame_t.prototype.addShadow=frame_addShadow;
frame_t.prototype.attach=frame_attach;
frame_t.prototype.detach=frame_detach;
frame_t.prototype.hide=frame_hide;
frame_t.prototype.show=frame_show;
frame_t.prototype.setMinimumSize=frame_setMinimumSize;
frame_t.prototype.setMaximumSize=frame_setMaximumSize;
frame_t.prototype.setFixedDimensions=frame_setFixedDimensions;
frame_t.prototype.minimise=frame_minimise;
frame_t.prototype.restore=frame_restore;
frame_t.prototype.maximise=frame_maximise;
frame_t.prototype.halfMaximise=frame_halfMaximise;
frame_t.prototype.setApplication=frame_setApplication;
frame_t.prototype.setWindowId=frame_setWindowId;
frame_t.prototype.applyFocusShadow=frame_applyFocusShadow;
frame_t.prototype.applyBlurShadow=frame_applyBlurShadow;
frame_t.prototype.addWidget=frame_addWidget;
frame_t.prototype.addWidgetToDom=frame_addWidgetToDom;
frame_t.prototype.getWidget=frame_getWidget;
frame_t.prototype.addControl=frame_addControl;
frame_t.prototype.prepareFocus=frame_prepareFocus;
frame_t.prototype.getInternalWidth=frame_getInternalWidth;
frame_t.prototype.getInternalHeight=frame_getInternalHeight;
frame_t.prototype.getHorizontalShadowHeights=frame_getHorizontalShadowHeights;
frame_t.prototype.getVerticalShadowWidths=frame_getVerticalShadowWidths;
frame_t.prototype.refreshEdgeWidths=frame_refreshEdgeWidths;
frame_t.prototype.getChildFrame=frame_getChildFrame;
frame_t.prototype.getRunId=frame_getRunId;
frame_t.prototype.getApplication=frame_getApplication;
frame_t.prototype.getWindowId=frame_getWindowId;
frame_t.prototype.initialise=frame_initialise;
frame_t.prototype.createPixelDom=frame_createDom;
frame_t.prototype.hideControlGroup=frame_hideControlGroup;
frame_t.prototype.roundOffCorners=frame_roundOffCorners;
frame_t.prototype.focus=frame_focus;
frame_t.prototype.blur=frame_blur;
frame_t.prototype.adjustRelocateControlWidth=frame_adjustRelocateControlWidth;
frame_t.prototype.adjustTopRightCornerImageWidth=frame_adjustTopRightCornerImageWidth;
frame_t.prototype.bindEvent=frame_bindEvent;
frame_t.prototype.bindEventHandlers=frame_bindEventHandlers;
frame_t.prototype.fireEvent=frame_fireEvent;
frame_t.prototype.maximisetBtnClickEvent=frame_maximisetBtnClickEvent;
frame_t.prototype.minimiseBtnClickEvent=frame_minimiseBtnClickEvent;
frame_t.prototype.closeBtnClickEvent=frame_closeBtnClickEvent;
frame_t.prototype.halfMaximiseLeftClickEvent=frame_halfMaximiseLeftClickEvent;
frame_t.prototype.halfMaximiseRightClickEvent=frame_halfMaximiseRightClickEvent;
frame_t.prototype.topBorderDblClickEvent=frame_topBorderDblClickEvent;
frame_t.prototype.leftBorderDblClickEvent=frame_leftBorderDblClickEvent;
frame_t.prototype.rightBorderDblClickEvent=frame_rightBorderDblClickEvent;
frame_t.prototype.mouseScrollEvent=frame_mouseScrollEvent;
frame_t.prototype.resizeEvent=frame_resizeEvent;
frame_t.prototype.resizeEndEvent=frame_resizeEndEvent;
frame_t.prototype.documentResizeEvent=frame_documentResizeEvent;
frame_t.prototype.relocateEvent=frame_relocateEvent;
frame_t.prototype.relocateEndEvent=frame_relocateEndEvent;
frame_t.prototype.mouseDownEvent=frame_mouseDownEvent;
SYSTEM.Frame.CLOSE_BTN=1;
SYSTEM.Frame.MAXIMISE_BTN=2;
SYSTEM.Frame.HALF_MAXIMISE_BTN=4;
SYSTEM.Frame.MINIMISE_BTN=8;
SYSTEM.Frame.HALF_MAXIMISE_LEFT=1;
SYSTEM.Frame.HALF_MAXIMISE_RIGHT=2;
frame_t.prototype.FOCUS_TITLE_COLOUR="#000066";
frame_t.prototype.BLUR_TITLE_COLOUR="rgb(96,96,96)";
frame_t.prototype.CLOSE_BTN_IMG_SRC="img/app/system/frame/close";
frame_t.prototype.MAXIMISE_BTN_IMG_SRC="img/app/system/frame/maximise";
frame_t.prototype.HALF_MAXIMISE_LEFT_IMG_SRC="img/app/system/frame/maximise_left";
frame_t.prototype.HALF_MAXIMISE_RIGHT_IMG_SRC="img/app/system/frame/maximise_right";
frame_t.prototype.MAXIMISE_OFF_BTN_IMG_SRC="img/app/system/frame/maximise";
frame_t.prototype.DEFAULT_MIN_WIDTH=400;
frame_t.prototype.DEFAULT_MIN_HEIGHT=300;
frame_t.prototype.DEFAULT_MAX_WIDTH=10000;
frame_t.prototype.DEFAULT_MAX_HEIGHT=10000;
frame_t.prototype.DEFAULT_POSITION_X=200;
frame_t.prototype.DEFAULT_POSITION_Y=150;
frame_t.prototype.TOP_RIGHT_CORNER_WIDTH=280;
frame_t.prototype.TOP_RIGHT_CORNER_HEIGHT=35;
frame_t.prototype.TOP_RIGHT_CORNER_HEIGHT=35;
frame_t.prototype.TOP_RIGHT_CORNER_PERCENTAGE=0.7;
frame_t.prototype.TOP_LEFT_CORNER_WIDTH=170;
frame_t.prototype.TOP_LEFT_CORNER_HEIGHT=35;
frame_t.prototype.CORNER_WIDTH=5;
frame_t.prototype.CORNER_HEIGHT=5;
frame_t.prototype.RELOCATE_WIDGET_HEIGHT=20;
frame_t.prototype.PIXEL_RELOCATE_WIDGET_HEIGHT=2;
frame_t.prototype.PIXEL_BORDER_WIDTH=2;
frame_t.prototype.SHADOW_WIDTH=12;
frame_t.prototype.SHADOW_HEIGHT=12;
frame_t.prototype.TOP_SHADOW_HEIGHT=8;
frame_t.prototype.BOTTOM_SHADOW_HEIGHT=16;
frame_t.prototype.SHADOW_CORNER_WIDTH=22;
frame_t.prototype.SHADOW_CORNER_HEIGHT=22;
frame_t.prototype.ANGLED_SHADOW_OFFSET_X=125;
frame_t.prototype.ANGLED_SHADOW_OFFSET_Y=115;
frame_t.prototype.ANGLED_SHADOW_WIDTH=0.8;
frame_t.prototype.ANGLED_SHADOW_HEIGHT=0.9;
frame_t.prototype.ANGLED_SHADOW_CORNER_WIDTH=30;
frame_t.prototype.ANGLED_SHADOW_CORNER_HEIGHT=30;
frame_t.prototype.ANGLED_SHADOW_RIGHT_WIDTH=90;
frame_t.prototype.BLANK_IMG_SRC="img/site/global/pixel";
frame_t.prototype.RESIZE_IMG_SRC="img/app/system/frame/corner_resize";
frame_t.prototype.RESIZE_DOWN_IMG_SRC="img/app/system/frame/corner_resize_down";
frame_t.prototype.RESIZE_ACROSS_IMG_SRC="img/app/system/frame/corner_resize_across";
frame_t.prototype.RESIZE_RIGHT=0;
frame_t.prototype.RESIZE_BOTTOM=0;
frame_t.prototype.DEFAULT_PARENT=document.body;
frame_t.prototype.MOUSE_SCROLL_UP=1;
frame_t.prototype.MOUSE_SCROLL_DOWN=2;
}
catch(ex){
jsExDebug("frame_t.prototype",ex);
}
function frame_t(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){
try{
this.frame_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.name=_1;
this.application=_3;
this.width=_4;
this.height=_5;
this.positionX=0;
this.positionY=0;
this.innerWidth=this.width;
this.innerHeight=this.height;
this.roundCorners=true;
this.minimumWidth=this.DEFAULT_MIN_WIDTH;
this.maximumWidth=this.DEFAULT_MAX_WIDTH;
this.minimumHeight=this.DEFAULT_MIN_HEIGHT;
this.maximumHeight=this.DEFAULT_MAX_HEIGHT;
this.isPixelFrame=_9;
this.isMinimised=false;
this.settingAllowAutoFocus=true;
this.widgetArray=[];
this.widgetsByName=[];
this.preHighlightZIndex=null;
this.settingAlwaysOnTop=_a;
if(this.isPixelFrame){
this.createPixelDom();
}else{
this.createDom();
}
this.hide();
if(_4!=null&&_5!=null){
this.setDimensions(_4,_5);
}else{
this.setDimensions(this.DEFAULT_MIN_WIDTH,this.DEFAULT_MIN_HEIGHT);
}
if(_2){
this.setTitle(_2);
}
this.addShadow();
this.roundOffCorners();
if(_6==true||_6==null){
this.allowRelocation();
}
if(_7==true){
this.allowResize();
}
if(_8){
this.enableControlGroup(_8);
}
this.SYSTEM.Event.attachEvent(this.windowDiv,"onmousedown","mousedown",this.mouseDownEvent,this,false);
this.initialise();
if(_3){
_3.registerFrame(this);
}
this.leftEdgeWidth=this.leftBorder.clientWidth;
this.rightEdgeWidth=this.rightBorder.clientWidth;
this.topEdgeHeight=this.topBorder.clientHeight;
this.bottomEdgeHeight=this.bottomBorder.clientHeight;
}
catch(ex){
jsExDebug("frame_t",ex);
}
return;
}
function frame_cleanUp(me){
if(!me){
me=this;
}
if(me.application){
me.application.unregisterFrame(me);
}
me.hide();
if(me.SYSTEM.WINDOW_MANAGER){
if(me.settingAlwaysOnTop){
me.SYSTEM.WINDOW_MANAGER.unregisterAlwaysOnTop(me);
me.settingAlwaysOnTop=null;
}else{
me.SYSTEM.WINDOW_MANAGER.close(me.windowId);
}
}else{
me.settingAlwaysOnTop=null;
}
if(me.application){
me.setApplication(null);
}
me.SYSTEM.Event.detachEvent(me.windowDiv,"onmousedown","mousedown");
me.SYSTEM.Event.removeMouseScrollUpHandler(me.mouseScrollUpIndex);
me.SYSTEM.Event.removeMouseScrollDownHandler(me.mouseScrollDownIndex);
if(me.settingAllowRelocation){
if(me.relocateTop){
me.SYSTEM.Event.disableDragEnabledElement(me.relocateTop.widgetElement);
me.SYSTEM.Event.disableDragElement(me.relocateTop.widgetElement);
me.SYSTEM.Event.removeDragEventHandlers(me.relocateTop.widgetElement);
}
if(me.relocateBottom){
me.SYSTEM.Event.disableDragEnabledElement(me.relocateBottom.widgetElement);
me.SYSTEM.Event.disableDragElement(me.relocateBottom.widgetElement);
me.SYSTEM.Event.removeDragEventHandlers(me.relocateBottom.widgetElement);
}
if(me.relocateLeft){
me.SYSTEM.Event.disableDragEnabledElement(me.relocateLeft.widgetElement);
me.SYSTEM.Event.disableDragElement(me.relocateLeft.widgetElement);
me.SYSTEM.Event.removeDragEventHandlers(me.relocateLeft.widgetElement);
}
if(me.relocateRight){
me.SYSTEM.Event.disableDragEnabledElement(me.relocateRight.widgetElement);
me.SYSTEM.Event.disableDragElement(me.relocateRight.widgetElement);
me.SYSTEM.Event.removeDragEventHandlers(me.relocateRight.widgetElement);
}
me.SYSTEM.Event.disableDragElement(me.frame);
}
if(me.settingAllowResize){
me.SYSTEM.Event.removeDragEventHandlers(me.resizeControl.widgetElement);
}
try{
me.name=null;
me.minimumWidth=null;
me.minimumHeight=null;
me.maximumWidth=null;
me.maximumHeight=null;
me.positionX=null;
me.positionY=null;
me.width=null;
me.height=null;
me.innerWidth=null;
me.innerHeight=null;
me.roundCorners=null;
me.haveFocus=null;
me.minimumWidth=null;
me.maximumWidth=null;
me.minimumHeight=null;
me.maximumHeight=null;
me.document=null;
me.settingAllowAutoFocus=null;
me.nextFrame=null;
me.previousFrame=null;
me.parentFrame=null;
me.controlGroupWidth=null;
me.resizeControlWidth=null;
me.resizeControlHeight=null;
me.settingAllowRelocation=null;
me.settingAllowResize=null;
me.preHighlightZIndex=null;
}
catch(ex){
jsExDebug("frame_cleanUp: 0",ex);
}
try{
for(var i=0;i<me.widgetArray.length;i++){
if(me.widgetArray[i]){
me.widgetArray[i].cleanUp();
me.widgetArray[i]=null;
delete me.widgetArray[i];
}
}
me.widgetArray=null;
for(var _d in me.widgetsByName){
me.widgetsByName[_d]=null;
}
me.widgetsByName=null;
if(me.controlGroup){
me.controlGroup.cleanUp();
me.controlGroup=null;
me.maximiseBtn=null;
me.closeBtn=null;
me.minimiseBtn=null;
me.halfMaximiseRightBtn=null;
me.halfMaximiseLeftBtn=null;
}
if(me.relocateTop){
me.relocateTop.cleanUp();
me.relocateTop=null;
}
if(me.relocateBottom){
me.relocateBottom.cleanUp();
me.relocateBottom=null;
}
if(me.relocateLeft){
me.relocateLeft.cleanUp();
me.relocateLeft=null;
}
if(me.relocateRight){
me.relocateRight.cleanUp();
me.relocateRight=null;
}
if(me.resizeControl){
me.resizeControl.cleanUp();
me.resizeControl=null;
}
}
catch(ex){
jsExDebug("frame_cleanUp: 1",ex);
}
try{
me.background=null;
me.topBorder=null;
me.bottomBorder=null;
me.leftBorder=null;
me.rightBorder=null;
me.topLeftShadow=null;
me.topRightShadow=null;
me.bottomLeftShadow=null;
me.bottomRightShadow=null;
me.topShadow=null;
me.bottomShadow=null;
me.leftShadow=null;
me.rightShadow=null;
me.topLeftDiv=null;
me.topRightDiv=null;
me.bottomLeftDiv=null;
me.bottomRightDiv=null;
me.isVisible=null;
me.titleDiv=null;
me.leftShadowWidth=null;
me.topShadowHeight=null;
me.windowId=null;
me.SYSTEM.Dom.freeDom(me.shadowDiv);
me.SYSTEM.Dom.freeDom(me.windowDiv);
me.windowDiv=null;
me.shadowDiv=null;
me.SYSTEM.Dom.freeDom(me.frame);
me.detach();
me.frame.ObjectReference=null;
me.frame=null;
me.DEFAULT_PARENT=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("frame_cleanUp: 2",ex);
}
}
function frame_createDom(){
try{
if(!this.document){
this.document=document;
}
var _e=this.SYSTEM.Dom.createClassElement("div","frame focus","absolute");
var _f=this.SYSTEM.Dom.createClassElement("div","internal");
_f.style.overflow="hidden";
this.windowDiv=_f;
this.topBorder=this.SYSTEM.Dom.createClassElement("div","top");
this.windowDiv.appendChild(this.topBorder);
this.bottomBorder=this.SYSTEM.Dom.createClassElement("div","bottom");
this.windowDiv.appendChild(this.bottomBorder);
this.leftBorder=this.SYSTEM.Dom.createClassElement("div","left");
this.windowDiv.appendChild(this.leftBorder);
this.rightBorder=this.SYSTEM.Dom.createClassElement("div","right");
this.windowDiv.appendChild(this.rightBorder);
var _10=this.SYSTEM.Dom.createClassElement("div","top-left");
this.windowDiv.appendChild(_10);
var _11=this.SYSTEM.Dom.createClassElement("div","top-right");
this.windowDiv.appendChild(_11);
var _12=this.SYSTEM.Dom.createClassElement("div","bottom-left");
this.windowDiv.appendChild(_12);
var _13=this.SYSTEM.Dom.createClassElement("div","bottom-right");
this.windowDiv.appendChild(_13);
this.background=this.SYSTEM.Dom.createClassElement("div","background");
this.windowDiv.appendChild(this.background);
this.titleDiv=this.SYSTEM.Dom.createClassElement("div","title");
this.titleDiv.style.whiteSpace="nowrap";
this.titleDiv.style.overflow="hidden";
this.windowDiv.appendChild(this.titleDiv);
this.topLeftDiv=_10;
this.topRightDiv=_11;
this.bottomLeftDiv=_12;
this.bottomRightDiv=_13;
this.relocateTop=new this.SYSTEM.Widget.Button("relocatetop",this.BLANK_IMG_SRC,null,0,this.RELOCATE_WIDGET_HEIGHT);
this.relocateTop.setPosition(0,0);
this.relocateTop.setCursor("move");
this.relocateTop.attach(this.windowDiv);
this.relocateBottom=new this.SYSTEM.Widget.Button("relocatebottom",this.BLANK_IMG_SRC,null,0,this.RELOCATE_WIDGET_HEIGHT);
this.relocateBottom.setPosition(0,0,0,1);
this.relocateBottom.setCursor("move");
this.relocateBottom.attach(this.windowDiv);
this.relocateLeft=new this.SYSTEM.Widget.Button("relocateleft",this.BLANK_IMG_SRC,null,this.RELOCATE_WIDGET_HEIGHT,0);
this.relocateLeft.setPosition(0,0);
this.relocateLeft.setCursor("move");
this.relocateLeft.attach(this.windowDiv);
this.relocateRight=new this.SYSTEM.Widget.Button("relocateright",this.BLANK_IMG_SRC,null,this.RELOCATE_WIDGET_HEIGHT,0);
this.relocateRight.setPosition(0,0,1,0);
this.relocateRight.setCursor("move");
this.relocateRight.attach(this.windowDiv);
this.controlGroup=new this.SYSTEM.Widget.Toolbar("controlGroup");
this.controlGroup.disallowBorder();
this.controlGroup.disallowItemBorder();
this.controlGroup.setPosition(14,3,1,0);
this.controlGroup.setHorizontal();
this.controlGroup.attach(this.windowDiv);
_e.appendChild(this.windowDiv);
this.frame=_e;
this.controlGroupWidth=0;
this.resizeControlWidth=27;
this.resizeControlHeight=27;
}
catch(ex){
jsExDebug("frame_createDom",ex);
}
}
function frame_allowRelocation(_14,_15){
try{
this.settingAllowRelocation=true;
this.SYSTEM.Event.dragEnableElement(this.relocateTop.widgetElement,0,0);
this.SYSTEM.Event.useDragElement(this.relocateTop.widgetElement,this.frame);
this.SYSTEM.Event.bindDragEventHandlers(this.relocateTop.widgetElement,this.mouseDownEvent,this.relocateEvent,this.relocateEndEvent,this);
this.SYSTEM.Event.dragEnableElement(this.relocateBottom.widgetElement,0,0,0,1);
this.SYSTEM.Event.useDragElement(this.relocateBottom.widgetElement,this.frame);
this.SYSTEM.Event.bindDragEventHandlers(this.relocateBottom.widgetElement,this.mouseDownEvent,this.relocateEvent,this.relocateEndEvent,this);
this.SYSTEM.Event.dragEnableElement(this.relocateLeft.widgetElement,0,0);
this.SYSTEM.Event.useDragElement(this.relocateLeft.widgetElement,this.frame);
this.SYSTEM.Event.bindDragEventHandlers(this.relocateLeft.widgetElement,this.mouseDownEvent,this.relocateEvent,this.relocateEndEvent,this);
this.SYSTEM.Event.dragEnableElement(this.relocateRight.widgetElement,0,0,1,0);
this.SYSTEM.Event.useDragElement(this.relocateRight.widgetElement,this.frame);
this.SYSTEM.Event.bindDragEventHandlers(this.relocateRight.widgetElement,this.mouseDownEvent,this.relocateEvent,this.relocateEndEvent,this);
this.SYSTEM.Event.dragEnableElement(this.frame,this.positionX,this.positionY);
}
catch(ex){
jsExDebug("frame_allowRelocation",ex);
}
return;
}
function frame_disableRelocation(){
try{
this.settingAllowRelocation=true;
if(this.relocateTop){
this.relocateTop.hide();
}
if(this.relocateBottom){
this.relocateBottom.hide();
}
if(this.relocateLeft){
this.relocateLeft.hide();
}
if(this.relocateRight){
this.relocateRight.hide();
}
}
catch(ex){
jsExDebug("frame_disableRelocation",ex);
}
return;
}
function frame_allowResize(){
try{
if(!this.isPixelFrame){
this.resizeControl=new this.SYSTEM.Widget.Button("resizeControl",this.RESIZE_IMG_SRC,null,this.resizeControlWidth,this.resizeControlHeight);
}else{
this.resizeControl=new this.SYSTEM.Widget.Button("resizeControl",this.BLANK_IMG_SRC,null,this.resizeControlWidth,this.resizeControlHeight);
this.resizeControl.widgetElement.style.border="solid 2px orange";
}
this.resizeControl.setPosition(this.RESIZE_RIGHT,this.RESIZE_BOTTOM,true,true);
this.resizeControl.attach(this.windowDiv);
this.SYSTEM.Event.bindDragEventHandlers(this.resizeControl.widgetElement,null,this.resizeEvent,this.resizeEndEvent,this);
this.settingAllowResize=true;
if(this.settingAllowRelocation){
this.relocateTop.addEventHandler(this.SYSTEM.Event.DOUBLE_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.topBorderDblClickEvent));
this.relocateLeft.addEventHandler(this.SYSTEM.Event.DOUBLE_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.leftBorderDblClickEvent));
this.relocateRight.addEventHandler(this.SYSTEM.Event.DOUBLE_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.rightBorderDblClickEvent));
}
}
catch(ex){
jsExDebug("frame_allowRelocation",ex);
}
}
function frame_disableResize(){
try{
if(this.resizeControl){
this.resizeControl.hide();
}
}
catch(ex){
jsExDebug("frame_disableResize",ex);
}
return;
}
function frame_disallowAutoFocus(){
try{
this.settingAllowAutoFocus=false;
}
catch(ex){
jsExDebug("frame_disallowAutoFocus",ex);
}
}
function frame_allowAutoFocus(){
try{
this.settingAllowAutoFocus=true;
}
catch(ex){
jsExDebug("frame_allowAutoFocus",ex);
}
}
function frame_allowAlwaysOnTop(){
try{
if(this.settingAlwaysOnTop){
return;
}
this.settingAlwaysOnTop=true;
this.SYSTEM.WINDOW_MANAGER.registerAlwaysOnTop(this);
}
catch(ex){
jsExDebug("frame_allowAlwaysOnTop",ex);
}
}
function frame_allowWindowOverflow(){
try{
this.windowDiv.style.overflow="visible";
}
catch(ex){
jsExDebug("frame_allowWindowOverflow",ex);
}
}
function frame_disallowWindowOverflow(){
try{
this.windowDiv.style.overflow="hidden";
}
catch(ex){
jsExDebug("frame_disallowWindowOverflow",ex);
}
}
function frame_close(){
try{
this.fireEvent("_onClose");
}
catch(ex){
jsExDebug("frame_close",ex);
}
}
function frame_setTitle(_16){
try{
if(this.titleDiv){
this.titleDiv.innerHTML=_16;
this.refreshTitleWidth();
}
}
catch(ex){
jsExDebug("frame_setTitle",ex);
}
}
function frame_refreshTitleWidth(_17){
try{
_17=(_17?_17:this.width);
this.titleDiv.style.width=(_17-this.titleDiv.offsetLeft-this.controlGroup.getClientWidth()-this.controlGroup.positionX)+"px";
}
catch(ex){
jsExDebug("frame_refreshTitleWidth",ex);
}
}
function frame_enableControlGroup(_18){
try{
var _19=button_t.prototype.HOVER_IMAGE;
if(_18&this.SYSTEM.Frame.HALF_MAXIMISE_BTN){
this.halfMaximiseLeftBtn=new this.SYSTEM.Widget.CustomClassButton("half maximise left",20,20,"maximise_left","Half maximise left","Half maximises the window and aligns it to the left of the screen.");
this.halfMaximiseRightBtn=new SYSTEM.Widget.CustomClassButton("half maximise right",20,20,"maximise_right","Half maximise right","Half maximises the window and aligns it to the right of the screen.");
var _1a=new this.SYSTEM.Delegate(this,this.halfMaximiseLeftClickEvent,this);
var _1b=new this.SYSTEM.Delegate(this,this.halfMaximiseRightClickEvent,this);
this.halfMaximiseLeftBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_1a);
this.halfMaximiseRightBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_1b);
this.controlGroup.addTool(this.halfMaximiseLeftBtn);
this.controlGroup.addTool(this.halfMaximiseRightBtn);
this.controlGroupWidth+=this.halfMaximiseLeftBtn.width+this.halfMaximiseRightBtn.width;
}
if(_18&this.SYSTEM.Frame.MINIMISE_BTN){
this.minimiseBtn=new this.SYSTEM.Widget.CustomClassButton("minimise",20,20,"minimise","Minimise","Minimises the window");
this.minimiseBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.minimiseBtnClickEvent));
this.controlGroup.addTool(this.minimiseBtn);
this.controlGroupWidth+=this.minimiseBtn.width;
}
if(_18&this.SYSTEM.Frame.MAXIMISE_BTN){
this.maximiseBtn=new this.SYSTEM.Widget.CustomClassButton("maximise",20,20,"maximise","Maximise","Maximises the window");
var _1c=new this.SYSTEM.Delegate(this,this.maximisetBtnClickEvent);
this.maximiseBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_1c);
this.controlGroup.addTool(this.maximiseBtn);
this.controlGroupWidth+=this.maximiseBtn.width;
}
if(_18&this.SYSTEM.Frame.CLOSE_BTN){
this.closeBtn=new this.SYSTEM.Widget.CustomClassButton("close",20,20,"close","Close","Closes the window");
var _1d=new this.SYSTEM.Delegate(this,this.closeBtnClickEvent);
this.closeBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,_1d);
this.controlGroup.addTool(this.closeBtn);
this.controlGroupWidth+=this.closeBtn.width;
}
this.adjustRelocateControlWidth();
}
catch(ex){
jsExDebug("frame_enableControlGroup",ex);
}
}
function frame_addCustomControl(_1e){
try{
this.bindEventHandlers(_1e);
this.controlGroup.prependTool(_1e);
this.controlGroupWidth+=_1e.width;
}
catch(ex){
jsExDebug("frame_addCustomControl",ex);
}
}
function frame_setDimensions(_1f,_20){
try{
this.width=_1f;
this.height=_20;
if(this.minimumWidth&&this.width<=this.minimumWidth){
this.width=this.minimumWidth;
}else{
if(this.width>=this.maximumWidth){
this.width=this.maximumWidth;
}
}
if(this.height<=this.minimumHeight){
this.height=this.minimumHeight;
}else{
if(this.height>=this.maximumHeight){
this.height=this.maximumHeight;
}
}
this.windowDiv.style.width=this.width+"px";
this.windowDiv.style.height=this.height+"px";
if(this.shadowDiv){
this.shadowDiv.style.width=(this.width+(this.leftShadow.clientWidth+this.rightShadow.clientWidth))+"px";
this.shadowDiv.style.height=(this.height+(this.topShadow.clientHeight+this.bottomShadow.clientHeight))+"px";
}
if(this.roundCorners){
this.roundOffCorners();
}
this.adjustRelocateControlWidth();
this.adjustTopRightCornerImageWidth(this.width);
if(this.leftShadow){
this.SYSTEM.Event.setDragElementDimensions(this.frame,this.width+this.leftShadow.clientWidth+this.rightShadow.clientWidth,this.height+this.topShadow.clientHeight+this.bottomShadow.clientHeight);
}else{
this.SYSTEM.Event.setDragElementDimensions(this.frame,this.width,this.height);
}
this.refreshTitleWidth();
this.fireEvent("_onResize");
this.fireEvent("_onResizeEnd");
}
catch(ex){
jsExDebug("frame_setDimensions",ex);
}
}
function frame_setPosition(_21,_22){
try{
this.positionX=_21;
this.positionY=_22;
this.SYSTEM.Event.setDragElementPosition(this.frame,_21,_22);
this.frame.style.left=this.frame.pixelX+"px";
this.frame.style.top=this.frame.pixelY+"px";
this.fireEvent("_onMove");
this.fireEvent("_onMoveEnd");
}
catch(ex){
jsExDebug("frame_setPosition",ex);
}
}
function frame_addShadow(){
try{
var _23=this.SYSTEM.Dom.createClassElement("div","shadow",false);
var _24=this.SYSTEM.Dom.createClassElement("div","top");
var _25=this.SYSTEM.Dom.createClassElement("div","bottom");
var _26=this.SYSTEM.Dom.createClassElement("div","left");
var _27=this.SYSTEM.Dom.createClassElement("div","right");
_23.appendChild(_24);
_23.appendChild(_25);
_23.appendChild(_26);
_23.appendChild(_27);
this.shadowDiv=_23;
this.topShadow=_24;
this.bottomShadow=_25;
this.leftShadow=_26;
this.rightShadow=_27;
var _28=this.SYSTEM.Dom.createClassElement("div","corner");
var _29=this.SYSTEM.Dom.createClassElement("div","top-left");
var _2a=this.SYSTEM.Dom.createClassElement("div","top-right");
var _2b=this.SYSTEM.Dom.createClassElement("div","bottom-left");
var _2c=this.SYSTEM.Dom.createClassElement("div","bottom-right");
_28.appendChild(_29);
_28.appendChild(_2a);
_28.appendChild(_2b);
_28.appendChild(_2c);
_23.appendChild(_28);
this.topLeftShadow=_29;
this.topRightShadow=_2a;
this.bottomLeftShadow=_2b;
this.bottomRightShadow=_2c;
this.frame.insertBefore(this.shadowDiv,this.windowDiv);
if(this.roundCorners){
this.roundOffCorners();
}
}
catch(ex){
jsExDebug("frame_addShadow",ex);
}
return;
}
function frame_attach(_2d){
try{
if(!this.attached&&_2d){
this.attached=true;
this.parentDiv=_2d;
this.parentDiv.appendChild(this.frame);
}
}
catch(ex){
jsExDebug("frame_attach",ex);
}
return;
}
function frame_detach(){
try{
if(this.attached&&this.frame&&this.frame.parentNode==this.parentDiv){
this.parentDiv.removeChild(this.frame);
this.attached=false;
}
this.parentDiv=null;
}
catch(ex){
jsExDebug("frame_detach",ex);
}
return;
}
function frame_hide(_2e){
try{
if(_2e){
this.frame.style.display="none";
}else{
this.frame.style.visibility="hidden";
}
this.isVisible=false;
}
catch(ex){
jsExDebug("frame_hide",ex);
}
return;
}
function frame_show(){
try{
if(this.frame.style.visibility=="hidden"){
this.frame.style.visibility="visible";
}else{
if(this.frame.style.display=="none"){
this.frame.style.display="block";
}
}
this.isVisible=true;
}
catch(ex){
jsExDebug("frame_show",ex);
}
return;
}
function frame_setMinimumSize(_2f,_30){
try{
if(_2f){
if(_2f<(this.topRightDiv.clientWidth+this.topLeftDiv.clientWidth)){
this.minimumWidth=this.topRightDiv.clientWidth+this.topLeftDiv.clientWidth;
}else{
this.minimumWidth=_2f;
}
}
if(_30){
this.minimumHeight=_30;
}
if(this.settingAllowResize){
if(this.maximumWidth==this.minimumWidth&this.maximumHeight>this.minimumHeight){
this.resizeControl.setImage(this.RESIZE_DOWN_IMG_SRC);
}
if(this.maximumWidth>this.minimumWidth&this.maximumHeight==this.minimumHeight){
this.resizeControl.setImage(this.RESIZE_ACROSS_IMG_SRC);
}
}
}
catch(ex){
jsExDebug("frame_setMinimumSize",ex);
}
}
function frame_setMaximumSize(_31,_32){
try{
if(_31){
this.maximumWidth=_31;
}
if(_32){
this.maximumHeight=_32;
}
if(this.settingAllowResize){
if(this.maximumWidth==this.minimumWidth&this.maximumHeight>this.minimumHeight){
this.resizeControl.setImage(this.RESIZE_DOWN_IMG_SRC);
}
if(this.maximumWidth>this.minimumWidth&this.maximumHeight==this.minimumHeight){
this.resizeControl.setImage(this.RESIZE_ACROSS_IMG_SRC);
}
}
}
catch(ex){
jsExDebug("frame_setMaximumSize",ex);
}
}
function frame_setFixedDimensions(_33,_34){
try{
if(_33){
if(_33<(this.topRightDiv.clientWidth+this.topLeftDiv.clientWidth)){
this.minimumWidth=this.topRightDiv.clientWidth+this.topLeftDiv.clientWidth;
}else{
this.minimumWidth=_33;
}
this.maximumWidth=_33;
}
if(_34){
this.minimumHeight=_34;
this.maximumHeight=_34;
}
this.setDimensions(_33,_34);
}
catch(ex){
jsExDebug("frame_setFixedDimensions",ex);
}
}
function frame_minimise(){
try{
this.hide(true);
this.isMinimised=true;
}
catch(ex){
jsExDebug("frame_minimise",ex);
}
}
function frame_restore(){
try{
this.show();
this.isMinimised=false;
}
catch(ex){
jsExDebug("frame_restore",ex);
}
}
function frame_maximise(){
try{
var _35=this.SYSTEM.Environment.SCREEN_WIDTH-this.leftShadow.clientWidth-this.rightShadow.clientWidth;
var _36=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight()-this.SYSTEM.Launcher.HEIGHT-this.topShadow.clientHeight-this.bottomShadow.clientHeight;
if(_35<=this.minimumWidth){
_35=this.minimumWidth;
}
if(_36<=this.minimumHeight){
_36=this.minimumHeight;
}
if(_35>=this.maximumWidth){
_35=this.maximumWidth;
}
if(_36>=this.maximumHeight){
_36=this.maximumHeight;
}
this.setPosition(0,this.SYSTEM.Panel.getHeight());
if(this.settingAllowResize){
this.setDimensions(_35,_36);
}
this.adjustRelocateControlWidth();
}
catch(ex){
jsExDebug("frame_maximise",ex);
}
}
function frame_halfMaximise(_37){
try{
var _38=Math.round(this.SYSTEM.Environment.SCREEN_WIDTH/2)-this.getVerticalShadowWidths();
var _39=null;
var _3a=null;
var _3b=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight()-this.SYSTEM.Launcher.HEIGHT-this.getHorizontalShadowHeights();
switch(_37){
case this.SYSTEM.Frame.HALF_MAXIMISE_LEFT:
_3a=_38;
break;
case this.SYSTEM.Frame.HALF_MAXIMISE_RIGHT:
_3a=_38;
break;
}
if(_3a<=this.minimumWidth){
_3a=this.minimumWidth;
}
if(_3b<=this.minimumHeight){
_3b=this.minimumHeight;
}
if(_3a>=this.maximumWidth){
_3a=this.maximumWidth;
}
if(_3b>=this.maximumHeight){
_3b=this.maximumHeight;
}
if(this.settingAllowResize){
this.setDimensions(_3a,_3b);
this.adjustRelocateControlWidth();
}
switch(_37){
case this.SYSTEM.Frame.HALF_MAXIMISE_LEFT:
_39=_38-this.width;
break;
case this.SYSTEM.Frame.HALF_MAXIMISE_RIGHT:
_39=this.SYSTEM.Environment.SCREEN_WIDTH-(this.width);
break;
}
if(_39!=null){
this.setPosition(_39,this.SYSTEM.Panel.getHeight());
}
}
catch(ex){
jsExDebug("frame_halfMaximise",ex);
}
}
function frame_setApplication(_3c){
try{
this.application=_3c;
}
catch(ex){
jsExDebug("frame_setApplication",ex);
}
}
function frame_getChildFrame(){
try{
return this.childFrame;
}
catch(ex){
jsExDebug("frame_getChildFrame",ex);
}
}
function frame_hideControlGroup(_3d){
try{
if(this.controlGroup){
this.controlGroup.hide();
}
}
catch(ex){
jsExDebug("frame_hideControlGroup",ex);
}
}
function frame_roundOffCorners(_3e,_3f){
try{
_3e=(_3e?_3e:this.width);
_3f=(_3f?_3f:this.height);
this.roundCorners=true;
this.background.style.width=(_3e-(this.leftBorder.clientWidth+this.rightBorder.clientWidth))+"px";
this.background.style.height=(_3f-(this.bottomBorder.clientHeight+this.topBorder.clientHeight))+"px";
var _40=_3e-this.topLeftDiv.clientWidth-this.topRightDiv.clientWidth;
this.topBorder.style.width=(_40>0?_40:0)+"px";
var _41=_3e-this.bottomLeftDiv.clientWidth-this.bottomRightDiv.clientWidth;
this.bottomBorder.style.width=(_41>0?_41:0)+"px";
var _42=_3f-this.topLeftDiv.clientHeight-this.bottomLeftDiv.clientHeight;
this.leftBorder.style.height=(_42>0?_42:0)+"px";
var _43=_3f-this.topRightDiv.clientHeight-this.bottomRightDiv.clientHeight;
this.rightBorder.style.height=(_43>0?_43:0)+"px";
if(this.topShadow){
var _44=this.shadowDiv.clientWidth;
var _45=this.shadowDiv.clientHeight;
var _46=_44-this.topLeftShadow.clientWidth-this.topRightShadow.clientWidth;
var _47=_44-this.bottomLeftShadow.clientWidth-this.bottomRightShadow.clientWidth;
var _48=_45-this.topLeftShadow.clientHeight-this.bottomLeftShadow.clientHeight;
var _49=_45-this.topRightShadow.clientHeight-this.bottomRightShadow.clientHeight;
this.topShadow.style.width=(_46>0?_46:0)+"px";
this.bottomShadow.style.width=(_47>0?_47:0)+"px";
this.leftShadow.style.height=(_48>0?_48:0)+"px";
this.rightShadow.style.height=(_49>0?_49:0)+"px";
}
}
catch(ex){
jsExDebug("frame_roundOffCorners",ex);
}
}
function frame_focus(){
try{
this.SYSTEM.WINDOW_MANAGER.focus(this);
}
catch(ex){
jsExDebug("frame_focus",ex);
}
return;
}
function frame_blur(){
try{
this.haveFocus=false;
if(this.shadowDiv&&this.topShadow){
this.shadowDiv.style.left=(this.SHADOW_WIDTH-this.SHADOW_WIDTH)+"px";
this.shadowDiv.style.top=(this.SHADOW_HEIGHT-this.SHADOW_HEIGHT)+"px";
this.shadowDiv.style.width=(this.width+(this.SHADOW_WIDTH*2))+"px";
this.shadowDiv.style.height=(this.height+(this.SHADOW_HEIGHT*2))+"px";
if(this.roundCorners){
this.roundOffCorners();
}
}
}
catch(ex){
jsExDebug("frame_blur",ex);
}
return;
}
function frame_adjustRelocateControlWidth(){
try{
if(!this.isPixelFrame){
this.relocateTop.widgetElement.style.width=(this.width-this.controlGroup.positionX-this.controlGroupWidth)+"px";
this.relocateTop.imageElement.style.width=(this.width-this.controlGroup.positionX-this.controlGroupWidth)+"px";
}else{
this.relocateTop.widgetElement.style.width=this.width+"px";
this.relocateTop.imageElement.style.width=this.width+"px";
}
this.relocateBottom.widgetElement.style.width=this.width+"px";
this.relocateBottom.imageElement.style.width=this.width+"px";
this.relocateLeft.widgetElement.style.height=this.height+"px";
this.relocateLeft.imageElement.style.height=this.height+"px";
this.relocateRight.widgetElement.style.height=this.height+"px";
this.relocateRight.imageElement.style.height=this.height+"px";
}
catch(ex){
jsExDebug("frame_adjustRelocateControlWidth",ex);
}
}
function frame_adjustTopRightCornerImageWidth(_4a){
try{
if(this.topRightCorner){
if(_4a<this.DEFAULT_MIN_WIDTH){
this.topRightCorner.style.width=(0.75*_4a)+"px";
}else{
this.topRightCorner.style.width=this.TOP_RIGHT_CORNER_WIDTH+"px";
}
}
}
catch(ex){
jsExDebug("frame_adjustTopRightCornerImageWidth",ex);
}
}
function frame_bindEventHandlers(_4b){
try{
if(_4b.DEFAULT_EVENT){
var _4c=this.bindEvent(_4b.DEFAULT_EVENT);
_4b.notifyEvent(_4b.DEFAULT_EVENT,_4c);
}
if(_4b.SUPPORTED_EVENTS){
for(var i=0;i<_4b.SUPPORTED_EVENTS.length;i++){
var _4e=this.bindEvent(_4b.SUPPORTED_EVENTS[i]);
_4b.notifyEvent(_4b.SUPPORTED_EVENTS[i],_4e);
}
}
}
catch(ex){
jsExDebug("frame_bindEventHandlers",ex);
}
}
function frame_bindEvent(_4f){
function handler(_50,_51){
try{
if(this.application){
var _52=this.SYSTEM.Event.getEventName(_4f);
var _53=this.application["binding_"+_51.name+"_"+_52];
if(_53){
_53.call(this.application,_51);
}
}
}
catch(ex){
jsExDebug("frame_bindEvent: handler",ex);
}
}
try{
return new this.SYSTEM.Delegate(this,handler);
}
catch(ex){
jsExDebug("frame_bindEvent",ex);
}
}
function frame_fireEvent(_54){
try{
if(this.application){
var _55=this.application[this.name+"_"+_54];
if(_55){
_55.call(this.application,this);
}
}
}
catch(ex){
jsExDebug("frame_fireEvent ("+this.name+"), "+_54,ex);
}
}
function frame_minimiseBtnClickEvent(){
try{
this.SYSTEM.WINDOW_MANAGER.minimise(this.getRunId(),true);
}
catch(ex){
jsExDebug("frame_minimiseBtnClickEvent",ex);
}
}
function frame_maximisetBtnClickEvent(_56,_57){
try{
this.maximise();
}
catch(ex){
jsExDebug("frame_maximisetBtnClickEvent",ex);
}
}
function frame_closeBtnClickEvent(_58,_59){
try{
this.close();
}
catch(ex){
jsExDebug("frame_closeBtnClickEvent",ex);
}
}
function frame_halfMaximiseLeftClickEvent(_5a,_5b){
try{
this.halfMaximise(this.SYSTEM.Frame.HALF_MAXIMISE_LEFT);
}
catch(ex){
jsExDebug("frame_halfMaximiseLeftClickEvent",ex);
}
}
function frame_halfMaximiseRightClickEvent(_5c,_5d){
try{
this.halfMaximise(this.SYSTEM.Frame.HALF_MAXIMISE_RIGHT);
}
catch(ex){
jsExDebug("frame_halfMaximiseRightClickEvent",ex);
}
}
function frame_topBorderDblClickEvent(_5e,_5f){
try{
this.maximise();
}
catch(ex){
jsExDebug("frame_topBorderDblClickEvent",ex);
}
}
function frame_leftBorderDblClickEvent(_60,_61){
try{
this.halfMaximise(this.SYSTEM.Frame.HALF_MAXIMISE_LEFT);
}
catch(ex){
jsExDebug("frame_leftBorderDblClickEvent",ex);
}
}
function frame_rightBorderDblClickEvent(_62,_63){
try{
this.halfMaximise(this.SYSTEM.Frame.HALF_MAXIMISE_RIGHT);
}
catch(ex){
jsExDebug("frame_rightBorderDblClickEvent",ex);
}
}
function frame_mouseScrollEvent(_64,_65,_66){
try{
var _67=null;
switch(_66){
case this.MOUSE_SCROLL_UP:
_67="_onScrollUp";
break;
case this.MOUSE_SCROLL_DOWN:
_67="_onScrollDown";
break;
}
if(this.application){
var _68=this.application[this.name+"_"+_67];
if(_68){
_68.call(this.application,this,_64);
_64.preventDefault();
}
}
}
catch(ex){
jsExDebug("frame_mouseScrollEvent",ex);
}
}
var frameToggle=false;
function frame_resizeEvent(_69,me){
try{
if(!me){
var me=this;
}
var _6b=me.width+me.SYSTEM.DM.dragDistanceX;
var _6c=me.height+me.SYSTEM.DM.dragDistanceY;
if(_6b<=me.minimumWidth){
_6b=me.minimumWidth;
if(document.all){
if(frameToggle){
_6b++;
frameToggle=false;
}else{
_6b--;
frameToggle=true;
}
}
}
if(_6c<=me.minimumHeight){
_6c=me.minimumHeight;
}
if(_6b>=me.maximumWidth){
_6b=me.maximumWidth;
}
if(_6c>=me.maximumHeight){
_6c=me.maximumHeight;
}
me.windowDiv.style.width=_6b+"px";
me.windowDiv.style.height=_6c+"px";
if(me.shadowDiv){
var _6d=me.rightShadow.clientWidth+me.leftShadow.clientWidth;
var _6e=me.topShadow.clientHeight+me.bottomShadow.clientHeight;
if(me.haveFocus){
me.shadowDiv.style.width=(_6b+_6d)+"px";
me.shadowDiv.style.height=(_6c+_6e)+"px";
}else{
me.shadowDiv.style.width=(_6b+_6d)+"px";
me.shadowDiv.style.height=(_6c+_6e)+"px";
}
}
me.roundOffCorners(_6b,_6c);
me.refreshTitleWidth(_6b);
me.adjustTopRightCornerImageWidth(_6b);
me.fireEvent("_onResize");
}
catch(ex){
jsExDebug("frame_resizeEvent",ex);
}
return;
}
function frame_resizeEndEvent(_6f,me){
try{
if(!me){
var me=this;
}
var _71=me.width+me.SYSTEM.Event.dragDistanceX;
var _72=me.height+me.SYSTEM.Event.dragDistanceY;
if(_71<=me.minimumWidth){
_71=me.minimumWidth;
}
if(_72<=me.minimumHeight){
_72=me.minimumHeight;
}
if(_71>=me.maximumWidth){
_71=me.maximumWidth;
}
if(_72>=me.maximumHeight){
_72=me.maximumHeight;
}
me.width=_71;
me.height=_72;
me.adjustRelocateControlWidth();
me.adjustTopRightCornerImageWidth(_71);
me.refreshTitleWidth();
if(me.leftShadow){
me.SYSTEM.Event.setDragElementDimensions(me.frame,me.width+me.leftShadow.clientWidth+me.rightShadow.clientWidth,me.height+me.topShadow.clientHeight+me.bottomShadow.clientHeight);
}else{
me.SYSTEM.Event.setDragElementDimensions(me.frame,me.width,me.height);
}
me.fireEvent("_onResizeEnd");
}
catch(ex){
jsExDebug("frame_resizeEvent",ex);
}
return;
}
function frame_documentResizeEvent(_73,me){
try{
if(!me){
var me=this;
}
me.setDimensions(me.SYSTEM.Environment.SCREEN_WIDTH,me.SYSTEM.Environment.SCREEN_HEIGHT);
}
catch(ex){
jsExDebug("frame_documentResizeEvent",ex);
}
}
function frame_relocateEvent(_75,me){
try{
var _77=me.frame.pixelX;
var _78=me.frame.pixelY;
me.frame.style.top=_78+"px";
me.frame.style.left=_77+"px";
me.fireEvent("_onMove");
}
catch(ex){
jsExDebug("frame_relocateEvent",ex);
}
}
function frame_relocateEndEvent(_79,me){
try{
me.positionX=me.frame.pixelX;
me.positionY=me.frame.pixelY;
me.fireEvent("_onMoveEnd");
}
catch(ex){
jsExDebug("frame_relocateEndEvent",ex);
}
}
function frame_mouseDownEvent(_7b,me){
try{
me.focus();
}
catch(ex){
jsExDebug("frame_mouseDownEvent",ex);
}
}
function frame_initialise(){
try{
this.windowId=null;
this.attach(this.DEFAULT_PARENT);
if(this.SYSTEM.WINDOW_MANAGER){
if(this.settingAlwaysOnTop){
this.SYSTEM.WINDOW_MANAGER.registerAlwaysOnTop(this);
}
this.SYSTEM.WINDOW_MANAGER.register(this);
}
}
catch(ex){
jsExDebug("frame_initialise",ex);
}
}
function frame_getRunId(){
try{
if(this.application){
return this.application.runId;
}
}
catch(ex){
jsExDebug("frame_getRunId",ex);
}
}
function frame_getApplication(){
try{
return this.application;
}
catch(ex){
jsExDebug("frame_getApplication",ex);
}
}
function frame_getWindowId(){
try{
return this.windowId;
}
catch(ex){
jsExDebug("frame_getWindowId",ex);
}
}
function frame_setWindowId(_7d){
try{
this.windowId=_7d;
return _7d;
}
catch(ex){
jsExDebug("frame_setWindowId",ex);
}
}
function frame_applyFocusShadow(){
try{
if(this.shadowDiv&&this.topShadow&&!this.isPixelFrame){
if(this.isMinimised){
this.SYSTEM.WINDOW_MANAGER.minimise(this.getRunId(),false);
}
this.SYSTEM.Dom.setElementClass(this.frame,"frame focus");
this.shadowDiv.style.width=(this.width+(this.leftShadow.clientWidth+this.rightShadow.clientWidth))+"px";
this.shadowDiv.style.height=(this.height+(this.topShadow.clientHeight+this.bottomShadow.clientHeight))+"px";
this.haveFocus=true;
if(this.roundCorners){
this.roundOffCorners();
}
}
}
catch(ex){
jsExDebug("frame_applyFocusShadow",ex);
}
}
function frame_applyBlurShadow(){
try{
if(this.shadowDiv&&this.topShadow&&!this.isPixelFrame){
this.SYSTEM.Dom.setElementClass(this.frame,"frame blur");
this.shadowDiv.style.width=(this.width+(this.leftShadow.clientWidth+this.rightShadow.clientWidth))+"px";
this.shadowDiv.style.height=(this.height+(this.topShadow.clientHeight+this.bottomShadow.clientHeight))+"px";
this.haveFocus=false;
if(this.roundCorners){
this.roundOffCorners();
}
}
}
catch(ex){
jsExDebug("frame_applyBlurShadow",ex);
}
}
function frame_addWidget(_7e,_7f,_80,_81,_82){
try{
if(_7f==null){
_7f=0;
}
if(_80==null){
_80=0;
}
_7e.setContainerObject(this);
_7e.setPosition(_7f,_80,_81,_82);
_7e.attach(this.windowDiv);
var _83=this.widgetArray.push(_7e)-1;
this.widgetsByName[_7e.name]=_83;
this.bindEventHandlers(_7e);
}
catch(ex){
jsExDebug("frame_addWidget",ex);
}
}
function frame_addWidgetToDom(_84,_85,_86,_87,_88,_89){
try{
if(_86==null){
_86=0;
}
if(_87==null){
_87=0;
}
_84.setContainerObject(this);
_84.setPosition(_86,_87,_88,_89);
_84.attach(_85);
var _8a=this.widgetArray.push(_84)-1;
this.widgetsByName[_84.name]=_8a;
this.bindEventHandlers(_84);
}
catch(ex){
jsExDebug("frame_addWidgetToDom",ex);
}
}
function frame_getWidget(_8b){
try{
var _8c=this.widgetsByName[_8b];
if(_8c!=null){
return this.widgetArray[_8c];
}
}
catch(ex){
jsExDebug("frame_getWidget",ex);
}
}
function frame_addControl(_8d,_8e,_8f){
try{
if(_8e==null){
_8e=0;
}
if(_8f==null){
_8f=0;
}
if(_8d.setPosition){
_8d.setPosition(_8e,_8f);
}
if(_8d.attach){
_8d.attach(this.windowDiv);
}
this.widgetArray.push(_8d);
}
catch(ex){
jsExDebug("frame_addControl",ex);
}
}
function frame_prepareFocus(){
try{
for(var i=0;i<this.widgetArray.length;i++){
var _91=this.widgetArray[i];
if(_91.prepareFocus){
_91.prepareFocus();
}
}
}
catch(ex){
jsExDebug("frame_prepareFocus",ex);
}
}
function frame_getInternalWidth(_92){
try{
return (_92?_92:this.width)-this.leftEdgeWidth-this.rightEdgeWidth;
}
catch(ex){
jsExDebug("frame_getInternalWidth",ex);
}
}
function frame_getInternalHeight(_93){
try{
return (_93?_93:this.height)-this.topEdgeHeight-this.bottomEdgeHeight;
}
catch(ex){
jsExDebug("frame_getInternalHeight",ex);
}
}
function frame_getHorizontalShadowHeights(){
try{
return this.topShadow.clientHeight+this.bottomShadow.clientHeight;
}
catch(ex){
jsExDebug("frame_getHorizontalShadowHeights",ex);
}
}
function frame_getVerticalShadowWidths(){
try{
return this.leftShadow.clientWidth+this.rightShadow.clientWidth;
}
catch(ex){
jsExDebug("frame_getVerticalShadowWidths",ex);
}
}
function frame_refreshEdgeWidths(){
try{
this.leftEdgeWidth=this.leftBorder.clientWidth;
this.rightEdgeWidth=this.rightBorder.clientWidth;
this.topEdgeHeight=this.topBorder.clientHeight;
this.bottomEdgeHeight=this.bottomBorder.clientHeight;
if(this.haveFocus){
this.focus();
}else{
this.blur();
}
}
catch(ex){
jsExDebug("frame_refreshEdgeWidths",ex);
}
}

try{
workspace_t.prototype=new peepelObject_t();
workspace_t.prototype.constructor=workspace_t;
workspace_t.prototype.cleanUp=workspace_cleanUp;
workspace_t.prototype.workspace_super=peepelObject_t.prototype.constructor;
workspace_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
workspace_t.prototype.saveCurrentWorkspace=workspace_saveCurrentWorkspace;
workspace_t.prototype.addContent=workspace_addContent;
workspace_t.prototype.addExistingContent=workspace_addExistingContent;
workspace_t.prototype.setListIndex=workspace_setListIndex;
workspace_t.prototype.getListIndex=workspace_getListIndex;
workspace_t.prototype.open=workspace_open;
workspace_t.prototype.clearContent=workspace_clearContent;
workspace_t.prototype.getContentString=workspace_getContentString;
workspace_t.prototype.fromContentString=workspace_fromContentString;
workspace_t.prototype.getAppCount=workspace_getAppCount;
workspace_t.prototype.CONTENT_PREPEND="ws";
workspace_t.prototype.NAME_PREPEND=":";
workspace_t.prototype.NAME_APPEND=";";
workspace_t.prototype.APP_ID_APPEND=",";
workspace_t.prototype.CAPTURE_STRING_PREPEND="{";
workspace_t.prototype.CAPTURE_STRING_APPEND="}";
workspace_t.prototype.APP_APPEND=";";
}
catch(ex){
jsExDebug("workspace_t.prototype",ex);
}
function workspace_t(id,_2){
try{
this.workspace_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.id=id;
this.name=_2;
this.contentArray=[];
this.listIndex=null;
}
catch(ex){
jsExDebug("workspace_t",ex);
}
}
function workspace_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var i=0;i<me.contentArray.length;i++){
me.contentArray[i].applicationId=null;
me.contentArray[i].captureString=null;
me.contentArray[i]=null;
delete me.contentArray[i];
}
me.contentArray=null;
me.listIndex=null;
me.name=null;
me.id=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("ujsf",ex);
}
}
function workspace_saveCurrentWorkspace(){
try{
var _5=this.SYSTEM.WINDOW_MANAGER.frameStack;
var _6=[];
for(var _7=_5.getFirst();_7!=null;_7=_7.getNext()){
var _8=_7.getItem().getApplication();
var _9=_8.getRunId();
if(_8&&_8.capture){
var _a=false;
if(!_6[_9]){
_6[_9]=true;
var _b=_8.capture();
if(_b){
this.addContent(_8.applicationId,_b);
}
}
}
}
_6=null;
}
catch(ex){
jsExDebug("workspace_saveCurrentWorkspace",ex);
}
}
function workspace_addContent(_c,_d){
try{
var _e={};
_e.applicationId=_c;
_e.captureString=_d;
this.contentArray.push(_e);
}
catch(ex){
jsExDebug("workspace_addContent",ex);
}
}
function workspace_addExistingContent(_f,_10){
try{
var _11={};
_11.applicationId=_f;
_11.captureString=_10;
this.contentArray.push(_11);
}
catch(ex){
jsExDebug("workspace_addExistingContent",ex);
}
}
function workspace_setListIndex(_12){
try{
this.listIndex=_12;
}
catch(ex){
jsExDebug("workspace_setListIndex",ex);
}
}
function workspace_getListIndex(){
try{
return this.listIndex;
}
catch(ex){
jsExDebug("workspace_getListIndex",ex);
}
}
function workspace_open(_13){
function doOpen(){
try{
for(var i=0;i<this.contentArray.length;i++){
var _15=this.contentArray[i];
if(_15){
var app=this.SYSTEM.APPLICATION_MANAGER.launch(_15.applicationId);
if(app){
app.restore(_15.captureString);
}
}
}
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("workspace_open",ex);
}
}
try{
if(_13){
doOpen.call(this);
}else{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,doOpen),"WorkSpace",["Opening WorkSpace '",this.name,"'"].join(""));
}
}
catch(ex){
jsExDebug("workspace_open",ex);
}
}
function workspace_clearContent(){
try{
for(var i=0;i<this.contentArray.length;i++){
this.contentArray[i].applicationId=null;
this.contentArray[i].captureString=null;
this.contentArray[i]=null;
delete this.contentArray[i];
}
this.contentArray=[];
}
catch(ex){
jsExDebug("workspace_clearContent",ex);
}
}
function workspace_getContentString(){
try{
var _18=this.CONTENT_PREPEND+this.NAME_PREPEND+this.name+this.NAME_APPEND;
for(var i=0;i<this.contentArray.length;i++){
if(this.contentArray[i]){
var _1a=this.contentArray[i];
_18+=_1a.applicationId+this.APP_ID_APPEND+this.CAPTURE_STRING_PREPEND+_1a.captureString+this.CAPTURE_STRING_APPEND+this.APP_APPEND;
}
}
return _18;
}
catch(ex){
jsExDebug("workspace_getContentString",ex);
}
}
function workspace_fromContentString(_1b,id){
try{
var _1d=_1b.split(this.APP_APPEND);
var _1e=_1d[0].split(this.NAME_PREPEND)[1];
this.name=_1e;
this.id=id;
for(var k=1;k<_1d.length;k++){
if(!_1d[k]){
continue;
}
var _20=parseInt(_1d[k].split(this.APP_ID_APPEND)[0]);
var _21=_1d[k].match(/\{[\w\s\.:,-\/?&=]+}/);
if(_21){
_21=_21[0].replace(/\{([\w\s\.:,-\/?&=]+)\}/,"$1");
this.addExistingContent(_20,_21);
}else{
jsDebugText("Invalid app capture string: "+_1d[k]);
}
}
}
catch(ex){
jsExDebug("workspace_fromContentString",ex);
}
}
function workspace_getAppCount(){
try{
return this.contentArray.length;
}
catch(ex){
jsExDebug("workspace_getAppCount",ex);
}
}

try{
workspaceList_t.prototype=new actionListener_t();
workspaceList_t.prototype.constructor=workspaceList_t;
workspaceList_t.prototype.cleanUp=workspaceList_cleanUp;
workspaceList_t.prototype.workspaceList_super=actionListener_t.prototype.constructor;
workspaceList_t.prototype.actionListener_cleanUp=actionListener_t.prototype.cleanUp;
workspaceList_t.prototype.getWorkspaces=workspaceList_getWorkspaces;
workspaceList_t.prototype.addWorkspace=workspaceList_addWorkspace;
workspaceList_t.prototype.deleteWorkspace=workspaceList_deleteWorkspace;
workspaceList_t.prototype.updateWorkspace=workspaceList_updateWorkspace;
workspaceList_t.prototype.openWorkspace=workspaceList_openWorkspace;
workspaceList_t.prototype.deleteAll=workspaceList_deleteAll;
workspaceList_t.prototype.refresh=workspaceList_refresh;
workspaceList_t.prototype.addQuickLaunchWorkspaceName=workspaceList_addQuickLaunchWorkspaceName;
workspaceList_t.prototype.updateDefaultWorkspace=workspaceList_updateDefaultWorkspace;
workspaceList_t.prototype.stopDefaultWorkspaceUpdate=workspaceList_stopDefaultWorkspaceUpdate;
workspaceList_t.prototype.startDefaultWorkspaceUpdate=workspaceList_startDefaultWorkspaceUpdate;
workspaceList_t.prototype.populate=workspaceList_populate;
workspaceList_t.prototype.populateResponse=workspaceList_populateResponse;
workspaceList_t.prototype.ACTION_ADD=1;
workspaceList_t.prototype.ACTION_READ=2;
workspaceList_t.prototype.ACTION_DELETE=3;
workspaceList_t.prototype.ACTION_DELETE_ALL=4;
workspaceList_t.prototype.ACTION_UPDATE=5;
workspaceList_t.prototype.WS_CONTENT_PREPEND=workspace_t.prototype.CONTENT_PREPEND;
workspaceList_t.prototype.WS_NAME_PREPEND=workspace_t.prototype.NAME_PREPEND;
workspaceList_t.prototype.WS_NAME_APPEND=workspace_t.prototype.NAME_APPEND;
workspaceList_t.prototype.WS_APP_ID_APPEND=workspace_t.prototype.APP_ID_APPEND;
workspaceList_t.prototype.WS_CAPTURE_STRING_PREPEND=workspace_t.prototype.CAPTURE_STRING_PREPEND;
workspaceList_t.prototype.WS_CAPTURE_STRING_APPEND=workspace_t.prototype.CAPTURE_STRING_APPEND;
workspaceList_t.prototype.WS_APP_APPEND=workspace_t.prototype.APP_APPEND;
workspaceList_t.prototype.DEFAULT_WS_UPDATE_INTERVAL=20000;
workspaceList_t.prototype.BLANK_WORKSPACE_NAME="blank";
}
catch(ex){
jsExDebug("workspaceList_t.prototype",ex);
}
function workspaceList_t(){
try{
this.workspaceList_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.workspaceArray=[];
this.quickLaunchWorkspaceNames=null;
this.lastDefaultContentString=(this.SYSTEM.Settings?this.SYSTEM.Settings.settingDefaultWorkspace:null);
this.populateCallback=null;
this.populateInstance=null;
this.requestUrl="peepel_services.php?service=workspace";
this.populate();
this.defaultWSTimer=new timer_t(new this.SYSTEM.Delegate(this,this.updateDefaultWorkspace),null,null,this.DEFAULT_WS_UPDATE_INTERVAL);
this.defaultWorkspaceUpdateEnabled=true;
}
catch(ex){
jsExDebug("workspaceList_t",ex);
}
}
function workspaceList_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var i=0;i<me.workspaceArray.length;i++){
if(me.workspaceArray[i]){
me.workspaceArray[i].cleanUp();
me.workspaceArray[i]=null;
delete me.workspaceArray[i];
}
}
me.populateCallback=null;
me.populateInstance=null;
me.workspaceArray=null;
me.requestUrl=null;
for(var i in me.quickLaunchWorkspaceNames){
me.quickLaunchWorkspaceNames[i]=null;
}
me.quickLaunchWorkspaceNames=null;
me.lastDefaultContentString=null;
me.defaultWSTimer.cleanUp();
me.defaultWSTimer=null;
me.defaultWorkspaceUpdateEnabled=null;
if(me==SYSTEM.Workspaces){
SYSTEM.Workspaces=null;
}
me.actionListener_cleanUp();
}
catch(ex){
jsExDebug("workspaceList_cleanUp",ex);
}
}
function workspaceList_getWorkspaces(_3){
try{
return this.workspaceArray;
}
catch(ex){
jsExDebug("workspaceList_getWorkspaces",ex);
}
}
function workspaceList_populate(){
try{
var _4=this.requestUrl+"&action="+this.ACTION_READ;
this.SYSTEM.Network.request(_4,null,this.populateResponse,this);
}
catch(ex){
jsExDebug("workspaceList_populate",ex);
}
}
function workspaceList_refresh(_5,_6){
try{
for(var i=0;i<this.workspaceArray.length;i++){
if(this.workspaceArray[i]){
this.workspaceArray[i].cleanUp();
this.workspaceArray[i]=null;
delete this.workspaceArray[i];
}
}
this.workspaceArray=[];
this.populate();
this.populateCallback=_5;
this.populateInstance=_6;
}
catch(ex){
jsExDebug("workspaceList_refresh",ex);
}
}
function workspaceList_addQuickLaunchWorkspaceName(_8){
try{
if(!this.quickLaunchWorkspaceNames){
this.quickLaunchWorkspaceNames=[];
}
this.quickLaunchWorkspaceNames.push(_8);
}
catch(ex){
jsExDebug("workspaceList_addQuickLaunchWorkspaceName",ex);
}
}
function workspaceList_updateDefaultWorkspace(){
try{
if(!this.defaultWorkspaceUpdateEnabled){
return;
}
var _9=new this.SYSTEM.Workspace(null,"default");
_9.saveCurrentWorkspace();
var _a=_9.getContentString();
_a=(_a?_a:"");
if(_a!=this.lastDefaultContentString){
this.SYSTEM.Settings.set("default_workspace",_a);
this.SYSTEM.Settings.commit();
this.lastDefaultContentString=_a;
}
_9.cleanUp();
}
catch(ex){
jsExDebug("workspaceList_updateDefaultWorkspace",ex);
}
}
function workspaceList_stopDefaultWorkspaceUpdate(){
try{
this.defaultWorkspaceUpdateEnabled=false;
}
catch(ex){
jsExDebug("workspaceList_stopDefaultWorkspaceUpdate",ex);
}
}
function workspaceList_startDefaultWorkspaceUpdate(){
try{
this.defaultWorkspaceUpdateEnabled=true;
}
catch(ex){
jsExDebug("workspaceList_startDefaultWorkspaceUpdate",ex);
}
}
function testResponse(_b,me,_d){
}
function workspaceList_populateResponse(_e,me,_10){
try{
if(!_e){
return;
}
var _11=_e.firstChild;
if(!_11||_11.firstChild.nodeName=="error"){
return;
}
var _12=_11.firstChild;
if(!_12.nodeName.match(/workspaces/)){
return;
}
var _13=_12.childNodes.length;
for(var i=0;i<_13;i++){
var _15=_12.childNodes[i];
var _16=_15.getAttribute("id");
if(!_15.nodeName.match(/content/)){
continue;
}
var _17=_15.firstChild.nodeValue.split("|");
for(var j=0;j<_17.length;j++){
if(!_17[j]){
continue;
}
var _19=new workspace_t();
_19.fromContentString(_17[j],_16);
var _1a=me.workspaceArray.length;
_19.setListIndex(_1a);
me.workspaceArray[_1a]=_19;
}
}
me.invokeActionListeners(me.ACTION_READ);
if(me.populateCallback){
me.populateCallback.call(me.populateInstance);
me.populateCallback=null;
me.populateInstance=null;
}
if(me.quickLaunchWorkspaceNames){
var _1b=false;
for(var i in me.quickLaunchWorkspaceNames){
_1b=_1b||me.openWorkspace(me.quickLaunchWorkspaceNames[i]);
me.quickLaunchWorkspaceNames[i]=null;
}
me.quickLaunchWorkspaceNames=null;
if(!_1b){
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WORKSPACE_MANAGER);
}
}
if(!me.defaultWSTimer.isRunning){
me.defaultWSTimer.start();
}
}
catch(ex){
jsExDebug("workspaceList_populateResponse",ex);
}
}
function workspaceList_addWorkspace(_1c){
try{
var _1d="&action="+this.ACTION_ADD+"&content="+_1c.getContentString();
this.SYSTEM.Network.request(this.requestUrl,_1d);
var _1e=this.workspaceArray.length;
_1c.setListIndex(_1e);
this.workspaceArray[_1e]=_1c;
}
catch(ex){
jsExDebug("workspaceList_addWorkspace",ex);
}
}
function workspaceList_deleteWorkspace(_1f){
try{
var _20=this.workspaceArray[_1f];
var _21="&action="+this.ACTION_DELETE+"&id="+_20.id;
this.SYSTEM.Network.request(this.requestUrl,_21);
this.workspaceArray[_1f]=null;
delete this.workspaceArray[_1f];
this.invokeActionListeners(this.ACTION_DELETE,_20.id);
}
catch(ex){
jsExDebug("workspaceList_deleteWorkspace",ex);
}
}
function workspaceList_updateWorkspace(_22){
try{
if(!_22){
return;
}
var _23="&action="+this.ACTION_UPDATE+"&id="+_22.id+"&content="+_22.getContentString();
this.SYSTEM.Network.request(this.requestUrl,_23);
}
catch(ex){
jsExDebug("workspaceList_updateWorkspace",ex);
}
}
function workspaceList_openWorkspace(_24,_25){
try{
if(_24!=null){
for(var i=0;i<this.workspaceArray.length;i++){
if(this.workspaceArray[i]&&this.workspaceArray[i].name==_24){
this.workspaceArray[i].open();
return true;
}
}
}else{
if(_25!=null){
if(this.workspaceArray[_25]){
this.workspaceArray[_25].open();
return true;
}
}
}
return false;
}
catch(ex){
jsExDebug("workspaceList_openWorkspace",ex);
}
}
function workspaceList_deleteAll(){
try{
this.SYSTEM.Network.request("peepel_services.php?service=workspace","&action="+this.ACTION_DELETE_ALL);
for(var i=0;i<this.workspaceArray.length;i++){
if(this.workspaceArray[i]){
this.workspaceArray[i]=null;
delete this.workspaceArray[i];
}
}
}
catch(ex){
jsExDebug("workspaceList_deleteAll",ex);
}
}

try{
tableDataEntry_t.prototype=new peepelObject_t();
tableDataEntry_t.prototype.constructor=tableDataEntry_t;
tableDataEntry_t.prototype.cleanUp=tableDataEntry_cleanUp;
tableDataEntry_t.prototype.tableDataEntry_super=peepelObject_t.prototype.constructor;
tableDataEntry_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
tableDataEntry_t.prototype.getEditMode=tableDataEntry_getEditMode;
tableDataEntry_t.prototype.setEditMode=tableDataEntry_setEditMode;
tableDataEntry_t.prototype.isEditing=tableDataEntry_isEditing;
tableDataEntry_t.prototype.edit=tableDataEntry_edit;
tableDataEntry_t.prototype.unedit=tableDataEntry_unedit;
tableDataEntry_t.prototype.save=tableDataEntry_save;
tableDataEntry_t.prototype.getParent=tableDataEntry_getParent;
tableDataEntry_t.prototype.keyDownHandler=tableDataEntry_keyDownHandler;
tableDataEntry_t.prototype.clickHandler=tableDataEntry_clickHandler;
tableDataEntry_t.prototype.notifyNewData=tableDataEntry_notifyNewData;
tableDataEntry_t.prototype.appendContent=tableDataEntry_appendContent;
tableDataEntry_t.prototype.cellHit=tableDataEntry_cellHit;
tableDataEntry_t.prototype.cellDrag=tableDataEntry_cellDrag;
tableDataEntry_t.prototype.focus=tableDataEntry_focus;
tableDataEntry_t.prototype.LENGTH_BUFFER=3;
tableDataEntry_t.prototype.EDIT_MODE_NEW=1;
tableDataEntry_t.prototype.EDIT_MODE_UPDATE=2;
tableDataEntry_t.prototype.EDIT_MODE_NONE=0;
}
catch(ex){
jsExDebug("tableDataEntry: prototype",ex);
}
function tableDataEntry_t(){
try{
this.tableDataEntry_super();
this.editMode=this.EDIT_MODE_NONE;
var _1=document.createElement("input");
_1.type="text";
this.SYSTEM.Event.enableTextSelect(_1);
_1.setAttribute("autocomplete","off");
_1.style.border="dashed 1px rgb( 187,187,187 )";
_1.style.backgroundColor="#ffffff";
_1.style.position="relative";
_1.style.zIndex=1;
this.domElement=_1;
this.SYSTEM.Event.attachEvent(_1,"onkeydown","keydown",this.keyDownHandler,this,true);
this.SYSTEM.Event.attachEvent(_1,"onclick","click",this.clickHandler,this,true);
}
catch(ex){
jsExDebug("tableDataEntry_t",ex);
}
}
function tableDataEntry_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.domElement,"onkeydown","keydown");
me.SYSTEM.Event.detachEvent(me.domElement,"onclick","click");
me.domElement.value=null;
me.domElement=null;
if(me.newDataBinding){
me.newDataBinding.callback=null;
me.newDataBinding.instance=null;
me.newDataBinding.parameter=null;
me.newDataBinding=null;
}
me.stateIsEditing=null;
me.parameter=null;
me.value=null;
me.unmodifiedValue=null;
me.parent=null;
me.completionCallback=null;
me.completionInstance=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("tableDataEntry_cleanUp",ex);
}
}
function tableDataEntry_getEditMode(){
try{
return this.editMode;
}
catch(ex){
jsExDebug("tableDataEntry_getEditMode",ex);
}
}
function tableDataEntry_setEditMode(_3){
try{
this.editMode=_3;
}
catch(ex){
jsExDebug("tableDataEntry_setEditMode",ex);
}
}
function tableDataEntry_isEditing(){
try{
return this.stateIsEditing;
}
catch(ex){
jsExDebug("tableDataEntry_isEditing",ex);
}
}
function tableDataEntry_edit(_4,_5,_6,_7,_8){
try{
if(this.stateIsEditing){
if(_4!=this.parent){
this.unedit();
}else{
return;
}
}
if(!_5){
_5="";
}
this.stateIsEditing=true;
this.parameter=_6;
this.value=_5;
this.domElement.value=_5;
this.unmodifiedValue=_5;
this.parent=_4;
_4.appendChild(this.domElement);
this.domElement.focus();
this.domElement.size=_5.toString().length+this.LENGTH_BUFFER;
this.completionCallback=_7;
this.completionInstance=_8;
}
catch(ex){
jsExDebug("tableDataEntry_edit",ex);
}
}
function tableDataEntry_unedit(){
try{
if(!this.stateIsEditing){
return;
}
this.modifiedValue=this.domElement.value;
this.parent.removeChild(this.domElement);
this.stateIsEditing=false;
this.editMode=this.EDIT_MODE_NONE;
if(typeof this.completionCallback=="object"){
this.completionCallback(this.completionInstance);
}else{
if(this.completionInstance){
this.completionInstance[this.completionCallback]();
}
}
}
catch(ex){
jsExDebug("tableDataEntry_unEdit",ex);
}
}
function tableDataEntry_save(){
try{
if(!this.stateIsEditing){
return;
}
this.modifiedValue=this.domElement.value;
this.parent.removeChild(this.domElement);
this.stateIsEditing=false;
this.editMode=this.EDIT_MODE_NONE;
if(this.newDataBinding){
this.newDataBinding.callback.call(this.newDataBinding.instance,this.modifiedValue,this.parameter,this.newDataBinding.parameter);
}
if(typeof this.completionCallback=="object"){
this.completionCallback(this.completionInstance);
}else{
if(this.completionInstance){
this.completionInstance[this.completionCallback]();
}
}
}
catch(ex){
jsExDebug("tableDataEntry_save",ex);
}
}
function tableDataEntry_getParent(){
try{
return this.parent;
}
catch(ex){
jsExDebug("tableDataEntry_getParent",ex);
}
}
function tableDataEntry_keyDownHandler(_9,me){
try{
me.domElement.size=me.domElement.value.length+me.LENGTH_BUFFER;
return;
}
catch(ex){
jsExDebug("tableDataEntry_keyDownHandler",ex);
}
}
function tableDataEntry_clickHandler(_b,me){
try{
}
catch(ex){
jsExDebug("tableDataEntry_clickHandler",ex);
}
}
function tableDataEntry_notifyNewData(_d,_e,_f){
try{
if(!_d){
return;
}
this.newDataBinding={callback:_d,instance:_e,parameter:_f};
}
catch(ex){
jsExDebug("tableDataEntry_notifyNewData",ex);
}
}
function tableDataEntry_appendContent(_10){
try{
if(!this.stateIsEditing){
return;
}
this.value+=_10;
this.domElement.value=this.value;
this.domElement.size=this.value.toString().length+this.LENGTH_BUFFER;
}
catch(ex){
jsExDebug("tableDataEntry_appendContent",ex);
}
}
function tableDataEntry_focus(){
try{
var _11=this.domElement.value.length;
this.domElement.focus();
if(this.domElement.createTextRange){
var _12=this.domElement.createTextRange();
_12.collapse(true);
_12.moveEnd("character",_11);
_12.moveStart("character",_11);
_12.select();
}
if(this.domElement.setSelectionRange){
this.domElement.setSelectionRange(_11,_11);
}
}
catch(ex){
jsExDebug("tableDataEntry_focus",ex);
}
}
function tableDataEntry_cellHit(row,_14,_15){
try{
var _16=0;
if(this.stateIsEditing&&this.domElement&&this.domElement.value.match(/^=/)){
var _17=this.domElement.value;
if(_15){
_17=_17.replace(/([0-9])\s*$/,"$1,");
}
if(_17.match(/([A-Z]+[0-9]+:)?([A-Z]+)($)?([0-9]+)\s?\)$/i)){
_17=_17.replace(/([A-Z]+[0-9]+:)?([A-Z]+)($)?([0-9]+)\s?\)$/i,_14+"$3"+row+")");
}else{
if(_17.match(/([A-Z]+[0-9]+:)?([A-Z]+)($)?([0-9]+)$/i)){
_17=_17.replace(/([A-Z]+[0-9]+:)?([A-Z]+)($)?([0-9]+)$/i,_14+"$3"+row);
}else{
if(_17.match(/([A-Z]+[0-9]+:)?([A-Z]+)($)?([0-9]+)([,:])\s?\)$/i)){
_17=_17.replace(/([A-Z]+[0-9]+:)?([A-Z]+)($)?([0-9]+)([,:])\s?\)$/i,"$1$2$3$4$5"+_14+row+")");
}else{
if(this.domElement.value.match(/\(\s?\)$/)){
_17=_17.replace(/\(\)$/,"("+_14+row+")");
}else{
_17+=(_14+row);
}
}
}
}
this.value=_17;
this.domElement.value=_17;
this.domElement.size=_17.toString().length+this.LENGTH_BUFFER;
return true;
}
return false;
}
catch(ex){
jsExDebug("tableDataEntry_cellHit",ex);
}
}
function tableDataEntry_cellDrag(row,_19){
try{
var _1a=0;
if(this.stateIsEditing&&this.domElement&&this.domElement.value.match(/^=/)){
var _1b=this.domElement.value;
if(_1b.match(/([A-Z]+[0-9]+:)([A-Z]+)($)?([0-9]+)\s?\)$/i)){
_1b=_1b.replace(/([A-Z]+[0-9]+:)([A-Z]+)($)?([0-9]+)\s?\)$/i,"$1"+_19+"$3"+row+")");
}else{
if(_1b.match(/($)?([A-Z]+)($)?([0-9]+)\s?\)$/i)){
_1b=_1b.replace(/($)?([A-Z]+)($)?([0-9]+)\s?\)$/i,"$1$2$3$4:"+_19+row+")");
}else{
if(_1b.match(/([A-Z]+[0-9]+:)([A-Z]+)($)?([0-9]+)$/i)){
_1b=_1b.replace(/([A-Z]+[0-9]+:)([A-Z]+)($)?([0-9]+)$/i,"$1"+_19+"$3"+row);
}else{
if(_1b.match(/($)?([A-Z]+)($)?([0-9]+)$/i)){
_1b=_1b.replace(/($)?([A-Z]+)($)?([0-9]+)$/i,"$1$2$3$4:"+_19+row);
}else{
if(_1b.match(/([A-Z]+[0-9]+:)([A-Z]+)($)?([0-9]+)([,:])\s?\)$/i)){
jsDebug("unreachable reached..oops, please report this error 88390");
_1b=_1b.replace(/([A-Z]+[0-9]+:)([A-Z]+)($)?([0-9]+)([,:])\s?\)$/i,"$1$2$3$4:"+_19+row+"$5)");
}else{
_1b+=(_19+row);
}
}
}
}
}
this.value=_1b;
this.domElement.value=_1b;
this.domElement.size=_1b.toString().length+this.LENGTH_BUFFER;
return true;
}else{
}
return false;
}
catch(ex){
jsExDebug("tableDataEntry_cellHit",ex);
}
}

try{
cellType_t.prototype.constructor=cellType_t;
cellType_t.prototype.set=cellType_set;
}
catch(ex){
jsExDebug("cellType_t",ex);
}
function cellType_t(){
try{
}
catch(ex){
jsExDebug("cellType_t",ex);
}
}
function cellType_set(_1){
try{
if(_1.match(/General/i)){
alert("general");
}else{
if(_1.match(/(^\$)|([^\\]\$)/)){
alert("currency");
}else{
if(_1.match(/(^\#)|([^\\]\#)|(^\0)|([^\\]\0)/)){
alert("number");
}else{
if(_1.match(/(^\%)|([^\\]\%)/)){
alert("percentage");
}else{
if(_1.match(/(^\@)|([^\\]\@)/)){
alert("text");
}else{
if(_1.match(/((^\h)|([^\\]\h))|((^\h)|([^\\]\m))|((^\m)|([^\\]\m))|((^\s)|([^\\]\s))|((^\y)|([^\\]\y))/)){
alert("DateTime");
}else{
if(_1.match(/Boolean/i)){
alert("boolean");
}else{
alert("no match for: "+_1);
}
}
}
}
}
}
}
}
catch(ex){
jsExDebug("cell_setType",ex);
}
}
function cellType_applyContent(_2){
try{
}
catch(ex){
jsExDebug("cellType_applyContent",ex);
}
}
function cellType_processGeneralCode(_3){
try{
this.setGeneral();
}
catch(ex){
jsExDebug("cellType_processGeneralCode",ex);
}
}
function cellType_processNumberCode(_4){
function countHashGroups(_5){
var _6=_5.split(/[^\#]/);
var _7=0;
var _8=0;
for(var i=0;i<_6.length;i++){
if(_6[i]){
_7++;
_8+=_6[i].length;
}
}
return {groups:_7,hashs:_8};
}
function processCode(_a,_b){
var _c=_a.split(/[^\#]/);
var _d=0;
for(var i=0;i<_c.length;i++){
if(_c[i]){
_d++;
}
}
var _c=_a.split(/([^\#])/);
var _f=[];
var _10=_d-1;
for(var i=_c.length-1;i>=0;i--){
if(_c[i].match(/#/)){
if(_10==0){
var _11=_b;
}else{
var _12=_b.length-_c[i].length;
var _11=_b.substr(_12);
_b=_b.substr(0,_12);
}
_f.push(_11);
_10--;
}else{
_f.push(_c[i]);
}
}
_f=_f.reverse();
return _f.join("");
}
try{
var _13=_4.split(".");
_4=_13.shift();
fractionCode=_13.join(".");
var _14=countHashGroups.call(this,fractionCode);
var _15=_14.hashs;
_16=Math.roundPlacesNoPadding(_16,_15);
var _16=_16.split(".");
var _17="";
if(_16.length>1){
_17=_16.pop();
}
var _18=_16.pop();
alert("limit decimals to "+_15);
alert("code: "+_4+" :: fractionCode: "+fractionCode);
alert(processCode(_4,_18)+"."+processCode(fractionCode,_17));
}
catch(ex){
jsExDebug("cellType_processNumberCode",ex);
}
}
function cell_setGeneral(){
try{
this.treatNegatives=null;
this.settingSeparator=false;
this.precedingSymbol="";
this.procedingSymbol="";
this.nrDecimalPlaces=-1;
this.settingType=this.GENERAL_TYPE;
}
catch(ex){
jsExDebug("cell_setGeneral",ex);
}
}
function cell_setCurrency(){
try{
if(!symbol){
symbol="$";
}
if(arguments.length<3){
decimalPlaces=2;
}
this.settingSeparator=1;
this.treatNegatives=treatNegatives;
this.precedingSymbol=symbol;
this.procedingSymbol="";
this.nrDecimalPlaces=decimalPlaces;
this.settingType=this.CURRENCY_TYPE;
}
catch(ex){
jsExDebug("cell_setTypeCurrency",ex);
}
}

try{
cell_t.prototype=new peepelObject_t();
cell_t.prototype.constructor=cell_t;
cell_t.prototype.cleanUp=cell_cleanUp;
cell_t.prototype.cell_super=peepelObject_t.prototype.constructor;
cell_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
cell_t.prototype.toHtml=cell_toHtml;
cell_t.prototype.toXml=cell_toXml;
cell_t.prototype.getFormulaResult=cell_getFormulaResult;
cell_t.prototype.getContent=cell_getContent;
cell_t.prototype.getFormula=cell_getFormula;
cell_t.prototype.getAlphaId=cell_getAlphaId;
cell_t.prototype.reset=cell_reset;
cell_t.prototype.fromXml=cell_fromXml;
cell_t.prototype.setContent=cell_setContent;
cell_t.prototype.setFormula=cell_setFormula;
cell_t.prototype.adjustReferences=cell_adjustReferences;
cell_t.prototype.adjustReferencesAbove=cell_adjustReferencesAbove;
cell_t.prototype.adjustReferencesOutsideInvalid=cell_adjustReferencesOutsideInvalid;
cell_t.prototype.shiftReferences=cell_shiftReferences;
cell_t.prototype.replaceFormula=cell_replaceFormula;
cell_t.prototype.expandRanges=cell_expandRanges;
cell_t.prototype.replaceReferences=cell_replaceReferences;
cell_t.prototype.buildRelationships=cell_buildRelationships;
cell_t.prototype.removeQuotedText=cell_removeQuotedText;
cell_t.prototype.replaceQuotedText=cell_replaceQuotedText;
cell_t.prototype.clearSupports=cell_clearSupports;
cell_t.prototype.notifyContentChange=cell_notifyContentChange;
cell_t.prototype.evaluate=cell_evaluate;
cell_t.prototype.evaluateDependants=cell_evaluateDependants;
cell_t.prototype.clone=cell_clone;
cell_t.prototype.copy=cell_copy;
cell_t.prototype.circularReferenceError=cell_circularReferenceError;
cell_t.prototype.referenceError=cell_referenceError;
cell_t.prototype.setError=cell_setError;
cell_t.prototype.disableAutoAlign=cell_disableAutoAlign;
cell_t.prototype.cloneType=cell_cloneType;
cell_t.prototype.deleteCell=cell_deleteCell;
cell_t.prototype.increaseDecimalPlace=cell_increaseDecimalPlace;
cell_t.prototype.decreaseDecimalPlace=cell_decreaseDecimalPlace;
cell_t.prototype.setType=cell_setType;
cell_t.prototype.setTypeCurrency=cell_setTypeCurrency;
cell_t.prototype.setTypeGeneral=cell_setTypeGeneral;
cell_t.prototype.setTypeBoolean=cell_setTypeBoolean;
cell_t.prototype.setTypeNumber=cell_setTypeNumber;
cell_t.prototype.setTypeAccounting=cell_setTypeAccounting;
cell_t.prototype.setTypePercentage=cell_setTypePercentage;
cell_t.prototype.setTypeTime=cell_setTypeTime;
cell_t.prototype.autoFormat=cell_autoFormat;
cell_t.prototype.formatNumber=cell_formatNumber;
cell_t.prototype.formatBoolean=cell_formatBoolean;
cell_t.prototype.formatText=cell_formatText;
cell_t.prototype.formatError=cell_formatError;
cell_t.prototype.formatOfficeValue=cell_formatOfficeValue;
cell_t.prototype.setPosition=cell_setPosition;
cell_t.prototype.getFont=cell_getFont;
cell_t.prototype.getColour=cell_getColour;
cell_t.prototype.getStyle=cell_getStyle;
cell_t.prototype.setFont=cell_setFont;
cell_t.prototype.setStyle=cell_setStyle;
cell_t.prototype.applyStyles=cell_applyStyles;
cell_t.prototype.setColour=cell_setColour;
cell_t.prototype.toggleStyle=cell_toggleStyle;
cell_t.prototype.clearStyle=cell_clearStyle;
cell_t.prototype.copyStyle=cell_copyStyle;
cell_t.prototype.getDataStyle=cell_getDataStyle;
cell_t.prototype.setFormatFromDataStyle=cell_setFormatFromDataStyle;
cell_t.prototype.asyncFormulaResultCallback=cell_asyncFormulaResultCallback;
cell_t.prototype.debugCell=cell_debugCell;
cell_t.prototype.TEXT=1;
cell_t.prototype.FORMULA=2;
cell_t.prototype.REFERENCE=3;
cell_t.prototype.NUMBER=4;
cell_t.prototype.PERCENTAGE=5;
cell_t.prototype.CURRENCY=6;
cell_t.prototype.GENERAL_TYPE=1;
cell_t.prototype.CURRENCY_TYPE=2;
cell_t.prototype.NUMBER_TYPE=3;
cell_t.prototype.ACCOUNTING_TYPE=4;
cell_t.prototype.PERCENTAGE_TYPE=8;
cell_t.prototype.STRING_TYPE=16;
cell_t.prototype.TIME_TYPE=32;
cell_t.prototype.DATE_TYPE=64;
cell_t.prototype.ERROR_TYPE=128;
cell_t.prototype.STRING_TYPE=256;
cell_t.prototype.BOOLEAN_TYPE=512;
cell_t.prototype.ALIGN_AUTO=0;
cell_t.prototype.ALIGN_LEFT=1;
cell_t.prototype.ALIGN_CENTRE=2;
cell_t.prototype.ALIGN_RIGHT=3;
cell_t.prototype.ALIGN_TOP=1;
cell_t.prototype.ALIGN_BOTTOM=2;
cell_t.prototype.ALIGN_MIDDLE=3;
cell_t.prototype.BORDER_DEFAULT_STYLE="solid 1px";
cell_t.prototype.BORDER_DOUBLE_STYLE="double 3px";
cell_t.prototype.BORDER_DASHED_STYLE="dashed 1px";
cell_t.prototype.BORDER_THICK_STYLE="solid 2px";
cell_t.prototype.HTML_BORDER_WIDTH="1px";
cell_t.prototype.HTML_BORDER_COLOUR="#BBBBBB";
cell_t.prototype.HTML_BORDER_STYLE="outset";
cell_t.prototype.GRID_COLOUR="#BBBBBB";
cell_t.prototype.BORDER_LEFT=1;
cell_t.prototype.BORDER_RIGHT=2;
cell_t.prototype.BORDER_TOP=4;
cell_t.prototype.BORDER_BOTTOM=8;
cell_t.prototype.CIRC_REF_ERROR=1;
cell_t.prototype.NEGATIVE_STYLE_HIGHLIGHT=1;
cell_t.prototype.NEGATIVE_STYLE_BRACE=2;
cell_t.prototype.NEGATIVE_STYLE_NOSYMBOL=4;
}
catch(ex){
jsExDebug("cell_t.prototype",ex);
}
function cell_t(_1,x,y,_4,_5){
try{
this.cell_super();
this.spreadsheet=_1;
this.x=x;
this.y=y;
this.alphaX=numericToAlpha(x);
this.alphaId=(this.alphaX+y);
this.sheet=_4;
this.content="";
this.resultType=this.GENERAL_TYPE;
this.formula="";
this.formulaResult=0;
this.settingAutoAlign=true;
this.asyncFormulaResult=false;
if(_5){
this.style=_5;
}else{
this.style=new cellStyles_t(this);
}
this.treatNegatives=null;
this.nrDecimalPlaces=-1;
this.precedingSymbol="";
this.procedingSymbol="";
this.rowSpan=1;
this.colSpan=1;
this.autoTyped=true;
this.settingType=this.GENERAL_TYPE;
this.type=new cellType_t();
}
catch(ex){
jsExDebug("cell_t",ex);
}
}
function cell_cleanUp(me){
try{
if(!me){
me=this;
}
me.spreadsheet=null;
me.style.cleanUp();
me.style=null;
me.type=null;
if(me.notifyStyleChangeDelegate){
me.notifyStyleChangeDelegate=null;
}
if(me.notifyContentChangeDelegate){
me.notifyContentChangeDelegate=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("cell_cleanUp",ex);
}
}
function cell_toXml(){
try{
var _7=new xmlWriter_t();
var _8=this.formula;
if(_8.toString().match(/^=/)){
_8=this.formula.replace(/[,]/g,";");
_8=prepareTextForXHR(_8);
_7.addAttribute("table:formula",_8);
}
_8=_8.replace(/\"/g,"'");
if(this.formulaResult!=null){
switch(this.settingType){
case this.NUMBER_TYPE:
_7.addAttribute("office:value-type","float");
_7.addAttribute("office:value",this.formulaResult.toString());
break;
case this.ACCOUNTING_TYPE:
case this.CURRENCY_TYPE:
_7.addAttribute("office:value-type","currency");
_7.addAttribute("office:currency","USD");
_7.addAttribute("office:value",_8);
break;
case this.PERCENTAGE_TYPE:
_7.addAttribute("office:value-type","percentage");
_7.addAttribute("office:value",this.formulaResult.toString());
break;
case this.BOOLEAN_TYPE:
_7.addAttribute("office:value-type","boolean");
_7.addAttribute("office:boolean-value",this.formulaResult.toString());
break;
case this.DATE_TYPE:
break;
case this.TIME_TYPE:
_7.addAttribute("office:value-type","time");
_7.addAttribute("office:time-value",this.content);
break;
default:
_7.addAttribute("office:value-type","string");
_7.addAttribute("office:string-value",_8);
}
}
_7.addAttribute("table:style-name",this.style.getName());
var _9=_7.createElement("table:table-cell");
_9+=_7.createElement("text:p");
_9+=this.content;
_9+=_7.closeElement("text:p");
_9+=_7.closeElement("table:table-cell");
return _9;
}
catch(ex){
jsExDebug("cell_toXml",ex);
}
}
function cell_toHtml(_a,_b){
try{
var _c="";
var _d=new xmlWriter_t();
var _e=this.style.toCssWriter();
_e.addProperty("border-width",this.HTML_BORDER_WIDTH);
_e.addProperty("border-style",this.HTML_BORDER_STYLE);
_e.addProperty("border-color",this.HTML_BORDER_COLOUR);
if(_a){
_e.addProperty("width",_a+"px");
}
if(_b){
_e.addProperty("height",_b+"px");
}
_d.addAttribute("style",_e.toString());
_c=_d.createElement("td");
_c+=(this.content.length?this.content:"&nbsp;");
_c+=_d.closeElement("td");
return _c;
}
catch(ex){
jsExDebug("cell_toHtml",ex);
}
}
function cell_fromXml(_f,_10,_11){
try{
var _12=null;
var _13=null;
var _14=true;
var _15=_f.getAttribute("table:formula");
if(_15){
_15=_15.replace(/of:=/g,"=");
_15=_15.replace(/\[\./g,"");
_15=_15.replace(/[;]/g,",");
_15=recoverTextFromXHR(_15);
}
var _16=_f.getAttribute("office:value-type")?_f.getAttribute("office:value-type"):"";
var _17=_f.getAttribute("table:style-name");
var _18=_18=getChildNode(_f,"text:p");
if(_18&&_18.length){
if(_18[0].firstChild){
_12=_18[0].firstChild.nodeValue;
}else{
_12=_18[0].nodeValue;
}
}
switch(_16){
case "float":
_16=this.NUMBER_TYPE;
this.resultType=this.NUMBER_TYPE;
_13=_f.getAttribute("office:value");
_15=(_15?_15:_13);
break;
default:
case "string":
_16=this.STRING_TYPE;
this.resultType=this.STRING_TYPE;
_13=_f.getAttribute("office:string-value");
_13=(_13?_13:_12);
_15=(_15?_15:_13);
break;
case "currency":
_16=this.CURRENCY_TYPE;
this.resultType=this.NUMBER_TYPE;
_13=_f.getAttribute("office:value");
_15=(_15?_15:_13);
this.precedingSymbol="$";
this.nrDecimalPlaces=2;
_14=false;
break;
case "percentage":
_16=this.PERCENTAGE_TYPE;
this.resultType=this.NUMBER_TYPE;
_13=_f.getAttribute("office:value");
_15=(_15?_15:_13);
this.procedingSymbol="%";
break;
case "boolean":
_16=this.BOOLEAN_TYPE;
this.resultType=this.BOOLEAN_TYPE;
_13=_f.getAttribute("office:boolean-value");
_15=(_15?_15:_13);
break;
case "time":
_16=this.TIME_TYPE;
this.resultType=this.TIME_TYPE;
_13=_f.getAttribute("office:time-value");
if(_13&&_13.match(/PT([0-9]H)?([0-9]M)?([0-9]S)?/)){
_13=_12;
}
_15=(_15?_15:_13);
break;
}
this.settingType=_16;
if(_13!=null){
this.setContent(_13);
}
if(_15!=null){
this.setFormula(_15);
}
var _19=null;
if(_17!=null){
_19=_10.getStyle(_17);
}else{
if(_11!=null){
_19=_10.getStyle(_11);
}
}
if(_19){
this.copyStyle(_19);
var _1a=_10.getStyle(this.style.getDataStyleName());
if(_14){
this.setFormatFromDataStyle(_1a);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y,this.sheet);
}
var _1b=false;
switch(_1a.styleType){
case "number:date-style":
case "number:time-style":
_16=this.TIME_TYPE;
this.resultType=this.TIME_TYPE;
_13=_12;
_15=(_15?_15:_13);
_1b=true;
break;
}
if(_1b){
this.settingType=_16;
if(_13!=null){
this.setContent(_13);
}
if(_15!=null){
this.setFormula(_15);
}
}
}
}
this.evaluate();
this.buildRelationships();
this.evaluateDependants();
_f=null;
}
catch(ex){
jsExDebug("cell_fromXml",ex);
}
}
function cell_notifyContentChange(_1c,_1d){
try{
this.notifyStyleChangeDelegate=_1d;
this.notifyContentChangeDelegate=_1c;
}
catch(ex){
jsExDebug("cell_notifyContentChange",ex);
}
}
function cell_setContent(_1e){
12;
try{
if(typeof _1e=="undefined"){
this.content="";
}else{
this.content=_1e;
}
if(this.notifyContentChangeDelegate){
this.notifyContentChangeDelegate.invoke(this.x,this.y,this.sheet,this.content);
}
}
catch(ex){
jsExDebug("cell_setContent",ex);
}
}
function cell_getContent(){
try{
return this.content;
}
catch(ex){
jsExDebug("cell_getContent",ex);
}
}
function cell_setFormula(_1f){
try{
this.formula=_1f;
this.autoTyped=true;
}
catch(ex){
jsExDebug("cell_setFormula",ex);
}
}
function cell_getFormula(){
try{
return this.formula;
}
catch(ex){
jsExDebug("cell_getFormula",ex);
}
}
function cell_getAlphaId(){
try{
return this.alphaId;
}
catch(ex){
jsExDebug("cell_getAlphaId",ex);
}
}
function cell_evaluate(){
try{
this.evaluated=true;
if(!this.formula.length||this.formula==" "||this.formula==undefined||this.formula==null){
this.setContent("");
this.formulaResult=0;
this.resultType=this.GENERAL_TYPE;
this.autoFormat(this.resultType);
return;
}
var _20=this.formula+" ";
var _21="";
if(_20.charAt(0)=="="){
_20=this.replaceFormula(_20);
_20=this.expandRanges(_20);
_20=this.replaceReferences(_20);
_20=_20.slice(1,_20.length);
if(_20.charAt(0)!="#"){
try{
var formula=new this.SYSTEM.Math.Formula(this,this.spreadsheet);
_20=_20.replace(/-\s*-/g,"+");
_20=_20.replace(/(\s*\+\s*){1,}/g,"+");
var _23=eval(_20);
if(_23!=null){
this.formulaResult=_23;
this.asyncFormulaResult=false;
}
if(formula.error!=null){
switch(formula.error){
case formula.TOO_MANY_PARAMETERS:
case formula.BAD_NR_PARAMETERS:
case formula.NOT_ENOUGH_PARAMETERS:
this.resultType=this.ERROR_TYPE;
_21="#!BADPARAMS?";
break;
case formula.NOT_IMPLEMENTED:
_21="#!NOTIMPLEMENTED?";
this.resultType=this.ERROR_TYPE;
break;
case formula.BAD_PARAMATER_TYPE:
case formula.VALUE_ERROR:
_21="#VALUE!";
this.resultType=this.ERROR_TYPE;
break;
case formula.NUM_ERROR:
_21="#NUM!";
this.resultType=this.ERROR_TYPE;
break;
case formula.DIVIDE_ZERO_ERROR:
_21="#DIV/0";
this.resultType=this.ERROR_TYPE;
break;
case formula.AJAX_ERROR:
this.asyncFormulaResult=true;
this.resultType=this.STRING_TYPE;
_21="";
break;
default:
_21="#!NAME?:";
this.resultType=this.ERROR_TYPE;
}
}else{
switch(formula.settingType){
case formula.NUMBER_TYPE:
this.resultType=this.NUMBER_TYPE;
break;
case formula.BOOLEAN_TYPE:
this.resultType=this.BOOLEAN_TYPE;
break;
case formula.CURRENCY_TYPE:
this.resultType=this.CURRENCY_TYPE;
break;
case formula.ACCOUNTING_TYPE:
this.resultType=this.ACCOUNTING_TYPE;
break;
case formula.DATE_TYPE:
this.resultType=this.TIME_TYPE;
break;
case formula.TIME_TYPE:
this.resultType=this.TIME_TYPE;
break;
case formula.PERCENTAGE_TYPE:
this.resultType=this.PERCENTAGE_TYPE;
break;
case formula.BOOLEAN_TYPE:
this.resultType=this.BOOLEAN_TYPE;
break;
case formula.STRING_TYPE:
this.resultType=this.STRING_TYPE;
break;
default:
if(isNaN(this.formulaResult*1)){
this.resultType=this.STRING_TYPE;
_21=this.formulaResult;
this.formulaResult=this.formulaResult;
}else{
if(this.settingType==this.GENERAL_TYPE){
this.settingType=this.NUMBER_TYPE;
}
this.resultType=this.NUMBER_TYPE;
_21=this.formulaResult;
}
}
if(this.resultType!=this.ERROR_TYPE){
_21=this.formulaResult;
}
if(this.formulaResult==undefined){
if(_20.match(/^"(.+)"$/)){
this.resultType=this.STRING_TYPE;
this.formulaResult=0;
_21=RegExp.$1;
}else{
this.resultType=this.ERROR_TYPE;
this.formulaResult=0;
_21="#!VALUE?";
}
}
}
}
catch(ex){
switch(ex){
case formula.TOO_MANY_PARAMETERS:
case formula.BAD_NR_PARAMETERS:
case formula.NOT_ENOUGH_PARAMETERS:
this.resultType=this.ERROR_TYPE;
_21="#!BADPARAMS?";
break;
case formula.NOT_IMPLEMENTED:
_21="#!NOTIMPLEMENTED?";
this.resultType=this.ERROR_TYPE;
break;
case formula.NUM_ERROR:
_21="#NUM!";
this.resultType=this.ERROR_TYPE;
break;
default:
_21="#!NAME?::"+(DEBUG_MESSAGES?ex:"");
this.resultType=this.ERROR_TYPE;
}
}
}else{
this.resultType=this.ERROR_TYPE;
this.formulaResult=0;
_21=_20;
}
}else{
if(_20.charAt(0)=="'"){
this.resultType=this.STRING_TYPE;
this.formulaResult=this.formula.slice(1);
_21=_20.slice(1);
}else{
if(isNaN(_20*1)){
workingTextNoBrace=_20.replace(/\((.*)\)/g,"-$1");
if(!isNaN(workingTextNoBrace*1)){
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(workingTextNoBrace);
}else{
if(workingTextNoBrace.match(/^\s*(-)?\+?\s*\$\s*(-)?\+?\s*([0-9]+((\.[0-9]*)?)|[0-9]{0,}((\.[0-9]+)))\s*$/)){
var _24="";
if(RegExp.$1||RegExp.$2){
_24="-";
}
var _25=0;
if(RegExp.$4||RegExp.$6){
_25=2;
}
_20=workingTextNoBrace.replace(/^\s*-?\+?\s*\$\s*-?\+?\s*([0-9]+(\.[0-9]*)?|[0-9]{0,}\.[0-9]+)\s*$/,_24+"$1");
this.formula=_20;
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20);
if((this.settingType!=this.CURRENCY_TYPE)&&this.autoTyped){
this.setTypeCurrency(null,this.NEGATIVE_STYLE_HIGHLIGHT,_25,true);
}
}else{
if(workingTextNoBrace.match(/^\s*(-)?\+?\s*([0-9]+((\.[0-9]*)?)|[0-9]{0,}((\.[0-9]+)))\s*\%\s*$/)){
var _24="";
if(RegExp.$1){
_24="-";
}
var _25=0;
if(RegExp.$3||RegExp.$5){
_25=2;
}
_20=workingTextNoBrace.replace(/^\s*-?\+?\s*([0-9]+(\.[0-9]*)?|[0-9]{0,}(\.[0-9]+))\s*\%\s*$/,_24+"$1");
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20)/100;
this.formula=parseFloat(_20)+"%";
if((this.settingType!=this.PERCENTAGE_TYPE)&&this.autoTyped){
this.setTypePercentage(_25,true);
}
}else{
if(workingTextNoBrace.match(/^\s*(-)?\+?\s*\%\s*(-)?\+?\s*([0-9]+((\.[0-9]*)?)|[0-9]{0,}((\.[0-9]+)))\s*$/)){
var _24="";
if(RegExp.$1||RegExp.$2){
_24="-";
}
var _25=0;
if(RegExp.$4||RegExp.$6){
_25=2;
}
_20=workingTextNoBrace.replace(/^\s*-?\+?\s*\%\s*-?\+?\s*([0-9]+(\.[0-9]*)?|[0-9]{0,}(\.[0-9]+))\s*$/,_24+"$1");
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20)/100;
this.formula=parseFloat(_20)+"%";
if((this.settingType!=this.PERCENTAGE_TYPE)&&this.autoTyped){
this.setTypePercentage(_25,true);
}
}else{
if(workingTextNoBrace.match(/^\s*(-?\+?\s*[0-9,]*,[0-9]{3,}(\.[0-9]*)?)\s*$/)){
var _25=0;
if(RegExp.$2){
_25=2;
}
_20=workingTextNoBrace.replace(/,/g,"");
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20);
this.formula=parseFloat(_20).toString();
if((this.settingType!=this.NUMBER_TYPE)&&this.autoTyped){
this.setTypeNumber(null,_25,"null",true);
}
}else{
if(workingTextNoBrace.match(/^(TRUE|FALSE)/i)){
if(RegExp.$1.toLowerCase()=="true"){
this.formula="TRUE";
this.formulaResult=true;
}else{
this.formula="FALSE";
this.formulaResult=false;
}
this.resultType=this.BOOLEAN_TYPE;
this.setTypeBoolean(this.BOOLEAN_TYPE);
}else{
var _26=checkDate(_20);
if(_26){
this.resultType=this.NUMBER_TYPE;
this.formulaResult=_26.serial;
if((this.settingType!=this.TIME_TYPE)&&this.autoTyped){
this.setTypeTime(_26.format,null,true);
}
}else{
var buf=_20.replace(/-\s*-/g,"+");
buf=buf.replace(/(\s*\+\s*){1,}/g,"+");
buf=buf.replace(/\+\s*-/g,"-");
if(isNaN(buf*1)){
this.resultType=this.STRING_TYPE;
this.formulaResult=this.formula;
this.settingType=this.STRING_TYPE;
}else{
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(buf);
if(!this.formulaResult){
this.formulaResult=0;
}
_20=buf;
}
}
}
}
}
}
}
}
}else{
switch(this.settingType){
case this.GENERAL_TYPE:
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20);
this.settingType=this.NUMBER_TYPE;
break;
case this.CURRENCY_TYPE:
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20);
break;
case this.NUMBER_TYPE:
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20);
break;
case this.ACCOUNTING_TYPE:
break;
case this.PERCENTAGE_TYPE:
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20);
this.formula=(parseFloat(_20)*100)+"%";
break;
case this.STRING_TYPE:
this.resultType=this.NUMBER_TYPE;
this.formulaResult=parseFloat(_20);
this.settingType=this.NUMBER_TYPE;
break;
case this.TIME_TYPE:
this.resultType=this.TIME_TYPE;
this.formulaResult=parseFloat(_20);
break;
case this.DATE_TYPE:
break;
case this.ERROR_TYPE:
break;
case this.BOOLEAN_TYPE:
break;
}
}
_21=_20;
}
}
this.setContent(_21);
this.autoFormat(this.resultType);
}
catch(ex){
jsExDebug("cell_evaluate",ex);
}
}
function cell_autoFormat(_28){
try{
if(!arguments.length){
this.settingFormat=this.resultType;
}else{
this.settingFormat=_28;
}
switch(this.settingFormat){
case this.NUMBER_TYPE:
this.formatNumber();
break;
case this.BOOLEAN_TYPE:
this.formatBoolean();
break;
case this.ERROR_TYPE:
this.formatError();
break;
case this.CURRENCY_TYPE:
this.formatNumber();
break;
case this.TIME_TYPE:
this.formatNumber();
break;
case this.PERCENTAGE_TYPE:
this.formatNumber();
break;
case this.GENERAL_TYPE:
case this.STRING_TYPE:
default:
this.formatText();
break;
}
}
catch(ex){
jsExDebug("cell_autoFormat",ex);
}
}
function cell_formatBoolean(){
try{
if(this.settingAutoAlign){
this.setStyle(this.style.ALIGN_CENTRE,true);
}
if(this.formulaResult){
this.setContent("TRUE");
}else{
this.setContent("FALSE");
}
}
catch(ex){
jsExDebug("cell_formatBoolean",ex);
}
}
function cell_formatNumber(){
try{
var me=this;
if(this.settingAutoAlign){
this.setStyle(this.style.ALIGN_RIGHT,true);
}
switch(this.settingType){
case this.ACCOUNTING_TYPE:
if(this.preContentElement&&!this.preContentAttached){
this.createPreContent(this.preContent);
}
this.setStyle(this.style.ALIGN_RIGHT,true);
if(this.settingSeparator){
this.setContent(this.precedingSymbol+Math.addSeparators(Math.roundPlaces(this.formulaResult,this.nrDecimalPlaces))+this.procedingSymbol);
}else{
this.setContent(this.precedingSymbol+Math.roundPlaces(this.formulaResult,this.nrDecimalPlaces)+this.procedingSymbol);
}
break;
case this.PERCENTAGE_TYPE:
if(this.settingSeparator){
this.setContent(this.precedingSymbol+Math.addSeparators(Math.roundPlaces(this.formulaResult*100,this.nrDecimalPlaces))+this.procedingSymbol);
}else{
this.setContent(this.precedingSymbol+Math.roundPlaces(this.formulaResult*100,this.nrDecimalPlaces)+this.procedingSymbol);
}
break;
case this.CURRENCY_TYPE:
if(this.formulaResult<0){
if(this.settingSeparator){
this.setContent("-"+this.precedingSymbol+Math.addSeparators(Math.roundPlaces(Math.abs(this.formulaResult),this.nrDecimalPlaces))+this.procedingSymbol);
}else{
this.setContent("-"+this.precedingSymbol+Math.roundPlaces(Math.abs(this.formulaResult),this.nrDecimalPlaces)+this.procedingSymbol);
}
}else{
if(this.settingSeparator){
this.setContent(this.precedingSymbol+Math.addSeparators(Math.roundPlaces(this.formulaResult,this.nrDecimalPlaces))+this.procedingSymbol);
}else{
this.setContent(this.precedingSymbol+Math.roundPlaces(this.formulaResult,this.nrDecimalPlaces)+this.procedingSymbol);
}
}
break;
case this.TIME_TYPE:
var _2a=formatDateString(this.formulaResult,this.dateformat);
if(!this.hasSupports){
}
this.setContent(_2a);
break;
case this.BOOLEAN_TYPE:
this.formatBoolean();
break;
default:
if(this.settingSeparator){
this.setContent(this.precedingSymbol+Math.addSeparators(Math.roundPlaces(this.formulaResult,this.nrDecimalPlaces))+this.procedingSymbol);
}else{
this.setContent(this.precedingSymbol+Math.roundPlaces(this.formulaResult,this.nrDecimalPlaces)+this.procedingSymbol);
}
break;
}
if(this.treatNegatives&&this.formulaResult<0){
if(this.treatNegatives&this.NEGATIVE_STYLE_HIGHLIGHT){
this.setContent("<font color='red'>"+this.content+"</font>");
}
if(this.treatNegatives&this.NEGATIVE_STYLE_BRACE){
this.setContent("("+this.content+")");
}
if(this.treatNegatives&this.NEGATIVE_STYLE_NOSYMBOL){
this.setContent(this.content.replace(/-/,""));
}
}
}
catch(ex){
jsExDebug("cell_formatNumber",ex);
}
}
function cell_formatText(){
try{
if(this.settingAutoAlign){
this.setStyle(this.style.ALIGN_LEFT,true);
}
}
catch(ex){
jsExDebug("cell_formatText",ex);
}
}
function cell_formatError(){
try{
this.setStyle(this.style.ALIGN_CENTRE,true);
}
catch(ex){
jsExDebug("cell_formatError",ex);
}
}
function cell_formatOfficeValue(){
try{
return (!this.formula.length||this.formula==" "||this.formula==undefined||this.formula==null)?this.content:this.formulaResult;
}
catch(ex){
jsExDebug("cell_formatOfficeValue",ex);
}
}
function cell_setPosition(x,y,_2d){
try{
this.x=x;
this.y=y;
this.sheet=_2d;
this.alphaX=numericToAlpha(x);
this.alphaId=(this.alphaX+y);
}
catch(ex){
jsExDebug("cell_setPosition",ex);
}
}
function cell_setType(_2e,_2f){
try{
switch(_2e){
case this.GENERAL_TYPE:
this.setTypeGeneral.apply(this,_2f);
break;
case this.CURRENCY_TYPE:
this.setTypeCurrency.apply(this,_2f);
break;
case this.NUMBER_TYPE:
this.setTypeNumber.apply(this,_2f);
break;
case this.ACCOUNTING_TYPE:
this.setTypeAccounting.apply(this,_2f);
break;
case this.PERCENTAGE_TYPE:
this.setTypePercentage.apply(this,_2f);
break;
case this.TIME_TYPE:
this.setTypeTime.apply(this,_2f);
break;
case this.BOOLEAN_TYPE:
this.setTypeBoolean.apply(this);
break;
}
}
catch(ex){
jsExDebug("cell_setType",ex);
}
}
function cell_setTypeGeneral(_30){
try{
if(this.settingType==this.PERCENTAGE_TYPE){
var _31=this.formula.replace(/\%/,"");
if(_31!==this.formula){
this.setFormula((_31/100).toString());
}
}
this.treatNegatives=null;
this.settingSeparator=false;
this.precedingSymbol="";
this.procedingSymbol="";
this.nrDecimalPlaces=-1;
this.settingType=this.GENERAL_TYPE;
this.autoTyped=_30;
}
catch(ex){
jsExDebug("cell_setTypeGeneral",ex);
}
}
function cell_setTypeBoolean(_32){
try{
this.settingSeparator=false;
this.treatNegatives=null;
this.precedingSymbol="";
this.procedingSymbol="";
this.nrDecimalPlaces=-1;
this.settingType=this.BOOLEAN_TYPE;
this.autoTyped=_32;
}
catch(ex){
jsExDebug("cell_setTypeBoolean",ex);
}
}
function cell_setTypeNumber(_33,_34,_35,_36){
try{
if(_35==null){
_35=",";
}
if(_34==null){
_34=2;
}
this.settingSeparator=_35;
this.treatNegatives=_33;
this.precedingSymbol="";
this.procedingSymbol="";
this.nrDecimalPlaces=_34;
this.settingType=this.NUMBER_TYPE;
this.autoTyped=_36;
}
catch(ex){
jsExDebug("cell_setTypeNumber",ex);
}
}
function cell_setTypeTime(_37,_38,_39){
try{
if(!_37){
_37="yyyy-mm-dd";
}
this.dateformat=_37;
this.settingSeparator=null;
this.treatNegatives=null;
this.precedingSymbol="";
this.procedingSymbol="";
this.nrDecimalPlaces=0;
this.settingType=this.TIME_TYPE;
this.autoTyped=_39;
}
catch(ex){
jsExDebug("cell_setTypeTime",ex);
}
}
function cell_setTypePercentage(_3a,_3b){
try{
this.treatNegatives=null;
this.settingSeparator=0;
this.precedingSymbol="";
this.procedingSymbol="%";
this.nrDecimalPlaces=(parseInt(_3a))?parseInt(_3a):0;
if(!this.hasSupports&&(this.settingType==this.NUMBER_TYPE)){
this.formula=(this.formulaResult*100)+"%";
}
this.settingType=this.PERCENTAGE_TYPE;
this.autoTyped=_3b;
}
catch(ex){
jsExDebug("cell_setTypeNumber",ex);
}
}
function cell_setTypeCurrency(_3c,_3d,_3e,_3f){
try{
if(!_3c){
_3c="$";
}
if(arguments.length<3){
_3e=2;
}
this.settingSeparator=1;
this.treatNegatives=_3d;
this.precedingSymbol=_3c;
this.procedingSymbol="";
this.nrDecimalPlaces=_3e;
this.settingType=this.CURRENCY_TYPE;
if(!this.hasSupports){
}
this.autoTyped=_3f;
}
catch(ex){
jsExDebug("cell_setTypeCurrency",ex);
}
}
function cell_setTypeAccounting(_40,_41,_42,_43){
try{
if(!_40){
_40="$";
}
if(arguments.length<3){
_42=2;
}
this.treatNegatives=_41;
this.settingSeparator=1;
this.nrDecimalPlaces=_42;
this.precedingSymbol=_40;
this.procedingSymbol="";
this.settingType=this.ACCOUNTING_TYPE;
this.autoTyped=_43;
}
catch(ex){
jsExDebug("cell_setTypeAccounting",ex);
}
}
function cell_increaseDecimalPlace(){
try{
if(this.content&&this.content*1){
var _44=this.content.indexOf(".");
if(_44>0){
this.nrDecimalPlaces=this.content.length-_44-1;
}
}
this.nrDecimalPlaces++;
if(this.nrDecimalPlaces==0){
this.nrDecimalPlaces=1;
}
}
catch(ex){
jsExDebug("cell_addDecimalPlace",ex);
}
}
function cell_decreaseDecimalPlace(){
try{
if(this.content&&this.content*1){
var _45=this.content.indexOf(".");
if(_45>0){
this.nrDecimalPlaces=this.content.length-_45-1;
}
}
this.nrDecimalPlaces--;
if(this.nrDecimalPlaces<0){
this.nrDecimalPlaces=0;
}
}
catch(ex){
jsExDebug("cell_decreaseDecimalPlace",ex);
}
}
function cell_adjustReferences(x,y){
try{
var _48=this.formula+" ";
if(_48.charAt(0)!="="){
return;
}
var _49=this.removeQuotedText(_48);
var _4a=_49.text.replace(/([A-Z_0-9]+[.!])?(\$)?([A-Z]+)(\$)?([0-9]+)/gi,function($1,$2,$3,$4,$5,$6){
var _51=($3?$3:"");
var _52=($5?$5:"");
var col=$4;
if(!_51||_51!="$"){
col=numericToAlpha(alphaToNumeric(col)+x);
}
var row=$6;
if(!_52||_52!="$"){
row=parseInt(row)+y;
}
if($2){
var _55=$2;
}else{
var _55="";
}
return _55+_51+col+_52+row;
});
this.formula=this.replaceQuotedText(_4a,_49.textArray);
}
catch(ex){
jsExDebug("cell_adjustReferences",ex);
}
}
function cell_adjustReferencesAbove(x,y,_58,_59){
try{
var _5a=this.formula+" ";
if(_5a.charAt(0)!="="){
return;
}
var _5b=this.removeQuotedText(_5a);
var _5c=_5b.text.replace(/([A-Z_0-9]+[.!])?(\$)?([A-Z]+)(\$)?([0-9]+)/gi,function($1,$2,$3,$4,$5,$6){
var _63=($3?$3:"");
var _64=($5?$5:"");
var col=$4;
_58=(_58?_58:col);
if(!_63||_63=="$"){
if(alphaToNumeric(col)>=_58){
col=numericToAlpha(alphaToNumeric(col)+x);
}
}
var row=$6;
_59=(_59?_59:row);
if(!_64||_64=="$"){
if(row>=_59){
row=parseInt(row)+y;
}
}
if($2){
var _67=$2;
}else{
var _67="";
}
return _67+_63+col+_64+row;
});
this.formula=this.replaceQuotedText(_5c,_5b.textArray);
}
catch(ex){
jsExDebug("cell_adjustReferencesAbove",ex);
}
}
function cell_adjustReferencesOutsideInvalid(x,y,_6a,_6b,_6c,_6d){
try{
_6a=(_6a?_6a:0);
_6c=(_6c?_6c:0);
var _6e=this.formula+" ";
if(_6e.charAt(0)!="="){
return;
}
var _6f=this.removeQuotedText(_6e);
var _70=_6f.text.replace(/([A-Z_0-9]+[.!])?(\$)?([A-Z]+)(\$)?([0-9]+)/gi,function($1,$2,$3,$4,$5,$6){
var _77=($3?$3:"");
var _78=($5?$5:"");
var col=$4;
if(!_77||_77=="$"){
var _7a=parseInt(alphaToNumeric(col));
if(_7a<_6a||_7a>_6b){
col=numericToAlpha(_7a+x);
}else{
return "#REF!";
}
}
var row=parseInt($6);
if(!_78||_78=="$"){
if(row<_6c||row>_6d){
row=parseInt(row)+y;
}else{
return "#REF!";
}
}
if($2){
var _7c=$2;
}else{
var _7c="";
}
return _7c+_77+col+_78+row;
});
this.formula=this.replaceQuotedText(_70,_6f.textArray);
}
catch(ex){
jsExDebug("cell_adjustReferencesOutsideInvalid",ex);
}
}
function cell_shiftReferences(x,y,_7f,_80,_81,_82){
try{
jsDebug("shift references called, still requires porting, s: cell_shiftReferences");
var _83=this.originalUserText;
_83=_83.replace(/([A-Z]+)([0-9]+)/gi,function($1,$2,$3){
var col=parseInt(alphaToNumeric($2));
if((!_7f||col>=_7f)&&(!_80||col<_80)){
col+=x;
}else{
jsDebug("Shift refrences: "+col+":"+_7f);
}
var row=parseInt($3);
if((!_81||row>_81)&&(!_82||row<_82)){
row+=y;
}
return numericToAlpha(col)+row;
});
this.originalUserText=_83;
}
catch(ex){
jsExDebug("cell_shiftReferences",ex);
}
}
function cell_replaceFormula(_89){
try{
if(_89.match(/^\s*=/)){
_89=_89.replace(/(\w+)(\()/g,function($1,$2,$3){
var _8d=$2.toUpperCase();
_8d=_8d.replace(/[0-9]/g,function($0){
switch($0){
case "0":
return "zero";
case "1":
return "one";
case "2":
return "two";
case "3":
return "three";
case "4":
return "four";
case "5":
return "five";
case "6":
return "six";
case "7":
return "seven";
case "8":
return "eight";
case "9":
return "nine";
}
});
return "formula."+_8d+$3;
});
}
return _89;
}
catch(ex){
jsExDebug("cell_replaceFormula, ",ex);
}
}
function cell_expandRanges(_8f){
try{
var _90=this.removeQuotedText(_8f);
_8f=_90.text;
while(_8f.match(/([A-Z_0-9]+[.!])?\$?([A-Z]+)\$?([0-9]+)\s?:\s?([A-Z_0-9]+[.!])?\$?([A-Z]+)\$?([0-9]+)/i)){
var _91="";
var _92=(parseInt(RegExp.$3)<parseInt(RegExp.$6))?parseInt(RegExp.$3):parseInt(RegExp.$6);
var _93=(parseInt(RegExp.$3)<parseInt(RegExp.$6))?parseInt(RegExp.$6):parseInt(RegExp.$3);
var _94=alphaToNumeric(RegExp.$5);
var _95=alphaToNumeric(RegExp.$2);
var _96=(_94<_95)?_94:_95;
var _97=(_94<_95)?_95:_94;
var _98=(RegExp.$1).substring(0,(RegExp.$1).length-1);
var _99=(RegExp.$4).substring(0,(RegExp.$4).length-1);
var _9a="";
if(_98){
_9a=_98+".";
}else{
if(_99){
_9a=_99+".";
}
}
if(_98&&_99&&(_98!=_99)){
this.setError("#VALUE!");
return "";
}
for(var _9b=_92;_9b<=_93;_9b++){
for(var _9c=_96;_9c<=_97;_9c++){
_91+=_9a+numericToAlpha(_9c)+_9b+",";
}
}
_91=_91.substr(0,_91.length-1);
_8f=_8f.replace(/([A-Z_0-9]+[.!])?\$?[A-Z]+\$?[0-9]+\s?:\s?([A-Z_0-9]+[.!])?\$?[A-Z]+\$?[0-9]+/i,_91);
}
return this.replaceQuotedText(_8f,_90.textArray);
}
catch(ex){
jsExDebug("cell_expandRanges",ex);
}
}
function cell_getFormulaResult(){
try{
if(!this.evaluated){
this.evaluate();
}
switch(this.resultType){
case this.BOOLEAN_TYPE:
if(this.formulaResult){
return 1;
}
return 0;
case this.NUMBER_TYPE:
return this.formulaResult;
case this.ERROR_TYPE:
return 0;
case this.STRING_TYPE:
return "\""+this.formulaResult+"\"";
case this.GENERAL_TYPE:
return 0;
case this.TIME_TYPE:
return this.formulaResult;
default:
return 0;
}
}
catch(ex){
jsExDebug("cell_getFormulaResult",ex);
}
}
function cell_replaceReferences(_9d){
function getCell(_9e){
try{
if(!this.cell){
this.cell=_9e.getCell(this.row,this.column,this.sheet);
}
return this.cell;
}
catch(ex){
jsExDebug("cell_replaceReferences:getCell",ex);
}
}
function getValue(_9f){
try{
if(!this.cell){
this.cell=_9f.getCell(this.row,this.column,this.sheet);
}
if(this.cell==null){
return 0;
}
if(this.cell.formulaResult==null){
return 0;
}else{
return this.cell.formulaResult;
}
}
catch(ex){
jsExDebug("cell_replaceReferences:getValue",ex);
}
}
function isBlank(_a0){
try{
if(!this.cell){
this.cell=_a0.getCell(this.row,this.column,this.sheet);
}
if(this.cell==null){
return 1;
}else{
if(this.cell.getFormulaResult()==0&&this.cell.getContent().toString().length==0){
return 1;
}
}
return 0;
}
catch(ex){
jsExDebug("cell_replaceReferences:isBlank",ex);
}
}
function toNumberTrap(_a1){
return "function ()\t\t\t\t{\t\t\t\t\ttry {\t\t\t\t\t\treturn 3;\t\t\t\t\t} catch ( ex ) {\t\t\t\t\t\tjsExDebug( 'cell_replaceReferences:isBlank', ex );\t\t\t\t\t}\t\t\t\t}";
}
function toStringTrap(_a2){
return "function ()\t\t\t\t{\t\t\t\t\ttry {\t\t\t\t\t\treturn "+_a2+";\t\t\t\t\t} catch ( ex ) {\t\t\t\t\t\tjsExDebug( 'cell_replaceReferences:isBlank', ex );\t\t\t\t\t}\t\t\t\t}";
}
try{
_9d+=" ";
var me=this;
if(_9d.match(/\#REF\!/)){
return "=#REF!";
}
var _a4=this.removeQuotedText(_9d);
_9d=_a4.text;
_9d=_9d.replace(/\s*((?:\.[A-Z0-9]+\()|(?:\,))?\s*(?!")\s*(([A-Z_0-9]+)[!.])?\$?([A-Z]{1,2})\$?([0-9]+)\s*(?!")\s*/ig,function($0,$1,$2,$3,$4,$5,$6,$7,$8,$9){
var _af=me.sheet;
if($3){
_af=me.spreadsheet.getDimensionIndex($3);
}
if($1){
var _b0=me.spreadsheet.getCell(parseInt($5),alphaToNumeric($4),_af);
if(_b0){
var _b1=parseFloat(_b0.getFormulaResult());
}else{
var _b1=0;
}
var _b2="{ sheet: "+_af+", row: "+$5+", column: "+alphaToNumeric($4)+", toString:"+toStringTrap(_b1)+", toNumber:"+toNumberTrap(_b1)+", getCell: "+getCell+", getValue: "+getValue+", isBlank: "+isBlank+"}";
return $1+_b2;
}else{
var _b0=me.spreadsheet.getCell(parseInt($5),alphaToNumeric($4),_af);
if(_b0){
var _b1=parseFloat(_b0.getFormulaResult());
return _b0.getFormulaResult();
}else{
return 0;
}
}
});
_9d=this.replaceQuotedText(_9d,_a4.textArray);
return _9d;
}
catch(ex){
jsExDebug("cell_replaceReferences",ex);
}
}
function cell_reset(){
try{
this.settingAutoAlign=true;
this.resultType=this.GENERAL_TYPE;
this.formula="";
this.formulaResult=0;
this.setContent("");
this.style.cleanUp();
this.style=this.spreadsheet.getDefaultCellStyle(this.y,this.x,this.sheet);
this.treatNegatives=null;
this.nrDecimalPlaces=-1;
this.precedingSymbol="";
this.procedingSymbol="";
this.rowSpan=1;
this.colSpan=1;
this.autoTyped=true;
this.settingType=this.GENERAL_TYPE;
this.type=new cellType_t();
}
catch(ex){
jsExDebug("cell_reset",ex);
}
}
function cell_cloneType(_b3){
try{
this.settingType=_b3.settingType;
this.dateformat=_b3.dateformat;
this.settingSeparator=_b3.settingSeparator;
this.treatNegatives=_b3.treatNegatives;
this.precedingSymbol=_b3.precedingSymbol;
this.procedingSymbol=_b3.procedingSymbol;
this.nrDecimalPlaces=_b3.nrDecimalPlaces;
this.settingType=_b3.settingType;
this.preContent=_b3.preContent;
}
catch(ex){
jsExDebug("cell_cloneType",ex);
}
}
function cell_deleteCell(){
try{
this.formula="";
this.formulaResult=null;
this.setContent("");
if(this.buildRelationships()){
this.evaluateDependants(true);
}
}
catch(ex){
jsExDebug("cell_deleteCell",ex);
}
}
function cell_clone(_b4){
try{
if(_b4==null){
this.reset();
return;
}
this.cloneType(_b4);
this.settingAutoAlign=_b4.settingAutoAlign;
this.resultType=_b4.resultType;
this.formula=_b4.formula;
this.style=_b4.style.copy();
if(!_b4.asyncFormulaResult){
this.formulaResult=_b4.formulaResult;
this.setContent(_b4.content);
}
return;
}
catch(ex){
jsExDebug("cell_cloneCell",ex);
}
}
function cell_copy(){
try{
var _b5=new cell_t(this.spreadsheet,this.x,this.y);
_b5.clone(this);
return _b5;
}
catch(ex){
jsExDebug("cell_copy",ex);
}
}
function cell_circularReferenceError(){
try{
this.setContent("#!CIRCREF");
this.resultType=this.ERROR_TYPE;
this.autoFormat(this.resultType);
}
catch(ex){
jsExDebug("cell_circularReferenceError",ex);
}
}
function cell_referenceError(){
try{
this.setContent("#!REF");
this.resultType=this.ERROR_TYPE;
this.autoFormat(this.resultType);
}
catch(ex){
jsExDebug("cell_referenceError",ex);
}
}
function cell_setError(_b6){
try{
this.setContent(_b6);
this.resultType=this.ERROR_TYPE;
this.autoFormat(this.resultType);
}
catch(ex){
jsExDebug("cell_setError",ex);
}
}
function cell_disableAutoAlign(){
try{
this.settingAutoAlign=false;
this.style.autoAlign=false;
}
catch(ex){
jsExDebug("cell_disableAutoAlign",ex);
}
}
function cell_buildRelationships(){
try{
this.clearSupports();
if(this.formula==null){
return false;
}
if(this.formula.match(/^\s*=/)){
var _b7=this.expandRanges(this.formula)+" ";
var _b8=true;
var _b9=this.removeQuotedText(_b7);
_b7=_b9.text;
while(_b7.match(/\s*(([A-Z_0-9]+)[!.])?\$?([A-Z]{1,2})\$?([0-9]+)[^(0-9]\s*/i)){
var _ba=this.sheet;
this.hasSupports=true;
if(RegExp.$2){
var _ba=this.spreadsheet.getDimensionIndex(RegExp.$2);
if(typeof _ba=="undefined"){
this.referenceError();
return false;
}
}
this.spreadsheet.cellChain.addDependant(this.sheet+"."+this.alphaId,_ba+"."+RegExp.$3+RegExp.$4);
if(_b8){
_b8=false;
var _bb=this.spreadsheet.getCellByName(RegExp.$3+RegExp.$4,_ba);
if(_bb&&(_bb.settingType!=this.GENERAL_TYPE)&&(this.settingType==this.GENERAL_TYPE)){
this.cloneType(_bb);
}
}
_b7=_b7.replace(/\s*(([A-Z_0-9]+)[!.])?\$?([A-Z]{1,2})\$?([0-9]+)([^(0-9])\s*/i,"");
}
}
return true;
}
catch(ex){
jsExDebug("cell_buildRelationships",ex);
}
}
function cell_removeQuotedText(_bc){
try{
var _bd=_bc;
var _be=[];
var _bf=_bd.match(/('|")(\s*\w*\s*)('|")/);
var _c0=null;
var _c1=1;
var _c2=null;
var _c3=null;
while(_bf){
_bf=_bf[0].replace(/('|")(\s*\w*\s*)('|")/,"$2");
_c2="q"+numericToAlpha(_c1);
_c1++;
_c3=new RegExp(_c2);
while(_bd.match(_c3)){
_c2="q"+numericToAlpha(_c1);
_c1++;
_c3=new RegExp(_c2);
}
_be[_c2]=_bf;
_c0=new RegExp(_bf);
_bc=_bc.replace(_c0,_c2);
_c0=new RegExp("('|\")"+_bf+"('|\")");
_bd=_bd.replace(_c0,"");
_bf=_bd.match(/('|")(\s*\w*\s*)('|")/);
}
return {text:_bc,textArray:_be};
}
catch(ex){
jsExDebug("cell_substituteQuotedText",ex);
}
}
function cell_replaceQuotedText(_c4,_c5){
try{
for(var _c6 in _c5){
if(_c5[_c6]){
hashRegex=new RegExp(_c6);
_c4=_c4.replace(hashRegex,_c5[_c6]);
}
}
return _c4;
}
catch(ex){
jsExDebug("cell_replaceQuotedText",ex);
}
}
function cell_evaluateDependants(_c7){
try{
var _c8=this.spreadsheet.cellChain.getDependantChain(this.sheet+"."+this.alphaId);
if(_c8==null){
if(!_c7){
this.circularReferenceError();
}
return;
}
for(var i=1;i<_c8.length;i++){
if(_c8[i]){
_c8[i].match(/([0-9]+)\.([A-Z0-9]+)/i);
var _ca=RegExp.$1;
var _cb=RegExp.$2;
var _cc=this.spreadsheet.getCellByName(_c8[i],_ca);
if(_cc){
_cc.evaluate();
}
}
}
}
catch(ex){
jsExDebug("cell_evaluateDependants "+this.alphaId,ex);
}
}
function cell_clearSupports(){
try{
this.hasSupports=false;
this.spreadsheet.cellChain.clearDependant(this.sheet+"."+this.alphaId);
}
catch(ex){
jsExDebug("cell_clearSupports",ex);
}
}
function cell_getFont(){
try{
return this.style.getFont();
}
catch(ex){
jsExDebug("cell_getFont",ex);
}
}
function cell_getColour(){
try{
return this.style.getColour();
}
catch(ex){
jsExDebug("cell_getColour",ex);
}
}
function cell_getStyle(){
try{
return this.style.get();
}
catch(ex){
jsExDebug("cell_getStyle",ex);
}
}
function cell_setFont(_cd,_ce){
try{
this.style.setFont(_cd,_ce);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y,this.sheet);
}
}
catch(ex){
jsExDebug("cell_setFont",ex);
}
}
function cell_setStyle(_cf,_d0){
try{
this.style.set(_cf,_d0);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y,this.sheet);
}
}
catch(ex){
jsExDebug("cell_setStyle",ex);
}
}
function cell_applyStyles(_d1){
try{
this.style.apply(_d1);
}
catch(ex){
jsExDebug("cell_applyStyles",ex);
}
}
function cell_setColour(_d2,_d3){
try{
this.style.setColour(_d2,_d3);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y,this.sheet);
}
}
catch(ex){
jsExDebug("cell_setColour",ex);
}
}
function cell_toggleStyle(_d4){
try{
this.style.toggle(_d4);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y,this.sheet);
}
}
catch(ex){
jsExDebug("cell_toggleStyle",ex);
}
}
function cell_clearStyle(_d5){
try{
this.style.cleanUp();
this.style=new cellStyles_t();
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y,this.sheet);
}
}
catch(ex){
jsExDebug("cell_clearStyle",ex);
}
}
function cell_copyStyle(_d6){
try{
this.style=_d6.copy();
this.settingAutoAlign=this.style.autoAlign;
}
catch(ex){
jsExDebug("cell_copyStyle",ex);
}
}
function cell_getDataStyle(){
try{
if(this.settingType!=this.ERROR_TYPE){
return new cellDataStyles_t(this);
}else{
return null;
}
}
catch(ex){
jsExDebug("cell_getDataStyle",ex);
}
}
function cell_setFormatFromDataStyle(_d7){
try{
if(!_d7){
return;
}
this.treatNegatives=_d7.treatNegatives;
this.nrDecimalPlaces=parseInt(_d7.nrDecimalPlaces);
this.precedingSymbol=_d7.precedingSymbol;
this.procedingSymbol=_d7.procedingSymbol;
this.settingSeparator=(_d7.useSeparator?true:false);
this.dateformat=_d7.getTimeFormatString();
}
catch(ex){
jsExDebug("cell_setFormatFromDataStyle",ex);
}
}
function cell_asyncFormulaResultCallback(_d8,_d9){
try{
this.formulaResult=_d9;
var _da="";
switch(_d8.settingType){
case _d8.NUMBER_TYPE:
this.resultType=this.NUMBER_TYPE;
break;
case _d8.BOOLEAN_TYPE:
this.resultType=this.BOOLEAN_TYPE;
break;
case _d8.CURRENCY_TYPE:
this.resultType=this.CURRENCY_TYPE;
break;
case _d8.ACCOUNTING_TYPE:
this.resultType=this.ACCOUNTING_TYPE;
break;
case _d8.DATE_TYPE:
this.resultType=this.TIME_TYPE;
break;
case _d8.TIME_TYPE:
this.resultType=this.TIME_TYPE;
break;
case _d8.PERCENTAGE_TYPE:
this.resultType=this.PERCENTAGE_TYPE;
break;
case _d8.BOOLEAN_TYPE:
this.resultType=this.BOOLEAN_TYPE;
break;
case _d8.STRING_TYPE:
this.resultType=this.STRING_TYPE;
break;
default:
if(isNaN(this.formulaResult*1)){
this.resultType=this.STRING_TYPE;
_da=this.formulaResult;
this.formulaResult=this.formulaResult;
}else{
if(this.settingType==this.GENERAL_TYPE){
this.settingType=this.NUMBER_TYPE;
}
this.resultType=this.NUMBER_TYPE;
_da=this.formulaResult;
}
}
if(this.resultType!=this.ERROR_TYPE){
_da=(this.formulaResult?this.formulaResult:"");
}
this.setContent(_da);
this.autoFormat(this.resultType);
}
catch(ex){
jsExDebug("cell_asyncFormulaResultCallback",ex);
}
}
function cell_debugCell(_db){
try{
if(this.alphaId==_db&&DEBUG_MESSAGES){
}
}
catch(ex){
jsExDebug("cell_debugCell",ex);
}
}

try{
spreadsheet_t.prototype=new peepelObject_t();
spreadsheet_t.prototype.constructor=spreadsheet_t;
spreadsheet_t.prototype.cleanUp=spreadsheet_cleanUp;
spreadsheet_t.prototype.spreadsheet_super=peepelObject_t.prototype.constructor;
spreadsheet_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
spreadsheet_t.prototype.cellExists=spreadsheet_cellExists;
spreadsheet_t.prototype.createCell=spreadsheet_createCell;
spreadsheet_t.prototype.resetCell=spreadsheet_resetCell;
spreadsheet_t.prototype.setDisplayModule=spreadsheet_setDisplayModule;
spreadsheet_t.prototype.addDimension=spreadsheet_addDimension;
spreadsheet_t.prototype.setDimensionName=spreadsheet_setDimensionName;
spreadsheet_t.prototype.getDimensionIndex=spreadsheet_getDimensionIndex;
spreadsheet_t.prototype.checkSheet=spreadsheet_checkSheet;
spreadsheet_t.prototype.sheetExists=spreadsheet_sheetExists;
spreadsheet_t.prototype.clearDimensions=spreadsheet_clearDimensions;
spreadsheet_t.prototype.reEvaluate=spreadsheet_reEvaluate;
spreadsheet_t.prototype.insertDataRows=spreadsheet_insertDataRows;
spreadsheet_t.prototype.insertDataCols=spreadsheet_insertDataCols;
spreadsheet_t.prototype.deleteDataRows=spreadsheet_deleteDataRows;
spreadsheet_t.prototype.deleteDataCols=spreadsheet_deleteDataCols;
spreadsheet_t.prototype.createColumn=spreadsheet_createColumn;
spreadsheet_t.prototype.createRow=spreadsheet_createRow;
spreadsheet_t.prototype.getColumn=spreadsheet_getColumn;
spreadsheet_t.prototype.getRow=spreadsheet_getRow;
spreadsheet_t.prototype.getDefaultCellStyle=spreadsheet_getDefaultCellStyle;
spreadsheet_t.prototype.onEachCell=spreadsheet_onEachCell;
spreadsheet_t.prototype.setContent=spreadsheet_setContent;
spreadsheet_t.prototype.getContent=spreadsheet_getContent;
spreadsheet_t.prototype.setFormula=spreadsheet_setFormula;
spreadsheet_t.prototype.getFormula=spreadsheet_getFormula;
spreadsheet_t.prototype.setFont=spreadsheet_setCellFont;
spreadsheet_t.prototype.getFont=spreadsheet_getCellFont;
spreadsheet_t.prototype.setColour=spreadsheet_setCellColour;
spreadsheet_t.prototype.getColour=spreadsheet_getCellColour;
spreadsheet_t.prototype.setStyle=spreadsheet_setCellStyle;
spreadsheet_t.prototype.getStyle=spreadsheet_getCellStyle;
spreadsheet_t.prototype.setType=spreadsheet_setCellType;
spreadsheet_t.prototype.toggleStyle=spreadsheet_toggleCellStyle;
spreadsheet_t.prototype.clearStyle=spreadsheet_clearStyle;
spreadsheet_t.prototype.applyStyle=spreadsheet_applyCellStyle;
spreadsheet_t.prototype.evaluate=spreadsheet_evaluate;
spreadsheet_t.prototype.getCell=spreadsheet_getCell;
spreadsheet_t.prototype.getCellAt=spreadsheet_getCell;
spreadsheet_t.prototype.getCellByName=spreadsheet_getCellByName;
spreadsheet_t.prototype.disableAutoAlign=spreadsheet_disableAutoAlign;
spreadsheet_t.prototype.decreaseDecimalPlace=spreadsheet_decreaseDecimalPlace;
spreadsheet_t.prototype.increaseDecimalPlace=spreadsheet_increaseDecimalPlace;
spreadsheet_t.prototype.copy=spreadsheet_copy;
spreadsheet_t.prototype.cut=spreadsheet_cut;
spreadsheet_t.prototype.paste=spreadsheet_paste;
spreadsheet_t.prototype.fromXml=spreadsheet_fromXml;
spreadsheet_t.prototype.toXml=spreadsheet_toXml;
spreadsheet_t.prototype.toHtml=spreadsheet_toHtml;
spreadsheet_t.prototype.setRowHeight=spreadsheet_setRowHeight;
spreadsheet_t.prototype.getRowHeight=spreadsheet_getRowHeight;
spreadsheet_t.prototype.setColumnWidth=spreadsheet_setColumnWidth;
spreadsheet_t.prototype.getColumnWidth=spreadsheet_getColumnWidth;
spreadsheet_t.prototype.getColumnEndPosition=spreadsheet_getColumnEndPosition;
spreadsheet_t.prototype.getLastColumnIndex=spreadsheet_getLastColumnIndex;
spreadsheet_t.prototype.getLastRowIndex=spreadsheet_getLastRowIndex;
spreadsheet_t.prototype.getPreviousCellInRow=spreadsheet_getPreviousCellInRow;
spreadsheet_t.prototype.getNextCellInRow=spreadsheet_getNextCellInRow;
spreadsheet_t.prototype.getPreviousCellInColumn=spreadsheet_getPreviousCellInColumn;
spreadsheet_t.prototype.getNextCellInColumn=spreadsheet_getNextCellInColumn;
spreadsheet_t.prototype.autoFormula=spreadsheet_autoFormula;
spreadsheet_t.prototype.getRowStyle=spreadsheet_getRowStyle;
spreadsheet_t.prototype.getColumnStyle=spreadsheet_getColumnStyle;
spreadsheet_t.prototype.notifyContentChange=spreadsheet_notifyContentChange;
spreadsheet_t.prototype.deleteCell=spreadsheet_deleteCell;
spreadsheet_t.prototype.MAX_COLUMN_INDEX=256;
spreadsheet_t.prototype.MAX_ROW_INDEX=65536;
}
catch(ex){
jsExDebug("spreadsheet_t.prototype",ex);
}
function spreadsheet_t(){
try{
this.spreadsheet_super();
this.maxRow=0;
this.defaultStyle=new cellStyles_t();
this.cellArray=new Array();
this.rowStyles=new Array();
this.columnStyles=new Array();
this.settingEvaluate=true;
this.cellChain=new cellChain_t();
this.minSheet=1;
this.maxSheet=1;
this.rowArray=[];
this.columnArray=[];
this.zList=[];
this.zNames=[];
this.highestZListIndex=0;
}
catch(ex){
jsExDebug("spreadsheet_t",ex);
}
}
function spreadsheet_cleanUp(me){
try{
if(!me){
me=this;
}
me.maxRow=null;
me.defaultStyle.cleanUp();
me.defaultStyle=null;
for(var _2=0;_2<=me.maxSheet;_2++){
var _3=me.cellArray[_2];
for(var _4=1;_4<=me.maxRow;_4++){
if(_3[_4]){
var _5=_3[_4];
for(var _6=1;_6<_5.length;_6++){
var _7=_5[_6];
if(_7){
me.cellArray[_2][_4][_6].cleanUp();
}
me.cellArray[_2][_4][_6]=null;
delete me.cellArray[_2][_4][_6];
}
me.cellArray[_2][_4]=null;
delete me.cellArray[_2][_4];
}
}
me.cellArray[_2]=null;
delete me.cellArray[_2];
_3=me.rowStyles[_2];
if(_3){
for(_4=0;_4<me.maxRow;_4++){
if(_3[_4]){
me.rowStyles[_2][_4].cleanUp();
me.rowStyles[_2][_4]=null;
delete me.rowStyles[_2][_4];
}
}
}
me.rowStyles[_2]=null;
delete me.rowStyles[_2];
_3=me.columnStyles[_2];
if(_3){
for(_6=0;_6<_3.length;_4++){
if(_3[_6]){
me.columnStyles[_2][_6].cleanUp();
me.columnStyles[_2][_6]=null;
delete me.columnStyles[_2][_6];
}
}
}
me.columnStyles[_2]=null;
delete me.columnStyles[_2];
_3=me.rowArray[_2];
if(_3){
for(_4=0;_4<me.maxRow;_4++){
if(_3[_4]){
me.rowArray[_2][_4].cleanUp();
me.rowArray[_2][_4]=null;
delete me.rowArray[_2][_4];
}
}
}
_3=me.columnArray[_2];
if(_3){
for(_6=0;_6<_3.length;_6++){
if(_3[_6]){
me.columnArray[_2][_6].cleanUp();
me.columnArray[_2][_6]=null;
delete me.columnArray[_2][_6];
}
}
}
}
me.cellArray=null;
me.rowStyles=null;
me.columnStyles=null;
me.rowArray=null;
me.columnArray=null;
me.cellChain.cleanUp();
me.cellChain=null;
me.settingEvaluate=null;
me.minSheet=null;
me.maxSheet=null;
for(var i=0;i<me.zList.length;i++){
var _9=me.zList[i];
if(_9){
me.zNames[_9]=null;
delete me.zNames[_9];
me.zList[i]=null;
delete me.zList[i];
}
}
me.zList=null;
me.zNames=null;
me.highestZListIndex=null;
me.displayModule=null;
if(me.contentChangeDelegate){
me.contentChangeDelegate.cleanUp();
me.contentChangeDelegate=null;
}
if(me.styleChangeDelegate){
me.styleChangeDelegate.cleanUp();
me.styleChangeDelegate=null;
}
me.selectedCell=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("spreadsheet_cleanUp",ex);
}
}
function spreadsheet_setContent(_a,_b,_c,_d){
try{
var _e=this.createCell(_a,_b,_c);
_e.setContent(_d);
}
catch(ex){
jsExDebug("spreadsheet_setContent",ex);
}
}
function spreadsheet_setFormula(_f,_10,_11,_12){
try{
if(_10==0&&_f==0){
var _13=this.cellArray[_11];
for(var row=1;row<=this.maxRow;row++){
if(_13[row]){
var _15=_13[row];
for(var col=1;col<_15.length;col++){
var _17=_15[col];
if(_17){
_17.setFormula(_12);
if(this.settingEvaluate){
if(_17.buildRelationships()){
_17.evaluate();
_17.evaluateDependants();
}
}
}
}
}
}
return;
}
if(_f==0){
var _13=this.cellArray[_11];
for(var row=1;row<=this.maxRow;row++){
if(_13[row]){
var _15=_13[row];
if(_15[_10]){
var _17=_15[_10];
_17.setFormula(_12);
if(this.settingEvaluate){
if(_17.buildRelationships()){
_17.evaluate();
_17.evaluateDependants();
}
}
}
}
}
return;
}
if(_10==0){
var _13=this.cellArray[_11];
if(_13[_f]){
var _15=_13[_f];
for(var col=1;col<=_15.maxColumn;col++){
if(_15[col]){
var _17=_15[col];
_17.setFormula(_12);
if(this.settingEvaluate){
if(_17.buildRelationships()){
_17.evaluate();
_17.evaluateDependants();
}
}
}
}
}
return;
}
if((_12==""||_12==null)&&!this.cellExists(_f,_10,_11)){
return;
}
var _17=this.createCell(_f,_10,_11);
_17.setFormula(_12);
if(this.settingEvaluate){
if(_17.buildRelationships()){
_17.evaluate();
_17.evaluateDependants();
}
}
}
catch(ex){
jsExDebug("spreadsheet_setFormula",ex);
}
}
function spreadsheet_cellExists(row,_19,_1a){
try{
if(!this.cellArray[_1a]||!this.cellArray[_1a][row]||!this.cellArray[_1a][row][_19]){
return false;
}
return true;
}
catch(ex){
jsExDebug("spreadsheet_cellExists",ex);
}
}
function spreadsheet_setDisplayModule(_1b){
try{
this.displayModule=_1b;
}
catch(ex){
jsExDebug("spreadsheet_setDisplayModule",ex);
}
}
function spreadsheet_addDimension(_1c,_1d){
try{
if(_1c==null){
var _1c=this.zList.length;
}else{
_1c=Math.abs(_1c);
}
if(_1c>this.highestZListIndex){
this.highestZListIndex=_1c;
}
if(!_1d){
var _1d="Sheet"+_1c;
}else{
_1d=_1d.replace(/[^A-Z_0-9]/ig,"");
}
if(this.zList[_1c]){
for(var i=this.highestZListIndex;i>=_1c;i--){
if(this.zList[i]){
this.zList[i+1]=this.zList[i];
this.zList[i]=null;
}
}
this.highestZListIndex++;
}
this.zList[_1c]=_1d;
this.zNames[_1d]=this.zList[_1c];
}
catch(ex){
jsExDebug("spreadsheet_addDimension",ex);
}
}
function spreadsheet_setDimensionName(_1f,_20){
try{
if(!this.zList[_1f]){
return false;
}
_20=_20.replace(/[^A-Z_0-9]/ig,"");
this.zList[_1f]=_20;
return true;
}
catch(ex){
jsExDebug("spreadsheet_setDimensionName",ex);
}
}
function spreadsheet_getDimensionIndex(_21){
try{
for(var i=0;i<this.zList.length;i++){
if(this.zList[i]&&this.zList[i]==_21){
return i;
}
}
}
catch(ex){
jsExDebug("spreadsheet_getDimensionIndex",ex);
}
}
function spreadsheet_getContent(row,_24,_25){
try{
if(_24==0){
if(row==0){
return "";
}
return row.toString();
}
if(row==0){
return numericToAlpha(_24);
}
var _26=this.cellArray[_25];
if(_26&&_26[row]&&_26[row][_24]){
return _26[row][_24].getContent();
}
return "";
}
catch(ex){
jsExDebug("spreadsheet_getContent",ex);
}
}
function spreadsheet_getFormula(row,_28,_29){
try{
if(_28==0){
if(row==0){
return "";
}
return row.toString();
}
if(row==0){
return numericToAlpha(_28);
}
if(this.cellArray[_29]&&this.cellArray[_29][row]&&this.cellArray[_29][row][_28]){
return this.cellArray[_29][row][_28].getFormula();
}
return "";
}
catch(ex){
jsExDebug("spreadsheet_getFormula",ex);
}
}
function spreadsheet_setCellFont(row,_2b,_2c,_2d,_2e){
try{
var _2f=this.createRow(row,_2c);
if(row==0&&_2b){
this.onEachCell(null,_2b,_2c,"setFont",[_2d,_2e]);
}else{
if(_2b==0&&row){
this.onEachCell(row,null,_2c,"setFont",[_2d,_2e]);
}else{
if(_2b==0&&row==0){
this.onEachCell(null,null,_2c,"setFont",[_2d,_2e]);
}else{
var _30=this.createCell(row,_2b,_2c);
_30.setFont(_2d,_2e);
if(_2e!=null){
_2f.setFontHeight(_2b,parseInt(_2e));
this.displayModule.refreshRowSizes();
}
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_setCellFont",ex);
}
}
function spreadsheet_getCellFont(row,_32,_33){
try{
if(this.cellExists(row,_32,_33)){
var _34=this.createCell(row,_32,_33);
return _34.getFont();
}
return this.defaultStyle.getFont();
}
catch(ex){
jsExDebug("spreadsheet_getCellFont",ex);
}
}
function spreadsheet_setCellColour(row,_36,_37,_38,_39){
try{
if(row==0&&_36){
this.onEachCell(null,_36,_37,"setColour",[_38,_39]);
}else{
if(_36==0&&row){
this.onEachCell(row,null,_37,"setColour",[_38,_39]);
}else{
if(_36==0&&row==0){
this.onEachCell(null,null,_37,"setColour",[_38,_39]);
}else{
var _3a=this.createCell(row,_36,_37);
_3a.setColour(_38,_39);
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_setCellColour",ex);
}
}
function spreadsheet_getCellColour(row,_3c,_3d){
try{
if(this.cellExists(row,_3c,_3d)){
var _3e=this.createCell(row,_3c,_3d);
return _3e.getColour();
}
return this.defaultStyle.getColour();
}
catch(ex){
jsExDebug("spreadsheet_getCellColour",ex);
}
}
function spreadsheet_setCellType(row,_40,_41,_42,_43){
try{
if(row==0&&_40){
this.onEachCell(null,_40,_41,"setType",[_42,_43]);
this.onEachCell(null,_40,_41,"evaluate");
}else{
if(_40==0&&row){
this.onEachCell(row,null,_41,"setType",[_42,_43]);
this.onEachCell(row,null,_41,"evaluate");
}else{
if(_40==0&&row==0){
this.onEachCell(null,null,_41,"setType",[_42,_43]);
this.onEachCell(null,null,_41,"evaluate");
}else{
var _44=this.createCell(row,_40,_41);
_44.setType(_42,_43);
_44.evaluate();
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_setCellType",ex);
}
}
function spreadsheet_increaseDecimalPlace(row,_46,_47){
try{
if(row==0&&_46){
this.onEachCell(null,_46,_47,"increaseDecimalPlace");
this.onEachCell(null,_46,_47,"evaluate");
}else{
if(_46==0&&row){
this.onEachCell(row,null,_47,"increaseDecimalPlace");
this.onEachCell(row,null,_47,"evaluate");
}else{
if(_46==0&&row==0){
this.onEachCell(null,null,_47,"increaseDecimalPlace");
this.onEachCell(null,null,_47,"evaluate");
}else{
var _48=this.createCell(row,_46,_47);
_48.increaseDecimalPlace();
_48.evaluate();
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_increaseDecimalPlace",ex);
}
}
function spreadsheet_decreaseDecimalPlace(row,_4a,_4b){
try{
if(row==0&&_4a){
this.onEachCell(null,_4a,_4b,"decreaseDecimalPlace");
this.onEachCell(null,_4a,_4b,"evaluate");
}else{
if(_4a==0&&row){
this.onEachCell(row,null,_4b,"decreaseDecimalPlace");
this.onEachCell(row,null,_4b,"evaluate");
}else{
if(_4a==0&&row==0){
this.onEachCell(null,null,_4b,"decreaseDecimalPlace");
this.onEachCell(null,null,_4b,"evaluate");
}else{
var _4c=this.createCell(row,_4a,_4b);
_4c.decreaseDecimalPlace();
_4c.evaluate();
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_increaseDecimalPlace",ex);
}
}
function spreadsheet_onEachCell(_4d,_4e,_4f,_50,_51){
function doCols(_52){
if(_4e){
if(_52[_4e]){
_52[_4e][_50].apply(_52[_4e],_51);
}
}else{
for(var col=1;col<=_52.maxColumn;col++){
if(_52[col]){
_52[col][_50].apply(_52[col],_51);
}
}
}
}
function doRows(_54){
if(_4d){
if(_54[_4d]){
doCols.call(this,_54[_4d]);
}
}else{
for(var row=1;row<=this.maxRow;row++){
if(_54[row]){
doCols.call(this,_54[row]);
}
}
}
}
try{
if(arguments.length<5){
_51=new Array();
}
if(_4f){
if(this.cellArray[_4f]){
doRows.call(this,this.cellArray[_4f]);
}
}else{
for(var _56=this.minSheet;_56<=this.maxSheet;_56++){
if(this.cellArray[_56]){
doRows.call(this,this.cellArray[_56]);
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_onEachCell",ex);
}
}
function spreadsheet_clearStyle(row,_58,_59){
try{
var _5a=this.createRow(row,_59);
if(row==0&&_58){
this.onEachCell(null,_58,_59,"clearStyle");
}else{
if(_58==0&&row){
this.onEachCell(row,null,_59,"clearStyle");
}else{
if(_58==0&&row==0){
this.onEachCell(null,null,_59,"clearStyle");
}else{
var _5b=this.createCell(row,_58,_59);
_5b.clearStyle();
_5a.setFontHeight(_58,0);
this.displayModule.refreshRowSizes();
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_clearStyle",ex);
}
}
function spreadsheet_setCellStyle(row,_5d,_5e,_5f,_60){
function setRowStyle(_61){
try{
var row=this.createRow(_61,_5e);
row.setStyle(_5f,_60);
this.onEachCell(_61,null,_5e,"setStyle",[_5f,_60]);
return;
}
catch(ex){
jsExDebug("spreadsheet_setCellStyle: toggleRowStyle",ex);
}
}
function setColumnStyle(_63){
try{
var col=this.createColumn(_63,_5e);
col.setStyle(_5f);
this.onEachCell(null,_63,_5e,"setStyle",[_5f,_60]);
return;
}
catch(ex){
jsExDebug("spreadsheet_setCellStyle: toggleColumnStyle",ex);
}
}
try{
if(row==0&&_5d){
setColumnStyle.call(this,_5d);
}else{
if(_5d==0&&row){
setRowStyle.call(this,row);
}else{
if(_5d==0&&row==0){
this.onEachCell(null,null,_5e,"setStyle",[_5f,_60]);
}else{
var _65=this.createCell(row,_5d,_5e);
_65.setStyle(_5f,_60);
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_setCellStyle",ex);
}
}
function spreadsheet_toggleCellStyle(row,_67,_68,_69){
function toggleRowStyle(_6a){
try{
var row=this.createRow(_6a,_68);
row.toggleStyle(_69);
var _6c=row.getStyle();
var _6d=!(_6c&_6c);
this.onEachCell(_6a,null,_68,"setStyle",[_69,_6d]);
return;
}
catch(ex){
jsExDebug("spreadsheet_toggleCellStyle: toggleRowStyle",ex);
}
}
function toggleColumnStyle(_6e){
try{
var col=this.createColumn(_6e,_68);
col.toggleStyle(_69);
var _70=col.getStyle();
var _71=!(_70&_70);
this.onEachCell(null,_6e,_68,"setStyle",[_69,_71]);
return;
}
catch(ex){
jsExDebug("spreadsheet_toggleCellStyle: toggleColumnStyle",ex);
}
}
try{
if(row==0&&_67){
toggleColumnStyle.call(this,_67);
}else{
if(_67==0&&row){
toggleRowStyle.call(this,row);
}else{
var _72=this.createCell(row,_67,_68);
_72.toggleStyle(_69);
}
}
}
catch(ex){
jsExDebug("spreadsheet_toggleCellStyle",ex);
}
}
function spreadsheet_getCellStyle(row,_74,_75){
try{
if(row==0&&_74){
var col=this.getColumn(_74,_75);
if(col){
return col.getStyle();
}
}else{
if(_74==0&&row){
var row=this.getRow(row,_75);
if(row){
return row.getStyle();
}
}else{
if(this.cellExists(row,_74,_75)){
var _77=this.createCell(row,_74,_75);
return _77.getStyle();
}
}
}
return this.defaultStyle;
}
catch(ex){
jsExDebug("spreadsheet_getCellStyle",ex);
}
}
function spreadsheet_applyCellStyle(row,_79,_7a,_7b){
try{
if(this.getCell(row,_79,_7a)){
return this.cellArray[_7a][row][_79].applyStyles(_7b);
}
return "";
}
catch(ex){
jsExDebug("spreadsheet_applyCellStyle",ex);
}
}
function spreadsheet_notifyContentChange(_7c,_7d){
try{
this.contentChangeDelegate=_7c;
this.styleChangeDelegate=_7d;
}
catch(ex){
jsExDebug("spreadsheet_notifyDataChange",ex);
}
}
function spreadsheet_evaluate(row,_7f,_80){
try{
var _81=this.createCell(row,_7f,_80);
_81.evaluate();
}
catch(ex){
jsExDebug("spreadsheet_evaluate",ex);
}
}
function spreadsheet_createCell(row,_83,_84){
try{
if(!this.cellArray[_84]){
this.cellArray[_84]=[];
if(_84<this.minSheet){
this.minSheet=_84;
}else{
if(_84>this.maxSheet){
this.maxSheet=_84;
}
}
}
if(!this.cellArray[_84][row]){
this.cellArray[_84][row]=[];
this.cellArray[_84][row].maxColumn=0;
if(row>this.maxRow){
this.maxRow=row;
}
}
if(!this.cellArray[_84][row][_83]){
var _85=this.getDefaultCellStyle(row,_83,_84);
if(_85){
_85=_85.copy();
}
var _86=new cell_t(this,_83,row,_84,_85);
this.cellArray[_84][row][_83]=_86;
if(_83>this.cellArray[_84][row].maxColumn){
this.cellArray[_84][row].maxColumn=_83;
}
_86.notifyContentChange(this.contentChangeDelegate,this.styleChangeDelegate);
return _86;
}
return this.cellArray[_84][row][_83];
}
catch(ex){
jsExDebug("spreadsheet_createCell",ex);
}
}
function spreadsheet_resetCell(row,_88,_89){
try{
var _8a=this.getCell(row,_88,_89);
if(_8a){
_8a.reset();
}
}
catch(ex){
jsExDebug("spreadsheet_resetCell",ex);
}
}
function spreadsheet_getDefaultCellStyle(row,_8c,_8d){
try{
var row=this.getRow(row,_8d);
var col=this.getColumn(_8c,_8d);
var _8f=null;
if(row){
var _8f=row.getStyleRef();
}
if(col){
var _8f=col.getStyleRef();
}
return _8f;
}
catch(ex){
jsExDebug("spreadsheet_getDefaultCellStyle",ex);
}
}
function spreadsheet_checkSheet(_90){
try{
if(!_90){
if(this.displayModule){
return this.displayModule.getVisibleDimension();
}
return 1;
}
return _90;
}
catch(ex){
jsExDebug("spreadsheet_checkSheet",ex);
}
}
function spreadsheet_sheetExists(_91,_92){
try{
if(this.zNames[_92]==this.zList[_91]){
return true;
}
return false;
}
catch(ex){
jsExDebug("spreadsheet_sheetExists",ex);
}
}
function spreadsheet_clearDimensions(){
try{
for(var i=0;i<this.zList.length;i++){
if(this.zList[i]){
this.zNames[this.zList[i]]=null;
delete this.zNames[this.zList[i]];
this.zList[i]=null;
delete this.zList[i];
}
}
this.zList=[];
this.zNames=[];
this.highestZListIndex=null;
}
catch(ex){
jsExDebug("spreadsheet_clearDimensions",ex);
}
}
function spreadsheet_reEvaluate(){
try{
this.onEachCell(null,null,null,"evaluate");
}
catch(ex){
jsExDebug("spreadsheet_reEvaluate",ex);
}
}
function spreadsheet_getCell(row,_95,_96){
try{
_96=this.checkSheet(_96);
if(this.cellArray[_96]&&this.cellArray[_96][row]&&this.cellArray[_96][row][_95]){
return this.cellArray[_96][row][_95];
}else{
return null;
}
}
catch(ex){
jsExDebug("spreadsheet_getCell",ex);
}
}
function spreadsheet_getRow(row,_98){
try{
if(this.rowArray[_98]&&this.rowArray[_98][row]){
return this.rowArray[_98][row];
}else{
return null;
}
}
catch(ex){
jsExDebug("spreadsheet_getRow",ex);
}
}
function spreadsheet_getCellByName(_99,_9a){
try{
_99.match(/([A-Z]{1,2})\$?([0-9]+)\s*/);
var _9b=alphaToNumeric(RegExp.$1);
var row=parseInt(RegExp.$2);
return this.getCellAt(row,_9b,_9a);
}
catch(ex){
jsExDebug("spreadsheet_getCellByName",ex);
}
}
function spreadsheet_disableAutoAlign(row,_9e,_9f){
try{
var _a0=this.createCell(row,_9e,_9f);
_a0.disableAutoAlign();
}
catch(ex){
jsExDebug("spreadsheet_disableAutoAlign",ex);
}
}
function spreadsheet_fromXml(_a1){
var _a2=null;
function loadCell(_a3){
try{
var _a4=1;
if(_a3.getAttribute("table:number-columns-repeated")){
_a4=parseInt(_a3.getAttribute("table:number-columns-repeated"));
}
if(_a3.childNodes.length>0){
for(var i=0;i<_a4;i++){
var _a6=this.createCell(row,_a8,_a9);
_a6.fromXml(_a3,_aa,_a2[_a8]);
_a8++;
}
}else{
_a8+=_a4;
}
}
catch(ex){
jsExDebug("spreadsheet_fromXml:loadCell",ex);
}
}
function loadRow(_ab){
try{
var _ac=1;
var _ad=false;
if(_ab.getAttribute("table:number-rows-repeated")){
_ac=parseInt(_ab.getAttribute("table:number-rows-repeated"));
for(var j=0;j<_ab.childNodes.length;j++){
var _af=_ab.childNodes[j];
if(_af.childNodes.length>0){
_ad|=true;
break;
}
}
}else{
_ad=true;
}
if(_ad){
for(var i=0;i<_ac;i++){
for(var j=0;j<_ab.childNodes.length;j++){
if(_ab.childNodes[j].nodeName=="table:table-cell"){
var _af=_ab.childNodes[j];
loadCell.call(this,_af);
}
}
_a8=1;
row++;
}
}else{
row+=_ac;
}
}
catch(ex){
jsExDebug("spreadsheet_fromXml:loadRow",ex);
}
}
function processTable(_b1){
try{
var _b2=_b1.getAttribute("table:name");
if(_b2=="Sheetnull"){
return;
}
this.addDimension(_a9,_b1.getAttribute("table:name"));
var _b3=[];
_a2=[];
var _b4=1;
for(var i=0;i<_b1.childNodes.length;i++){
var _b6=_b1.childNodes[i];
switch(_b6.nodeName){
case "table:table-row":
if(_b6.getAttribute("table:style-name")){
var _b7=this.createRow(row,_a9);
var _b8=_aa.getStyle(_b6.getAttribute("table:style-name"));
this.rowArray[_a9][row].copyRowStyle(_b8);
}
loadRow.call(this,_b6);
break;
case "table:table-column":
var _b9=_b6.getAttribute("table:number-columns-repeated");
if(_b9==null){
_b9=1;
}
_b3.push({name:_b6.getAttribute("table:style-name"),nrRepeated:_b9});
var _ba=_b6.getAttribute("table:default-cell-style-name");
if(_ba){
_a2[_b4]=_ba;
}
_b4++;
break;
}
}
row=1;
var _bb=1;
for(var i=0;i<_b3.length;i++){
var _bc=_b3[i];
var _bd=_aa.getStyle(_bc.name);
if(_bc){
for(var j=0;j<_bc.nrRepeated;j++){
var _bf=this.createColumn(_bb,_a9);
this.columnArray[_a9][_bb].copyColumnStyle(_bd);
_bb++;
}
}
}
_a9++;
_a2=null;
_b4=null;
}
catch(ex){
jsExDebug("spreadsheet_fromXml:processTable",ex);
}
}
try{
for(var _a9=0;_a9<this.cellArray.length;_a9++){
var _c0=this.cellArray[_a9];
if(_c0){
for(var row=0;row<_c0.length;row++){
var _c1=_c0[row];
if(_c1){
for(var _a8=0;_a8<_c1.length;_a8++){
var _c2=this.getCell(row,_a8,_a9);
if(_c2){
_c2.cleanUp();
}
this.cellArray[_a9][row][_a8]=null;
}
}
}
this.cellArray[_a9][row]=null;
}
this.cellArray[_a9]=null;
}
this.cellArray=[];
this.clearDimensions();
var _aa=new styleList_t();
row=1;
_a8=1;
_a9=1;
if(_a1&&_a1.hasChildNodes()){
for(var j=0;j<_a1.childNodes.length;j++){
if(_a1.childNodes[j].nodeName=="office:document-content"){
var _c4=_a1.childNodes[j];
_aa.fromXml(_c4);
for(var k=0;k<_c4.childNodes.length;k++){
if(_c4.childNodes[k].nodeName=="office:body"){
var _c6=_c4.childNodes[k];
for(var l=0;l<_c6.childNodes.length;l++){
if(_c6.childNodes[l].nodeName=="office:spreadsheet"){
var _c8=_c6.childNodes[l];
for(var m=0;m<_c8.childNodes.length;m++){
if(_c8.childNodes[m].nodeName=="table:table"){
var _ca=_c8.childNodes[m];
processTable.call(this,_ca);
_ca=null;
}
}
_c8=null;
}
}
_c6=null;
}
}
_c4=null;
}
}
}
_a1=null;
_aa=null;
}
catch(ex){
jsExDebug("spreadsheet_fromXml",ex);
}
}
function spreadsheet_toXml(){
try{
var _cb=new xmlWriter_t();
var _cc="";
var _cd=new xmlWriter_t();
var _ce="";
_cb.addAttribute("xmlns:office","urn:oasis:names:tc:opendocument:xmlns:office:1.0");
_cb.addAttribute("xmlns:style","urn:oasis:names:tc:opendocument:xmlns:style:1.0");
_cb.addAttribute("xmlns:text","urn:oasis:names:tc:opendocument:xmlns:text:1.0");
_cb.addAttribute("xmlns:table","urn:oasis:names:tc:opendocument:xmlns:table:1.0");
_cb.addAttribute("xmlns:draw","urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
_cb.addAttribute("xmlns:fo","urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
_cb.addAttribute("xmlns:xlink","http://www.w3.org/1999/xlink");
_cb.addAttribute("xmlns:dc","http://purl.org/dc/elements/1.1/");
_cb.addAttribute("xmlns:meta","urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
_cb.addAttribute("xmlns:number","urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0");
_cb.addAttribute("xmlns:svg","urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
_cb.addAttribute("xmlns:chart","urn:oasis:names:tc:opendocument:xmlns:chart:1.0");
_cb.addAttribute("xmlns:dr3d","urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0");
_cb.addAttribute("xmlns:math","http://www.w3.org/1998/Math/MathML");
_cb.addAttribute("xmlns:form","urn:oasis:names:tc:opendocument:xmlns:form:1.0");
_cb.addAttribute("xmlns:script","urn:oasis:names:tc:opendocument:xmlns:script:1.0");
_cb.addAttribute("xmlns:ooo","http://openoffice.org/2004/office");
_cb.addAttribute("xmlns:ooow","http://openoffice.org/2004/writer");
_cb.addAttribute("xmlns:oooc","http://openoffice.org/2004/calc");
_cb.addAttribute("xmlns:dom","http://www.w3.org/2001/xml-events");
_cb.addAttribute("xmlns:xforms","http://www.w3.org/2002/xforms");
_cb.addAttribute("xmlns:xsd","http://www.w3.org/2001/XMLSchema");
_cb.addAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");
_cb.addAttribute("office:version","1.0");
_cc+=_cb.createElement("office:document-content");
var _cf=new styleList_t();
_cc+=_cb.createElement("office:automatic-styles");
var _d0=[];
for(var _d1=this.minSheet;_d1<=this.maxSheet;_d1++){
if(this.cellArray[_d1]){
var _d2=this.cellArray[_d1];
for(var row=1;row<=this.maxRow;row++){
if(_d2[row]){
var _d4=_d2[row];
for(var col=1;col<=_d4.maxColumn;col++){
if(_d4[col]){
var _d6=_d4[col];
if(_d6){
var _d7=_d6.getDataStyle();
if(_d7){
_cf.addDataStyle(_d7);
_d6.style.setDataStyleName(_d7.getName());
_cf.addCellStyle(_d6.style);
}
}
}
}
}
}
}
if(this.rowArray[_d1]){
var row=this.rowArray[_d1];
for(var i=1;i<row.length;i++){
if(row[i]){
_cf.addRowStyle(row[i].getRowStyleRef());
}
}
}
var _d9=1;
var _da=null;
var _db=null;
var _dc=[];
if(this.columnArray[_d1]){
var _dd=this.columnArray[_d1];
for(var i=1;i<_dd.length;i++){
if(_dd[i]){
var _de=_dd[i].getColumnStyleRef();
_cf.addColumnStyle(_de);
if(_da){
if(_da.toString()==_de.toString()){
_d9++;
}else{
_dc.push({name:_da.getName(),nrRepeated:_d9});
_d9=1;
_da=_de;
_db=i;
}
}else{
_d9=1;
_da=_de;
_db=i;
}
}
}
_dc.push({name:_da.getName(),nrRepeated:_d9});
_d0[_d1]=_dc;
}
}
_cc+=_cf.toXml(true,true);
_cc+=_cb.closeElement("office:automatic-styles");
_cc+=_cb.createElement("office:body");
_cc+=_cb.createElement("office:spreadsheet");
for(var _d1=this.minSheet;_d1<=this.maxSheet;_d1++){
_cb.addAttribute("table:name","Sheet"+_d1);
_cb.addAttribute("table:print","false");
_cc+=_cb.createElement("table:table");
if(_d0[_d1]){
for(var i=0;i<_d0[_d1].length;i++){
var _df=_d0[_d1][i];
if(_df){
_cb.addAttribute("table:style-name",_df.name);
_cb.addAttribute("table:number-columns-repeated",_df.nrRepeated);
_cc+=_cb.createClosedElement("table:table-column");
}
}
}
if(this.cellArray[_d1]){
var _d2=this.cellArray[_d1];
var _e0=0;
for(var row=1;row<=this.maxRow;row++){
if(_d2[row]){
if(_e0>1){
_cb.addAttribute("table:number-rows-repeated",_e0.toString());
_cc+=_cb.createClosedElement("table:table-row");
_e0=0;
}
if(_e0==1){
_cc+=_cb.createClosedElement("table:table-row");
_e0=0;
}
var _d4=_d2[row];
if(this.rowArray[_d1]&&this.rowArray[_d1][row]){
var _e1=this.rowArray[_d1][row].getRowStyleRef();
_cb.addAttribute("table:style-name",_e1.getName());
}
_cc+=_cb.createElement("table:table-row");
var _e2=0;
for(var col=1;col<=_d4.maxColumn;col++){
if(_d4[col]){
if(_e2>1){
_cb.addAttribute("table:number-columns-repeated",_e2.toString());
_cc+=_cb.createClosedElement("table:table-cell");
_e2=0;
}
if(_e2==1){
_cc+=_cb.createClosedElement("table:table-cell");
_e2=0;
}
_cc+=_d4[col].toXml();
}else{
_e2++;
}
}
_cc+=_cb.closeElement("table:table-row");
}else{
_e0++;
}
}
}
_cc+=_cb.closeElement("table:table");
}
_cc+=_cb.closeElement("office:spreadsheet");
_cc+=_cb.closeElement("office:body");
_cc+=_cb.closeElement("office:document-content");
return _cc;
}
catch(ex){
jsExDebug("spreadsheet_toXml",ex);
}
}
function spreadsheet_toHtml(_e3){
function getBlankCell(){
try{
var _e4=new cssWriter_t();
_e4.addProperty("border-width",cell_t.prototype.HTML_BORDER_WIDTH);
_e4.addProperty("border-style",cell_t.prototype.HTML_BORDER_STYLE);
_e4.addProperty("border-color",cell_t.prototype.HTML_BORDER_COLOUR);
_e5.addAttribute("style",_e4.toString());
var txt=_e5.createElement("td");
txt+="&nbsp;";
txt+=_e5.closeElement("td");
return txt;
}
catch(ex){
jsExDebug("spreadsheet_toHtml: getBlankCell",ex);
}
}
try{
var _e5=new xmlWriter_t();
var _e7="";
if(this.cellArray[_e3]){
var _e8=this.cellArray[_e3];
_e5.addAttribute("cellspacing","0");
_e7+=_e5.createElement("table");
var _e9=0;
var _ea=0;
for(var row=1;row<=this.maxRow;row++){
if(_e8[row]){
if(_e8[row].maxColumn>_e9){
_e9=_e8[row].maxColumn;
}
_ea=row;
}
}
for(var row=1;row<=_ea;row++){
if(_e8[row]){
var _ec=_e8[row];
_e7+=_e5.createElement("tr");
var _ed=this.getRowHeight(row,_e3);
for(var col=1;col<=_e9;col++){
if(_ec[col]){
var _ef=this.getColumnWidth(col,_e3);
_e7+=_ec[col].toHtml(_ef,_ed);
}else{
var _f0=getBlankCell();
_e7+=_f0;
}
}
_e7+=_e5.closeElement("tr");
}else{
_e7+=_e5.createClosedElement("tr");
}
}
_e7+=_e5.closeElement("table");
}
return _e7;
}
catch(ex){
jsExDebug("spreadsheet_toHtml",ex);
}
}
function spreadsheet_copy(_f1){
try{
var _f2=_f1.getFirstRange();
this.copySheet=_f2.sheet;
if(_f2.fromX==0&&_f2.toX==0&&_f2.fromY==0&&_f2.toY==0){
this.copyStartX=1;
this.copyAreaWidth=this.getLastColumnIndex(this.copySheet)+1;
this.copyStartY=1;
this.copyAreaHeight=this.getLastRowIndex(this.copySheet)+1;
}else{
if(_f2.fromX<_f2.toX){
this.copyStartX=_f2.fromX;
this.copyAreaWidth=_f2.toX-_f2.fromX+1;
}else{
this.copyStartX=_f2.toX;
this.copyAreaWidth=_f2.fromX-_f2.toX+1;
}
if(_f2.fromY<_f2.toY){
this.copyStartY=_f2.fromY;
this.copyAreaHeight=_f2.toY-_f2.fromY+1;
}else{
this.copyStartY=_f2.toY;
this.copyAreaHeight=_f2.fromY-_f2.toY+1;
}
}
}
catch(ex){
jsExDebug("spreadsheet_copy",ex);
}
}
function spreadsheet_cut(_f3){
try{
this.copy(_f3);
this.removeAfterPaste=true;
}
catch(ex){
jsExDebug("spreadsheet_cut",ex);
}
}
function spreadsheet_paste(_f4){
try{
var _f5=_f4.getFirstRange();
var _f6=_f4.activeSheet;
if(_f5.fromX==0&&_f5.toX==0&&_f5.fromY==0&&_f5.toY==0){
this.selectedX=1;
this.selectionWidth=this.getLastColumnIndex(this.copySheet)+1;
this.selectedY=1;
this.selectionHeight=this.getLastRowIndex(this.copySheet)+1;
}else{
if(_f5.fromX<_f5.toX){
this.selectedX=_f5.fromX;
this.selectionWidth=_f5.toX-_f5.fromX+1;
}else{
this.selectedX=_f5.toX;
this.selectionWidth=_f5.fromX-_f5.toX+1;
}
if(_f5.fromY<_f5.toY){
this.selectedY=_f5.fromY;
this.selectionHeight=_f5.toY-_f5.fromY+1;
}else{
this.selectedY=_f5.toY;
this.selectionHeight=_f5.fromY-_f5.toY+1;
}
}
var _f7=parseInt(this.selectionHeight/this.copyAreaHeight);
if(_f7<1){
_f7=1;
}
var _f8=parseInt(this.selectionWidth/this.copyAreaWidth);
if(_f8<1){
_f8=1;
}
for(var _f9=0;_f9<_f7;_f9++){
for(var _fa=0;_fa<_f8;_fa++){
for(var y=0;y<this.copyAreaHeight;y++){
for(var x=0;x<this.copyAreaWidth;x++){
var _fd=this.selectedY+y+(_f9*this.copyAreaHeight);
var _fe=this.selectedX+x+(_fa*this.copyAreaWidth);
var _ff=this.copyStartY+y;
var _100=this.copyStartX+x;
if(_fd==0||_fe==0){
continue;
}
if(this.cellExists(_ff,_100,this.copySheet)){
var _101=this.createCell(_fd,_fe,_f6);
_101.clearSupports();
_101.clone(this.getCell(_ff,_100,this.copySheet));
_101.adjustReferences(_fe-_100,_fd-_ff);
if(_101.buildRelationships()){
_101.evaluate();
_101.evaluateDependants();
}
if(this.removeAfterPaste){
this.cellArray[this.copySheet][_ff][_100].reset();
}
}
}
}
}
}
if(this.removeAfterPaste){
this.copyStartX=null;
this.copyStartY=null;
this.copySheet=null;
this.copyAreaWidth=null;
this.copyAreaHeight=null;
this.removeAfterPaste=null;
}
}
catch(ex){
jsExDebug("spreadsheet_paste",ex);
}
}
function spreadsheet_insertDataRows(_102,_103,_104){
try{
if(!this.cellArray[_103]){
return;
}
var _105=1;
var _106=[];
if(_104){
_105=_104;
}
var _107=this.rowArray[_103].slice(_102);
this.rowArray[_103].splice(_102,this.rowArray[_103].length-(_102));
for(var i=0;i<_104;i++){
this.rowArray[_103][_102+i]=new row_t();
}
this.rowArray[_103]=this.rowArray[_103].concat(_107);
_107=this.cellArray[_103].slice(_102);
this.cellArray[_103].splice(_102,this.cellArray[_103].length-(_102+1));
for(var i=0;i<_104;i++){
this.cellArray[_103][_102+i]=null;
}
this.cellArray[_103]=this.cellArray[_103].concat(_107);
if(_102+i<this.cellArray[_103].length){
for(var row=_102+i;row<this.cellArray[_103].length;row++){
var _10a=this.cellArray[_103][row];
if(_10a){
for(var _10b=0;_10b<_10a.length;_10b++){
if(_10a[_10b]){
var cell=this.createCell(row,_10b,_103);
cell.clearSupports();
cell.setPosition(_10b,row,_103);
cell.adjustReferencesAbove(0,_105,0,_102);
if(cell.buildRelationships()){
_106.push(cell);
}
if(!this.cellExists(row-_105,_10b,_103)){
var cell=this.createCell(row-_105,_10b,_103);
cell.reset();
}
}
}
}
}
for(var row=1;row<_102;row++){
var _10a=this.cellArray[_103][row];
if(_10a){
for(var _10b=0;_10b<_10a.length;_10b++){
if(this.cellExists(row,_10b,_103)){
var cell=this.createCell(row,_10b,_103);
cell.adjustReferencesAbove(0,_105,0,_102);
if(cell.buildRelationships()){
_106.push(cell);
}
}
}
}
}
}
for(var i=0;i<_106.length;i++){
_106[i].evaluateDependants();
}
}
catch(ex){
jsExDebug("spreadsheet_insertRows",ex);
}
}
function spreadsheet_deleteDataRows(_10d,_10e,_10f){
try{
if(!this.cellArray[_10e]){
return;
}
var _110=(_10f?_10f:1);
var _111=[];
var _112=_10d+_110;
for(var i=0;i<_110;i++){
if(this.rowArray[_10e][_10d+i]){
this.rowArray[_10e][_10d+i].cleanUp();
this.rowArray[_10e][_10d+i]=null;
}
}
this.rowArray[_10e].splice(_10d,_110);
var _114=this.cellArray[_10e];
if(!_114){
return;
}
for(var row=_10d;row<_112;row++){
var _116=_114[row];
if(_116&&_116.length){
for(var _117=0;_117<_116.length;_117++){
if(this.cellExists(row,_117,_10e)){
var cell=this.createCell(row,_117,_10e);
cell.cleanUp();
_116[_117]=null;
}
}
}
}
_114.splice(_10d,_110);
for(var row=_10d;row<_114.length;row++){
var _116=_114[row];
if(_116&&_116.length){
for(var _117=0;_117<_116.length;_117++){
if(this.cellExists(row,_117,_10e)){
var cell=this.createCell(row,_117,_10e);
cell.clearSupports();
cell.setPosition(_117,row,_10e);
cell.adjustReferencesOutsideInvalid(0,(0-_110),0,0,_10d,_112-1);
if(cell.buildRelationships()){
_111.push(cell);
}
}
}
}
}
for(var row=1;row<_10d;row++){
var _116=_114[row];
if(_116&&_116.length){
for(var _117=0;_117<_116.length;_117++){
if(this.cellExists(row,_117,_10e)){
var cell=this.createCell(row,_117,_10e);
cell.adjustReferencesOutsideInvalid(0,(0-_110),0,0,_10d,_112-1);
if(cell.buildRelationships()){
_111.push(cell);
}
}
}
}
}
for(var i=0;i<_111.length;i++){
_111[i].evaluate();
_111[i].evaluateDependants();
}
}
catch(ex){
jsExDebug("spreadsheet_deleteDataRows",ex);
}
}
function spreadsheet_deleteDataCols(_119,_11a,_11b){
try{
if(!this.cellArray[_11a]){
return;
}
var _11c=(_11b?_11b:1);
var _11d=[];
var _11e=_119+_11c;
var _11f=this.columnArray[_11a];
for(var i=0;i<_11c;i++){
var _121=_119+i;
if(_11f[_11a][_121]){
_11f[_11a][_121].cleanUp();
_11f[_11a][sindex]=null;
}
}
this.columnArray[_11a].splice(_119,_11c);
var _122=this.cellArray[_11a];
if(!_122){
return;
}
for(var row=0;row<_122.length;row++){
var _124=_122[row];
if(!_124||!_124.length){
continue;
}
for(var _125=_119;_125<_11e;_125++){
if(this.cellExists(row,_125,_11a)){
var cell=this.createCell(row,_125,_11a);
cell.cleanUp();
_124[_125]=null;
}
}
this.cellArray[_11a][row].splice(_119,_11c);
for(_125=0;_125<_124.length;_125++){
if(!this.cellExists(row,_125,_11a)){
continue;
}
var cell=this.createCell(row,_125,_11a);
if(_125<_119){
cell.adjustReferencesOutsideInvalid((0-_11c),0,_119,_11e-1,0,0);
}else{
cell.clearSupports();
cell.setPosition(_125,row,_11a);
cell.adjustReferencesOutsideInvalid((0-_11c),0,_119,_11e-1,0,0);
}
if(cell.buildRelationships()){
_11d.push(cell);
}
}
}
for(var i=0;i<_11d.length;i++){
_11d[i].evaluate();
_11d[i].evaluateDependants();
}
}
catch(ex){
jsExDebug("spreadsheet_deleteDataCols",ex);
}
}
function spreadsheet_insertDataCols(_127,_128,_129){
try{
if(!this.cellArray[_128]){
return;
}
var _12a=1;
var _12b=null;
var cell=null;
var _12d=[];
if(_129){
_12a=_129;
}
if(this.columnArray.length>0){
var _12e=this.columnArray[_128].slice(_127);
this.columnArray[_128].splice(_127,this.columnArray[_128].length-(_127+1));
for(var i=0;i<_12a;i++){
this.columnArray[_128][_127+i]=new column_t();
}
this.columnArray[_128]=this.columnArray[_128].concat(_12e);
}
for(var y=0;y<this.cellArray[_128].length;y++){
var row=this.cellArray[_128][y];
if(row){
var _132=row.maxColumn;
_12e=row.slice(_127);
this.cellArray[_128][y].splice(_127,row.length-(_127+1));
for(var x=_127;x<_127+_12a;x++){
this.cellArray[_128][y][x]=null;
}
this.cellArray[_128][y]=this.cellArray[_128][y].concat(_12e);
for(x;x<this.cellArray[_128][y].length;x++){
var cell=this.createCell(y,x,_128);
cell.clearSupports();
cell.setPosition(x,y,_128);
cell.adjustReferencesAbove(_12a,0,_127);
if(cell.buildRelationships()){
_12d.push(cell);
}
if(!this.cellExists(y,x-_12a,_128)){
var cell=this.createCell(y,x-_12a,_128);
cell.reset();
}
}
for(x=1;x<_127;x++){
if(this.cellExists(y,x,_128)){
var cell=this.createCell(y,x,_128);
cell.adjustReferencesAbove(_12a,0,_127);
if(cell.buildRelationships()){
_12d.push(cell);
}
}
}
this.cellArray[_128][y].maxColumn=_132+_12a;
}
}
for(var i=0;i<_12d.length;i++){
_12d[i].evaluateDependants();
}
}
catch(ex){
jsExDebug("spreadsheet_insertDataCols",ex);
}
}
function spreadsheet_createRow(row,_135){
try{
if(!this.rowArray[_135]){
this.rowArray[_135]=[];
if(_135<this.minSheet){
this.minSheet=_135;
}else{
if(_135>this.maxSheet){
this.maxSheet=_135;
}
}
}
if(!this.rowArray[_135][row]){
this.rowArray[_135][row]=new row_t();
}
return this.rowArray[_135][row];
}
catch(ex){
jsExDebug("spreadsheet_createRow",ex);
}
}
function spreadsheet_createColumn(_136,_137){
try{
if(!this.columnArray[_137]){
this.columnArray[_137]=[];
if(_137<this.minSheet){
this.minSheet=_137;
}else{
if(_137>this.maxSheet){
this.maxSheet=_137;
}
}
}
if(!this.columnArray[_137][_136]){
this.columnArray[_137][_136]=new column_t();
}
return this.columnArray[_137][_136];
}
catch(ex){
jsExDebug("spreadsheet_createColumn",ex);
}
}
function spreadsheet_setRowHeight(row,_139,_13a){
try{
var _13b=this.createRow(row,_139);
_13b.setHeight(_13a);
for(var _13c=1;_13c<this.columnArray.length;_13c++){
this.createCell(row,_13c,_139);
}
}
catch(ex){
jsExDebug("spreadsheet_setRowHeight",ex);
}
}
function spreadsheet_getRowHeight(_13d,_13e){
try{
var row=this.createRow(_13d,_13e);
if(row){
return row.getHeight();
}
return null;
}
catch(ex){
jsExDebug("spreadsheet_getRowHeight",ex);
}
}
function spreadsheet_setColumnWidth(_140,_141,_142){
try{
var _140=this.createColumn(_140,_141);
_140.setWidth(_142);
}
catch(ex){
jsExDebug("spreadsheet_setColumnWidth",ex);
}
}
function spreadsheet_getColumnWidth(_143,_144){
try{
var col=this.createColumn(_143,_144);
if(col){
return col.getWidth();
}
return null;
}
catch(ex){
jsExDebug("spreadsheet_getColumnWidth",ex);
}
}
function spreadsheet_getColumnEndPosition(row,_147){
try{
if(!this.cellArray[_147]){
return null;
}
if(!this.cellArray[_147][row]){
return 1;
}
var _148=0;
for(var _149=0;_149<this.cellArray[_147][row].length;_149++){
if(this.cellArray[_147][row][_149]){
_148=_149;
}
}
return _148;
}
catch(ex){
jsExDebug("spreadsheet_getColumnEndPosition",ex);
}
}
function spreadsheet_getLastRowIndex(_14a){
try{
if(!this.cellArray[_14a]){
return null;
}
return this.cellArray[_14a].length-1;
}
catch(ex){
jsExDebug("spreadsheet_getLastRowIndex",ex);
}
}
function spreadsheet_getLastColumnIndex(_14b){
try{
if(!this.cellArray[_14b]){
return null;
}
var _14c=1;
for(var row=_14c;row<this.cellArray[_14b].length;row++){
var _14e=this.cellArray[_14b][row];
if(_14e&&_14e.length&&(_14e.length>_14c)){
_14c=_14e.length-1;
}
}
return _14c;
}
catch(ex){
jsExDebug("spreadsheet_getLastColumnIndex",ex);
}
}
function spreadsheet_getColumn(_14f,_150){
try{
if(this.columnArray[_150]&&this.columnArray[_150][_14f]){
return this.columnArray[_150][_14f];
}
return null;
}
catch(ex){
jsExDebug("spreadsheet_getColumn",ex);
}
}
function spreadsheet_getPreviousCellInRow(row,_152,_153){
try{
var _154=this.getCell(row,_152-1,_153);
var _155=this.getCell(row,_152,_153);
if(_154&&_154.content){
if(!_155||!_155.content){
return _154;
}
for(var _156=(_152-1);_156>0;_156--){
var cell=this.getCell(row,_156,_153);
if(!cell||!cell.content){
return this.getCell(row,(_156+1),_153);
}
}
}else{
for(var _156=(_152-1);_156>0;_156--){
var cell=this.getCell(row,_156,_153);
if(cell&&cell.content){
return cell;
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_getPreviousCellInRow",ex);
}
}
function spreadsheet_getNextCellInRow(row,_159,_15a){
try{
if(!this.cellArray[_15a]||!this.cellArray[_15a][row]){
return;
}
var _15b=this.cellArray[_15a][row];
var _15c=this.getCell(row,_159,_15a);
var _15d=this.getCell(row,_159+1,_15a);
if(_15d&&_15d.content){
if(!_15c||!_15c.content){
return _15d;
}
for(var _15e=(_159+1);_15e<=_15b.length;_15e++){
var cell=this.getCell(row,_15e,_15a);
if(!cell||!cell.content){
return this.getCell(row,(_15e-1),_15a);
}
}
}else{
for(var _15e=(_159+1);_15e<_15b.length;_15e++){
var cell=this.getCell(row,_15e,_15a);
if(cell&&cell.content){
return cell;
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_getNextCellInRow",ex);
}
}
function spreadsheet_getPreviousCellInColumn(row,_161,_162){
try{
if(!this.cellArray[_162]){
return;
}
var _163=this.getCell(row,_161,_162);
var _164=this.getCell(row-1,_161,_162);
if(_164&&_164.content){
if(!_163||!_163.content){
return _164;
}
for(var _165=(row-1);_165>0;_165--){
var cell=this.getCell(_165,_161,_162);
if(!cell||!cell.content){
return this.getCell(_165+1,_161,_162);
}
}
}else{
for(var _165=(row-1);_165>0;_165--){
var cell=this.getCell(_165,_161,_162);
if(cell&&cell.content){
return cell;
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_getPreviousCellInColumn",ex);
}
}
function spreadsheet_getNextCellInColumn(row,_168,_169){
try{
if(!this.cellArray[_169]){
return;
}
var _16a=this.getCell(row,_168,_169);
var _16b=this.getCell(row+1,_168,_169);
if(_16b&&_16b.content){
if(!_16a||!_16a.content){
return _16b;
}
for(var _16c=(row+1);_16c<=this.cellArray[_169].length;_16c++){
var cell=this.getCell(_16c,_168,_169);
if(!cell||!cell.content){
return this.getCell(_16c-1,_168,_169);
}
}
}else{
for(var _16c=(row+1);_16c<this.cellArray[_169].length;_16c++){
var cell=this.getCell(_16c,_168,_169);
if(cell&&cell.content){
return cell;
}
}
}
}
catch(ex){
jsExDebug("spreadsheet_getNextCellInColumn",ex);
}
}
function spreadsheet_autoFormula(_16e,_16f){
try{
var _170=_16e.getFirstRange();
if(_170.fromX<_170.toX){
this.selectedX=_170.fromX;
this.selectionWidth=_170.toX-_170.fromX+1;
}else{
this.selectedX=_170.toX;
this.selectionWidth=_170.fromX-_170.toX+1;
}
if(_170.fromY<_170.toY){
this.selectedY=_170.fromY;
this.selectionHeight=_170.toY-_170.fromY+1;
}else{
this.selectedY=_170.toY;
this.selectionHeight=_170.fromY-_170.toY+1;
}
if(this.selectionWidth==1&this.selectionHeight==1){
if(this.selectedY==0||this.selectedX==0){
return;
}
this.selectedCell=this.createCell(this.selectedY,this.selectedX,_16e.activeSheet);
var _171=true;
for(var y=this.selectedY-1;y>0;y--){
if(!this.cellExists(y,this.selectedX,_16e.activeSheet)||isNaN(this.getCell(y,this.selectedX,_16e.activeSheet).getFormula())){
if(!_171){
break;
}
}else{
_171=false;
}
}
if(_171){
var _173="="+_16f+"()";
this.displayModule.editCell(this.selectedX,this.selectedY,_173);
}else{
var _173="="+_16f+"("+numericToAlpha(this.selectedX)+(y+1)+":"+numericToAlpha(this.selectedX)+(this.selectedY-1)+")";
this.displayModule.editCell(this.selectedX,this.selectedY,_173);
}
}else{
var _174=this.createCell(this.selectedY+this.selectionHeight-1,this.selectedX+this.selectionWidth-1,_16e.activeSheet);
var i=0;
while(_174.getFormula()&&_174.getFormula().toString().length){
i++;
_174=this.createCell(this.selectedY+this.selectionHeight-1+i,this.selectedX+this.selectionWidth-1,_16e.activeSheet);
}
if(i){
var _173="="+_16f+"("+numericToAlpha(_170.fromX)+_170.fromY+":"+numericToAlpha(_170.toX)+_170.toY+")";
}else{
var _173="="+_16f+"("+numericToAlpha(_170.fromX)+_170.fromY+":"+numericToAlpha(_170.toX)+(_170.toY-1)+")";
}
_174.setFormula(_173);
_174.clearSupports();
_174.evaluate();
_174.evaluateDependants();
}
}
catch(ex){
jsExDebug("spreadsheet_autoFormula",ex);
}
}
function spreadsheet_getRowStyle(row,_177){
try{
if(this.rowStyles[_177]&&this.rowStyles[_177][row]){
return this.rowStyles[_177][row];
}
return this.defaultStyle;
}
catch(ex){
jsExDebug("spreadsheet_getRowStyle",ex);
}
}
function spreadsheet_getColumnStyle(_178,_179){
try{
if(this.columnStyles[_179]&&this.columnStyles[_179][_178]){
return this.columnStyles[_179][_178];
}
return this.defaultStyle;
}
catch(ex){
jsExDebug("spreadsheet_getColumnStyle",ex);
}
}
function spreadsheet_deleteCell(row,_17b,_17c){
try{
if(this.cellExists(row,_17b,_17c)){
var cell=this.createCell(row,_17b,_17c);
cell.deleteCell();
}
}
catch(ex){
jsExDebug("spreadsheet_deleteCell",ex);
}
}

cellEditBox_t.prototype.LENGTH_BUFFER=2;
function cellEditBox_t(_1){
try{
this.domElement=document.createElement("input");
this.domElement.type="text";
this.domElement.setAttribute("autocomplete","off");
this.domElement.style.border="none";
this.domElement.size=_1.toString().length+this.LENGTH_BUFFER;
dm.attachEvent(this.inputBox,"onkeydown","keydown",this.keyDownHandler,this,true);
this.startValue=_1;
this.domElement.value=this.startValue;
}
catch(ex){
jsExDebug("cellEditBox_t",ex);
}
}
function cellEditBox_keyDownHandler(){
try{
me.domElement.size=me.domElement.value.length+this.LENGTH_BUFFER;
}
catch(ex){
jsExDebug("cellEditBox_t",ex);
}
}
function cellEditBox_autoComplete(){
try{
}
catch(ex){
}
}

try{
cellStyles_t.prototype=new peepelObject_t();
cellStyles_t.prototype.constructor=cellStyles_t;
cellStyles_t.prototype.cleanUp=cellStyles_cleanUp;
cellStyles_t.prototype.cellStyles_super=peepelObject_t.prototype.constructor;
cellStyles_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
cellStyles_t.prototype.toString=cellStyles_toString;
cellStyles_t.prototype.setName=cellStyles_setName;
cellStyles_t.prototype.getName=cellStyles_getName;
cellStyles_t.prototype.setDataStyleName=cellStyles_setDataStyleName;
cellStyles_t.prototype.getDataStyleName=cellStyles_getDataStyleName;
cellStyles_t.prototype.toCssWriter=cellStyles_toCssWriter;
cellStyles_t.prototype.toXml=cellStyles_toXml;
cellStyles_t.prototype.fromXml=cellStyles_fromXml;
cellStyles_t.prototype.copy=cellStyles_copy;
cellStyles_t.prototype.apply=cellStyles_apply;
cellStyles_t.prototype.toggle=cellStyles_toggle;
cellStyles_t.prototype.set=cellStyles_set;
cellStyles_t.prototype.get=cellStyles_get;
cellStyles_t.prototype.setColour=cellStyles_setColour;
cellStyles_t.prototype.getColour=cellStyles_getColour;
cellStyles_t.prototype.setColor=cellStyles_setColour;
cellStyles_t.prototype.setFont=cellStyles_setFont;
cellStyles_t.prototype.getFont=cellStyles_getFont;
cellStyles_t.prototype.BOLD=1;
cellStyles_t.prototype.ITALIC=2;
cellStyles_t.prototype.UNDERLINE=4;
cellStyles_t.prototype.STRIKEOUT=8;
cellStyles_t.prototype.FONT_MASK=15;
cellStyles_t.prototype.ALIGN_LEFT=16;
cellStyles_t.prototype.ALIGN_CENTRE=32;
cellStyles_t.prototype.ALIGN_RIGHT=64;
cellStyles_t.prototype.ALIGN_MASK=112;
cellStyles_t.prototype.VALIGN_TOP=128;
cellStyles_t.prototype.VALIGN_MIDDLE=256;
cellStyles_t.prototype.VALIGN_BOTTOM=512;
cellStyles_t.prototype.VALIGN_MASK=896;
cellStyles_t.prototype.JUSTIFY_TEXT=1024;
cellStyles_t.prototype.BORDER_LEFT=1;
cellStyles_t.prototype.BORDER_RIGHT=2;
cellStyles_t.prototype.BORDER_TOP=4;
cellStyles_t.prototype.BORDER_BOTTOM=8;
cellStyles_t.prototype.BORDER_ALL=16;
cellStyles_t.prototype.BORDER_THIN=32;
cellStyles_t.prototype.BORDER_THICK=64;
cellStyles_t.prototype.BORDER_DOUBLE=128;
}
catch(ex){
jsExDebug("cellStyles_t.prototype",ex);
}
function cellStyles_t(_1){
try{
this.cellStyles_super();
this.styles=0;
this.alignment=0;
this.border=0;
this.textColour="";
this.borderColour="";
this.defaultBorder="";
this.colour="#000000";
this.bgColour="";
this.autoAlign=true;
this.setFont(this.SYSTEM.Settings.get("default_font_family"),fontSizeSelect_t.prototype.VALUE_TO_PT[this.SYSTEM.Settings.get("default_font_size")]+"pt");
this.dataStyleName=null;
this.parentStyleName=null;
}
catch(ex){
jsExDebug("cellStyles_t",ex);
}
}
function cellStyles_cleanUp(me){
try{
if(!me){
me=this;
}
me.styles=null;
me.alignment=null;
me.border=null;
me.textColour=null;
me.borderColour=null;
me.defaultBorder=null;
me.colour=null;
me.bgColour=null;
me.font=null;
me.fontSize=null;
me.autoAlign=null;
me.dataStyleName=null;
me.parentStyleName=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("cellStyles_cleanUp",ex);
}
}
function cellStyles_toString(){
try{
var _3=(this.styles|this.alignment|this.vAlignment)+":"+this.border+":"+this.textColour+":"+this.borderColour+":"+this.fontSize+":"+this.colour+":"+this.bgColour+":"+this.defaultBorder+":"+this.font+":"+this.dataStyleName;
+":"+this.autoAlign;
return _3;
}
catch(ex){
jsExDebug("cellStyles_toString",ex);
}
}
function cellStyles_toCssWriter(){
try{
var _4=new cssWriter_t();
if(this.styles&this.BOLD){
_4.addProperty("font-weight","bold");
}
if(this.styles&this.ITALIC){
_4.addProperty("font-style","italic");
}
if(this.styles&this.UNDERLINE){
_4.addProperty("text-decoration","underline");
}
if(SYSTEM.Environment.userAgentIsIE()){
_4.addProperty("font-size",(parseInt(this.fontSize)*2)+"px");
}else{
_4.addProperty("font-size",this.fontSize);
}
_4.addProperty("font-family",this.font);
_4.addProperty("color",this.colour);
_4.addProperty("background-color",this.bgColour);
if(this.alignment){
if(this.alignment&this.ALIGN_LEFT){
_4.addProperty("text-align","left");
}else{
if(this.alignment&this.ALIGN_RIGHT){
_4.addProperty("text-align","right");
}else{
if(this.alignment&this.ALIGN_CENTRE){
_4.addProperty("text-align","center");
}
}
}
}
return _4;
}
catch(ex){
jsExDebug("cellStyles_toCssWriter",ex);
}
}
function cellStyles_toXml(){
try{
var _5=new xmlWriter_t();
var _6="";
_5.addAttribute("style:name",this.name);
_5.addAttribute("style:family","table-cell");
if(this.dataStyleName){
_5.addAttribute("style:data-style-name",this.dataStyleName);
}
_6+=_5.createElement("style:style");
if(this.styles&this.BOLD){
_5.addAttribute("fo:font-weight","bold");
}
if(this.styles&this.ITALIC){
_5.addAttribute("fo:font-style","italic");
}
if(this.styles&this.UNDERLINE){
_5.addAttribute("style:text-underline-type","single");
}
_5.addAttribute("style:font-face",this.font);
_5.addAttribute("style:font-size",this.fontSize);
if(this.styles&this.STRIKEOUT){
_5.addAttribute("style:text-line-through-mode","continuous");
}
_5.addAttribute("fo:color",this.colour);
_5.addAttribute("fo:background-color",this.bgColour);
_6+=_5.createClosedElement("style:text-properties");
if(this.autoAlign){
_5.addAttribute("style:text-align-source","value-type");
_6+=_5.createClosedElement("style:table-cell-properties");
}else{
_5.addAttribute("style:text-align-source","fix");
_6+=_5.createClosedElement("style:table-cell-properties");
if(this.alignment){
var _7="";
switch(this.alignment){
case this.ALIGN_CENTRE:
_7="center";
break;
case this.ALIGN_RIGHT:
_7="end";
break;
default:
_7="left";
break;
}
_5.addAttribute("fo:text-align",_7);
_6+=_5.createClosedElement("style:paragraph-properties");
}
}
_6+=_5.closeElement("style:style");
return _6;
}
catch(ex){
jsExDebug("cellStyles_toXml",ex);
}
}
function cellStyles_fromXml(_8){
try{
var _9=_8.getAttribute("style:name");
this.setName(_9);
var _a=_8.getAttribute("style:data-style-name");
if(_a){
this.setDataStyleName(_a);
}else{
this.parentStyleName=_8.getAttribute("style:parent-style-name");
}
for(var j=0;j<_8.childNodes.length;j++){
var _c=_8.childNodes[j];
switch(_c.nodeName){
case "style:text-properties":
if(_c.getAttribute("fo:font-weight")){
if(_c.getAttribute("fo:font-weight")=="bold"){
this.set(this.BOLD);
}
}
if(_c.getAttribute("fo:font-style")){
if(_c.getAttribute("fo:font-style")=="italic"){
this.set(this.ITALIC);
}
}
if(_c.getAttribute("style:text-underline-type")){
if(_c.getAttribute("style:text-underline-type")=="single"){
this.set(this.UNDERLINE);
}
}else{
if(_c.getAttribute("style:text-underline-style")&&_c.getAttribute("style:text-underline-style")=="solid"){
this.set(this.UNDERLINE);
}
}
this.setColour(_c.getAttribute("fo:color"),_c.getAttribute("fo:background-color"));
if(_c.getAttribute("style:text-line-through-mode")){
if(_c.getAttribute("style:text-line-through-mode")=="continuous"){
this.set(this.STRIKEOUT);
}
}
var _d=_c.getAttribute("style:font-face");
var _e=_c.getAttribute("style:font-size");
if(_d||_e){
this.setFont(_c.getAttribute("style:font-face"),_c.getAttribute("style:font-size"));
}else{
this.setFont(_c.getAttribute("style:font-name"),_c.getAttribute("fo:font-size"));
}
break;
case "style:table-cell-properties":
if(_c.getAttribute("style:text-align-source")){
var _f=_c.getAttribute("style:text-align-source");
if(_f=="fix"){
this.autoAlign=false;
}else{
if(_f=="value-type"){
this.autoAlign=true;
}
}
}
this.setColour(_c.getAttribute("fo:color"),_c.getAttribute("fo:background-color"));
break;
case "style:paragraph-properties":
var _10;
if(!this.autoAlign&&_c.getAttribute("fo:text-align")){
_10=_c.getAttribute("fo:text-align");
if(_10=="center"){
this.set(this.ALIGN_CENTRE);
}else{
if(_10=="end"){
this.set(this.ALIGN_RIGHT);
}else{
this.set(this.ALIGN_LEFT);
}
}
}
break;
}
}
}
catch(ex){
jsExDebug("cellStyles_fromXml",ex);
}
}
function cellStyles_setName(_11){
try{
this.name=_11;
}
catch(ex){
jsExDebug("cellStyles_setName",ex);
}
}
function cellStyles_getName(){
try{
return this.name;
}
catch(ex){
jsExDebug("cellStyles_getName",ex);
}
}
function cellStyles_setDataStyleName(_12){
try{
this.dataStyleName=_12;
}
catch(ex){
jsExDebug("cellStyles_setDataStyleName",ex);
}
}
function cellStyles_getDataStyleName(_13){
try{
return this.dataStyleName;
}
catch(ex){
jsExDebug("cellStyles_getDataStyleName",ex);
}
}
function cellStyles_copy(){
try{
var _14=new cellStyles_t();
_14.styles=this.styles;
_14.alignment=this.alignment;
_14.vAlignment=this.vAlignment;
_14.border=this.border;
_14.textColour=this.textColour;
_14.borderColour=this.borderColour;
_14.colour=this.colour;
_14.bgColour=this.bgColour;
_14.defaultBorder=this.defaultBorder;
_14.font=this.font;
_14.fontSize=this.fontSize;
_14.dataStyleName=this.dataStyleName;
_14.autoAlign=this.autoAlign;
return _14;
}
catch(ex){
jsExDebug("cellStyles_copy",ex);
}
}
function cellStyles_setColour(_15,_16){
try{
if(_15){
this.colour=_15;
}
if(_16){
this.bgColour=_16;
}
}
catch(ex){
jsExDebug("cellStyles_colour",ex);
}
}
function cellStyles_getColour(){
try{
return {text:this.colour,background:this.bgColour};
}
catch(ex){
jsExDebug("cellStyles_getColour",ex);
}
}
function cellStyles_setFont(_17,_18){
try{
if(_17){
this.font=_17;
}
if(_18){
if(_18.match(/pt/)){
var _19=parseInt(_18.replace(/pt/,""));
switch(_19){
case 8:
_18="11px";
break;
case 9:
case 10:
_18="14px";
break;
case 12:
_18="17px";
break;
case 13:
case 14:
_18="20px";
break;
case 15:
case 16:
case 17:
case 18:
_18="24px";
break;
case 24:
_18="31px";
break;
case 36:
_18="43px";
break;
default:
if(_19>36){
_18="43px";
}else{
if(_19<8){
_18="11px";
}else{
if(_19>18&&_19<24){
_18="31px";
}else{
if(_19>24&&_19<36){
_18="43px";
}
}
}
}
}
}
this.fontSize=_18;
}
}
catch(ex){
jsExDebug("cellStyles_setFont",ex);
}
}
function cellStyles_getFont(){
try{
return {family:this.font,size:this.fontSize};
}
catch(ex){
jsExDebug("cellStyles_getFont",ex);
}
}
function cellStyles_set(_1a,_1b){
try{
if(_1a&this.ALIGN_MASK){
if(_1b){
this.alignment=_1a;
}else{
this.alignment^=_1a;
}
}else{
if(_1a&this.VALIGN_MASK){
if(_1b){
this.vAlignment=_1a;
}else{
this.vAlignment^=_1a;
}
}else{
if(_1b){
this.styles|=_1a;
}else{
this.styles^=_1a;
}
}
}
}
catch(ex){
jsExDebug("cellStyles_set",ex);
}
}
function cellStyles_get(){
try{
return this.alignment|this.vAlignment|this.styles;
}
catch(ex){
jsExDebug("cellStyles_get",ex);
}
}
function cellStyles_toggle(_1c){
try{
if(_1c&this.ALIGN_MASK){
this.alignment^=_1c;
}else{
this.styles^=_1c;
}
}
catch(ex){
jsExDebug("cellStyles_toggle",ex);
}
}
function cellStyles_apply(_1d){
try{
if(this.styles&this.FONT_MASK){
if(this.styles&this.BOLD){
_1d.style.fontWeight="bold";
}else{
_1d.style.fontWeight="normal";
}
if(this.styles&this.UNDERLINE){
if(this.styles&this.STRIKEOUT){
_1d.style.textDecoration="underline line-through";
}else{
_1d.style.textDecoration="underline";
}
}else{
if(this.styles&this.STRIKEOUT){
_1d.style.textDecoration="line-through";
}else{
_1d.style.textDecoration="";
}
}
if(this.styles&this.ITALIC){
_1d.style.fontStyle="italic";
}else{
_1d.style.fontStyle="";
}
}else{
_1d.style.fontWeight="normal";
_1d.style.textDecoration="";
_1d.style.fontStyle="";
}
if(this.alignment){
if(this.alignment&this.ALIGN_LEFT){
_1d.style.textAlign="left";
}else{
if(this.alignment&this.ALIGN_RIGHT){
_1d.style.textAlign="right";
}else{
if(this.alignment&this.ALIGN_CENTRE){
_1d.style.textAlign="center";
}else{
_1d.style.textAlign="";
}
}
}
}else{
_1d.style.textAlign="";
}
if(this.vAlignment){
if(this.vAlignment&this.VALIGN_BOTTOM){
_1d.style.verticalAlign="bottom";
}else{
if(this.vAlignment&this.VALIGN_MIDDLE){
_1d.style.verticalAlign="middle";
}else{
if(this.vAlignment&this.VALIGN_TOP){
_1d.style.verticalAlign="top";
}else{
_1d.style.verticalAlign="";
}
}
}
}else{
_1d.style.verticalAlign="";
}
if(this.styles&this.JUSTIFY_TEXT){
_1d.style.textAlign="justify";
}
_1d.style.color=this.colour;
_1d.style.backgroundColor=this.bgColour;
_1d.style.fontFamily=this.font;
_1d.style.fontSize=this.fontSize;
return;
}
catch(ex){
jsExDebug("cellStyles_apply",ex);
}
}

cellChain_t.prototype=new peepelObject_t();
cellChain_t.prototype.constructor=cellChain_t;
cellChain_t.prototype.cleanUp=cellChain_cleanUp;
cellChain_t.prototype.cellChain_super=peepelObject_t.prototype.constructor;
cellChain_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
cellChain_t.prototype.reset=cellChain_reset;
cellChain_t.prototype.addDependant=cellChain_addDependant;
cellChain_t.prototype.removeDependant=cellChain_removeDependant;
cellChain_t.prototype.getSupportChain=cellChain_getSupportChain;
cellChain_t.prototype.getDependantChain=cellChain_getDependantChain;
cellChain_t.prototype.clearDependant=cellChain_clearDependant;
cellChain_t.prototype.getDependantChain=cellChain_getDependantChain;
cellChain_t.prototype.invoke=cellChain_invoke;
cellChain_t.prototype.buildChain=cellChain_buildChain;
cellChain_t.prototype.print=cellChain_print;
function cellChain_t(){
try{
this.cellChain_super();
this.supports={};
this.supports.hash={};
this.supports.list=[];
this.dependants={};
this.dependants.hash={};
this.dependants.list=[];
}
catch(ex){
jsExDebug("cellChain_t",ex);
}
}
function cellChain_cleanUp(me){
try{
if(!me){
me=this;
}
for(var _2 in me.supports.hash){
if(me.supports.hash[_2]){
for(var _3 in me.supports.hash[_2].hash){
me.supports.hash[_2].hash[_3].value=null;
me.supports.hash[_2].hash[_3].index=null;
me.supports.hash[_2].hash[_3]=null;
}
for(var i=0;i<me.supports.hash[_2].list.length;i++){
me.supports.hash[_2].list[i]=null;
}
me.supports.hash[_2].hash=null;
me.supports.hash[_2].list=null;
me.supports.hash[_2].value=null;
me.supports.hash[_2].index=null;
me.supports.hash[_2].dependantCount=null;
me.supports.hash[_2]=null;
}
}
for(var i=0;i<me.supports.list.length;i++){
if(me.supports.list[i]){
me.supports.list[i].hash=null;
me.supports.list[i].list=null;
me.supports.list[i].value=null;
me.supports.list[i].index=null;
me.supports.list[i].dependantCount=null;
me.supports.list[i]=null;
}
}
me.supports.hash=null;
me.supports.list=null;
me.supports=null;
for(var _2 in me.dependants.hash){
if(me.dependants.hash[_2]){
for(var _3 in me.dependants.hash[_2].hash){
me.dependants.hash[_2].hash[_3].value=null;
me.dependants.hash[_2].hash[_3].index=null;
me.dependants.hash[_2].hash[_3]=null;
}
for(var i=0;i<me.dependants.hash[_2].list.length;i++){
me.dependants.hash[_2].list[i]=null;
}
me.dependants.hash[_2].hash=null;
me.dependants.hash[_2].list=null;
me.dependants.hash[_2].value=null;
me.dependants.hash[_2].index=null;
me.dependants.hash[_2]=null;
}
}
for(var i=0;i<me.dependants.list.length;i++){
if(me.dependants.list[i]){
me.dependants.list[i].hash=null;
me.dependants.list[i].list=null;
me.dependants.list[i].value=null;
me.dependants.list[i].index=null;
me.dependants.list[i]=null;
}
}
me.dependants.hash=null;
me.dependants.list=null;
me.dependants=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("cellChain_cleanUp",ex);
}
}
function cellChain_reset(){
try{
this.supports={};
this.supports.hash={};
this.supports.list=[];
this.dependants={};
this.dependants.hash={};
this.dependants.list=[];
}
catch(ex){
jsExDebug("cellChain_reset",ex);
}
}
function cellChain_addDependant(_5,_6){
try{
_5=_5.toUpperCase();
_6=_6.toUpperCase();
if(this.supports.hash[_6]){
var _7=this.supports.hash[_6];
if(_7.hash[_5]){
return;
}
}else{
var _7={};
_7.hash={};
_7.list=[];
_7.value=_6;
_7.index=this.supports.list.push(_7);
_7.dependantCount=0;
this.supports.hash[_6]=_7;
}
_7.hash[_5]={};
_7.hash[_5].value=_5;
_7.hash[_5].index=_7.list.push(_5);
_7.dependantCount++;
if(this.dependants.hash[_5]){
var _8=this.dependants.hash[_5];
}else{
var _8={};
_8.hash={};
_8.list=[];
_8.value=_5;
_8.index=this.dependants.list.push(_8);
this.dependants.hash[_5]=_8;
}
_8.hash[_6]=_6;
_8.list.push(_6);
}
catch(ex){
jsExDebug("cellchain_addDependant",ex);
}
}
function cellChain_removeDependant(_9,_a){
try{
_9=_9.toUpperCase();
_a=_a.toUpperCase();
var _b=this.supports.hash[_a];
var _c=this.dependants.hash[_9];
_b.list[_b.hash[_9].index]=null;
delete _b.list[_b.hash[_9].index];
_b.hash[_9]=null;
delete _b.hash[_9];
_b.dependantCount--;
if(_b.dependantCount==0){
var _d=_b.index;
this.supports.hash[_a]=null;
delete this.supports.hash[_a];
this.supports.list[_d]=null;
delete this.supports.list[_d];
this.supports.hash[_a];
}
_c.list[_c.hash[_a].index]=null;
delete _c.list[_c.hash[_a].index];
_c.hash[_a]=null;
delete _c.hash[_a];
}
catch(ex){
jsExDebug("cellChain_removeDependant",ex);
}
}
function cellChain_getSupportChain(_e){
try{
_e=_e.toUpperCase();
if(!_e){
jsDebug("cellChain_getSupportChain: called with no dependant name");
}
return this.buildChain(_e);
}
catch(ex){
jsExDebug("cellChain_getSupportChain",ex);
}
}
function cellChain_clearDependant(_f){
try{
_f=_f.toUpperCase();
var _10=this.dependants.hash[_f];
if(!_10){
return;
}
for(var i=_10.list.length-1;i>=0;i--){
if(_10.list[i]){
this.removeDependant(_10.value,_10.list[i]);
}
}
var _12=_10.index;
this.dependants.hash[_f]=null;
delete this.dependants.hash[_f];
this.dependants.list[_12]=null;
delete this.dependants.list[_12];
}
catch(ex){
jsExDebug("cellChain_clearDependant",ex);
}
}
function cellChain_getDependantChain(_13){
try{
_13=_13.toUpperCase();
if(!_13){
jsDebug("cellChain_getSupportChain: called with no support name");
}
var _14=this.buildChain(_13);
if(_14==null){
return null;
}
for(var i=0;i<_14.length;i++){
if(_14[i]==_13){
return _14.slice(i);
}
}
jsDebug("Should not reach here cellChain_getDependantChain");
}
catch(ex){
jsExDebug("cellChain_getDependantChain",ex);
}
}
function cellChain_invoke(_16,_17){
try{
_17=_17.toUpperCase();
var _18=this.buildChain(_17);
if(_18==null){
_16.invoke(null);
return;
}
for(var i=_18.length-1;i>=0;i--){
_16.invoke(_18[i]);
}
}
catch(ex){
jsExDebug("cellChain_invoke",ex);
}
}
function cellChain_buildChain(_1a){
_1a=_1a.toUpperCase();
function downSupportsDependancies(_1b,_1c){
try{
if(!_1d[_1b.value]){
if(_1e[_1b.value]){
return;
}
_1d[_1b.value]=_1c;
_1d.push(_1b.value);
var _1f=null;
if(this.supports.hash[_1b.value]){
_1f=this.supports.hash[_1b.value];
for(var i=_1f.list.length-1;i>=0;i--){
if(_1f.list[i]){
downSupportsDependancies.call(this,this.dependants.hash[_1f.list[i]],_1c);
}
}
}
}else{
delete _1d[_1b.value];
for(var i=0;i<_1d.length;i++){
if(_1d[i]==_1b.value){
_1d[i]=null;
delete _1d[i];
}
}
if(!_1e[_1b.value]){
_1e[_1b.value]=_1c;
_1e.push(_1b.value);
}
return;
}
}
catch(ex){
jsExDebug("downSupportsDependancies",ex);
}
}
function doDependant(_21,_22){
try{
for(var i=_21.list.length-1;i>=0;i--){
if(_21.list[i]){
doSupport.call(this,this.supports.hash[_21.list[i]],_22);
}
}
}
catch(ex){
jsExDebug("cellChain_buildChain:doDependant",ex);
}
}
function doSupport(_24,_25){
try{
if(_1d[_24.value]){
return;
}
_1d[_24.value]=_25;
if(this.dependants.hash[_24.value]){
doDependant.call(this,this.dependants.hash[_24.value],_25);
}
_1d.push(_24.value);
}
catch(ex){
jsExDebug("cellChain_buildChain:doSupport",ex);
}
}
try{
var _1d=[];
var _1e=[];
if(arguments.length==0){
var _26=null;
for(var j=this.supports.list.length-1;j>=0;j--){
if(this.supports.list[j]){
_26=this.supports.list[j];
doSupport.call(this,_26,j+1);
}
}
var _28=null;
for(var i=this.dependants.list.length-1;i>=0;i--){
if(this.dependants.list[i]){
_28=this.dependants.list[i];
if(!_1d[_28.value]){
_1d.push(_28.value);
}
}
}
}else{
if(_1a&&this.supports.hash[_1a]){
var _26=this.supports.hash[_1a];
downSupportsDependancies.call(this,_26,1);
var _2a=null;
var _2b=null;
var _2c=null;
for(var i=0;i<_1e.length;i++){
_2a=_1e[i];
if(_2a){
if(this.supports.hash[_2a]){
_2b=this.supports.hash[_2a];
for(var j=_2b.list.length-1;j>=0;j--){
_2c=_2b.list[j];
if(_2c){
if(_1d[_2c]){
delete _1d[_2c];
for(var k=0;k<_1d.length;k++){
if(_1d[k]==_2c){
_1d[k]=null;
delete _1d[k];
}
}
_1e[_2c]=1;
_1e.push(_2c);
}else{
if(_1e[_2c]){
for(var k=0;k<_1e.length;k++){
if(_1e[k]==_2c){
delete _1e[k];
_1e[k]=null;
}
}
_1e.push(_2c);
}
}
}
}
}
var _2e=0;
for(var l=0;l<_1d.length;l++){
if(_1d[l]){
_2e++;
}
}
if(_2e==0){
return null;
}
}
}
_1d=_1d.concat(_1e);
}else{
if(_1a&&this.dependants.hash[_1a]){
var _28=this.dependants.hash[_1a];
doSupport.call(this,_28,1);
}else{
if(_1a){
if(!_1d[_1a]){
_1d[_1a]=1;
_1d.push(_1a);
}
}
}
}
}
return _1d;
}
catch(ex){
jsExDebug("cellChain_buildChain",ex);
}
}
function cellChain_print(){
try{
var str="";
for(var j=this.supports.list.length-1;j>=0;j--){
if(this.supports.list[j]){
var _32=this.supports.list[j];
str+="s: "+_32.value+"( ";
for(var i=_32.list.length-1;i>=0;i--){
if(_32.list[i]){
str+="d:"+_32.list[i];
}
}
str+=") \n";
}
}
return str;
}
catch(ex){
jsExDebug("cellChain_print",ex);
}
}

try{
columnStyles_t.prototype=new peepelObject_t();
columnStyles_t.prototype.constructor=columnStyles_t;
columnStyles_t.prototype.cleanUp=columnStyles_cleanUp;
columnStyles_t.prototype.columnStyles_super=peepelObject_t.prototype.constructor;
columnStyles_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
columnStyles_t.prototype.toString=columnStyles_toString;
columnStyles_t.prototype.toXml=columnStyles_toXml;
columnStyles_t.prototype.fromXml=columnStyles_fromXml;
columnStyles_t.prototype.setName=columnStyles_setName;
columnStyles_t.prototype.getName=columnStyles_getName;
columnStyles_t.prototype.copy=columnStyles_copy;
columnStyles_t.prototype.convertWidthToCm=columnStyles_convertWidthToCm;
columnStyles_t.prototype.convertWidthFromCm=columnStyles_convertWidthFromCm;
columnStyles_t.prototype.PIXELS_PER_CM=30;
columnStyles_t.prototype.PIXELS_DEFAULT_WIDTH_CM=2.67;
}
catch(ex){
jsExDebug("columnStyles_t.prototype",ex);
}
function columnStyles_t(_1){
try{
this.columnStyles_super();
this.name=null;
this.pixelWidth=_1;
}
catch(ex){
jsExDebug("columnStyles_t",ex);
}
}
function columnStyles_cleanUp(me){
try{
if(!me){
me=this;
}
me.name=null;
me.pixelWidth=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("columnStyles_cleanUp",ex);
}
}
function columnStyles_toString(){
try{
return this.pixelWidth;
}
catch(ex){
jsExDebug("columnStyles_toString",ex);
}
}
function columnStyles_toXml(){
try{
var _3=new xmlWriter_t();
var _4="";
_3.addAttribute("style:name",this.name);
_3.addAttribute("style:family","table-column");
_4+=_3.createElement("style:style");
_3.addAttribute("style:column-width",this.convertWidthToCm(this.pixelWidth));
_4+=_3.createClosedElement("style:table-column-properties");
_4+=_3.closeElement("style:style");
return _4;
}
catch(ex){
jsExDebug("columnStyles_toXml",ex);
}
}
function columnStyles_fromXml(_5){
try{
this.name=_5.getAttribute("style:name");
for(var i=0;i<_5.childNodes.length;i++){
var _7=_5.childNodes[i];
if(_7&&(_7.nodeName=="style:table-column-properties")){
this.pixelWidth=this.convertWidthFromCm(parseFloat(_7.getAttribute("style:column-width")));
}
}
}
catch(ex){
jsExDebug("columnStyles_fromXml",ex);
}
}
function columnStyles_setName(_8){
try{
this.name=_8;
}
catch(ex){
jsExDebug("columnStyles_setName",ex);
}
}
function columnStyles_getName(){
try{
return this.name;
}
catch(ex){
jsExDebug("columnStyles_getName",ex);
}
}
function columnStyles_convertWidthToCm(_9){
try{
return (_9/this.PIXELS_PER_CM)+"cm";
}
catch(ex){
jsExDebug("columnStyles_convertWidthToCm",ex);
}
}
function columnStyles_convertWidthFromCm(_a){
try{
return (_a*this.PIXELS_PER_CM);
}
catch(ex){
jsExDebug("columnStyles_convertWidthFromCm",ex);
}
}
function columnStyles_copy(){
try{
var _b=new columnStyles_t(this.pixelWidth);
return _b;
}
catch(ex){
jsExDebug("columnStyles_copy",ex);
}
}

try{
column_t.prototype=new peepelObject_t();
column_t.prototype.constructor=column_t;
column_t.prototype.cleanUp=column_cleanUp;
column_t.prototype.column_super=peepelObject_t.prototype.constructor;
column_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
column_t.prototype.setStyle=column_setStyle;
column_t.prototype.toggleStyle=column_toggleStyle;
column_t.prototype.getStyle=column_getStyle;
column_t.prototype.getStyleRef=column_getStyleRef;
column_t.prototype.getColumnStyleRef=column_getColumnStyleRef;
column_t.prototype.setWidth=column_setwidth;
column_t.prototype.getWidth=column_getwidth;
column_t.prototype.copyColumnStyle=column_copyColumnStyle;
column_t.prototype.DEFAULT_CELL_WIDTH=widgetTable_t.prototype.DEFAULT_CELL_WIDTH;
}
catch(ex){
jsExDebug("column_t.prototype",ex);
}
function column_t(){
try{
this.column_super();
this.cellstyle=new cellStyles_t();
this.columnStyle=new columnStyles_t(this.DEFAULT_CELL_WIDTH);
this.width=this.DEFAULT_CELL_WIDTH;
}
catch(ex){
jsExDebug("column_t",ex);
}
}
function column_cleanUp(me){
try{
if(!me){
me=this;
}
me.cellstyle.cleanUp();
me.cellstyle=null;
me.columnStyle.cleanUp();
me.columnStyle=null;
me.width=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("column_cleanUp",ex);
}
}
function column_setStyle(_2,_3){
try{
this.cellstyle.set(_2,_3);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y);
}
}
catch(ex){
jsExDebug("column_setStyle",ex);
}
}
function column_toggleStyle(_4){
try{
this.cellstyle.toggle(_4);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y);
}
}
catch(ex){
jsExDebug("column_toggleStyle",ex);
}
}
function column_getStyle(){
try{
return this.cellstyle.get();
}
catch(ex){
jsExDebug("column_getStyle",ex);
}
}
function column_getStyleRef(){
try{
return this.cellstyle;
}
catch(ex){
jsExDebug("column_getStyleRef",ex);
}
}
function column_getColumnStyleRef(){
try{
return this.columnStyle;
}
catch(ex){
jsExDebug("column_getColumnStyleRef",ex);
}
}
function column_setwidth(_5){
try{
this.width=_5;
this.columnStyle.pixelWidth=_5;
}
catch(ex){
jsExDebug("column_setwidth",ex);
}
}
function column_getwidth(){
try{
return this.width;
}
catch(ex){
jsExDebug("column_getwidth",ex);
}
}
function column_copyColumnStyle(_6){
try{
this.columnStyle.cleanUp();
this.columnStyle=_6.copy();
this.width=this.columnStyle.pixelWidth;
}
catch(ex){
jsExDebug("column_copyColumnStyle",ex);
}
}

row_t.prototype=new peepelObject_t();
row_t.prototype.constructor=row_t;
row_t.prototype.cleanUp=row_cleanUp;
row_t.prototype.row_super=peepelObject_t.prototype.constructor;
row_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
row_t.prototype.setStyle=row_setStyle;
row_t.prototype.toggleStyle=row_toggleStyle;
row_t.prototype.getStyle=row_getStyle;
row_t.prototype.getStyleRef=row_getStyleRef;
row_t.prototype.getRowStyleRef=row_getRowStyleRef;
row_t.prototype.setHeight=row_setHeight;
row_t.prototype.getHeight=row_getHeight;
row_t.prototype.setFontHeight=row_setFontHeight;
row_t.prototype.calculateMaxFontHeight=row_calculateMaxFontHeight;
row_t.prototype.copyRowStyle=row_copyRowStyle;
row_t.prototype.DEFAULT_CELL_HEIGHT=widgetTable_t.prototype.DEFAULT_CELL_HEIGHT;
row_t.prototype.HEIGHT_MULTIPLIER=1.7;
function row_t(){
try{
this.row_super();
this.cellStyle=new cellStyles_t();
this.rowStyle=new rowStyles_t(this.DEFAULT_CELL_HEIGHT,null);
this.height=this.DEFAULT_CELL_HEIGHT;
this.fontHeight=this.DEFAULT_CELL_HEIGHT;
this.fontHeights=[];
}
catch(ex){
jsExDebug("row_t",ex);
}
}
function row_cleanUp(me){
try{
if(!me){
me=this;
}
me.cellStyle.cleanUp();
me.cellStyle=null;
me.rowStyle.cleanUp();
me.rowStyle=null;
me.height=null;
me.fontHeight=null;
for(var i=0;i<me.fontHeights.length;i++){
me.fontHeights[i]=null;
delete me.fontHeights[i];
}
me.fontHeights=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("row_cleanUp",ex);
}
}
function row_setStyle(_3,_4){
try{
this.cellStyle.set(_3,_4);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y);
}
}
catch(ex){
jsExDebug("row_setStyle",ex);
}
}
function row_toggleStyle(_5){
try{
this.cellStyle.toggle(_5);
if(this.notifyStyleChangeDelegate){
this.notifyStyleChangeDelegate.invoke(this.x,this.y);
}
}
catch(ex){
jsExDebug("row_toggleStyle",ex);
}
}
function row_getStyle(){
try{
return this.cellStyle.get();
}
catch(ex){
jsExDebug("row_getStyle",ex);
}
}
function row_getStyleRef(){
try{
return this.cellStyle;
}
catch(ex){
jsExDebug("row_getStyleRef",ex);
}
}
function row_getRowStyleRef(){
try{
return this.rowStyle;
}
catch(ex){
jsExDebug("row_getRowStyleRef",ex);
}
}
function row_setHeight(_6){
try{
this.height=_6;
this.rowStyle.pixelHeight=_6;
}
catch(ex){
jsExDebug("row_setHeight",ex);
}
}
function row_getHeight(){
try{
if(this.fontHeight>this.height){
return this.fontHeight;
}
return this.height;
}
catch(ex){
jsExDebug("row_getHeight",ex);
}
}
function row_calculateMaxFontHeight(){
try{
var _7=this.DEFAULT_CELL_HEIGHT;
for(var i=0;i<this.fontHeights.length;i++){
if(this.fontHeights[i]>_7){
_7=this.fontHeights[i];
}
}
this.fontHeight=_7;
if(this.fontHeight>this.height){
this.rowStyle.pixelHeight=this.fontHeight;
}
}
catch(ex){
jsExDebug("row_calculateMaxFontHeight",ex);
}
}
function row_setFontHeight(_9,_a){
try{
_a=parseInt(_a*this.HEIGHT_MULTIPLIER);
if(_9!=null){
this.fontHeights[_9]=_a;
this.calculateMaxFontHeight();
}else{
}
}
catch(ex){
jsExDebug("row_setFontHeight",ex);
}
}
function row_copyRowStyle(_b){
try{
this.rowStyle.cleanUp();
this.rowStyle=_b.copy();
this.height=this.rowStyle.pixelHeight;
}
catch(ex){
jsExDebug("row_copyRowStyle",ex);
}
}

try{
spreadTable_t.prototype=new widgetScrollTable_t();
spreadTable_t.prototype.constructor=spreadTable_t;
spreadTable_t.prototype.spreadTable_super=widgetScrollTable_t.prototype.constructor;
spreadTable_t.prototype.widgetScrollTable_cleanUp=widgetScrollTable_t.prototype.cleanUp;
spreadTable_t.prototype.super_keyPressHandler=widgetTable_t.prototype.keyPressHandler;
spreadTable_t.prototype.super_keyDownHandler=widgetTable_t.prototype.keyDownHandler;
spreadTable_t.prototype.cleanUp=spreadTable_cleanUp;
spreadTable_t.prototype.widgetScrollTable_createDom=widgetScrollTable_t.prototype.createDom;
spreadTable_t.prototype.createDom=spreadTable_createDom;
spreadTable_t.prototype.widgetScrollTable_setDimensions=widgetScrollTable_t.prototype.setDimensions;
spreadTable_t.prototype.setDimensions=spreadTable_setDimensions;
spreadTable_t.prototype.addBlankFirstSheet=spreadTable_addBlankFirstSheet;
spreadTable_t.prototype.setColour=spreadTable_setColour;
spreadTable_t.prototype.getColour=spreadTable_getColour;
spreadTable_t.prototype.setFont=spreadTable_setFont;
spreadTable_t.prototype.getFont=spreadTable_getFont;
spreadTable_t.prototype.setStyle=spreadTable_setStyle;
spreadTable_t.prototype.getStyle=spreadTable_getStyle;
spreadTable_t.prototype.toggleStyle=spreadTable_toggleStyle;
spreadTable_t.prototype.clearStyle=spreadTable_clearStyle;
spreadTable_t.prototype.decreaseDecimalPlace=spreadTable_decreaseDecimalPlace;
spreadTable_t.prototype.increaseDecimalPlace=spreadTable_increaseDecimalPlace;
spreadTable_t.prototype.autoFormula=spreadTable_autoFormula;
spreadTable_t.prototype.setType=spreadTable_setType;
spreadTable_t.prototype.setFormula=spreadTable_setFormula;
spreadTable_t.prototype.deleteCells=spreadTable_deleteCells;
spreadTable_t.prototype.getSaveData=spreadTable_getSaveData;
spreadTable_t.prototype.load=spreadTable_load;
spreadTable_t.prototype.print=spreadTable_print;
spreadTable_t.prototype.printGecko=spreadTable_printGecko;
spreadTable_t.prototype.printIE=spreadTable_printIE;
spreadTable_t.prototype.appendCharacter=spreadTable_appendCharacter;
spreadTable_t.prototype.addSheet=spreadTable_addSheet;
spreadTable_t.prototype.selectSheet=spreadTable_selectSheet;
spreadTable_t.prototype.getSheetList=spreadTable_getSheetList;
spreadTable_t.prototype.setSheetName=spreadTable_setSheetName;
spreadTable_t.prototype.getSheetName=spreadTable_getSheetName;
spreadTable_t.prototype.insertRows=spreadTable_insertRows;
spreadTable_t.prototype.insertColumns=spreadTable_insertColumns;
spreadTable_t.prototype.deleteRows=spreadTable_deleteRows;
spreadTable_t.prototype.deleteColumns=spreadTable_deleteColumns;
spreadTable_t.prototype.disableAutoAlign=spreadTable_disableAutoAlign;
spreadTable_t.prototype.getActiveCellData=spreadTable_getActiveCellData;
spreadTable_t.prototype.mergeCells=spreadTable_mergeCells;
spreadTable_t.prototype.reCalculateTable=spreadTable_reCalculateTable;
spreadTable_t.prototype.pageUp=spreadTable_pageUp;
spreadTable_t.prototype.pageDown=spreadTable_pageDown;
spreadTable_t.prototype.jumpToStartOfRow=spreadTable_jumpToStartOfRow;
spreadTable_t.prototype.editActiveCell=spreadTable_editActiveCell;
spreadTable_t.prototype.jumpToLastRowContent=spreadTable_jumpToLastRowContent;
spreadTable_t.prototype.jumpToContentEnd=spreadTable_jumpToContentEnd;
spreadTable_t.prototype.selectAllContent=spreadTable_selectAllContent;
spreadTable_t.prototype.jumpToPreviousRowContent=spreadTable_jumpToPreviousRowContent;
spreadTable_t.prototype.jumpToNextRowContent=spreadTable_jumpToNextRowContent;
spreadTable_t.prototype.jumpToPreviousColumnContent=spreadTable_jumpToPreviousColumnContent;
spreadTable_t.prototype.jumpToNextColumnContent=spreadTable_jumpToNextColumnContent;
spreadTable_t.prototype.cut=spreadTable_cut;
spreadTable_t.prototype.copy=spreadTable_copy;
spreadTable_t.prototype.paste=spreadTable_paste;
spreadTable_t.prototype.keyPressHandler=spreadTable_keyPressHandler;
spreadTable_t.prototype.keyDownHandler=spreadTable_keyDownHandler;
spreadTable_t.prototype.mouseDownHandler=spreadTable_mouseDownHandler;
spreadTable_t.prototype.dragOverHandler=spreadTable_dragOverHandler;
spreadTable_t.prototype.sheetListAddSheetEvent=spreadTable_sheetListAddSheetEvent;
spreadTable_t.prototype.sheetListItemSelectEvent=spreadTable_sheetListItemSelectEvent;
spreadTable_t.prototype.redraw=spreadTable_redraw;
spreadTable_t.prototype.SHEET_LIST_WIDTH_PERCENT=0.7;
spreadTable_t.prototype.BOLD=1;
spreadTable_t.prototype.ITALIC=2;
spreadTable_t.prototype.UNDERLINE=4;
spreadTable_t.prototype.STRIKEOUT=8;
spreadTable_t.prototype.FONT_MASK=15;
spreadTable_t.prototype.ALIGN_LEFT=16;
spreadTable_t.prototype.ALIGN_CENTRE=32;
spreadTable_t.prototype.ALIGN_RIGHT=64;
spreadTable_t.prototype.ALIGN_MASK=112;
spreadTable_t.prototype.VALIGN_TOP=128;
spreadTable_t.prototype.VALIGN_MIDDLE=256;
spreadTable_t.prototype.VALIGN_BOTTOM=512;
spreadTable_t.prototype.VALIGN_MASK=896;
spreadTable_t.prototype.JUSTIFY_TEXT=1024;
spreadTable_t.prototype.GENERAL_TYPE=1;
spreadTable_t.prototype.CURRENCY_TYPE=2;
spreadTable_t.prototype.NUMBER_TYPE=3;
spreadTable_t.prototype.ACCOUNTING_TYPE=4;
spreadTable_t.prototype.PERCENTAGE_TYPE=8;
spreadTable_t.prototype.TEXT_TYPE=16;
spreadTable_t.prototype.TIME_TYPE=32;
spreadTable_t.prototype.DATE_TYPE=64;
spreadTable_t.prototype.ERROR_TYPE=128;
spreadTable_t.prototype.STRING_TYPE=256;
spreadTable_t.prototype.BOOLEAN_TYPE=512;
spreadTable_t.prototype.NEGATIVE_STYLE_HIGHLIGHT=1;
spreadTable_t.prototype.NEGATIVE_STYLE_BRACE=2;
spreadTable_t.prototype.NEGATIVE_STYLE_NOSYMBOL=4;
spreadTable_t.prototype.FILE_ERROR_LAST_SAVE=1;
spreadTable_t.prototype.FILE_SAVED=2;
spreadTable_t.prototype.FILE_NOT_SAVED=4;
}
catch(ex){
jsExDebug("spreadTable_t.prototype",ex);
}
function spreadTable_t(_1,_2,_3,_4,_5,_6,_7){
try{
this.spreadTable_super(_1,_3,_4,_5,_6,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_7){
this.createDom(_3,_4,_5);
this.bindEvents();
}
this.allowSelection();
var _8=new tableDataEntry_t();
this.loadDataEntryModule(_8);
this.geckoPrintFrame=null;
}
catch(ex){
jsExDebug("spreadTable_t",ex);
}
}
function spreadTable_cleanUp(me){
try{
if(!me){
me=this;
}
me.geckoPrintFrame=null;
me.sheetList.cleanUp();
me.dataEntryModule.cleanUp();
me.sheetList=null;
me.widgetScrollTable_cleanUp();
}
catch(ex){
jsExDebug("spreadTable_cleanUp",ex);
}
}
function spreadTable_createDom(_a,_b,_c){
try{
this.widgetScrollTable_createDom(_a,_b,_c);
var _d=(this.SHEET_LIST_WIDTH_PERCENT*_a)-(this.HORIZONTAL_SLIDER_RIGHT+(3*this.SCROLL_BTN_WIDTH));
var _e=new SYSTEM.Widget.SpreadsheetTabList("sheetList",_d);
_e.setPosition(0,0,0,1);
_e.addEventHandler(SYSTEM.Event.CLICK_EVENT,new delegate_t(this,this.sheetListAddSheetEvent));
_e.addEventHandler(SYSTEM.Event.LIST_ITEM_SELECT_EVENT,new delegate_t(this,this.sheetListItemSelectEvent));
_e.attach(this.widgetElement);
this.sheetList=_e;
}
catch(ex){
jsExDebug("spreadTable_createDom",ex);
}
}
function spreadTable_addBlankFirstSheet(){
try{
this.addSheet(1,"Sheet1");
this.selectSheet(1);
this.sheetList.selectTab(null,1);
}
catch(ex){
jsExDebug("spreadTable_addBlankFirstSheet",ex);
}
}
function spreadTable_setDimensions(_f,_10){
try{
this.widgetScrollTable_setDimensions(_f,_10);
if(this.sheetList){
var _11=(this.SHEET_LIST_WIDTH_PERCENT*_f)-(this.HORIZONTAL_SLIDER_RIGHT+(3*this.SCROLL_BTN_WIDTH));
this.sheetList.setDimensions(_11,this.sheetList.height);
}
}
catch(ex){
jsExDebug("spreadTable_setDimensions",ex);
}
}
function spreadTable_setColour(_12,_13){
function setColour(x,y,z){
try{
this.dataModule.setColour(y,x,z,_12,_13);
}
catch(ex){
jsExDebug("spreadTable_setColour:setColour",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,setColour));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_setColour",ex);
}
}
function spreadTable_getColour(){
try{
return this.dataModule.getColour(this.selection.activeY,this.selection.activeX,this.selection.activeSheet);
}
catch(ex){
jsExDebug("spreadTable_getColour",ex);
}
}
function spreadTable_setFont(_17,_18){
function setFont(x,y,z){
try{
this.dataModule.setFont(y,x,z,_17,_18);
}
catch(ex){
jsExDebug("spreadTable_setFont:setFont",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,setFont));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_setFont",ex);
}
}
function spreadTable_getFont(){
try{
return this.dataModule.getFont(this.selection.activeY,this.selection.activeX,this.selection.activeSheet);
}
catch(ex){
jsExDebug("spreadTable_getFont",ex);
}
}
function spreadTable_setStyle(_1c,_1d){
function setStyle(x,y,z){
try{
this.dataModule.setStyle(y,x,z,_1c,_1d);
}
catch(ex){
jsExDebug("spreadTable_setStyle:setStyle",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,setStyle));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_setStyle",ex);
}
}
function spreadTable_getStyle(){
try{
if(this.dataModule){
return this.dataModule.getStyle(this.selection.activeY,this.selection.activeX,this.selection.activeSheet);
}
}
catch(ex){
jsExDebug("spreadTable_getStyle",ex);
}
}
function spreadTable_toggleStyle(_21){
function toggleStyle(x,y,z){
try{
this.dataModule.setStyle(y,x,z,_21,_25);
}
catch(ex){
jsExDebug("spreadTable_toggleStyle:toggleStyle",ex);
}
}
try{
if(this.dataModule){
var _26=this.dataModule.getStyle(this.selection.activeY,this.selection.activeX,this.selection.activeSheet);
var _25=!(_26&_21);
this.selection.invoke(new this.SYSTEM.Delegate(this,toggleStyle));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_setStyle",ex);
}
}
function spreadTable_clearStyle(){
function clearStyle(x,y,z){
try{
this.dataModule.clearStyle(y,x,z);
}
catch(ex){
jsExDebug("spreadTable_clearStyle:clearStyle",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,clearStyle));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_clearStyle",ex);
}
}
function spreadTable_autoFormula(_2a){
try{
if(this.dataModule){
if(this.selection.activeX==0||this.selection.activeY==0){
return;
}
this.dataModule.autoFormula(this.selection,_2a);
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_autoFormula",ex);
}
}
function spreadTable_setType(_2b){
function setType(x,y,z){
try{
this.dataModule.setType(y,x,z,_2b,_2f);
}
catch(ex){
jsExDebug("spreadTable_setType:setType",ex);
}
}
try{
var _2f=[];
for(var i=1;i<arguments.length;i++){
_2f[i-1]=arguments[i];
}
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,setType));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_setType",ex);
}
}
function spreadTable_setFormula(_31){
function setFormula(x,y,z){
try{
this.dataModule.setFormula(y,x,z,_31);
}
catch(ex){
jsExDebug("spreadTable_setContent:setContent",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,setFormula));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_setFormula",ex);
}
}
function spreadTable_deleteCells(){
function deleteCell(x,y,z){
try{
this.dataModule.deleteCell(y,x,z);
}
catch(ex){
jsExDebug("spreadTable_deleteCells: deleteCell",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,deleteCell));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_deleteCells",ex);
}
}
function spreadTable_getSaveData(){
try{
if(this.dataModule){
this.setDirty(false);
return this.dataModule.toXml();
}
}
catch(ex){
jsExDebug("spreadTable_getSaveData",ex);
}
}
function spreadTable_load(xml){
try{
if(this.dataModule){
if(this.dataEntryModule){
this.dataEntryModule.save();
}
this.dataModule.fromXml(xml);
var _39=null;
var _3a=this.dataModule.zList;
this.clearDimensions();
for(var i=0;i<_3a.length;i++){
if(_3a[i]){
_39=(_39?_39:i);
this.addSheet(i,_3a[i]);
}
}
this.sheetList.selectTab(null,_39);
this.selectSheet(_39);
this.refitColumns();
this.SYSTEM.Tooltip.hideLoading();
this.setDirty(false);
}
}
catch(ex){
jsExDebug("spreadTable_load",ex);
}
}
function spreadTable_print(){
try{
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
this.printIE();
}else{
this.printGecko();
}
}
catch(ex){
jsExDebug("spreadTable_print",ex);
}
}
function spreadTable_printGecko(){
function iframeCreated(_3c,me){
try{
frameDocument=_3e.contentWindow.document;
if(frameDocument.body){
frameDocument.body.innerHTML=_3f;
_3e.contentWindow.print();
_3e=null;
_3f=null;
}
}
catch(ex){
jsExDebug("documentCreatedCallback",ex);
}
}
try{
if(this.dataModule){
var _3f=this.dataModule.toHtml(this.z);
if(this.geckoPrintFrame){
this.SYSTEM.Event.detachEvent(this.geckoPrintFrame,"onload","load");
this.SYSTEM.Dom.freeDom(this.geckoPrintFrame);
document.body.removeChild(this.geckoPrintFrame);
this.geckoPrintFrame=null;
}
var _3e=document.createElement("iframe");
_3e.style.border="solid 1px #bbbbbb";
_3e.style.position="absolute";
_3e.style.left="200px";
_3e.style.top="200px";
_3e.style.width="500px";
_3e.style.height="500px";
_3e.style.visibility="hidden";
document.body.appendChild(_3e);
this.SYSTEM.Event.attachEvent(_3e,"onload","load",iframeCreated,this);
this.geckoPrintFrame=_3e;
}
return;
}
catch(ex){
jsExDebug("spreadTable_printGecko",ex);
}
}
function spreadTable_printIE(){
function iframeCreated(_40,me){
try{
frameDocument=_42.contentWindow.document;
if(frameDocument.body){
frameDocument.body.innerHTML=_43;
_42.contentWindow.focus();
_42.contentWindow.print();
me.SYSTEM.Event.detachEvent(_42,"onload","load");
me.SYSTEM.Dom.freeDom(_42);
me.widgetElement.removeChild(_42);
_42=null;
_43=null;
me.table.domElement.style.zIndex=_44;
_44=null;
}
}
catch(ex){
jsExDebug("documentCreatedCallback",ex);
}
}
try{
if(this.dataModule){
var _43=this.dataModule.toHtml(this.z);
var _44=this.table.domElement.style.zIndex;
var _42=document.createElement("iframe");
_42.style.position="absolute";
_42.style.left="100%";
_42.style.top="100%";
_42.style.width="500px";
_42.style.height="500px";
_42.style.border="none";
_42.style.zIndex=1;
this.table.domElement.style.zIndex=2;
this.widgetElement.appendChild(_42);
this.SYSTEM.Event.attachEvent(_42,"onload","load",iframeCreated,this);
}
return;
}
catch(ex){
jsExDebug("spreadTable_printIE",ex);
}
}
function spreadTable_appendCharacter(_45){
try{
this.hideContent();
if(this.activeCell){
var _46="";
var _47=this.translateDisplayToData(this.activeCell.x,this.activeCell.y);
_46+=this.dataModule.getFormula(_47.y,_47.x,this.selection.activeSheet);
this.dataEntryModule.edit(this.activeCell.cellDom,_46+_45,this.activeCell,"showContent",this);
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_appendCharacter",ex);
}
}
function spreadTable_addSheet(_48,_49){
try{
this.addDimension(_48,_49);
this.sheetList.clearTabs();
for(var i=0;i<this.zList.length;i++){
if(this.zList[i]){
this.sheetList.addTab(i,this.zList[i]);
}
}
return _48;
}
catch(ex){
jsExDebug("spreadTable_addSheet",ex);
}
}
function spreadTable_selectSheet(_4b){
try{
if(_4b){
if(this.dataEntryModule){
this.dataEntryModule.save();
}
this.z=_4b;
this.refreshColumnSizes();
this.refreshRowSizes();
this.refreshTable();
this.refreshTableStyles();
this.selection.clear();
this.selection.setActiveSheet(_4b);
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.addItem(1,1,_4b);
this.selection.applyFunction(this.cellHighlightCallback,this);
for(var y=0;y<this.tableRowCount;y++){
this.refreshRow(y);
}
}
}
catch(ex){
jsExDebug("spreadTable_selectSheet",ex);
}
}
function spreadTable_getSheetList(){
try{
return this.getDimensionList();
}
catch(ex){
jsExDebug("spreadTable_getSheetList",ex);
}
}
function spreadTable_setSheetName(_4d,_4e){
try{
if(this.setDimensionName(_4d,_4e)){
this.sheetList.clearTabs();
for(var i=0;i<this.zList.length;i++){
if(this.zList[i]){
this.sheetList.addTab(i,this.zList[i]);
}
}
}
}
catch(ex){
jsExDebug("spreadTable_setSheetName",ex);
}
}
function spreadTable_getSheetName(_50){
try{
return this.getDimensionName(_50);
}
catch(ex){
jsExDebug("spreadTable_getSheetName",ex);
}
}
function spreadTable_insertRows(){
try{
if(!this.dataModule){
return;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _51=this.selection.getVerticalCoverage();
if(_51.top<1){
_51.top=1;
}
this.dataModule.insertDataRows(_51.top,this.z,_51.rows);
this.setDirty(true);
}
catch(ex){
jsExDebug("spreadTable_insertRows",ex);
}
}
function spreadTable_insertColumns(){
try{
if(!this.dataModule){
return;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _52=this.selection.getHorizontalCoverage();
if(_52.left<1){
_52.left=1;
}
this.dataModule.insertDataCols(_52.left,this.z,_52.cols);
this.setDirty(true);
}
catch(ex){
jsExDebug("spreadTable_insertColumns",ex);
}
}
function spreadTable_deleteRows(){
try{
if(!this.dataModule){
return;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _53=this.selection.getVerticalCoverage();
if(_53.top<1){
_53.top=1;
}
this.dataModule.deleteDataRows(_53.top,this.z,_53.rows);
this.setDirty(true);
this.selection.addRange(0,_53.top,0,_53.top+(_53.rows-1),this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
this.redraw();
this.refreshTable();
}
catch(ex){
jsExDebug("spreadTable_deleteRows",ex);
}
}
function spreadTable_deleteColumns(){
try{
if(!this.dataModule){
return;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _54=this.selection.getHorizontalCoverage();
if(_54.left<1){
_54.left=1;
}
this.dataModule.deleteDataCols(_54.left,this.z,_54.cols);
this.setDirty(true);
this.selection.addRange(_54.left,0,_54.left+(_54.cols-1),0,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
this.redraw();
this.refreshTable();
}
catch(ex){
jsExDebug("spreadTable_deleteColumns",ex);
}
}
function spreadTable_disableAutoAlign(){
function disable(x,y,z){
try{
this.dataModule.disableAutoAlign(y,x,z);
}
catch(ex){
jsExDebug("spreadTable_disableAutoAlign: disable",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,disable));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_disableAutoAlign",ex);
}
}
function spreadTable_getActiveCellData(){
try{
if(this.dataModule){
var _58=this.translateDisplayToData(this.activeCell.x,this.activeCell.y);
return this.dataModule.getCell(_58.y,_58.x,this.z);
}else{
return null;
}
}
catch(ex){
jsExDebug("spreadTable_getActiveCellData",ex);
}
}
function spreadTable_mergeCells(){
function mergeRange(_59){
try{
var _5a=this.translateDataToDisplay(_59.fromX,_59.fromY);
var _5b=this.table.rowArray[_5a.y].cells[_5a.x];
var _5c=Math.abs(_59.toY-_59.fromY)+1;
var _5d=Math.abs(_59.toX-_59.fromX)+1;
if(_5b){
if(!_5b.merged){
_5b.cellDom.colSpan=_5d;
_5b.cellDom.rowSpan=_5c;
_5b.merged=true;
for(var y=_59.fromY;y<=_59.toY;y++){
var _5f=_59.fromX;
var _60=false;
if(y==_59.fromY){
_5f++;
_60=true;
}
for(var x=_5f;x<=this.table.rowArray[y].cells.length;x++){
var _62=this.table.rowArray[y].cells[x];
this.detachEventsFromCell(_62.cellDom);
if(_60){
this.attachEventsToCell(_62.x+(_5d-1),_62.y,_62.cellDom);
}else{
this.attachEventsToCell(_62.x+_5d,_62.y,_62.cellDom);
}
if(x<_59.tox){
this.table.rowArray[y].cells[x]=null;
this.table.rowArray[y].cells[x]=_5b;
}else{
}
}
}
}
}
}
catch(ex){
jsExDebug("spreadTable_mergeCells: mergeRange",ex);
}
}
try{
return;
if(this.dataModule){
this.selection.invokeOnRanges(new this.SYSTEM.Delegate(this,mergeRange));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_mergeCells",ex);
}
}
function spreadTable_reCalculateTable(){
try{
if(this.dataModule){
this.dataModule.reEvaluate();
}
this.refreshTable();
}
catch(ex){
jsExDebug("spreadTable_reCalculateTable",ex);
}
}
function spreadTable_pageUp(_63){
try{
var _64=this.tableRowCount-this.HIDDEN_CELL_BUFFER;
if(_63){
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.expandLastRange(0,-1*_64,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
this.scrollUp(_64);
}else{
if(this.activeCell){
var _65=this.translateDisplayToData(this.activeCell.x,this.activeCell.y-_64);
}
this.scrollUp(_64);
if(_65){
var _66=(_65.y>0?_65.y:1);
this.selection.clear();
this.selection.addItem(_65.x,_66,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
}
}
}
catch(ex){
jsExDebug("spreadTable_pageUp",ex);
}
}
function spreadTable_pageDown(_67){
try{
var _68=this.tableRowCount-this.HIDDEN_CELL_BUFFER;
if(_67){
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.expandLastRange(0,_68,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
this.scrollDown(_68);
}else{
if(this.activeCell){
var _69=this.translateDisplayToData(this.activeCell.x,this.activeCell.y+_68);
}
this.scrollDown(_68);
if(_69){
this.selection.clear();
this.selection.addItem(_69.x,_69.y,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
}
}
}
catch(ex){
jsExDebug("spreadTable_pageDown",ex);
}
}
function spreadTable_jumpToStartOfRow(){
try{
if(!this.dataModule){
return;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _6a=this.translateDisplayToData(1,1,this.z);
var _6b=null;
if(this.activeCell){
_6b=this.translateDisplayToData(this.activeCell.x,this.activeCell.y,this.z).y;
}else{
_6b=1;
}
this.scrollToPosition(1,_6a.y);
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
this.selection.addItem(1,_6b,this.z);
this.cellHighlight(1,_6b);
}
catch(ex){
jsExDebug("spreadTable_jumpToStartOfRow",ex);
}
}
function spreadTable_editActiveCell(){
try{
if(this.dataEntryModule&&this.activeCell){
var _6c=this.translateDisplayToData(null,this.activeCell.y);
var _6d=this.calculateHeightAtRow(_6c.y);
var _6e=0;
if(this.dataModule){
_6e=this.dataModule.getRowHeight(_6c.y,this.z);
if(_6e==null){
_6e=this.DEFAULT_CELL_HEIGHT;
}
}
if(_6d>(this.height-_6e)){
var _6f=this.translateDisplayToData(null,1);
var _70=this.dataModule.getRowHeight(_6f.y,this.z);
var _71=Math.floor(_6e/_70);
if(_6e>_70){
_71=Math.floor(_6e/_70);
}else{
if(_6e<=_70){
_71=1;
}
}
this.scrollDown(_71);
}
this.hideContent();
var _72=this.translateDisplayToData(this.activeCell.x,this.activeCell.y);
var _73=this.dataModule.getFormula(_72.y,_72.x,this.selection.activeSheet);
this.dataEntryModule.edit(this.activeCell.cellDom,_73,this.activeCell,"showContent",this);
this.dataEntryModule.setEditMode(this.dataEntryModule.EDIT_MODE_NEW);
}
}
catch(ex){
jsExDebug("spreadTable_jumpToStartOfRow",ex);
}
}
function spreadTable_jumpToLastRowContent(){
try{
if(!this.dataModule){
return;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _74=null;
if(this.activeCell){
_74=this.translateDisplayToData(this.activeCell.x,this.activeCell.y,this.z).y;
}else{
_74=1;
}
var _75=this.dataModule.getColumnEndPosition(_74,this.z);
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
if(!_75){
return;
}
this.selection.addItem(_75,_74,this.z);
this.cellHighlight(_75,_74);
this.refocusSelection();
}
catch(ex){
jsExDebug("spreadTable_jumpToLastRowContent",ex);
}
}
function spreadTable_jumpToContentEnd(){
try{
if(!this.dataModule){
return;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _76=this.dataModule.getLastColumnIndex(this.z);
var _77=this.dataModule.getLastRowIndex(this.z);
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
var _78=this.translateDisplayToData(this.activeCell.x,this.activeCell.y,this.z);
_76=(_76?_76:_78.x);
_77=(_77?_77:_78.y);
this.selection.addItem(_76,_77,this.z);
this.cellHighlight(_76,_77);
this.refocusSelection();
}
catch(ex){
jsExDebug("spreadTable_jumpToContentEnd",ex);
}
}
function spreadTable_selectAllContent(){
try{
if(!this.dataModule){
return;
}
if(this.dataEntryModule){
this.dataEntryModule.save();
}
var _79=this.dataModule.getLastColumnIndex(this.z);
var _7a=this.dataModule.getLastRowIndex(this.z);
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
var _7b=this.translateDisplayToData(this.activeCell.x,this.activeCell.y,this.z);
this.selection.addItem(_7b.x,_7b.y,this.z);
_79=(_79?_79:_7b.x);
_7a=(_7a?_7a:_7b.y);
this.selection.expandLastRangeTo(_79,_7a,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
var _7c=_7b.x;
var _7d=_7b.y;
var _7e=(this.tableColumnCount-(this.HIDDEN_CELL_BUFFER+2));
var _7f=(this.tableRowCount-(this.HIDDEN_CELL_BUFFER+3));
if(_79>_7e){
_7c=_79-_7e;
}
if(_7a>_7f){
_7d=_7a-_7f;
}
this.scrollToPosition(_7c,_7d);
}
catch(ex){
jsExDebug("spreadTable_selectAllContent",ex);
}
}
function spreadTable_jumpToPreviousRowContent(){
try{
if(!this.activeCell||!this.dataModule){
return;
}
var _80=this.translateDisplayToData(this.activeCell.x,this.activeCell.y);
var _81=this.dataModule.getPreviousCellInRow(_80.y,_80.x,this.z);
if(!_81){
_81={x:1,y:_80.y};
}
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
this.selection.addItem(_81.x,_81.y,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
if(_81.x<(this.scrollX+1)){
this.scrollToPosition(_81.x,this.scrollY+1);
}
}
catch(ex){
jsExDebug("spreadTable_jumpToPreviousRowContent",ex);
}
}
function spreadTable_jumpToNextRowContent(){
try{
if(!this.activeCell||!this.dataModule){
return;
}
var _82=this.translateDisplayToData(this.activeCell.x,this.activeCell.y);
var _83=this.dataModule.getNextCellInRow(_82.y,_82.x,this.z);
if(!_83){
_83={x:this.dataModule.MAX_COLUMN_INDEX,y:_82.y};
}
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
this.selection.addItem(_83.x,_83.y,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
var _84=((this.tableColumnCount-2)-(this.HIDDEN_CELL_BUFFER));
if(_83.x>((this.scrollX+1)+_84)){
this.scrollToPosition((_83.x-_84)+1,this.scrollY+1);
}
}
catch(ex){
jsExDebug("spreadTable_jumpToNextRowContent",ex);
}
}
function spreadTable_jumpToPreviousColumnContent(){
try{
if(!this.activeCell||!this.dataModule){
return;
}
var _85=this.translateDisplayToData(this.activeCell.x,this.activeCell.y);
var _86=this.dataModule.getPreviousCellInColumn(_85.y,_85.x,this.z);
if(!_86){
_86={x:_85.x,y:1};
}
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
this.selection.addItem(_86.x,_86.y,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
if(_86.y<(this.scrollY+1)){
this.scrollToPosition(this.scrollX+1,_86.y);
}
}
catch(ex){
jsExDebug("spreadTable_jumpToPreviousColumnContent",ex);
}
}
function spreadTable_jumpToNextColumnContent(){
try{
if(!this.activeCell||!this.dataModule){
return;
}
var _87=this.translateDisplayToData(this.activeCell.x,this.activeCell.y);
var _88=this.dataModule.getNextCellInColumn(_87.y,_87.x,this.z);
if(!_88){
_88={x:_87.x,y:this.dataModule.MAX_ROW_INDEX};
}
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
this.selection.addItem(_88.x,_88.y,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
var _89=((this.tableRowCount-1)-(this.HIDDEN_CELL_BUFFER+1));
var _8a=this.translateDisplayToData(this.activeCell.x,_89);
if(_88.y>_8a.y){
this.scrollToPosition(this.scrollX+1,(_88.y-_89)+1);
}
}
catch(ex){
jsExDebug("spreadTable_jumpToNextColumnContent",ex);
}
}
function spreadTable_increaseDecimalPlace(){
function increaseDecimalPlace(x,y,z){
try{
this.dataModule.increaseDecimalPlace(y,x,z);
}
catch(ex){
jsExDebug("spreadTable_increaseDecimalPlace:increaseDecimalPlace",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,increaseDecimalPlace));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_increaseDecimalPlace",ex);
}
}
function spreadTable_decreaseDecimalPlace(){
function decreaseDecimalPlace(x,y,z){
try{
this.dataModule.decreaseDecimalPlace(y,x,z);
}
catch(ex){
jsExDebug("spreadTable_decreaseDecimalPlace:decreaseDecimalPlace",ex);
}
}
try{
if(this.dataModule){
this.selection.invoke(new this.SYSTEM.Delegate(this,decreaseDecimalPlace));
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_decreaseDecimalPlace",ex);
}
}
function spreadTable_cut(){
try{
if(this.dataModule){
this.dataModule.cut(this.selection);
}
}
catch(ex){
jsExDebug("spreadTable_cut",ex);
}
}
function spreadTable_copy(){
try{
if(this.dataModule){
this.dataModule.copy(this.selection);
}
}
catch(ex){
jsExDebug("spreadTable_copy",ex);
}
}
function spreadTable_paste(){
try{
if(this.dataModule){
this.dataModule.paste(this.selection);
this.setDirty(true);
}
}
catch(ex){
jsExDebug("spreadTable_paste",ex);
}
}
function spreadTable_keyPressHandler(key){
try{
this.super_keyPressHandler(key);
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
}else{
if(this.SYSTEM.Environment.AGENT_STRING.match(/Safari/i)){
key.preventDefault();
}else{
switch(key.dmKey){
case 98:
if(key.ctrlKey){
key.preventDefault();
this.toggleStyle(this.BOLD);
}
break;
case 99:
if(key.ctrlKey){
key.preventDefault();
if(this.dataModule){
this.dataModule.copy(this.selection);
}
}
break;
case 105:
if(key.ctrlKey){
key.preventDefault();
this.toggleStyle(this.ITALIC);
}
break;
case 117:
if(key.ctrlKey){
key.preventDefault();
this.toggleStyle(this.UNDERLINE);
}
break;
case 118:
if(key.ctrlKey){
key.preventDefault();
if(this.dataModule){
this.dataModule.paste(this.selection);
this.setDirty(true);
}
}
break;
case 120:
if(key.ctrlKey){
key.preventDefault();
if(this.dataModule){
this.dataModule.cut(this.selection);
}
}
break;
case 121:
if(key.ctrlKey){
key.preventDefault();
if(this.dataModule){
this.dataModule.autoFormula(this.selection,"sum");
this.setDirty(true);
}
}
break;
default:
}
}
}
}
catch(ex){
jsExDebug("spreadTable_keyPressHandler",ex);
}
}
function spreadTable_keyDownHandler(key){
try{
this.super_keyDownHandler(key);
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
switch(key.dmKey){
case 66:
if(key.ctrlKey){
key.preventDefault();
this.toggleStyle(this.BOLD);
}
break;
case 67:
if(key.ctrlKey){
key.preventDefault();
if(this.dataModule){
this.dataModule.copy(this.selection);
}
}
break;
case 73:
if(key.ctrlKey){
key.preventDefault();
this.toggleStyle(this.ITALIC);
}
break;
case 85:
if(key.ctrlKey){
key.preventDefault();
this.toggleStyle(this.UNDERLINE);
}
break;
case 86:
if(key.ctrlKey){
key.preventDefault();
if(this.dataModule){
this.dataModule.paste(this.selection);
this.setDirty(true);
}
}
break;
case 88:
if(key.ctrlKey){
key.preventDefault();
if(this.dataModule){
this.dataModule.cut(this.selection);
}
}
break;
case 89:
if(key.ctrlKey){
key.preventDefault();
if(this.dataModule){
this.dataModule.autoFormula(this.selection,"sum");
this.setDirty(true);
}
}
break;
case 33:
this.pageUp(key.shiftKey);
break;
case 34:
this.pageDown(key.shiftKey);
break;
case 35:
if(key.ctrlKey){
if(key.shiftKey){
this.selectAllContent();
}else{
this.jumpToContentEnd();
key.preventDefault();
}
}
break;
case 46:
this.deleteCells();
break;
case 113:
this.editActiveCell();
if(this.dataEntryModule){
this.dataEntryModule.setEditMode(this.dataEntryModule.EDIT_MODE_UPDATE);
}
break;
case 36:
if(key.ctrlKey){
if(this.dataEntryModule){
this.dataEntryModule.save();
}
this.selection.applyFunction(this.cellDimCallback,this);
this.scrollToPosition(1,1);
if(key.shiftKey){
this.selection.expandLastRangeTo(1,1,this.z);
}else{
this.selection.clear();
this.selection.addItem(1,1,this.z);
}
this.selection.applyFunction(this.cellHighlightCallback,this);
}else{
this.jumpToStartOfRow();
}
break;
case 65:
if(key.ctrlKey){
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
this.selection.addItem(0,0,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
key.preventDefault();
}
break;
default:
}
}else{
switch(key.dmKey){
case 33:
this.pageUp(key.shiftKey);
break;
case 34:
this.pageDown(key.shiftKey);
break;
case 35:
if(key.ctrlKey){
if(key.shiftKey){
this.selectAllContent();
}else{
this.jumpToContentEnd();
key.preventDefault();
}
}
break;
case 46:
this.deleteCells();
break;
case 113:
this.editActiveCell();
if(this.dataEntryModule){
this.dataEntryModule.setEditMode(this.dataEntryModule.EDIT_MODE_UPDATE);
}
break;
case 36:
if(key.ctrlKey){
if(this.dataEntryModule){
this.dataEntryModule.save();
}
this.selection.applyFunction(this.cellDimCallback,this);
this.scrollToPosition(1,1);
if(key.shiftKey){
this.selection.expandLastRangeTo(1,1,this.z);
}else{
this.selection.clear();
this.selection.addItem(1,1,this.z);
}
this.selection.applyFunction(this.cellHighlightCallback,this);
}else{
this.jumpToStartOfRow();
}
break;
case 65:
if(key.ctrlKey){
this.selection.applyFunction(this.cellDimCallback,this);
this.selection.clear();
this.selection.addItem(0,0,this.z);
this.selection.applyFunction(this.cellHighlightCallback,this);
key.preventDefault();
}
break;
default:
}
}
}
catch(ex){
jsExDebug("spreadTable_keyDownHandler",ex);
}
}
function widgetTable_clickEventHandler(_93,me,_95){
try{
return;
}
catch(ex){
jsExDebug("widgetTable_clickEventHandler",ex);
}
}
function spreadTable_mouseDownHandler(_96,me,_98){
try{
if(me.dragSession){
return;
}
if(!me.selection){
return;
}
var _99=me.translateDisplayToData(_98.x,_98.y);
me.dragSession=true;
var _9a=true;
if(me.table.rowArray[_98.y].cells[_98.x]!=me.activeCell&&me.dataEntryModule&&me.dataEntryModule.stateIsEditing){
if(_99.x==0){
_99.x=1;
}
if(_99.y==0){
_99.y=1;
}
if(me.dataEntryModule.cellHit(_99.y.toString(),numericToAlpha(_99.x),_96.ctrlKey)){
_9a=false;
}else{
me.dataEntryModule.save();
}
}
if(_9a){
if(_98.x==0||_98.y==0){
me.activeCell=null;
}
if(_96.shiftKey){
me.selection.applyFunction(me.cellDimCallback,me);
me.selection.expandLastRangeTo(_99.x,_99.y,me.z);
me.selection.applyFunction(me.cellHighlightCallback,me);
if(me.selectionRangeExpandDelegate){
me.selectionRangeExpandDelegate.invoke(true);
}
}else{
if(_96.ctrlKey){
me.cellHighlight(_98.x,_98.y);
me.selection.addItem(_99.x,_99.y,me.z);
}else{
me.selection.applyFunction(me.cellDimCallback,me);
me.selection.clear();
me.selection.addItem(_99.x,_99.y,me.z);
me.cellHighlight(_98.x,_98.y);
}
}
}
}
catch(ex){
jsExDebug("widgetScrollTable_mouseDownHandler",ex);
}
}
function spreadTable_dragOverHandler(_9b,me,_9d){
try{
if(!me.dragSession){
return;
}
var _9e=me.translateDisplayToData(_9d.x,_9d.y);
if(me.table.rowArray[_9d.y].cells[_9d.x]!=me.activeCell&&me.dataEntryModule&&me.dataEntryModule.stateIsEditing){
if(_9e.x==0){
_9e.x=1;
}
me.dataEntryModule.cellDrag(_9e.y.toString(),numericToAlpha(_9e.x));
}else{
var _9f=[];
me.selection.applyFunction(me.cellPendDimCallback,me,_9f);
me.selection.expandLastRangeTo(_9e.x,_9e.y,me.z);
me.selection.applyFunction(me.cellPendHighlightCallback,me,_9f);
me.applyPendingHighlights(_9f);
if(me.selectionRangeExpandDelegate){
me.selectionRangeExpandDelegate.invoke(true);
}
}
}
catch(ex){
jsExDebug("widgetScrollTable_dragOverHandler",ex);
}
}
function spreadTable_sheetListAddSheetEvent(_a0,_a1){
try{
var _a2=this.sheetList.selectedIndex;
var _a3=this.addSheet();
if(_a2!=null){
this.sheetList.selectTab(_a2);
}else{
this.sheetList.selectTab(null,_a3);
}
this.selectSheet(_a3);
}
catch(ex){
jsExDebug("spreadTable_sheetListAddSheetEvent",ex);
}
}
function spreadTable_sheetListItemSelectEvent(_a4,_a5){
try{
this.selectSheet(_a5.selectedTabValue);
}
catch(ex){
jsExDebug("spreadTable_sheetListItemSelectEvent",ex);
}
}
function spreadTable_redraw(){
try{
this.widgetElement.removeChild(this.tableContainer);
this.widgetElement.appendChild(this.tableContainer);
if(this.sheetList){
this.sheetList.detach();
this.sheetList.attach(this.widgetElement);
}
return;
if(this.parentDiv){
this.parentDiv.removeChild(this.widgetElement);
this.parentDiv.appendChild(this.widgetElement);
}
}
catch(ex){
jsExDebug("spreadTable_redraw",ex);
}
}

selection_t.prototype=new peepelObject_t();
selection_t.prototype.constructor=selection_t;
selection_t.prototype.cleanUp=selection_cleanUp;
selection_t.prototype.selection_super=peepelObject_t.prototype.constructor;
selection_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
selection_t.prototype.getFirstRange=selection_getFirstRange;
selection_t.prototype.getLastRange=selection_getLastRange;
selection_t.prototype.addRange=selection_addRange;
selection_t.prototype.addItem=selection_addItem;
selection_t.prototype.expandLastRange=selection_expandLastRange;
selection_t.prototype.expandLastRangeTo=selection_expandLastRangeTo;
selection_t.prototype.clear=selection_clear;
selection_t.prototype.invoke=selection_invoke;
selection_t.prototype.invokeOnRanges=selection_invokeOnRanges;
selection_t.prototype.applyFunction=selection_applyFunction;
selection_t.prototype.applyFunctionByName=selection_applyFunctionByName;
selection_t.prototype.getSelectionAsText=selection_getSelectionAsText;
selection_t.prototype.toString=selection_getSelectionAsText;
selection_t.prototype.selectFromText=selection_selectFromText;
selection_t.prototype.fromString=selection_selectFromText;
selection_t.prototype.setActiveSheet=selection_setActiveSheet;
selection_t.prototype.next=selection_next;
selection_t.prototype.previous=selection_previous;
selection_t.prototype.nextHorizontal=selection_nextHorizontal;
selection_t.prototype.previousHorizontal=selection_previousHorizontal;
selection_t.prototype.nextActive=selection_nextActive;
selection_t.prototype.previousActive=selection_previousActive;
selection_t.prototype.nextHorizontalActive=selection_nextHorizontalActive;
selection_t.prototype.previousHorizontalActive=selection_previousHorizontalActive;
selection_t.prototype.getActive=selection_getActive;
selection_t.prototype.activateFirstInRange=selection_activateFirstInRange;
selection_t.prototype.activateLastInRange=selection_activateLastInRange;
selection_t.prototype.notifyActiveChange=selection_notifyActiveChange;
selection_t.prototype.notifyRangeExpand=selection_notifyRangeExpand;
selection_t.prototype.applyOnClear=selection_applyOnClear;
selection_t.prototype.applyOnFill=selection_applyOnFill;
selection_t.prototype.getVerticalCoverage=selection_getVerticalCoverage;
selection_t.prototype.getHorizontalCoverage=selection_getHorizontalCoverage;
selection_t.prototype.SELECTION_ITEM=1;
selection_t.prototype.SELECTION_RANGE=2;
selection_t.prototype.SELECTION_ROW=3;
selection_t.prototype.SELECTION_COLUMN=4;
function selection_t(){
try{
this.selection_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.selected=[];
this.nrItems=0;
this.activeX=null;
this.activeY=null;
this.activeSheet=null;
this.activeIndex=0;
}
catch(ex){
jsExDebug("selection_t",ex);
}
}
function selection_cleanUp(me){
try{
if(!me){
me=this;
}
for(var i=0;i<me.selected.length;i++){
me.selected[i].type=null;
me.selected[i].fromX=null;
me.selected[i].fromY=null;
me.selected[i].toX=null;
me.selected[i].toY=null;
me.selected[i]=null;
}
me.selected=null;
me.notifyActiveChangeInstance=null;
me.notifyActiveChangeHandler=null;
if(me.applyOnClearBinding){
me.applyOnClearBinding.callback=null;
me.applyOnClearBinding.instance=null;
me.applyOnClearBinding=null;
}
if(me.applyOnFillBinding){
me.applyOnFillBinding.callback=null;
me.applyOnFillBinding.instance=null;
me.applyOnFillBinding=null;
}
me.nrItems=null;
me.activeX=null;
me.activeY=null;
me.activeSheet=null;
me.activeIndex=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("selection_cleanUp",ex);
}
}
function selection_getFirstRange(){
try{
if(this.selected.length&&this.selected[0]){
var _3=this.selected[0];
if(_3.type==this.SELECTION_ITEM){
return {fromX:_3.x,fromY:_3.y,toX:_3.x,toY:_3.y,sheet:_3.sheet};
}else{
if(_3.type==this.SELECTION_RANGE){
return {fromX:_3.fromX,fromY:_3.fromY,toX:_3.toX,toY:_3.toY,sheet:_3.sheet};
}
}
}
return null;
}
catch(ex){
jsExDebug("selection_getFirstRange",ex);
}
}
function selection_getLastRange(){
try{
if(this.selected.length&&this.selected[this.selected.length-1]){
var _4=this.selected[this.selected.length-1];
if(_4.type==this.SELECTION_ITEM){
return {fromX:_4.x,fromY:_4.y,toX:_4.x,toY:_4.y,sheet:_4.sheet};
}else{
if(_4.type==this.SELECTION_RANGE){
return {fromX:_4.fromX,fromY:_4.fromY,toX:_4.toX,toY:_4.toY,sheet:_4.sheet};
}
}
}
}
catch(ex){
jsExDebug("selection_getLastRange",ex);
}
}
function selection_addRange(_5,_6,_7,_8,_9){
try{
var _a={};
_a.type=this.SELECTION_RANGE;
_a.fromX=_5;
_a.fromY=_6;
_a.toX=_7;
_a.toY=_8;
_a.sheet=_9;
var _b=this.activeX;
var _c=this.activeY;
var _d=this.activeSheet;
this.activeX=_a.fromX;
this.activeY=_a.fromY;
this.activeIndex=this.selected.length;
this.activeSheet=_a.sheet;
this.selected.push(_a);
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_b,_c,_d,this.activeX,this.activeY,this.activeSheet);
}
}
catch(ex){
jsExDebug("selection_addRange",ex);
}
}
function selection_addItem(x,y,_10){
try{
var _11={};
_11.type=this.SELECTION_ITEM;
_11.x=x;
_11.y=y;
_11.sheet=_10;
for(var i=0;i<this.selected.length;i++){
var _13=this.selected[i];
if(_13&&(_13.type==this.SELECTION_ITEM)&&(_13.x==x)&&(_13.y==y)){
return;
}
}
var _14=this.activeX;
var _15=this.activeY;
var _16=this.activeSheet;
this.activeX=x;
this.activeY=y;
this.activeIndex=this.selected.length;
this.activeSheet=_10;
this.selected.push(_11);
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_14,_15,_16,this.activeX,this.activeY,this.activeSheet);
}
}
catch(ex){
jsExDebug("selection_addItem",ex);
}
}
function selection_expandLastRange(x,y,_19,_1a,_1b){
try{
var _1c=this.selected[this.selected.length-1];
if(!_1c){
return;
}
if(_1c.sheet!=_19){
return;
}
var x=(_1c.x?_1c.x:_1c.toX)+x;
var y=(_1c.y?_1c.y:_1c.toY)+y;
this.expandLastRangeTo(x,y,_19,_1a,_1b);
}
catch(ex){
jsExDebug("selection_expandLastRange",ex);
}
}
function selection_expandLastRangeTo(x,y,_1f,_20,_21){
try{
var _22=this.selected[this.selected.length-1];
if(!_22){
return;
}
if(_22.sheet!=_1f){
return;
}
var toX=null,toY=null,_25,_26;
switch(_22.type){
case this.SELECTION_RANGE:
if(x==_22.toX&&y==_22.toY){
return;
}
_25=_22.fromX;
_26=_22.fromY;
fromSheet=_22.sheet;
toX=x;
toY=y;
toSheet=_1f;
break;
case this.SELECTION_ITEM:
if(x==_22.x&&y==_22.y){
return;
}
_25=_22.x;
_26=_22.y;
fromSheet=_22.sheet;
toX=x;
toY=y;
toSheet=_1f;
break;
}
this.selected[this.selected.length-1]=null;
delete this.selected[this.selected.length-1];
this.selected.length--;
this.addRange(_25,_26,toX,toY,_1f);
}
catch(ex){
jsExDebug("selection_expandLastRangeTo",ex);
}
}
function selection_clear(){
try{
if(this.applyOnClearBinding){
this.applyFunction(this.applyOnClearBinding.callback,this.applyOnClearBinding.instance);
}
for(var i in this.selected){
if(this.selected[i]){
this.selected[i]=null;
delete this.selected[i];
}
}
this.selected=new Array();
var _28=this.activeX;
var _29=this.activeY;
var _2a=this.activeSheet;
this.activeX=null;
this.activeY=null;
this.activeIndex=0;
this.activeSheet=null;
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_28,_29,_2a,null,null,null);
}
}
catch(ex){
jsExDebug("selection_clear",ex);
}
}
function selection_applyOnClear(_2b,_2c){
try{
if(_2b){
this.applyOnClearBinding={callback:_2b,instance:_2c};
}
}
catch(ex){
jsExDebug("selection_applyOnClear",ex);
}
}
function selection_applyOnFill(_2d,_2e){
try{
if(_2d){
this.applyOnFillBinding={callback:_2d,instance:_2e};
}
}
catch(ex){
jsExDebug("selection_applyOnFill",ex);
}
}
function selection_getVerticalCoverage(){
try{
var toY=this.activeY;
for(var i=0;i<this.selected.length;i++){
var _31=this.selected[i];
if(_31&&_31.fromY){
toY=_31.toY;
break;
}
}
var _32=1;
var top=this.activeY;
if(toY>this.activeY){
_32=(toY-this.activeY)+1;
top=this.activeY;
}else{
if(toY<this.activeY){
_32=(this.activeY-toY)+1;
top=toY;
}
}
return {rows:_32,top:top};
}
catch(ex){
jsExDebug("selection_getVerticalCoverage",ex);
}
}
function selection_getHorizontalCoverage(){
try{
var toX=this.activeX;
for(var i=0;i<this.selected.length;i++){
var _36=this.selected[i];
if(_36&&_36.fromX){
toX=_36.toX;
break;
}
}
var _37=1;
var _38=this.activeX;
if(toX>this.activeX){
_37=(toX-this.activeX)+1;
_38=this.activeX;
}else{
if(toX<this.activeX){
_37=(this.activeX-toX)+1;
_38=toX;
}
}
return {cols:_37,left:_38};
}
catch(ex){
jsExDebug("selection_getHorizontalCoverage",ex);
}
}
function selection_invoke(_39){
try{
if(!arguments.length){
return;
}
for(var i=0;i<this.selected.length;i++){
if(this.selected[i]){
var _3b=this.selected[i];
switch(_3b.type){
case this.SELECTION_ITEM:
_39.invoke(_3b.x,_3b.y,_3b.sheet);
break;
case this.SELECTION_RANGE:
var _3c=(_3b.fromX<_3b.toX)?_3b.fromX:_3b.toX;
var _3d=(_3b.fromY<_3b.toY)?_3b.fromY:_3b.toY;
var toX=(_3b.toX>_3b.fromX)?_3b.toX:_3b.fromX;
var toY=(_3b.toY>_3b.fromY)?_3b.toY:_3b.fromY;
for(var y=_3d;y<=toY;y++){
for(var x=_3c;x<=toX;x++){
_39.invoke(x,y,_3b.sheet);
}
}
break;
default:
jsDebug("Error: selection_invoke, invalid range type.");
}
}
}
}
catch(ex){
jsExDebug("selection_invoke",ex);
}
}
function selection_invokeOnRanges(_42){
try{
if(!arguments.length){
return;
}
for(var i=0;i<this.selected.length;i++){
var _44=this.selected[i];
if(_44&&_44.type==this.SELECTION_RANGE){
if(_42){
_42.invoke(_44);
}
}
}
}
catch(ex){
jsExDebug("selection_invokeOnRanges",ex);
}
}
function selection_applyFunction(_45,_46,_47){
try{
if(!_45){
return;
}
for(var i=0;i<this.selected.length;i++){
if(this.selected[i]){
var _49=this.selected[i];
switch(_49.type){
case this.SELECTION_ITEM:
_45(_49.x,_49.y,_49.sheet,_46,_47);
break;
case this.SELECTION_RANGE:
var _4a=(_49.fromX<_49.toX)?_49.fromX:_49.toX;
var _4b=(_49.fromY<_49.toY)?_49.fromY:_49.toY;
var toX=(_49.toX>_49.fromX)?_49.toX:_49.fromX;
var toY=(_49.toY>_49.fromY)?_49.toY:_49.fromY;
for(var y=_4b;y<=toY;y++){
for(var x=_4a;x<=toX;x++){
_45(x,y,_49.sheet,_46,_47);
}
}
break;
default:
jsDebug("Error: selection_applyFunction, invalid range type.");
}
}
}
}
catch(ex){
jsExDebug("selection_applyFunction",ex);
}
}
function selection_applyFunctionByName(_50,_51){
try{
if(!_51||!_50){
return;
}
for(var i=0;i<this.selected.length;i++){
if(this.selected[i]){
var _53=this.selected[i];
switch(_53.type){
case this.SELECTION_ITEM:
_51[_50](_53.x,_53.y,_53.sheet,arguments[2],arguments[3],arguments[4],arguments[5]);
break;
case this.SELECTION_RANGE:
var _54=(_53.fromX<_53.toX)?_53.fromX:_53.toX;
var _55=(_53.fromY<_53.toY)?_53.fromY:_53.toY;
var toX=(_53.toX>_53.fromX)?_53.toX:_53.fromX;
var toY=(_53.toY>_53.fromY)?_53.toY:_53.fromY;
for(var y=_55;y<=toY;y++){
for(var x=_54;x<=toX;x++){
_51[_50](x,y,_53.sheet,arguments[2],arguments[3],arguments[4],arguments[5]);
}
}
break;
default:
jsDebug("Error: selection_applyFunction, invalid range type.");
}
}
}
}
catch(ex){
jsExDebug("selection_applyFunctionByName",ex);
}
}
function selection_getSelectionAsText(){
try{
var _5a="";
for(var i=0;i<this.selected.length;i++){
switch(this.selected[i].type){
case this.SELECTION_ITEM:
_5a+=numericToAlpha(this.selected[i].x)+this.selected[i].y.toString()+",";
break;
case this.SELECTION_RANGE:
_5a+=numericToAlpha(this.selected[i].fromX)+this.selected[i].fromY.toString()+":"+numericToAlpha(this.selected[i].toX)+this.selected[i].toY.toString()+",";
break;
}
}
return _5a.slice(0,_5a.length-2);
}
catch(ex){
jsExDebug("selection_getSelectionAsText",ex);
}
}
function selection_selectFromText(_5c){
try{
var me=this;
_5c.replace(/([A-Z]+)([0-9]+):([A-Z]+)([0-9]+)/gi,function($1,$2,$3,$4,$5){
me.addRange(alphaToNumeric($2),$3,alphaToNumeric($4),$5);
return "";
});
_5c.replace(/([A-Z]+)([0-9]+)/gi,function($1,$2,$3){
me.addItem(alphaToNumeric($2),$3);
return "";
});
}
catch(ex){
jsExDebug("selection_selectFromText",ex);
}
}
function selection_setActiveSheet(_66){
try{
var _67=this.activeSheet;
this.activeSheet=_66;
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,this.activeX,this.activeY,_67,this.activeX,this.activeY,_66);
}
}
catch(ex){
jsExDebug("selection_setActiveSheet",ex);
}
}
function selection_getActive(){
try{
if(this.activeX==null||this.activeY==null||this.activeSheet==null){
return null;
}
return {x:this.activeX,y:this.activeY,sheet:this.activeSheet};
}
catch(ex){
jsExDebug("selection_getActive",ex);
}
}
function selection_next(){
try{
if(!this.selected.length){
return;
}
var _68=this.activeX;
var _69=this.activeY;
var _6a=this.activeSheet;
this.clear();
this.addItem(_68,_69+1,_6a);
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_68,_69,this.activeSheet,this.activeX,this.activeY,this.activeSheet);
}
}
catch(ex){
jsExDebug("selection_next",ex);
}
}
function selection_previous(){
try{
if(!this.selected.length){
return;
}
var _6b=this.activeX;
var _6c=this.activeY;
var _6d=(_6c-1<0?0:_6c-1);
var _6e=this.activeSheet;
this.clear();
this.addItem(_6b,_6d,_6e);
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_6b,_6c,this.activeSheet,this.activeX,this.activeY,this.activeSheet);
}
}
catch(ex){
jsExDebug("selection_previous",ex);
}
}
function selection_nextHorizontal(){
try{
if(!this.selected.length){
return;
}
var _6f=this.activeX;
var _70=this.activeY;
var _71=this.activeSheet;
this.clear();
this.addItem(_6f+1,_70,_71);
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_6f,_70,this.activeSheet,this.activeX,this.activeY,this.activeSheet);
}
}
catch(ex){
jsExDebug("selection_nextHorizontal",ex);
}
}
function selection_previousHorizontal(){
try{
if(!this.selected.length){
return;
}
var _72=this.activeX;
var _73=this.activeY;
var _74=(_72-1<0?0:_72-1);
var _75=this.activeSheet;
this.clear();
this.addItem(_74,_73,_75);
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_72,_73,this.activeSheet,this.activeX,this.activeY,this.activeSheet);
}
}
catch(ex){
jsExDebug("selection_previousHorizontal",ex);
}
}
function selection_nextActive(){
try{
if(!this.selected.length){
return;
}
var _76=this.activeX;
var _77=this.activeY;
var _78=this.activeSheet;
var _79=(this.selected[this.activeIndex].fromX<this.selected[this.activeIndex].toX)?this.selected[this.activeIndex].fromX:this.selected[this.activeIndex].toX;
var _7a=(this.selected[this.activeIndex].fromY<this.selected[this.activeIndex].toY)?this.selected[this.activeIndex].fromY:this.selected[this.activeIndex].toY;
var toX=(this.selected[this.activeIndex].toX>this.selected[this.activeIndex].fromX)?this.selected[this.activeIndex].toX:this.selected[this.activeIndex].fromX;
var toY=(this.selected[this.activeIndex].toY>this.selected[this.activeIndex].fromY)?this.selected[this.activeIndex].toY:this.selected[this.activeIndex].fromY;
switch(this.selected[this.activeIndex].type){
case this.SELECTION_ITEM:
if(this.selected.length==1){
this.next();
}else{
this.activeIndex++;
if(this.activeIndex>=this.selected.length){
this.activeIndex=0;
}
this.activateFirstInRange();
}
break;
case this.SELECTION_RANGE:
this.activeY++;
if(this.activeY>toY){
this.activeY=_7a;
this.activeX++;
if(this.activeX>toX){
this.activeIndex++;
if(this.activeIndex>=this.selected.length){
this.activeIndex=0;
}
this.activateFirstInRange();
}
}
break;
default:
}
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_76,_77,_78,this.activeX,this.activeY,this.activeSheet);
}
return;
}
catch(ex){
jsExDebug("selection_nextActive",ex);
}
}
function selection_previousActive(){
try{
if(!this.selected.length){
return;
}
var _7d=this.activeX;
var _7e=this.activeY;
var _7f=this.activeSheet;
var _80=(this.selected[this.activeIndex].fromX<this.selected[this.activeIndex].toX)?this.selected[this.activeIndex].fromX:this.selected[this.activeIndex].toX;
var _81=(this.selected[this.activeIndex].fromY<this.selected[this.activeIndex].toY)?this.selected[this.activeIndex].fromY:this.selected[this.activeIndex].toY;
var toX=(this.selected[this.activeIndex].toX>this.selected[this.activeIndex].fromX)?this.selected[this.activeIndex].toX:this.selected[this.activeIndex].fromX;
var toY=(this.selected[this.activeIndex].toY>this.selected[this.activeIndex].fromY)?this.selected[this.activeIndex].toY:this.selected[this.activeIndex].fromY;
switch(this.selected[this.activeIndex].type){
case this.SELECTION_ITEM:
if(this.selected.length==1){
this.previous();
}else{
this.activeIndex--;
alert(this.activeIndex);
if(this.activeIndex<0){
this.activeIndex=this.selected.length-1;
}
this.activateLastInRange();
}
break;
case this.SELECTION_RANGE:
this.activeY--;
if(this.activeY<_81){
this.activeY=toY;
this.activeX--;
if(this.activeX<_80){
this.activeIndex--;
if(this.activeIndex<0){
this.activeIndex=this.selected.length-1;
}
this.activateLastInRange();
}
}
break;
default:
}
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_7d,_7e,_7f,this.activeX,this.activeY,this.activeSheet);
}
return;
}
catch(ex){
jsExDebug("selection_previousActive",ex);
}
}
function selection_nextHorizontalActive(){
try{
if(!this.selected.length){
return;
}
var _84=this.activeX;
var _85=this.activeY;
var _86=this.activeSheet;
var _87=(this.selected[this.activeIndex].fromX<this.selected[this.activeIndex].toX)?this.selected[this.activeIndex].fromX:this.selected[this.activeIndex].toX;
var _88=(this.selected[this.activeIndex].fromY<this.selected[this.activeIndex].toY)?this.selected[this.activeIndex].fromY:this.selected[this.activeIndex].toY;
var toX=(this.selected[this.activeIndex].toX>this.selected[this.activeIndex].fromX)?this.selected[this.activeIndex].toX:this.selected[this.activeIndex].fromX;
var toY=(this.selected[this.activeIndex].toY>this.selected[this.activeIndex].fromY)?this.selected[this.activeIndex].toY:this.selected[this.activeIndex].fromY;
switch(this.selected[this.activeIndex].type){
case this.SELECTION_ITEM:
if(this.selected.length==1){
this.nextHorizontal();
}else{
this.activeIndex++;
if(this.activeIndex>=this.selected.length){
this.activeIndex=0;
}
this.activateFirstInRange();
}
break;
case this.SELECTION_RANGE:
this.activeX++;
if(this.activeX>toX){
this.activeX=_87;
this.activeY++;
if(this.activeY>toY){
this.activeIndex++;
if(this.activeIndex>=this.selected.length){
this.activeIndex=0;
}
this.activateFirstInRange();
}
}
break;
default:
}
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_84,_85,_86,this.activeX,this.activeY,this.activeSheet);
}
return;
}
catch(ex){
jsExDebug("selection_nextHorizontalActive",ex);
}
}
function selection_previousHorizontalActive(){
try{
if(!this.selected.length){
return;
}
var _8b=this.activeX;
var _8c=this.activeY;
var _8d=this.activeSheet;
var _8e=(this.selected[this.activeIndex].fromX<this.selected[this.activeIndex].toX)?this.selected[this.activeIndex].fromX:this.selected[this.activeIndex].toX;
var _8f=(this.selected[this.activeIndex].fromY<this.selected[this.activeIndex].toY)?this.selected[this.activeIndex].fromY:this.selected[this.activeIndex].toY;
var toX=(this.selected[this.activeIndex].toX>this.selected[this.activeIndex].fromX)?this.selected[this.activeIndex].toX:this.selected[this.activeIndex].fromX;
var toY=(this.selected[this.activeIndex].toY>this.selected[this.activeIndex].fromY)?this.selected[this.activeIndex].toY:this.selected[this.activeIndex].fromY;
switch(this.selected[this.activeIndex].type){
case this.SELECTION_ITEM:
if(this.selected.length==1){
this.previousHorizontal();
}else{
this.activeIndex++;
if(this.activeIndex<0){
this.activeIndex=this.selected.length-1;
}
this.activateLastInRange();
}
break;
case this.SELECTION_RANGE:
this.activeX--;
if(this.activeX<_8e){
this.activeX=toX;
this.activeY--;
if(this.activeY<_8f){
this.activeIndex--;
if(this.activeIndex<0){
this.activeIndex=this.selected.length-1;
}
this.activateLastInRange();
}
}
break;
default:
}
if(this.notifyActiveChangeHandler){
this.notifyActiveChangeHandler(this.notifyActiveChangeInstance,_8b,_8c,_8d,this.activeX,this.activeY,this.activeSheet);
}
return;
}
catch(ex){
jsExDebug("selection_previousHorizontalActive",ex);
}
}
function selection_activateFirstInRange(_92){
try{
if(!this.selected.length){
return;
}
switch(this.selected[this.activeIndex].type){
case this.SELECTION_ITEM:
this.activeX=this.selected[this.activeIndex].x;
this.activeY=this.selected[this.activeIndex].y;
this.activeSheet=this.selected[this.activeIndex].sheet;
break;
case this.SELECTION_RANGE:
this.activeX=(this.selected[this.activeIndex].fromX<this.selected[this.activeIndex].toX)?this.selected[this.activeIndex].fromX:this.selected[this.activeIndex].toX;
this.activeY=(this.selected[this.activeIndex].fromY<this.selected[this.activeIndex].toY)?this.selected[this.activeIndex].fromY:this.selected[this.activeIndex].toY;
this.activeSheet=this.selected[this.activeIndex].sheet;
break;
default:
}
}
catch(ex){
jsExDebug("selection_activateFirstInRange",ex);
}
}
function selection_activateLastInRange(_93){
try{
if(!this.selected.length){
return;
}
switch(this.selected[this.activeIndex].type){
case this.SELECTION_ITEM:
this.activeX=this.selected[this.activeIndex].x;
this.activeY=this.selected[this.activeIndex].y;
this.activeSheet=this.selected[this.activeIndex].sheet;
break;
case this.SELECTION_RANGE:
this.activeX=(this.selected[this.activeIndex].fromX<this.selected[this.activeIndex].toX)?this.selected[this.activeIndex].toX:this.selected[this.activeIndex].fromX;
this.activeY=(this.selected[this.activeIndex].fromY<this.selected[this.activeIndex].toY)?this.selected[this.activeIndex].toY:this.selected[this.activeIndex].fromY;
this.activeSheet=this.selected[this.activeIndex].sheet;
break;
default:
}
}
catch(ex){
jsExDebug("selection_activateLastInRange",ex);
}
}
function selection_notifyActiveChange(_94,_95){
try{
this.notifyActiveChangeHandler=_94;
this.notifyActiveChangeInstance=_95;
}
catch(ex){
jsExDebug("selection_notifyActiveChange",ex);
}
}
function selection_notifyRangeExpand(_96){
try{
this.rangeExpandDelegate=_96;
}
catch(ex){
jsExDebug("selection_notifyRangeExpand",ex);
}
}

try{
spreadsheetApp_t.prototype=new application_t();
spreadsheetApp_t.prototype.constructor=spreadsheetApp_t;
spreadsheetApp_t.prototype.spreadSheetApp_super=application_t.prototype.constructor;
spreadsheetApp_t.prototype.cleanUp=spreadsheetApp_cleanUp;
spreadsheetApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
spreadsheetApp_t.prototype.spreadWindow_keyPress=spreadsheetApp_spreadWindow_keyPress;
spreadsheetApp_t.prototype.binding_evaluate_click=spreadsheetApp_binding_evaluate_click;
spreadsheetApp_t.prototype.createPanel=spreadsheetApp_createPanel;
spreadsheetApp_t.prototype.close=spreadsheetApp_close;
spreadsheetApp_t.prototype.loadDataFromArray=spreadsheetApp_loadDataFromArray;
spreadsheetApp_t.prototype.capture=spreadsheetApp_capture;
spreadsheetApp_t.prototype.restore=spreadsheetApp_restore;
spreadsheetApp_t.prototype._SIG_KILL=spreadsheetApp__SIG_KILL;
spreadsheetApp_t.prototype._SIG_THEME=spreadsheetApp__SIG_THEME;
spreadsheetApp_t.prototype.isDirty=spreadsheetApp_isDirty;
spreadsheetApp_t.prototype.getFileName=spreadsheetApp_getFileName;
spreadsheetApp_t.prototype.cleanAction=spreadsheetApp_cleanAction;
spreadsheetApp_t.prototype.changeBgColour=spreadsheetApp_changeBgColour;
spreadsheetApp_t.prototype.changeTextColour=spreadsheetApp_changeTextColour;
spreadsheetApp_t.prototype.convertColourToHex=spreadsheetApp_convertColourToHex;
spreadsheetApp_t.prototype.fillFormulaDropLists=spreadsheetApp_fillFormulaDropLists;
spreadsheetApp_t.prototype.showFormulaWizardFrame=spreadsheetApp_showFormulaWizardFrame;
spreadsheetApp_t.prototype.showCellFormattingFrame=spreadsheetApp_showCellFormattingFrame;
spreadsheetApp_t.prototype.showGeneralFormatOptions=spreadsheetApp_showGeneralFormatOptions;
spreadsheetApp_t.prototype.showNumberFormatOptions=spreadsheetApp_showNumberFormatOptions;
spreadsheetApp_t.prototype.showCurrencyFormatOptions=spreadsheetApp_showCurrencyFormatOptions;
spreadsheetApp_t.prototype.showAccountingFormatOptions=spreadsheetApp_showAccountingFormatOptions;
spreadsheetApp_t.prototype.showDateFormatOptions=spreadsheetApp_showDateFormatOptions;
spreadsheetApp_t.prototype.showTimeFormatOptions=spreadsheetApp_showTimeFormatOptions;
spreadsheetApp_t.prototype.showPercentageFormatOptions=spreadsheetApp_showPercentageFormatOptions;
spreadsheetApp_t.prototype.createCategoryDiv=spreadsheetApp_createCategoryDiv;
spreadsheetApp_t.prototype.setFormatSample=spreadsheetApp_setFormatSample;
spreadsheetApp_t.prototype.selectionChangeCallback=spreadsheetApp_selectionChangeCallback;
spreadsheetApp_t.prototype.selectionRangeExpandCallback=spreadsheetApp_selectionRangeExpandCallback;
spreadsheetApp_t.prototype.dirtyStatusChangeCallback=spreadsheetApp_dirtyStatusChangeCallback;
spreadsheetApp_t.prototype.getFormulaNamesCallback=spreadsheetApp_getFormulaNamesCallback;
spreadsheetApp_t.prototype.selectFormulaWizardCategory=spreadsheetApp_selectFormulaWizardCategory;
spreadsheetApp_t.prototype.checkOkToSave=spreadsheetApp_checkOkToSave;
spreadsheetApp_t.prototype.save=spreadsheetApp_save;
spreadsheetApp_t.prototype.simpleSave=spreadsheetApp_simpleSave;
spreadsheetApp_t.prototype.saveAs=spreadsheetApp_saveAs;
spreadsheetApp_t.prototype.saveCallback=spreadsheetApp_saveCallback;
spreadsheetApp_t.prototype.load=spreadsheetApp_load;
spreadsheetApp_t.prototype.loadCallback=spreadsheetApp_loadCallback;
spreadsheetApp_t.prototype.loadTemplate=spreadsheetApp_loadTemplate;
spreadsheetApp_t.prototype.reload=spreadsheetApp_reload;
spreadsheetApp_t.prototype.exportFile=spreadsheetApp_exportFile;
spreadsheetApp_t.prototype.spreadWindow__onClose=spreadsheetApp_spreadWindow__onClose;
spreadsheetApp_t.prototype.spreadWindow__onResize=spreadsheetApp_spreadWindow__onResize;
spreadsheetApp_t.prototype.spreadWindow__onResizeEnd=spreadsheetApp_spreadWindow__onResizeEnd;
spreadsheetApp_t.prototype.spreadWindow__onMove=spreadsheetApp_spreadWindow__onMove;
spreadsheetApp_t.prototype.spreadWindow__onFocus=spreadsheetApp_spreadWindow__onFocus;
spreadsheetApp_t.prototype.spreadWindow__onScrollUp=spreadsheetApp_spreadWindow__onScrollUp;
spreadsheetApp_t.prototype.spreadWindow__onScrollDown=spreadsheetApp_spreadWindow__onScrollDown;
spreadsheetApp_t.prototype.spreadWindow_keyDown=spreadsheetApp_spreadWindow_keyDown;
spreadsheetApp_t.prototype.formulaWizardFrame__onClose=spreadsheetApp_formulaWizardFrame__onClose;
spreadsheetApp_t.prototype.formattingFrame__onClose=spreadsheetApp_formattingFrame__onClose;
spreadsheetApp_t.prototype.exportFrame__onClose=spreadsheetApp_exportFrame__onClose;
spreadsheetApp_t.prototype.binding_formulaCategoryList_itemSelect=spreadsheetApp_binding_formulaCategoryList_itemSelect;
spreadsheetApp_t.prototype.binding_formulaNameList_itemSelect=spreadsheetApp_binding_formulaNameList_itemSelect;
spreadsheetApp_t.prototype.binding_formulaInsertBtn_click=spreadsheetApp_binding_formulaInsertBtn_click;
spreadsheetApp_t.prototype.binding_formattingCategorySelect_itemSelect=spreadsheetApp_binding_formattingCategorySelect_itemSelect;
spreadsheetApp_t.prototype.binding_numberDecimalSelect_valueChange=spreadsheetApp_binding_numberDecimalSelect_valueChange;
spreadsheetApp_t.prototype.binding_numberCommaCheckbox_valueChange=spreadsheetApp_binding_numberCommaCheckbox_valueChange;
spreadsheetApp_t.prototype.binding_numberNegativeSelect_itemSelect=spreadsheetApp_binding_numberNegativeSelect_itemSelect;
spreadsheetApp_t.prototype.binding_currencyDecimalSelect_valueChange=spreadsheetApp_binding_currencyDecimalSelect_valueChange;
spreadsheetApp_t.prototype.binding_currencySymbolDropText_itemSelect=spreadsheetApp_binding_currencySymbolDropText_itemSelect;
spreadsheetApp_t.prototype.binding_currencyNegativeSelect_itemSelect=spreadsheetApp_binding_currencyNegativeSelect_itemSelect;
spreadsheetApp_t.prototype.binding_accountingDecimalSelect_valueChange=spreadsheetApp_binding_accountingDecimalSelect_valueChange;
spreadsheetApp_t.prototype.binding_accountingBracketCheckbox_valueChange=spreadsheetApp_binding_accountingBracketCheckbox_valueChange;
spreadsheetApp_t.prototype.binding_accountingSymbolSelect_itemSelect=spreadsheetApp_binding_accountingSymbolSelect_itemSelect;
spreadsheetApp_t.prototype.binding_customDateText_focus=spreadsheetApp_binding_customDateText_focus;
spreadsheetApp_t.prototype.binding_dateTypeSelect_itemSelect=spreadsheetApp_binding_dateTypeSelect_itemSelect;
spreadsheetApp_t.prototype.binding_customTimeText_focus=spreadsheetApp_binding_customTimeText_focus;
spreadsheetApp_t.prototype.binding_timeTypeSelect_itemSelect=spreadsheetApp_binding_timeTypeSelect_itemSelect;
spreadsheetApp_t.prototype.binding_percentageDecimalSelect_valueChange=spreadsheetApp_binding_percentageDecimalSelect_valueChange;
spreadsheetApp_t.prototype.binding_formattingApplyBtn_click=spreadsheetApp_binding_formattingApplyBtn_click;
spreadsheetApp_t.prototype.binding_exportOpenOfficeBtn_click=spreadsheetApp_binding_exportOpenOfficeBtn_click;
spreadsheetApp_t.prototype.binding_exportExcelBtn_click=spreadsheetApp_binding_exportExcelBtn_click;
spreadsheetApp_t.prototype.binding_exportCancelBtn_click=spreadsheetApp_binding_exportCancelBtn_click;
spreadsheetApp_t.prototype.binding_save_click=spreadsheetApp_binding_save_click;
spreadsheetApp_t.prototype.binding_saveAs_click=spreadsheetApp_binding_saveAs_click;
spreadsheetApp_t.prototype.binding_open_click=spreadsheetApp_binding_open_click;
spreadsheetApp_t.prototype.binding_print_click=spreadsheetApp_binding_print_click;
spreadsheetApp_t.prototype.binding_export_click=spreadsheetApp_binding_export_click;
spreadsheetApp_t.prototype.binding_quickHelpBtn_click=spreadsheetApp_binding_quickHelpBtn_click;
spreadsheetApp_t.prototype.binding_refreshBtn_click=spreadsheetApp_binding_refreshBtn_click;
spreadsheetApp_t.prototype.binding_pasteBtn_click=spreadsheetApp_binding_pasteBtn_click;
spreadsheetApp_t.prototype.binding_copyBtn_click=spreadsheetApp_binding_copyBtn_click;
spreadsheetApp_t.prototype.binding_cutBtn_click=spreadsheetApp_binding_cutBtn_click;
spreadsheetApp_t.prototype.binding_fontFaceSelect_itemSelect=spreadsheetApp_binding_fontFaceSelect_itemSelect;
spreadsheetApp_t.prototype.binding_fontSizeSelect_itemSelect=spreadsheetApp_binding_fontSizeSelect_itemSelect;
spreadsheetApp_t.prototype.binding_boldBtn_click=spreadsheetApp_binding_boldBtn_click;
spreadsheetApp_t.prototype.binding_italicsBtn_click=spreadsheetApp_binding_italicsBtn_click;
spreadsheetApp_t.prototype.binding_underlineBtn_click=spreadsheetApp_binding_underlineBtn_click;
spreadsheetApp_t.prototype.binding_strikethroughBtn_click=spreadsheetApp_binding_strikethroughBtn_click;
spreadsheetApp_t.prototype.binding_clearFormatBtn_click=spreadsheetApp_binding_clearFormatBtn_click;
spreadsheetApp_t.prototype.binding_fillColourDropList_itemWidget=spreadsheetApp_binding_fillColourDropList_itemWidget;
spreadsheetApp_t.prototype.binding_fillColourBtn_click=spreadsheetApp_binding_fillColourBtn_click;
spreadsheetApp_t.prototype.binding_highlightColourDropList_itemWidget=spreadsheetApp_binding_highlightColourDropList_itemWidget;
spreadsheetApp_t.prototype.binding_highlightColourBtn_click=spreadsheetApp_binding_highlightColourBtn_click;
spreadsheetApp_t.prototype.binding_alignLeftBtn_click=spreadsheetApp_binding_alignLeftBtn_click;
spreadsheetApp_t.prototype.binding_alignCentreBtn_click=spreadsheetApp_binding_alignCentreBtn_click;
spreadsheetApp_t.prototype.binding_alignRightBtn_click=spreadsheetApp_binding_alignRightBtn_click;
spreadsheetApp_t.prototype.binding_percentStyleBtn_click=spreadsheetApp_binding_percentStyleBtn_click;
spreadsheetApp_t.prototype.binding_commaStyleBtn_click=spreadsheetApp_binding_commaStyleBtn_click;
spreadsheetApp_t.prototype.binding_incDecimalBtn_click=spreadsheetApp_binding_incDecimalBtn_click;
spreadsheetApp_t.prototype.binding_decDecimalBtn_click=spreadsheetApp_binding_decDecimalBtn_click;
spreadsheetApp_t.prototype.binding_currencyBtn_click=spreadsheetApp_binding_currencyBtn_click;
spreadsheetApp_t.prototype.binding_generalFormatBtn_click=spreadsheetApp_binding_generalFormatBtn_click;
spreadsheetApp_t.prototype.binding_numberFormatDropList_click=spreadsheetApp_binding_numberFormatDropList_click;
spreadsheetApp_t.prototype.binding_currencyFormatDropList_click=spreadsheetApp_binding_currencyFormatDropList_click;
spreadsheetApp_t.prototype.binding_accountingFormatDropList_click=spreadsheetApp_binding_accountingFormatDropList_click;
spreadsheetApp_t.prototype.binding_dateFormatDropList_click=spreadsheetApp_binding_dateFormatDropList_click;
spreadsheetApp_t.prototype.binding_timeFormatDropList_click=spreadsheetApp_binding_timeFormatDropList_click;
spreadsheetApp_t.prototype.binding_percentageFormatDropList_click=spreadsheetApp_binding_percentageFormatDropList_click;
spreadsheetApp_t.prototype.binding_numberFormatDropList_itemSelect=spreadsheetApp_binding_numberFormatDropList_itemSelect;
spreadsheetApp_t.prototype.binding_currencyFormatDropList_itemSelect=spreadsheetApp_binding_currencyFormatDropList_itemSelect;
spreadsheetApp_t.prototype.binding_accountingFormatDropList_itemSelect=spreadsheetApp_binding_accountingFormatDropList_itemSelect;
spreadsheetApp_t.prototype.binding_dateFormatDropList_itemSelect=spreadsheetApp_binding_dateFormatDropList_itemSelect;
spreadsheetApp_t.prototype.binding_timeFormatDropList_itemSelect=spreadsheetApp_binding_timeFormatDropList_itemSelect;
spreadsheetApp_t.prototype.binding_percentageFormatDropList_itemSelect=spreadsheetApp_binding_percentageFormatDropList_itemSelect;
spreadsheetApp_t.prototype.binding_symbolDropList_itemWidget=spreadsheetApp_binding_symbolDropList_itemWidget;
spreadsheetApp_t.prototype.binding_insertDropList_itemSelect=spreadsheetApp_binding_insertDropList_itemSelect;
spreadsheetApp_t.prototype.binding_formulaWizardBtn_click=spreadsheetApp_binding_formulaWizardBtn_click;
spreadsheetApp_t.prototype.binding_formulaDropList_itemSelect=spreadsheetApp_binding_formulaDropList_itemSelect;
spreadsheetApp_t.prototype.collaboration_tokenRelease=spreadsheetApp_collaboration_tokenRelease;
spreadsheetApp_t.prototype.binding_templateSelect_itemSelect=spreadsheetApp_binding_templateSelect_itemSelect;
spreadsheetApp_t.prototype.APP_ID=APP_ID_SPREADSHEET;
spreadsheetApp_t.prototype.APP_NAME="WebSheet";
spreadsheetApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.SPREADSHEET;
spreadsheetApp_t.prototype.SPREADSHEET_DIM_OFFSET=2;
spreadsheetApp_t.prototype.FORMULA_WIZ_WIDTH=340;
spreadsheetApp_t.prototype.FORMULA_WIZ_HEIGHT=375;
spreadsheetApp_t.prototype.CATEGORY_LIST_WIDTH=160;
spreadsheetApp_t.prototype.CATEGORY_LIST_HEIGHT=85;
spreadsheetApp_t.prototype.FORMULA_LIST_WIDTH=spreadsheetApp_t.prototype.CATEGORY_LIST_WIDTH;
spreadsheetApp_t.prototype.FORMULA_LIST_HEIGHT=spreadsheetApp_t.prototype.CATEGORY_LIST_HEIGHT;
spreadsheetApp_t.prototype.FORMULA_DESC_TITLE_HEIGHT=20;
spreadsheetApp_t.prototype.FORMULA_DESC_CONTENT_HEIGHT=70;
spreadsheetApp_t.prototype.FORMULA_DESC_CONTENT_WIDTH=spreadsheetApp_t.prototype.FORMULA_WIZ_WIDTH-7;
spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_TITLE_LEFT=10;
spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_TITLE_HEIGHT=20;
spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_CONTENT_HEIGHT=20;
spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_CONTENT_WIDTH=spreadsheetApp_t.prototype.FORMULA_WIZ_WIDTH-7;
spreadsheetApp_t.prototype.FORMULA_EXAMPLE_TITLE_HEIGHT=20;
spreadsheetApp_t.prototype.FORMULA_EXAMPLE_CONTENT_HEIGHT=70;
spreadsheetApp_t.prototype.FORMULA_EXAMPLE_CONTENT_WIDTH=spreadsheetApp_t.prototype.FORMULA_WIZ_WIDTH-7;
spreadsheetApp_t.prototype.FORMULA_LIST_TOP=0;
spreadsheetApp_t.prototype.FORMULA_DESC_TITLE_TOP=spreadsheetApp_t.prototype.CATEGORY_LIST_HEIGHT+15;
spreadsheetApp_t.prototype.FORMULA_DESC_CONTENT_TOP=spreadsheetApp_t.prototype.FORMULA_DESC_TITLE_TOP+spreadsheetApp_t.prototype.FORMULA_DESC_TITLE_HEIGHT;
spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_TITLE_TOP=spreadsheetApp_t.prototype.FORMULA_DESC_CONTENT_TOP+spreadsheetApp_t.prototype.FORMULA_DESC_CONTENT_HEIGHT+10;
spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_CONTENT_TOP=spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_TITLE_TOP+spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_TITLE_HEIGHT;
spreadsheetApp_t.prototype.FORMULA_EXAMPLE_TITLE_TOP=spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_CONTENT_TOP+spreadsheetApp_t.prototype.FORMULA_SYNOPSIS_CONTENT_HEIGHT+10;
spreadsheetApp_t.prototype.FORMULA_EXAMPLE_CONTENT_TOP=spreadsheetApp_t.prototype.FORMULA_EXAMPLE_TITLE_TOP+spreadsheetApp_t.prototype.FORMULA_EXAMPLE_TITLE_HEIGHT;
spreadsheetApp_t.prototype.FORMATTING_FRAME_WIDTH=380;
spreadsheetApp_t.prototype.FORMATTING_FRAME_HEIGHT=370;
spreadsheetApp_t.prototype.FORMATTING_CATEGORY_WIDTH=100;
spreadsheetApp_t.prototype.FORMATTING_CATEGORY_HEIGHT=200;
spreadsheetApp_t.prototype.FORMATTING_CATEGORY_LEFT=0;
spreadsheetApp_t.prototype.FORMATTING_CATEGORY_TOP=0;
spreadsheetApp_t.prototype.FORMATTING_CATEGORY_DIV_LEFT=110;
spreadsheetApp_t.prototype.FORMATTING_CATEGORY_DIV_TOP=60;
spreadsheetApp_t.prototype.FORMATTING_CATEGORY_DIV_WIDTH=220;
spreadsheetApp_t.prototype.FORMATTING_CATEGORY_DIV_HEIGHT=150;
spreadsheetApp_t.prototype.FORMATTING_DESC_LBL_LEFT=15;
spreadsheetApp_t.prototype.FORMATTING_DESC_LBL_TOP=240;
spreadsheetApp_t.prototype.FORMATTING_DESC_DIV_LEFT=15;
spreadsheetApp_t.prototype.FORMATTING_DESC_DIV_TOP=260;
spreadsheetApp_t.prototype.FORMATTING_DESC_DIV_WIDTH=345;
spreadsheetApp_t.prototype.FORMATTING_DESC_DIV_HEIGHT=70;
spreadsheetApp_t.prototype.FORMATTING_SAMPLE_LBL_LEFT=120;
spreadsheetApp_t.prototype.FORMATTING_SAMPLE_LBL_TOP=0;
spreadsheetApp_t.prototype.FORMATTING_SAMPLE_DIV_LEFT=110;
spreadsheetApp_t.prototype.FORMATTING_SAMPLE_DIV_TOP=20;
spreadsheetApp_t.prototype.FORMATTING_SAMPLE_DIV_WIDTH=220;
spreadsheetApp_t.prototype.FORMATTING_SAMPLE_DIV_HEIGHT=25;
spreadsheetApp_t.prototype.GENERAL_FORMAT=1;
spreadsheetApp_t.prototype.NUMBER_FORMAT=2;
spreadsheetApp_t.prototype.CURRENCY_FORMAT=3;
spreadsheetApp_t.prototype.ACCOUNTING_FORMAT=4;
spreadsheetApp_t.prototype.DATE_FORMAT=5;
spreadsheetApp_t.prototype.TIME_FORMAT=6;
spreadsheetApp_t.prototype.PERCENTAGE_FORMAT=7;
spreadsheetApp_t.prototype.NUMBER_NEG_1=1;
spreadsheetApp_t.prototype.NUMBER_NEG_2=2;
spreadsheetApp_t.prototype.NUMBER_NEG_3=3;
spreadsheetApp_t.prototype.NUMBER_NEG_4=4;
spreadsheetApp_t.prototype.CURRENCY_NEG_1=1;
spreadsheetApp_t.prototype.CURRENCY_NEG_2=2;
spreadsheetApp_t.prototype.CURRENCY_NEG_3=3;
spreadsheetApp_t.prototype.CURRENCY_NEG_4=4;
spreadsheetApp_t.prototype.DATE_1=1;
spreadsheetApp_t.prototype.DATE_2=2;
spreadsheetApp_t.prototype.DATE_3=3;
spreadsheetApp_t.prototype.DATE_4=4;
spreadsheetApp_t.prototype.DATE_5=5;
spreadsheetApp_t.prototype.DATE_6=6;
spreadsheetApp_t.prototype.DATE_7=7;
spreadsheetApp_t.prototype.DATE_8=8;
spreadsheetApp_t.prototype.DATE_9=9;
spreadsheetApp_t.prototype.DATE_10=10;
spreadsheetApp_t.prototype.TIME_1=1;
spreadsheetApp_t.prototype.TIME_2=2;
spreadsheetApp_t.prototype.TIME_3=3;
spreadsheetApp_t.prototype.TIME_4=4;
spreadsheetApp_t.prototype.TIME_5=5;
spreadsheetApp_t.prototype.TIME_6=6;
spreadsheetApp_t.prototype.COMMA_ON_TEXT="Using comma as separator.";
spreadsheetApp_t.prototype.COMMA_OFF_TEXT="Not using comma as separator.";
spreadsheetApp_t.prototype.EXPORT_FRAME_WIDTH=280;
spreadsheetApp_t.prototype.EXPORT_FRAME_HEIGHT=140;
spreadsheetApp_t.prototype.EXPORT_TITLE_LEFT=10;
spreadsheetApp_t.prototype.EXPORT_O_OFFICE_IMG="img/app/app/writer/export_oo";
spreadsheetApp_t.prototype.EXPORT_EXCEL_IMG="img/app/app/spreadsheet/export_excel";
spreadsheetApp_t.prototype.EXPORT_EXCEL_LEFT=40;
spreadsheetApp_t.prototype.EXPORT_EXCEL_TOP=40;
spreadsheetApp_t.prototype.EXPORT_O_OFFICE_LEFT=40;
spreadsheetApp_t.prototype.EXPORT_O_OFFICE_TOP=80;
spreadsheetApp_t.prototype.EXCEL_FORMAT=1;
spreadsheetApp_t.prototype.OPEN_OFFICE_FORMAT=2;
spreadsheetApp_t.prototype.SMALL_BTN_SIDE=24;
spreadsheetApp_t.prototype.DROP_IMG="img/app/system/icons/24x24/12_drop_down.png";
spreadsheetApp_t.prototype.LARGE_BUTTON_WIDTH=40;
spreadsheetApp_t.prototype.LARGE_BUTTON_HEIGHT=60;
spreadsheetApp_t.prototype.DEFAULT_BUTTON_HEIGHT=40;
spreadsheetApp_t.prototype.DROP_BUTTON_HEIGHT=20;
spreadsheetApp_t.prototype.DEFAULT_BGCOLOUR="rgb(202, 232, 255)";
spreadsheetApp_t.prototype.SELECT_BGCOLOUR="rgb(255, 255, 255)";
spreadsheetApp_t.prototype.SAVE_ON_TOOLTIP="Save the document.<br>(shortcut key: Ctrl-S)";
spreadsheetApp_t.prototype.SAVE_OFF_TOOLTIP="There are no changes to save.";
spreadsheetApp_t.prototype.SAVE_UTILITY="img/app/system/icons/utility/save.png";
spreadsheetApp_t.prototype.SAVEAS_UTILITY="img/app/system/icons/utility/saveas.png";
spreadsheetApp_t.prototype.OPEN_UTILITY="img/app/system/icons/utility/open.png";
spreadsheetApp_t.prototype.PRINT_UTILITY="img/app/system/icons/utility/print.png";
spreadsheetApp_t.prototype.EXPORT_UTILITY="img/app/system/icons/utility/export.png";
spreadsheetApp_t.prototype.REFRESH_UTILITY="img/app/system/icons/utility/refresh.png";
spreadsheetApp_t.prototype.FILE_TG_WIDTH=224;
spreadsheetApp_t.prototype.SAVE_LARGE_IMG="img/app/system/icons/utility/save";
spreadsheetApp_t.prototype.SAVEAS_LARGE_IMG="img/app/system/icons/utility/saveas";
spreadsheetApp_t.prototype.OPEN_LARGE_IMG="img/app/system/icons/utility/openfile";
spreadsheetApp_t.prototype.PRINT_LARGE_IMG="img/app/system/icons/utility/print";
spreadsheetApp_t.prototype.EXPORT_LARGE_IMG="img/app/system/icons/utility/export";
spreadsheetApp_t.prototype.CLIPBOARD_TG_WIDTH=76;
spreadsheetApp_t.prototype.PASTE_IMG="img/app/system/icons/40x60/paste.png";
spreadsheetApp_t.prototype.COPY_IMG="img/app/system/icons/24x24/copy.png";
spreadsheetApp_t.prototype.CUT_IMG="img/app/system/icons/24x24/cut.png";
spreadsheetApp_t.prototype.FONT_TG_WIDTH=267;
spreadsheetApp_t.prototype.NUM_FORMAT_IMG_WIDTH=35;
spreadsheetApp_t.prototype.NUM_FORMAT_IMG_HEIGHT=35;
spreadsheetApp_t.prototype.FONT_GRID_ITEM_WIDTH=31;
spreadsheetApp_t.prototype.FONT_GRID_ITEM_HEIGHT=36;
spreadsheetApp_t.prototype.COLOUR_CHOOSER_CELLS_WIDE=6;
spreadsheetApp_t.prototype.COLOUR_CHOOSER_CELLS_HIGH=6;
spreadsheetApp_t.prototype.COLOUR_CHOOSER_WIDTH=100;
spreadsheetApp_t.prototype.COLOUR_CHOOSER_HEIGHT=100;
spreadsheetApp_t.prototype.FONT_SIZE_8="11px";
spreadsheetApp_t.prototype.FONT_SIZE_10="14px";
spreadsheetApp_t.prototype.FONT_SIZE_12="17px";
spreadsheetApp_t.prototype.FONT_SIZE_14="20px";
spreadsheetApp_t.prototype.FONT_SIZE_18="24px";
spreadsheetApp_t.prototype.FONT_SIZE_24="31px";
spreadsheetApp_t.prototype.FONT_SIZE_36="43px";
spreadsheetApp_t.prototype.BOLD_IMG="img/app/system/icons/24x24/bold.png";
spreadsheetApp_t.prototype.ITALICS_IMG="img/app/system/icons/24x24/italics.png";
spreadsheetApp_t.prototype.UNDERLINE_IMG="img/app/system/icons/24x24/underline.png";
spreadsheetApp_t.prototype.STRIKETHROUGH_IMG="img/app/system/icons/24x24/strikethrough.png";
spreadsheetApp_t.prototype.FILL_COLOUR_IMG="img/app/system/icons/24x24/background_colour.png";
spreadsheetApp_t.prototype.HIGHLIGHT_COLOUR_IMG="img/app/system/icons/24x24/text_colour.png";
spreadsheetApp_t.prototype.GROW_FONT_IMG="img/app/panel/font_group/growfont.bmp";
spreadsheetApp_t.prototype.SHRINK_FONT_IMG="img/app/panel/font_group/shrinkfont.bmp";
spreadsheetApp_t.prototype.BORDER_STYLE_IMG="img/app/panel/font_group/bordernone.bmp";
spreadsheetApp_t.prototype.BORDER_DEFAULT_IMG="img/app/panel/font_group/bordernone.bmp";
spreadsheetApp_t.prototype.BORDER_DOUBLE_IMG="img/app/panel/font_group/bordernone.bmp";
spreadsheetApp_t.prototype.BORDER_THICK_IMG="img/app/panel/font_group/bordernone.bmp";
spreadsheetApp_t.prototype.BORDER_DASHED_IMG="img/app/panel/font_group/bordernone.bmp";
spreadsheetApp_t.prototype.CHANGE_CASE_IMG="img/app/panel/font_group/changecase.bmp";
spreadsheetApp_t.prototype.CLEAR_FORMAT_IMG="img/app/system/icons/40x60/clear_formatting.png";
spreadsheetApp_t.prototype.SYMBOL_IMG="img/app/panel/font_group/text_letter_omega.png";
spreadsheetApp_t.prototype.DEFAULT_HIGHLIGHT_COLOUR="rgb( 255, 0, 0 )";
spreadsheetApp_t.prototype.DEFAULT_FILL_COLOUR="rgb( 255, 255, 0 )";
spreadsheetApp_t.prototype.DEFAULT_BORDER_COLOUR="rgb( 0, 0, 0 )";
spreadsheetApp_t.prototype.CASE_SENTENCE=1;
spreadsheetApp_t.prototype.CASE_LOWER=2;
spreadsheetApp_t.prototype.CASE_UPPER=3;
spreadsheetApp_t.prototype.CASE_CAPITAL=4;
spreadsheetApp_t.prototype.BOLD_STATE=1;
spreadsheetApp_t.prototype.ITALICS_STATE=2;
spreadsheetApp_t.prototype.UNDERLINE_STATE=3;
spreadsheetApp_t.prototype.STRIKETHROUGH_STATE=4;
spreadsheetApp_t.prototype.FILL_COLOUR_STATE=7;
spreadsheetApp_t.prototype.HIGHLIGHT_COLOUR_STATE=8;
spreadsheetApp_t.prototype.FONT_FACE_STATE=9;
spreadsheetApp_t.prototype.FONT_SIZE_STATE=10;
spreadsheetApp_t.prototype.MORE_HIGHLIGHT_COLOUR=1;
spreadsheetApp_t.prototype.MORE_FILL_COLOUR=2;
spreadsheetApp_t.prototype.MORE_BORDER_COLOUR=3;
spreadsheetApp_t.prototype.DEFAULT_TEXT_COLOUR="rgb(0, 0, 0)";
spreadsheetApp_t.prototype.DEFAULT_BG_COLOUR="rgb(255, 255, 255)";
spreadsheetApp_t.prototype.ALIGNMENT_TG_WIDTH=80;
spreadsheetApp_t.prototype.ALIGN_LEFT_IMG="img/app/system/icons/24x24/leftalign.png";
spreadsheetApp_t.prototype.ALIGN_CENTRE_IMG="img/app/system/icons/24x24/centrealign.png";
spreadsheetApp_t.prototype.ALIGN_RIGHT_IMG="img/app/system/icons/24x24/rightalign.png";
spreadsheetApp_t.prototype.JUSTIFY_IMG="img/app/system/icons/24x24/justify.png";
spreadsheetApp_t.prototype.NUM_FORMAT_TG_WIDTH=88;
spreadsheetApp_t.prototype.CURRENCY_IMG="img/app/system/icons/24x24/formatting_currency.png";
spreadsheetApp_t.prototype.PERCENT_IMG="img/app/system/icons/24x24/formatting_percentage.png";
spreadsheetApp_t.prototype.COMMA_IMG="img/app/system/icons/24x24/comma_seperator.png";
spreadsheetApp_t.prototype.INC_DECIMAL_IMG="img/app/system/icons/24x24/increase_decimal_places.png";
spreadsheetApp_t.prototype.DEC_DECIMAL_IMG="img/app/system/icons/24x24/decrease_decimal_places.png";
spreadsheetApp_t.prototype.FORMAT_TG_WIDTH=304;
spreadsheetApp_t.prototype.ACC_FORMAT_1=1;
spreadsheetApp_t.prototype.ACC_FORMAT_2=2;
spreadsheetApp_t.prototype.ACC_FORMAT_3=3;
spreadsheetApp_t.prototype.ACC_FORMAT_4=4;
spreadsheetApp_t.prototype.ACC_FORMAT_MORE=-1;
spreadsheetApp_t.prototype.DATE_FORMAT_1=1;
spreadsheetApp_t.prototype.DATE_FORMAT_2=2;
spreadsheetApp_t.prototype.DATE_FORMAT_3=3;
spreadsheetApp_t.prototype.DATE_FORMAT_4=4;
spreadsheetApp_t.prototype.DATE_FORMAT_5=5;
spreadsheetApp_t.prototype.DATE_FORMAT_6=6;
spreadsheetApp_t.prototype.DATE_FORMAT_7=7;
spreadsheetApp_t.prototype.DATE_FORMAT_8=8;
spreadsheetApp_t.prototype.DATE_FORMAT_9=9;
spreadsheetApp_t.prototype.DATE_FORMAT_10=10;
spreadsheetApp_t.prototype.DATE_FORMAT_MORE=-2;
spreadsheetApp_t.prototype.TIME_FORMAT_1=1;
spreadsheetApp_t.prototype.TIME_FORMAT_2=2;
spreadsheetApp_t.prototype.TIME_FORMAT_3=3;
spreadsheetApp_t.prototype.TIME_FORMAT_4=4;
spreadsheetApp_t.prototype.TIME_FORMAT_MORE=-3;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_1=1;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_2=2;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_3=3;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_4=4;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_5=5;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_6=6;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_7=7;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_8=8;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_9=9;
spreadsheetApp_t.prototype.CURRENCY_FORMAT_MORE=-4;
spreadsheetApp_t.prototype.NUMBER_FORMAT_1=1;
spreadsheetApp_t.prototype.NUMBER_FORMAT_2=2;
spreadsheetApp_t.prototype.NUMBER_FORMAT_3=3;
spreadsheetApp_t.prototype.NUMBER_FORMAT_4=4;
spreadsheetApp_t.prototype.NUMBER_FORMAT_MORE=-5;
spreadsheetApp_t.prototype.PERCENT_FORMAT_1=1;
spreadsheetApp_t.prototype.PERCENT_FORMAT_2=2;
spreadsheetApp_t.prototype.PERCENT_FORMAT_MORE=-6;
spreadsheetApp_t.prototype.GENERAL_IMG="img/app/system/icons/40x60/formatting_normal.png";
spreadsheetApp_t.prototype.CURRENCY_LARGE_IMG="img/app/system/icons/40x40/format_currancy.png";
spreadsheetApp_t.prototype.ACCOUNTING_IMG="img/app/system/icons/40x40/format_accounting.png";
spreadsheetApp_t.prototype.NUMBER_IMG="img/app/system/icons/40x40/format_number.png";
spreadsheetApp_t.prototype.DATE_IMG="img/app/system/icons/40x40/format_date.png";
spreadsheetApp_t.prototype.PERCENTAGE_IMG="img/app/system/icons/40x40/format_percentage.png";
spreadsheetApp_t.prototype.TIME_IMG="img/app/system/icons/40x40/format_time.png";
spreadsheetApp_t.prototype.INSERT_TG_WIDTH=92;
spreadsheetApp_t.prototype.INSERT_ROWS_COLUMNS_IMG="img/app/system/icons/40x60/row.png";
spreadsheetApp_t.prototype.INSERT_ROWS=1;
spreadsheetApp_t.prototype.INSERT_COLUMNS=2;
spreadsheetApp_t.prototype.DELETE_ROWS=3;
spreadsheetApp_t.prototype.DELETE_COLUMNS=4;
spreadsheetApp_t.prototype.INFO_TG_WIDTH=200;
spreadsheetApp_t.prototype.CELL_TEXT_WIDTH=75;
spreadsheetApp_t.prototype.FUNC_WIZARD_IMAGE="img/app/system/icons/40x60/function_wizard.png";
spreadsheetApp_t.prototype.FUNC_AUTO_IMAGE="img/app/system/icons/40x60/function_autosum.png";
spreadsheetApp_t.prototype.FUNC_FINANCIAL_IMAGE="img/app/system/icons/40x60/financial_formula.png";
spreadsheetApp_t.prototype.FUNC_LOGICAL_IMAGE="img/app/system/icons/40x60/function_logic.png";
spreadsheetApp_t.prototype.FUNC_TEXT_IMAGE="img/app/system/icons/40x60/function_text.png";
spreadsheetApp_t.prototype.FUNC_DATE_IMAGE="img/app/system/icons/40x60/function_datetime.png";
spreadsheetApp_t.prototype.FUNC_LOOKUP_IMAGE="img/app/system/icons/40x60/function_lookup.png";
spreadsheetApp_t.prototype.FUNC_MATH_IMAGE="img/app/system/icons/40x60/function_math_trig.png";
spreadsheetApp_t.prototype.FUNC_INFO_IMAGE="img/app/system/icons/40x60/function_information.png";
spreadsheetApp_t.prototype.FUNC_NUMBER_THEORY_IMAGE="img/app/system/icons/40x60/function_number_theory.png";
spreadsheetApp_t.prototype.FUNC_RANDOM_IMAGE="img/app/system/icons/40x60/function_random.png";
spreadsheetApp_t.prototype.FUNC_STATISTICS_IMAGE="img/app/system/icons/40x60/function_stats.png";
spreadsheetApp_t.prototype.FUNC_LOCATION_IMAGE="img/app/system/icons/40x60/function_location.png";
spreadsheetApp_t.prototype.AUTO_SUM_INDEX=1;
spreadsheetApp_t.prototype.FINANCIAL_INDEX=2;
spreadsheetApp_t.prototype.LOGICAL_INDEX=3;
spreadsheetApp_t.prototype.TEXT_INDEX=4;
spreadsheetApp_t.prototype.DATE_TIME_INDEX=5;
spreadsheetApp_t.prototype.LOOKUP_INDEX=6;
spreadsheetApp_t.prototype.MATH_INDEX=7;
spreadsheetApp_t.prototype.INFORMATION_INDEX=8;
spreadsheetApp_t.prototype.NUMBER_THEORY_INDEX=9;
spreadsheetApp_t.prototype.RANDOM_NUMBERS_INDEX=10;
spreadsheetApp_t.prototype.STATISTICS_INDEX=11;
spreadsheetApp_t.prototype.FUNCTION_WIZARD_ITEM_VALUE=-1;
spreadsheetApp_t.prototype.DOLLAR="$";
spreadsheetApp_t.prototype.EURO=SYSTEM.Symbol.Euro;
spreadsheetApp_t.prototype.POUND=SYSTEM.Symbol.Pound;
spreadsheetApp_t.prototype.YEN=SYSTEM.Symbol.Yen;
spreadsheetApp_t.prototype.YUAN_RENMINBI=SYSTEM.Symbol.YuanRenminbi;
spreadsheetApp_t.prototype.TEMPLATES_TG_WIDTH=230;
spreadsheetApp_t.prototype.TEMPLATE_LBL_WIDTH=spreadsheetApp_t.prototype.TEMPLATES_TG_WIDTH-8;
spreadsheetApp_t.prototype.TEMPLATE_LBL_HEIGHT=40;
spreadsheetApp_t.prototype.TEMPLATE_SELECT_WIDTH=spreadsheetApp_t.prototype.TEMPLATES_TG_WIDTH-38;
spreadsheetApp_t.prototype.PASTE_LEFT=4;
spreadsheetApp_t.prototype.PASTE_TOP=5;
spreadsheetApp_t.prototype.COPY_LEFT=48;
spreadsheetApp_t.prototype.COPY_TOP=9;
spreadsheetApp_t.prototype.CUT_LEFT=48;
spreadsheetApp_t.prototype.CUT_TOP=37;
spreadsheetApp_t.prototype.FONT_FACE_LEFT=5;
spreadsheetApp_t.prototype.FONT_FACE_TOP=9;
spreadsheetApp_t.prototype.FONT_SIZE_LEFT=166;
spreadsheetApp_t.prototype.FONT_SIZE_TOP=9;
spreadsheetApp_t.prototype.BOLD_LEFT=5;
spreadsheetApp_t.prototype.BOLD_TOP=37;
spreadsheetApp_t.prototype.ITALICS_LEFT=33;
spreadsheetApp_t.prototype.ITALICS_TOP=37;
spreadsheetApp_t.prototype.UNDERLINE_LEFT=61;
spreadsheetApp_t.prototype.UNDERLINE_TOP=37;
spreadsheetApp_t.prototype.STRIKETHROUGH_LEFT=89;
spreadsheetApp_t.prototype.STRIKETHROUGH_TOP=37;
spreadsheetApp_t.prototype.FILL_COLOUR_BTN_LEFT=141;
spreadsheetApp_t.prototype.FILL_COLOUR_BTN_TOP=37;
spreadsheetApp_t.prototype.FILL_COLOUR_LEFT=166;
spreadsheetApp_t.prototype.FILL_COLOUR_TOP=37;
spreadsheetApp_t.prototype.HIGHLIGHT_COLOUR_BTN_LEFT=182;
spreadsheetApp_t.prototype.HIGHLIGHT_COLOUR_BTN_TOP=37;
spreadsheetApp_t.prototype.HIGHLIGHT_COLOUR_LEFT=207;
spreadsheetApp_t.prototype.HIGHLIGHT_COLOUR_TOP=37;
spreadsheetApp_t.prototype.CLEAR_FORMAT_LEFT=223;
spreadsheetApp_t.prototype.CLEAR_FORMAT_TOP=5;
spreadsheetApp_t.prototype.ALIGN_LEFT_TOP=9;
spreadsheetApp_t.prototype.JUSTIFY_LEFT=4;
spreadsheetApp_t.prototype.JUSTIFY_TOP=37;
spreadsheetApp_t.prototype.VALIGN_TOP_LEFT=0;
spreadsheetApp_t.prototype.VALIGN_TOP_TOP=25;
spreadsheetApp_t.prototype.VALIGN_MIDDLE_LEFT=25;
spreadsheetApp_t.prototype.VALIGN_MIDDLE_TOP=25;
spreadsheetApp_t.prototype.VALIGN_BOTTOM_LEFT=50;
spreadsheetApp_t.prototype.VALIGN_BOTTOM_TOP=25;
spreadsheetApp_t.prototype.CURRENCY_LEFT=4;
spreadsheetApp_t.prototype.CURRENCY_TOP=9;
spreadsheetApp_t.prototype.PERCENT_LEFT=32;
spreadsheetApp_t.prototype.PERCENT_TOP=9;
spreadsheetApp_t.prototype.COMMA_LEFT=60;
spreadsheetApp_t.prototype.COMMA_TOP=9;
spreadsheetApp_t.prototype.INC_DECIMAL_LEFT=4;
spreadsheetApp_t.prototype.INC_DECIMAL_TOP=37;
spreadsheetApp_t.prototype.DEC_DECIMAL_LEFT=32;
spreadsheetApp_t.prototype.DEC_DECIMAL_TOP=37;
spreadsheetApp_t.prototype.INSERT_SYMBOL_LEFT=4;
spreadsheetApp_t.prototype.INSERT_SYMBOL_TOP=5;
spreadsheetApp_t.prototype.INSERT_ROW_COLUMN_LEFT=48;
spreadsheetApp_t.prototype.INSERT_ROW_COLUMN_TOP=5;
spreadsheetApp_t.prototype.SELECTION_LBL_LEFT=4;
spreadsheetApp_t.prototype.SELECTION_LBL_TOP=5;
spreadsheetApp_t.prototype.SELECTION_TEXT_LEFT=43;
spreadsheetApp_t.prototype.SELECTION_TEXT_TOP=4;
spreadsheetApp_t.prototype.FORMULA_TEXT_LEFT=4;
spreadsheetApp_t.prototype.FORMULA_TEXT_TOP=32;
spreadsheetApp_t.prototype.TEMPLATE_LBL_LEFT=4;
spreadsheetApp_t.prototype.TEMPLATE_LBL_TOP=4;
spreadsheetApp_t.prototype.TEMPLATE_SELECT_LEFT=4;
spreadsheetApp_t.prototype.TEMPLATE_SELECT_TOP=40;
}
catch(ex){
jsExDebug("spreadsheetApp_t.prototype",ex);
}
function spreadsheetApp_t(_1){
try{
this.spreadSheetApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.createPanel();
this.formulaWizardFrameOpen=false;
this.cellFormattingFrameOpen=false;
this.file=null;
this.exportFrame=null;
var _2=new SYSTEM.Frame.Window("spreadWindow","WebSheet",this,null,null,null,null,SYSTEM.Frame.CLOSE_BTN|SYSTEM.Frame.MAXIMISE_BTN|SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_2.allowResize();
this.collaborationIcon=new this.SYSTEM.Widget.CollaborationIcon("collaborationIcon");
_2.addCustomControl(this.collaborationIcon);
this.collaboration.setCollaborationIcon(this.collaborationIcon);
var _3=_1[0];
var _4=_1[1];
var _5=_1[2];
var _6=new spreadsheet_t();
this.spreadsheetWidth=_2.getInternalWidth()-this.SPREADSHEET_DIM_OFFSET;
this.spreadsheetHeight=_2.getInternalHeight()-this.SPREADSHEET_DIM_OFFSET;
var _7=new this.SYSTEM.Widget.Spreadsheet("spread",_3,this.spreadsheetWidth,this.spreadsheetHeight,_2);
_7.notifySelectionChange(new this.SYSTEM.Delegate(this,this.selectionChangeCallback));
_7.notifyDirtyStatusChange(new this.SYSTEM.Delegate(this,this.dirtyStatusChangeCallback));
_7.notifySelectionRangeExpand(new this.SYSTEM.Delegate(this,this.selectionRangeExpandCallback));
_7.loadDataModule(_6);
_2.addWidget(_7,_2.leftEdgeWidth,_2.topEdgeHeight);
_2.show();
this.spreadWindow=_2;
this.spreadsheetData=_6;
this.spreadsheet=_7;
this.saveDataDelegate=new this.SYSTEM.Delegate(this.spreadsheet,this.spreadsheet.getSaveData);
this.getTokenDelegate=new this.SYSTEM.Delegate(this.collaboration,this.collaboration.updateTokenOwner);
this.isDirtyDelegate=new this.SYSTEM.Delegate(this,this.isDirty);
if(_3){
this.initialLoadFileId=_3;
if(_5&&!this.SYSTEM.Filesystem.getFileFromFileId(_3)){
this.isFilePublic=true;
}
this.load(this.initialLoadFileId);
}else{
if(_4){
this.loadTemplate(_4);
}else{
this.initialLoadFileId=null;
this.spreadsheet.addBlankFirstSheet();
this.SYSTEM.Tooltip.hideLoading();
}
}
if(!this.SYSTEM.Formula.listFull){
this.SYSTEM.Formula.getAllFormulaNames(new this.SYSTEM.Delegate(this,this.getFormulaNamesCallback));
}else{
this.fillFormulaDropLists();
}
this.addBrowserIncompatibility("mozilla","If you are using Firefox and have Firebug enabled it may cause problems with the "+this.APP_NAME+".");
this.addBrowserIncompatibility("chrome","The "+this.APP_NAME+" is very limited in this type of browser, you may be unable to do much except type single characters in cells.");
this.addBrowserIncompatibility("safari","The "+this.APP_NAME+" is very limited in this type of browser, you may be unable to do much except type single characters in cells.");
}
catch(ex){
jsExDebug("spreadsheetApp_t",ex);
}
}
function spreadsheetApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.formulaWizardFrameOpen=null;
me.cellFormattingFrameOpen=null;
me.lastBgColour=null;
me.lastTextColour=null;
me.currentCategoryDiv=null;
me.currentCategory=null;
me.formulasLoaded=null;
me.spreadsheetData.cleanUp();
me.spreadsheetData=null;
me.spreadsheet=null;
me.spreadsheetWidth=null;
me.spreadsheetHeight=null;
me.saveDataDelegate.cleanUp();
me.saveDataDelegate=null;
me.getTokenDelegate.cleanUp();
me.getTokenDelegate=null;
me.isDirtyDelegate.cleanUp();
me.isDirtyDelegate=null;
if(me.file){
me.file.cleanUp();
me.file=null;
}
me.collaborationIcon=null;
me.formulaText=null;
me.saveBtn=null;
me.selectionLabel=null;
me.selectionText=null;
me.templateSelect=null;
if(me.formattingFrame){
if(me.generalDiv){
me.generalLabel.cleanUp();
me.generalLabel=null;
me.generalDiv=null;
}
if(me.numberDiv){
me.numberDecimalLabel.cleanUp();
me.numberDecimalSelect.cleanUp();
me.numberCommaCheckbox.cleanUp();
me.numberCommaLabel.cleanUp();
me.numberNegativeLabel.cleanUp();
me.numberNegativeSelect.cleanUp();
me.numberDecimalLabel=null;
me.numberDecimalSelect=null;
me.numberCommaCheckbox=null;
me.numberCommaLabel=null;
me.numberNegativeLabel=null;
me.numberNegativeSelect=null;
me.numberDiv=null;
}
if(me.currencyDiv){
me.currencyDecimalLabel.cleanUp();
me.currencyDecimalSelect.cleanUp();
me.currencySymbolLabel.cleanUp();
me.currencySymbolDropText.cleanUp();
me.currencyNegativeLabel.cleanUp();
me.currencyNegativeSelect.cleanUp();
me.currencyDecimalLabel=null;
me.currencyDecimalSelect=null;
me.currencySymbolLabel=null;
me.currencySymbolDropText=null;
me.currencyNegativeLabel=null;
me.currencyNegativeSelect=null;
me.currencyDiv=null;
}
if(me.accountingDiv){
me.accountingDecimalSelect.cleanUp();
me.accountingBracketCheckbox.cleanUp();
me.accountingBracketLabel.cleanUp();
me.accountingSymbolLabel.cleanUp();
me.accountingSymbolSelect.cleanUp();
me.accountingDecimalLabel.cleanUp();
me.accountingDecimalSelect=null;
me.accountingBracketCheckbox=null;
me.accountingBracketLabel=null;
me.accountingSymbolLabel=null;
me.accountingSymbolSelect=null;
me.accountingDecimalLabel=null;
me.accountingDiv=null;
}
if(me.dateDiv){
me.customDateText.cleanUp();
me.dateTypeSelect.cleanUp();
me.dateTypeLabel.cleanUp();
me.customDateLabel.cleanUp();
me.customDateText=null;
me.dateTypeSelect=null;
me.dateTypeLabel=null;
me.customDateLabel=null;
me.dateDiv=null;
}
if(me.timeDiv){
me.customTimeLabel.cleanUp();
me.timeTypeSelect.cleanUp();
me.timeTypeLabel.cleanUp();
me.customTimeText.cleanUp();
me.customTimeLabel=null;
me.timeTypeSelect=null;
me.timeTypeLabel=null;
me.customTimeText=null;
me.timeDiv=null;
}
if(me.percentageDiv){
me.percentageDecimalSelect.cleanUp();
me.percentageDecimalLabel.cleanUp();
me.percentageDecimalSelect=null;
me.percentageDecimalLabel=null;
me.percentageDiv=null;
}
me.formattingCategorySelect=null;
me.formattingDescriptionLabel=null;
me.formattingDescriptionDiv=null;
me.formattingSampleLabel=null;
me.formattingSampleDiv=null;
me.formattingApplyBtn=null;
}
if(me.formulaWizardFrame){
me.formulaCategoryList=null;
me.formulaNameList=null;
me.formulaInsertBtn=null;
me.formulaDescriptionTitle=null;
me.formulaDescriptionContent=null;
me.formulaSynopsisTitle=null;
me.formulaSynopsisContent=null;
me.formulaExampleTitle=null;
me.formulaExampleContent=null;
}
me.collaboration=null;
me.sharing=null;
me.sendToolgroup=null;
me.pasteBtn=null;
me.copyBtn=null;
me.cutBtn=null;
me.fontFaceSelect=null;
me.fontSizeSelect=null;
me.boldBtn=null;
me.italicsBtn=null;
me.underlineBtn=null;
me.strikethroughBtn=null;
me.clearFormatBtn=null;
me.fillColourChooser=null;
me.fillColourBtn=null;
me.fillColourDropList=null;
me.highlightColourChooser=null;
me.highlightColourBtn=null;
me.highlightColourDropList=null;
me.alignLeftBtn=null;
me.alignCentreBtn=null;
me.alignRightBtn=null;
me.vAlignTopBtn=null;
me.vAlignMiddleBtn=null;
me.vAlignBottomBtn=null;
me.percentStyleBtn=null;
me.commaStyleBtn=null;
me.incDecimalBtn=null;
me.decDecimalBtn=null;
me.currencyBtn=null;
me.generalFormatBtn=null;
me.numberFormatDropList=null;
me.currencyFormatDropList=null;
me.accountingFormatDropList=null;
me.dateFormatDropList=null;
me.timeFormatDropList=null;
me.percentageFormatDropList=null;
me.symbolDropList=null;
me.formulaWizardBtn=null;
me.autoSumDropList=null;
me.logicalDropList=null;
me.textDropList=null;
me.dateTimeDropList=null;
me.mathDropList=null;
me.informationDropList=null;
me.numberTheoryDropList=null;
me.randomDropList=null;
me.statisticsDropList=null;
me.locationDropList=null;
me.lookupDropList=null;
me.insertDropList=null;
me.initialLoadFileId=null;
me.isFilePublic=null;
me.formattingFrame=null;
me.formulaWizardFrame=null;
me.spreadWindow=null;
me.exportFrame=null;
me.SYSTEM.Tooltip.hideLoading();
me.application_cleanUp();
}
catch(ex){
jsExDebug("spreadsheetApp_cleanUp",ex);
}
}
var showBtns=false;
function spreadsheetApp_createPanel(){
try{
var _9=this.APPLICATION.Panel;
var _a=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE|button_t.prototype.HOVER_ON_IMAGE;
var _b=24;
var _c=new this.SYSTEM.Widget.ClassButton("save",2,_b,_b,null,this.SYSTEM.Icon.Small.SAVE_DISABLED,"Save",this.SAVE_OFF_TOOLTIP);
_9.addUtility(_c);
_9.addUtility(new this.SYSTEM.Widget.ClassButton("saveAs",2,_b,_b,null,this.SAVEAS_UTILITY,"Save As","Save the document as a new file."));
_9.addUtility(new this.SYSTEM.Widget.ClassButton("open",2,_b,_b,null,this.OPEN_UTILITY,"Open","Open a document.<br>(shortcut key: Ctrl-O)"));
_9.addUtility(new this.SYSTEM.Widget.ClassButton("print",2,_b,_b,null,this.PRINT_UTILITY,"Print the document."));
_9.addUtility(new this.SYSTEM.Widget.ClassButton("export",2,_b,_b,null,this.EXPORT_UTILITY,"Export","Download the document to your desktop.",null,130));
_9.addUtility(new this.SYSTEM.Widget.ClassButton("refreshBtn",2,_b,_b,null,this.REFRESH_UTILITY,"Re-calculate","Re-calculates the entire sheet."));
_9.addUtility(new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,_b,_b,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+"."));
this.saveBtn=_c;
var _d=new this.SYSTEM.Widget.ClassButton("pasteBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.PASTE_IMG,"Paste","Paste the content that has been copied.<br>(shortcut key: Ctrl-V)",null,120);
var _e=new this.SYSTEM.Widget.ClassButton("copyBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.COPY_IMG,"Copy","Copy the selected cell contents.<br>(shortcut key: Ctrl-C)",null,120);
var _f=new this.SYSTEM.Widget.ClassButton("cutBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.CUT_IMG,"Cut","Copy and remove the selected cell contents.<br>(shortcut key: Ctrl-X)",null,120);
var _10=new this.SYSTEM.Widget.FontFaceSelect("fontFaceSelect");
var _11=new this.SYSTEM.Widget.FontSizeSelect("fontSizeSelect");
var _12=new this.SYSTEM.Widget.ClassButton("boldBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.BOLD_IMG,"Bold","Makes text in the selected cells bold.<br>(shortcut key: Ctrl + B)",null,110);
var _13=new this.SYSTEM.Widget.ClassButton("italicsBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.ITALICS_IMG,"Italics","Makes text in the selected cells italicised.<br>(shortcut key: Ctrl + I)",null,110);
var _14=new this.SYSTEM.Widget.ClassButton("underlineBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.UNDERLINE_IMG,"Underline","Makes text in the selected cells underlined.<br>(shortcut key: Ctrl + U)",null,110);
var _15=new this.SYSTEM.Widget.ClassButton("strikethroughBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.STRIKETHROUGH_IMG,"Strikethrough","Gives the text in the selected content a strikethrough.");
var _16=new this.SYSTEM.Widget.ClassButton("clearFormatBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.CLEAR_FORMAT_IMG,"Clear formatting","Clears all formatting on the text in the selected content.");
var _17=new this.SYSTEM.Widget.ColourChooser("fillColourChooser",this.COLOUR_CHOOSER_CELLS_WIDE,this.COLOUR_CHOOSER_CELLS_HIGH,this.COLOUR_CHOOSER_WIDTH,this.COLOUR_CHOOSER_HEIGHT,1);
_17.setSelectedColour(this.DEFAULT_FILL_COLOUR);
this.lastBgColour=this.DEFAULT_FILL_COLOUR;
var _18=new this.SYSTEM.Widget.ClassButton("fillColourBtn",classButton_t.prototype.TYPE_PANEL_BUTTON_BG_COLOUR,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.FILL_COLOUR_IMG,"Background Colour","Changes the background colour of the selected cells.");
_18.setBackgroundColour(_17.selectedColour);
var _19=new this.SYSTEM.Widget.DropList("fillColourDropList",this.SMALL_BTN_SIDE/2,this.SMALL_BTN_SIDE,this.DROP_IMG);
_19.allowBorder("black");
_19.disallowSelectedHighlight();
_19.disallowItemBorder();
_19.addWidget(null,_17);
var _1a=new this.SYSTEM.Widget.ColourChooser("highlightColourChooser",this.COLOUR_CHOOSER_CELLS_WIDE,this.COLOUR_CHOOSER_CELLS_HIGH,this.COLOUR_CHOOSER_WIDTH,this.COLOUR_CHOOSER_HEIGHT,1);
_1a.setSelectedColour(this.DEFAULT_HIGHLIGHT_COLOUR);
this.lastTextColour=this.DEFAULT_HIGHLIGHT_COLOUR;
var _1b=new this.SYSTEM.Widget.ClassButton("highlightColourBtn",classButton_t.prototype.TYPE_PANEL_BUTTON_BG_COLOUR,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.HIGHLIGHT_COLOUR_IMG,"Text Colour","Changes the text colour of the selected cells.");
_1b.setBackgroundColour(_1a.selectedColour);
var _1c=new this.SYSTEM.Widget.DropList("highlightColourDropList",this.SMALL_BTN_SIDE/2,this.SMALL_BTN_SIDE,this.DROP_IMG);
_1c.allowBorder("black");
_1c.disallowSelectedHighlight();
_1c.disallowItemBorder();
_1c.addWidget(null,_1a);
this.fontFaceSelect=_10;
this.fontSizeSelect=_11;
this.boldBtn=_12;
this.italicsBtn=_13;
this.underlineBtn=_14;
this.strikethroughBtn=_15;
this.clearFormatBtn=_16;
this.fillColourChooser=_17;
this.fillColourBtn=_18;
this.fillColourDropList=_19;
this.highlightColourChooser=_1a;
this.highlightColourBtn=_1b;
this.highlightColourDropList=_1c;
var _1d=new this.SYSTEM.Widget.ClassButton("alignLeftBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.ALIGN_LEFT_IMG,"Align Left","Aligns the text in the selected cells to the left.");
var _1e=new this.SYSTEM.Widget.ClassButton("alignCentreBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.ALIGN_CENTRE_IMG,"Align Centre","Aligns the text in the selected cells to the centre.");
var _1f=new this.SYSTEM.Widget.ClassButton("alignRightBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.ALIGN_RIGHT_IMG,"Align Right","Aligns the text in the selected cells to the right.");
this.alignLeftBtn=_1d;
this.alignCentreBtn=_1e;
this.alignRightBtn=_1f;
var _20=new this.SYSTEM.Widget.ClassButton("percentStyleBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.PERCENT_IMG,"Percentage Format","Shows numbers as percentages.");
var _21=new this.SYSTEM.Widget.ClassButton("commaStyleBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.COMMA_IMG,"Comma separators","Numbers will show commas separating the thousands.");
var _22=new this.SYSTEM.Widget.ClassButton("incDecimalBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.INC_DECIMAL_IMG,"Increase decimal places","Increase the number of decimal places in a number by one.");
var _23=new this.SYSTEM.Widget.ClassButton("decDecimalBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.DEC_DECIMAL_IMG,"Decrease decimal places","Decrease the number of decimal places in a number by one.");
var _24=new this.SYSTEM.Widget.ClassButton("currencyBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BTN_SIDE,this.SMALL_BTN_SIDE,null,this.CURRENCY_IMG,"Currency Format","Shows numbers as currencies.");
this.percentStyleBtn=_20;
this.commaStyleBtn=_21;
this.incDecimalBtn=_22;
this.decDecimalBtn=_23;
this.currencyBtn=_24;
var _25=new this.SYSTEM.Widget.ClassButton("generalFormatBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.GENERAL_IMG,"Standard format","Removes formatting from the selected cells");
var _26=new this.SYSTEM.Widget.DropList("numberFormatDropList",this.LARGE_BUTTON_WIDTH,this.DEFAULT_BUTTON_HEIGHT,this.NUMBER_IMG,this.DROP_BUTTON_HEIGHT);
_26.alignLeft();
_26.allowBorder("black");
_26.disallowSelectedHighlight();
_26.setButtonTooltip("Number Format","Formats the selected cells as numbers.");
_26.addItem(this.NUMBER_FORMAT_1,"-1234.10");
_26.addItem(this.NUMBER_FORMAT_2,"-1,234.10");
_26.addItem(this.NUMBER_FORMAT_3,"<font color='red'>&nbsp;1,234.10</font>");
_26.addItem(this.NUMBER_FORMAT_4,"<font color='red'>-1,234.10</font>");
_26.addItem(this.NUMBER_FORMAT_MORE,"More...");
var _27=new this.SYSTEM.Widget.DropList("currencyFormatDropList",this.LARGE_BUTTON_WIDTH,this.DEFAULT_BUTTON_HEIGHT,this.CURRENCY_LARGE_IMG,this.DROP_BUTTON_HEIGHT);
_27.alignLeft();
_27.allowBorder("black");
_27.disallowSelectedHighlight();
_27.setButtonTooltip("Currency Format","Formats the selected cells as currencies.");
_27.addItem(this.CURRENCY_FORMAT_1,"-"+this.DOLLAR+"&nbsp;1234.10");
_27.addItem(this.CURRENCY_FORMAT_2,"<font color='red'>&nbsp;"+this.DOLLAR+"&nbsp;1234.10</font>");
_27.addItem(this.CURRENCY_FORMAT_3,"<font color='red'>-"+this.DOLLAR+"&nbsp;1234.10</font>");
_27.addSeparator();
_27.addItem(this.CURRENCY_FORMAT_4,"-"+this.EURO+"&nbsp;1234.10");
_27.addItem(this.CURRENCY_FORMAT_5,"<font color='red'>&nbsp;"+this.EURO+"&nbsp;1234.10</font>");
_27.addItem(this.CURRENCY_FORMAT_6,"<font color='red'>-"+this.EURO+"&nbsp;1234.10</font>");
_27.addSeparator();
_27.addItem(this.CURRENCY_FORMAT_7,"-"+this.POUND+"&nbsp;1234.10");
_27.addItem(this.CURRENCY_FORMAT_8,"<font color='red'>&nbsp"+this.POUND+"&nbsp;1234.10</font>");
_27.addItem(this.CURRENCY_FORMAT_9,"<font color='red'>-"+this.POUND+"&nbsp;1234.10</font>");
_27.addItem(this.CURRENCY_FORMAT_MORE,"More...");
var _28=new this.SYSTEM.Widget.DropList("accountingFormatDropList",this.LARGE_BUTTON_WIDTH,this.DEFAULT_BUTTON_HEIGHT,this.ACCOUNTING_IMG,this.DROP_BUTTON_HEIGHT);
_28.alignLeft();
_28.allowBorder("black");
_28.disallowSelectedHighlight();
_28.setButtonTooltip("Accounting Format","Applies accounting format to the selected cells.");
_28.addItem(this.ACC_FORMAT_1,this.DOLLAR+"&nbsp;&nbsp;&nbsp;&nbsp;-1,000.00");
_28.addItem(this.ACC_FORMAT_2,this.DOLLAR+"&nbsp;&nbsp;&nbsp;&nbsp;(1,000.00)");
_28.addItem(this.ACC_FORMAT_3,this.DOLLAR+"&nbsp;&nbsp;&nbsp;&nbsp;-1,000");
_28.addItem(this.ACC_FORMAT_4,this.DOLLAR+"&nbsp;&nbsp;&nbsp;&nbsp;(1,000)");
_28.addItem(this.ACC_FORMAT_MORE,"More...");
var _29=new this.SYSTEM.Widget.DropList("dateFormatDropList",this.LARGE_BUTTON_WIDTH,this.DEFAULT_BUTTON_HEIGHT,this.DATE_IMG,this.DROP_BUTTON_HEIGHT);
_29.alignLeft();
_29.allowBorder("black");
_29.disallowSelectedHighlight();
_29.setButtonTooltip("Date Format","Formats the selected cells as dates.");
_29.addItem(this.DATE_FORMAT_1,"2/19");
_29.addItem(this.DATE_FORMAT_2,"02/19/06");
_29.addItem(this.DATE_FORMAT_4,"*19-Feb-06");
_29.addItem(this.DATE_FORMAT_9,"*2006-02-19");
_29.addItem(this.DATE_FORMAT_10,"*Sunday, 19 February 2006");
_29.addItem(this.DATE_FORMAT_MORE,"More...");
var _2a=new this.SYSTEM.Widget.DropList("timeFormatDropList",this.LARGE_BUTTON_WIDTH,this.DEFAULT_BUTTON_HEIGHT,this.TIME_IMG,this.DROP_BUTTON_HEIGHT);
_2a.alignLeft();
_2a.allowBorder("black");
_2a.disallowSelectedHighlight();
_2a.setButtonTooltip("Time Format","Formats the selected cells as times.");
_2a.addItem(this.TIME_FORMAT_1,"1:30 PM");
_2a.addItem(this.TIME_FORMAT_2,"13:30");
_2a.addItem(this.TIME_FORMAT_3,"02/19/06 1:30 PM");
_2a.addItem(this.TIME_FORMAT_4,"02/19/06 13:30");
_2a.addItem(this.TIME_FORMAT_MORE,"More...");
var _2b=new this.SYSTEM.Widget.DropList("percentageFormatDropList",this.LARGE_BUTTON_WIDTH,this.DEFAULT_BUTTON_HEIGHT,this.PERCENTAGE_IMG,this.DROP_BUTTON_HEIGHT);
_2b.alignLeft();
_2b.allowBorder("black");
_2b.disallowSelectedHighlight();
_2b.setButtonTooltip("Percentage Format","Formats the selected cells as percentages.");
_2b.addItem(this.PERCENT_FORMAT_1,"100%");
_2b.addItem(this.PERCENT_FORMAT_2,"100.00%");
_2b.addItem(this.PERCENT_FORMAT_MORE,"More...");
this.generalFormatBtn=_25;
this.numberFormatDropList=_26;
this.currencyFormatDropList=_27;
this.accountingFormatDropList=_28;
this.dateFormatDropList=_29;
this.timeFormatDropList=_2a;
this.percentageFormatDropList=_2b;
var _2c=new this.SYSTEM.Widget.SymbolDropList("symbolDropList");
_2c.setButtonTooltip("Insert a symbol","Inserts a symbol into the selected cell.");
var _2d=new this.SYSTEM.Widget.DropList("insertDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.INSERT_ROWS_COLUMNS_IMG);
_2d.alignLeft();
_2d.allowBorder("black");
_2d.disallowSelectedHighlight();
_2d.setButtonTooltip("Insert rows/columns","Insert/delete rows or columns into the spreadsheet");
_2d.addItem(this.INSERT_ROWS,"Insert row(s)");
_2d.addItem(this.INSERT_COLUMNS,"Insert columns(s)");
this.symbolDropList=_2c;
this.insertDropList=_2d;
var _2e=new this.SYSTEM.Widget.Label("selectionLabel");
_2e.setText("Cell =");
var _2f=new this.SYSTEM.Widget.Text("selectionText");
_2f.setWidth(this.CELL_TEXT_WIDTH);
_2f.styleAlign(_2f.ALIGN_CENTRE);
_2f.allowReadOnly();
var _30=new this.SYSTEM.Widget.Text("formulaText");
_30.setWidth(180);
_30.allowReadOnly();
this.selectionLabel=_2e;
this.selectionText=_2f;
this.formulaText=_30;
var _31=new this.SYSTEM.Widget.ClassButton("formulaWizardBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.FUNC_WIZARD_IMAGE,"Formula list window","Launch the formula list window.");
var _32=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_AUTO_IMAGE);
_32.allowBorder("black");
_32.disallowPadding();
_32.disallowSelectedHighlight();
_32.alignLeft();
_32.setButtonTooltip("Auto sum formulas","Insert a formula into the selected cell.");
_32.dropBtn.defaultBtn.stateOnImage=_32.dropBtn.defaultBtn.stateOffImage;
var _33=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_LOGICAL_IMAGE);
_33.allowBorder("black");
_33.disallowPadding();
_33.disallowSelectedHighlight();
_33.alignLeft();
_33.setButtonTooltip("Logical Formulas","Insert a formula into the selected cell.");
_33.dropBtn.defaultBtn.stateOnImage=_33.dropBtn.defaultBtn.stateOffImage;
_33.setValue(this.SYSTEM.Formula.CATEGORY_LOGICAL_STRING);
var _34=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_TEXT_IMAGE);
_34.allowBorder("black");
_34.disallowPadding();
_34.disallowSelectedHighlight();
_34.alignLeft();
_34.setButtonTooltip("Text Formulas","Insert a formula into the selected cell.");
_34.dropBtn.defaultBtn.stateOnImage=_34.dropBtn.defaultBtn.stateOffImage;
_34.setValue(this.SYSTEM.Formula.CATEGORY_TEXT_STRING);
var _35=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_DATE_IMAGE);
_35.allowBorder("black");
_35.disallowPadding();
_35.disallowSelectedHighlight();
_35.alignLeft();
_35.setButtonTooltip("Date & Time Formulas","Insert a formula into the selected cell.");
_35.dropBtn.defaultBtn.stateOnImage=_35.dropBtn.defaultBtn.stateOffImage;
_35.setValue(this.SYSTEM.Formula.CATEGORY_DATETIME_STRING);
var _36=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_LOOKUP_IMAGE);
_36.allowBorder("black");
_36.disallowPadding();
_36.disallowSelectedHighlight();
_36.alignLeft();
_36.setButtonTooltip("Lookup Formulas","Insert a formula into the selected cell.");
_36.dropBtn.defaultBtn.stateOnImage=_36.dropBtn.defaultBtn.stateOffImage;
_36.setValue(this.SYSTEM.Formula.CATEGORY_LOOKUP_STRING);
var _37=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_MATH_IMAGE);
_37.allowBorder("black");
_37.disallowPadding();
_37.disallowSelectedHighlight();
_37.alignLeft();
_37.setButtonTooltip("Math Formulas","Insert a formula into the selected cell.");
_37.dropBtn.defaultBtn.stateOnImage=_37.dropBtn.defaultBtn.stateOffImage;
_37.setValue(this.SYSTEM.Formula.CATEGORY_MATH_STRING);
var _38=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_INFO_IMAGE);
_38.allowBorder("black");
_38.disallowPadding();
_38.disallowSelectedHighlight();
_38.alignLeft();
_38.setButtonTooltip("Information Formulas","Insert a formula into the selected cell.",null,150);
_38.dropBtn.defaultBtn.stateOnImage=_38.dropBtn.defaultBtn.stateOffImage;
_38.setValue(this.SYSTEM.Formula.CATEGORY_INFORMATION_STRING);
var _39=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_NUMBER_THEORY_IMAGE);
_39.allowBorder("black");
_39.disallowPadding();
_39.disallowSelectedHighlight();
_39.alignLeft();
_39.setButtonTooltip("Number Theory Formulas","Insert a formula into the selected cell.",null,150);
_39.dropBtn.defaultBtn.stateOnImage=_39.dropBtn.defaultBtn.stateOffImage;
_39.setValue(this.SYSTEM.Formula.CATEGORY_NUMBER_THEORY_STRING);
var _3a=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_RANDOM_IMAGE);
_3a.allowBorder("black");
_3a.disallowPadding();
_3a.disallowSelectedHighlight();
_3a.alignLeft();
_3a.setButtonTooltip("Random Number Formulas","Insert a formula into the selected cell.",null,150);
_3a.dropBtn.defaultBtn.stateOnImage=_3a.dropBtn.defaultBtn.stateOffImage;
_3a.setValue(this.SYSTEM.Formula.CATEGORY_RANDOM_STRING);
var _3b=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_STATISTICS_IMAGE);
_3b.allowBorder("black");
_3b.disallowPadding();
_3b.disallowSelectedHighlight();
_3b.alignLeft();
_3b.setButtonTooltip("Statistics Formulas","Insert a formula into the selected cell.");
_3b.dropBtn.defaultBtn.stateOnImage=_3b.dropBtn.defaultBtn.stateOffImage;
_3b.setValue(this.SYSTEM.Formula.CATEGORY_STATISTICS_STRING);
var _3c=new this.SYSTEM.Widget.DropList("formulaDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.FUNC_LOCATION_IMAGE);
_3c.allowBorder("black");
_3c.disallowPadding();
_3c.disallowSelectedHighlight();
_3c.alignLeft();
_3c.setButtonTooltip("Location Formulas","Insert a formula into the selected cell.");
_3c.dropBtn.defaultBtn.stateOnImage=_3c.dropBtn.defaultBtn.stateOffImage;
_3c.setValue(this.SYSTEM.Formula.CATEGORY_LOCATION_STRING);
this.formulaWizardBtn=_31;
this.autoSumDropList=_32;
this.logicalDropList=_33;
this.textDropList=_34;
this.dateTimeDropList=_35;
this.lookupDropList=_36;
this.mathDropList=_37;
this.informationDropList=_38;
this.numberTheoryDropList=_39;
this.randomDropList=_3a;
this.statisticsDropList=_3b;
this.locationDropList=_3c;
var _3d=new this.SYSTEM.Widget.Label("templateLabel");
_3d.setText("Select the name of the WebSheet template you wish to load.");
_3d.setDimensions(this.TEMPLATE_LBL_WIDTH,this.TEMPLATE_LBL_HEIGHT);
var _3e=new this.SYSTEM.Widget.DropText("templateSelect",this.TEMPLATE_SELECT_WIDTH,22,130);
for(var _3f in SPREADSHEET_TEMPLATES){
_3e.addItem(_3f,SPREADSHEET_TEMPLATES[_3f],SPREADSHEET_TEMPLATES[_3f]);
}
this.templateSelect=_3e;
_9.addTab("Formatting");
_9.addTab("Cells");
_9.addTab("Formulas");
_9.addTab("Sharing");
_9.addTab("Templates");
_9.addToolgroup("Clipboard",this.CLIPBOARD_TG_WIDTH,"Formatting");
_9.addToolgroup("Font",this.FONT_TG_WIDTH,"Formatting");
_9.addToolgroup("Alignment",this.ALIGNMENT_TG_WIDTH,"Formatting");
_9.addToolgroup("Number",this.NUM_FORMAT_TG_WIDTH,"Formatting");
_9.addToolgroup("Cell format",(7*this.LARGE_BUTTON_WIDTH)+(8*this.pad),"Cells");
_9.addToolgroup("Insert",this.INSERT_TG_WIDTH,"Cells");
_9.addToolgroup("Cell Info",this.INFO_TG_WIDTH,"Cells");
_9.addToolgroup("Formulas",(12*this.LARGE_BUTTON_WIDTH)+(13*this.pad),"Formulas");
_9.addToolgroup("Templates",this.TEMPLATES_TG_WIDTH,"Templates");
this.collaboration=new collaborationToolgroup_t("collaboration",this);
this.sharing=new sharingToolgroup_t("sharing",this);
this.sendToolgroup=new sendToolgroup_t("sendToolgroup",this);
_9.insertToolgroup("Sharing",this.collaboration);
_9.insertToolgroup("Sharing",this.sharing);
_9.insertToolgroup("Sharing",this.sendToolgroup);
_9.addWidget(_d,this.PASTE_LEFT,this.PASTE_TOP,"Clipboard");
_9.addWidget(_e,this.COPY_LEFT,this.COPY_TOP,"Clipboard");
_9.addWidget(_f,this.CUT_LEFT,this.CUT_TOP,"Clipboard");
_9.addWidget(_12,this.BOLD_LEFT,this.BOLD_TOP,"Font");
_9.addWidget(_13,this.ITALICS_LEFT,this.ITALICS_TOP,"Font");
_9.addWidget(_14,this.UNDERLINE_LEFT,this.UNDERLINE_TOP,"Font");
_9.addWidget(_15,this.STRIKETHROUGH_LEFT,this.STRIKETHROUGH_TOP,"Font");
_9.addWidget(_16,this.CLEAR_FORMAT_LEFT,this.CLEAR_FORMAT_TOP,"Font");
_9.addWidget(_18,this.FILL_COLOUR_BTN_LEFT,this.FILL_COLOUR_BTN_TOP,"Font");
_9.addWidget(_19,this.FILL_COLOUR_LEFT,this.FILL_COLOUR_TOP,"Font");
_9.addWidget(_1b,this.HIGHLIGHT_COLOUR_BTN_LEFT,this.HIGHLIGHT_COLOUR_BTN_TOP,"Font");
_9.addWidget(_1c,this.HIGHLIGHT_COLOUR_LEFT,this.HIGHLIGHT_COLOUR_TOP,"Font");
_9.addWidget(_10,this.FONT_FACE_LEFT,this.FONT_FACE_TOP,"Font");
_9.addWidget(_11,this.FONT_SIZE_LEFT,this.FONT_SIZE_TOP,"Font");
_9.addWidget(_1d,(this.ALIGNMENT_TG_WIDTH-((2*_1d.width)+this.pad))/2,this.ALIGN_LEFT_TOP,"Alignment");
_9.addWidget(_1e,_1d.positionX+_1d.width+this.pad,this.ALIGN_LEFT_TOP,"Alignment");
_9.addWidget(_1f,_1d.positionX,this.ALIGN_LEFT_TOP+_1d.height+this.pad,"Alignment");
_9.addWidget(_20,this.PERCENT_LEFT,this.PERCENT_TOP,"Number");
_9.addWidget(_21,this.COMMA_LEFT,this.COMMA_TOP,"Number");
_9.addWidget(_22,this.INC_DECIMAL_LEFT,this.INC_DECIMAL_TOP,"Number");
_9.addWidget(_23,this.DEC_DECIMAL_LEFT,this.DEC_DECIMAL_TOP,"Number");
_9.addWidget(_24,this.CURRENCY_LEFT,this.CURRENCY_TOP,"Number");
_9.addWidget(_25,this.pad,this.pad,"Cell format");
_9.addWidget(_26,_25.positionX+_25.width+this.pad,this.pad,"Cell format");
_9.addWidget(_27,_26.positionX+_26.width+this.pad,this.pad,"Cell format");
_9.addWidget(_28,_27.positionX+_27.width+this.pad,this.pad,"Cell format");
_9.addWidget(_29,_28.positionX+_28.width+this.pad,this.pad,"Cell format");
_9.addWidget(_2a,_29.positionX+_29.width+this.pad,this.pad,"Cell format");
_9.addWidget(_2b,_2a.positionX+_2a.width+this.pad,this.pad,"Cell format");
_9.addWidget(_2c,this.INSERT_SYMBOL_LEFT,this.INSERT_SYMBOL_TOP,"Insert");
_9.addWidget(_2d,this.INSERT_ROW_COLUMN_LEFT,this.INSERT_ROW_COLUMN_TOP,"Insert");
_9.addWidget(_2e,this.SELECTION_LBL_LEFT,this.SELECTION_LBL_TOP,"Cell Info");
_9.addWidget(_2f,this.SELECTION_TEXT_LEFT,this.SELECTION_TEXT_TOP,"Cell Info");
_9.addWidget(_30,this.FORMULA_TEXT_LEFT,this.FORMULA_TEXT_TOP,"Cell Info");
_9.addWidget(_31,this.pad,this.pad,"Formulas");
_9.addWidget(_32,_31.positionX+_31.width+this.pad,this.pad,"Formulas");
_9.addWidget(_33,_32.positionX+_32.width+this.pad,this.pad,"Formulas");
_9.addWidget(_34,_33.positionX+_33.width+this.pad,this.pad,"Formulas");
_9.addWidget(_35,_34.positionX+_34.width+this.pad,this.pad,"Formulas");
_9.addWidget(_36,_35.positionX+_35.width+this.pad,this.pad,"Formulas");
_9.addWidget(_37,_36.positionX+_36.width+this.pad,this.pad,"Formulas");
_9.addWidget(_38,_37.positionX+_37.width+this.pad,this.pad,"Formulas");
_9.addWidget(_39,_38.positionX+_38.width+this.pad,this.pad,"Formulas");
_9.addWidget(_3a,_39.positionX+_39.width+this.pad,this.pad,"Formulas");
_9.addWidget(_3b,_3a.positionX+_3a.width+this.pad,this.pad,"Formulas");
_9.addWidget(_3c,_3b.positionX+_3b.width+this.pad,this.pad,"Formulas");
_9.addWidget(_3d,this.TEMPLATE_LBL_LEFT,this.TEMPLATE_LBL_TOP,"Templates");
_9.addWidget(_3e,this.TEMPLATE_SELECT_LEFT,this.TEMPLATE_SELECT_TOP,"Templates");
this.fontFaceSelect.setSelectedValue(this.SYSTEM.Settings.get("default_font_family"));
this.fontSizeSelect.setSelectedValue(this.SYSTEM.Settings.get("default_font_size"));
}
catch(ex){
jsExDebug("spreadsheetApp_createPanel",ex);
}
}
function spreadsheetApp_close(){
try{
this.spreadWindow.close();
}
catch(ex){
jsExDebug("spreadsheetApp_close",ex);
}
}
function spreadsheetApp_loadDataFromArray(_40){
try{
var _41=1;
for(var row in _40){
for(var _43 in _40[row]){
this.spreadsheetData.setFormula(row,_43,_41,_40[row][_43]);
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_loadDataFromArray",ex);
}
}
function spreadsheetApp_spreadWindow_keyPress(key){
try{
this.spreadsheet.keyPressHandler(key);
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow_keyPress",ex);
}
}
function spreadsheetApp_spreadWindow_keyDown(key){
try{
switch(key.dmKey){
case 83:
if(key.ctrlKey){
key.preventDefault();
if(this.file){
this.save(true);
}else{
this.saveAs(true);
}
}
break;
case 79:
if(key.ctrlKey){
key.preventDefault();
var _46=new this.SYSTEM.Dialogue.Open(this);
}
break;
default:
this.spreadsheet.keyDownHandler(key);
}
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow_keyDown",ex);
}
}
function spreadsheetApp_binding_evaluate_click(){
try{
this.spreadsheetData.evaluate();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_evaluate_click",ex);
}
}
function spreadsheetApp_capture(){
try{
var _47=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
var _48=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="spread:"+(this.spreadWindow.width/_48)+","+(this.spreadWindow.height/_47)+","+(this.spreadWindow.positionX/_48)+","+((this.spreadWindow.positionY-this.SYSTEM.Panel.getHeight())/_47);
if(this.file&&this.file.fileid){
this.captureString+=", "+this.file.fileid+","+(this.isFilePublic?"p":"");
}
return this.captureString;
}
catch(ex){
jsExDebug("spreadsheetApp_capture",ex);
}
}
function spreadsheetApp_restore(_49){
try{
if(!_49){
return;
}
var _4a=_49.split(":")[1].split(",");
var _4b=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
var _4c=this.SYSTEM.Environment.SCREEN_WIDTH;
var _4d=parseInt(_4c*parseFloat(_4a[0]));
var _4e=parseInt(_4b*parseFloat(_4a[1]));
var _4f=parseInt(_4c*parseFloat(_4a[2]));
var top=parseInt((_4b*parseFloat(_4a[3]))+this.SYSTEM.Panel.getHeight());
this.spreadWindow.setDimensions(_4d,_4e);
this.spreadWindow.setPosition(_4f,top);
var _51=parseInt(_4a[4]);
if(_4a[5]&&_4a[5]=="p"){
this.isFilePublic=true;
}
this.load(_51);
}
catch(ex){
jsExDebug("spreadsheetApp_restore",ex);
}
}
function spreadsheetApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("spreadsheetApp__SIG_KILL",ex);
}
}
function spreadsheetApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("spreadsheetApp__SIG_THEME",ex);
}
}
function spreadsheetApp_isDirty(){
try{
return this.spreadsheet.hasChanged();
}
catch(ex){
jsExDebug("spreadsheetApp_isDirty",ex);
}
}
function spreadsheetApp_getFileName(){
try{
if(this.file){
return this.file.filename;
}else{
return null;
}
}
catch(ex){
jsExDebug("spreadsheetApp_getFileName",ex);
}
}
function spreadsheetApp_cleanAction(_52){
try{
if(this.file){
this.save(false,_52);
}else{
this.saveAs(false,_52);
}
}
catch(ex){
jsExDebug("spreadsheetApp_cleanAction",ex);
}
}
function spreadsheetApp_changeBgColour(_53){
try{
this.spreadsheet.setColour(null,_53);
}
catch(ex){
jsExDebug("spreadsheetApp_changeBgColour",ex);
}
}
function spreadsheetApp_changeTextColour(_54){
try{
this.spreadsheet.setColour(_54,null);
}
catch(ex){
jsExDebug("spreadsheetApp_changeTextColour",ex);
}
}
function spreadsheetApp_convertColourToHex(_55){
try{
if(_55.substr&&_55.substr(0,3)=="rgb"){
var _56=new Array();
_56=_55.split(",");
var red=decimal2Hex(parseInt(_56[0].substr(4)));
var _58=decimal2Hex(parseInt(_56[1]));
var _59=decimal2Hex(parseInt(_56[2].split(")")[0]));
return "#"+red+""+_58+""+_59;
}else{
return _55;
}
}
catch(ex){
jsExDebug("spreadsheetApp_convertColourToHex",ex);
}
}
function spreadsheetApp_fillFormulaDropLists(){
try{
var _5a="&nbsp;&nbsp;All";
var _5b="Formulas&nbsp;&nbsp;";
var _5c=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_AUTO_SUM);
if(_5c){
for(var i in _5c){
if(_5c[i].quick=="1"){
this.autoSumDropList.addItem(_5c[i].name,"&nbsp;&nbsp;&nbsp;"+_5c[i].name);
}
}
}
this.autoSumDropList.addSeparator();
this.autoSumDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" "+_5b);
var _5e=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_LOGICAL);
if(_5e){
for(var i in _5e){
if(_5e[i].quick=="1"){
this.logicalDropList.addItem(_5e[i].name,"&nbsp;&nbsp;&nbsp;"+_5e[i].name);
}
}
}
this.logicalDropList.addSeparator();
this.logicalDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Logical "+_5b);
var _5f=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_TEXT);
if(_5f){
for(var i in _5f){
if(_5f[i].quick=="1"){
this.textDropList.addItem(_5f[i].name,"&nbsp;&nbsp;&nbsp;"+_5f[i].name);
}
}
}
this.textDropList.addSeparator();
this.textDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Text "+_5b);
var _60=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_DATETIME);
if(_60){
for(var i in _60){
if(_60[i].quick=="1"){
this.dateTimeDropList.addItem(_60[i].name,"&nbsp;&nbsp;&nbsp;"+_60[i].name);
}
}
}
this.dateTimeDropList.addSeparator();
this.dateTimeDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Date/Time "+_5b);
var _61=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_LOOKUP);
if(_61){
for(var i in _61){
if(_61[i].quick=="1"){
this.lookupDropList.addItem(_61[i].name,"&nbsp;&nbsp;&nbsp;"+_61[i].name);
}
}
}
this.lookupDropList.addSeparator();
this.lookupDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Lookup "+_5b);
var _62=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_MATH);
if(_62){
for(var i in _62){
if(_62[i].quick=="1"){
this.mathDropList.addItem(_62[i].name,"&nbsp;&nbsp;&nbsp;"+_62[i].name);
}
}
}
this.mathDropList.addSeparator();
this.mathDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Math "+_5b);
var _63=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_INFORMATION);
if(_63){
for(var i in _63){
if(_63[i].quick=="1"){
this.informationDropList.addItem(_63[i].name,"&nbsp;&nbsp;&nbsp;"+_63[i].name);
}
}
}
this.informationDropList.addSeparator();
this.informationDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Information "+_5b);
var _64=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_NUMBER_THEORY);
if(_64){
for(var i in _64){
if(_64[i].quick=="1"){
this.numberTheoryDropList.addItem(_64[i].name,"&nbsp;&nbsp;&nbsp;"+_64[i].name);
}
}
}
this.numberTheoryDropList.addSeparator();
this.numberTheoryDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Number Theory "+_5b);
var _65=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_RANDOM);
if(_65){
for(var i in _65){
if(_65[i].quick=="1"){
this.randomDropList.addItem(_65[i].name,"&nbsp;&nbsp;&nbsp;"+_65[i].name);
}
}
}
this.randomDropList.addSeparator();
this.randomDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Random "+_5b);
var _66=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_STATISTICS);
if(_66){
for(var i in _66){
if(_66[i].quick=="1"){
this.statisticsDropList.addItem(_66[i].name,"&nbsp;&nbsp;&nbsp;"+_66[i].name);
}
}
}
this.statisticsDropList.addSeparator();
this.statisticsDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Statistics "+_5b);
var _67=this.SYSTEM.Formula.getFormulasInCategory(this.SYSTEM.Formula.CATEGORY_LOCATION);
if(_67){
for(var i in _67){
if(_67[i].quick=="1"){
this.locationDropList.addItem(_67[i].name,"&nbsp;&nbsp;&nbsp;"+_67[i].name);
}
}
}
this.locationDropList.addSeparator();
this.locationDropList.addItem(this.FUNCTION_WIZARD_ITEM_VALUE,_5a+" Location "+_5b);
}
catch(ex){
jsExDebug("spreadsheetApp_fillFormulaDropLists",ex);
}
}
function spreadsheetApp_showFormulaWizardFrame(_68){
try{
if(!this.formulaWizardFrame){
var _69=new this.SYSTEM.Frame.Window("formulaWizardFrame","Formulas",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_69.setPosition(this.spreadWindow.positionX+this.spreadWindow.leftEdgeWidth,this.spreadWindow.positionY+this.spreadWindow.topEdgeHeight);
var _6a=new this.SYSTEM.Widget.SelectList("formulaCategoryList");
_6a.align(_6a.LEFT_ALIGN);
_6a.allowStartVisible();
_6a.setDimensions(this.CATEGORY_LIST_WIDTH,this.CATEGORY_LIST_HEIGHT);
_6a.allowBorder("#AAAAAA");
_6a.widgetElement.style.border="solid 2px #AAAAAA";
var _6b=this.SYSTEM.Formula.getCategoryNames();
for(var i=0;i<_6b.length;i++){
if(_6b[i]&&_6b[i]!=this.SYSTEM.Formula.CATEGORY_AUTO_SUM_STRING){
_6a.addItem(_6b[i],_6b[i]);
}
}
var _6d=new this.SYSTEM.Widget.SelectList("formulaNameList");
_6d.align(_6d.LEFT_ALIGN);
_6d.allowStartVisible();
_6d.allowBorder("#AAAAAA");
_6d.widgetElement.style.border="solid 2px #AAAAAA";
_6d.setDimensions(this.FORMULA_LIST_WIDTH,this.FORMULA_LIST_HEIGHT);
var _6e=_69.leftEdgeWidth;
var top=_69.topEdgeHeight;
var _70=this.pad;
var _71=document.createElement("span");
_71.style.position="absolute";
_71.style.top=(top+this.FORMULA_DESC_TITLE_TOP)+"px";
_71.style.left=_6e+"px";
_71.style.height=this.FORMULA_DESC_TITLE_HEIGHT+"px";
_71.style.width="auto";
_71.innerHTML="Description";
_71.style.fontWeight="bold";
var _72=document.createElement("span");
_72.style.position="absolute";
_72.style.top=(top+this.FORMULA_DESC_CONTENT_TOP)+"px";
_72.style.left=_6e+"px";
_72.style.height=this.FORMULA_DESC_CONTENT_HEIGHT+"px";
_72.style.width=this.FORMULA_DESC_CONTENT_WIDTH+"px";
_72.style.overflowY="scroll";
_72.style.border="solid 1px #AAAAAA";
_72.style.paddingLeft=_70+"px";
_72.style.paddingTop=_70+"px";
var _73=document.createElement("span");
_73.style.position="absolute";
_73.style.top=(top+this.FORMULA_SYNOPSIS_TITLE_TOP)+"px";
_73.style.height=this.FORMULA_SYNOPSIS_TITLE_HEIGHT+"px";
_73.style.left=_6e+"px";
_73.style.width="auto";
_73.innerHTML="Synopsis";
_73.style.fontWeight="bold";
var _74=document.createElement("span");
_74.style.position="absolute";
_74.style.top=(top+this.FORMULA_SYNOPSIS_CONTENT_TOP)+"px";
_74.style.left=_6e+"px";
_74.style.height=this.FORMULA_SYNOPSIS_CONTENT_HEIGHT+"px";
_74.style.width=this.FORMULA_SYNOPSIS_CONTENT_WIDTH+"px";
_74.style.border="solid 1px #AAAAAA";
_74.style.paddingLeft=_70+"px";
_74.style.paddingTop=_70+"px";
_74.style.overflow="hidden";
_74.style.fontSize="-0.2em";
var _75=document.createElement("span");
_75.style.position="absolute";
_75.style.top=(top+this.FORMULA_EXAMPLE_TITLE_TOP)+"px";
_75.style.left=_6e+"px";
_75.style.height=this.FORMULA_EXAMPLE_TITLE_HEIGHT+"px";
_75.style.width="auto";
_75.innerHTML="Example";
_75.style.fontWeight="bold";
var _76=document.createElement("span");
_76.style.position="absolute";
_76.style.top=(top+this.FORMULA_EXAMPLE_CONTENT_TOP)+"px";
_76.style.left=_6e+"px";
_76.style.height=this.FORMULA_EXAMPLE_CONTENT_HEIGHT+"px";
_76.style.width=this.FORMULA_EXAMPLE_CONTENT_WIDTH+"px";
_76.style.overflowY="scroll";
_76.style.border="solid 1px #AAAAAA";
_76.style.paddingLeft=_70+"px";
_76.style.paddingTop=_70+"px";
var _77=new this.SYSTEM.Widget.TextButton("formulaInsertBtn",55,"Insert","Insert Formula","Inserts the formula into the currently active cell.");
_69.addWidget(_6a,_6e,top);
_69.addWidget(_6d,_6e+this.CATEGORY_LIST_WIDTH+this.pad+4,top+this.FORMULA_LIST_TOP);
_69.windowDiv.appendChild(_71);
_69.windowDiv.appendChild(_72);
_69.windowDiv.appendChild(_73);
_69.windowDiv.appendChild(_74);
_69.windowDiv.appendChild(_75);
_69.windowDiv.appendChild(_76);
_69.addWidget(_77,_69.rightEdgeWidth,_69.bottomEdgeHeight,true,true);
this.formulaWizardFrame=_69;
this.formulaCategoryList=_6a;
this.formulaNameList=_6d;
this.formulaDescriptionTitle=_71;
this.formulaDescriptionContent=_72;
this.formulaSynopsisContent=_74;
this.formulaSynopsisTitle=_73;
this.formulaExampleTitle=_75;
this.formulaExampleContent=_76;
this.formulaInsertBtn=_77;
_69.setFixedDimensions(_6e+this.FORMULA_WIZ_WIDTH+_69.rightEdgeWidth,top+this.FORMULA_WIZ_HEIGHT+_69.bottomEdgeHeight);
}
this.formulaWizardFrame.show();
this.SYSTEM.WINDOW_MANAGER.focus(this.formulaWizardFrame);
this.formulaCategoryList.show();
this.formulaNameList.show();
this.formulaWizardFrameOpen=true;
if(_68){
this.formulaCategoryList.setSelectedValue(_68);
this.selectFormulaWizardCategory(_68);
}
}
catch(ex){
jsExDebug("spreadsheetApp_showFormulaWizardFrame",ex);
}
}
function spreadsheetApp_showCellFormattingFrame(_78){
try{
if(!this.formattingFrame){
var _79=new this.SYSTEM.Frame.Window("formattingFrame","Cell Formatting",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_79.setPosition(this.spreadWindow.positionX+this.spreadWindow.leftEdgeWidth,this.spreadWindow.positionY+this.spreadWindow.topEdgeHeight);
var _7a=_79.leftEdgeWidth;
var top=_79.topEdgeHeight;
var _7c=new this.SYSTEM.Widget.SelectList("formattingCategorySelect");
_7c.align(_7c.LEFT_ALIGN);
_7c.allowStartVisible();
_7c.setDimensions(this.FORMATTING_CATEGORY_WIDTH,this.FORMATTING_CATEGORY_HEIGHT);
_7c.widgetElement.style.border="solid 1px #AAAAAA";
_7c.addItem(this.GENERAL_FORMAT,"Standard");
_7c.addItem(this.NUMBER_FORMAT,"Number");
_7c.addItem(this.CURRENCY_FORMAT,"Currency");
_7c.addItem(this.ACCOUNTING_FORMAT,"Accounting");
_7c.addItem(this.DATE_FORMAT,"Date");
_7c.addItem(this.TIME_FORMAT,"Time");
_7c.addItem(this.PERCENTAGE_FORMAT,"Percentage");
var _7d=new this.SYSTEM.Widget.Label("formattingDescriptionLabel");
_7d.setText("Description");
_7d.setBold();
var _7e=document.createElement("div");
_7e.style.position="absolute";
_7e.style.left=(_7a+this.FORMATTING_DESC_DIV_LEFT)+"px";
_7e.style.top=(top+this.FORMATTING_DESC_DIV_TOP)+"px";
_7e.style.width=this.FORMATTING_DESC_DIV_WIDTH+"px";
_7e.style.height=this.FORMATTING_DESC_DIV_HEIGHT+"px";
var _7f=new this.SYSTEM.Widget.Label("formattingSampleLabel");
_7f.setText("Sample");
_7f.setBold();
var _80=document.createElement("div");
_80.style.position="absolute";
_80.style.left=(_7a+this.FORMATTING_SAMPLE_DIV_LEFT)+"px";
_80.style.top=(top+this.FORMATTING_SAMPLE_DIV_TOP)+"px";
_80.style.width=this.FORMATTING_SAMPLE_DIV_WIDTH+"px";
_80.style.height=this.FORMATTING_SAMPLE_DIV_HEIGHT+"px";
_80.style.paddingTop="8px";
_80.style.borderBottom="solid 1px #AAAAAA";
_80.style.overflow="hidden";
var _81=new this.SYSTEM.Widget.TextButton("formattingApplyBtn",50,"Apply","Apply Format","Applies the chosen formatting to any selected cells.");
_79.addWidget(_7c,_7a+this.FORMATTING_CATEGORY_LEFT,top+this.FORMATTING_CATEGORY_TOP);
_79.addWidget(_7d,_7a+this.FORMATTING_DESC_LBL_LEFT,top+this.FORMATTING_DESC_LBL_TOP);
_79.windowDiv.appendChild(_7e);
_79.addWidget(_7f,_7a+this.FORMATTING_SAMPLE_LBL_LEFT,top+this.FORMATTING_SAMPLE_LBL_TOP);
_79.windowDiv.appendChild(_80);
_79.addWidget(_81,_79.rightEdgeWidth,_79.bottomEdgeHeight,true,true);
this.formattingFrame=_79;
this.formattingCategorySelect=_7c;
this.formattingDescriptionLabel=_7d;
this.formattingDescriptionDiv=_7e;
this.formattingSampleLabel=_7f;
this.formattingSampleDiv=_80;
this.formattingApplyBtn=_81;
_79.setFixedDimensions(_7a+this.FORMATTING_FRAME_WIDTH+_79.rightEdgeWidth,top+this.FORMATTING_FRAME_HEIGHT+_79.bottomEdgeHeight);
}
this.formattingFrame.show();
this.SYSTEM.WINDOW_MANAGER.focus(this.formattingFrame);
this.formattingCategorySelect.show();
this.formattingCategorySelect.show();
this.formattingSampleLabel.show();
this.formattingDescriptionLabel.show();
this.formattingDescriptionDiv.style.visibility="visible";
this.formattingSampleDiv.style.visibility="visible";
this.cellFormattingFrameOpen=true;
this.formattingCategorySelect.setSelectedValue(_78);
this.currentFormattingCategory=_78;
switch(_78){
case this.NUMBER_FORMAT:
this.showNumberFormatOptions();
break;
case this.CURRENCY_FORMAT:
this.showCurrencyFormatOptions();
break;
case this.ACCOUNTING_FORMAT:
this.showAccountingFormatOptions();
break;
case this.DATE_FORMAT:
this.showDateFormatOptions();
break;
case this.TIME_FORMAT:
this.showTimeFormatOptions();
break;
case this.PERCENTAGE_FORMAT:
this.showPercentageFormatOptions();
break;
}
this.setFormatSample(_78);
}
catch(ex){
jsExDebug("spreadsheetApp_showCellFormattingFrame",ex);
}
}
function spreadsheetApp_showGeneralFormatOptions(){
try{
if(!this.generalDiv){
this.generalDiv=this.createCategoryDiv();
var _82=new this.SYSTEM.Widget.Label("generalLabel");
_82.setPosition(0,50);
_82.setText("Standard format cells have no specific format options.");
_82.attach(this.generalDiv);
this.generalLabel=_82;
}
if(this.currentCategoryDiv){
this.formattingFrame.windowDiv.removeChild(this.currentCategoryDiv);
}
this.formattingSampleLabel.hide();
this.formattingDescriptionLabel.hide();
this.formattingDescriptionDiv.style.visibility="hidden";
this.formattingSampleDiv.style.visibility="hidden";
this.currentCategoryDiv=this.generalDiv;
this.currentCategory=this.GENERAL_FORMAT;
this.formattingFrame.windowDiv.appendChild(this.currentCategoryDiv);
}
catch(ex){
jsExDebug("spreadsheetApp_showGeneralFormatOptions",ex);
}
}
function spreadsheetApp_showNumberFormatOptions(){
try{
if(!this.numberDiv){
this.numberDiv=this.createCategoryDiv();
var _83=new this.SYSTEM.Widget.Label("numberDecimalLabel");
_83.setText("Decimal places");
_83.setPosition(0,12);
_83.attach(this.numberDiv);
var _84=new this.SYSTEM.Widget.SelectBox("numberDecimalSelect",95);
_84.setPosition(95,10);
for(var i=0;i<=30;i++){
_84.addItem(i,i.toString());
}
_84.setValue(2);
_84.attach(this.numberDiv);
var _86=new this.SYSTEM.Widget.Checkbox("numberCommaCheckbox");
_86.setPosition(165,33);
_86.attach(this.numberDiv);
var _87=new this.SYSTEM.Widget.Label("numberCommaLabel");
_87.setPosition(0,33);
_87.setText("Use comma as separator.");
_87.attach(this.numberDiv);
var _88=new this.SYSTEM.Widget.Label("numberNegativeLabel");
_88.setText("Negative numbers");
_88.setPosition(0,68);
_88.attach(this.numberDiv);
var _89=new this.SYSTEM.Widget.SelectList("numberNegativeSelect");
_89.align(_89.LEFT_ALIGN);
_89.allowBorder("#AAAAAA");
_89.setDimensions(parseInt(this.numberDiv.style.width)-3,79);
_89.setPosition(0,88);
_89.allowStartVisible();
_89.addItem(this.NUMBER_NEG_1,"-1234.10");
_89.addItem(this.NUMBER_NEG_2,"<font color='red'>1234.10</font>");
_89.addItem(this.NUMBER_NEG_3,"-1234.10");
_89.addItem(this.NUMBER_NEG_4,"<font color='red'>-1234.10</font>");
_89.setSelectedIndex(0);
_89.attach(this.numberDiv);
this.numberDecimalLabel=_83;
this.numberDecimalSelect=_84;
this.numberCommaCheckbox=_86;
this.numberCommaLabel=_87;
this.numberNegativeLabel=_88;
this.numberNegativeSelect=_89;
this.formattingFrame.bindEventHandlers(_84);
this.formattingFrame.bindEventHandlers(_86);
this.formattingFrame.bindEventHandlers(_89);
}
if(this.currentCategoryDiv){
this.formattingFrame.windowDiv.removeChild(this.currentCategoryDiv);
}
this.formattingSampleLabel.show();
this.formattingDescriptionLabel.show();
this.formattingDescriptionDiv.style.visibility="visible";
this.formattingSampleDiv.style.visibility="visible";
this.currentCategoryDiv=this.numberDiv;
this.currentCategory=this.NUMBER_FORMAT;
this.formattingDescriptionDiv.innerHTML="Number format is used for the general display of numbers.";
this.formattingFrame.windowDiv.appendChild(this.currentCategoryDiv);
}
catch(ex){
jsExDebug("spreadsheetApp_showNumberFormatOptions",ex);
}
}
function spreadsheetApp_showCurrencyFormatOptions(){
try{
if(!this.currencyDiv){
this.currencyDiv=this.createCategoryDiv();
var _8a=new this.SYSTEM.Widget.Label("currencyDecimalLabel");
_8a.setText("Decimal places");
_8a.setPosition(0,12);
_8a.attach(this.currencyDiv);
var _8b=new this.SYSTEM.Widget.SelectBox("currencyDecimalSelect",95);
_8b.setPosition(95,10);
for(var i=0;i<=30;i++){
_8b.addItem(i,i.toString());
}
_8b.attach(this.currencyDiv);
_8b.setValue(2);
var _8d=new this.SYSTEM.Widget.Label("currencySymbolLabel");
_8d.setText("Symbol");
_8d.setPosition(0,37);
_8d.attach(this.currencyDiv);
var _8e=new this.SYSTEM.Widget.DropText("currencySymbolDropText",140,22);
_8e.alignLeft();
_8e.allowBorder("#AAAAAA");
_8e.setPosition(50,35);
_8e.addItem(this.DOLLAR,this.DOLLAR+" English (Australia)","$ English (Australia)");
_8e.addItem(this.EURO,this.EURO+" Euro (Europe)","\xe2\u201a\xac Euro (Europe)");
_8e.addItem(this.POUND,this.POUND+" English (United Kingdom)","\xc2\xa3 English (United Kingdom)");
_8e.addItem(this.YEN,this.YEN+" Yen (Japan)","\xc2\xa5 Yen (Japan)");
_8e.addItem(this.YUAN_RENMINBI,this.YUAN_RENMINBI+" Yuan Renminbi (China)","\u5143 Yuan Renminbi (China)");
_8e.setSelectedIndex(0);
var _8f=new this.SYSTEM.Widget.Label("currencyNegativeLabel");
_8f.setText("Negative numbers");
_8f.setPosition(0,69);
_8f.attach(this.currencyDiv);
var _90=new this.SYSTEM.Widget.SelectList("currencyNegativeSelect");
_90.align(_90.LEFT_ALIGN);
_90.allowBorder("#AAAAAA");
_90.setDimensions(parseInt(this.currencyDiv.style.width)-3,78);
_90.setPosition(0,89);
_90.allowStartVisible();
_90.addItem(this.CURRENCY_NEG_1,"-"+this.DOLLAR+"1234.10");
_90.addItem(this.CURRENCY_NEG_2,"<font color='red'>"+this.DOLLAR+"1234.10</font>");
_90.addItem(this.CURRENCY_NEG_3,"($1234.10)");
_90.addItem(this.CURRENCY_NEG_4,"<font color='red'>-"+this.DOLLAR+"1234.10</font>");
_90.attach(this.currencyDiv);
_90.attach(this.currencyDiv);
_90.setSelectedIndex(0);
this.currencyDecimalLabel=_8a;
this.currencyDecimalSelect=_8b;
this.currencySymbolLabel=_8d;
this.currencySymbolDropText=_8e;
this.currencyNegativeLabel=_8f;
this.currencyNegativeSelect=_90;
_8e.attach(this.currencyDiv);
this.formattingFrame.bindEventHandlers(_8b);
this.formattingFrame.bindEventHandlers(_8e);
this.formattingFrame.bindEventHandlers(_90);
}
if(this.currentCategoryDiv){
this.formattingFrame.windowDiv.removeChild(this.currentCategoryDiv);
}
this.formattingSampleLabel.show();
this.formattingDescriptionLabel.show();
this.formattingDescriptionDiv.style.visibility="visible";
this.formattingSampleDiv.style.visibility="visible";
this.currentCategoryDiv=this.currencyDiv;
this.currentCategory=this.CURRENCY_FORMAT;
this.formattingDescriptionDiv.innerHTML="Currency format is used for the general display of monetary values.";
this.formattingFrame.windowDiv.appendChild(this.currentCategoryDiv);
}
catch(ex){
jsExDebug("spreadsheetApp_showCurrencyFormatOptions",ex);
}
}
function spreadsheetApp_showAccountingFormatOptions(){
try{
if(!this.accountingDiv){
this.accountingDiv=this.createCategoryDiv();
var _91=new this.SYSTEM.Widget.Label("accountingDecimalLabel");
_91.setText("Decimal places");
_91.setPosition(0,12);
_91.attach(this.accountingDiv);
var _92=new this.SYSTEM.Widget.SelectBox("accountingDecimalSelect",95);
_92.setPosition(95,10);
for(var i=0;i<=30;i++){
_92.addItem(i,i.toString());
}
_92.attach(this.accountingDiv);
_92.setValue(2);
var _94=new this.SYSTEM.Widget.Checkbox("accountingBracketCheckbox");
_94.setPosition(166,33);
_94.attach(this.accountingDiv);
var _95=new this.SYSTEM.Widget.Label("accountingBracketLabel");
_95.setPosition(0,33);
_95.setText("Use brackets for negative.");
_95.attach(this.accountingDiv);
var _96=new this.SYSTEM.Widget.Label("accountingSymbolLabel");
_96.setText("Symbol");
_96.setPosition(0,68);
_96.attach(this.accountingDiv);
var _97=new this.SYSTEM.Widget.SelectList("accountingSymbolSelect");
_97.align(_97.LEFT_ALIGN);
_97.allowBorder("#AAAAAA");
_97.setDimensions(parseInt(this.accountingDiv.style.width)-3,79);
_97.setPosition(0,88);
_97.allowStartVisible();
_97.addItem(this.DOLLAR,this.DOLLAR+" English (Australia)");
_97.addItem(this.EURO,this.EURO+" Euro (Europe)");
_97.addItem(this.POUND,this.POUND+" English (United Kingdom)");
_97.addItem(this.YEN,this.YEN+" Yen (Japan)");
_97.addItem(this.YUAN_RENMINBI,this.YUAN_RENMINBI+" Yuan Renminbi (China)");
_97.attach(this.accountingDiv);
_97.setSelectedIndex(0);
this.accountingDecimalLabel=_91;
this.accountingDecimalSelect=_92;
this.accountingBracketCheckbox=_94;
this.accountingBracketLabel=_95;
this.accountingSymbolLabel=_96;
this.accountingSymbolSelect=_97;
this.formattingFrame.bindEventHandlers(_92);
this.formattingFrame.bindEventHandlers(_94);
this.formattingFrame.bindEventHandlers(_97);
}
if(this.currentCategoryDiv){
this.formattingFrame.windowDiv.removeChild(this.currentCategoryDiv);
}
this.formattingSampleLabel.show();
this.formattingDescriptionLabel.show();
this.formattingDescriptionDiv.style.visibility="visible";
this.formattingSampleDiv.style.visibility="visible";
this.currentCategoryDiv=this.accountingDiv;
this.currentCategory=this.ACCOUNTING_FORMAT;
this.formattingDescriptionDiv.innerHTML="Accounting format is used for the display of monetary values.";
this.formattingFrame.windowDiv.appendChild(this.currentCategoryDiv);
}
catch(ex){
jsExDebug("spreadsheetApp_showAccountingFormatOptions",ex);
}
}
function spreadsheetApp_showDateFormatOptions(){
try{
if(!this.dateDiv){
this.dateDiv=this.createCategoryDiv();
var _98=new this.SYSTEM.Widget.Label("customDateLabel","Custom format:");
_98.setPosition(0,12);
_98.attach(this.dateDiv);
var _99=new this.SYSTEM.Widget.Text("customDateText");
_99.setWidth(100);
_99.setPosition(95,7);
_99.attach(this.dateDiv);
var _9a=new this.SYSTEM.Widget.Label("dateTypeLabel");
_9a.setText("Date type");
_9a.setPosition(0,33);
_9a.attach(this.dateDiv);
var _9b=new this.SYSTEM.Widget.SelectList("dateTypeSelect");
_9b.align(_9b.LEFT_ALIGN);
_9b.allowBorder("#AAAAAA");
_9b.setDimensions(parseInt(this.dateDiv.style.width)-3,115);
_9b.setPosition(0,53);
_9b.allowStartVisible();
_9b.addItem(this.DATE_1,"2/19");
_9b.addItem(this.DATE_2,"02/19/06");
_9b.addItem(this.DATE_3,"*19-Feb");
_9b.addItem(this.DATE_4,"*19-Feb-06");
_9b.addItem(this.DATE_5,"*Feb-06");
_9b.addItem(this.DATE_6,"*February-06");
_9b.addItem(this.DATE_7,"*February 19, 2006");
_9b.addItem(this.DATE_8,"*19-Feb-2006");
_9b.addItem(this.DATE_9,"*2006-02-19");
_9b.addItem(this.DATE_10,"*Sunday, 19 February 2006");
_9b.attach(this.dateDiv);
_9b.setSelectedIndex(0);
this.customDateLabel=_98;
this.customDateText=_99;
this.dateTypeLabel=_9a;
this.dateTypeSelect=_9b;
this.formattingFrame.bindEventHandlers(_99);
this.formattingFrame.bindEventHandlers(_9b);
}
if(this.currentCategoryDiv){
this.formattingFrame.windowDiv.removeChild(this.currentCategoryDiv);
}
this.formattingSampleLabel.show();
this.formattingDescriptionLabel.show();
this.formattingDescriptionDiv.style.visibility="visible";
this.formattingSampleDiv.style.visibility="visible";
this.currentCategoryDiv=this.dateDiv;
this.currentCategory=this.DATE_FORMAT;
this.formattingDescriptionDiv.innerHTML="Date format is used for the display of dates.";
this.formattingFrame.windowDiv.appendChild(this.currentCategoryDiv);
}
catch(ex){
jsExDebug("spreadsheetApp_showDateFormatOptions",ex);
}
}
function spreadsheetApp_showTimeFormatOptions(){
try{
if(!this.timeDiv){
this.timeDiv=this.createCategoryDiv();
var _9c=new this.SYSTEM.Widget.Label("customTimeLabel","Custom format:");
_9c.setPosition(0,12);
_9c.attach(this.timeDiv);
var _9d=new this.SYSTEM.Widget.Text("customTimeText");
_9d.setWidth(100);
_9d.setPosition(95,7);
_9d.attach(this.timeDiv);
var _9e=new this.SYSTEM.Widget.Label("timeTypeLabel");
_9e.setText("Time type");
_9e.setPosition(0,33);
_9e.attach(this.timeDiv);
var _9f=new this.SYSTEM.Widget.SelectList("timeTypeSelect");
_9f.align(_9f.LEFT_ALIGN);
_9f.allowBorder("#AAAAAA");
_9f.setDimensions(180,115);
_9f.setPosition(0,53);
_9f.allowStartVisible();
_9f.addItem(this.TIME_1,"1:30 PM");
_9f.addItem(this.TIME_2,"13:30");
_9f.addItem(this.TIME_3,"1:30:33 PM");
_9f.addItem(this.TIME_4,"13:30:33");
_9f.addItem(this.TIME_5,"02/19/06 1:30 PM");
_9f.addItem(this.TIME_6,"02/19/06 13:30");
_9f.attach(this.timeDiv);
_9f.setSelectedIndex(0);
this.customTimeLabel=_9c;
this.customTimeText=_9d;
this.timeTypeLabel=_9e;
this.timeTypeSelect=_9f;
this.formattingFrame.bindEventHandlers(_9d);
this.formattingFrame.bindEventHandlers(_9f);
}
if(this.currentCategoryDiv){
this.formattingFrame.windowDiv.removeChild(this.currentCategoryDiv);
}
this.formattingSampleLabel.show();
this.formattingDescriptionLabel.show();
this.formattingDescriptionDiv.style.visibility="visible";
this.formattingSampleDiv.style.visibility="visible";
this.currentCategoryDiv=this.timeDiv;
this.currentCategory=this.TIME_FORMAT;
this.formattingDescriptionDiv.innerHTML="Time format is used for the display of Times.";
this.formattingFrame.windowDiv.appendChild(this.currentCategoryDiv);
}
catch(ex){
jsExDebug("spreadsheetApp_showTimeFormatOptions",ex);
}
}
function spreadsheetApp_showPercentageFormatOptions(){
try{
if(!this.percentageDiv){
this.percentageDiv=this.createCategoryDiv();
var _a0=new this.SYSTEM.Widget.Label("percentageDecimalLabel");
_a0.setText("Decimal places");
_a0.setPosition(0,7);
_a0.attach(this.percentageDiv);
var _a1=new this.SYSTEM.Widget.SelectBox("percentageDecimalSelect",95);
_a1.setPosition(95,5);
_a1.addItem(0,"0");
_a1.addItem(1,"1");
_a1.addItem(2,"2");
_a1.addItem(3,"3");
_a1.addItem(4,"4");
_a1.addItem(5,"5");
_a1.addItem(6,"6");
_a1.attach(this.percentageDiv);
this.formattingFrame.windowDiv.appendChild(this.percentageDiv);
this.percentageDecimalLabel=_a0;
this.percentageDecimalSelect=_a1;
this.formattingFrame.bindEventHandlers(_a1);
}
if(this.currentCategoryDiv){
this.formattingFrame.windowDiv.removeChild(this.currentCategoryDiv);
}
this.formattingSampleLabel.show();
this.formattingDescriptionLabel.show();
this.formattingDescriptionDiv.style.visibility="visible";
this.formattingSampleDiv.style.visibility="visible";
this.currentCategoryDiv=this.percentageDiv;
this.currentCategory=this.PERCENTAGE_FORMAT;
this.formattingDescriptionDiv.innerHTML="Percentage format is used for the display of percentages.";
this.formattingFrame.windowDiv.appendChild(this.currentCategoryDiv);
}
catch(ex){
jsExDebug("spreadsheetApp_showPercentageFormatOptions",ex);
}
}
function spreadsheetApp_createCategoryDiv(){
try{
var _a2=document.createElement("div");
_a2.style.position="absolute";
_a2.style.left=(this.formattingFrame.leftEdgeWidth+this.FORMATTING_CATEGORY_DIV_LEFT)+"px";
_a2.style.top=(this.formattingFrame.topEdgeHeight+this.FORMATTING_CATEGORY_DIV_TOP)+"px";
_a2.style.width=this.FORMATTING_CATEGORY_DIV_WIDTH+"px";
_a2.style.height=this.FORMATTING_CATEGORY_DIV_HEIGHT+"px";
return _a2;
}
catch(ex){
jsExDebug("spreadsheetApp_createCategoryDiv",ex);
}
}
function spreadsheetApp_setFormatSample(_a3){
try{
var _a4="";
switch(_a3){
case this.NUMBER_FORMAT:
switch(this.numberNegativeSelect.getSelectedValue()){
case this.NUMBER_NEG_1:
this.formattingSampleDiv.style.color="rgb(0,0,0)";
_a4+="-";
break;
case this.NUMBER_NEG_2:
this.formattingSampleDiv.style.color="rgb(255,0,0)";
break;
case this.NUMBER_NEG_3:
this.formattingSampleDiv.style.color="rgb(0,0,0)";
_a4+="-";
break;
case this.NUMBER_NEG_4:
this.formattingSampleDiv.style.color="rgb(255,0,0)";
_a4+="-";
break;
}
if(this.numberCommaCheckbox.isChecked()){
_a4+="1,234";
}else{
_a4+="1234";
}
var _a5=parseInt(this.numberDecimalSelect.getCurrentText());
if(_a5>0){
_a4+=".";
for(var i=0;i<_a5;i++){
_a4+=i;
}
}
break;
case this.CURRENCY_FORMAT:
switch(this.currencyNegativeSelect.getSelectedValue()){
case this.CURRENCY_NEG_1:
this.formattingSampleDiv.style.color="rgb(0,0,0)";
_a4+="-";
break;
case this.CURRENCY_NEG_2:
this.formattingSampleDiv.style.color="rgb(255,0,0)";
break;
case this.CURRENCY_NEG_3:
this.formattingSampleDiv.style.color="rgb(0,0,0)";
_a4+="(";
break;
case this.CURRENCY_NEG_4:
this.formattingSampleDiv.style.color="rgb(255,0,0)";
_a4+="-";
break;
}
var _a7=this.currencySymbolDropText.selectedValue;
_a4+=_a7+"1,234";
this.currencySymbolDropText.setSelectedValue(_a7);
var _a5=parseInt(this.currencyDecimalSelect.getCurrentText());
if(_a5>0){
_a4+=".";
for(var i=0;i<_a5;i++){
_a4+=i;
}
}
if(this.currencyNegativeSelect.getSelectedValue()==this.CURRENCY_NEG_3){
_a4+=")";
}
break;
case this.ACCOUNTING_FORMAT:
var _a8;
this.formattingSampleDiv.style.color="rgb(0,0,0)";
if(this.accountingBracketCheckbox.isChecked()){
_a4+="(";
_a8=true;
}else{
_a8=false;
}
_a4+=this.accountingSymbolSelect.getSelectedValue()+"1,234";
var _a5=parseInt(this.accountingDecimalSelect.getCurrentText());
if(_a5>0){
_a4+=".";
for(var i=0;i<_a5;i++){
_a4+=i;
}
}
if(_a8){
_a4+=")";
}
break;
case this.DATE_FORMAT:
this.formattingSampleDiv.style.color="rgb(0,0,0)";
switch(this.dateTypeSelect.getSelectedValue()){
case this.DATE_1:
_a4="2/19";
this.customDateText.setContent("m/dd");
break;
case this.DATE_2:
_a4="02/19/06";
this.customDateText.setContent("mm/dd/yy");
break;
case this.DATE_3:
_a4="19-Feb";
this.customDateText.setContent("dd-mmm");
break;
case this.DATE_4:
_a4="19-Feb-06";
this.customDateText.setContent("dd-mmm-yy");
break;
case this.DATE_5:
_a4="Feb-06";
this.customDateText.setContent("mmm-yy");
break;
case this.DATE_6:
_a4="February-06";
this.customDateText.setContent("mmmm-yy");
break;
case this.DATE_7:
_a4="February 19, 2006";
this.customDateText.setContent("mmmm dd, yyyy");
break;
case this.DATE_8:
_a4="19-Feb-2006";
this.customDateText.setContent("dd-mmm-yyyy");
break;
case this.DATE_9:
_a4="2006-02-19";
this.customDateText.setContent("yyyy-mm-dd");
break;
case this.DATE_10:
_a4="Sunday, 19 February 2006";
this.customDateText.setContent("dddd, dd mmmm yyyy");
break;
}
break;
case this.TIME_FORMAT:
this.formattingSampleDiv.style.color="rgb(0,0,0)";
switch(this.timeTypeSelect.getSelectedValue()){
case this.TIME_1:
_a4="1:30 PM";
this.customTimeText.setContent("h:mm AM/PM");
break;
case this.TIME_2:
_a4="13:30";
this.customTimeText.setContent("hh:mm");
break;
case this.TIME_3:
_a4="1:00:33 PM";
this.customTimeText.setContent("h:mm:ss AM/PM");
break;
case this.TIME_4:
_a4="13:30:33";
this.customTimeText.setContent("hh:mm:ss");
break;
case this.TIME_5:
_a4="02/19/06 1:30 PM";
this.customTimeText.setContent("dd/mm/yy h:mm AM/PM");
break;
case this.TIME_6:
_a4="02/19/06 13:30";
this.customTimeText.setContent("dd/mm/yy hh:mm");
break;
}
break;
case this.PERCENTAGE_FORMAT:
_a4="100";
this.formattingSampleDiv.style.color="rgb(0,0,0)";
if(this.percentageDecimalSelect.currentValue>0){
_a4+=".";
for(var i=0;i<this.percentageDecimalSelect.currentValue;i++){
_a4+=i;
}
}
_a4+="%";
break;
}
this.formattingSampleDiv.innerHTML=_a4;
}
catch(ex){
jsExDebug("spreadsheetApp_setFormatSample",ex);
}
}
function spreadsheetApp_selectionChangeCallback(){
try{
var _a9=this.spreadsheet.getStyle();
var _aa=this.spreadsheet.getColour();
var _ab=this.spreadsheet.getFont();
if(_a9==null){
this.boldBtn.setState(this.boldBtn.OFF_STATE);
this.underlineBtn.setState(this.underlineBtn.OFF_STATE);
this.strikethroughBtn.setState(this.strikethroughBtn.OFF_STATE);
this.italicsBtn.setState(this.italicsBtn.OFF_STATE);
this.alignLeftBtn.setState(this.alignLeftBtn.ON_STATE);
this.alignCentreBtn.setState(this.alignCentreBtn.OFF_STATE);
this.alignRightBtn.setState(this.alignRightBtn.OFF_STATE);
}else{
if(_a9&this.spreadsheet.FONT_MASK){
if(_a9&this.spreadsheet.BOLD){
this.boldBtn.setState(this.boldBtn.ON_STATE);
}else{
this.boldBtn.setState(this.boldBtn.OFF_STATE);
}
if(_a9&this.spreadsheet.UNDERLINE){
if(_a9&this.spreadsheet.STRIKEOUT){
this.underlineBtn.setState(this.underlineBtn.ON_STATE);
this.strikethroughBtn.setState(this.strikethroughBtn.ON_STATE);
}else{
this.underlineBtn.setState(this.underlineBtn.ON_STATE);
this.strikethroughBtn.setState(this.strikethroughBtn.OFF_STATE);
}
}else{
if(_a9&this.spreadsheet.STRIKEOUT){
this.strikethroughBtn.setState(this.strikethroughBtn.ON_STATE);
this.underlineBtn.setState(this.underlineBtn.OFF_STATE);
}else{
this.strikethroughBtn.setState(this.strikethroughBtn.OFF_STATE);
this.underlineBtn.setState(this.underlineBtn.OFF_STATE);
}
}
if(_a9&this.spreadsheet.ITALIC){
this.italicsBtn.setState(this.italicsBtn.ON_STATE);
}else{
this.italicsBtn.setState(this.italicsBtn.OFF_STATE);
}
}else{
this.boldBtn.setState(this.boldBtn.OFF_STATE);
this.underlineBtn.setState(this.underlineBtn.OFF_STATE);
this.strikethroughBtn.setState(this.strikethroughBtn.OFF_STATE);
this.italicsBtn.setState(this.italicsBtn.OFF_STATE);
}
if(_a9&this.spreadsheet.ALIGN_LEFT){
this.alignLeftBtn.setState(this.alignLeftBtn.ON_STATE);
this.alignCentreBtn.setState(this.alignCentreBtn.OFF_STATE);
this.alignRightBtn.setState(this.alignRightBtn.OFF_STATE);
}else{
if(_a9&this.spreadsheet.ALIGN_RIGHT){
this.alignLeftBtn.setState(this.alignLeftBtn.OFF_STATE);
this.alignCentreBtn.setState(this.alignCentreBtn.OFF_STATE);
this.alignRightBtn.setState(this.alignRightBtn.ON_STATE);
}else{
if(_a9&this.spreadsheet.ALIGN_CENTRE){
this.alignLeftBtn.setState(this.alignLeftBtn.OFF_STATE);
this.alignCentreBtn.setState(this.alignCentreBtn.ON_STATE);
this.alignRightBtn.setState(this.alignRightBtn.OFF_STATE);
}else{
if(_a9&this.spreadsheet.JUSTIFY_TEXT){
this.alignLeftBtn.setState(this.alignLeftBtn.OFF_STATE);
this.alignCentreBtn.setState(this.alignCentreBtn.OFF_STATE);
this.alignRightBtn.setState(this.alignRightBtn.OFF_STATE);
}else{
this.alignLeftBtn.setState(this.alignLeftBtn.ON_STATE);
this.alignCentreBtn.setState(this.alignCentreBtn.OFF_STATE);
this.alignRightBtn.setState(this.alignRightBtn.OFF_STATE);
}
}
}
}
}
if(_ab==null){
this.fontFaceSelect.setSelectedValue(this.SYSTEM.Settings.get("default_font_family"));
this.fontSizeSelect.setSelectedValue(this.SYSTEM.Settings.get("default_font_size"));
}else{
if(_ab.family){
this.fontFaceSelect.setSelectedValue(_ab.family);
}else{
this.fontFaceSelect.setSelectedValue(this.SYSTEM.Settings.get("default_font_family"));
}
if(_ab.size){
switch(_ab.size){
case this.FONT_SIZE_8:
this.fontSizeSelect.setSelectedValue(this.fontSizeSelect.VALUE_8);
break;
case this.FONT_SIZE_10:
this.fontSizeSelect.setSelectedValue(this.fontSizeSelect.VALUE_10);
break;
case this.FONT_SIZE_12:
this.fontSizeSelect.setSelectedValue(this.fontSizeSelect.VALUE_12);
break;
case this.FONT_SIZE_14:
this.fontSizeSelect.setSelectedValue(this.fontSizeSelect.VALUE_14);
break;
case this.FONT_SIZE_18:
this.fontSizeSelect.setSelectedValue(this.fontSizeSelect.VALUE_18);
break;
case this.FONT_SIZE_24:
this.fontSizeSelect.setSelectedValue(this.fontSizeSelect.VALUE_24);
break;
case this.FONT_SIZE_36:
this.fontSizeSelect.setSelectedValue(this.fontSizeSelect.VALUE_36);
break;
default:
}
}else{
this.fontSizeSelect.setSelectedValue(this.SYSTEM.Settings.get("default_font_size"));
}
}
var _ac=this.spreadsheet.getActiveCellData();
if(_ac){
this.formulaText.setContent(_ac.getFormula());
}else{
this.formulaText.setContent("");
}
this.selectionText.setContent(numericToAlpha(this.spreadsheet.selection.activeX)+this.spreadsheet.selection.activeY);
}
catch(ex){
jsExDebug("spreadsheetApp_selectionChangeCallback",ex);
}
}
function spreadsheetApp_selectionRangeExpandCallback(_ad){
try{
var _ae=numericToAlpha(this.spreadsheet.selection.activeX)+this.spreadsheet.selection.activeY;
if(_ad){
var _af=this.spreadsheet.selection.getLastRange();
var _b0=Math.abs(_af.toY-_af.fromY)+1;
var _b1=Math.abs(_af.toX-_af.fromX)+1;
this.selectionText.setContent(_b0+"R x "+_b1+"C");
}else{
this.selectionText.setContent(_ae);
}
}
catch(ex){
jsExDebug("spreadsheetApp_selectionRangeExpandCallback",ex);
}
}
function spreadsheetApp_dirtyStatusChangeCallback(_b2){
try{
if(_b2){
if(this.checkOkToSave()){
this.saveBtn.setImage(this.SYSTEM.Icon.Small.SAVE,button_t.prototype.HOVER_IMAGE);
this.saveBtn.allowTooltip("Save",this.SAVE_ON_TOOLTIP);
}
}else{
this.saveBtn.setImage(this.SYSTEM.Icon.Small.SAVE_DISABLED,button_t.prototype.HOVER_IMAGE);
this.saveBtn.allowTooltip("Save",this.SAVE_OFF_TOOLTIP);
}
}
catch(ex){
jsExDebug("spreadsheetApp_dirtyStatusChangeCallback",ex);
}
}
function spreadsheetApp_getFormulaNamesCallback(){
try{
this.fillFormulaDropLists();
}
catch(ex){
jsExDebug("spreadsheetApp_getFormulaNamesCallback",ex);
}
}
function spreadsheetApp_selectFormulaWizardCategory(_b3){
try{
var _b4=this.SYSTEM.Formula.getFormulasInCategory(null,_b3);
this.formulaNameList.clearList();
if(!_b4){
return;
}
for(var i=0;i<_b4.length;i++){
if(_b4[i]){
this.formulaNameList.addItem(_b4[i].name,_b4[i].name);
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_selectFormulaWizardCategory",ex);
}
}
function spreadsheetApp_save(_b6,_b7,_b8,_b9){
var me=this;
function doSave(){
try{
me.file.getDataAndSaveRevision(null,new me.SYSTEM.Delegate(me,me.saveCallback));
}
catch(ex){
jsExDebug("spreadsheetApp_save: doSave",ex);
}
}
try{
if(!this.file){
return;
}
if(!this.checkOkToSave(_b8,_b9)){
return;
}
if(_b7){
this.saveDelegate=_b7;
}else{
this.saveDelegate=null;
}
if(_b6){
this.SYSTEM.Tooltip.showLoading(doSave,"WebSheet","Saving "+this.file.filename+"...");
}else{
doSave();
}
}
catch(ex){
jsExDebug("spreadsheetApp_save",ex);
}
}
function spreadsheetApp_checkOkToSave(_bb,_bc){
try{
if(this.file&&this.file.hasFileId){
if(!this.isDirty()&&!_bb){
return false;
}
if(this.file.hasWriteAccess()){
if(_bc||this.collaboration.allowedToEdit()){
return true;
}else{
return false;
}
}else{
return false;
}
}
return true;
}
catch(ex){
jsExDebug("spreadsheetApp_checkOkToSave",ex);
}
}
function spreadsheetApp_simpleSave(_bd){
try{
var _be=true;
if(!this.file){
_be=false;
}
if(!this.checkOkToSave()){
_be=false;
}
if(_be){
this.file.getDataAndSaveRevision(null,_bd);
}else{
if(_bd){
_bd.invoke(false);
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_simpleSave",ex);
}
}
function spreadsheetApp_saveAs(_bf,_c0,_c1){
function closeCallback(){
try{
if(_c0){
_c0.invoke(false);
}
}
catch(ex){
jsExDebug("spreadsheetApp_saveAs: closeCallback",ex);
}
}
function actionCallback(_c2,_c3,_c4){
function fileCreationCallback(){
try{
if(_c1){
this.simpleSave(_c0);
}else{
if(_c4){
this.save(_bf,_c0,true,true);
}else{
this.save(_bf,_c0,true);
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_saveAs: actionCallback: fileCreationCallback",ex);
}
}
try{
if(this.file){
this.file.cleanUp();
this.file=null;
}
if(_c4){
this.file=new this.SYSTEM.Filesystem.File(_c4,this.saveDataDelegate,this.getTokenDelegate,new this.SYSTEM.Delegate(this,fileCreationCallback),this.isDirtyDelegate,[_c3],_c2,this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET);
this.file.setLoadRevisionDelegate(new this.SYSTEM.Delegate(this,this.loadCallback));
}else{
this.file=new this.SYSTEM.Filesystem.File(false,this.saveDataDelegate,this.getTokenDelegate,new this.SYSTEM.Delegate(this,fileCreationCallback),this.isDirtyDelegate,[_c3],_c2,this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET);
this.file.setLoadRevisionDelegate(new this.SYSTEM.Delegate(this,this.loadCallback));
}
}
catch(ex){
jsExDebug("spreadsheetApp_saveAs: actionCallback",ex);
}
}
try{
if(this.SYSTEM.Network.networkStatus==this.SYSTEM.Network.ONLINE){
var _c5=new this.SYSTEM.Dialogue.Save(this,new this.SYSTEM.Delegate(this,actionCallback),new this.SYSTEM.Delegate(this,closeCallback),this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET);
}
}
catch(ex){
jsExDebug("spreadsheetApp_saveAs",ex);
}
}
function spreadsheetApp_saveCallback(_c6){
try{
if(_c6){
this.spreadWindow.setTitle("WebSheet : "+this.file.filename);
if(this.collaboration.getFileId()!=this.file.fileid){
this.collaboration.updateFileId(this.file.fileid);
}
this.sharing.setFileId(this.file.fileid);
this.sendToolgroup.setFileId(this.file.fileid);
}else{
if(this.file.errorBadFileName){
var _c7=new this.SYSTEM.Dialogue.Error(this,"WebSheet","Invalid file name given, The following characters are not allowed in file names: ?*+/\\$()[]{}|;:,%@&'\"`~^");
this.spreadsheet.setDirty(true);
}
this.file.cleanUp();
this.file=null;
}
this.SYSTEM.Tooltip.hideLoading();
if(this.saveDelegate){
this.saveDelegate.invoke(_c6);
}
}
catch(ex){
jsExDebug("spreadsheetApp_saveCallback",ex);
}
}
function spreadsheetApp_load(_c8){
function fileCreationCallback(){
try{
if(this.file.hasFileId){
this.file.load(new this.SYSTEM.Delegate(this,this.loadCallback));
}else{
this.file.cleanUp();
this.file=null;
}
}
catch(ex){
jsExDebug("spreadsheetApp_load: fileCreationCallback",ex);
}
}
try{
if(this.file){
this.file.cleanUp();
this.file=null;
}
if(_c8){
if(this.isFilePublic){
this.file=new this.SYSTEM.Filesystem.PublicFile(_c8,this.saveDataDelegate,this.getTokenDelegate,new this.SYSTEM.Delegate(this,fileCreationCallback),this.isDirtyDelegate);
}else{
this.file=new this.SYSTEM.Filesystem.File(_c8,this.saveDataDelegate,this.getTokenDelegate,new this.SYSTEM.Delegate(this,fileCreationCallback),this.isDirtyDelegate);
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_load",ex);
}
}
function spreadsheetApp_loadCallback(xml){
try{
if(xml){
this.spreadsheet.load(xml);
this.spreadWindow.setTitle("WebSheet : "+this.file.filename);
this.collaboration.updateFileId(this.file.fileid);
this.collaboration.fileReloaded();
this.sharing.setFileId(this.file.fileid);
this.sendToolgroup.setFileId(this.file.fileid);
if(this.initialLoadFileId){
var _ca=this.file.getTokenOwner();
this.initialLoadFileId=null;
return;
}
}else{
var err=new this.SYSTEM.Dialogue.Error(this,"WebSheet","There was an error opening the file.");
if(this.initialLoadFileId){
this.initialLoadFileId=null;
}
}
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("spreadsheetApp_loadCallback",ex);
}
}
function spreadsheetApp_loadTemplate(_cc){
function responseHandler(xml,me){
try{
if(me.spreadsheet){
me.spreadsheet.load(xml);
}
me.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("spreadTable_openTemplate: responseHandler",ex);
}
}
function showLoadingCallback(){
try{
this.SYSTEM.Network.request("js/xml/templates/"+_cc,null,responseHandler,this);
}
catch(ex){
jsExDebug("spreadsheetApp_loadTemplate: showLoadingCallback",ex);
}
}
try{
if(_cc){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,showLoadingCallback),"WebSheet","Loading template...");
}
}
catch(ex){
jsExDebug("spreadsheetApp_loadTemplate",ex);
}
}
function spreadsheetApp_reload(){
try{
this.file.load(new this.SYSTEM.Delegate(this,this.loadCallback));
}
catch(ex){
jsExDebug("spreadsheetApp_reload",ex);
}
}
function spreadsheetApp_exportFile(_cf){
function continueWithExport(){
try{
this.SYSTEM.Tooltip.showLoading(null,"WebSheet","Converting "+this.file.filename+"...");
var _d0=this.file.getTokenOwner();
if(_d0&&_d0.userId==this.SYSTEM.UserDetails.id){
this.file.getDataAndSaveRevision(null,new this.SYSTEM.Delegate(this,saveFileCallback));
}else{
saveFileCallback.call(this,true);
}
}
catch(ex){
jsExDebug("spreadsheetApp_exportFile: continueWithExport",ex);
}
}
function exportCallback(_d1){
try{
if(_d1==false){
jsDebug("Export failed - no path returned.");
}else{
if(document.all){
var _d2="Click 'Download' to open the save file dialogue in a new browser window, or right click on 'Download' and select 'Save Target As' to download the file.";
}else{
var _d2="Click 'Download' to open the save file dialogue in a new browser window, or right click on 'Download' and select 'Save Link As' to download the file.";
}
var _d3=new this.SYSTEM.Dialogue.OkAlert(this,"Download File",_d2+"<br/><br/><a href='"+_d1+"' target='new'>Download</a>",null,400);
_d3.hideOkButton();
_d3=null;
this.exportFrame.close();
}
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("writerApp_exportDocument:exportCallback",ex);
}
}
function saveFileCallback(_d4){
try{
if(_d4){
switch(_cf){
case this.EXCEL_FORMAT:
this.file.exportFormat(this.file.FILTER_ODS_XLS,new this.SYSTEM.Delegate(this,exportCallback));
break;
case this.OPEN_OFFICE_FORMAT:
this.file.exportFormat(this.file.FILTER_ODS,new this.SYSTEM.Delegate(this,exportCallback));
break;
}
this.spreadsheet.setDirty(false);
}else{
jsDebug("spreadsheetApp_exportFile: Saving failed");
}
}
catch(ex){
jsExDebug("spreadsheetApp_exportFile: saveFileCallback",ex);
}
}
function saveAsCallback(_d5){
try{
if(_d5){
continueWithExport.call(this);
}else{
}
}
catch(ex){
jsExDebug("spreadsheetApp_exportFile: saveAsCallback",ex);
}
}
try{
this.spreadsheet.dataEntryModule.save();
if(this.file){
continueWithExport.call(this);
}else{
this.saveAs(true,new this.SYSTEM.Delegate(this,saveAsCallback));
}
}
catch(ex){
jsExDebug("spreadsheetApp_exportFile",ex);
}
}
function spreadsheetApp_spreadWindow__onClose(_d6){
function saveCallback(_d7){
try{
this.dirtyDialogue=null;
if(_d7){
this.collaboration.releaseTokenNoCallback();
this.cleanUp();
}
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow__onClose: saveCallback",ex);
}
}
function saveAsCallback(_d8){
try{
this.dirtyDialogue=null;
if(_d8){
this.cleanUp();
}
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow__onClose: saveAsCallback",ex);
}
}
function dirtyDialogueCallback(_d9){
try{
switch(_d9){
case true:
if(this.file){
this.simpleSave(new this.SYSTEM.Delegate(this,saveCallback));
}else{
this.saveAs(false,new this.SYSTEM.Delegate(this,saveAsCallback),true);
}
break;
case false:
this.dirtyDialogue=null;
this.collaboration.releaseTokenNoCallback();
this.cleanUp();
break;
case null:
this.dirtyDialogue=null;
break;
}
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow__onClose: dirtyDialogueCallback",ex);
}
}
try{
if(this.dirtyDialogue||this.initialLoadFileId){
return;
}
if(this.checkOkToSave()&&this.isDirty()){
var _da=(this.getFileName()?this.getFileName():"untitled");
this.dirtyDialogue=new this.SYSTEM.Dialogue.YesNoCancelAlert(null,"WebSheet","There are unsaved changes to this document ("+_da+")<br>"+"Would you like to save it?",new this.SYSTEM.Delegate(this,dirtyDialogueCallback));
}else{
this.collaboration.releaseTokenNoCallback();
this.cleanUp();
}
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow__onClose",ex);
}
}
function spreadsheetApp_spreadWindow__onResize(_db){
try{
if(!this.spreadsheet){
return;
}
var _dc;
var _dd;
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
if(dX||dY){
_dc=_db.width+dX;
_dd=_db.height+dY;
var _e0=_db.minimumWidth;
var _e1=_db.minimumHeight;
_dc=(_dc<_e0?_e0:_dc);
_dd=(_dd<_e1?_e1:_dd);
var _e2=_db.maximumWidth;
var _e3=_db.maximumHeight;
_dc=(_dc>_e2?_e2:_dc);
_dd=(_dd>_e3?_e3:_dd);
}else{
_dc=_db.width;
_dd=_db.height;
}
var _e4=_db.getInternalWidth(_dc)-this.SPREADSHEET_DIM_OFFSET;
var _e5=_db.getInternalHeight(_dd)-this.SPREADSHEET_DIM_OFFSET;
this.spreadsheet.setDimensions(_e4,_e5);
}
catch(ex){
jsExDebug("spreadsheetApp_spreadFrame__onResize",ex);
}
}
function spreadsheetApp_spreadWindow__onResizeEnd(_e6){
try{
if(!this.spreadsheet){
return;
}
this.spreadsheet.refitTable();
this.spreadsheet.setScrollbarScreenPosition(_e6);
this.spreadsheetWidth=_e6.getInternalWidth()-this.SPREADSHEET_DIM_OFFSET;
this.spreadsheetHeight=_e6.getInternalHeight()-this.SPREADSHEET_DIM_OFFSET;
}
catch(ex){
jsExDebug("spreadsheetApp_spreadFrame__onResizeEnd",ex);
}
}
function spreadsheetApp_spreadWindow__onMove(_e7){
try{
if(this.spreadsheet){
this.spreadsheet.setScrollbarScreenPosition(_e7);
}
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow__onMove",ex);
}
}
function spreadsheetApp_spreadWindow__onFocus(_e8){
try{
if(this.cellFormattingFrameOpen){
this.SYSTEM.WINDOW_MANAGER.focus(this.formattingFrame);
}
if(this.formulaWizardFrameOpen){
this.SYSTEM.WINDOW_MANAGER.focus(this.formulaWizardFrame);
}
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow__onFocus",ex);
}
}
function spreadsheetApp_spreadWindow__onScrollUp(_e9){
try{
this.spreadsheet.scrollUp(2);
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow__onScrollUp",ex);
}
}
function spreadsheetApp_spreadWindow__onScrollDown(_ea){
try{
this.spreadsheet.scrollDown(2);
}
catch(ex){
jsExDebug("spreadsheetApp_spreadWindow__onScrollDown",ex);
}
}
function spreadsheetApp_formulaWizardFrame__onClose(_eb){
try{
_eb.hide();
this.formulaCategoryList.hide();
this.formulaNameList.hide();
this.formulaWizardFrameOpen=false;
this.SYSTEM.WINDOW_MANAGER.focus(this.spreadWindow);
}
catch(ex){
jsExDebug("spreadsheetApp_formulaWizardFrame__onClose",ex);
}
}
function spreadsheetApp_formattingFrame__onClose(_ec){
try{
_ec.hide();
this.formattingCategorySelect.hide();
this.formattingSampleLabel.hide();
this.formattingDescriptionLabel.hide();
this.formattingDescriptionDiv.style.visibility="hidden";
this.formattingSampleDiv.style.visibility="hidden";
this.cellFormattingFrameOpen=false;
if(this.currentCategoryDiv){
this.formattingFrame.windowDiv.removeChild(this.currentCategoryDiv);
this.currentCategoryDiv=null;
}
this.SYSTEM.WINDOW_MANAGER.focus(this.spreadWindow);
}
catch(ex){
jsExDebug("spreadsheetApp_formattingFrame__onClose",ex);
}
}
function spreadsheetApp_exportFrame__onClose(_ed){
try{
global_restartTimedServiceRequests();
_ed.cleanUp();
this.exportFrame=null;
}
catch(ex){
jsExDebug("spreadsheetApp_exportFrame__onClose",ex);
}
}
function spreadsheetApp_binding_formulaCategoryList_itemSelect(_ee){
try{
this.selectFormulaWizardCategory(_ee.getSelectedValue());
}
catch(ex){
jsExDebug("spreadsheetApp_binding_formulaCategoryList_itemSelect",ex);
}
}
function spreadsheetApp_binding_formulaNameList_itemSelect(_ef){
function showFormulaDetails(_f0){
try{
var _f1=(_f0.description?_f0.description.split("@!"):null);
if(_f1&&_f1.length){
this.formulaDescriptionContent.innerHTML=_f1[0];
}else{
return;
}
for(var i=1;i<_f1.length;i++){
if(_f1[i]){
this.formulaDescriptionContent.innerHTML+="<br>"+_f1[i];
}
}
this.formulaSynopsisContent.innerHTML=_f0.synopsis;
_f1=(_f0.example?_f0.example.split("@!"):null);
if(_f1&&_f1.length){
this.formulaExampleContent.innerHTML=_f1[0];
}else{
return;
}
for(var i=1;i<_f1.length;i++){
if(_f1[i]){
this.formulaExampleContent.innerHTML+="<br>"+_f1[i];
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_formulaNameList_itemSelect: showFormulaDetails",ex);
}
}
try{
this.selectedFormulaName=_ef.getSelectedValue();
this.SYSTEM.Formula.getFormulaDetails(this.selectedFormulaName,new this.SYSTEM.Delegate(this,showFormulaDetails));
}
catch(ex){
jsExDebug("spreadsheetApp_formulaNameList",ex);
}
}
function spreadsheetApp_binding_formulaInsertBtn_click(_f3){
try{
if(this.selectedFormulaName){
this.spreadsheet.autoFormula(this.selectedFormulaName);
this.formulaWizardFrame.close();
}
}
catch(ex){
jsExDebug("spreadsheetApp_formulaInsertBtn",ex);
}
}
function spreadsheetApp_binding_formattingCategorySelect_itemSelect(_f4){
try{
var _f5=_f4.getSelectedValue();
switch(_f5){
case this.GENERAL_FORMAT:
this.showGeneralFormatOptions();
break;
case this.NUMBER_FORMAT:
this.showNumberFormatOptions();
break;
case this.CURRENCY_FORMAT:
this.showCurrencyFormatOptions();
break;
case this.ACCOUNTING_FORMAT:
this.showAccountingFormatOptions();
break;
case this.DATE_FORMAT:
this.showDateFormatOptions();
break;
case this.TIME_FORMAT:
this.showTimeFormatOptions();
break;
case this.PERCENTAGE_FORMAT:
this.showPercentageFormatOptions();
break;
}
this.currentFormattingCategory=_f5;
this.setFormatSample(_f5);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_formattingCategorySelect_itemSelect",ex);
}
}
function spreadsheetApp_binding_numberDecimalSelect_valueChange(_f6){
try{
this.setFormatSample(this.NUMBER_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_numberDecimalSelect_valueChange",ex);
}
}
function spreadsheetApp_binding_numberCommaCheckbox_valueChange(_f7){
try{
this.setFormatSample(this.NUMBER_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_numberCommaCheckbox_valueChange",ex);
}
}
function spreadsheetApp_binding_numberNegativeSelect_itemSelect(_f8){
try{
this.setFormatSample(this.NUMBER_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_numberNegativeSelect_itemSelect",ex);
}
}
function spreadsheetApp_binding_currencyDecimalSelect_valueChange(_f9){
try{
this.setFormatSample(this.CURRENCY_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_currencyDecimalSelect_valueChange",ex);
}
}
function spreadsheetApp_binding_currencySymbolDropText_itemSelect(_fa){
try{
this.setFormatSample(this.CURRENCY_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_currencySymbolDropText_itemSelect",ex);
}
}
function spreadsheetApp_binding_currencyNegativeSelect_itemSelect(_fb){
try{
this.setFormatSample(this.CURRENCY_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_currencyNegativeSelect_itemSelect",ex);
}
}
function spreadsheetApp_binding_accountingDecimalSelect_valueChange(_fc){
try{
this.setFormatSample(this.ACCOUNTING_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_accountingDecimalSelect_valueChange",ex);
}
}
function spreadsheetApp_binding_accountingBracketCheckbox_valueChange(_fd){
try{
this.setFormatSample(this.ACCOUNTING_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_accountingBracketCheckbox_valueChange",ex);
}
}
function spreadsheetApp_binding_accountingSymbolSelect_itemSelect(_fe){
try{
this.setFormatSample(this.ACCOUNTING_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_accountingSymbolSelect_itemSelect",ex);
}
}
function spreadsheetApp_binding_customDateText_focus(_ff){
try{
this.formattingSampleDiv.innerHTML="Custom";
}
catch(ex){
jsExDebug("spreadsheetApp_binding_customDateText_focus",ex);
}
}
function spreadsheetApp_binding_dateTypeSelect_itemSelect(_100){
try{
this.setFormatSample(this.DATE_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_dateTypeSelect_itemSelect",ex);
}
}
function spreadsheetApp_binding_customTimeText_focus(_101){
try{
this.formattingSampleDiv.innerHTML="Custom";
}
catch(ex){
jsExDebug("spreadsheetApp_binding_customTimeText_focus",ex);
}
}
function spreadsheetApp_binding_timeTypeSelect_itemSelect(_102){
try{
this.setFormatSample(this.TIME_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_timeTypeSelect_itemSelect",ex);
}
}
function spreadsheetApp_binding_percentageDecimalSelect_valueChange(_103){
try{
this.setFormatSample(this.PERCENTAGE_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_percentageDecimalSelect_valueChange",ex);
}
}
function spreadsheetApp_binding_formattingApplyBtn_click(_104){
try{
switch(this.currentFormattingCategory){
case this.NUMBER_FORMAT:
var _105=null;
switch(this.numberNegativeSelect.getSelectedValue()){
case this.NUMBER_NEG_1:
_105=null;
break;
case this.NUMBER_NEG_2:
_105=this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL;
break;
case this.NUMBER_NEG_3:
_105=null;
break;
case this.NUMBER_NEG_4:
_105=this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT;
break;
}
var _106=parseInt(this.numberDecimalSelect.getCurrentText());
var _107=this.numberCommaCheckbox.isChecked();
this.spreadsheet.setType(this.spreadsheet.NUMBER_TYPE,_105,_106,_107);
break;
case this.CURRENCY_FORMAT:
var _105=null;
switch(this.currencyNegativeSelect.getSelectedValue()){
case this.CURRENCY_NEG_1:
_105=null;
break;
case this.CURRENCY_NEG_2:
_105=this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT;
break;
case this.CURRENCY_NEG_3:
_105=this.spreadsheet.NEGATIVE_STYLE_BRACE|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL;
break;
case this.CURRENCY_NEG_4:
_105=this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT;
break;
}
var _108=this.currencySymbolDropText.selectedValue;
var _106=parseInt(this.currencyDecimalSelect.getCurrentText());
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,_108,_105,_106);
break;
case this.ACCOUNTING_FORMAT:
if(this.accountingBracketCheckbox.isChecked()){
var _105=this.spreadsheet.NEGATIVE_STYLE_BRACE|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL;
}
var _108=this.accountingSymbolSelect.getSelectedValue();
var _106=parseInt(this.accountingDecimalSelect.getCurrentText());
this.spreadsheet.setType(this.spreadsheet.ACCOUNTING_TYPE,_108,_105,_106);
break;
case this.DATE_FORMAT:
var _109=this.customDateText.getContent();
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,_109,null);
break;
case this.TIME_FORMAT:
var _109=this.customTimeText.getContent();
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,_109);
break;
case this.PERCENTAGE_FORMAT:
var _106=this.percentageDecimalSelect.currentValue;
this.spreadsheet.setType(this.spreadsheet.PERCENTAGE_TYPE,_106);
break;
}
this.formattingFrame.close();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_formattingApplyBtn_click",ex);
}
}
function spreadsheetApp_binding_exportOpenOfficeBtn_click(){
try{
this.exportFile(this.OPEN_OFFICE_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_exportOpenOfficeBtn_click",ex);
}
}
function spreadsheetApp_binding_exportExcelBtn_click(){
try{
this.exportFile(this.EXCEL_FORMAT);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_exportExcelBtn_click",ex);
}
}
function spreadsheetApp_binding_exportCancelBtn_click(){
try{
this.exportFrame.close();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_exportCancelBtn_click",ex);
}
}
function spreadsheetApp_binding_save_click(){
try{
if(this.file){
this.save(true);
}else{
if(this.SYSTEM.Network.isOnline()){
this.saveAs(true);
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_save_click",ex);
}
}
function spreadsheetApp_binding_saveAs_click(){
try{
if(this.SYSTEM.Network.isOnline()){
this.saveAs(true);
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_saveAs_click",ex);
}
}
function spreadsheetApp_binding_open_click(){
try{
var _10a=new this.SYSTEM.Dialogue.Open(this);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_open_click",ex);
}
}
function spreadsheetApp_binding_print_click(){
try{
this.spreadsheet.print();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_print_click",ex);
}
}
function spreadsheetApp_binding_export_click(){
try{
if(this.exportFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.exportFrame);
return;
}
global_stopTimedServiceRequests();
var _10b=new this.SYSTEM.Frame.Window("exportFrame","Export document",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_10b.setPosition(this.spreadWindow.positionX+this.spreadWindow.leftEdgeWidth,this.spreadWindow.positionY+this.spreadWindow.topEdgeHeight);
var _10c=new this.SYSTEM.Widget.Label("exportTitleLabel");
_10c.setDimensions(240,50);
_10c.setText("Select the format you wish to export the document to.");
var _10d=new this.SYSTEM.Widget.Button("exportExcelBtn",this.EXPORT_EXCEL_IMG,null,28,28);
var _10e=new this.SYSTEM.Widget.Label("exportExcelLabel");
_10e.setText("Excel format");
var _10f=new this.SYSTEM.Widget.Button("exportOpenOfficeBtn",this.EXPORT_O_OFFICE_IMG,null,28,28);
var _110=new this.SYSTEM.Widget.Label("exportOpenOfficeLabel");
_110.setText("Open office format");
var _111=new this.SYSTEM.Widget.TextButton("exportCancelBtn",60,"Cancel");
var left=_10b.leftEdgeWidth;
var top=_10b.topEdgeHeight;
_10b.addWidget(_10c,left+this.EXPORT_TITLE_LEFT,top);
_10b.addWidget(_10d,left+this.EXPORT_EXCEL_LEFT,top+this.EXPORT_EXCEL_TOP);
_10b.addWidget(_10e,left+this.EXPORT_EXCEL_LEFT+40,top+this.EXPORT_EXCEL_TOP);
_10b.addWidget(_10f,left+this.EXPORT_O_OFFICE_LEFT,top+this.EXPORT_O_OFFICE_TOP);
_10b.addWidget(_110,left+this.EXPORT_O_OFFICE_LEFT+40,top+this.EXPORT_O_OFFICE_TOP);
_10b.addWidget(_111,_10b.rightEdgeWidth,_10b.bottomEdgeHeight,true,true);
_10b.setFixedDimensions(left+this.EXPORT_FRAME_WIDTH+_10b.rightEdgeWidth,top+this.EXPORT_FRAME_HEIGHT+_10b.bottomEdgeHeight);
_10b.show();
this.exportFrame=_10b;
}
catch(ex){
jsExDebug("spreadsheetApp_binding_export_click",ex);
}
}
function spreadsheetApp_binding_quickHelpBtn_click(_114){
try{
var _115=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"spreadsheet");
}
catch(ex){
jsExDebug("spreadsheetApp_binding_quickHelpBtn_click",ex);
}
}
function spreadsheetApp_binding_refreshBtn_click(){
try{
this.spreadsheet.reCalculateTable();
this.spreadsheet.redraw();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_refreshBtn_click",ex);
}
}
function spreadsheetApp_binding_pasteBtn_click(_116){
try{
this.spreadsheet.paste();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_pasteBtn_click",ex);
}
}
function spreadsheetApp_binding_copyBtn_click(_117){
try{
this.spreadsheet.copy();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_copyBtn_click",ex);
}
}
function spreadsheetApp_binding_cutBtn_click(_118){
try{
this.spreadsheet.cut();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_cutBtn_click",ex);
}
}
function spreadsheetApp_binding_fontFaceSelect_itemSelect(_119){
try{
this.spreadsheet.setFont(_119.selectedValue,null);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_fontFaceSelect_itemSelect",ex);
}
}
function spreadsheetApp_binding_fontSizeSelect_itemSelect(_11a){
try{
switch(_11a.selectedValue){
case 1:
this.spreadsheet.setFont(null,this.FONT_SIZE_8);
break;
case 2:
this.spreadsheet.setFont(null,this.FONT_SIZE_10);
break;
case 3:
this.spreadsheet.setFont(null,this.FONT_SIZE_12);
break;
case 4:
this.spreadsheet.setFont(null,this.FONT_SIZE_14);
break;
case 5:
this.spreadsheet.setFont(null,this.FONT_SIZE_18);
break;
case 6:
this.spreadsheet.setFont(null,this.FONT_SIZE_24);
break;
case 7:
this.spreadsheet.setFont(null,this.FONT_SIZE_36);
break;
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_fontSizeSelect_itemSelect",ex);
}
}
function spreadsheetApp_binding_boldBtn_click(_11b){
try{
_11b.toggleState();
this.spreadsheet.toggleStyle(this.spreadsheet.BOLD,1);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_boldBtn_click",ex);
}
}
function spreadsheetApp_binding_italicsBtn_click(_11c){
try{
_11c.toggleState();
this.spreadsheet.toggleStyle(this.spreadsheet.ITALIC,1);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_italicsBtn_click",ex);
}
}
function spreadsheetApp_binding_underlineBtn_click(_11d){
try{
_11d.toggleState();
this.spreadsheet.toggleStyle(this.spreadsheet.UNDERLINE,1);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_underlineBtn_click",ex);
}
}
function spreadsheetApp_binding_strikethroughBtn_click(_11e){
try{
_11e.toggleState();
this.spreadsheet.toggleStyle(this.spreadsheet.STRIKEOUT,1);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_strikethroughBtn_click",ex);
}
}
function spreadsheetApp_binding_clearFormatBtn_click(_11f){
try{
this.spreadsheet.clearStyle();
this.spreadsheet.setType(this.spreadsheet.GENERAL_TYPE);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_clearFormatBtn_click",ex);
}
}
function spreadsheetApp_binding_fillColourDropList_itemWidget(_120){
try{
this.lastBgColour=this.fillColourChooser.selectedColour;
this.changeBgColour(this.lastBgColour);
this.fillColourBtn.setBackgroundColor(this.lastBgColour);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_fillColourDropList_itemWidget",ex);
}
}
function spreadsheetApp_binding_fillColourBtn_click(_121){
try{
if(this.lastBgColour){
this.changeBgColour(this.lastBgColour);
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_fillColourBtn_click",ex);
}
}
function spreadsheetApp_binding_highlightColourDropList_itemWidget(_122){
try{
this.lastTextColour=this.highlightColourChooser.selectedColour;
this.changeTextColour(this.lastTextColour);
this.highlightColourBtn.setBackgroundColor(this.lastTextColour);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_highlightColourDropList_itemWidget",ex);
}
}
function spreadsheetApp_binding_highlightColourBtn_click(_123){
try{
if(this.lastTextColour){
this.changeTextColour(this.lastTextColour);
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_highlightColourBtn_click",ex);
}
}
function spreadsheetApp_binding_alignLeftBtn_click(_124){
try{
_124.setState(_124.ON_STATE);
this.alignCentreBtn.setState(_124.OFF_STATE);
this.alignRightBtn.setState(_124.OFF_STATE);
this.spreadsheet.setStyle(this.spreadsheet.ALIGN_LEFT,1);
this.spreadsheet.disableAutoAlign();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_alignLeftBtn_click",ex);
}
}
function spreadsheetApp_binding_alignCentreBtn_click(_125){
try{
_125.setState(_125.ON_STATE);
this.alignLeftBtn.setState(_125.OFF_STATE);
this.alignRightBtn.setState(_125.OFF_STATE);
this.spreadsheet.setStyle(this.spreadsheet.ALIGN_CENTRE,1);
this.spreadsheet.disableAutoAlign();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_alignCentreBtn_click",ex);
}
}
function spreadsheetApp_binding_alignRightBtn_click(_126){
try{
_126.setState(_126.ON_STATE);
this.alignLeftBtn.setState(_126.OFF_STATE);
this.alignCentreBtn.setState(_126.OFF_STATE);
this.spreadsheet.setStyle(this.spreadsheet.ALIGN_RIGHT,1);
this.spreadsheet.disableAutoAlign();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_alignRightBtn_click",ex);
}
}
function spreadsheetApp_binding_percentStyleBtn_click(_127){
try{
this.spreadsheet.setType(this.spreadsheet.PERCENTAGE_TYPE);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_percentStyleBtn_click",ex);
}
}
function spreadsheetApp_binding_commaStyleBtn_click(_128){
try{
this.spreadsheet.setType(this.spreadsheet.NUMBER_TYPE,null,2,true);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_commaStyleBtn_click",ex);
}
}
function spreadsheetApp_binding_incDecimalBtn_click(_129){
try{
this.spreadsheet.increaseDecimalPlace();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_incDecimalBtn_click",ex);
}
}
function spreadsheetApp_binding_decDecimalBtn_click(_12a){
try{
this.spreadsheet.decreaseDecimalPlace();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_decDecimalBtn_click",ex);
}
}
function spreadsheetApp_binding_currencyBtn_click(_12b){
try{
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_currencyBtn_click",ex);
}
}
function spreadsheetApp_binding_generalFormatBtn_click(_12c){
try{
this.spreadsheet.setType(this.spreadsheet.GENERAL_TYPE);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_generalFormatBtn_click",ex);
}
}
function spreadsheetApp_binding_numberFormatDropList_click(_12d){
try{
this.spreadsheet.setType(this.spreadsheet.NUMBER_TYPE,null,2,false);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_numberFormatDropList_click",ex);
}
}
function spreadsheetApp_binding_currencyFormatDropList_click(_12e){
try{
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,"$",this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT,2);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_currencyFormatDropList_click",ex);
}
}
function spreadsheetApp_binding_accountingFormatDropList_click(_12f){
try{
this.spreadsheet.setType(this.spreadsheet.ACCOUNTING_TYPE,"$",null,2);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_accountingFormatDropList_click",ex);
}
}
function spreadsheetApp_binding_dateFormatDropList_click(_130){
try{
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"m/dd",true);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_dateFormatDropList_click",ex);
}
}
function spreadsheetApp_binding_timeFormatDropList_click(_131){
try{
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"h:mm AM/PM");
}
catch(ex){
jsExDebug("spreadsheetApp_binding_timeFormatDropList_click",ex);
}
}
function spreadsheetApp_binding_percentageFormatDropList_click(_132){
try{
this.spreadsheet.setType(this.spreadsheet.PERCENTAGE_TYPE,0);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_percentageFormatDropList_click",ex);
}
}
function spreadsheetApp_binding_numberFormatDropList_itemSelect(_133){
try{
var _134=_133.getSelectedValue();
switch(_134){
case this.NUMBER_FORMAT_1:
this.spreadsheet.setType(this.spreadsheet.NUMBER_TYPE,null,2,false);
break;
case this.NUMBER_FORMAT_2:
this.spreadsheet.setType(this.spreadsheet.NUMBER_TYPE,null,2,true);
break;
case this.NUMBER_FORMAT_3:
this.spreadsheet.setType(this.spreadsheet.NUMBER_TYPE,this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL,2,true);
break;
case this.NUMBER_FORMAT_4:
this.spreadsheet.setType(this.spreadsheet.NUMBER_TYPE,this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT,2,true);
break;
case this.NUMBER_FORMAT_MORE:
this.showCellFormattingFrame(this.NUMBER_FORMAT);
break;
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_numberFormatDropList_itemSelect",ex);
}
}
function spreadsheetApp_binding_currencyFormatDropList_itemSelect(_135){
try{
var _136=_135.getSelectedValue();
switch(_136){
case this.CURRENCY_FORMAT_1:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.DOLLAR,null,2);
break;
case this.CURRENCY_FORMAT_2:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.DOLLAR,this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL,2);
break;
case this.CURRENCY_FORMAT_3:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.DOLLAR,this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT,2);
break;
case this.CURRENCY_FORMAT_4:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.EURO,null,2);
break;
case this.CURRENCY_FORMAT_5:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.EURO,this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL,2);
break;
case this.CURRENCY_FORMAT_6:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.EURO,this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT,2);
break;
case this.CURRENCY_FORMAT_7:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.POUND,null,2);
break;
case this.CURRENCY_FORMAT_8:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.POUND,this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL,2);
break;
case this.CURRENCY_FORMAT_9:
this.spreadsheet.setType(this.spreadsheet.CURRENCY_TYPE,this.POUND,this.spreadsheet.NEGATIVE_STYLE_HIGHLIGHT,2);
break;
case this.CURRENCY_FORMAT_MORE:
this.showCellFormattingFrame(this.CURRENCY_FORMAT);
break;
default:
jsDebug("spreadsheetApp_binding_currencyFormatDropList_itemSelect flow error");
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_currencyFormatDropList_itemSelect",ex);
}
}
function spreadsheetApp_binding_accountingFormatDropList_itemSelect(_137){
try{
var _138=_137.getSelectedValue();
switch(_138){
case this.ACC_FORMAT_1:
this.spreadsheet.setType(this.spreadsheet.ACCOUNTING_TYPE,this.DOLLAR,null,2);
break;
case this.ACC_FORMAT_2:
this.spreadsheet.setType(this.spreadsheet.ACCOUNTING_TYPE,this.DOLLAR,this.spreadsheet.NEGATIVE_STYLE_BRACE|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL,2);
break;
case this.ACC_FORMAT_3:
this.spreadsheet.setType(this.spreadsheet.ACCOUNTING_TYPE,this.DOLLAR,null,0);
break;
case this.ACC_FORMAT_4:
this.spreadsheet.setType(this.spreadsheet.ACCOUNTING_TYPE,this.DOLLAR,this.spreadsheet.NEGATIVE_STYLE_BRACE|this.spreadsheet.NEGATIVE_STYLE_NOSYMBOL,0);
break;
case this.ACC_FORMAT_MORE:
this.showCellFormattingFrame(this.ACCOUNTING_FORMAT);
break;
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_accountingFormatDropList_itemSelect",ex);
}
}
function spreadsheetApp_binding_dateFormatDropList_itemSelect(_139){
try{
var _13a=_139.getSelectedValue();
switch(_13a){
case this.DATE_FORMAT_1:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"m/dd",true);
break;
case this.DATE_FORMAT_2:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"mm/dd/yy",true);
break;
case this.DATE_FORMAT_3:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"dd-mmm");
break;
case this.DATE_FORMAT_4:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"dd-mmm-yy");
break;
case this.DATE_FORMAT_5:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"mmm-yy");
break;
case this.DATE_FORMAT_6:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"mmmm-yy");
break;
case this.DATE_FORMAT_7:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"mmmm dd, yyyy");
break;
case this.DATE_FORMAT_8:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"dd-mmm-yyyy");
break;
case this.DATE_FORMAT_9:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"yyyy-mm-dd");
break;
case this.DATE_FORMAT_10:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"dddd, dd mmmm yyyy");
break;
case this.DATE_FORMAT_MORE:
this.showCellFormattingFrame(this.DATE_FORMAT);
break;
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_dateFormatDropList_itemSelect",ex);
}
}
function spreadsheetApp_binding_timeFormatDropList_itemSelect(_13b){
try{
var _13c=_13b.getSelectedValue();
switch(_13c){
case this.TIME_FORMAT_1:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"h:mm AM/PM");
break;
case this.TIME_FORMAT_2:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"hh:mm");
break;
case this.TIME_FORMAT_3:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"mm/dd/yy h:mm AM/PM");
break;
case this.TIME_FORMAT_4:
this.spreadsheet.setType(this.spreadsheet.TIME_TYPE,"mm/dd/yy hh:mm");
break;
case this.TIME_FORMAT_MORE:
this.showCellFormattingFrame(this.TIME_FORMAT);
break;
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_timeFormatDropList_itemSelect",ex);
}
}
function spreadsheetApp_binding_percentageFormatDropList_itemSelect(_13d){
try{
var _13e=_13d.getSelectedValue();
switch(_13e){
case this.PERCENT_FORMAT_1:
this.spreadsheet.setType(this.spreadsheet.PERCENTAGE_TYPE,0);
break;
case this.PERCENT_FORMAT_2:
this.spreadsheet.setType(this.spreadsheet.PERCENTAGE_TYPE,2);
break;
case this.PERCENT_FORMAT_MORE:
this.showCellFormattingFrame(this.PERCENTAGE_FORMAT);
break;
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_percentageFormatDropList_itemSelect",ex);
}
}
function spreadsheetApp_binding_symbolDropList_itemWidget(_13f){
try{
this.spreadsheet.appendCharacter(_13f.eventWidget.selectedValue);
}
catch(ex){
jsExDebug("spreadsheetApp_binding_symbolDropList_itemWidget",ex);
}
}
function spreadsheetApp_binding_insertDropList_itemSelect(_140){
try{
var type=_140.getSelectedValue();
switch(type){
case this.INSERT_ROWS:
this.spreadsheet.insertRows();
break;
case this.INSERT_COLUMNS:
this.spreadsheet.insertColumns();
break;
case this.DELETE_ROWS:
this.spreadsheet.deleteRows();
break;
case this.DELETE_COLUMNS:
this.spreadsheet.deleteColumns();
break;
}
this.spreadsheet.refreshTable();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_insertDropList_itemSelect",ex);
}
}
function spreadsheetApp_binding_formulaWizardBtn_click(_142){
try{
this.showFormulaWizardFrame();
}
catch(ex){
jsExDebug("spreadsheetApp_binding_formulaWizardBtn_click",ex);
}
}
function spreadsheetApp_binding_formulaDropList_itemSelect(_143){
try{
var _144=_143.getSelectedValue();
if(_144==this.FUNCTION_WIZARD_ITEM_VALUE){
this.showFormulaWizardFrame(_143.getValue());
}else{
this.spreadsheet.autoFormula(_144);
}
}
catch(ex){
jsExDebug("spreadsheetApp_binding_formulaDropList_itemSelect",ex);
}
}
function spreadsheetApp_collaboration_tokenRelease(_145){
function dialogueCallback(_146){
try{
if(_146){
this.save(true,_145,true);
}else{
this.file.clearTokenOwner();
if(_145){
_145.invoke();
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_collaboration_tokenRelease: dialogueCallback",ex);
}
}
try{
if(this.checkOkToSave()){
var _147=new this.SYSTEM.Dialogue.YesNoAlert(this,"WebSheet","You have released edit control of the document, do you wish to save your changes?",new this.SYSTEM.Delegate(this,dialogueCallback));
}else{
if(_145){
_145.invoke();
}
}
}
catch(ex){
jsExDebug("spreadsheetApp_collaboration_tokenRelease",ex);
}
}
function spreadsheetApp_binding_templateSelect_itemSelect(_148){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET,null,_148.getSelectedValue());
}
catch(ex){
jsExDebug("spreadsheetApp_binding_templateSelect_itemSelect",ex);
}
}

try{
styleList_t.prototype=new peepelObject_t();
styleList_t.prototype.constructor=styleList_t;
styleList_t.prototype.cleanUp=styleList_cleanUp;
styleList_t.prototype.styleList_super=peepelObject_t.prototype.constructor;
styleList_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
styleList_t.prototype.addCellStyle=styleList_addCellStyle;
styleList_t.prototype.addDataStyle=styleList_addDataStyle;
styleList_t.prototype.addRowStyle=styleList_addRowStyle;
styleList_t.prototype.addColumnStyle=styleList_addColumnStyle;
styleList_t.prototype.toXml=styleList_toXml;
styleList_t.prototype.fromXml=styleList_fromXml;
styleList_t.prototype.getStyle=styleList_getStyle;
styleList_t.prototype.getName=styleList_getName;
styleList_t.prototype.addStyle=styleList_addStyle;
styleList_t.prototype.createStyle=styleList_createStyle;
styleList_t.prototype.createDataStyle=styleList_createDataStyle;
}
catch(ex){
jsExDebug("styleList_t.prototype",ex);
}
function styleList_t(){
try{
this.styleList_super();
this.styleList=[];
this.styleListHash={};
this.styleNamesList={};
this.styleCounter=1;
this.dataStyleCounter=1;
this.rowStyleCounter=1;
this.columnStyleCounter=1;
}
catch(ex){
jsExDebug("styleList_t",ex);
}
}
function styleList_cleanUp(me){
try{
if(!me){
me=this;
}
for(var i=0;i<me.styleList.length;i++){
if(me.styleList[i]){
me.styleList[i].cleanUp();
me.styleList[i]=null;
delete me.styleList[i];
}
}
me.styleList=null;
for(var i in me.styleListHash){
me.styleListHash[i]=null;
delete me.styleListHash[i];
}
me.styleListHash=null;
for(var i in me.styleNamesList){
me.styleNamesList[i]=null;
delete me.styleNamesList[i];
}
me.styleNamesList=null;
me.styleCounter=null;
me.dataStyleCounter=null;
me.rowStyleCounter=null;
me.columnStyleCounter=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("styleList_cleanUp",ex);
}
}
function styleList_addStyle(_3,_4){
try{
var _5=_3.toString();
if(this.styleListHash[_5]==null){
this.styleListHash[_5]=this.styleList.push(_3)-1;
this.styleCounter++;
}else{
var _6=this.styleListHash[_5];
var _4=this.styleList[_6].getName();
}
_3.setName(_4);
}
catch(ex){
jsExDebug("styleList_addStyle",ex);
}
}
function styleList_addCellStyle(_7){
try{
this.addStyle(_7,"ce"+this.styleCounter);
this.styleCounter++;
}
catch(ex){
jsExDebug("styleList_addCellStyle",ex);
}
}
function styleList_addDataStyle(_8){
try{
this.addStyle(_8,"N"+this.dataStyleCounter);
this.dataStyleCounter++;
}
catch(ex){
jsExDebug("styleList_addDataStyle",ex);
}
}
function styleList_addRowStyle(_9){
try{
this.addStyle(_9,"row"+this.rowStyleCounter);
this.rowStyleCounter++;
}
catch(ex){
jsExDebug("styleList_addRowStyle",ex);
}
}
function styleList_addColumnStyle(_a){
try{
this.addStyle(_a,"col"+this.columnStyleCounter);
this.columnStyleCounter++;
}
catch(ex){
jsExDebug("styleList_addColumnStyle",ex);
}
}
function styleList_toXml(_b,_c){
try{
var _d=(_b)?_b:false;
var _e=(_c)?_c:false;
var _f=new xmlWriter_t();
var _10="";
if(!_d){
_10+=_f.createElement("office:automatic-styles");
}
for(var i=0;i<this.styleList.length;i++){
if(this.styleList[i]){
_10+=this.styleList[i].toXml();
}
}
if(!_e){
_10+=_f.closeElement("office:automatic-styles");
}
return _10;
}
catch(ex){
jsExDebug("styleList_toXml",ex);
}
}
function styleList_fromXml(_12){
try{
for(var i=0;i<_12.childNodes.length;i++){
if(_12.childNodes[i].nodeName=="office:automatic-styles"){
var _14=_12.childNodes[i];
for(var j=0;j<_14.childNodes.length;j++){
var _16=_14.childNodes[j];
if(_16.nodeName){
switch(_16.nodeName){
case "style:style":
this.createStyle(_16);
break;
default:
if(_16.nodeName&&(_16.nodeName!="#text")){
this.createDataStyle(_16);
}
}
}
}
break;
}
}
}
catch(ex){
jsExDebug("styleList_fromXml",ex);
}
}
function styleList_getName(_17){
try{
var _18=_17.toString();
var _19=this.styleListHash[_18];
var _1a=this.styleList[_19].getName();
return _1a;
}
catch(ex){
jsExDebug("styleList_getName",ex);
}
}
function styleList_getStyle(_1b){
try{
return this.styleNamesList[_1b];
}
catch(ex){
jsExDebug("styleList_getStyle",ex);
}
}
function styleList_createStyle(_1c){
try{
switch(_1c.getAttribute("style:family")){
case "table-cell":
var _1d=new cellStyles_t();
_1d.fromXml(_1c);
if(_1d.dataStyleName==null&&_1d.parentStyleName!=null){
var _1e=this.styleNamesList[_1d.parentStyleName];
if(_1e){
_1d.setDataStyleName(_1e.getDataStyleName());
}
}
this.styleNamesList[_1d.getName()]=_1d;
break;
case "table-row":
var _1d=new rowStyles_t();
_1d.fromXml(_1c);
this.styleNamesList[_1d.getName()]=_1d;
break;
case "table-column":
var _1d=new columnStyles_t();
_1d.fromXml(_1c);
this.styleNamesList[_1d.getName()]=_1d;
break;
}
}
catch(ex){
jsExDebug("styleList_createStyle",ex);
}
}
function styleList_createDataStyle(_1f){
try{
var _20=new cellDataStyles_t();
_20.fromXml(_1f);
if(_20.referenceName){
var _21=this.styleNamesList[_20.referenceName];
if(_21){
_20.copyValuesFromStyle(_21);
}
}
this.styleNamesList[_20.getName()]=_20;
}
catch(ex){
jsExDebug("styleList_createDataStyle",ex);
}
}

try{
cellDataStyles_t.prototype=new peepelObject_t();
cellDataStyles_t.prototype.constructor=cellDataStyles_t;
cellDataStyles_t.prototype.cleanUp=cellDataStyles_cleanUp;
cellDataStyles_t.prototype.cellDataStyles_super=peepelObject_t.prototype.constructor;
cellDataStyles_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
cellDataStyles_t.prototype.toString=cellDataStyles_toString;
cellDataStyles_t.prototype.fromCell=cellDataStyles_fromCell;
cellDataStyles_t.prototype.fromXml=cellDataStyles_fromXml;
cellDataStyles_t.prototype.toXml=cellDataStyles_toXml;
cellDataStyles_t.prototype.setName=cellDataStyles_setName;
cellDataStyles_t.prototype.getName=cellDataStyles_getName;
cellDataStyles_t.prototype.copyValuesFromStyle=cellDataStyles_copyValuesFromStyle;
cellDataStyles_t.prototype.parseTimeFormatString=cellDataStyles_parseTimeFormatString;
cellDataStyles_t.prototype.getTimeFormatString=cellDataStyles_getTimeFormatString;
cellDataStyles_t.prototype.getDateFormatAttributes=cellDataStyles_getDateFormatAttributes;
cellDataStyles_t.prototype.getDateFormatString=cellDataStyles_getDateFormatString;
cellDataStyles_t.prototype.getValidSymbol=cellDataStyles_getValidSymbol;
cellDataStyles_t.prototype.NEGATIVE_STYLE_HIGHLIGHT=1;
cellDataStyles_t.prototype.NEGATIVE_STYLE_BRACE=2;
cellDataStyles_t.prototype.NEGATIVE_STYLE_NOSYMBOL=4;
cellDataStyles_t.prototype.ATTR_DECIMAL_PLACES="number:decimal-places";
cellDataStyles_t.prototype.ATTR_GROUPING="number:grouping";
cellDataStyles_t.prototype.ATTR_NUMBER_STYLE="number:style";
cellDataStyles_t.prototype.ATTR_NUMBER_TEXTUAL="number:textual";
cellDataStyles_t.prototype.ELEMENT_NUMBER="number:number";
cellDataStyles_t.prototype.ELEMENT_TEXT="number:text";
cellDataStyles_t.prototype.ELEMENT_HOURS="number:hours";
cellDataStyles_t.prototype.ELEMENT_MINUTES="number:minutes";
cellDataStyles_t.prototype.ELEMENT_SECONDS="number:seconds";
cellDataStyles_t.prototype.ELEMENT_AMPM="number:am-pm";
cellDataStyles_t.prototype.ELEMENT_DAY="number:day";
cellDataStyles_t.prototype.ELEMENT_DAY_OF_WEEK="number:day-of-week";
cellDataStyles_t.prototype.ELEMENT_MONTH="number:month";
cellDataStyles_t.prototype.ELEMENT_YEAR="number:year";
cellDataStyles_t.prototype.STYLE_NUMBER="number:number-style";
cellDataStyles_t.prototype.STYLE_CURRENCY="number:currency-style";
cellDataStyles_t.prototype.STYLE_PERCENTAGE="number:percentage-style";
cellDataStyles_t.prototype.STYLE_TEXT="number:text-style";
cellDataStyles_t.prototype.STYLE_TIME="number:time-style";
cellDataStyles_t.prototype.STYLE_DATE="number:date-style";
cellDataStyles_t.prototype.STYLE_BOOLEAN="number:boolean-style";
}
catch(ex){
jsExDebug("cellDataStyles_t",ex);
}
function cellDataStyles_t(_1){
try{
this.cellDataStyles_super();
this.name=null;
this.styleType=null;
this.treatNegatives=0;
this.nrDecimalPlaces=0;
this.precedingSymbol="";
this.procedingSymbol="";
this.useSeparator=false;
this.elementHash=[];
this.elementArray=[];
this.dateFormatArray=[];
this.dateFormatString="";
this.timeYear=null;
this.timeHours=null;
this.timeMinutes=null;
this.timeSeconds=null;
this.timeAMPM=false;
this.referenceName=null;
if(_1){
this.fromCell(_1);
}
}
catch(ex){
jsExDebug("cellDataStyles_t",ex);
}
}
function cellDataStyles_cleanUp(me){
try{
if(!me){
me=this;
}
me.name=null;
me.styleType=null;
me.treatNegatives=null;
me.nrDecimalPlaces=null;
me.precedingSymbol=null;
me.procedingSymbol=null;
me.useSeparator=null;
me.timeHours=null;
me.timeMinutes=null;
me.timeSeconds=null;
me.timeAMPM=null;
me.referenceName=null;
for(var i in me.elementHash){
var _4=me.elementHash[i];
if(_4.name){
_4.name=null;
_4.value=null;
for(var j in _4.attributes.length){
_4.attributes[j]=null;
}
_4.attributes=null;
}
me.elementHash[i]=null;
delete me.elementHash[i];
}
me.elementHash=null;
for(var i=0;i<me.elementArray.length;i++){
var _4=me.elementArray[i];
if(_4.name){
_4.name=null;
_4.value=null;
for(var j in _4.attributes.length){
_4.attributes[j]=null;
}
_4.attributes=null;
}
me.elementArray[i]=null;
delete me.elementArray[i];
}
me.elementArray=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("cellDataStyles_cleanUp",ex);
}
}
function cellDataStyles_toString(){
try{
var _6="";
switch(this.styleType){
case this.STYLE_CURRENCY:
_6=this.styleType+":"+this.treatNegatives+":"+this.nrDecimalPlaces+":"+this.precedingSymbol+":"+this.useSeparator;
break;
case this.STYLE_NUMBER:
_6=this.styleType+":"+this.treatNegatives+":"+this.nrDecimalPlaces+":"+this.useSeparator;
break;
case this.STYLE_PERCENTAGE:
_6=this.styleType+":"+this.nrDecimalPlaces+":"+this.procedingSymbol;
break;
case this.STYLE_TEXT:
_6="text";
break;
case this.STYLE_TIME:
_6=this.styleType+":"+this.timeHours+":"+this.timeMinutes+":"+this.timeSeconds+":"+this.timeAMPM;
break;
case this.STYLE_DATE:
_6=this.styleType+":";
var _7="{";
for(var i=0;i<this.dateFormatArray.length;i++){
var _9=this.dateFormatArray[i];
if(!_9){
continue;
}
if(_9.type){
_7+=_9.type+_9.style+_9.text+"_";
}else{
if(_9.separator){
_7+=_9.separator+"_";
}
}
}
_6+=_7+":"+this.timeHours+":"+this.timeMinutes+":"+this.timeSeconds+":"+this.timeAMPM;
break;
case this.STYLE_BOOLEAN:
_6="boolean";
break;
}
return _6;
}
catch(ex){
jsExDebug("cellDataStyles_toString",ex);
}
}
function cellDataStyles_fromCell(_a){
try{
switch(_a.settingType){
case _a.GENERAL_TYPE:
this.styleType=this.STYLE_TEXT;
break;
case _a.CURRENCY_TYPE:
this.styleType=this.STYLE_CURRENCY;
break;
case _a.ACCOUNTING_TYPE:
this.styleType=this.STYLE_CURRENCY;
break;
case _a.NUMBER_TYPE:
this.styleType=this.STYLE_NUMBER;
break;
case _a.PERCENTAGE_TYPE:
this.styleType=this.STYLE_PERCENTAGE;
break;
case _a.STRING_TYPE:
this.styleType=this.STYLE_TEXT;
break;
case _a.TIME_TYPE:
this.parseTimeFormatString(_a.dateformat);
break;
case _a.DATE_TYPE:
jsDebug("DEBUG: cellDataStyles_fromCell error - cell has date type, it should be a time");
break;
case _a.BOOLEAN_TYPE:
this.styleType=this.STYLE_BOOLEAN;
break;
}
this.treatNegatives=_a.treatNegatives;
this.nrDecimalPlaces=_a.nrDecimalPlaces;
this.precedingSymbol=_a.precedingSymbol;
this.procedingSymbol=_a.procedingSymbol;
this.useSeparator=_a.settingSeparator;
}
catch(ex){
jsExDebug("cellDataStyles_fromCell",ex);
}
}
function cellDataStyles_fromXml(_b){
try{
if(!_b||!_b.nodeName){
return;
}
this.styleType=_b.nodeName;
if(_b.getAttribute("style:name")){
this.name=_b.getAttribute("style:name");
}
for(var i=0;i<_b.childNodes.length;i++){
var _d=_b.childNodes[i];
if(_d.nodeName=="style:map"){
var _e=_d.attributes[0].nodeValue;
var _f=_d.attributes[1].nodeValue;
if(_e=="value()>0"||_e=="value()>=0"){
this.referenceName=_f;
return;
}
}
}
for(var i=0;i<_b.childNodes.length;i++){
var _d=_b.childNodes[i];
if(_d){
if(_d.nodeName!="#text"){
var _10={};
_10.name=_d.nodeName;
_10.attributes=[];
_10.value=(_d.firstChild?_d.firstChild.nodeValue:null);
var _11=_d.attributes;
if(_11&&_11.length){
for(var j=0;j<_11.length;j++){
_10.attributes[_11[j].nodeName]=_11[j].nodeValue;
}
}
var _13=_d.nodeName;
var _14=(_10.value?_10.value.replace(/\s/g,""):null);
if(!(this.elementHash[_13]&&_13==this.ELEMENT_TEXT&&!_14)){
this.elementHash[_13]=_10;
}
this.elementArray.push(_10);
_10=null;
}
}
}
if(this.styleType==this.STYLE_NUMBER||this.styleType==this.STYLE_CURRENCY||this.styleType==this.STYLE_PERCENTAGE){
var _15=0;
var _16=null;
var _17=null;
for(var i in this.elementHash){
if((i==this.ELEMENT_TEXT)&&(this.elementHash[i].value!=null)){
_16=_15;
}else{
if(i==this.ELEMENT_NUMBER){
_17=_15;
}
}
_15++;
}
if((_16!=null)&&(_17!=null)){
var _18=this.getValidSymbol(this.elementHash[this.ELEMENT_TEXT].value);
if(_16<_17){
this.precedingSymbol=_18;
}else{
this.procedingSymbol=_18;
}
}
var _19=this.elementHash[this.ELEMENT_NUMBER];
if(_19){
if(_19.attributes[this.ATTR_DECIMAL_PLACES]){
this.nrDecimalPlaces=_19.attributes[this.ATTR_DECIMAL_PLACES];
}
if(_19.attributes[this.ATTR_GROUPING]){
this.useSeparator=_19.attributes[this.ATTR_GROUPING];
}
}
}else{
if(this.styleType==this.STYLE_TIME||this.styleType==this.STYLE_DATE){
for(var i=0;i<this.elementArray.length;i++){
var _d=this.elementArray[i];
if(_d){
var _1a=this.getDateFormatString(_d);
if(_1a){
this.dateFormatString+=_1a;
}
}
}
var _1b=this.elementHash[this.ELEMENT_HOURS];
if(_1b){
if(_1b.attributes[this.ATTR_NUMBER_STYLE]){
this.timeHours=_1b.attributes[this.ATTR_NUMBER_STYLE];
}else{
this.timeHours="long";
}
}
var _1c=this.elementHash[this.ELEMENT_MINUTES];
if(_1c){
this.timeMinutes=_1c.attributes[this.ATTR_NUMBER_STYLE];
}
var _1d=this.elementHash[this.ELEMENT_SECONDS];
if(_1d){
this.timeSeconds=_1d.attributes[this.ATTR_NUMBER_STYLE];
}
if(this.elementHash[this.ELEMENT_AMPM]){
this.timeAMPM=true;
}
}
}
}
catch(ex){
jsExDebug("cellDataStyles_fromXml",ex);
}
}
function cellDataStyles_toXml(){
try{
var _1e=new xmlWriter_t();
var xml="";
_1e.addAttribute("style:name",this.name);
xml+=_1e.createElement(this.styleType);
if(this.styleType==this.STYLE_TEXT){
}else{
if(this.styleType==this.STYLE_BOOLEAN){
}else{
if(this.styleType==this.STYLE_TIME||this.styleType==this.STYLE_DATE){
for(var i=0;i<this.dateFormatArray.length;i++){
var _21=this.dateFormatArray[i];
if(_21){
if(_21.type){
if(_21.text){
_1e.addAttribute(this.ATTR_NUMBER_TEXTUAL,true);
}
if(_21.style){
_1e.addAttribute(this.ATTR_NUMBER_STYLE,_21.style);
}
xml+=_1e.createClosedElement(_21.type);
}else{
if(_21.separator){
xml+=_1e.createElement(this.ELEMENT_TEXT);
xml+=_21.separator;
xml+=_1e.closeElement(this.ELEMENT_TEXT);
}
}
}
}
if(this.timeHours){
_1e.addAttribute(this.ATTR_NUMBER_STYLE,this.timeHours);
xml+=_1e.createClosedElement(this.ELEMENT_HOURS);
xml+=_1e.createElement(this.ELEMENT_TEXT);
xml+=":";
xml+=_1e.closeElement(this.ELEMENT_TEXT);
}
if(this.timeMinutes){
_1e.addAttribute(this.ATTR_NUMBER_STYLE,this.timeMinutes);
xml+=_1e.createClosedElement(this.ELEMENT_MINUTES);
}
if(this.timeSeconds){
xml+=_1e.createElement(this.ELEMENT_TEXT);
xml+=":";
xml+=_1e.closeElement(this.ELEMENT_TEXT);
_1e.addAttribute(this.ATTR_NUMBER_STYLE,this.timeSeconds);
xml+=_1e.createClosedElement(this.ELEMENT_SECONDS);
}
if(this.timeAMPM){
xml+=_1e.createClosedElement(this.ELEMENT_AMPM);
}
}else{
if(this.precedingSymbol){
xml+=_1e.createElement(this.ELEMENT_TEXT);
xml+=this.precedingSymbol;
xml+=_1e.closeElement(this.ELEMENT_TEXT);
}
_1e.addAttribute(this.ATTR_DECIMAL_PLACES,this.nrDecimalPlaces);
if(this.useSeparator){
_1e.addAttribute(this.ATTR_GROUPING,"true");
}
xml+=_1e.createClosedElement(this.ELEMENT_NUMBER);
if(this.procedingSymbol){
xml+=_1e.createElement(this.ELEMENT_TEXT);
xml+=this.procedingSymbol;
xml+=_1e.closeElement(this.ELEMENT_TEXT);
}
}
}
}
xml+=_1e.closeElement(this.styleType);
return xml;
}
catch(ex){
jsExDebug("cellDataStyles_toXml",ex);
}
}
function cellDataStyles_setName(_22){
try{
this.name=_22;
}
catch(ex){
jsExDebug("cellDataStyles_setName",ex);
}
}
function cellDataStyles_getName(){
try{
return this.name;
}
catch(ex){
jsExDebug("cellDataStyles_getName",ex);
}
}
function cellDataStyles_getDateFormatAttributes(_23){
try{
switch(_23){
case "dd":
return {type:this.ELEMENT_DAY,style:"long",text:false};
break;
case "ddd":
return {type:this.ELEMENT_DAY_OF_WEEK,style:"short",text:false};
break;
case "dddd":
return {type:this.ELEMENT_DAY_OF_WEEK,style:"long",text:false};
break;
case "m":
return {type:this.ELEMENT_MONTH,style:"short",text:false};
case "mm":
return {type:this.ELEMENT_MONTH,style:"long",text:false};
break;
case "mmm":
return {type:this.ELEMENT_MONTH,style:"short",text:true};
break;
case "mmmm":
return {type:this.ELEMENT_MONTH,style:"long",text:true};
break;
case "yy":
return {type:this.ELEMENT_YEAR,style:"short",text:false};
break;
case "yyyy":
return {type:this.ELEMENT_YEAR,style:"long",text:false};
break;
}
}
catch(ex){
jsExDebug("cellDataStyles_getDateFormatAttributes",ex);
}
}
function cellDataStyles_getDateFormatString(_24){
try{
if(_24.name==this.ELEMENT_HOUR||_24.name==this.ELEMENT_MINUTE||_24.name==this.ELEMENT_SECOND){
return;
}
if(_24.value&&(_24.value!=":")){
return _24.value;
}
var _25={};
_25.type=_24.name;
for(var i in _24.attributes){
switch(i){
case this.ATTR_NUMBER_TEXTUAL:
_25.text=true;
break;
case this.ATTR_NUMBER_STYLE:
_25.style=_24.attributes[i];
break;
}
}
switch(_25.type){
case this.ELEMENT_DAY:
if(_25.style=="long"){
return "dd";
}else{
if(_25.style=="short"){
}else{
return "dd";
}
}
break;
case this.ELEMENT_DAY_OF_WEEK:
if(_25.style=="long"){
return "dddd";
}else{
return "ddd";
}
break;
case this.ELEMENT_MONTH:
if(_25.style=="long"){
if(_25.text){
return "mmmm";
}else{
return "mm";
}
}else{
if(_25.text){
return "mmm";
}else{
return "m";
}
}
break;
case this.ELEMENT_YEAR:
if(_25.style=="long"){
return "yyyy";
}else{
return "yy";
}
break;
}
}
catch(ex){
jsExDebug("cellDataStyles_getDateFormatString",ex);
}
}
function cellDataStyles_parseTimeFormatString(_27){
function parseDate(_28){
try{
if(!_28){
return;
}else{
this.styleType=this.STYLE_DATE;
}
var _29=null;
if(_28.match(/\//)){
_29="/";
}else{
if(_28.match(/-/)){
_29="-";
}else{
if(_28.match(/,/)){
_29=",";
}
}
}
var _2a=_28.split(_29);
var _2b=[];
for(var i=0;i<_2a.length;i++){
var _2d=_2a[i].split(" ");
if(_2d.length>1){
for(var j=0;j<_2d.length;j++){
_2b.push(this.getDateFormatAttributes(_2d[j]));
_2b.push({separator:" "});
}
}else{
_2b.push(this.getDateFormatAttributes(_2a[i]));
if(i<(_2a.length-1)){
_2b.push({separator:_29});
}
}
}
this.dateFormatArray=_2b;
}
catch(ex){
jsExDebug("cellDataStyles_parseTimeFormatString: parseDate",ex);
}
}
function parseTime(_2f){
try{
if(!_2f){
return;
}else{
if(!this.styleType){
this.styleType=this.STYLE_TIME;
}
}
if(_30){
if(_30.match(/(hh){1}/)){
this.timeHours="long";
}else{
if(_30.match(/(h){1}/)){
this.timeHours="short";
}
}
if(_30.match(/(mm){1}/)){
this.timeMinutes="long";
}else{
if(_30.match(/(m){1}/)){
this.timeMinutes="short";
}
}
if(_30.match(/(ss){1}/)){
this.timeSeconds="long";
}else{
if(_30.match(/(s){1}/)){
this.timeSeconds="short";
}
}
if(_30.match(/(AM\/PM){1}/)){
this.timeAMPM=true;
}
}
}
catch(ex){
jsExDebug("cellDataStyles_parseTimeFormatString: parseTime",ex);
}
}
try{
var _31=false;
var _32=false;
var _33=null;
var _30=null;
if(_27.match(/h/)){
_32=true;
}
if(_27.match(/d/)||_27.match(/y/)){
_31=true;
}
if(_31&&_32){
var _34=null;
var _35=null;
if(_27.match(/hh/)){
_35="hh";
}else{
if(_27.match(/h/)){
_35="h";
}
}
_34=_27.split(_35);
_33=_34[0];
_30=_35+_34[1];
}else{
if(_31){
_33=_27;
}else{
_30=_27;
}
}
parseDate.call(this,_33);
parseTime.call(this,_30);
}
catch(ex){
jsExDebug("cellDataStyles_parseTimeFormatString",ex);
}
}
function cellDataStyles_getTimeFormatString(){
try{
var _36="";
var _37="";
var _38="";
switch(this.timeHours){
case "long":
_36="hh";
break;
case "short":
_36="h";
break;
}
switch(this.timeMinutes){
case "long":
_37="mm";
break;
case "short":
_37="m";
break;
}
switch(this.timeSeconds){
case "long":
_38="ss";
break;
case "short":
_38="s";
break;
}
timeString=_36+(_37?":"+_37:"")+(_38?":"+_38:"")+(this.timeAMPM?" AM/PM":"");
if(this.dateFormatString){
return this.dateFormatString+" "+timeString;
}else{
return timeString;
}
}
catch(ex){
jsExDebug("cellDataStyles_getTimeFormatString",ex);
}
}
function cellDataStyles_getValidSymbol(_39){
try{
switch(_39){
case "-$":
return "$";
default:
return _39;
}
}
catch(ex){
jsExDebug("cellDataStyles_getValidSymbol",ex);
}
}
function cellDataStyles_copyValuesFromStyle(_3a){
try{
if(!_3a){
return;
}
this.styleType=_3a.styleType;
this.treatNegatives=_3a.treatNegatives;
this.nrDecimalPlaces=_3a.nrDecimalPlaces;
this.precedingSymbol=_3a.precedingSymbol;
this.procedingSymbol=_3a.procedingSymbol;
this.useSeparator=_3a.useSeparator;
this.timeHours=_3a.timeHours;
this.timeMinutes=_3a.timeMinutes;
this.timeSeconds=_3a.timeSeconds;
this.timeAMPM=_3a.timeAMPM;
this.dateFormatString=_3a.dateFormatString;
}
catch(ex){
jsExDebug("cellDataStyles_copyValuesFromStyle",ex);
}
}

try{
rowStyles_t.prototype=new peepelObject_t();
rowStyles_t.prototype.constructor=rowStyles_t;
rowStyles_t.prototype.cleanUp=rowStyles_cleanUp;
rowStyles_t.prototype.rowStyles_super=peepelObject_t.prototype.constructor;
rowStyles_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
rowStyles_t.prototype.toString=rowStyles_toString;
rowStyles_t.prototype.toXml=rowStyles_toXml;
rowStyles_t.prototype.fromXml=rowStyles_fromXml;
rowStyles_t.prototype.setName=rowStyles_setName;
rowStyles_t.prototype.getName=rowStyles_getName;
rowStyles_t.prototype.copy=rowStyles_copy;
rowStyles_t.prototype.convertHeightToCm=rowStyles_convertHeightToCm;
rowStyles_t.prototype.convertHeightFromCm=rowStyles_convertHeightFromCm;
rowStyles_t.prototype.PIXELS_PER_CM=30;
rowStyles_t.prototype.PIXELS_DEFAULT_WIDTH_CM=2.67;
}
catch(ex){
jsExDebug("rowStyles_t.prototype",ex);
}
function rowStyles_t(_1,_2){
try{
this.rowStyles_super();
this.name=null;
this.pixelHeight=_1;
this.backgroundColour=_2;
}
catch(ex){
jsExDebug("rowStyles_t",ex);
}
}
function rowStyles_cleanUp(me){
try{
if(!me){
me=this;
}
me.name=null;
me.pixelHeight=null;
me.backgroundColour=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("rowStyles_cleanUp",ex);
}
}
function rowStyles_toString(){
try{
return this.pixelHeight+":"+this.backgroundColour;
}
catch(ex){
jsExDebug("rowStyles_toString",ex);
}
}
function rowStyles_toXml(){
try{
var _4=new xmlWriter_t();
var _5="";
_4.addAttribute("style:name",this.name);
_4.addAttribute("style:family","table-row");
_5+=_4.createElement("style:style");
_4.addAttribute("style:row-height",this.convertHeightToCm(this.pixelHeight));
if(this.backgroundColour){
_4.addAttribute("fo:background-color",this.backgroundColour);
}
_5+=_4.createClosedElement("style:table-row-properties");
_5+=_4.closeElement("style:style");
return _5;
}
catch(ex){
jsExDebug("rowStyles_toXml",ex);
}
}
function rowStyles_fromXml(_6){
try{
this.name=_6.getAttribute("style:name");
for(var i=0;i<_6.childNodes.length;i++){
var _8=_6.childNodes[i];
if(_8&&(_8.nodeName=="style:table-row-properties")){
this.pixelHeight=this.convertHeightFromCm(parseFloat(_8.getAttribute("style:row-height")));
if(_8.getAttribute("fo:background-color")){
this.backgroundColour=_8.getAttribute("fo:background-color");
}
}
}
}
catch(ex){
jsExDebug("rowStyles_fromXml",ex);
}
}
function rowStyles_setName(_9){
try{
this.name=_9;
}
catch(ex){
jsExDebug("rowStyles_setName",ex);
}
}
function rowStyles_getName(){
try{
return this.name;
}
catch(ex){
jsExDebug("rowStyles_getName",ex);
}
}
function rowStyles_copy(){
try{
var _a=new rowStyles_t(this.pixelHeight,this.backgroundColour);
return _a;
}
catch(ex){
jsExDebug("rowStyles_copy",ex);
}
}
function rowStyles_convertHeightToCm(_b){
try{
return (_b/this.PIXELS_PER_CM)+"cm";
}
catch(ex){
jsExDebug("rowStyles_convertHeightToCm",ex);
}
}
function rowStyles_convertHeightFromCm(_c){
try{
return (_c*this.PIXELS_PER_CM);
}
catch(ex){
jsExDebug("rowStyles_convertHeightFromCm",ex);
}
}

try{
writer_t.prototype=new widget_t();
writer_t.prototype.writer_super=widget_t.prototype.constructor;
writer_t.prototype.constructor=writer_t;
writer_t.prototype.cleanUp=writer_cleanUp;
writer_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
writer_t.prototype.createDom=writer_createDom;
writer_t.prototype.setStyles=writer_setStyles;
writer_t.prototype.setEvents=writer_setEvents;
writer_t.prototype.widget_setDimensions=widget_t.prototype.setDimensions;
writer_t.prototype.setDimensions=writer_setDimensions;
writer_t.prototype.notifySelectionChange=writer_notifySelectionChange;
writer_t.prototype.setContainerObject=writer_setContainerObject;
writer_t.prototype.focus=writer_focus;
writer_t.prototype.keyDownEventIE=writer_keyDownEventIE;
writer_t.prototype.keyUpEventIE=writer_keyUpEventIE;
writer_t.prototype.keyDownEventGecko=writer_keyDownEventGecko;
writer_t.prototype.keyUpEventGecko=writer_keyUpEventGecko;
writer_t.prototype.mouseUpEventIE=writer_mouseUpEventIE;
writer_t.prototype.mouseDownEventIE=writer_mouseDownEventIE;
writer_t.prototype.mouseUpEventGecko=writer_mouseUpEventGecko;
writer_t.prototype.mouseDownEventGecko=writer_mouseDownEventGecko;
writer_t.prototype.checkForKeyPressChanges=writer_checkForKeyPressChanges;
writer_t.prototype.getIFramePosition=writer_getIFramePosition;
writer_t.prototype.setSelectionByAttributes=writer_setSelectionByAttributes;
writer_t.prototype.setDirty=writer_setDirty;
writer_t.prototype.addMap=writer_addMap;
writer_t.prototype.getTableClass=writer_getTableClass;
writer_t.prototype.isFormattedBlock=writer_isFormattedBlock;
writer_t.prototype.checkDocumentAfterPaste=writer_checkDocumentAfterPaste;
writer_t.prototype.setContent=writer_setContent;
writer_t.prototype.setRichContent=writer_setRichContent;
writer_t.prototype.getTextAtRange=writer_getTextAtRange;
writer_t.prototype.selectCurrentRange=writer_selectCurrentRange;
writer_t.prototype.setCurrentRange=writer_setCurrentRange;
writer_t.prototype.styleBold=writer_styleBold;
writer_t.prototype.styleItalic=writer_styleItalic;
writer_t.prototype.styleUnderline=writer_styleUnderline;
writer_t.prototype.styleStrikeout=writer_styleStrikeout;
writer_t.prototype.styleSuperscript=writer_styleSuperscript;
writer_t.prototype.styleSubscript=writer_styleSubscript;
writer_t.prototype.styleBgColour=writer_styleBgColour;
writer_t.prototype.styleTextColour=writer_styleTextColour;
writer_t.prototype.styleFontFace=writer_styleFontFace;
writer_t.prototype.styleFontSize=writer_styleFontSize;
writer_t.prototype.styleIndent=writer_styleIndent;
writer_t.prototype.styleOutdent=writer_styleOutdent;
writer_t.prototype.styleAlignLeft=writer_styleAlignLeft;
writer_t.prototype.styleAlignCentre=writer_styleAlignCentre;
writer_t.prototype.styleAlignRight=writer_styleAlignRight;
writer_t.prototype.styleJustify=writer_styleJustify;
writer_t.prototype.styleTextDirection=writer_styleTextDirection;
writer_t.prototype.styleFormatBlock=writer_styleFormatBlock;
writer_t.prototype.styleTableBorders=writer_styleTableBorders;
writer_t.prototype.insertHorizontalRule=writer_insertHorizontalRule;
writer_t.prototype.insertPageBreak=writer_insertPageBreak;
writer_t.prototype.insertTable=writer_insertTable;
writer_t.prototype.insertImage=writer_insertImage;
writer_t.prototype.insertLink=writer_insertLink;
writer_t.prototype.insertOrderedList=writer_insertOrderedList;
writer_t.prototype.insertUnorderedList=writer_insertUnorderedList;
writer_t.prototype.iframePasteAtRange=writer_iframePasteAtRange;
writer_t.prototype.insertMapImage=writer_insertMapImage;
writer_t.prototype.removeFormatting=writer_removeFormatting;
writer_t.prototype.removeLink=writer_removeLink;
writer_t.prototype.deleteTable=writer_deleteTable;
writer_t.prototype.runCommand=writer_runCommand;
writer_t.prototype.queryState=writer_queryState;
writer_t.prototype.queryValue=writer_queryValue;
writer_t.prototype.isCommandSupported=writer_isCommandSupported;
writer_t.prototype.getDocumentSource=writer_getDocumentSource;
writer_t.prototype.getDocumentText=writer_getDocumentText;
writer_t.prototype.toggleView=writer_toggleView;
writer_t.prototype.setMargin=writer_setMargin;
writer_t.prototype.setLineSpacing=writer_setLineSpacing;
writer_t.prototype.spellCheck=writer_spellCheck;
writer_t.prototype.spellCheckTable=writer_spellCheckTable;
writer_t.prototype.changeCase=writer_changeCase;
writer_t.prototype.undo=writer_undo;
writer_t.prototype.redo=writer_redo;
writer_t.prototype.copy=writer_copy;
writer_t.prototype.cut=writer_cut;
writer_t.prototype.paste=writer_paste;
writer_t.prototype.print=writer_print;
writer_t.prototype.updateSettings=writer_updateSettings;
writer_t.prototype.getSaveData=writer_getSaveData;
writer_t.prototype.load=writer_load;
writer_t.prototype.loadFromODT=writer_loadFromODT;
writer_t.prototype.openTemplate=writer_openTemplate;
writer_t.prototype.DEFAULT_WIDTH="400px";
writer_t.prototype.DEFAULT_HEIGHT="600px";
writer_t.prototype.CONTAINER_PADDING=2;
writer_t.prototype.SMALL_MARGIN=20;
writer_t.prototype.NORMAL_MARGIN=40;
writer_t.prototype.LARGE_MARGIN=60;
writer_t.prototype.NO_MARGIN=0;
writer_t.prototype.FONT_1_8=14;
writer_t.prototype.FONT_2_10=18;
writer_t.prototype.FONT_3_12=20;
writer_t.prototype.FONT_4_14=28;
writer_t.prototype.FONT_5_18=36;
writer_t.prototype.FONT_6_24=46;
writer_t.prototype.FONT_7_36=64;
var FORMATBLOCK_HEADING1="h1";
var FORMATBLOCK_HEADING2="h2";
var FORMATBLOCK_HEADING3="h3";
var FORMATBLOCK_HEADING4="h4";
var FORMATBLOCK_HEADING5="h5";
var FORMATBLOCK_HEADING6="h6";
var FORMATBLOCK_PRE="pre";
var FORMATBLOCK_ADDRESS="address";
var FORMATBLOCK_NORMAL="p";
var FORMATBLOCK_UNORDEREDLIST="ul";
var FORMATBLOCK_ORDEREDLIST="ol";
var FORMATBLOCK_TABLE="table";
}
catch(ex){
jsExDebug("writer_t:prototype",ex);
}
function writer_t(_1,_2,_3,_4,_5){
try{
this.writer_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.viewMode=0;
this.currentRange=null;
this.parentApplication=_2;
this.initialLoadDelegate=_3;
var _6=button_t.prototype.STATE_OFF;
var on=button_t.prototype.STATE_ON;
this.settingBold=_6;
this.settingItalic=_6;
this.settingUnderline=_6;
this.settingStrikeout=_6;
this.settingSuperscript=_6;
this.settingSubscript=_6;
this.settingBgColour=_6;
this.settingTextColour=_6;
this.settingAlignLeft=_6;
this.settingAlignRight=_6;
this.settingAlignCentre=_6;
this.settingAlignJustify=_6;
this.settingFormatBlock=FORMATBLOCK_NORMAL;
this.settingTextDirection="ltr";
this.dirty=false;
this.statePasteOccured=false;
if(_4){
this.dirtyStatusDelegate=_4;
}
if(!_5){
this.createDom();
}
}
catch(ex){
jsExDebug("writer_t",ex);
}
}
function writer_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.frameElement,"onload","load");
if(me.SYSTEM.Environment.USER_AGENT==me.SYSTEM.Environment.INTERNET_EXPLORER){
me.textEditorDocument.onclick=null;
me.textEditorDocument.onkeyup=null;
me.textEditorDocument.onkeydown=null;
me.textEditorDocument.onmouseup=null;
me.textEditorDocument.onmousedown=null;
}else{
me.SYSTEM.Event.detachEvent(me.frameElement.contentWindow.document,null,"mousedown");
me.SYSTEM.Event.detachEvent(me.frameElement.contentWindow.document,null,"mouseup");
me.SYSTEM.Event.detachEvent(me.frameElement.contentWindow.document,null,"keyup");
me.SYSTEM.Event.detachEvent(me.frameElement.contentWindow.document,null,"keydown");
me.SYSTEM.Event.dragDisableIFrame(me.frameElement.contentWindow.document);
}
me.textEditorDocument=null;
me.tempSource=null;
me.viewMode=null;
me.currentRange=null;
me.dirty=null;
me.statePasteOccured=null;
me.settingBold=null;
me.settingItalic=null;
me.settingUnderline=null;
me.settingStrikeout=null;
me.settingSuperscript=null;
me.settingSubscript=null;
me.settingBgColour=null;
me.settingTextColour=null;
me.settingAlignLeft=null;
me.settingAlignRight=null;
me.settingAlignCentre=null;
me.settingAlignJustify=null;
me.settingFontFace=null;
me.settingFontSize=null;
me.settingFormatBlock=null;
me.settingTextDirection=null;
if(me.initialLoadFile){
me.initialLoadFile.cleanUp();
me.initialLoadFile=null;
}
if(me.initialLoadDelegate){
me.initialLoadDelegate.cleanUp();
me.initialLoadDelegate=null;
}
if(me.dirtyStatusDelegate){
me.dirtyStatusDelegate.cleanUp();
me.dirtyStatusDelegate=null;
}
me.parentApplication=null;
me.frameElement=null;
if(me.selectionChangeDelegate){
me.selectionChangeDelegate.cleanUp();
me.selectionChangeDelegate=null;
}
me.colourArray=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("writer_cleanUp",ex);
}
}
function writer_createDom(){
function documentCreatedCallbackFunction(){
try{
me.textEditorDocument=me.frameElement.contentWindow.document;
me.textEditorDocument.designMode="on";
me.textEditorDocument.styleWithCss=true;
if(me.textEditorDocument.body){
me.setStyles();
me.setEvents();
me.loaded=true;
me.textEditorDocument.body.style.backgroundColor="rgb(255, 255, 255)";
me.settingFontFace=me.SYSTEM.Settings.get("default_font_family");
me.settingFontSize=me.SYSTEM.Settings.get("default_font_size");
me.textEditorDocument.body.style.fontFamily=me.settingFontFace;
me.textEditorDocument.body.style.fontSize=fontSizeSelect_t.prototype.VALUE_TO_PT[me.settingFontSize]+"pt";
if(me.initialLoadDelegate){
me.initialLoadDelegate.invoke();
me.initialLoadDelegate=null;
}
}
}
catch(ex){
jsExDebug("documentCreatedCallback",ex);
}
}
try{
var me=this;
this.frameElement=document.createElement("iframe");
this.frameElement.frameBorder="0";
this.frameElement.style.position="absolute";
this.frameElement.style.border="solid 1px #bbbbbb";
this.frameElement.style.backgroundColor="white";
this.widgetElement.style.overflow="auto";
this.widgetElement.appendChild(this.frameElement);
this.SYSTEM.Event.attachEvent(this.frameElement,"onload","load",documentCreatedCallbackFunction);
}
catch(ex){
jsExDebug("writer_createDom",ex);
}
}
function writer_setStyles(){
try{
this.textEditorDocument.body.style.wordWrap="break-word";
if(this.marginSize!=null){
this.textEditorDocument.body.style.margin=this.marginSize+"px";
}else{
this.textEditorDocument.body.style.margin=this.NORMAL_MARGIN+"px";
}
var _a=this.textEditorDocument.getElementsByTagName("head")[0];
if(!_a){
return;
}
var _b=this.textEditorDocument.createElement("style");
_b.setAttribute("media","screen");
_a.appendChild(_b);
var _c=this.textEditorDocument.createElement("style");
_c.setAttribute("media","print");
_a.appendChild(_c);
var _d=this.textEditorDocument.createElement("style");
_a.appendChild(_d);
var _e=" { padding: 0; margin-top: 0; margin-bottom: 0; } ";
this.COLOR_BLACK="rgb( 0, 0, 0 )";
this.COLOR_DARK_GRAY="rgb( 99, 99, 99 )";
this.COLOR_LIGHT_GRAY="rgb( 222, 222, 222 )";
this.COLOR_WHITE="rgb( 254, 254, 254 )";
this.COLOR_RED="rgb( 255, 0, 0 )";
this.COLOR_ORANGE="rgb( 255, 100, 0 )";
this.COLOR_DARK_YELLOW="rgb( 150, 150, 0 )";
this.COLOR_YELLOW="rgb( 255, 255, 0 )";
this.COLOR_GREEN="rgb( 0, 255, 0 )";
this.COLOR_LIGHT_GREEN="rgb( 0, 255,  100 )";
this.COLOR_TEAL="rgb( 0, 150, 150 )";
this.COLOR_LIGHT_BLUE="rgb( 0, 255, 255 )";
this.COLOR_BLUE="rgb( 0, 0, 255 )";
this.COLOR_INDIGO="rgb( 100, 0, 255 )";
this.COLOR_PURPLE="rgb( 150, 0, 150 )";
this.COLOR_PINK="rgb( 255, 0, 255 )";
this.colourArray=[this.COLOR_BLACK,this.COLOR_DARK_GRAY,this.COLOR_LIGHT_GRAY,this.COLOR_WHITE,this.COLOR_RED,this.COLOR_ORANGE,this.COLOR_DARK_YELLOW,this.COLOR_YELLOW,this.COLOR_GREEN,this.COLOR_LIGHT_GREEN,this.COLOR_TEAL,this.COLOR_LIGHT_BLUE,this.COLOR_BLUE,this.COLOR_INDIGO,this.COLOR_PURPLE,this.COLOR_PINK];
if(this.frameElement.contentWindow.document){
if(this.SYSTEM.Event.eventModel==this.SYSTEM.Event.INTERNET_EXPLORER){
this.textEditorDocument.styleSheets[0].cssText="p"+_e;
this.textEditorDocument.styleSheets[0].cssText+="pre"+_e;
this.textEditorDocument.styleSheets[0].cssText+="address"+_e;
this.textEditorDocument.styleSheets[0].cssText+="blockquote"+_e;
this.textEditorDocument.styleSheets[0].cssText+="div"+_e;
this.textEditorDocument.styleSheets[0].cssText+="h1"+_e;
this.textEditorDocument.styleSheets[0].cssText+="h2"+_e;
this.textEditorDocument.styleSheets[0].cssText+="h3"+_e;
this.textEditorDocument.styleSheets[0].cssText+="h4"+_e;
this.textEditorDocument.styleSheets[0].cssText+="h5"+_e;
this.textEditorDocument.styleSheets[0].cssText+="h6"+_e;
var _f=" { padding: 0; margin-top: 0; margin-bottom: 0; font-size: +1.8em; } ";
this.textEditorDocument.styleSheets[1].cssText="p"+_f;
this.textEditorDocument.styleSheets[1].cssText+="pre"+_f;
this.textEditorDocument.styleSheets[1].cssText+="address"+_f;
this.textEditorDocument.styleSheets[1].cssText+="blockquote"+_f;
this.textEditorDocument.styleSheets[1].cssText+="div"+_f;
var _10=" { padding: 0; margin-top: 0; margin-bottom: 0;";
var _11=" } ";
this.textEditorDocument.styleSheets[1].cssText+="h1"+_10+"font-size: "+this.FONT_6_24+"pt;"+_11;
this.textEditorDocument.styleSheets[1].cssText+="h2"+_10+"font-size: "+this.FONT_5_18+"pt;"+_11;
this.textEditorDocument.styleSheets[1].cssText+="h3"+_10+"font-size: "+this.FONT_4_14+"pt;"+_11;
this.textEditorDocument.styleSheets[1].cssText+="h4"+_10+"font-size: "+this.FONT_3_12+"pt;"+_11;
this.textEditorDocument.styleSheets[1].cssText+="h5"+_10+"font-size: "+this.FONT_2_10+"pt;"+_11;
this.textEditorDocument.styleSheets[1].cssText+="h6"+_10+"font-size: "+this.FONT_1_8+"pt;"+_11;
for(var i=0;i<this.colourArray.length;i++){
for(var j=1;j<4;j++){
this.textEditorDocument.styleSheets[2].cssText+=sprint("table.table$1px$2 { border: $1px solid $3; border-collapse:collapse; } table.table$1px$2 td { border: $1px solid $3; } ",j,i,this.colourArray[i]);
}
}
this.textEditorDocument.styleSheets[0].cssText+=".pb { width:100%; page-break-after:always; border: none; border-top: 1px dashed #aaaaaa; color: transparent; background-color: transparent;} ";
this.textEditorDocument.styleSheets[1].cssText+=".pb { width:100%; page-break-after:always; visibility:hidden; color: transparent; background-color: transparent; }";
this.textEditorDocument.styleSheets[0].cssText+="table.invis { border:dashed 1px #999999; border-collapse:collapse; } table.invis td { border:dashed 1px #999999; }";
this.textEditorDocument.styleSheets[1].cssText+="table.invis { border:solid 0px transparent; border-collapse:collapse; } table.invis td { border:solid 0px transparent; }";
}else{
this.textEditorDocument.styleSheets[2].insertRule("p"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("pre"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("address"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("blockquote"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("div"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("h1"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("h2"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("h3"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("h4"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("h5"+_e,0);
this.textEditorDocument.styleSheets[2].insertRule("h6"+_e,0);
for(var i=0;i<this.colourArray.length;i++){
for(var j=1;j<4;j++){
this.textEditorDocument.styleSheets[2].insertRule(sprint("table.table$1px$2 { border: solid $1px $3; border-collapse:collapse; } ",j,i,this.colourArray[i]),0);
this.textEditorDocument.styleSheets[2].insertRule(sprint("table.table$1px$2 td { border: solid $1px $3; } ",j,i,this.colourArray[i]),0);
}
}
this.textEditorDocument.styleSheets[0].insertRule(".pb { width:100%; page-break-after:always; border: none; border-top: 1px dashed #aaaaaa; color: transparent; background-color: transparent;}",0);
this.textEditorDocument.styleSheets[1].insertRule(".pb { width:100%; page-break-after:always; visibility:hidden; color: transparent; background-color: transparent; }",0);
this.textEditorDocument.styleSheets[0].insertRule("table.invis { border:dashed 1px #999999; border-collapse:collapse; }",0);
this.textEditorDocument.styleSheets[0].insertRule("table.invis td { border:dashed 1px #999999; }",0);
this.textEditorDocument.styleSheets[1].insertRule("table.invis { border:solid 0px transparent; border-collapse:collapse; }",0);
this.textEditorDocument.styleSheets[1].insertRule("table.invis td { border:solid 0px transparent; }",0);
}
}
if(this.tempSource){
}else{
if(document.all){
this.frameElement.contentWindow.focus();
var rng=this.textEditorDocument.selection.createRange();
rng.select(this.textEditorDocument.body);
this.currentRange=rng;
rng.select();
}else{
var _15=this.frameElement.contentWindow.getSelection();
this.currentRange=_15.getRangeAt(0);
}
this.textEditorDocument.execCommand("formatblock",false,"<p>");
}
this.updateSettings();
}
catch(ex){
jsExDebug("writer_setStyles",ex);
}
}
function writer_setEvents(){
try{
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
var me=this;
function trapScope(_17){
function doTrapped(){
_17.apply(me,arguments);
}
return doTrapped;
}
this.textEditorDocument.onclick=trapScope(function(){
this.focus();
this.SYSTEM.Event.executeClickHandlers();
});
this.textEditorDocument.onkeyup=trapScope(this.keyUpEventIE);
this.textEditorDocument.onkeydown=trapScope(this.keyDownEventIE);
this.textEditorDocument.onmouseup=trapScope(this.mouseUpEventIE);
this.textEditorDocument.onmousedown=trapScope(this.mouseDownEventIE);
}else{
this.SYSTEM.Event.attachEvent(this.frameElement.contentWindow.document,null,"mousedown",this.mouseDownEventGecko,this);
this.SYSTEM.Event.attachEvent(this.frameElement.contentWindow.document,null,"mouseup",this.mouseUpEventGecko,this);
this.SYSTEM.Event.attachEvent(this.frameElement.contentWindow.document,null,"keyup",this.keyUpEventGecko,this);
this.SYSTEM.Event.attachEvent(this.frameElement.contentWindow.document,null,"keydown",this.keyDownEventGecko,this);
this.SYSTEM.Event.dragEnableIFrame(this.frameElement.contentWindow.document,this);
}
}
catch(ex){
jsExDebug("writer_setEvents",ex);
}
}
function writer_mouseUpEventIE(_18){
try{
this.setCurrentRange();
this.updateSettings();
}
catch(ex){
jsExDebug("writer_mouseUpEventIE",ex);
}
}
function writer_mouseDownEventIE(_19){
try{
if(this.containerObject&&this.containerObject==this.SYSTEM.WINDOW_MANAGER.getFocusedFrame()){
var _1a=this.textEditorDocument.selection.createRange();
if(_1a.boundingWidth>0){
this.selectCurrentRange();
}
}else{
this.SYSTEM.WINDOW_MANAGER.focus(this.containerObject);
}
}
catch(ex){
jsExDebug("writer_mouseDownEventIE",ex);
}
}
function writer_mouseUpEventGecko(_1b,me){
try{
if(!me){
var me=this;
}
me.setCurrentRange();
me.updateSettings();
}
catch(ex){
jsExDebug("writer_mouseUpEventGecko",ex);
}
}
function writer_mouseDownEventGecko(_1d,me){
try{
if(!me){
var me=this;
}
if(me.containerObject&&me.containerObject==me.SYSTEM.WINDOW_MANAGER.getFocusedFrame()){
me.selectCurrentRange();
}else{
_1d.stopPropagation();
me.SYSTEM.WINDOW_MANAGER.focus(me.containerObject);
}
}
catch(ex){
jsExDebug("writer_mouseDownEventGecko",ex);
}
}
function writer_keyDownEventIE(){
try{
var key=this.frameElement.contentWindow.event;
hideTooltip();
switch(key.keyCode){
case 83:
if(key.ctrlKey){
key.returnValue=false;
key.keyCode=0;
this.parentApplication.binding_saveBtn_click();
}
break;
case 79:
if(key.ctrlKey){
key.returnValue=false;
key.keyCode=0;
this.parentApplication.binding_openBtn_click();
}
break;
case 46:
return;
case 8:
return;
case 86:
if(key.ctrlKey){
this.statePasteOccured=true;
}
break;
}
this.keyDownSource=this.textEditorDocument.body.innerHTML;
}
catch(ex){
jsExDebug("writer_keyupEventIE",ex);
}
}
function writer_keyUpEventIE(){
try{
var key=this.frameElement.contentWindow.event;
hideTooltip();
this.setCurrentRange();
switch(key.keyCode){
case 37:
this.updateSettings();
break;
case 38:
this.updateSettings();
break;
case 39:
this.updateSettings();
break;
case 40:
this.updateSettings();
break;
case 83:
if(key.ctrlKey){
break;
}
break;
case 79:
if(key.ctrlKey){
break;
}
case 17:
break;
case 86:
if(this.statePasteOccured){
this.checkDocumentAfterPaste();
this.statePasteOccured=false;
}
break;
}
this.checkForKeyPressChanges();
}
catch(ex){
jsExDebug("writer_keyupEventIE",ex);
}
}
function writer_checkForKeyPressChanges(){
try{
if(this.textEditorDocument.body.innerHTML!=this.keyDownSource){
this.setDirty(true);
this.keyDownSource=null;
}
}
catch(ex){
jsExDebug("writer_checkForKeyPressChanges",ex);
}
}
function writer_keyUpEventGecko(key,me){
try{
if(!me){
var me=this;
}
me.setCurrentRange();
switch(key.which){
case 37:
me.updateSettings();
break;
case 38:
me.updateSettings();
break;
case 39:
me.updateSettings();
break;
case 40:
me.updateSettings();
break;
case 83:
if(key.ctrlKey){
break;
}
case 79:
if(key.ctrlKey){
break;
}
case 17:
break;
case 86:
if(me.statePasteOccured){
me.checkDocumentAfterPaste();
me.statePasteOccured=false;
}
break;
}
me.checkForKeyPressChanges();
}
catch(ex){
jsExDebug("writer_keyUpEventGecko",ex);
}
}
function writer_keyDownEventGecko(_23,me){
hideTooltip();
if(!me){
var me=this;
}
try{
me.keyDownSource=me.textEditorDocument.body.innerHTML;
if(_23.which==16||_23.which==17||_23.which==18||_23.which==20||_23.which==91||_23.which==93||_23.which==46||_23.which==8){
return;
}
if(_23.altKey){
return;
}
if(_23.ctrlKey){
switch(_23.which){
case 66:
me.styleBold();
_23.preventDefault();
break;
case 73:
me.styleItalic();
_23.preventDefault();
break;
case 79:
_23.preventDefault();
setTimeout(function(){
me.parentApplication.binding_openBtn_click();
},10);
break;
case 83:
_23.preventDefault();
setTimeout(function(){
me.parentApplication.binding_saveBtn_click();
},10);
break;
case 85:
me.styleUnderline();
_23.preventDefault();
break;
case 89:
me.redo();
_23.preventDefault();
break;
case 90:
me.undo();
_23.preventDefault();
break;
case 86:
me.statePasteOccured=true;
break;
case 71:
_23.preventDefault();
default:
}
return;
}
if(_23.which==13){
for(var i in me.textEditorDocument.body.childNodes){
var _26=me.textEditorDocument.body.childNodes.item(i);
if(_26){
try{
if(_26.nodeName.toLowerCase()=="br"){
me.textEditorDocument.body.removeChild(_26);
}else{
if(writer_isFormattedBlock(_26)){
if(_26.lastChild&&_26.lastChild.nodeName.toLowerCase()=="br"){
var _27=me.textEditorDocument.createElement("span");
_27.innerHTML="&nbsp;";
_26.replaceChild(_27,_26.lastChild);
}
}
}
}
catch(ex){
jsExDebug("writer_keyDownEventGecko",ex);
}
}
}
}else{
if(me.currentRange){
var _28=writer_getParentFormatBlock(me.currentRange.commonAncestorContainer);
if(_28.dir=="rtl"){
me.iframePasteAtRange("&rlm;");
}
if(!_28){
for(var i in me.textEditorDocument.body.childNodes){
var _26=me.textEditorDocument.body.childNodes.item(i);
if(_26){
if(!writer_isFormattedBlock(_26)){
var _27=me.textEditorDocument.createElement("p");
var _29=me.textEditorDocument.createElement("bnode");
_27.appendChild(_26);
_29.appendChild(_27);
me.iframePasteAtRange(_29.innerHTML);
}
}
}
}
}
}
}
catch(ex){
jsExDebug("writer_keyDownEventGecko",ex);
}
}
function writer_setCurrentRange(){
try{
if(document.all){
this.currentRange=this.textEditorDocument.selection.createRange();
}else{
var _2a=this.frameElement.contentWindow.getSelection();
if(_2a.rangeCount>0){
this.currentRange=_2a.getRangeAt(0);
}else{
this.currentRange=null;
}
}
}
catch(ex){
jsExDebug("writer_setCurrentRange",ex);
}
}
function writer_selectCurrentRange(){
try{
if(document.all){
if(this.frameElement&&this.frameElement.focus){
this.frameElement.focus();
}
}else{
this.frameElement.contentWindow.focus();
this.textEditorDocument.body.focus();
}
if(this.currentRange&&this.currentRange.select){
try{
this.currentRange.select();
}
catch(ex){
}
}
}
catch(ex){
jsExDebug("writer_selectCurrentRange",ex);
}
}
function writer_print(){
try{
var _2b=false;
var me=this;
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
var _2d=document.createElement("div");
_2d.style.position="absolute";
_2d.style.left="3px";
_2d.style.top="3px";
_2d.style.width=(this.width-13)+"px";
_2d.style.height=(this.height-13)+"px";
_2d.style.backgroundColor="white";
this.widgetElement.appendChild(_2d);
var _2e=this.textEditorDocument.body.innerHTML;
_2e=_2e.replace(/font size=([0-9])/ig,function($0,$1){
switch(parseInt($1)){
case 1:
return "font style=\"font-size: "+me.FONT_1_8+"pt;\"";
case 2:
return "font style=\"font-size: "+me.FONT_2_10+"pt;\"";
case 3:
return "font style=\"font-size: "+me.FONT_3_12+"pt;\"";
case 4:
return "font style=\"font-size: "+me.FONT_4_14+"pt;\"";
case 5:
return "font style=\"font-size: "+me.FONT_5_18+"pt;\"";
case 6:
return "font style=\"font-size: "+me.FONT_6_24+"pt;\"";
case 7:
return "font style=\"font-size: "+me.FONT_7_36+"pt;\"";
}
});
this.textEditorDocument.body.innerHTML=_2e;
_2e=null;
_2b=true;
}
this.frameElement.contentWindow.focus();
this.frameElement.contentWindow.print();
if(_2b){
_2e=this.textEditorDocument.body.innerHTML;
_2e=_2e.replace(/font style="font-size: ([0-9]+)pt[;]?"/ig,function($0,$1){
switch(parseInt($1)){
case me.FONT_1_8:
return "font size=1";
case me.FONT_2_10:
return "font size=2";
case me.FONT_3_12:
return "font size=3";
case me.FONT_4_14:
return "font size=4";
case me.FONT_5_18:
return "font size=5";
case me.FONT_6_24:
return "font size=6";
case me.FONT_7_36:
return "font size=7";
}
});
this.textEditorDocument.body.innerHTML=_2e;
_2e=null;
this.widgetElement.removeChild(_2d);
_2d=null;
}
}
catch(ex){
jsExDebug("writer_print",ex);
}
}
function writer_setDirty(_33){
try{
this.dirty=_33;
if(this.dirtyStatusDelegate){
this.dirtyStatusDelegate.invoke(_33);
}
}
catch(ex){
jsExDebug("writer_setDirty",ex);
}
}
function writer_addMap(){
try{
var _34=new mapApp_t();
var _35=this.textEditorDocument.createElement("iframe");
function doLoad(){
_35.contentWindow.document.write("<script language='javascript'>var newMap;</script>");
_35.contentWindow.newMap=_34;
_35.contentWindow.document.write("<script language='javascript'>document.body.appendChild( newMap.mapFrame.frame );</script>");
}
_35.onload=doLoad;
_35.id="w";
this.textEditorDocument.body.appendChild(_35);
if(document.all){
doLoad();
}
}
catch(ex){
jsExDebug("writer_addMap",ex);
}
}
function writer_setSelectionByAttributes(_36,_37,_38){
try{
if(_37&&_38){
return;
}
if(_36&&_36.getAttribute){
if(_36.getAttribute("isStart")=="true"){
var _39=parseInt(_36.getAttribute("startNodeIndex"));
if(_39==-1){
this.currentRange.setStart(_36,_36.getAttribute("startOffset"));
}else{
this.currentRange.setStart(_36.childNodes[_39],_36.getAttribute("startOffset"));
}
_36.removeAttribute("isStart");
_36.removeAttribute("startOffset");
_36.removeAttribute("startNodeIndex");
_37=true;
}
if(_36.getAttribute("isEnd")=="true"){
var _3a=parseInt(_36.getAttribute("endNodeIndex"));
if(_3a==-1){
this.currentRange.setEnd(_36,_36.getAttribute("endOffset"));
}else{
this.currentRange.setEnd(_36.childNodes[_3a],_36.getAttribute("endOffset"));
}
_36.removeAttribute("isEnd");
_36.removeAttribute("endOffset");
_36.removeAttribute("endNodeIndex");
_38=true;
}
}
for(var i in _36.childNodes){
var _3c=_36.childNodes[i];
this.setSelectionByAttributes(_3c,_37,_38);
}
}
catch(ex){
jsExDebug("writer_setSelectionByAttributes",ex);
}
}
function writer_getParentFormatBlock(_3d){
try{
if((_3d==null)||(_3d.nodeName.toLowerCase()=="body")){
return false;
}else{
if(writer_isFormattedBlock(_3d)){
return _3d;
}else{
return writer_getParentFormatBlock(_3d.parentNode);
}
}
}
catch(ex){
jsExDebug("writer_getParentFormatBlock",ex);
}
}
function writer_isFormattedBlock(_3e){
try{
if(!_3e.nodeName){
return false;
}
switch(_3e.nodeName.toLowerCase()){
case "p":
return true;
break;
case "pre":
return true;
break;
case "address":
return true;
break;
case "blockquote":
return true;
break;
case "div":
return true;
break;
case "h1":
return true;
break;
case "h2":
return true;
break;
case "h3":
return true;
break;
case "h4":
return true;
break;
case "h5":
return true;
break;
case "h6":
return true;
break;
case "ol":
return true;
break;
case "ul":
return true;
break;
case "table":
return true;
break;
}
return false;
}
catch(ex){
jsExDebug("writer_isFormattedBlock",ex);
}
}
function writer_checkDocumentAfterPaste(){
try{
var _3f=this.textEditorDocument.body.childNodes;
var _40=null;
var _41=null;
var _42=[];
var _43=0;
for(var i=0;i<_3f.length;i++){
var _45=_3f[i];
var _46=_45.nodeName.toLowerCase();
if(!this.isFormattedBlock(_45)){
if(_46=="br"){
}else{
if(_45.nodeValue&&_45.nodeValue.match(/[^\s]/)){
if(!_40){
_40=this.textEditorDocument.createElement("p");
}
if(!_41){
_41=_45;
}
_42.push(_45);
}
}
}else{
if(_40){
this.textEditorDocument.body.insertBefore(_40,_42[0]);
for(var j=0;j<_42.length;j++){
_40.appendChild(_42[j]);
_42[j]=null;
delete _42[j];
}
_43++;
_42=[];
_40=null;
_41=null;
}
}
}
if(_40){
this.textEditorDocument.body.insertBefore(_40,_42[0]);
for(var j=0;j<_42.length;j++){
_40.appendChild(_42[j]);
_42[j]=null;
delete _42[j];
}
_42=[];
_40=null;
_41=null;
}
}
catch(ex){
jsExDebug("writer_checkDocumentAfterPaste",ex);
}
}
function writer_getSaveData(){
try{
var _48=this.textEditorDocument.body.style.lineHeight;
var _49=this.textEditorDocument.body.style.margin;
var _4a=writer_escapeHtml(this.textEditorDocument.body.innerHTML);
_4a=prepareTextForXHR(_4a);
var _4b=["<document lineSpacing='",_48,"' margin='",_49,"' scroll='",this.scrollTop,"' fontsize='",this.textEditorDocument.body.style.fontSize,"' fontfamily=\"",this.textEditorDocument.body.style.fontFamily,"\">"].join("");
_4b+=_4a;
_4b+="</document>";
this.setDirty(false);
return _4b;
}
catch(ex){
jsExDebug("writer_getSaveData",ex);
}
}
function writer_load(xml,_4d){
try{
var _4e=xml.firstChild;
if(_4e.nodeName=="import"){
this.loadFromODT(_4e,_4d);
return;
}
this.textEditorDocument.body.style.lineHeight=_4e.getAttribute("lineSpacing");
if(_4e.getAttribute("fontfamily")){
this.textEditorDocument.body.style.fontFamily=_4e.getAttribute("fontfamily");
this.textEditorDocument.body.style.fontSize=_4e.getAttribute("fontsize");
}
this.setMargin(_4e.getAttribute("margin"));
this.scrollTop=_4e.getAttribute("scroll");
this.tempSource="";
for(var i=0;i<_4e.childNodes.length;i++){
var _50=writer_catchHtml(_4e.childNodes[i].nodeValue);
this.tempSource+=_50;
}
this.tempSource=this.tempSource.replace(/%lt%;/g,"<");
this.tempSource=this.tempSource.replace(/%gt%;/g,">");
this.tempSource=this.tempSource.replace(/%amp%;/g,"&");
this.tempSource=this.tempSource.replace(/“/g,"\"");
this.tempSource=this.tempSource.replace(/”/g,"\"");
this.tempSource=this.tempSource.replace(/‘/g,"'");
this.tempSource=this.tempSource.replace(/’/g,"'");
this.tempSource=recoverTextFromXHR(this.tempSource);
this.setDirty(false);
this.textEditorDocument.body.innerHTML=this.tempSource;
}
catch(ex){
jsExDebug("writer_load",ex);
}
}
function writer_loadFromODT(xml){
try{
if(!xml||!xml.firstChild){
return;
}
var _52="";
for(var i=0;i<xml.childNodes.length;i++){
_52+=xml.childNodes[i].nodeValue;
}
_52=writer_catchHtml(_52);
var _54=_52.toLowerCase().split("</style>");
var _55=_54[0].replace(/<style(.*)/,"$1");
var _56=[];
var _57=null;
var _58=_55.split("}");
var _59=null;
var _5a=null;
var _5b=null;
var _5c=null;
for(var i=0;i<_58.length;i++){
_59=_58[i];
if(_59){
_5a=_59.split("{");
_5b=_5a[0].replace(/\s/g,"");
if(_5b.match(/\./)){
_5c=_5b.split(".")[1];
_56[_5c]={properties:_5a[1]};
}else{
if(_5b=="@page"){
_57=_5a[1];
}
}
}
}
var _5d=_52.split(/style>/i)[1];
var _5e=_5d.replace(/<body(.*)<\/body>/,"$1");
var _5f=null;
var _60=null;
for(var _61 in _56){
if(_56[_61].properties){
_5f=new RegExp("class=\""+_61+"\"","ig");
if(_5e.match(_5f)){
_60=new RegExp("(class=\""+_61+"\")(s)style=\"([\\.\\w\\s\\d;:-]*)\"","ig");
if(_5e.match(_60)){
_5e=_5e.replace(_60,"$2style=\"$3"+_56[_61].properties+"\"");
}
_5e=_5e.replace(_5f,"style=\""+_56[_61].properties+"\"");
}
}
_56[_61].properties=null;
_56[_61]=null;
delete _56[_61];
}
if(_57){
var _62=_57.split(";");
var _63=null;
var _64=null;
var _65=null;
var _66=null;
var _67=[];
var _68=30;
for(i=0;i<_62.length;i++){
_63=_62[i];
if(_63.match(/margin/)){
_65=_63.split(":");
_64=_65[0].replace(/\s/,"");
_66=_65[1];
_66=_66.substring(0,_66.length-4);
switch(_64){
case "margin-left":
_67[0]=_66*_68+"px";
break;
case "margin-right":
_67[2]=_66*_68+"px";
break;
case "margin-top":
_67[1]=_66*_68+"px";
break;
case "margin-bottom":
_67[3]=_66*_68+"px";
break;
}
}
}
this.setMargin(_67.join(" "));
}
_5e=_5e.replace(/“/g,"\"");
_5e=_5e.replace(/”/g,"\"");
_5e=_5e.replace(/‘/g,"'");
_5e=_5e.replace(/’/g,"'");
this.setDirty(false);
this.textEditorDocument.body.innerHTML=_5e;
_5e=null;
_56=null;
xml=null;
}
catch(ex){
jsExDebug("writer_loadFromODT",ex);
}
}
function writer_openTemplate(_69){
function responseHandler(xml,me){
try{
if(xml){
me.load(xml);
}
}
catch(ex){
jsExDebug("writer_openTemplate: responseHandler",ex);
}
}
try{
if(_69){
this.SYSTEM.Network.request("js/xml/templates/"+_69,null,responseHandler,this);
this.SYSTEM.Tooltip.showLoading(null,"WebWriter","Loading template...");
}
}
catch(ex){
jsExDebug("writer_openTemplate",ex);
}
}
function writer_escapeHtml(_6c){
try{
var _6d=_6c.replace(/</g,"%lt%;");
_6d=_6d.replace(/>/g,"%gt%;");
return _6d.replace(/&/g,"%amp%;");
}
catch(ex){
jsExDebug("writer_escapeHtml",ex);
}
}
function writer_catchHtml(_6e){
try{
var _6f=_6e.replace(/%lt%;/g,"<");
_6f=_6f.replace(/%gt%;/g,">");
_6f=_6f.replace(/%amp%;/g,"&");
return _6f;
}
catch(ex){
jsExDebug("writer_catchHtml",ex);
}
}
function writer_focus(){
try{
this.frameElement.contentWindow.focus();
}
catch(ex){
jsExDebug("writer_focus",ex);
}
}
function writer_setDimensions(_70,_71){
try{
this.widget_setDimensions(_70,_71);
this.frameElement.style.width=(this.width-this.CONTAINER_PADDING)+"px";
this.frameElement.style.height=(this.height-this.CONTAINER_PADDING)+"px";
}
catch(ex){
jsExDebug("writer_setDimensions",ex);
}
}
function writer_notifySelectionChange(_72){
try{
this.selectionChangeDelegate=_72;
}
catch(ex){
jsExDebug("writer_notifySelectionChange",ex);
}
}
function writer_setContainerObject(obj){
try{
this.containerObject=obj;
}
catch(ex){
jsExDebug("writer_setContainerObject",ex);
}
}
function writer_getIFramePosition(){
try{
var x;
var y;
if(this.containerObject){
x=this.containerObject.positionX+this.positionX;
y=this.containerObject.positionY+this.positionY;
}else{
x=this.positionX;
y=this.positionY;
}
return {x:x,y:y};
}
catch(ex){
jsExDebug("writer_getIFramePosition",ex);
}
}
function writer_runCommand(_76,val){
try{
this.selectCurrentRange();
try{
this.textEditorDocument.execCommand(_76,false,val);
}
catch(ex1){
this.textEditorDocument.designMode="off";
this.textEditorDocument.designMode="on";
this.textEditorDocument.execCommand(_76,false,val);
}
this.setDirty(true);
this.updateSettings();
}
catch(ex){
var msg=(ex.message)?ex.message:ex;
if(msg=="Node was not found"){
this.setDirty(true);
this.updateSettings();
}else{
jsExDebug("writer_runCommand",ex);
}
}
}
function writer_queryState(_79){
try{
return this.textEditorDocument.queryCommandState(_79);
}
catch(ex){
}
}
function writer_queryValue(_7a){
try{
return this.textEditorDocument.queryCommandValue(_7a);
}
catch(ex){
}
}
function writer_isCommandSupported(_7b){
try{
return this.textEditorDocument.queryCommandSupported(_7b);
}
catch(ex){
jsExDebug("writer_isCommandSupported",ex);
}
}
function writer_getDocumentSource(){
try{
return this.textEditorDocument.body.innerHTML;
}
catch(ex){
jsExDebug("writer_getDocumentSource",ex);
}
}
function writer_getDocumentText(){
try{
if(this.textEditorDocument.body.innerText){
return this.textEditorDocument.body.innerText;
}else{
return this.textEditorDocument.body.textContent;
}
}
catch(ex){
jsExDebug("writer_getDocumentText",ex);
}
}
function writer_getTextAtRange(){
try{
if(this.textEditorDocument.getSelection){
return this.textEditorDocument.getSelection();
}else{
if(this.textEditorDocument.selection){
return this.textEditorDocument.selection.createRange().text;
}
}
return "";
}
catch(ex){
jsExDebug("writer_getDocumentText",ex);
}
}
function writer_changeCase(_7c){
try{
if(document.all){
alert("Case not implemented");
return;
}
if(!this.currentRange){
this.setCurrentRange();
}
if(this.currentRange){
var _7d=this.currentRange.commonAncestorContainer;
function recurseChildren(_7e){
if(!_7e){
return;
}
if(_7e.childNodes){
for(var i=0;i<_7e.childNodes.length;i++){
recurseChildren.apply(this,[_7e.childNodes[i]]);
}
}
if(_7e.nodeType==3&&((this.currentRange.isPointInRange(_7e,0)||this.currentRange.isPointInRange(_7e,_7e.data.length))||_7d==_7e)){
var _80=document.createTextNode("");
for(var j=0;j<_7e.data.length;j++){
if(this.currentRange.isPointInRange(_7e,j)&&!((_7e==this.currentRange.endContainer&&j==this.currentRange.endOffset))){
switch(_7c){
case "upper":
_80.data+=_7e.data[j].toUpperCase();
break;
case "lower":
_80.data+=_7e.data[j].toLowerCase();
break;
case "toggle":
var ch=_7e.data[j];
_80.data+=(ch.match(/^[A-Z]/))?ch.toLowerCase():ch.toUpperCase();
break;
}
}else{
_80.data+=_7e.data[j];
}
}
var _83=_7e.parentNode;
_83.replaceChild(_80,_7e);
}
}
recurseChildren.apply(this,[_7d]);
}
}
catch(ex){
jsExDebug("writer_changeCase",ex);
}
}
function writer_toggleView(){
try{
if(this.viewMode==0){
this.viewMode=1;
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
this.textEditorDocument.body.innerText=this.textEditorDocument.body.innerHTML;
}else{
this.textEditorDocument.body.textContent=this.textEditorDocument.body.innerHTML;
}
}else{
this.viewMode=0;
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
this.textEditorDocument.body.innerHTML=this.textEditorDocument.body.innerText;
}else{
this.textEditorDocument.body.innerHTML=this.textEditorDocument.body.textContent;
}
}
}
catch(ex){
jsExDebug("writer_toggleView",ex);
}
}
function writer_setMargin(_84){
try{
if(_84||_84===0){
this.marginSize=parseInt(_84);
}
this.textEditorDocument.body.style.margin=this.marginSize+"px";
this.setDirty(true);
}
catch(ex){
jsExDebug("writer_setMargin",ex);
}
}
function writer_setContent(_85){
try{
if(this.frameElement.contentWindow.document.innerText){
this.frameElement.contentWindow.document.innerText=_85;
}else{
this.frameElement.contentWindow.document.textContent=_85;
}
this.setDirty(true);
}
catch(ex){
jsExDebug("writer_setContent",ex);
}
}
function writer_setRichContent(_86){
try{
this.frameElement.contentWindow.document.body.innerHTML=_86;
this.setDirty(true);
}
catch(ex){
jsExDebug("writer_setRichContent",ex);
}
}
function writer_undo(){
try{
this.runCommand("undo");
}
catch(ex){
jsExDebug("writer_undo",ex);
}
}
function writer_redo(){
try{
this.runCommand("redo");
}
catch(ex){
jsExDebug("writer_redo",ex);
}
}
function writer_copy(){
try{
this.runCommand("copy");
}
catch(ex){
jsExDebug("writer_copy",ex);
}
}
function writer_cut(){
try{
this.runCommand("cut");
}
catch(ex){
jsExDebug("writer_cut",ex);
}
}
function writer_paste(){
try{
this.runCommand("paste");
this.checkDocumentAfterPaste();
}
catch(ex){
jsExDebug("writer_paste",ex);
}
}
function writer_styleBold(_87){
try{
this.runCommand("bold");
}
catch(ex){
jsExDebug("writer_styleBold",ex);
}
}
function writer_styleItalic(_88){
try{
this.runCommand("italic");
}
catch(ex){
jsExDebug("writer_styleItalic",ex);
}
}
function writer_styleUnderline(_89){
try{
this.runCommand("underline");
}
catch(ex){
jsExDebug("writer_styleUnderline",ex);
}
}
function writer_styleStrikeout(_8a){
try{
this.runCommand("strikethrough");
}
catch(ex){
jsExDebug("writer_styleStrikeout",ex);
}
}
function writer_styleSuperscript(){
try{
this.runCommand("superscript");
}
catch(ex){
jsExDebug("writer_styleSuperscript",ex);
}
}
function writer_styleSubscript(){
try{
this.runCommand("subscript");
}
catch(ex){
jsExDebug("writer_styleSubscript",ex);
}
}
function writer_styleIndent(){
try{
this.runCommand("indent");
}
catch(ex){
jsExDebug("writer_styleIndent",ex);
}
}
function writer_styleOutdent(){
try{
this.runCommand("outdent");
}
catch(ex){
jsExDebug("writer_styleOutdent",ex);
}
}
function writer_styleAlignLeft(_8b){
try{
this.runCommand("justifyLeft");
}
catch(ex){
jsExDebug("writer_styleAlignLeft",ex);
}
}
function writer_styleAlignCentre(_8c){
try{
this.runCommand("justifyCenter");
}
catch(ex){
jsExDebug("writer_styleAlignCentre",ex);
}
}
function writer_styleAlignRight(_8d){
try{
this.runCommand("justifyRight");
}
catch(ex){
jsExDebug("writer_styleAlignRight",ex);
}
}
function writer_styleJustify(_8e){
try{
this.runCommand("justifyFull");
}
catch(ex){
jsExDebug("writer_styleJustify",ex);
}
}
function writer_styleTextDirection(_8f){
function setTextDirection(_90){
try{
if(_90.nodeName.toLowerCase()=="p"){
_90.dir=_8f;
}
}
catch(ex){
jsExDebug("writer_styleTextDirection: setTextDirection",ex);
}
}
try{
if(this.currentRange&&this.currentRange.commonAncestorContainer.nodeName.toLowerCase()=="body"){
this.setCurrentRange();
}
this.selectCurrentRange();
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.GECKO_COMPATABLE){
var _91=this.currentRange;
var _92=writer_getParentFormatBlock(_91.commonAncestorContainer);
if(_92){
setTextDirection(_92);
}else{
var _93=writer_getParentFormatBlock(_91.startContainer);
var _94=writer_getParentFormatBlock(_91.endContainer);
while(_93!=_94.nextSibling){
setTextDirection(_93);
_93=_93.nextSibling;
}
}
}else{
return;
}
this.setDirty(true);
}
catch(ex){
jsExDebug("writer_styleTextDirection",ex);
}
}
function writer_styleFormatBlock(_95){
try{
this.runCommand("formatblock",_95);
}
catch(ex){
jsExDebug("styleFormatBlock",ex);
}
}
function writer_styleBgColour(_96){
try{
if(document.all){
this.runCommand("backcolor",_96);
}else{
this.runCommand("hilitecolor",_96);
}
}
catch(ex){
jsExDebug("writer_styleBgColour",ex);
}
}
function writer_styleTextColour(_97){
try{
this.runCommand("forecolor",_97);
}
catch(ex){
jsExDebug("writer_styleTextColour",ex);
}
}
function writer_styleFontFace(_98){
try{
this.runCommand("fontname",_98);
}
catch(ex){
jsExDebug("writer_styleFontFace",ex);
}
}
function writer_styleFontSize(_99){
try{
this.runCommand("fontsize",_99);
}
catch(ex){
jsExDebug("writer_styleFontSize",ex);
}
}
function writer_getTableClass(_9a,_9b){
try{
if(_9a==0){
return "invis";
}
for(var i=0;i<this.colourArray.length;i++){
if(_9b.replace(/\s*/g,"")==this.colourArray[i].replace(/\s*/g,"")){
return sprint("table$1px$2",_9a,i);
}
}
}
catch(ex){
jsExDebug("writer_getTableClass",ex);
}
}
function writer_styleTableBorders(_9d,_9e,_9f){
try{
this.setCurrentRange();
this.selectCurrentRange();
var _a0=this.currentRange;
var _a1;
if(this.currentRange){
if(document.all){
_a0=this.currentRange;
_a1=writer_getParentTable(_a0.parentElement());
}else{
var _a2=this.frameElement.contentWindow.getSelection();
_a0=_a2.getRangeAt(0);
_a1=writer_getParentTable(_a0.commonAncestorContainer);
}
}
if(_a1){
var cls=this.getTableClass(_9d,_9e);
_a1.className=cls;
this.setDirty(true);
if(this.SYSTEM.Environment.USER_AGENT!=this.SYSTEM.Environment.INTERNET_EXPLORER){
var _a4=this.textEditorDocument.body.innerHTML;
this.textEditorDocument.body.innerHTML="";
this.textEditorDocument.body.innerHTML=_a4;
_a4=null;
}
}
}
catch(ex){
jsExDebug("writer_styleTableBorders",ex);
}
}
function writer_getParentTable(_a5){
try{
if((_a5==null)||(_a5.nodeName.toLowerCase()=="body")){
return false;
}else{
if(_a5.nodeName.toLowerCase()=="table"){
return _a5;
}else{
return writer_getParentTable(_a5.parentNode);
}
}
}
catch(ex){
jsExDebug("writer_getParentTable",ex);
}
}
function writer_insertHorizontalRule(){
try{
this.runCommand("inserthorizontalrule");
}
catch(ex){
jsExDebug("writer_insertHorizontalRule",ex);
}
}
function writer_insertPageBreak(){
try{
this.selectCurrentRange();
var _a6="<p class='pb' align='center'><br></p><p><br></p>";
this.iframePasteAtRange(_a6);
}
catch(ex){
jsExDebug("insertPageBreak",ex);
}
}
function writer_insertTable(_a7,_a8,_a9,_aa,_ab,_ac){
try{
this.selectCurrentRange();
if((_a7>0)&&(_a8>0)){
if(!_ac){
_ac="solid";
}
var _ad=_ac+" "+_a9+"px "+_ab;
var _ae=sprint("<table cellspacing=\"0\" class=\"$1\" style=\"width:$2\"><tbody>",this.getTableClass(_a9,_ab),_aa);
var _af="<tr style='height: 24px'>";
for(var i=0;i<_a8;i++){
_af+="<td>&nbsp;</td>";
}
_af+="</tr>";
for(var i=0;i<_a7;i++){
_ae+=_af;
}
_ae+="</tbody></table><p><span>&nbsp;</span></p>";
this.iframePasteAtRange(_ae);
}
}
catch(ex){
jsExDebug("writer_insertTable",ex);
}
}
function writer_deleteTable(){
try{
this.setCurrentRange();
var _b1=this.currentRange;
var _b2;
if(this.currentRange){
if(document.all){
_b1=this.currentRange;
_b2=writer_getParentTable(_b1.parentElement());
}else{
var _b3=this.frameElement.contentWindow.getSelection();
_b1=_b3.getRangeAt(0);
_b2=writer_getParentTable(_b1.commonAncestorContainer);
}
}
if(_b2){
function doTableDelete(yes){
if(yes){
_b2.parentNode.removeChild(_b2);
this.setDirty(true);
}
}
var _b5=new this.SYSTEM.Dialogue.YesNoAlert(this.parentApplication,"Delete Table","Are you sure you want to delete this table? All content will be lost.",new this.SYSTEM.Delegate(this,doTableDelete));
}
}
catch(ex){
jsExDebug("writer_deleteTable",ex);
}
}
function writer_insertImage(url){
try{
this.runCommand("insertimage",url);
}
catch(ex){
jsExDebug("writer_insertImage",ex);
}
}
function writer_insertLink(url){
try{
this.runCommand("createlink",url);
}
catch(ex){
jsExDebug("writer_insertLink",ex);
}
}
function writer_insertOrderedList(){
try{
this.runCommand("insertorderedlist");
}
catch(ex){
jsExDebug("writer_insertOrderedList",ex);
}
}
function writer_insertUnorderedList(){
try{
this.runCommand("insertunorderedlist");
}
catch(ex){
jsExDebug("writer_insertUnorderedList",ex);
}
}
function writer_removeFormatting(){
try{
this.runCommand("removeformat");
}
catch(ex){
jsExDebug("writer_removeFormatting",ex);
}
}
function writer_removeLink(){
try{
this.runCommand("unlink");
}
catch(ex){
jsExDebug("writer_removeLink",ex);
}
}
function writer_iframePasteAtRange(_b8){
try{
this.selectCurrentRange();
if(document.all){
this.textEditorDocument.selection.createRange().pasteHTML(_b8);
this.setCurrentRange();
this.selectCurrentRange();
}else{
this.textEditorDocument.execCommand("inserthtml",false,_b8);
}
this.setDirty(true);
}
catch(ex){
jsExDebug("writer_iframePasteAtRange",ex);
}
}
function writer_spellCheck(_b9){
function tableCheckCallback(_ba){
try{
checkNode.call(this,_ba+1);
}
catch(ex){
jsExDebug("writer_spellCheck: tableCheckCallback",ex);
}
}
function checkNode(_bb){
try{
var _bc=this.textEditorDocument.body.childNodes[_bb];
if(_bc){
if(this.isFormattedBlock(_bc)){
if(_bc.nodeName.toLowerCase()=="table"){
this.spellCheckTable(_bc,_bb,_bd,new this.SYSTEM.Delegate(this,tableCheckCallback));
}else{
_bd.checkFormattedText(new this.SYSTEM.Delegate(this,changeCallback),_bc.innerHTML,{node:_bc,nextOffset:_bb+1});
}
}else{
checkNode.call(this,_bb+1);
}
}else{
_bd.close();
var _be=new this.SYSTEM.Dialogue.OkAlert(null,"Spell check","Spell check complete!");
}
}
catch(ex){
jsExDebug("writer_spellCheck: checkNode",ex);
}
}
function changeCallback(_bf,_c0){
try{
if(_bf){
_c0.node.innerHTML=_bf;
this.setDirty(true);
}
checkNode.call(this,_c0.nextOffset);
}
catch(ex){
jsExDebug("writer_spellCheck: changeCallback",ex);
}
}
function changeAllCallback(_c1,_c2,_c3){
try{
if(!_c1.length||!_c2.length){
return;
}
var _c4=this.textEditorDocument.body.childNodes;
for(var i=0;i<_c4.length;i++){
var _c6=_c4[i];
if(_c6&&_c6.innerHTML){
var _c7=new RegExp("\\b"+_c1+"\\b","g");
_c6.innerHTML=_c6.innerHTML.replace(_c7,_c2);
}
}
if(_c3){
_c3.invoke();
}
}
catch(ex){
jsExDebug("writer_spellCheck: changeAllCallback",ex);
}
}
try{
var _bd=new this.SYSTEM.Dialogue.SpellChecker(_b9,new this.SYSTEM.Delegate(this,changeAllCallback));
checkNode.call(this,0);
}
catch(ex){
jsExDebug("writer_spellCheck",ex);
}
}
function writer_spellCheckTable(_c8,_c9,_ca,_cb){
function cellChangeCallback(_cc,_cd){
try{
if(_cc){
_cd.cell.innerHTML=_cc;
this.setDirty(true);
}
checkCell.call(this,_cd.nextOffset);
}
catch(ex){
jsExDebug("writer_spellCheckTable: cellChangeCallback",ex);
}
}
function checkCell(_ce){
try{
var _cf=_d0[_ce];
if(_cf&&_cf.innerHTML){
_ca.checkFormattedText(new this.SYSTEM.Delegate(this,cellChangeCallback),_cf.innerHTML,{cell:_cf,nextOffset:_ce+1});
}else{
if(_cb){
_cb.invoke(_c9);
}
}
}
catch(ex){
jsExDebug("writer_spellCheckTable: checkCell",ex);
}
}
try{
var _d0=[];
for(var i=0;i<_c8.childNodes.length;i++){
var _d2=_c8.childNodes[i];
for(var j=0;j<_d2.childNodes.length;j++){
var row=_d2.childNodes[j];
if(row&&row.nodeName.toLowerCase()=="tr"){
for(var k=0;k<row.childNodes.length;k++){
var _d6=row.childNodes[k];
if(_d6){
var _d7=_d6.nodeName.toLowerCase();
if(_d7=="td"||_d7=="th"){
_d0.push(_d6);
}
}
}
}
}
}
checkCell.call(this,0);
}
catch(ex){
jsExDebug("writer_spellCheckTable",ex);
}
}
function writer_setLineSpacing(_d8){
try{
this.textEditorDocument.body.style.lineHeight=_d8;
this.setDirty(true);
}
catch(ex){
jsExDebug("writer_setLineSpacing",ex);
}
}
function writer_insertMapImage(_d9,_da,_db,_dc,_dd,_de){
try{
var _df=this.textEditorDocument.createElement("img ");
_df.setAttribute("mercLeft",_db);
_df.setAttribute("mercRight",_dc);
_df.setAttribute("mercTop",_dd);
_df.setAttribute("mercBottom",_de);
this.textEditorDocument.body.appendChild(_df);
this.setDirty(true);
}
catch(ex){
jsExDebug("writer_insertMapImage",ex);
}
}
function writer_updateSettings(){
var me=this;
function callDelegate(){
try{
me.selectionChangeDelegate.invoke();
}
catch(ex){
jsExDebug("writer_updateSettings: callDelegate",ex);
}
}
try{
this.settingBold=this.queryState("bold");
this.settingItalic=this.queryState("italic");
this.settingUnderline=this.queryState("underline");
this.settingStrikeout=this.queryState("strikethrough");
this.settingSuperscript=this.queryState("superscript");
this.settingSubscript=this.queryState("subscript");
this.settingTextColour=this.queryValue("forecolor");
this.settingFontFace=this.queryValue("fontname");
this.settingFontSize=this.queryValue("fontsize");
this.settingAlignLeft=this.queryState("justifyLeft");
this.settingAlignRight=this.queryState("justifyRight");
this.settingAlignCentre=this.queryState("justifyCenter");
this.settingAlignJustify=this.queryState("justifyFull");
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER){
this.settingBgColour=this.queryValue("backcolor");
}else{
this.settingBgColour=this.queryValue("hilitecolor");
}
if(!this.settingTextColour){
this.settingTextColour="rgb( 0, 0, 0 )";
}
if(!this.settingFontFace){
this.settingFontFace=this.SYSTEM.Settings.get("default_font_family");
}
if(!this.settingFontSize){
this.settingFontSize=this.SYSTEM.Settings.get("default_font_size");
}
if(!this.settingBgColour){
this.settingBgColour="transparent";
}
var _e1;
if(this.currentRange){
if((this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.INTERNET_EXPLORER)&&this.currentRange.parentElement){
_e1=writer_getParentFormatBlock(this.currentRange.parentElement());
}else{
_e1=writer_getParentFormatBlock(this.currentRange.commonAncestorContainer);
}
}
if(_e1){
if(_e1.nodeName){
this.settingFormatBlock=_e1.nodeName.toLowerCase();
}else{
this.settingFormatBlock="";
}
if(_e1.dir=="rtl"){
this.settingTextDirection="rtl";
}else{
this.settingTextDirection="ltr";
}
}
if(this.selectionChangeDelegate){
setTimeout(callDelegate,10);
}
}
catch(ex){
jsExDebug("writer_updateSettings",ex);
}
}

try{
calculatorApp_t.prototype=new application_t();
calculatorApp_t.prototype.constructor=calculatorApp_t;
calculatorApp_t.prototype.calculatorApp_super=application_t.prototype.constructor;
calculatorApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
calculatorApp_t.prototype.cleanUp=calculatorApp_cleanUp;
calculatorApp_t.prototype.capture=calculatorApp_capture;
calculatorApp_t.prototype.restore=calculatorApp_restore;
calculatorApp_t.prototype._SIG_KILL=calculatorApp__SIG_KILL;
calculatorApp_t.prototype._SIG_THEME=calculatorApp__SIG_THEME;
calculatorApp_t.prototype.binding_quickHelpBtn_click=calculatorApp_binding_quickHelpBtn_click;
calculatorApp_t.prototype.binding_btn1_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn2_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn3_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn4_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn5_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn6_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn7_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn8_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn9_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn0_click=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btnPeriod_click=calculatorApp_binding_btnPeriod_click;
calculatorApp_t.prototype.binding_btnEquals_click=calculatorApp_binding_btnEquals_click;
calculatorApp_t.prototype.binding_btnPercent_click=calculatorApp_binding_btnPercent_click;
calculatorApp_t.prototype.binding_btnDivide_click=calculatorApp_binding_btnDivide_click;
calculatorApp_t.prototype.binding_btnMultiply_click=calculatorApp_binding_btnMultiply_click;
calculatorApp_t.prototype.binding_btnAdd_click=calculatorApp_binding_btnAdd_click;
calculatorApp_t.prototype.binding_btnMinus_click=calculatorApp_binding_btnMinus_click;
calculatorApp_t.prototype.binding_btnAC_click=calculatorApp_binding_btnAC_click;
calculatorApp_t.prototype.binding_btnCE_click=calculatorApp_binding_btnCE_click;
calculatorApp_t.prototype.binding_btnRB_click=calculatorApp_binding_btnRB_click;
calculatorApp_t.prototype.binding_btnLB_click=calculatorApp_binding_btnLB_click;
calculatorApp_t.prototype.binding_btnPi_click=calculatorApp_binding_btnPi_click;
calculatorApp_t.prototype.binding_btnMS_click=calculatorApp_binding_btnMS_click;
calculatorApp_t.prototype.binding_btnMR_click=calculatorApp_binding_btnMR_click;
calculatorApp_t.prototype.binding_btnMPlus_click=calculatorApp_binding_btnMPlus_click;
calculatorApp_t.prototype.binding_btnMC_click=calculatorApp_binding_btnMC_click;
calculatorApp_t.prototype.binding_btnPlusMinus_click=calculatorApp_binding_btnPlusMinus_click;
if(document.all){
calculatorApp_t.prototype.binding_btn1_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn2_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn3_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn4_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn5_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn6_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn7_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn8_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn9_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btn0_dblClick=calculatorApp_binding_numeralBtn_click;
calculatorApp_t.prototype.binding_btnPeriod_dblClick=calculatorApp_binding_btnPeriod_click;
calculatorApp_t.prototype.binding_btnEquals_dblClick=calculatorApp_binding_btnEquals_click;
calculatorApp_t.prototype.binding_btnPercent_dblClick=calculatorApp_binding_btnPercent_click;
calculatorApp_t.prototype.binding_btnDivide_dblClick=calculatorApp_binding_btnDivide_click;
calculatorApp_t.prototype.binding_btnMultiply_dblClick=calculatorApp_binding_btnMultiply_click;
calculatorApp_t.prototype.binding_btnAdd_dblClick=calculatorApp_binding_btnAdd_click;
calculatorApp_t.prototype.binding_btnMinus_dblClick=calculatorApp_binding_btnMinus_click;
calculatorApp_t.prototype.binding_btnAC_dblClick=calculatorApp_binding_btnAC_click;
calculatorApp_t.prototype.binding_btnCE_dblClick=calculatorApp_binding_btnCE_click;
calculatorApp_t.prototype.binding_btnRB_dblClick=calculatorApp_binding_btnRB_click;
calculatorApp_t.prototype.binding_btnLB_dblClick=calculatorApp_binding_btnLB_click;
calculatorApp_t.prototype.binding_btnPi_dblClick=calculatorApp_binding_btnPi_click;
calculatorApp_t.prototype.binding_btnMS_dblClick=calculatorApp_binding_btnMS_click;
calculatorApp_t.prototype.binding_btnMR_dblClick=calculatorApp_binding_btnMR_click;
calculatorApp_t.prototype.binding_btnMPlus_dblClick=calculatorApp_binding_btnMPlus_click;
calculatorApp_t.prototype.binding_btnMC_dblClick=calculatorApp_binding_btnMC_click;
calculatorApp_t.prototype.binding_btnPlusMinus_dblClick=calculatorApp_binding_btnPlusMinus_click;
}
calculatorApp_t.prototype.calcWindow_keyDown=calculatorApp_calcWindow_keyDown;
calculatorApp_t.prototype.calcWindow_keyPress=calculatorApp_calcWindow_keyPress;
calculatorApp_t.prototype.calcWindow__onClose=calculatorApp_calcWindow__onClose;
calculatorApp_t.prototype.APP_ID=APP_ID_CALCULATOR;
calculatorApp_t.prototype.APP_NAME="Calculator";
calculatorApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.CALCULATOR;
calculatorApp_t.prototype.DISPLAY_WIDTH=275;
calculatorApp_t.prototype.DISPLAY_HEIGHT=30;
calculatorApp_t.prototype.BUTTON_WIDTH=40;
calculatorApp_t.prototype.BUTTON_HEIGHT=30;
calculatorApp_t.prototype.BUTTON_TALL_WIDTH=40;
calculatorApp_t.prototype.BUTTON_TALL_HEIGHT=65;
calculatorApp_t.prototype.BUTTON_LONG_WIDTH=85;
calculatorApp_t.prototype.BUTTON_LONG_HEIGHT=30;
calculatorApp_t.prototype.BUTTON_GAP=5;
calculatorApp_t.prototype.BUTTON_SECTION2_X=210;
calculatorApp_t.prototype.FRAME_HEIGHT=246;
calculatorApp_t.prototype.BUTTON_SRC="img/app/system/widgets/blankbutton/40x30";
calculatorApp_t.prototype.BUTTON_TALL_SRC="img/app/system/widgets/blankbutton/40x65";
calculatorApp_t.prototype.BUTTON_LONG_SRC="img/app/system/widgets/blankbutton/85x30";
}
catch(ex){
jsExDebug("spreadsheetApp_t.prototype",ex);
}
function calculatorApp_t(){
try{
this.calculatorApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.calculator=new calculator_t();
var _1=this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN;
var _2=new SYSTEM.Frame.Window("calcWindow","Calculator",this,null,null,true,false,_1);
var _3=_2.topEdgeHeight+this.DISPLAY_HEIGHT+this.BUTTON_GAP;
var _4=_2.leftEdgeWidth;
var _5=this.BUTTON_HEIGHT+this.BUTTON_GAP;
var _6=this.BUTTON_WIDTH+this.BUTTON_GAP;
var _7="normal 12px verdana";
var _8=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE;
var _9=new this.SYSTEM.Widget.ClassButton("btnPi",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"Pi");
_2.addWidget(_9,_4,_3);
var _a=new this.SYSTEM.Widget.ClassButton("btnDivide",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"/");
_2.addWidget(_a,_4+_6,_3);
var _b=new this.SYSTEM.Widget.ClassButton("btnMultiply",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"X");
_2.addWidget(_b,_4+(_6*2),_3);
var _c=new this.SYSTEM.Widget.ClassButton("btnMinus",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"-");
_2.addWidget(_c,_4+(_6*3),_3);
var _d=new this.SYSTEM.Widget.ClassButton("btn7",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"7");
_d.setValue(7);
_2.addWidget(_d,_4,_3+_5);
var _e=new this.SYSTEM.Widget.ClassButton("btn8",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"8");
_e.setValue(8);
_2.addWidget(_e,_4+_6,_3+_5);
var _f=new this.SYSTEM.Widget.ClassButton("btn9",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"9");
_f.setValue(9);
_2.addWidget(_f,_4+(_6*2),_3+_5);
var _10=new this.SYSTEM.Widget.ClassButton("btnAdd",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"+");
_2.addWidget(_10,_4+(_6*3),_3+_5);
var _11=new this.SYSTEM.Widget.ClassButton("btn4",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"4");
_11.setValue(4);
_2.addWidget(_11,_4,_3+(_5*2));
var _12=new this.SYSTEM.Widget.ClassButton("btn5",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"5");
_12.setValue(5);
_2.addWidget(_12,_4+_6,_3+(_5*2));
var _13=new this.SYSTEM.Widget.ClassButton("btn6",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"6");
_13.setValue(6);
_2.addWidget(_13,_4+(_6*2),_3+(_5*2));
var _14=new this.SYSTEM.Widget.ClassButton("btn1",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"1");
_14.setValue(1);
_2.addWidget(_14,_4,_3+(_5*3));
var _15=new this.SYSTEM.Widget.ClassButton("btn2",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"2");
_15.setValue(2);
_2.addWidget(_15,_4+_6,_3+(_5*3));
var _16=new this.SYSTEM.Widget.ClassButton("btn3",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"3");
_16.setValue(3);
_2.addWidget(_16,_4+(_6*2),_3+(_5*3));
var _17=new this.SYSTEM.Widget.ClassButton("btnEquals",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_TALL_WIDTH,this.BUTTON_TALL_HEIGHT,null,"=");
_2.addWidget(_17,_4+(_6*3),_3+(_5*3));
var _18=new this.SYSTEM.Widget.ClassButton("btn0",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_LONG_WIDTH,this.BUTTON_LONG_HEIGHT,null,"0");
_18.setValue(0);
_2.addWidget(_18,_4,_3+(_5*4));
var _19=new this.SYSTEM.Widget.ClassButton("btnPeriod",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,".");
_2.addWidget(_19,_4+(_6*2),_3+(_5*4));
var _1a=new this.SYSTEM.Widget.ClassButton("btnCE",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"CE");
_2.addWidget(_1a,this.BUTTON_SECTION2_X,_3);
var _1b=new this.SYSTEM.Widget.ClassButton("btnAC",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"AC");
_2.addWidget(_1b,this.BUTTON_SECTION2_X+_6,_3);
var _1c=new this.SYSTEM.Widget.ClassButton("btnLB",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"(");
_2.addWidget(_1c,this.BUTTON_SECTION2_X,_3+_5);
var _1d=new this.SYSTEM.Widget.ClassButton("btnRB",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,")");
_2.addWidget(_1d,this.BUTTON_SECTION2_X+_6,_3+_5);
var _1e=new this.SYSTEM.Widget.ClassButton("btnMR",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"MR");
_2.addWidget(_1e,this.BUTTON_SECTION2_X,_3+(_5*2));
var _1f=new this.SYSTEM.Widget.ClassButton("btnMS",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"MS");
_2.addWidget(_1f,this.BUTTON_SECTION2_X+_6,_3+(_5*2));
var _20=new this.SYSTEM.Widget.ClassButton("btnMPlus",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"M+");
_2.addWidget(_20,this.BUTTON_SECTION2_X,_3+(_5*3));
var _21=new this.SYSTEM.Widget.ClassButton("btnMC",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"MC");
_2.addWidget(_21,this.BUTTON_SECTION2_X+_6,_3+(_5*3));
var _22=new this.SYSTEM.Widget.ClassButton("btnPercent",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"%");
_2.addWidget(_22,this.BUTTON_SECTION2_X,_3+(_5*4));
var _23=new this.SYSTEM.Widget.ClassButton("btnPlusMinus",classButton_t.prototype.TYPE_FIXED_TEXT_BUTTON,this.BUTTON_WIDTH,this.BUTTON_HEIGHT,null,"+/-");
_2.addWidget(_23,this.BUTTON_SECTION2_X+_6,_3+(_5*4));
_2.setFixedDimensions(this.BUTTON_SECTION2_X+(2*this.BUTTON_WIDTH)+this.BUTTON_GAP+_2.rightEdgeWidth,_23.positionY+_23.height+_2.bottomEdgeHeight);
var _24=new this.SYSTEM.Widget.CharacterDisplay("display",_2.getInternalWidth()-5,this.DISPLAY_HEIGHT);
_24.setContent("0");
_2.addWidget(_24,_4,_2.topEdgeHeight);
this.display=_24;
this.btn1=_14;
this.btn2=_15;
this.btn3=_16;
this.btn4=_11;
this.btn5=_12;
this.btn6=_13;
this.btn7=_d;
this.btn8=_e;
this.btn9=_f;
this.btn0=_18;
this.btnEquals=_17;
this.btnPeriod=_19;
this.btnCE=_1a;
this.btnAC=_1b;
this.btnLB=_1c;
this.btnRB=_1d;
this.btnMR=_1e;
this.btnMS=_1f;
this.btnMPlus=_20;
this.btnMC=_21;
this.btnPercent=_22;
this.btnPlusMinus=_23;
this.btnDivide=_a;
this.btnMultiply=_b;
this.btnMinus=_c;
this.btnAdd=_10;
this.btnPi=_9;
this.calcWindow=_2;
_2.show();
this.APPLICATION.Panel.addUtility(new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+"."));
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("calculatorApp_t",ex);
}
}
function calculatorApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.display=null;
me.btn1=null;
me.btn2=null;
me.btn3=null;
me.btn4=null;
me.btn5=null;
me.btn6=null;
me.btn7=null;
me.btn8=null;
me.btn9=null;
me.btn0=null;
me.btnEquals=null;
me.btnPeriod=null;
me.btnCE=null;
me.btnAC=null;
me.btnLB=null;
me.btnRB=null;
me.btnMR=null;
me.btnMS=null;
me.btnMPlus=null;
me.btnMC=null;
me.btnPercent=null;
me.btnPlusMinus=null;
me.btnDivide=null;
me.btnMultiply=null;
me.btnMinus=null;
me.btnAdd=null;
me.btnPi=null;
me.calcWindow=null;
me.calculator.cleanUp();
me.calculator=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("calculatorApp_cleanUp",ex);
}
}
function calculatorApp_capture(){
try{
var _26=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
var _27=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="calc:"+(this.calcWindow.positionX/_27)+","+((this.calcWindow.positionY-this.SYSTEM.Panel.getHeight())/_26);
return this.captureString;
}
catch(ex){
jsExDebug("calculatorApp_capture",ex);
}
}
function calculatorApp_restore(_28){
try{
if(!_28){
return;
}
var _29=_28.split(":")[1].split(",");
var _2a=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
var _2b=this.SYSTEM.Environment.SCREEN_WIDTH;
var _2c=parseInt(_2b*parseFloat(_29[0]));
var top=parseInt((_2a*parseFloat(_29[1]))+this.SYSTEM.Panel.getHeight());
this.calcWindow.setPosition(_2c,top);
}
catch(ex){
jsExDebug("calculatorApp_restore",ex);
}
}
function calculatorApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("calculatorApp__SIG_KILL",ex);
}
}
function calculatorApp__SIG_THEME(){
try{
var _2e=this.calcWindow;
var _2f=_2e.topEdgeHeight+this.DISPLAY_HEIGHT+this.BUTTON_GAP;
var _30=_2e.leftEdgeWidth;
var _31=this.BUTTON_HEIGHT+this.BUTTON_GAP;
var _32=this.BUTTON_WIDTH+this.BUTTON_GAP;
_2e.getWidget("btnPi").setPosition(_30,_2f);
_2e.getWidget("btnDivide").setPosition(_30+_32,_2f);
_2e.getWidget("btnMultiply").setPosition(_30+(_32*2),_2f);
_2e.getWidget("btnMinus").setPosition(_30+(_32*3),_2f);
_2e.getWidget("btn7").setPosition(_30,_2f+_31);
_2e.getWidget("btn8").setPosition(_30+_32,_2f+_31);
_2e.getWidget("btn9").setPosition(_30+(_32*2),_2f+_31);
_2e.getWidget("btnAdd").setPosition(_30+(_32*3),_2f+_31);
_2e.getWidget("btn4").setPosition(_30,_2f+(_31*2));
_2e.getWidget("btn5").setPosition(_30+_32,_2f+(_31*2));
_2e.getWidget("btn6").setPosition(_30+(_32*2),_2f+(_31*2));
_2e.getWidget("btn1").setPosition(_30,_2f+(_31*3));
_2e.getWidget("btn2").setPosition(_30+_32,_2f+(_31*3));
_2e.getWidget("btn3").setPosition(_30+(_32*2),_2f+(_31*3));
_2e.getWidget("btnEquals").setPosition(_30+(_32*3),_2f+(_31*3));
_2e.getWidget("btn0").setPosition(_30,_2f+(_31*4));
_2e.getWidget("btnPeriod").setPosition(_30+(_32*2),_2f+(_31*4));
_2e.getWidget("btnCE").setPosition(this.BUTTON_SECTION2_X,_2f);
_2e.getWidget("btnAC").setPosition(this.BUTTON_SECTION2_X+_32,_2f);
_2e.getWidget("btnLB").setPosition(this.BUTTON_SECTION2_X,_2f+_31);
_2e.getWidget("btnRB").setPosition(this.BUTTON_SECTION2_X+_32,_2f+_31);
_2e.getWidget("btnMR").setPosition(this.BUTTON_SECTION2_X,_2f+(_31*2));
_2e.getWidget("btnMS").setPosition(this.BUTTON_SECTION2_X+_32,_2f+(_31*2));
_2e.getWidget("btnMPlus").setPosition(this.BUTTON_SECTION2_X,_2f+(_31*3));
_2e.getWidget("btnMC").setPosition(this.BUTTON_SECTION2_X+_32,_2f+(_31*3));
_2e.getWidget("btnPercent").setPosition(this.BUTTON_SECTION2_X,_2f+(_31*4));
var _33=_2e.getWidget("btnPlusMinus");
_33.setPosition(this.BUTTON_SECTION2_X+_32,_2f+(_31*4));
var _34=_2e.getWidget("display");
_34.setPosition(_30,_2e.topEdgeHeight);
_2e.setFixedDimensions(this.BUTTON_SECTION2_X+(2*this.BUTTON_WIDTH)+this.BUTTON_GAP+_2e.rightEdgeWidth,_33.positionY+_33.height+_2e.bottomEdgeHeight);
_34.setDimensions(_2e.getInternalWidth()-5);
}
catch(ex){
jsExDebug("calculatorApp__SIG_THEME",ex);
}
}
function calculatorApp_calcWindow_keyDown(key){
try{
switch(key.which){
case 27:
this.btnAC.flash();
this.calculator.clearAll();
break;
case 46:
this.btnCE.flash();
this.calculator.clear();
break;
case 65:
this.btnAC.flash();
this.calculator.clearAll();
this.display.setContent(this.calculator.getCleanOutput());
break;
case 69:
this.btnCE.flash();
if(this.calculator.clear()){
var _36=this.calculator.getCleanOutput();
this.display.setContent(_36);
}
break;
case 80:
if(key.ctrlKey){
this.btnMPlus.flash();
this.calculator.memoryAdd();
key.preventDefault();
}else{
this.btnPi.flash();
this.calculator.appendPi();
this.display.setContent(this.calculator.getCleanOutput());
}
break;
case 82:
if(key.ctrlKey){
this.btnMR.flash();
this.calculator.memoryRecall();
this.display.setContent(this.calculator.getCleanOutput());
key.preventDefault();
}
break;
case 76:
if(key.ctrlKey){
this.btnMC.flash();
this.calculator.memoryClear();
key.preventDefault();
}
key.preventDefault();
break;
case 77:
if(key.ctrlKey){
this.btnMS.flash();
this.calculator.memoryStore();
key.preventDefault();
}
break;
case 110:
this.btnPeriod.flash();
this.calculator.appendPeriod();
break;
case 190:
this.btnPeriod.flash();
this.calculator.appendPeriod();
break;
case 8:
key.preventDefault();
break;
default:
break;
}
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_keyDownHandler",ex);
}
}
function calculatorApp_calcWindow_keyPress(key){
try{
switch(key.dmKey){
case 13:
this.btnEquals.flash();
this.calculator.evaluate();
this.display.brownOut();
break;
case 61:
this.btnEquals.flash();
this.calculator.evaluate();
this.display.brownOut();
break;
case 37:
this.btnPercent.flash();
break;
case 40:
this.calculator.leftBracket();
this.btnLB.flash();
break;
case 41:
this.calculator.rightBracket();
this.btnRB.flash();
break;
case 42:
this.btnMultiply.flash();
this.calculator.multiply();
this.display.brownOut();
break;
case 43:
this.btnAdd.flash();
this.calculator.sum();
this.display.brownOut();
break;
case 44:
this.btnPeriod.flash();
this.calculator.appendPeriod();
break;
case 45:
this.btnMinus.flash();
this.calculator.subtract();
this.display.brownOut();
break;
case 47:
this.btnDivide.flash();
this.calculator.divide();
this.display.brownOut();
break;
case 48:
this.btn0.flash();
this.calculator.appendNumeral(0);
break;
case 49:
this.btn1.flash();
this.calculator.appendNumeral(1);
break;
case 50:
this.btn2.flash();
this.calculator.appendNumeral(2);
break;
case 51:
this.btn3.flash();
this.calculator.appendNumeral(3);
break;
case 52:
this.btn4.flash();
this.calculator.appendNumeral(4);
break;
case 53:
this.btn5.flash();
this.calculator.appendNumeral(5);
break;
case 54:
this.btn6.flash();
this.calculator.appendNumeral(6);
break;
case 55:
this.btn7.flash();
this.calculator.appendNumeral(7);
break;
case 56:
this.btn8.flash();
this.calculator.appendNumeral(8);
break;
case 57:
this.btn9.flash();
this.calculator.appendNumeral(9);
break;
case 8:
key.preventDefault();
break;
default:
break;
}
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_calcWindow_keyPress",ex);
}
}
function calculatorApp_binding_quickHelpBtn_click(_38){
try{
var _39=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"calculator");
}
catch(ex){
jsExDebug("calculatorApp_binding_quickHelpBtn_click",ex);
}
}
function calculatorApp_binding_btnEquals_click(_3a){
try{
this.btnEquals.flash();
this.calculator.evaluate();
this.display.brownOut();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_btnEquals_click",ex);
}
}
function calculatorApp_binding_numeralBtn_click(_3b){
try{
this.calculator.appendNumeral(_3b.getValue());
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnPercent_click(_3c){
try{
this.calculator.percentage();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnDivide_click(_3d){
try{
this.calculator.divide();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnMultiply_click(_3e){
try{
this.calculator.multiply();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnAdd_click(_3f){
try{
this.calculator.sum();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnMinus_click(_40){
try{
this.calculator.subtract();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnCE_click(_41){
try{
if(this.calculator.clear()){
var _42=this.calculator.getCleanOutput();
this.display.setContent(_42);
}
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnAC_click(_43){
try{
this.calculator.clearAll();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnPi_click(_44){
try{
this.calculator.appendPi();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_numeralBtn_click",ex);
}
}
function calculatorApp_binding_btnMS_click(_45){
try{
this.calculator.memoryStore();
}
catch(ex){
jsExDebug("calculatorApp_binding_btnMS_click",ex);
}
}
function calculatorApp_binding_btnMR_click(_46){
try{
this.calculator.memoryRecall();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_btnMS_click",ex);
}
}
function calculatorApp_binding_btnMPlus_click(_47){
try{
this.calculator.memoryAdd();
}
catch(ex){
jsExDebug("calculatorApp_binding_btnMS_click",ex);
}
}
function calculatorApp_binding_btnMC_click(_48){
try{
this.calculator.memoryClear();
}
catch(ex){
jsExDebug("calculatorApp_binding_btnMS_click",ex);
}
}
function calculatorApp_binding_btnPlusMinus_click(_49){
try{
this.calculator.appendPlusMinus();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_btnPlusMinus_click",ex);
}
}
function calculatorApp_binding_btnPeriod_click(_4a){
try{
this.calculator.appendPeriod();
this.display.setContent(this.calculator.getCleanOutput());
}
catch(ex){
jsExDebug("calculatorApp_binding_btnPeriod_click",ex);
}
}
function calculatorApp_binding_btnRB_click(_4b){
try{
this.calculator.rightBracket();
}
catch(ex){
jsExDebug("calculatorApp_binding_btnRB",ex);
}
}
function calculatorApp_binding_btnLB_click(_4c){
try{
this.calculator.leftBracket();
}
catch(ex){
jsExDebug("calculatorApp_binding_btnRB",ex);
}
}
function calculatorApp_calcWindow__onClose(_4d){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("calculatorApp_calcWindow__onClose",ex);
}
}

try{
calculator_t.prototype.constructor=calculator_t;
calculator_t.prototype.cleanUp=calculator_cleanUp;
calculator_t.prototype.sum=calculator_sum;
calculator_t.prototype.divide=calculator_divide;
calculator_t.prototype.multiply=calculator_multiply;
calculator_t.prototype.subtract=calculator_subtract;
calculator_t.prototype.percentage=calculator_percentage;
calculator_t.prototype.leftBracket=calculator_leftBracket;
calculator_t.prototype.rightBracket=calculator_rightBracket;
calculator_t.prototype.appendPeriod=calculator_appendPeriod;
calculator_t.prototype.clear=calculator_clear;
calculator_t.prototype.clearAll=calculator_clearAll;
calculator_t.prototype.memoryClear=calculator_memoryClear;
calculator_t.prototype.memoryStore=calculator_memoryStore;
calculator_t.prototype.memoryRecall=calculator_memoryRecall;
calculator_t.prototype.memoryAdd=calculator_memoryAdd;
calculator_t.prototype.appendNumeral=calculator_appendNumeral;
calculator_t.prototype.evaluate=calculator_evaluate;
calculator_t.prototype.appendPlusMinus=calculator_appendPlusMinus;
calculator_t.prototype.appendPi=calculator_appendPi;
calculator_t.prototype.getCleanOutput=calculator_getCleanOutput;
calculator_t.prototype.limitPrecision=calculator_limitPrecision;
calculator_t.prototype.appendArithmeticOperation=calculator_appendArithmeticOperation;
calculator_t.prototype.WRITE=0;
calculator_t.prototype.BLOCK=1;
calculator_t.prototype.PRECISION_LIMIT=8;
calculator_t.prototype.PERCENTAGE="*0.01";
}
catch(ex){
jsExDebug("calculator_t.prototype",ex);
}
function calculator_t(){
try{
this.displayNow=this.WRITE;
this.evaluated=false;
this.decimaled=false;
this.evaluatedPosition=0;
this.lastMemAddedValue=false;
this.lastOperation="";
this.internalCellContents="";
this.visibleCellContents="0";
this.memoryUsed=false;
this.memory=0;
this.revalValue="";
this.revalOperation="";
this.revalInternal="";
this.negated=false;
this.ceWasLast=false;
this.piWasLast=false;
this.inErrorState=false;
this.errorMessage="";
}
catch(ex){
jsExDebug("calculator_t",ex);
}
}
function calculator_cleanUp(){
try{
this.displayNow=null;
this.evaluated=null;
this.decimaled=null;
this.evaluatedPosition=null;
this.lastMemAddedValue=null;
this.lastOperation=null;
this.internalCellContents=null;
this.visibleCellContents=null;
this.memoryUsed=null;
this.memory=null;
this.revalValue=null;
this.revalOperation=null;
this.revalInternal=null;
this.negated=null;
this.ceWasLast=null;
this.piWasLast=null;
}
catch(ex){
jsExDebug("calculator_cleanup",ex);
}
}
function calculator_sum(){
try{
this.appendArithmeticOperation("+");
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_sum",ex);
}
}
function calculator_divide(){
try{
this.appendArithmeticOperation("/");
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_divide",ex);
}
}
function calculator_multiply(){
try{
this.appendArithmeticOperation("*");
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_multiply",ex);
}
}
function calculator_subtract(){
try{
this.appendArithmeticOperation("-");
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_subtract",ex);
}
}
function calculator_leftBracket(){
try{
this.internalCellContents+="(";
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_leftBracket",ex);
}
}
function calculator_rightBracket(){
try{
if(this.internalCellContents.toString().charAt(this.internalCellContents.toString().length-1)=="("){
this.internalCellContents=this.internalCellContents.toString().substring(0,(this.internalCellContents.toString().length-2));
}else{
this.internalCellContents+=")";
}
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_rightBracket",ex);
}
}
function calculator_percentage(){
try{
this.displayNow=this.WRITE;
this.appendArithmeticOperation(this.PERCENTAGE);
this.visibleCellContents=this.limitPrecision(eval(this.internalCellContents));
this.visibleCellContents=this.visibleCellContents.toString();
this.displayNow=this.WRITE;
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_percentage",ex);
}
}
function calculator_clear(){
try{
if(!this.ceWasLast){
var _1=this.internalCellContents.toString();
var _2=this.visibleCellContents.toString();
if(_1.length==0){
return false;
}
if(_2!="0"){
if((_1.length>=_2.length)&&(_1.substring(_1.length-_2.length,_1.length)==_2)){
this.internalCellContents=_1.substring(0,_1.length-_2.length);
this.visibleCellContents="0";
}else{
this.internalCellContents="";
this.visibleCellContents="0";
}
this.displayNow=this.WRITE;
}else{
this.displayNow=this.BLOCK;
}
this.revalValue="";
this.revalOperation="";
this.revalInternal="";
this.evaluated=false;
if(this.inErrorState){
this.inErrorState=false;
this.errorMessage="";
this.internalCellContents="";
this.visibleCellContents="0";
}
return true;
}
this.ceWasLast=true;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_clear",ex);
}
}
function calculator_clearAll(){
try{
this.displayNow=this.WRITE;
this.evaluated=false;
this.decimaled=false;
this.evaluatedPosition=0;
this.lastMemAddedValue=false;
this.lastOperation="";
this.internalCellContents="";
this.visibleCellContents="0";
this.memoryUsed=false;
this.memory=0;
this.revalValue="";
this.revalOperation="";
this.revalInternal="";
this.ceWasLast=false;
this.piWasLast=false;
this.negated=false;
this.inErrorState=false;
this.errorMessage="";
}
catch(ex){
jsExDebug("calculator_clearAll",ex);
}
}
function calculator_appendPi(){
try{
var _3=this.internalCellContents.toString();
if(!this.piWasLast){
if(_3.match(/[\*\+\/\-]$/)||(_3=="")){
this.appendNumeral(3.1415927);
}
}
this.ceWasLast=false;
this.piWasLast=true;
}
catch(ex){
jsExDebug("calculator_appendPi",ex);
}
}
function calculator_memoryClear(){
try{
this.memory="0";
this.memoryUsed=false;
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_memoryClear",ex);
}
}
function calculator_memoryStore(){
try{
this.memory=this.visibleCellContents.toString();
this.memoryUsed=true;
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_memoryStore",ex);
}
}
function calculator_memoryRecall(){
try{
this.visibleCellContents=this.memory.toString();
if(this.internalCellContents.match(/[\*\+\/\-]$/)){
this.internalCellContents+=this.memory.toString();
}else{
this.internalCellContents=this.memory.toString();
}
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_memoryRecall",ex);
}
}
function calculator_memoryAdd(){
try{
var _4;
if(this.lastMemAddedValue===false){
_4=this.visibleCellContents;
}else{
_4=this.lastMemAddedValue;
}
this.memory=this.limitPrecision(eval(this.memory+"+"+this.limitPrecision(eval(_4))));
this.memoryUsed=true;
this.lastMemAddedValue=_4;
this.internalCellContents="";
this.visibleCellContents="0";
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculatorFrame_memAdd",ex);
}
}
function calculator_evaluate(){
try{
this.internalCellContents=this.internalCellContents.toString();
if(this.evaluated){
if((this.evaluated)&&(this.revalValue!="")&&(this.revalOperation!="")){
if(this.revalInternal!=""){
this.revalInternal+=this.revalOperation+this.revalValue;
this.internalCellContents=this.revalInternal+this.revalOperation+this.revalValue;
}else{
this.revalInternal=this.internalCellContents;
this.internalCellContents+=this.revalOperation+this.revalValue;
}
}
}
this.evaluated=true;
var _5=this.internalCellContents;
this.internalCellContents=this.internalCellContents.replace(/[\*\+\/\.-]{1,2}$/,"");
if(_5!=this.internalCellContents){
this.displayNow=this.WRITE;
}
if(this.internalCellContents.toString()!=""){
this.visibleCellContents=eval(this.internalCellContents.toString());
if(isNaN(this.visibleCellContents)){
this.visibleCellContents="Possible Divide by Zero (NaN)";
}else{
this.visibleCellContents=this.visibleCellContents.toString();
}
}else{
this.visibleCellContents="0";
}
this.visibleCellContents=this.visibleCellContents.toString();
this.internalCellContents=this.visibleCellContents;
if(this.internalCellContents.length>1){
if(this.internalCellContents.charAt(0)=="-"&&this.internalCellContents.charAt(1)=="0"){
if(this.internalCellContents.charAt(2)!="."){
this.internalCellContents="-"+this.internalCellContents.substring(2);
}
}
if(this.internalCellContents.charAt(0)=="0"){
if(this.internalCellContents.charAt(1)!="."){
this.internalCellContents=this.internalCellContents.substring(1);
}
}
}
this.negated=false;
this.inErrorState=false;
this.errorMessage="";
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
this.inErrorState=true;
this.errorMessage="Bracket Mismatch";
}
}
function calculator_appendPeriod(){
try{
if(!this.decimaled){
if(this.internalCellContents.match(/[\*\+\\-]$/)){
this.appendNumeral(this.ZERO);
}
}
if(this.visibleCellContents.match(/.*\..*/)){
return;
}
if(this.internalCellContents.length==0){
this.appendNumeral(0);
}
temp=".";
if((this.evaluated==true)&&(this.visibleCellContents.toString().charAt(0)!="-")){
this.internalCellContents=".";
this.visibleCellContents="";
this.evaluated=false;
}else{
this.internalCellContents+=".";
}
if(this.displayNow==this.BLOCK){
this.visibleCellContents=".";
this.displayNow=this.WRITE;
}else{
this.visibleCellContents+=".";
this.revalValue+=".";
}
if(this.visibleCellContents.match(/^00+\./)){
this.visibleCellContents=this.visibleCellContents.replace(/^(0*)\./,"0");
}
this.decimaled=true;
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_appendPeriod",ex);
}
}
function calculator_appendArithmeticOperation(_6){
try{
this.evaluated=false;
if(this.internalCellContents.length==0){
this.internalCellContents+="0";
}
if(this.internalCellContents.match(/[\*\+\/\.-]$/)){
this.internalCellContents=this.internalCellContents.replace(/[\*\+\\-\\.]$/,_6);
}else{
this.internalCellContents+=_6;
}
this.revalOperation=_6.toString();
this.revalValue="";
this.revalInternal="";
if(_6!=this.DECIMAL){
if(_6==this.PERCENTAGE){
this.lastOperation="%";
}else{
this.lastOperation=_6;
}
}
this.displayNow=this.BLOCK;
this.decimaled=false;
this.lastMemAddedValue=false;
this.negated=false;
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_appendArithmetic",ex);
}
}
function calculator_appendNumeral(_7){
try{
this.lastOperation="";
if(!this.evaluated){
this.revalValue+=_7.toString();
}
if((this.evaluated==true)&&(this.visibleCellContents.toString().charAt(0)!="-")){
this.internalCellContents=_7.toString();
this.visibleCellContents="";
this.evaluated=false;
}else{
this.internalCellContents+=_7.toString();
}
if(this.displayNow==this.BLOCK){
this.visibleCellContents=_7.toString();
this.displayNow=this.WRITE;
}else{
this.visibleCellContents+=_7.toString();
}
this.lastMemAddedValue=false;
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculator_appendNumeral",ex);
}
}
function calculator_appendPlusMinus(){
try{
this.displayNow=this.WRITE;
if(this.internalCellContents.toString().length==0){
this.visibleCellContents="-";
this.internalCellContents="0-";
this.negated=true;
return;
}else{
if(this.internalCellContents.toString().length==2){
if((this.internalCellContents.toString().charAt(0)=="0")&&(this.internalCellContents.toString().charAt(1)=="-")){
this.visibleCellContents="0";
this.internalCellContents="";
this.negated=false;
return;
}
}
}
if(this.evaluated){
if(!this.negated){
this.visibleCellContents="-";
this.internalCellContents="0-";
this.negated=true;
}else{
this.visibleCellContents="0";
this.internalCellContents="";
this.negated=false;
}
this.evaluated=false;
return;
}
if(this.internalCellContents.toString().match(/[\*\+\\-]$/)){
if(this.negated){
this.visibleCellContents="0";
}else{
this.visibleCellContents="-";
}
this.internalCellContents+="(-1)*";
this.negated=!this.negated;
return;
}
if(this.visibleCellContents.toString().charAt(0)=="-"){
this.visibleCellContents=this.visibleCellContents.toString().substring(1,this.visibleCellContents.length);
this.internalCellContents+="*(-1)";
this.negated=false;
}else{
this.visibleCellContents="-"+this.visibleCellContents.toString();
this.internalCellContents+="*(-1)";
this.negated=true;
}
this.ceWasLast=false;
this.piWasLast=false;
}
catch(ex){
jsExDebug("calculatorFrame_appendPlusMinus",ex);
}
}
function calculator_getCleanOutput(){
try{
var _8="";
var _9;
var _a;
var _b;
if(!this.inErrorState){
if(this.internalCellContents.match(/\d+\.\d*0+$/)){
if(this.visibleCellContents.match(/\d*(\.)0+/)){
if(this.visibleCellContents.match(/\d+\.0*[1|2|3|4|5|6|7|8|9]+0+$/)){
}else{
_8+=".";
}
}
if(_9=this.visibleCellContents.match(/(0+)$/)){
if(_9.length>0){
_8+=_9[1];
}
}
}
if((this.displayNow==this.WRITE)&&(this.visibleCellContents.toString().charAt(this.visibleCellContents.toString().length-1)!=".")){
if(this.visibleCellContents&&(this.visibleCellContents.toString().length>0)){
if(this.visibleCellContents.length>1){
if((this.visibleCellContents.toString().charAt(0)=="0")&&(this.visibleCellContents.toString().charAt(1)!=".")){
this.visibleCellContents=this.visibleCellContents.toString().substring(1);
}
}
if(""+this.visibleCellContents.toString().charAt(0)=="-"){
if(""+this.visibleCellContents.length>1){
this.visibleCellContents="-"+this.limitPrecision(eval(this.visibleCellContents.substring(1)));
this.visibleCellContents+=_8.toString();
return this.visibleCellContents.toString();
}else{
this.visibleCellContents+=_8.toString();
return this.visibleCellContents.toString();
}
}else{
this.visibleCellContents=this.limitPrecision(eval(this.visibleCellContents));
if(this.visibleCellContents.toString().match(/(NaN)/g)){
this.inErrorState=true;
this.errorMessage="Value Out Of Range";
return this.errorMessage;
}else{
this.visibleCellContents+=_8.toString();
return this.visibleCellContents.toString();
}
}
}
}else{
return this.visibleCellContents;
}
}else{
return this.errorMessage;
}
}
catch(ex){
jsExDebug("calculator_cleanOutput",ex);
}
}
function calculator_limitPrecision(_c){
try{
var _d=parseInt(_c);
var _e=_c-_d;
var _f=Math.pow(10,this.PRECISION_LIMIT);
_e=(Math.floor((_e*_f)+0.5))/_f;
return (_d+_e);
}
catch(ex){
jsExDebug("calculatorFrame_limitPrecision",ex);
}
}

try{
systemApplication_t.prototype=new application_t();
systemApplication_t.prototype.constructor=systemApplication_t;
systemApplication_t.prototype.systemApplication_super=application_t.prototype.constructor;
systemApplication_t.prototype.initialise=systemApplication_initialise;
systemApplication_t.prototype.registerFrame=systemApplication_registerFrame;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function systemApplication_t(){
try{
this.systemApplication_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
}
catch(ex){
jsExDebug("systemApplication_t",ex);
}
}
function systemApplication_initialise(){
function closeAll(){
var me=this;
function close(){
try{
var _2=me.APPLICATION.openFrames;
for(var i=0;i<_2.length;i++){
if(_2[i]){
_2[i].cleanUp();
}
}
}
catch(ex){
jsExDebug("application_initialise:close",ex);
}
}
return close;
}
try{
this.APPLICATION={};
this.APPLICATION.openFrames=[];
this.APPLICATION.openFrames.close=closeAll.apply(this);
this.isSystemApp=true;
if(this.SYSTEM.APPLICATION_MANAGER){
this.runId=this.SYSTEM.APPLICATION_MANAGER.registerSystemApplication(this);
}
}
catch(ex){
jsExDebug("systemApplication_initialise",ex);
}
}
function systemApplication_registerFrame(_4){
try{
this.APPLICATION.openFrames.push(_4);
_4.setPosition(_4.DEFAULT_POSITION_X,_4.DEFAULT_POSITION_Y);
}
catch(ex){
jsExDebug("systemApplication_registerFrame",ex);
}
}

try{
headlessApplication_t.prototype=new application_t();
headlessApplication_t.prototype.constructor=headlessApplication_t;
headlessApplication_t.prototype.headlessApplication_super=application_t.prototype.constructor;
headlessApplication_t.prototype.initialise=headlessApplication_initialise;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function headlessApplication_t(){
try{
this.headlessApplication_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
}
catch(ex){
jsExDebug("headlessApplication_t",ex);
}
}
function headlessApplication_initialise(){
try{
this.iconSrc=this.ICON_SRC;
this.captureString=null;
this.APPLICATION={};
this.APPLICATION.openFrames=null;
this.APPLICATION.openDialogues=null;
this.stats=new stats_t();
this.stats.logApp(this,this.stats.APP_EVENT_OPEN);
if(this.SYSTEM.APPLICATION_MANAGER){
this.runId=this.SYSTEM.APPLICATION_MANAGER.registerSystemApplication(this);
}
}
catch(ex){
jsExDebug("headlessApplication_initialise",ex);
}
}

try{
iframeApp_t.prototype=new application_t();
iframeApp_t.prototype.constructor=iframeApp_t;
iframeApp_t.prototype.iframeApp_super=application_t.prototype.constructor;
iframeApp_t.prototype.cleanUp=iframeApp_cleanUp;
iframeApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
iframeApp_t.prototype._SIG_KILL=iframeApp__SIG_KILL;
iframeApp_t.prototype._SIG_THEME=iframeApp__SIG_THEME;
iframeApp_t.prototype.getIFramePosition=iframeApp_getIFramePosition;
iframeApp_t.prototype.frame__onClose=iframeApp_frame__onClose;
iframeApp_t.prototype.frame__onFocus=iframeApp_frame__onFocus;
iframeApp_t.prototype.frame__onBlur=iframeApp_frame__onBlur;
iframeApp_t.prototype.frame__onResize=iframeApp_frame__onResize;
iframeApp_t.prototype.frame__onResizeEnd=iframeApp_frame__onResizeEnd;
iframeApp_t.prototype.frame__onMove=iframeApp_frame__onMove;
iframeApp_t.prototype.frame__onMoveEnd=iframeApp_frame__onMoveEnd;
iframeApp_t.prototype.dragDivClickEvent=iframeApp_dragDivClickEvent;
iframeApp_t.prototype.iframeOnLoadEvent=iframeApp_iframeOnLoadEvent;
iframeApp_t.prototype.APP_ID=APP_ID_IFRAME;
iframeApp_t.prototype.FRAME_WIDTH=500;
iframeApp_t.prototype.FRAME_HEIGHT=500;
iframeApp_t.prototype.FRAME_INIT_TITLE="iframe app";
iframeApp_t.prototype.IFRAME_TOP=0;
iframeApp_t.prototype.IFRAME_BORDER="none";
iframeApp_t.prototype.IFRAME_FRAMEBORDER="";
iframeApp_t.prototype.IFRAME_BG_COLOUR="white";
iframeApp_t.prototype.INTIAL_LOCATION="home.php";
iframeApp_t.prototype.FRAME_RESIZE=true;
iframeApp_t.prototype.FRAME_ON_TOP=false;
iframeApp_t.prototype.FRAME_MINIMISE=true;
}
catch(ex){
jsExDebug("iframeApp_t.prototype",ex);
}
function iframeApp_t(){
try{
this.iframeApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.firstLoadComplete=false;
if(this.createPanel){
this.createPanel();
}
var _1=this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN;
if(this.FRAME_MINIMISE){
_1=_1|this.SYSTEM.Frame.MINIMISE_BTN;
}
var _2=new this.SYSTEM.Frame.Window("frame",this.FRAME_INIT_TITLE,this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,this.FRAME_RESIZE,_1,false,this.FRAME_ON_TOP);
var _3=document.createElement("iframe");
_3.style.position="absolute";
_3.style.left="0px";
_3.style.top="0px";
_3.style.border=this.IFRAME_BORDER;
_3.frameBorder=this.IFRAME_FRAMEBORDER;
_3.style.backgroundColor=this.IFRAME_BG_COLOUR;
_3.name="iframe"+this.runId;
_3.id=_3.name;
this.SYSTEM.Event.attachEvent(_3,"onload","load",this.iframeOnLoadEvent,this);
var _4=document.createElement("div");
_4.style.position="absolute";
_4.style.left=_2.leftEdgeWidth+"px";
_4.style.top=(_2.topEdgeHeight+this.IFRAME_TOP)+"px";
var _5=document.createElement("div");
_5.style.position="absolute";
_5.style.left=_2.leftEdgeWidth+"px";
_5.style.top=(_2.topEdgeHeight+this.IFRAME_TOP)+"px";
_5.style.overflow="auto";
this.outerDiv=_5;
_5.appendChild(_3);
this.iframe=_3;
this.outerDiv=_5;
this.dragDiv=_4;
_2.windowDiv.appendChild(_5);
_2.show();
this.frame=_2;
_2.setDimensions(_2.width,_2.height);
}
catch(ex){
jsExDebug("iframeApp_t",ex);
}
}
function iframeApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.frame=null;
me.iframe=null;
me.outerDiv=null;
me.dragDiv=null;
me.firstLoadComplete=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("iframeApp_cleanUp",ex);
}
}
function iframeApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("iframeApp__SIG_KILL",ex);
}
}
function iframeApp__SIG_THEME(){
try{
var _7=this.frame;
this.outerDiv.style.left=_7.leftEdgeWidth+"px";
this.outerDiv.style.top=(_7.topEdgeHeight+this.IFRAME_TOP)+"px";
this.dragDiv.style.left=_7.leftEdgeWidth+"px";
this.dragDiv.style.top=(_7.topEdgeHeight+this.IFRAME_TOP)+"px";
_7.setDimensions(_7.width,_7.height);
}
catch(ex){
jsExDebug("iframeApp__SIG_THEME",ex);
}
}
function iframeApp_getIFramePosition(){
try{
return {x:this.frame.positionX+this.frame.leftEdgeWidth,y:this.frame.positionY+this.frame.topEdgeHeight+this.IFRAME_TOP};
}
catch(ex){
jsExDebug("iframeApp_getIFramePosition",ex);
}
}
function iframeApp_frame__onClose(_8){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("iframeApp_frame__onClose",ex);
}
}
function iframeApp_iframeOnLoadEvent(_9,me){
try{
if(!me.firstLoadComplete){
me.firstLoadComplete=true;
me.iframe.contentWindow.location=me.INTIAL_LOCATION;
}
}
catch(ex){
jsExDebug("iframeApp_iframeOnLoadEvent",ex);
}
}
function iframeApp_frame__onFocus(_b){
try{
if(this.frame&&this.dragDiv.parentNode==_b.windowDiv){
_b.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("iframeApp_frame__onFocus",ex);
}
}
function iframeApp_frame__onBlur(_c){
try{
if(this.frame){
_c.windowDiv.appendChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("browserApp_frame__onBlur",ex);
}
}
function iframeApp_frame__onResize(_d){
try{
if(!this.iframe){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _10=null;
var _11=null;
if(dX||dY){
_10=_d.width+this.SYSTEM.Event.dragDistanceX;
_11=_d.height+this.SYSTEM.Event.dragDistanceY;
if(_10<=_d.minimumWidth){
_10=_d.minimumWidth;
}
if(_10>=_d.maximumWidth){
_10=_d.maximumWidth;
}
if(_11<=_d.minimumHeight){
_11=_d.minimumHeight;
}
if(_11>=_d.maximumHeight){
_11=_d.maximumHeight;
}
}else{
_10=_d.width;
_11=_d.height;
}
this.iframe.style.width=(_d.getInternalWidth(_10)-5)+"px";
this.iframe.style.height=(_d.getInternalHeight(_11)-this.IFRAME_TOP-5)+"px";
this.outerDiv.style.width=_d.getInternalWidth(_10)+"px";
this.outerDiv.style.height=(_d.getInternalHeight(_11)-this.IFRAME_TOP)+"px";
this.dragDiv.style.width=this.outerDiv.style.width;
this.dragDiv.style.height=this.outerDiv.style.height;
_d.windowDiv.appendChild(this.dragDiv);
}
catch(ex){
jsExDebug("iframeApp_frame__onResize",ex);
}
}
function iframeApp_frame__onResizeEnd(_12){
try{
if(this.frame&&this.dragDiv.parentNode==_12.windowDiv){
_12.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("iframeApp_frame__onResizeEnd",ex);
}
}
function iframeApp_frame__onMove(_13){
try{
if(this.frame){
_13.windowDiv.appendChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("iframeApp_frame__onMove",ex);
}
}
function iframeApp_frame__onMoveEnd(_14){
try{
if(this.frame&&this.dragDiv.parentNode==_14.windowDiv){
_14.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("iframeApp_frame__onMoveEnd",ex);
}
}
function iframeApp_dragDivClickEvent(_15,me){
try{
me.frame.focus();
}
catch(ex){
jsExDebug("iframeApp_dragDivClickEvent",ex);
}
}

try{
systemIframeApplication_t.prototype=new iframeApp_t();
systemIframeApplication_t.prototype.constructor=systemIframeApplication_t;
systemIframeApplication_t.prototype.systemIframeApplication_super=iframeApp_t.prototype.constructor;
systemIframeApplication_t.prototype.initialise=systemIframeApplication_initialise;
systemIframeApplication_t.prototype.registerFrame=systemIframeApplication_registerFrame;
}
catch(ex){
jsExDebug("systemIframeApplication_t.prototype",ex);
}
function systemIframeApplication_t(){
try{
this.systemIframeApplication_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
}
catch(ex){
jsExDebug("systemIframeApplication_t",ex);
}
}
function systemIframeApplication_initialise(){
function closeAll(){
var me=this;
function close(){
try{
var _2=me.APPLICATION.openFrames;
for(var i=0;i<_2.length;i++){
if(_2[i]){
_2[i].cleanUp();
}
}
}
catch(ex){
jsExDebug("application_initialise:close",ex);
}
}
return close;
}
try{
this.APPLICATION={};
this.APPLICATION.openFrames=[];
this.APPLICATION.openFrames.close=closeAll.apply(this);
this.isSystemApp=true;
if(this.SYSTEM.APPLICATION_MANAGER){
this.runId=this.SYSTEM.APPLICATION_MANAGER.registerSystemApplication(this);
}
}
catch(ex){
jsExDebug("systemIframeApplication_initialise",ex);
}
}
function systemIframeApplication_registerFrame(_4){
try{
this.APPLICATION.openFrames.push(_4);
_4.setPosition(_4.DEFAULT_POSITION_X,_4.DEFAULT_POSITION_Y);
}
catch(ex){
jsExDebug("systemIframeApplication_registerFrame",ex);
}
}

try{
workspaceManagerApp_t.prototype=new application_t();
workspaceManagerApp_t.prototype.constructor=workspaceManagerApp_t;
workspaceManagerApp_t.prototype.workspaceManagerApp_super=application_t.prototype.constructor;
workspaceManagerApp_t.prototype.cleanUp=workspaceManagerApp_cleanUp;
workspaceManagerApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
workspaceManagerApp_t.prototype._SIG_KILL=workspaceManagerApp__SIG_KILL;
workspaceManagerApp_t.prototype._SIG_THEME=workspaceManagerApp__SIG_THEME;
workspaceManagerApp_t.prototype.createManager=workspaceManagerApp_createManager;
workspaceManagerApp_t.prototype.createPanel=workspaceManagerApp_createPanel;
workspaceManagerApp_t.prototype.filterByTag=workspaceManagerApp_filterByTag;
workspaceManagerApp_t.prototype.launchSaveFrame=workspaceManagerApp_launchSaveFrame;
workspaceManagerApp_t.prototype.createWorkspace=workspaceManagerApp_createWorkspace;
workspaceManagerApp_t.prototype.saveWorkspaceByRef=workspaceManagerApp_saveWorkspaceByRef;
workspaceManagerApp_t.prototype.workspaceListReadCallback=workspaceManagerApp_workspaceListReadCallback;
workspaceManagerApp_t.prototype.workspaceListDeleteCallback=workspaceManagerApp_workspaceListDeleteCallback;
workspaceManagerApp_t.prototype.managerFrame__onClose=workspaceManagerApp_managerFrame__onClose;
workspaceManagerApp_t.prototype.managerFrame__onResize=workspaceManagerApp_managerFrame__onResize;
workspaceManagerApp_t.prototype.saveFrame__onClose=workspaceManagerApp_saveFrame__onClose;
workspaceManagerApp_t.prototype.saveFrame_keyPress=workspaceManagerApp_saveFrame_keyPress;
workspaceManagerApp_t.prototype.binding_refreshBtn_click=workspaceManagerApp_binding_refreshBtn_click;
workspaceManagerApp_t.prototype.binding_createConfirmBtn_click=workspaceManagerApp_binding_createConfirmBtn_click;
workspaceManagerApp_t.prototype.binding_fileBrowser_itemDelete=workspaceManagerApp_binding_fileBrowser_itemDelete;
workspaceManagerApp_t.prototype.binding_quickHelpBtn_click=workspaceManagerApp_binding_quickHelpBtn_click;
workspaceManagerApp_t.prototype.binding_createBtn_click=workspaceManagerApp_binding_createBtn_click;
workspaceManagerApp_t.prototype.binding_saveBtn_click=workspaceManagerApp_binding_saveBtn_click;
workspaceManagerApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.WORKSPACE_MANAGER;
workspaceManagerApp_t.prototype.APP_ID=APP_ID_WORKSPACE_MANAGER;
workspaceManagerApp_t.prototype.APP_NAME="Workspace Manager";
workspaceManagerApp_t.prototype.FRAME_WIDTH=400;
workspaceManagerApp_t.prototype.FRAME_HEIGHT=300;
workspaceManagerApp_t.prototype.FRAME_MAX_HEIGHT=700;
workspaceManagerApp_t.prototype.SAVE_FRAME_WIDTH=270;
workspaceManagerApp_t.prototype.SAVE_FRAME_HEIGHT=60;
workspaceManagerApp_t.prototype.FILE_BROWSER_WIDTH_DIFF=20;
workspaceManagerApp_t.prototype.FILE_BROWSER_HEIGHT_DIFF=70;
workspaceManagerApp_t.prototype.FILE_BROWSER_ITEM_WIDTH=320;
workspaceManagerApp_t.prototype.FILE_BROWSER_ITEM_HEIGHT=45;
workspaceManagerApp_t.prototype.FILE_BROWSER_LEFT=0;
workspaceManagerApp_t.prototype.FILE_BROWSER_TOP=29;
workspaceManagerApp_t.prototype.REFRESH_LEFT=28;
workspaceManagerApp_t.prototype.REFRESH_TOP=0;
workspaceManagerApp_t.prototype.REFRESH_IMG="img/app/system/icons/utility/refresh.png";
workspaceManagerApp_t.prototype.SAVE_LEFT=0;
workspaceManagerApp_t.prototype.SAVE_TOP=0;
workspaceManagerApp_t.prototype.MAX_NAME_LENGTH=20;
workspaceManagerApp_t.prototype.NAME_SELECT_WIDTH=100;
workspaceManagerApp_t.prototype.NAME_SELECT_HEIGHT=22;
}
catch(ex){
jsExDebug("workspaceManagerApp_t.prototype",ex);
}
function workspaceManagerApp_t(_1){
try{
this.workspaceManagerApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.createPanel();
this.createManager();
if(_1[0]==true){
this.launchSaveFrame();
}
this.initialise=false;
this.workspaceListActionIndex=this.SYSTEM.Workspaces.registerActionListener(this.SYSTEM.Workspaces.ACTION_READ,new this.SYSTEM.Delegate(this,this.workspaceListReadCallback));
this.SYSTEM.Workspaces.registerActionListener(this.SYSTEM.Workspaces.ACTION_DELETE,new this.SYSTEM.Delegate(this,this.workspaceListDeleteCallback),this.workspaceListActionIndex);
this.SYSTEM.Workspaces.refresh();
}
catch(ex){
jsExDebug("workspaceManagerApp_t",ex);
}
}
function workspaceManagerApp_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.Workspaces){
me.SYSTEM.Workspaces.unregisterActionListener(me.workspaceListActionIndex);
me.workspaceListActionIndex=null;
}
me.fileBrowser=null;
me.refreshBtn=null;
me.managerFrame=null;
me.saveFrame=null;
me.createBtn=null;
me.saveBtn=null;
me.nameSelect=null;
me.nameLabel=null;
me.nameText=null;
me.createConfirmBtn=null;
me.initialised=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("workspaceManagerApp_cleanUp",ex);
}
}
function workspaceManagerApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("workspaceManagerApp__SIG_KILL",ex);
}
}
function workspaceManagerApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("workspaceManagerApp__SIG_THEME",ex);
}
}
function workspaceManagerApp_createManager(){
try{
var _3=this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN;
var _4=new this.SYSTEM.Frame.Window("managerFrame","WorkSpace Manager",this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,_3);
_4.setMaximumSize(this.FRAME_WIDTH,this.FRAME_MAX_HEIGHT);
var _5=new this.SYSTEM.Widget.FileBrowser("fileBrowser",_4.getInternalWidth(),_4.getInternalHeight()-this.FILE_BROWSER_TOP-2);
_5.setItemDimensions(_5.width-30,this.FILE_BROWSER_ITEM_HEIGHT);
_5.setBorder("solid 1px black");
var _6=new this.SYSTEM.Widget.ClassButton("createBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.SYSTEM.Icon.Small.SAVE,"Create a Workspace","Save the current applications and layout as a new WorkSpace");
var _7=new this.SYSTEM.Widget.ClassButton("refreshBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.REFRESH_IMG,"Refresh","Refresh the list of WorkSpaces.");
var _8=_4.leftEdgeWidth;
var _9=_4.topEdgeHeight;
_4.addWidget(_5,_8+this.FILE_BROWSER_LEFT,_9+this.FILE_BROWSER_TOP);
_4.addWidget(_6,_8+this.SAVE_LEFT,_9+this.SAVE_TOP);
_4.addWidget(_7,_8+this.REFRESH_LEFT,_9+this.REFRESH_TOP);
this.managerFrame=_4;
this.fileBrowser=_5;
this.refreshBtn=_7;
this.createBtn=_6;
_4.show();
}
catch(ex){
jsExDebug("workspaceManagerApp_createManager",ex);
}
}
function workspaceManagerApp_createPanel(){
try{
var _a=this.APPLICATION.Panel;
var _b=new this.SYSTEM.Widget.ClassButton("createBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,40,60,null,this.SYSTEM.Icon.Large.SAVE);
var _c=new this.SYSTEM.Widget.DropText("nameSelect",this.NAME_SELECT_WIDTH,this.NAME_SELECT_HEIGHT);
var _d=new this.SYSTEM.Widget.ClassButton("saveBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.SYSTEM.Icon.Small.SAVE,"Save Over a Workspace","Save over the selected workspace with your current application layout.");
this.nameSelect=_c;
_a.addUtility(new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+"."));
_a.addToolgroup("Create",50);
_a.addWidget(_b,4,4,"Create");
_a.addToolgroup("Save Over WorkSpace",164);
_a.addWidget(_c,4,4,"Save Over WorkSpace");
_a.addWidget(_d,136,4,"Save Over WorkSpace");
}
catch(ex){
jsExDebug("workspaceManagerApp_createPanel",ex);
}
}
function workspaceManagerApp_populate(){
try{
}
catch(ex){
jsExDebug("workspaceManagerApp_populate",ex);
}
}
function workspaceManagerApp_filterByTag(_e){
try{
this.fileBrowser.hideItemByTag();
this.fileBrowser.showItemByTag(_e);
}
catch(ex){
jsExDebug("workspaceManagerApp_filterByTag",ex);
}
}
function workspaceManagerApp_launchSaveFrame(){
try{
var _f=new this.SYSTEM.Frame.Window("saveFrame","Create a Workspace",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_f.setPosition(this.managerFrame.positionX+this.managerFrame.leftEdgeWidth,this.managerFrame.positionY+this.managerFrame.topEdgeHeight);
var _10=new this.SYSTEM.Widget.Label("nameLabel");
_10.setText("Name:");
var _11=new this.SYSTEM.Widget.Text("nameText");
var _12=new this.SYSTEM.Widget.TextButton("createConfirmBtn",50,"Save");
_f.addWidget(_10,_f.leftEdgeWidth,_f.topEdgeHeight+this.pad);
_f.addWidget(_11,_f.leftEdgeWidth+_10.getClientWidth()+this.pad,_f.topEdgeHeight+this.pad);
_f.addWidget(_12,_f.rightEdgeWidth,_f.bottomEdgeHeight,true,true);
_f.setFixedDimensions(_f.leftEdgeWidth+this.SAVE_FRAME_WIDTH+_f.rightEdgeWidth,_f.topEdgeHeight+this.SAVE_FRAME_HEIGHT+_f.bottomEdgeHeight);
_f.show();
_11.setDimensions(_f.getInternalWidth()-_11.positionX);
_11.focus();
this.saveFrame=_f;
this.nameLabel=_10;
this.nameText=_11;
this.createConfirmBtn=_12;
}
catch(ex){
jsExDebug("workspaceManagerApp_launchSaveFrame",ex);
}
}
function workspaceManagerApp_createWorkspace(){
try{
if(!this.saveFrame){
return;
}
var _13=this.nameText.getContent();
if(!_13){
return;
}
if(_13==this.SYSTEM.Workspaces.BLANK_WORKSPACE_NAME){
var d=new this.SYSTEM.Dialogue.Error(this,"WorkSpaceManager","The name '"+_13+"' is reserved for the blank workspace. It can be accessed by <a>http://www.peepel.com/peepel.php<b>?w=blank</b></a>.");
return;
}
if(_13.length>this.MAX_NAME_LENGTH){
var d=new this.SYSTEM.Dialogue.Error(this,"WorkSpaceManager",["The name '",_13,"' is too long, maximum ",this.MAX_NAME_LENGTH," characters."].join(""));
return;
}
var _15=/([;{}|])/g;
var _16="; { } |";
var _17=null;
if(_13.match(INVALID_CHAR_REGEX)){
_17=_13.replace(INVALID_CHAR_REGEX,"<font color='red'>$1</font>");
}else{
if(_13.match(_15)){
_17=_13.replace(_15,"<font color='red'>$1</font>");
}
}
if(_17){
var _18=new this.SYSTEM.Dialogue.Error(this,"WorkSpaceManager","Invalid workspace name. <br/> The <font color='red'>red</font> characters are not allowed: "+_17);
}else{
var _19=new this.SYSTEM.Workspace(null,_13);
_19.saveCurrentWorkspace();
this.SYSTEM.Workspaces.addWorkspace(_19);
this.SYSTEM.Workspaces.refresh();
this.saveFrame.close();
}
}
catch(ex){
jsExDebug("workspaceManagerApp_createWorkspace",ex);
}
}
function workspaceManagerApp_saveWorkspaceByRef(_1a){
try{
if(!_1a){
return;
}
_1a.clearContent();
_1a.saveCurrentWorkspace();
this.SYSTEM.Workspaces.updateWorkspace(_1a);
this.SYSTEM.Workspaces.refresh();
}
catch(ex){
jsExDebug("workspaceManagerApp_saveWorkspaceByRef",ex);
}
}
function workspaceManagerApp_workspaceListReadCallback(){
try{
this.fileBrowser.removeAll(true);
this.nameSelect.clearList();
var _1b=this.SYSTEM.Workspaces.getWorkspaces();
for(var i=0;i<_1b.length;i++){
if(_1b[i]){
var _1d=new workspaceItem_t(_1b[i].name,_1b[i]);
this.fileBrowser.addItem(_1d,["Workspace"]);
var _1e=_1b[i].name;
var _1f=19-_1e.length;
for(var j=0;j<_1f;j++){
_1e+="&nbsp;";
}
this.nameSelect.addItem(_1b[i],_1e,_1b[i].name);
}
}
if(!_1b.length){
this.nameSelect.addItem(null,"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;","");
}
this.fileBrowser.collapseAllItems();
if(!this.initialised){
this.SYSTEM.Tooltip.hideLoading();
this.initialised=true;
}
}
catch(ex){
jsExDebug("workspaceManagerApp_workspaceListReadCallback",ex);
}
}
function workspaceManagerApp_workspaceListDeleteCallback(_21){
try{
var _22=null;
for(var i=0;i<this.fileBrowser.items.length;i++){
_22=this.fileBrowser.items[i];
if(_22&&_22.data.id==_21){
this.fileBrowser.removeItem(_22.listIndex);
break;
}
}
}
catch(ex){
jsExDebug("workspaceManagerApp_workspaceListDeleteCallback",ex);
}
}
function workspaceManagerApp_managerFrame__onClose(_24){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("workspaceManagerApp_managerFrame__onClose",ex);
}
}
function workspaceManagerApp_managerFrame__onResize(_25){
try{
if(!this.fileBrowser){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _28=null;
var _29=null;
if(dX||dY){
_28=_25.width+this.SYSTEM.DM.dragDistanceX;
_29=_25.height+this.SYSTEM.DM.dragDistanceY;
if(_28<=_25.minimumWidth||_28>=_25.maximumWidth){
_28=_25.minimumWidth;
}
if(_29<=_25.minimumHeight){
_29=_25.minimumHeight;
}else{
if(_29>=_25.maximumHeight){
_29=_25.maximumHeight;
}
}
}else{
_28=_25.width;
_29=_25.height;
}
this.fileBrowser.setDimensions(_25.getInternalWidth(_28),_25.getInternalHeight(_29)-this.FILE_BROWSER_TOP);
}
catch(ex){
jsExDebug("workspaceManagerApp_managerFrame__onResize",ex);
}
}
function workspaceManagerApp_saveFrame__onClose(_2a){
try{
_2a.cleanUp();
this.saveFrame=null;
}
catch(ex){
jsExDebug("workspaceManagerApp_saveFrame__onClose",ex);
}
}
function workspaceManagerApp_saveFrame_keyPress(key){
try{
if(this.saveFrame){
if(key.which==13){
this.createWorkspace();
}
}else{
jsDebug("key other than enter pressed on save frame");
}
}
catch(ex){
jsExDebug("workspaceManagerApp_saveFrame__keyPress",ex);
}
}
function workspaceManagerApp_binding_refreshBtn_click(_2c){
try{
this.SYSTEM.Workspaces.refresh();
}
catch(ex){
jsExDebug("workspaceManagerApp_binding_refreshBtn_click",ex);
}
}
function workspaceManagerApp_binding_createConfirmBtn_click(_2d){
try{
this.createWorkspace();
}
catch(ex){
jsExDebug("workspaceManagerApp_binding_createConfirmBtn_click",ex);
}
}
function workspaceManagerApp_binding_fileBrowser_itemDelete(_2e){
try{
this.nameSelect.clearList();
var _2f=this.SYSTEM.Workspaces.getWorkspaces("Workspace");
for(var i=0;i<_2f.length;i++){
if(_2f[i]){
var _31=_2f[i].name;
var _32=19-_31.length;
for(var j=0;j<_32;j++){
_31+="&nbsp;";
}
this.nameSelect.addItem(_2f[i],_31,_2f[i].name);
}
}
if(!_2f.length){
this.nameSelect.addItem(null,"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;","");
}
}
catch(ex){
jsExDebug("workspaceManagerApp_binding_fileBrowser_itemDelete",ex);
}
}
function workspaceManagerApp_binding_quickHelpBtn_click(_34){
try{
var _35=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"workspace manager");
}
catch(ex){
jsExDebug("workspaceManagerApp_binding_quickHelpBtn_click",ex);
}
}
function workspaceManagerApp_binding_createBtn_click(_36){
try{
this.launchSaveFrame();
}
catch(ex){
jsExDebug("workspaceManagerApp_binding_createBtn_click",ex);
}
}
function workspaceManagerApp_binding_saveBtn_click(_37){
try{
var _38=this.nameSelect.getSelectedValue();
this.saveWorkspaceByRef(_38);
}
catch(ex){
jsExDebug("workspaceManagerApp_binding_saveBtn_click",ex);
}
}

try{
writerApp_t.prototype=new application_t();
writerApp_t.prototype.constructor=writerApp_t;
writerApp_t.prototype.writerApp_super=application_t.prototype.constructor;
writerApp_t.prototype.cleanUp=writerApp_cleanUp;
writerApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
writerApp_t.prototype.capture=writerApp_capture;
writerApp_t.prototype.restore=writerApp_restore;
writerApp_t.prototype.close=writerApp_close;
writerApp_t.prototype._SIG_KILL=writerApp__SIG_KILL;
writerApp_t.prototype._SIG_THEME=writerApp__SIG_THEME;
writerApp_t.prototype.createPanel=writerApp_createPanel;
writerApp_t.prototype.isDirty=writerApp_isDirty;
writerApp_t.prototype.getFileName=writerApp_getFileName;
writerApp_t.prototype.cleanAction=writerApp_cleanAction;
writerApp_t.prototype.hideTableSizeEvent=writerApp_hideTableSizeEvent;
writerApp_t.prototype.changeTextColour=writerApp_changeTextColour;
writerApp_t.prototype.changeBgColour=writerApp_changeBgColour;
writerApp_t.prototype.convertColourToHex=writerApp_convertColourToHex;
writerApp_t.prototype.updatePanelState=writerApp_updatePanelState;
writerApp_t.prototype.exportDocument=writerApp_exportDocument;
writerApp_t.prototype.dirtyStatusChangeCallback=writerApp_dirtyStatusChangeCallback;
writerApp_t.prototype.okToSave=writerApp_okToSave;
writerApp_t.prototype.checkOkToSave=writerApp_checkOkToSave;
writerApp_t.prototype.writerInitialLoadCallback=writerApp_writerInitialLoadCallback;
writerApp_t.prototype.save=writerApp_save;
writerApp_t.prototype.simpleSave=writerApp_simpleSave;
writerApp_t.prototype.saveAs=writerApp_saveAs;
writerApp_t.prototype.saveCallback=writerApp_saveCallback;
writerApp_t.prototype.load=writerApp_load;
writerApp_t.prototype.loadCallback=writerApp_loadCallback;
writerApp_t.prototype.loadTemplate=writerApp_loadTemplate;
writerApp_t.prototype.reload=writerApp_reload;
writerApp_t.prototype.getSaveData=writerApp_getSaveData;
writerApp_t.prototype.writerFrame__onClose=writerApp_writerFrame__onClose;
writerApp_t.prototype.writerFrame__onResize=writerApp_writerFrame__onResize;
writerApp_t.prototype.writerFrame__onResizeEnd=writerApp_writerFrame__onResizeEnd;
writerApp_t.prototype.writerFrame__onMove=writerApp_writerFrame__onMove;
writerApp_t.prototype.writerFrame__onMoveEnd=writerApp_writerFrame__onMoveEnd;
writerApp_t.prototype.dragDivClickEvent=writerApp_dragDivClickEvent;
writerApp_t.prototype.writerFrame__onFocus=writerApp_writerFrame__onFocus;
writerApp_t.prototype.writerFrame__onBlur=writerApp_writerFrame__onBlur;
writerApp_t.prototype.writerFrame__onScrollUp=writerApp_writerFrame__onScrollUp;
writerApp_t.prototype.writerFrame__onScrollDown=writerApp_writerFrame__onScrollDown;
writerApp_t.prototype.writerFrame_keyDown=writerApp_writerFrame_keyDown;
writerApp_t.prototype.emailFrame__onClose=writerApp_emailFrame__onClose;
writerApp_t.prototype.hyperlinkFrame__onClose=writerApp_hyperlinkFrame__onClose;
writerApp_t.prototype.addImageFrame__onClose=writerApp_addImageFrame__onClose;
writerApp_t.prototype.tableFrame__onClose=writerApp_tableFrame__onClose;
writerApp_t.prototype.exportFrame__onClose=writerApp_exportFrame__onClose;
writerApp_t.prototype.printFrame__onClose=writerApp_printFrame__onClose;
writerApp_t.prototype.binding_insertTableLink_click=writerApp_binding_insertTableLink_click;
writerApp_t.prototype.binding_hyperlinkInsertBtn_click=writerApp_binding_hyperlinkInsertBtn_click;
writerApp_t.prototype.binding_emailInsertBtn_click=writerApp_binding_emailInsertBtn_click;
writerApp_t.prototype.binding_addImageInsertBtn_click=writerApp_binding_addImageInsertBtn_click;
writerApp_t.prototype.binding_exportWordBtn_click=writerApp_binding_exportWordBtn_click;
writerApp_t.prototype.binding_exportOpenOfficeBtn_click=writerApp_binding_exportOpenOfficeBtn_click;
writerApp_t.prototype.binding_exportCancelBtn_click=writerApp_binding_exportCancelBtn_click;
writerApp_t.prototype.binding_printConfirmBtn_click=writerApp_binding_printConfirmBtn_click;
writerApp_t.prototype.binding_printCancelLink_click=writerApp_binding_printCancelLink_click;
writerApp_t.prototype.binding_borderColourBtn_click=writerApp_binding_borderColourBtn_click;
writerApp_t.prototype.binding_borderColourSelect_itemWidget=writerApp_binding_borderColourSelect_itemWidget;
writerApp_t.prototype.binding_saveBtn_click=writerApp_binding_saveBtn_click;
writerApp_t.prototype.binding_saveAsBtn_click=writerApp_binding_saveAsBtn_click;
writerApp_t.prototype.binding_openBtn_click=writerApp_binding_openBtn_click;
writerApp_t.prototype.binding_undoBtn_click=writerApp_binding_undoBtn_click;
writerApp_t.prototype.binding_redoBtn_click=writerApp_binding_redoBtn_click;
writerApp_t.prototype.binding_printBtn_click=writerApp_binding_printBtn_click;
writerApp_t.prototype.binding_exportBtn_click=writerApp_binding_exportBtn_click;
writerApp_t.prototype.binding_quickHelpBtn_click=writerApp_binding_quickHelpBtn_click;
writerApp_t.prototype.binding_spellCheckBtn_click=writerApp_binding_spellCheckBtn_click;
writerApp_t.prototype.binding_pasteBtn_click=writerApp_binding_pasteBtn_click;
writerApp_t.prototype.binding_copyBtn_click=writerApp_binding_copyBtn_click;
writerApp_t.prototype.binding_cutBtn_click=writerApp_binding_cutBtn_click;
writerApp_t.prototype.binding_fontFaceSelect_itemSelect=writerApp_binding_fontFaceSelect_itemSelect;
writerApp_t.prototype.binding_fontSizeSelect_itemSelect=writerApp_binding_fontSizeSelect_itemSelect;
writerApp_t.prototype.binding_boldBtn_click=writerApp_binding_boldBtn_click;
writerApp_t.prototype.binding_italicsBtn_click=writerApp_binding_italicsBtn_click;
writerApp_t.prototype.binding_underlineBtn_click=writerApp_binding_underlineBtn_click;
writerApp_t.prototype.binding_strikethroughBtn_click=writerApp_binding_strikethroughBtn_click;
writerApp_t.prototype.binding_subscriptBtn_click=writerApp_binding_subscriptBtn_click;
writerApp_t.prototype.binding_superscriptBtn_click=writerApp_binding_superscriptBtn_click;
writerApp_t.prototype.binding_headingDropList_itemSelect=writerApp_binding_headingDropList_itemSelect;
writerApp_t.prototype.binding_clearFormatBtn_click=writerApp_binding_clearFormatBtn_click;
writerApp_t.prototype.binding_caseDropList_itemSelect=writerApp_binding_caseDropList_itemSelect;
writerApp_t.prototype.binding_fillColourDropList_itemWidget=writerApp_binding_fillColourDropList_itemWidget;
writerApp_t.prototype.binding_fillColourBtn_click=writerApp_binding_fillColourBtn_click;
writerApp_t.prototype.binding_highlightColourDropList_itemWidget=writerApp_binding_highlightColourDropList_itemWidget;
writerApp_t.prototype.binding_highlightColourBtn_click=writerApp_binding_highlightColourBtn_click;
writerApp_t.prototype.binding_justifyBtn_click=writerApp_binding_justifyBtn_click;
writerApp_t.prototype.binding_alignLeftBtn_click=writerApp_binding_alignLeftBtn_click;
writerApp_t.prototype.binding_alignCentreBtn_click=writerApp_binding_alignCentreBtn_click;
writerApp_t.prototype.binding_alignRightBtn_click=writerApp_binding_alignRightBtn_click;
writerApp_t.prototype.binding_decIndentBtn_click=writerApp_binding_decIndentBtn_click;
writerApp_t.prototype.binding_incIndentBtn_click=writerApp_binding_incIndentBtn_click;
writerApp_t.prototype.binding_bulletBtn_click=writerApp_binding_bulletBtn_click;
writerApp_t.prototype.binding_numberBtn_click=writerApp_binding_numberBtn_click;
writerApp_t.prototype.binding_tableSize_itemSelect=writerApp_binding_tableSize_itemSelect;
writerApp_t.prototype.binding_tableSize_click=writerApp_binding_tableSize_click;
writerApp_t.prototype.binding_tableExpandBtn_click=writerApp_binding_tableExpandBtn_click;
writerApp_t.prototype.binding_borderWidthDropList_itemSelect=writerApp_binding_borderWidthDropList_itemSelect;
writerApp_t.prototype.binding_borderColourDropList_itemWidget=writerApp_binding_borderColourDropList_itemWidget;
writerApp_t.prototype.binding_deleteTableBtn_click=writerApp_binding_deleteTableBtn_click;
writerApp_t.prototype.binding_marginDropList_itemSelect=writerApp_binding_marginDropList_itemSelect;
writerApp_t.prototype.binding_pageBreakBtn_click=writerApp_binding_pageBreakBtn_click;
writerApp_t.prototype.binding_hyperlinkBtn_click=writerApp_binding_hyperlinkBtn_click;
writerApp_t.prototype.binding_emailBtn_click=writerApp_binding_emailBtn_click;
writerApp_t.prototype.binding_symbolDropList_itemWidget=writerApp_binding_symbolDropList_itemWidget;
writerApp_t.prototype.binding_addImageBtn_click=writerApp_binding_addImageBtn_click;
writerApp_t.prototype.collaboration_tokenRelease=writerApp_collaboration_tokenRelease;
writerApp_t.prototype.binding_templateSelect_itemSelect=writerApp_binding_templateSelect_itemSelect;
writerApp_t.prototype.WRITER_LEFT=10;
writerApp_t.prototype.WRITER_TOP=30;
writerApp_t.prototype.APP_ID=APP_ID_WRITER;
writerApp_t.prototype.APP_NAME="WebWriter";
writerApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.WRITER;
writerApp_t.prototype.DROP_IMG="img/app/system/widgets/hybrid_drop";
writerApp_t.prototype.SMALL_DROP_IMG="img/app/system/icons/24x24/12_drop_down.png";
writerApp_t.prototype.TABLE_FRAME_WIDTH=260;
writerApp_t.prototype.TABLE_FRAME_HEIGHT=160;
writerApp_t.prototype.LINK_FRAME_WIDTH=260;
writerApp_t.prototype.LINK_FRAME_HEIGHT=145;
writerApp_t.prototype.EXPORT_FRAME_WIDTH=300;
writerApp_t.prototype.EXPORT_FRAME_HEIGHT=140;
writerApp_t.prototype.EXPORT_TITLE_LEFT=0;
writerApp_t.prototype.EXPORT_WORD_IMG="img/app/app/writer/export_word";
writerApp_t.prototype.EXPORT_O_OFFICE_IMG="img/app/app/writer/export_oo";
writerApp_t.prototype.EXPORT_PDF_IMG="img/app/app/writer/export_pdf";
writerApp_t.prototype.EXPORT_WORD_LEFT=50;
writerApp_t.prototype.EXPORT_WORD_TOP=40;
writerApp_t.prototype.EXPORT_O_OFFICE_LEFT=50;
writerApp_t.prototype.EXPORT_O_OFFICE_TOP=80;
writerApp_t.prototype.EXPORT_PDF_LEFT=50;
writerApp_t.prototype.EXPORT_PDF_TOP=150;
writerApp_t.prototype.WORD_FORMAT=1;
writerApp_t.prototype.OPEN_OFFICE_FORMAT=2;
writerApp_t.prototype.PRINT_FRAME_WIDTH=380;
writerApp_t.prototype.PRINT_FRAME_HEIGHT=215;
writerApp_t.prototype.PRINT_HELP_TOP=35;
writerApp_t.prototype.PRINT_HELP_HEIGHT=150;
writerApp_t.prototype.PRINT_CONFIRM_LEFT=170;
writerApp_t.prototype.PRINT_CONFIRM_TOP=0;
writerApp_t.prototype.PRINT_CANCEL_LEFT=330;
writerApp_t.prototype.PRINT_CANCEL_TOP=230;
writerApp_t.prototype.PRINT_CONFIRM_IMG="img/app/app/writer/printconfirm";
writerApp_t.prototype.SAVE_IMG="img/app/system/icons/utility/save.png";
writerApp_t.prototype.SAVEAS_IMG="img/app/system/icons/utility/saveas.png";
writerApp_t.prototype.OPEN_IMG="img/app/system/icons/utility/open.png";
writerApp_t.prototype.UNDO_IMG="img/app/system/icons/utility/undo.png";
writerApp_t.prototype.REDO_IMG="img/app/system/icons/utility/redo.png";
writerApp_t.prototype.PRINT_IMG="img/app/system/icons/utility/print.png";
writerApp_t.prototype.EXPORT_IMG="img/app/system/icons/utility/export.png";
writerApp_t.prototype.SAVE_ON_TOOLTIP="Saves the document.<br>(shortcut key: Ctrl-S)";
writerApp_t.prototype.SAVE_OFF_TOOLTIP="There are no changes to save.";
writerApp_t.prototype.SMALL_BUTTON_WIDTH=24;
writerApp_t.prototype.SMALL_BUTTON_HEIGHT=24;
writerApp_t.prototype.LARGE_BUTTON_WIDTH=40;
writerApp_t.prototype.LARGE_BUTTON_HEIGHT=60;
writerApp_t.prototype.MED_BUTTON_WIDTH=40;
writerApp_t.prototype.MED_BUTTON_HEIGHT=40;
writerApp_t.prototype.DEFAULT_BGCOLOUR="rgb(202, 232, 255)";
writerApp_t.prototype.SELECT_BGCOLOUR="rgb(255, 255, 255)";
writerApp_t.prototype.FILE_TG_WIDTH=224;
writerApp_t.prototype.SAVE_LARGE_IMG="img/app/system/icons/utility/save";
writerApp_t.prototype.SAVEAS_LARGE_IMG="img/app/system/icons/utility/saveas";
writerApp_t.prototype.OPEN_LARGE_IMG="img/app/system/icons/utility/openfile";
writerApp_t.prototype.PRINT_LARGE_IMG="img/app/system/icons/utility/print";
writerApp_t.prototype.EXPORT_LARGE_IMG="img/app/system/icons/utility/export";
writerApp_t.prototype.CLIPBOARD_TG_WIDTH=76;
writerApp_t.prototype.PASTE_IMG="img/app/system/icons/40x60/paste.png";
writerApp_t.prototype.COPY_IMG="img/app/system/icons/24x24/copy.png";
writerApp_t.prototype.CUT_IMG="img/app/system/icons/24x24/cut.png";
writerApp_t.prototype.FONT_TG_WIDTH=298;
writerApp_t.prototype.SIZE_DISPLAY_WIDTH=20;
writerApp_t.prototype.FONT_GRID_ITEM_WIDTH=31;
writerApp_t.prototype.FONT_GRID_ITEM_HEIGHT=36;
writerApp_t.prototype.COLOUR_CHOOSER_CELLS_WIDE=6;
writerApp_t.prototype.COLOUR_CHOOSER_CELLS_HIGH=6;
writerApp_t.prototype.COLOUR_CHOOSER_WIDTH=100;
writerApp_t.prototype.COLOUR_CHOOSER_HEIGHT=100;
writerApp_t.prototype.BOLD_IMG="img/app/system/icons/24x24/bold_test.png";
writerApp_t.prototype.ITALICS_IMG="img/app/system/icons/24x24/italics.png";
writerApp_t.prototype.UNDERLINE_IMG="img/app/system/icons/24x24/underline.png";
writerApp_t.prototype.BORDERS_IMG="img/app/panel/font_group/borderexpand.bmp";
writerApp_t.prototype.BORDER_COLOUR_IMG="img/app/panel/font_group/bordercolourexpand.bmp";
writerApp_t.prototype.BORDER_IMG="img/app/panel/font_group/border.bmp";
writerApp_t.prototype.BORDER_NONE_IMG="img/app/panel/font_group/bordernone.bmp";
writerApp_t.prototype.BORDER_ALL_IMG="img/app/panel/font_group/borderall.bmp";
writerApp_t.prototype.BORDER_BOTTOM_IMG="img/app/panel/font_group/borderbottom.bmp";
writerApp_t.prototype.BORDER_H_LINE_IMG="img/app/panel/font_group/borderhorizontalline.bmp";
writerApp_t.prototype.BORDER_INSIDE_IMG="img/app/panel/font_group/borderinside.bmp";
writerApp_t.prototype.BORDER_INSIDE_H_IMG="img/app/panel/font_group/borderinsideh.bmp";
writerApp_t.prototype.BORDER_INSIDE_V_IMG="img/app/panel/font_group/borderinsidev.bmp";
writerApp_t.prototype.BORDER_LEFT_IMG="img/app/panel/font_group/borderleft.bmp";
writerApp_t.prototype.BORDER_OUTSIDE_IMG="img/app/panel/font_group/borderoutside.bmp";
writerApp_t.prototype.BORDER_RIGHT_IMG="img/app/panel/font_group/borderright.bmp";
writerApp_t.prototype.BORDER_GRID_IMG="img/app/panel/font_group/bordershowgrid.bmp";
writerApp_t.prototype.BORDER_TOP_IMG="img/app/panel/font_group/bordertop.bmp";
writerApp_t.prototype.FILL_COLOUR_IMG="img/app/system/icons/24x24/background_colour.png";
writerApp_t.prototype.HIGHLIGHT_COLOUR_IMG="img/app/system/icons/24x24/text_colour.png";
writerApp_t.prototype.GROW_FONT_IMG="img/app/panel/font_group/growfont.bmp";
writerApp_t.prototype.SHRINK_FONT_IMG="img/app/panel/font_group/shrinkfont.bmp";
writerApp_t.prototype.STRIKETHROUGH_IMG="img/app/system/icons/24x24/strikethrough.png";
writerApp_t.prototype.BORDER_STYLE_IMG="img/app/panel/font_group/bordernone.bmp";
writerApp_t.prototype.BORDER_DEFAULT_IMG="img/app/panel/font_group/bordernone.bmp";
writerApp_t.prototype.BORDER_DOUBLE_IMG="img/app/panel/font_group/bordernone.bmp";
writerApp_t.prototype.BORDER_THICK_IMG="img/app/panel/font_group/bordernone.bmp";
writerApp_t.prototype.BORDER_DASHED_IMG="img/app/panel/font_group/bordernone.bmp";
writerApp_t.prototype.SUPERSCRIPT_IMG="img/app/system/icons/24x24/superscript.png";
writerApp_t.prototype.SUBSCRIPT_IMG="img/app/system/icons/24x24/subscript.png";
writerApp_t.prototype.CHANGE_CASE_IMG="img/app/system/icons/24x24/case.png";
writerApp_t.prototype.CLEAR_FORMAT_IMG="img/app/system/icons/24x24/clear.png";
writerApp_t.prototype.HEADINGS_IMG="img/app/system/icons/24x24/heading.png";
writerApp_t.prototype.HEADING1_IMG="img/app/panel/font_group/text_heading_1.png";
writerApp_t.prototype.HEADING2_IMG="img/app/panel/font_group/text_heading_2.png";
writerApp_t.prototype.HEADING3_IMG="img/app/panel/font_group/text_heading_3.png";
writerApp_t.prototype.HEADING4_IMG="img/app/panel/font_group/text_heading_4.png";
writerApp_t.prototype.HEADING5_IMG="img/app/panel/font_group/text_heading_5.png";
writerApp_t.prototype.HEADING6_IMG="img/app/panel/font_group/text_heading_6.png";
writerApp_t.prototype.SYMBOL_IMG="img/app/system/icons/large/symbol";
writerApp_t.prototype.DEFAULT_HIGHLIGHT_COLOUR="rgb( 255, 0, 0 )";
writerApp_t.prototype.DEFAULT_FILL_COLOUR="rgb( 255, 255, 0 )";
writerApp_t.prototype.BORDER_BOTTOM=1;
writerApp_t.prototype.BORDER_TOP=2;
writerApp_t.prototype.BORDER_LEFT=3;
writerApp_t.prototype.BORDER_RIGHT=4;
writerApp_t.prototype.BORDER_NONE=5;
writerApp_t.prototype.BORDER_ALL=6;
writerApp_t.prototype.BORDER_OUTSIDE=7;
writerApp_t.prototype.BORDER_INSIDE=8;
writerApp_t.prototype.BORDER_INSIDE_VERT=9;
writerApp_t.prototype.BORDER_INSIDE_HOR=10;
writerApp_t.prototype.BORDER_H_LINE=11;
writerApp_t.prototype.BORDER_SHOW_GRID=12;
writerApp_t.prototype.BORDER_HIDE_GRID=13;
writerApp_t.prototype.BORDER_DEFAULT_STYLE=1;
writerApp_t.prototype.BORDER_DOUBLE_STYLE=2;
writerApp_t.prototype.BORDER_THICK_STYLE=3;
writerApp_t.prototype.HEADING_NORMAL="<p>";
writerApp_t.prototype.HEADING_PRE="<pre>";
writerApp_t.prototype.HEADING_1="<h1>";
writerApp_t.prototype.HEADING_2="<h2>";
writerApp_t.prototype.HEADING_3="<h3>";
writerApp_t.prototype.HEADING_4="<h4>";
writerApp_t.prototype.HEADING_5="<h5>";
writerApp_t.prototype.HEADING_6="<h6>";
writerApp_t.prototype.CASE_LOWER="lower";
writerApp_t.prototype.CASE_UPPER="upper";
writerApp_t.prototype.CASE_TOGGLE="toggle";
writerApp_t.prototype.BOLD_STATE=1;
writerApp_t.prototype.ITALICS_STATE=2;
writerApp_t.prototype.UNDERLINE_STATE=3;
writerApp_t.prototype.STRIKETHROUGH_STATE=4;
writerApp_t.prototype.SUPERSCRIPT_STATE=5;
writerApp_t.prototype.SUBSCRIPT_STATE=6;
writerApp_t.prototype.FILL_COLOUR_STATE=7;
writerApp_t.prototype.HIGHLIGHT_COLOUR_STATE=8;
writerApp_t.prototype.FONT_FACE_STATE=9;
writerApp_t.prototype.FONT_SIZE_STATE=10;
writerApp_t.prototype.MORE_HIGHLIGHT_COLOUR=1;
writerApp_t.prototype.MORE_FILL_COLOUR=2;
writerApp_t.prototype.MORE_BORDER_COLOUR=3;
writerApp_t.prototype.ALIGNMENT_TG_WIDTH=118;
writerApp_t.prototype.ALIGN_LEFT_IMG="img/app/system/icons/24x24/leftalign.png";
writerApp_t.prototype.ALIGN_CENTRE_IMG="img/app/system/icons/24x24/centrealign.png";
writerApp_t.prototype.ALIGN_RIGHT_IMG="img/app/system/icons/24x24/rightalign.png";
writerApp_t.prototype.INC_INDENT_IMG="img/app/system/icons/24x24/increase_indent.png";
writerApp_t.prototype.DEC_INDENT_IMG="img/app/system/icons/24x24/decrease_indent.png";
writerApp_t.prototype.WRAP_TEXT_IMG="img/app/panel/alignment_group/wraptext.bmp";
writerApp_t.prototype.JUSTIFY_IMG="img/app/system/icons/24x24/justify.png";
writerApp_t.prototype.BULLET_IMG="img/app/system/icons/24x24/bullet_list.png";
writerApp_t.prototype.NUMBER_IMG="img/app/system/icons/24x24/number_list.png";
writerApp_t.prototype.LINE_SPACING_IMG="img/app/panel/alignment_group/text_linespacing.png";
writerApp_t.prototype.SORT_IMG="img/app/panel/alignment_group/sort.bmp";
writerApp_t.prototype.PARAGRAPH_IMG="img/app/panel/alignment_group/paragraph.bmp";
writerApp_t.prototype.MERGE_AND_CENTRE=1;
writerApp_t.prototype.MERGE_ACROSS=2;
writerApp_t.prototype.MERGE_CELLS=3;
writerApp_t.prototype.UNMERGE_CELLS=4;
writerApp_t.prototype.LINE_SPACING_MORE=7;
writerApp_t.prototype.LINE_SPACING_ADD_BEFORE=8;
writerApp_t.prototype.LINE_SPACING_REMOVE_AFTER=9;
writerApp_t.prototype.TABLE_TG_WIDTH=104;
writerApp_t.prototype.TABLE_EXPAND_WIDTH=40;
writerApp_t.prototype.TABLE_EXPAND_HEIGHT=60;
writerApp_t.prototype.TABLE_EXPAND_IMG="img/app/system/icons/40x60/insert_table.png";
writerApp_t.prototype.BORDER_WIDTH_EXPAND_IMG="img/app/system/icons/24x24/table_border_width.png";
writerApp_t.prototype.BORDER_COLOUR_EXPAND_IMG="img/app/system/icons/24x24/background_colour.png";
writerApp_t.prototype.DELETE_TABLE_IMG="img/app/system/icons/24x24/table_delete.png";
writerApp_t.prototype.COLOUR_CHOOSER_CELLS_WIDE=6;
writerApp_t.prototype.COLOUR_CHOOSER_CELLS_HIGH=6;
writerApp_t.prototype.COLOUR_CHOOSER_WIDTH=100;
writerApp_t.prototype.COLOUR_CHOOSER_HEIGHT=100;
writerApp_t.prototype.DEFAULT_BORDER_WIDTH=1;
writerApp_t.prototype.DEFAULT_TABLE_BORDER_COLOUR="rgb(0,0,0)";
writerApp_t.prototype.MORE_BORDER_COLOUR=1;
writerApp_t.prototype.SEPARATORS_TG_WIDTH=92;
writerApp_t.prototype.MARGIN_LIST_WIDTH=100;
writerApp_t.prototype.MARGIN_EXPAND_IMG="img/app/system/icons/40x60/margins.png";
writerApp_t.prototype.SMALL_MARGIN_IMG="img/app/system/icons/large/MarginSmall.png";
writerApp_t.prototype.NORMAL_MARGIN_IMG="img/app/system/icons/large/MarginNormal.png";
writerApp_t.prototype.LARGE_MARGIN_IMG="img/app/system/icons/large/MarginLarge.png";
writerApp_t.prototype.NONE_MARGIN_IMG="img/app/system/icons/large/MarginNone.png";
writerApp_t.prototype.PAGE_BREAK_IMG="img/app/system/icons/40x60/new_page.png";
writerApp_t.prototype.HR_IMG="img/app/system/icons/40x60/horizontal_rule.png";
writerApp_t.prototype.MARGIN_NORMAL=25;
writerApp_t.prototype.MARGIN_SMALL=10;
writerApp_t.prototype.MARGIN_LARGE=50;
writerApp_t.prototype.MARGIN_NONE=0;
writerApp_t.prototype.TEXT_TG_WIDTH=92;
writerApp_t.prototype.TEXT_GRID_ITEM_WIDTH=31;
writerApp_t.prototype.TEXT_GRID_ITEM_HEIGHT=36;
writerApp_t.prototype.HYPERLINK_IMG="img/app/system/icons/40x60/hyperlink.png";
writerApp_t.prototype.EMAIL_IMG="img/app/system/icons/40x60/email.png";
writerApp_t.prototype.OTHER_TG_WIDTH=92;
writerApp_t.prototype.ADD_IMAGE_IMG="img/app/system/icons/40x60/insert_image.png";
writerApp_t.prototype.TEXT_DIR_TG_WIDTH=160;
writerApp_t.prototype.TEMPLATE_TG_WIDTH=230;
writerApp_t.prototype.TEMPLATE_LBL_WIDTH=writerApp_t.prototype.TEMPLATE_TG_WIDTH-8;
writerApp_t.prototype.TEMPLATE_LBL_HEIGHT=40;
writerApp_t.prototype.TEMPLATE_SELECT_WIDTH=writerApp_t.prototype.TEMPLATE_TG_WIDTH-38;
writerApp_t.prototype.PASTE_LEFT=4;
writerApp_t.prototype.PASTE_TOP=5;
writerApp_t.prototype.COPY_LEFT=48;
writerApp_t.prototype.COPY_TOP=9;
writerApp_t.prototype.CUT_LEFT=48;
writerApp_t.prototype.CUT_TOP=37;
writerApp_t.prototype.FONT_FACE_LEFT=5;
writerApp_t.prototype.FONT_FACE_TOP=9;
writerApp_t.prototype.FONT_SIZE_LEFT=166;
writerApp_t.prototype.FONT_SIZE_TOP=9;
writerApp_t.prototype.BOLD_LEFT=5;
writerApp_t.prototype.BOLD_TOP=37;
writerApp_t.prototype.ITALICS_LEFT=33;
writerApp_t.prototype.ITALICS_TOP=37;
writerApp_t.prototype.UNDERLINE_LEFT=61;
writerApp_t.prototype.UNDERLINE_TOP=37;
writerApp_t.prototype.STRIKETHROUGH_LEFT=89;
writerApp_t.prototype.STRIKETHROUGH_TOP=37;
writerApp_t.prototype.SUBSCRIPT_LEFT=122;
writerApp_t.prototype.SUBSCRIPT_TOP=37;
writerApp_t.prototype.SUPERSCRIPT_LEFT=150;
writerApp_t.prototype.SUPERSCRIPT_TOP=37;
writerApp_t.prototype.CLEAR_FORMAT_LEFT=225;
writerApp_t.prototype.CLEAR_FORMAT_TOP=9;
writerApp_t.prototype.FILL_COLOUR_BTN_LEFT=183;
writerApp_t.prototype.FILL_COLOUR_BTN_TOP=37;
writerApp_t.prototype.FILL_COLOUR_LEFT=207;
writerApp_t.prototype.FILL_COLOUR_TOP=37;
writerApp_t.prototype.HIGHLIGHT_COLOUR_BTN_LEFT=223;
writerApp_t.prototype.HIGHLIGHT_COLOUR_BTN_TOP=37;
writerApp_t.prototype.HIGHLIGHT_COLOUR_LEFT=247;
writerApp_t.prototype.HIGHLIGHT_COLOUR_TOP=37;
writerApp_t.prototype.CASE_LEFT=268;
writerApp_t.prototype.CASE_TOP=37;
writerApp_t.prototype.JUSTIFY_LEFT=60;
writerApp_t.prototype.JUSTIFY_TOP=9;
writerApp_t.prototype.ALIGN_CENTRE_LEFT=32;
writerApp_t.prototype.ALIGN_CENTRE_TOP=9;
writerApp_t.prototype.ALIGN_LEFT_LEFT=4;
writerApp_t.prototype.ALIGN_LEFT_TOP=9;
writerApp_t.prototype.ALIGN_RIGHT_LEFT=88;
writerApp_t.prototype.ALIGN_RIGHT_TOP=9;
writerApp_t.prototype.DEC_INDENT_LEFT=4;
writerApp_t.prototype.DEC_INDENT_TOP=37;
writerApp_t.prototype.INC_INDENT_LEFT=32;
writerApp_t.prototype.INC_INDENT_TOP=37;
writerApp_t.prototype.BULLET_LEFT=60;
writerApp_t.prototype.BULLET_TOP=37;
writerApp_t.prototype.HEADING_LEFT=253;
writerApp_t.prototype.HEADING_TOP=9;
writerApp_t.prototype.NUMBERED_LEFT=88;
writerApp_t.prototype.NUMBERED_TOP=37;
writerApp_t.prototype.QUICK_STYLE_LEFT=0;
writerApp_t.prototype.QUICK_STYLE_TOP=0;
writerApp_t.prototype.TABLE_SIZE_LEFT=4;
writerApp_t.prototype.TABLE_SIZE_TOP=64;
writerApp_t.prototype.TABLE_SIZE_DROP_LEFT=4;
writerApp_t.prototype.TABLE_SIZE_DROP_TOP=4;
writerApp_t.prototype.TABLE_BORDER_WIDTH_LEFT=48;
writerApp_t.prototype.TABLE_BORDER_WIDTH_TOP=4;
writerApp_t.prototype.TABLE_BORDER_COLOUR_LEFT=76;
writerApp_t.prototype.TABLE_BORDER_COLOUR_TOP=4;
writerApp_t.prototype.TABLE_DELETE_LEFT=48;
writerApp_t.prototype.TABLE_DELETE_TOP=32;
writerApp_t.prototype.MARGIN_LEFT=4;
writerApp_t.prototype.MARGIN_TOP=4;
writerApp_t.prototype.PAGE_BREAK_LEFT=48;
writerApp_t.prototype.PAGE_BREAK_TOP=4;
writerApp_t.prototype.HORIZONTAL_RULE_LEFT=92;
writerApp_t.prototype.HORIZONTAL_RULE_TOP=4;
writerApp_t.prototype.HYPERLINK_LEFT=4;
writerApp_t.prototype.HYPERLINK_TOP=4;
writerApp_t.prototype.EMAIL_LEFT=48;
writerApp_t.prototype.EMAIL_TOP=4;
writerApp_t.prototype.SYMBOL_LEFT=48;
writerApp_t.prototype.SYMBOL_TOP=4;
writerApp_t.prototype.ADD_IMAGE_LEFT=4;
writerApp_t.prototype.ADD_IMAGE_TOP=4;
writerApp_t.prototype.TEMPLATE_LBL_LEFT=4;
writerApp_t.prototype.TEMPLATE_LBL_TOP=4;
writerApp_t.prototype.TEMPLATE_SELECT_LEFT=4;
writerApp_t.prototype.TEMPLATE_SELECT_TOP=40;
writerApp_t.prototype.INSERT_FRAME_WIDTH=260;
writerApp_t.prototype.INSERT_FRAME_HEIGHT=80;
}
catch(ex){
jsExDebug("writerApp_t.prototype",ex);
}
function writerApp_t(_1){
try{
this.writerApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.createPanel();
this.file=null;
var _2=new this.SYSTEM.Delegate(this,this.writerInitialLoadCallback);
this.initialLoadFileId=null;
this.initialLoadTemplateName=null;
if(_1[0]){
this.initialLoadFileId=_1[0];
if(_1[2]&&!this.SYSTEM.Filesystem.getFileFromFileId(this.initialLoadFileId)){
this.isFilePublic=true;
}
}else{
if(_1[1]){
this.initialLoadTemplateName=_1[1];
}
}
var _3=new this.SYSTEM.Frame.Window("writerFrame","WebWriter",this,500,400,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN,false,false,true);
this.collaborationIcon=new this.SYSTEM.Widget.CollaborationIcon("collaborationIcon");
_3.addCustomControl(this.collaborationIcon);
this.collaboration.setCollaborationIcon(this.collaborationIcon);
var _4=new this.SYSTEM.Widget.Writer("writer",this,_2,new this.SYSTEM.Delegate(this,this.dirtyStatusChangeCallback));
_4.setDimensions(_3.width-(_3.leftEdgeWidth+_3.rightEdgeWidth),_3.height-(_3.topEdgeHeight+_3.bottomEdgeHeight));
_4.notifySelectionChange(new this.SYSTEM.Delegate(this,this.updatePanelState));
_4.setContainerObject(_3);
var _5=document.createElement("div");
_5.style.position="absolute";
_5.style.left=(_3.leftEdgeWidth-2)+"px";
_5.style.top=(_3.topEdgeHeight-2)+"px";
_5.style.width=_4.width+"px";
_5.style.height=_4.height+"px";
this.dragDiv=_5;
this.SYSTEM.Event.attachEvent(_5,"onmousedown","mousedown",this.dragDivClickEvent,this);
_3.addWidget(_4,_3.leftEdgeWidth,_3.topEdgeHeight);
_3.show();
this.writerFrame=_3;
this.writer=_4;
this.selectedFillColour=this.DEFAULT_FILL_COLOUR;
this.selectedHighlightColour=this.DEFAULT_HIGHLIGHT_COLOUR;
this.currentBorderColour=this.DEFAULT_TABLE_BORDER_COLOUR;
this.currentBorderWidth=this.DEFAULT_BORDER_WIDTH;
this.saveDataDelegate=new this.SYSTEM.Delegate(this.writer,this.writer.getSaveData);
this.getTokenDelegate=new this.SYSTEM.Delegate(this.collaboration,this.collaboration.updateTokenOwner);
this.isDirtyDelegate=new this.SYSTEM.Delegate(this,this.isDirty);
this.addBrowserIncompatibility("chrome","The WebWriter is not fully functional in this type of browser. If you are unable to type at all in the WebWriter, try putting in a new line (hit 'Enter') and then continue.");
this.addBrowserIncompatibility("safari","The WebWriter is not fully functional in this type of browser. If you are unable to type at all in the WebWriter, try putting in a new line (hit 'Enter') and then continue.");
}
catch(ex){
jsExDebug("writerApp_t",ex);
}
}
function writerApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.dragDiv,"onmousedown","mousedown");
me.dragDiv=null;
me.selectedHighlightColour=null;
me.selectedFillColour=null;
me.writer=null;
me.writerFrame=null;
me.printFrame=null;
me.exportFrame=null;
me.saveDataDelegate.cleanUp();
me.saveDataDelegate=null;
me.getTokenDelegate.cleanUp();
me.getTokenDelegate=null;
me.isDirtyDelegate.cleanUp();
me.isDirtyDelegate=null;
if(me.file){
me.file.cleanUp();
me.file=null;
}
if(me.emailFrame){
me.emailURLLabel=null;
me.emailURLText=null;
me.emailInsertBtn=null;
me.emailText=null;
me.emailTextLabel=null;
me.emailFrame=null;
}
if(me.hyperlinkFrame){
me.hyperlinkURLLabel=null;
me.hyperlinkURLText=null;
me.hyperlinkInsertBtn=null;
me.hyperlinkFrame=null;
me.hyperlinkTextLabel=null;
me.hyperlinkText=null;
}
if(me.addImageFrame){
me.addImageFrame=null;
}
if(me.tableFrame){
me.rowsLabel=null;
me.columnsLabel=null;
me.rowSelect=null;
me.columnSelect=null;
me.widthLabel=null;
me.widthText=null;
me.borderWidthLabel=null;
me.borderColourChooser2=null;
me.insertTableLink=null;
me.tableFrame=null;
}
me.tableToolgroup.cleanUp();
me.tableToolgroup=null;
me.collaboration=null;
me.copyBtn=null;
me.cutBtn=null;
if(DEBUG_MESSAGES){
me.toggleViewBtn=null;
me.importTestBtn=null;
}
me.fontFaceSelect=null;
me.fontSizeSelect=null;
me.boldBtn=null;
me.italicsBtn=null;
me.underlineBtn=null;
me.strikethroughBtn=null;
me.subscriptBtn=null;
me.superscriptBtn=null;
me.headingDropList=null;
me.clearFormatBtn=null;
me.caseDropList=null;
me.fillColourChooser=null;
me.fillColourBtn=null;
me.fillColourDropList=null;
me.highlightColourChooser=null;
me.highlightColourBtn=null;
me.highlightColourDropList=null;
me.justifyBtn=null;
me.alignLeftBtn=null;
me.alignCentreBtn=null;
me.alignRightBtn=null;
me.decIndentBtn=null;
me.incIndentBtn=null;
me.bulletBtn=null;
me.numberBtn=null;
me.tableSize=null;
me.tableExpandBtn=null;
me.borderWidthDropList=null;
me.borderColourChooser=null;
me.borderColourDropList=null;
me.deleteTableBtn=null;
me.marginDropList=null;
me.pageBreakBtn=null;
me.hyperlinkBtn=null;
me.emailBtn=null;
me.symbolDropList=null;
me.addImageBtn=null;
me.sendToolgroup=null;
me.sharing=null;
me.collaborationIcon=null;
me.isFilePublic=null;
me.saveBtn=null;
me.SYSTEM.Tooltip.hideLoading();
me.application_cleanUp();
}
catch(ex){
jsExDebug("writerApp_cleanUp",ex);
}
}
function writerApp_capture(){
try{
var _7=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _8=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="writer:"+(this.writerFrame.width/_8)+","+(this.writerFrame.height/_7)+","+(this.writerFrame.positionX/_8)+","+((this.writerFrame.positionY-this.SYSTEM.Panel.getHeight())/_7);
if(this.file&&this.file.fileid){
this.captureString+=","+this.file.fileid+","+(this.isFilePublic?"p":"");
}
return this.captureString;
}
catch(ex){
jsExDebug("writerApp_capture",ex);
}
}
function writerApp_restore(_9){
try{
if(!_9){
return;
}
var _a=_9.split(":")[1].split(",");
var _b=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _c=this.SYSTEM.Environment.SCREEN_WIDTH;
var _d=parseInt(_c*parseFloat(_a[0]));
var _e=parseInt(_b*parseFloat(_a[1]));
var _f=parseInt(_c*parseFloat(_a[2]));
var top=parseInt((_b*parseFloat(_a[3]))+this.SYSTEM.Panel.getHeight());
this.writerFrame.setDimensions(_d,_e);
this.writerFrame.setPosition(_f,top);
this.initialLoadFileId=parseInt(_a[4]);
if(_a[5]&&_a[5]=="p"){
this.isFilePublic=true;
}
}
catch(ex){
jsExDebug("writerApp_restore",ex);
}
}
function writerApp_close(){
try{
this.writerFrame.close();
}
catch(ex){
jsExDebug("writerApp_close",ex);
}
}
function writerApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("writerApp__SIG_KILL",ex);
}
}
function writerApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("writerApp__SIG_THEME",ex);
}
}
function writerApp_createPanel(){
try{
var _11=this.APPLICATION.Panel;
var _12=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE|button_t.prototype.HOVER_ON_IMAGE;
var _13=button_t.prototype.HOVER_IMAGE;
var _14=24;
var _15=new this.SYSTEM.Widget.ClassButton("saveBtn",2,_14,_14,null,this.SYSTEM.Icon.Small.SAVE_DISABLED,"Save",this.SAVE_OFF_TOOLTIP);
var _16=new this.SYSTEM.Widget.ClassButton("saveAsBtn",2,_14,_14,null,this.SAVEAS_IMG,"Save As","Save the document as a new file.");
var _17=new this.SYSTEM.Widget.ClassButton("openBtn",2,_14,_14,null,this.OPEN_IMG,"Open","Open a document.<br>(shortcut key: Ctrl-O)");
var _18=new this.SYSTEM.Widget.ClassButton("undoBtn",2,_14,_14,null,this.UNDO_IMG,"Undo","Undo the last action.");
var _19=new this.SYSTEM.Widget.ClassButton("redoBtn",2,_14,_14,null,this.REDO_IMG,"Redo","Redo the last 'undone' action.");
var _1a=new this.SYSTEM.Widget.ClassButton("printBtn",2,_14,_14,null,this.PRINT_IMG,"Print","Print the document.");
var _1b=new this.SYSTEM.Widget.ClassButton("exportBtn",2,_14,_14,null,this.EXPORT_IMG,"Export","Download the document to your desktop.");
var _1c=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,_14,_14,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
var _1d=new this.SYSTEM.Widget.ClassButton("spellCheckBtn",2,_14,_14,null,this.SYSTEM.Icon.Small.SPELLCHECK,"Spell check","Run a spelling check on your document.");
var _1e=new this.SYSTEM.Widget.ClassButton("pasteBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.PASTE_IMG,"Paste","Paste the content that has been copied.<br>(shortcut key: Ctrl-V)",null,120);
var _1f=new this.SYSTEM.Widget.ClassButton("copyBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.COPY_IMG,"Copy","Copies the selected document content.<br>(shortcut key: Ctrl-C)",null,120);
var _20=new this.SYSTEM.Widget.ClassButton("cutBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.CUT_IMG,"Cut","Copy and remove the selected document content.<br>(shortcut key: Ctrl-X)",null,120);
if(DEBUG_MESSAGES){
var _21=new this.SYSTEM.Widget.Button("toggleViewBtn","img/dev_only/toggle");
var _22=new this.SYSTEM.Widget.Button("importTestBtn","img/dev_only/import");
this.toggleViewBtn=_21;
this.importTestBtn=_22;
}
var _23=new this.SYSTEM.Widget.FontFaceSelect("fontFaceSelect");
var _24=new this.SYSTEM.Widget.FontSizeSelect("fontSizeSelect");
var _25=new this.SYSTEM.Widget.ClassButton("boldBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.BOLD_IMG,"Bold","Makes the selected text bold.<br>(shortcut key: Ctrl + B)",null,120);
getChildNode(_25.widgetElement,"img",0).setAttribute("id","bold_test");
var _26=new this.SYSTEM.Widget.ClassButton("italicsBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.ITALICS_IMG,"Italics","Makes the selected text italicised.<br>(shortcut key: Ctrl + I)",null,120);
var _27=new this.SYSTEM.Widget.ClassButton("underlineBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.UNDERLINE_IMG,"Underline","Underline the selected text.<br>(shortcut key: Ctrl + U)",null,120);
var _28=new this.SYSTEM.Widget.ClassButton("strikethroughBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.STRIKETHROUGH_IMG,"Strikethrough","Gives the selected text a strikethrough.",null,120);
var _29=new this.SYSTEM.Widget.ClassButton("subscriptBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.SUBSCRIPT_IMG,"Subscript","Shrinks the selected text and aligns it to the bottom of the line.",null,120);
var _2a=new this.SYSTEM.Widget.ClassButton("superscriptBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.SUPERSCRIPT_IMG,"Superscript","Shrinks the selected text and aligns it to the top of the line.",null,120);
var _2b=new this.SYSTEM.Widget.DropList("headingDropList",this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,this.HEADINGS_IMG);
_2b.alignLeft();
_2b.verticalAlignCentre();
_2b.allowBorder("black");
_2b.setButtonTooltip("Heading","Formats the text to match the selected heading style.");
_2b.addItem(this.HEADING_NORMAL,"<p style='padding: 0px; margin-top: 0px; margin-bottom: 0px;'>Normal</p>");
_2b.addItem(this.HEADING_PRE,"<pre style='padding: 0px; margin-top: 0px; margin-bottom: 0px;'>Preformatted</pre>");
_2b.addItem(this.HEADING_1,"<h1 style='padding: 0px; margin-top: 0px; margin-bottom: 0px;'>Heading 1</h1>");
_2b.addItem(this.HEADING_2,"<h2 style='padding: 0px; margin-top: 0px; margin-bottom: 0px;'>Heading 2</h2>");
_2b.addItem(this.HEADING_3,"<h3 style='padding: 0px; margin-top: 0px; margin-bottom: 0px;'>Heading 3</h3>");
_2b.addItem(this.HEADING_4,"<h4 style='padding: 0px; margin-top: 0px; margin-bottom: 0px;'>Heading 4</h4>");
_2b.addItem(this.HEADING_5,"<h5 style='padding: 0px; margin-top: 0px; margin-bottom: 0px;'>Heading 5</h5>");
_2b.addItem(this.HEADING_6,"<h6 style='padding: 0px; margin-top: 0px; margin-bottom: 0px;'>Heading 6</h6>");
var _2c=new this.SYSTEM.Widget.ClassButton("clearFormatBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.CLEAR_FORMAT_IMG,"Clear formatting","Removes the formatting from the selected text.");
var _2d=new this.SYSTEM.Widget.ColourChooser("fillColourChooser",this.COLOUR_CHOOSER_CELLS_WIDE,this.COLOUR_CHOOSER_CELLS_HIGH,this.COLOUR_CHOOSER_WIDTH,this.COLOUR_CHOOSER_HEIGHT,1);
_2d.setSelectedColour(this.DEFAULT_FILL_COLOUR);
var _2e=new this.SYSTEM.Widget.DropList("fillColourDropList",this.SMALL_BUTTON_WIDTH/2,this.SMALL_BUTTON_HEIGHT,this.SMALL_DROP_IMG);
_2e.allowBorder("black");
_2e.disallowSelectedHighlight();
_2e.disallowItemBorder();
_2e.addWidget(null,_2d);
var _2f=new this.SYSTEM.Widget.ClassButton("fillColourBtn",classButton_t.prototype.TYPE_PANEL_BUTTON_BG_COLOUR,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.FILL_COLOUR_IMG,"Background Colour","Sets the background colour of the selected text.");
_2f.setBackgroundColour(_2d.selectedColour);
var _30=new this.SYSTEM.Widget.ColourChooser("highlightColourChooser",this.COLOUR_CHOOSER_CELLS_WIDE,this.COLOUR_CHOOSER_CELLS_HIGH,this.COLOUR_CHOOSER_WIDTH,this.COLOUR_CHOOSER_HEIGHT,1);
_30.setSelectedColour(this.DEFAULT_HIGHLIGHT_COLOUR);
var _31=new this.SYSTEM.Widget.ClassButton("highlightColourBtn",classButton_t.prototype.TYPE_PANEL_BUTTON_BG_COLOUR,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.HIGHLIGHT_COLOUR_IMG,"Text Colour","Sets the colour of the selected text.");
_31.setBackgroundColour(_30.selectedColour);
var _32=new this.SYSTEM.Widget.DropList("highlightColourDropList",this.SMALL_BUTTON_WIDTH/2,this.SMALL_BUTTON_HEIGHT,this.SMALL_DROP_IMG);
_32.allowBorder("black");
_32.disallowSelectedHighlight();
_32.disallowItemBorder();
_32.addWidget(null,_30);
var _33=new this.SYSTEM.Widget.ClassButton("justifyBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.JUSTIFY_IMG,"Justify","Justifies the selected text.");
var _34=new this.SYSTEM.Widget.ClassButton("alignLeftBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.ALIGN_LEFT_IMG,"Align left","Aligns the selected text to the left of the document.");
var _35=new this.SYSTEM.Widget.ClassButton("alignCentreBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.ALIGN_CENTRE_IMG,"Align centre","Centres the selected text in the document.");
var _36=new this.SYSTEM.Widget.ClassButton("alignRightBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.ALIGN_RIGHT_IMG,"Align right","Aligns the selected text to the right of the document.");
var _37=new this.SYSTEM.Widget.ClassButton("decIndentBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.DEC_INDENT_IMG,"Decrease indent","Decreases the indentation on the selected text.");
var _38=new this.SYSTEM.Widget.ClassButton("incIndentBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.INC_INDENT_IMG,"Increase indent","Increases the indentation on the selected text.");
var _39=new this.SYSTEM.Widget.ClassButton("bulletBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.BULLET_IMG,"Bullet list","Makes a bullet point list from the selected text.");
var _3a=new this.SYSTEM.Widget.ClassButton("numberBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.NUMBER_IMG,"Numbered list","Makes a numbered list from the selected text.");
var _3b=this.DROP_IMG;
var _3c=button_t.prototype.HOVER_IMAGE;
var _3d=new this.SYSTEM.Widget.TableSize("tableSize",10,10);
_3d.allowMoreOption();
_3d.allowHideOnDocumentClick();
_3d.hide();
var _3e=new this.SYSTEM.Widget.ClassButton("tableExpandBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.TABLE_EXPAND_WIDTH,this.TABLE_EXPAND_HEIGHT,null,this.TABLE_EXPAND_IMG,"Insert table","Insert a table of the selected size.");
var _3f=new this.SYSTEM.Widget.DropList("borderWidthDropList",this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,this.BORDER_WIDTH_EXPAND_IMG);
_3f.alignCentre();
_3f.allowBorder("black");
_3f.setButtonTooltip("Table border width","Change border width of the table.");
_3f.addItem(0,"&nbsp;&nbsp;0&nbsp;&nbsp;");
_3f.addItem(1,"1");
_3f.addItem(2,"2");
_3f.addItem(3,"3");
var _40=new colourChooserWidget_t("borderColourChooser",this.COLOUR_CHOOSER_CELLS_WIDE,this.COLOUR_CHOOSER_CELLS_HIGH,this.COLOUR_CHOOSER_WIDTH,this.COLOUR_CHOOSER_HEIGHT,1);
var _41=new this.SYSTEM.Widget.DropList("borderColourDropList",this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,this.BORDER_COLOUR_EXPAND_IMG,null,null,null,classButton_t.prototype.TYPE_PANEL_BUTTON_BG_COLOUR);
_41.alignLeft();
_41.allowBorder("black");
_41.setButtonTooltip("Table border colour","Change border colour of the table.");
_41.addWidget(null,_40);
_41.dropBtn.defaultBtn.setBackgroundColour(this.currentBorderColour);
var _42=new this.SYSTEM.Widget.ClassButton("deleteTableBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.SMALL_BUTTON_WIDTH,this.SMALL_BUTTON_HEIGHT,null,this.DELETE_TABLE_IMG,"Delete table","Delete the currently selected table.");
var _43=new this.SYSTEM.Widget.DropList("marginDropList",this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,this.MARGIN_EXPAND_IMG);
_43.disallowSelectedHighlight();
_43.alignLeft();
_43.allowBorder("black");
_43.setButtonTooltip("Margin size","Set the size of the documents margin.");
_43.dropBtn.defaultBtn.stateOnImage=_43.dropBtn.defaultBtn.stateOffImage;
var _44=_43.addItem(this.MARGIN_NORMAL,"&nbsp;&nbsp;Normal&nbsp;&nbsp;",this.NORMAL_MARGIN_IMG,null,58,58);
var _45=_43.addItem(this.MARGIN_SMALL,"&nbsp;&nbsp;Small",this.SMALL_MARGIN_IMG,null,58,58);
var _46=_43.addItem(this.MARGIN_LARGE,"&nbsp;&nbsp;Large",this.LARGE_MARGIN_IMG,null,58,58);
var _46=_43.addItem(this.MARGIN_NONE,"&nbsp;&nbsp;None",this.NONE_MARGIN_IMG,null,58,58);
var _47=new this.SYSTEM.Widget.ClassButton("pageBreakBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.PAGE_BREAK_IMG,"Pagebreak","Insert a pagebreak.");
var _48=new this.SYSTEM.Widget.ClassButton("hyperlinkBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.HYPERLINK_IMG,"Hyperlink","Insert a hyperlink.");
var _49=new this.SYSTEM.Widget.ClassButton("emailBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.EMAIL_IMG,"Email address","Insert an email address.");
var _4a=new this.SYSTEM.Widget.SymbolDropList("symbolDropList");
_4a.setButtonTooltip("Insert a symbol","Inserts a symbol into the document.");
this.symbolDropList=_4a;
var _4b=new this.SYSTEM.Widget.ClassButton("addImageBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,this.LARGE_BUTTON_WIDTH,this.LARGE_BUTTON_HEIGHT,null,this.ADD_IMAGE_IMG,"Image","Insert an image into the document.");
var _4c=new this.SYSTEM.Widget.Label("templateLabel");
_4c.setText("Select the name of the WebWriter template you wish to load.");
_4c.setDimensions(this.TEMPLATE_LBL_WIDTH,this.TEMPLATE_LBL_HEIGHT);
var _4d=new this.SYSTEM.Widget.DropText("templateSelect",this.TEMPLATE_SELECT_WIDTH,22,this.TEMPLATE_SELECT_WIDTH+30);
for(var _4e in WRITER_TEMPLATES){
_4d.addItem(_4e,WRITER_TEMPLATES[_4e],WRITER_TEMPLATES[_4e]);
}
_11.addUtility(_15);
_11.addUtility(_16);
_11.addUtility(_17);
_11.addUtility(_18);
_11.addUtility(_19);
_11.addUtility(_1a);
_11.addUtility(_1b);
_11.addUtility(_1c);
_11.addUtility(_1d);
_11.addTab("Formatting");
_11.addToolgroup("Clipboard",this.CLIPBOARD_TG_WIDTH,"Formatting");
_11.addWidget(_1e,this.PASTE_LEFT,this.PASTE_TOP,"Clipboard");
_11.addWidget(_1f,this.COPY_LEFT,this.COPY_TOP,"Clipboard");
_11.addWidget(_20,this.CUT_LEFT,this.CUT_TOP,"Clipboard");
_11.addToolgroup("Font",this.FONT_TG_WIDTH,"Formatting");
_11.addWidget(_25,this.BOLD_LEFT,this.BOLD_TOP,"Font");
_11.addWidget(_26,this.ITALICS_LEFT,this.ITALICS_TOP,"Font");
_11.addWidget(_27,this.UNDERLINE_LEFT,this.UNDERLINE_TOP,"Font");
_11.addWidget(_28,this.STRIKETHROUGH_LEFT,this.STRIKETHROUGH_TOP,"Font");
_11.addWidget(_29,this.SUBSCRIPT_LEFT,this.SUBSCRIPT_TOP,"Font");
_11.addWidget(_2a,this.SUPERSCRIPT_LEFT,this.SUPERSCRIPT_TOP,"Font");
_11.addWidget(_2c,this.CLEAR_FORMAT_LEFT,this.CLEAR_FORMAT_TOP,"Font");
_11.addWidget(_2b,this.HEADING_LEFT,this.HEADING_TOP,"Font");
_11.addWidget(_2f,this.FILL_COLOUR_BTN_LEFT,this.FILL_COLOUR_BTN_TOP,"Font");
_11.addWidget(_2e,this.FILL_COLOUR_LEFT,this.FILL_COLOUR_TOP,"Font");
_11.addWidget(_31,this.HIGHLIGHT_COLOUR_BTN_LEFT,this.HIGHLIGHT_COLOUR_BTN_TOP,"Font");
_11.addWidget(_32,this.HIGHLIGHT_COLOUR_LEFT,this.HIGHLIGHT_COLOUR_TOP,"Font");
_11.addWidget(_23,this.FONT_FACE_LEFT,this.FONT_FACE_TOP,"Font");
_11.addWidget(_24,this.FONT_SIZE_LEFT,this.FONT_SIZE_TOP,"Font");
_11.addToolgroup("Alignment",this.ALIGNMENT_TG_WIDTH,"Formatting");
_11.addWidget(_33,this.JUSTIFY_LEFT,this.JUSTIFY_TOP,"Alignment");
_11.addWidget(_34,this.ALIGN_LEFT_LEFT,this.ALIGN_LEFT_TOP,"Alignment");
_11.addWidget(_35,this.ALIGN_CENTRE_LEFT,this.ALIGN_CENTRE_TOP,"Alignment");
_11.addWidget(_36,this.ALIGN_RIGHT_LEFT,this.ALIGN_RIGHT_TOP,"Alignment");
_11.addWidget(_37,this.DEC_INDENT_LEFT,this.DEC_INDENT_TOP,"Alignment");
_11.addWidget(_38,this.INC_INDENT_LEFT,this.INC_INDENT_TOP,"Alignment");
_11.addWidget(_39,this.BULLET_LEFT,this.BULLET_TOP,"Alignment");
_11.addWidget(_3a,this.NUMBERED_LEFT,this.NUMBERED_TOP,"Alignment");
_11.addToolgroup("Table",this.TABLE_TG_WIDTH,"Formatting",true);
_11.addWidget(_42,this.TABLE_DELETE_LEFT,this.TABLE_DELETE_TOP,"Table");
_11.addWidget(_3e,this.TABLE_SIZE_DROP_LEFT,this.TABLE_SIZE_DROP_TOP,"Table");
_11.addWidget(_3d,this.TABLE_SIZE_LEFT,this.TABLE_SIZE_TOP,"Table");
_11.addWidget(_3f,this.TABLE_BORDER_WIDTH_LEFT,this.TABLE_BORDER_WIDTH_TOP,"Table");
_11.addWidget(_41,this.TABLE_BORDER_COLOUR_LEFT,this.TABLE_BORDER_COLOUR_TOP,"Table");
this.tableToolgroup=_11.getToolgroup("Table");
_11.addTab("Insert");
_11.insertToolgroup("Insert",this.tableToolgroup,true);
_11.addToolgroup("Separators",this.SEPARATORS_TG_WIDTH,"Insert");
_11.addWidget(_43,this.MARGIN_LEFT,this.MARGIN_TOP,"Separators");
_11.addWidget(_47,this.PAGE_BREAK_LEFT,this.PAGE_BREAK_TOP,"Separators");
_11.addToolgroup("Text",this.TEXT_TG_WIDTH,"Insert");
_11.addWidget(_48,this.HYPERLINK_LEFT,this.HYPERLINK_TOP,"Text");
_11.addWidget(_49,this.EMAIL_LEFT,this.EMAIL_TOP,"Text");
_11.addToolgroup("Other",this.OTHER_TG_WIDTH,"Insert");
_11.addWidget(_4b,this.ADD_IMAGE_LEFT,this.ADD_IMAGE_TOP,"Other");
_11.addWidget(_4a,this.SYMBOL_LEFT,this.SYMBOL_TOP,"Other");
_11.addTab("Sharing");
this.collaboration=new collaborationToolgroup_t("collaboration",this);
this.sharing=new sharingToolgroup_t("sharing",this);
this.sendToolgroup=new sendToolgroup_t("sendToolgroup",this);
_11.insertToolgroup("Sharing",this.collaboration);
_11.insertToolgroup("Sharing",this.sharing);
_11.insertToolgroup("Sharing",this.sendToolgroup);
if(DEBUG_MESSAGES){
_11.addToolgroup("Test",this.OTHER_TG_WIDTH,"Insert");
_11.addWidget(_21,4,4,"Test");
_11.addWidget(_22,4,32,"Test");
}
_11.addTab("Templates");
_11.addToolgroup("Templates",this.TEMPLATE_TG_WIDTH,"Templates");
_11.addWidget(_4c,this.TEMPLATE_LBL_LEFT,this.TEMPLATE_LBL_TOP,"Templates");
_11.addWidget(_4d,this.TEMPLATE_SELECT_LEFT,this.TEMPLATE_SELECT_TOP,"Templates");
this.saveBtn=_15;
this.copyBtn=_1f;
this.cutBtn=_20;
this.fontFaceSelect=_23;
this.fontSizeSelect=_24;
this.boldBtn=_25;
this.italicsBtn=_26;
this.underlineBtn=_27;
this.strikethroughBtn=_28;
this.subscriptBtn=_29;
this.superscriptBtn=_2a;
this.headingDropList=_2b;
this.clearFormatBtn=_2c;
this.fillColourChooser=_2d;
this.fillColourBtn=_2f;
this.fillColourDropList=_2e;
this.highlightColourChooser=_30;
this.highlightColourBtn=_31;
this.highlightColourDropList=_32;
this.justifyBtn=_33;
this.alignLeftBtn=_34;
this.alignCentreBtn=_35;
this.alignRightBtn=_36;
this.decIndentBtn=_37;
this.incIndentBtn=_38;
this.bulletBtn=_39;
this.numberBtn=_3a;
this.tableSize=_3d;
this.tableExpandBtn=_3e;
this.borderWidthDropList=_3f;
this.borderColourChooser=_40;
this.borderColourDropList=_41;
this.deleteTableBtn=_42;
this.marginDropList=_43;
this.pageBreakBtn=_47;
this.hyperlinkBtn=_48;
this.emailBtn=_49;
this.symbolDropList=_4a;
this.addImageBtn=_4b;
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.GECKO_COMPATABLE){
}
}
catch(ex){
jsExDebug("writerApp_createPanel",ex);
}
}
function writerApp_save(_4f,_50,_51,_52){
var me=this;
function doSave(){
try{
me.file.getDataAndSaveRevision(null,new me.SYSTEM.Delegate(me,me.saveCallback));
}
catch(ex){
jsExDebug("writerApp_save: doSave",ex);
}
}
try{
if(!this.file){
return;
}
if(!this.checkOkToSave(_51,_52)){
return;
}
if(_50){
this.saveDelegate=_50;
}else{
this.saveDelegate=null;
}
if(_4f){
this.SYSTEM.Tooltip.showLoading(doSave,"WebWriter","Saving "+this.file.filename+"...");
}else{
doSave();
}
}
catch(ex){
jsExDebug("writerApp_save",ex);
}
}
function writerApp_simpleSave(_54){
try{
var _55=true;
if(!this.file){
_55=false;
}
if(!this.checkOkToSave()){
continueToSave=false;
}
if(_55){
this.file.getDataAndSaveRevision(null,_54);
}else{
if(_54){
_54.invoke(false);
}
}
}
catch(ex){
jsExDebug("writerApp_simpleSave",ex);
}
}
function writerApp_saveAs(_56,_57,_58){
function closeCallback(){
try{
if(_57){
_57.invoke(false);
}
}
catch(ex){
jsExDebug("writerApp_saveAs: closeCallback",ex);
}
}
function actionCallback(_59,_5a,_5b){
function fileCreationCallback(){
try{
if(_58){
this.simpleSave(_57);
}else{
if(_5b){
this.save(_56,_57,true,true);
}else{
this.save(_56,_57,true);
}
}
}
catch(ex){
jsExDebug("actionCallback: fileCreationCallback",ex);
}
}
try{
if(this.file){
this.file.cleanUp();
this.file=null;
}
if(_5b){
this.file=new this.SYSTEM.Filesystem.File(_5b,this.saveDataDelegate,this.getTokenDelegate,new this.SYSTEM.Delegate(this,fileCreationCallback),this.isDirtyDelegate,[_5a],_59,this.SYSTEM.Filesystem.File.TYPE_WRITER);
this.file.setLoadRevisionDelegate(new this.SYSTEM.Delegate(this,this.loadCallback));
}else{
this.file=new this.SYSTEM.Filesystem.File(false,this.saveDataDelegate,this.getTokenDelegate,new this.SYSTEM.Delegate(this,fileCreationCallback),this.isDirtyDelegate,[_5a],_59,this.SYSTEM.Filesystem.File.TYPE_WRITER);
this.file.setLoadRevisionDelegate(new this.SYSTEM.Delegate(this,this.loadCallback));
}
}
catch(ex){
jsExDebug("writerApp_saveAs: actionCallback",ex);
}
}
try{
var _5c=new this.SYSTEM.Dialogue.Save(this,new this.SYSTEM.Delegate(this,actionCallback),new this.SYSTEM.Delegate(this,closeCallback),this.SYSTEM.Filesystem.File.TYPE_WRITER);
}
catch(ex){
jsExDebug("writerApp_saveAs",ex);
}
}
function writerApp_saveCallback(_5d){
try{
if(_5d){
this.writerFrame.setTitle("WebWriter : "+this.file.filename);
if(this.collaboration.getFileId()!=this.file.fileid){
this.collaboration.updateFileId(this.file.fileid);
}
this.sharing.setFileId(this.file.fileid);
this.sendToolgroup.setFileId(this.file.fileid);
}else{
if(this.file.errorBadFileName){
var _5e=new this.SYSTEM.Dialogue.Error(this,"WebWriter","Invalid file name given, The following characters are not allowed in file names: ?*+/\\$()[]{}|;:,%@&'\"`~^",140);
this.writer.setDirty(true);
}
this.file.cleanUp();
this.file=null;
}
this.SYSTEM.Tooltip.hideLoading();
if(this.saveDelegate){
this.saveDelegate.invoke(_5d);
}
}
catch(ex){
jsExDebug("writerApp_saveCallback",ex);
}
}
function writerApp_load(_5f){
function fileCreationCallback(){
try{
if(this.file.hasFileId){
this.file.load(new this.SYSTEM.Delegate(this,this.loadCallback));
}else{
this.file.cleanUp();
this.file=null;
}
}
catch(ex){
jsExDebug("writerApp_load: fileCreationCallback",ex);
}
}
try{
if(this.file){
this.file.cleanUp();
this.file=null;
}
if(_5f){
if(this.isFilePublic){
this.file=new this.SYSTEM.Filesystem.PublicFile(_5f,this.saveDataDelegate,this.getTokenDelegate,new this.SYSTEM.Delegate(this,fileCreationCallback),this.isDirtyDelegate);
}else{
this.file=new this.SYSTEM.Filesystem.File(_5f,this.saveDataDelegate,this.getTokenDelegate,new this.SYSTEM.Delegate(this,fileCreationCallback),this.isDirtyDelegate);
}
}
}
catch(ex){
jsExDebug("writerApp_load",ex);
}
}
function writerApp_loadCallback(xml,_61){
try{
if(xml){
this.writer.load(xml,_61);
this.writerFrame.setTitle("WebWriter : "+this.file.filename);
this.collaboration.updateFileId(this.file.fileid);
this.collaboration.fileReloaded();
this.sharing.setFileId(this.file.fileid);
this.sendToolgroup.setFileId(this.file.fileid);
this.SYSTEM.Tooltip.hideLoading();
if(this.initialLoadFileId){
var _62=this.file.getTokenOwner();
this.initialLoadFileId=null;
}
}else{
var err=new this.SYSTEM.Dialogue.Error(this,"WebWriter","There was an error opening the file.");
}
}
catch(ex){
jsExDebug("writerApp_loadCallback",ex);
}
}
function writerApp_loadTemplate(_64){
function responseHandler(xml,me){
try{
if(me.writer){
me.writer.load(xml);
}
me.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("writerApp_loadTemplate: responseHandler",ex);
}
}
function showLoadingCallback(){
try{
this.SYSTEM.Network.request("js/xml/templates/"+_64,null,responseHandler,this);
}
catch(ex){
jsExDebug("writerApp_loadTemplate: showLoadingCallback",ex);
}
}
try{
if(_64){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,showLoadingCallback),"WebWriter","Loading template...");
}
}
catch(ex){
jsExDebug("writerApp_loadTemplate",ex);
}
}
function writerApp_reload(){
try{
this.file.load(new this.SYSTEM.Delegate(this,this.loadCallback));
}
catch(ex){
jsExDebug("writerApp_reload",ex);
}
}
function writerApp_getSaveData(){
try{
}
catch(ex){
jsExDebug("writerApp_getSaveData",ex);
}
}
function writerApp_isDirty(){
try{
return this.writer.dirty;
}
catch(ex){
jsExDebug("writerApp_isDirty",ex);
}
}
function writerApp_getFileName(){
try{
return (this.file?this.file.filename:null);
}
catch(ex){
jsExDebug("writerApp_getFileName",ex);
}
}
function writerApp_cleanAction(_67){
try{
if(this.file){
this.save(false,_67);
}else{
this.saveAs(false,_67);
}
}
catch(ex){
jsExDebug("writerApp_cleanAction",ex);
}
}
function writerApp_hideTableSizeEvent(me){
try{
if(me.tableSize){
me.tableSize.hide();
}
}
catch(ex){
jsExDebug("writerApp_hideTableSizeEvent",ex);
}
}
function writerApp_changeBgColour(_69){
try{
this.writer.styleBgColour(this.convertColourToHex(_69));
}
catch(ex){
jsExDebug("writerApp_changeBgColour",ex);
}
}
function writerApp_changeTextColour(_6a){
try{
this.writer.styleTextColour(this.convertColourToHex(_6a));
}
catch(ex){
jsExDebug("writerApp_changeTextColour",ex);
}
}
function writerApp_convertColourToHex(_6b){
try{
if(_6b.substr&&_6b.substr(0,3)=="rgb"){
var _6c=new Array();
_6c=_6b.split(",");
var red=decimal2Hex(parseInt(_6c[0].substr(4)));
var _6e=decimal2Hex(parseInt(_6c[1]));
var _6f=decimal2Hex(parseInt(_6c[2].split(")")[0]));
return "#"+red+""+_6e+""+_6f;
}else{
return _6b;
}
}
catch(ex){
jsExDebug("writerApp_convertColourToHex",ex);
}
}
function writerApp_isValidURL(url){
try{
return true;
}
catch(ex){
jsExDebug("writerApp_isValidURL",ex);
}
}
function writerApp_updatePanelState(){
try{
if(!this.writer){
return;
}
this.fontFaceSelect.setSelectedValue(this.writer.settingFontFace.toLowerCase());
this.fontSizeSelect.setSelectedValue(this.writer.settingFontSize);
if(this.writer.settingBold){
this.boldBtn.setState(this.boldBtn.ON_STATE);
}else{
this.boldBtn.setState(this.boldBtn.OFF_STATE);
}
if(this.writer.settingItalic){
this.italicsBtn.setState(this.italicsBtn.ON_STATE);
}else{
this.italicsBtn.setState(this.italicsBtn.OFF_STATE);
}
if(this.writer.settingUnderline){
this.underlineBtn.setState(this.underlineBtn.ON_STATE);
}else{
this.underlineBtn.setState(this.underlineBtn.OFF_STATE);
}
if(this.writer.settingStrikeout){
this.strikethroughBtn.setState(this.strikethroughBtn.ON_STATE);
}else{
this.strikethroughBtn.setState(this.strikethroughBtn.OFF_STATE);
}
if(this.writer.settingSubscript){
this.subscriptBtn.setState(this.subscriptBtn.ON_STATE);
}else{
this.subscriptBtn.setState(this.subscriptBtn.OFF_STATE);
}
if(this.writer.settingSuperscript){
this.superscriptBtn.setState(this.superscriptBtn.ON_STATE);
}else{
this.superscriptBtn.setState(this.superscriptBtn.OFF_STATE);
}
if(this.writer.settingAlignJustify){
this.justifyBtn.setState(this.justifyBtn.ON_STATE);
}else{
this.justifyBtn.setState(this.justifyBtn.OFF_STATE);
}
if(this.writer.settingAlignLeft){
this.alignLeftBtn.setState(this.alignLeftBtn.ON_STATE);
}else{
this.alignLeftBtn.setState(this.alignLeftBtn.OFF_STATE);
}
if(this.writer.settingAlignCentre){
this.alignCentreBtn.setState(this.alignCentreBtn.ON_STATE);
}else{
this.alignCentreBtn.setState(this.alignCentreBtn.OFF_STATE);
}
if(this.writer.settingAlignRight){
this.alignRightBtn.setState(this.alignRightBtn.ON_STATE);
}else{
this.alignRightBtn.setState(this.alignRightBtn.OFF_STATE);
}
switch(this.writer.settingFormatBlock){
case FORMATBLOCK_ORDEREDLIST:
this.numberBtn.setState(this.numberBtn.ON_STATE);
this.bulletBtn.setState(this.bulletBtn.OFF_STATE);
break;
case FORMATBLOCK_UNORDEREDLIST:
this.bulletBtn.setState(this.bulletBtn.ON_STATE);
this.numberBtn.setState(this.numberBtn.OFF_STATE);
break;
default:
this.bulletBtn.setState(this.bulletBtn.OFF_STATE);
this.numberBtn.setState(this.numberBtn.OFF_STATE);
}
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.GECKO_COMPATABLE){
}
}
catch(ex){
jsExDebug("writerApp_updatePanelState",ex);
}
}
function writerApp_exportDocument(_71){
function continueWithExport(){
try{
this.SYSTEM.Tooltip.showLoading(null,"WebWriter","Converting "+this.file.filename+"...");
var _72=this.file.getTokenOwner();
if(_72&&_72.userId==this.SYSTEM.UserDetails.id){
this.file.getDataAndSaveRevision(null,new this.SYSTEM.Delegate(this,saveFileCallback));
}else{
saveFileCallback.call(this,true);
}
}
catch(ex){
jsExDebug("writerApp_exportDocument: continueWithExport",ex);
}
}
function exportCallback(_73){
try{
if(_73==false){
jsDebug("Export failed - no path given");
}else{
var _74="";
if(document.all){
_74="Click 'Download' to open the save file dialogue in a new browser window, or right click on 'Download' and select 'Save Target As' to download the file.";
}else{
_74="Click 'Download' to open the save file dialogue in a new browser window, or right click on 'Download' and select 'Save Link As' to download the file.";
}
var _75=new this.SYSTEM.Dialogue.OkAlert(this,"Download File",_74+"<br/><br/><a href='"+_73+"' target='new' >Download</a>",null,400);
_75.hideOkButton();
_75=null;
this.exportFrame.close();
this.SYSTEM.Tooltip.hideLoading();
}
}
catch(ex){
jsExDebug("writerApp_exportDocument:exportCallback",ex);
}
}
function saveFileCallback(_76){
try{
if(_76){
switch(_71){
case this.WORD_FORMAT:
this.file.exportFormat(this.file.FILTER_MSWORD11HTML,new this.SYSTEM.Delegate(this,exportCallback));
break;
case this.OPEN_OFFICE_FORMAT:
this.file.exportFormat(this.file.FILTER_MSWORD11HTML_ODT,new this.SYSTEM.Delegate(this,exportCallback));
break;
}
this.writer.setDirty(false);
}else{
jsDebug("Error saving file for export.");
}
}
catch(ex){
jsExDebug("writerApp_exportDocument: saveFileCallback",ex);
}
}
function saveAsCallback(_77){
try{
if(_77){
continueWithExport.call(this);
}else{
}
}
catch(ex){
jsExDebug("writerApp_exportDocument: saveAsCallback",ex);
}
}
try{
if(this.file){
continueWithExport.call(this);
}else{
this.saveAs(true,new this.SYSTEM.Delegate(this,saveAsCallback));
}
}
catch(ex){
jsExDebug("writerApp_exportDocument",ex);
}
}
function writerApp_dirtyStatusChangeCallback(_78){
try{
if(_78){
if(this.checkOkToSave()){
this.saveBtn.setImage(this.SYSTEM.Icon.Small.SAVE,button_t.prototype.HOVER_IMAGE);
this.saveBtn.allowTooltip("Save",this.SAVE_ON_TOOLTIP);
}
}else{
this.saveBtn.setImage(this.SYSTEM.Icon.Small.SAVE_DISABLED,button_t.prototype.HOVER_IMAGE);
this.saveBtn.allowTooltip("Save",this.SAVE_OFF_TOOLTIP);
}
}
catch(ex){
jsExDebug("writerApp_dirtyStatusChangeCallback",ex);
}
}
function writerApp_okToSave(){
try{
if(this.file&&this.file.hasFileId){
if(this.file.hasWriteAccess()&&this.collaboration.allowedToEdit()){
return true;
}else{
return false;
}
}else{
return true;
}
}
catch(ex){
jsExDebug("writerApp_okToSave",ex);
}
}
function writerApp_checkOkToSave(_79,_7a){
try{
if(this.file&&this.file.hasFileId){
if(!this.isDirty()&&!_79){
return false;
}
if(this.file.hasWriteAccess()){
if(_7a||this.collaboration.allowedToEdit()){
return true;
}else{
return false;
}
}else{
return false;
}
}
return true;
}
catch(ex){
jsExDebug("writerApp_checkOkToSave",ex);
}
}
function writerApp_writerInitialLoadCallback(){
try{
if(this.initialLoadFileId){
this.load(this.initialLoadFileId);
}else{
if(this.initialLoadTemplateName){
this.loadTemplate(this.initialLoadTemplateName);
this.initialLoadTemplateName=null;
}else{
this.SYSTEM.Tooltip.hideLoading();
}
}
}
catch(ex){
jsExDebug("writerApp_writerInitialLoadCallback",ex);
}
}
function writerApp_writerFrame__onClose(_7b){
function saveCallback(_7c){
try{
this.dirtyDialogue=null;
if(_7c){
this.collaboration.releaseTokenNoCallback();
this.cleanUp();
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onClose: saveCallback",ex);
}
}
function saveAsCallback(_7d){
try{
this.dirtyDialogue=null;
if(_7d){
this.cleanUp();
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onClose: saveAsCallback",ex);
}
}
function dirtyDialogueCallback(_7e){
try{
switch(_7e){
case true:
if(this.file){
this.simpleSave(new this.SYSTEM.Delegate(this,saveCallback));
}else{
this.saveAs(false,new this.SYSTEM.Delegate(this,saveAsCallback),true);
}
break;
case false:
this.dirtyDialogue=null;
this.collaboration.releaseTokenNoCallback();
this.cleanUp();
break;
case null:
this.dirtyDialogue=null;
break;
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onClose: dirtyDialogueCallback",ex);
}
}
try{
if(this.dirtyDialogue){
return;
}
if(this.checkOkToSave()&&this.isDirty()){
var _7f=(this.getFileName()?this.getFileName():"untitled");
this.dirtyDialogue=new this.SYSTEM.Dialogue.YesNoCancelAlert(null,"WebWriter","There are unsaved changes to this document ("+_7f+")<br>"+"Would you like to save it?",new this.SYSTEM.Delegate(this,dirtyDialogueCallback));
}else{
this.collaboration.releaseTokenNoCallback();
this.cleanUp();
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onClose",ex);
}
}
function writerApp_writerFrame__onResize(_80){
try{
if(!this.writerFrame){
return;
}
var _81;
var _82;
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
if(dX||dY){
_81=_80.width+this.SYSTEM.DM.dragDistanceX;
_82=_80.height+this.SYSTEM.DM.dragDistanceY;
var _85=_80.minimumWidth;
var _86=_80.minimumHeight;
_81=(_81<_85?_85:_81);
_82=(_82<_86?_86:_82);
var _87=_80.maximumWidth;
var _88=_80.maximumHeight;
_81=(_81>_87?_87:_81);
_82=(_82>_88?_88:_82);
}else{
_81=_80.width;
_82=_80.height;
}
this.writer.setDimensions(_81-(_80.leftEdgeWidth+_80.rightEdgeWidth),_82-(_80.topEdgeHeight+_80.bottomEdgeHeight));
this.dragDiv.style.width=this.writer.width+"px";
this.dragDiv.style.height=this.writer.height+"px";
_80.windowDiv.appendChild(this.dragDiv);
}
catch(ex){
jsExDebug("writerApp_writerFrame_onResize",ex);
}
}
function writerApp_writerFrame__onResizeEnd(_89){
try{
if(this.dragDiv&&this.dragDiv.parentNode==_89.windowDiv){
_89.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onResizeEnd",ex);
}
}
function writerApp_writerFrame__onMove(_8a){
try{
if(this.dragDiv){
_8a.windowDiv.appendChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onMove",ex);
}
}
function writerApp_writerFrame__onMoveEnd(_8b){
try{
if(this.dragDiv&&this.dragDiv.parentNode==_8b.windowDiv){
_8b.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onMoveEnd",ex);
}
}
function writerApp_dragDivClickEvent(_8c,me){
try{
me.writerFrame.focus();
}
catch(ex){
jsExDebug("writerApp_dragDivClickEvent",ex);
}
}
function writerApp_writerFrame__onFocus(_8e){
try{
if(this.dragDiv&&this.dragDiv.parentNode==_8e.windowDiv){
_8e.windowDiv.removeChild(this.dragDiv);
}
if(this.writer){
this.updatePanelState();
}
if(this.emailFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.emailFrame);
}
if(this.hyperlinkFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.hyperlinkFrame);
}
if(this.addImageFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.addImageFrame);
}
if(this.tableFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.tableFrame);
}
if(this.exportFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.exportFrame);
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onFocus",ex);
}
}
function writerApp_writerFrame__onBlur(_8f){
try{
if(this.dragDiv){
_8f.windowDiv.appendChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("writerApp_writerFrame__onBlur",ex);
}
}
function writerApp_writerFrame__onScrollUp(_90){
try{
}
catch(ex){
jsExDebug("writerApp_writerFrame__onScrollUp",ex);
}
}
function writerApp_writerFrame__onScrollDown(_91){
try{
}
catch(ex){
jsExDebug("writerApp_writerFrame__onScrollDown",ex);
}
}
function writerApp_writerFrame_keyDown(key){
try{
switch(key.dmKey){
case 83:
if(key.ctrlKey){
key.preventDefault();
if(this.file){
this.save(true);
}else{
this.saveAs(true);
}
}
break;
case 79:
if(key.ctrlKey){
key.preventDefault();
var _93=new this.SYSTEM.Dialogue.Open(this);
}
break;
default:
if(this.SYSTEM.Environment.USER_AGENT==this.SYSTEM.Environment.W3C){
this.writer.keyEventGecko(key,this.writer);
}
}
}
catch(ex){
jsExDebug("writerApp_writerFrame_keyDown",ex);
}
}
function writerApp_emailFrame__onClose(_94){
try{
this.emailURLLabel=null;
this.emailURLText=null;
this.emailText=null;
this.emailTextLabel=null;
this.emailInsertBtn=null;
this.emailFrame=null;
_94.cleanUp();
}
catch(ex){
jsExDebug("writerApp_emailFrame__onClose",ex);
}
}
function writerApp_hyperlinkFrame__onClose(_95){
try{
this.hyperlinkURLLabel=null;
this.hyperlinkURLText=null;
this.hyperlinkInsertBtn=null;
this.hyperlinkTextLabel=null;
this.hyperlinkText=null;
this.hyperlinkFrame=null;
_95.cleanUp();
}
catch(ex){
jsExDebug("writerApp_hyperlinkFrame__onClose",ex);
}
}
function writerApp_addImageFrame__onClose(_96){
try{
this.addImageFrame=null;
_96.cleanUp();
}
catch(ex){
jsExDebug("writerApp_addImageFrame__onClose",ex);
}
}
function writerApp_tableFrame__onClose(_97){
try{
this.rowsLabel=null;
this.columnsLabel=null;
this.rowSelect=null;
this.columnSelect=null;
this.widthLabel=null;
this.widthText=null;
this.borderWidthLabel=null;
this.insertTableLink=null;
this.tableFrame=null;
_97.cleanUp();
}
catch(ex){
jsExDebug("writerApp_tableFrame__onClose",ex);
}
}
function writerApp_exportFrame__onClose(_98){
try{
global_restartTimedServiceRequests();
this.exportFrame=null;
_98.cleanUp();
}
catch(ex){
jsExDebug("writerApp_exportFrame__onClose",ex);
}
}
function writerApp_printFrame__onClose(_99){
try{
this.printFrame=null;
_99.cleanUp();
}
catch(ex){
jsExDebug("writerApp_printFrame__onClose",ex);
}
}
function writerApp_binding_insertTableLink_click(_9a){
try{
var _9b=this.rowSelect.getValue();
var _9c=this.columnSelect.getValue();
var _9d=this.borderWidthSelect.getValue();
var _9e="solid";
var _9f=this.selectedTableBorderColour;
if(_9b&&_9c){
this.writer.selectCurrentRange();
this.writer.insertTable(_9b,_9c,_9d,"100%",_9f,_9e);
this.currentBorderColour=_9f;
this.currentBorderWidth=_9d;
this.tableFrame.close();
}else{
var _a0=new this.SYSTEM.Dialogue.Error(this,"Insert table","There needs to be atlease 1 row and column");
}
}
catch(ex){
jsExDebug("writerApp_binding_insertTableLink_click",ex);
}
}
function writerApp_binding_hyperlinkInsertBtn_click(_a1){
try{
function checkUrl(){
if(url==""){
return false;
}
if(!url.match(/^\s*(http:\/\/|file:\/\/\/|ftp:\/\/)/i)){
url="http://"+url;
}
var _a3=url+"?";
if(_a3.match(/^\s*[A-Z0-9% \/.@$*!:(){}_~-]+\?/i)){
return true;
}else{
return false;
}
}
function doUrlInsert(yes){
if(yes){
if(this.insertHyperlinkText){
this.writer.insertLink(url);
}else{
this.writer.iframePasteAtRange("<a href='"+url+"'>"+_a5+"</a>");
}
}
this.insertHyperlinkText=null;
this.hyperlinkFrame.close();
}
var url=this.hyperlinkURLText.getContent();
var _a5=(this.insertHyperlinkText?this.insertHyperlinkText:this.hyperlinkText.getContent());
if(!_a5){
var _a6=new this.SYSTEM.Dialogue.Error(this,"Error","You have not specified any text for the hyperlink, it is required.");
return;
}
if(!checkUrl()){
var _a7=new this.SYSTEM.Dialogue.YesNoAlert(this,"Error in URL","We have detected that the URL you entered is possibly invalid. Would you like to insert it anyway?",new this.SYSTEM.Delegate(this,doUrlInsert));
}else{
doUrlInsert.apply(this,[true]);
}
}
catch(ex){
jsExDebug("writerApp_insertHyperlink",ex);
}
}
function writerApp_binding_emailInsertBtn_click(_a8){
try{
function checkEmail(){
if(url==""||!url.match(/@/)){
return false;
}
if(!url.match(/^\s*(mailto:)/i)){
url="mailto:"+url;
}
var _aa=url+"?";
if(_aa.match(/^\s*[A-Z0-9.:_@-]+\?/i)){
return true;
}else{
return false;
}
}
function doEmailInsert(yes){
if(yes){
if(this.insertHyperlinkText){
this.writer.insertLink(url);
}else{
this.writer.iframePasteAtRange("<a href='"+url+"'>"+_ac+"</a>");
}
}
this.insertEmailText=null;
this.emailFrame.close();
}
var url=this.emailURLText.getContent();
var _ac=(this.insertEmailText?this.insertEmailText:this.emailText.getContent());
if(!_ac){
var _ad=new this.SYSTEM.Dialogue.Error(this,"Error","You have not specified any text for the email address, it is required.");
return;
}
if(!checkEmail()){
var _ae=new this.SYSTEM.Dialogue.YesNoAlert(this,"Error in Email Address","We have detected that the Email Address you entered is possibly invalid. Would you like to insert it anyway?",new this.SYSTEM.Delegate(this,doEmailInsert));
}else{
doEmailInsert.apply(this,[true]);
}
}
catch(ex){
jsExDebug("writerApp_binding_emailInsertBtn_click",ex);
}
}
function writerApp_binding_addImageInsertBtn_click(_af){
try{
var url=this.addImageURLText.getContent();
if(url){
this.writer.iframePasteAtRange(sprint("<img style='border:0' src='$1'>",url));
this.addImageFrame.close();
}else{
}
}
catch(ex){
jsExDebug("writerApp_binding_addImageInsertBtn_click",ex);
}
}
function writerApp_binding_exportWordBtn_click(_b1){
try{
this.exportDocument(this.WORD_FORMAT);
}
catch(ex){
jsExDebug("writerApp_binding_exportWordBtn_click",ex);
}
}
function writerApp_binding_exportOpenOfficeBtn_click(_b2){
try{
this.exportDocument(this.OPEN_OFFICE_FORMAT);
}
catch(ex){
jsExDebug("writerApp_binding_exportOpenOfficeBtn_click",ex);
}
}
function writerApp_binding_exportPDFBtn_click(){
try{
this.exportDocument(this.PDF_FORMAT);
}
catch(ex){
jsExDebug("writerApp_binding_exportPDFBtn_click",ex);
}
}
function writerApp_binding_printConfirmBtn_click(_b3){
try{
this.writer.print();
this.printFrame.close();
}
catch(ex){
jsExDebug("writerApp_binding_printConfirmBtn_click",ex);
}
}
function writerApp_binding_printCancelLink_click(_b4){
try{
this.printFrame.close();
}
catch(ex){
jsExDebug("writerApp_binding_printCancelLink_click",ex);
}
}
function writerApp_binding_borderColourBtn_click(_b5){
try{
this.borderColourSelect.expandList();
}
catch(ex){
jsExDebug("writerApp_binding_borderColourBtn_click",ex);
}
}
function writerApp_binding_borderColourSelect_itemWidget(_b6){
try{
this.selectedTableBorderColour=this.borderColourChooser2.selectedColour;
this.borderColourDiv.style.backgroundColor=this.selectedTableBorderColour;
}
catch(ex){
jsExDebug("writerApp_binding_borderColourSelect_itemWidget",ex);
}
}
function writerApp_binding_exportCancelBtn_click(_b7){
try{
this.exportFrame.close();
}
catch(ex){
jsExDebug("writerApp_binding_exportCancelBtn_click",ex);
}
}
function writerApp_binding_saveBtn_click(_b8){
try{
if(this.file){
this.save(true);
}else{
if(this.SYSTEM.Network.isOnline()){
this.saveAs(true);
}
}
}
catch(ex){
jsExDebug("writerApp_binding_saveBtn_click",ex);
}
}
function writerApp_binding_saveAsBtn_click(_b9){
try{
if(this.SYSTEM.Network.isOnline()){
this.saveAs(true);
}
}
catch(ex){
jsExDebug("writerApp_binding_saveAsBtn_click",ex);
}
}
function writerApp_binding_openBtn_click(_ba){
try{
var _bb=new this.SYSTEM.Dialogue.Open(this);
}
catch(ex){
jsExDebug("writerApp_binding_openBtn_click",ex);
}
}
function writerApp_binding_undoBtn_click(_bc){
try{
if(document.all){
var _bd=new this.SYSTEM.Dialogue.OkAlert(this,"Undo Error","Unfortunately, Undo/Redo does not currently work in Internet Explorer.",null);
}else{
this.writer.undo();
}
}
catch(ex){
jsExDebug("writerApp_binding_undoBtn_click",ex);
}
}
function writerApp_binding_redoBtn_click(_be){
try{
if(document.all){
var _bf=new this.SYSTEM.Dialogue.OkAlert(this,"Redo Error","Unfortunately, Undo/Redo does not currently work in Internet Explorer.",null);
}else{
this.writer.redo();
}
}
catch(ex){
jsExDebug("writerApp_binding_redoBtn_click",ex);
}
}
function writerApp_binding_printBtn_click(_c0){
try{
if(this.printFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.printFrame);
return;
}
var _c1=new this.SYSTEM.Frame.Window("printFrame","Print",this,this.PRINT_FRAME_WIDTH,this.PRINT_FRAME_HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_c1.setPosition(this.writerFrame.positionX+this.writerFrame.leftEdgeWidth,this.writerFrame.positionY+this.writerFrame.topEdgeHeight);
var _c2=new this.SYSTEM.Widget.Label("printInstructionLabel");
_c2.setText("Click the button to print:");
var _c3=new this.SYSTEM.Widget.Button("printConfirmBtn",this.PRINT_CONFIRM_IMG,button_t.prototype.HOVER_IMAGE|button_t.prototype.ON_IMAGE,50,30);
var _c4=_c1.leftEdgeWidth;
var top=_c1.topEdgeHeight;
var _c6=document.createElement("div");
_c6.style.position="absolute";
_c6.style.left=_c4+"px";
_c6.style.top=(top+this.PRINT_HELP_TOP)+"px";
_c6.style.width=_c1.getInternalWidth(this.PRINT_FRAME_WIDTH)+"px";
_c6.style.height=this.PRINT_HELP_HEIGHT+"px";
_c6.style.overflowY="scroll";
_c6.style.border="solid 1px black";
_c6.innerHTML="<h3>Printing Help</h3><p><b>Customising document header/footer</b></p>"+((document.all)?"In Internet Explorer, you can edit the information printed in the header/footer by accessing the 'Page Setup' option from the 'File' menu (in Internet Explorer 7 click on the printer icon in the top right of the browser and select 'Page Setup').  We suggest removing Title(&amp;w) and URL(&amp;u) options.":"In Firefox, you can edit the information printed in the header/footer by accessing the 'Page Setup' option from the 'File' menu. Options can be found in the 'Margins & Header/Footer' tab - we suggest removing Title and URL.")+"<p><b>Printing highlight colours</b></p>"+((document.all)?"In Internet Explorer, you can print text highlight colour by accessing the 'Internet Options' option from the 'Tools' menu, Choose the 'Advanced' tab and scroll down to the print section of the settings. Click the checkbox next to 'Print background colour and images'.":"In Firefox, you can print text highlight colour by accessing the 'Page Setup' option from the 'File' menu. Select the 'Format & Options' tab and click the checkbox next to 'Print Background (colors & images)'.");
var _c7=new this.SYSTEM.Widget.Link("printCancelLink","Cancel");
_c1.addWidget(_c2,_c4,top);
_c1.addWidget(_c3,_c4+this.PRINT_CONFIRM_LEFT,top+this.PRINT_CONFIRM_TOP);
_c1.windowDiv.appendChild(_c6);
_c1.addWidget(_c7,_c1.rightEdgeWidth,_c1.bottomEdgeHeight+20,true,true);
_c1.setFixedDimensions(_c1.leftEdgeWidth+this.PRINT_FRAME_WIDTH+_c1.rightEdgeWidth,_c1.topEdgeHeight+this.PRINT_FRAME_HEIGHT+_c1.bottomEdgeHeight);
_c1.show();
this.printFrame=_c1;
}
catch(ex){
jsExDebug("writerApp_binding_printBtn_click",ex);
}
}
function writerApp_binding_exportBtn_click(_c8){
try{
if(this.exportFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.exportFrame);
return;
}
global_stopTimedServiceRequests();
var _c9=new this.SYSTEM.Frame.Window("exportFrame","Export document",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_c9.setPosition(this.writerFrame.positionX+this.writerFrame.leftEdgeWidth,this.writerFrame.positionY+this.writerFrame.topEdgeHeight);
var _ca=new this.SYSTEM.Widget.Label("exportTitleLabel");
_ca.setDimensions(240,50);
_ca.setText("Select the format you wish to export the document to.");
var _cb=new this.SYSTEM.Widget.Button("exportWordBtn",this.EXPORT_WORD_IMG,null,28,28);
var _cc=new this.SYSTEM.Widget.Label("exportWordLabel");
_cc.setText("Word format");
var _cd=new this.SYSTEM.Widget.Button("exportOpenOfficeBtn",this.EXPORT_O_OFFICE_IMG,null,28,28);
var _ce=new this.SYSTEM.Widget.Label("exportOpenOfficeLabel");
_ce.setText("Open office format");
var _cf=new this.SYSTEM.Widget.TextButton("exportCancelBtn",60,"Cancel");
_c9.addWidget(_ca,_c9.leftEdgeWidth+this.EXPORT_TITLE_LEFT,_c9.topEdgeHeight);
_c9.addWidget(_cb,_c9.leftEdgeWidth+this.EXPORT_WORD_LEFT,_c9.topEdgeHeight+this.EXPORT_WORD_TOP);
_c9.addWidget(_cc,_c9.leftEdgeWidth+this.EXPORT_WORD_LEFT+40,_c9.topEdgeHeight+this.EXPORT_WORD_TOP+5);
_c9.addWidget(_cd,_c9.leftEdgeWidth+this.EXPORT_O_OFFICE_LEFT,_c9.topEdgeHeight+this.EXPORT_O_OFFICE_TOP);
_c9.addWidget(_ce,_c9.leftEdgeWidth+this.EXPORT_O_OFFICE_LEFT+40,_c9.topEdgeHeight+this.EXPORT_O_OFFICE_TOP+5);
_c9.addWidget(_cf,_c9.rightEdgeWidth,_c9.bottomEdgeHeight,true,true);
_c9.setFixedDimensions(_c9.leftEdgeWidth+this.EXPORT_FRAME_WIDTH+_c9.rightEdgeWidth,_c9.topEdgeHeight+this.EXPORT_FRAME_HEIGHT+_c9.bottomEdgeHeight);
_c9.show();
this.exportFrame=_c9;
}
catch(ex){
jsExDebug("writerApp_binding_exportBtn_click",ex);
}
}
function writerApp_binding_quickHelpBtn_click(_d0){
try{
var _d1=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"writer");
}
catch(ex){
jsExDebug("writerApp_binding_quickHelpBtn_click",ex);
}
}
function writerApp_binding_spellCheckBtn_click(){
try{
this.writer.spellCheck(this);
}
catch(ex){
jsExDebug("writerApp_binding_spellCheckBtn_click",ex);
}
}
function writerApp_binding_pasteBtn_click(_d2){
try{
if(document.all){
this.writer.paste();
}else{
var msg=new SYSTEM.Dialogue.OkAlert(this,"Unavailable.","Unfortunately, paste in this manner is unavailable in your browser. Please use Ctrl+v instead.");
}
}
catch(ex){
jsExDebug("writerApp_binding_pasteBtn_click",ex);
}
}
function writerApp_binding_copyBtn_click(_d4){
try{
if(document.all){
this.writer.copy();
}else{
var msg=new SYSTEM.Dialogue.OkAlert(this,"Unavailable.","Unfortunately, copy in this manner is unavailable in your browser. Please use Ctrl+c instead.");
}
}
catch(ex){
jsExDebug("writerApp_binding_copyBtn_click",ex);
}
}
function writerApp_binding_cutBtn_click(_d6){
try{
if(document.all){
this.writer.cut();
}else{
var msg=new SYSTEM.Dialogue.OkAlert(this,"Unavailable.","Unfortunately, cut in this manner is unavailable in your browser. Please use Ctrl+x instead.");
}
}
catch(ex){
jsExDebug("writerApp_binding_cutBtn_click",ex);
}
}
if(DEBUG_MESSAGES){
function writerApp_binding_toggleViewBtn_click(_d8){
try{
this.writer.toggleView();
}
catch(ex){
jsExDebug("writerApp_binding_toggleViewBtn_click",ex);
}
}
function writerApp_binding_importTestBtn_click(_d9){
function requestCallback(xml,me,_dc){
try{
me.writer.load(xml,_dc);
}
catch(ex){
jsExDebug("writerApp_binding_importTestBtn_click: requestCallback",ex);
}
}
try{
var _dd="js/xml/import_testing/doc2_trim.xml";
this.SYSTEM.Network.request(_dd,null,requestCallback,this);
}
catch(ex){
jsExDebug("writerApp_binding_importTestBtn_click",ex);
}
}
writerApp_t.prototype.binding_toggleViewBtn_click=writerApp_binding_toggleViewBtn_click;
writerApp_t.prototype.binding_importTestBtn_click=writerApp_binding_importTestBtn_click;
}
function writerApp_binding_fontFaceSelect_itemSelect(_de){
try{
this.writer.styleFontFace(_de.selectedValue);
}
catch(ex){
jsExDebug("writerApp_binding_fontFaceSelect_itemSelect",ex);
}
}
function writerApp_binding_fontSizeSelect_itemSelect(_df){
try{
this.writer.styleFontSize(_df.selectedValue);
}
catch(ex){
jsExDebug("writerApp_binding_fontSizeSelect_itemSelect",ex);
}
}
function writerApp_binding_boldBtn_click(_e0){
try{
var _e1=_e0.toggleState();
this.writer.styleBold(_e1);
}
catch(ex){
jsExDebug("writerApp_binding_boldBtn_click",ex);
}
}
function writerApp_binding_italicsBtn_click(_e2){
try{
var _e3=_e2.toggleState();
this.writer.styleItalic(_e3);
}
catch(ex){
jsExDebug("writerApp_binding_italicsBtn_click",ex);
}
}
function writerApp_binding_underlineBtn_click(_e4){
try{
var _e5=_e4.toggleState();
this.writer.styleUnderline(_e5);
}
catch(ex){
jsExDebug("writerApp_binding_underlineBtn_click",ex);
}
}
function writerApp_binding_strikethroughBtn_click(_e6){
try{
var _e7=_e6.toggleState();
this.writer.styleStrikeout(_e7);
}
catch(ex){
jsExDebug("writerApp_binding_strikethroughBtn_click",ex);
}
}
function writerApp_binding_subscriptBtn_click(_e8){
try{
var _e9=_e8.toggleState();
this.writer.styleSubscript(_e9);
}
catch(ex){
jsExDebug("writerApp_binding_subscriptBtn_click",ex);
}
}
function writerApp_binding_superscriptBtn_click(_ea){
try{
var _eb=_ea.toggleState();
this.writer.styleSuperscript(_eb);
}
catch(ex){
jsExDebug("writerApp_binding_superscriptBtn_click",ex);
}
}
function writerApp_binding_headingDropList_itemSelect(_ec){
try{
this.writer.styleFormatBlock(_ec.getSelectedValue());
}
catch(ex){
jsExDebug("writerApp_binding_headingDropList_itemSelect",ex);
}
}
function writerApp_binding_clearFormatBtn_click(_ed){
try{
if(this.writer.removeFormatting){
this.writer.removeFormatting();
}else{
if(this.writer.styleClearFormatting){
this.writer.styleClearFormatting();
}
}
}
catch(ex){
jsExDebug("writerApp_binding_clearFormatBtn_click",ex);
}
}
function writerApp_binding_caseDropList_itemSelect(_ee){
try{
this.writer.changeCase(_ee.getSelectedValue());
}
catch(ex){
jsExDebug("writerApp_binding_caseDropList_itemSelect",ex);
}
}
function writerApp_binding_fillColourDropList_itemWidget(_ef){
try{
this.selectedFillColour=this.fillColourChooser.selectedColour;
this.fillColourBtn.setBackgroundColour(this.selectedFillColour);
this.changeBgColour(this.selectedFillColour);
}
catch(ex){
jsExDebug("writerApp_binding_fillColourDropList_itemWidget",ex);
}
}
function writerApp_binding_fillColourBtn_click(_f0){
try{
if(this.selectedFillColour){
this.changeBgColour(this.selectedFillColour);
}
}
catch(ex){
jsExDebug("writerApp_binding_fillColourBtn_click",ex);
}
}
function writerApp_binding_highlightColourDropList_itemWidget(_f1){
try{
this.selectedHighlightColour=this.highlightColourChooser.selectedColour;
this.highlightColourBtn.setBackgroundColour(this.selectedHighlightColour);
this.changeTextColour(this.selectedHighlightColour);
}
catch(ex){
jsExDebug("writerApp_binding_highlightColourDropList_itemWidget",ex);
}
}
function writerApp_binding_highlightColourBtn_click(_f2){
try{
if(this.selectedHighlightColour){
this.changeTextColour(this.selectedHighlightColour);
}
}
catch(ex){
jsExDebug("writerApp_binding_highlightColourBtn_click",ex);
}
}
function writerApp_binding_justifyBtn_click(_f3){
try{
_f3.setState(button_t.prototype.ON_STATE);
this.alignCentreBtn.setState(button_t.prototype.OFF_STATE);
this.alignLeftBtn.setState(button_t.prototype.OFF_STATE);
this.alignRightBtn.setState(button_t.prototype.OFF_STATE);
this.writer.styleJustify();
}
catch(ex){
jsExDebug("writerApp_binding_justifyBtn_click",ex);
}
}
function writerApp_binding_alignLeftBtn_click(_f4){
try{
_f4.setState(button_t.prototype.ON_STATE);
this.alignRightBtn.setState(button_t.prototype.OFF_STATE);
this.alignCentreBtn.setState(button_t.prototype.OFF_STATE);
this.justifyBtn.setState(button_t.prototype.OFF_STATE);
this.writer.styleAlignLeft();
}
catch(ex){
jsExDebug("writerApp_binding_alignLeftBtn_click",ex);
}
}
function writerApp_binding_alignCentreBtn_click(_f5){
try{
_f5.setState(button_t.prototype.ON_STATE);
this.alignRightBtn.setState(button_t.prototype.OFF_STATE);
this.alignLeftBtn.setState(button_t.prototype.OFF_STATE);
this.justifyBtn.setState(button_t.prototype.OFF_STATE);
this.writer.styleAlignCentre();
}
catch(ex){
jsExDebug("writerApp_binding_alignCentreBtn_click",ex);
}
}
function writerApp_binding_alignRightBtn_click(_f6){
try{
_f6.setState(button_t.prototype.ON_STATE);
this.alignCentreBtn.setState(button_t.prototype.OFF_STATE);
this.alignLeftBtn.setState(button_t.prototype.OFF_STATE);
this.justifyBtn.setState(button_t.prototype.OFF_STATE);
this.writer.styleAlignRight();
}
catch(ex){
jsExDebug("writerApp_binding_alignRightBtn_click",ex);
}
}
function writerApp_binding_decIndentBtn_click(_f7){
try{
this.writer.styleOutdent();
}
catch(ex){
jsExDebug("writerApp_binding_decIndentBtn_click",ex);
}
}
function writerApp_binding_incIndentBtn_click(_f8){
try{
this.writer.styleIndent();
}
catch(ex){
jsExDebug("writerApp_binding_incIndentBtn_click",ex);
}
}
function writerApp_binding_bulletBtn_click(_f9){
try{
_f9.setState(button_t.prototype.ON_STATE);
this.numberBtn.setState(button_t.prototype.OFF_STATE);
this.writer.insertUnorderedList();
}
catch(ex){
jsExDebug("writerApp_binding_bulletBtn_click",ex);
}
}
function writerApp_binding_numberBtn_click(_fa){
try{
_fa.setState(button_t.prototype.ON_STATE);
this.bulletBtn.setState(button_t.prototype.OFF_STATE);
this.writer.insertOrderedList();
}
catch(ex){
jsExDebug("writerApp_binding_numberBtn_click",ex);
}
}
function writerApp_binding_tableSize_itemSelect(_fb){
try{
var _fc=this.tableSize.getSelectedRows();
var _fd=this.tableSize.getSelectedColumns();
this.tableSize.hide();
this.writer.selectCurrentRange();
this.writer.insertTable(_fc,_fd,this.currentBorderWidth,"100%",this.currentBorderColour);
}
catch(ex){
jsExDebug("writerApp_binding_tableSize_itemSelect",ex);
}
}
function writerApp_binding_tableSize_click(_fe){
try{
if(this.tableFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.tableFrame);
return;
}
var _ff=new this.SYSTEM.Frame.Window("tableFrame","Insert table",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_ff.setPosition(this.writerFrame.positionX+this.writerFrame.leftEdgeWidth,this.writerFrame.positionY+this.writerFrame.topEdgeHeight);
var _100=new this.SYSTEM.Widget.Label("rowsLabel");
_100.setText("Rows:");
var _101=new this.SYSTEM.Widget.NumberSelect("rowSelect",122,1,5000);
var _102=new this.SYSTEM.Widget.Label("columnsLabel");
_102.setText("Columns:");
var _103=new this.SYSTEM.Widget.NumberSelect("columnSelect",122,1,5000);
var _104=new this.SYSTEM.Widget.Label("borderWidthLabel");
_104.setText("Border width:");
var _105=new this.SYSTEM.Widget.NumberSelect("borderWidthSelect",122,0,3);
var _106=new this.SYSTEM.Widget.Label("borderColourLabel");
_106.setText("Border colour:");
var _107=new this.SYSTEM.Widget.Button("borderColourBtn",this.DROP_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE);
var _108=new this.SYSTEM.Widget.ColourChooser("borderColourChooser2",this.COLOUR_CHOOSER_CELLS_WIDE,this.COLOUR_CHOOSER_CELLS_HIGH,this.COLOUR_CHOOSER_WIDTH,this.COLOUR_CHOOSER_HEIGHT,1);
_108.setSelectedColour(this.DEFAULT_HIGHLIGHT_COLOUR);
var _109=new this.SYSTEM.Widget.SelectList("borderColourSelect");
_109.allowBorder("black");
_109.disallowSelectedHighlight();
_109.addWidget(null,_108);
var _10a=document.createElement("div");
_10a.style.position="absolute";
_10a.style.left=(_ff.leftEdgeWidth+124)+"px";
_10a.style.top=(_ff.topEdgeHeight+105)+"px";
_10a.style.width="98px";
_10a.style.height="22px";
_10a.style.backgroundColor=this.DEFAULT_HIGHLIGHT_COLOUR;
_10a.style.border="solid 1px #606060";
_ff.windowDiv.appendChild(_10a);
var _10b=new this.SYSTEM.Widget.Link("insertTableLink","Insert");
_ff.addWidget(_100,_ff.leftEdgeWidth+0,_ff.topEdgeHeight+15);
_ff.addWidget(_101,_ff.leftEdgeWidth+100,_ff.topEdgeHeight+10);
_ff.addWidget(_102,_100.positionX,_ff.topEdgeHeight+45);
_ff.addWidget(_103,_101.positionX,_ff.topEdgeHeight+40);
_ff.addWidget(_104,_100.positionX,_ff.topEdgeHeight+75);
_ff.addWidget(_105,_101.positionX,_ff.topEdgeHeight+75);
_ff.addWidget(_106,_100.positionX,_ff.topEdgeHeight+105);
_ff.addWidget(_107,_101.positionX,_ff.topEdgeHeight+105);
_ff.addWidget(_109,_101.positionX,_ff.topEdgeHeight+13);
_ff.addWidget(_10b,_ff.rightEdgeWidth,_ff.bottomEdgeHeight+20,true,true);
_ff.setFixedDimensions(_ff.leftEdgeWidth+this.TABLE_FRAME_WIDTH+_ff.rightEdgeWidth,_ff.topEdgeHeight+this.TABLE_FRAME_HEIGHT+_ff.bottomEdgeHeight);
_ff.show();
this.tableFrame=_ff;
this.rowsLabel=_100;
this.columnsLabel=_102;
this.rowSelect=_101;
this.columnSelect=_103;
this.borderWidthLabel=_104;
this.borderWidthSelect=_105;
this.borderColourLabel=_106;
this.borderColourBtn=_107;
this.borderColourSelect=_109;
this.borderColourDiv=_10a;
this.borderColourChooser2=_108;
this.insertTableLink=_10b;
}
catch(ex){
jsExDebug("writerApp_binding_tableSize_click",ex);
}
}
function writerApp_binding_tableExpandBtn_click(_10c){
try{
this.tableSize.show();
}
catch(ex){
jsExDebug("writerApp_binding_tableExpandBtn_click",ex);
}
}
function writerApp_binding_borderWidthDropList_itemSelect(_10d){
try{
this.currentBorderWidth=_10d.getSelectedValue();
this.writer.selectCurrentRange();
this.writer.styleTableBorders(this.currentBorderWidth,this.currentBorderColour,"solid");
}
catch(ex){
jsExDebug("writerApp_binding_borderWidthDropList_itemSelect",ex);
}
}
function writerApp_binding_borderColourDropList_itemWidget(_10e){
try{
this.currentBorderColour=this.borderColourChooser.selectedColour;
this.borderColourDropList.dropBtn.defaultBtn.setBackgroundColour(this.currentBorderColour);
this.writer.selectCurrentRange();
this.writer.styleTableBorders(this.currentBorderWidth,this.currentBorderColour,"solid");
}
catch(ex){
jsExDebug("writerApp_binding_borderColourDropList_itemWidget",ex);
}
}
function writerApp_binding_deleteTableBtn_click(_10f){
try{
this.writer.deleteTable();
}
catch(ex){
jsExDebug("writerApp_binding_deleteTableBtn_click",ex);
}
}
function writerApp_binding_marginDropList_itemSelect(_110){
try{
this.writer.setMargin(_110.getSelectedValue());
}
catch(ex){
jsExDebug("writerApp_binding_marginDropList_itemSelect",ex);
}
}
function writerApp_binding_pageBreakBtn_click(_111){
try{
this.writer.insertPageBreak();
}
catch(ex){
jsExDebug("writerApp_binding_pageBreakBtn_click",ex);
}
}
function writerApp_binding_hyperlinkBtn_click(_112){
try{
if(this.hyperlinkFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.hyperlinkFrame);
this.hyperlinkURLText.focus();
return;
}
this.hyperlinkFrame=new this.SYSTEM.Frame.Window("hyperlinkFrame","Insert a link",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
this.hyperlinkFrame.setDimensions(this.LINK_FRAME_WIDTH,this.LINK_FRAME_HEIGHT);
this.hyperlinkFrame.setPosition(this.writerFrame.positionX+this.writerFrame.leftEdgeWidth,this.writerFrame.positionY+this.writerFrame.topEdgeHeight);
var _113=new this.SYSTEM.Widget.Label("hyperlinkURLLabel");
_113.setText("Url: ");
var _114=new this.SYSTEM.Widget.Text("hyperlinkURLText");
_114.setWidth(190);
var _115=new this.SYSTEM.Widget.Label("hyperlinkTextLabel");
var _116=new this.SYSTEM.Widget.TextButton("hyperlinkInsertBtn",55,"Insert");
var left=this.hyperlinkFrame.leftEdgeWidth;
var top=this.hyperlinkFrame.topEdgeHeight;
this.hyperlinkFrame.addWidget(_113,left,top+30);
this.hyperlinkFrame.addWidget(_114,left+50,_113.positionY);
this.hyperlinkFrame.addWidget(_115,left,top);
this.hyperlinkFrame.addWidget(_116,this.hyperlinkFrame.rightEdgeWidth,this.hyperlinkFrame.bottomEdgeHeight,true,true);
this.hyperlinkURLLabel=_113;
this.hyperlinkURLText=_114;
this.hyperlinkTextLabel=_115;
this.hyperlinkInsertBtn=_116;
var _119=this.writer.getTextAtRange();
if(_119){
_115.setText("Text: &nbsp;"+_119);
this.insertHyperlinkText=_119;
}else{
var _11a=new this.SYSTEM.Widget.Text("hyperlinkText");
_11a.setWidth(190);
this.hyperlinkFrame.addWidget(_11a,_114.positionX,top);
this.hyperlinkText=_11a;
_115.setText("Text: ");
}
this.hyperlinkFrame.setFixedDimensions(this.hyperlinkFrame.leftEdgeWidth+this.LINK_FRAME_WIDTH+this.hyperlinkFrame.rightEdgeWidth,this.hyperlinkFrame.topEdgeHeight+this.LINK_FRAME_HEIGHT+this.hyperlinkFrame.bottomEdgeHeight);
this.hyperlinkFrame.show();
this.hyperlinkURLText.focus();
this.hyperlinkURLText.setContent("http://");
}
catch(ex){
jsExDebug("writerApp_binding_hyperlinkBtn_click",ex);
}
}
function writerApp_binding_emailBtn_click(_11b){
try{
if(this.emailFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.emailFrame);
this.emailURLText.focus();
return;
}
this.emailFrame=new this.SYSTEM.Frame.Window("emailFrame","Insert email",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
this.emailFrame.setPosition(this.writerFrame.positionX+this.writerFrame.leftEdgeWidth,this.writerFrame.positionY+this.writerFrame.topEdgeHeight);
var _11c=new this.SYSTEM.Widget.Label("emailURLLabel");
_11c.setText("Address: ");
var _11d=new this.SYSTEM.Widget.Text("emailURLText");
_11d.setWidth(160);
var _11e=new this.SYSTEM.Widget.Label("emailTextLabel");
var _11f=new this.SYSTEM.Widget.TextButton("emailInsertBtn",55,"Insert");
var left=this.emailFrame.leftEdgeWidth;
var top=this.emailFrame.topEdgeHeight;
var _122=60;
this.emailFrame.addWidget(_11c,left,top+40);
this.emailFrame.addWidget(_11d,left+_122,top+35);
this.emailFrame.addWidget(_11e,left,top+5);
this.emailFrame.addWidget(_11f,this.emailFrame.rightEdgeWidth,this.emailFrame.bottomEdgeHeight,true,true);
this.emailURLLabel=_11c;
this.emailURLText=_11d;
this.emailInsertBtn=_11f;
var _123=this.writer.getTextAtRange();
if(_123){
_11e.setText("Text: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+_123);
this.insertEmailText=_123;
}else{
var _124=new this.SYSTEM.Widget.Text("emailText");
_124.setWidth(160);
this.emailFrame.addWidget(_124,_11d.positionX,top);
this.emailText=_124;
_11e.setText("Text: ");
}
this.emailFrame.setFixedDimensions(this.emailFrame.leftEdgeWidth+this.LINK_FRAME_WIDTH+this.emailFrame.rightEdgeWidth,this.emailFrame.topEdgeHeight+this.LINK_FRAME_HEIGHT+this.emailFrame.bottomEdgeHeight);
this.emailFrame.show();
this.emailURLText.focus();
}
catch(ex){
jsExDebug("writerApp_binding_emailBtn_click",ex);
}
}
function writerApp_binding_symbolDropList_itemWidget(_125){
try{
this.writer.iframePasteAtRange(_125.eventWidget.selectedValue);
}
catch(ex){
jsExDebug("writerApp_binding_symbolDropList_itemWidget",ex);
}
}
function writerApp_binding_addImageBtn_click(_126){
try{
if(this.addImageFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.addImageFrame);
this.addImageURLText.focus();
return;
}
this.addImageFrame=new this.SYSTEM.Frame.Window("addImageFrame","Insert image",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
this.addImageFrame.setMinimumSize(this.INSERT_FRAME_WIDTH,this.INSERT_FRAME_HEIGHT);
this.addImageFrame.setMinimumSize(this.INSERT_FRAME_WIDTH,this.INSERT_FRAME_HEIGHT);
this.addImageFrame.setDimensions(this.INSERT_FRAME_WIDTH,this.INSERT_FRAME_HEIGHT);
this.addImageFrame.setPosition(this.writerFrame.positionX+this.writerFrame.leftEdgeWidth,this.writerFrame.positionY+this.writerFrame.topEdgeHeight);
var _127=new this.SYSTEM.Widget.Label("addImageURLLabel");
_127.setText("Url: ");
var _128=new this.SYSTEM.Widget.Text("addImageURLText");
_128.setWidth(190);
var _129=new this.SYSTEM.Widget.TextButton("addImageInsertBtn",55,"Insert");
var left=this.addImageFrame.leftEdgeWidth;
var top=this.addImageFrame.topEdgeHeight;
this.addImageFrame.addWidget(_127,left,top);
this.addImageFrame.addWidget(_128,left+40,top);
this.addImageFrame.addWidget(_129,this.addImageFrame.rightEdgeWidth,this.addImageFrame.bottomEdgeHeight,true,true);
this.addImageURLLabel=_127;
this.addImageURLText=_128;
this.addImageInsertBtn=_129;
this.addImageFrame.setFixedDimensions(this.addImageFrame.leftEdgeWidth+this.INSERT_FRAME_WIDTH+this.addImageFrame.rightEdgeWidth,this.addImageFrame.topEdgeHeight+this.INSERT_FRAME_HEIGHT+this.addImageFrame.bottomEdgeHeight);
this.addImageFrame.show();
this.addImageURLText.focus();
this.addImageURLText.setContent("http://");
}
catch(ex){
jsExDebug("writerApp_binding_addImageBtn_click",ex);
}
}
function writerApp_collaboration_tokenRelease(_12c){
function dialogueCallback(_12d){
try{
if(_12d){
this.save(true,_12c,true);
}else{
this.file.clearTokenOwner();
if(_12c){
_12c.invoke();
}
}
}
catch(ex){
jsExDebug("writerApp_collaboration_tokenRelease: dialogueCallback",ex);
}
}
try{
if(this.checkOkToSave()){
var _12e=new this.SYSTEM.Dialogue.YesNoAlert(this,"WebWriter","You have released edit control of the document, do you wish to save your changes?",new this.SYSTEM.Delegate(this,dialogueCallback));
}else{
_12c.invoke();
}
}
catch(ex){
jsExDebug("writerApp_collaboration_tokenRelease",ex);
}
}
function writerApp_binding_templateSelect_itemSelect(_12f){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WRITER,null,_12f.getSelectedValue());
}
catch(ex){
jsExDebug("writerApp_binding_templateSelect_itemSelect",ex);
}
}

try{
quickHelpApp_t.prototype=new application_t();
quickHelpApp_t.prototype.constructor=quickHelpApp_t;
quickHelpApp_t.prototype.quickHelpApp_super=application_t.prototype.constructor;
quickHelpApp_t.prototype.cleanUp=quickHelpApp_cleanUp;
quickHelpApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
quickHelpApp_t.prototype._SIG_KILL=quickHelpApp__SIG_KILL;
quickHelpApp_t.prototype._SIG_THEME=quickHelpApp__SIG_THEME;
quickHelpApp_t.prototype.capture=quickHelpApp_capture;
quickHelpApp_t.prototype.restore=quickHelpApp_restore;
quickHelpApp_t.prototype.retrieveContent=quickHelpApp_retrieveContent;
quickHelpApp_t.prototype.xmlRequestCallback=quickHelpApp_xmlRequestCallback;
quickHelpApp_t.prototype.createFrame=quickHelpApp_createFrame;
quickHelpApp_t.prototype.selectSection=quickHelpApp_selectSection;
quickHelpApp_t.prototype.quickHelpFrame__onClose=quickHelpApp_quickHelpFrame__onClose;
quickHelpApp_t.prototype.quickHelpFrame__onResize=quickHelpApp_quickHelpFrame__onResize;
quickHelpApp_t.prototype.binding_sectionSelect_itemSelect=quickHelpApp_binding_sectionSelect_itemSelect;
quickHelpApp_t.prototype.binding_topicSelect_itemSelect=quickHelpApp_binding_topicSelect_itemSelect;
quickHelpApp_t.prototype.binding_goToUserManualBtn_click=quickHelpApp_binding_goToUserManualBtn_click;
quickHelpApp_t.prototype.binding_goToMapManualBtn_click=quickHelpApp_binding_goToMapManualBtn_click;
quickHelpApp_t.prototype.binding_goToPPManualBtn_click=quickHelpApp_binding_goToPPManualBtn_click;
quickHelpApp_t.prototype.APP_ID=APP_ID_QUICKHELP;
quickHelpApp_t.prototype.APP_NAME="Quick Help";
quickHelpApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.QUICK_HELP;
quickHelpApp_t.prototype.FRAME_WIDTH=550;
quickHelpApp_t.prototype.FRAME_HEIGHT=450;
quickHelpApp_t.prototype.SECTION_HEIGHT=150;
quickHelpApp_t.prototype.SECTION_LEFT=0;
quickHelpApp_t.prototype.EXTRA_LEFT=0;
quickHelpApp_t.prototype.GOTO_MANUAL_LEFT=0;
quickHelpApp_t.prototype.TOPIC_LEFT=235;
quickHelpApp_t.prototype.HELP_LEFT=0;
quickHelpApp_t.prototype.HELP_TITLE_HEIGHT=15;
quickHelpApp_t.prototype.HELP_CONTENT_HEIGHT=180;
quickHelpApp_t.prototype.HELP_CONTENT_WIDTH=490;
quickHelpApp_t.prototype.SELECT_BORDER="solid 2px #AAAAAA";
quickHelpApp_t.prototype.SECTION_TOP=65;
quickHelpApp_t.prototype.EXTRA_TOP=0;
quickHelpApp_t.prototype.GOTO_MANUAL_TOP=25;
quickHelpApp_t.prototype.TOPIC_TOP=65;
quickHelpApp_t.prototype.HELP_TITLE_TOP=240;
quickHelpApp_t.prototype.HELP_CONTENT_TOP=260;
}
catch(ex){
jsExDebug("quickHelpApp_t.prototype",ex);
}
function quickHelpApp_t(_1){
try{
this.quickHelpApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(_1[0]){
this.defaultSection=_1[0];
}
this.sectionArray=[];
this.createFrame();
this.retrieveContent();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("quickHelpApp_t",ex);
}
}
function quickHelpApp_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var i in me.sectionArray){
if(me.sectionArray[i].length){
for(var j in me.sectionArray[i]){
if(me.sectionArray[i][j].text){
me.sectionArray[i][j].name=null;
me.sectionArray[i][j].text=null;
me.sectionArray[i][j]=null;
delete me.sectionArray[i][j];
}
}
me.sectionArray[i]=null;
delete me.sectionArray[i];
}
}
me.sectionArray=null;
me.quickHelpFrame=null;
me.sectionSelect=null;
me.topicSelect=null;
me.quickHelpTitle=null;
me.quickHelpContent=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("quickHelpApp_cleanUp",ex);
}
}
function quickHelpApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("quickHelpApp__SIG_KILL",ex);
}
}
function quickHelpApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("quickHelpApp__SIG_THEME",ex);
}
}
function quickHelpApp_capture(){
try{
var _5=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _6=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="qh:"+(this.quickHelpFrame.width/_6)+","+(this.quickHelpFrame.height/_5)+","+(this.quickHelpFrame.positionX/_6)+","+((this.quickHelpFrame.positionY-this.SYSTEM.Panel.getHeight())/_5);
return this.captureString;
}
catch(ex){
jsExDebug("quickHelpApp_capture",ex);
}
}
function quickHelpApp_restore(_7){
try{
if(!_7){
return;
}
var _8=_7.split(":")[1].split(",");
var _9=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _a=this.SYSTEM.Environment.SCREEN_WIDTH;
var _b=parseInt(_a*parseFloat(_8[0]));
var _c=parseInt(_9*parseFloat(_8[1]));
var _d=parseInt(_a*parseFloat(_8[2]));
var _e=parseInt((_9*parseFloat(_8[3]))+this.SYSTEM.Panel.getHeight());
this.quickHelpFrame.setDimensions(_b,_c);
this.quickHelpFrame.setPosition(_d,_e);
}
catch(ex){
jsExDebug("quickHelpApp_restore",ex);
}
}
function quickHelpApp_retrieveContent(){
try{
this.SYSTEM.Network.request("js/xml/help.xml",null,this.xmlRequestCallback,this);
}
catch(ex){
jsExDebug("quickHelpApp_retrieveHelpContent",ex);
}
}
function quickHelpApp_xmlRequestCallback(_f,me){
try{
var _11=_f.firstChild;
for(var _12=_11.firstChild;_12!=null;_12=_12.nextSibling){
if(_12.nodeType!=_12.TEXT_NODE){
var _13=_12.getAttribute("name");
me.sectionArray[_13]=[];
for(var _14=_12.firstChild;_14!=null;_14=_14.nextSibling){
if(_14.nodeType!=_14.TEXT_NODE){
var _15=_14.getAttribute("name");
var _16=_14.getAttribute("text");
me.sectionArray[_13][_15]={name:_15,text:_16};
}
}
}
}
if(me.defaultSection){
me.selectSection(me.defaultSection);
me.sectionSelect.setSelectedValue(me.defaultSection);
me.sectionSelect.scrollToSelectedIndex();
}
}
catch(ex){
jsExDebug("quickHelpApp_xmlRequestCallback",ex);
}
}
function quickHelpApp_createFrame(){
try{
var _17=new this.SYSTEM.Frame.Window("quickHelpFrame","Quick Help",this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_17.setDimensions(this.FRAME_WIDTH,this.FRAME_HEIGHT);
var _18=_17.leftEdgeWidth;
var top=_17.topEdgeHeight;
var _1a=new this.SYSTEM.Widget.Label("extraLabel");
_1a.setText("If you are after more detailed help, look in the User Manual (PDF). For detailed WebMap help look in the WebMap User Manual.");
var _1b=new this.SYSTEM.Widget.TextButton("goToUserManualBtn",100,"User Manual");
var _1c=new this.SYSTEM.Widget.TextButton("goToMapManualBtn",170,"WebMap User Manual");
var _1d=new this.SYSTEM.Widget.TextButton("goToPPManualBtn",210,"Pocket Peepel User Manual");
var _1e=new this.SYSTEM.Widget.SelectList("sectionSelect");
_1e.align(_1e.LEFT_ALIGN);
_1e.setDimensions((_17.getInternalWidth()/2)-this.pad-4,this.SECTION_HEIGHT);
_1e.setBorder(this.SELECT_BORDER);
_1e.allowStartVisible();
_1e.addItem("map","WebMap");
_1e.addItem("peepelpoint manager","PointManager");
_1e.addItem("spreadsheet","WebSheet");
_1e.addItem("writer","WebWriter");
_1e.addItem("profile","Profile");
_1e.addItem("contact manager","ContactManager");
_1e.addItem("file manager","FileManager");
_1e.addItem("file sharing","File Sharing");
_1e.addItem("file import","File Import");
_1e.addItem("workspace manager","WorkSpace Manager");
_1e.addItem("media gallery","Media Gallery");
_1e.addItem("settings","Settings");
_1e.addItem("peepelbrowser","Browser");
_1e.addItem("feedback","Feedback");
_1e.addItem("calculator","Calculator");
_1e.addItem("blog","Blog");
_1e.addItem("notifier","Notifier");
_1e.addItem("rss","RSS");
_1e.addItem("pocket peepel","Pocket Peepel");
_1e.addItem("network status","Network Status");
_1e.addItem("quick launch","Quick Launch Addresses");
var _1f=new this.SYSTEM.Widget.SelectList("topicSelect");
_1f.align(_1f.LEFT_ALIGN);
_1f.setDimensions(_1e.width,this.SECTION_HEIGHT);
_1f.allowStartVisible();
_1f.setBorder(this.SELECT_BORDER);
var _20=document.createElement("span");
_20.style.position="absolute";
_20.style.top=(top+this.HELP_TITLE_TOP)+"px";
_20.style.left=(_18+this.HELP_LEFT)+"px";
_20.style.height=this.HELP_TITLE_HEIGHT+"px";
_20.style.width="auto";
_20.innerHTML="Quick Help Info";
_20.style.fontWeight="bold";
var _21=document.createElement("div");
_21.style.position="absolute";
_21.style.top=(top+this.HELP_CONTENT_TOP)+"px";
_21.style.left=(_18+this.HELP_LEFT)+"px";
_21.style.height=(_17.getInternalHeight()-this.HELP_CONTENT_TOP-this.pad)+"px";
_21.style.width=(_17.getInternalWidth()-2)+"px";
_21.style.overflowY="scroll";
_21.style.border="solid 1px #AAAAAA";
_17.addWidget(_1a,_18+this.EXTRA_LEFT,top+this.EXTRA_TOP);
_17.addWidget(_1b,_18+this.GOTO_MANUAL_LEFT,top+_1a.getClientHeight()+this.pad);
_17.addWidget(_1c,_1b.positionX+_1b.width+this.pad,_1b.positionY);
_17.addWidget(_1d,_1c.positionX+_1c.width+this.pad,_1b.positionY);
_17.addWidget(_1e,_18+this.SECTION_LEFT,_1b.positionY+_1b.height+this.pad);
_17.addWidget(_1f,_18+_1e.width+this.pad+4,_1e.positionY);
_17.windowDiv.appendChild(_20);
_17.windowDiv.appendChild(_21);
_17.show();
this.quickHelpFrame=_17;
this.extraLabel=_1a;
this.goToUserManualBtn=_1b;
this.sectionSelect=_1e;
this.topicSelect=_1f;
this.quickHelpTitle=_20;
this.quickHelpContent=_21;
}
catch(ex){
jsExDebug("quickHelpApp_createFrame",ex);
}
}
function quickHelpApp_selectSection(_22){
try{
this.topicSelect.clearList();
if(!_22){
return;
}
var _23=this.sectionArray[_22];
for(var i in _23){
if(_23[i].text){
this.topicSelect.addItem(_23[i].name,_23[i].name);
}
}
}
catch(ex){
jsExDebug("quickHelpApp_selectSection",ex);
}
}
function quickHelpApp_quickHelpFrame__onClose(_25){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("quickHelpApp_quickHelpFrame__onClose",ex);
}
}
function quickHelpApp_quickHelpFrame__onResize(_26){
try{
if(!this.quickHelpFrame){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _29=null;
var _2a=null;
if(dX||dY){
_29=_26.width+this.SYSTEM.Event.dragDistanceX;
_2a=_26.height+this.SYSTEM.Event.dragDistanceY;
if(_29<=_26.minimumWidth){
_29=_26.minimumWidth;
}
if(_2a<=_26.minimumHeight){
_2a=_26.minimumHeight;
}
}else{
_29=_26.width;
_2a=_26.height;
}
var _2b=_26.getInternalWidth(_29);
this.quickHelpContent.style.width=(_2b-2)+"px";
this.quickHelpContent.style.height=(_26.getInternalHeight(_2a)-this.HELP_CONTENT_TOP-this.pad)+"px";
this.sectionSelect.setDimensions((_2b/2)-this.pad-4,this.SECTION_HEIGHT);
this.topicSelect.setPosition(this.sectionSelect.positionX+this.sectionSelect.width+this.pad+4);
this.topicSelect.setDimensions(this.sectionSelect.width,this.SECTION_HEIGHT);
}
catch(ex){
jsExDebug("quickHelpApp_quickHelpFrame__onResize",ex);
}
}
function quickHelpApp_binding_sectionSelect_itemSelect(_2c){
try{
this.selectSection(_2c.getSelectedValue());
this.quickHelpContent.innerHTML="";
}
catch(ex){
jsExDebug("quickHelpApp_binding_sectionSelect_itemSelect",ex);
}
}
function quickHelpApp_binding_topicSelect_itemSelect(_2d){
try{
var _2e=this.sectionSelect.getSelectedValue();
var _2f=_2d.getSelectedValue();
var _30=this.sectionArray[_2e][_2f].text.split("@!");
if(_30&&_30.length){
this.quickHelpContent.innerHTML=_30[0];
for(var i=1;i<_30.length;i++){
this.quickHelpContent.innerHTML+="<br>"+_30[i];
}
}
}
catch(ex){
jsExDebug("quickHelpApp_binding_topicSelect_itemSelect",ex);
}
}
function quickHelpApp_binding_goToUserManualBtn_click(_32){
try{
newBrowserWindow("resources/Peepel_User_Manual.pdf");
}
catch(ex){
jsExDebug("quickHelpApp_binding_goToUserManualBtn_click",ex);
}
}
function quickHelpApp_binding_goToMapManualBtn_click(){
try{
newBrowserWindow("resources/Webmaps_User_Manual.pdf");
}
catch(ex){
jsExDebug("quickHelpApp_binding_goToMapManualBtn_click",ex);
}
}
function quickHelpApp_binding_goToPPManualBtn_click(){
try{
newBrowserWindow("resources/Pocket_Peepel_User_Manual.pdf");
}
catch(ex){
jsExDebug("quickHelpApp_binding_goToMapManualBtn_click",ex);
}
}

try{
fileManagerApp_t.prototype=new application_t();
fileManagerApp_t.prototype.constructor=fileManagerApp_t;
fileManagerApp_t.prototype.fileManagerApp_super=application_t.prototype.constructor;
fileManagerApp_t.prototype.cleanUp=fileManagerApp_cleanUp;
fileManagerApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
fileManagerApp_t.prototype._SIG_KILL=fileManagerApp__SIG_KILL;
fileManagerApp_t.prototype._SIG_THEME=fileManagerApp__SIG_THEME;
fileManagerApp_t.prototype.capture=fileManagerApp_capture;
fileManagerApp_t.prototype.restore=fileManagerApp_restore;
fileManagerApp_t.prototype.showActionButtons=fileManagerApp_showActionButtons;
fileManagerApp_t.prototype.openFile=fileManagerApp_openFile;
fileManagerApp_t.prototype.saveNewFolder=fileManagerApp_saveNewFolder;
fileManagerApp_t.prototype.rename=fileManagerApp_rename;
fileManagerApp_t.prototype.moveFile=fileManagerApp_moveFile;
fileManagerApp_t.prototype.performCurrentAction=fileManagerApp_performCurrentAction;
fileManagerApp_t.prototype.cancelCurrentAction=fileManagerApp_cancelCurrentAction;
fileManagerApp_t.prototype.error=fileManagerApp_error;
fileManagerApp_t.prototype.okAlert=fileManagerApp_okAlert;
fileManagerApp_t.prototype.showFolderName=fileManagerApp_showFolderName;
fileManagerApp_t.prototype.hideFilterByOwnerInterface=fileManagerApp_hideFilterByOwnerInterface;
fileManagerApp_t.prototype.showFilterByOwnerInterface=fileManagerApp_showFilterByOwnerInterface;
fileManagerApp_t.prototype.avatarUpdateCallback=fileManagerApp_avatarUpdateCallback;
fileManagerApp_t.prototype.frame__onClose=fileManagerApp_frame__onClose;
fileManagerApp_t.prototype.frame_keyPress=fileManagerApp_frame_keyPress;
fileManagerApp_t.prototype.frame__onResize=fileManagerApp_frame__onResize;
fileManagerApp_t.prototype.frame__onResizeEnd=fileManagerApp_frame__onResizeEnd;
fileManagerApp_t.prototype.avatarFrame__onClose=fileManagerApp_avatarFrame__onClose;
fileManagerApp_t.prototype.binding_quickHelpBtn_click=fileManagerApp_binding_quickHelpBtn_click;
fileManagerApp_t.prototype.binding_openBtn_click=fileManagerApp_binding_openBtn_click;
fileManagerApp_t.prototype.binding_deleteBtn_click=fileManagerApp_binding_deleteBtn_click;
fileManagerApp_t.prototype.binding_renameBtn_click=fileManagerApp_binding_renameBtn_click;
fileManagerApp_t.prototype.binding_newFolderBtn_click=fileManagerApp_binding_newFolderBtn_click;
fileManagerApp_t.prototype.binding_moveToBtn_click=fileManagerApp_binding_moveToBtn_click;
fileManagerApp_t.prototype.binding_okBtn_click=fileManagerApp_binding_okBtn_click;
fileManagerApp_t.prototype.binding_cancelBtn_click=fileManagerApp_binding_cancelBtn_click;
fileManagerApp_t.prototype.binding_refreshBtn_click=fileManagerApp_binding_refreshBtn_click;
fileManagerApp_t.prototype.binding_shareBtn_click=fileManagerApp_binding_shareBtn_click;
fileManagerApp_t.prototype.binding_ownerSelect_itemSelect=fileManagerApp_binding_ownerSelect_itemSelect;
fileManagerApp_t.prototype.binding_avatarFrameUseAvatarButton_click=fileManagerApp_binding_avatarFrameUseAvatarButton_click;
fileManagerApp_t.prototype.folderDblClickEvent=fileManagerApp_folderDblClickEvent;
fileManagerApp_t.prototype.fileDblClickEvent=fileManagerApp_fileDblClickEvent;
fileManagerApp_t.prototype.backBtnClickEvent=fileManagerApp_backBtnClickEvent;
fileManagerApp_t.prototype.fileSelectEvent=fileManagerApp_fileSelectEvent;
fileManagerApp_t.prototype.fileDeselectEvent=fileManagerApp_fileDeselectEvent;
fileManagerApp_t.prototype.folderLoadedEvent=fileManagerApp_folderLoadedEvent;
fileManagerApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.FILE_MANAGER;
fileManagerApp_t.prototype.APP_ID=APP_ID_FILE_MANAGER;
fileManagerApp_t.prototype.APP_NAME="FileManager";
fileManagerApp_t.prototype.FOLDER_VIEW=1;
fileManagerApp_t.prototype.FILE_VIEW=2;
fileManagerApp_t.prototype.RENAME=1;
fileManagerApp_t.prototype.NEW_FOLDER=2;
fileManagerApp_t.prototype.MOVE_TO=3;
fileManagerApp_t.prototype.OWNER_ALL=1;
fileManagerApp_t.prototype.FRAME_WIDTH=455;
fileManagerApp_t.prototype.FRAME_HEIGHT=430;
fileManagerApp_t.prototype.FRAME_MIN_WIDTH=455;
fileManagerApp_t.prototype.FRAME_MIN_HEIGHT=455;
fileManagerApp_t.prototype.FRAME_EXTENSION_WIDTH=240;
fileManagerApp_t.prototype.BORDER_WIDTH_OFFSET=2;
fileManagerApp_t.prototype.HELP_LEFT=10;
fileManagerApp_t.prototype.HELP_TOP=0;
fileManagerApp_t.prototype.FILES_LEFT=10;
fileManagerApp_t.prototype.OPEN_WIDTH=60;
fileManagerApp_t.prototype.OPEN_HEIGHT=24;
fileManagerApp_t.prototype.RENAME_LEFT=0;
fileManagerApp_t.prototype.DELETE_LEFT=28;
fileManagerApp_t.prototype.NEW_FOLDER_LEFT=56;
fileManagerApp_t.prototype.MOVE_TO_LEFT=56;
fileManagerApp_t.prototype.REFRESH_LEFT=84;
fileManagerApp_t.prototype.SHARE_LEFT=112;
fileManagerApp_t.prototype.TEXT_LEFT=0;
fileManagerApp_t.prototype.OK_LEFT=165;
fileManagerApp_t.prototype.OK_WIDTH=40;
fileManagerApp_t.prototype.OK_HEIGHT=24;
fileManagerApp_t.prototype.MOVE_TO_WIDTH=160;
fileManagerApp_t.prototype.MOVE_TO_HEIGHT=22;
fileManagerApp_t.prototype.CANCEL_WIDTH=60;
fileManagerApp_t.prototype.CANCEL_HEIGHT=24;
fileManagerApp_t.prototype.CANCEL_LEFT=210;
fileManagerApp_t.prototype.SEPARATOR_TOP=40;
fileManagerApp_t.prototype.FILES_TOP=90;
fileManagerApp_t.prototype.FILES_BOTTOM=38;
fileManagerApp_t.prototype.BTN_TOP=50;
fileManagerApp_t.prototype.OK_TOP=fileManagerApp_t.prototype.BTN_TOP;
fileManagerApp_t.prototype.TEXT_TOP=fileManagerApp_t.prototype.BTN_TOP;
fileManagerApp_t.prototype.CANCEL_TOP=fileManagerApp_t.prototype.BTN_TOP;
fileManagerApp_t.prototype.OWNER_WIDTH=90;
fileManagerApp_t.prototype.OWNER_HEIGHT=22;
fileManagerApp_t.prototype.OWNER_LBL_LEFT=150;
fileManagerApp_t.prototype.RENAME_IMG="img/app/system/icons/24x24/fm_rename.png";
fileManagerApp_t.prototype.NEW_FOLDER_IMG="img/app/system/icons/24x24/fm_newfolder.png";
fileManagerApp_t.prototype.MOVE_TO_IMG="img/app/system/icons/24x24/move.png";
fileManagerApp_t.prototype.REFRESH_IMG="img/app/system/icons/24x24/refresh.png";
fileManagerApp_t.prototype.SHARE_IMG="img/app/system/icons/24x24/sharing.png";
fileManagerApp_t.prototype.READ_IMG="img/app/system/icons/small/read_off.png";
fileManagerApp_t.prototype.WRITE_IMG="img/app/system/icons/small/write_off.png";
fileManagerApp_t.prototype.AVATAR_FRAME_WIDTH=270;
fileManagerApp_t.prototype.AVATAR_FRAME_HEIGHT=200;
}
catch(ex){
jsExDebug("fileManagerApp_t.prototype",ex);
}
function fileManagerApp_t(_1){
function listFoldersCallback(){
try{
if(_1[0]){
this.stateView=this.FILE_VIEW;
this.fileBrowser.openFolderWithId(parseInt(_1[0]));
}
}
catch(ex){
jsExDebug("fileManagerApp_t: listFoldersCallback",ex);
}
}
try{
this.fileManagerApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.openFileText="To open a file: Double-click on it or select the file and click 'Open'.";
this.openFolderText="Double-click on a folder to view its contents.";
this.renameFolderText="Type in the new folder name and click 'OK' to save it.";
this.renameFileText="Type in the new file name and click 'OK' to save it.";
this.moveToText="Choose the folder to move the file to and click 'OK'.";
this.newFolderText="Type in the folders name and click 'OK' to save it.";
this.publicFolderText="To search for file that other users have made publicly available: Type a search term in the search box and hit Enter/Return.";
this.filterByOwnerInterfaceVisible=false;
this.importedFolderId=this.SYSTEM.Settings.get("file_import_folder");
var _2=new this.SYSTEM.Frame.Window("frame","File Manager",this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_2.setMinimumSize(this.FRAME_MIN_WIDTH);
var _3=new this.SYSTEM.Widget.Label("helpLabel");
_3.setText(this.openFolderText);
var _4=document.createElement("div");
_4.style.position="absolute";
_4.style.left=_2.leftEdgeWidth+"px";
_4.style.top=(_2.topEdgeHeight+this.SEPARATOR_TOP)+"px";
_4.style.width=_2.getInternalWidth()+"px";
_4.style.height="2px";
_4.style.backgroundColor="rgb(192, 192, 192)";
_2.windowDiv.appendChild(_4);
var _5=new this.SYSTEM.Controls.FileBrowser("fileBrowser",SYSTEM.Controls.FileBrowser.TYPE_OPEN);
_5.setDimensions(_2.getInternalWidth()-this.BORDER_WIDTH_OFFSET,_2.getInternalHeight()-this.FILES_BOTTOM-this.FILES_TOP);
_5.addEventHandler(_5.FILE_DBL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.fileDblClickEvent));
_5.addEventHandler(_5.FOLDER_DBL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.folderDblClickEvent));
_5.addEventHandler(_5.BACK_BTN_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.backBtnClickEvent));
_5.addEventHandler(_5.FILE_SELECT_EVENT,new this.SYSTEM.Delegate(this,this.fileSelectEvent));
_5.addEventHandler(_5.CONTROL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.fileDeselectEvent));
_5.addEventHandler(_5.FOLDER_CONTENTS_LOADED_EVENT,new this.SYSTEM.Delegate(this,this.folderLoadedEvent));
_5.listFolders(new this.SYSTEM.Delegate(this,listFoldersCallback));
var _6="normal 12px verdana";
var _7=new this.SYSTEM.Widget.ClassButton("deleteBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.SYSTEM.Icon.Small.DELETE,"Delete","Delete the selected file/folder");
var _8=new this.SYSTEM.Widget.ClassButton("renameBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.RENAME_IMG,"Rename","Rename the selected file/folder");
var _9=new this.SYSTEM.Widget.ClassButton("newFolderBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.NEW_FOLDER_IMG,"New folder","Create a new folder");
var _a=new this.SYSTEM.Widget.ClassButton("moveToBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.MOVE_TO_IMG,"Move file","Move the selected file to a different folder");
var _b=new this.SYSTEM.Widget.ClassButton("shareBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.SHARE_IMG,"File Sharing","Show the file sharing options for this file");
var _c=new this.SYSTEM.Widget.TextButton("openBtn",this.OPEN_WIDTH,"Open","Open","Open the selected file");
var _d=new this.SYSTEM.Widget.Text("textBox");
_d.setDimensions(155,20);
_d.textBox.style.paddingLeft="5px";
var _e=new this.SYSTEM.Widget.TextButton("okBtn",this.OK_WIDTH,"OK");
var _f=new this.SYSTEM.Widget.TextButton("cancelBtn",this.CANCEL_WIDTH,"Cancel");
var _10=new this.SYSTEM.Widget.DropText("moveToSelect",this.MOVE_TO_WIDTH,this.MOVE_TO_HEIGHT,this.MOVE_TO_WIDTH);
var _11=new this.SYSTEM.Widget.ClassButton("refreshBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.REFRESH_IMG,"Refresh","Refresh the file browser");
_a.hide();
_d.hide();
_e.hide();
_10.hide();
_f.hide();
_b.hide();
var _12=new this.SYSTEM.Widget.Label("ownerLabel");
_12.setText("Filter by Owner:");
var _13=new this.SYSTEM.Widget.DropText("ownerSelect",this.OWNER_WIDTH,this.OWNER_HEIGHT);
_13.list.disallowItemTextPadding();
_12.hide();
_13.hide();
var pad=this.SYSTEM.Style.WIDGET_PADDING;
_2.addWidget(_3,_2.leftEdgeWidth,_2.topEdgeHeight+this.HELP_TOP);
_2.addControl(_5,_2.leftEdgeWidth,_2.topEdgeHeight+this.FILES_TOP);
_2.addWidget(_c,_2.rightEdgeWidth+pad,_2.bottomEdgeHeight+pad,true,true);
_2.addWidget(_7,_2.leftEdgeWidth+this.DELETE_LEFT,_2.topEdgeHeight+this.BTN_TOP);
_2.addWidget(_8,_2.leftEdgeWidth+this.RENAME_LEFT,_2.topEdgeHeight+this.BTN_TOP);
_2.addWidget(_9,_2.leftEdgeWidth+this.NEW_FOLDER_LEFT,_2.topEdgeHeight+this.BTN_TOP);
_2.addWidget(_a,_2.leftEdgeWidth+this.MOVE_TO_LEFT,_2.topEdgeHeight+this.BTN_TOP);
_2.addWidget(_11,_2.leftEdgeWidth+this.REFRESH_LEFT,_2.topEdgeHeight+this.BTN_TOP);
_2.addWidget(_b,_2.leftEdgeWidth+this.SHARE_LEFT,_2.topEdgeHeight+this.BTN_TOP);
_2.addWidget(_d,_2.leftEdgeWidth+this.TEXT_LEFT,_2.topEdgeHeight+this.TEXT_TOP);
_2.addWidget(_e,_2.leftEdgeWidth+this.OK_LEFT,_2.topEdgeHeight+this.OK_TOP);
_2.addWidget(_f,_2.leftEdgeWidth+this.CANCEL_LEFT,_2.topEdgeHeight+this.CANCEL_TOP);
_2.addWidget(_10,_2.leftEdgeWidth+this.TEXT_LEFT,_2.topEdgeHeight+this.TEXT_TOP);
_2.addWidget(_12,_2.leftEdgeWidth+this.OWNER_LBL_LEFT,_2.topEdgeHeight+this.TEXT_TOP+5);
_2.addWidget(_13,_12.positionX+_12.getClientWidth()+this.pad,_2.topEdgeHeight+this.TEXT_TOP);
_2.show();
this.frame=_2;
this.separator=_4;
this.helpLabel=_3;
this.fileBrowser=_5;
this.openBtn=_c;
this.deleteBtn=_7;
this.renameBtn=_8;
this.newFolderBtn=_9;
this.moveToBtn=_a;
this.refreshBtn=_11;
this.shareBtn=_b;
this.textBox=_d;
this.okBtn=_e;
this.cancelBtn=_f;
this.moveToSelect=_10;
this.ownerLabel=_12;
this.ownerSelect=_13;
this.stateView=this.FOLDER_VIEW;
this.stateOkAction=null;
this.stateShareOpen=false;
var _15=this.APPLICATION.Panel;
var _16=this.SYSTEM.Widget.Button.HOVER_IMAGE;
var _17=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
_15.addUtility(_17);
this.SYSTEM.Tooltip.hideLoading();
this.frame.windowDiv.style.overflow="visible";
}
catch(ex){
jsExDebug("fileManagerApp_t",ex);
}
}
function fileManagerApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.avatarFrame=null;
me.avatarFrameContentDiv=null;
me.currentOpenAvatar=null;
me.openFileText=null;
me.openFolderText=null;
me.renameFolderText=null;
me.renameFileText=null;
me.moveToText=null;
me.newFolderText;
me.stateView=null;
me.stateOkAction=null;
me.fileBrowser=null;
me.helpLabel=null;
me.openBtn=null;
me.separator=null;
me.deleteBtn=null;
me.renameBtn=null;
me.newFolderBtn=null;
me.moveToBtn=null;
me.textBox=null;
me.okBtn=null;
me.cancelBtn=null;
me.moveToSelect=null;
me.refreshBtn=null;
me.shareBtn=null;
me.ownerLabel=null;
me.ownerSelect=null;
me.filterByOwnerInterfaceVisible=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
}
me.frame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("fileManagerApp_cleanUp",ex);
}
}
function fileManagerApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("fileManagerApp__SIG_KILL",ex);
}
}
function fileManagerApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("fileManagerApp__SIG_THEME",ex);
}
}
function fileManagerApp_capture(){
try{
var _19=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _1a=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="fm:"+(this.frame.width/_1a)+","+(this.frame.height/_19)+","+(this.frame.positionX/_1a)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_19);
return this.captureString;
}
catch(ex){
jsExDebug("fileManagerApp_capture",ex);
}
}
function fileManagerApp_restore(_1b){
try{
if(!_1b){
return;
}
var _1c=_1b.split(":")[1].split(",");
var _1d=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _1e=this.SYSTEM.Environment.SCREEN_WIDTH;
var _1f=parseInt(_1e*parseFloat(_1c[0]));
var _20=parseInt(_1d*parseFloat(_1c[1]));
var _21=parseInt(_1e*parseFloat(_1c[2]));
var top=parseInt((_1d*parseFloat(_1c[3]))+this.SYSTEM.Panel.getHeight());
this.frame.setDimensions(_1f,_20);
this.frame.setPosition(_21,top);
}
catch(ex){
jsExDebug("fileManagerApp_restore",ex);
}
}
function fileManagerApp_showActionButtons(){
try{
switch(this.stateView){
case this.FOLDER_VIEW:
this.renameBtn.show();
this.newFolderBtn.show();
this.deleteBtn.show();
this.refreshBtn.show();
this.helpLabel.setText(this.openFolderText);
break;
case this.FILE_VIEW:
if(this.fileBrowser.getSelectedFolder().folderId==this.fileBrowser.PUBLIC_FILES_ID){
this.renameBtn.hide();
this.moveToBtn.hide();
this.deleteBtn.hide();
this.shareBtn.hide();
this.refreshBtn.hide();
this.helpLabel.setText(this.publicFolderText);
}else{
this.renameBtn.show();
this.moveToBtn.show();
this.deleteBtn.show();
this.shareBtn.show();
this.refreshBtn.show();
this.helpLabel.setText(this.openFileText);
}
break;
}
}
catch(ex){
jsExDebug("fileManagerApp_showActionButtons",ex);
}
}
function fileManagerApp_openFile(){
function open(){
try{
switch(parseInt(_23.filetype)){
case me.SYSTEM.Filesystem.File.TYPE_WRITER:
if(_23.ispublic){
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WRITER,_23.fileid,null,true);
}else{
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WRITER,_23.fileid);
}
break;
case me.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
if(_23.ispublic){
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET,_23.fileid,null,true);
}else{
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET,_23.fileid);
}
break;
case me.SYSTEM.Filesystem.File.TYPE_IMAGE:
if(_23.ispublic){
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_MEDIA_VIEW,null,_23.fileid);
}else{
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_MEDIA_VIEW,_23.fileid);
}
break;
}
me.cancelCurrentAction();
}
catch(ex){
jsExDebug("fileManagerApp_openFile: open",ex);
}
}
try{
var me=this;
var _23=this.fileBrowser.getSelectedFile();
var _25=this.fileBrowser.getSelectedFolder();
if(_25&&_23){
if(_23.filetype){
this.SYSTEM.Tooltip.showLoading(open,"File Manager","Opening "+_23.filename+"...");
}else{
this.error("Please select a file to open");
}
}else{
if(_25&&!this.fileBrowser.openedFolder){
this.fileBrowser.openSelectedFolder();
this.cancelCurrentAction();
}
}
}
catch(ex){
jsExDebug("fileManagerApp_openFile",ex);
}
}
function fileManagerApp_saveNewFolder(_26){
function folderCreationCallback(_27,me){
try{
if(_27){
var _29=me.SYSTEM.Filesystem.getFolderContentsById(_27);
me.fileBrowser.addFolder({folderName:me.newFolderName,folderId:_27,contents:_29.contents});
}else{
me.error("The folder was not created, folders must have a unique name and contain at least one letter. The following characters are not allowed: ?*+/\\$()[]{}|;:,%@&'\"`~^",null,null,160);
}
}
catch(ex){
jsExDebug("fileManagerApp_saveNewFolder: folderCreationCallback",ex);
}
}
try{
if(!_26){
this.error("You need to give the folder a name.");
return;
}
this.newFolderName=_26;
this.SYSTEM.Filesystem.createFolder(_26,folderCreationCallback,this);
}
catch(ex){
jsExDebug("fileManagerApp_saveNewFolder",ex);
}
}
function fileManagerApp_rename(_2a){
function renameCallback(_2b,me){
try{
if(_2b){
me.fileBrowser.refresh();
me.showFolderName();
if(me.stateView==me.FOLDER_VIEW){
me.fileBrowser.clearSelectedFolder();
}
}else{
me.error("The file/folder was not renamed, they must have a unique name and contain at least one letter. The following characters are not allowed: ?*+/\\$()[]{}|;:,%@&'\"`~^",null,null,160);
}
}
catch(ex){
jsExDebug("fileManagerApp_rename: renameCallback",ex);
}
}
try{
if(!_2a){
return;
}
if(this.stateView==this.FOLDER_VIEW){
var _2d=this.fileBrowser.getSelectedFolder();
if(_2d){
this.SYSTEM.Filesystem.renameFolder(_2d.folderId,_2a,renameCallback,this);
}
}else{
var _2e=this.fileBrowser.getSelectedFile();
if(_2e&&_2e.fileid){
this.SYSTEM.Filesystem.renameFile(_2e.fileid,_2a,renameCallback,this);
}
}
}
catch(ex){
jsExDebug("fileManagerApp_rename",ex);
}
}
function fileManagerApp_moveFile(_2f){
function copyCallback(_30,me){
try{
if(_30){
if(_32!=me.fileBrowser.ALL_FILES_ID&&_32!=me.fileBrowser.PUBLIC_FILES_ID){
this.SYSTEM.Filesystem.deleteFileFromFolder(_33.fileid,_32,deleteCallback,me);
}
}else{
jsDebug("fileManagerApp_moveFile: copyCallback - Error copying file to folder");
}
}
catch(ex){
jsExDebug("fileManagerApp_moveFile: copyCallback",ex);
}
}
function deleteCallback(_34,me){
try{
if(_34){
me.fileBrowser.refresh();
}else{
jsDebug("fileManagerApp_moveFile: deleteCallback - Error deleting file from folder");
}
}
catch(ex){
jsExDebug("fileManagerApp_moveFile: deleteCallback",ex);
}
}
try{
var _33=this.fileBrowser.getSelectedFile();
if(!_33||!_2f){
return;
}
if(this.fileBrowser.selectedFolder){
var _32=this.fileBrowser.selectedFolder.folderId;
this.SYSTEM.Filesystem.copyFileToFolder(_33.fileid,_2f,copyCallback,this);
}
}
catch(ex){
jsExDebug("fileManagerApp_moveFile",ex);
}
}
function fileManagerApp_performCurrentAction(){
try{
this.okBtn.hide();
this.cancelBtn.hide();
this.okBtn.setPosition(this.frame.leftEdgeWidth+this.OK_LEFT,this.frame.topEdgeHeight+this.BTN_TOP);
this.cancelBtn.setPosition(this.frame.leftEdgeWidth+this.CANCEL_LEFT,this.frame.topEdgeHeight+this.BTN_TOP);
switch(this.stateOkAction){
case this.RENAME:
this.rename(this.textBox.getContent());
this.textBox.hide();
break;
case this.NEW_FOLDER:
this.saveNewFolder(this.textBox.getContent());
this.textBox.hide();
this.textBox.clearContent();
break;
case this.MOVE_TO:
this.moveFile(this.moveToSelect.getSelectedValue());
this.moveToSelect.hide();
break;
}
this.showActionButtons();
this.stateOkAction=null;
this.showFilterByOwnerInterface();
}
catch(ex){
jsExDebug("fileManagerApp_performCurrentAction",ex);
}
}
function fileManagerApp_cancelCurrentAction(){
try{
this.okBtn.hide();
this.cancelBtn.hide();
this.okBtn.setPosition(this.frame.leftEdgeWidth+this.OK_LEFT,this.frame.topEdgeHeight+this.BTN_TOP);
this.cancelBtn.setPosition(this.frame.leftEdgeWidth+this.CANCEL_LEFT,this.frame.topEdgeHeight+this.BTN_TOP);
if(this.stateOkAction==this.MOVE_TO){
this.moveToSelect.hide();
}else{
this.textBox.hide();
}
this.showActionButtons();
this.stateOkAction=null;
this.showFilterByOwnerInterface();
}
catch(ex){
jsExDebug("fileManagerApp_cancelCurrentAction",ex);
}
}
function fileManagerApp_error(msg,_37,_38){
try{
var _39=new this.SYSTEM.Dialogue.Error(this,"File Manager",msg,_37,_38);
}
catch(ex){
jsExDebug("fileManagerApp_error",ex);
}
}
function fileManagerApp_okAlert(msg,_3b,_3c){
try{
var _3d=new this.SYSTEM.Dialogue.OkAlert(this,"File Manager",msg,_3b,_3c);
}
catch(ex){
jsExDebug("fileManagerApp_okAlert",ex);
}
}
function fileManagerApp_showFolderName(){
try{
if(this.stateView==this.FILE_VIEW){
var _3e=this.fileBrowser.getSelectedFolder();
if(_3e){
this.frame.setTitle("File Manager : "+_3e.folderName);
}
}else{
this.frame.setTitle("File Manager");
}
}
catch(ex){
jsExDebug("fileManagerApp_showFolderName",ex);
}
}
function fileManagerApp_hideFilterByOwnerInterface(){
try{
if(this.filterByOwnerInterfaceVisible){
this.ownerLabel.hide();
this.ownerSelect.hide();
}
}
catch(ex){
jsExDebug("fileManagerApp_hideFilterByOwnerInterface",ex);
}
}
function fileManagerApp_showFilterByOwnerInterface(){
try{
if(this.filterByOwnerInterfaceVisible){
this.ownerLabel.show();
this.ownerSelect.show();
}
}
catch(ex){
jsExDebug("fileManagerApp_showFilterByOwnerInterface",ex);
}
}
function fileManagerApp_avatarUpdateCallback(_3f){
try{
if(_3f){
this.okAlert("Your avatar was updated successfully!",null,240);
}else{
this.error("An error occured updating your avatar.",null,240);
}
this.avatarFrame.close();
}
catch(ex){
jsExDebug("fileManagerApp_binding_ownerSelect_itemSelect",ex);
}
}
function fileManagerApp_frame__onClose(_40){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("fileManagerApp_frame__onClose",ex);
}
}
function fileManagerApp_frame_keyPress(key){
try{
if(key.which==13){
this.performCurrentAction();
}
}
catch(ex){
jsExDebug("fileManagerApp_frame_keyPress",ex);
}
}
function fileManagerApp_frame__onResize(_42){
try{
if(!this.fileBrowser){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _45=null;
var _46=null;
if(dX||dY){
_45=_42.width+this.SYSTEM.DM.dragDistanceX;
_46=_42.height+this.SYSTEM.DM.dragDistanceY;
if(_45<=_42.minimumWidth){
_45=_42.minimumWidth;
}
if(_46<=_42.minimumHeight){
_46=_42.minimumHeight;
}
}else{
_45=_42.width;
_46=_42.height;
}
var _47=_42.getInternalWidth(_45)-this.BORDER_WIDTH_OFFSET;
this.fileBrowser.setDimensions(_47,_42.getInternalHeight(_46)-this.FILES_BOTTOM-this.FILES_TOP);
this.separator.style.width=_47+"px";
this.helpLabel.setDimensions(_47,40);
}
catch(ex){
jsExDebug("fileManagerApp_frame__onResize",ex);
}
}
function fileManagerApp_frame__onResizeEnd(_48){
try{
if(this.fileBrowser){
this.fileBrowser.refresh(true);
}
}
catch(ex){
jsExDebug("fileManagerApp_frame__onResizeEnd",ex);
}
}
function fileManagerApp_avatarFrame__onClose(_49){
try{
this.avatarFrame=null;
this.avatarFrameContentDiv=null;
this.currentOpenAvatar=null;
_49.cleanUp();
}
catch(ex){
jsExDebug("fileManagerApp_avatarFrame__onClose",ex);
}
}
function fileManagerApp_binding_quickHelpBtn_click(_4a){
try{
var _4b=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"file manager");
}
catch(ex){
jsExDebug("fileManagerApp_binding_quickHelpBtn_click",ex);
}
}
function fileManagerApp_binding_openBtn_click(_4c){
try{
this.openFile();
}
catch(ex){
jsExDebug("fileManagerApp_binding_openBtn_click",ex);
}
}
function fileManagerApp_binding_deleteBtn_click(_4d){
function deleteCallback(_4e,me){
try{
if(_4e){
if(me.stateView==me.FOLDER_VIEW){
me.fileBrowser.clearSelectedFolder();
}
me.fileBrowser.refresh();
}else{
jsDebug("fileManagerApp_binding_deleteBtn_click: deleteCallback - Failed delete.");
}
}
catch(ex){
jsExDebug("fileManagerApp_binding_deleteBtn_click: deleteCallback",ex);
}
}
function dialogueCallback(_50){
try{
if(!_50){
return;
}
var _51=this.fileBrowser.getSelectedFolder();
if(this.stateView==this.FOLDER_VIEW){
if(_51){
this.SYSTEM.Filesystem.deleteFolder(_51.folderId,deleteCallback,this);
}
}else{
var _52=this.fileBrowser.getSelectedFile();
if(_52){
this.SYSTEM.Filesystem.deleteFile(_52.fileid,deleteCallback,this);
}
}
}
catch(ex){
jsExDebug("fileManagerApp_binding_deleteBtn_click: dialogueCallback",ex);
}
}
try{
var _53=new this.SYSTEM.Delegate(this,dialogueCallback);
if(this.stateView==this.FOLDER_VIEW){
var _54=this.fileBrowser.getSelectedFolder();
if(_54){
if(_54.folderId==this.fileBrowser.OTHERS_FILES_ID||_54.folderId==this.fileBrowser.ALL_FILES_ID||_54.folderId==this.fileBrowser.PUBLIC_FILES_ID||_54.folderId==this.importedFolderId){
this.error("You can't delete this folder.");
return;
}
var _55=new this.SYSTEM.Dialogue.YesNoAlert(this,"Delete Folder","Are you sure you want to delete this folder?",_53,300);
}
}else{
if(this.fileBrowser.getSelectedFile()){
var _56=this.fileBrowser.getSelectedFolder();
if(_56){
if(_56.folderId==this.fileBrowser.ALL_FILES_ID||_56.folderId==this.fileBrowser.PUBLIC_FILES_ID){
this.error("You can't delete files from this folder.");
}else{
var _55=new this.SYSTEM.Dialogue.YesNoAlert(this,"Delete File","Are you sure you want to delete this file?",_53,300);
}
}
}
}
}
catch(ex){
jsExDebug("fileManagerApp_binding_deleteBtn_click",ex);
}
}
function fileManagerApp_binding_renameBtn_click(_57){
try{
if(this.stateView==this.FOLDER_VIEW){
var _58=this.fileBrowser.getSelectedFolder();
if(!_58){
return;
}
if(_58.folderId==this.fileBrowser.OTHERS_FILES_ID||_58.folderId==this.fileBrowser.ALL_FILES_ID||_58.folderId==this.fileBrowser.PUBLIC_FILES_ID){
this.error("You can't rename this folder.");
return;
}
this.textBox.setContent(_58.folderName);
this.helpLabel.setText(this.renameFolderText);
}else{
var _59=this.fileBrowser.getSelectedFile();
if(!_59){
return;
}
this.textBox.setContent(_59.filename);
this.helpLabel.setText(this.renameFileText);
}
this.stateOkAction=this.RENAME;
this.renameBtn.hide();
this.newFolderBtn.hide();
this.moveToBtn.hide();
this.deleteBtn.hide();
this.shareBtn.hide();
this.textBox.show();
this.okBtn.show();
this.cancelBtn.show();
this.hideFilterByOwnerInterface();
}
catch(ex){
jsExDebug("fileManagerApp_binding_renameBtn_click",ex);
}
}
function fileManagerApp_binding_newFolderBtn_click(_5a){
try{
this.renameBtn.hide();
this.newFolderBtn.hide();
this.moveToBtn.hide();
this.deleteBtn.hide();
this.shareBtn.hide();
this.textBox.show();
this.okBtn.show();
this.cancelBtn.show();
this.helpLabel.setText(this.newFolderText);
this.textBox.setContent("new");
this.stateOkAction=this.NEW_FOLDER;
}
catch(ex){
jsExDebug("fileManagerApp_binding_newFolderBtn_click",ex);
}
}
function fileManagerApp_binding_moveToBtn_click(_5b){
function refreshCallback(me){
try{
var _5d=me.SYSTEM.Filesystem.folders;
for(var i in _5d){
var _5f=_5d[i];
if(_5f.folderId&&me.fileBrowser.selectedFolder&&_5f.folderId!=(me.fileBrowser.selectedFolder.folderId)&&_5f.folderId!=me.fileBrowser.ALL_FILES_ID&&_5f.folderId!=me.fileBrowser.OTHERS_FILES_ID&&_5f.folderId!=me.fileBrowser.PUBLIC_FILES_ID){
me.moveToSelect.addItem(_5f.folderId,_5f.folderName,_5f.folderName);
}
}
}
catch(ex){
jsExDebug("refreshCallback",ex);
}
}
try{
if(!this.fileBrowser.getSelectedFile()){
return;
}
this.renameBtn.hide();
this.newFolderBtn.hide();
this.moveToBtn.hide();
this.deleteBtn.hide();
this.shareBtn.hide();
this.okBtn.show();
this.okBtn.setPosition(this.frame.leftEdgeWidth+this.OK_LEFT+30,this.frame.topEdgeHeight+this.BTN_TOP);
this.cancelBtn.show();
this.cancelBtn.setPosition(this.frame.leftEdgeWidth+this.CANCEL_LEFT+30,this.frame.topEdgeHeight+this.BTN_TOP);
this.helpLabel.setText(this.moveToText);
this.moveToSelect.clearList();
this.moveToSelect.show();
this.stateOkAction=this.MOVE_TO;
this.SYSTEM.Filesystem.refresh(refreshCallback,this);
this.hideFilterByOwnerInterface();
}
catch(ex){
jsExDebug("fileManagerApp_binding_moveToBtn_click",ex);
}
}
function fileManagerApp_binding_okBtn_click(_60){
try{
this.performCurrentAction();
}
catch(ex){
jsExDebug("fileManagerApp_binding_okBtn_click",ex);
}
}
function fileManagerApp_binding_cancelBtn_click(_61){
try{
this.cancelCurrentAction();
}
catch(ex){
jsExDebug("fileManagerApp_binding_cancelBtn_click",ex);
}
}
function fileManagerApp_binding_refreshBtn_click(_62){
try{
this.cancelCurrentAction();
this.fileBrowser.refresh(false);
this.ownerSelect.setSelectedValue(this.OWNER_ALL);
this.showFolderName();
}
catch(ex){
jsExDebug("fileManagerApp_binding_refreshBtn_click",ex);
}
}
function fileManagerApp_binding_shareBtn_click(_63){
function closeCallback(){
try{
this.shareDialogue=null;
this.stateShareOpen=false;
}
catch(ex){
jsExDebug("fileManagerApp_binding_shareBtn_click: closeCallback",ex);
}
}
try{
if(this.stateShareOpen){
this.shareDialogue.close();
this.shareDialogue=null;
this.stateShareOpen=false;
}else{
this.shareDialogue=new this.SYSTEM.Dialogue.ContactShare(this,new this.SYSTEM.Delegate(this,closeCallback));
this.shareDialogue.setNoFileMessage("There is no file selected.");
var _64=this.fileBrowser.getSelectedFile();
if(_64){
this.shareDialogue.setFile(_64);
}
this.stateShareOpen=true;
}
}
catch(ex){
jsExDebug("fileManagerApp_binding_shareBtn_click",ex);
}
}
function fileManagerApp_binding_ownerSelect_itemSelect(_65){
try{
var _66=_65.getSelectedValue();
if(_66==this.OWNER_ALL){
this.fileBrowser.refresh();
}else{
this.fileBrowser.showFilesOwnedBy(_66);
}
}
catch(ex){
jsExDebug("fileManagerApp_binding_ownerSelect_itemSelect",ex);
}
}
function fileManagerApp_binding_avatarFrameUseAvatarButton_click(_67){
try{
this.SYSTEM.UserDetails.updateAvatar(this.currentOpenAvatar.fileid);
this.SYSTEM.UserDetails.commit(new this.SYSTEM.Delegate(this,this.avatarUpdateCallback));
}
catch(ex){
jsExDebug("fileManagerApp_binding_avatarFrameUseAvatarButton_click",ex);
}
}
function fileManagerApp_folderDblClickEvent(_68,_69){
try{
this.moveToBtn.show();
this.newFolderBtn.hide();
this.stateView=this.FILE_VIEW;
this.helpLabel.setText(this.openFileText);
this.cancelCurrentAction();
}
catch(ex){
jsExDebug("fileManagerApp_folderDblClickEvent",ex);
}
}
function fileManagerApp_fileDblClickEvent(_6a,_6b){
try{
var _6c=this.fileBrowser.getSelectedFile();
if(_6c){
this.openFile();
}
}
catch(ex){
jsExDebug("fileManagerApp_fileDblClickEvent",ex);
}
}
function fileManagerApp_backBtnClickEvent(_6d,_6e){
try{
this.moveToBtn.hide();
this.shareBtn.hide();
this.newFolderBtn.show();
this.stateView=this.FOLDER_VIEW;
this.helpLabel.setText(this.openFolderText);
this.cancelCurrentAction();
this.ownerLabel.hide();
this.ownerSelect.hide();
this.filterByOwnerInterfaceVisible=false;
this.showFolderName();
}
catch(ex){
jsExDebug("fileManagerApp_backBtnClickEvent",ex);
}
}
function fileManagerApp_fileSelectEvent(_6f,_70){
try{
if(this.stateShareOpen){
var _71=_70.getSelectedFile();
if(_71){
this.shareDialogue.setFile(_71);
}
}
}
catch(ex){
jsExDebug("fileManagerApp_fileSelectEvent",ex);
}
}
function fileManagerApp_fileDeselectEvent(_72,_73){
try{
if(this.stateShareOpen){
this.shareDialogue.setFile(null);
}
}
catch(ex){
jsExDebug("fileManagerApp_fileDeselectEvent",ex);
}
}
function fileManagerApp_folderLoadedEvent(){
try{
var _74=this.fileBrowser.getSelectedFolder();
if(_74){
switch(parseFloat(_74.folderId)){
case this.fileBrowser.OTHERS_FILES_ID:
this.ownerLabel.show();
this.ownerSelect.clearList();
this.ownerSelect.addItem(this.OWNER_ALL,"All","All");
this.ownerSelect.setSelectedValue(this.OWNER_ALL);
this.ownerSelect.show();
var _75=this.fileBrowser.filesOwnedBy;
for(var _76 in _75){
if(_75[_76].length>0){
this.ownerSelect.addItem(_76,_76,_76);
}
}
this.filterByOwnerInterfaceVisible=true;
break;
case this.fileBrowser.PUBLIC_FILES_ID:
break;
}
}
this.showFolderName();
}
catch(ex){
jsExDebug("fileManagerApp_folderLoadedEvent",ex);
}
}

try{
feedbackApp_t.prototype=new application_t();
feedbackApp_t.prototype.constructor=feedbackApp_t;
feedbackApp_t.prototype.feedbackApp_super=application_t.prototype.constructor;
feedbackApp_t.prototype.cleanUp=feedbackApp_cleanUp;
feedbackApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
feedbackApp_t.prototype.capture=feedbackApp_capture;
feedbackApp_t.prototype.restore=feedbackApp_restore;
feedbackApp_t.prototype._SIG_KILL=feedbackApp__SIG_KILL;
feedbackApp_t.prototype.frame__onClose=feedbackApp_frame__onClose;
feedbackApp_t.prototype.frame__onResize=feedbackApp_frame__onResize;
feedbackApp_t.prototype.binding_sendBtn_click=feedbackApp_binding_sendBtn_click;
feedbackApp_t.prototype.binding_quickHelpBtn_click=feedbackApp_binding_quickHelpBtn_click;
feedbackApp_t.prototype.sendResponse=feedbackApp_sendResponse;
feedbackApp_t.prototype.APP_ID=APP_ID_FEEDBACK;
feedbackApp_t.prototype.APP_NAME="Feedback";
feedbackApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.FEEDBACK;
feedbackApp_t.prototype.FRAME_WIDTH=500;
feedbackApp_t.prototype.FRAME_HEIGHT=400;
feedbackApp_t.prototype.FRAME_TOP=50;
feedbackApp_t.prototype.FRAME_BOTTOM=40;
feedbackApp_t.prototype.SEND_PADDING=5;
feedbackApp_t.prototype.TEXT_WIDTH_OFFSET=10;
feedbackApp_t.prototype.SERVER_ACTION_ADD=1;
}
catch(ex){
jsExDebug("feedbackApp_t.prototype",ex);
}
function feedbackApp_t(){
try{
this.feedbackApp_super();
var _1=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
this.APPLICATION.Panel.addUtility(_1);
var _2=this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN;
var _3=new this.SYSTEM.Frame.Window("frame","Feedback",this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,_2);
_3.show();
var _4=new this.SYSTEM.Widget.Label("helpLabel");
_4.setText("Type in your feedback and click \"Send\" to send it to us. Thank you, it is greatly appreciated.");
var _5=document.createElement("div");
_5.style.position="absolute";
_5.style.left=_3.leftEdgeWidth+"px";
_5.style.top=(_3.topEdgeHeight+this.FRAME_TOP)+"px";
_5.style.width=_3.getInternalWidth()+"px";
_5.style.height=(_3.getInternalHeight()-this.FRAME_TOP-this.FRAME_BOTTOM)+"px";
_5.style.overflow="auto";
var _6=document.createElement("textarea");
_6.style.position="absolute";
_6.style.width=(parseFloat(_5.style.width)-this.TEXT_WIDTH_OFFSET)+"px";
_6.style.height=(parseFloat(_5.style.height)-this.TEXT_WIDTH_OFFSET)+"px";
_6.style.border="solid 1px "+this.SYSTEM.Style.GREY_1;
_6.style.backgroundColor="#FFFFFF";
_6.style.overflow="auto";
this.SYSTEM.Event.enableTextSelect(_6);
_5.appendChild(_6);
_3.windowDiv.appendChild(_5);
var _7=new this.SYSTEM.Widget.TextButton("sendBtn",60,"Send",null,"Send Feeback");
_3.addWidget(_4,_3.leftEdgeWidth,_3.topEdgeHeight);
_3.addWidget(_7,_3.rightEdgeWidth+this.SEND_PADDING,_3.bottomEdgeHeight+this.SEND_PADDING,true,true);
this.frame=_3;
this.helpLabel=_4;
this.contentDiv=_5;
this.contentText=_6;
this.sendBtn=_7;
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("feedbackApp_t",ex);
}
}
function feedbackApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.frame=null;
me.helpLabel=null;
me.contentText=null;
me.contentDiv=null;
me.sendBtn=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("feedbackApp_cleanUp",ex);
}
}
function feedbackApp_capture(){
try{
var _9=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _a=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="cm:"+(this.frame.width/_a)+","+(this.frame.height/_9)+","+(this.frame.positionX/_a)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_9);
return this.captureString;
}
catch(ex){
jsExDebug("feedbackApp_capture",ex);
}
}
function feedbackApp_restore(_b){
try{
if(!_b){
return;
}
var _c=_b.split(":")[1].split(",");
var _d=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _e=this.SYSTEM.Environment.SCREEN_WIDTH;
var _f=parseInt(_e*parseFloat(_c[0]));
var _10=parseInt(_d*parseFloat(_c[1]));
var _11=parseInt(_e*parseFloat(_c[2]));
var top=parseInt((_d*parseFloat(_c[3]))+this.SYSTEM.Panel.getHeight());
this.frame.setDimensions(_f,_10);
this.frame.setPosition(_11,top);
}
catch(ex){
jsExDebug("feedbackApp_restore",ex);
}
}
function feedbackApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("feedbackApp__SIG_KILL",ex);
}
}
function feedbackApp_frame__onClose(_13){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("feedbackApp_frame__onClose",ex);
}
}
function feedbackApp_frame__onResize(_14){
try{
if(!this.contentText){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _17=null;
var _18=null;
if(dX||dY){
_17=_14.width+this.SYSTEM.DM.dragDistanceX;
_18=_14.height+this.SYSTEM.DM.dragDistanceY;
if(_17<=_14.minimumWidth){
_17=_14.minimumWidth;
}
if(_18<=_14.minimumHeight){
_18=_14.minimumHeight;
}
}else{
_17=_14.width;
_18=_14.height;
}
this.contentDiv.style.width=_14.getInternalWidth(_17)+"px";
this.contentDiv.style.height=(_14.getInternalHeight(_18)-this.FRAME_TOP-this.FRAME_BOTTOM)+"px";
this.contentText.style.width=(parseFloat(this.contentDiv.style.width)-this.TEXT_WIDTH_OFFSET)+"px";
this.contentText.style.height=(parseFloat(this.contentDiv.style.height)-this.TEXT_WIDTH_OFFSET)+"px";
}
catch(ex){
jsExDebug("feedbackApp_frame__onResize",ex);
}
}
function feedbackApp_binding_sendBtn_click(_19){
try{
var url="peepel_services.php?service=feedback"+"&action="+this.SERVER_ACTION_ADD+"&message="+this.contentText.value;
this.SYSTEM.Network.request(url,null,this.sendResponse,this);
this.frame.close();
}
catch(ex){
jsExDebug("feedbackApp_binding_sendBtn_click",ex);
}
}
function feedbackApp_binding_quickHelpBtn_click(){
try{
var _1b=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"feedback");
}
catch(ex){
jsExDebug("feedbackApp_binding_quickHelpBtn_click",ex);
}
}
function feedbackApp_sendResponse(xml,me,_1e){
try{
}
catch(ex){
jsExDebug("feedbackApp_sendResponse",ex);
}
}

try{
accountManagerApp_t.prototype=new application_t();
accountManagerApp_t.prototype.constructor=accountManagerApp_t;
accountManagerApp_t.prototype.accountManagerApp_super=application_t.prototype.constructor;
accountManagerApp_t.prototype.cleanUp=accountManagerApp_cleanUp;
accountManagerApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
accountManagerApp_t.prototype._SIG_KILL=accountManagerApp__SIG_KILL;
accountManagerApp_t.prototype._SIG_THEME=accountManagerApp__SIG_THEME;
accountManagerApp_t.prototype.capture=accountManagerApp_capture;
accountManagerApp_t.prototype.restore=accountManagerApp_restore;
accountManagerApp_t.prototype.frame__onClose=accountManagerApp_frame__onClose;
accountManagerApp_t.prototype.frame_keyDown=accountManagerApp_frame_keyDown;
accountManagerApp_t.prototype.frame_keyUp=accountManagerApp_frame_keyUp;
accountManagerApp_t.prototype.openIDEditFrame__onClose=accountManagerApp_openIDEditFrame__onClose;
accountManagerApp_t.prototype.binding_changePasswordBtn_click=accountManagerApp_binding_changePasswordBtn_click;
accountManagerApp_t.prototype.binding_saveBtn_click=accountManagerApp_binding_saveBtn_click;
accountManagerApp_t.prototype.binding_cancelBtn_click=accountManagerApp_binding_cancelBtn_click;
accountManagerApp_t.prototype.binding_changeAvatarBtn_click=accountManagerApp_binding_changeAvatarBtn_click;
accountManagerApp_t.prototype.binding_openIDBtn_click=accountManagerApp_binding_openIDBtn_click;
accountManagerApp_t.prototype.binding_openIDSaveBtn_click=accountManagerApp_binding_openIDSaveBtn_click;
accountManagerApp_t.prototype.binding_openIDSelect_itemSelect=accountManagerApp_binding_openIDSelect_itemSelect;
accountManagerApp_t.prototype.binding_quickHelpBtn_click=accountManagerApp_binding_quickHelpBtn_click;
accountManagerApp_t.prototype.binding_openIDDisclaimerLink_click=accountManagerApp_binding_openIDDisclaimerLink_click;
accountManagerApp_t.prototype.createFrame=accountManagerApp_createFrame;
accountManagerApp_t.prototype.showPasswordForm=accountManagerApp_showPasswordForm;
accountManagerApp_t.prototype.userDetailsRefreshCallback=accountManagerApp_userDetailsRefreshCallback;
accountManagerApp_t.prototype.changeAvatarCompleteCallback=accountManagerApp_changeAvatarCompleteCallback;
accountManagerApp_t.prototype.saveAndClose=accountManagerApp_saveAndClose;
accountManagerApp_t.prototype.save=accountManagerApp_save;
accountManagerApp_t.prototype.setUsernameImage=accountManagerApp_setUsernameImage;
accountManagerApp_t.prototype.setEmailImage=accountManagerApp_setEmailImage;
accountManagerApp_t.prototype.signUpDialogueCallback=accountManagerApp_signUpDialogueCallback;
accountManagerApp_t.prototype.showOpenIDEditFrame=accountManagerApp_showOpenIDEditFrame;
accountManagerApp_t.prototype.APP_NAME="Profile";
accountManagerApp_t.prototype.APP_ID=APP_ID_ACCOUNT_MANAGER;
accountManagerApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.ACCOUNT_MANAGER;
accountManagerApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
accountManagerApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
accountManagerApp_t.prototype.FRAME_WIDTH=500;
accountManagerApp_t.prototype.TEXT_WIDTH=310;
accountManagerApp_t.prototype.TEXT_LEFT=135;
accountManagerApp_t.prototype.RIGHT_EDGE_PAD=4;
accountManagerApp_t.prototype.ABOUT_ME_HEIGHT=38;
accountManagerApp_t.prototype.AVAILABLE_WIDTH=70;
accountManagerApp_t.prototype.AVAILABLE_HEIGHT=20;
accountManagerApp_t.prototype.AVAILABLE_IMG="img/app/app/profile/avail";
accountManagerApp_t.prototype.STATUS_VALUE_HEIGHT=32;
}
catch(ex){
jsExDebug("accountManagerApp_t.prototype",ex);
}
function accountManagerApp_t(){
try{
this.accountManagerApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.openIDEditFrame=null;
var _1=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
this.APPLICATION.Panel.addUtility(_1);
this.createFrame();
if(this.SYSTEM.UserDetails.isTempUser()){
var d=new this.SYSTEM.Dialogue.OkAlert(null,this.APP_NAME,"Please sign up to view & edit your profile.",new this.SYSTEM.Delegate(this,this.signUpDialogueCallback));
this.SYSTEM.Tooltip.hideLoading();
this.disabled=true;
}else{
this.userDetailsIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_LOAD,new this.SYSTEM.Delegate(this,this.userDetailsRefreshCallback));
this.emailOK=false;
this.usernameOK=false;
}
this.SYSTEM.UserDetails.refresh();
}
catch(ex){
jsExDebug("accountManagerApp_t",ex);
}
}
function accountManagerApp_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsIndex);
me.userDetailsIndex=null;
}
me.openIDEditFrame=null;
me.frame=null;
me.emailOK=null;
me.usernameOK=null;
me.tabGroup1=null;
me.tabGroup2=null;
me.firstName=null;
me.lastName=null;
me.emailAddress=null;
me.mobile=null;
me.dobDay=null;
me.dobMonth=null;
me.dobYear=null;
me.aboutMePublic=null;
me.aboutMeShared=null;
me.avatarImg=null;
me.avatarDialogue=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("accountManagerApp_cleanUp",ex);
}
}
function accountManagerApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("accountManagerApp__SIG_KILL",ex);
}
}
function accountManagerApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("accountManagerApp__SIG_THEME",ex);
}
}
function accountManagerApp_capture(){
try{
var _4=this.SYSTEM.Panel.getHeight();
var _5=(this.SYSTEM.Environment.SCREEN_HEIGHT-_4);
var _6=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="frame:"+(this.frame.positionX/_6)+","+((this.frame.positionY-_4)/_5);
return this.captureString;
}
catch(ex){
jsExDebug("accountManagerApp_capture",ex);
}
}
function accountManagerApp_restore(_7){
try{
if(!_7){
return;
}
var _8=this.SYSTEM.Panel.getHeight();
var _9=_7.split(":")[1].split(",");
var _a=(this.SYSTEM.Environment.SCREEN_HEIGHT-_8);
var _b=this.SYSTEM.Environment.SCREEN_WIDTH;
var _c=parseInt(_b*parseFloat(_9[0]));
var _d=parseInt((_a*parseFloat(_9[1]))+_8);
this.frame.setPosition(_c,_d);
}
catch(ex){
jsExDebug("accountManagerApp_restore",ex);
}
}
function accountManagerApp_frame__onClose(){
try{
if(this.SYSTEM.UserDetails.hasChanged()&&!this.disabled){
var d=new this.SYSTEM.Dialogue.YesNoAlert(this,"Profile","You haven't saved your profile, would you like to save before it is closed?",new this.SYSTEM.Delegate(this,this.saveAndClose));
}else{
this.cleanUp();
}
}
catch(ex){
jsExDebug("accountManagerApp_frame__onClose",ex);
}
}
function accountManagerApp_frame_keyDown(_f){
try{
if(_f.which==9){
_f.preventDefault();
}
}
catch(ex){
jsExDebug("accountManagerApp_frame_keyDown",ex);
}
}
function accountManagerApp_frame_keyUp(key){
function emailResponse(xml,me){
try{
var _13=getNodeValue(xml,"avail");
switch(_13){
case "true":
_13=true;
break;
case "false":
default:
_13=false;
}
if(_13){
me.setEmailImage(true,"Email address OK :)");
}else{
me.setEmailImage(false,"Email address taken :(");
}
}
catch(ex){
jsExDebug("accountManagerApp_frame_keyUp: emailResponse",ex);
}
}
try{
var _14=this.frame.getWidget("usernameText");
var _15=this.frame.getWidget("firstNameText");
var _16=this.frame.getWidget("lastNameText");
var _17=this.frame.getWidget("emailText");
if(_17.hasFocus()){
var _18=_17.getContent();
if(_18==this.emailAddress){
this.frame.getWidget("emailBtn").hide();
this.emailOK=true;
}else{
if(_18.match(EMAIL_REGEX)){
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action=12","peepel_email="+_18,emailResponse,this);
}else{
this.setEmailImage(false,"Not a valid email address");
}
}
}else{
if(_14.hasFocus()){
checkStringForInvalidCharacters(_14,"screen name",this);
}else{
if(_15.hasFocus()){
checkStringForInvalidCharacters(_15,"first name",this);
}else{
if(_16.hasFocus()){
checkStringForInvalidCharacters(_16,"last name",this);
}
}
}
}
}
catch(ex){
jsExDebug("accountManagerApp_frame_keyUp",ex);
}
}
function accountManagerApp_openIDEditFrame__onClose(_19){
try{
this.openIDEditFrame=null;
_19.cleanUp();
}
catch(ex){
jsExDebug("accountManagerApp_openIDEditFrame__onClose",ex);
}
}
function accountManagerApp_binding_changePasswordBtn_click(_1a){
function dialogueCallback(){
try{
this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_AUTH,null,"Launching...");
}
catch(ex){
jsExDebug("accountManagerApp_binding_changePasswordBtn_click: dialogueCallback",ex);
}
}
try{
if(this.disabled){
return;
}
if(this.SYSTEM.UserDetails.isTempUser()){
var d=new this.SYSTEM.Dialogue.OkAlert(this,this.APP_NAME,"You cannot change your password until you have signed up and given one.",new this.SYSTEM.Delegate(this,dialogueCallback),null,null,"Sign Up",60);
}else{
this.showPasswordForm();
}
}
catch(ex){
jsExDebug("accountManagerApp_binding_changePasswordBtn_click",ex);
}
}
function accountManagerApp_binding_saveBtn_click(_1c){
try{
if(this.disabled){
return;
}
this.save();
}
catch(ex){
jsExDebug("accountManagerApp_binding_saveBtn_click",ex);
}
}
function accountManagerApp_binding_cancelBtn_click(_1d){
try{
if(this.disabled){
return;
}
this.frame.close();
}
catch(ex){
jsExDebug("accountManagerApp_binding_cancelBtn_click",ex);
}
}
function accountManagerApp_binding_changeAvatarBtn_click(){
try{
if(this.avatarDialogue||this.disabled){
return;
}
this.avatarDialogue=new this.SYSTEM.Dialogue.ImageSelect(this,new this.SYSTEM.Delegate(this,this.changeAvatarCompleteCallback),true);
}
catch(ex){
jsExDebug("accountManagerApp_binding_changeAvatarBtn_click",ex);
}
}
function accountManagerApp_binding_openIDBtn_click(_1e){
try{
if(this.disabled){
return;
}
this.showOpenIDEditFrame();
}
catch(ex){
jsExDebug("accountManagerApp_binding_openIDBtn_click",ex);
}
}
function accountManagerApp_binding_openIDSaveBtn_click(_1f){
function errorCallback(){
try{
this.openIDEditFrame.close();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("accountManagerApp_binding_openIDSaveBtn_click: errorCallback",ex);
}
}
function tooltipTimeout(){
try{
this.SYSTEM.Security.simpleOpenIDAuthenticate(this.openIDEditFrame.getWidget("openIDText").getContent(),this.SYSTEM.Security.ACTION_ATTACH_OPEN_ID,new this.SYSTEM.Delegate(this,errorCallback));
}
catch(ex){
jsExDebug("accountManagerApp_binding_openIDSaveBtn_click: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Now taking you to the OpenID provider...");
}
catch(ex){
jsExDebug("accountManagerApp_binding_openIDSaveBtn_click",ex);
}
}
function accountManagerApp_binding_openIDSelect_itemSelect(_20){
function callback(_21,_22){
try{
if(_21){
this.SYSTEM.UserDetails.refresh();
}else{
jsDebug("ERROR check here");
}
}
catch(ex){
jsExDebug("accountManagerApp_binding_openIDSelect_itemSelect: callback",ex);
}
}
function dialogueCallback(_23){
try{
if(_23){
this.SYSTEM.Security.detachOpenIDFromAccount(_20.getSelectedValue(),new this.SYSTEM.Delegate(this,callback));
}
}
catch(ex){
jsExDebug("accountManagerApp_binding_openIDSelect_itemSelect: dialogueCallback",ex);
}
}
try{
var d=new this.SYSTEM.Dialogue.YesNoAlert(this,this.APP_NAME,"Remove this OpenID from your account?<br/> You will no longer be able to log in with it if you do so.",new this.SYSTEM.Delegate(this,dialogueCallback));
}
catch(ex){
jsExDebug("accountManagerApp_binding_openIDSelect_itemSelect",ex);
}
}
function accountManagerApp_binding_quickHelpBtn_click(){
try{
var _25=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"profile");
}
catch(ex){
jsExDebug("accountManagerApp_binding_quickHelpBtn_click",ex);
}
}
function accountManagerApp_binding_openIDDisclaimerLink_click(){
try{
var d=new this.SYSTEM.Dialogue.OkAlert(this,"OpenID Disclaimer",OPEN_ID_DISCLAIMER,null,500);
}
catch(ex){
jsExDebug("accountManagerApp_binding_openIDDisclaimerLink_click",ex);
}
}
function accountManagerApp_createFrame(){
try{
var wL=this.SYSTEM.Widget;
var _28=this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN;
var _29=new this.SYSTEM.Frame.Window("frame","Profile",this,this.FRAME_WIDTH,null,true,false,_28);
_29.allowWindowOverflow();
var _2a=this.SYSTEM.UserDetails.SIDE_50;
var _2b=this.SYSTEM.Dom.createImage(this.SYSTEM.UserDetails.SIDE_50_DEFAULT_AVATAR,"absolute",_2a,_2a,_29.leftEdgeWidth,_29.topEdgeHeight);
var _2c=new this.SYSTEM.Widget.TextButton("changeAvatarBtn",130,"Change Avatar");
var _2d=new wL.Label("usernameLabel","Screen name");
var _2e=new wL.Text("usernameText");
_2e.setWidth(this.TEXT_WIDTH);
var _2f=new wL.Label("firstNameLabel","First name");
var _30=new wL.Text("firstNameText");
_30.setWidth(this.TEXT_WIDTH);
var _31=new wL.Label("lastNameLabel","Last name");
var _32=new wL.Text("lastNameText");
_32.setWidth(this.TEXT_WIDTH);
var _33=new wL.Label("statusLabel","Account status");
var _34=new wL.Label("statusValueLabel","<i>-</i>");
_34.setDimensions(this.TEXT_WIDTH,this.STATUS_VALUE_HEIGHT);
_34.setColour("rgb(30,82,168)");
var _35=new wL.Label("mobileLabel","Mobile");
var _36=new wL.Text("mobileText");
_36.setWidth(this.TEXT_WIDTH);
var _37=new wL.Label("aboutMePublicLabel","About me (public)");
var _38=new wL.Text("aboutMePublicText",true);
_38.setDimensions(this.TEXT_WIDTH,this.ABOUT_ME_HEIGHT);
var _39=new wL.Label("aboutMeSharedLabel","About me (shared)");
var _3a=new wL.Text("aboutMeSharedText",true);
_3a.setDimensions(this.TEXT_WIDTH,this.ABOUT_ME_HEIGHT);
var _3b=new wL.Label("emailLabel","Email");
var _3c=new wL.Text("emailText");
_3c.setWidth(this.TEXT_WIDTH-this.AVAILABLE_WIDTH-this.pad);
var _3d=new wL.Button("emailBtn",this.AVAILABLE_IMG,button_t.prototype.ON_IMAGE,this.AVAILABLE_WIDTH,this.AVAILABLE_HEIGHT);
_3d.hide();
var _3e=new wL.Label("dobLabel","D.O.B");
var _3f=new wL.DateSelect("dateSelect");
var _40=new wL.Label("guardianLabel","Guardian permission");
var _41=new this.SYSTEM.Widget.Checkbox("guardianCheckbox");
var _42=new wL.Label("openIDLabel","OpenID");
var _43=new wL.TextButton("openIDBtn",90,"Add OpenID");
var _44=new wL.SelectList("openIDSelect");
_44.allowStartVisible();
_44.setDimensions(this.TEXT_WIDTH,this.ABOUT_ME_HEIGHT);
_44.align(_44.LEFT_ALIGN);
_44.disallowItemTextPadding();
var _45=new wL.TabGroup("tabGroup1");
_45.addTextWidget(_30);
_45.addTextWidget(_32);
_45.addTextWidget(_36);
if(this.SYSTEM.UserDetails.isEmailPassUser()){
var _46=new this.SYSTEM.Widget.TextButton("changePasswordBtn",130,"Change Password","Change Password","Change the password for your account");
}else{
var _46=new this.SYSTEM.Widget.TextButton("changePasswordBtn",130,"Set Password","Set Password","Set the password for your account");
}
var _47=new this.SYSTEM.Widget.TextButton("saveBtn",95,"Save Profile","Save Profile","Save changes to your profile");
var _48=new this.SYSTEM.Widget.TextButton("cancelBtn",60,"Cancel","Cancel","Discard changes, and close the Profile.");
_29.addWidget(_45,0,0);
var _49=_29.leftEdgeWidth+this.pad;
var _4a=_29.leftEdgeWidth+this.TEXT_LEFT;
var pad=this.pad-2;
_29.addWidget(_2c,_4a,_29.topEdgeHeight+(_2a/2)-(_2c.height/2));
_29.windowDiv.appendChild(_2b);
_29.addWidget(_2d,_49,_29.topEdgeHeight+_2a+pad);
_29.addWidget(_2e,_4a,_2d.positionY);
_29.addWidget(_2f,_49,_2e.positionY+_2e.getClientHeight()+pad);
_29.addWidget(_30,_4a,_2f.positionY);
_29.addWidget(_31,_49,_30.positionY+_30.getClientHeight()+pad);
_29.addWidget(_32,_4a,_31.positionY);
_29.addWidget(_33,_49,_32.positionY+_32.getClientHeight()+pad);
_29.addWidget(_34,_4a,_33.positionY);
_29.addWidget(_35,_49,_34.positionY+_34.getClientHeight()+pad);
_29.addWidget(_36,_4a,_35.positionY);
_29.addWidget(_37,_49,_36.positionY+_36.getClientHeight()+pad);
_29.addWidget(_38,_4a,_37.positionY);
_29.addWidget(_39,_49,_38.positionY+_38.getClientHeight()+pad);
_29.addWidget(_3a,_4a,_39.positionY);
_29.addWidget(_3b,_49,_3a.positionY+_3a.getClientHeight()+pad);
_29.addWidget(_3c,_4a,_3b.positionY);
_29.addWidget(_3d,_29.rightEdgeWidth,_3b.positionY,true);
_29.addWidget(_3e,_49,_3c.positionY+_3c.getClientHeight()+pad);
_29.addWidget(_3f,_4a,_3e.positionY);
_29.addWidget(_40,_49,_3f.positionY+_3f.daySelect.height+pad);
_29.addWidget(_41,_4a,_40.positionY);
_29.addWidget(_42,_49,_41.positionY+_41.getClientHeight()+pad);
_29.addWidget(_43,_49,_29.bottomEdgeHeight+_43.height+this.pad,false,true);
_29.addWidget(_44,_4a,_42.positionY);
_29.addWidget(_48,_29.leftEdgeWidth,_29.bottomEdgeHeight,true,true);
_29.addWidget(_47,_48.positionX+_48.width+this.pad,_29.bottomEdgeHeight,true,true);
_29.addWidget(_46,_47.positionX+_47.width+this.pad,_29.bottomEdgeHeight,true,true);
_3f.attach(_3f.parentDiv);
this.frame=_29;
this.avatarImg=_2b;
_29.setFixedDimensions(_4a+this.TEXT_WIDTH+this.pad+this.RIGHT_EDGE_PAD+_29.rightEdgeWidth,_44.positionY+_44.getClientHeight()+this.pad+_47.height+_29.bottomEdgeHeight+2);
_29.show();
}
catch(ex){
jsExDebug("accountManagerApp_createFrame",ex);
}
}
function accountManagerApp_showPasswordForm(){
try{
var d=new this.SYSTEM.Dialogue.ChangePassword(this);
}
catch(ex){
jsExDebug("accountManagerApp_showPasswordForm",ex);
}
}
function accountManagerApp_userDetailsRefreshCallback(){
try{
var _4d=this.SYSTEM.UserDetails;
this.username=_4d.userName;
this.firstName=_4d.firstName;
this.lastName=_4d.lastName;
this.emailAddress=_4d.emailAddress;
this.mobile=_4d.mobile;
this.dobDay=_4d.dobDay;
this.dobMonth=_4d.dobMonth;
this.dobYear=_4d.dobYear;
this.aboutMePublic=_4d.aboutPublic;
this.aboutMeShared=_4d.aboutShared;
this.avatarImg.src=this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_50);
this.frame.getWidget("usernameText").setContent(_4d.userName);
this.frame.getWidget("firstNameText").setContent(_4d.firstName);
this.frame.getWidget("lastNameText").setContent(_4d.lastName);
this.frame.getWidget("emailText").setContent(_4d.emailAddress);
this.frame.getWidget("emailText").show();
this.frame.getWidget("mobileText").setContent((_4d.mobile?_4d.mobile:""));
this.frame.getWidget("aboutMePublicText").setContent((_4d.aboutPublic?_4d.aboutPublic:""));
this.frame.getWidget("aboutMeSharedText").setContent((_4d.aboutShared?_4d.aboutShared:""));
this.frame.getWidget("dateSelect").setDate(_4d.dobDay,_4d.dobMonth,_4d.dobYear);
if(this.SYSTEM.UserDetails.isLegalTrackingAge()){
this.frame.getWidget("guardianCheckbox").hide();
this.frame.getWidget("guardianLabel").hide();
}else{
this.frame.getWidget("guardianCheckbox").show();
this.frame.getWidget("guardianLabel").show();
}
this.frame.getWidget("statusValueLabel").setText(_4d.statusText);
var _4e=this.frame.getWidget("openIDSelect");
_4e.clearList();
for(var i=0;i<_4d.openIDArray.length;i++){
_4e.addItem(_4d.openIDArray[i],_4d.openIDArray[i],null,"img/app/system/icons/silk/cross_off.png",null,null,16,16);
}
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("accountManagerApp_userDetailsRefreshCallback",ex);
}
}
function accountManagerApp_changeAvatarCompleteCallback(_50){
try{
if(_50){
var _51=this.SYSTEM.Filesystem.getFileFromFileId(_50);
if(_50<0||_51){
this.SYSTEM.UserDetails.updateAvatar(_50);
this.avatarImg.src=this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_50);
}
}
this.avatarDialogue=null;
}
catch(ex){
jsExDebug("accountManagerApp_changeAvatarCompleteCallback",ex);
}
}
function accountManagerApp_saveAndClose(_52){
try{
if(_52){
this.save(new this.SYSTEM.Delegate(this,this.cleanUp));
}else{
this.cleanUp();
}
}
catch(ex){
jsExDebug("accountManagerApp_saveAndClose",ex);
}
}
function accountManagerApp_setUsernameImage(_53,_54){
try{
var _55=this.frame.getWidget("usernameBtn");
if(_53){
_55.setImage(this.USERNAME_GOOD_IMG);
}else{
_55.setImage(this.USERNAME_BAD_IMG);
}
_55.allowTooltip(null,_54);
_55.show();
this.usernameOk=_53;
}
catch(ex){
jsExDebug("accountManagerApp_setUsernameImage",ex);
}
}
function accountManagerApp_setEmailImage(_56,_57){
try{
var _58=this.frame.getWidget("emailBtn");
if(_56){
_58.turnOn();
}else{
_58.turnOff();
}
_58.allowTooltip(null,_57);
_58.show();
this.emailOK=_56;
}
catch(ex){
jsExDebug("accountManagerApp_setEmailImage",ex);
}
}
function accountManagerApp_signUpDialogueCallback(){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_AUTH);
this.cleanUp();
}
catch(ex){
jsExDebug("accountManagerApp_signUpDialogueCallback",ex);
}
}
function accountManagerApp_showOpenIDEditFrame(){
try{
if(this.openIDEditFrame){
return;
}
var wL=this.SYSTEM.Widget;
var _5a=new this.SYSTEM.Frame.Window("openIDEditFrame",this.APP_NAME+" - Add an OpenID",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_5a.setPosition(this.frame.positionX+this.frame.leftEdgeWidth,this.frame.positionY+this.frame.topEdgeHeight);
var _5b=new wL.Label("openIDHelpLabel","Before signing up with your OpenID, please read our: ");
var _5c=new wL.Link("openIDDisclaimerLink","OpenID Disclaimer");
var _5d=new wL.Label("openIDLabel","OpenID");
_5d.setDimensions(60);
var _5e=new wL.Text("openIDText");
_5e.setDimensions(this.TEXT_WIDTH);
var _5f=new wL.TextButton("openIDSaveBtn",50,"Save");
_5a.addWidget(_5b,_5a.leftEdgeWidth,_5a.topEdgeHeight);
_5a.addWidget(_5c,_5b.positionX,_5b.positionY+_5b.getClientHeight()+this.pad);
_5a.addWidget(_5d,_5a.leftEdgeWidth,_5c.positionY+20+this.pad);
_5a.addWidget(_5e,_5a.leftEdgeWidth+_5d.getClientWidth()+this.pad,_5d.positionY);
_5a.addWidget(_5f,_5a.rightEdgeWidth,_5a.bottomEdgeHeight,true,true);
_5a.setFixedDimensions(_5e.positionX+_5e.width+_5a.rightEdgeWidth+2,_5d.positionY+_5e.getClientHeight()+_5f.height+_5a.bottomEdgeHeight+this.pad+2);
_5a.show();
this.openIDEditFrame=_5a;
}
catch(ex){
jsExDebug("accountManagerApp_showOpenIDEditFrame",ex);
}
}
function accountManagerApp_save(_60){
function finished(_61){
try{
this.SYSTEM.Tooltip.hideLoading();
if(_62){
this.SYSTEM.Security.upgradeToKnownEmail(this.SYSTEM.UserDetails.emailAddress,new this.SYSTEM.Delegate(this,emailUpdgradeCallback));
}else{
if(!_63){
if(_61){
this.SYSTEM.UserDetails.updateStatus(_61);
}
this.userDetailsRefreshCallback();
global_restartTimedServiceRequests();
var _64=new this.SYSTEM.Dialogue.OkAlert(this,this.APP_NAME,"Your details were saved successfully!");
if(_60){
_60.invoke();
}
}
}
}
catch(ex){
jsExDebug("accountManagerApp_save: finished",ex);
}
}
function commitCallback(_65){
try{
if(_65){
_63=false;
}
finished.call(this);
}
catch(ex){
jsExDebug("accountManagerApp_save: commitCallback",ex);
}
}
function emailUpdgradeCallback(_66){
try{
if(_66){
_62=false;
this.frame.getWidget("emailBtn").hide();
finished.call(this,_66);
}
}
catch(ex){
jsExDebug("accountManagerApp_save: emailUpdgradeCallback",ex);
}
}
function tooltipTimeout(){
try{
var _67=[];
if(_68!=this.username){
if(_68.match(INVALID_CHAR_REGEX)){
_67.push(INVALID_CHAR_STRING+" are not allowed in screen name");
}else{
if(_68.length>MAX_USERNAME_LENGTH){
_67.push("Screen name too long (max. "+MAX_USERNAME_LENGTH+")");
}else{
this.SYSTEM.UserDetails.updateUsername(_68);
this.username=_68;
}
}
}
if(_69!=this.firstName){
if(_69.match(INVALID_CHAR_REGEX)){
_67.push(INVALID_CHAR_STRING+" are not allowed in first name");
}else{
if(_69.length>MAX_FIRSTNAME_LENGTH){
_67.push("First name too long (max. "+MAX_FIRSTNAME_LENGTH+")");
}else{
this.SYSTEM.UserDetails.updateFirstName(_69);
this.firstName=_69;
}
}
}
if(_6a!=this.lastName){
if(_6a.match(INVALID_CHAR_REGEX)){
_67.push(INVALID_CHAR_STRING+" are not allowed in last name");
}else{
if(_6a.length>MAX_LASTNAME_LENGTH){
_67.push("Last name too long (max. "+MAX_LASTNAME_LENGTH+")");
}else{
this.SYSTEM.UserDetails.updateLastName(_6a);
this.lastName=_6a;
}
}
}
if(_6b!=this.mobile){
if(_6b.match(/[^\d\s]/)){
_67.push("Numbers only in mobile field");
}else{
if(_6b.length>50){
_67.push("Mobile to long (max. 50)");
}else{
this.SYSTEM.UserDetails.updateMobile(_6b);
this.mobile=_6b;
}
}
}
if(_6c!=this.aboutMePublic&&_6c.length){
if(_6c.match(INVALID_CHAR_REGEX)){
_67.push(INVALID_CHAR_STRING+" are not allowed in about me (public) text");
}else{
if(_6c.length>MAX_ABOUT_LENGTH){
_67.push("About me (public) to long (max. "+MAX_ABOUT_LENGTH+")");
}else{
this.SYSTEM.UserDetails.updatePublicAbout(_6c);
this.aboutMePublic=_6c;
}
}
}
if(_6d!=this.aboutMeShared&&_6d.length){
if(_6c.match(INVALID_CHAR_REGEX)){
_67.push(INVALID_CHAR_STRING+" are not allowed in about me (shared) text");
}else{
if(_6d.length>MAX_ABOUT_LENGTH){
_67.push("About me (shared) to long (max. "+MAX_ABOUT_LENGTH+")");
}else{
this.SYSTEM.UserDetails.updateSharedAbout(_6d);
this.aboutMeShared=_6d;
}
}
}
if(_67.length){
var d=new this.SYSTEM.Dialogue.Error(this,this.APP_NAME,"Your profile could not be saved for these reasons:<br/>"+_67.join("<br/>"));
this.SYSTEM.Tooltip.hideLoading();
}else{
this.SYSTEM.UserDetails.updateDobDay(_6f);
this.SYSTEM.UserDetails.updateDobMonth(_70);
this.SYSTEM.UserDetails.updateDobYear(_71);
this.SYSTEM.UserDetails.calculateYearsOld();
if(this.frame.getWidget("guardianCheckbox").visible){
this.SYSTEM.UserDetails.updateLegalGuardian(this.frame.getWidget("guardianCheckbox").isChecked());
}
var _72=this.frame.getWidget("emailText").getContent();
if(this.emailOK&&(_72!=this.emailAddress)){
_62=true;
this.SYSTEM.UserDetails.updateEmailAddress(_72);
this.emailAddress=_72;
}
_63=true;
global_stopTimedServiceRequests();
this.SYSTEM.UserDetails.commit(new this.SYSTEM.Delegate(this,commitCallback));
}
}
catch(ex){
jsExDebug("accountManagerApp_save: tooltipTimeout",ex);
}
}
try{
var _68=this.frame.getWidget("usernameText").getContent();
var _69=this.frame.getWidget("firstNameText").getContent();
var _6a=this.frame.getWidget("lastNameText").getContent();
var _6b=this.frame.getWidget("mobileText").getContent();
var _6f=this.frame.getWidget("dateSelect").getDay();
var _70=this.frame.getWidget("dateSelect").getMonth();
var _71=this.frame.getWidget("dateSelect").getYear();
var _6c=this.frame.getWidget("aboutMePublicText").getContent();
var _6d=this.frame.getWidget("aboutMeSharedText").getContent();
var _73=false;
var _62=false;
var _63=false;
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Saving your profile...");
}
catch(ex){
jsExDebug("accountManagerApp_save",ex);
}
}

try{
browserApp_t.prototype=new iframeApp_t();
browserApp_t.prototype.constructor=browserApp_t;
browserApp_t.prototype.cleanUp=browserApp_cleanUp;
browserApp_t.prototype.browserApp_super=iframeApp_t.prototype.constructor;
browserApp_t.prototype.iframeApp_cleanUp=iframeApp_t.prototype.cleanUp;
browserApp_t.prototype.capture=browserApp_capture;
browserApp_t.prototype.restore=browserApp_restore;
browserApp_t.prototype.goToLocation=browserApp_goToLocation;
browserApp_t.prototype.createPanel=browserApp_createPanel;
browserApp_t.prototype.iframeOnLoadEvent=browserApp_iframeOnLoadEvent;
browserApp_t.prototype.frame_keyDown=browserApp_frame_keyDown;
browserApp_t.prototype.binding_goBtn_click=browserApp_binding_goBtn_click;
browserApp_t.prototype.binding_link_click=browserApp_binding_link_click;
browserApp_t.prototype.binding_quickHelpBtn_click=browserApp_binding_quickHelpBtn_click;
browserApp_t.prototype.ICON_SRC="img/app/system/icons/apps/browser";
browserApp_t.prototype.APP_NAME="Browser";
browserApp_t.prototype.APP_ID=APP_ID_BROWSER;
browserApp_t.prototype.FRAME_WIDTH=600;
browserApp_t.prototype.FRAME_HEIGHT=400;
browserApp_t.prototype.IFRAME_TOP=0;
browserApp_t.prototype.FRAME_INIT_TITLE="Browser";
browserApp_t.prototype.IFRAME_BORDER="solid 1px #AAAAAA";
browserApp_t.prototype.IFRAME_BG_COLOUR="white";
browserApp_t.prototype.LINKS_TG_WIDTH=200;
browserApp_t.prototype.LINK_1_LEFT=4;
browserApp_t.prototype.LINK_1_TOP=4;
browserApp_t.prototype.LINK_2_LEFT=4;
browserApp_t.prototype.LINK_2_TOP=25;
browserApp_t.prototype.LINK_3_LEFT=4;
browserApp_t.prototype.LINK_3_TOP=45;
browserApp_t.prototype.LINK_4_LEFT=110;
browserApp_t.prototype.LINK_4_TOP=4;
browserApp_t.prototype.LINK_5_LEFT=110;
browserApp_t.prototype.LINK_5_TOP=25;
browserApp_t.prototype.LINK_6_LEFT=110;
browserApp_t.prototype.LINK_6_TOP=45;
browserApp_t.prototype.ADDRESS_TG_WIDTH=250;
browserApp_t.prototype.GO_WIDTH=40;
browserApp_t.prototype.ADDRESS_TEXT_WIDTH=browserApp_t.prototype.ADDRESS_TG_WIDTH-browserApp_t.prototype.GO_WIDTH-14;
browserApp_t.prototype.LABEL_LEFT=4;
browserApp_t.prototype.LABEL_TOP=4;
browserApp_t.prototype.ADDRESS_LEFT=4;
browserApp_t.prototype.ADDRESS_TOP=40;
browserApp_t.prototype.GO_LEFT=browserApp_t.prototype.ADDRESS_TG_WIDTH-browserApp_t.prototype.GO_WIDTH-4;
browserApp_t.prototype.GO_TOP=38;
}
catch(ex){
jsExDebug("browserApp_t.prototype",ex);
}
function browserApp_t(_1){
try{
if(_1[0]!=null){
this.startupLocation=_1[0];
}else{
this.startupLocation="http://en.wikipedia.org/wiki/Main_Page";
}
this.browserApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.location=null;
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("browserApp_t",ex);
}
}
function browserApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.addressLabel=null;
me.addressText=null;
me.goBtn=null;
me.frame=null;
me.iframe=null;
me.outerDiv=null;
me.location=null;
me.startupLocation=null;
me.particlsLink=null;
me.twitterLink=null;
me.startupSquadLink=null;
me.googleLink=null;
me.wikipediaLink=null;
me.abcLink=null;
me.iframeApp_cleanUp();
}
catch(ex){
jsExDebug("browserApp_cleanUp",ex);
}
}
function browserApp_capture(){
try{
var _3=this.SYSTEM.Panel.getHeight();
var _4=(this.SYSTEM.Environment.SCREEN_HEIGHT-_3);
var _5=this.SYSTEM.Environment.SCREEN_WIDTH;
var _6="";
if(this.location){
_6=this.location.replace(/(http:\/\/)/,"");
_6=_6.replace(/:/g,"__COLON__");
}
this.captureString="browser:"+(this.frame.width/_5)+","+(this.frame.height/_4)+","+(this.frame.positionX/_5)+","+((this.frame.positionY-_3)/_4)+","+_6;
return this.captureString;
}
catch(ex){
jsExDebug("browserApp_capture",ex);
}
}
function browserApp_restore(_7){
try{
if(!_7){
return;
}
var _8=this.SYSTEM.Panel.getHeight();
var _9=_7.split(":")[1].split(",");
var _a=(this.SYSTEM.Environment.SCREEN_HEIGHT-_8);
var _b=this.SYSTEM.Environment.SCREEN_WIDTH;
var _c=parseInt(_b*parseFloat(_9[0]));
var _d=parseInt(_a*parseFloat(_9[1]));
var _e=parseInt(_b*parseFloat(_9[2]));
var _f=parseInt((_a*parseFloat(_9[3]))+_8);
var _10=_9[4].replace(/__COLON__/g,":");
this.frame.setDimensions(_c,_d);
this.frame.setPosition(_e,_f);
if(this.dragDiv.parentNode==this.frame.windowDiv){
this.frame.windowDiv.removeChild(this.dragDiv);
}
this.startupLocation=_10;
}
catch(ex){
jsExDebug("browserApp_restore",ex);
}
}
function browserApp_goToLocation(_11){
try{
if(!_11){
return;
}
if(!_11.match(/^http:\/\//)){
_11="http://"+_11;
}
if(_11.match(/(^|[ \t\r\n])((ftp|http|https|gopher|mailto|news|nntp|telnet|wais|file|prospero|aim|webcal):(([A-Za-z0-9$_.+!*(),;\/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;\/?:@&~=%-]*))?([A-Za-z0-9$_+!*();\/?:~-]))/)){
this.addressText.setContent(_11);
this.location=_11;
this.iframe.contentWindow.location=_11;
}
}
catch(ex){
jsExDebug("browserApp_goToLocation",ex);
}
}
function browserApp_createPanel(){
try{
var _12=this.APPLICATION.Panel;
var _13=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
_12.addUtility(_13);
var _14=new this.SYSTEM.Widget.Link("link","Particls",170);
_14.setLocation("http://www.particls.com");
var _15=new this.SYSTEM.Widget.Link("link","StartupSquad",170);
_15.setLocation("http://www.startupsquad.com");
var _16=new this.SYSTEM.Widget.Link("link","Google",170);
_16.setLocation("http://www.google.com");
var _17=new this.SYSTEM.Widget.Link("link","Wikipedia",170);
_17.setLocation("http://en.wikipedia.org/wiki/Main_Page");
var _18=new this.SYSTEM.Widget.Link("link","ABC News",170);
_18.setLocation("http://abc.net.au/news");
var _19=new this.SYSTEM.Widget.Link("link","Twitter",170);
_19.setLocation("http://www.twitter.com");
this.particlsLink=_14;
this.twitterLink=_19;
this.startupSquadLink=_15;
this.googleLink=_16;
this.wikipediaLink=_17;
this.abcLink=_18;
var _1a=new this.SYSTEM.Widget.Label("addressLabel");
_1a.setText("Type in a URL and click 'Go' to view it in the browser.");
var _1b=new this.SYSTEM.Widget.Text("addressText");
_1b.setWidth(this.ADDRESS_TEXT_WIDTH);
var _1c=new this.SYSTEM.Widget.TextButton("goBtn",this.GO_WIDTH,"Go");
this.addressLabel=_1a;
this.addressText=_1b;
this.goBtn=_1c;
_12.addTab("Browser");
_12.addToolgroup("Address",this.ADDRESS_TG_WIDTH,"Browser");
_12.addWidget(_1a,this.LABEL_LEFT,this.LABEL_TOP,"Address");
_12.addWidget(_1b,this.ADDRESS_LEFT,this.ADDRESS_TOP,"Address");
_12.addWidget(_1c,this.GO_LEFT,this.GO_TOP,"Address");
_12.addToolgroup("Quick Links",this.LINKS_TG_WIDTH,"Browser");
_12.addWidget(_14,this.LINK_1_LEFT,this.LINK_1_TOP,"Quick Links");
_12.addWidget(_15,this.LINK_2_LEFT,this.LINK_2_TOP,"Quick Links");
_12.addWidget(_16,this.LINK_3_LEFT,this.LINK_3_TOP,"Quick Links");
_12.addWidget(_17,this.LINK_4_LEFT,this.LINK_4_TOP,"Quick Links");
_12.addWidget(_18,this.LINK_5_LEFT,this.LINK_5_TOP,"Quick Links");
_12.addWidget(_19,this.LINK_6_LEFT,this.LINK_6_TOP,"Quick Links");
}
catch(ex){
jsExDebug("browserApp_createPanel",ex);
}
}
function browserApp_getIframeLocation(){
try{
return this.iframe.contentWindow.location;
}
catch(ex){
jsExDebug("browserApp_getIframeLocation",ex);
}
}
function browserApp_iframeOnLoadEvent(_1d,me){
try{
if(me.startupLocation){
var _1f=me.startupLocation;
me.startupLocation=null;
me.goToLocation(_1f);
}
}
catch(ex){
jsExDebug("browserApp_iframeOnLoadEvent",ex);
}
}
function browserApp_frame_keyDown(key){
try{
if(key.which==13){
this.goToLocation(this.addressText.getContent());
}
}
catch(ex){
jsExDebug("browserApp_frame_keyDown",ex);
}
}
function browserApp_binding_goBtn_click(){
try{
this.goToLocation(this.addressText.getContent());
}
catch(ex){
jsExDebug("browserApp_binding_goBtn_click",ex);
}
}
function browserApp_binding_link_click(_21){
try{
this.goToLocation(_21.getLocation());
}
catch(ex){
jsExDebug("browserApp_binding_link_click",ex);
}
}
function browserApp_binding_quickHelpBtn_click(){
try{
var _22=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"browser");
}
catch(ex){
jsExDebug("browserApp_binding_quickHelpBtn_click",ex);
}
}

try{
networkApp_t.prototype=new application_t();
networkApp_t.prototype.constructor=networkApp_t;
networkApp_t.prototype.networkApp_super=application_t.prototype.constructor;
networkApp_t.prototype.cleanUp=networkApp_cleanUp;
networkApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
networkApp_t.prototype._SIG_THEME=networkApp__SIG_THEME;
networkApp_t.prototype.hide=networkApp_hide;
networkApp_t.prototype.showOfflineInfo=networkApp_showOfflineInfo;
networkApp_t.prototype.showOnlineInfo=networkApp_showOnlineInfo;
networkApp_t.prototype.networkStatusChanged=networkApp_networkStatusChanged;
networkApp_t.prototype.newBufferedRequest=networkApp_newBufferedRequest;
networkApp_t.prototype.removeBufferedRequest=networkApp_removeBufferedRequest;
networkApp_t.prototype._SIG_KILL=networkApp__SIG_KILL;
networkApp_t.prototype.binding_closeLink_click=networkApp_binding_closeLink_click;
networkApp_t.prototype.APP_ID=APP_ID_NETWORK;
networkApp_t.prototype.APP_NAME="Network";
networkApp_t.prototype.FRAME_WIDTH=350;
networkApp_t.prototype.FRAME_HEIGHT=275;
networkApp_t.prototype.ONLINE_LBL_LEFT=50;
networkApp_t.prototype.BUFFER_VALUE_LBL_LEFT=205;
networkApp_t.prototype.STATUS_LBL_TOP=0;
networkApp_t.prototype.ONLINE_LBL_TOP=0;
networkApp_t.prototype.MESSAGE_LBL_TOP=20;
networkApp_t.prototype.BUFFER_LBL_TOP=205;
networkApp_t.prototype.BUFFER_VALUE_LBL_TOP=205;
networkApp_t.prototype.CLOSE_LEFT=170;
}
catch(ex){
jsExDebug("networkApp_t.prototype",ex);
}
function networkApp_t(){
function construct(){
try{
this.networkApp_super();
this.numberOfRequests=0;
this.initialStatusChangeOccured=false;
var _1=this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN;
var _2=new this.SYSTEM.Frame.Window("frame","Network Status",this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,false,_1);
_2.setFixedDimensions(this.FRAME_WIDTH,this.FRAME_HEIGHT);
_2.hideControlGroup();
var _3=new this.SYSTEM.Widget.Label("statusLabel");
_3.setText("Status:");
_3.setBold();
var _4=new this.SYSTEM.Widget.Label("onlineLabel");
var _5=new this.SYSTEM.Widget.Label("messageLabel");
_5.setDimensions(_2.getInternalWidth(),null);
var _6=new this.SYSTEM.Widget.Label("bufferLabel");
_6.setText("Number of buffered requests:");
_6.setBold();
var _7=new this.SYSTEM.Widget.Label("bufferValueLabel");
var _8=new this.SYSTEM.Widget.Link("closeLink","Close");
var _9=_2.leftEdgeWidth;
var _a=_2.topEdgeHeight;
_2.addWidget(_3,_9,_a+this.STATUS_LBL_TOP);
_2.addWidget(_4,_9+this.ONLINE_LBL_LEFT,_a+this.ONLINE_LBL_TOP);
_2.addWidget(_5,_9,_a+this.MESSAGE_LBL_TOP);
_2.addWidget(_6,_9,_2.bottomEdgeHeight,false,true);
_2.addWidget(_7,_9+this.BUFFER_VALUE_LBL_LEFT,_2.bottomEdgeHeight,false,true);
_2.addWidget(_8,_2.rightEdgeWidth,_2.bottomEdgeHeight+15,true,true);
_2.show();
this.frame=_2;
this.statusLabel=_3;
this.onlineLabel=_4;
this.messageLabel=_5;
this.bufferLabel=_6;
this.bufferValueLabel=_7;
this.closeLink=_8;
this.networkObjectIndex=this.SYSTEM.Network.registerNetworkObject(this);
this.SYSTEM.APPLICATION_MANAGER.getTaskListWidget().removeTask(this);
}
catch(ex){
jsExDebug("networkApp_t: construct",ex);
}
}
try{
if(SYSTEM.Network.registerNetworkStatusApp(this)){
construct.call(this);
}
}
catch(ex){
jsExDebug("networkApp_t",ex);
}
}
function networkApp_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.Network){
me.SYSTEM.Network.unregisterNetworkStatusApp(me);
}
me.frame=null;
me.statusLabel=null;
me.onlineLabel=null;
me.messageLabel=null;
me.bufferLabel=null;
me.bufferValueLabel=null;
me.closeLink=null;
me.numberOfRequests=null;
me.initialStatusChangeOccured=null;
if(me.SYSTEM.Network){
me.SYSTEM.Network.unRegisterNetworkObject(me.networkObjectIndex);
me.networkObjectIndex=null;
}
me.panelParent=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("networkApp_cleanUp",ex);
}
}
function networkApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("networkApp__SIG_THEME",ex);
}
}
function networkApp_hide(){
try{
this.frame.hide(true);
this.panelParent=this.APPLICATION.Panel.parentDiv;
this.APPLICATION.Panel.detach();
}
catch(ex){
jsExDebug("networkApp_hide",ex);
}
}
function networkApp_showOfflineInfo(_c,_d){
try{
this.SYSTEM.Tooltip.forceHideLoading();
this.onlineLabel.setText("OFFLINE");
this.onlineLabel.setColour("red");
this.messageLabel.setText("<p>You went offline at "+_c+".</p>");
this.bufferValueLabel.setText(_d);
this.messageLabel.show();
this.bufferLabel.show();
this.bufferValueLabel.show();
this.frame.setFixedDimensions(this.frame.width,this.messageLabel.positionY+this.messageLabel.getClientHeight()+40+this.frame.bottomEdgeHeight);
this.numberOfRequests=_d;
}
catch(ex){
jsExDebug("networkApp_showOfflineInfo",ex);
}
}
function networkApp_showOnlineInfo(){
try{
this.onlineLabel.setText("ONLINE");
this.onlineLabel.setColour("green");
this.messageLabel.setText("");
}
catch(ex){
jsExDebug("networkApp_showOnlineInfo",ex);
}
}
function networkApp_networkStatusChanged(_e){
try{
this.frame.show(true);
this.frame.focus();
if(this.panelParent){
this.APPLICATION.Panel.attach(this.panelParent);
}
switch(_e){
case this.SYSTEM.Network.OFFLINE:
this.showOfflineInfo(new Date().toString(),0);
break;
case this.SYSTEM.Network.ONLINE:
this.showOnlineInfo();
break;
}
}
catch(ex){
jsExDebug("networkApp_networkStatusChanged",ex);
}
}
function networkApp_newBufferedRequest(){
try{
this.numberOfRequests++;
this.bufferValueLabel.setText(this.numberOfRequests);
}
catch(ex){
jsExDebug("networkApp_newBufferedRequest",ex);
}
}
function networkApp_removeBufferedRequest(){
try{
this.numberOfRequests--;
if(this.numberOfRequests==0){
this.messageLabel.setText("All buffered edits and saves have been uploaded to your Peepel account successfully.");
}
this.bufferValueLabel.setText(this.numberOfRequests);
}
catch(ex){
jsExDebug("networkApp_removeBufferedRequest",ex);
}
}
function networkApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("networkApp__SIG_KILL",ex);
}
}
function networkApp_binding_closeLink_click(){
try{
this.hide();
}
catch(ex){
jsExDebug("networkApp_binding_closeLink_click",ex);
}
}

try{
importApp_t.prototype=new iframeApp_t();
importApp_t.prototype.constructor=importApp_t;
importApp_t.prototype.cleanUp=importApp_cleanUp;
importApp_t.prototype.importApp_super=iframeApp_t.prototype.constructor;
importApp_t.prototype.iframeApp_cleanUp=iframeApp_t.prototype.cleanUp;
importApp_t.prototype.capture=importApp_capture;
importApp_t.prototype.restore=importApp_restore;
importApp_t.prototype.createPanel=importApp_createPanel;
importApp_t.prototype.launchFileManager=importApp_launchFileManager;
importApp_t.prototype.iframeOnLoadEvent=importApp_iframeOnLoadEvent;
importApp_t.prototype.ICON_SRC="img/app/system/icons/apps/import";
importApp_t.prototype.APP_NAME="File Import";
importApp_t.prototype.APP_ID=APP_ID_IMPORT;
importApp_t.prototype.FRAME_WIDTH=510;
importApp_t.prototype.FRAME_HEIGHT=410;
importApp_t.prototype.FRAME_INIT_TITLE="File Import";
importApp_t.prototype.IFRAME_TOP=0;
importApp_t.prototype.IFRAME_BORDER="none";
importApp_t.prototype.IFRAME_FRAMEBORDER="0";
importApp_t.prototype.IFRAME_BG_COLOUR="";
importApp_t.prototype.INTIAL_LOCATION="fileimport.php";
importApp_t.prototype.FRAME_RESIZE=false;
importApp_t.prototype.OUTER_DIV_TOP=50;
importApp_t.prototype.DESC_HEIGHT=300;
}
catch(ex){
jsExDebug("importApp_t.prototype",ex);
}
function importApp_t(_1){
try{
this.importApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
global_stopTimedServiceRequests();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("importApp_t",ex);
}
}
function importApp_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.Notifier){
global_restartTimedServiceRequests();
}
me.frame=null;
me.iframe=null;
me.outerDiv=null;
me.iframeApp_cleanUp();
}
catch(ex){
jsExDebug("importApp_cleanUp",ex);
}
}
function importApp_capture(){
try{
var _3=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _4=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="import:"+(this.frame.width/_4)+","+(this.frame.height/_3)+","+(this.frame.positionX/_4)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_3);
return this.captureString;
}
catch(ex){
jsExDebug("importApp_capture",ex);
}
}
function importApp_restore(_5){
try{
if(!_5){
return;
}
var _6=_5.split(":")[1].split(",");
var _7=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _8=this.SYSTEM.Environment.SCREEN_WIDTH;
var _9=parseInt(_8*parseFloat(_6[0]));
var _a=parseInt(_7*parseFloat(_6[1]));
var _b=parseInt(_8*parseFloat(_6[2]));
var _c=parseInt((_7*parseFloat(_6[3]))+this.SYSTEM.Panel.getHeight());
this.frame.setDimensions(_9,_a);
this.frame.setPosition(_b,_c);
if(this.dragDiv.parentNode==this.frame.windowDiv){
this.frame.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("importApp_restore",ex);
}
}
function importApp_createPanel(){
try{
var _d=this.APPLICATION.Panel;
}
catch(ex){
jsExDebug("importApp_createPanel",ex);
}
}
function importApp_iframeOnLoadEvent(_e,me){
try{
var _10=me.iframe.contentWindow.document.getElementById("fmLaunchLink");
if(_10){
_10.onclick=me.launchFileManager;
}
if(!me.firstLoadComplete){
me.firstLoadComplete=true;
me.iframe.contentWindow.location=me.INTIAL_LOCATION;
}
}
catch(ex){
jsExDebug("importApp_iframeOnLoadEvent",ex);
}
}
function importApp_launchFileManager(){
try{
SYSTEM.APPLICATION_MANAGER.launch(APP_ID_FILE_MANAGER,SYSTEM.Settings.get("file_import_folder"));
}
catch(ex){
jsExDebug("importApp_launchFileManager",ex);
}
}

try{
testApp_t.prototype=new application_t();
testApp_t.prototype.constructor=testApp_t;
testApp_t.prototype.testApp_super=application_t.prototype.constructor;
testApp_t.prototype.cleanUp=testApp_cleanUp;
testApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
testApp_t.prototype.createFrame=testApp_createFrame;
testApp_t.prototype._SIG_KILL=testApp__SIG_KILL;
testApp_t.prototype.frame__onClose=testApp_frame__onClose;
testApp_t.prototype.frame__onMove=testApp_frame__onMove;
testApp_t.prototype.publicFileSearchCallback=testApp_publicFileSearchCallback;
testApp_t.prototype.binding_tabList_itemSelect=testApp_binding_tabList_itemSelect;
testApp_t.prototype.binding_fileList_itemSelect=testApp_binding_fileList_itemSelect;
testApp_t.prototype.binding_publicStatusSelect_itemSelect=testApp_binding_publicStatusSelect_itemSelect;
testApp_t.prototype.binding_resultSelect_itemSelect=testApp_binding_resultSelect_itemSelect;
testApp_t.prototype.APP_ID=APP_ID_TEST;
testApp_t.prototype.APP_NAME="Test";
testApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.WELCOME;
testApp_t.prototype.FRAME_WIDTH=800;
testApp_t.prototype.FRAME_HEIGHT=400;
}
catch(ex){
jsExDebug("testApp_t.prototype",ex);
}
function testApp_t(_1){
try{
this.testApp_super();
this.createFrame();
this.SYSTEM.Tooltip.hideLoading();
this.publicFileSearchDelegate=new this.SYSTEM.Delegate(this,this.publicFileSearchCallback);
}
catch(ex){
jsExDebug("testApp_t",ex);
}
}
function testApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.frame=null;
me.publicFilesContainer=null;
me.widgetContainer=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("testApp_cleanUp",ex);
}
}
var s=null;
function testApp_createFrame(){
try{
var _3=new this.SYSTEM.Frame.Window("frame",this.APP_NAME,this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_3.setFixedDimensions(this.FRAME_WIDTH,this.FRAME_HEIGHT);
var w=this.SYSTEM.Widget;
var _5=[];
_5["Blue Care Location"]=[];
_5["Blue Care Location"]["Brisbane"]=[];
_5["Blue Care Location"]["Brisbane"]["Community Care"]=[];
_5["Blue Care Location"]["Brisbane"]["Community Care"]["..."]=[];
_5["Blue Care Location"]["Brisbane"]["Administration"]=[];
_5["Blue Care Location"]["Brisbane"]["Administration"]["..."]=[];
_5["Blue Care Location"]["Brisbane"]["Nursing Home"]=[];
_5["Blue Care Location"]["Brisbane"]["Nursing Home"]["..."]=[];
_5["Blue Care Location"]["Gold Coast"]=[];
_5["Blue Care Location"]["Gold Coast"]["Option1"]=[];
_5["Blue Care Location"]["Gold Coast"]["Option2"]=[];
_5["Blue Care Location"]["Gold Coast"]["Option3"]=[];
_5["Blue Care Location"]["Sunshine Coast"]=[];
_5["Blue Care Location"]["Sunshine Coast"]["Travel Agent"]=[];
_5["Blue Care Location"]["Sunshine Coast"]["Travel Agent"]["..."]=[];
_5["Blue Care Type"]=[];
_5["Blue Care Type"]["Aged Care"]=[];
_5["Blue Care Type"]["Aged Care"]["..."]=[];
_5["Blue Care Type"]["Community Care"]=[];
_5["Blue Care Type"]["Community Care"]["Brisbane"]=[];
_5["Blue Care Type"]["Community Care"]["Brisbane"]["..."]=[];
_5["Blue Care Type"]["Community Care"]["Gold Coast"]=[];
_5["Blue Care Type"]["Community Care"]["Gold Coast"]["Option1"]=[];
_5["Blue Care Type"]["Community Care"]["Gold Coast"]["Option2"]=[];
_5["Blue Care Type"]["Community Care"]["Gold Coast"]["Option3"]=[];
_5["Blue Care Type"]["Community Care"]["Sunshine Coast"]=[];
_5["Blue Care Type"]["Community Care"]["Sunshine Coast"]["..."]=[];
_5["Blue Care Type"]["Administration"]=[];
_5["Blue Care Type"]["Administration"]["Head Office"]=[];
_5["Blue Care Type"]["Administration"]["Head Office"]["..."]=[];
_5["Blue Care Type"]["Administration"]["Sunshine Coast"]=[];
_5["Blue Care Type"]["Administration"]["Sunshine Coast"]["..."]=[];
var _6=new basicTreeView_t("tree",12,true);
_6.setDimensions(250,500);
function addToTree(_7,_8,_9){
var _a=0;
for(var _b in _9){
_7.addItem(_8,_a,_b,1,(_8==null));
_a++;
addToTree(_7,_b,_9[_b]);
}
}
addToTree(_6,null,_5);
_6.draw();
_3.addWidget(_6,_3.leftEdgeWidth,_3.topEdgeHeight);
var _c=new basicTreeView_t("fileTree",12,true);
_c.setDimensions(500,500);
var fs=this.SYSTEM.Filesystem.folders;
var _e=[];
for(var _f in fs){
var _10=fs[_f].folderName;
_e[_10]=[];
for(var _11 in fs[_f].contents){
_e[_10][fs[_f].contents[_11].fileName]=[];
}
}
addToTree(_c,null,_e);
_c.draw();
_3.addWidget(_c,_3.leftEdgeWidth+250,_3.topEdgeHeight);
_3.show();
this.frame=_3;
}
catch(ex){
jsExDebug("testApp_createFrame",ex);
}
}
function testApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("testApp__SIG_KILL",ex);
}
}
function testApp_frame__onClose(_12){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("testApp_frame__onClose",ex);
}
}
function testApp_frame__onMove(_13){
try{
}
catch(ex){
jsExDebug("testApp_frame__onMove",ex);
}
}
function testApp_frame_keyUp(_14){
try{
var _15=this.frame.getWidget("searchText");
if(_15.hasFocus()){
this.SYSTEM.Filesystem.findPublicFiles(_15.getContent().toLowerCase(),this.publicFileSearchDelegate);
}
}
catch(ex){
jsExDebug("testApp_frame_keyUp",ex);
}
}
function testApp_publicFileSearchCallback(_16){
try{
if(_16){
this.frame.getWidget("resultSelect").clearList();
for(var i=0;i<_16.length;i++){
this.frame.getWidget("resultSelect").addItem(_16[i],"["+_16[i].fileType+"]"+_16[i].fileId+": "+_16[i].fileName+" ("+_16[i].fileAccess+")");
}
}
}
catch(ex){
jsExDebug("testApp_publicFileSearchCallback",ex);
}
}
function testApp_binding_tabList_itemSelect(_18){
try{
var _19=_18.getSelectedTabData();
switch(_19){
case "Public files":
this.publicFilesContainer.style.display="block";
this.widgetContainer.style.display="none";
break;
case "Widgets":
this.publicFilesContainer.style.display="none";
this.widgetContainer.style.display="block";
break;
}
}
catch(ex){
jsExDebug("testApp_binding_tabList_itemSelect",ex);
}
}
function testApp_binding_fileList_itemSelect(_1a){
try{
var _1b=_1a.getSelectedValue();
var _1c=this.SYSTEM.Filesystem.getPublicAccess(_1b);
this.frame.getWidget("fileIdLabel").setText("File ID: "+_1b);
this.frame.getWidget("publicStatusSelect").setSelectedValue(_1c);
}
catch(ex){
jsExDebug("testApp_binding_fileList_itemSelect",ex);
}
}
function testApp_binding_publicStatusSelect_itemSelect(_1d){
function callback(){
try{
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("testApp_binding_publicStatusSelect_itemSelect",ex);
}
}
function tooltipTimeout(){
try{
var _1e=this.frame.getWidget("fileList").getSelectedValue();
if(_1e&&_1f!=null){
this.SYSTEM.Filesystem.setPublicAccess(_1e,_1f,new this.SYSTEM.Delegate(this,callback));
}
}
catch(ex){
jsExDebug("testApp_binding_publicStatusSelect_itemSelect: tooltipTimeout",ex);
}
}
try{
var _1f=_1d.getSelectedValue();
if(_1f!=null){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Setting public access...");
}
}
catch(ex){
jsExDebug("testApp_binding_publicStatusSelect_itemSelect",ex);
}
}
function testApp_binding_resultSelect_itemSelect(_20){
try{
var _21=_20.getSelectedValue();
if(_21&&_21.id){
switch(parseInt(_21.type)){
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET,_21.id,null,true);
break;
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WRITER,_21.id,null,true);
break;
case this.SYSTEM.Filesystem.File.TYPE_IMAGE:
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_MEDIA_VIEW,null,_21.id);
break;
}
}
}
catch(ex){
jsExDebug("testApp_binding_resultSelect_itemSelect",ex);
}
}

try{
blogApp_t.prototype=new iframeApp_t();
blogApp_t.prototype.constructor=blogApp_t;
blogApp_t.prototype.cleanUp=blogApp_cleanUp;
blogApp_t.prototype.blogApp_super=iframeApp_t.prototype.constructor;
blogApp_t.prototype.iframeApp_cleanUp=iframeApp_t.prototype.cleanUp;
blogApp_t.prototype.capture=blogApp_capture;
blogApp_t.prototype.restore=blogApp_restore;
blogApp_t.prototype.createPanel=blogApp_createPanel;
blogApp_t.prototype.iframeOnLoadEvent=blogApp_iframeOnLoadEvent;
blogApp_t.prototype.binding_quickHelpBtn_click=blogApp_binding_quickHelpBtn_click;
blogApp_t.prototype.ICON_SRC="img/app/system/icons/apps/blog";
blogApp_t.prototype.APP_NAME="Blog";
blogApp_t.prototype.APP_ID=APP_ID_BLOG;
blogApp_t.prototype.FRAME_WIDTH=485;
blogApp_t.prototype.FRAME_HEIGHT=395;
blogApp_t.prototype.FRAME_INIT_TITLE="Peepel Blog";
blogApp_t.prototype.IFRAME_TOP=0;
blogApp_t.prototype.IFRAME_BORDER="none";
blogApp_t.prototype.IFRAME_FRAMEBORDER="0";
blogApp_t.prototype.IFRAME_BG_COLOUR="";
blogApp_t.prototype.INTIAL_LOCATION="http://blog.peepel.com";
blogApp_t.prototype.FRAME_RESIZE=true;
blogApp_t.prototype.IFRAME_WIDTH=blogApp_t.prototype.FRAME_WIDTH-30;
blogApp_t.prototype.IFRAME_HEIGHT=85;
blogApp_t.prototype.OUTER_DIV_TOP=50;
blogApp_t.prototype.DESC_HEIGHT=300;
}
catch(ex){
jsExDebug("blogApp_t.prototype",ex);
}
function blogApp_t(_1){
try{
this.blogApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("blogApp_t",ex);
}
}
function blogApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.frame=null;
me.iframe=null;
me.outerDiv=null;
me.iframeApp_cleanUp();
}
catch(ex){
jsExDebug("blogApp_cleanUp",ex);
}
}
function blogApp_capture(){
try{
var _3=this.SYSTEM.Panel.getHeight();
var _4=(this.SYSTEM.Environment.SCREEN_HEIGHT-_3);
var _5=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="import:"+(this.frame.width/_5)+","+(this.frame.height/_4)+","+(this.frame.positionX/_5)+","+((this.frame.positionY-_3)/_4);
return this.captureString;
}
catch(ex){
jsExDebug("blogApp_capture",ex);
}
}
function blogApp_restore(_6){
try{
if(!_6){
return;
}
var _7=this.SYSTEM.Panel.getHeight();
var _8=_6.split(":")[1].split(",");
var _9=(this.SYSTEM.Environment.SCREEN_HEIGHT-_7);
var _a=this.SYSTEM.Environment.SCREEN_WIDTH;
var _b=parseInt(_a*parseFloat(_8[0]));
var _c=parseInt(_9*parseFloat(_8[1]));
var _d=parseInt(_a*parseFloat(_8[2]));
var _e=parseInt((_9*parseFloat(_8[3]))+_7);
this.frame.setDimensions(_b,_c);
this.frame.setPosition(_d,_e);
if(this.dragDiv.parentNode==this.frame.windowDiv){
this.frame.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("blogApp_restore",ex);
}
}
function blogApp_createPanel(){
try{
var _f=this.APPLICATION.Panel;
var _10=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
_f.addUtility(_10);
}
catch(ex){
jsExDebug("blogApp_createPanel",ex);
}
}
function blogApp_iframeOnLoadEvent(_11,me){
try{
if(!me.firstLoadComplete){
me.firstLoadComplete=true;
me.iframe.contentWindow.location=me.INTIAL_LOCATION;
}
}
catch(ex){
jsExDebug("blogApp_iframeOnLoadEvent",ex);
}
}
function blogApp_binding_quickHelpBtn_click(){
try{
var _13=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"blog");
}
catch(ex){
jsExDebug("blogApp_binding_quickHelpBtn_click",ex);
}
}

try{
taskManagerApp_t.prototype=new application_t();
taskManagerApp_t.prototype.constructor=taskManagerApp_t;
taskManagerApp_t.prototype.cleanUp=taskManagerApp_cleanUp;
taskManagerApp_t.prototype.taskManagerApp_super=application_t.prototype.constructor;
taskManagerApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
taskManagerApp_t.prototype._SIG_THEME=taskManagerApp__SIG_THEME;
taskManagerApp_t.prototype.fillTaskList=taskManagerApp_fillTaskList;
taskManagerApp_t.prototype.createFrame=taskManagerApp_createFrame;
taskManagerApp_t.prototype.createPanel=taskManagerApp_createPanel;
taskManagerApp_t.prototype.frame__onClose=taskManagerApp_frame__onClose;
taskManagerApp_t.prototype.frame__onResize=taskManagerApp_frame__onResize;
taskManagerApp_t.prototype.frame__onFocus=taskManagerApp_frame__onFocus;
taskManagerApp_t.prototype.binding_bringAppToFrontBtn_click=taskManagerApp_binding_bringAppToFrontBtn_click;
taskManagerApp_t.prototype.binding_closeAppBtn_click=taskManagerApp_binding_closeAppBtn_click;
taskManagerApp_t.prototype.APP_NAME="Task Manager";
taskManagerApp_t.prototype.APP_ID=APP_ID_TASK_MANAGER;
taskManagerApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.WELCOME;
}
catch(ex){
jsExDebug("taskManagerApp_t.prototype",ex);
}
function taskManagerApp_t(){
try{
this.taskManagerApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.createPanel();
this.createFrame();
this.SYSTEM.APPLICATION_MANAGER.registerTaskManagerApp(this);
this.fillTaskList();
}
catch(ex){
jsExDebug("taskManagerApp_t",ex);
}
}
function taskManagerApp_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.SYSTEM.APPLICATION_MANAGER){
me.SYSTEM.APPLICATION_MANAGER.unregisterTaskManagerApp(me);
}
me.frame=null;
me.taskSelect=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("taskManagerApp_t",ex);
}
}
function taskManagerApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("taskManagerApp__SIG_THEME",ex);
}
}
function taskManagerApp_fillTaskList(){
try{
var _2=this.SYSTEM.APPLICATION_MANAGER.runningApps;
this.taskSelect.clearList();
for(var _3 in _2){
if(!_2[_3].isSystemApp&&_2[_3]!=this&&_2[_3]!=this.SYSTEM.Network.networkStatusApp){
this.taskSelect.addItem(_3,_2[_3].APP_NAME);
}
}
}
catch(ex){
jsExDebug("taskManagerApp_fillTaskList",ex);
}
}
function taskManagerApp_createFrame(){
try{
var _4=new this.SYSTEM.Frame.Window("frame",this.APP_NAME,this,null,null,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
var _5=new this.SYSTEM.Widget.SelectList("taskSelect");
_5.allowStartVisible();
_5.align(_5.LEFT_ALIGN);
_5.allowSelect(_5.MULTIPLE_SELECT);
_5.setDimensions(_4.getInternalWidth(),_4.getInternalHeight()-this.SYSTEM.Style.TEXT_BTN_HEIGHT-this.pad);
_5.disallowItemTextPadding();
var _6=new this.SYSTEM.Widget.TextButton("bringAppToFrontBtn",(_5.width/2)-10,"Bring to Front");
var _7=new this.SYSTEM.Widget.TextButton("closeAppBtn",(_5.width/2)-10,"Close Task");
_4.addWidget(_5,_4.leftEdgeWidth,_4.topEdgeHeight);
_4.addWidget(_6,_4.leftEdgeWidth,_4.bottomEdgeHeight,false,true);
_4.addWidget(_7,_4.leftEdgeWidth+_6.width+this.pad,_4.bottomEdgeHeight,false,true);
_4.show();
this.frame=_4;
this.taskSelect=_5;
}
catch(ex){
jsExDebug("taskManagerApp_createFrame",ex);
}
}
function taskManagerApp_createPanel(){
try{
}
catch(ex){
jsExDebug("taskManagerApp_createPanel",ex);
}
}
function taskManagerApp_frame__onClose(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("taskManagerApp_frame__onClose",ex);
}
}
function taskManagerApp_frame__onResize(_8){
try{
if(!this.frame){
return;
}
var _9;
var _a;
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
if(dX||dY){
_9=_8.width+this.SYSTEM.DM.dragDistanceX;
_a=_8.height+this.SYSTEM.DM.dragDistanceY;
var _d=_8.minimumWidth;
var _e=_8.minimumHeight;
_9=(_9<_d?_d:_9);
_a=(_a<_e?_e:_a);
var _f=_8.maximumWidth;
var _10=_8.maximumHeight;
_9=(_9>_f?_f:_9);
_a=(_a>_10?_10:_a);
}else{
_9=_8.width;
_a=_8.height;
}
this.taskSelect.setDimensions(_8.getInternalWidth(_9),_8.getInternalHeight(_a)-textButton_t.prototype.DEFAULT_HEIGHT-10);
}
catch(ex){
jsExDebug("taskManagerApp_frame__onResize",ex);
}
}
function taskManagerApp_frame__onFocus(){
try{
if(!this.taskSelect){
return;
}
this.fillTaskList();
}
catch(ex){
jsExDebug("taskManagerApp_frame__onFocus",ex);
}
}
function taskManagerApp_binding_bringAppToFrontBtn_click(){
try{
var _11=this.taskSelect.getSelectedValues();
if(_11.length){
for(var i=0;i<_11.length;i++){
this.SYSTEM.WINDOW_MANAGER.focus(this.SYSTEM.APPLICATION_MANAGER.runningApps[_11[i]].getRunId());
}
this.fillTaskList();
}
}
catch(ex){
jsExDebug("taskManagerApp_binding_bringAppToFrontBtn_click",ex);
}
}
function taskManagerApp_binding_closeAppBtn_click(){
try{
var _13=this.taskSelect.getSelectedValues();
if(_13.length){
for(var i=0;i<_13.length;i++){
this.SYSTEM.APPLICATION_MANAGER.kill(_13[i]);
}
this.fillTaskList();
}
}
catch(ex){
jsExDebug("taskManagerApp_binding_closeAppBtn_click",ex);
}
}

try{
settingsApp_t.prototype=new application_t();
settingsApp_t.prototype.constructor=settingsApp_t;
settingsApp_t.prototype.cleanUp=settingsApp_cleanUp;
settingsApp_t.prototype.settingsApp_super=application_t.prototype.constructor;
settingsApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
settingsApp_t.prototype._SIG_THEME=settingsApp__SIG_THEME;
settingsApp_t.prototype.capture=settingsApp_capture;
settingsApp_t.prototype.restore=settingsApp_restore;
settingsApp_t.prototype.frame__onClose=settingsApp_frame__onClose;
settingsApp_t.prototype.createFrame=settingsApp_createFrame;
settingsApp_t.prototype.createMainInterface=settingsApp_createMainInterface;
settingsApp_t.prototype.showInterface=settingsApp_showInterface;
settingsApp_t.prototype.createTrackingInterface=settingsApp_createTrackingInterface;
settingsApp_t.prototype.createAppearanceInterface=settingsApp_createAppearanceInterface;
settingsApp_t.prototype.createOtherInterface=settingsApp_createOtherInterface;
settingsApp_t.prototype.createNotificationsInterface=settingsApp_createNotificationsInterface;
settingsApp_t.prototype.createOfficeInterface=settingsApp_createOfficeInterface;
settingsApp_t.prototype.addSetting=settingsApp_addSetting;
settingsApp_t.prototype.updateWidgetValues=settingsApp_updateWidgetValues;
settingsApp_t.prototype.eventHandler=settingsApp_eventHandler;
settingsApp_t.prototype.binding_interfaceBtn_click=settingsApp_binding_interfaceBtn_click;
settingsApp_t.prototype.binding_titleMainLink_click=settingsApp_binding_titleMainLink_click;
settingsApp_t.prototype.binding_quickHelpBtn_click=settingsApp_binding_quickHelpBtn_click;
settingsApp_t.prototype.binding_exitMessageCheckbox_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_browserCompatibilityMsgCheckbox_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_mapObjectLabelsCheckbox_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_animateLauncherCheckbox_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_zoomHelpCheckbox_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_defaultTrackSelect_itemSelect=settingsApp_eventHandler;
settingsApp_t.prototype.binding_mapAnimateZoomCheck_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_timelineZoomHelpCheck_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_publicAccuracySelect_itemSelect=settingsApp_binding_publicAccuracySelect_itemSelect;
settingsApp_t.prototype.binding_panOnScrollZoomCheck_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_defaultStyleSelect_itemSelect=settingsApp_eventHandler;
settingsApp_t.prototype.binding_locationDecayCheck_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_locationDecayLink_click=settingsApp_binding_locationDecayLink_click;
settingsApp_t.prototype.binding_publicAccuracyLink_click=settingsApp_binding_publicAccuracyLink_click;
settingsApp_t.prototype.binding_centreMarkCheck_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_fontSizeSelect_itemSelect=settingsApp_eventHandler;
settingsApp_t.prototype.binding_fontFaceSelect_itemSelect=settingsApp_eventHandler;
settingsApp_t.prototype.binding_desktopImageBtn_click=settingsApp_binding_desktopImageBtn_click;
settingsApp_t.prototype.binding_desktopImageCheckbox_valueChange=settingsApp_binding_desktopImageCheckbox_valueChange;
settingsApp_t.prototype.binding_desktopStretchCheckbox_valueChange=settingsApp_eventHandler;
settingsApp_t.prototype.binding_desktopColourCheckbox_valueChange=settingsApp_binding_desktopColourCheckbox_valueChange;
settingsApp_t.prototype.binding_desktopColourText_focus=settingsApp_binding_desktopColourText_focus;
settingsApp_t.prototype.binding_themeNameSelect_itemSelect=settingsApp_binding_themeNameSelect_itemSelect;
settingsApp_t.prototype.binding_themePreviewLink_click=settingsApp_binding_themePreviewLink_click;
settingsApp_t.prototype.binding_notificationTypeSelect_itemSelect=settingsApp_binding_notificationTypeSelect_itemSelect;
settingsApp_t.prototype.binding_notificationContactsSelect_itemSelect=settingsApp_binding_notificationSelect_itemSelect;
settingsApp_t.prototype.binding_notificationContactsSelect_itemEnter=settingsApp_binding_notificationSelect_itemEnter;
settingsApp_t.prototype.binding_notificationFilesSelect_itemSelect=settingsApp_binding_notificationSelect_itemSelect;
settingsApp_t.prototype.binding_notificationFilesSelect_itemEnter=settingsApp_binding_notificationSelect_itemEnter;
settingsApp_t.prototype.binding_notificationTrackingSelect_itemSelect=settingsApp_binding_notificationSelect_itemSelect;
settingsApp_t.prototype.binding_notificationTrackingSelect_itemEnter=settingsApp_binding_notificationSelect_itemEnter;
settingsApp_t.prototype.binding_notificationTabList_itemSelect=settingsApp_binding_notificationTabList_itemSelect;
settingsApp_t.prototype.APP_NAME="Settings";
settingsApp_t.prototype.APP_ID=APP_ID_SETTINGS;
settingsApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.SETTINGS;
settingsApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
settingsApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
settingsApp_t.prototype.FRAME_WIDTH=500;
settingsApp_t.prototype.FRAME_HEIGHT=400;
settingsApp_t.prototype.INTERFACE_ICON_SIDE=widgetTask_t.prototype.BIG_WIDTH;
settingsApp_t.prototype.SETTING_LABEL_WIDTH=settingsApp_t.prototype.FRAME_WIDTH-200;
settingsApp_t.prototype.SELECT_WIDGET_WIDTH=90;
settingsApp_t.prototype.TITLE_HEIGHT=38;
settingsApp_t.prototype.TITLE_ICON_WIDTH=widgetTask_t.prototype.SMALL_WIDTH;
settingsApp_t.prototype.TITLE_ICON_HEIGHT=widgetTask_t.prototype.SMALL_HEIGHT;
settingsApp_t.prototype.TITLE_ICON_LEFT=5;
settingsApp_t.prototype.TITLE_ICON_TOP=settingsApp_t.prototype.TITLE_HEIGHT-settingsApp_t.prototype.TITLE_ICON_HEIGHT-5;
settingsApp_t.prototype.TITLE_LBL_TOP=settingsApp_t.prototype.TITLE_HEIGHT-20;
settingsApp_t.prototype.TITLE_LINK_RIGHT=10;
settingsApp_t.prototype.INTERFACE_HEIGHT=355;
settingsApp_t.prototype.TRACKING="Tracking";
settingsApp_t.prototype.APPEARANCE="Appearance";
settingsApp_t.prototype.OTHER="Other";
settingsApp_t.prototype.NOTIFICATIONS="Notifications";
settingsApp_t.prototype.OFFICE="Office";
settingsApp_t.prototype.TEXT_SETTING=1;
settingsApp_t.prototype.SELECT_SETTING=2;
settingsApp_t.prototype.RADIO_SETTING=3;
settingsApp_t.prototype.CHECKBOX_SETTING=4;
settingsApp_t.prototype.CHECKBOX_OFF_BG_COLOUR="";
settingsApp_t.prototype.CHECKBOX_ON_BG_COLOUR="rgb(80,80,80)";
settingsApp_t.prototype.NOTIFICATION_TYPE_WIDTH=200;
settingsApp_t.prototype.NOTIFICATION_TYPE_AREA_HEIGHT=100;
settingsApp_t.prototype.NOTIFICATION_TYPE_ALL_TEXT="All - All methods of notifications.";
settingsApp_t.prototype.NOTIFICATION_TYPE_INTERNAL_TEXT="Internal - The notifier widget displays a message for each notification.";
settingsApp_t.prototype.NOTIFICATION_TYPE_EXTERNAL_TEXT="External - An rss item is made for each notification.";
settingsApp_t.prototype.NOTIFICATION_TYPE_EMAIL_TEXT="Email - An email is sent for each notification.";
}
catch(ex){
jsExDebug("settingsApp_t.prototype",ex);
}
function settingsApp_t(_1){
try{
this.settingsApp_super();
this.wLib=this.SYSTEM.Widget;
this.interfaces=[];
this.interfaces[this.TRACKING]={container:null,created:false,buttonSrc:"img/app/app/settings/maps",iconSrc:"img/app/app/settings/track_small_off.png"};
this.interfaces[this.APPEARANCE]={container:null,created:false,buttonSrc:"img/app/app/settings/appearance",iconSrc:"img/app/app/settings/appear_small_off.png"};
this.interfaces[this.NOTIFICATIONS]={container:null,created:false,buttonSrc:"img/app/app/settings/notify",iconSrc:"img/app/app/settings/notify_small_off.png"};
this.interfaces[this.OTHER]={container:null,created:false,buttonSrc:"img/app/app/settings/other",iconSrc:"img/app/app/settings/other_small_off.png"};
this.interfaces[this.OFFICE]={container:null,created:false,buttonSrc:"img/app/app/settings/office",iconSrc:"img/app/app/settings/office_small_off.png"};
this.settingData=[];
this.currentInterface=null;
var _2=new this.wLib.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the Peepel WebMap.");
this.APPLICATION.Panel.addUtility(_2);
this.createFrame();
this.SYSTEM.Tooltip.hideLoading();
if(_1[0]){
this.showInterface(_1[0]);
this.frame.getWidget("titleMainLink").detach();
}
}
catch(ex){
jsExDebug("settingsApp_t",ex);
}
}
function settingsApp_cleanUp(me){
try{
if(!me){
me=this;
}
for(var _4 in me.interfaces){
me.interfaces[_4].container=null;
me.interfaces[_4].created=null;
me.interfaces[_4]=null;
}
me.interfaces=null;
for(var _5 in me.settingData){
me.settingData[_5].label=null;
me.settingData[_5].widget=null;
me.settingData[_5].type=null;
me.settingData[_5].flag=null;
me.settingData[_5]=null;
}
me.settingData=null;
me.frame=null;
me.titleIcon=null;
me.titleContainer=null;
me.interfaceContainer=null;
me.buttonContainer=null;
me.currentInterface=null;
me.colourPickDialogue=null;
if(me.notificationContainers){
for(var i=0;i<me.notificationContainers.length;i++){
me.notificationContainers[i]=null;
}
me.notificationContainers=null;
}
if(me.notificationData){
me.notificationData=null;
}
me.wLib=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("settingsApp_cleanUp",ex);
}
}
function settingsApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("settingsApp__SIG_THEME",ex);
}
}
function settingsApp_capture(){
try{
var _7=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _8=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="frame:"+(this.frame.width/_8)+","+(this.frame.height/_7)+","+(this.frame.positionX/_8)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_7);
return this.captureString;
}
catch(ex){
jsExDebug("settingsApp_capture",ex);
}
}
function settingsApp_restore(_9){
try{
if(!_9){
return;
}
var _a=_9.split(":")[1].split(",");
var _b=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _c=this.SYSTEM.Environment.SCREEN_WIDTH;
var _d=parseInt(_c*parseFloat(_a[0]));
var _e=parseInt(_b*parseFloat(_a[1]));
var _f=parseInt(_c*parseFloat(_a[2]));
var top=parseInt((_b*parseFloat(_a[3]))+this.SYSTEM.Panel.getHeight());
this.frame.setDimensions(_d,_e);
this.frame.setPosition(_f,top);
}
catch(ex){
jsExDebug("settingsApp_restore",ex);
}
}
function settingsApp_frame__onClose(_11){
function commitCallback(){
try{
this.SYSTEM.Tooltip.hideLoading();
if(_12){
this.SYSTEM.APPLICATION_MANAGER.notifyThemeChange();
}else{
this.cleanUp();
}
}
catch(ex){
jsExDebug("settingsApp_frame__onClose: commitCallback",ex);
}
}
function tooltipTimeout(){
try{
this.SYSTEM.Settings.commit(new this.SYSTEM.Delegate(this,commitCallback));
}
catch(ex){
jsExDebug("settingsApp_frame__onClose: tooltipTimeout",ex);
}
}
try{
var _12=this.SYSTEM.Settings.settings["theme_name"].dirty;
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Saving your settings...");
}
catch(ex){
jsExDebug("settingsApp_frame__onClose",ex);
}
}
function settingsApp_createFrame(){
try{
var _13=new this.SYSTEM.Frame.Window("frame",this.APP_NAME,this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_13.setFixedDimensions(this.FRAME_WIDTH,this.FRAME_HEIGHT);
_13.allowWindowOverflow();
_13.show();
this.frame=_13;
this.createMainInterface();
}
catch(ex){
jsExDebug("settingsApp_createFrame",ex);
}
}
function settingsApp_createMainInterface(){
try{
var _14=this.wLib;
var _15=this.SYSTEM.Dom.createDiv("absolute",this.frame.getInternalWidth(),this.frame.getInternalHeight(),this.frame.leftEdgeWidth,this.frame.topEdgeHeight);
var btn=null;
var _17=null;
this.frame.windowDiv.appendChild(_15);
var _18=new _14.Label("infoLabel","Choose a settings category to edit the settings within.");
_18.setDimensions(this.frame.getInternalWidth(),40);
_18.setAlignment("center");
this.frame.addWidgetToDom(_18,_15,this.pad,this.pad);
var _19=0;
for(var _1a in this.interfaces){
_19++;
}
var _1b=4;
var _1c=(this.frame.getInternalWidth()-(((_1b*1.5)-0.5)*this.INTERFACE_ICON_SIDE))/2;
var _1d=_1c;
var top=_18.positionY+_18.getClientHeight();
_19=0;
for(var _1a in this.interfaces){
btn=new _14.Button("interfaceBtn",this.interfaces[_1a].buttonSrc,null,this.INTERFACE_ICON_SIDE,this.INTERFACE_ICON_SIDE);
btn.setValue(_1a);
_17=new _14.Label("interfaceLabel",_1a);
_17.setDimensions(this.INTERFACE_ICON_SIDE);
_17.setAlignment("center");
this.frame.addWidgetToDom(btn,_15,_1d,top);
this.frame.addWidgetToDom(_17,_15,_1d,top+btn.height);
_1d+=(1.5*btn.width);
_19++;
if(_19%_1b==0){
_1d=_1c;
top+=btn.height+40;
}
}
var _1f=this.SYSTEM.Dom.createDiv("absolute",this.frame.getInternalWidth(),this.TITLE_HEIGHT,this.frame.leftEdgeWidth,this.frame.topEdgeHeight);
_1f.style.borderBottom="solid 1px black";
var _20=this.SYSTEM.Dom.createImage(null,"absolute",this.TITLE_ICON_WIDTH,this.TITLE_ICON_HEIGHT,this.TITLE_ICON_LEFT,this.TITLE_ICON_TOP);
var _21=new _14.Label("titleLabel","Title");
_1f.appendChild(_20);
var _22=new _14.Link("titleMainLink","Back");
var _23=this.SYSTEM.Dom.createDiv("absolute",this.frame.getInternalWidth(),this.frame.getInternalHeight()-this.TITLE_HEIGHT-this.pad,this.frame.leftEdgeWidth,this.frame.topEdgeHeight+this.TITLE_HEIGHT+this.pad);
_23.style.display="none";
_1f.style.display="none";
this.frame.windowDiv.appendChild(_1f);
this.frame.addWidgetToDom(_21,_1f,this.TITLE_ICON_LEFT+this.TITLE_ICON_WIDTH+10,this.TITLE_LBL_TOP);
this.frame.addWidgetToDom(_22,_1f,this.TITLE_LINK_RIGHT,this.TITLE_LBL_TOP,true);
this.frame.windowDiv.appendChild(_23);
this.buttonContainer=_15;
this.titleIcon=_20;
this.titleContainer=_1f;
this.interfaceContainer=_23;
}
catch(ex){
jsExDebug("settingsApp_createMainInterface",ex);
}
}
function settingsApp_showInterface(_24){
try{
this.buttonContainer.style.display="none";
this.titleContainer.style.display="block";
this.interfaceContainer.style.display="block";
if(!this.interfaces[_24].created){
this["create"+_24+"Interface"]();
}
this.updateWidgetValues(_24);
this.frame.getWidget("titleLabel").setText(_24);
this.titleIcon.src=this.interfaces[_24].iconSrc;
this.interfaceContainer.appendChild(this.interfaces[_24].container);
this.currentInterface=_24;
}
catch(ex){
jsExDebug("settingsApp_showInterface",ex);
}
}
function settingsApp_createTrackingInterface(){
try{
var _25=this.interfaces[this.TRACKING];
_25.created=true;
_25.container=this.SYSTEM.Dom.createDiv("absolute");
var _26=new this.wLib.Checkbox("mapObjectLabelsCheckbox");
_26.setValue("map_object_labels");
var _27=new this.wLib.DropText("defaultTrackSelect",this.SELECT_WIDGET_WIDTH);
_27.addItem(this.SYSTEM.Settings.NO_DEFAULT_TRACK_STATUS,"None (Choose for each new contact)","None");
_27.addItem(this.SYSTEM.Contacts.TRACKING_STATUS_OFF,"Off");
_27.addItem(this.SYSTEM.Contacts.TRACKING_STATUS_ACQUAINTANCE,"Acquaintance");
_27.addItem(this.SYSTEM.Contacts.TRACKING_STATUS_FRIEND,"Friend");
_27.addItem(this.SYSTEM.Contacts.TRACKING_STATUS_TRUSTED,"Trusted");
_27.setValue("default_track_status");
var _28=new this.wLib.Checkbox("mapAnimateZoomCheck");
_28.setValue("map_animate_zoom");
var _29=new this.wLib.DropText("publicAccuracySelect",this.SELECT_WIDGET_WIDTH);
_29.addItem(-1,"Off");
_29.addItem(10000,"10 km");
_29.addItem(5000,"5 km");
_29.addItem(2000,"2 km");
_29.addItem(0,"0 km");
_29.setValue("public_accuracy");
var _2a=new this.wLib.Link("publicAccuracyLink","What is this?");
var _2b=new this.wLib.Checkbox("panOnScrollZoomCheck");
_2b.setValue("map_pan_on_scroll_zoom");
var _2c=new this.wLib.DropText("defaultStyleSelect",this.SELECT_WIDGET_WIDTH,null,this.SELECT_WIDGET_WIDTH,150);
_2c.setValue("map_default_style");
for(var id in this.SYSTEM.MapStyle.styleArray){
_2c.addItem(id,this.SYSTEM.MapStyle.styleArray[id].name);
}
var _2e=new this.wLib.Checkbox("locationDecayCheck");
_2e.setValue("map_location_decay");
var _2f=new this.wLib.Link("locationDecayLink","What is this?");
var _30=new this.wLib.Checkbox("centreMarkCheck");
_30.setValue("map_centre_mark");
this.addSetting(this.TRACKING,this.CHECKBOX_SETTING,"Show map object labels?",_26,0,0);
this.addSetting(this.TRACKING,this.SELECT_SETTING,"Default contact tracking status",_27,0,25);
this.addSetting(this.TRACKING,this.CHECKBOX_SETTING,"Animate map zoom?",_28,0,60);
this.addSetting(this.TRACKING,this.SELECT_SETTING,"Public location accuracy",_29,0,85);
this.frame.addWidgetToDom(_2a,_25.container,_29.positionX,_29.positionY+30);
this.addSetting(this.TRACKING,this.CHECKBOX_SETTING,"Centre map when scrolling with mouse wheel?",_2b,0,135);
this.addSetting(this.TRACKING,this.SELECT_SETTING,"Default map style",_2c,0,160);
this.addSetting(this.TRACKING,this.CHECKBOX_SETTING,"Show location decay?",_2e,0,195);
this.frame.addWidgetToDom(_2f,_25.container,_2e.positionX+25,_2e.positionY);
this.addSetting(this.TRACKING,this.CHECKBOX_SETTING,"Show centre mark by default?",_30,0,220);
_2c.attach(_2c.parentDiv);
_29.attach(_29.parentDiv);
_27.attach(_27.parentDiv);
}
catch(ex){
jsExDebug("settingsApp_createTrackingInterface",ex);
}
}
function settingsApp_createAppearanceInterface(){
try{
var _31=this.interfaces[this.APPEARANCE];
_31.created=true;
_31.container=this.SYSTEM.Dom.createDiv("absolute");
var _32=new this.wLib.Checkbox("animateLauncherCheckbox");
_32.setValue("animate_launcher");
var _33=new this.wLib.Text("desktopColourText");
_33.setDimensions(100);
_33.setValue("desktop_colour");
var _34=new this.wLib.Checkbox("desktopColourCheckbox");
_34.allowLabel("Use default",_34.LABEL_RIGHT,150);
_34.setValue("desktop_colour");
var _35=new this.wLib.Text("desktopImageText");
_35.setDimensions(100);
_35.setValue("desktop_image");
var _36=new this.wLib.Checkbox("desktopImageCheckbox");
_36.allowLabel("Use default",_36.LABEL_RIGHT,150);
_36.setValue("desktop_image");
var _37=new this.wLib.TextButton("desktopImageBtn",100,"Choose image");
_37.setValue("desktop_image");
var _38=new this.wLib.Checkbox("desktopStretchCheckbox");
_38.setValue("desktop_image_stretch");
var _39=new this.wLib.DropText("themeNameSelect",this.SELECT_WIDGET_WIDTH);
_39.setValue("theme_name");
_39.addItem("default","Default");
_39.addItem("apple","Metallic");
_39.addItem("pirate","Pirate");
_39.addItem("three","Light");
_39.addItem("three_party","Party");
_39.addItem("telstra","Light Blue");
_39.addItem("virgin_mobile","Red");
_39.addItem("army","Army");
_39.addItem("jungle","Jungle");
_39.addItem("sketchy","Sketchy");
_39.addItem("crayon","Crayon");
_39.addItem("space","Space");
_39.addItem("radioactive","Radioactive");
_39.addItem("dark","Dark");
_39.addItem("girl_theme","Princess");
var _3a=new this.wLib.Link("themePreviewLink","Preview");
var _3b=new this.wLib.Label("themeSaveLabel","You have changed your theme setting. You will be prompted when you close this application to see the new theme.");
_3b.setDimensions(this.frame.getInternalWidth());
_3b.setFontSize(null,null,12);
_3b.hide();
this.addSetting(this.APPEARANCE,this.CHECKBOX_SETTING,"Animate the launcher on open & close?",_32,0,0);
this.addSetting(this.APPEARANCE,this.TEXT_SETTING,"Desktop background colour",_33,0,25);
this.frame.addWidgetToDom(_34,_31.container,_33.positionX,_33.positionY+20+this.pad);
this.addSetting(this.APPEARANCE,this.TEXT_SETTING,"Desktop background image",_35,0,_34.positionY+30);
this.frame.addWidgetToDom(_36,_31.container,_33.positionX,_35.positionY+20+this.pad);
this.frame.addWidgetToDom(_37,_31.container,this.SETTING_LABEL_WIDTH+5,_36.positionY+30);
this.addSetting(this.APPEARANCE,this.CHECKBOX_SETTING,"Stretch desktop image?",_38,0,_37.positionY+_37.height+(2*this.pad));
this.addSetting(this.APPEARANCE,this.SELECT_SETTING,"Interface theme",_39,0,_38.positionY+30);
this.frame.addWidgetToDom(_3a,_31.container,_39.positionX,_39.positionY+30);
this.frame.addWidgetToDom(_3b,_31.container,0,_3a.positionY+17);
}
catch(ex){
jsExDebug("settingsApp_createAppearanceInterface",ex);
}
}
function settingsApp_createOtherInterface(){
try{
var _3c=this.interfaces[this.OTHER];
_3c.created=true;
_3c.container=this.SYSTEM.Dom.createDiv("absolute");
var _3d=new this.wLib.Checkbox("exitMessageCheckbox");
_3d.setValue("exit_message");
var _3e=new this.wLib.Checkbox("browserCompatibilityMsgCheckbox");
_3e.setValue("browser_compat_msgs");
this.addSetting(this.OTHER,this.CHECKBOX_SETTING,"Show exit message?",_3d,0,0);
this.addSetting(this.OTHER,this.CHECKBOX_SETTING,"Show browser compatibility messages?",_3e,0,25);
}
catch(ex){
jsExDebug("settingsApp_createOtherInterface",ex);
}
}
function settingsApp_createNotificationsInterface(){
try{
var _3f=this.interfaces[this.NOTIFICATIONS];
_3f.created=true;
_3f.container=this.SYSTEM.Dom.createDiv("absolute");
var _40=0;
var _41=new this.wLib.TabList("notificationTabList");
_41.setDimensions(this.frame.getInternalWidth());
this.frame.addWidgetToDom(_41,_3f.container,0,_40);
var _42=parseFloat(this.interfaceContainer.style.height)-_41.getHeight()-this.NOTIFICATION_TYPE_AREA_HEIGHT;
var _43=250;
var _44=_42-20;
var _45=new this.wLib.Label("notificationTypeLabel","Method of notification");
_45.setDimensions(150);
var _46=new this.wLib.DropText("notificationTypeSelect",this.NOTIFICATION_TYPE_WIDTH,null,this.NOTIFICATION_TYPE_WIDTH,80);
_46.allowListOnTop();
_46.addItem("All","All");
_46.addItem(this.SYSTEM.Notifier.SETTING_TYPE_INTERNAL,"Internal");
_46.addItem(this.SYSTEM.Notifier.SETTING_TYPE_EXTERNAL,"External");
_46.addItem(this.SYSTEM.Notifier.SETTING_TYPE_EMAIL,"Email");
_46.widgetElement.style.zIndex=_41.settingSelectedTabZIndex+1;
var _47=new this.wLib.Label("notificationTypeDescLabel",[this.NOTIFICATION_TYPE_ALL_TEXT,this.NOTIFICATION_TYPE_INTERNAL_TEXT,this.NOTIFICATION_TYPE_EXTERNAL_TEXT,this.NOTIFICATION_TYPE_EMAIL_TEXT].join("<br/>"));
_47.setDimensions(this.frame.getInternalWidth(),this.NOTIFICATION_TYPE_AREA_HEIGHT-_46.height-(2*this.pad));
_46.setSelectedValue(this.SYSTEM.Notifier.SETTING_TYPE_INTERNAL);
var _48=this.SYSTEM.Dom.createDiv("absolute",_41.width,_42,0,_40+_41.getHeight());
_48.style.border="solid 1px black";
_48.style.display="none";
_3f.container.appendChild(_48);
var _49=this.SYSTEM.Dom.createDiv("absolute",_41.width,_42,0,_40+_41.getHeight());
_49.style.border=_48.style.border;
_49.style.display="none";
_3f.container.appendChild(_49);
var _4a=this.SYSTEM.Dom.createDiv("absolute",_41.width,_42,0,_40+_41.getHeight());
_4a.style.border=_49.style.border;
_4a.style.display="none";
_3f.container.appendChild(_4a);
this.notificationContainers=[];
_41.addTab("Contacts",true,this.notificationContainers.push(_48)-1);
_41.addTab("Files",true,this.notificationContainers.push(_49)-1);
_41.addTab("Tracking",true,this.notificationContainers.push(_4a)-1);
var _4b=new this.wLib.CheckboxList("notificationContactsSelect");
_4b.setDimensions(_43,_44);
_4b.addCheckboxItem(this.SYSTEM.Notifier.CONTACTS_REQUEST,"Contact requests");
_4b.addCheckboxItem(this.SYSTEM.Notifier.CONTACTS_ACCEPT,"Accepted contact requests");
_4b.addCheckboxItem(this.SYSTEM.Notifier.CONTACTS_REJECT,"Rejected contact requests");
_4b.addCheckboxItem(this.SYSTEM.Notifier.CONTACTS_BLOCK,"Blocked contact requests");
_4b.addCheckboxItem(this.SYSTEM.Notifier.CONTACTS_UNBLOCK,"Unblocked contact requests");
_4b.addCheckboxItem(this.SYSTEM.Notifier.CONTACTS_REMOVE,"Removed contacts");
_4b.addCheckboxItem(this.SYSTEM.Notifier.CONTACTS_TRACK_STATUS,"Contact track status changes");
_4b.addCheckboxItem(this.SYSTEM.Notifier.CONTACTS_MISC,"Miscellaneous Contact events");
_4b.addCheckboxItem(this.SYSTEM.Notifier.USER_AVATAR_CHANGE,"User avatar change");
_4b.addCheckboxItem(this.SYSTEM.Notifier.USER_NAME_CHANGE,"User name change");
var _4c=new this.wLib.CheckboxList("notificationFilesSelect");
_4c.setDimensions(_43,_44);
_4c.addCheckboxItem(this.SYSTEM.Notifier.SHARING_SHARED_R_FILE,"File shared read-only permission");
_4c.addCheckboxItem(this.SYSTEM.Notifier.SHARING_SHARED_RW_FILE,"File shared write permission");
_4c.addCheckboxItem(this.SYSTEM.Notifier.SHARING_UNSHARED_FILE,"File sharing removed");
_4c.addCheckboxItem(this.SYSTEM.Notifier.COLLAB_SAVED_FILE,"Shared file saved");
_4c.addCheckboxItem(this.SYSTEM.Notifier.COLLAB_TAKEN_WRITE,"Edit control taken");
_4c.addCheckboxItem(this.SYSTEM.Notifier.COLLAB_RELEASE_WRITE,"Edit control released");
var _4d=new this.wLib.CheckboxList("notificationTrackingSelect");
_4d.setDimensions(_43,_44);
_4d.addCheckboxItem(this.SYSTEM.Notifier.TRACK_NEW_LOCATION,"New contact location");
_4d.addCheckboxItem(this.SYSTEM.Notifier.TRACK_NEW_MEDIA,"New contact media location");
_4d.addCheckboxItem(this.SYSTEM.Notifier.TRACK_NEW_PUB_LOCATION,"New public user location");
_4d.addCheckboxItem(this.SYSTEM.Notifier.TRACK_NEW_PUB_MEDIA,"New public user media location");
var _4e=this.frame.getInternalWidth()-_43-30;
var _4f=new this.wLib.Label("notificationHelpDescription");
_4f.setDimensions(_4e,_44);
_4f.widgetElement.style.paddingLeft=this.pad+"px";
this.frame.addWidgetToDom(_4b,_48,this.pad,this.pad);
this.frame.addWidgetToDom(_4c,_49,this.pad,this.pad);
this.frame.addWidgetToDom(_4d,_4a,this.pad,this.pad);
this.frame.addWidgetToDom(_45,_3f.container,this.pad,_40+_41.getHeight()+_42+this.pad+10);
this.frame.addWidgetToDom(_46,_3f.container,_45.positionX+_45.width+5,_45.positionY-this.pad);
this.frame.addWidgetToDom(_47,_3f.container,this.pad,_46.positionY+_46.height+this.pad);
this.frame.addWidgetToDom(_4f,_48,this.pad,this.pad,true);
var _50="Received when ";
this.notificationData=[];
this.notificationData[this.SYSTEM.Notifier.CONTACTS_REQUEST]=_50+"another user sends you a contact request.";
this.notificationData[this.SYSTEM.Notifier.CONTACTS_ACCEPT]=_50+"a user accepts a contact request that you sent to them.";
this.notificationData[this.SYSTEM.Notifier.CONTACTS_REJECT]=_50+"a user rejects a contact request that you sent to them.";
this.notificationData[this.SYSTEM.Notifier.CONTACTS_BLOCK]=_50+"one of your contacts blocks you from being their contact.";
this.notificationData[this.SYSTEM.Notifier.CONTACTS_UNBLOCK]=_50+"one of your contacts unblocks you, allowing you to send them a contact request.";
this.notificationData[this.SYSTEM.Notifier.CONTACTS_REMOVE]=_50+"one of your contacts removes you so that you are no longer one of their contacts.";
this.notificationData[this.SYSTEM.Notifier.CONTACTS_TRACK_STATUS]=_50+"one of your contacts changes how accurately you can track them on a WebMap.";
this.notificationData[this.SYSTEM.Notifier.CONTACTS_MISC]=_50+"you manage your contacts from Pocket Peepel.";
this.notificationData[this.SYSTEM.Notifier.USER_AVATAR_CHANGE]=_50+"one of your contacts has changed their avatar.";
this.notificationData[this.SYSTEM.Notifier.USER_NAME_CHANGE]=_50+"one of your contacts has changed their screen name.";
this.notificationData[this.SYSTEM.Notifier.SHARING_SHARED_R_FILE]=_50+"another user has shared a file with you and given you read-only permisson.";
this.notificationData[this.SYSTEM.Notifier.SHARING_SHARED_RW_FILE]=_50+"another user has shared a file with you and given you read & write permisson.";
this.notificationData[this.SYSTEM.Notifier.SHARING_UNSHARED_FILE]=_50+"another user has stopped sharing a file with you.";
this.notificationData[this.SYSTEM.Notifier.COLLAB_SAVED_FILE]=_50+"a file that you are collaborating on has been saved by another user. <br/><br/>Recommended if you are editing or viewing a shared file.";
this.notificationData[this.SYSTEM.Notifier.COLLAB_TAKEN_WRITE]=_50+"another user has taken edit control of a file that you are collaborating on. <br/><br/>Recommended if you are editing or viewing a shared file.";
this.notificationData[this.SYSTEM.Notifier.COLLAB_RELEASE_WRITE]=_50+"another user has released edit control of a file that you are collaborating on. <br/><br/>Recommended if you are editing or viewing a shared file.";
this.notificationData[this.SYSTEM.Notifier.TRACK_NEW_LOCATION]=_50+"there is a new contact location.";
this.notificationData[this.SYSTEM.Notifier.TRACK_NEW_MEDIA]=_50+"there is a new contact media location.";
this.notificationData[this.SYSTEM.Notifier.TRACK_NEW_PUB_LOCATION]=_50+"there is a new public user location.";
this.notificationData[this.SYSTEM.Notifier.TRACK_NEW_PUB_MEDIA]=_50+"there is a new public user media location.";
_41.selectTab(0);
}
catch(ex){
jsExDebug("settingsApp_createNotificationsInterface",ex);
}
}
function settingsApp_createOfficeInterface(){
try{
var _51=this.interfaces[this.OFFICE];
_51.created=true;
_51.container=this.SYSTEM.Dom.createDiv("absolute");
var _52=new this.SYSTEM.Widget.FontFaceSelect("fontFaceSelect");
_52.setValue("default_font_family");
var _53=new this.SYSTEM.Widget.FontSizeSelect("fontSizeSelect");
_53.setValue("default_font_size");
var _54=25;
this.addSetting(this.OFFICE,this.SELECT_SETTING,"Default font",_52,0,0);
this.addSetting(this.OFFICE,this.SELECT_SETTING,"Default font size",_53,0,_54);
_53.attach(_53.parentDiv);
_52.attach(_52.parentDiv);
}
catch(ex){
jsExDebug("settingsApp_createOfficeInterface",ex);
}
}
function settingsApp_addSetting(_55,_56,_57,_58,_59,_5a){
try{
var _5b=this.interfaces[_55];
var _5c=_58.getValue();
if(_5b&&!this.settingData[_5c]){
var _5d=new this.wLib.Label(_55+"_"+_5d,_57);
_5d.setDimensions(this.SETTING_LABEL_WIDTH);
this.frame.addWidgetToDom(_5d,_5b.container,_59,_5a);
this.frame.addWidgetToDom(_58,_5b.container,_59+this.SETTING_LABEL_WIDTH+this.pad,_5a);
this.settingData[_5c]={label:_5d,widget:_58,type:_56};
}
}
catch(ex){
jsExDebug("settingsApp_addSetting",ex);
}
}
function settingsApp_eventHandler(_5e){
try{
var _5f=_5e.getValue();
var obj=this.settingData[_5f];
var _61=null;
if(obj){
switch(obj.type){
case this.TEXT_SETTING:
_61=obj.widget.getContent();
break;
case this.SELECT_SETTING:
_61=obj.widget.getSelectedValue();
break;
case this.CHECKBOX_SETTING:
_61=(obj.widget.isChecked()?1:0);
break;
case this.RADIO_SETTING:
_61=obj.widget.getSelectedValue();
break;
}
if(_61!=null){
this.SYSTEM.Settings.set(_5f,_61);
}
}
}
catch(ex){
jsExDebug("settingsApp_eventHandler",ex);
}
}
function settingsApp_binding_desktopColourCheckbox_valueChange(_62){
function callback(_63){
try{
if(_63){
this.SYSTEM.Settings.set(_62.getValue(),_63);
this.frame.getWidget("desktopColourText").setContent(_63);
this.frame.getWidget("desktopColourCheckbox").setCheckedState(false,true);
}else{
this.frame.getWidget("desktopColourText").setContent("Default");
this.frame.getWidget("desktopColourCheckbox").setCheckedState(true,true);
}
}
catch(ex){
jsExDebug("settingsApp_binding_desktopColourCheckbox_valueChange: callback",ex);
}
}
function tooltipTimeout(){
try{
var d=new this.SYSTEM.Dialogue.ColourPick(this,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("settingsApp_binding_desktopColourBtn_click",ex);
}
}
try{
if(_62.isChecked()){
this.frame.getWidget("desktopColourText").setContent("Default");
this.SYSTEM.Settings.set(_62.getValue());
}else{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Loading colour picker...");
}
}
catch(ex){
jsExDebug("settingsApp_binding_desktopColourCheckbox_valueChange",ex);
}
}
function settingsApp_binding_desktopColourText_focus(_65){
function callback(_66){
try{
if(_66){
this.SYSTEM.Settings.set(_65.getValue(),_66);
this.frame.getWidget("desktopColourText").setContent(_66);
}
this.colourPickDialogue=null;
}
catch(ex){
jsExDebug("settingsApp_binding_desktopColourText_focus: callback",ex);
}
}
function tooltipTimeout(){
try{
this.colourPickDialogue=new this.SYSTEM.Dialogue.ColourPick(this,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("settingsApp_binding_desktopColourText_focus",ex);
}
}
try{
if(!this.colourPickDialogue){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Loading colour picker...");
}
}
catch(ex){
jsExDebug("settingsApp_binding_desktopColourText_focus",ex);
}
}
function settingsApp_binding_themeNameSelect_itemSelect(_67){
try{
var _68=_67.getSelectedValue();
if(_68){
this.SYSTEM.Settings.set(_67.getValue(),_68);
this.frame.getWidget("themeSaveLabel").show();
}
}
catch(ex){
jsExDebug("settingsApp_binding_themeNameSelect_itemSelect",ex);
}
}
function settingsApp_binding_themePreviewLink_click(){
try{
var _69=this.frame.getWidget("themeNameSelect").getSelectedValue();
if(_69){
var _6a=500;
var d=new this.SYSTEM.Dialogue.OkAlert(this,"Theme Preview","<img src='img/app/system/settings/"+_69+".png' width='100%' height='"+(_6a-50)+"px'/>",null,_6a,_6a);
d.hideIcon();
}
}
catch(ex){
jsExDebug("settingsApp_binding_themePreviewLink_click",ex);
}
}
function settingsApp_binding_notificationTypeSelect_itemSelect(_6c){
try{
this.updateWidgetValues(this.NOTIFICATIONS);
var _6d="";
switch(_6c.getSelectedValue()){
case "All":
_6d=this.NOTIFICATION_TYPE_ALL_TEXT;
break;
case this.SYSTEM.Notifier.SETTING_TYPE_INTERNAL:
_6d=this.NOTIFICATION_TYPE_INTERNAL_TEXT;
break;
case this.SYSTEM.Notifier.SETTING_TYPE_EXTERNAL:
_6d=this.NOTIFICATION_TYPE_EXTERNAL_TEXT;
break;
case this.SYSTEM.Notifier.SETTING_TYPE_EMAIL:
_6d=this.NOTIFICATION_TYPE_EMAIL_TEXT;
break;
}
}
catch(ex){
jsExDebug("settingsApp_binding_notificationTypeSelect_itemSelect",ex);
}
}
function settingsApp_binding_notificationSelect_itemSelect(_6e){
try{
var _6f=_6e.selectedIndex;
var _70=_6e.items[_6f].checkboxElementReference;
var _71=_6e.items[_6f].value;
var _72=(_70.isChecked()?1:0);
var _73=this.frame.getWidget("notificationTypeSelect").getSelectedValue();
var _74=this.SYSTEM.Settings.NOTIFICATION_SETTING_PREFIX+_71+"_";
if(_73=="All"){
this.SYSTEM.Settings.set(_74+this.SYSTEM.Notifier.SETTING_TYPE_INTERNAL,_72);
this.SYSTEM.Settings.set(_74+this.SYSTEM.Notifier.SETTING_TYPE_EXTERNAL,_72);
this.SYSTEM.Settings.set(_74+this.SYSTEM.Notifier.SETTING_TYPE_EMAIL,_72);
}else{
this.SYSTEM.Settings.set(_74+_73,_72);
}
}
catch(ex){
jsExDebug("settingsApp_binding_notificationSelect_itemSelect",ex);
}
}
function settingsApp_binding_notificationSelect_itemEnter(_75){
try{
var _76=_75.getItemValue(_75.lastEnteredIndex);
var _77=this.notificationData[_76];
if(_77){
this.frame.getWidget("notificationHelpDescription").setText("");
this.frame.getWidget("notificationHelpDescription").setText(_77);
}
}
catch(ex){
jsExDebug("settingsApp_binding_nsettingsApp_binding_notificationSelect_itemEnterotificationSelect_itemSelect",ex);
}
}
function settingsApp_binding_notificationTabList_itemSelect(_78){
try{
var _79=_78.getSelectedTabData();
for(var i=0;i<this.notificationContainers.length;i++){
if(i==_79){
this.notificationContainers[i].style.display="block";
this.frame.getWidget("notificationHelpDescription").attach(this.notificationContainers[i]);
}else{
this.notificationContainers[i].style.display="none";
}
}
this.updateWidgetValues(this.NOTIFICATIONS);
}
catch(ex){
jsExDebug("settingsApp_binding_notificationTabList_itemSelect",ex);
}
}
function settingsApp_binding_locationDecayLink_click(){
try{
var d=new this.SYSTEM.Dialogue.OkAlert(this,this.APP_NAME,"Location decay changes how your contacts avatars are display on the map. They change depending on how long it has been since they have updated their location:<br/><br/>"+"<table><tr><td><img src='img/app/app/settings/mould_eg_2.png' style='width: 30px; height: 30px;'/></td><td>1 to 4 days old</td></tr>"+"<tr><td><img src='img/app/app/settings/mould_eg_1.png' style='width: 30px; height: 30px;'/></td><td>5 - 10 days old</td></tr>"+"<tr><td><img src='img/app/app/settings/mould_eg_3.png' style='width: 30px; height: 30px;'/></td><td>Over 10 days old</td></tr></table>");
}
catch(ex){
jsExDebug("settingsApp_binding_locationDecayLink_click",ex);
}
}
function settingsApp_binding_publicAccuracyLink_click(){
try{
var d=new this.SYSTEM.Dialogue.OkAlert(this,this.APP_NAME,"Public location accuracy affects how accurately Peepel users who are not your contacts will see your location. If they search for your location they will see it differently depending on what value you choose for this setting:<br/><br/>"+"<table border='1' cellpadding='1' cellspacing='0'><tr><td>Off</td><td>They will not see your location. This DISABLES public tracking, recommended if you don't want anyone other than your contacts viewing your location.</td></tr>"+"<tr><td>10km</td><td>They will see you somewhere within 10km of your actual recorded location.</td></tr>"+"<tr><td>5km</td><td>They will see you somewhere within 5km of your actual recorded location.</td></tr>"+"<tr><td>2km</td><td>They will see you somewhere within 2km of your actual recorded location.</td></tr>"+"<tr><td>0km</td><td>They will see your <b>exact</b> recorded location.</td></tr></table>");
}
catch(ex){
jsExDebug("settingsApp_binding_publicAccuracyLink_click",ex);
}
}
function settingsApp_binding_desktopImageBtn_click(_7d){
function callback(_7e){
try{
if(_7e!=null){
this.frame.getWidget("desktopImageText").setContent(this.SYSTEM.Filesystem.getFileNameFromId(_7e));
this.frame.getWidget("desktopImageCheckbox").setCheckedState(false,true);
this.SYSTEM.Settings.set(_7d.getValue(),_7e);
}
}
catch(ex){
jsExDebug("settingsApp_binding_desktopImageBtn_click: callback",ex);
}
}
try{
var d=new this.SYSTEM.Dialogue.ImageSelect(this,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("settingsApp_binding_desktopImageBtn_click",ex);
}
}
function settingsApp_binding_desktopImageCheckbox_valueChange(_80){
try{
if(_80.isChecked()){
this.frame.getWidget("desktopImageText").setContent("Default");
this.frame.getWidget("desktopImageCheckbox").setCheckedState(true,true);
this.SYSTEM.Settings.set(_80.getValue(),this.SYSTEM.Settings.DEFAULT_DESKTOP_IMAGE);
}else{
this.SYSTEM.Settings.set(_80.getValue(),this.SYSTEM.Settings.NO_DESKTOP_IMAGE);
this.frame.getWidget("desktopImageText").setContent("None");
}
}
catch(ex){
jsExDebug("settingsApp_binding_desktopImageCheckbox_valueChange",ex);
}
}
function settingsApp_binding_publicAccuracySelect_itemSelect(_81){
try{
this.eventHandler(_81);
if(_81.getSelectedValue()!=-1){
var d=new this.SYSTEM.Dialogue.OkAlert(this,"Warning","You have chosen to make your location publicly available, this means that any person with your email address can view your location if they wish.");
}
}
catch(ex){
jsExDebug("settingsApp_binding_publicAccuracySelect_itemSelect",ex);
}
}
function settingsApp_updateWidgetValues(_83){
try{
var _84=this.SYSTEM.Settings;
switch(_83){
case this.TRACKING:
this.settingData["map_object_labels"].widget.setCheckedState(_84.get("map_object_labels"),true);
this.settingData["default_track_status"].widget.setSelectedValue(_84.get("default_track_status"),true);
this.settingData["map_animate_zoom"].widget.setCheckedState(_84.get("map_animate_zoom"),true);
this.settingData["map_pan_on_scroll_zoom"].widget.setCheckedState(_84.get("map_pan_on_scroll_zoom"),true);
this.settingData["map_default_style"].widget.setSelectedValue(_84.get("map_default_style"),true);
this.settingData["public_accuracy"].widget.setSelectedValue(_84.get("public_accuracy"));
this.settingData["map_location_decay"].widget.setCheckedState(_84.get("map_location_decay"));
this.settingData["map_centre_mark"].widget.setCheckedState(_84.get("map_centre_mark"));
break;
case this.APPEARANCE:
this.settingData["animate_launcher"].widget.setCheckedState(_84.get("animate_launcher"),true);
this.settingData["desktop_image_stretch"].widget.setCheckedState(_84.get("desktop_image_stretch"),true);
var _85=_84.get("desktop_colour");
if(_85==this.SYSTEM.Settings.DEFAULT_DESKTOP_COLOUR){
this.frame.getWidget("desktopColourText").setContent("Default");
this.frame.getWidget("desktopColourCheckbox").setCheckedState(true,true);
}else{
this.frame.getWidget("desktopColourText").setContent(_85);
this.frame.getWidget("desktopColourCheckbox").setCheckedState(false,true);
}
var _86=_84.get("desktop_image");
if(_86==this.SYSTEM.Settings.DEFAULT_DESKTOP_IMAGE){
this.frame.getWidget("desktopImageText").setContent("Default");
this.frame.getWidget("desktopImageCheckbox").setCheckedState(true,true);
}else{
if(_86==this.SYSTEM.Settings.NO_DESKTOP_IMAGE){
this.frame.getWidget("desktopImageText").setContent("None");
this.frame.getWidget("desktopImageCheckbox").setCheckedState(false,true);
}else{
if(_86){
this.frame.getWidget("desktopImageText").setContent(this.SYSTEM.Filesystem.getFileNameFromId(_86));
this.frame.getWidget("desktopImageCheckbox").setCheckedState(false,true);
}
}
}
this.frame.getWidget("themeNameSelect").setSelectedValue(_84.get("theme_name"));
break;
case this.OTHER:
this.settingData["exit_message"].widget.setCheckedState(_84.get("exit_message"),true);
this.settingData["browser_compat_msgs"].widget.setCheckedState(_84.get("browser_compat_msgs"),true);
break;
case this.NOTIFICATIONS:
var _87=this.frame.getWidget("notificationTabList");
var _88=this.frame.getWidget("notification"+_87.getSelectedTabName()+"Select");
if(!_88){
break;
}
var _89=this.SYSTEM.Settings.NOTIFICATION_SETTING_PREFIX;
var _8a=this.frame.getWidget("notificationTypeSelect").getSelectedValue();
var _8b=null;
var _8c=null;
var _8d=null;
for(var i=0;i<_88.items.length;i++){
_8b=_88.items[i].checkboxElementReference;
if(_8b){
_8d=_89+_88.items[i].value+"_";
if(_8a=="All"){
_8c=this.SYSTEM.Settings.get(_8d+this.SYSTEM.Notifier.SETTING_TYPE_INTERNAL)&&this.SYSTEM.Settings.get(_8d+this.SYSTEM.Notifier.SETTING_TYPE_EXTERNAL)&&this.SYSTEM.Settings.get(_8d+this.SYSTEM.Notifier.SETTING_TYPE_EMAIL);
}else{
_8c=this.SYSTEM.Settings.get(_89+_88.items[i].value+"_"+_8a);
}
_8b.setCheckedState(_8c,true);
}
}
break;
case this.OFFICE:
this.settingData["default_font_family"].widget.setSelectedValue(_84.get("default_font_family"));
this.settingData["default_font_size"].widget.setSelectedValue(_84.get("default_font_size"));
break;
}
}
catch(ex){
jsExDebug("settingsApp_updateWidgetValues",ex);
}
}
function settingsApp_binding_interfaceBtn_click(_8f){
try{
this.showInterface(_8f.getValue());
}
catch(ex){
jsExDebug("settingsApp_binding_interfaceBtn_click",ex);
}
}
function settingsApp_binding_titleMainLink_click(_90){
try{
this.buttonContainer.style.display="block";
this.titleContainer.style.display="none";
this.interfaceContainer.style.display="none";
this.interfaceContainer.removeChild(this.interfaces[this.currentInterface].container);
}
catch(ex){
jsExDebug("settingsApp_binding_titleMainLink_click",ex);
}
}
function settingsApp_binding_quickHelpBtn_click(){
try{
var _91=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"settings");
}
catch(ex){
jsExDebug("settingsApp_binding_quickHelpBtn_click",ex);
}
}

try{
contactViewApp_t.prototype=new application_t();
contactViewApp_t.prototype.constructor=contactViewApp_t;
contactViewApp_t.prototype.cleanUp=contactViewApp_cleanUp;
contactViewApp_t.prototype.contactViewApp_super=application_t.prototype.constructor;
contactViewApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
contactViewApp_t.prototype._SIG_KILL=contactViewApp__SIG_KILL;
contactViewApp_t.prototype._SIG_THEME=contactViewApp__SIG_THEME;
contactViewApp_t.prototype.createFrame=contactViewApp_createFrame;
contactViewApp_t.prototype.createContactSelectExtraContent=contactViewApp_createContactSelectExtraContent;
contactViewApp_t.prototype.notificationAlert=contactViewApp_notificationAlert;
contactViewApp_t.prototype.addContactRow=contactViewApp_addContactRow;
contactViewApp_t.prototype.getRelationshipText=contactViewApp_getRelationshipText;
contactViewApp_t.prototype.applySearch=contactViewApp_applySearch;
contactViewApp_t.prototype.getContactAcceptedContactsCallback=contactViewApp_getContactAcceptedContactsCallback;
contactViewApp_t.prototype.contactsRefreshCallback=contactViewApp_contactsRefreshCallback;
contactViewApp_t.prototype.frame__onClose=contactViewApp_frame__onClose;
contactViewApp_t.prototype.frame__onResize=contactViewApp_frame__onResize;
contactViewApp_t.prototype.frame_keyUp=contactViewApp_frame_keyUp;
contactViewApp_t.prototype.binding_contactSelect_itemSelect=contactViewApp_binding_contactSelect_itemSelect;
contactViewApp_t.prototype.binding_generalSendRequestBtn_click=contactViewApp_binding_generalSendRequestBtn_click;
contactViewApp_t.prototype.APP_ID=APP_ID_CONTACT_VIEW;
contactViewApp_t.prototype.APP_NAME="ContactViewer";
contactViewApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.CONTACT_MANAGER;
contactViewApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
contactViewApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
contactViewApp_t.prototype.ACCEPTED=contacts_t.prototype.STATUS_ACCEPTED;
contactViewApp_t.prototype.RECEIVED=contacts_t.prototype.STATUS_REQUEST_RECEIVED;
contactViewApp_t.prototype.SENT=contacts_t.prototype.STATUS_REQUEST_SENT;
contactViewApp_t.prototype.BLOCKED=contacts_t.prototype.STATUS_BLOCK_SENT;
contactViewApp_t.prototype.FRAME_WIDTH=700;
contactViewApp_t.prototype.FRAME_HEIGHT=340;
contactViewApp_t.prototype.BORDER_WIDTH_PADDING=2;
contactViewApp_t.prototype.BTN_WIDTH=60;
contactViewApp_t.prototype.REFRESH_IMG="img/app/system/icons/utility/refresh";
contactViewApp_t.prototype.DRAG_ELEMENT_IMG="img/dev_only/contactdrag.png";
contactViewApp_t.prototype.ALERT_LBL_LEFT=10;
contactViewApp_t.prototype.ALERT_LBL_TOP=35;
contactViewApp_t.prototype.SELECT_BOTTOM=25;
contactViewApp_t.prototype.SEPARATOR_LEFT=10;
contactViewApp_t.prototype.SEPARATOR_TOP=100;
contactViewApp_t.prototype.TAB_LIST_LEFT=10;
contactViewApp_t.prototype.TAB_LIST_TOP=0;
contactViewApp_t.prototype.PROFILE_TITLE_LEFT=0;
contactViewApp_t.prototype.PROFILE_TITLE_TOP=0;
contactViewApp_t.prototype.PROFILE_USER_LBL_LEFT=105;
contactViewApp_t.prototype.PROFILE_USER_LBL_WIDTH=150;
contactViewApp_t.prototype.AVATAR_IMG_WIDTH=50;
contactViewApp_t.prototype.AVATAR_IMG_HEIGHT=50;
contactViewApp_t.prototype.MULTI_TEXT="-";
contactViewApp_t.prototype.TRACK_STATUS_OFF_IMG="img/app/app/contactmanager/off";
contactViewApp_t.prototype.TRACK_STATUS_ACQ_IMG="img/app/app/contactmanager/acq";
contactViewApp_t.prototype.TRACK_STATUS_FRIEND_IMG="img/app/app/contactmanager/friend";
contactViewApp_t.prototype.TRACK_STATUS_TRUST_IMG="img/app/app/contactmanager/trust";
contactViewApp_t.prototype.TRACKING_RULE_FRAME_WIDTH=640;
contactViewApp_t.prototype.TRACKING_RULE_FRAME_HEIGHT=600;
contactViewApp_t.prototype.TRACKING_GRID_WIDTH=520;
contactViewApp_t.prototype.TRACKING_GRID_HEIGHT=200;
contactViewApp_t.prototype.TRACKING_CONTAINER_WIDTH=620;
contactViewApp_t.prototype.TRACKING_RULE_SELECT_WIDTH=contactViewApp_t.prototype.TRACKING_CONTAINER_WIDTH/2;
contactViewApp_t.prototype.TRACKING_RULE_SELECT_HEIGHT=90;
contactViewApp_t.prototype.ACCURACY_SLIDER_LENGTH=225;
contactViewApp_t.prototype.RULE_HISTORY_NUMBER_WIDTH=40;
contactViewApp_t.prototype.RULE_HISTORY_PERIOD_WIDTH=70;
contactViewApp_t.prototype.RULE_PP_LIST_HEIGHT=110;
contactViewApp_t.prototype.RULE_PP_LIST_WIDTH=250;
contactViewApp_t.prototype.RULE_CONTACT_LIST_HEIGHT=110;
contactViewApp_t.prototype.RULE_CONTACT_LIST_WIDTH=250;
contactViewApp_t.prototype.PPOINT_ITEM_DELETE_IMG="img/app/system/icons/silk/cancel";
contactViewApp_t.prototype.T_FILTER_ALL=1;
contactViewApp_t.prototype.T_FILTER_TRACK_ME=2;
contactViewApp_t.prototype.T_FILTER_TRACK_ME_NOT=3;
contactViewApp_t.prototype.ACTION_ADD_TRACKING_SCENARIO=4;
contactViewApp_t.prototype.ACTION_REMOVE_TRACKING_SCENARIO=5;
contactViewApp_t.prototype.ACTION_UPDATE_TRACKING_SCENARIO=6;
contactViewApp_t.prototype.ACTION_GET_TRACKING_SCENARIOS=7;
contactViewApp_t.prototype.PRIORITY_FULL=100;
contactViewApp_t.prototype.PRIORITY_NONE=0;
contactViewApp_t.prototype.CONTACT_SEARCH_FRAME_WIDTH=500;
contactViewApp_t.prototype.CONTACT_SEARCH_FRAME_HEIGHT=300;
contactViewApp_t.prototype.CONTACT_FRAME_WIDTH=500;
contactViewApp_t.prototype.CONTACT_FRAME_HEIGHT=300;
}
catch(ex){
jsExDebug("contactViewApp_t.prototype",ex);
}
function contactViewApp_t(_1){
try{
this.contactViewApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_1[0]){
return;
}
this.contactId=_1[0];
var _2=[];
_2[this.ACCEPTED]={button:null,contacts:[],actions:[],columns:[],profile:[]};
_2[this.ACCEPTED].profile.tabs=[];
_2[this.ACCEPTED].profile.updateFunction=this.updateAcceptedProfile;
this.data=_2;
this.currentData=this.ACCEPTED;
this.currentSearchTerm="";
this.refreshDelegate=new this.SYSTEM.Delegate(this,this.contactsRefreshCallback);
this.contactsActionIndex=this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ,this.refreshDelegate);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ_CONTACT,this.refreshDelegate,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_UNBLOCK,this.refreshDelegate,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_REMOVE,this.refreshDelegate,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ_RECEIVED,this.refreshDelegate,this.contactsActionIndex);
this.SYSTEM.Contacts.getContactAcceptedContacts(_1[0],new this.SYSTEM.Delegate(this,this.getContactAcceptedContactsCallback));
}
catch(ex){
jsExDebug("contactViewApp_t",ex);
}
}
function contactViewApp_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.Contacts){
me.SYSTEM.Contacts.unregisterActionListener(me.contactsActionIndex);
me.contactsActionIndex=null;
}
for(var i=1;i<me.data.length;i++){
var _5=me.data[i];
if(_5){
me.data[i].button=null;
for(var j=0;j<_5.contacts.length;j++){
me.data[i].contacts[j].cleanUp();
me.data[i].contacts[j]=null;
delete me.data[i].contacts[j];
}
for(j=0;j<_5.actions.length;j++){
me.data[i].actions[j]=null;
delete me.data[i].actions[j];
}
for(j=0;j<_5.columns.length;j++){
me.data[i].columns[j]=null;
delete me.data[i].columns[j];
}
for(j in _5.profile.tabs){
if(_5.profile.tabs[j] instanceof Array){
for(var k=0;k<_5.profile.tabs[j].length;k++){
me.data[i].profile.tabs[j][k]=null;
delete me.data[i].profile.tabs[j][k];
}
me.data[i].profile.tabs[j]=null;
}
}
me.data[i].profile.tabList=null;
me.data[i].profile.tabs=null;
me.data[i].profile.updateFunction=null;
me.data[i].profile=null;
me.data[i].contacts=null;
me.data[i].actions=null;
me.data[i].columns=null;
}
me.data[i]=null;
delete me.data[i];
}
me.data=null;
me.contactId=null;
me.contactSelect=null;
me.avatarImage=null;
me.contactSelectContent=null;
me.frame=null;
if(me.refreshDelegate){
me.refreshDelegate.cleanUp();
me.refreshDelegate=null;
}
me.application_cleanUp();
}
catch(ex){
jsExDebug("contactViewApp_cleanUp",ex);
}
}
function contactViewApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("contactViewApp__SIG_KILL",ex);
}
}
function contactViewApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("contactViewApp__SIG_THEME",ex);
}
}
function contactViewApp_createFrame(_8,_9){
try{
var _a=this.FRAME_WIDTH;
var _b=this.FRAME_HEIGHT;
var _c=this.SYSTEM.Widget;
var _d=new this.SYSTEM.Frame.Window("frame",this.APP_NAME+": "+_8,this,_a,_b,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_d.setMinimumSize(_a,_b);
_d.allowWindowOverflow();
this.data[this.ACCEPTED].columns=["Username","Name","Your relationship"];
this.data[this.ACCEPTED].contacts=_9;
var _e=_d.getInternalWidth();
var _f=new _c.SelectTable("contactSelect",this.data[this.currentData].columns,20);
_f.addEventHandler(_f.SORT_EVENT,new this.SYSTEM.Delegate(this,this.contactSelectSortEvent));
_f.addEventHandler(_f.COLUMN_RESIZE_END_EVENT,new this.SYSTEM.Delegate(this,this.contactSelectResizeEvent));
this.contactSelect=_f;
this.createContactSelectExtraContent(_d);
if(this.contactSelectContent){
_f.allowExtraSelectedRow(this.contactSelectContent,this.data[this.ACCEPTED].columns.length);
}
var _10=new this.SYSTEM.Widget.Label("searchLabel","Filter");
var _11=new this.SYSTEM.Widget.Text("searchText");
_11.setDimensions(60);
_d.addWidget(_10,_d.leftEdgeWidth,_d.bottomEdgeHeight,false,true);
_d.addWidget(_11,_10.positionX+50,_d.bottomEdgeHeight,false,true);
_d.addWidget(_f,_d.leftEdgeWidth,_d.topEdgeHeight);
_d.show();
this.frame=_d;
for(var i=0;i<_9.length;i++){
this.addContactRow(_9[i],this.ACCEPTED);
}
_d.setDimensions(_d.width,_d.height);
}
catch(ex){
jsExDebug("contactViewApp_createFrame",ex);
}
}
function contactViewApp_createContactSelectExtraContent(_13){
try{
var _14=this.borderStyle;
var _15=this.SYSTEM.UserDetails.SIDE_50;
var _16=_15+2;
var w=this.SYSTEM.Widget;
var _18=20;
var _19=_15+(2*this.pad);
var _1a=this.SYSTEM.Dom.createImage(null,"absolute",_15,_15,this.pad,this.pad);
var _1b=this.SYSTEM.Widget;
var _1c=new w.Label("generalNameLabel");
_1c.setBold();
_1c.setDimensions(200);
_1c.setFontSize(null,null,12);
var _1d=new this.SYSTEM.Widget.TextButton("generalSendRequestBtn",100,"Send Request");
var _1e=new _1b.Label("generalMutualLabel");
var _1f=this.SYSTEM.Dom.createDiv("relative",null,_19);
_1f.style.width="100%";
var _20=this.SYSTEM.Dom.createDiv("relative","100%","100%");
if(getContrastingColour(this.SYSTEM.Dom.getCurrentStyle(document.body).color)=="rgb(0,0,0)"){
_20.style.backgroundColor="rgb(255,255,255)";
this.SYSTEM.Dom.setElementOpacity(_20,0.3);
}else{
_20.style.backgroundColor="rgb(200,200,200)";
this.SYSTEM.Dom.setElementOpacity(_20,0.4);
}
_1f.appendChild(_20);
_1f.appendChild(_1a);
_13.addWidgetToDom(_1c,_1f,(2*this.pad)+_15,this.pad);
_13.addWidgetToDom(_1e,_1f,_1c.positionX,_1c.positionY+20);
_13.addWidgetToDom(_1d,_1f,_1e.positionX+_1c.width+this.pad,this.pad);
this.avatarImage=_1a;
this.contactSelectContent=_1f;
}
catch(ex){
jsExDebug("contactManagerApp_createContactSelectExtraContent",ex);
}
}
function contactViewApp_notificationAlert(_21){
try{
var _22=new this.SYSTEM.Dialogue.OkAlert(this,"ContactManager",_21);
}
catch(ex){
jsExDebug("contactViewApp_notificationAlert",ex);
}
}
function contactViewApp_addContactRow(_23,_24){
try{
if(!_23||!_23.userName){
return;
}
var _25=this.frame.getWidget("contactSelect");
var _26=_23.firstName+" "+_23.lastName;
_26=(_26.length>1?_26:"-");
switch(_24){
case this.ACCEPTED:
_25.addRow(_23,_23.userName,_26,this.getRelationshipText(_23.username));
break;
}
}
catch(ex){
jsExDebug("contactViewApp_addContactRow",ex);
}
}
function contactViewApp_getRelationshipText(_27){
try{
var _28=this.SYSTEM.Contacts.getContactTrackStatusFromUsername(_27);
var _29="";
switch(_28){
case this.SYSTEM.Contacts.STATUS_REQUEST_SENT:
_29="Awaiting their response";
break;
case this.SYSTEM.Contacts.STATUS_REQUEST_RECEIVED:
_29="Awaiting your response";
break;
case this.SYSTEM.Contacts.STATUS_ACCEPTED:
_29="Mutual Contact";
break;
case this.SYSTEM.Contacts.STATUS_REJECT_SENT:
_29="Rejected by you";
break;
case this.SYSTEM.Contacts.STATUS_REJECT_RECEIVED:
_29="Rejected by them";
break;
case this.SYSTEM.Contacts.STATUS_BLOCK_SENT:
_29="Blocked by you";
break;
case this.SYSTEM.Contacts.STATUS_BLOCK_RECEIVED:
_29="Blocked by them";
break;
default:
_29="Unknown";
break;
}
return _29;
}
catch(ex){
jsExDebug("contactViewApp_getRelationshipText",ex);
}
}
function contactViewApp_applySearch(){
try{
var _2a=(this.currentSearchTerm?"^.*"+this.currentSearchTerm.toLowerCase()+".*$":".*");
var _2b=new RegExp(_2a);
var _2c=this.frame.getWidget("contactSelect");
var _2d=this.data[this.currentData].contacts;
var _2e=[];
for(var i=0;i<_2d.length;i++){
if(_2d[i].match(_2b)){
_2e.push(i);
}
}
_2c.clearList(true);
for(var j=0;j<_2e.length;j++){
index=_2e[j];
this.addContactRow(_2d[index],this.currentData);
}
}
catch(ex){
jsExDebug("contactViewApp_applySearch",ex);
}
}
function contactViewApp_getContactAcceptedContactsCallback(_31,_32){
try{
this.createFrame(_31,_32);
this.binding_contactSelect_itemSelect(this.contactSelect);
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("contactViewApp_getContactAcceptedContactsCallback",ex);
}
}
function contactViewApp_contactsRefreshCallback(){
function callback(_33,_34){
try{
if(!this.frame){
return;
}
this.frame.getWidget("contactSelect").clearList(true);
for(var i=0;i<_34.length;i++){
this.addContactRow(_34[i],this.ACCEPTED);
}
this.binding_contactSelect_itemSelect(this.contactSelect);
}
catch(ex){
jsExDebug("contactViewApp_contactsRefreshCallback: callback",ex);
}
}
try{
if(!this.frame){
return;
}
this.SYSTEM.Contacts.getContactAcceptedContacts(this.contactId,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("contactViewApp_contactsRefreshCallback",ex);
}
}
function contactViewApp_frame__onClose(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("contactViewApp_frame__onClose",ex);
}
}
function contactViewApp_frame__onResize(_36){
try{
if(!this.frame){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _39=null;
var _3a=null;
if(dX||dY){
_39=_36.width+this.SYSTEM.Event.dragDistanceX;
_3a=_36.height+this.SYSTEM.Event.dragDistanceY;
if(_39<=_36.minimumWidth){
_39=_36.minimumWidth;
}
if(_3a<=_36.minimumHeight){
_3a=_36.minimumHeight;
}
}else{
_39=_36.width;
_3a=_36.height;
}
var _3b=_36.getInternalWidth(_39);
var _3c=this.frame.getWidget("contactSelect");
_3c.setDimensions(_3b-this.pad-(this.BORDER_WIDTH_PADDING*2),_36.getInternalHeight(_3a)-this.SELECT_BOTTOM);
this.contactSelect.autoSizeColumns();
var _3d=_36.getWidget("searchText");
_3d.setDimensions(_3b-_3d.positionX);
}
catch(ex){
jsExDebug("contactViewApp_frame__onResize",ex);
}
}
function contactViewApp_frame_keyUp(_3e){
try{
var _3f=this.frame.getWidget("searchText");
if(_3f.hasFocus()){
var _40=_3f.getContent();
var _41=_40.split(",");
_40="";
for(var i in _41){
if(_41[i]){
_40+="("+_41[i]+")|";
}
}
_40=_40.replace(/\|$/,"");
this.currentSearchTerm=_40;
this.applySearch();
}
}
catch(ex){
jsExDebug("contactViewApp_frame_keyUp",ex);
}
}
function contactViewApp_contactSearchFrame__onClose(_43){
try{
_43.cleanUp();
this.contactSearchFrame=null;
}
catch(ex){
jsExDebug("contactViewApp_contactSearchFrame__onClose",ex);
}
}
function contactViewApp_contactFrame__onClose(_44){
try{
_44.cleanUp();
}
catch(ex){
jsExDebug("contactViewApp_contactFrame__onClose",ex);
}
}
function contactViewApp_binding_contactSelect_itemSelect(_45){
function response(xml,me){
try{
if(xml){
me.frame.getWidget("generalMutualLabel").setText("<b>Mutual Contacts</b>: "+getNodeValue(xml,"c"));
}
}
catch(ex){
jsExDebug("contactViewApp_updateAcceptedProfile: response",ex);
}
}
try{
var _48=_45.getSelectedValue();
if(_45.settingExtraSelectedRow&&_48&&_48.length==1){
var _49=_48[0];
var _4a=this.frame;
var _4b=_49.getAvatarPath(_49.AVATAR_CONTACT_PROFILE);
var _4c=[_49.firstName,_49.lastName].join(" ");
if(_4c.length==1){
_4c=_49.userName;
}
var _4d=this.frame.getWidget("generalNameLabel");
var _4e=this.frame.getWidget("generalSendRequestBtn");
this.avatarImage.style.display="block";
this.avatarImage.src=_4b;
_4d.setText(_4c);
if(this.SYSTEM.Contacts.getContactFromUserId(_49.userId)){
_4e.hide();
_4e.setValue(null);
}else{
_4e.setValue(_49);
_4e.show();
}
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=usercontacts&action=13","contactId="+_49.contactId,response,this);
}
}
catch(ex){
jsExDebug("contactViewApp_binding_contactSelect_itemSelect",ex);
}
}
function contactViewApp_binding_generalSendRequestBtn_click(_4f){
try{
var _50=_4f.getValue();
if(_50){
var d=new this.SYSTEM.Dialogue.AcceptRequest(this,[_50.userName],true);
}
}
catch(ex){
jsExDebug("contactViewApp_binding_generalSendRequestBtn_click",ex);
}
}

try{
pointViewApp_t.prototype=new application_t();
pointViewApp_t.prototype.constructor=pointViewApp_t;
pointViewApp_t.prototype.pointViewApp_super=application_t.prototype.constructor;
pointViewApp_t.prototype.cleanUp=pointViewApp_cleanUp;
pointViewApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
pointViewApp_t.prototype._SIG_KILL=pointViewApp__SIG_KILL;
pointViewApp_t.prototype._SIG_THEME=pointViewApp__SIG_THEME;
pointViewApp_t.prototype.createPanel=pointViewApp_createPanel;
pointViewApp_t.prototype.createManager=pointViewApp_createManager;
pointViewApp_t.prototype.populate=pointViewApp_populate;
pointViewApp_t.prototype.populateCallback=pointViewApp_populateCallback;
pointViewApp_t.prototype.applySearchAndSort=pointViewApp_applySearchAndSort;
pointViewApp_t.prototype.frame__onClose=pointViewApp_frame__onClose;
pointViewApp_t.prototype.frame__onResize=pointViewApp_frame__onResize;
pointViewApp_t.prototype.frame_keyUp=pointViewApp_frame_keyUp;
pointViewApp_t.prototype.binding_refreshBtn_click=pointViewApp_binding_refreshBtn_click;
pointViewApp_t.prototype.APP_ID=APP_ID_POINT_VIEW;
pointViewApp_t.prototype.APP_NAME="PointViewer";
pointViewApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.PEEPELPOINT_MANAGER;
pointViewApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
pointViewApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
pointViewApp_t.prototype.FRAME_WIDTH=400;
pointViewApp_t.prototype.FRAME_HEIGHT=500;
pointViewApp_t.prototype.FRAME_MIN_HEIGHT=250;
pointViewApp_t.prototype.INFO_LEFT=0;
pointViewApp_t.prototype.INFO_TOP=0;
pointViewApp_t.prototype.LIST_ITEM_HEIGHT=140;
pointViewApp_t.prototype.LIST_ITEM_COLLAPSED_HEIGHT=25;
pointViewApp_t.prototype.LIST_LEFT=0;
pointViewApp_t.prototype.LIST_TOP=50;
pointViewApp_t.prototype.LIST_HEIGHT_DIFF=pointViewApp_t.prototype.LIST_TOP+50;
pointViewApp_t.prototype.REFRESH_LEFT=210;
pointViewApp_t.prototype.REFRESH_TOP=430;
pointViewApp_t.prototype.REFRESH_IMG="img/app/system/icons/utility/refresh";
pointViewApp_t.prototype.SORT_LEFT=0;
pointViewApp_t.prototype.SORT_NAME=2;
}
catch(ex){
jsExDebug("pointViewApp_t.prototype",ex);
}
function pointViewApp_t(_1){
try{
this.pointViewApp_super();
if(!this.FRAMEWORK_INITIALISED||!_1[0]){
return;
}
this.contactId=parseInt(_1[0]);
this.pointData=null;
this.idArray=[];
this.currentSortType=this.SORT_NAME;
this.currentSearchTerm="";
this.createPanel();
this.createManager();
this.pointsActionIndex=this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_READ,new this.SYSTEM.Delegate(this,this.refreshCallback));
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_ADD,new this.SYSTEM.Delegate(this,this.newPointCallback),this.pointsActionIndex);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_DELETE,new this.SYSTEM.Delegate(this,this.deletePointCallback),this.pointsActionIndex);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_UPDATE,new this.SYSTEM.Delegate(this,this.updatePointCallback),this.pointsActionIndex);
this.populate();
}
catch(ex){
jsExDebug("pointViewApp_t",ex);
}
}
function pointViewApp_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.PeepelPoints){
me.SYSTEM.PeepelPoints.unregisterActionListener(me.pointsActionIndex);
me.pointsActionIndex=null;
}
me.fileBrowser=null;
me.frame=null;
for(var i=0;i<me.idArray.length;i++){
me.idArray[i]=null;
}
me.idArray=null;
me.contactId=null;
me.pointData=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("pointViewApp_cleanUp",ex);
}
}
function pointViewApp_createPanel(){
try{
var _4=this.APPLICATION.Panel;
}
catch(ex){
jsExDebug("pointViewApp_createPanel",ex);
}
}
function pointViewApp_createManager(){
try{
var _5=new this.SYSTEM.Frame.Window("frame",this.APP_NAME+": "+this.SYSTEM.Contacts.getContactUserName(this.contactId),this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_5.setMinimumSize(this.FRAME_WIDTH,this.FRAME_MIN_HEIGHT);
_5.setMaximumSize(this.FRAME_WIDTH);
_5.allowWindowOverflow();
var _6=this.SYSTEM.Widget;
var _7=new _6.Label("infoLabel");
_7.setText("Double click on an item to view the Peepel Point, or single click to expand the item for more options.");
var _8=_5.getInternalWidth()-50;
var _9=new _6.FixedList("pointList",_8,this.LIST_ITEM_HEIGHT,_8,this.LIST_ITEM_COLLAPSED_HEIGHT);
_9.setBorder("solid 1px black");
var _a=new _6.Button("refreshBtn",this.REFRESH_IMG,_6.Button.HOVER_IMAGE,null,null,"Refresh","Refresh the list of PeepelPoints.");
var _b=new _6.Label("searchLabel","Filter");
var _c=new _6.Text("searchText");
var _d=_5.topEdgeHeight;
var _e=_5.leftEdgeWidth;
_5.addWidget(_7,_e,_d);
_5.addWidget(_9,_e+this.LIST_LEFT,_d+this.LIST_TOP);
_5.addWidget(_a,_e+this.REFRESH_LEFT,_5.bottomEdgeHeight,false,true);
_5.addWidget(_b,_e+this.SORT_LEFT,_5.bottomEdgeHeight,false,true);
_5.addWidget(_c,_e+this.SORT_LEFT+50,_5.bottomEdgeHeight,false,true);
this.frame=_5;
this.infoLabel=_7;
_5.setDimensions(_5.width,_5.height);
_5.show();
}
catch(ex){
jsExDebug("pointViewApp_createManager",ex);
}
}
function pointViewApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("pointViewApp__SIG_KILL",ex);
}
}
function pointViewApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("pointViewApp__SIG_THEME",ex);
}
}
function pointViewApp_populate(){
function timeout(){
try{
this.SYSTEM.PeepelPoints.getContactSharedPoints(this.contactId,new this.SYSTEM.Delegate(this,this.populateCallback));
}
catch(ex){
jsExDebug("pointViewApp_populate: timeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,timeout),this.APP_NAME,"Getting points...");
}
catch(ex){
jsExDebug("pointViewApp_populate",ex);
}
}
function pointViewApp_populateCallback(_f){
try{
this.pointData=_f;
this.applySearchAndSort();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("pointViewApp_populateCallback",ex);
}
}
function pointViewApp_applySearchAndSort(){
try{
var _10=(this.currentSearchTerm?"^.*"+this.currentSearchTerm.toLowerCase()+".*$":".*");
var _11=new RegExp(_10);
var _12=this.pointData;
var _13=this.frame.getWidget("pointList");
_13.removeAllItems();
this.idArray=[];
switch(this.currentSortType){
case this.SORT_NAME:
var _14=[];
var _15=[];
for(var i=0;i<_12.length;i++){
if(_12[i].name.toLowerCase().match(_11)||_12[i].match(_11)){
if(!_14[_12[i].name]){
_15.push(_12[i].name);
_14[_12[i].name]=[];
}
_14[_12[i].name].push(i);
}
}
sortListAsc(_15,true);
var _17=null;
var _18=null;
var _19=0;
for(var i=0;i<_15.length;i++){
_17=_14[_15[i]];
for(var j=0;j<_17.length;j++){
_18=_17[j];
var _1b=new sharedPeepelPointItem_t(_12[_18].name,_12[_18]);
_13.addItem(_1b);
this.idArray[_12[_18].getId()]=_19;
_19++;
}
}
break;
}
_13.collapseAllItems();
}
catch(ex){
jsExDebug("pointViewApp_applySearchAndSort",ex);
}
}
function pointViewApp_frame__onClose(_1c){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("pointViewApp_frame__onClose",ex);
}
}
function pointViewApp_frame__onResize(_1d){
try{
if(!_1d.getWidget("pointList")){
return;
}
var _1e;
var _1f;
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
if(dX||dY){
_1e=_1d.width+this.SYSTEM.Event.dragDistanceX;
_1f=_1d.height+this.SYSTEM.Event.dragDistanceY;
var _22=_1d.minimumWidth;
var _23=_1d.minimumHeight;
_1e=(_1e<_22?_22:_1e);
_1f=(_1f<_23?_23:_1f);
var _24=_1d.maximumWidth;
var _25=_1d.maximumHeight;
_1e=(_1e>_24?_24:_1e);
_1f=(_1f>_25?_25:_1f);
}else{
_1e=_1d.width;
_1f=_1d.height;
}
_1d.getWidget("pointList").setDimensions(_1d.getInternalWidth(_1e),_1d.getInternalHeight(_1f)-this.LIST_HEIGHT_DIFF);
}
catch(ex){
jsExDebug("pointViewApp_frame__onResize",ex);
}
}
function pointViewApp_frame_keyUp(key){
try{
var _27=this.frame.getWidget("searchText");
if(_27.hasFocus()){
var _28=_27.getContent();
var _29=_28.split(",");
_28="";
for(var i in _29){
if(_29[i]){
_28+="("+_29[i]+")|";
}
}
_28=_28.replace(/\|$/,"");
this.currentSearchTerm=_28;
this.applySearchAndSort();
}
}
catch(ex){
jsExDebug("pointViewApp_frame_keyUp",ex);
}
}
function pointViewApp_binding_refreshBtn_click(_2b){
try{
this.populate();
}
catch(ex){
jsExDebug("pointViewApp_binding_refreshBtn_click",ex);
}
}

try{
mediaViewApp_t.prototype=new application_t();
mediaViewApp_t.prototype.constructor=mediaViewApp_t;
mediaViewApp_t.prototype.cleanUp=mediaViewApp_cleanUp;
mediaViewApp_t.prototype.mediaViewApp_super=application_t.prototype.constructor;
mediaViewApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
mediaViewApp_t.prototype._SIG_THEME=mediaViewApp__SIG_THEME;
mediaViewApp_t.prototype.frame__onClose=mediaViewApp_frame__onClose;
mediaViewApp_t.prototype.frame__onResize=mediaViewApp_frame__onResize;
mediaViewApp_t.prototype.frame__onScrollUp=mediaViewApp_frame__onScrollUp;
mediaViewApp_t.prototype.frame__onScrollDown=mediaViewApp_frame__onScrollDown;
mediaViewApp_t.prototype.createFrame=mediaViewApp_createFrame;
mediaViewApp_t.prototype.createPanel=mediaViewApp_createPanel;
mediaViewApp_t.prototype.imageSizeResponse=mediaViewApp_imageSizeResponse;
mediaViewApp_t.prototype.applyZoom=mediaViewApp_applyZoom;
mediaViewApp_t.prototype.centreImage=mediaViewApp_centreImage;
mediaViewApp_t.prototype.publicFileCreatedCallback=mediaViewApp_publicFileCreatedCallback;
mediaViewApp_t.prototype.binding_zoomSelect_itemSelect=mediaViewApp_binding_zoomSelect_itemSelect;
mediaViewApp_t.prototype.binding_setBgImageBtn_click=mediaViewApp_binding_setBgImageBtn_click;
mediaViewApp_t.prototype.binding_setAvatarImageBtn_click=mediaViewApp_binding_setAvatarImageBtn_click;
mediaViewApp_t.prototype.binding_importAsFileBtn_click=mediaViewApp_binding_importAsFileBtn_click;
mediaViewApp_t.prototype.APP_ID=APP_ID_MEDIA_VIEW;
mediaViewApp_t.prototype.APP_NAME="MediaView";
mediaViewApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.WELCOME;
mediaViewApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
mediaViewApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
}
catch(ex){
jsExDebug("mediaViewApp_t,prototype",ex);
}
function mediaViewApp_t(_1){
try{
this.mediaViewApp_super();
this.zoomValues=[0.1,0.25,0.5,0.75,1,1.5,2,3];
this.zoomIndex=4;
this.file=null;
this.fileId=null;
var _2=_1[0];
var _3=_1[1];
var _4=_1[2];
if(_2){
this.file=this.SYSTEM.Filesystem.getFileFromFileId(_2);
this.imageSrc=this.SYSTEM.Environment.USER_DATA_PATH+"revision/"+this.file.location+"/"+this.file.fileGuid+"_0.s";
this.SYSTEM.Network.request("imagesize.php","f="+this.file.fileGuid+"&loc="+this.file.location,this.imageSizeResponse,this);
this.fileId=_2;
this.createPanel();
this.createFrame();
}else{
if(_3!=null){
this.fileId=_3;
this.file=new this.SYSTEM.Filesystem.PublicFile(_1[1],null,null,new this.SYSTEM.Delegate(this,this.publicFileCreatedCallback));
}else{
if(_4){
this.imageSrc=_4;
this.SYSTEM.Network.request("imagesize.php","url="+_4,this.imageSizeResponse,this);
this.file=null;
this.fileId=null;
this.createPanel();
this.createFrame();
}
}
}
}
catch(ex){
jsExDebug("mediaViewApp_t",ex);
}
}
function mediaViewApp_cleanUp(me){
try{
if(!me){
me=this;
}
me.file=null;
me.fileId=null;
me.frame=null;
me.imageContainer=null;
me.imageSrc=null;
me.imageWidth=null;
me.imageHeight=null;
me.zoomValues=null;
me.zoomIndex=null;
me.zoomSelect=null;
me.image=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("mediaViewApp_cleanUp",ex);
}
}
function mediaViewApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("mediaViewApp__SIG_THEME",ex);
}
}
function mediaViewApp_capture(){
try{
var _6=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _7=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="frame:"+(this.frame.width/_7)+","+(this.frame.height/_6)+","+(this.frame.positionX/_7)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_6);
return this.captureString;
}
catch(ex){
jsExDebug("mediaViewApp_capture",ex);
}
}
function mediaViewApp_restore(_8){
try{
if(!_8){
return;
}
var _9=_8.split(":")[1].split(",");
var _a=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _b=this.SYSTEM.Environment.SCREEN_WIDTH;
var _c=parseInt(_b*parseFloat(_9[0]));
var _d=parseInt(_a*parseFloat(_9[1]));
var _e=parseInt(_b*parseFloat(_9[2]));
var _f=parseInt((_a*parseFloat(_9[3]))+this.SYSTEM.Panel.getHeight());
this.frame.setDimensions(_c,_d);
this.frame.setPosition(_e,_f);
}
catch(ex){
jsExDebug("mediaViewApp_restore",ex);
}
}
function mediaViewApp_frame__onClose(_10){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("mediaViewApp_frame__onClose",ex);
}
}
function mediaViewApp_frame__onResize(_11){
try{
if(!this.frame){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _14=null;
var _15=null;
if(dX||dY){
_14=_11.width+this.SYSTEM.Event.dragDistanceX;
_15=_11.height+this.SYSTEM.Event.dragDistanceY;
if(_14<=_11.minimumWidth){
_14=_11.minimumWidth;
}
if(_15<=_11.minimumHeight){
_15=_11.minimumHeight;
}
}else{
_14=_11.width;
_15=_11.height;
}
this.imageContainer.style.width=_11.getInternalWidth(_14)+"px";
this.imageContainer.style.height=_11.getInternalHeight(_15)+"px";
this.centreImage();
}
catch(ex){
jsExDebug("mediaViewApp_frame__onResize",ex);
}
}
function mediaViewApp_frame__onScrollUp(_16){
try{
if(this.zoomIndex<this.zoomValues.length-1){
this.zoomIndex++;
this.zoomSelect.setSelectedValue(this.zoomIndex);
this.applyZoom();
this.centreImage();
}
}
catch(ex){
jsExDebug("mediaViewApp_frame__onScrollUp",ex);
}
}
function mediaViewApp_frame__onScrollDown(_17){
try{
if(this.zoomIndex>0){
this.zoomIndex--;
this.zoomSelect.setSelectedValue(this.zoomIndex);
this.applyZoom();
this.centreImage();
}
}
catch(ex){
jsExDebug("mediaViewApp_frame__onScrollDown",ex);
}
}
function mediaViewApp_createFrame(){
try{
var _18=new this.SYSTEM.Frame.Window("frame",this.APP_NAME,this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_18.setMinimumSize(this.FRAME_WIDTH);
_18.setPosition(_18.positionX+_18.leftEdgeWidth,_18.positionY+_18.topEdgeHeight);
var _19=this.SYSTEM.Dom.createDiv("absolute",_18.getInternalWidth()-2,_18.getInternalHeight()-2,_18.leftEdgeWidth,_18.topEdgeHeight);
_19.style.overflow="auto";
_19.style.backgroundColor="white";
_19.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
var _1a=this.SYSTEM.Dom.createImage(this.imageSrc,"absolute");
_19.appendChild(_1a);
_18.windowDiv.appendChild(_19);
_18.show();
this.frame=_18;
this.imageContainer=_19;
this.image=_1a;
}
catch(ex){
jsExDebug("mediaViewApp_createFrame",ex);
}
}
function mediaViewApp_createPanel(){
try{
var _1b=this.APPLICATION.Panel;
var _1c=this.SYSTEM.Widget;
var _1d=new _1c.Label("zoomLabel","Zoom");
var _1e=new _1c.DropText("zoomSelect",60,null,60);
for(var i=0;i<this.zoomValues.length;i++){
_1e.addItem(i,(this.zoomValues[i]*100)+"%");
}
_1b.addTab("Options");
_1b.addToolgroup("Zoom",146,"Options");
_1b.addWidget(_1d,4,6,"Zoom");
_1b.addWidget(_1e,50,4,"Zoom");
if(this.fileId){
_1b.addToolgroup("Use media",198,"Options");
if(this.file){
_1b.addWidget(new _1c.TextButton("setBgImageBtn",190,"Set as Background Image"),4,4,"Use media");
_1b.addWidget(new _1c.TextButton("setAvatarImageBtn",190,"Set as your Avatar"),4,32,"Use media");
}
var _20=new sendToolgroup_t("sendToolgroup",this);
_20.setFileId(this.fileId);
_1b.insertToolgroup("Options",_20);
}
this.zoomSelect=_1e;
}
catch(ex){
jsExDebug("mediaViewApp_createPanel",ex);
}
}
function mediaViewApp_imageSizeResponse(xml,me){
try{
var _23=getChildNode(xml,"dim",0);
me.imageWidth=parseInt(_23.getAttribute("width"));
me.imageHeight=parseInt(_23.getAttribute("height"));
var _24=me.imageWidth+50;
var _25=me.imageHeight+50;
if(_24>me.SYSTEM.Environment.SCREEN_WIDTH){
_24=me.SYSTEM.Environment.SCREEN_WIDTH;
}
if(_25>me.SYSTEM.Environment.SCREEN_HEIGHT){
_25=me.SYSTEM.Environment.SCREEN_HEIGHT;
}
me.frame.setDimensions(_24,_25);
me.applyZoom();
me.centreImage();
me.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("mediaViewApp_imageSizeResponse",ex);
}
}
function mediaViewApp_applyZoom(){
try{
this.image.style.width=(this.zoomValues[this.zoomIndex]*this.imageWidth)+"px";
this.image.style.height=(this.zoomValues[this.zoomIndex]*this.imageHeight)+"px";
}
catch(ex){
jsExDebug("mediaViewApp_applyZoom",ex);
}
}
function mediaViewApp_centreImage(){
try{
if(this.image.style.width&&this.image.style.height){
this.image.style.left=((parseInt(this.imageContainer.style.width)/2)-(parseInt(this.image.style.width)/2))+"px";
this.image.style.top=((parseInt(this.imageContainer.style.height)/2)-(parseInt(this.image.style.height)/2))+"px";
}
}
catch(ex){
jsExDebug("mediaViewApp_centreImage",ex);
}
}
function mediaViewApp_publicFileCreatedCallback(){
try{
if(this.file.fileguid&&this.file.location){
this.imageSrc=this.SYSTEM.Environment.USER_DATA_PATH+"revision/"+this.file.location+"/"+this.file.fileguid+"_0.s";
this.SYSTEM.Network.request("imagesize.php","f="+this.file.fileguid+"&loc="+this.file.location,this.imageSizeResponse,this);
}
this.createPanel();
this.createFrame();
}
catch(ex){
jsExDebug("mediaViewApp_publicFileCreatedCallback",ex);
}
}
function mediaViewApp_binding_zoomSelect_itemSelect(_26){
try{
this.zoomIndex=_26.getSelectedValue();
this.applyZoom();
this.centreImage();
}
catch(ex){
jsExDebug("mediaViewApp_binding_zoomSelect_itemSelect",ex);
}
}
function mediaViewApp_binding_setBgImageBtn_click(_27){
try{
this.SYSTEM.Settings.set("desktop_image",this.file.fileid);
this.SYSTEM.Settings.commit();
}
catch(ex){
jsExDebug("mediaViewApp_binding_setBgImageBtn_click",ex);
}
}
function mediaViewApp_binding_setAvatarImageBtn_click(_28){
function commitCallback(){
try{
var d=new this.SYSTEM.Dialogue.OkAlert(this,this.APP_NAME,"Avatar updated");
}
catch(ex){
jsExDebug("mediaViewApp_binding_setAvatarImageBtn_click: commitCallback",ex);
}
}
try{
this.SYSTEM.UserDetails.updateAvatar(this.file.fileid);
this.SYSTEM.UserDetails.commit(new this.SYSTEM.Delegate(this,commitCallback));
}
catch(ex){
jsExDebug("mediaViewApp_binding_setAvatarImageBtn_click",ex);
}
}
function mediaViewApp_binding_importAsFileBtn_click(){
try{
alert("oi");
}
catch(ex){
jsExDebug("mediaViewApp_binding_importAsFileBtn_click",ex);
}
}

try{
mediaGalleryApp_t.prototype=new iframeApp_t();
mediaGalleryApp_t.prototype.constructor=mediaGalleryApp_t;
mediaGalleryApp_t.prototype.cleanUp=mediaGalleryApp_cleanUp;
mediaGalleryApp_t.prototype.mediaGalleryApp_super=iframeApp_t.prototype.constructor;
mediaGalleryApp_t.prototype.iframeApp_cleanUp=iframeApp_t.prototype.cleanUp;
mediaGalleryApp_t.prototype.capture=mediaGalleryApp_capture;
mediaGalleryApp_t.prototype.restore=mediaGalleryApp_restore;
mediaGalleryApp_t.prototype.createPanel=mediaGalleryApp_createPanel;
mediaGalleryApp_t.prototype.showMediaOnMap=mediaGalleryApp_showMediaOnMap;
mediaGalleryApp_t.prototype.showMedia=mediaGalleryApp_showMedia;
mediaGalleryApp_t.prototype.binding_perPageSelect_itemSelect=mediaGalleryApp_binding_perPageSelect_itemSelect;
mediaGalleryApp_t.prototype.binding_quickHelpBtn_click=mediaGalleryApp_binding_quickHelpBtn_click;
mediaGalleryApp_t.prototype.iframeOnLoadEvent=mediaGalleryApp_iframeOnLoadEvent;
mediaGalleryApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.MEDIA_GALLERY;
mediaGalleryApp_t.prototype.APP_NAME="MediaGallery";
mediaGalleryApp_t.prototype.APP_ID=APP_ID_MEDIA_GALLERY;
mediaGalleryApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
mediaGalleryApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
mediaGalleryApp_t.prototype.FRAME_WIDTH=600;
mediaGalleryApp_t.prototype.FRAME_HEIGHT=500;
mediaGalleryApp_t.prototype.FRAME_INIT_TITLE=mediaGalleryApp_t.prototype.APP_NAME;
mediaGalleryApp_t.prototype.IFRAME_TOP=0;
mediaGalleryApp_t.prototype.IFRAME_BORDER="none";
mediaGalleryApp_t.prototype.IFRAME_FRAMEBORDER="0";
mediaGalleryApp_t.prototype.IFRAME_BG_COLOUR="";
mediaGalleryApp_t.prototype.INTIAL_LOCATION="gallery/Default.htm";
mediaGalleryApp_t.prototype.FRAME_RESIZE=true;
mediaGalleryApp_t.prototype.IFRAME_WIDTH=mediaGalleryApp_t.prototype.FRAME_WIDTH-30;
mediaGalleryApp_t.prototype.IFRAME_HEIGHT=85;
mediaGalleryApp_t.prototype.OUTER_DIV_TOP=50;
mediaGalleryApp_t.prototype.DESC_HEIGHT=300;
mediaGalleryApp_t.prototype.DEFAULT_VALUE=4;
}
catch(ex){
jsExDebug("mediaGalleryApp_t.prototype",ex);
}
function mediaGalleryApp_t(_1){
try{
this.mediaGalleryApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("mediaGalleryApp_t",ex);
}
}
function mediaGalleryApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.frame=null;
me.iframe=null;
me.outerDiv=null;
me.perPageSelect=null;
me.iframeApp_cleanUp();
}
catch(ex){
jsExDebug("mediaGalleryApp_cleanUp",ex);
}
}
function mediaGalleryApp_capture(){
try{
var _3=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _4=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="import:"+(this.frame.width/_4)+","+(this.frame.height/_3)+","+(this.frame.positionX/_4)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_3);
return this.captureString;
}
catch(ex){
jsExDebug("mediaGalleryApp_capture",ex);
}
}
function mediaGalleryApp_restore(_5){
try{
if(!_5){
return;
}
var _6=_5.split(":")[1].split(",");
var _7=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _8=this.SYSTEM.Environment.SCREEN_WIDTH;
var _9=parseInt(_8*parseFloat(_6[0]));
var _a=parseInt(_7*parseFloat(_6[1]));
var _b=parseInt(_8*parseFloat(_6[2]));
var _c=parseInt((_7*parseFloat(_6[3]))+this.SYSTEM.Panel.getHeight());
this.frame.setDimensions(_9,_a);
this.frame.setPosition(_b,_c);
if(this.dragDiv.parentNode==this.frame.windowDiv){
this.frame.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("mediaGalleryApp_restore",ex);
}
}
function mediaGalleryApp_createPanel(){
try{
var _d=this.APPLICATION.Panel;
var _e=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
_d.addUtility(_e);
var _f=new this.SYSTEM.Widget.Label("perPageLabel","Number per page");
var _10=new this.SYSTEM.Widget.DropText("perPageSelect",100,null,100);
_10.addItem(2,2);
_10.addItem(4,4);
_10.addItem(6,6);
_10.addItem(8,8);
_10.addItem(10,10);
_10.addItem(12,12);
_10.addItem(14,14);
_10.addItem(18,18);
_10.addItem(24,24);
_10.setSelectedValue(this.DEFAULT_VALUE);
this.perPageSelect=_10;
_d.addTab("Media");
_d.addToolgroup("Settings",150,"Media");
_d.addWidget(_f,this.pad,this.pad,"Settings");
_d.addWidget(_10,this.pad,this.pad+20,"Settings");
}
catch(ex){
jsExDebug("mediaGalleryApp_createPanel",ex);
}
}
function mediaGalleryApp_showMediaOnMap(_11){
try{
var _12=SYSTEM.APPLICATION_MANAGER.getRunningApps(APP_ID_MAP);
if(_12[0]){
_12[0].showMediaLocations([_11]);
_12[0].mapFrame.focus();
}else{
var app=SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_MAP,this.APP_NAME,"Opening Map...",null,null,null,null,null,null,null,null,[_11]);
}
}
catch(ex){
jsExDebug("mediaGalleryApp_showMediaOnMap",ex);
}
}
function mediaGalleryApp_showMedia(_14){
try{
var app=SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_MEDIA_VIEW,this.APP_NAME,"Opening MediaView...",null,null,_14.enclosures[0].url);
}
catch(ex){
jsExDebug("mediaGalleryApp_showMedia",ex);
}
}
function mediaGalleryApp_binding_perPageSelect_itemSelect(_16){
try{
this.iframe.contentWindow.location=[this.INTIAL_LOCATION,"?user=",this.SYSTEM.UserDetails.id,"&limit=",_16.getSelectedValue()].join("");
}
catch(ex){
jsExDebug("mediaGalleryApp_binding_perPageSelect_itemSelect",ex);
}
}
function mediaGalleryApp_binding_quickHelpBtn_click(){
try{
var _17=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"media gallery");
}
catch(ex){
jsExDebug("mediaGalleryApp_binding_quickHelpBtn_click",ex);
}
}
function mediaGalleryApp_iframeOnLoadEvent(_18,me){
try{
if(!me.firstLoadComplete){
me.firstLoadComplete=true;
me.iframe.contentWindow.location=[me.INTIAL_LOCATION,"?user=",me.SYSTEM.UserDetails.id,"&limit=",me.perPageSelect.getSelectedValue()].join("");
}else{
me.iframe.contentWindow.mapCallback=me.showMediaOnMap;
me.iframe.contentWindow.mediaCallback=me.showMedia;
}
}
catch(ex){
jsExDebug("mediaGalleryApp_iframeOnLoadEvent",ex);
}
}

try{
contactManagerApp_t.prototype=new application_t();
contactManagerApp_t.prototype.constructor=contactManagerApp_t;
contactManagerApp_t.prototype.cleanUp=contactManagerApp_cleanUp;
contactManagerApp_t.prototype.contactManagerApp_super=application_t.prototype.constructor;
contactManagerApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
contactManagerApp_t.prototype.capture=contactManagerApp_capture;
contactManagerApp_t.prototype.restore=contactManagerApp_restore;
contactManagerApp_t.prototype._SIG_KILL=contactManagerApp__SIG_KILL;
contactManagerApp_t.prototype._SIG_THEME=contactManagerApp__SIG_THEME;
contactManagerApp_t.prototype.createPanel=contactManagerApp_createPanel;
contactManagerApp_t.prototype.createFrame=contactManagerApp_createFrame;
contactManagerApp_t.prototype.createContactSelectExtraContent=contactManagerApp_createContactSelectExtraContent;
contactManagerApp_t.prototype.contactsRefreshCallback=contactManagerApp_contactsRefreshCallback;
contactManagerApp_t.prototype.updateCount=contactManagerApp_updateCount;
contactManagerApp_t.prototype.notificationAlert=contactManagerApp_notificationAlert;
contactManagerApp_t.prototype.populateSelect=contactManagerApp_populateSelect;
contactManagerApp_t.prototype.addContactRow=contactManagerApp_addContactRow;
contactManagerApp_t.prototype.avatarChangeCallback=contactManagerApp_avatarChangeCallback;
contactManagerApp_t.prototype.searchForUser=contactManagerApp_searchForUser;
contactManagerApp_t.prototype.searchForUserResponse=contactManagerApp_searchForUserResponse;
contactManagerApp_t.prototype.locationInfoTimerCallback=contactManagerApp_locationInfoTimerCallback;
contactManagerApp_t.prototype.updateProfileMapSize=contactManagerApp_updateProfileMapSize;
contactManagerApp_t.prototype.setContactTrackStatus=contactManagerApp_setContactTrackStatus;
contactManagerApp_t.prototype.applySearch=contactManagerApp_applySearch;
contactManagerApp_t.prototype.getTrackStatusFilter=contactManagerApp_getTrackStatusFilter;
contactManagerApp_t.prototype.getSelectedContactIds=contactManagerApp_getSelectedContactIds;
contactManagerApp_t.prototype.unverifiedEmailCallback=contactManagerApp_unverifiedEmailCallback;
contactManagerApp_t.prototype.tempUsercallback=contactManagerApp_tempUsercallback;
contactManagerApp_t.prototype.contactSelectSortEvent=contactManagerApp_contactSelectSortEvent;
contactManagerApp_t.prototype.contactSelectResizeEvent=contactManagerApp_contactSelectResizeEvent;
contactManagerApp_t.prototype.userDetailsSaveCallback=contactManagerApp_userDetailsSaveCallback;
contactManagerApp_t.prototype.frame__onClose=contactManagerApp_frame__onClose;
contactManagerApp_t.prototype.frame__onResize=contactManagerApp_frame__onResize;
contactManagerApp_t.prototype.frame_keyUp=contactManagerApp_frame_keyUp;
contactManagerApp_t.prototype.contactSearchFrame__onClose=contactManagerApp_contactSearchFrame__onClose;
contactManagerApp_t.prototype.contactFrame__onClose=contactManagerApp_contactFrame__onClose;
contactManagerApp_t.prototype.binding_tabList_itemSelect=contactManagerApp_binding_tabList_itemSelect;
contactManagerApp_t.prototype.binding_addContactBtn_click=contactManagerApp_binding_addContactBtn_click;
contactManagerApp_t.prototype.binding_inviteUserBtn_click=contactManagerApp_binding_inviteUserBtn_click;
contactManagerApp_t.prototype.binding_acceptBtn_click=contactManagerApp_binding_acceptBtn_click;
contactManagerApp_t.prototype.binding_rejectBtn_click=contactManagerApp_binding_rejectBtn_click;
contactManagerApp_t.prototype.binding_blockRequestBtn_click=contactManagerApp_binding_blockRequestBtn_click;
contactManagerApp_t.prototype.binding_removeBtn_click=contactManagerApp_binding_removeBtn_click;
contactManagerApp_t.prototype.binding_blockAcceptedBtn_click=contactManagerApp_binding_blockAcceptedBtn_click;
contactManagerApp_t.prototype.binding_unblockBtn_click=contactManagerApp_binding_unblockBtn_click;
contactManagerApp_t.prototype.binding_refreshBtn_click=contactManagerApp_binding_refreshBtn_click;
contactManagerApp_t.prototype.binding_removeSentBtn_click=contactManagerApp_binding_removeSentBtn_click;
contactManagerApp_t.prototype.binding_contactSelect_itemSelect=contactManagerApp_binding_contactSelect_itemSelect;
contactManagerApp_t.prototype.binding_profileTrackOffBtn_click=contactManagerApp_binding_profileTrackOffBtn_click;
contactManagerApp_t.prototype.binding_profileTrackAcqBtn_click=contactManagerApp_binding_profileTrackAcqBtn_click;
contactManagerApp_t.prototype.binding_profileTrackFriendBtn_click=contactManagerApp_binding_profileTrackFriendBtn_click;
contactManagerApp_t.prototype.binding_profileTrackTrustBtn_click=contactManagerApp_binding_profileTrackTrustBtn_click;
contactManagerApp_t.prototype.binding_profileTrackStatusLink_click=contactManagerApp_binding_profileTrackStatusLink_click;
contactManagerApp_t.prototype.binding_profileContactsLink_click=contactManagerApp_binding_profileContactsLink_click;
contactManagerApp_t.prototype.binding_profilePointsLink_click=contactManagerApp_binding_profilePointsLink_click;
contactManagerApp_t.prototype.binding_profileFilesLink_click=contactManagerApp_binding_profileFilesLink_click;
contactManagerApp_t.prototype.binding_offCheckbox_valueChange=contactManagerApp_applySearch;
contactManagerApp_t.prototype.binding_acqCheckbox_valueChange=contactManagerApp_applySearch;
contactManagerApp_t.prototype.binding_friendCheckbox_valueChange=contactManagerApp_applySearch;
contactManagerApp_t.prototype.binding_trustCheckbox_valueChange=contactManagerApp_applySearch;
contactManagerApp_t.prototype.binding_quickHelpBtn_click=contactManagerApp_binding_quickHelpBtn_click;
contactManagerApp_t.prototype.contactSearchTermTextKeyUpEvent=contactManagerApp_contactSearchTermTextKeyUpEvent;
contactManagerApp_t.prototype.binding_contactSearchSendRequestBtn_click=contactManagerApp_binding_contactSearchSendRequestBtn_click;
contactManagerApp_t.prototype.APP_ID=APP_ID_CONTACT_MANAGER;
contactManagerApp_t.prototype.APP_NAME="ContactManager";
contactManagerApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.CONTACT_MANAGER;
contactManagerApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
contactManagerApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
contactManagerApp_t.prototype.ACCEPTED=contacts_t.prototype.STATUS_ACCEPTED;
contactManagerApp_t.prototype.RECEIVED=contacts_t.prototype.STATUS_REQUEST_RECEIVED;
contactManagerApp_t.prototype.SENT=contacts_t.prototype.STATUS_REQUEST_SENT;
contactManagerApp_t.prototype.BLOCKED=contacts_t.prototype.STATUS_BLOCK_SENT;
contactManagerApp_t.prototype.FRAME_WIDTH=560;
contactManagerApp_t.prototype.FRAME_HEIGHT=500;
contactManagerApp_t.prototype.FRAME_START_WIDTH=600;
contactManagerApp_t.prototype.FRAME_START_HEIGHT=600;
contactManagerApp_t.prototype.BTN_WIDTH=60;
contactManagerApp_t.prototype.REFRESH_IMG="img/app/system/icons/24x24/refresh.png";
contactManagerApp_t.prototype.DRAG_ELEMENT_IMG="img/dev_only/contactdrag.png";
contactManagerApp_t.prototype.ACCEPT_IMG="img/app/app/contactmanager/accept.png";
contactManagerApp_t.prototype.REJECT_IMG="img/app/app/contactmanager/reject.png";
contactManagerApp_t.prototype.ADD_IMG="img/app/app/contactmanager/add.png";
contactManagerApp_t.prototype.INVITE_IMG="img/app/app/contactmanager/invite.png";
contactManagerApp_t.prototype.BLOCK_IMG="img/app/app/contactmanager/block.png";
contactManagerApp_t.prototype.REMOVE_IMG="img/app/app/contactmanager/remove.png";
contactManagerApp_t.prototype.ALERT_LBL_LEFT=10;
contactManagerApp_t.prototype.ALERT_LBL_TOP=0;
contactManagerApp_t.prototype.ACTION_BTN_TOP=107;
contactManagerApp_t.prototype.CONTACTS_BTN_WIDTH=100;
contactManagerApp_t.prototype.CONTACTS_BTN_LEFT=10;
contactManagerApp_t.prototype.RECEIVED_BTN_WIDTH=95;
contactManagerApp_t.prototype.RECEIVED_BTN_LEFT=contactManagerApp_t.prototype.CONTACTS_BTN_LEFT+contactManagerApp_t.prototype.CONTACTS_BTN_WIDTH+2;
contactManagerApp_t.prototype.SENT_BTN_WIDTH=50;
contactManagerApp_t.prototype.SENT_BTN_LEFT=contactManagerApp_t.prototype.RECEIVED_BTN_LEFT+contactManagerApp_t.prototype.RECEIVED_BTN_WIDTH+2;
contactManagerApp_t.prototype.BLOCKED_BTN_WIDTH=70;
contactManagerApp_t.prototype.BLOCKED_BTN_LEFT=contactManagerApp_t.prototype.SENT_BTN_LEFT+contactManagerApp_t.prototype.SENT_BTN_WIDTH+2;
contactManagerApp_t.prototype.REFRESH_BTN_LEFT=contactManagerApp_t.prototype.BLOCKED_BTN_LEFT+contactManagerApp_t.prototype.BLOCKED_BTN_WIDTH+2;
contactManagerApp_t.prototype.ACCEPT_BTN_LEFT=10;
contactManagerApp_t.prototype.REJECT_BTN_LEFT=contactManagerApp_t.prototype.ACCEPT_BTN_LEFT+contactManagerApp_t.prototype.BTN_WIDTH+2;
contactManagerApp_t.prototype.BLOCK_REQ_BTN_LEFT=contactManagerApp_t.prototype.REJECT_BTN_LEFT+contactManagerApp_t.prototype.BTN_WIDTH+2;
contactManagerApp_t.prototype.REMOVE_BTN_LEFT=10;
contactManagerApp_t.prototype.BLOCK_ACC_LEFT=contactManagerApp_t.prototype.REMOVE_BTN_LEFT+contactManagerApp_t.prototype.BTN_WIDTH+2;
contactManagerApp_t.prototype.TRACKING_FILTER_LEFT=contactManagerApp_t.prototype.BLOCK_ACC_LEFT+contactManagerApp_t.prototype.BTN_WIDTH+2;
contactManagerApp_t.prototype.TRACKING_FILTER_WIDTH=120;
contactManagerApp_t.prototype.UNBLOCK_BTN_LEFT=10;
contactManagerApp_t.prototype.REMOVE_SENT_BTN_LEFT=10;
contactManagerApp_t.prototype.EMAIL_TXT_LEFT=220;
contactManagerApp_t.prototype.REQUEST_LBL_LEFT=10;
contactManagerApp_t.prototype.NAME_LBL_LEFT=10;
contactManagerApp_t.prototype.LBL_TOP=137;
contactManagerApp_t.prototype.SELECT_LEFT=10;
contactManagerApp_t.prototype.SELECT_TOP=140;
contactManagerApp_t.prototype.SELECT_BOTTOM=40;
contactManagerApp_t.prototype.SEARCH_TXT_LEFT=50;
contactManagerApp_t.prototype.PROFILE_LOC_SUMM_WIDTH=250;
contactManagerApp_t.prototype.PROFILE_ABOUT_WIDTH=190;
contactManagerApp_t.prototype.PROFILE_ABOUT_HEIGHT=250;
contactManagerApp_t.prototype.PROFILE_NAME_WIDTH=250;
contactManagerApp_t.prototype.PROFILE_MAP_START_ZOOM=10;
contactManagerApp_t.prototype.TRACK_STATUS_OFF_IMG="img/app/app/contactmanager/off";
contactManagerApp_t.prototype.TRACK_STATUS_ACQ_IMG="img/app/app/contactmanager/acq";
contactManagerApp_t.prototype.TRACK_STATUS_FRIEND_IMG="img/app/app/contactmanager/friend";
contactManagerApp_t.prototype.TRACK_STATUS_TRUST_IMG="img/app/app/contactmanager/trust";
contactManagerApp_t.prototype.T_FILTER_ALL=1;
contactManagerApp_t.prototype.T_FILTER_TRACK_ME=2;
contactManagerApp_t.prototype.T_FILTER_TRACK_ME_NOT=3;
contactManagerApp_t.prototype.ACTION_ADD_TRACKING_SCENARIO=4;
contactManagerApp_t.prototype.ACTION_REMOVE_TRACKING_SCENARIO=5;
contactManagerApp_t.prototype.ACTION_UPDATE_TRACKING_SCENARIO=6;
contactManagerApp_t.prototype.ACTION_GET_TRACKING_SCENARIOS=7;
contactManagerApp_t.prototype.PRIORITY_FULL=100;
contactManagerApp_t.prototype.PRIORITY_NONE=0;
contactManagerApp_t.prototype.CONTACT_SEARCH_FRAME_WIDTH=500;
contactManagerApp_t.prototype.CONTACT_SEARCH_FRAME_HEIGHT=300;
contactManagerApp_t.prototype.CONTACT_FRAME_WIDTH=500;
contactManagerApp_t.prototype.CONTACT_FRAME_HEIGHT=300;
contactManagerApp_t.prototype.FILTER_CB_OFF_WIDTH=40;
contactManagerApp_t.prototype.FILTER_CB_ACQ_WIDTH=80;
contactManagerApp_t.prototype.FILTER_CB_FR_WIDTH=60;
contactManagerApp_t.prototype.FILTER_CB_FONT_SIZE=12;
contactManagerApp_t.prototype.LOCATION_INFO_TIMER_INTERVAL=10000;
}
catch(ex){
jsExDebug("contactManagerApp_t.prototype",ex);
}
function contactManagerApp_t(_1){
try{
this.contactManagerApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!this.SYSTEM.UserDetails.isEmailVerified()){
if(this.SYSTEM.UserDetails.isUsingTempEmail()){
var d=new this.SYSTEM.Dialogue.OkAlert(null,this.APP_NAME,"Your account does not have a validated email address.<br/>"+"You need to sign up, to do so: Click the '(Not you?)' link (in the task bar)",new this.SYSTEM.Delegate(this,this.tempUsercallback),450,"Do it now",90);
}else{
var d=new this.SYSTEM.Dialogue.YesNoAlert(null,this.APP_NAME,"You cannot use the ContactManager until you have verified your email address.",new this.SYSTEM.Delegate(this,this.unverifiedEmailCallback),450,false,"Send email",90,"Cancel",60);
}
this.SYSTEM.Tooltip.hideLoading();
}
if(_1[0]){
this.quickSelectContactId=parseInt(_1[0]);
}else{
this.quickSelectContactId=null;
}
var _3=[];
_3[this.ACCEPTED]={button:null,contacts:[],actions:[],columns:[],profile:[],alert:"Click on a contact to view their profile and change their tracking permission"};
_3[this.RECEIVED]={button:null,contacts:[],actions:[],columns:[],profile:[],alert:"Click on a request (from a user) to 'Accept' it, 'Reject' it or 'Block' the user from send you more requests."};
_3[this.SENT]={button:null,contacts:[],actions:[],columns:[],profile:[],alert:"To cancel a request, click on the user and then click Remove."};
_3[this.BLOCKED]={button:null,contacts:[],actions:[],columns:[],profile:[],alert:"To unblock a use click on them and then click 'Unblock'. This will remove the contact and allow them to send you a request."};
_3[this.ACCEPTED].profile.tabs=[];
_3[this.RECEIVED].profile.tabs=[];
_3[this.SENT].profile.tabs=[];
_3[this.BLOCKED].profile.tabs=[];
this.data=_3;
this.currentData=this.ACCEPTED;
this.foundBySpecs=[];
this.foundBySpecs["gps"]={src:"img/app/app/map/mapobjects/gps.png",width:41,height:42,text:"<b>GPS</b>  location"};
this.foundBySpecs["wifi"]={src:"img/app/app/map/mapobjects/wifi.png",width:33,height:33,text:"<b>WiFi</b>  location"};
this.foundBySpecs["user"]={src:"img/app/app/map/mapobjects/user_define.png",width:33,height:40,text:"<b>User Defined</b> location"};
this.foundBySpecs["cell"]={src:"img/app/app/map/mapobjects/cell.png",width:30,height:40,text:"<b>Cell Tower</b>  location"};
this.borderStyle="solid 1px "+this.SYSTEM.Dom.getCurrentStyle(document.body).color;
this.createFrame();
this.createPanel();
this.refreshDelegate=new this.SYSTEM.Delegate(this,this.contactsRefreshCallback);
this.contactsActionIndex=this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_SET_AVATAR,new this.SYSTEM.Delegate(this,this.avatarChangeCallback));
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ,this.refreshDelegate,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ_CONTACT,this.refreshDelegate,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_UNBLOCK,this.refreshDelegate,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_REMOVE,this.refreshDelegate,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ_RECEIVED,this.refreshDelegate,this.contactsActionIndex);
this.userDetailsIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_SAVE,new this.SYSTEM.Delegate(this,this.userDetailsSaveCallback));
this.accuracyValues=[0,1000,2000,3000,4000,5000,10000,15000,20000,25000,50000,75000,100000,150000,250000,500000,1000000,5000000,10000000];
this.contactFrame=null;
this.trackStatusUpdateInProgress=false;
this.contactSearchFrame=null;
this.searchingForUser=false;
this.restartSearchForUser=false;
this.currentProfileContactId=null;
this.currentSearchTerm="";
this.legalTrackingAgeFlag=this.SYSTEM.UserDetails.isLegalTrackingAge();
this.locationInfoTimer=new timer_t(new this.SYSTEM.Delegate(this,this.locationInfoTimerCallback),null,null,this.LOCATION_INFO_TIMER_INTERVAL);
this.SYSTEM.Contacts.refresh();
}
catch(ex){
jsExDebug("contactManagerApp_t",ex);
}
}
function contactManagerApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.locationInfoTimer.cleanUp();
me.locationInfoTimer=null;
if(me.SYSTEM.Contacts){
me.SYSTEM.Contacts.unregisterActionListener(me.contactsActionIndex);
me.contactsActionIndex=null;
}
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsIndex);
me.userDetailsIndex=null;
}
for(var _5 in me.foundBySpecs){
me.foundBySpecs[_5].src=null;
me.foundBySpecs[_5].width=null;
me.foundBySpecs[_5].height=null;
me.foundBySpecs[_5].text=null;
}
me.foundBySpecs=null;
for(var i=1;i<me.data.length;i++){
var _7=me.data[i];
if(_7){
for(var j=0;j<_7.contacts.length;j++){
me.data[i].contacts[j]=null;
delete me.data[i].contacts[j];
}
for(j=0;j<_7.actions.length;j++){
me.data[i].actions[j]=null;
delete me.data[i].actions[j];
}
for(j=0;j<_7.columns.length;j++){
me.data[i].columns[j]=null;
delete me.data[i].columns[j];
}
for(j in _7.profile.tabs){
if(_7.profile.tabs[j] instanceof Array){
for(var k=0;k<_7.profile.tabs[j].length;k++){
me.data[i].profile.tabs[j][k]=null;
delete me.data[i].profile.tabs[j][k];
}
me.data[i].profile.tabs[j]=null;
}
}
me.data[i].profile.tabList=null;
me.data[i].profile.tabs=null;
me.data[i].profile=null;
me.data[i].contacts=null;
me.data[i].actions=null;
me.data[i].columns=null;
}
me.data[i]=null;
delete me.data[i];
}
me.data=null;
me.frame=null;
me.blockRequestBtn=null;
me.removeBtn=null;
me.blockAcceptedBtn=null;
me.unblockBtn=null;
me.refreshBtn=null;
me.newBtn=null;
me.removeSentBtn=null;
me.emailText=null;
me.cancelBtn=null;
me.contactSelect=null;
me.tabContainer=null;
me.profileLocationSummaryImg=null;
me.profileAvatarImg=null;
me.profileAboutMeSpan=null;
me.borderStyle=null;
me.addContactBtn=null;
me.inviteUserBtn=null;
me.contactSearchFrame=null;
me.searchingForUser=null;
me.restartSearchForUser=null;
me.contactSearchTermText=null;
me.contactSearchResultSelect=null;
me.contactSearchResultCountLabel=null;
me.quickSelectContactId=null;
me.trackStatusUpdateInProgress=null;
me.legalTrackingAgeFlag=null;
me.avatarImage=null;
me.accuracyValues=null;
me.contactFrame=null;
me.contactSelectContent=null;
me.currentProfileContactId=null;
if(me.refreshDelegate){
me.refreshDelegate.cleanUp();
me.refreshDelegate=null;
}
me.application_cleanUp();
}
catch(ex){
jsExDebug("contactManagerApp_cleanUp",ex);
}
}
function contactManagerApp_capture(){
try{
var _a=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _b=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="cm:"+(this.frame.width/_b)+","+(this.frame.height/_a)+","+(this.frame.positionX/_b)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_a);
return this.captureString;
}
catch(ex){
jsExDebug("contactManagerApp_capture",ex);
}
}
function contactManagerApp_restore(_c){
try{
if(!_c){
return;
}
var _d=_c.split(":")[1].split(",");
var _e=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _f=this.SYSTEM.Environment.SCREEN_WIDTH;
var _10=parseInt(_f*parseFloat(_d[0]));
var _11=parseInt(_e*parseFloat(_d[1]));
var _12=parseInt(_f*parseFloat(_d[2]));
var top=parseInt((_e*parseFloat(_d[3]))+this.SYSTEM.Panel.getHeight());
this.frame.setDimensions(_10,_11);
this.frame.setPosition(_12,top);
}
catch(ex){
jsExDebug("contactManagerApp_restore",ex);
}
}
function contactManagerApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("contactManagerApp__SIG_KILL",ex);
}
}
function contactManagerApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("contactManagerApp__SIG_THEME",ex);
}
}
function contactManagerApp_createPanel(){
try{
var _14=this.APPLICATION.Panel;
var _15=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
_14.addUtility(_15);
}
catch(ex){
jsExDebug("contactManagerApp_createPanel",ex);
}
}
function contactManagerApp_createFrame(){
try{
var _16=new this.SYSTEM.Frame.Window("frame",this.APP_NAME,this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_16.allowWindowOverflow();
var _17=this.SYSTEM.Widget;
var _18=24;
var _19=new this.SYSTEM.Widget.TabList("tabList",null,true);
_19.disallowBorder();
_19.disallowItemBorder();
_19.addTab("My Contacts",true,this.ACCEPTED);
_19.addTab("Received",true,this.RECEIVED);
_19.addTab("Sent",true,this.SENT);
_19.addTab("Blocked",true,this.BLOCKED);
_19.selectTab(0);
_16.addWidget(_19,_16.leftEdgeWidth+this.pad,_16.topEdgeHeight+(_18/3));
var _1a=_19.positionX+_19.getWidth()+this.pad+(5*_18)+(4*this.pad)+_16.rightEdgeWidth;
_16.setMinimumSize(_1a,this.FRAME_HEIGHT);
_16.setDimensions(this.FRAME_START_WIDTH,this.FRAME_START_HEIGHT);
var _1b=new _17.ClassButton("acceptBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.ACCEPT_IMG,"Accept","Accept the contact request.");
var _1c=new _17.ClassButton("rejectBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.REMOVE_IMG,"Reject","Reject the contact request.");
var _1d=new _17.ClassButton("addContactBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.ADD_IMG,"Add","Add a new contact.");
var _1e=new _17.ClassButton("inviteUserBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.INVITE_IMG,"Invite","Invite a user to Peepel.");
var _1f=new _17.ClassButton("blockRequestBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.BLOCK_IMG,"Block","Block the user from being your contact.");
var _20=new _17.ClassButton("removeBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.REMOVE_IMG,"Remove","Remove the user from your contacts.");
var _21=new _17.ClassButton("blockAcceptedBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.BLOCK_IMG,"Block","Block the user from being your contact.");
var _22=new _17.ClassButton("unblockBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.REMOVE_IMG,"Unblock","This removes the user from your blocked contact list.");
var _23=new _17.ClassButton("removeSentBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.REMOVE_IMG,"Remove","Cancel the contact request you have sent to the user.");
var _24=new _17.ClassButton("refreshBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,_18,_18,null,this.REFRESH_IMG,"Refresh","Refresh the contact list.");
var _25=new _17.Checkbox("offCheckbox");
_25.allowLabel("Off",_25.LABEL_RIGHT,this.FILTER_CB_OFF_WIDTH);
_25.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_OFF);
_25.labelElement.style.fontSize=this.FILTER_CB_FONT_SIZE+"px";
var _26=new _17.Checkbox("acqCheckbox");
_26.allowLabel("Acquaintance",_25.LABEL_RIGHT,this.FILTER_CB_ACQ_WIDTH);
_26.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_ACQUAINTANCE);
_26.labelElement.style.fontSize=this.FILTER_CB_FONT_SIZE+"px";
var _27=new _17.Checkbox("friendCheckbox");
_27.allowLabel("Friend",_25.LABEL_RIGHT,this.FILTER_CB_FR_WIDTH);
_27.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_FRIEND);
_27.labelElement.style.fontSize=this.FILTER_CB_FONT_SIZE+"px";
var _28=new _17.Checkbox("trustCheckbox");
_28.allowLabel("Trusted",_25.LABEL_RIGHT,this.FILTER_CB_FR_WIDTH);
_28.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_TRUSTED);
_28.labelElement.style.fontSize=this.FILTER_CB_FONT_SIZE+"px";
var _29=new _17.Label("countLabel");
_29.setAlignment("right");
this.data[this.ACCEPTED].actions.push(_20);
this.data[this.ACCEPTED].actions.push(_21);
this.data[this.ACCEPTED].actions.push(_1d);
this.data[this.ACCEPTED].actions.push(_1e);
this.data[this.ACCEPTED].actions.push(_29);
this.data[this.RECEIVED].actions.push(_1b);
this.data[this.RECEIVED].actions.push(_1c);
this.data[this.RECEIVED].actions.push(_1f);
this.data[this.RECEIVED].actions.push(_29);
this.data[this.SENT].actions.push(_23);
this.data[this.SENT].actions.push(_29);
this.data[this.BLOCKED].actions.push(_22);
this.data[this.BLOCKED].actions.push(_29);
_1b.hide();
_1c.hide();
_1f.hide();
_22.hide();
_23.hide();
this.data[this.ACCEPTED].columns=["Username","Name","Last Seen","Place"];
this.data[this.RECEIVED].columns=["Username","Name","Email"];
this.data[this.SENT].columns=["Username","Sent"];
this.data[this.BLOCKED].columns=["Username","Name"];
var _2a=new _17.SelectTable("contactSelect",this.data[this.currentData].columns,20,50,"Table limit exceeded, please filter the list to see hidden contacts.");
if(this.contactSelectContent){
_2a.allowExtraSelectedRow(this.contactSelectContent,this.data[this.ACCEPTED].columns.length);
}
_2a.addEventHandler(_2a.SORT_EVENT,new this.SYSTEM.Delegate(this,this.contactSelectSortEvent));
_2a.addEventHandler(_2a.COLUMN_RESIZE_END_EVENT,new this.SYSTEM.Delegate(this,this.contactSelectResizeEvent));
this.contactSelect=_2a;
this.createContactSelectExtraContent(_16);
var _2b=new _17.Label("searchLabel","Filter");
var _2c=new _17.Text("searchText");
_2c.setDimensions(_16.getInternalWidth()-this.SEARCH_TXT_LEFT);
var _2d=_16.leftEdgeWidth;
var top=_16.topEdgeHeight;
var _2f=_19.getHeight();
var _30=_19.positionY+_2f;
var _31=(_2f<_18?top:_30-_18-this.pad);
var _32=this.SYSTEM.Dom.createDiv(null,_16.getInternalWidth(),_16.getInternalHeight()-_30,_16.leftEdgeWidth,_30);
_32.style.border=this.borderStyle;
_16.windowDiv.appendChild(_32);
_16.addWidget(_24,_16.rightEdgeWidth,_31,true);
_16.addWidget(_1f,_24.positionX+_24.width+this.pad,_31,true);
_16.addWidget(_1c,_1f.positionX+_1f.width+this.pad,_31,true);
_16.addWidget(_1b,_1c.positionX+_1c.width+this.pad,_31,true);
_16.addWidget(_1e,_24.positionX+_24.width+this.pad,_31,true);
_16.addWidget(_1d,_1e.positionX+_1e.width+this.pad,_31,true);
_16.addWidget(_21,_1d.positionX+_1d.width+this.pad,_31,true);
_16.addWidget(_20,_21.positionX+_21.width+this.pad,_31,true);
_16.addWidget(_22,_24.positionX+_24.width+this.pad,_31,true);
_16.addWidget(_23,_24.positionX+_24.width+this.pad,_31,true);
_16.addWidget(_2b,_2d+this.pad,_30+this.pad);
_16.addWidget(_2c,_2b.positionX+_2b.getClientWidth()+this.pad,_2b.positionY);
_16.addWidget(_25,_2c.positionX,_2c.positionY+_2c.getClientHeight()+this.pad);
_16.addWidget(_26,_25.positionX+_25.getClientWidth()+this.FILTER_CB_OFF_WIDTH+this.pad,_25.positionY);
_16.addWidget(_27,_26.positionX+_26.getClientWidth()+this.FILTER_CB_ACQ_WIDTH+this.pad,_25.positionY);
_16.addWidget(_28,_27.positionX+_27.getClientWidth()+this.FILTER_CB_FR_WIDTH+this.pad,_25.positionY);
_16.addWidget(_29,_16.rightEdgeWidth+this.pad,_25.positionY,true);
_16.addWidget(_2a,_2d+this.pad,_25.positionY+_25.getClientHeight()+this.pad);
_16.show();
this.frame=_16;
this.blockRequestBtn=_1f;
this.removeBtn=_20;
this.blockAcceptedBtn=_21;
this.unblockBtn=_22;
this.refreshBtn=_24;
this.removeSentBtn=_23;
this.addContactBtn=_1d;
this.inviteUserBtn=_1e;
this.tabContainer=_32;
_16.setDimensions(_16.width,_16.height);
}
catch(ex){
jsExDebug("contactManagerApp_createFrame",ex);
}
}
function contactManagerApp_createContactSelectExtraContent(_33){
try{
var _34=this.borderStyle;
var _35=this.SYSTEM.UserDetails.SIDE_50;
var _36=_35+2;
var _37=this.pad+_36+this.pad;
var _38=_37+this.PROFILE_ABOUT_HEIGHT+this.pad;
var _39=15;
var _3a=27;
var _3b=_37+this.PROFILE_ABOUT_HEIGHT+this.pad+_39+_3a+(2*this.pad);
var w=this.SYSTEM.Widget;
var _3d=20;
var _3e=this.SYSTEM.Dom.createImage(null,null,_35,_35,this.pad,this.pad);
_3e.style.border=_34;
var _3f=new w.Label("profileNameLabel");
_3f.setBold();
_3f.setDimensions(this.PROFILE_NAME_WIDTH);
_3f.setFontSize(null,null,12);
var _40=new w.Label("profileEmailLabel");
_40.setFontWeight("normal");
_40.setDimensions(this.PROFILE_NAME_WIDTH);
_40.setFontSize(null,null,11);
var _41=new w.Label("profileMobileLabel");
_41.setFontWeight("normal");
_41.setDimensions(this.PROFILE_NAME_WIDTH);
_41.setFontSize(null,null,11);
var _42=this.SYSTEM.Dom.createElement("span",null,this.PROFILE_LOC_SUMM_WIDTH,_35,null,this.pad);
_42.style.right=this.pad+"px";
_42.style.border=_34;
_42.style.backgroundColor=this.contactSelect.bgColour;
var _43=new w.Label("profileLocationSummaryLabel");
_43.setFontWeight("normal");
_43.setFontSize(null,null,11);
_43.setDimensions(null,_35-4);
var _44=this.SYSTEM.Dom.createImage(null,null,null,null,null,this.pad);
_44.style.right=this.pad+"px";
_42.appendChild(_44);
var _45=this.SYSTEM.Dom.createElement("span",null,this.PROFILE_ABOUT_WIDTH,this.PROFILE_ABOUT_HEIGHT,this.pad,_37);
_45.style.overflow="auto";
_45.style.border=_34;
_45.style.backgroundColor=this.contactSelect.bgColour;
var _46=new w.Label("profileAboutMeLabel");
_46.setFontWeight("normal");
_46.setFontSize(null,null,11);
_46.setDimensions(this.PROFILE_ABOUT_WIDTH-(2*this.pad)-25);
var _47=new map_t("profileMap",_33);
_47.setDimensions(100,this.PROFILE_ABOUT_HEIGHT);
_47.centreOnCoordinates(new mapCoordinate_t(0,0,1),this.PROFILE_MAP_START_ZOOM);
_47.hidePeepelLogo();
_47.enableZoomControls(24,this.pad);
_47.addMapObjectList(new mapObjectList_t(_47,"profile_contact"));
var _48=new w.Label("profileTrackStatusLabel");
_48.setFontSize(null,null,12);
var _49=new w.Link("profileTrackStatusLink","What does this mean?");
_49.setFontSize(null,11);
var _4a=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE;
var _4b=new w.Button("profileTrackOffBtn",this.TRACK_STATUS_OFF_IMG,_4a,32,_3a);
var _4c=new w.Button("profileTrackAcqBtn",this.TRACK_STATUS_ACQ_IMG,_4a,102,_3a);
var _4d=new w.Button("profileTrackFriendBtn",this.TRACK_STATUS_FRIEND_IMG,_4a,51,_3a);
var _4e=new w.Button("profileTrackTrustBtn",this.TRACK_STATUS_TRUST_IMG,_4a,63,_3a);
_4b.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_OFF);
_4c.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_ACQUAINTANCE);
_4d.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_FRIEND);
_4e.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_TRUSTED);
var _4f=110;
var _50=new w.Link("profileContactsLink","View Contacts");
_50.setFontSize(null,12);
_50.setDimensions(_4f,_3d-this.pad);
_50.setAlignment("right");
var _51=new w.Link("profilePointsLink","View PeepelPoints");
_51.setFontSize(null,12);
_51.setDimensions(_4f,_3d-this.pad);
_51.setAlignment("right");
var _52=new w.Link("profileFilesLink","View Files");
_52.setFontSize(null,12);
_52.setDimensions(_4f,_3d-this.pad);
_52.setAlignment("right");
_52.hide(true);
var _53=this.SYSTEM.Dom.createDiv("relative",null,_3b);
_53.style.width="100%";
var _54=this.SYSTEM.Dom.createDiv("relative","100%","100%");
if(getContrastingColour(this.SYSTEM.Dom.getCurrentStyle(document.body).color)=="rgb(0,0,0)"){
_54.style.backgroundColor="rgb(255,255,255)";
this.SYSTEM.Dom.setElementOpacity(_54,0.3);
}else{
_54.style.backgroundColor="rgb(200,200,200)";
this.SYSTEM.Dom.setElementOpacity(_54,0.4);
}
_53.appendChild(_54);
_53.appendChild(_3e);
_33.addWidgetToDom(_3f,_53,this.pad+_36+this.pad,this.pad);
_33.addWidgetToDom(_40,_53,_3f.positionX,this.pad+_3d);
_33.addWidgetToDom(_41,_53,_40.positionX,_40.positionY+_3d);
_33.addWidgetToDom(_43,_42,2,2);
_53.appendChild(_42);
_53.appendChild(_45);
_33.addWidgetToDom(_46,_45,this.pad,this.pad);
_33.addWidgetToDom(_47,_53,this.pad,_37,true);
_33.addWidgetToDom(_48,_53,this.pad,_38);
_33.addWidgetToDom(_4b,_53,this.pad,_38+_3d);
_33.addWidgetToDom(_4c,_53,this.pad+_4b.width,_4b.positionY);
_33.addWidgetToDom(_4d,_53,_4c.positionX+_4c.width,_4c.positionY);
_33.addWidgetToDom(_4e,_53,_4d.positionX+_4d.width,_4d.positionY);
_33.addWidgetToDom(_49,_53,_4e.positionX+_4e.width+this.pad,_4d.positionY+(_4d.height/2));
_33.addWidgetToDom(_52,_53,this.pad,this.pad,true,true);
_33.addWidgetToDom(_51,_53,this.pad,_52.positionY+_52.height,true,true);
_33.addWidgetToDom(_50,_53,this.pad,_51.positionY+_51.height,true,true);
this.contactSelectContent=_53;
this.profileAvatarImg=_3e;
this.profileLocationSummaryImg=_44;
this.profileAboutMeSpan=_45;
}
catch(ex){
jsExDebug("contactManagerApp_createContactSelectExtraContent",ex);
}
}
function contactManagerApp_contactsRefreshCallback(){
try{
var _55=this.SYSTEM.Contacts.getAcceptedContacts();
var _56=this.SYSTEM.Contacts.getRequestingContacts();
var _57=this.SYSTEM.Contacts.getRequestedContacts();
var _58=this.SYSTEM.Contacts.getBlockedContacts();
var _59=this.contactSelect.getSelectedIndex();
var _5a=this.contactSelect.getScrollTop();
this.contactSelect.clearList(true);
if(this.currentData==this.ACCEPTED){
this.contactSelect.allowExtraSelectedRow(this.contactSelectContent,this.data[this.ACCEPTED].columns.length);
}else{
this.contactSelect.disallowExtraSelectedRow();
}
for(var i=0;i<this.data.length;i++){
var _5c=this.data[i];
if(_5c){
for(var j=0;j<_5c.contacts.length;j++){
this.data[i].contacts[j]=null;
}
this.data[i].contacts=[];
}
}
for(i=0;i<_55.length;i++){
this.data[this.ACCEPTED].contacts.push(_55[i]);
}
for(i=0;i<_56.length;i++){
this.data[this.RECEIVED].contacts.push(_56[i]);
}
for(i=0;i<_57.length;i++){
this.data[this.SENT].contacts.push(_57[i]);
}
for(i=0;i<_58.length;i++){
this.data[this.BLOCKED].contacts.push(_58[i]);
}
var _5c=this.data[this.currentData];
for(i=0;i<_5c.contacts.length;i++){
this.addContactRow(_5c.contacts[i],this.currentData);
}
this.contactSelect.setColumnNames(_5c.columns);
this.contactSelect.autoSizeColumns();
this.updateCount();
this.applySearch();
if(this.quickSelectContactId){
this.contactSelect.setSelectedValue(this.quickSelectContactId);
this.quickSelectContactId=null;
}else{
if(_59!=null){
this.contactSelect.setSelectedIndex(null,_59);
}
}
this.contactSelect.scrollTo(_5a);
if(!this.locationInfoTimer.isRunning){
this.locationInfoTimer.start();
}
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("contactManagerApp_contactsRefreshCallback",ex);
}
}
function contactManagerApp_updateCount(){
try{
this.frame.getWidget("countLabel").setText(this.contactSelect.getRowCount()+" contacts");
}
catch(ex){
jsExDebug("contactManagerApp_updateCount",ex);
}
}
function contactManagerApp_notificationAlert(_5e){
try{
var _5f=new this.SYSTEM.Dialogue.OkAlert(this,"ContactManager",_5e);
}
catch(ex){
jsExDebug("contactManagerApp_notificationAlert",ex);
}
}
function contactManagerApp_populateSelect(_60){
try{
if(this.currentData==_60){
return;
}
this.contactSelect.clearList(true);
if(_60==this.ACCEPTED){
this.contactSelect.allowExtraSelectedRow(this.contactSelectContent,this.data[this.ACCEPTED].columns.length);
}else{
this.contactSelect.disallowExtraSelectedRow();
}
var _61=this.data[_60];
var _62=null;
this.contactSelect.setColumnNames(_61.columns);
this.contactSelect.autoSizeColumns();
for(var i=0;i<_61.contacts.length;i++){
this.addContactRow(_61.contacts[i],_60);
}
var _64=this.data[this.currentData];
for(i=0;i<_64.actions.length;i++){
if(_64.actions[i]){
_64.actions[i].hide();
}
}
for(i=0;i<_61.actions.length;i++){
if(_61.actions[i]){
_61.actions[i].show();
}
}
this.updateCount();
this.currentData=_60;
this.applySearch();
}
catch(ex){
jsExDebug("contactManagerApp_populateSelect",ex);
}
}
function contactManagerApp_addContactRow(_65,_66){
try{
if(!_65||!_65.userName||!_65.email){
return;
}
if(_65.firstName.length||_65.lastName.length){
var _67=[_65.firstName,_65.lastName].join(" ");
}else{
var _67="-";
}
switch(_66){
case this.BLOCKED:
this.contactSelect.addRow(_65.contactId,_65.userName,_67);
break;
case this.ACCEPTED:
var _68=this.SYSTEM.Tracking.getUserLocation(_65.userId);
var _69=new Date().getTime();
var _6a=["-",this.contactSelect.SORT_VAL_DELIM,_69].join("");
var _6b="-";
if(_68){
var _6c=_68.dateFound.getTime();
_6a=[getAgeTextFromMilliseconds(_6c),this.contactSelect.SORT_VAL_DELIM,_69-_6c].join("");
if(_68.placeLabel){
_6b=_68.placeLabel;
}
}
this.contactSelect.addRow(_65.contactId,_65.userName,_67,_6a,_6b);
break;
case this.RECEIVED:
this.contactSelect.addRow(_65.contactId,_65.userName,_67,_65.email);
break;
case this.SENT:
var _6d=_65.statusChangeTime.split(".");
var _6e=_65.statusChangeTime;
if(_6d.length){
_6e=_6d[0];
}
this.contactSelect.addRow(_65.contactId,_65.userName,_6e);
break;
}
}
catch(ex){
jsExDebug("contactManagerApp_addContactRow",ex);
}
}
function contactManagerApp_avatarChangeCallback(_6f){
try{
var _70=this.SYSTEM.Contacts.getContact(_6f);
if(_70){
var _71=this.contactSelect.getSelectedValue();
if(_71&&_71.length==1&&_6f==_71[0]){
this.binding_contactSelect_itemSelect(this.contactSelect);
}
}
}
catch(ex){
jsExDebug("contactManagerApp_avatarChangeCallback",ex);
}
}
function contactManagerApp_searchForUser(_72){
try{
if(this.searchingForUser){
this.restartSearchForUser=true;
return;
}
if(_72.length>0){
this.searchingForUser=true;
this.SYSTEM.Network.asyncRequest("peepel_services.php?service=usercontacts&action="+this.SYSTEM.Contacts.ACTION_SEARCH_FOR_USER,"term="+_72,this.searchForUserResponse,this);
this.contactSearchResultCountLabel.setText("Searching...");
}else{
this.contactSearchResultCountLabel.setText("");
this.contactSearchResultSelect.clearList();
this.searchingForUser=false;
}
}
catch(ex){
jsExDebug("contactManagerApp_searchForUser",ex);
}
}
function contactManagerApp_searchForUserResponse(xml,me){
try{
if(!me.contactSearchResultSelect){
return;
}
if(me.restartSearchForUser){
me.restartSearchForUser=false;
me.searchingForUser=false;
me.searchForUser(me.contactSearchTermText.getContent());
}else{
me.contactSearchResultSelect.clearList();
var _75=xml.getElementsByTagName("user");
var _76=null;
var _77=null;
for(var i=0;i<_75.length;i++){
_76=_75[i];
_77=_76.getAttribute("fname")+" "+_76.getAttribute("lname");
me.contactSearchResultSelect.addItem(_76.getAttribute("uname"),"'<b>"+_76.getAttribute("uname")+"</b>' - "+(_77.length>1?_77:"<i>Name not provided by the user</i>"));
}
me.searchingForUser=false;
if(_75.length==0){
me.contactSearchResultCountLabel.setText("No matching User's");
}else{
me.contactSearchResultCountLabel.setText(_75.length+" results");
}
}
}
catch(ex){
jsExDebug("contactManagerApp_searchForUserResponse",ex);
}
}
function contactManagerApp_locationInfoTimerCallback(){
try{
if(this.currentData==this.ACCEPTED){
var _79=this.frame.getWidget("contactSelect");
var _7a=new Date().getTime();
var _7b=this.SYSTEM.Contacts.getAcceptedContacts();
var _7c=null;
var _7d=null;
var _7e=null;
var _7f=null;
var _80=null;
var _81=null;
var _82=null;
for(var i=0;i<_7b.length;i++){
_7c=_7b[i];
if(_7c){
_7e=this.SYSTEM.Tracking.getUserLocation(_7c.userId);
_7d=_79.getRowIndexFromValue(_7c.contactId);
if(_7d!=null){
_7f="-"+_79.SORT_VAL_DELIM+_7a;
_80="-";
if(_7e&&_7e.guid){
_81=_7e.dateFound.getTime();
_82=_7a-_81;
_7f=getAgeTextFromMilliseconds(_81)+_79.SORT_VAL_DELIM+_82;
if(_7e.placeLabel){
_80=_7e.placeLabel;
}
}
_79.setCellContent(_7d,2,_7f);
_79.setCellContent(_7d,3,_80);
}
}
}
var _84=this.contactSelect.getSelectedIndex();
this.contactSelect.sortColumn((this.contactSelect.currentSortColumn!=null?this.contactSelect.currentSortColumn:0),true);
if(_84!=null){
this.contactSelect.setSelectedIndex(null,_84);
}
}
}
catch(ex){
jsExDebug("contactManagerApp_locationInfoTimerCallback",ex);
}
}
function contactManagerApp_updateProfileMapSize(){
try{
if(this.contactSelect.settingExtraSelectedRow&&this.contactSelectContent.clientWidth){
var _85=(this.contactSelectContent.clientWidth/2)-(2*this.pad)-2;
this.profileAboutMeSpan.style.width=_85+"px";
this.frame.getWidget("profileAboutMeLabel").setDimensions(_85-(2*this.pad)-25);
this.frame.getWidget("profileMap").setDimensions(_85,this.PROFILE_ABOUT_HEIGHT);
}
}
catch(ex){
jsExDebug("contactManagerApp_updateProfileMapSize",ex);
}
}
function contactManagerApp_setContactTrackStatus(_86){
function callback(_87){
try{
this.SYSTEM.Tooltip.hideLoading();
this.trackStatusUpdateInProgress=false;
}
catch(ex){
jsExDebug("contactManagerApp_setContactTrackStatus: callback",ex);
}
}
function tooltipTimeout(){
try{
this.SYSTEM.Contacts.setContactTrackStatus(_88,_86,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("contactManagerApp_setContactTrackStatus: tooltipTimeout",ex);
}
}
try{
this.trackStatusUpdateInProgress=true;
var _88=this.getSelectedContactIds();
if(_88){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Updating tracking status...");
}
}
catch(ex){
jsExDebug("contactManagerApp_setContactTrackStatus",ex);
}
}
function contactManagerApp_applySearch(_89){
try{
this.currentSearchTerm=this.currentSearchTerm.replace(/\\/,"\\\\");
var _8a=this.getTrackStatusFilter();
if(this.currentSearchTerm.length||_8a||_89){
var _8b=new RegExp(["^.*",".*$"].join(this.currentSearchTerm.toLowerCase()),"i");
var _8c=(_8a?new RegExp(_8a):null);
this.contactSelect.clearList(true);
var _8d=this.data[this.currentData].contacts;
var _8e=null;
for(var i=0;i<_8d.length;i++){
_8e=_8d[i];
if(_8e.match(_8b,_8c)){
this.addContactRow(_8e,this.currentData);
}
}
this.updateCount();
}
if(this.contactSelect.currentSortColumn==null){
this.contactSelect.sortColumn(0);
}else{
this.contactSelect.sortColumn(this.contactSelect.currentSortColumn,true);
}
}
catch(ex){
jsExDebug("contactManagerApp_applySearch",ex);
}
}
function contactManagerApp_binding_quickHelpBtn_click(){
try{
var _90=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"contact manager");
}
catch(ex){
jsExDebug("contactManagerApp_binding_quickHelpBtn_click",ex);
}
}
function contactManagerApp_getTrackStatusFilter(){
try{
var str=[];
if(this.frame.getWidget("offCheckbox").isChecked()){
str.push(this.frame.getWidget("offCheckbox").getValue());
}
if(this.frame.getWidget("acqCheckbox").isChecked()){
str.push(this.frame.getWidget("acqCheckbox").getValue());
}
if(this.frame.getWidget("friendCheckbox").isChecked()){
str.push(this.frame.getWidget("friendCheckbox").getValue());
}
if(this.frame.getWidget("trustCheckbox").isChecked()){
str.push(this.frame.getWidget("trustCheckbox").getValue());
}
if(str.length){
return "^"+str.join("$|^")+"$";
}else{
return null;
}
}
catch(ex){
jsExDebug("contactManagerApp_getTrackStatusFilter",ex);
}
}
function contactManagerApp_getSelectedContactIds(){
try{
var _92=this.contactSelect.getSelectedValue();
return _92;
}
catch(ex){
jsExDebug("contactManagerApp_getSelectedContactIds",ex);
}
}
function sendVerificationEmailResponse(xml){
try{
if(getNodeValue(xml,"success")=="0"){
var d=new SYSTEM.Dialogue.OkAlert(null,null,"Email sent");
}
}
catch(ex){
jsExDebug("sendVerificationEmailResponse",ex);
}
}
function contactManagerApp_unverifiedEmailCallback(_95){
try{
if(_95){
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action="+9,null,sendVerificationEmailResponse);
}
if(this.cleanUpIndex){
this.cleanUp();
}
}
catch(ex){
jsExDebug("contactManagerApp_unverifiedEmailCallback",ex);
}
}
function contactManagerApp_tempUsercallback(){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_AUTH,"Sign Up");
if(this.cleanUpIndex){
this.cleanUp();
}
}
catch(ex){
jsExDebug("contactManagerApp_tempUsercallback",ex);
}
}
function contactManagerApp_contactSelectSortEvent(){
try{
}
catch(ex){
jsExDebug("contactManagerApp_contactSelectSortEvent",ex);
}
}
function contactManagerApp_contactSelectResizeEvent(){
try{
this.updateProfileMapSize();
}
catch(ex){
jsExDebug("contactManagerApp_contactSelectResizeEvent",ex);
}
}
function contactManagerApp_userDetailsSaveCallback(){
try{
var _96=this.SYSTEM.UserDetails.isLegalTrackingAge();
if(this.legalTrackingAgeFlag!=_96){
this.locationInfoTimerCallback();
this.legalTrackingAgeFlag=_96;
}
}
catch(ex){
jsExDebug("contactManagerApp_userDetailsSaveCallback",ex);
}
}
function contactManagerApp_frame__onClose(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("contactManagerApp_frame__onClose",ex);
}
}
function contactManagerApp_frame__onResize(_97){
try{
if(!this.frame){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _9a=null;
var _9b=null;
if(dX||dY){
_9a=_97.width+this.SYSTEM.Event.dragDistanceX;
_9b=_97.height+this.SYSTEM.Event.dragDistanceY;
if(_9a<=_97.minimumWidth){
_9a=_97.minimumWidth;
}
if(_9b<=_97.minimumHeight){
_9b=_97.minimumHeight;
}
}else{
_9a=_97.width;
_9b=_97.height;
}
var _9c=_97.getInternalWidth(_9a);
var _9d=_97.getInternalHeight(_9b);
this.contactSelect.setDimensions(_9c-2-(2*this.pad),_9d-(this.contactSelect.positionY-_97.topEdgeHeight)-2-this.pad);
this.contactSelect.autoSizeColumns();
this.updateProfileMapSize();
var _9e=_97.getWidget("tabList");
this.tabContainer.style.width=(_9c-2)+"px";
this.tabContainer.style.height=(_9d-(_9e.positionY-_97.topEdgeHeight)-_9e.getHeight()-2)+"px";
var _9f=_97.getWidget("searchText");
_9f.setDimensions(_9c-_9f.positionX);
}
catch(ex){
jsExDebug("contactManagerApp_frame__onResize",ex);
}
}
function contactManagerApp_frame_keyUp(key){
try{
var _a1=this.frame.getWidget("searchText");
if(key.which>=37&&key.which<=40){
return;
}
if(_a1.hasFocus()){
var _a2=_a1.getContent();
var _a3=_a2.split(",");
_a2="";
for(var i in _a3){
if(_a3[i]){
_a2+="("+_a3[i]+")|";
}
}
_a2=_a2.replace(/\|$/,"");
this.currentSearchTerm=_a2;
this.applySearch();
}
}
catch(ex){
jsExDebug("contactManagerApp_frame_keyUp",ex);
}
}
function contactManagerApp_chooseAvatarFrame__onClose(_a5){
try{
_a5.cleanUp();
this.chooseAvatarFrame=null;
}
catch(ex){
jsExDebug("contactManagerApp_chooseAvatarFrame__onClose",ex);
}
}
function contactManagerApp_contactSearchFrame__onClose(_a6){
try{
_a6.cleanUp();
this.contactSearchFrame=null;
}
catch(ex){
jsExDebug("contactManagerApp_contactSearchFrame__onClose",ex);
}
}
function contactManagerApp_contactFrame__onClose(_a7){
try{
_a7.cleanUp();
}
catch(ex){
jsExDebug("contactManagerApp_contactFrame__onClose",ex);
}
}
var max=0;
function contactManagerApp_binding_tabList_itemSelect(_a8){
try{
this.populateSelect(_a8.getSelectedTabData());
}
catch(ex){
jsExDebug("contactManagerApp_binding_tabList_itemSelect",ex);
}
}
function contactManagerApp_binding_addContactBtn_click(){
try{
if(this.contactSearchFrame||!this.SYSTEM.UserDetails.isEmailVerified()){
return;
}
var _a9=new this.SYSTEM.Frame.Window("contactSearchFrame","Search for a contact",this,this.CONTACT_SEARCH_FRAME_WIDTH,this.CONTACT_SEARCH_FRAME_HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_a9.setFixedDimensions(this.CONTACT_SEARCH_FRAME_WIDTH,this.CONTACT_SEARCH_FRAME_HEIGHT);
_a9.setPosition(this.frame.positionX+this.frame.leftEdgeWidth,this.frame.positionY+this.frame.topEdgeHeight);
var _aa=new this.SYSTEM.Widget.Label("contactSearchTermLabel","Type a search term:");
var _ab=new this.SYSTEM.Widget.Text("contactSearchTermText");
_ab.setDimensions(150);
this.SYSTEM.Event.attachEvent(_ab.textBox,"onkeyup","keyup",this.contactSearchTermTextKeyUpEvent,this);
var _ac=new this.SYSTEM.Widget.Label("searchResultCountLabel");
var _ad=new this.SYSTEM.Widget.SelectList("contactSearchTermSelect");
_ad.allowStartVisible();
_ad.align(_ad.LEFT_ALIGN);
var _ae=new this.SYSTEM.Widget.TextButton("contactSearchSendRequestBtn",200,"Send Contact Request");
_a9.addWidget(_aa,_a9.leftEdgeWidth,_a9.topEdgeHeight);
_a9.addWidget(_ab,_aa.positionY+105,_a9.topEdgeHeight);
_a9.addWidget(_ac,_ab.positionX+_ab.width+10,_a9.topEdgeHeight);
_a9.addWidget(_ad,_a9.leftEdgeWidth,_ab.positionY+30);
_a9.addWidget(_ae,_a9.leftEdgeWidth,_a9.bottomEdgeHeight,true,true);
_ad.setDimensions(_a9.getInternalWidth(),_a9.height-_ad.positionY-_ae.height-this.pad-_a9.bottomEdgeHeight);
_a9.show();
_ab.focus();
this.contactSearchFrame=_a9;
this.contactSearchTermText=_ab;
this.contactSearchResultSelect=_ad;
this.contactSearchResultCountLabel=_ac;
}
catch(ex){
jsExDebug("contactManagerApp_binding_addContactBtn_click",ex);
}
}
function contactManagerApp_binding_inviteUserBtn_click(){
try{
var d=new this.SYSTEM.Dialogue.Invite(this,null,inviteDialogue_t.prototype.ACTION_INVITE_USER);
}
catch(ex){
jsExDebug("contactManagerApp_binding_inviteUserBtn_click",ex);
}
}
function contactManagerApp_binding_acceptBtn_click(){
try{
var _b0=this.frame.getWidget("contactSelect").getSelectedValue();
if(_b0){
var _b1=[];
for(var i=0;i<_b0.length;i++){
_b1.push(this.SYSTEM.Contacts.getAnyContact(_b0[i]).userName);
}
var d=new this.SYSTEM.Dialogue.AcceptRequest(this,_b1);
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_acceptBtn_click",ex);
}
}
function contactManagerApp_binding_rejectBtn_click(){
function callback(){
try{
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("contactManagerApp_binding_rejectBtn_click: callback",ex);
}
}
function tooltipTimeout(){
try{
this.SYSTEM.Contacts.rejectRequest(_b4,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("contactManagerApp_binding_rejectBtn_click",ex);
}
}
try{
var _b4=this.getSelectedContactIds();
if(_b4){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Rejecting request...");
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_rejectBtn_click",ex);
}
}
function contactManagerApp_binding_blockRequestBtn_click(){
function tooltipTimeout(){
try{
this.SYSTEM.Contacts.blockContact(_b5,this.refreshDelegate);
}
catch(ex){
jsExDebug("contactManagerApp_binding_blockRequestBtn_click",ex);
}
}
try{
var _b5=this.getSelectedContactIds();
if(_b5){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Blocking user...");
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_rejectBtn_click",ex);
}
}
function contactManagerApp_binding_removeBtn_click(){
function tooltipTimeout(){
try{
this.SYSTEM.Contacts.removeContact(this.getSelectedContactIds(),this.refreshDelegate);
}
catch(ex){
jsExDebug("contactManagerApp_binding_removeBtn_click",ex);
}
}
try{
var _b6=this.getSelectedContactIds();
if(_b6){
this.contactSelect.hideExtraSelectedContent();
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Removing contact...");
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_removeBtn_click",ex);
}
}
function contactManagerApp_binding_blockAcceptedBtn_click(){
function tooltipTimeout(){
try{
this.SYSTEM.Contacts.blockContact(this.getSelectedContactIds(),this.refreshDelegate);
}
catch(ex){
jsExDebug("contactManagerApp_binding_blockAcceptedBtn_click",ex);
}
}
try{
var _b7=this.getSelectedContactIds();
if(_b7){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Blocking contact...");
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_blockAcceptedBtn_click",ex);
}
}
function contactManagerApp_binding_unblockBtn_click(){
function tooltipTimeout(){
try{
this.SYSTEM.Contacts.unblockContact(this.getSelectedContactIds(),this.refreshDelegate);
}
catch(ex){
jsExDebug("contactManagerApp_binding_unblockBtn_click",ex);
}
}
try{
var _b8=this.getSelectedContactIds();
if(_b8){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Removing contact...");
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_unblockBtn_click",ex);
}
}
function contactManagerApp_binding_refreshBtn_click(){
try{
this.SYSTEM.Contacts.refresh();
}
catch(ex){
jsExDebug("contactManagerApp_binding_refreshBtn_click",ex);
}
}
function contactManagerApp_binding_removeSentBtn_click(){
function tooltipTimeout(){
try{
this.SYSTEM.Contacts.removeContact(this.getSelectedContactIds(),this.refreshDelegate);
}
catch(ex){
jsExDebug("contactManagerApp_binding_removeSentBtn_click",ex);
}
}
try{
var _b9=this.getSelectedContactIds();
if(_b9){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Removing contact...");
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_removeSentBtn_click",ex);
}
}
function contactManagerApp_binding_contactSelect_itemSelect(_ba){
try{
var _bb=_ba.getSelectedValue();
if(_ba.settingExtraSelectedRow&&_bb&&_bb.length==1){
var _bc=_bb[0];
var _bd=this.frame;
var _be=this.SYSTEM.Contacts.getAnyContact(_bc);
var _bf=_be.getAvatarPath(_be.AVATAR_CONTACT_PROFILE);
this.profileAvatarImg.src=_bf;
var _c0=[_be.firstName,_be.lastName].join(" ");
if(_c0.length==1){
_c0=_be.userName;
}
_bd.getWidget("profileNameLabel").setText(_c0);
_bd.getWidget("profileEmailLabel").setText(_be.email);
_bd.getWidget("profileMobileLabel").setText(_be.mobile);
_bd.getWidget("profileAboutMeLabel").setText(["<b>About me</b>:",_be.aboutMePublic+"<br/>",_be.aboutMePrivate].join("<br/>"));
this.updateProfileMapSize();
var _c1=this.SYSTEM.Contacts.getContactLocation(_bc);
var _c2=_bd.getWidget("profileMap");
_c2.clearMapObjectList(0,true);
_bd.getWidget("profileLocationSummaryLabel").setText("");
this.profileLocationSummaryImg.style.display="none";
if(_c1){
var _c3=_c1.dateFound.getTime();
var _c4=getAgeTextFromMilliseconds(_c3);
_bd.getWidget("profileLocationSummaryLabel").setText(["<b>"+_c1.placeLabel+"</b>",_c4,getDateString(_c1.dateFound)].join("<br/>"));
if(_c1.locationMethod){
var _c5=null;
if(_c1.locationMethod.match(/gps/)){
_c5=this.foundBySpecs["gps"];
}else{
if(_c1.locationMethod.match(/wifi/)){
_c5=this.foundBySpecs["wifi"];
}else{
if(_c1.locationMethod.match(/user/)){
_c5=this.foundBySpecs["user"];
}else{
if(_c1.locationMethod.match(/cell/)){
_c5=this.foundBySpecs["cell"];
}
}
}
}
if(_c5){
this.profileLocationSummaryImg.src=_c5.src;
this.profileLocationSummaryImg.style.width=_c5.width+"px";
this.profileLocationSummaryImg.style.height=_c5.height+"px";
this.profileLocationSummaryImg.style.display="block";
}
}
if(this.currentProfileContactId!=_bc){
_c2.centreOnCoordinates(_c1);
_ba.scrollToSelectedIndex();
}
var mo=new mapObject_t(_c1.copy(),_bf);
mo.setDimensions(this.SYSTEM.UserDetails.SIDE_50,this.SYSTEM.UserDetails.SIDE_50);
mo.ALLOW_MAP_INFO=false;
mo.widget.setBorder(this.profileAvatarImg.style.border);
_c2.addMapObject(0,mo,true);
_c2.drawMapObjects();
}
_bd.getWidget("profileTrackStatusLabel").setText("Choose how accurately <b>"+_be.userName+"</b> will see you on a map:");
_bd.getWidget("profileTrackOffBtn").turnOff();
_bd.getWidget("profileTrackAcqBtn").turnOff();
_bd.getWidget("profileTrackFriendBtn").turnOff();
_bd.getWidget("profileTrackTrustBtn").turnOff();
switch(_be.trackStatus){
case this.SYSTEM.Contacts.TRACKING_STATUS_OFF:
_bd.getWidget("profileTrackOffBtn").turnOn();
break;
case this.SYSTEM.Contacts.TRACKING_STATUS_ACQUAINTANCE:
_bd.getWidget("profileTrackAcqBtn").turnOn();
break;
case this.SYSTEM.Contacts.TRACKING_STATUS_FRIEND:
_bd.getWidget("profileTrackFriendBtn").turnOn();
break;
case this.SYSTEM.Contacts.TRACKING_STATUS_TRUSTED:
_bd.getWidget("profileTrackTrustBtn").turnOn();
break;
}
if(_be.getEmailAddress()!=DEFAULT_CONTACT){
_bd.getWidget("profileContactsLink").show();
}else{
_bd.getWidget("profileContactsLink").hide();
}
this.currentProfileContactId=_bc;
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_contactSelect_itemSelect",ex);
}
}
function contactManagerApp_binding_profileTrackOffBtn_click(_c7){
try{
if(this.trackStatusUpdateInProgress){
return;
}
this.frame.getWidget("profileTrackOffBtn").turnOn();
this.frame.getWidget("profileTrackAcqBtn").turnOff();
this.frame.getWidget("profileTrackFriendBtn").turnOff();
this.frame.getWidget("profileTrackTrustBtn").turnOff();
this.setContactTrackStatus(_c7.getValue());
}
catch(ex){
jsExDebug("contactManagerApp_binding_profileTrackOffBtn_click",ex);
}
}
function contactManagerApp_binding_profileTrackAcqBtn_click(_c8){
try{
if(this.trackStatusUpdateInProgress){
return;
}
this.frame.getWidget("profileTrackOffBtn").turnOff();
this.frame.getWidget("profileTrackAcqBtn").turnOn();
this.frame.getWidget("profileTrackFriendBtn").turnOff();
this.frame.getWidget("profileTrackTrustBtn").turnOff();
this.setContactTrackStatus(_c8.getValue());
}
catch(ex){
jsExDebug("contactManagerApp_binding_profileTrackAcqBtn_click",ex);
}
}
function contactManagerApp_binding_profileTrackFriendBtn_click(_c9){
try{
if(this.trackStatusUpdateInProgress){
return;
}
this.frame.getWidget("profileTrackOffBtn").turnOff();
this.frame.getWidget("profileTrackAcqBtn").turnOff();
this.frame.getWidget("profileTrackFriendBtn").turnOn();
this.frame.getWidget("profileTrackTrustBtn").turnOff();
this.setContactTrackStatus(_c9.getValue());
}
catch(ex){
jsExDebug("contactManagerApp_binding_profileTrackFriendBtn_click",ex);
}
}
function contactManagerApp_binding_profileTrackTrustBtn_click(_ca){
try{
if(this.trackStatusUpdateInProgress){
return;
}
this.frame.getWidget("profileTrackOffBtn").turnOff();
this.frame.getWidget("profileTrackAcqBtn").turnOff();
this.frame.getWidget("profileTrackFriendBtn").turnOff();
this.frame.getWidget("profileTrackTrustBtn").turnOn();
this.setContactTrackStatus(_ca.getValue());
}
catch(ex){
jsExDebug("contactManagerApp_binding_profileTrackTrustBtn_click",ex);
}
}
function contactManagerApp_binding_profileTrackStatusLink_click(){
try{
var d=new this.SYSTEM.Dialogue.TrackStatusInfo(this);
}
catch(ex){
jsExDebug("contactManagerApp_binding_profileTrackStatusLink_click",ex);
}
}
function contactManagerApp_binding_profileContactsLink_click(){
try{
this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_CONTACT_VIEW,null,"Getting contacts...",this.currentProfileContactId);
}
catch(ex){
jsExDebug("contactManagerApp_binding_profileContactsLink_click",ex);
}
}
function contactManagerApp_binding_profilePointsLink_click(){
try{
this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_POINT_VIEW,null,"Getting points...",this.currentProfileContactId);
}
catch(ex){
jsExDebug("contactManagerApp_binding_profilePointsLink_click",ex);
}
}
function contactManagerApp_binding_profileFilesLink_click(){
try{
}
catch(ex){
jsExDebug("contactManagerApp_binding_profileFilesLink_click",ex);
}
}
function contactManagerApp_binding_testBtn_click(){
try{
}
catch(ex){
jsExDebug("contactManagerApp_binding_testBtn_click",ex);
}
}
function contactManagerApp_contactSearchTermTextKeyUpEvent(_cc,me){
try{
me.searchForUser(me.contactSearchTermText.getContent());
_cc.preventDefault();
}
catch(ex){
jsExDebug("contactManagerApp_contactSearchTermTextKeyUpEvent",ex);
}
}
function contactManagerApp_binding_contactSearchSendRequestBtn_click(_ce){
function callback(){
try{
if(this.contactSearchFrame){
this.contactSearchFrame.close();
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_contactSearchSendRequestBtn_click: callback",ex);
}
}
try{
var _cf=this.contactSearchResultSelect.getSelectedValue();
if(_cf){
var d=new this.SYSTEM.Dialogue.AcceptRequest(this,[_cf],true,new this.SYSTEM.Delegate(this,callback));
}
}
catch(ex){
jsExDebug("contactManagerApp_binding_contactSearchSendRequestBtn_click",ex);
}
}

try{
apiApp_t.prototype=new iframeApp_t();
apiApp_t.prototype.constructor=apiApp_t;
apiApp_t.prototype.cleanUp=apiApp_cleanUp;
apiApp_t.prototype.apiApp_super=iframeApp_t.prototype.constructor;
apiApp_t.prototype.iframeApp_cleanUp=iframeApp_t.prototype.cleanUp;
apiApp_t.prototype.capture=apiApp_capture;
apiApp_t.prototype.restore=apiApp_restore;
apiApp_t.prototype.createPanel=apiApp_createPanel;
apiApp_t.prototype.iframeOnLoadEvent=apiApp_iframeOnLoadEvent;
apiApp_t.prototype.binding_quickHelpBtn_click=apiApp_binding_quickHelpBtn_click;
apiApp_t.prototype.ICON_SRC="img/app/system/icons/apps/API";
apiApp_t.prototype.APP_NAME="API Registration";
apiApp_t.prototype.APP_ID=APP_ID_API;
apiApp_t.prototype.FRAME_WIDTH=740;
apiApp_t.prototype.FRAME_HEIGHT=745;
apiApp_t.prototype.FRAME_INIT_TITLE="API Registration";
apiApp_t.prototype.IFRAME_TOP=0;
apiApp_t.prototype.IFRAME_BORDER="none";
apiApp_t.prototype.IFRAME_FRAMEBORDER="0";
apiApp_t.prototype.IFRAME_BG_COLOUR="";
apiApp_t.prototype.FRAME_RESIZE=true;
}
catch(ex){
jsExDebug("apiApp_t.prototype",ex);
}
function apiApp_t(_1){
try{
this.apiApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.frame.setDimensions(this.frame.leftEdgeWidth+this.FRAME_WIDTH+this.frame.rightEdgeWidth,this.frame.topEdgeHeight+this.FRAME_HEIGHT+this.frame.bottomEdgeHeight);
this.frame.setMaximumSize(this.FRAME_WIDTH,this.FRAME_HEIGHT);
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("apiApp_t",ex);
}
}
function apiApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.frame=null;
me.iframe=null;
me.outerDiv=null;
me.iframeApp_cleanUp();
}
catch(ex){
jsExDebug("apiApp_cleanUp",ex);
}
}
function apiApp_capture(){
try{
var _3=this.SYSTEM.Panel.getHeight();
var _4=(this.SYSTEM.Environment.SCREEN_HEIGHT-_3);
var _5=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="import:"+(this.frame.width/_5)+","+(this.frame.height/_4)+","+(this.frame.positionX/_5)+","+((this.frame.positionY-_3)/_4);
return this.captureString;
}
catch(ex){
jsExDebug("apiApp_capture",ex);
}
}
function apiApp_restore(_6){
try{
if(!_6){
return;
}
var _7=this.SYSTEM.Panel.getHeight();
var _8=_6.split(":")[1].split(",");
var _9=(this.SYSTEM.Environment.SCREEN_HEIGHT-_7);
var _a=this.SYSTEM.Environment.SCREEN_WIDTH;
var _b=parseInt(_a*parseFloat(_8[0]));
var _c=parseInt(_9*parseFloat(_8[1]));
var _d=parseInt(_a*parseFloat(_8[2]));
var _e=parseInt((_9*parseFloat(_8[3]))+_7);
this.frame.setDimensions(_b,_c);
this.frame.setPosition(_d,_e);
if(this.dragDiv.parentNode==this.frame.windowDiv){
this.frame.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("apiApp_restore",ex);
}
}
function apiApp_createPanel(){
try{
var _f=this.APPLICATION.Panel;
var _10=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
_f.addUtility(_10);
}
catch(ex){
jsExDebug("apiApp_createPanel",ex);
}
}
function apiApp_iframeOnLoadEvent(_11,me){
try{
if(!me.firstLoadComplete){
me.firstLoadComplete=true;
me.iframe.contentWindow.location="peepel_api.php";
}
}
catch(ex){
jsExDebug("apiApp_iframeOnLoadEvent",ex);
}
}
function apiApp_binding_quickHelpBtn_click(){
try{
var _13=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"blog");
}
catch(ex){
jsExDebug("apiApp_binding_quickHelpBtn_click",ex);
}
}

try{
trackingCacheApp_t.prototype=new headlessApplication_t();
trackingCacheApp_t.prototype.constructor=trackingCacheApp_t;
trackingCacheApp_t.prototype.cleanUp=trackingCacheApp_cleanUp;
trackingCacheApp_t.prototype.trackingCacheApp_super=headlessApplication_t.prototype.constructor;
trackingCacheApp_t.prototype.headlessApplication_cleanUp=headlessApplication_t.prototype.cleanUp;
trackingCacheApp_t.prototype.restore=trackingCacheApp_restore;
trackingCacheApp_t.prototype.APP_ID=APP_ID_TRACKING_CACHE;
trackingCacheApp_t.prototype.APP_NAME="TrackingCache";
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function trackingCacheApp_t(_1){
try{
this.trackingCacheApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
}
catch(ex){
jsExDebug("trackingCacheApp_t",ex);
}
}
function trackingCacheApp_cleanUp(me){
try{
if(!me){
me=this;
}
me.headlessApplication_cleanUp();
}
catch(ex){
jsExDebug("trackingCacheApp_cleanUp",ex);
}
}
function trackingCacheApp_restore(_3){
try{
if(_3){
this.SYSTEM.Tracking.restore(_3);
}
}
catch(ex){
jsExDebug("trackingCacheApp_restore",ex);
}
}

try{
contactListWidget_t.prototype=new widget_t();
contactListWidget_t.prototype.constructor=contactListWidget_t;
contactListWidget_t.prototype.cleanUp=contactListWidget_cleanUp;
contactListWidget_t.prototype.contactListWidget_super=widget_t.prototype.constructor;
contactListWidget_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
contactListWidget_t.prototype.createDom=contactListWidget_createDom;
contactListWidget_t.prototype.bindEvents=contactListWidget_bindEvents;
contactListWidget_t.prototype.filter=contactListWidget_filter;
contactListWidget_t.prototype.getVisibleCount=contactListWidget_getVisibleCount;
contactListWidget_t.prototype.leftScrollClickEvent=contactListWidget_leftScrollClickEvent;
contactListWidget_t.prototype.rightScrollClickEvent=contactListWidget_rightScrollClickEvent;
contactListWidget_t.prototype.avatarChangeCallback=contactListWidget_avatarChangeCallback;
contactListWidget_t.prototype.removeContactNotificationCallback=contactListWidget_removeContactNotificationCallback;
contactListWidget_t.prototype.newContactNotificationCallback=contactListWidget_newContactNotificationCallback;
contactListWidget_t.prototype.addContact=contactListWidget_addContact;
contactListWidget_t.prototype.contactsRefreshCallback=contactListWidget_contactsRefreshCallback;
contactListWidget_t.prototype.avatarClickEvent=contactListWidget_avatarClickEvent;
contactListWidget_t.prototype.cleanUpWidgets=contactListWidget_cleanUpWidgets;
contactListWidget_t.prototype.DEFAULT_HEIGHT=58;
contactListWidget_t.prototype.SCROLL_IMG_WIDTH=15;
contactListWidget_t.prototype.SCROLL_IMG_HEIGHT=15;
contactListWidget_t.prototype.SCROLL_LEFT_IMG="img/app/system/widgets/scrollbar/scroll_left";
contactListWidget_t.prototype.SCROLL_RIGHT_IMG="img/app/system/widgets/scrollbar/scroll_right";
contactListWidget_t.prototype.CONTACT_DIV_WIDTH=60;
contactListWidget_t.prototype.AVATAR_WIDTH=30;
contactListWidget_t.prototype.AVATAR_HEIGHT=30;
contactListWidget_t.prototype.CONTACT_PADDING=3;
contactListWidget_t.prototype.SCROLL_INCREMENT=10;
contactListWidget_t.prototype.AVATAR_CLICK_EVENT=1;
}
catch(ex){
jsExDebug("contactListWidget_t.prototype",ex);
}
function contactListWidget_t(_1,_2,_3){
try{
this.contactListWidget_super(_1,true);
this.listPosition=0;
this.contactData=[];
this.clickedContact=null;
this.numberVisible=0;
this.notifierIndex=this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_REMOVE,new this.SYSTEM.Delegate(this,this.removeContactNotificationCallback,[0]));
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.CONTACTS_ACCEPT,new this.SYSTEM.Delegate(this,this.newContactNotificationCallback,[0]),this.notifierIndex);
if(!_3){
this.createDom(_2);
this.bindEvents();
}
}
catch(ex){
jsExDebug("contactListWidget_t",ex);
}
}
function contactListWidget_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Notifier.unregisterActionListener(me.notifierIndex);
me.notifierIndex=null;
me.leftScrollBtn.cleanUp();
me.leftScrollBtn=null;
me.rightScrollBtn.cleanUp();
me.rightScrollBtn=null;
me.cleanUpWidgets();
me.innerListDiv=null;
me.listDiv=null;
me.clickedContact=null;
me.numberVisible=null;
me.lastContactPosition=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("contactListWidget_cleanUp",ex);
}
}
function contactListWidget_createDom(_5){
try{
this.setDimensions(_5,this.DEFAULT_HEIGHT);
var _6=document.createElement("div");
_6.style.position="absolute";
_6.style.left="0px";
_6.style.top="0px";
_6.style.width=(this.width-2)+"px";
_6.style.height=(this.height-(this.SCROLL_IMG_HEIGHT+2))+"px";
_6.style.overflow="hidden";
var _7=document.createElement("div");
_7.style.position="absolute";
_7.style.left=this.listPosition+"px";
_7.style.top="0px";
_7.style.width="auto";
_7.style.height=(this.height-(this.SCROLL_IMG_HEIGHT+2))+"px";
_6.appendChild(_7);
this.innerListDiv=_7;
this.listDiv=_6;
this.widgetElement.appendChild(_6);
var _8=new this.SYSTEM.Widget.Button("leftScrollBtn",this.SCROLL_LEFT_IMG,button_t.prototype.HOVER_IMAGE|button_t.prototype.ON_IMAGE,this.SCROLL_IMG_WIDTH,this.SCROLL_IMG_HEIGHT);
_8.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.leftScrollClickEvent));
_8.setPosition(this.SCROLL_IMG_WIDTH,0,1,1);
_8.enableTypematic();
_8.attach(this.widgetElement);
var _9=new this.SYSTEM.Widget.Button("rightScrollBtn",this.SCROLL_RIGHT_IMG,button_t.prototype.HOVER_IMAGE|button_t.prototype.ON_IMAGE,this.SCROLL_IMG_WIDTH,this.SCROLL_IMG_HEIGHT);
_9.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.rightScrollClickEvent));
_9.setPosition(0,0,1,1);
_9.enableTypematic();
_9.attach(this.widgetElement);
this.leftScrollBtn=_8;
this.rightScrollBtn=_9;
this.SYSTEM.Contacts.refresh();
}
catch(ex){
jsExDebug("contactListWidget_createDom",ex);
}
}
function contactListWidget_bindEvents(){
try{
}
catch(ex){
jsExDebug("contactListWidget_bindEvents",ex);
}
}
function contactListWidget_filter(_a){
try{
var _b=!_a;
var _c=new RegExp("^"+_a+".*$");
var _d=0;
var _e=this.CONTACT_DIV_WIDTH+(2*this.CONTACT_PADDING);
for(var _f in this.contactData){
if(this.contactData[_f]){
if(_f.match(_c)||_b){
this.contactData[_f].div.style.display="block";
this.contactData[_f].div.style.left=(_d*_e)+"px";
_d++;
}else{
this.contactData[_f].div.style.display="none";
}
}
}
this.lastContactPosition=_d*_e;
this.listPosition=0;
this.innerListDiv.style.left=this.listPosition+"px";
this.numberVisible=_d;
}
catch(ex){
jsExDebug("contactListWidget_filter",ex);
}
}
function contactListWidget_getVisibleCount(){
try{
return this.numberVisible;
}
catch(ex){
jsExDebug("contactListWidget_getVisibleCount",ex);
}
}
function contactListWidget_leftScrollClickEvent(_10,_11){
try{
if(this.listPosition<0){
this.listPosition+=this.SCROLL_INCREMENT;
this.innerListDiv.style.left=this.listPosition+"px";
}
}
catch(ex){
jsExDebug("contactListWidget_leftScrollClickEvent",ex);
}
}
function contactListWidget_rightScrollClickEvent(_12,_13){
try{
var _14=0-this.listPosition;
if(_14<((this.lastContactPosition)-parseInt(this.listDiv.style.width))){
this.listPosition-=this.SCROLL_INCREMENT;
this.innerListDiv.style.left=this.listPosition+"px";
}
}
catch(ex){
jsExDebug("contactListWidget_rightScrollClickEvent",ex);
}
}
function contactListWidget_avatarChangeCallback(_15){
try{
var _16=this.SYSTEM.Contacts.getContact(_15);
if(!_16){
return;
}
this.contactData[_16.getUserName()].avatar.src=_16.getAvatarPath(_16.AVATAR_30x30);
}
catch(ex){
jsExDebug("contactListWidget_avatarChangeCallback",ex);
}
}
function contactListWidget_removeContactNotificationCallback(_17){
try{
this.SYSTEM.Contacts.removeContactFromList(_17);
this.contactsRefreshCallback();
}
catch(ex){
jsExDebug("contactListWidget_removeContactNotificationCallback",ex);
}
}
function contactListWidget_newContactNotificationCallback(_18){
try{
this.SYSTEM.Contacts.refreshContact(_18,new this.SYSTEM.Delegate(this,this.contactsRefreshCallback));
}
catch(ex){
jsExDebug("contactListWidget_removeContactNotificationCallback",ex);
}
}
function contactListWidget_addContact(_19,_1a){
try{
var _1b=parseInt(this.listDiv.style.height);
var _1c=document.createElement("div");
_1c.style.position="absolute";
_1c.style.width=this.CONTACT_DIV_WIDTH+"px";
_1c.style.height=_1b+"px";
_1c.style.left=_1a+"px";
var _1d=document.createElement("img");
_1d.style.position="absolute";
_1d.style.left=((this.CONTACT_DIV_WIDTH-this.AVATAR_WIDTH)/2)+"px";
_1d.style.width=this.AVATAR_WIDTH+"px";
_1d.style.height=this.AVATAR_HEIGHT+"px";
_1d.src=_19.getAvatarPath(_19.AVATAR_30x30);
_1d.style.cursor="pointer";
this.SYSTEM.Event.attachEvent(_1d,"onclick","click",this.avatarClickEvent,this,false,_19.getUserName());
_1c.appendChild(_1d);
var _1e=document.createElement("span");
_1e.style.position="absolute";
_1e.style.left="0px";
_1e.style.top=this.AVATAR_HEIGHT+"px";
_1e.style.width="100%";
_1e.style.height=(_1b-this.AVATAR_HEIGHT)+"px";
_1e.style.fontSize="7pt";
_1e.style.overflow="hidden";
_1e.style.textAlign="center";
_1e.style.display="block";
_1e.innerHTML=_19.getUserName();
_1c.appendChild(_1e);
this.innerListDiv.appendChild(_1c);
this.contactData[_19.getUserName()]={div:_1c,ref:_19,avatar:_1d};
}
catch(ex){
jsExDebug("contactListWidget_addContact",ex);
}
}
function contactListWidget_contactsRefreshCallback(){
try{
var _1f=this.SYSTEM.Contacts.getAcceptedContacts();
this.cleanUpWidgets(true);
for(var i=0;i<_1f.length;i++){
this.addContact(_1f[i],i*(this.CONTACT_DIV_WIDTH+(2*this.CONTACT_PADDING)));
}
this.lastContactPosition=i*(this.CONTACT_DIV_WIDTH+(2*this.CONTACT_PADDING));
this.numberVisible=_1f.length;
}
catch(ex){
jsExDebug("contactListWidget_contactsRefreshCallback",ex);
}
}
function contactListWidget_avatarClickEvent(_21,me,_23){
try{
me.clickedContact=me.contactData[_23].ref;
me.fireEvent(me.AVATAR_CLICK_EVENT,_21);
}
catch(ex){
jsExDebug("contactListWidget_avatarClickEvent",ex);
}
}
function contactListWidget_cleanUpWidgets(_24){
try{
for(var _25 in this.contactData){
if(this.contactData[_25]){
this.innerListDiv.removeChild(this.contactData[_25].div);
this.contactData[_25].div=null;
this.SYSTEM.Event.detachEvent(this.contactData[_25].avatar,"onclick","click");
this.contactData[_25].avatar=null;
this.contactData[_25].ref=null;
this.contactData[_25]=null;
}
}
if(_24){
this.contactData=[];
}else{
this.contactData=null;
}
}
catch(ex){
jsExDebug("contactListWidget_cleanUpWidgets",ex);
}
}

try{
mapSidebar_t.prototype=new widget_t();
mapSidebar_t.prototype.constructor=mapSidebar_t;
mapSidebar_t.prototype.cleanUp=mapSidebar_cleanUp;
mapSidebar_t.prototype.mapSidebar_super=widget_t.prototype.constructor;
mapSidebar_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
mapSidebar_t.prototype.createDom=mapSidebar_createDom;
mapSidebar_t.prototype.bindEvents=mapSidebar_bindEvents;
mapSidebar_t.prototype.unbindEvents=mapSidebar_unbindEvents;
mapSidebar_t.prototype.widget_setDimensions=widget_t.prototype.setDimensions;
mapSidebar_t.prototype.setDimensions=mapSidebar_setDimensions;
mapSidebar_t.prototype.fireEvent=mapSidebar_fireEvent;
mapSidebar_t.prototype.setMapReference=mapSidebar_setMapReference;
mapSidebar_t.prototype.setUserOnMap=mapSidebar_setUserOnMap;
mapSidebar_t.prototype.setUserFollowed=mapSidebar_setUserFollowed;
mapSidebar_t.prototype.setContactFollowed=mapSidebar_setContactFollowed;
mapSidebar_t.prototype.setContactOnMap=mapSidebar_setContactOnMap;
mapSidebar_t.prototype.setPointOnMap=mapSidebar_setPointOnMap;
mapSidebar_t.prototype.setPublicUserOnMap=mapSidebar_setPublicUserOnMap;
mapSidebar_t.prototype.setPublicUserFollowed=mapSidebar_setPublicUserFollowed;
mapSidebar_t.prototype.setOffMapByHash=mapSidebar_setOffMapByHash;
mapSidebar_t.prototype.overrideSearchTerm=mapSidebar_overrideSearchTerm;
mapSidebar_t.prototype.overrideExtraContactInfo=mapSidebar_overrideExtraContactInfo;
mapSidebar_t.prototype.overrideSortType=mapSidebar_overrideSortType;
mapSidebar_t.prototype.updateList=mapSidebar_updateList;
mapSidebar_t.prototype.addItem=mapSidebar_addItem;
mapSidebar_t.prototype.addUser=mapSidebar_addUser;
mapSidebar_t.prototype.addContact=mapSidebar_addContact;
mapSidebar_t.prototype.addPoint=mapSidebar_addPoint;
mapSidebar_t.prototype.addPublicUser=mapSidebar_addPublicUser;
mapSidebar_t.prototype.cleanUpData=mapSidebar_cleanUpData;
mapSidebar_t.prototype.applySearchAndSort=mapSidebar_applySearchAndSort;
mapSidebar_t.prototype.getItemByName=mapSidebar_getItemByName;
mapSidebar_t.prototype.contactsRefreshCallback=mapSidebar_contactsRefreshCallback;
mapSidebar_t.prototype.pointsRefreshCallback=mapSidebar_pointsRefreshCallback;
mapSidebar_t.prototype.userDetailsRefreshCallback=mapSidebar_userDetailsRefreshCallback;
mapSidebar_t.prototype.restoreExpandedItemToNormal=mapSidebar_restoreExpandedItemToNormal;
mapSidebar_t.prototype.expandItem=mapSidebar_expandItem;
mapSidebar_t.prototype.updateExpandDom=mapSidebar_updateExpandDom;
mapSidebar_t.prototype.updateItemIcon=mapSidebar_updateItemIcon;
mapSidebar_t.prototype.getItem=mapSidebar_getItem;
mapSidebar_t.prototype.showExtraInfoForItem=mapSidebar_showExtraInfoForItem;
mapSidebar_t.prototype.extraContactInfoTimerCallback=mapSidebar_extraContactInfoTimerCallback;
mapSidebar_t.prototype.getWorkspaceFriendlySearchTerm=mapSidebar_getWorkspaceFriendlySearchTerm;
mapSidebar_t.prototype.keyUpEvent=mapSidebar_keyUpEvent;
mapSidebar_t.prototype.sortSelectEvent=mapSidebar_sortSelectEvent;
mapSidebar_t.prototype.addContactToMapEvent=mapSidebar_addContactToMapEvent;
mapSidebar_t.prototype.followContactEvent=mapSidebar_followContactEvent;
mapSidebar_t.prototype.addUserToMapEvent=mapSidebar_addUserToMapEvent;
mapSidebar_t.prototype.followUserEvent=mapSidebar_followUserEvent;
mapSidebar_t.prototype.zoomCentreEvent=mapSidebar_zoomCentreEvent;
mapSidebar_t.prototype.centreEvent=mapSidebar_centreEvent;
mapSidebar_t.prototype.noChangeEvent=mapSidebar_noChangeEvent;
mapSidebar_t.prototype.pointRemoveEvent=mapSidebar_pointRemoveEvent;
mapSidebar_t.prototype.userAvatarClickEvent=mapSidebar_userAvatarClickEvent;
mapSidebar_t.prototype.contactAvatarClickEvent=mapSidebar_contactAvatarClickEvent;
mapSidebar_t.prototype.expandItemEvent=mapSidebar_expandItemEvent;
mapSidebar_t.prototype.itemIconClickEvent=mapSidebar_itemIconClickEvent;
mapSidebar_t.prototype.extraContactInfoSelectEvent=mapSidebar_extraContactInfoSelectEvent;
mapSidebar_t.prototype.clearSearchBtnClickEvent=mapSidebar_clearSearchBtnClickEvent;
mapSidebar_t.prototype.addPublicUserToMapEvent=mapSidebar_addPublicUserToMapEvent;
mapSidebar_t.prototype.followPublicUserEvent=mapSidebar_followPublicUserEvent;
mapSidebar_t.prototype.sendPublicUserRequestEvent=mapSidebar_sendPublicUserRequestEvent;
mapSidebar_t.prototype.USER_DATA=1;
mapSidebar_t.prototype.CONTACT_DATA=2;
mapSidebar_t.prototype.POINT_DATA=3;
mapSidebar_t.prototype.PUBLIC_USER_DATA=4;
mapSidebar_t.prototype.SORT_TYPE=1;
mapSidebar_t.prototype.SORT_NAME=2;
mapSidebar_t.prototype.SORT_EXTRA=3;
mapSidebar_t.prototype.WIDTH=220;
mapSidebar_t.prototype.SEARCH_SORT_DIV_HEIGHT=80;
mapSidebar_t.prototype.ITEM_WIDTH=mapSidebar_t.prototype.WIDTH-20;
mapSidebar_t.prototype.ITEM_HEIGHT=20;
mapSidebar_t.prototype.ICON_SIDE=16;
mapSidebar_t.prototype.ITEM_BTN_PADDING=2;
mapSidebar_t.prototype.NAME_FONT_SIZE=9;
mapSidebar_t.prototype.EXPAND_PADDING=3;
mapSidebar_t.prototype.EXPAND_DOM_LEFT=64;
mapSidebar_t.prototype.EXPAND_DOM_FONT_SIZE=8;
mapSidebar_t.prototype.EXTRA_NAME_DELIMITER="{#}";
mapSidebar_t.prototype.USER_IMG="img/app/app/map/icons/sidebar_user";
mapSidebar_t.prototype.CONTACT_IMG="img/app/app/map/icons/sidebar_contact";
mapSidebar_t.prototype.POINT_IMG="img/app/app/map/icons/sidebar_point";
mapSidebar_t.prototype.PUBLIC_USER_IMG="img/app/app/map/icons/sidebar_user";
mapSidebar_t.prototype.CANCEL_IMG="img/app/app/map/icons/cancel";
mapSidebar_t.prototype.FOLLOW_ON_IMG="img/app/app/map/icons/follow_on";
mapSidebar_t.prototype.FOLLOW_OFF_IMG="img/app/app/map/icons/follow_off";
mapSidebar_t.prototype.FOLLOW_OFF_TEXT="Follow";
mapSidebar_t.prototype.FOLLOW_ON_TEXT="Stop following";
mapSidebar_t.prototype.ADD_TO_MAP_ON_IMG="img/app/app/map/icons/map_remove";
mapSidebar_t.prototype.ADD_TO_MAP_OFF_IMG="img/app/app/map/icons/map_add";
mapSidebar_t.prototype.ADD_TO_MAP_OFF_TEXT="View Location";
mapSidebar_t.prototype.ADD_TO_MAP_ON_TEXT="Remove Location";
mapSidebar_t.prototype.SEND_REQUEST_IMG="img/app/app/map/icons/toggle_off";
mapSidebar_t.prototype.SEND_REQUEST_TEXT="Send Contact request";
mapSidebar_t.prototype.ZOOM_CENTRE_IMG="img/app/app/map/icons/zoom_centre";
mapSidebar_t.prototype.CENTRE_IMG="img/app/app/map/icons/centre";
mapSidebar_t.prototype.NO_CHANGE_IMG="img/app/app/map/icons/nochange";
mapSidebar_t.prototype.REMOVE_IMG="img/app/app/map/icons/cancel";
mapSidebar_t.prototype.CONTACT_INFO_TIME_SINCE_UPDATE=1;
mapSidebar_t.prototype.CONTACT_INFO_TIME_OF_UPDATE=2;
mapSidebar_t.prototype.CONTACT_INFO_DISTANCE_FROM_ME=3;
mapSidebar_t.prototype.CONTACT_INFO_DISTANCE_FROM_CENTRE=4;
mapSidebar_t.prototype.MAP_TOGGLE_EVENT=1;
mapSidebar_t.prototype.FOLLOW_TOGGLE_EVENT=2;
mapSidebar_t.prototype.POINT_ZOOM_CENTRE_EVENT=4;
mapSidebar_t.prototype.POINT_CENTRE_EVENT=5;
mapSidebar_t.prototype.POINT_NO_CHANGE_EVENT=6;
mapSidebar_t.prototype.POINT_REMOVE_EVENT=7;
mapSidebar_t.prototype.AVATAR_CLICK_EVENT=8;
mapSidebar_t.prototype.EXTRA_CONTACT_INFO_TIMER_INTERVAL=10000;
}
catch(ex){
jsExDebug("mapSidebar_t.prototype",ex);
}
function mapSidebar_t(_1,_2){
try{
this.mapSidebar_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.currentSortType=this.SORT_TYPE;
this.currentExtraContactInfo=this.CONTACT_INFO_TIME_SINCE_UPDATE;
this.currentSearchTerm="";
this.expandedItemType=null;
this.expandedItemPosition=null;
this.currentExpandDom=null;
this.visibleItems=null;
this.legalTrackingAgeFlag=this.SYSTEM.UserDetails.isLegalTrackingAge();
this.expandHeight=[];
this.expandHeight[this.USER_DATA]=60;
this.expandHeight[this.CONTACT_DATA]=60;
this.expandHeight[this.POINT_DATA]=60;
this.expandHeight[this.PUBLIC_USER_DATA]=60;
this.expandDom=[];
this.data=[];
this.data[this.USER_DATA]={list:[],byName:[]};
this.data[this.CONTACT_DATA]={list:[],byName:[]};
this.data[this.POINT_DATA]={list:[],byName:[]};
this.data[this.PUBLIC_USER_DATA]={list:[],byName:[]};
this.mapStatus=[];
this.mapStatus[this.USER_DATA]=[];
this.mapStatus[this.CONTACT_DATA]=[];
this.mapStatus[this.POINT_DATA]=[];
this.mapStatus[this.PUBLIC_USER_DATA]=[];
var _3=new this.SYSTEM.Delegate(this,this.contactsRefreshCallback);
this.contactsActionIndex=this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ,_3);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ_CONTACT,_3,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_REMOVE,_3,this.contactsActionIndex);
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_SET_AVATAR,_3,this.contactsActionIndex);
var _4=new this.SYSTEM.Delegate(this,this.pointsRefreshCallback);
this.pointsActionIndex=this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_READ,_4);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_ADD,_4,this.pointsActionIndex);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_DELETE,_4,this.pointsActionIndex);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_UPDATE,_4,this.pointsActionIndex);
var _5=new this.SYSTEM.Delegate(this,this.userDetailsRefreshCallback);
this.userDetailsActionIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_LOAD,_5);
this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_SAVE,_5,this.userDetailsActionIndex);
this.keyUpEventIndex=this.SYSTEM.Event.notifyKeyUpEvent(this.keyUpEvent,this);
this.extraContactInfoTimer=new timer_t(new this.SYSTEM.Delegate(this,this.extraContactInfoTimerCallback),null,null,this.EXTRA_CONTACT_INFO_TIMER_INTERVAL);
if(!_2){
this.createDom();
this.bindEvents();
}
this.updateList();
}
catch(ex){
jsExDebug("mapSidebar_t",ex);
}
}
function mapSidebar_cleanUp(me){
try{
if(!me){
me=this;
}
me.extraContactInfoTimer.cleanUp();
me.extraContactInfoTimer=null;
if(me.SYSTEM.Contacts){
me.SYSTEM.Contacts.unregisterActionListener(me.contactsActionIndex);
me.contactsActionIndex=null;
}
me.SYSTEM.Event.removeKeyUpHandler(me.keyUpEventIndex);
me.keyUpEventIndex=null;
if(me.SYSTEM.PeepelPoints){
me.SYSTEM.PeepelPoints.unregisterActionListener(me.pointsActionIndex);
me.pointsActionIndex=null;
}
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsActionIndex);
me.userDetailsActionIndex=null;
}
me.expandedItemType=null;
me.expandedItemPosition=null;
me.expandedStatusItem=null;
me.currentExpandDom=null;
me.expandHeight[me.USER_DATA]=null;
me.expandHeight[me.CONTACT_DATA]=null;
me.expandHeight[me.POINT_DATA]=null;
me.expandHeight[me.PUBLIC_USER_DATA]=null;
me.expandHeight=null;
me.expandDom[me.USER_DATA]=null;
me.expandDom[me.CONTACT_DATA]=null;
me.expandDom[me.POINT_DATA]=null;
me.expandDom[me.PUBLIC_USER_DATA]=null;
me.expandDom=null;
me.cleanUpData();
me.loadingDiv=null;
me.searchAndSortDiv=null;
me.searchLabel.cleanUp();
me.searchLabel=null;
me.searchText.cleanUp();
me.searchText=null;
me.clearSearchBtn.cleanUp();
me.clearSearchBtn=null;
me.userExpandDiv=null;
me.contactExpandDiv=null;
me.pointExpandDiv=null;
me.userAvatar=null;
me.addUserToMapBtn.cleanUp();
me.addUserToMapBtn=null;
me.addUserToMapLabel.cleanUp();
me.addUserToMapLabel=null;
me.followUserBtn.cleanUp();
me.followUserBtn=null;
me.followUserLabel.cleanUp();
me.followUserLabel=null;
me.contactAvatar=null;
me.addContactToMapBtn.cleanUp();
me.addContactToMapBtn=null;
me.addContactToMapLabel.cleanUp();
me.addContactToMapLabel=null;
me.followContactBtn.cleanUp();
me.followContactBtn=null;
me.followContactLabel.cleanUp();
me.followContactLabel=null;
me.zoomCentreBtn.cleanUp();
me.zoomCentreBtn=null;
me.zoomCentreLabel.cleanUp();
me.zoomCentreLabel=null;
me.centreBtn.cleanUp();
me.centreBtn=null;
me.centreLabel.cleanUp();
me.centreLabel=null;
me.noChangeBtn.cleanUp();
me.noChangeBtn=null;
me.noChangeLabel.cleanUp();
me.noChangeLabel=null;
me.removeBtn.cleanUp();
me.removeBtn=null;
me.removeLabel.cleanUp();
me.removeLabel=null;
me.publicUserAvatar=null;
me.addPublicUserToMapBtn.cleanUp();
me.addPublicUserToMapBtn=null;
me.addPublicUserToMapLabel.cleanUp();
me.addPublicUserToMapLabel=null;
me.followPublicUserBtn.cleanUp();
me.followPublicUserBtn=null;
me.followPublicUserLabel.cleanUp();
me.followPublicUserLabel=null;
me.sendRequestBtn.cleanUp();
me.sendRequestBtn=null;
me.sendRequestLabel.cleanUp();
me.sendRequestLabel=null;
me.mapReference=null;
me.currentSortType=null;
me.currentExtraContactInfo=null;
me.extraContactInfoSelect.cleanUp();
me.extraContactInfoSelect=null;
me.sortSelect.cleanUp();
me.sortSelect=null;
if(me.visibleItems){
for(var i=0;i<me.visibleItems.length;i++){
me.visibleItems[i]=null;
}
}
me.visibleItems=null;
me.listDiv=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("mapSidebar_cleanUp",ex);
}
}
function mapSidebar_createDom(){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"droplist");
var _8=this.SYSTEM.Dom.createDiv("absolute",this.ITEM_WIDTH,30,this.ITEM_WIDTH/3);
_8.innerHTML="Loading...";
this.widgetElement.appendChild(_8);
var _9=this.SYSTEM.Dom.createDiv("absolute",this.WIDTH,0,0,0);
_9.style.overflow="auto";
this.widgetElement.appendChild(_9);
this.listDiv=_9;
var _a=this.SYSTEM.Dom.createDiv("absolute",this.WIDTH,this.SEARCH_SORT_DIV_HEIGHT,0);
_a.style.bottom="0px";
var _b=new this.SYSTEM.Widget.Label("searchLabel","Filter");
_b.setPosition(this.pad,this.pad);
_b.attach(_a);
var _c=new this.SYSTEM.Widget.Text("searchText");
_c.setPosition(50,this.pad-1);
_c.setDimensions(125);
_c.attach(_a);
var _d=new this.SYSTEM.Widget.Button("clearSearchBtn",this.CANCEL_IMG,null,16,16);
_d.setPosition(_c.positionX+_c.width+5,_c.positionY+2);
_d.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.clearSearchBtnClickEvent));
_d.hide();
_d.attach(_a);
var _e=new this.SYSTEM.Widget.Label("sortLabel","Sort");
_e.setPosition(_b.positionX,28);
_e.attach(_a);
var _f=new this.SYSTEM.Widget.DropText("sortSelect",120);
_f.allowListOnTop();
_f.setPosition(_c.positionX,_e.positionY-1);
_f.addItem(this.SORT_TYPE,"By Type");
_f.addItem(this.SORT_NAME,"By Name (Alphabetical)","By Name");
_f.addItem(this.SORT_EXTRA,"By Extra Information","By Extra Info.");
_f.setSelectedValue(this.currentSortType);
_f.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,new this.SYSTEM.Delegate(this,this.sortSelectEvent));
_f.attach(_a);
var _10=new this.SYSTEM.Widget.Label("extraContactInfoLabel","Show");
_10.setPosition(_e.positionX,56);
_10.attach(_a);
var _11=new this.SYSTEM.Widget.DropText("extraContactInfoSelect",120);
_11.allowListOnTop();
_11.setPosition(_f.positionX,_10.positionY-1);
_11.addItem(this.CONTACT_INFO_TIME_SINCE_UPDATE,"Time since update");
_11.addItem(this.CONTACT_INFO_TIME_OF_UPDATE,"Time of update");
_11.addItem(this.CONTACT_INFO_DISTANCE_FROM_ME,"Distance from me");
_11.addItem(this.CONTACT_INFO_DISTANCE_FROM_CENTRE,"Distance from centre");
_11.setSelectedValue(this.currentExtraContactInfo);
_11.addEventHandler(this.SYSTEM.Event.LIST_ITEM_SELECT_EVENT,new this.SYSTEM.Delegate(this,this.extraContactInfoSelectEvent));
_11.attach(_a);
this.widgetElement.appendChild(_a);
this.loadingDiv=_8;
this.searchAndSortDiv=_a;
this.searchLabel=_b;
this.searchText=_c;
this.clearSearchBtn=_d;
this.extraContactInfoSelect=_11;
this.sortSelect=_f;
var _12="rgb(200,200,200)";
var _13=0.4;
if(getContrastingColour(this.SYSTEM.Dom.getCurrentStyle(document.body).color)=="rgb(0,0,0)"){
_12="rgb(255,255,255)";
_13=0.3;
}
var _14=this.SYSTEM.Dom.createDiv("absolute",this.ITEM_WIDTH,this.expandHeight[this.USER_DATA],0,this.ITEM_HEIGHT);
var _15=this.SYSTEM.Dom.createDiv("relative","100%","100%");
_15.style.backgroundColor=_12;
this.SYSTEM.Dom.setElementOpacity(_15,_13);
_14.appendChild(_15);
var _16=this.SYSTEM.Dom.createImage(this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_50),"absolute",this.SYSTEM.UserDetails.SIDE_50,this.SYSTEM.UserDetails.SIDE_50,(2*this.EXPAND_PADDING),this.EXPAND_PADDING);
_16.style.cursor="pointer";
_14.appendChild(_16);
var _17=new this.SYSTEM.Widget.Button("addUserToMapBtn",this.ADD_TO_MAP_OFF_IMG,null,this.ICON_SIDE,this.ICON_SIDE);
_17.setPosition(this.EXPAND_DOM_LEFT,this.EXPAND_PADDING);
_17.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.addUserToMapEvent));
_17.attach(_14);
var _18=new this.SYSTEM.Widget.Label("addUserToMapLabel",this.ADD_TO_MAP_OFF_TEXT);
_18.setPosition(_17.positionX+_17.width+this.EXPAND_PADDING,_17.positionY);
_18.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_18.setDimensions(this.ITEM_WIDTH-_18.positionX,20);
_18.disallowWrap();
_18.setCursor("pointer");
_18.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.addUserToMapEvent));
_18.attach(_14);
var _19=new this.SYSTEM.Widget.Button("followUserBtn",this.FOLLOW_OFF_IMG,null,this.ICON_SIDE,this.ICON_SIDE);
_19.setPosition(this.EXPAND_DOM_LEFT,_17.positionY+_17.height+1);
_19.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.followUserEvent));
_19.attach(_14);
var _1a=new this.SYSTEM.Widget.Label("followUserLabel",this.FOLLOW_OFF_TEXT);
_1a.setPosition(_19.positionX+_19.width+this.EXPAND_PADDING,_19.positionY);
_1a.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_1a.setDimensions(this.ITEM_WIDTH-_1a.positionX,20);
_1a.disallowWrap();
_1a.setCursor("pointer");
_1a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.followUserEvent));
_1a.attach(_14);
var _1b=this.SYSTEM.Dom.createDiv("absolute",this.ITEM_WIDTH,this.expandHeight[this.USER_DATA],0,this.ITEM_HEIGHT);
var _1c=this.SYSTEM.Dom.createDiv("relative","100%","100%");
_1c.style.backgroundColor=_12;
this.SYSTEM.Dom.setElementOpacity(_1c,_13);
_1b.appendChild(_1c);
var _1d=this.SYSTEM.Dom.createImage(null,"absolute",this.SYSTEM.UserDetails.SIDE_50,this.SYSTEM.UserDetails.SIDE_50,this.EXPAND_PADDING,this.EXPAND_PADDING);
_1d.style.cursor="pointer";
_1b.appendChild(_1d);
var _1e=new this.SYSTEM.Widget.Button("addContactToMapBtn",this.ADD_TO_MAP_OFF_IMG,null,this.ICON_SIDE,this.ICON_SIDE);
_1e.setPosition(this.EXPAND_DOM_LEFT,this.EXPAND_PADDING);
_1e.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.addContactToMapEvent));
_1e.attach(_1b);
var _1f=new this.SYSTEM.Widget.Label("addContactToMapLabel","View location");
_1f.setPosition(_1e.positionX+_1e.width+this.EXPAND_PADDING,_1e.positionY);
_1f.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_1f.setDimensions(this.ITEM_WIDTH-_18.positionX,20);
_1f.disallowWrap();
_1f.setCursor("pointer");
_1f.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.addContactToMapEvent));
_1f.attach(_1b);
var _20=new this.SYSTEM.Widget.Button("followContactBtn",this.FOLLOW_OFF_IMG,null,this.ICON_SIDE,this.ICON_SIDE);
_20.setPosition(this.EXPAND_DOM_LEFT,_1e.positionY+_1e.height+1);
_20.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.followContactEvent));
_20.attach(_1b);
var _21=new this.SYSTEM.Widget.Label("followContactLabel","Follow");
_21.setPosition(_20.positionX+_20.width+this.EXPAND_PADDING,_20.positionY);
_21.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_21.setDimensions(this.ITEM_WIDTH-_21.positionX,20);
_21.disallowWrap();
_21.setCursor("pointer");
_21.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.followContactEvent));
_21.attach(_1b);
var _22=this.SYSTEM.Dom.createDiv("absolute",this.ITEM_WIDTH,this.expandHeight[this.USER_DATA],0,this.ITEM_HEIGHT);
var _23=this.SYSTEM.Dom.createDiv("relative","100%","100%");
_23.style.backgroundColor=_12;
this.SYSTEM.Dom.setElementOpacity(_23,_13);
_22.appendChild(_23);
var _24=new this.SYSTEM.Widget.Button("zoomCentreBtn",this.ZOOM_CENTRE_IMG,null,this.ICON_SIDE,this.ICON_SIDE,null,"View (zoom & centre)");
_24.setPosition(this.EXPAND_PADDING,this.EXPAND_PADDING);
_24.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.zoomCentreEvent));
_24.attach(_22);
var _25=new this.SYSTEM.Widget.Label("zoomCentreLabel","View (zoom & centre)");
_25.setPosition(_24.positionX+_24.width+this.EXPAND_PADDING,_24.positionY);
_25.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_25.setDimensions(this.ITEM_WIDTH-_25.positionX,20);
_25.disallowWrap();
_25.setCursor("pointer");
_25.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.zoomCentreEvent));
_25.attach(_22);
var _26=new this.SYSTEM.Widget.Button("centreBtn",this.CENTRE_IMG,null,this.ICON_SIDE,this.ICON_SIDE,null,"View (centre only)");
_26.setPosition(this.EXPAND_PADDING,_24.positionY+_24.height+this.EXPAND_PADDING);
_26.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.centreEvent));
_26.attach(_22);
var _27=new this.SYSTEM.Widget.Label("centreLabel","View (centre only)");
_27.setPosition(_26.positionX+_26.width+this.EXPAND_PADDING,_26.positionY);
_27.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_27.setDimensions(this.ITEM_WIDTH-_27.positionX,20);
_27.disallowWrap();
_27.setCursor("pointer");
_27.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.centreEvent));
_27.attach(_22);
var _28=new this.SYSTEM.Widget.Button("noChangeBtn",this.NO_CHANGE_IMG,null,this.ICON_SIDE,this.ICON_SIDE,null,"View (centre only)");
_28.setPosition(this.EXPAND_PADDING,_26.positionY+_26.height+this.EXPAND_PADDING);
_28.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.noChangeEvent));
_28.attach(_22);
var _29=new this.SYSTEM.Widget.Label("noChangeLabel","View (no change)");
_29.setPosition(_28.positionX+_28.width+this.EXPAND_PADDING,_28.positionY);
_29.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_29.setDimensions(this.ITEM_WIDTH-_29.positionX,20);
_29.disallowWrap();
_29.setCursor("pointer");
_29.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.noChangeEvent));
_29.attach(_22);
var _2a=new this.SYSTEM.Widget.Button("removeBtn",this.REMOVE_IMG,null,this.ICON_SIDE,this.ICON_SIDE,null,"Remove the point from the map");
_2a.setPosition(_24.positionX,_24.positionY);
_2a.hide();
_2a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.pointRemoveEvent));
_2a.attach(_22);
var _2b=new this.SYSTEM.Widget.Label("removeLabel","Remove from map");
_2b.setPosition(_2a.positionX+_2a.width+this.EXPAND_PADDING,_2a.positionY);
_2b.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_2b.setDimensions(this.ITEM_WIDTH-_2b.positionX,20);
_2b.disallowWrap();
_2b.setCursor("pointer");
_2b.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.pointRemoveEvent));
_2b.attach(_22);
var _2c=this.SYSTEM.Dom.createDiv("absolute",this.ITEM_WIDTH,this.expandHeight[this.USER_DATA],0,this.ITEM_HEIGHT);
var _2d=this.SYSTEM.Dom.createDiv("relative","100%","100%");
_2d.style.backgroundColor=_12;
this.SYSTEM.Dom.setElementOpacity(_2d,_13);
_2c.appendChild(_2d);
var _2e=this.SYSTEM.Dom.createImage(null,"absolute",this.SYSTEM.UserDetails.SIDE_50,this.SYSTEM.UserDetails.SIDE_50,(2*this.EXPAND_PADDING),this.EXPAND_PADDING);
_2e.style.cursor="pointer";
_2c.appendChild(_2e);
var _2f=new this.SYSTEM.Widget.Button("addPublicUserToMapBtn",this.ADD_TO_MAP_OFF_IMG,null,this.ICON_SIDE,this.ICON_SIDE);
_2f.setPosition(this.EXPAND_DOM_LEFT,this.EXPAND_PADDING);
_2f.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.addPublicUserToMapEvent));
_2f.attach(_2c);
var _30=new this.SYSTEM.Widget.Label("addPublicUserToMapLabel",this.ADD_TO_MAP_OFF_TEXT);
_30.setPosition(_2f.positionX+_2f.width+this.EXPAND_PADDING,_2f.positionY);
_30.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_30.setDimensions(this.ITEM_WIDTH-_18.positionX,20);
_30.disallowWrap();
_30.setCursor("pointer");
_30.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.addPublicUserToMapEvent));
_30.attach(_2c);
var _31=new this.SYSTEM.Widget.Button("followPublicUserBtn",this.FOLLOW_OFF_IMG,null,this.ICON_SIDE,this.ICON_SIDE);
_31.setPosition(this.EXPAND_DOM_LEFT,_2f.positionY+_2f.height+1);
_31.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.followPublicUserEvent));
_31.attach(_2c);
var _32=new this.SYSTEM.Widget.Label("followUserLabel",this.FOLLOW_OFF_TEXT);
_32.setPosition(_31.positionX+_31.width+this.EXPAND_PADDING,_31.positionY);
_32.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_32.setDimensions(this.ITEM_WIDTH-_1a.positionX,20);
_32.disallowWrap();
_32.setCursor("pointer");
_32.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.followPublicUserEvent));
_32.attach(_2c);
var _33=new this.SYSTEM.Widget.Button("sendRequestBtn",this.SEND_REQUEST_IMG,null,this.ICON_SIDE,this.ICON_SIDE);
_33.setPosition(this.EXPAND_DOM_LEFT,_31.positionY+_31.height+1);
_33.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.sendPublicUserRequestEvent));
_33.attach(_2c);
var _34=new this.SYSTEM.Widget.Label("sendRequestLabel",this.SEND_REQUEST_TEXT);
_34.setPosition(_33.positionX+_33.width+this.EXPAND_PADDING,_33.positionY);
_34.setFontSize(null,this.EXPAND_DOM_FONT_SIZE);
_34.setDimensions(this.ITEM_WIDTH-_21.positionX,20);
_34.disallowWrap();
_34.setCursor("pointer");
_34.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.sendPublicUserRequestEvent));
_34.attach(_2c);
this.expandDom[this.USER_DATA]=_14;
this.expandDom[this.CONTACT_DATA]=_1b;
this.expandDom[this.POINT_DATA]=_22;
this.expandDom[this.PUBLIC_USER_DATA]=_2c;
this.userAvatar=_16;
this.addUserToMapBtn=_17;
this.addUserToMapLabel=_18;
this.followUserBtn=_19;
this.followUserLabel=_1a;
this.contactAvatar=_1d;
this.addContactToMapBtn=_1e;
this.addContactToMapLabel=_1f;
this.followContactBtn=_20;
this.followContactLabel=_21;
this.zoomCentreBtn=_24;
this.zoomCentreLabel=_25;
this.centreBtn=_26;
this.centreLabel=_27;
this.noChangeBtn=_28;
this.noChangeLabel=_29;
this.removeBtn=_2a;
this.removeLabel=_2b;
this.publicUserAvatar=_2e;
this.addPublicUserToMapBtn=_2f;
this.addPublicUserToMapLabel=_30;
this.followPublicUserBtn=_31;
this.followPublicUserLabel=_32;
this.sendRequestBtn=_33;
this.sendRequestLabel=_34;
this.setDimensions(this.WIDTH,0);
}
catch(ex){
jsExDebug("mapSidebar_createDom",ex);
}
}
function mapSidebar_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.userAvatar,"onclick","click",this.userAvatarClickEvent,this);
this.SYSTEM.Event.attachEvent(this.contactAvatar,"onclick","click",this.contactAvatarClickEvent,this);
}
catch(ex){
jsExDebug("mapSidebar_bindEvents",ex);
}
}
function mapSidebar_unbindEvents(){
try{
this.SYSTEM.Event.detachEvent(this.userAvatar,"onclick","click");
this.SYSTEM.Event.detachEvent(this.contactAvatar,"onclick","click");
}
catch(ex){
jsExDebug("mapSidebar_unbindEvents",ex);
}
}
function mapSidebar_setDimensions(_35,_36){
try{
this.widget_setDimensions(_35,_36);
this.listDiv.style.width=this.WIDTH+"px";
if(this.height){
this.listDiv.style.height=(this.height-this.SEARCH_SORT_DIV_HEIGHT)+"px";
this.loadingDiv.style.top=(this.height/2-parseInt(this.loadingDiv.style.height)/2)+"px";
}
}
catch(ex){
jsExDebug("mapSidebar_setDimensions",ex);
}
}
function mapSidebar_fireEvent(_37,_38,_39,_3a){
try{
if(!this.eventBindings||!this.eventBindings[_37]){
return;
}
if(_38){
var _3b=new SYSTEM.Event.Event(_38.clientX,_38.clientY);
if(document.all){
_3b.relatedTarget=_38.toElement;
}else{
_3b.relatedTarget=_38.relatedTarget;
}
}else{
var _3b=new SYSTEM.Event.Event();
}
_3b.toggleValue=_39;
_3b.parameter=_3a;
for(var i=this.eventBindings[_37].length-1;i>=0;i--){
var _3d=this.eventBindings[_37][i];
_3d.invoke(_3b,this);
}
}
catch(ex){
jsExDebug("mapSidebar_fireEvent",ex);
}
}
function mapSidebar_setMapReference(map){
try{
this.mapReference=map;
}
catch(ex){
jsExDebug("mapSidebar_setMapReference",ex);
}
}
function mapSidebar_setUserFollowed(_3f){
try{
var _40=this.mapStatus[this.USER_DATA][0];
if(_40.followed==_3f){
return;
}
_40.followed=_3f;
if(this.expandedStatusItem==_40){
this.updateExpandDom(this.USER_DATA);
}
this.updateItemIcon(this.USER_DATA,0);
}
catch(ex){
jsExDebug("mapSidebar_setUserFollowed",ex);
}
}
function mapSidebar_setUserOnMap(_41){
try{
var _42=this.mapStatus[this.USER_DATA][0];
if(_42.onMap==_41){
return;
}
_42.onMap=_41;
if(!_41){
_42.followed=false;
}
if(this.expandedStatusItem==_42){
this.updateExpandDom(this.USER_DATA);
}
this.updateItemIcon(this.USER_DATA,0);
}
catch(ex){
jsExDebug("mapSidebar_setUserOnMap",ex);
}
}
function mapSidebar_setContactFollowed(_43,_44){
try{
var _45=this.mapStatus[this.CONTACT_DATA][_43];
if(_45.followed==_44){
return;
}
_45.followed=_44;
if(this.expandedStatusItem==_45){
this.updateExpandDom(this.CONTACT_DATA);
}
this.updateItemIcon(this.CONTACT_DATA,_43);
}
catch(ex){
jsExDebug("mapSidebar_setContactFollowed",ex);
}
}
function mapSidebar_setContactOnMap(_46,_47){
try{
var _48=this.mapStatus[this.CONTACT_DATA][_46];
if(_48.onMap==_47){
return;
}
_48.onMap=_47;
if(!_47){
_48.followed=false;
}
if(this.expandedStatusItem==_48){
this.updateExpandDom(this.CONTACT_DATA);
}
this.updateItemIcon(this.CONTACT_DATA,_46);
}
catch(ex){
jsExDebug("mapSidebar_setContactOnMap",ex);
}
}
function mapSidebar_setPointOnMap(_49,_4a){
try{
var _4b=this.mapStatus[this.POINT_DATA][_49];
if(_4b.onMap==_4a){
return;
}
_4b.onMap=_4a;
if(this.expandedStatusItem==_4b){
this.updateExpandDom(this.POINT_DATA);
}
this.updateItemIcon(this.POINT_DATA,_49);
}
catch(ex){
jsExDebug("mapSidebar_setPointOnMap",ex);
}
}
function mapSidebar_setPublicUserOnMap(_4c,_4d){
try{
_4c="P_"+_4c;
var _4e=this.mapStatus[this.PUBLIC_USER_DATA][_4c];
if(_4e.onMap==_4d){
return;
}
_4e.onMap=_4d;
if(!_4d){
_4e.followed=false;
}
if(this.expandedStatusItem==_4e){
this.updateExpandDom(this.PUBLIC_USER_DATA);
}
this.updateItemIcon(this.PUBLIC_USER_DATA,_4c);
}
catch(ex){
jsExDebug("functionmapSidebar_setPublicUserOnMap",ex);
}
}
function mapSidebar_setPublicUserFollowed(_4f,_50){
try{
_4f="P_"+_4f;
var _51=this.mapStatus[this.PUBLIC_USER_DATA][_4f];
if(_51.followed==_50){
return;
}
_51.followed=_50;
if(this.expandedStatusItem==_51){
this.updateExpandDom(this.PUBLIC_USER_DATA);
}
this.updateItemIcon(this.PUBLIC_USER_DATA,_4f);
}
catch(ex){
jsExDebug("mapSidebar_setPublicUserFollowed",ex);
}
}
function mapSidebar_setOffMapByHash(_52){
try{
for(var _53 in this.mapStatus){
for(var id in this.mapStatus[_53]){
if(this.mapStatus[_53][id].onMap==_52){
this.mapStatus[_53][id].onMap=false;
this.mapStatus[_53][id].followed=false;
if(this.expandedStatusItem==this.mapStatus[_53][id]){
this.updateExpandDom(_53);
}
this.updateItemIcon(_53,id);
}
}
}
}
catch(ex){
jsExDebug("mapSidebar_setOffMapByHash",ex);
}
}
function mapSidebar_overrideSearchTerm(_55,_56){
try{
if(_56){
_55=_55.replace(/_/g,",");
}
this.searchText.setContent(_55);
var _57=_55.split(",");
_55="";
for(var i in _57){
if(_57[i]){
_55+="("+_57[i]+")|";
}
}
_55=_55.replace(/\|$/,"");
this.currentSearchTerm=_55;
this.applySearchAndSort();
}
catch(ex){
jsExDebug("mapSidebar_overrideSearchTerm",ex);
}
}
function mapSidebar_overrideExtraContactInfo(_59){
try{
this.currentExtraContactInfo=_59;
this.extraContactInfoSelect.setSelectedValue(_59);
this.extraContactInfoTimerCallback();
}
catch(ex){
jsExDebug("mapSidebar_overrideExtraContactInfo",ex);
}
}
function mapSidebar_overrideSortType(_5a){
try{
this.currentSortType=_5a;
this.sortSelect.setSelectedValue(_5a);
this.applySearchAndSort();
}
catch(ex){
jsExDebug("mapSidebar_overrideSortType",ex);
}
}
function mapSidebar_updateList(){
try{
this.restoreExpandedItemToNormal();
this.cleanUpData(null,true);
this.addUser();
var _5b=this.SYSTEM.Contacts.getAcceptedContacts();
var _5c=null;
for(var i=0;i<_5b.length;i++){
_5c=_5b[i];
this.addContact(_5c);
}
var _5e=this.SYSTEM.PeepelPoints.getPeepelPoints();
var _5f=null;
for(var i=0;i<_5e.length;i++){
_5f=_5e[i];
this.addPoint(_5f);
}
this.applySearchAndSort();
this.loadingDiv.style.display="none";
if(!this.extraContactInfoTimer.isRunning){
this.extraContactInfoTimer.start();
}
}
catch(ex){
jsExDebug("mapSidebar_updateList",ex);
}
}
function mapSidebar_addItem(id,_61,_62,_63,_64){
try{
var _65=_63+this.EXTRA_NAME_DELIMITER+id;
var _66=this.data[_62].list.length;
var div=this.SYSTEM.Dom.createDiv("absolute",this.ITEM_WIDTH,this.ITEM_HEIGHT,0);
var _68=new this.SYSTEM.Widget.Button("iconBtn",_64,null,this.ICON_SIDE,this.ICON_SIDE);
_68.setPosition(this.ITEM_BTN_PADDING,2);
_68.setValue(_62+"_"+_66);
_68.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.itemIconClickEvent));
_68.attach(div);
var _69=new this.SYSTEM.Widget.Label("nameLabel",_63,26);
_69.setPosition(_68.positionX+_68.width+(2*this.ITEM_BTN_PADDING),2);
_69.setDimensions(this.ITEM_WIDTH-_69.positionX);
_69.setOverflow("hidden");
_69.setFontSize(null,this.NAME_FONT_SIZE);
_69.widgetElement.style.cursor="pointer";
_69.widgetElement.style.whiteSpace="nowrap";
_69.setValue(_68.getValue());
_69.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.expandItemEvent));
_69.originalText=_63;
this.SYSTEM.Dom.setElementClass(_69.widgetElement,"option");
_69.attach(div);
var obj={};
obj.data=_61;
obj.iconBtn=_68;
obj.nameLabel=_69;
obj.div=div;
obj.extraValue=null;
this.data[_62].list[_66]=obj;
this.data[_62].byName[_65]=_66;
this.listDiv.appendChild(div);
return _66;
}
catch(ex){
jsExDebug("mapSidebar_addItem",ex);
}
}
function mapSidebar_addUser(){
try{
var _6b=this.addItem(0,null,this.USER_DATA,this.SYSTEM.UserDetails.userName,this.USER_IMG);
this.data[this.USER_DATA].list[_6b].nameLabel.setBold();
this.data[this.USER_DATA].list[_6b].statusId=0;
if(!this.mapStatus[this.USER_DATA][0]){
this.mapStatus[this.USER_DATA][0]={onMap:false,onTimeline:false,followed:false};
}else{
this.updateItemIcon(this.USER_DATA,0);
}
}
catch(ex){
jsExDebug("mapSidebar_addUser",ex);
}
}
function mapSidebar_addContact(_6c){
try{
var _6d=this.addItem(_6c.getContactId(),_6c,this.CONTACT_DATA,_6c.userName,this.CONTACT_IMG);
this.showExtraInfoForItem(this.CONTACT_DATA,_6d);
var _6e=_6c.getContactId();
this.data[this.CONTACT_DATA].list[_6d].statusId=_6e;
if(!this.mapStatus[this.CONTACT_DATA][_6e]){
this.mapStatus[this.CONTACT_DATA][_6e]={onMap:false,onTimeline:false,followed:false};
}else{
this.updateItemIcon(this.CONTACT_DATA,_6e);
}
}
catch(ex){
jsExDebug("mapSidebar_addContact",ex);
}
}
function mapSidebar_addPoint(_6f){
try{
var _70=this.addItem(_6f.locationId,_6f,this.POINT_DATA,_6f.name,this.POINT_IMG);
var _71=_6f.locationId;
this.data[this.POINT_DATA].list[_70].statusId=_71;
if(!this.mapStatus[this.POINT_DATA][_71]){
this.mapStatus[this.POINT_DATA][_71]={onMap:false};
}else{
this.updateItemIcon(this.POINT_DATA,_71);
}
}
catch(ex){
jsExDebug("mapSidebar_addPoint",ex);
}
}
function mapSidebar_addPublicUser(_72,_73,_74,_75){
try{
_72="P_"+_72;
var _76={userId:_72,username:_73,accuracy:_74,avatar:_75};
var _77=this.addItem(_72,_76,this.PUBLIC_USER_DATA,_73,this.PUBLIC_USER_IMG);
var _78=_72;
this.data[this.PUBLIC_USER_DATA].list[_77].statusId=_78;
if(!this.mapStatus[this.PUBLIC_USER_DATA][_78]){
this.mapStatus[this.PUBLIC_USER_DATA][_78]={onMap:false,followed:false};
}else{
this.updateItemIcon(this.PUBLIC_USER_DATA,_78);
}
}
catch(ex){
jsExDebug("mapSidebar_addPublicUser",ex);
}
}
function mapSidebar_cleanUpData(_79,_7a){
try{
var _7b=[];
if(_79){
_7b.push(_79);
}else{
for(var _79 in this.data){
_7b.push(_79);
}
}
var _7c=null;
for(var i=0;i<_7b.length;i++){
_7c=_7b[i];
if(!_7a){
for(var id in this.mapStatus[_7c]){
switch(_7c){
case this.USER_DATA:
case this.CONTACT_DATA:
this.mapStatus[_7c][id].onMap=null;
this.mapStatus[_7c][id].onTimeline=null;
this.mapStatus[_7c][id].followed=null;
this.mapStatus[_7c][id]=null;
break;
case this.POINT_DATA:
this.mapStatus[_7c][id].onMap=null;
break;
}
this.mapStatus[_7c][id]=null;
}
}
for(var j=0;j<this.data[_7c].list.length;j++){
this.data[_7c].list[j].data=null;
this.data[_7c].list[j].statusId=null;
this.data[_7c].list[j].iconBtn.cleanUp();
this.data[_7c].list[j].iconBtn=null;
this.data[_7c].list[j].nameLabel.cleanUp();
this.data[_7c].list[j].nameLabel=null;
this.listDiv.removeChild(this.data[_7c].list[j].div);
this.SYSTEM.Dom.freeDom(this.data[_7c].list[j].div);
this.data[_7c].list[j].div=null;
this.data[_7c].list[j].extraValue=null;
this.data[_7c].list[j]=null;
}
for(var _80 in this.data[_7c].byName){
this.data[_7c].byName[_80]=null;
}
if(_7a){
this.data[_7c].list=[];
this.data[_7c].byName=[];
}else{
this.data[_7c].list=null;
this.data[_7c].byName=null;
this.data[_7c]=null;
this.mapStatus[_79]=null;
}
}
if(!_7a){
this.data=null;
this.mapStatus=null;
}
}
catch(ex){
jsExDebug("mapSidebar_cleanUpData",ex);
}
}
function mapSidebar_applySearchAndSort(){
try{
var _81=(this.currentSearchTerm?"^.*"+this.currentSearchTerm.toLowerCase()+".*$":".*");
var _82=new RegExp(_81);
var _83=[];
switch(this.currentSortType){
case this.SORT_TYPE:
var _84=null;
var _85=null;
var _86=null;
for(var _87 in this.data){
_84=[];
for(var _88 in this.data[_87].byName){
_86=_88.split(this.EXTRA_NAME_DELIMITER)[0];
if(_86.toLowerCase().match(_82)){
_84.push(_88);
}else{
_85=this.getItemByName(_87,_88);
_85.div.style.display="none";
}
}
sortListAsc(_84,true);
for(var i=0;i<_84.length;i++){
_83.push(this.getItemByName(_87,_84[i]));
}
}
break;
case this.SORT_NAME:
var _8a=[];
var _85=null;
var _86=null;
for(var _87 in this.data){
for(var _88 in this.data[_87].byName){
_86=_88.split(this.EXTRA_NAME_DELIMITER)[0];
if(_86.toLowerCase().match(_82)){
_8a.push(_88+"_#_"+_87);
}else{
_85=this.getItemByName(_87,_88);
_85.div.style.display="none";
}
}
}
sortListAsc(_8a,true);
var _8b=null;
for(var i=0;i<_8a.length;i++){
_8b=_8a[i].split("_#_");
_83.push(this.getItemByName(_8b[1],_8b[0]));
}
break;
case this.SORT_EXTRA:
var _8c=null;
var _8d=null;
var _86=null;
var _8e=null;
var _8f=null;
for(var _87 in this.data){
_8c=[];
_8d=[];
_8f=[];
for(var _88 in this.data[_87].byName){
_86=_88.split(this.EXTRA_NAME_DELIMITER)[0];
if(_86.toLowerCase().match(_82)){
_8e=this.getItemByName(_87,_88).extraValue;
if(!_8e){
_8e=0;
}
if(_8f[_8e]!=null){
_8f[_8e]+=0.01;
_8e=parseFloat(_8e+_8f[_8e]);
}else{
_8f[_8e]=0;
}
_8c.push(_8e);
_8d[_8e]=_88;
}else{
this.getItemByName(_87,_88).div.style.display="none";
}
}
sortListAsc(_8c);
for(var i=0;i<_8c.length;i++){
_83.push(this.getItemByName(_87,_8d[_8c[i]]));
}
}
break;
}
var _90=null;
for(var i=0;i<_83.length;i++){
_83[i].div.style.display="block";
if(_90){
_83[i].div.style.top=(parseInt(_90.style.top)+parseInt(_90.style.height))+"px";
}else{
_83[i].div.style.top=(i*this.ITEM_HEIGHT)+"px";
}
_90=_83[i].div;
}
if(this.visibleItems){
for(var i=0;i<this.visibleItems.length;i++){
this.visibleItems[i]=null;
}
}
this.visibleItems=_83;
}
catch(ex){
jsExDebug("mapSidebar_applySearchAndSort",ex);
}
}
function mapSidebar_getItemByName(_91,_92){
try{
return this.data[_91].list[this.data[_91].byName[_92]];
}
catch(ex){
jsExDebug("mapSidebar_getItemByName",ex);
}
}
function mapSidebar_showExtraInfoForItem(_93,_94,_95){
try{
var _95=(_95?_95:this.data[_93].list[_94]);
var _96=this.SYSTEM.Tracking.getUserLocation(_95.data.userId);
var _97="";
switch(this.currentExtraContactInfo){
case this.CONTACT_INFO_TIME_SINCE_UPDATE:
var _98=new Date().getTime();
if(_96){
var _99=_96.dateFound.getTime();
var _9a=getAgeTextFromMilliseconds(_99,true);
if(_9a!="Now"){
_9a=_9a.substr(0,_9a.length-1);
}
_97=" ("+_9a+")";
_95.extraValue=_98-_99;
}else{
_95.extraValue=_98;
}
break;
case this.CONTACT_INFO_TIME_OF_UPDATE:
var _98=new Date().getTime();
if(_96){
var d=_96.dateFound;
_97=" ("+getDateString(d)+")";
_95.extraValue=_98-d.getTime();
}else{
_95.extraValue=_98;
}
break;
case this.CONTACT_INFO_DISTANCE_FROM_ME:
if(_96){
var _9c=this.SYSTEM.Tracking.getMyLocation();
var _9d=getDistance(_9c,_96);
if(_9d>1000){
_97=" ("+Math.round(_9d/1000)+" km)";
}else{
_97=" ("+Math.round(_9d)+" m)";
}
_95.extraValue=_9d;
}else{
_95.extraValue=34000000;
}
break;
case this.CONTACT_INFO_DISTANCE_FROM_CENTRE:
if(_96){
var _9e=this.mapReference.getCentreCoordinates();
var _9d=getDistance(_9e,_96);
if(_9d>1000){
_97=" ("+Math.round(_9d/1000)+" km)";
}else{
_97=" ("+Math.round(_9d)+" m)";
}
_95.extraValue=_9d;
}else{
_95.extraValue=34000000;
}
break;
}
_95.nameLabel.setText(_95.nameLabel.originalText+_97);
}
catch(ex){
jsExDebug("mapSidebar_showExtraInfoForItem",ex);
}
}
function mapSidebar_extraContactInfoTimerCallback(){
try{
var _9f=this.SYSTEM.Tracking.locations;
var _a0=null;
var _a1=null;
for(var id in _9f){
_a0=this.SYSTEM.Contacts.getContactIdFromUserId(id);
if(_a0){
_a1=this.getItem(null,_a0);
this.showExtraInfoForItem(null,null,_a1);
}
}
this.applySearchAndSort();
}
catch(ex){
jsExDebug("mapSidebar_extraContactInfoTimerCallback",ex);
}
}
function mapSidebar_getWorkspaceFriendlySearchTerm(){
try{
var _a3=this.currentSearchTerm.replace(/[\(\)]/g,"");
_a3=_a3.replace(/\|/g,"_");
return _a3;
}
catch(ex){
jsExDebug("mapSidebar_getWorkspaceFriendlySearchTerm",ex);
}
}
function mapSidebar_contactsRefreshCallback(){
try{
this.restoreExpandedItemToNormal();
this.cleanUpData(this.CONTACT_DATA,true);
var _a4=this.SYSTEM.Contacts.getAcceptedContacts();
var _a5=null;
for(var i=0;i<_a4.length;i++){
_a5=_a4[i];
this.addContact(_a5);
}
this.applySearchAndSort();
this.expandItem(this.expandedItemType,this.expandedItemPosition,true);
}
catch(ex){
jsExDebug("mapSidebar_contactsRefreshCallback",ex);
}
}
function mapSidebar_pointsRefreshCallback(){
try{
this.restoreExpandedItemToNormal();
this.cleanUpData(this.POINT_DATA,true);
var _a7=this.SYSTEM.PeepelPoints.getPeepelPoints();
var _a8=null;
for(var i=0;i<_a7.length;i++){
_a8=_a7[i];
this.addPoint(_a8);
}
this.applySearchAndSort();
this.expandItem(this.expandedItemType,this.expandedItemPosition,true);
}
catch(ex){
jsExDebug("mapSidebar_pointsRefreshCallback",ex);
}
}
function mapSidebar_userDetailsRefreshCallback(){
try{
this.restoreExpandedItemToNormal();
this.cleanUpData(this.USER_DATA,true);
this.addUser();
var _aa=this.SYSTEM.UserDetails.isLegalTrackingAge();
if(this.legalTrackingAgeFlag!=_aa){
this.contactsRefreshCallback();
this.legalTrackingAgeFlag=_aa;
}
this.applySearchAndSort();
this.expandItem(this.expandedItemType,this.expandedItemPosition,true);
}
catch(ex){
jsExDebug("mapSidebar_userDetailsRefreshCallback",ex);
}
}
function mapSidebar_restoreExpandedItemToNormal(){
try{
if(this.expandedItemType!=null&&this.expandedItemPosition!=null){
var _ab=this.data[this.expandedItemType].list[this.expandedItemPosition];
if(_ab){
this.SYSTEM.Dom.setElementClass(_ab.nameLabel.widgetElement,"option");
_ab.div.style.height=this.ITEM_HEIGHT+"px";
_ab.div.style.backgroundColor="";
if(this.currentExpandDom){
_ab.div.removeChild(this.currentExpandDom);
this.currentExpandDom=null;
}
}
}
}
catch(ex){
jsExDebug("mapSidebar_restoreExpandedItemToNormal",ex);
}
}
function mapSidebar_expandItem(_ac,_ad,_ae){
try{
if(!this.data[_ac]||!this.data[_ac].list[_ad]){
return;
}
var _af=this.data[_ac].list[_ad];
if((this.expandedItemType!=_ac||this.expandedItemPosition!=_ad)||_ae){
this.SYSTEM.Dom.setElementClass(_af.nameLabel.widgetElement,"option on");
_af.div.style.height=(this.ITEM_HEIGHT+this.expandHeight[_ac])+"px";
this.expandedItemType=_ac;
this.expandedItemPosition=_ad;
this.expandedStatusItem=this.mapStatus[_ac][_af.statusId];
this.updateExpandDom(_ac);
}else{
this.expandedItemType=null;
this.expandedItemPosition=null;
this.expandedStatusItem=null;
}
var _b0=null;
for(var i=0;i<this.visibleItems.length;i++){
this.visibleItems[i].div.style.display="block";
if(_b0){
this.visibleItems[i].div.style.top=(parseInt(_b0.style.top)+parseInt(_b0.style.height))+"px";
}else{
this.visibleItems[i].div.style.top=(i*this.ITEM_HEIGHT)+"px";
}
_b0=this.visibleItems[i].div;
}
}
catch(ex){
jsExDebug("mapSidebar_expandItem",ex);
}
}
function mapSidebar_updateExpandDom(_b2){
try{
var _b3=this.data[this.expandedItemType].list[this.expandedItemPosition];
if(!_b3){
return;
}
switch(parseInt(_b2)){
case this.CONTACT_DATA:
this.contactAvatar.src="";
this.contactAvatar.src=_b3.data.getAvatarPath(_b3.data.AVATAR_CONTACT_PROFILE);
if(this.expandedStatusItem.onMap){
this.addContactToMapBtn.setImage(this.ADD_TO_MAP_ON_IMG);
this.addContactToMapLabel.setText(this.ADD_TO_MAP_ON_TEXT);
}else{
this.addContactToMapBtn.setImage(this.ADD_TO_MAP_OFF_IMG);
this.addContactToMapLabel.setText(this.ADD_TO_MAP_OFF_TEXT);
}
if(this.expandedStatusItem.followed){
this.followContactBtn.setImage(this.FOLLOW_ON_IMG);
this.followContactLabel.setText(this.FOLLOW_ON_TEXT);
}else{
this.followContactBtn.setImage(this.FOLLOW_OFF_IMG);
this.followContactLabel.setText(this.FOLLOW_OFF_TEXT);
}
break;
case this.USER_DATA:
this.userAvatar.src=this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_50);
if(this.expandedStatusItem.onMap){
this.addUserToMapBtn.setImage(this.ADD_TO_MAP_ON_IMG);
this.addUserToMapLabel.setText(this.ADD_TO_MAP_ON_TEXT);
}else{
this.addUserToMapBtn.setImage(this.ADD_TO_MAP_OFF_IMG);
this.addUserToMapLabel.setText(this.ADD_TO_MAP_OFF_TEXT);
}
if(this.expandedStatusItem.followed){
this.followUserBtn.setImage(this.FOLLOW_ON_IMG);
this.followUserLabel.setText(this.FOLLOW_ON_TEXT);
}else{
this.followUserBtn.setImage(this.FOLLOW_OFF_IMG);
this.followUserLabel.setText(this.FOLLOW_OFF_TEXT);
}
break;
case this.POINT_DATA:
if(this.expandedStatusItem.onMap){
this.zoomCentreBtn.hide();
this.zoomCentreLabel.hide();
this.centreBtn.hide();
this.centreLabel.hide();
this.noChangeBtn.hide();
this.noChangeLabel.hide();
this.removeBtn.show();
this.removeLabel.show();
}else{
this.zoomCentreBtn.show();
this.zoomCentreLabel.show();
this.centreBtn.show();
this.centreLabel.show();
this.noChangeBtn.show();
this.noChangeLabel.show();
this.removeBtn.hide();
this.removeLabel.hide();
}
break;
case this.PUBLIC_USER_DATA:
var _b4=this.SYSTEM.UserDetails.SIDE_50_DEFAULT_AVATAR;
var _b5=_b3.data.avatar;
if(_b5&&_b5.length){
var _b6=new RegExp(this.SYSTEM.Icon.DEFAULT_AVATAR_PATH);
if(_b5.match(_b6)){
_b4=_b5+"_1.png";
}else{
_b4=_b5+"_1.s";
}
}
this.publicUserAvatar.src=_b4;
if(this.expandedStatusItem.onMap){
this.addPublicUserToMapBtn.setImage(this.ADD_TO_MAP_ON_IMG);
this.addPublicUserToMapLabel.setText(this.ADD_TO_MAP_ON_TEXT);
}else{
this.addPublicUserToMapBtn.setImage(this.ADD_TO_MAP_OFF_IMG);
this.addPublicUserToMapLabel.setText(this.ADD_TO_MAP_OFF_TEXT);
}
if(this.expandedStatusItem.followed){
this.followPublicUserBtn.setImage(this.FOLLOW_ON_IMG);
this.followPublicUserLabel.setText(this.FOLLOW_ON_TEXT);
}else{
this.followPublicUserBtn.setImage(this.FOLLOW_OFF_IMG);
this.followPublicUserLabel.setText(this.FOLLOW_OFF_TEXT);
}
break;
}
if(this.currentExpandDom!=this.expandDom[_b2]){
this.data[this.expandedItemType].list[this.expandedItemPosition].div.appendChild(this.expandDom[_b2]);
this.currentExpandDom=this.expandDom[_b2];
}
}
catch(ex){
jsExDebug("mapSidebar_updateExpandDom",ex);
}
}
function mapSidebar_updateItemIcon(_b7,id){
try{
var _b9=this.mapStatus[_b7][id];
_b7=parseInt(_b7);
switch(_b7){
case this.USER_DATA:
var _ba=this.getItem(true);
if(_b9.onMap){
if(_b9.followed){
_ba.iconBtn.setImage(this.USER_IMG+"_followed");
}else{
_ba.iconBtn.setImage(this.USER_IMG+"_map");
}
}else{
_ba.iconBtn.setImage(this.USER_IMG);
}
break;
case this.CONTACT_DATA:
var _ba=this.getItem(false,id);
if(_ba){
if(_b9.onMap){
if(_b9.followed){
_ba.iconBtn.setImage(this.CONTACT_IMG+"_followed");
}else{
_ba.iconBtn.setImage(this.CONTACT_IMG+"_map");
}
}else{
_ba.iconBtn.setImage(this.CONTACT_IMG);
}
}
break;
case this.POINT_DATA:
var _ba=this.getItem(false,null,id);
if(_ba){
if(_b9.onMap){
_ba.iconBtn.setImage(this.POINT_IMG+"_map");
}else{
_ba.iconBtn.setImage(this.POINT_IMG);
}
}
break;
case this.PUBLIC_USER_DATA:
var _ba=this.getItem(null,null,null,id);
if(_b9.onMap){
if(_b9.followed){
_ba.iconBtn.setImage(this.USER_IMG+"_followed");
}else{
_ba.iconBtn.setImage(this.USER_IMG+"_map");
}
}else{
_ba.iconBtn.setImage(this.USER_IMG);
}
break;
}
}
catch(ex){
jsExDebug("mapSidebar_updateItemIcon",ex);
}
}
function mapSidebar_getItem(_bb,_bc,_bd,_be){
try{
if(_bb){
return this.data[this.USER_DATA].list[0];
}else{
if(_bc){
var _bf=this.SYSTEM.Contacts.getContactUserName(_bc)+this.EXTRA_NAME_DELIMITER+_bc;
return this.data[this.CONTACT_DATA].list[this.data[this.CONTACT_DATA].byName[_bf]];
}else{
if(_bd){
var _bf=this.SYSTEM.PeepelPoints.getPointNameFromLocationId(_bd)+this.EXTRA_NAME_DELIMITER+_bd;
return this.data[this.POINT_DATA].list[this.data[this.POINT_DATA].byName[_bf]];
}else{
if(_be){
_be=(_be.toString().match(/P_/)?_be:"P_"+_be);
for(var i=0;i<this.data[this.PUBLIC_USER_DATA].list.length;i++){
if(this.data[this.PUBLIC_USER_DATA].list[i].data.userId==_be){
return this.data[this.PUBLIC_USER_DATA].list[i];
}
}
}
}
}
}
}
catch(ex){
jsExDebug("mapSidebar_getItem",ex);
}
}
function mapSidebar_keyUpEvent(key,me){
try{
if(me.searchText.hasFocus()){
var _c3=me.searchText.getContent();
var _c4=_c3.split(",");
_c3="";
for(var i in _c4){
if(_c4[i]){
_c3+="("+_c4[i]+")|";
}
}
_c3=_c3.replace(/\|$/,"");
me.currentSearchTerm=_c3;
if(me.currentSearchTerm.length){
me.clearSearchBtn.show();
}else{
me.clearSearchBtn.hide();
}
me.applySearchAndSort();
}
}
catch(ex){
jsExDebug("mapSidebar_keyUpEvent",ex);
}
}
function mapSidebar_sortSelectEvent(_c6,_c7){
try{
this.currentSortType=_c7.getSelectedValue();
this.applySearchAndSort();
}
catch(ex){
jsExDebug("mapSidebar_sortSelectEvent",ex);
}
}
function mapSidebar_addContactToMapEvent(_c8,_c9){
try{
var _ca=this.data[this.expandedItemType].list[this.expandedItemPosition].data.getContactId();
if(this.expandedStatusItem.onMap){
this.fireEvent(this.MAP_TOGGLE_EVENT,_c8,false,_ca);
}else{
this.fireEvent(this.MAP_TOGGLE_EVENT,_c8,true,_ca);
}
}
catch(ex){
jsExDebug("mapSidebar_addContactToMapEvent",ex);
}
}
function mapSidebar_followContactEvent(_cb,_cc){
try{
var _cd=this.data[this.expandedItemType].list[this.expandedItemPosition].data.getContactId();
if(this.expandedStatusItem.followed){
this.fireEvent(this.FOLLOW_TOGGLE_EVENT,_cb,false,_cd);
}else{
this.fireEvent(this.FOLLOW_TOGGLE_EVENT,_cb,true,_cd);
}
}
catch(ex){
jsExDebug("mapSidebar_followContactEvent",ex);
}
}
function mapSidebar_addUserToMapEvent(_ce,_cf){
try{
if(this.expandedStatusItem.onMap){
this.fireEvent(this.MAP_TOGGLE_EVENT,_ce,false);
}else{
this.fireEvent(this.MAP_TOGGLE_EVENT,_ce,true);
}
}
catch(ex){
jsExDebug("mapSidebar_addUserToMapEvent",ex);
}
}
function mapSidebar_followUserEvent(_d0,_d1){
try{
if(this.expandedStatusItem.followed){
this.fireEvent(this.FOLLOW_TOGGLE_EVENT,_d0,false);
}else{
this.fireEvent(this.FOLLOW_TOGGLE_EVENT,_d0,true);
}
}
catch(ex){
jsExDebug("mapSidebar_followUserEvent",ex);
}
}
function mapSidebar_zoomCentreEvent(_d2,_d3){
try{
this.fireEvent(this.POINT_ZOOM_CENTRE_EVENT,_d2,null,this.data[this.expandedItemType].list[this.expandedItemPosition].data.locationId);
}
catch(ex){
jsExDebug("mapSidebar_zoomCentreEvent",ex);
}
}
function mapSidebar_centreEvent(_d4,_d5){
try{
this.fireEvent(this.POINT_CENTRE_EVENT,_d4,null,this.data[this.expandedItemType].list[this.expandedItemPosition].data.locationId);
}
catch(ex){
jsExDebug("mapSidebar_centreEvent",ex);
}
}
function mapSidebar_noChangeEvent(_d6,_d7){
try{
this.fireEvent(this.POINT_NO_CHANGE_EVENT,_d6,null,this.data[this.expandedItemType].list[this.expandedItemPosition].data.locationId);
}
catch(ex){
jsExDebug("mapSidebar_noChangeEvent",ex);
}
}
function mapSidebar_pointRemoveEvent(_d8,_d9){
try{
this.fireEvent(this.POINT_REMOVE_EVENT,_d8,null,this.expandedStatusItem.onMap);
}
catch(ex){
jsExDebug("mapSidebar_pointRemoveEvent",ex);
}
}
function mapSidebar_userAvatarClickEvent(_da,me){
try{
me.fireEvent(me.AVATAR_CLICK_EVENT,_da,null);
}
catch(ex){
jsExDebug("mapSidebar_userAvatarClickEvent",ex);
}
}
function mapSidebar_contactAvatarClickEvent(_dc,me){
try{
me.fireEvent(me.AVATAR_CLICK_EVENT,_dc,null,me.data[me.expandedItemType].list[me.expandedItemPosition].data.getContactId());
}
catch(ex){
jsExDebug("mapSidebar_contactAvatarClickEvent",ex);
}
}
function mapSidebar_expandItemEvent(_de,_df){
try{
var _e0=_df.getValue().split("_");
var _e1=_e0[0];
var _e2=_e0[1];
this.restoreExpandedItemToNormal();
this.expandItem(_e1,_e2);
}
catch(ex){
jsExDebug("mapSidebar_expandItemEvent",ex);
}
}
function mapSidebar_itemIconClickEvent(_e3,_e4){
try{
var _e5=_e4.getValue().split("_");
var _e6=parseInt(_e5[0]);
var _e7=parseInt(_e5[1]);
if(this.expandedItemType!=_e6||this.expandedItemPosition!=_e7){
this.restoreExpandedItemToNormal();
this.expandItem(_e6,_e7);
}
switch(_e6){
case this.USER_DATA:
this.fireEvent(this.MAP_TOGGLE_EVENT,_e3,true);
break;
case this.CONTACT_DATA:
var _e8=this.data[this.expandedItemType].list[this.expandedItemPosition].data.getContactId();
this.fireEvent(this.MAP_TOGGLE_EVENT,_e3,true,_e8);
break;
case this.POINT_DATA:
this.fireEvent(this.POINT_ZOOM_CENTRE_EVENT,_e3,null,this.data[this.expandedItemType].list[this.expandedItemPosition].data.locationId);
break;
case this.PUBLIC_USER_DATA:
this.fireEvent(this.MAP_TOGGLE_EVENT,_e3,true,this.data[this.expandedItemType].list[this.expandedItemPosition].data.userId);
break;
}
}
catch(ex){
jsExDebug("mapSidebar_itemIconClickEvent",ex);
}
}
function mapSidebar_extraContactInfoSelectEvent(_e9,_ea){
try{
this.currentExtraContactInfo=_ea.getSelectedValue();
this.extraContactInfoTimerCallback();
}
catch(ex){
jsExDebug("mapSidebar_extraContactInfoSelectEvent",ex);
}
}
function mapSidebar_clearSearchBtnClickEvent(_eb,_ec){
try{
this.searchText.clearContent();
this.currentSearchTerm="";
this.clearSearchBtn.hide();
this.applySearchAndSort();
}
catch(ex){
jsExDebug("mapSidebar_clearSearchBtnClickEvent",ex);
}
}
function mapSidebar_addPublicUserToMapEvent(_ed,_ee){
try{
var _ef=this.data[this.expandedItemType].list[this.expandedItemPosition].data.userId;
if(this.expandedStatusItem.onMap){
this.fireEvent(this.MAP_TOGGLE_EVENT,_ed,false,_ef);
}else{
this.fireEvent(this.MAP_TOGGLE_EVENT,_ed,true,_ef);
}
}
catch(ex){
jsExDebug("mapSidebar_addPublicUserToMapEvent",ex);
}
}
function mapSidebar_followPublicUserEvent(_f0,_f1){
try{
var _f2=this.data[this.expandedItemType].list[this.expandedItemPosition].data.userId;
if(this.expandedStatusItem.followed){
this.fireEvent(this.FOLLOW_TOGGLE_EVENT,_f0,false,_f2);
}else{
this.fireEvent(this.FOLLOW_TOGGLE_EVENT,_f0,true,_f2);
}
}
catch(ex){
jsExDebug("mapSidebar_followPublicUserEvent",ex);
}
}
function mapSidebar_sendPublicUserRequestEvent(_f3,_f4){
function sendVerificationEmailResponse(xml){
try{
if(getNodeValue(xml,"success")=="0"){
var d=new SYSTEM.Dialogue.OkAlert(null,null,"Email sent");
}
}
catch(ex){
jsExDebug("sendVerificationEmailResponse",ex);
}
}
function unverifiedEmailCallback(_f7){
try{
if(_f7){
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action="+9,null,sendVerificationEmailResponse);
}
}
catch(ex){
jsExDebug("mapSidebar_sendPublicUserRequestEvent: unverifiedEmailCallback",ex);
}
}
function tempUsercallback(){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_AUTH,"Sign Up");
}
catch(ex){
jsExDebug("mapSidebar_sendPublicUserRequestEvent: tempUsercallback",ex);
}
}
try{
if(!this.SYSTEM.UserDetails.isEmailVerified()){
if(this.SYSTEM.UserDetails.isUsingTempEmail()){
var d=new this.SYSTEM.Dialogue.OkAlert(null,null,"Your account does not have a validated email address.<br/>"+"You need to sign up, to do so: Click the '(Not you?)' link (in the task bar)",new this.SYSTEM.Delegate(this,tempUsercallback),450,"Do it now",90);
}else{
var d=new this.SYSTEM.Dialogue.YesNoAlert(null,null,"You cannot send/receive contact requests until you have verified your email address. "+"TODO, write me",new this.SYSTEM.Delegate(this,unverifiedEmailCallback),450,false,"Send email",90,"Cancel",60);
}
}else{
var _f9=this.data[this.expandedItemType].list[this.expandedItemPosition].data.username;
var d=new this.SYSTEM.Dialogue.AcceptRequest(null,[_f9],true);
}
}
catch(ex){
jsExDebug("mapSidebar_sendPublicUserRequestEvent",ex);
}
}

try{
mapObjectWidget_t.prototype=new widget_t();
mapObjectWidget_t.prototype.mapObjectWidget_super=widget_t.prototype.constructor;
mapObjectWidget_t.prototype.constructor=mapObjectWidget_t;
mapObjectWidget_t.prototype.cleanUp=mapObjectWidget_cleanUp;
mapObjectWidget_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
mapObjectWidget_t.prototype.createDom=mapObjectWidget_createDom;
mapObjectWidget_t.prototype.bindEvents=mapObjectWidget_bindEvents;
mapObjectWidget_t.prototype.setDimensions=mapObjectWidget_setDimensions;
mapObjectWidget_t.prototype.setPosition=mapObjectWidget_setPosition;
mapObjectWidget_t.prototype.widget_attach=widget_t.prototype.attach;
mapObjectWidget_t.prototype.widget_detach=widget_t.prototype.detach;
mapObjectWidget_t.prototype.widget_hide=widget_t.prototype.hide;
mapObjectWidget_t.prototype.widget_show=widget_t.prototype.show;
mapObjectWidget_t.prototype.attach=mapObjectWidget_attach;
mapObjectWidget_t.prototype.detach=mapObjectWidget_detach;
mapObjectWidget_t.prototype.hide=mapObjectWidget_hide;
mapObjectWidget_t.prototype.show=mapObjectWidget_show;
mapObjectWidget_t.prototype.setImage=mapObjectWidget_setImage;
mapObjectWidget_t.prototype.setOpacity=mapObjectWidget_setOpacity;
mapObjectWidget_t.prototype.setBorderStyle=mapObjectWidget_setBorderStyle;
mapObjectWidget_t.prototype.setLabel=mapObjectWidget_setLabel;
mapObjectWidget_t.prototype.mouseDownEvent=mapObjectWidget_mouseDownEvent;
mapObjectWidget_t.prototype.mouseUpEvent=mapObjectWidget_mouseUpEvent;
mapObjectWidget_t.prototype.enterEvent=mapObjectWidget_enterEvent;
mapObjectWidget_t.prototype.exitEvent=mapObjectWidget_exitEvent;
mapObjectWidget_t.prototype.LABEL_HEIGHT=20;
mapObjectWidget_t.prototype.DEFAULT_EVENT=SYSTEM.Event.MOUSE_DOWN_EVENT;
mapObjectWidget_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.MOUSE_UP_EVENT,SYSTEM.Event.MOUSE_ENTER_EVENT,SYSTEM.Event.MOUSE_EXIT_EVENT];
}
catch(ex){
jsExDebug("mapObjectWidget_t.prototype",ex);
}
function mapObjectWidget_t(_1){
try{
this.mapObjectWidget_super("mapobject",true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_1){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("mapObjectWidget_t",ex);
}
}
function mapObjectWidget_cleanUp(me){
try{
if(!me){
me=this;
}
me.imageSrc=null;
me.opacity=null;
me.borderStyle=null;
if(me.label){
me.label.cleanUp();
me.label=null;
}
if(me.imageElement&&me.defaultEventsBound){
me.SYSTEM.Event.detachEvent(me.imageElement,"onmousedown","mousedown");
me.SYSTEM.Event.detachEvent(me.imageElement,"onmouseup","mouseup");
me.SYSTEM.Event.detachEvent(me.imageElement,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.imageElement,"onmouseout","mouseout");
me.imageElement=null;
}
me.widget_cleanUp();
}
catch(ex){
jsExDebug("mapObjectWidget_cleanUp",ex);
}
}
function mapObjectWidget_createDom(){
try{
this.label=new this.SYSTEM.Widget.Label("label");
this.label.setDimensions(null,this.LABEL_HEIGHT);
this.label.setAlignment("center");
this.label.setBold();
this.label.hide();
this.imageElement=document.createElement("img");
this.imageElement.style.position="absolute";
this.imageElement.style.top="0px";
this.imageElement.style.left="0px";
this.widgetElement.style.visibility="visible";
this.widgetElement.appendChild(this.imageElement);
}
catch(ex){
jsExDebug("mapObjectWidget_createDom",ex);
}
}
function mapObjectWidget_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.imageElement,"onmousedown","mousedown",this.mouseDownEvent,this);
this.SYSTEM.Event.attachEvent(this.imageElement,"onmouseup","mouseup",this.mouseUpEvent,this);
this.SYSTEM.Event.attachEvent(this.imageElement,"onmouseover","mouseover",this.enterEvent,this);
this.SYSTEM.Event.attachEvent(this.imageElement,"onmouseout","mouseout",this.exitEvent,this);
this.defaultEventsBound=true;
}
catch(ex){
jsExDebug("mapObjectWidget_bindEvents",ex);
}
}
function mapObjectWidget_setDimensions(_3,_4){
try{
this.width=_3;
this.height=_4;
this.widgetElement.style.width=this.width+"px";
this.widgetElement.style.height=this.height+"px";
this.imageElement.style.width=this.width+"px";
this.imageElement.style.height=this.height+"px";
}
catch(ex){
jsExDebug("mapObjectWidget_setDimensions",ex);
}
}
function mapObjectWidget_setPosition(_5,_6){
try{
if(_5!=null){
this.widgetElement.style.left=_5+"px";
this.positionX=_5;
}
if(_6!=null){
this.widgetElement.style.top=_6+"px";
this.positionY=_6;
}
this.setLabel(this.label.getText());
}
catch(ex){
jsExDebug("mapObjectWidget_setPosition, "+this.hashString+": "+_5+","+_6,ex);
}
}
function mapObjectWidget_attach(_7){
try{
this.widget_attach(_7);
this.label.attach(this.parentDiv);
}
catch(ex){
jsExDebug("mapObjectWidget_attach",ex);
}
}
function mapObjectWidget_detach(){
try{
this.widget_detach();
if(this.label){
this.label.detach();
}
}
catch(ex){
jsExDebug("mapObjectWidget_detach",ex);
}
}
function mapObjectWidget_hide(){
try{
this.widget_hide();
this.label.hide();
}
catch(ex){
jsExDebug("mapObjectWidget_hide",ex);
}
}
function mapObjectWidget_show(){
try{
this.widget_show();
if(this.SYSTEM.Settings.get("map_object_labels")){
this.label.show();
}else{
this.label.hide();
}
}
catch(ex){
jsExDebug("mapObjectWidget_show",ex);
}
}
function mapObjectWidget_setImage(_8){
try{
this.imageSrc=_8;
this.imageElement.src=this.imageSrc;
}
catch(ex){
jsExDebug("mapObjectWidget_setImage",ex);
}
}
function mapObjectWidget_setOpacity(_9){
try{
this.opacity=_9;
if(document.all){
this.widgetElement.style.filter="alpha(opacity="+(this.opacity*100)+")";
}else{
this.widgetElement.style.opacity=this.opacity;
}
}
catch(ex){
jsExDebug("mapObjectWidget_setOpacity",ex);
}
}
function mapObjectWidget_setBorderStyle(_a){
try{
this.borderStyle=_a;
this.imageElement.style.border=this.borderStyle;
}
catch(ex){
jsExDebug("mapObjectWidget_setBorderStyle",ex);
}
}
function mapObjectWidget_setLabel(_b){
try{
var _c=(_b?_b.length*10:0);
this.label.setDimensions(_c);
this.label.setPosition(this.positionX-((_c-this.width)/2),this.positionY-this.LABEL_HEIGHT);
this.label.setText(_b||"");
if(this.SYSTEM.Settings.get("map_object_labels")){
this.label.show();
}
}
catch(ex){
jsExDebug("mapObjectWidget_setLabel",ex);
}
}
function mapObjectWidget_mouseDownEvent(_d,me){
try{
me.fireEvent(me.SYSTEM.Event.MOUSE_DOWN_EVENT,_d);
}
catch(ex){
jsExDebug("mapObjectWidget_mouseDownEvent",ex);
}
}
function mapObjectWidget_mouseUpEvent(_f,me){
try{
me.fireEvent(me.SYSTEM.Event.MOUSE_UP_EVENT,_f);
}
catch(ex){
jsExDebug("mapObjectWidget_mouseDownEvent",ex);
}
}
function mapObjectWidget_enterEvent(_11,me){
try{
if(!me.SYSTEM){
jsDebugText(me);
}
me.fireEvent(me.SYSTEM.Event.MOUSE_ENTER_EVENT,_11);
}
catch(ex){
jsExDebug("mapObjectWidget_enterEvent",ex);
}
}
function mapObjectWidget_exitEvent(_13,me){
try{
if(!me.SYSTEM){
jsDebugText(me);
}
me.fireEvent(me.SYSTEM.Event.MOUSE_EXIT_EVENT,_13);
}
catch(ex){
jsExDebug("mapObjectWidget_exitEvent",ex);
}
}

try{
peepelPointItem_t.prototype=new listItem_t();
peepelPointItem_t.prototype.constructor=peepelPointItem_t;
peepelPointItem_t.prototype.peepelPointItem_super=listItem_t.prototype.constructor;
peepelPointItem_t.prototype.cleanUp=peepelPointItem_cleanUp;
peepelPointItem_t.prototype.managerItem_cleanUp=listItem_t.prototype.cleanUp;
peepelPointItem_t.prototype.createDom=peepelPointItem_createDom;
peepelPointItem_t.prototype.listItem_bindEvents=listItem_t.prototype.bindEvents;
peepelPointItem_t.prototype.bindEvents=peepelPointItem_bindEvents;
peepelPointItem_t.prototype.updateData=peepelPointItem_updateData;
peepelPointItem_t.prototype.expand=peepelPointItem_expand;
peepelPointItem_t.prototype.collapse=peepelPointItem_collapse;
peepelPointItem_t.prototype.gotoPeepelPoint=peepelPointItem_gotoPeepelPoint;
peepelPointItem_t.prototype.getReadableCoordinates=peepelPointItem_getReadableCoordinates;
peepelPointItem_t.prototype.selectEvent=peepelPointItem_selectEvent;
peepelPointItem_t.prototype.editBtnClickEvent=peepelPointItem_editBtnClickEvent;
peepelPointItem_t.prototype.viewButtonClickEvent=peepelPointItem_viewButtonClickEvent;
peepelPointItem_t.prototype.deleteButtonClickEvent=peepelPointItem_deleteButtonClickEvent;
peepelPointItem_t.prototype.dblClickEvent=peepelPointItem_dblClickEvent;
peepelPointItem_t.prototype.DELETE_IMG="img/app/app/manager/delete.bmp";
peepelPointItem_t.prototype.FILE_IMG="img/app/app/pointmanager/point_icon.png";
peepelPointItem_t.prototype.EXPAND_BG_COLOUR="rgb(182,231,241)";
peepelPointItem_t.prototype.NAME_LEFT=10;
peepelPointItem_t.prototype.NAME_TOP=4;
peepelPointItem_t.prototype.INFO_LEFT=15;
peepelPointItem_t.prototype.EDIT_WIDTH=50;
peepelPointItem_t.prototype.VIEW_WIDTH=50;
peepelPointItem_t.prototype.BUTTON_DIV_WIDTH=peepelPointItem_t.prototype.EDIT_WIDTH+peepelPointItem_t.prototype.VIEW_WIDTH+24+16;
peepelPointItem_t.prototype.BUTTON_DIV_HEIGHT=32;
peepelPointItem_t.prototype.EDIT_LEFT=4;
peepelPointItem_t.prototype.VIEW_LEFT=peepelPointItem_t.prototype.EDIT_LEFT+peepelPointItem_t.prototype.EDIT_WIDTH+4;
peepelPointItem_t.prototype.DELETE_LEFT=peepelPointItem_t.prototype.VIEW_LEFT+peepelPointItem_t.prototype.VIEW_WIDTH+4;
peepelPointItem_t.prototype.BTN_TOP=4;
}
catch(ex){
jsExDebug("peepelPointItem_t.prototype",ex);
}
function peepelPointItem_t(_1,_2,_3,_4,_5,_6){
try{
this.peepelPointItem_super(_1,_2,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.stateInEditMode=false;
this.disable=false;
if(!_6){
this.createDom(_3,_4,_5);
this.bindEvents();
}
}
catch(ex){
jsExDebug("peepelPointItem_t",ex);
}
}
function peepelPointItem_cleanUp(me){
try{
if(!me){
var me=this;
}
me.stateInEditMode=null;
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondblclick","dblclick");
me.buttonDiv=null;
me.disabled=null;
me.nameLabel.cleanUp();
me.nameText.cleanUp();
me.coordsLabel.cleanUp();
me.zoomLabel.cleanUp();
me.descriptionLabel.cleanUp();
me.tagsLabel.cleanUp();
me.viewBtn.cleanUp();
me.deleteBtn.cleanUp();
me.nameLabel=null;
me.nameText=null;
me.coordsLabel=null;
me.zoomLabel=null;
me.descriptionLabel=null;
me.tagsLabel=null;
me.viewBtn=null;
me.editBtn=null;
me.deleteBtn=null;
me.managerItem_cleanUp();
}
catch(ex){
jsExDebug("peepelPointItem_cleanUp",ex);
}
}
function peepelPointItem_createDom(_8,_9,_a){
try{
this.SYSTEM.Dom.setElementClass(this.widgetElement,"option");
var _b=new this.SYSTEM.Widget.Label("nameLabel",(this.data.name?"<b>"+this.data.name+"</b>":"")+" "+this.SYSTEM.PeepelPoints.getPrivacyText(this.data.privacy));
_b.setPosition(this.NAME_LEFT,this.NAME_TOP);
_b.attach(this.widgetElement);
var _c=new this.SYSTEM.Widget.Text("nameText");
_c.setPosition(this.NAME_LEFT,this.NAME_TOP);
var _d=new this.SYSTEM.Widget.Label("coordsLabel","Coordinates: "+this.data.coordinate.mercX+", "+this.data.coordinate.mercY);
_d.setPosition(this.INFO_LEFT,25);
_d.setDimensions(_8-_d.positionX,18);
_d.widgetElement.style.overflow="hidden";
_d.attach(this.widgetElement);
var _e=new this.SYSTEM.Widget.Label("zoomLabel","Zoom level: "+this.data.getZoomLevel());
_e.setPosition(this.INFO_LEFT,_d.positionY+20);
_e.setDimensions(_d.width,_d.height);
_e.widgetElement.style.overflow="hidden";
_e.attach(this.widgetElement);
var _f=new this.SYSTEM.Widget.Label("descriptionLabel","Description: "+(this.data.description?this.data.description:"<i>None</i>"));
_f.setPosition(this.INFO_LEFT,_e.positionY+20);
_f.setDimensions(_d.width,_d.height);
_f.widgetElement.style.overflow="hidden";
_f.attach(this.widgetElement);
var _10=new this.SYSTEM.Widget.Label("tagsLabel","Tags: "+(this.data.tags?this.data.tags:"<i>None</i>"));
_10.setPosition(this.INFO_LEFT,_f.positionY+20);
_10.setDimensions(_d.width,_d.height);
_10.widgetElement.style.overflow="hidden";
_10.attach(this.widgetElement);
var _11=document.createElement("div");
_11.style.position="absolute";
_11.style.right="2px";
_11.style.bottom="2px";
_11.style.width=this.BUTTON_DIV_WIDTH+"px";
_11.style.height=this.BUTTON_DIV_HEIGHT+"px";
_11.style.border="solid 1px #AAAAAA";
var _12=new this.SYSTEM.Widget.TextButton("editBtn",this.EDIT_WIDTH,"Edit");
_12.setPosition(this.EDIT_LEFT,this.BTN_TOP);
_12.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.editBtnClickEvent));
_12.attach(_11);
var _13=new this.SYSTEM.Widget.TextButton("viewBtn",this.VIEW_WIDTH,"View");
_13.setPosition(this.VIEW_LEFT,this.BTN_TOP);
_13.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.viewButtonClickEvent));
_13.attach(_11);
var _14=new this.SYSTEM.Widget.ClassButton("deleteBtn",2,24,24,null,this.SYSTEM.Icon.Small.DELETE,"Delete","Delete the point");
_14.setPosition(this.DELETE_LEFT,this.BTN_TOP);
_14.attach(_11);
_14.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.deleteButtonClickEvent));
this.widgetElement.appendChild(_11);
this.nameLabel=_b;
this.nameText=_c;
this.coordsLabel=_d;
this.zoomLabel=_e;
this.descriptionLabel=_f;
this.tagsLabel=_10;
this.buttonDiv=_11;
this.editBtn=_12;
this.viewBtn=_13;
this.deleteBtn=_14;
_b.widgetElement.dontDim=true;
_c.widgetElement.dontDim=true;
_d.widgetElement.dontDim=true;
_e.widgetElement.dontDim=true;
_f.widgetElement.dontDim=true;
_10.widgetElement.dontDim=true;
_11.dontDim=true;
_12.widgetElement.dontDim=true;
_13.widgetElement.dontDim=true;
_14.widgetElement.dontDim=true;
this.allowHighlight(this.HIGHLIGHT_COLOUR);
this.allowSelection();
}
catch(ex){
jsExDebug("peepelPointItem_createDom",ex);
}
}
function peepelPointItem_bindEvents(){
try{
this.listItem_bindEvents();
this.SYSTEM.Event.attachEvent(this.widgetElement,"ondblclick","dblclick",this.dblClickEvent,this);
}
catch(ex){
jsExDebug("peepelPointItem_bindEvents",ex);
}
}
function peepelPointItem_updateData(_15){
try{
this.nameLabel.setText((_15.name?"<b>"+_15.name+"</b>":"")+" "+this.SYSTEM.PeepelPoints.getPrivacyText(_15.privacy));
var _16=this.getReadableCoordinates(_15.coordinates);
this.coordsLabel.setText("Coordinates: "+_16.mercX+", "+_16.mercY);
this.zoomLabel.setText("Zoom level: "+_15.getZoomLevel());
this.descriptionLabel.setText("Description: "+(this.data.description?this.data.description:"<i>None</i>"));
this.tagsLabel.setText("Tags: "+(this.data.tags?this.data.tags:"<i>None</i>"));
this.data=_15;
}
catch(ex){
jsExDebug("peepelPointItem_updateData",ex);
}
}
function peepelPointItem_expand(){
try{
this.height=this.expandedHeight;
this.widgetElement.style.height=this.height+"px";
this.collapsed=false;
this.buttonDiv.style.visibility="visible";
this.coordsLabel.show();
this.zoomLabel.show();
this.descriptionLabel.show();
this.tagsLabel.show();
this.expandEvent();
}
catch(ex){
jsExDebug("peepelPointItem_expand",ex);
}
}
function peepelPointItem_collapse(){
try{
this.height=this.collapsedHeight;
this.widgetElement.style.height=this.height+"px";
this.collapsed=true;
this.buttonDiv.style.visibility="hidden";
this.coordsLabel.hide();
this.zoomLabel.hide();
this.descriptionLabel.hide();
this.tagsLabel.hide();
this.collapseEvent();
}
catch(ex){
jsExDebug("peepelPointItem_collapse",ex);
}
}
function peepelPointItem_gotoPeepelPoint(){
try{
var _17=this.SYSTEM.APPLICATION_MANAGER.getRunningApps(APP_ID_MAP);
if(_17[0]){
_17[0].jumpToPeepelPoint(this.data,true,true);
_17[0].mapFrame.focus();
}else{
var _18=this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_MAP,"WebMap","Locating point...",null,null,null,null,[this.data.name]);
}
}
catch(ex){
jsExDebug("peepelPointItem_gotoPeepelPoint",ex);
}
}
function peepelPointItem_getReadableCoordinates(_19){
try{
var _1a=_19.split(",");
var _1b=new Number(parseFloat(_1a[0]));
var _1c=new Number(parseFloat(_1a[1]));
_1b=_1b.toFixed(2);
_1c=_1c.toFixed(2);
return {mercX:_1b,mercY:_1c};
}
catch(ex){
jsExDebug("peepelPointItem_getReadableCoordinates",ex);
}
}
function peepelPointItem_selectEvent(_1d,me){
try{
if(me.disabled){
return;
}
if(!me.stateEditMode){
if(me.collapsed){
me.expand();
}else{
me.collapse();
}
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_1d);
}
}
catch(ex){
jsExDebug("peepelPointItem_selectEvent",ex);
}
}
function peepelPointItem_editBtnClickEvent(_1f,_20){
try{
var d=new this.SYSTEM.Dialogue.PointEdit(null,this.data.getId());
}
catch(ex){
jsExDebug("peepelPointItem_editBtnClickEvent",ex);
}
}
function peepelPointItem_viewButtonClickEvent(_22,_23){
try{
this.gotoPeepelPoint();
}
catch(ex){
jsExDebug("peepelPointItem_viewButtonClickEvent",ex);
}
}
function peepelPointItem_deleteButtonClickEvent(_24,_25){
try{
this.collapse();
this.disable=true;
this.nameLabel.setText(this.nameLabel.getText()+" <i>Deleting...</i>");
this.SYSTEM.PeepelPoints.deletePeepelPoint(this.data.getId());
}
catch(ex){
jsExDebug("peepelPointItem_deleteButtonClickEvent",ex);
}
}
function peepelPointItem_dblClickEvent(_26,me){
try{
me.gotoPeepelPoint();
}
catch(ex){
jsExDebug("peepelPointItem_dblClickEvent",ex);
}
}

try{
sharedPeepelPointItem_t.prototype=new listItem_t();
sharedPeepelPointItem_t.prototype.constructor=sharedPeepelPointItem_t;
sharedPeepelPointItem_t.prototype.sharedPeepelPointItem_super=listItem_t.prototype.constructor;
sharedPeepelPointItem_t.prototype.cleanUp=sharedPeepelPointItem_cleanUp;
sharedPeepelPointItem_t.prototype.managerItem_cleanUp=listItem_t.prototype.cleanUp;
sharedPeepelPointItem_t.prototype.createDom=sharedPeepelPointItem_createDom;
sharedPeepelPointItem_t.prototype.listItem_bindEvents=listItem_t.prototype.bindEvents;
sharedPeepelPointItem_t.prototype.bindEvents=sharedPeepelPointItem_bindEvents;
sharedPeepelPointItem_t.prototype.updateData=sharedPeepelPointItem_updateData;
sharedPeepelPointItem_t.prototype.expand=sharedPeepelPointItem_expand;
sharedPeepelPointItem_t.prototype.collapse=sharedPeepelPointItem_collapse;
sharedPeepelPointItem_t.prototype.gotoPeepelPoint=sharedPeepelPointItem_gotoPeepelPoint;
sharedPeepelPointItem_t.prototype.getReadableCoordinates=sharedPeepelPointItem_getReadableCoordinates;
sharedPeepelPointItem_t.prototype.selectEvent=sharedPeepelPointItem_selectEvent;
sharedPeepelPointItem_t.prototype.viewButtonClickEvent=sharedPeepelPointItem_viewButtonClickEvent;
sharedPeepelPointItem_t.prototype.dblClickEvent=sharedPeepelPointItem_dblClickEvent;
sharedPeepelPointItem_t.prototype.EXPAND_BG_COLOUR="rgb(182,231,241)";
sharedPeepelPointItem_t.prototype.NAME_LEFT=10;
sharedPeepelPointItem_t.prototype.NAME_TOP=4;
sharedPeepelPointItem_t.prototype.INFO_LEFT=15;
sharedPeepelPointItem_t.prototype.VIEW_WIDTH=50;
sharedPeepelPointItem_t.prototype.BUTTON_DIV_WIDTH=sharedPeepelPointItem_t.prototype.VIEW_WIDTH+8;
sharedPeepelPointItem_t.prototype.BUTTON_DIV_HEIGHT=32;
sharedPeepelPointItem_t.prototype.VIEW_LEFT=58;
sharedPeepelPointItem_t.prototype.BTN_TOP=4;
}
catch(ex){
jsExDebug("sharedPeepelPointItem_t.prototype",ex);
}
function sharedPeepelPointItem_t(_1,_2,_3,_4,_5,_6){
try{
this.sharedPeepelPointItem_super(_1,_2,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_6){
this.createDom(_3,_4,_5);
this.bindEvents();
}
}
catch(ex){
jsExDebug("sharedPeepelPointItem_t",ex);
}
}
function sharedPeepelPointItem_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondblclick","dblclick");
me.buttonDiv=null;
me.nameLabel.cleanUp();
me.nameText.cleanUp();
me.coordsLabel.cleanUp();
me.zoomLabel.cleanUp();
me.descriptionLabel.cleanUp();
me.tagsLabel.cleanUp();
me.viewBtn.cleanUp();
me.nameLabel=null;
me.nameText=null;
me.coordsLabel=null;
me.zoomLabel=null;
me.descriptionLabel=null;
me.tagsLabel=null;
me.sharedLabel=null;
me.viewBtn=null;
me.editBtn=null;
me.deleteBtn=null;
me.managerItem_cleanUp();
}
catch(ex){
jsExDebug("sharedPeepelPointItem_cleanUp",ex);
}
}
function sharedPeepelPointItem_createDom(_8,_9,_a){
try{
var _b=new this.SYSTEM.Widget.Label("nameLabel",(this.data.name?"<b>"+this.data.name+"</b>":""));
_b.setPosition(this.NAME_LEFT,this.NAME_TOP);
_b.attach(this.widgetElement);
var _c=new this.SYSTEM.Widget.Text("nameText");
_c.setPosition(this.NAME_LEFT,this.NAME_TOP);
var _d=new this.SYSTEM.Widget.Label("coordsLabel","Coordinates: "+this.data.coordinate.mercX+", "+this.data.coordinate.mercY);
_d.setPosition(this.INFO_LEFT,25);
_d.setDimensions(_8-_d.positionX,18);
_d.widgetElement.style.overflow="hidden";
_d.attach(this.widgetElement);
var _e=new this.SYSTEM.Widget.Label("zoomLabel","Zoom level: "+this.data.getZoomLevel());
_e.setPosition(this.INFO_LEFT,_d.positionY+20);
_e.setDimensions(_d.width,_d.height);
_e.widgetElement.style.overflow="hidden";
_e.attach(this.widgetElement);
var _f=new this.SYSTEM.Widget.Label("descriptionLabel","Description: "+(this.data.description?this.data.description:"<i>None</i>"));
_f.setPosition(this.INFO_LEFT,_e.positionY+20);
_f.setDimensions(_d.width,_d.height);
_f.widgetElement.style.overflow="hidden";
_f.attach(this.widgetElement);
var _10=new this.SYSTEM.Widget.Label("tagsLabel","Tags: "+(this.data.tags?this.data.tags:"<i>None</i>"));
_10.setPosition(this.INFO_LEFT,_f.positionY+20);
_10.setDimensions(_d.width,_d.height);
_10.widgetElement.style.overflow="hidden";
_10.attach(this.widgetElement);
var _11=document.createElement("div");
_11.style.position="absolute";
_11.style.right="2px";
_11.style.bottom="2px";
_11.style.width=this.BUTTON_DIV_WIDTH+"px";
_11.style.height=this.BUTTON_DIV_HEIGHT+"px";
_11.style.border="solid 1px #AAAAAA";
var _12=new this.SYSTEM.Widget.TextButton("viewBtn",this.VIEW_WIDTH,"View");
_12.setPosition(4,this.BTN_TOP,true);
_12.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.viewButtonClickEvent));
_12.attach(_11);
this.widgetElement.appendChild(_11);
this.nameLabel=_b;
this.nameText=_c;
this.coordsLabel=_d;
this.zoomLabel=_e;
this.descriptionLabel=_f;
this.tagsLabel=_10;
this.buttonDiv=_11;
this.viewBtn=_12;
this.allowHighlight(this.HIGHLIGHT_COLOUR);
this.allowSelection();
}
catch(ex){
jsExDebug("sharedPeepelPointItem_createDom",ex);
}
}
function sharedPeepelPointItem_bindEvents(){
try{
this.listItem_bindEvents();
this.SYSTEM.Event.attachEvent(this.widgetElement,"ondblclick","dblclick",this.dblClickEvent,this);
}
catch(ex){
jsExDebug("sharedPeepelPointItem_bindEvents",ex);
}
}
function sharedPeepelPointItem_updateData(_13){
try{
this.nameLabel.setText((_13.name?"<b>"+_13.name+"</b>":""));
var _14=this.getReadableCoordinates(_13.coordinates);
this.coordsLabel.setText("Coordinates: "+_14.mercX+", "+_14.mercY);
this.zoomLabel.setText("Zoom level: "+_13.getZoomLevel());
this.descriptionLabel.setText("Description: "+(this.data.description?this.data.description:"<i>None</i>"));
this.tagsLabel.setText("Tags: "+(this.data.tags?this.data.tags:"<i>None</i>"));
this.data=_13;
}
catch(ex){
jsExDebug("sharedPeepelPointItem_updateData",ex);
}
}
function sharedPeepelPointItem_expand(){
try{
this.height=this.expandedHeight;
this.widgetElement.style.height=this.height+"px";
this.collapsed=false;
this.buttonDiv.style.visibility="visible";
this.coordsLabel.show();
this.zoomLabel.show();
this.descriptionLabel.show();
this.tagsLabel.show();
this.expandEvent();
}
catch(ex){
jsExDebug("sharedPeepelPointItem_expand",ex);
}
}
function sharedPeepelPointItem_collapse(){
try{
this.height=this.collapsedHeight;
this.widgetElement.style.height=this.height+"px";
this.collapsed=true;
this.buttonDiv.style.visibility="hidden";
this.coordsLabel.hide();
this.zoomLabel.hide();
this.descriptionLabel.hide();
this.tagsLabel.hide();
this.collapseEvent();
}
catch(ex){
jsExDebug("sharedPeepelPointItem_collapse",ex);
}
}
function sharedPeepelPointItem_gotoPeepelPoint(){
try{
var _15=this.SYSTEM.APPLICATION_MANAGER.getRunningApps(APP_ID_MAP);
if(_15[0]){
_15[0].map.showPublicPoint(this.data.coordinate.copy(),this.data,false,true);
_15[0].mapFrame.focus();
}else{
var _16=this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_MAP,"WebMap","Locating point...",null,null,null,null,null,null,[this.data]);
}
}
catch(ex){
jsExDebug("sharedPeepelPointItem_gotoPeepelPoint",ex);
}
}
function sharedPeepelPointItem_getReadableCoordinates(_17){
try{
var _18=_17.split(",");
var _19=new Number(parseFloat(_18[0]));
var _1a=new Number(parseFloat(_18[1]));
_19=_19.toFixed(2);
_1a=_1a.toFixed(2);
return {mercX:_19,mercY:_1a};
}
catch(ex){
jsExDebug("sharedPeepelPointItem_getReadableCoordinates",ex);
}
}
function sharedPeepelPointItem_selectEvent(_1b,me){
try{
if(!me.stateEditMode){
if(me.collapsed){
me.expand();
}else{
me.collapse();
}
me.fireEvent(me.SYSTEM.Event.CLICK_EVENT,_1b);
}
}
catch(ex){
jsExDebug("sharedPeepelPointItem_selectEvent",ex);
}
}
function sharedPeepelPointItem_viewButtonClickEvent(_1d,_1e){
try{
this.gotoPeepelPoint();
}
catch(ex){
jsExDebug("sharedPeepelPointItem_viewButtonClickEvent",ex);
}
}
function sharedPeepelPointItem_dblClickEvent(_1f,me){
try{
me.gotoPeepelPoint();
}
catch(ex){
jsExDebug("sharedPeepelPointItem_dblClickEvent",ex);
}
}

try{
contactWidget_t.prototype=new mapObjectWidget_t();
contactWidget_t.prototype.contactWidget_super=mapObjectWidget_t.prototype.constructor;
contactWidget_t.prototype.constructor=contactWidget_t;
contactWidget_t.prototype.cleanUp=contactWidget_cleanUp;
contactWidget_t.prototype.mapObjectWidget_cleanUp=mapObjectWidget_t.prototype.cleanUp;
contactWidget_t.prototype.mapObjectWidget_bindEvents=mapObjectWidget_t.prototype.bindEvents;
contactWidget_t.prototype.createDom=contactWidget_createDom;
contactWidget_t.prototype.bindEvents=contactWidget_bindEvents;
contactWidget_t.prototype.setOpacity=contactWidget_setOpacity;
contactWidget_t.prototype.setDimensions=contactWidget_setDimensions;
contactWidget_t.prototype.setAccuracy=contactWidget_setAccuracy;
contactWidget_t.prototype.setPastLocation=contactWidget_setPastLocation;
contactWidget_t.prototype.setMediaLocation=contactWidget_setMediaLocation;
contactWidget_t.prototype.checkAge=contactWidget_checkAge;
contactWidget_t.prototype.NONE_IMG="img/site/global/pixel.png";
contactWidget_t.prototype.MOULD_IMG="img/app/app/map/icons/mould";
contactWidget_t.prototype.PAST_ICON_IMG="img/app/app/map/mapobjects/contact/point_norm_sml.png";
contactWidget_t.prototype.PAST_MEDIA_ICON_IMG="img/app/app/map/mapobjects/contact/photo_avatar.png";
contactWidget_t.prototype.TRACKING_STATUS_IMG="img/app/app/map/mapobjects/contact/track";
contactWidget_t.prototype.PAST_MEDIA_SIDE=32;
}
catch(ex){
jsExDebug("contactWidget_t.prototype",ex);
}
function contactWidget_t(_1){
try{
this.contactWidget_super("contact",true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.isPastLocation=false;
this.isMediaLocation=false;
this.accuracyValue=null;
this.trackingStatusImage=null;
if(!_1){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("contactWidget_t",ex);
}
}
function contactWidget_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.topImageElement){
me.SYSTEM.Event.detachEvent(me.topImageElement,"onmousedown","mousedown");
me.SYSTEM.Event.detachEvent(me.topImageElement,"onmouseup","mouseup");
me.SYSTEM.Event.detachEvent(me.topImageElement,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.topImageElement,"onmouseout","mouseout");
}
me.imageElement=null;
me.topImageElement=null;
me.accuracyValue=null;
me.isPastLocation=null;
me.isMediaLocation=null;
me.trackingStatusImage=null;
me.mapObjectWidget_cleanUp();
}
catch(ex){
jsExDebug("contactWidget_cleanUp",ex);
}
}
function contactWidget_createDom(){
try{
this.label=new this.SYSTEM.Widget.Label("label");
this.label.setDimensions(null,this.LABEL_HEIGHT);
this.label.setAlignment("center");
this.label.setBold();
this.label.setColour(this.SYSTEM.Style.DARK_BLUE_BORDER);
this.label.attach(this.widgetElement);
var _3=this.SYSTEM.Dom.createImage(null,"absolute");
this.widgetElement.appendChild(_3);
var _4=this.SYSTEM.Dom.createImage(null,"absolute");
this.widgetElement.appendChild(_4);
var _5=this.SYSTEM.Dom.createImage(this.NONE_IMG,"absolute");
this.widgetElement.appendChild(_5);
this.widgetElement.style.visibility="visible";
this.trackingStatusImage=_3;
this.imageElement=_4;
this.topImageElement=_5;
}
catch(ex){
jsExDebug("contactWidget_createDom",ex);
}
}
function contactWidget_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.topImageElement,"onmousedown","mousedown",this.mouseDownEvent,this);
this.SYSTEM.Event.attachEvent(this.topImageElement,"onmouseup","mouseup",this.mouseUpEvent,this);
this.SYSTEM.Event.attachEvent(this.topImageElement,"onmouseover","mouseover",this.enterEvent,this);
this.SYSTEM.Event.attachEvent(this.topImageElement,"onmouseout","mouseout",this.exitEvent,this);
}
catch(ex){
jsExDebug("contactWidget_bindEvents",ex);
}
}
function contactWidget_setOpacity(_6){
try{
this.opacity=_6;
if(this.SYSTEM.Environment.userAgentIsIE()){
this.widgetElement.style.filter="alpha(opacity="+(this.opacity*100)+")";
}else{
this.widgetElement.style.opacity=this.opacity;
}
}
catch(ex){
jsExDebug("contactWidget_setOpacity",ex);
}
}
function contactWidget_setDimensions(_7,_8){
try{
if(this.isPastLocation&&this.isMediaLocation){
_7=this.PAST_MEDIA_SIDE;
_8=this.PAST_MEDIA_SIDE;
}
this.width=(_7?_7:this.width);
this.height=(_8?_8:this.height);
var _9=(this.isPastLocation?this.width:this.width-8);
this.widgetElement.style.width=this.width+"px";
this.widgetElement.style.height=this.height+"px";
this.trackingStatusImage.style.width=this.widgetElement.style.width;
this.trackingStatusImage.style.height=this.widgetElement.style.height;
this.imageElement.style.width=_9+"px";
this.imageElement.style.height=_9+"px";
this.topImageElement.style.width=this.imageElement.style.width;
this.topImageElement.style.height=this.imageElement.style.height;
var _a=(this.width-_9)/2;
this.imageElement.style.left=_a+"px";
this.imageElement.style.top=_a+"px";
this.topImageElement.style.left=this.imageElement.style.left;
this.topImageElement.style.top=this.imageElement.style.top;
}
catch(ex){
jsExDebug("contactWidget_setDimensions",ex);
}
}
function contactWidget_setAccuracy(_b){
try{
if(_b!=null){
switch(_b){
case this.SYSTEM.Contacts.TRACKING_STATUS_OFF:
this.trackingStatusImage.src=this.TRACKING_STATUS_IMG+"_off.png";
break;
case this.SYSTEM.Contacts.TRACKING_STATUS_ACQUAINTANCE:
this.trackingStatusImage.src=this.TRACKING_STATUS_IMG+"_acq.png";
break;
case this.SYSTEM.Contacts.TRACKING_STATUS_FRIEND:
this.trackingStatusImage.src=this.TRACKING_STATUS_IMG+"_fr.png";
break;
case this.SYSTEM.Contacts.TRACKING_STATUS_TRUSTED:
this.trackingStatusImage.src=this.TRACKING_STATUS_IMG+"_tr.png";
break;
}
this.accuracyValue=_b;
}
}
catch(ex){
jsExDebug("contactWidget_setAccuracy",ex);
}
}
function contactWidget_setPastLocation(){
try{
if(this.isMediaLocation){
this.setImage(this.PAST_MEDIA_ICON_IMG);
}else{
this.setImage(this.PAST_ICON_IMG);
}
this.imageElement.style.left="0px";
this.widgetElement.style.border="";
this.topImageElement.src=this.NONE_IMG;
this.trackingStatusImage.src=this.NONE_IMG;
this.trackingStatusImage.style.display="none";
this.isPastLocation=true;
this.label.setText("");
}
catch(ex){
jsExDebug("contactWidget_setPastLocation",ex);
}
}
function contactWidget_setMediaLocation(){
try{
this.isMediaLocation=true;
if(this.isPastLocation){
this.setImage(this.PAST_MEDIA_ICON_IMG);
}
}
catch(ex){
jsExDebug("contactWidget_setMediaLocation",ex);
}
}
function contactWidget_checkAge(_c){
try{
if(this.SYSTEM.Settings.get("map_location_decay")){
var _d=60*60*24;
var _e=new Date();
var _f=Math.floor(((_e.getTime()-_c)/1000)/_d);
if(_f>0){
if(_f<5){
this.topImageElement.src=this.MOULD_IMG+".png";
}else{
if(_f<10){
this.topImageElement.src=this.MOULD_IMG+"2.png";
}else{
this.topImageElement.src=this.MOULD_IMG+"3.png";
}
}
this.topImageElement.style.display="block";
}
}else{
this.topImageElement.src=this.NONE_IMG;
}
}
catch(ex){
jsExDebug("contactWidget_checkAge",ex);
}
}

try{
clusterWidget_t.prototype=new mapObjectWidget_t();
clusterWidget_t.prototype.clusterWidget_super=mapObjectWidget_t.prototype.constructor;
clusterWidget_t.prototype.constructor=clusterWidget_t;
clusterWidget_t.prototype.cleanUp=clusterWidget_cleanUp;
clusterWidget_t.prototype.mapObjectWidget_cleanUp=mapObjectWidget_t.prototype.cleanUp;
clusterWidget_t.prototype.mapObjectWidget_bindEvents=mapObjectWidget_t.prototype.bindEvents;
clusterWidget_t.prototype.createDom=clusterWidget_createDom;
clusterWidget_t.prototype.bindEvents=clusterWidget_bindEvents;
clusterWidget_t.prototype.setDimensions=clusterWidget_setDimensions;
clusterWidget_t.prototype.setPosition=clusterWidget_setPosition;
clusterWidget_t.prototype.setImage=clusterWidget_setImage;
clusterWidget_t.prototype.mapObjectWidget_attach=mapObjectWidget_t.prototype.attach;
clusterWidget_t.prototype.attach=clusterWidget_attach;
clusterWidget_t.prototype.mapObjectWidget_detach=mapObjectWidget_t.prototype.detach;
clusterWidget_t.prototype.detach=clusterWidget_detach;
clusterWidget_t.prototype.show=clusterWidget_show;
clusterWidget_t.prototype.hide=clusterWidget_hide;
clusterWidget_t.prototype.IMAGE_LBL_PADDING=10;
}
catch(ex){
jsExDebug("clusterWidget_t.prototype",ex);
}
function clusterWidget_t(_1){
try{
this.clusterWidget_super("contact",true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(!_1){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("clusterWidget_t",ex);
}
}
function clusterWidget_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.topImageElement){
me.SYSTEM.Event.detachEvent(me.eventDiv,"onmousedown","mousedown");
me.SYSTEM.Event.detachEvent(me.eventDiv,"onmouseup","mouseup");
me.SYSTEM.Event.detachEvent(me.eventDiv,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.eventDiv,"onmouseout","mouseout");
}
me.imageElement=null;
me.imageLabel.cleanUp();
me.label=null;
me.mapObjectWidget_cleanUp();
}
catch(ex){
jsExDebug("clusterWidget_cleanUp",ex);
}
}
function clusterWidget_createDom(){
try{
this.label=new this.SYSTEM.Widget.Label("label");
this.label.setDimensions(null,this.LABEL_HEIGHT);
this.label.setAlignment("center");
this.label.setBold();
this.label.setColour(this.SYSTEM.Style.DARK_BLUE_BORDER);
this.label.attach(this.widgetElement);
var _3=this.SYSTEM.Dom.createImage(null,"absolute");
this.widgetElement.appendChild(_3);
var _4=this.SYSTEM.Dom.createDiv("absolute");
var _5=new this.SYSTEM.Widget.Label("imageLabel");
_5.setDimensions(null,20);
_5.setBold();
_5.setAlignment("center");
this.imageElement=_3;
this.imageLabel=_5;
this.eventDiv=_4;
}
catch(ex){
jsExDebug("clusterWidget_createDom",ex);
}
}
function clusterWidget_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.eventDiv,"onmousedown","mousedown",this.mouseDownEvent,this);
this.SYSTEM.Event.attachEvent(this.eventDiv,"onmouseup","mouseup",this.mouseUpEvent,this);
this.SYSTEM.Event.attachEvent(this.eventDiv,"onmouseover","mouseover",this.enterEvent,this);
this.SYSTEM.Event.attachEvent(this.eventDiv,"onmouseout","mouseout",this.exitEvent,this);
}
catch(ex){
jsExDebug("clusterWidget_bindEvents",ex);
}
}
function clusterWidget_setDimensions(_6,_7){
try{
this.width=_6;
this.height=_7;
this.widgetElement.style.width=this.width+"px";
this.widgetElement.style.height=this.height+"px";
this.imageElement.style.width=this.width+"px";
this.imageElement.style.height=this.height+"px";
this.eventDiv.style.width=this.widgetElement.style.width;
this.eventDiv.style.height=this.widgetElement.style.height;
this.imageLabel.setPosition(this.positionX+this.IMAGE_LBL_PADDING,this.positionY+(this.height/2)-(this.imageLabel.height/2));
this.imageLabel.setDimensions(this.width-(2*this.IMAGE_LBL_PADDING));
}
catch(ex){
jsExDebug("clusterWidget_setDimensions",ex);
}
}
function clusterWidget_setPosition(_8,_9,_a,_b){
try{
if(_8!=null){
this.widgetElement.style.left=_8+"px";
this.eventDiv.style.left=_8+"px";
this.positionX=_8;
}
if(_9!=null){
this.widgetElement.style.top=_9+"px";
this.eventDiv.style.top=_9+"px";
this.positionY=_9;
}
this.setLabel(this.label.getText());
this.imageLabel.setPosition(this.positionX+this.IMAGE_LBL_PADDING,this.positionY+(this.height/2)-(this.imageLabel.height/2));
}
catch(ex){
jsExDebug("clusterWidget_setPosition",ex);
}
}
function clusterWidget_setImage(_c){
try{
this.imageSrc=_c;
if(document.all){
this.imageElement.src="img/site/global/pixel.png";
this.imageElement.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.imageSrc+"')";
}else{
this.imageElement.src=this.imageSrc;
}
}
catch(ex){
jsExDebug("clusterWidget_setImage",ex);
}
}
function clusterWidget_attach(_d){
try{
this.mapObjectWidget_attach(_d);
this.imageLabel.attach(_d);
_d.appendChild(this.eventDiv);
}
catch(ex){
jsExDebug("clusterWidget_attach",ex);
}
}
function clusterWidget_detach(){
try{
var _e=this.parentDiv;
this.mapObjectWidget_detach();
this.imageLabel.detach();
_e.removeChild(this.eventDiv);
this.imageLabel=null;
this.eventDiv=null;
}
catch(ex){
jsExDebug("clusterWidget_detach",ex);
}
}
function clusterWidget_hide(){
try{
this.widget_hide();
this.label.hide();
this.imageLabel.hide();
this.eventDiv.style.visibility="hidden";
}
catch(ex){
jsExDebug("clusterWidget_hide",ex);
}
}
function clusterWidget_show(){
try{
this.widget_show();
if(this.SYSTEM.Settings.get("map_object_labels")){
this.label.show();
}else{
this.label.hide();
}
this.imageLabel.show();
this.eventDiv.style.visibility="visible";
}
catch(ex){
jsExDebug("clusterWidget_show",ex);
}
}

try{
locationHistoryTimeline_t.prototype=new widget_t();
locationHistoryTimeline_t.prototype.constructor=locationHistoryTimeline_t;
locationHistoryTimeline_t.prototype.cleanUp=locationHistoryTimeline_cleanUp;
locationHistoryTimeline_t.prototype.locationHistoryTimeline_super=widget_t.prototype.constructor;
locationHistoryTimeline_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
locationHistoryTimeline_t.prototype.createDom=locationHistoryTimeline_createDom;
locationHistoryTimeline_t.prototype.bindEvents=locationHistoryTimeline_bindEvents;
locationHistoryTimeline_t.prototype.setDimensions=locationHistoryTimeline_setDimensions;
locationHistoryTimeline_t.prototype.hide=locationHistoryTimeline_hide;
locationHistoryTimeline_t.prototype.show=locationHistoryTimeline_show;
locationHistoryTimeline_t.prototype.setEndDates=locationHistoryTimeline_setEndDates;
locationHistoryTimeline_t.prototype.setSpeed=locationHistoryTimeline_setSpeed;
locationHistoryTimeline_t.prototype.start=locationHistoryTimeline_start;
locationHistoryTimeline_t.prototype.stop=locationHistoryTimeline_stop;
locationHistoryTimeline_t.prototype.next=locationHistoryTimeline_next;
locationHistoryTimeline_t.prototype.previous=locationHistoryTimeline_previous;
locationHistoryTimeline_t.prototype.isRunning=locationHistoryTimeline_isRunning;
locationHistoryTimeline_t.prototype.setZoomLevel=locationHistoryTimeline_setZoomLevel;
locationHistoryTimeline_t.prototype.addContacts=locationHistoryTimeline_addContacts;
locationHistoryTimeline_t.prototype.addUser=locationHistoryTimeline_addUser;
locationHistoryTimeline_t.prototype.getUserLocationHistory=locationHistoryTimeline_getUserLocationHistory;
locationHistoryTimeline_t.prototype.removeContacts=locationHistoryTimeline_removeContacts;
locationHistoryTimeline_t.prototype.contactExists=locationHistoryTimeline_contactExists;
locationHistoryTimeline_t.prototype.setContactRemovalDelegate=locationHistoryTimeline_setContactRemovalDelegate;
locationHistoryTimeline_t.prototype.jumpToItem=locationHistoryTimeline_jumpToItem;
locationHistoryTimeline_t.prototype.startZoom=locationHistoryTimeline_startZoom;
locationHistoryTimeline_t.prototype.cancelZoom=locationHistoryTimeline_cancelZoom;
locationHistoryTimeline_t.prototype.setScreenPosition=locationHistoryTimeline_setScreenPosition;
locationHistoryTimeline_t.prototype.getDateHistory=locationHistoryTimeline_getDateHistory;
locationHistoryTimeline_t.prototype.clearDateHistory=locationHistoryTimeline_clearDateHistory;
locationHistoryTimeline_t.prototype.restoreFromDateHistory=locationHistoryTimeline_restoreFromDateHistory;
locationHistoryTimeline_t.prototype.getVectorArray=locationHistoryTimeline_getVectorArray;
locationHistoryTimeline_t.prototype.getMinimumClusterCount=locationHistoryTimeline_getMinimumClusterCount;
locationHistoryTimeline_t.prototype.getMaximumClusterCount=locationHistoryTimeline_getMaximumClusterCount;
locationHistoryTimeline_t.prototype.getHighlightedContactPositions=locationHistoryTimeline_getHighlightedContactPositions;
locationHistoryTimeline_t.prototype.getContactIdList=locationHistoryTimeline_getContactIdList;
locationHistoryTimeline_t.prototype.getNumberOfContacts=locationHistoryTimeline_getNumberOfContacts;
locationHistoryTimeline_t.prototype.getStartDate=locationHistoryTimeline_getStartDate;
locationHistoryTimeline_t.prototype.getEndDate=locationHistoryTimeline_getEndDate;
locationHistoryTimeline_t.prototype.getSpeed=locationHistoryTimeline_getSpeed;
locationHistoryTimeline_t.prototype.isInitialised=locationHistoryTimeline_isInitialised;
locationHistoryTimeline_t.prototype.checkForEmptySecond=locationHistoryTimeline_checkForEmptySecond;
locationHistoryTimeline_t.prototype.isEmpty=locationHistoryTimeline_isEmpty;
locationHistoryTimeline_t.prototype.createDivision=locationHistoryTimeline_createDivision;
locationHistoryTimeline_t.prototype.currentSecondChange=locationHistoryTimeline_currentSecondChange;
locationHistoryTimeline_t.prototype.showCurrentTimelineDate=locationHistoryTimeline_showCurrentTimelineDate;
locationHistoryTimeline_t.prototype.showTimelineEndDates=locationHistoryTimeline_showTimelineEndDates;
locationHistoryTimeline_t.prototype.getNewLineColour=locationHistoryTimeline_getNewLineColour;
locationHistoryTimeline_t.prototype.contactLocationHistoryCallback=locationHistoryTimeline_contactLocationHistoryCallback;
locationHistoryTimeline_t.prototype.overlayInitialised=locationHistoryTimeline_overlayInitialised;
locationHistoryTimeline_t.prototype.updateCurrentDatePosition=locationHistoryTimeline_updateCurrentDatePosition;
locationHistoryTimeline_t.prototype.hideCurrentDate=locationHistoryTimeline_hideCurrentDate;
locationHistoryTimeline_t.prototype.updateDateHistory=locationHistoryTimeline_updateDateHistory;
locationHistoryTimeline_t.prototype.itemClickEvent=locationHistoryTimeline_itemClickEvent;
locationHistoryTimeline_t.prototype.itemMouseOverEvent=locationHistoryTimeline_itemMouseOverEvent;
locationHistoryTimeline_t.prototype.itemMouseOutEvent=locationHistoryTimeline_itemMouseOutEvent;
locationHistoryTimeline_t.prototype.mouseMoveEvent=locationHistoryTimeline_mouseMoveEvent;
locationHistoryTimeline_t.prototype.zoomCoverClickEvent=locationHistoryTimeline_zoomCoverClickEvent;
locationHistoryTimeline_t.prototype.mouseScrollEvent=locationHistoryTimeline_mouseScrollEvent;
locationHistoryTimeline_t.prototype.itemDblClickEvent=locationHistoryTimeline_itemDblClickEvent;
locationHistoryTimeline_t.prototype.timerCallback=locationHistoryTimeline_timerCallback;
locationHistoryTimeline_t.prototype.addBtnClickEvent=locationHistoryTimeline_addBtnClickEvent;
locationHistoryTimeline_t.prototype.removeBtnClickEvent=locationHistoryTimeline_removeBtnClickEvent;
locationHistoryTimeline_t.prototype.MAX_ZOOM_LEVEL=20;
locationHistoryTimeline_t.prototype.DEFAULT_HEIGHT=160;
locationHistoryTimeline_t.prototype.USER_CONTACT_ID=-1;
locationHistoryTimeline_t.prototype.MAX_NUMBER_OF_ITEMS=120;
locationHistoryTimeline_t.prototype.DOUBLE_CLICK_TIMEOUT=200;
locationHistoryTimeline_t.prototype.MAXIMUM_NUMBER_OF_CONTACTS=3;
locationHistoryTimeline_t.prototype.BORDER_STYLE="solid 1px rgb( 125, 120, 175 )";
locationHistoryTimeline_t.prototype.LINE_HEIGHT=23;
locationHistoryTimeline_t.prototype.LINE_INFO_WIDTH=110;
locationHistoryTimeline_t.prototype.LINE_END_WIDTH=20;
locationHistoryTimeline_t.prototype.LINE_AVATAR_LEFT=3;
locationHistoryTimeline_t.prototype.LINE_AVATAR_TOP=0;
locationHistoryTimeline_t.prototype.LINE_AVATAR_SIDE=locationHistoryTimeline_t.prototype.LINE_HEIGHT-2;
locationHistoryTimeline_t.prototype.TIMELINE_PADDING=15;
locationHistoryTimeline_t.prototype.USER_LINE_BG="img/dev_only/map/usertimelinebackground.png";
locationHistoryTimeline_t.prototype.LINE_COLOUR1_RIGHT=4;
locationHistoryTimeline_t.prototype.LINE_COLOUR2_RIGHT=1;
locationHistoryTimeline_t.prototype.LINE_COLOUR_TOP=2;
locationHistoryTimeline_t.prototype.LINE_COLOUR_SIDE=locationHistoryTimeline_t.prototype.LINE_HEIGHT-8;
locationHistoryTimeline_t.prototype.LINE_COLOUR_BORDER=locationHistoryTimeline_t.prototype.BORDER_STYLE;
locationHistoryTimeline_t.prototype.LINE_REMOVE_SIDE=16;
locationHistoryTimeline_t.prototype.LINE_REMOVE_IMG="img/app/app/map/icons/cancel";
locationHistoryTimeline_t.prototype.DEFAULT_COLOUR_COLOUR="white";
locationHistoryTimeline_t.prototype.TIMER_INTERVAL_FAST=150;
locationHistoryTimeline_t.prototype.TIMER_INTERVAL_MEDIUM=400;
locationHistoryTimeline_t.prototype.TIMER_INTERVAL_SLOW=800;
locationHistoryTimeline_t.prototype.DIVISION_COUNT=16;
locationHistoryTimeline_t.prototype.DIVISION_PADDING=8;
locationHistoryTimeline_t.prototype.POSITION_BAR_TOP=1;
locationHistoryTimeline_t.prototype.POSITION_BAR_BOTTOM=locationHistoryTimeline_t.prototype.DEFAULT_HEIGHT-(locationHistoryTimeline_t.prototype.LINE_HEIGHT*4);
locationHistoryTimeline_t.prototype.POSITION_BAR_WIDTH=10;
locationHistoryTimeline_t.prototype.ADD_AREA_WIDTH=110;
locationHistoryTimeline_t.prototype.ADD_BTN_SIDE=16;
locationHistoryTimeline_t.prototype.ADD_IMG="img/app/app/map/icons/toggle_off";
locationHistoryTimeline_t.prototype.DATE_AREA_HEIGHT=32;
locationHistoryTimeline_t.prototype.DATE_LBL_FONT_SIZE=10;
locationHistoryTimeline_t.prototype.DATE_LBL_COLOUR="rgb(100,100,100)";
locationHistoryTimeline_t.prototype.DATE_LBL_TOP=16;
locationHistoryTimeline_t.prototype.DATE_ARROW_IMG="img/app/app/map/icons/timeline_arrow_off.png";
locationHistoryTimeline_t.prototype.DATE_ARROW_WIDTH=16;
locationHistoryTimeline_t.prototype.DATE_ARROW_HEIGHT=16;
locationHistoryTimeline_t.prototype.CURRENT_DATE_WIDTH=205;
locationHistoryTimeline_t.prototype.CURRENT_DATE_HEIGHT=30;
locationHistoryTimeline_t.prototype.CURRENT_DATE_ARROW_IMG="img/app/app/map/icons/timeline_current_arrow.png";
locationHistoryTimeline_t.prototype.CURRENT_DATE_ARROW_HEIGHT=8;
locationHistoryTimeline_t.prototype.CURRENT_DATE_ARROW_WIDTH=15;
locationHistoryTimeline_t.prototype.DURATION_DIV_HEIGHT=20;
locationHistoryTimeline_t.prototype.ZOOM_COVER_SIZE_CHANGE=20;
locationHistoryTimeline_t.prototype.ZOOM_COVER_MIN_WIDTH=8;
locationHistoryTimeline_t.prototype.LINE_ITEM_WIDTH=6;
locationHistoryTimeline_t.prototype.LINE_ITEM_HEIGHT=locationHistoryTimeline_t.prototype.LINE_HEIGHT-7;
locationHistoryTimeline_t.prototype.LINE_ITEM_BORDER="solid 1px rgb(202,202,182)";
locationHistoryTimeline_t.prototype.ITEM_HEIGHT=8;
locationHistoryTimeline_t.prototype.OPACITY_CHANGE=10;
locationHistoryTimeline_t.prototype.MINIMUM_OPACITY=50;
locationHistoryTimeline_t.prototype.BG_IMG="img/dev_only/map/timelinebackground.gif";
locationHistoryTimeline_t.prototype.GREY="rgb(202,202,182)";
locationHistoryTimeline_t.prototype.POSITION_BAR_COLOUR="black";
locationHistoryTimeline_t.prototype.HIGHLIGHT_IMG="img/dev_only/highlight";
locationHistoryTimeline_t.prototype.DIM_IMG="img/dev_only/dim";
locationHistoryTimeline_t.prototype.LOCATION_NODE_NAME="Location";
locationHistoryTimeline_t.prototype.DATE_NODE_NAME="Date";
locationHistoryTimeline_t.prototype.LAT_NODE_NAME="Y";
locationHistoryTimeline_t.prototype.LONG_NODE_NAME="X";
locationHistoryTimeline_t.prototype.TRACKING_SERVICE_PATH=contacts_t.prototype.TRACKING_SERVICE_PATH;
locationHistoryTimeline_t.prototype.ACTION_GET_USER_LOCATION_HISTORY=10;
locationHistoryTimeline_t.prototype.DEFAULT_EVENT=SYSTEM.Event.VALUE_CHANGED_EVENT;
locationHistoryTimeline_t.prototype.SUPPORTED_EVENTS=[SYSTEM.Event.DOUBLE_CLICK_EVENT];
locationHistoryTimeline_t.prototype.TIMER_FINISHED_EVENT=1024;
locationHistoryTimeline_t.prototype.RESIZE_EVENT=2048;
locationHistoryTimeline_t.prototype.ADD_USER_EVENT=4096;
locationHistoryTimeline_t.prototype.ZOOM_COMPLETE_EVENT=8192;
}
catch(ex){
jsExDebug("locationHistoryTimeline_t.prototype",ex);
}
function locationHistoryTimeline_t(_1,_2){
try{
this.locationHistoryTimeline_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.lineDomArray=[];
this.currentTimelineWidth=0;
this.locationHistoryDelegate=new this.SYSTEM.Delegate(this,this.contactLocationHistoryCallback);
this.divisionArray=[];
this.buttonArray=[];
this.data=[];
this.dataSecondReference=[];
this.timer=new timer_t(this.timerCallback,this,null,this.TIMER_INTERVAL_SLOW);
this.startSeconds=0;
this.totalSeconds=0;
this.currentSecond=0;
this.currentEvent=null;
this.currentDblClickData=null;
this.currentMapZoomLevel=null;
this.contactIdArray=[];
this.overlayArray=[];
this.locationArray=[];
this.highlightedPosition=[];
this.numberOfContacts=0;
this.numberOfContactsAdded=0;
this.userAdded=false;
this.userLoaded=false;
this.addContactsCompletionDelegate=null;
this.removeContactsCompletionDelegate=null;
this.initialisedDrawerCount=0;
this.initialisedDrawerTarget=4;
this.contactLineIndexes=[];
this.currentTimeArrowVisible=false;
this.currentTimeArrowSeconds=null;
this.zoomCoverMinimumLeft=this.LINE_INFO_WIDTH+this.TIMELINE_PADDING;
this.zoomCoverMaximumLeft=0;
this.screenPositionX=null;
this.dateHistory=[];
this.updatingFromZoomOrHistory=false;
this.availableColours=["rgb(0,0,255)","rgb(0,255,0)","rgb(255,0,0)","rgb(255,255,0)"];
this.currentColourIndex=0;
this.coloursInUse=[];
if(!_2){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_t",ex);
}
}
function locationHistoryTimeline_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.detachEvent(me.positionBar,"ondblclick","dblclick");
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmousemove","mousemove");
me.SYSTEM.Event.detachEvent(me.zoomCoverDiv,"onclick","click");
me.SYSTEM.Event.removeMouseScrollUpHandler(me.scrollUpIndex);
me.SYSTEM.Event.removeMouseScrollDownHandler(me.scrollDownIndex);
if(me.locationHistoryDelegate&&me.locationHistoryDelegate.cleanUpIndex){
me.locationHistoryDelegate.cleanUp();
me.locationHistoryDelegate=null;
}
me.startDateLabel.cleanUp();
me.startDateLabel=null;
me.endDateLabel.cleanUp();
me.endDateLabel=null;
me.currentDateDiv=null;
me.currentDateTextDiv=null;
me.currentDateArrow=null;
me.dateAreaDiv=null;
me.updatingFromZoomOrHistory=null;
me.timer.stop();
me.timer.cleanUp();
me.timer=null;
me.totalSeconds=null;
me.currentSecond=null;
me.currentEvent=null;
me.currentDblClickData=null;
me.currentMapZoomLevel=null;
me.numberOfContacts=null;
me.numberOfContactsAdded=null;
me.userAdded=null;
me.userLoaded=null;
for(var id in me.contactIdArray){
me.contactIdArray[id]=null;
}
me.contactIdArray=null;
for(var _5 in me.buttonArray){
if(!me.buttonArray[_5]){
continue;
}
for(var i=0;i<me.buttonArray[_5].length;i++){
me.buttonArray[_5][i].dataSeconds=null;
me.buttonArray[_5][i].position=null;
me.SYSTEM.Event.detachEvent(me.buttonArray[_5][i].button,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.buttonArray[_5][i].button,"onmouseout","mouseout");
me.SYSTEM.Event.detachEvent(me.buttonArray[_5][i].button,"onclick","click");
me.SYSTEM.Event.detachEvent(me.buttonArray[_5][i].button,"ondblclick","dblclick");
me.buttonArray[_5][i].button=null;
me.buttonArray[_5][i].left=null;
me.buttonArray[_5][i].duration=null;
me.buttonArray[_5][i]=null;
}
me.buttonArray[_5]=null;
for(i=0;i<me.locationArray[_5].length;i++){
me.locationArray[_5][i].position=null;
me.locationArray[_5][i].coordinate=null;
me.locationArray[_5][i]=null;
}
me.locationArray[_5]=null;
me.overlayArray[_5].overlay=null;
}
me.buttonArray=null;
me.locationArray=null;
me.clusters=null;
for(i in me.data){
if(me.data[i]){
for(_5 in me.data[i]){
if(me.data[i][_5]){
me.data[i][_5].position=null;
me.data[i][_5]=null;
}
}
me.data[i]=null;
}
}
me.data=null;
for(_5 in me.dataSecondReference){
if(me.dataSecondReference[_5]){
for(i in me.dataSecondReference[_5]){
if(me.dataSecondReference[_5][i]){
me.dataSecondReference[_5][i]=null;
}
}
me.dataSecondReference[_5]=null;
}
}
me.dataSecondReference;
for(i=0;i<me.lineDomArray.length;i++){
me.SYSTEM.Event.detachEvent(me.lineDomArray[i].line,"onmousedown","mousedown");
me.lineDomArray[i].line=null;
me.lineDomArray[i].avatar=null;
me.lineDomArray[i].name=null;
me.lineDomArray[i].startColour=null;
me.lineDomArray[i].removeBtn.cleanUp();
me.lineDomArray[i].removeBtn=null;
me.lineDomArray[i].timeline=null;
me.lineDomArray[i].overlay.lineIndex=null;
me.lineDomArray[i].overlay=null;
me.lineDomArray[i].contactId=null;
me.lineDomArray[i]=null;
}
me.lineDomArray=null;
me.currentTimelineWidth=null;
for(i=1;i<me.divisionArray.length;i++){
me.SYSTEM.Dom.freeDom(me.divisionArray[i]);
me.divisionArray[i]=null;
}
me.divisionArray=null;
if(me.addContactsCompletionDelegate&&me.addContactsCompletionDelegate.cleanUpIndex){
me.addContactsCompletionDelegate.cleanUp();
me.addContactsCompletionDelegate=null;
}
if(me.removeContactsCompletionDelegate&&me.removeContactsCompletionDelegate.cleanUpIndex){
me.removeContactsCompletionDelegate.cleanUp();
me.removeContactsCompletionDelegate=null;
}
me.userTimelineDiv=null;
me.contact1TimelineDiv=null;
me.contact2TimelineDiv=null;
me.contact3TimelineDiv=null;
me.initialisedDrawerCount=null;
me.initialisedDrawerTarget=null;
for(var _7 in me.contactLineIndexes){
me.contactLineIndexes[_7]=null;
}
me.contactLineIndexes=null;
me.timelineStartDate=null;
me.timelineEndDate=null;
me.timelineStartSeconds=null;
me.timelineTotalSeconds=null;
me.timelineSecondsIncrement=null;
if(me.timelineUpdateCompletionDelegate&&me.timelineUpdateCompletionDelegate.cleanUpIndex){
me.timelineUpdateCompletionDelegate.cleanUp();
me.timelineUpdateCompletionDelegate=null;
}
me.clickedContactId=null;
me.dataSecondReference=null;
me.startSeconds=null;
me.overlayArray=null;
me.highlightedPosition=null;
me.positionBar=null;
me.barMiddle=null;
me.timelineDiv=null;
me.startDate=null;
me.endDate=null;
me.currentTimeArrowVisible=null;
me.currentTimeArrowSeconds=null;
me.addLabel.cleanUp();
me.addLabel=null;
me.addBtn.cleanUp();
me.addBtn=null;
me.zoomCoverDiv=null;
me.zoomCoverVisible=null;
for(var i=0;i<me.dateHistory.length;i++){
if(me.dateHistory[i]){
me.dateHistory[i].start=null;
me.dateHistory[i].startString=null;
me.dateHistory[i].end=null;
me.dateHistory[i].endString=null;
me.dateHistory[i]=null;
}
}
me.dateHistory=null;
me.durationDiv=null;
me.availableColours=null;
me.currentColourIndex=null;
me.coloursInUse=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("locationHistoryTimeline_cleanUp",ex);
}
}
function locationHistoryTimeline_createDom(){
try{
var _8=this.SYSTEM.Dom.createDiv("absolute",this.ADD_AREA_WIDTH,this.DATE_AREA_HEIGHT,0);
_8.style.bottom="0px";
var _9=new this.SYSTEM.Widget.Label("addLabel","Add");
_9.setPosition(5,10);
_9.setBold();
_9.attach(_8);
var _a=new this.SYSTEM.Widget.Button("addBtn",this.ADD_IMG,null,this.ADD_BTN_SIDE,this.ADD_BTN_SIDE);
_a.setPosition(35,10);
_a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.addBtnClickEvent));
_a.attach(_8);
this.widgetElement.appendChild(_8);
this.addLabel=_9;
this.addBtn=_a;
var _b=this.SYSTEM.Dom.createDiv("absolute",null,this.DATE_AREA_HEIGHT,this.ADD_AREA_WIDTH);
_b.style.bottom="0px";
_b.style.overflow="hidden";
var _c=new this.SYSTEM.Widget.Label("startDateLabel");
_c.setPosition(4,this.DATE_LBL_TOP);
_c.setFontSize(null,this.DATE_LBL_FONT_SIZE);
_c.setColour(this.DATE_LBL_COLOUR);
_c.setBold();
_c.attach(_b);
var _d=this.SYSTEM.Dom.createElement("img","absolute",this.DATE_ARROW_WIDTH,this.DATE_ARROW_HEIGHT,this.TIMELINE_PADDING-(this.DATE_ARROW_WIDTH/2),0);
_d.src=this.DATE_ARROW_IMG;
_b.appendChild(_d);
var _e=new this.SYSTEM.Widget.Label("endDateLabel");
_e.setPosition(4,this.DATE_LBL_TOP,true);
_e.setFontSize(null,this.DATE_LBL_FONT_SIZE);
_e.setColour(this.DATE_LBL_COLOUR);
_e.setBold();
_e.attach(_b);
var _f=this.SYSTEM.Dom.createElement("img","absolute",this.DATE_ARROW_WIDTH,this.DATE_ARROW_HEIGHT,null,this.DATE_ARROW_TOP);
_f.style.right=(this.TIMELINE_PADDING+this.LINE_END_WIDTH-(this.DATE_ARROW_WIDTH/2))+"px";
_f.src=this.DATE_ARROW_IMG;
_b.appendChild(_f);
var _10=this.SYSTEM.Dom.createDiv("absolute",this.CURRENT_DATE_WIDTH,this.CURRENT_DATE_HEIGHT);
_10.style.display="none";
var _11=this.SYSTEM.Dom.createDiv("absolute",this.CURRENT_DATE_WIDTH,this.CURRENT_DATE_HEIGHT-this.CURRENT_DATE_ARROW_HEIGHT,0,this.CURRENT_DATE_ARROW_HEIGHT-1);
_11.style.backgroundColor="rgb(255,255,255)";
_11.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
_11.style.fontSize="10pt";
_11.style.fontWeight="bold";
_10.appendChild(_11);
var _12=this.SYSTEM.Dom.createElement("img","absolute",this.CURRENT_DATE_ARROW_WIDTH,this.CURRENT_DATE_ARROW_HEIGHT,null,0);
_12.src=this.CURRENT_DATE_ARROW_IMG;
_10.appendChild(_12);
_b.appendChild(_10);
var _13=this.SYSTEM.Dom.createDiv("absolute",null,this.DURATION_DIV_HEIGHT);
_13.style.bottom="0px";
_13.style.backgroundColor="rgb(255,255,255)";
_13.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
_13.style.textAlign="center";
this.startDateLabel=_c;
this.endDateLabel=_e;
this.currentDateDiv=_10;
this.currentDateTextDiv=_11;
this.currentDateArrow=_12;
this.dateAreaDiv=_b;
this.addAreaDiv=_8;
this.durationDiv=_13;
this.widgetElement.appendChild(_b);
var _14=document.createElement("div");
_14.style.position="absolute";
_14.style.left=(this.LINE_INFO_WIDTH+this.TIMELINE_PADDING)+"px";
_14.style.top="0px";
_14.style.borderTop=this.BORDER_STYLE;
for(var i=0;i<=16;i++){
this.divisionArray[i]=this.createDivision();
if((i%4)==0){
this.divisionArray[i].style.width="3px";
}
_14.appendChild(this.divisionArray[i]);
}
var _16=document.createElement("div");
_16.style.position="absolute";
_16.style.width=this.POSITION_BAR_WIDTH+"px";
_16.style.zIndex=2;
_16.style.cursor="pointer";
_16.style.left=(this.LINE_INFO_WIDTH+this.TIMELINE_PADDING-(this.POSITION_BAR_WIDTH/2)+1)+"px";
var _17=document.createElement("img");
_17.style.position="absolute";
_17.style.width=this.POSITION_BAR_WIDTH+"px";
_17.style.height="2px";
_17.style.left="0px";
_17.style.top="0px";
_17.src="img/dev_only/map/bar_top.png";
_16.appendChild(_17);
var _18=document.createElement("img");
_18.style.position="absolute";
_18.style.width=this.POSITION_BAR_WIDTH+"px";
_18.style.left="0px";
_18.style.top="2px";
_18.src="img/dev_only/map/bar_middle.png";
_16.appendChild(_18);
var _19=document.createElement("img");
_19.style.position="absolute";
_19.style.width=this.POSITION_BAR_WIDTH+"px";
_19.style.height="2px";
_19.style.left="0px";
_19.style.bottom="0px";
_19.src="img/dev_only/map/bar_bottom.png";
_16.appendChild(_19);
this.widgetElement.appendChild(_16);
this.widgetElement.appendChild(_14);
this.positionBar=_16;
this.barMiddle=_18;
this.timelineDiv=_14;
for(var i=0;i<4;i++){
var _1a=this.lineDomArray.push({})-1;
var _1b=document.createElement("div");
_1b.style.position="absolute";
_1b.style.width="100%";
_1b.style.height=(this.LINE_HEIGHT-1)+"px";
_1b.style.left="0px";
_1b.style.border=this.BORDER_STYLE;
var _1c=document.createElement("div");
_1c.style.position="absolute";
_1c.style.width=this.LINE_INFO_WIDTH+"px";
_1c.style.height=_1b.style.height;
_1c.style.left="0px";
_1c.style.top="0px";
var _1d=document.createElement("img");
_1d.style.position="absolute";
_1d.style.left=this.LINE_AVATAR_LEFT+"px";
_1d.style.top=this.LINE_AVATAR_TOP+"px";
_1d.style.width=this.LINE_AVATAR_SIDE+"px";
_1d.style.height=this.LINE_AVATAR_SIDE+"px";
_1d.style.visibility="hidden";
if(i){
_1c.appendChild(_1d);
}
var _1e=this.SYSTEM.Dom.createElement("span","absolute",this.LINE_INFO_WIDTH-(this.LINE_AVATAR_SIDE+this.LINE_AVATAR_LEFT+this.LINE_COLOUR_SIDE+this.LINE_COLOUR1_RIGHT+10),15,(i?this.LINE_AVATAR_SIDE+this.LINE_AVATAR_LEFT+5:this.LINE_AVATAR_LEFT),8);
_1e.style.overflow="hidden";
_1e.style.fontSize="9px";
_1c.appendChild(_1e);
var _1f=document.createElement("div");
_1f.style.position="absolute";
_1f.style.right=this.LINE_COLOUR1_RIGHT+"px";
_1f.style.top=this.LINE_COLOUR_TOP+"px";
_1f.style.width=this.LINE_COLOUR_SIDE+"px";
_1f.style.height=this.LINE_COLOUR_SIDE+"px";
_1f.style.border=this.LINE_COLOUR_BORDER;
_1f.style.backgroundColor=this.DEFAULT_COLOUR_COLOUR;
_1c.appendChild(_1f);
_1b.appendChild(_1c);
var _20=document.createElement("div");
_20.style.position="absolute";
_20.style.height=_1b.style.height;
_20.style.left=this.LINE_INFO_WIDTH+"px";
_20.style.top="0px";
_20.style.borderLeft=this.BORDER_STYLE;
_20.style.borderRight=this.BORDER_STYLE;
_20.lineIndex=_1a;
_1b.appendChild(_20);
var _21=document.createElement("div");
_21.style.position="absolute";
_21.style.width=this.LINE_END_WIDTH+"px";
_21.style.height=_1b.style.height;
_21.style.right="0px";
_21.style.top="0px";
var _22=new this.SYSTEM.Widget.Button("removeBtn",this.LINE_REMOVE_IMG,null,this.LINE_REMOVE_SIDE,this.LINE_REMOVE_SIDE,null,"Remove this line from the timeline.");
_22.setPosition(1,((this.LINE_HEIGHT-1)/2)-(this.LINE_REMOVE_SIDE/2),true);
_22.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.removeBtnClickEvent));
_22.attach(_21);
_1b.appendChild(_21);
this.lineDomArray[_1a].line=_1b;
this.lineDomArray[_1a].avatar=_1d;
this.lineDomArray[_1a].name=_1e;
this.lineDomArray[_1a].startColour=_1f;
this.lineDomArray[_1a].removeBtn=_22;
this.lineDomArray[_1a].timeline=_20;
this.lineDomArray[_1a].overlay=_20;
this.lineDomArray[_1a].contactId=null;
}
var _23=this.lineDomArray[0].line;
_23.style.backgroundImage="url('"+this.USER_LINE_BG+"')";
_23.style.backgroundRepeat="repeat";
_23.style.backgroundPosition="top left";
var _24=this.SYSTEM.Dom.createDiv("absolute");
_24.style.display="none";
_24.style.backgroundColor="rgb( 50, 50, 50 )";
_24.style.cursor="pointer";
_24.style.zIndex=1;
this.SYSTEM.Dom.setElementOpacity(_24,0.5);
this.widgetElement.appendChild(_24);
this.zoomCoverDiv=_24;
}
catch(ex){
jsExDebug("locationHistoryTimeline_createDom",ex);
}
}
function locationHistoryTimeline_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.positionBar,"ondblclick","dblclick",this.itemDblClickEvent,this);
this.SYSTEM.Event.attachEvent(this.widgetElement,"onmousemove","mousemove",this.mouseMoveEvent,this);
this.SYSTEM.Event.attachEvent(this.zoomCoverDiv,"onclick","click",this.zoomCoverClickEvent,this);
this.scrollUpIndex=this.SYSTEM.Event.notifyMouseScrollUp(this.mouseScrollEvent,this);
this.scrollDownIndex=this.SYSTEM.Event.notifyMouseScrollDown(this.mouseScrollEvent,this);
}
catch(ex){
jsExDebug("locationHistoryTimeline_bindEvents",ex);
}
}
function locationHistoryTimeline_setDimensions(_25,_26){
try{
var _27=this.width;
if(_25){
this.widgetElement.style.width=_25+"px";
this.width=_25;
}
var _28=this.numberOfContactsAdded+(this.userAdded?1:0);
if(!_28){
this.dateAreaDiv.style.height="1px";
this.dateAreaDiv.style.bottom=(this.DATE_AREA_HEIGHT-1)+"px";
this.addAreaDiv.style.borderTop=this.BORDER_STYLE;
this.dateAreaDiv.style.borderTop=this.BORDER_STYLE;
}else{
this.dateAreaDiv.style.height=this.DATE_AREA_HEIGHT+"px";
this.dateAreaDiv.style.bottom="0px";
this.dateAreaDiv.style.borderTop="none";
this.addAreaDiv.style.borderTop="none";
}
var _29=_28*this.LINE_HEIGHT;
if(_29){
this.timelineDiv.style.height=_29+"px";
this.timelineDiv.style.display="block";
}else{
this.timelineDiv.style.display="none";
}
var _26=this.DATE_AREA_HEIGHT+_29;
this.widgetElement.style.height=_26+"px";
this.height=_26;
var _2a=_25-this.LINE_INFO_WIDTH-this.LINE_END_WIDTH;
this.currentTimelineWidth=_2a-(2*this.TIMELINE_PADDING);
this.timelineDiv.style.width=this.currentTimelineWidth+"px";
for(var i=0;i<this.lineDomArray.length;i++){
this.lineDomArray[i].timeline.style.width=_2a+"px";
}
var _2c=this.currentTimelineWidth/16;
var _2d=null;
for(i=0;i<this.divisionArray.length;i++){
_2d=this.divisionArray[i];
_2d.style.left=(i*_2c)+"px";
if(_29){
_2d.style.height=(_29-2)+"px";
_2d.style.display="block";
}else{
_2d.style.display="none";
}
}
var _2e=null;
var _2f=null;
var _30=parseInt((this.timelineSecondsIncrement/this.timelineTotalSeconds)*this.currentTimelineWidth)-2;
for(var cId in this.buttonArray){
cId=parseInt(cId);
if(this.buttonArray[cId]){
for(i=0;i<this.buttonArray[cId].length;i++){
_2e=this.buttonArray[cId][i];
_2e.left=this.TIMELINE_PADDING+((_2e.dataSeconds/this.timelineTotalSeconds)*this.currentTimelineWidth);
_2e.button.style.left=_2e.left+"px";
if(_2e.duration){
_2f=Math.round(_2e.duration/this.timelineSecondsIncrement)*_30;
_2f=(_2f>_30?_2f:_30);
}else{
_2f=_30;
}
_2e.button.style.width=_2f+"px";
}
}
}
this.dateAreaDiv.style.width=(this.width-this.ADD_AREA_WIDTH)+"px";
if(this.data[this.currentSecond]){
this.positionBar.style.left=((this.LINE_INFO_WIDTH+this.TIMELINE_PADDING)+this.currentTimelineWidth*(this.currentSecond/this.timelineTotalSeconds))+"px";
this.updateCurrentDatePosition(this.currentSecond);
}else{
if(!_27){
this.positionBar.style.left=(this.LINE_INFO_WIDTH+this.TIMELINE_PADDING)+"px";
}else{
this.positionBar.style.left=((parseFloat(this.positionBar.style.left)/_27)*this.width)+"px";
this.updateCurrentDatePosition();
}
}
if(_29){
this.positionBar.style.height=(_29-_28)+"px";
this.positionBar.style.top=this.POSITION_BAR_TOP+"px";
this.barMiddle.style.height=(parseInt(this.positionBar.style.height)-4)+"px";
this.positionBar.style.display="block";
this.zoomCoverDiv.style.height=this.positionBar.style.height;
}else{
this.positionBar.style.display="none";
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_setDimensions",ex);
}
}
function locationHistoryTimeline_hide(){
try{
this.widgetElement.style.display="none";
this.visible=false;
}
catch(ex){
jsExDebug("locationHistoryTimeline_hide",ex);
}
}
function locationHistoryTimeline_show(){
try{
this.widgetElement.style.display="block";
this.visible=true;
}
catch(ex){
jsExDebug("locationHistoryTimeline_show",ex);
}
}
function locationHistoryTimeline_setEndDates(_32,_33,_34){
try{
this.updatingFromZoomOrHistory=true;
this.startSeconds=_32.getTime()/1000;
this.totalSeconds=(_33.getTime()/1000)-this.startSeconds;
this.startDate=_32;
this.endDate=_33;
this.timelineUpdateCompletionDelegate=_34;
var _35=this.startSeconds;
var _36=_33.getTime()/1000;
this.timelineStartDate=_32;
this.timelineEndDate=_33;
this.timelineStartSeconds=_35;
this.timelineTotalSeconds=_36-_35;
this.timelineSecondsIncrement=Math.round(this.timelineTotalSeconds/(this.DIVISION_COUNT*6));
this.timelineTotalSeconds+=this.timelineSecondsIncrement;
if(this.numberOfContacts){
var _37=[];
for(var id in this.contactIdArray){
if(this.contactIdArray[id]){
if(id!=this.USER_CONTACT_ID){
_37.push(this.contactIdArray[id]);
}
}
}
this.removeContacts(_37);
this.addContacts(_37,this.timelineUpdateCompletionDelegate,"Updating timeline...");
}
if(this.contactIdArray[this.USER_CONTACT_ID]){
this.removeContacts([this.USER_CONTACT_ID]);
this.addUser(this.timelineUpdateCompletionDelegate,"Updating timeline...");
}
this.showTimelineEndDates(this.timelineStartDate,this.timelineEndDate);
this.updateDateHistory(_32,_33);
}
catch(ex){
jsExDebug("locationHistoryTimeline_setEndDates",ex);
}
}
function locationHistoryTimeline_setSpeed(_39){
try{
this.timer.setInterval(_39);
}
catch(ex){
jsExDebug("locationHistoryTimeline_setSpeed",ex);
}
}
function locationHistoryTimeline_start(){
try{
if(!this.numberOfContacts&&!this.userLoaded){
return;
}
this.timer.start();
}
catch(ex){
jsExDebug("locationHistoryTimeline_start",ex);
}
}
function locationHistoryTimeline_stop(){
try{
this.timer.stop();
}
catch(ex){
jsExDebug("locationHistoryTimeline_stop",ex);
}
}
function locationHistoryTimeline_next(){
try{
if(this.isEmpty()){
return;
}
var _3a=null;
var _3b=null;
var _3c=null;
var _3d=0;
for(_3b in this.dataSecondReference){
if(!this.dataSecondReference[_3b]){
continue;
}
for(_3a in this.dataSecondReference[_3b]){
_3a=parseInt(_3a);
_3d++;
if(!this.dataSecondReference[_3b][_3a]){
continue;
}
if(_3a<=this.currentSecond){
continue;
}else{
if(!_3c||_3a<_3c){
_3c=_3a;
}
break;
}
}
}
if(_3c){
this.currentSecond=_3c;
this.currentSecondChange();
}else{
if(_3d){
this.currentSecond=0;
this.next();
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_next",ex);
}
}
function locationHistoryTimeline_previous(){
try{
if(this.isEmpty()){
return;
}
var _3e=null;
var _3f=null;
var _40=null;
var _41=0;
for(_3f in this.dataSecondReference){
if(!this.dataSecondReference[_3f]){
continue;
}
for(_3e in this.dataSecondReference[_3f]){
_3e=parseInt(_3e);
_41++;
if(!this.dataSecondReference[_3f][_3e]){
continue;
}
if(_3e<this.currentSecond){
if(!_40||_3e>_40){
_40=_3e;
}
}else{
break;
}
}
}
if(_40){
this.currentSecond=_40;
this.currentSecondChange();
}else{
if(_41){
this.currentSecond=this.timelineTotalSeconds;
this.previous();
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_previous",ex);
}
}
function locationHistoryTimeline_isRunning(){
try{
return this.timer.isRunning;
}
catch(ex){
jsExDebug("locationHistoryTimeline_isRunning",ex);
}
}
function locationHistoryTimeline_setZoomLevel(_42){
try{
if(this.currentMapZoomLevel!=_42){
this.currentMapZoomLevel=_42;
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_setZoomLevel",ex);
}
}
function locationHistoryTimeline_addContacts(_43,_44,_45){
function startAdding(){
try{
if(this.numberOfContacts==this.MAXIMUM_NUMBER_OF_CONTACTS){
this.SYSTEM.Tooltip.hideLoading();
return;
}
if(_44){
this.addContactsCompletionDelegate=_44;
}
var _46=null;
var _47=this.numberOfContactsAdded+1;
for(var i=0;i<_43.length;i++){
_46=this.SYSTEM.Contacts.getContact(_43[i]);
this.contactIdArray[_46.userId]=_46.contactId;
if(!this.locationArray[_46.userId]){
var _49=this.lineDomArray[_47];
_49.line.style.top=((this.userAdded?_47:_47-1)*this.LINE_HEIGHT)+"px";
_49.name.innerHTML=_46.userName;
_49.avatar.src=_46.getAvatarPath(_46.AVATAR_TIMELINE);
_49.avatar.style.visibility="visible";
_49.contactId=_46.userId;
_49.removeBtn.setValue(_46.userId);
this.contactLineIndexes[_46.userId]=_47;
_49.line.style.visibility="hidden";
this.widgetElement.appendChild(_49.line);
this.overlayInitialised(_49.overlay);
_47++;
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_addContacts: startAdding",ex);
}
}
try{
if(_43.length){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,startAdding),"WebMap",(_45?_45:"Adding contacts to the timeline..."));
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_addContacts: startAdding",ex);
}
}
function locationHistoryTimeline_addUser(_4a,_4b){
function startAdding(){
try{
if(_4a){
this.addContactsCompletionDelegate=_4a;
}
var _4c=0;
var _4d=this.lineDomArray[_4c];
_4d.line.style.top="0px";
_4d.contactId=this.USER_CONTACT_ID;
_4d.name.innerHTML="Me";
_4d.removeBtn.setValue(this.USER_CONTACT_ID);
this.contactLineIndexes[this.USER_CONTACT_ID]=_4c;
_4d.line.style.visibility="hidden";
this.widgetElement.appendChild(_4d.line);
this.overlayInitialised(_4d.overlay);
}
catch(ex){
jsExDebug("locationHistoryTimeline_addUser: startAdding",ex);
}
}
try{
if(!this.locationArray[this.USER_CONTACT_ID]){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,startAdding),"WebMap",(_4b?_4b:"Adding your history to the timeline..."));
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_addUser",ex);
}
}
function locationHistoryTimeline_getUserLocationHistory(_4e){
function response(_4f){
try{
if(_4e){
_4e.invoke(this.USER_CONTACT_ID,_4f,true);
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_getUserLocationHistory: response",ex);
}
}
try{
var _50=getUTCMilliseconds(this.timelineStartDate);
var _51=getUTCMilliseconds(this.timelineEndDate);
this.contactIdArray[this.USER_CONTACT_ID]=-1;
this.SYSTEM.Network.JSONRequest(this.TRACKING_SERVICE_PATH+"&action="+this.ACTION_GET_USER_LOCATION_HISTORY,"startMS="+_50+"&endMS="+_51,response,this);
}
catch(ex){
jsExDebug("locationHistoryTimeline_getUserLocationHistory",ex);
}
}
function locationHistoryTimeline_removeContacts(_52){
try{
var _53=null;
var _54=null;
var _55=null;
for(var i=0;i<_52.length;i++){
if(_52[i]==this.USER_CONTACT_ID){
_53=_52[i];
this.userAdded=false;
this.userLoaded=false;
}else{
_53=this.SYSTEM.Contacts.getContact(_52[i]).userId;
this.numberOfContacts--;
this.numberOfContactsAdded--;
}
if(!this.buttonArray[_53]){
continue;
}
this.contactIdArray[_53]=null;
delete this.contactIdArray[_53];
for(var j=0;j<this.buttonArray[_53].length;j++){
_54=this.buttonArray[_53][j].dataSeconds;
if(this.data[_54][_53]){
this.data[_54][_53].position=null;
this.data[_54][_53]=null;
delete this.data[_54][_53];
this.checkForEmptySecond(_54);
this.dataSecondReference[_53][_54]=null;
delete this.dataSecondReference[_53][_54];
}
this.overlayArray[_53].overlay.removeChild(this.buttonArray[_53][j].button);
this.buttonArray[_53][j].dataSeconds=null;
this.buttonArray[_53][j].position=null;
this.SYSTEM.Event.detachEvent(this.buttonArray[_53][j].button,"onclick","click");
this.SYSTEM.Event.detachEvent(this.buttonArray[_53][j].button,"ondblclick","dblclick");
this.buttonArray[_53][j].button=null;
this.buttonArray[_53][j]=null;
}
this.buttonArray[_53]=null;
for(j=0;j<this.locationArray[_53].length;j++){
this.locationArray[_53][j].position=null;
this.locationArray[_53][j].coordinate=null;
this.locationArray[_53][j]=null;
}
this.locationArray[_53]=null;
var _58=this.contactLineIndexes[_53];
_55=this.lineDomArray[_58];
_55.contactId=null;
var _59=_55.startColour.style.backgroundColor.replace(/\s/g,"");
this.coloursInUse[_59]=false;
this.overlayArray[_53].overlay=null;
this.overlayArray[_53]=null;
_55.avatar.src="";
_55.avatar.style.visibility="hidden";
this.widgetElement.removeChild(_55.line);
this.setDimensions(this.width);
this.fireEvent(this.RESIZE_EVENT);
if(_52[i]==this.USER_CONTACT_ID){
if(this.numberOfContacts){
for(var i=1;i<this.lineDomArray.length;i++){
this.lineDomArray[i].line.style.top=((i-1)*this.LINE_HEIGHT)+"px";
}
}
}else{
while(this.lineDomArray[_58+1]&&this.lineDomArray[_58+1].contactId){
var _5a=(this.userAdded?_58:_58-1);
var _5b=this.lineDomArray[_58+1].contactId;
var _5c=this.lineDomArray[_58];
this.lineDomArray[_58]=this.lineDomArray[_58+1];
this.lineDomArray[_58+1]=_5c;
this.lineDomArray[_58].line.style.top=(_5a*this.LINE_HEIGHT)+"px";
this.lineDomArray[_58+1].line.style.top=((_5a+1)*this.LINE_HEIGHT)+"px";
this.lineDomArray[_58].overlay.lineIndex=_58;
this.lineDomArray[_58+1].overlay.lineIndex=_58+1;
this.contactLineIndexes[_5b]=_58;
_58++;
}
}
this.contactLineIndexes[_53]=null;
this.highlightedPosition[_53]=null;
}
if(this.currentTimeArrowVisible){
if(!this.data[this.currentSecond]){
this.hideCurrentDate();
}
}
if(this.removeContactsCompletionDelegate){
this.removeContactsCompletionDelegate.invoke(_52);
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_removeContacts",ex);
}
}
function locationHistoryTimeline_contactExists(_5d){
try{
var _5e=this.SYSTEM.Contacts.getContact(_5d);
if(this.locationArray[_5e.userId]){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_contactExists",ex);
}
}
function locationHistoryTimeline_setContactRemovalDelegate(_5f){
try{
if(_5f){
this.removeContactsCompletionDelegate=_5f;
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_setContactRemovalDelegate",ex);
}
}
function locationHistoryTimeline_jumpToItem(_60,_61){
try{
var _62=this.buttonArray[_60][_61];
this.currentSecond=Math.round(_62.dataSeconds/this.timelineSecondsIncrement)*this.timelineSecondsIncrement;
this.currentSecondChange();
}
catch(ex){
jsExDebug("locationHistoryTimeline_jumpToItem",ex);
}
}
function locationHistoryTimeline_startZoom(){
try{
if(this.isEmpty()){
return;
}
this.zoomCoverDiv.style.left=this.zoomCoverMinimumLeft+"px";
this.zoomCoverDiv.style.width=(this.currentTimelineWidth/4)+"px";
this.zoomCoverMaximumLeft=this.width-(this.LINE_END_WIDTH+this.TIMELINE_PADDING+parseFloat(this.zoomCoverDiv.style.width));
this.zoomCoverDiv.style.display="block";
this.zoomCoverVisible=true;
}
catch(ex){
jsExDebug("locationHistoryTimeline_startZoom",ex);
}
}
function locationHistoryTimeline_cancelZoom(){
try{
if(!this.zoomCoverVisible){
return;
}
this.zoomCoverDiv.style.display="none";
this.zoomCoverVisible=false;
}
catch(ex){
jsExDebug("locationHistoryTimeline_cancelZoom",ex);
}
}
function locationHistoryTimeline_setScreenPosition(_63){
try{
this.screenPositionX=_63;
}
catch(ex){
jsExDebug("locationHistoryTimeline_setScreenPosition",ex);
}
}
function locationHistoryTimeline_getDateHistory(){
try{
return this.dateHistory;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getDateHistory",ex);
}
}
function locationHistoryTimeline_clearDateHistory(){
try{
for(var i=0;i<this.dateHistory.length;i++){
if(this.dateHistory[i]){
this.dateHistory[i].start=null;
this.dateHistory[i].startString=null;
this.dateHistory[i].end=null;
this.dateHistory[i].endString=null;
this.dateHistory[i]=null;
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_clearDateHistory",ex);
}
}
function locationHistoryTimeline_restoreFromDateHistory(_65){
try{
var _66=this.dateHistory[_65];
if(_66){
var _67=new Date();
var _68=new Date();
_67.setTime(_66.start*1000);
_68.setTime(_66.end*1000);
this.setEndDates(_67,_68);
for(var i=_65;i<this.dateHistory.length;i++){
if(this.dateHistory[i]){
this.dateHistory[i].start=null;
this.dateHistory[i].startString=null;
this.dateHistory[i].end=null;
this.dateHistory[i].endString=null;
this.dateHistory[i]=null;
}
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_restoreFromDateHistory",ex);
}
}
function locationHistoryTimeline_getVectorArray(){
try{
return this.buttonArray;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getVectorArray",ex);
}
}
function locationHistoryTimeline_getMinimumClusterCount(){
try{
return this.minClusterCount;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getMinimumClusterCount",ex);
}
}
function locationHistoryTimeline_getMaximumClusterCount(){
try{
return this.maxClusterCount;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getMaximumClusterCount",ex);
}
}
function locationHistoryTimeline_getHighlightedContactPositions(){
try{
var _6a=[];
for(var _6b in this.highlightedPosition){
if(this.highlightedPosition[_6b]!=null){
_6a[_6b]=this.highlightedPosition[_6b];
}
}
return _6a;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getHighlightedContactPositions",ex);
}
}
function locationHistoryTimeline_getContactIdList(){
try{
var _6c=[];
for(var id in this.contactIdArray){
if(this.contactIdArray[id]&&this.locationArray[id]&&this.buttonArray[id]){
_6c.push(this.contactIdArray[id]);
}
}
return _6c;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getContactIdList",ex);
}
}
function locationHistoryTimeline_getNumberOfContacts(){
try{
return this.numberOfContacts;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getNumberOfContacts",ex);
}
}
function locationHistoryTimeline_getStartDate(){
try{
return this.timelineStartDate;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getStartDate",ex);
}
}
function locationHistoryTimeline_getEndDate(){
try{
return this.timelineEndDate;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getEndDate",ex);
}
}
function locationHistoryTimeline_getSpeed(){
try{
return this.timer.interval;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getSpeed",ex);
}
}
function locationHistoryTimeline_isInitialised(){
try{
if(this.initialisedDrawerCount==this.initialisedDrawerTarget){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_isInitialised",ex);
}
}
function locationHistoryTimeline_checkForEmptySecond(_6e){
try{
for(var _6f in this.data[_6e]){
if(this.data[_6e][_6f]){
return;
}
}
this.data[_6e]=null;
delete this.data[_6e];
}
catch(ex){
jsExDebug("locationHistoryTimeline_checkForEmptySecond",ex);
}
}
function locationHistoryTimeline_isEmpty(){
try{
return (!this.numberOfContacts&&!this.userLoaded);
}
catch(ex){
jsExDebug("locationHistoryTimeline_isEmpty",ex);
}
}
function locationHistoryTimeline_createDivision(){
try{
var div=document.createElement("div");
div.style.position="absolute";
div.style.width="1px";
div.style.height=(4*this.LINE_HEIGHT)+"px";
div.style.backgroundColor=this.GREY;
return div;
}
catch(ex){
jsExDebug("locationHistoryTimeline_createDivision",ex);
}
}
function locationHistoryTimeline_currentSecondChange(){
try{
this.positionBar.style.left=((this.LINE_INFO_WIDTH+this.TIMELINE_PADDING)+this.currentTimelineWidth*(this.currentSecond/this.timelineTotalSeconds))+"px";
this.currentEvent=null;
var _71=this.data[this.currentSecond];
if(_71){
for(var _72 in this.buttonArray){
if(_71[_72]){
if(this.highlightedPosition[_72]!=_71[_72].position){
this.highlightedPosition[_72]=_71[_72].position;
this.currentEvent=_71;
}
}else{
if(this.highlightedPosition[_72]!=null){
var _73=this.buttonArray[_72][this.highlightedPosition[_72]].dataSeconds;
if(_73>this.currentSecond){
this.highlightedPosition[_72]=null;
}
}
}
}
this.updateCurrentDatePosition(this.currentSecond);
if(this.parentDiv){
this.showCurrentTimelineDate();
}
if(this.currentEvent){
this.fireEvent(this.SYSTEM.Event.VALUE_CHANGED_EVENT);
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_currentSecondChange",ex);
}
}
function locationHistoryTimeline_showCurrentTimelineDate(){
try{
var _74=new Date();
_74.setTime((this.timelineStartSeconds*1000)+(this.currentSecond*1000));
var _75="";
switch(_74.getDay()){
case 1:
_75+="Mon, ";
break;
case 2:
_75+="Tues, ";
break;
case 3:
_75+="Wed, ";
break;
case 4:
_75+="Thurs, ";
break;
case 5:
_75+="Fri, ";
break;
case 6:
_75+="Sat, ";
break;
case 7:
_75+="Sun, ";
break;
}
_75+=_74.getDate();
switch(_74.getMonth()){
case 0:
_75+=" Jan ";
break;
case 1:
_75+=" Feb ";
break;
case 2:
_75+=" Mar ";
break;
case 4:
_75+=" Apr ";
break;
case 4:
_75+=" May ";
break;
case 5:
_75+=" Jun ";
break;
case 6:
_75+=" Jul ";
break;
case 7:
_75+=" Aug ";
break;
case 8:
_75+=" Sep ";
break;
case 9:
_75+=" Oct ";
break;
case 10:
_75+=" Nov ";
break;
case 11:
_75+=" Dec ";
break;
}
var _76=_74.getFullYear().toString();
_75+=_76.substring(_76.length-2)+", ";
var _77=_74.getHours();
var pm=false;
if(_77>12){
pm=true;
_77-=12;
}
var _79=_74.getMinutes();
if(_79<10){
_79="0"+_79;
}
var _7a=_74.getSeconds();
if(_7a<10){
_7a="0"+_7a;
}
_75+=_77+":"+_79+":"+_7a+" "+(pm?"PM":"AM");
this.currentDateTextDiv.innerHTML="<span style=\"position: absolute; left: 5px; top: 2px;\">"+_75+"</span>";
}
catch(ex){
jsExDebug("locationHistoryTimeline_showCurrentTimelineDate",ex);
}
}
function locationHistoryTimeline_showTimelineEndDates(_7b,_7c){
try{
var _7d=_7b.getHours().toString();
_7d=(_7d.length==1?"0"+_7d:_7d);
var _7e=_7b.getMinutes().toString();
_7e=(_7e.length==1?"0"+_7e:_7e);
var _7f=_7b.getDate()+"/"+(_7b.getMonth()+1)+"/"+_7b.getFullYear()+" "+_7d+":"+_7e;
var _80=_7c.getHours().toString();
_80=(_80.length==1?"0"+_80:_80);
var _81=_7c.getMinutes().toString();
_81=(_81.length==1?"0"+_81:_81);
var _82=_7c.getDate()+"/"+(_7c.getMonth()+1)+"/"+_7c.getFullYear()+" "+_80+":"+_81;
this.startDateLabel.setText(_7f);
this.endDateLabel.setText(_82);
}
catch(ex){
jsExDebug("locationHistoryTimeline_showTimelineEndDates",ex);
}
}
function locationHistoryTimeline_getNewLineColour(){
try{
var _83=this.availableColours[this.currentColourIndex];
while(this.coloursInUse[_83]){
this.currentColourIndex++;
if(this.currentColourIndex==this.availableColours.length){
this.currentColourIndex=0;
}
_83=this.availableColours[this.currentColourIndex];
}
this.coloursInUse[_83]=true;
return _83;
}
catch(ex){
jsExDebug("locationHistoryTimeline_getNewLineColour",ex);
}
}
function locationHistoryTimeline_contactLocationHistoryCallback(_84,_85,_86){
try{
var _87=_84;
this.buttonArray[_87]=[];
this.locationArray[_87]=[];
this.highlightedPosition[_87]=null;
if(_86){
this.userLoaded=true;
}else{
this.numberOfContacts++;
}
var _88=this.contactLineIndexes[_87];
var _89=null;
if(_87==this.USER_CONTACT_ID){
_89=this.lineDomArray[0].overlay;
}else{
_89=this.lineDomArray[_88].overlay;
}
this.overlayArray[_87]={overlay:_89};
var _8a=null;
var _8b=null;
var _8c=null;
var _8d=null;
var _8e=null;
var _8f=null;
var btn=null;
var _91=null;
var _92=null;
var _93=null;
var _94=0;
var _95=parseInt((this.timelineSecondsIncrement/this.timelineTotalSeconds)*this.currentTimelineWidth)-2;
var _96=_85[0].locations;
var _97=this.getNewLineColour();
if(!_96){
_96=[];
}
for(var j=0;j<_96.length;j++){
if(!_96[j].guid){
continue;
}
if(_93){
_93.cleanUp();
}
_93=new trackingCoordinate_t();
_93.fromJSON(_96[j]);
_92=Math.round(((_93.dateFound.getTime()/1000)-this.timelineStartSeconds)/this.timelineSecondsIncrement)*this.timelineSecondsIncrement;
if(this.data[_92]&&this.data[_92][_87]){
continue;
}
_8e=_93.durationSeconds;
if(_8e){
_8f=Math.round(_8e/this.timelineSecondsIncrement)*_95;
_8f=(_8f>_95?_8f:_95);
}else{
_8f=_95;
}
btn=this.SYSTEM.Dom.createDiv("absolute",_8f,this.LINE_ITEM_HEIGHT,this.TIMELINE_PADDING+this.currentTimelineWidth*(_92/this.timelineTotalSeconds),(this.LINE_HEIGHT-this.LINE_ITEM_HEIGHT-3)/2);
btn.style.border=this.LINE_ITEM_BORDER;
btn.style.backgroundColor=_97;
btn.style.cursor="pointer";
this.SYSTEM.Event.attachEvent(btn,"onmouseover","mouseover",this.itemMouseOverEvent,this,false,_8e);
this.SYSTEM.Event.attachEvent(btn,"onmouseout","mouseout",this.itemMouseOutEvent,this,false,_8e);
this.SYSTEM.Event.attachEvent(btn,"onclick","click",this.itemClickEvent,this,false,_87+"_"+_94);
this.SYSTEM.Event.attachEvent(btn,"ondblclick","dblclick",this.itemDblClickEvent,this,true);
_89.appendChild(btn);
if(_92==0){
this.highlightedPosition[_87]=_94;
}
if(!this.data[_92]){
this.data[_92]=[];
}
this.data[_92][_87]={position:_94};
this.buttonArray[_87].push({dataSeconds:_92,position:_94,button:btn,left:parseInt(btn.style.left),duration:_8e});
this.locationArray[_87][_94]={position:_94,coordinate:_93.copy()};
_94++;
if(!this.dataSecondReference[_87]){
this.dataSecondReference[_87]=[];
}
this.dataSecondReference[_87][_92]=true;
}
var _88=this.contactLineIndexes[_87];
var _99=this.lineDomArray[_88];
_99.startColour.style.backgroundColor=_97;
_99.line.style.visibility="visible";
if(this.numberOfContacts==this.numberOfContactsAdded&&(!this.userAdded||(this.userAdded&&this.userLoaded))){
if(this.addContactsCompletionDelegate){
this.addContactsCompletionDelegate.invoke();
}
this.SYSTEM.Tooltip.hideLoading();
this.currentSecond=0;
this.currentSecondChange();
if(this.updatingFromZoomOrHistory){
this.updatingFromZoomOrHistory=false;
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_contactLocationHistoryCallback",ex);
}
}
function locationHistoryTimeline_overlayInitialised(_9a){
try{
var _9b=_9a.lineIndex;
if(this.lineDomArray[_9b]){
var _9c=this.lineDomArray[_9b].contactId;
if(!this.buttonArray[_9c]){
if(_9c==this.USER_CONTACT_ID){
this.userAdded=true;
this.getUserLocationHistory(this.locationHistoryDelegate);
for(var i=_9b+1;i<this.lineDomArray.length;i++){
if(this.lineDomArray[i].line.parentNode){
this.lineDomArray[i].line.style.top=(i*this.LINE_HEIGHT)+"px";
}
}
}else{
this.numberOfContactsAdded++;
this.SYSTEM.Contacts.getLocationHistory(this.contactIdArray[_9c],this.timelineStartDate,this.timelineEndDate,this.locationHistoryDelegate);
}
this.setDimensions(this.width);
this.fireEvent(this.RESIZE_EVENT);
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_overlayInitialised",ex);
}
}
function locationHistoryTimeline_updateCurrentDatePosition(_9e){
try{
if(_9e){
this.currentTimeArrowSeconds=_9e;
}
if(!this.currentTimeArrowSeconds){
return;
}
var _9f=(this.currentTimelineWidth*(this.currentTimeArrowSeconds/this.timelineTotalSeconds))+(this.POSITION_BAR_WIDTH/2);
var _a0=this.CURRENT_DATE_WIDTH/2;
var _a1=parseFloat(this.dateAreaDiv.style.width);
if((_9f+(this.CURRENT_DATE_ARROW_WIDTH/2))<_a0){
this.currentDateDiv.style.left="0px";
this.currentDateArrow.style.left=(_9f+(this.CURRENT_DATE_ARROW_WIDTH/2))+"px";
}else{
if((_9f+(this.CURRENT_DATE_ARROW_WIDTH/2))>(_a1-_a0)){
this.currentDateDiv.style.left=(_a1-this.CURRENT_DATE_WIDTH-1)+"px";
this.currentDateArrow.style.left=(_9f-(_a1-this.CURRENT_DATE_WIDTH)+(this.CURRENT_DATE_ARROW_WIDTH/2))+"px";
}else{
this.currentDateDiv.style.left=(_9f-_a0+this.CURRENT_DATE_ARROW_WIDTH)+"px";
this.currentDateArrow.style.left=(_a0-(this.CURRENT_DATE_ARROW_WIDTH/2))+"px";
}
}
if(!this.currentTimeArrowVisible){
this.currentDateDiv.style.display="block";
this.currentTimeArrowVisible=true;
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_updateCurrentDatePosition",ex);
}
}
function locationHistoryTimeline_hideCurrentDate(){
try{
if(this.currentTimeArrowVisible){
this.currentDateDiv.style.display="none";
this.currentTimeArrowVisible=false;
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_hideCurrentDate",ex);
}
}
function locationHistoryTimeline_updateDateHistory(_a2,_a3){
try{
var _a4=_a2.getHours().toString();
_a4=(_a4.length==1?"0"+_a4:_a4);
var _a5=_a2.getMinutes().toString();
_a5=(_a5.length==1?"0"+_a5:_a5);
var _a6=_a2.getDate()+"/"+(_a2.getMonth()+1)+"/"+_a2.getFullYear()+" "+_a4+":"+_a5;
var _a7=_a3.getHours().toString();
_a7=(_a7.length==1?"0"+_a7:_a7);
var _a8=_a3.getMinutes().toString();
_a8=(_a8.length==1?"0"+_a8:_a8);
var _a9=_a3.getDate()+"/"+(_a3.getMonth()+1)+"/"+_a3.getFullYear()+" "+_a7+":"+_a8;
this.dateHistory.push({start:this.startSeconds,end:this.startSeconds+this.totalSeconds,startString:_a6,endString:_a9});
}
catch(ex){
jsExDebug("locationHistoryTimeline_updateDateHistory",ex);
}
}
function locationHistoryTimeline_itemClickEvent(_aa,me,_ac){
try{
var _ad=_ac.split("_");
var _ae=parseInt(_ad[0]);
var _af=parseInt(_ad[1]);
var _b0=me.buttonArray[_ae][_af];
me.currentSecond=Math.round(_b0.dataSeconds/me.timelineSecondsIncrement)*me.timelineSecondsIncrement;
me.positionBar.style.left=((me.LINE_INFO_WIDTH+me.TIMELINE_PADDING)+_b0.left+(me.LINE_ITEM_WIDTH/2)+2-me.TIMELINE_PADDING-(me.POSITION_BAR_WIDTH/2))+"px";
if(me.data[me.currentSecond]){
var _b1=null;
for(var _b2 in me.buttonArray){
if(me.buttonArray[_b2]){
_b1=me.currentSecond;
while(_b1>=0){
if(me.data[_b1]&&me.data[_b1][_b2]){
break;
}else{
_b1-=me.timelineSecondsIncrement;
}
}
if(me.data[_b1]){
me.highlightedPosition[_b2]=me.data[_b1][_b2].position;
}else{
me.highlightedPosition[_b2]=null;
}
}
}
me.updateCurrentDatePosition(me.currentSecond);
me.showCurrentTimelineDate();
me.currentEvent=me.data[me.currentSecond];
me.fireEvent(me.SYSTEM.Event.VALUE_CHANGED_EVENT);
me.clickedContactId=_ae;
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_itemClickEvent",ex);
}
}
function locationHistoryTimeline_itemMouseOverEvent(_b3,me,_b5){
try{
if(_b5>0){
var _b6=(_b3.target?_b3.target:_b3.srcElement);
var _b7="seconds";
if(_b5>60){
_b5=Math.round(_b5/60);
_b7=(_b5>1?"minutes":"minute");
if(_b5>60){
_b5=Math.round(_b5/60);
_b7=(_b5>1?"hours":"hour");
}
}
me.durationDiv.innerHTML=_b5+" "+_b7;
me.durationDiv.style.width=(me.durationDiv.innerHTML.toString().length*8)+"px";
me.durationDiv.style.left=(me.LINE_INFO_WIDTH+parseFloat(_b6.style.left))+"px";
me.widgetElement.appendChild(me.durationDiv);
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_itemMouseOverEvent",ex);
}
}
function locationHistoryTimeline_itemMouseOutEvent(_b8,me,_ba){
try{
if(_ba>0){
me.widgetElement.removeChild(me.durationDiv);
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_itemMouseOutEvent",ex);
}
}
function locationHistoryTimeline_mouseMoveEvent(_bb,me){
try{
if(!me.zoomCoverVisible){
return;
}
var _bd=parseFloat(me.zoomCoverDiv.style.width);
var _be=me.SYSTEM.Event.mouseX-me.screenPositionX-(_bd/2);
if(_be<=me.zoomCoverMinimumLeft){
me.zoomCoverDiv.style.left=me.zoomCoverMinimumLeft+"px";
}else{
if(_be>=me.zoomCoverMaximumLeft){
me.zoomCoverDiv.style.left=me.zoomCoverMaximumLeft+"px";
}else{
me.zoomCoverDiv.style.left=_be+"px";
}
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_mouseMoveEvent",ex);
}
}
function locationHistoryTimeline_zoomCoverClickEvent(_bf,me){
try{
var _c1=parseFloat(me.zoomCoverDiv.style.left)-me.zoomCoverMinimumLeft;
var _c2=parseFloat(me.zoomCoverDiv.style.width);
var _c3=_c1/me.currentTimelineWidth;
var _c4=(_c1+_c2)/me.currentTimelineWidth;
var _c5=me.startSeconds+(me.totalSeconds*_c3);
var _c6=me.startSeconds+(me.totalSeconds*_c4);
var _c7=new Date();
_c7.setTime(_c5*1000);
var _c8=new Date();
_c8.setTime(_c6*1000);
me.zoomCoverDiv.style.display="none";
me.zoomCoverVisible=false;
me.updatingFromZoomOrHistory=true;
me.setEndDates(_c7,_c8);
me.fireEvent(me.ZOOM_COMPLETE_EVENT);
}
catch(ex){
jsExDebug("locationHistoryTimeline_zoomCoverClickEvent",ex);
}
}
function locationHistoryTimeline_mouseScrollEvent(_c9,_ca,me){
try{
if(me.zoomCoverVisible){
var _cc=me.ZOOM_COVER_SIZE_CHANGE*_ca;
var _cd=parseFloat(me.zoomCoverDiv.style.left)-(_cc/2);
var _ce=parseFloat(me.zoomCoverDiv.style.width)+_cc;
if(_ce<me.ZOOM_COVER_MIN_WIDTH){
_ce=me.ZOOM_COVER_MIN_WIDTH;
_cd=parseFloat(me.zoomCoverDiv.style.left);
}else{
if(_ce>=me.currentTimelineWidth){
_ce=me.currentTimelineWidth;
}
}
me.zoomCoverMaximumLeft=me.width-(me.LINE_END_WIDTH+me.TIMELINE_PADDING+_ce);
if(_cd<=me.zoomCoverMinimumLeft){
_cd=me.zoomCoverMinimumLeft;
}else{
if(_cd>=me.zoomCoverMaximumLeft){
_cd=me.zoomCoverMaximumLeft;
}
}
me.zoomCoverDiv.style.left=_cd+"px";
me.zoomCoverDiv.style.width=_ce+"px";
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_mouseScrollUpEvent",ex);
}
}
function locationHistoryTimeline_itemDblClickEvent(_cf,me){
try{
if(me.clickedContactId&&me.currentEvent){
me.currentDblClickData=me.locationArray[me.clickedContactId][me.currentEvent[me.clickedContactId].position];
me.fireEvent(me.SYSTEM.Event.DOUBLE_CLICK_EVENT);
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_itemDblClickEvent",ex);
}
}
function locationHistoryTimeline_timerCallback(me){
try{
if(me.currentSecond<=me.timelineTotalSeconds){
me.currentSecondChange();
me.currentSecond+=me.timelineSecondsIncrement;
}else{
me.timer.stop();
me.fireEvent(me.TIMER_FINISHED_EVENT);
me.currentSecond=me.timelineTotalSeconds;
}
}
catch(ex){
jsExDebug("locationHistoryTimeline_timerCallback",ex);
}
}
function locationHistoryTimeline_addBtnClickEvent(){
try{
this.fireEvent(this.ADD_USER_EVENT);
}
catch(ex){
jsExDebug("locationHistoryTimeline_addBtnClickEvent",ex);
}
}
function locationHistoryTimeline_removeBtnClickEvent(_d2,_d3){
try{
this.removeContacts([this.contactIdArray[_d3.getValue()]]);
}
catch(ex){
jsExDebug("locationHistoryTimeline_removeBtnClickEvent",ex);
}
}

try{
trackingEnclosureList_t.prototype=new peepelObject_t();
trackingEnclosureList_t.prototype.constructor=trackingEnclosureList_t;
trackingEnclosureList_t.prototype.cleanUp=trackingEnclosureList_cleanUp;
trackingEnclosureList_t.prototype.trackingEnclosureList_super=peepelObject_t.prototype.constructor;
trackingEnclosureList_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
trackingEnclosureList_t.prototype.getUrlsByLocationGuid=trackingEnclosureList_getUrlsByLocationGuid;
trackingEnclosureList_t.prototype.getEnclosureCopy=trackingEnclosureList_getEnclosureCopy;
}
catch(ex){
jsExDebug("trackingEnclosureList_t.prototype",ex);
}
function trackingEnclosureList_t(_1,_2){
try{
this.trackingEnclosureList_super();
this.byId=[];
this.idsByLocationGuid=[];
this.count=0;
if(_1){
var _3=_1.getElementsByTagName("Enclosure");
for(var i=0;i<_3.length;i++){
var _5={};
_5.id=getNodeValue(_3[i],"Id");
_5.url=getNodeValue(_3[i],"Url");
_5.mime=getNodeValue(_3[i],"Mime");
_5.guid=getNodeValue(_3[i],"Location");
this.byId[_5.id]=_5;
if(_5.guid){
if(!this.idsByLocationGuid[_5.guid]){
this.idsByLocationGuid[_5.guid]=[];
}
this.idsByLocationGuid[_5.guid].push(_5.id);
}
this.count++;
}
}else{
if(_2){
for(var i=0;i<_2.length;i++){
var _5={};
_5.id=_2[i].id;
_5.url=_2[i].url;
_5.mime=_2[i].mime;
_5.guid=_2[i].location;
this.byId[_5.id]=_5;
if(_5.guid){
if(!this.idsByLocationGuid[_5.guid]){
this.idsByLocationGuid[_5.guid]=[];
}
this.idsByLocationGuid[_5.guid].push(_5.id);
}
this.count++;
}
}
}
}
catch(ex){
jsExDebug("trackingEnclosureList_t",ex);
}
}
function trackingEnclosureList_cleanUp(me){
try{
if(!me){
me=this;
}
for(var id in me.byId){
me.byId[id].id=null;
me.byId[id].url=null;
me.byId[id].mime=null;
var _8=me.byId[id].guid;
if(me.idsByLocationGuid[_8]){
for(var i=0;i<me.idsByLocationGuid[_8].length;i++){
me.idsByLocationGuid[_8][i]=null;
}
me.idsByLocationGuid[_8]=null;
}
me.byId[id].guid=null;
me.byId[id]=null;
}
me.byId=null;
me.idsByLocationGuid=null;
me.count=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("trackingEnclosureList_cleanUp",ex);
}
}
function trackingEnclosureList_getUrlsByLocationGuid(_a){
try{
var _b=[];
var _c=this.idsByLocationGuid[_a];
if(_c){
for(var i=0;i<_c.length;i++){
_b.push(this.byId[_c[i]].url);
}
}
return _b;
}
catch(ex){
jsExDebug("trackingEnclosureList_getUrlsByLocationGuid",ex);
}
}
function trackingEnclosureList_getEnclosureCopy(id){
try{
if(this.byId[id]){
var _f={};
_f.id=this.byId[id].id;
_f.url=this.byId[id].url;
_f.mime=this.byId[id].mime;
_f.guid=this.byId[id].guid;
return _f;
}
return null;
}
catch(ex){
jsExDebug("trackingEnclosureList_getEnclosureCopy",ex);
}
}

try{
tracking_t.prototype=new actionListener_t();
tracking_t.prototype.constructor=tracking_t;
tracking_t.prototype.cleanUp=tracking_cleanUp;
tracking_t.prototype.tracking_super=actionListener_t.prototype.constructor;
tracking_t.prototype.actionListener_cleanUp=actionListener_t.prototype.cleanUp;
tracking_t.prototype.addUser=tracking_addUser;
tracking_t.prototype.removeUser=tracking_removeUser;
tracking_t.prototype.updateUser=tracking_updateUser;
tracking_t.prototype.getMyLocation=tracking_getMyLocation;
tracking_t.prototype.getUserLocation=tracking_getUserLocation;
tracking_t.prototype.getUserPublicLocation=tracking_getUserPublicLocation;
tracking_t.prototype.getPublicUserIds=tracking_getPublicUserIds;
tracking_t.prototype.sendLocation=tracking_sendLocation;
tracking_t.prototype.capture=tracking_capture;
tracking_t.prototype.restore=tracking_restore;
tracking_t.prototype.reset=tracking_reset;
tracking_t.prototype.mapOpen=tracking_mapOpen;
tracking_t.prototype.mapClosed=tracking_mapClosed;
tracking_t.prototype.networkStatusChanged=tracking_networkStatusChanged;
tracking_t.prototype.debug=tracking_debug;
tracking_t.prototype.newLocationCallback=tracking_newLocationCallback;
tracking_t.prototype.TIMER_INTERVAL=600000;
tracking_t.prototype.TIMER_INTERVAL_MAP_OPEN=5000;
tracking_t.prototype.USER_ID=-1;
tracking_t.prototype.MAX_REQUEST_LEVEL=100;
tracking_t.prototype.ACTION_GET_USER_LOCATION=2;
tracking_t.prototype.ACTION_GET_MEDIA_LOCATION=15;
tracking_t.prototype.ACTION_GET_ALL_CONTACT_AND_USER_LOCATION=16;
tracking_t.prototype.ACTION_GET_USER_PUBLIC_LOCATION=17;
tracking_t.prototype.ACTION_SEND_LOCATION=22;
tracking_t.prototype.ACTION_USER_LOCATION_UPDATE=-1;
}
catch(ex){
jsExDebug("tracking_t.prototype",ex);
}
function tracking_t(_1){
try{
this.tracking_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.networkObjectIndex=this.SYSTEM.Network.registerNetworkObject(this);
this.locations=[];
this.lastCheckTime=getUTCMilliseconds(new Date());
this.openMapCount=0;
this.requestLevel=0;
this.enabled=true;
this.interval=this.TIMER_INTERVAL;
this.initialised=false;
this.initialisationDelegate=_1;
this.addUser(this.USER_ID);
this.notifierIndex=this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.TRACK_NEW_LOCATION,new this.SYSTEM.Delegate(this,this.newLocationCallback,[0]));
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.TRACK_NEW_MEDIA,new this.SYSTEM.Delegate(this,this.newLocationCallback,[0]),this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.TRACK_NEW_PUB_LOCATION,new this.SYSTEM.Delegate(this,this.newLocationCallback,[0]),this.notifierIndex);
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.TRACK_NEW_PUB_MEDIA,new this.SYSTEM.Delegate(this,this.newLocationCallback,[0]),this.notifierIndex);
}
catch(ex){
jsExDebug("tracking_t",ex);
}
}
function tracking_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.SYSTEM.Network){
me.SYSTEM.Network.unRegisterNetworkObject(me.networkObjectIndex);
me.networkObjectIndex=null;
}
if(me.SYSTEM.Notifier){
me.SYSTEM.Notifier.unregisterActionListener(me.notifierIndex);
me.notifierIndex=null;
}
for(var id in me.locations){
me.removeUser(id);
}
me.locations=null;
me.initialisationDelegate=null;
me.lastCheckTime=null;
me.initialised=null;
me.requestLevel=null;
me.interval=null;
me.openMapCount=null;
me.actionListener_cleanUp();
}
catch(ex){
jsExDebug("tracking_cleanUp",ex);
}
}
function tracking_addUser(id,_5){
try{
if(this.locations[id]){
return;
}
this.locations[id]={coordinate:new trackingCoordinate_t(),isPublicUser:_5,ignoreList:[]};
}
catch(ex){
jsExDebug("tracking_addUser",ex);
}
}
function tracking_removeUser(id){
try{
if(this.locations[id]){
this.locations[id].coordinate.cleanUp();
this.locations[id].coordinate=null;
for(var _7 in this.locations[id].ignoreList){
this.locations[id].ignoreList[_7]=null;
}
this.locations[id].ignoreList=null;
this.locations[id].isPublicUser=null;
this.locations[id]=null;
delete this.locations[id];
}
}
catch(ex){
jsExDebug("tracking_removeUser",ex);
}
}
function tracking_updateUser(id,_9){
try{
if(this.locations[id]){
var _a=this.locations[id].coordinate;
if(_9.guid!=_a.guid){
_a.fromJSON(_9);
this.invokeActionListeners(this.ACTION_USER_LOCATION_UPDATE,id);
}
}
}
catch(ex){
jsExDebug("tracking_updateUser",ex);
}
}
function tracking_getMyLocation(){
try{
if(this.SYSTEM.UserDetails.isLegalTrackingAge()){
return this.getUserLocation(this.USER_ID);
}
}
catch(ex){
jsExDebug("tracking_getMyLocation",ex);
}
}
function tracking_getUserLocation(_b){
try{
if(this.SYSTEM.UserDetails.isLegalTrackingAge()){
if(this.locations[_b]&&this.locations[_b].coordinate&&parseInt(this.locations[_b].coordinate.guid)){
return this.locations[_b].coordinate.copy();
}else{
return null;
}
}else{
if(this.SYSTEM.Contacts.getContactIdFromUserId(_b)==null){
if(this.locations[_b]&&this.locations[_b].coordinate&&parseInt(this.locations[_b].coordinate.guid)){
return this.locations[_b].coordinate.copy();
}else{
return null;
}
}
}
}
catch(ex){
jsExDebug("tracking_getUserLocation",ex);
}
}
function tracking_getUserPublicLocation(_c,_d){
function JSONResponse(_e){
try{
if(_d&&_e[0]&&_e[0].userId){
var _f=_e[0].userId;
this.addUser(_f,true);
this.updateUser(_f,_e[0].enclosedlocation.location);
if(_d){
_d.invoke(_f,_c,_e[0].username,_e[0].accuracy,_e[0].avatar);
}
}
}
catch(ex){
jsExDebug("tracking_getUserPublicLocation: JSONResponse",ex);
}
}
try{
this.SYSTEM.Network.JSONRequest(this.SYSTEM.Network.SERVICES_PATH+"?service=tracking&action="+this.ACTION_GET_USER_PUBLIC_LOCATION,"username="+_c,JSONResponse,this);
}
catch(ex){
jsExDebug("tracking_getUserPublicLocation",ex);
}
}
function tracking_getPublicUserIds(){
try{
var ids=[];
for(var id in this.locations){
if(this.locations[id].isPublicUser){
ids.push(id);
}
}
return ids;
}
catch(ex){
jsExDebug("tracking_getPublicUserIds",ex);
}
}
function tracking_sendLocation(_12,_13){
function response(xml,me){
try{
if(_13){
_13.invoke(getNodeValue(xml,"success")=="0");
}
}
catch(ex){
jsExDebug("tracking_sendLocation: tracking_sendLocation",ex);
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=tracking&action="+this.ACTION_SEND_LOCATION,"email="+_12.join(),response,this);
}
catch(ex){
jsExDebug("tracking_sendLocation",ex);
}
}
function tracking_capture(){
try{
}
catch(ex){
jsExDebug("tracking_capture",ex);
}
}
function tracking_restore(_16){
try{
}
catch(ex){
jsExDebug("tracking_restore",ex);
}
}
function tracking_reset(){
try{
for(var id in this.locations){
this.removeUser(id);
}
this.locations=[];
this.lastCheckTime=getUTCMilliseconds(new Date());
this.addUser(this.USER_ID);
}
catch(ex){
jsExDebug("tracking_reset",ex);
}
}
function tracking_mapOpen(){
try{
if(!this.openMapCount){
}
this.openMapCount++;
}
catch(ex){
jsExDebug("tracking_mapOpen",ex);
}
}
function tracking_mapClosed(){
try{
this.openMapCount--;
if(!this.openMapCount){
}
}
catch(ex){
jsExDebug("tracking_mapClosed",ex);
}
}
function tracking_networkStatusChanged(_18){
try{
switch(_18){
case this.SYSTEM.Network.OFFLINE:
break;
case this.SYSTEM.Network.ONLINE:
break;
default:
jsDebug("tracking_networkStatusChanged: unknown network status");
break;
}
}
catch(ex){
jsExDebug("tracking_networkStatusChanged",ex);
}
}
function tracking_debug(_19){
try{
}
catch(ex){
jsExDebug("tracking_debug",ex);
}
}
function tracking_newLocationCallback(_1a){
try{
if(this.SYSTEM.UserDetails.isLegalTrackingAge()){
var _1b=URLDecode(_1a).split("\r\n")[0];
_1b=_1b.replace(/\+/g," ");
var _1c=eval("["+_1b+"]");
if(_1c[0]&&_1c[0].meta){
var _1d=null;
var _1e=_1c[0].meta;
try{
var _1f=eval("v={"+_1e+"}");
_1d=_1f.user;
}
catch(ex){
var _20=_1e.match(/\"user\":\d+/);
if(_20&&_20[0]){
_1d=_20[0].split(":")[1];
}else{
jsDebug("bad meta: "+_1e);
}
}
if(_1d){
if(_1d==this.SYSTEM.UserDetails.id){
_1d=this.USER_ID;
}
this.updateUser(_1d,_1c[0]);
}
}
}
}
catch(ex){
jsExDebug("tracking_newLocationCallback",ex);
}
}

try{
peepelPoints_t.prototype=new actionListener_t();
peepelPoints_t.prototype.constructor=peepelPoints_t;
peepelPoints_t.prototype.cleanUp=peepelPoints_cleanUp;
peepelPoints_t.prototype.peepelPoints_super=actionListener_t.prototype.constructor;
peepelPoints_t.prototype.actionListener_cleanUp=actionListener_t.prototype.cleanUp;
peepelPoints_t.prototype.populate=peepelPoints_populate;
peepelPoints_t.prototype.refresh=peepelPoints_refresh;
peepelPoints_t.prototype.getPeepelPoints=peepelPoints_getPeepelPoints;
peepelPoints_t.prototype.populateCallback=peepelPoints_populateCallback;
peepelPoints_t.prototype.addPeepelPoint=peepelPoints_addPeepelPoint;
peepelPoints_t.prototype.deletePeepelPoint=peepelPoints_deletePeepelPoint;
peepelPoints_t.prototype.updatePeepelPoint=peepelPoints_updatePeepelPoint;
peepelPoints_t.prototype.getPointFromName=peepelPoints_getPointFromName;
peepelPoints_t.prototype.getPointFromLocationId=peepelPoints_getPointFromLocationId;
peepelPoints_t.prototype.getPointNameFromLocationId=peepelPoints_getPointNameFromLocationId;
peepelPoints_t.prototype.findPublicPoints=peepelPoints_findPublicPoints;
peepelPoints_t.prototype.getContactSharedPoints=peepelPoints_getContactSharedPoints;
peepelPoints_t.prototype.getPrivacyText=peepelPoints_getPrivacyText;
peepelPoints_t.prototype.getSharedPointsWithinBox=peepelPoints_getSharedPointsWithinBox;
peepelPoints_t.prototype.moderatePoint=peepelPoints_moderatePoint;
peepelPoints_t.prototype.getNearestPoint=peepelPoints_getNearestPoint;
peepelPoints_t.prototype.addNotificationCallback=peepelPoints_addNotificationCallback;
peepelPoints_t.prototype.deleteNotificationCallback=peepelPoints_deleteNotificationCallback;
peepelPoints_t.prototype.ACTION_ADD=1;
peepelPoints_t.prototype.ACTION_READ=2;
peepelPoints_t.prototype.ACTION_DELETE=3;
peepelPoints_t.prototype.ACTION_UPDATE=4;
peepelPoints_t.prototype.ACTION_SEARCH_PUBLIC_POINTS=5;
peepelPoints_t.prototype.ACTION_GET_SHARED_POINTS=6;
peepelPoints_t.prototype.ACTION_GET_PUBLIC_POINTS_IN_BOX=7;
peepelPoints_t.prototype.ACTION_MODERATE_POINT=8;
peepelPoints_t.prototype.SERVICE_URL="peepel_services.php?service=peepelpoint";
peepelPoints_t.prototype.PRIVACY_PRIVATE=0;
peepelPoints_t.prototype.PRIVACY_SHARED=1;
peepelPoints_t.prototype.PRIVACY_PUBLIC=2;
peepelPoints_t.prototype.MAX_CHARS_NAME=100;
peepelPoints_t.prototype.MAX_CHARS_DESCRIPTION=2000;
peepelPoints_t.prototype.MAX_CHARS_TAGS=2000;
}
catch(ex){
jsExDebug("peepelPoints_t",ex);
}
function peepelPoints_t(_1){
try{
this.peepelPoints_super();
this.peepelPointArray=[];
this.refreshing=false;
this.initialised=false;
this.initialisationDelegate=_1;
this.notifierIndex=this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.PEEPELPOINT_ADD,new this.SYSTEM.Delegate(this,this.addNotificationCallback));
this.SYSTEM.Notifier.registerActionListener(this.SYSTEM.Notifier.PEEPELPOINT_DELETE,new this.SYSTEM.Delegate(this,this.deleteNotificationCallback),this.notifierIndex);
this.refreshing=true;
if(NO_API){
return;
}
this.populate();
}
catch(ex){
jsExDebug("peepelPoints_t",ex);
}
}
function peepelPoints_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.Notifier){
me.SYSTEM.Notifier.unregisterActionListener(me.notifierIndex);
me.notifierIndex=null;
}
for(var i=0;i<me.peepelPointArray[i];i++){
if(me.peepelPointArray[i]){
me.peepelPointArray[i].cleanUp();
me.peepelPointArray[i]=null;
delete me.peepelPointArray[i];
}
}
me.peepelPointArray=null;
me.refreshing=null;
me.initialised=null;
if(me==SYSTEM.PeepelPoints){
SYSTEM.PeepelPoints=null;
}
me.actionListener_cleanUp();
}
catch(ex){
jsExDebug("peepelPoints_cleanUp",ex);
}
}
function peepelPoints_populate(){
try{
this.SYSTEM.Network.JSONRequest(this.SERVICE_URL+"&action="+this.ACTION_READ,null,this.populateCallback,this);
}
catch(ex){
jsExDebug("peepelPoints_getPeepelPointsWithFolderByName",ex);
}
}
function peepelPoints_getPeepelPoints(){
try{
var _4=[];
for(var i=0;i<this.peepelPointArray.length;i++){
if(this.peepelPointArray[i]){
_4.push(this.peepelPointArray[i]);
}
}
return _4;
}
catch(ex){
jsExDebug("peepelPoints_getPeepelPoints",ex);
}
}
function peepelPoints_refresh(){
try{
if(this.refreshing){
return;
}
this.refreshing=true;
for(var i=0;i<this.peepelPointArray[i];i++){
if(this.peepelPointArray[i]){
this.peepelPointArray[i].cleanUp();
this.peepelPointArray[i]=null;
delete this.peepelPointArray[i];
}
}
this.peepelPointArray=[];
this.populate();
}
catch(ex){
jsExDebug("peepelPoints_refresh",ex);
}
}
function peepelPoints_populateCallback(_7){
try{
if(_7&&_7[0]){
if(_7[0].point){
var _8=_7[0].point;
for(var i=0;i<_8.length;i++){
peepelPoint=new peepelPoint_t();
peepelPoint.fromJSON(_8[i]);
this.peepelPointArray.push(peepelPoint);
}
}
}
this.invokeActionListeners(this.ACTION_READ);
this.refreshing=false;
if(!this.initialised){
this.initialised=true;
if(this.initialisationDelegate){
this.initialisationDelegate.invoke();
this.initialisationDelegate.cleanUp();
this.initialisationDelegate=null;
}
}
}
catch(ex){
jsExDebug("peepelPoints_populateCallback",ex);
}
}
function peepelPoints_addPeepelPoint(_a,_b,_c,_d,_e,_f){
function responseCallback(xml,me){
try{
if(xml.getElementsByTagName("success")[0]){
var _12=xml.getElementsByTagName("locid")[0];
if(_12){
var _13=new peepelPoint_t(_12.firstChild.nodeValue,_14,_b,_c,_d,_e);
me.peepelPointArray.push(_13);
me.invokeActionListeners(me.ACTION_ADD,_13);
if(_f){
_f.invoke(_13);
}
}
}
}
catch(ex){
jsExDebug("peepelPoints_addPeepelPoint: responseCallback",ex);
}
}
try{
if(_b&&_b.length>this.MAX_CHARS_NAME){
_b=_b.substr(0,this.MAX_CHARS_NAME);
}
if(_c&&_c.length>this.MAX_CHARS_DESCRIPTION){
_c=_c.substr(0,this.MAX_CHARS_DESCRIPTION);
}
if(_d&&_d.length>this.MAX_CHARS_TAGS){
_d=_d.substr(0,this.MAX_CHARS_TAGS);
}
var _14=_a.copy();
var _15="action="+this.ACTION_ADD+"&x="+_a.mercX+"&y="+_a.mercY+"&name="+_b.replace(/\&/g,"%__AMP__%")+"&zoom="+_a.zoom+"&description="+(_c?_c:"")+"&tags="+(_d?_d:"")+"&privacy="+(_e!=null?_e:this.PRIVACY_PRIVATE);
this.SYSTEM.Network.request(this.SERVICE_URL,_15,responseCallback,this);
}
catch(ex){
jsExDebug("peepelPoints_addPeepelPoint",ex);
}
}
function peepelPoints_deletePeepelPoint(_16){
function response(xml,me){
try{
if(xml&&xml.getElementsByTagName("success")[0]){
var _19=null;
var _1a=null;
for(var i in me.peepelPointArray){
if(me.peepelPointArray[i]&&me.peepelPointArray[i].locationId==_16){
me.peepelPointArray[i].cleanUp();
me.peepelPointArray[i]=null;
delete me.peepelPointArray[i];
break;
}
}
me.invokeActionListeners(me.ACTION_DELETE,parseInt(_16));
}
}
catch(ex){
jsExDebug("peepelPoints_deletePeepelPoint: response",ex);
}
}
try{
this.SYSTEM.Network.request(this.SERVICE_URL,"action="+this.ACTION_DELETE+"&locid="+_16,response,this);
}
catch(ex){
jsExDebug("peepelPoints_deletePeepelPoint",ex);
}
}
function peepelPoints_updatePeepelPoint(_1c,_1d,_1e,_1f,_20,_21,_22){
function response(xml,me){
try{
if(xml.getElementsByTagName("success")[0]){
var _25=xml.getElementsByTagName("locid")[0];
if(_25){
var _26=null;
var _27=null;
var _28=parseInt(_25.firstChild.nodeValue);
var _29=new mapCoordinate_t(y,x,1);
_29.setZoom(_2c);
var _2d=null;
for(var i in me.peepelPointArray){
if(me.peepelPointArray[i]&&me.peepelPointArray[i].locationId==_1c){
_2d=me.peepelPointArray[i];
_2d.update(_28,_29,_1e,_1f,_20,_21);
break;
}
}
if(_22){
_22.invoke(_2d);
}
me.invokeActionListeners(me.ACTION_UPDATE,_2d,_1c);
}
}
}
catch(ex){
jsExDebug("peepelPoints_updatePeepelPoint: response",ex);
}
}
try{
var x=_1d.mercX;
var y=_1d.mercY;
var _2c=_1d.zoom;
if(_1e&&_1e.length>this.MAX_CHARS_NAME){
_1e=_1e.substr(0,this.MAX_CHARS_NAME);
}
if(_1f&&_1f.length>this.MAX_CHARS_DESCRIPTION){
_1f=_1f.substr(0,this.MAX_CHARS_DESCRIPTION);
}
if(_20&&_20.length>this.MAX_CHARS_TAGS){
_20=_20.substr(0,this.MAX_CHARS_TAGS);
}
this.SYSTEM.Network.request(this.SERVICE_URL,"action="+this.ACTION_UPDATE+"&locid="+_1c+"&x="+x+"&y="+y+"&name="+_1e.replace(/\&/g,"%__AMP__%")+"&zoom="+_2c+"&description="+(_1f?_1f:"")+"&tags="+(_20?_20:"")+"&privacy="+(_21!=null?_21:this.PRIVACY_PRIVATE),response,this);
}
catch(ex){
jsExDebug("peepePoints_updatePeepelPoint",ex);
}
}
function peepelPoints_addNotificationCallback(_2f){
function refreshCallback(){
try{
var _30=this.getPointFromLocationId(_2f);
this.invokeActionListeners(this.ACTION_ADD,_30);
}
catch(ex){
jsExDebug("peepelPoints_addNotificationCallback: refreshCallback",ex);
}
}
try{
_2f=parseInt(_2f);
var _31=this.getPointFromLocationId(_2f);
if(_31){
}else{
this.refresh(new this.SYSTEM.Delegate(this,refreshCallback));
}
}
catch(ex){
jsExDebug("peepelPoints_addNotificationCallback",ex);
}
}
function peepelPoints_deleteNotificationCallback(_32){
function refreshCallback(){
try{
this.invokeActionListeners(this.ACTION_DELETE,parseInt(_32));
}
catch(ex){
jsExDebug("peepelPoints_addNotificationCallback: refreshCallback",ex);
}
}
try{
this.refresh(new this.SYSTEM.Delegate(this,refreshCallback));
}
catch(ex){
jsExDebug("peepelPoints_deleteNotificationCallback",ex);
}
}
function peepelPoints_getPointFromName(_33){
try{
var _34=new RegExp("^s*"+_33+"s*$");
for(var i=0;i<this.peepelPointArray.length;i++){
if(this.peepelPointArray[i]&&this.peepelPointArray[i].name.match(_34)){
return this.peepelPointArray[i];
}
}
return null;
}
catch(ex){
jsExDebug("peepelPoints_getPointFromName",ex);
}
}
function peepelPoints_getPointFromLocationId(_36){
try{
for(var i=0;i<this.peepelPointArray.length;i++){
if(this.peepelPointArray[i]&&this.peepelPointArray[i].locationId==_36){
return this.peepelPointArray[i];
}
}
return null;
}
catch(ex){
jsExDebug("peepelPoints_getPointFromLocationId",ex);
}
}
function peepelPoints_getPointNameFromLocationId(_38){
try{
for(var i=0;i<this.peepelPointArray.length;i++){
if(this.peepelPointArray[i]&&this.peepelPointArray[i].locationId==_38){
return this.peepelPointArray[i].name;
}
}
return "";
}
catch(ex){
jsExDebug("peepelPoints_getPointNameFromLocationId",ex);
}
}
function peepelPoints_findPublicPoints(_3a,_3b){
function response(_3c){
try{
if(_3c&&_3c[0]){
_3b.invoke(_3c[0].point);
}else{
_3b.invoke(false);
}
}
catch(ex){
jsExDebug("peepelPoints_findPublicPoints",ex);
}
}
try{
this.SYSTEM.Network.JSONRequest(this.SERVICE_URL,"action="+this.ACTION_SEARCH_PUBLIC_POINTS+"&keyword="+_3a.toLowerCase(),response,this);
}
catch(ex){
jsExDebug("peepelPoints_findPublicPoints",ex);
}
}
function peepelPoints_getContactSharedPoints(_3d,_3e){
function response(_3f){
try{
if(_3f&&_3f[0]){
var _40=_3f[0].point;
var _41=[];
if(_40){
for(var i=0;i<_40.length;i++){
peepelPoint=new peepelPoint_t();
peepelPoint.fromJSON(_40[i]);
_41.push(peepelPoint);
}
}
_3e.invoke(_41);
}else{
_3e.invoke(false);
}
}
catch(ex){
jsExDebug("peepelPoints_getContactSharedPoints: response",ex);
}
}
try{
this.SYSTEM.Network.JSONRequest(this.SERVICE_URL,"action="+this.ACTION_GET_SHARED_POINTS+"&contactid="+_3d,response,this);
}
catch(ex){
jsExDebug("peepelPoints_getContactSharedPoints",ex);
}
}
function peepelPoints_getPrivacyText(_43){
try{
switch(_43){
case this.PRIVACY_PRIVATE:
return "Private";
case this.PRIVACY_SHARED:
return "Friends";
case this.PRIVACY_PUBLIC:
return "Public";
}
}
catch(ex){
jsExDebug("peepelPoints_getPrivacyText",ex);
}
}
function peepelPoints_getSharedPointsWithinBox(_44,_45){
function response(_46){
try{
if(_45){
if(_46&&_46[0]){
var _47=_46[0].point;
var _48=[];
if(_47){
for(var i=0;i<_47.length;i++){
peepelPoint=new peepelPoint_t();
peepelPoint.fromJSON(_47[i]);
_48.push(peepelPoint);
}
}
_45.invoke(_48);
}else{
_45.invoke(false);
}
}
}
catch(ex){
jsExDebug("peepelPoints_getSharedPointsWithinBox: response",ex);
}
}
try{
this.SYSTEM.Network.JSONRequest(this.SERVICE_URL,"action="+this.ACTION_GET_PUBLIC_POINTS_IN_BOX+"&x="+_44.topLeft.mercX+","+_44.bottomRight.mercX+"&y="+_44.topLeft.mercY+","+_44.bottomRight.mercY,response,this);
}
catch(ex){
jsExDebug("peepelPoints_getSharedPointsWithinBox",ex);
}
}
function peepelPoints_moderatePoint(_4a,_4b,_4c,_4d){
function response(_4e){
try{
if(_4d){
_4d.invoke(_4e===true);
}
}
catch(ex){
jsExDebug("peepelPoints_moderatePoint: response",ex);
}
}
try{
this.SYSTEM.Network.JSONRequest(this.SERVICE_URL,["action=",this.ACTION_MODERATE_POINT,"&locid=",_4a,"&reason=",_4b,"&name=",_4c].join(""),response,this);
}
catch(ex){
jsExDebug("peepelPoints_moderatePoint",ex);
}
}
function peepelPoints_getNearestPoint(_4f){
try{
var _50=null;
var _51=null;
var _52=null;
for(var i=0;i<this.peepelPointArray.length;i++){
_52=getDistance(_4f,this.peepelPointArray[i].coordinate);
if(_50==null||_52<_50){
_50=_52;
_51=this.peepelPointArray[i];
}
}
return _51;
}
catch(ex){
jsExDebug("peepelPoints_getNearestPoint",ex);
}
}

try{
peepelPoint_t.prototype=new peepelObject_t();
peepelPoint_t.prototype.constructor=peepelPoint_t;
peepelPoint_t.prototype.cleanUp=peepelPoint_cleanUp;
peepelPoint_t.prototype.peepelPoint_super=peepelObject_t.prototype.constructor;
peepelPoint_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
peepelPoint_t.prototype.getId=peepelPoint_getId;
peepelPoint_t.prototype.getZoomLevel=peepelPoint_getZoomLevel;
peepelPoint_t.prototype.getPrivacyText=peepelPoint_getPrivacyText;
peepelPoint_t.prototype.match=peepelPoint_match;
peepelPoint_t.prototype.fromJSON=peepelPoint_fromJSON;
peepelPoint_t.prototype.update=peepelPoint_update;
}
catch(ex){
jsExDebug("peepelPoint_t.prototype",ex);
}
function peepelPoint_t(_1,_2,_3,_4,_5,_6){
try{
this.peepelPoint_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.locationId=_1;
this.name=_3;
this.coordinate=_2;
if(this.coordinate){
this.coordinate.makeReusable();
}
this.description=(_4?_4:"");
this.privacy=_6;
_5=(_5?URLDecode(_5.replace(/^0=/,"")):"");
this.tags=_5;
}
catch(ex){
jsExDebug("peepelPoint_t",ex);
}
}
function peepelPoint_cleanUp(me){
try{
if(!me){
var me=this;
}
me.locationId=null;
me.name=null;
if(me.coordinate.cleanUpIndex){
me.coordinate.cleanUp();
me.coordinate=null;
}
me.description=null;
me.privacy=null;
me.tags=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("peepelPoint_cleanUp",ex);
}
}
function peepelPoint_getId(){
try{
return this.locationId;
}
catch(ex){
jsExDebug("peepelPoint_getId",ex);
}
}
function peepelPoint_getZoomLevel(){
try{
return this.coordinate.zoom;
}
catch(ex){
jsExDebug("peepelPoint_getZoomLevel",ex);
}
}
function peepelPoint_getPrivacyText(){
try{
switch(this.privacy){
case this.SYSTEM.PeepelPoints.PRIVACY_PRIVATE:
return "Private";
break;
case this.SYSTEM.PeepelPoints.PRIVACY_SHARED:
return "Friends";
break;
case this.SYSTEM.PeepelPoints.PRIVACY_PUBLIC:
return "Public";
break;
}
return "";
}
catch(ex){
jsExDebug("peepelPoint_getPrivacyText",ex);
}
}
function peepelPoint_match(_8){
try{
var _9=this.tags.toLowerCase().replace(/,/," ")+" "+this.description.toLowerCase();
return _9.match(_8);
}
catch(ex){
jsExDebug("peepelPoint_match",ex);
}
}
function peepelPoint_fromJSON(_a){
try{
this.locationId=_a.id;
this.name=_a.label;
this.coordinate=new mapCoordinate_t(_a.y,_a.x,1);
this.coordinate.setZoom(_a.zoom);
this.description=(_a.description?_a.description:"");
this.privacy=_a.privacy;
this.tags=(_a.tags?URLDecode(_a.tags.replace(/^0=/,"")):"");
}
catch(ex){
jsExDebug("peepelPoint_fromJSON",ex);
}
}
function peepelPoint_update(_b,_c,_d,_e,_f,_10){
try{
this.locationId=_b;
this.name=_d;
this.coordinate.cleanUp();
this.coordinate=_c;
this.description=(_e?_e:"");
this.privacy=_10;
this.tags=(_f?URLDecode(_f.replace(/^0=/,"")):"");
}
catch(ex){
jsExDebug("peepelPoint_update",ex);
}
}

try{
tile_t.prototype=new peepelObject_t();
tile_t.prototype.constructor=tile_t;
tile_t.prototype.cleanUp=tile_cleanUp;
tile_t.prototype.tile_super=peepelObject_t.prototype.constructor;
tile_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
tile_t.prototype.onloadEventHandler=tile_onloadEventHandler;
tile_t.prototype.errorEventHandler=tile_errorEventHandler;
tile_t.prototype.createDom=tile_createDom;
tile_t.prototype.attach=tile_attach;
tile_t.prototype.detach=tile_detach;
tile_t.prototype.show=tile_show;
tile_t.prototype.hide=tile_hide;
tile_t.prototype.setPosition=tile_setPosition;
tile_t.prototype.getPosition=tile_getPosition;
tile_t.prototype.movePosition=tile_movePosition;
tile_t.prototype.incrementPosition=tile_movePosition;
tile_t.prototype.decrementPosition=tile_decrementPosition;
tile_t.prototype.incrementDimensions=tile_incrementDimensions;
tile_t.prototype.setDimensions=tile_setDimensions;
tile_t.prototype.resetDimensions=tile_resetDimensions;
tile_t.prototype.setSource=tile_setSource;
tile_t.prototype.getSource=tile_getSource;
tile_t.prototype.setPositionInformation=tile_setPositionInformation;
tile_t.prototype.getPositionInformation=tile_getPositionInformation;
tile_t.prototype.TILE_WIDTH=256;
tile_t.prototype.TILE_HEIGHT=256;
tile_t.prototype.ERROR_TILE_SRC="img/app/app/map/nodata.png";
tile_t.prototype.WATER_TILE_SRC="water.png";
tile_t.prototype.WRAP_WORLD=false;
}
catch(ex){
jsExDebug("tile_t:prototype",ex);
}
function tile_t(_1){
try{
this.tile_super();
this.positionX=0;
this.positionY=0;
this.width=this.TILE_WIDTH;
this.height=this.TILE_HEIGHT;
this.hasNegativeTileset=false;
this.isDBTile=_1;
this.createDom();
this.SYSTEM.Event.attachEvent(this.domElement,"onload","load",this.onloadEventHandler,this);
if(!this.isDBTile){
if(!this.SYSTEM.Environment.userAgentIsIE()){
this.SYSTEM.Event.attachEvent(this.domElement,"onerror","error",this.errorEventHandler,this);
}
}
}
catch(ex){
jsExDebug("tile_t",ex);
}
}
function tile_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.domElement,"onload","load");
if(!me.isDBTile){
if(!me.SYSTEM.Environment.userAgentIsIE()){
me.SYSTEM.Event.detachEvent(me.domElement,"onerror","error");
}
}
me.positionX=null;
me.positionY=null;
me.width=null;
me.height=null;
me.hasNegativeTileset=null;
me.parent=null;
me.SYSTEM.Dom.freeDom(me.domElement);
me.domElement=null;
me.positionInformation=null;
me.source=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("tile_cleanUp",ex);
}
}
function tile_attach(_3){
try{
this.parent=_3;
_3.appendChild(this.domElement);
}
catch(ex){
jsExDebug("tile_attach",ex);
}
}
function tile_detach(){
try{
this.parent.removeChild(this.domElement);
}
catch(ex){
jsExDebug("tile_detach",ex);
}
}
function tile_show(){
try{
this.domElement.style.visibility="visible";
this.domElement.style.opacity="1";
this.domElement.style.filter="alpha( opacity=100)";
}
catch(ex){
jsExDebug("tile_show",ex);
}
}
function tile_hide(){
try{
this.domElement.style.visibility="hidden";
this.domElement.style.opacity="0";
this.domElement.style.filter="alpha( opacity=0)";
}
catch(ex){
jsExDebug("tile_hide",ex);
}
}
function tile_setPosition(x,y){
try{
this.positionX=(x===null)?this.positionX:x;
this.positionY=(y===null)?this.positionY:y;
this.domElement.style.left=Math.floor(this.positionX)+"px";
this.domElement.style.top=Math.floor(this.positionY)+"px";
}
catch(ex){
jsExDebug("tile_setPosition",ex);
}
}
function tile_getPosition(){
try{
return {x:this.positionX,y:this.positionY};
}
catch(ex){
jsExDebug("tile_getPosition",ex);
}
}
function tile_movePosition(x,y){
try{
this.positionX+=x;
this.positionY+=y;
this.domElement.style.left=Math.floor(this.positionX)+"px";
this.domElement.style.top=Math.floor(this.positionY)+"px";
}
catch(ex){
jsExDebug("tile_movePosition",ex);
}
}
function tile_decrementPosition(x,y){
try{
this.positionX-=x;
this.positionY-=y;
this.domElement.style.left=Math.floor(this.positionX)+"px";
this.domElement.style.top=Math.floor(this.positionY)+"px";
}
catch(ex){
jsExDebug("tile_decrementPosition",ex);
}
}
function tile_resetDimensions(){
try{
this.width=this.TILE_WIDTH;
this.height=this.TILE_HEIGHT;
this.domElement.style.width=this.width+"px";
this.domElement.style.height=this.height+"px";
}
catch(ex){
jsExDebug("tile_resetDimensions",ex);
}
}
function tile_incrementDimensions(_a,_b){
try{
this.width+=_a;
this.height+=_b;
this.domElement.style.width=this.width+"px";
this.domElement.style.height=this.height+"px";
}
catch(ex){
jsExDebug("tile_incrementDimensions",ex);
}
}
function tile_setDimensions(_c,_d){
try{
this.width=_c;
this.height=_d;
this.domElement.style.width=this.width+"px";
this.domElement.style.height=this.height+"px";
}
catch(ex){
jsExDebug("tile_setDimensions",ex);
}
}
function tile_setPositionInformation(_e,_f,_10,_11,_12){
try{
if(this.WRAP_WORLD){
if(_12<6){
if(_10>=Math.pow(2,_12)){
_10-=Math.pow(2,_12);
}
}
}
if(_e<0||_f<0){
this.hasNegativeTileset=true;
}else{
this.hasNegativeTileset=false;
}
this.positionInformation={tilesetX:_e,tilesetY:_f,tileX:_10,tileY:_11,zoom:_12};
var _13=["zoom: ",_12,"; tsx:",_e,"; tsy:",_f,"; tx:",_10,"; ty:",_11].join("");
this.domElement.alt=_13;
}
catch(ex){
jsExDebug("tile_setPositionInformation",ex);
}
}
function tile_getPositionInformation(){
try{
return this.positionInformation;
}
catch(ex){
jsExDebug("tile_getPositionInformation",ex);
}
}
function tile_setSource(_14){
try{
if(this.hasNegativeTileset&&!this.isDBTile){
_14=this.ERROR_TILE_SRC;
}else{
if(_14.isObj){
_14=[map_t.prototype.LIVE_RENDER_PATH,"?a=",_14.style,"&b=",_14.zoom,"&c=",_14.tX,"&d=",_14.tY,"&e=",_14.tileId].join("");
}
}
this.source=_14;
if(this.SYSTEM.Environment.userAgentIsIE()){
this.hide();
}
this.domElement.src=_14;
}
catch(ex){
jsExDebug("tile_setSource",ex);
}
}
function tile_getSource(){
try{
return this.source;
}
catch(ex){
jsExDebug("tile_getSource",ex);
}
}
function tile_onloadEventHandler(_15,me){
try{
me.show();
}
catch(ex){
jsExDebug("tile_onloadEventHandler",ex);
}
}
function tile_errorEventHandler(_17,me){
try{
me.setSource(me.ERROR_TILE_SRC);
}
catch(ex){
jsExDebug("tile_errorEventHandler",ex);
}
}
function tile_createDom(){
try{
this.domElement=this.SYSTEM.Dom.createElement("img",null,this.width,this.height,this.positionX,this.positionY);
}
catch(ex){
jsExDebug("tile_createElement",ex);
}
}

try{
mapCoordinate_t.prototype=new peepelObject_t();
mapCoordinate_t.prototype.constructor=mapCoordinate_t;
mapCoordinate_t.prototype.cleanUp=mapCoordinate_cleanUp;
mapCoordinate_t.prototype.mapCoordinate_super=peepelObject_t.prototype.constructor;
mapCoordinate_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
mapCoordinate_t.prototype.calculateCartesian=mapCoordinate_calculateCartesian;
mapCoordinate_t.prototype.copy=mapCoordinate_copy;
mapCoordinate_t.prototype.setCoordinates=mapCoordinate_setCoordinates;
mapCoordinate_t.prototype.setZoom=mapCoordinate_setZoom;
mapCoordinate_t.prototype.setCartesian=mapCoordinate_setCartesian;
mapCoordinate_t.prototype.getMercatorCoordinates=mapCoordinate_getMercatorCoordinates;
mapCoordinate_t.prototype.getDecimalCoordinates=mapCoordinate_getDecimalCoordinates;
mapCoordinate_t.prototype.getTileset=mapCoordinate_getTileset;
mapCoordinate_t.prototype.getTile=mapCoordinate_getTile;
mapCoordinate_t.prototype.getPixel=mapCoordinate_getPixel;
mapCoordinate_t.prototype.toString=mapCoordinate_toString;
mapCoordinate_t.prototype.toHumanString=mapCoordinate_toHumanString;
mapCoordinate_t.prototype.fromString=mapCoordinate_fromString;
mapCoordinate_t.prototype.makeReusable=mapCoordinate_makeReusable;
mapCoordinate_t.prototype.COORD_DECIMAL_DEGREES=0;
mapCoordinate_t.prototype.COORD_MERCATOR=1;
}
catch(ex){
jsExDebug("mapCoordinate_t:prototype",ex);
}
function mapCoordinate_t(_1,_2,_3){
try{
this.mapCoordinate_super();
if(_1==null||_2==null){
return;
}
this.zoom=0;
this.dontCleanUp=false;
this.setCoordinates(_1,_2,_3);
}
catch(ex){
jsExDebug("mapCoordinate_t",ex);
}
}
function mapCoordinate_cleanUp(me){
try{
if(!me){
me=this;
}
me.mercX=null;
me.mercY=null;
me.decimalX=null;
me.decimalY=null;
me.zoom=null;
me.needsCalculation=null;
me.isReusable=null;
if(me.tileSetPosition){
me.tileSetPosition.x=null;
me.tileSetPosition.y=null;
me.tileSetPosition=null;
}
if(me.tilePositionInTileset){
me.tilePositionInTileset.x=null;
me.tilePositionInTileset.y=null;
me.tilePositionInTileset=null;
}
if(me.pixelPositionOnTile){
me.pixelPositionOnTile.x=null;
me.pixelPositionOnTile.y=null;
me.pixelPositionOnTile=null;
}
me.dontCleanUp=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("mapCoordinate_cleanUp",ex);
}
}
function mapCoordinate_setCoordinates(_5,_6,_7){
try{
if(isNaN(_5)||isNaN(_6)){
jsDebugText("mapCoordinate_setCoordinates: Bad coords - "+_5+","+_6);
return;
}
if(_7){
this.mercX=Math.round(_6);
this.mercY=Math.round(_5);
}else{
this.decimalX=_6;
this.decimalY=_5;
}
this.needsCalculation=true;
}
catch(ex){
jsExDebug("mapCoordinate_setCoordinates",ex);
}
}
function mapCoordinate_setZoom(_8){
try{
if(_8!=this.zoom){
this.zoom=_8;
this.needsCalculation=true;
}
}
catch(ex){
jsExDebug("mapCoordinate_setCoordinates",ex);
}
}
function mapCoordinate_calculateCartesian(_9){
try{
if(this.zoom==_9&&!this.needsCalculation){
return;
}
if(!isNaN(_9)){
this.zoom=_9;
}
if(isNaN(this.mercX)||isNaN(this.mercY)){
if(isNaN(this.decimalX)||isNaN(this.decimalY)){
jsDebugText("mapCoordinate_calculateCartesian - No coordinates have been set.");
return;
}
this.mercX=Math.round(convertDecimalLongitudeToMercator(this.decimalX));
this.mercY=Math.round(convertDecimalLatitudeToMercator(this.decimalY));
}
var _a=convertMercatorLongitudeToPixels(this.mercX,this.zoom);
var _b=convertMercatorLatitudeToPixels(this.mercY,this.zoom);
var _c=Math.floor(_a/16384);
var _d=(_a%16384);
var _e=Math.floor(_b/16384);
var _f=(_b%16384);
this.tileSetPosition={x:_c,y:_e};
var _10=Math.floor(_d/256);
var _11=Math.floor(_f/256);
this.tilePositionInTileset={x:_10,y:_11};
var _12=_d%256;
var _13=_f%256;
this.pixelPositionOnTile={x:_12,y:_13};
this.needsCalculation=false;
}
catch(ex){
jsExDebug("mapCoordinate_calculateCartesian",ex);
}
}
function mapCoordinate_setCartesian(_14,_15,_16,_17){
try{
var _18=convertTilePositionToPixels(_14,_15,_16,_17,0,0);
this.mercX=convertPixelLongitudeToMercator(_18.x,this.zoom);
this.mercY=convertPixelLatitudeToMercator(_18.y,this.zoom);
this.needsCalculation=true;
}
catch(ex){
jsExDebug("mapCoordinate_setCartesian",ex);
}
}
function mapCoordinate_getMercatorCoordinates(_19){
try{
if(_19!=false){
this.calculateCartesian(_19);
}
return {x:this.mercX,y:this.mercY};
}
catch(ex){
jsExDebug("mapCoordinate_getMercatorCoordinates",ex);
}
}
function mapCoordinate_getDecimalCoordinates(){
try{
if(isNaN(this.decimalX)||isNaN(this.decimalY)){
if(isNaN(this.mercX)||isNaN(this.mercY)){
jsExDebug("mapCoordinate_getDecimalCoordinates","No coordinates have been set.");
return;
}
this.decimalX=convertMercatorLongitudeToDecimal(this.mercX);
this.decimalY=convertMercatorLatitudeToDecimal(this.mercY);
}
return {x:this.decimalX,y:this.decimalY};
}
catch(ex){
jsExDebug("mapCoordinate_getDecimalCoordinates",ex);
}
}
function mapCoordinate_getTileset(_1a){
try{
this.calculateCartesian(_1a);
return this.tileSetPosition;
}
catch(ex){
jsExDebug("mapCoordinate_getTileset",ex);
}
}
function mapCoordinate_getTile(_1b){
try{
this.calculateCartesian(_1b);
return this.tilePositionInTileset;
}
catch(ex){
jsExDebug("mapCoordinate_getTile",ex);
}
}
function mapCoordinate_getPixel(_1c){
try{
this.calculateCartesian(_1c);
return this.pixelPositionOnTile;
}
catch(ex){
jsExDebug("mapCoordinate_getPixel",ex);
}
}
function mapCoordinate_copy(){
try{
this.calculateCartesian(this.zoom);
var _1d=new mapCoordinate_t(this.mercY,this.mercX,this.COORD_MERCATOR);
_1d.setZoom(this.zoom+0);
_1d.decimalX=this.decimalX;
_1d.decimalY=this.decimalY;
if(this.tileSetPosition){
_1d.tileSetPosition={x:(this.tileSetPosition.x+0),y:(this.tileSetPosition.y+0)};
}
if(this.pixelPositionOnTile){
_1d.pixelPositionOnTile={x:(this.pixelPositionOnTile.x+0),y:(this.pixelPositionOnTile.y+0)};
}
if(this.tilePositionInTileset){
_1d.tilePositionInTileset={x:(this.tilePositionInTileset.x+0),y:(this.tilePositionInTileset.y+0)};
}
_1d.needsCalculation=false;
return _1d;
}
catch(ex){
jsExDebug("mapCoordinate_copy",ex);
}
}
function mapCoordinate_toString(){
try{
return ""+Math.round(this.mercY)+","+Math.round(this.mercX)+","+this.zoom;
}
catch(ex){
jsExDebug("mapCoordinate_toString",ex);
}
return "";
}
function mapCoordinate_toHumanString(){
try{
var _1e=this.getDecimalCoordinates();
return ""+_1e.y.toFixed(4)+","+_1e.x.toFixed(4)+","+this.zoom;
}
catch(ex){
jsExDebug("mapCoordinate_toHumanString",ex);
}
return "";
}
function mapCoordinate_fromString(_1f){
try{
var _20=_1f.split(",");
var y=_20[0];
var x=_20[1];
var z=_20[2];
if(isNaN(x)||isNaN(y)){
return false;
}
this.setCoordinates(parseFloat(y),parseFloat(x),1);
if(isNaN(z)){
this.setZoom(0);
}else{
this.setZoom(parseInt(z));
}
return true;
}
catch(ex){
jsExDebug("mapCoordinate_fromString",ex);
}
}
function mapCoordinate_makeReusable(){
try{
}
catch(ex){
jsExDebug("mapCoordinate_makeReusable",ex);
}
}

try{
trackingCoordinate_t.prototype=new mapCoordinate_t();
trackingCoordinate_t.prototype.constructor=trackingCoordinate_t;
trackingCoordinate_t.prototype.trackingCoordinate_super=mapCoordinate_t.prototype.constructor;
trackingCoordinate_t.prototype.cleanUp=trackingCoordinate_cleanUp;
trackingCoordinate_t.prototype.mapCoordinate_cleanUp=mapCoordinate_t.prototype.cleanUp;
trackingCoordinate_t.prototype.fromXML=trackingCoordinate_fromXML;
trackingCoordinate_t.prototype.fromJSON=trackingCoordinate_fromJSON;
trackingCoordinate_t.prototype.setImageURL=trackingCoordinate_setImageURL;
trackingCoordinate_t.prototype.toString=trackingCoordinate_toString;
trackingCoordinate_t.prototype.mapCoordinate_copy=mapCoordinate_t.prototype.copy;
trackingCoordinate_t.prototype.copy=trackingCoordinate_copy;
}
catch(ex){
jsExDebug("trackingCoordinate_t:prototype",ex);
}
function trackingCoordinate_t(_1,_2,_3,_4,_5,_6){
try{
this.trackingCoordinate_super(_1,_2,1);
this.dateFound=_3;
this.confidencePercentage=(_4?_4:0);
this.locationMethod=(_6?_6:"");
this.imageURL=[];
this.commentText="";
this.placeLabel=null;
this.durationSeconds=0;
this.significantPoints=[];
this.guid=null;
}
catch(ex){
jsExDebug("trackingCoordinate_t",ex);
}
}
function trackingCoordinate_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.cleanUpIndex==null){
jsDebugText("trackingCoordinate_t double cleanUp: "+trackingCoordinate_cleanUp.caller.toString().split("function ")[1].split("(")[0]);
return;
}
me.guid=null;
me.dateFound=null;
me.confidencePercentage=null;
me.locationMethod=null;
me.placeLabel=null;
for(var i in me.imageURL){
me.imageURL[i]=null;
}
me.imageURL=null;
me.commentText=null;
me.durationSeconds=null;
for(var i=0;i<me.significantPoints.length;i++){
me.significantPoints[i]=null;
}
me.significantPoints=null;
me.mapCoordinate_cleanUp();
}
catch(ex){
jsExDebug("trackingCoordinate_cleanUp",ex);
}
}
function trackingCoordinate_fromXML(_9){
try{
if(!_9||!_9.getElementsByTagName("Guid")[0]){
return false;
}
var _a=getNodeValue(_9,"Date");
if(_a==NO_LOCATION_DATE_STRING){
return false;
}
this.guid=getNodeValue(_9,"Guid");
this.setCoordinates(parseInt(getNodeValue(_9,"Y")),parseInt(getNodeValue(_9,"X")),this.COORD_MERCATOR);
this.confidencePercentage=parseFloat(getNodeValue(_9,"Confidence"));
this.locationMethod=getNodeValue(_9,"Type");
this.durationSeconds=getNodeValue(_9,"Duration");
this.placeLabel=getNodeValue(_9,"Place");
var _b=getNodeValue(_9,"Enclosure");
if(_b){
this.imageURL.push(_b);
}
this.commentText=getNodeValue(_9,"Comment");
this.dateFound=getDateObjectFromUTCString(_a);
return true;
}
catch(ex){
jsExDebug("trackingCoordinate_fromXML",ex);
}
}
function trackingCoordinate_fromJSON(_c){
try{
if(!_c||!_c.guid||!_c.date){
return false;
}
this.guid=_c.guid;
this.setCoordinates(_c.y,_c.x,this.COORD_MERCATOR);
this.confidencePercentage=_c.confidence;
this.locationMethod=_c.type;
this.placeLabel=_c.label;
this.durationSeconds=_c.duration;
this.commentText=_c.comment;
this.dateFound=_c.date;
this.significantPoints=[];
try{
var _d=eval("v={"+_c.meta+"}");
for(var i=_d.significantpoints.length-1;i>=0;i--){
this.significantPoints.push(_d.significantpoints[i]);
}
}
catch(ex){
}
this.setImageURL([]);
if(_c.enclosures){
for(var i=0;i<_c.enclosures.length;i++){
this.imageURL.push(_c.enclosures[i].url);
}
}
return true;
}
catch(ex){
jsExDebug("trackingCoordinate_fromJSON",ex);
}
}
function trackingCoordinate_setImageURL(_f){
try{
this.imageURL=_f;
}
catch(ex){
jsExDebug("trackingCoordinate_setImageURL",ex);
}
}
function trackingCoordinate_toString(){
try{
return ""+Math.round(this.mercY)+","+Math.round(this.mercX)+","+this.zoom+","+this.guid;
}
catch(ex){
jsExDebug("trackingCoordinate_toString",ex);
}
}
function trackingCoordinate_copy(){
try{
this.calculateCartesian(this.zoom);
var _10=new trackingCoordinate_t(this.mercY,this.mercX,this.COORD_MERCATOR);
_10.setZoom(this.zoom);
_10.decimalX=this.decimalX;
_10.decimalY=this.decimalY;
if(this.tileSetPosition){
_10.tileSetPosition={x:(this.tileSetPosition.x+0),y:(this.tileSetPosition.y+0)};
}
if(this.pixelPositionOnTile){
_10.pixelPositionOnTile={x:(this.pixelPositionOnTile.x+0),y:(this.pixelPositionOnTile.y+0)};
}
if(this.tilePositionInTileset){
_10.tilePositionInTileset={x:(this.tilePositionInTileset.x+0),y:(this.tilePositionInTileset.y+0)};
}
_10.needsCalculation=false;
_10.dateFound=this.dateFound;
_10.confidencePercentage=this.confidencePercentage;
_10.placeLabel=this.placeLabel;
_10.locationMethod=this.locationMethod;
_10.imageURL=copyArray(this.imageURL);
_10.commentText=this.commentText;
_10.durationSeconds=this.durationSeconds;
_10.guid=this.guid;
for(var i=0;i<this.imageURL.length;i++){
_10.imageURL.push(this.imageURL[i]);
}
for(var i=0;i<this.significantPoints.length;i++){
_10.significantPoints.push(this.significantPoints[i]);
}
return _10;
}
catch(ex){
jsExDebug("trackingCoordinate_copy",ex);
}
}

try{
mapBoundary_t.prototype=new peepelObject_t();
mapBoundary_t.prototype.constructor=mapBoundary_t;
mapBoundary_t.prototype.cleanUp=mapBoundary_cleanUp;
mapBoundary_t.prototype.mapBoundary_super=peepelObject_t.prototype.constructor;
mapBoundary_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
mapBoundary_t.prototype.copy=mapBoundary_copy;
mapBoundary_t.prototype.setCoordinates=mapBoundary_setCoordinates;
mapBoundary_t.prototype.loadCoordinates=mapBoundary_loadCoordinates;
mapBoundary_t.prototype.setZoom=mapBoundary_setZoom;
mapBoundary_t.prototype.getMercatorCoordinates=mapBoundary_getMercatorCoordinates;
mapBoundary_t.prototype.getDecimalCoordinates=mapBoundary_getDecimalCoordinates;
mapBoundary_t.prototype.getBottomRightCoordinate=mapBoundary_getBottomRightCoordinate;
mapBoundary_t.prototype.getTopLeftCoordinate=mapBoundary_getTopLeftCoordinate;
mapBoundary_t.prototype.getNorthEast=mapBoundary_getNorthEast;
mapBoundary_t.prototype.getSouthWest=mapBoundary_getSouthWest;
mapBoundary_t.prototype.getSize=mapBoundary_getSize;
mapBoundary_t.prototype.toString=mapBoundary_toString;
mapBoundary_t.prototype.toHumanString=mapBoundary_toHumanString;
mapBoundary_t.prototype.fromString=mapBoundary_fromString;
mapBoundary_t.prototype.COORD_DECIMAL_DEGREES=0;
mapBoundary_t.prototype.COORD_MERCATOR=1;
}
catch(ex){
jsExDebug("mapBoundary_t:prototype",ex);
}
function mapBoundary_t(_1,_2,_3,_4,_5,_6){
try{
this.mapBoundary_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
if(arguments.length<4){
return;
}
this.setCoordinates(_1,_2,_3,_4,_5);
if(_6!=null){
this.setZoom(_6);
}
}
catch(ex){
jsExDebug("mapBoundary_t",ex);
}
}
function mapBoundary_cleanUp(me){
try{
if(!me){
me=this;
}
me.zoom=null;
if(me.topLeft){
me.topLeft.cleanUp();
me.topLeft=null;
}
if(me.bottomRight){
me.bottomRight.cleanUp();
me.bottomRight=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("mapBoundary_cleanUp",ex);
}
}
function mapBoundary_setCoordinates(_8,_9,_a,_b,_c){
try{
if(_8<=_9){
if(_a>=_b){
this.topLeft=new mapCoordinate_t(_a,_8,_c);
this.bottomRight=new mapCoordinate_t(_b,_9,_c);
}else{
this.topLeft=new mapCoordinate_t(_b,_8,_c);
this.bottomRight=new mapCoordinate_t(_a,_9,_c);
}
}else{
if(_a>=_b){
this.topLeft=new mapCoordinate_t(_a,_9,_c);
this.bottomRight=new mapCoordinate_t(_b,_8,_c);
}else{
this.topLeft=new mapCoordinate_t(_b,_9,_c);
this.bottomRight=new mapCoordinate_t(_a,_8,_c);
}
}
}
catch(ex){
jsExDebug("mapBoundary_setCoordinates",ex);
}
}
function mapBoundary_loadCoordinates(_d,_e){
try{
this.topLeft=_d;
this.bottomRight=_e;
}
catch(ex){
jsExDebug("mapBoundary_setCoordinates",ex);
}
}
function mapBoundary_setZoom(_f){
try{
if(_f!=this.zoom){
this.zoom=_f;
this.topLeft.setZoom(_f);
this.bottomRight.setZoom(_f);
}
}
catch(ex){
jsExDebug("mapBoundary_setCoordinates",ex);
}
}
function mapBoundary_copy(){
try{
this.topLeft.calculateCartesian(this.zoom);
this.bottomRight.calculateCartesian(this.zoom);
var _10=this.topLeft.mercX+0;
var top=this.topLeft.mercY+0;
var _12=this.bottomRight.mercX+0;
var _13=this.bottomRight.mercY+0;
var _14=new mapBoundary_t(_10,_12,top,_13,this.COORD_MERCATOR);
_14.setZoom(this.zoom+0);
}
catch(ex){
jsExDebug("mapBoundary_copy",ex);
}
}
function mapBoundary_getTopLeftCoordinate(_15){
try{
if(!isNaN(_15)){
this.topLeft.setZoom(_15);
}
return this.topLeft;
}
catch(ex){
jsExDebug("mapBoundary_getTopLeftCoordinate",ex);
}
}
function mapBoundary_getBottomRightCoordinate(_16){
try{
if(!isNaN(_16)){
this.bottomRight.setZoom(_16);
}
return this.bottomRight;
}
catch(ex){
jsExDebug("mapBoundary_getBottomRightCoordinate",ex);
}
}
function mapBoundary_getNorthEast(_17){
try{
var _18;
if(isNaN(_17)){
_18=this.zoom+0;
}else{
_18=_17+0;
}
var _19=new mapCoordinate_t(this.topLeft.mercY,this.bottomRight.mercX,this.COORD_MERCATOR);
_19.setZoom(_18);
return _19;
}
catch(ex){
jsExDebug("mapBoundary_getNorthEast",ex);
}
}
function mapBoundary_getSouthWest(_1a){
try{
var _1b;
if(isNaN(_1a)){
_1b=this.zoom+0;
}else{
_1b=_1a+0;
}
var _1c=new mapCoordinate_t(this.bottomRight.mercY,this.topLeft.mercX,this.COORD_MERCATOR);
_1c.setZoom(_1b);
return northEast;
}
catch(ex){
jsExDebug("mapBoundary_getSouthWest",ex);
}
}
function mapBoundary_getMercatorCoordinates(_1d){
try{
var _1e;
var _1f;
if(isNaN(_1d)){
_1e=this.topLeft.getMercatorCoordinates(this.zoom);
_1f=this.bottomRight.getMercatorCoordinates(this.zoom);
}else{
_1e=this.topLeft.getMercatorCoordinates(_1d);
_1f=this.bottomRight.getMercatorCoordinates(_1d);
}
return {left:_1e.x,right:_1f.x,top:_1e.y,bottom:_1f.y};
}
catch(ex){
jsExDebug("mapBoundary_getMercatorCoordinates",ex);
}
}
function mapBoundary_getDecimalCoordinates(_20){
try{
var _21;
var _22;
if(isNaN(_20)){
_21=this.topLeft.getDecimalCoordinates(this.zoom);
_22=this.bottomRight.getDecimalCoordinates(this.zoom);
}else{
_21=this.topLeft.getDecimalCoordinates(_20);
_22=this.bottomRight.getDecimalCoordinates(_20);
}
return {left:_21.x,right:_22.x,top:_21.y,bottom:_22.y};
}
catch(ex){
jsExDebug("mapBoundary_getDecimalCoordinates",ex);
}
}
function mapBoundary_getSize(){
try{
var _23=this.bottomRight.mercX-this.topLeft.mercX;
var _24=this.topLeft.mercY-this.bottomRight.mercY;
return {width:_23,height:_24};
}
catch(ex){
jsExDebug("mapBoundary_getSize",ex);
}
}
function mapBoundary_toString(){
try{
if(!this.topLeft||!this.bottomRight||isNaN(this.topLeft.mercX)||isNaN(this.bottomRight.mercX)){
return "---";
}
return ""+this.topLeft.toString()+"|"+this.bottomRight.toString();
}
catch(ex){
jsExDebug("mapBoundary_toString",ex);
}
return "---";
}
function mapBoundary_toHumanString(){
try{
if(!this.topLeft||!this.bottomRight||isNaN(this.topLeft.mercX)||isNaN(this.bottomRight.mercX)){
return "---";
}
return ""+this.topLeft.toHumanString()+"|"+this.bottomRight.toHumanString();
}
catch(ex){
jsExDebug("mapBoundary_toHumanString",ex);
}
return "---";
}
function mapBoundary_fromString(_25){
try{
var _26=_25.split("|");
var _27=_26[0];
var _27=_26[1];
this.topLeft=new mapCoordinate_t();
this.bottomRight=new mapCoordinate_t();
if(!this.topLeft.fromString(_27)){
return false;
}
if(!this.bottomRight.fromString(coord2)){
return false;
}
return true;
}
catch(ex){
jsExDebug("mapBoundary_fromString",ex);
}
}

try{
tileset_t.prototype=new mapBoundary_t();
tileset_t.prototype.tileset_super=mapBoundary_t.prototype.constructor;
tileset_t.prototype.mapBoundary_cleanUp=mapBoundary_t.prototype.cleanUp;
tileset_t.prototype.constructor=tileset_t;
tileset_t.prototype.cleanUp=tileset_cleanUp;
tileset_t.prototype.loadByMercator=tileset_loadByMercator;
tileset_t.prototype.loadByTilesetCoordinates=tileset_loadByTilesetCoordinates;
tileset_t.prototype.getTileAtMerc=tileset_getTileAtMerc;
tileset_t.prototype.getMercatorByTile=tileset_getMercatorByTile;
tileset_t.prototype.TILESET_WIDTH=64;
tileset_t.prototype.TILESET_HEIGHT=64;
tileset_t.prototype.TILE_WIDTH=256;
tileset_t.prototype.TILE_HEIGHT=256;
tileset_t.prototype.WRAP_WORLD=false;
}
catch(ex){
jsExDebug("tileset_t:prototype",ex);
}
function tileset_t(_1){
try{
this.tileset_super();
this.map=_1;
this.map.tilesetsToCleanUp.push(this);
}
catch(ex){
jsExDebug("tileset_t",ex);
}
}
function tileset_cleanUp(me){
try{
if(!me){
me=this;
}
me.map=null;
me.zoom=null;
me.mercWidth=null;
me.mercHeight=null;
me.poiList=null;
me.mapList=null;
me.tilesetX=null;
me.tilesetY=null;
me.mapBoundary_cleanUp();
}
catch(ex){
jsExDebug("tileset_cleanUp",ex);
}
}
function tileset_loadByMercator(x,y,_5){
try{
this.zoom=_5;
var _6=convertMercatorLongitudeToPixels(x,_5);
var _7=convertMercatorLatitudeToPixels(y,_5);
var _8=((256*Math.pow(2,this.zoom)));
var _9=Math.floor(_6/16384);
var _a=Math.floor(_7/16384);
if(_6<-_8){
_9=-1;
}
if(_7>_8){
_9=-1;
}
if(!this.loadByTilesetCoordinates(_9,_a,_5)){
return false;
}
}
catch(ex){
jsExDebug("tileset_loadByMercator",ex);
}
}
function tileset_loadByTilesetCoordinates(x,y,_d){
try{
this.zoom=_d;
if(this.WRAP_WORLD){
if(_d<7){
x=0;
y=0;
}else{
var _e=Math.pow(2,(_d-6))-1;
if(x<0){
x=_e;
}else{
if(x>_e){
x-=_e;
}
}
}
}
if(x<0){
x=-1;
}
if(y<0){
y=-1;
}
var _f=((256*Math.pow(2,_d))/2);
var _10=false;
if(_d<6){
_d=6;
_10=true;
}
this.tilesetX=x;
this.tilesetY=y;
var _11=((0-_f)+(x*16384));
var _12=(_f-(y*16384));
var _13=convertPixelLongitudeToMercator(_11,_d);
var _14=convertPixelLongitudeToMercator((_11+16384),_d);
var _15=convertPixelLatitudeToMercator(_12,_d);
var _16=convertPixelLatitudeToMercator((_12-16384),_d);
if(_10){
_14=_13+((_14-_13)*Math.pow(2,6-this.zoom));
_16=_15-((_15-_16)*Math.pow(2,6-this.zoom));
}
this.setCoordinates(_13,_14,_15,_16,1);
this.mercWidth=_14-_13;
this.mercHeight=_15-_16;
}
catch(ex){
jsExDebug("tileset_loadByTilesetCoordinates",ex);
}
return true;
}
function tileset_getMercatorByTile(_17,_18,_19,_1a){
try{
if(_19==null){
_19=0;
}
if(_1a==null){
_1a=0;
}
var _1b=((256*Math.pow(2,this.zoom))/2);
if(this.tilesetX<0){
_17-=63;
_19-=255;
}
if(this.tilesetY<0){
_18-=63;
_1a-=255;
}
var x=((this.tilesetX*16384)+(_17*this.TILE_WIDTH)+_19)-_1b;
var y=0-((this.tilesetY*16384)+(_18*this.TILE_HEIGHT)+_1a)+_1b;
x=convertPixelLongitudeToMercator(x,this.zoom);
y=convertPixelLatitudeToMercator(y,this.zoom);
return {x:x,y:y};
}
catch(ex){
jsExDebug("tileset_getMercatorByTile",ex);
}
}
function tileset_getTileAtMerc(_1e,_1f){
try{
var _20=convertMercatorLongitudeToPixels(_1e,this.zoom);
var _21=convertMercatorLatitudeToPixels(_1f,this.zoom);
var _22=(_20%16384);
var _23=(_21%16384);
var _24=Math.floor(_22/this.TILE_WIDTH);
var _25=Math.floor(_23/this.TILE_WIDTH);
var _26=_22%this.TILE_WIDTH;
var _27=_23%this.TILE_WIDTH;
return {x:_24,y:_25,pixelX:_26,pixelY:_27};
}
catch(ex){
jsExDebug("tileset_getTileAtMerc",ex);
}
}

function convertDecimalLongitudeToMercator(_1){
try{
return (6378137*(_1*(Math.PI/180)));
}
catch(ex){
jsExDebug("convertDecimalLongitudeToMercator",ex);
}
}
function sec(_2){
return 1/Math.cos(_2);
}
function convertDecimalLatitudeToMercator(_3){
try{
if(_3>=85.0511287798066){
_3=85.0511287798066;
}
if(_3<=-85.0511287798066){
_3=-85.0511287798066;
}
var e=0.08181919131087181;
var _5=_3*(Math.PI/180);
var _6=6378137*Math.log(Math.tan(Math.PI/4+_5/2)*Math.pow(((1-e*Math.sin(_5))/(1+e*Math.sin(_5))),(e/2)));
return _6;
}
catch(ex){
jsExDebug("convertDecimalLatitudeToMercator",ex);
}
}
function convertDecimalLatLongToMercator(_7,_8){
try{
var _9=null;
if(_8>=85.0511287798066){
_8=85.0511287798066;
}
if(_8<=-85.0511287798066){
_8=-85.0511287798066;
}
_9=6378137*Math.log(Math.tan(((_8*(Math.PI/180))+(Math.PI/2))/2));
var _a=(6378137*(_7*(Math.PI/180)));
return {x:_a,y:_9};
}
catch(ex){
jsExDebug("convertDecimalLongitudeToMercator",ex);
}
}
function convertMercatorLongitudeToDecimal(_b){
try{
return ((_b/6378137)/(Math.PI/180));
}
catch(ex){
jsExDebug("convertMercatorLongitudeToDecimal",ex);
}
}
function convertMercatorLatitudeToDecimal(_c){
try{
return (((Math.atan(Math.exp(_c/6378137))*2)-(Math.PI/2))/(Math.PI/180));
}
catch(ex){
jsExDebug("convertMercatorLatitudeToDecimal",ex);
}
}
function mercatorToDecimal(_d,_e){
return {x:((_d/6378137)/(Math.PI/180)),y:(((Math.atan(Math.exp(_e/6378137))*2)-(Math.PI/2))/(Math.PI/180))};
}
function convertMercatorLongitudeToPixels(_f,_10){
try{
var _11=256*Math.pow(2,_10);
var _12=6378137;
return (_11/2)+(_11/(2*Math.PI))*(_f/_12);
}
catch(ex){
jsExDebug("convertMercatorLongitudeToPixels",ex);
}
}
function convertMercatorLatitudeToPixels(_13,_14){
try{
var _15=256*Math.pow(2,_14);
var _16=6378137;
return (_15/2)-(_15/(2*Math.PI))*(_13/_16);
}
catch(ex){
jsExDebug("convertMercatorLatitudeToPixels",ex);
}
}
function convertPixelLongitudeToMercator(px,_18){
try{
var _19=256*Math.pow(2,_18);
var _1a=6378137;
return ((px-(_19/2))/(_19/(2*Math.PI)))*_1a;
}
catch(ex){
jsExDebug("convertLongitudePixelsToMercator",ex);
}
}
function convertPixelLatitudeToMercator(px,_1c){
try{
var _1d=256*Math.pow(2,_1c);
var _1e=6378137;
return _1e*((px-(_1d/2))/-(_1d/(2*Math.PI)));
}
catch(ex){
jsExDebug("convertLatitudePixelsToMercator",ex);
}
}
function convertTilePositionToPixels(tsX,tsY,tX,tY,pX,pY){
try{
var _25=256;
var _26=64;
var _27=_26*_25;
var _28=tsX*_27;
var _29=tsY*_27;
var _2a=(tX*_25)+pX;
var _2b=(tY*_25)+pY;
_28+=_2a;
_29+=_2b;
return {x:_28,y:_29};
}
catch(ex){
jsExDebug("convertTilePositionToPixels",ex);
}
}
function distanceBetweenTwoCoordinates(_2c,_2d,_2e,_2f){
try{
var _30=Math.PI/180;
var _31=_2c*_30;
var _32=_2e*_30;
var _33=_2d*_30;
var _34=_2f*_30;
var _35=Math.pow((Math.sin(_32-_31)/2),2)+(Math.cos(_31)*Math.cos(_32)*Math.pow((Math.sin(_34-_33)/2),2));
var _36=2*Math.atan2(Math.sqrt(_35),Math.sqrt(1-_35));
return 6378137*_36;
}
catch(ex){
jsExDebug("distanceBetweenTwoCoordinates",ex);
}
}
function distanceBetweenToMercatorCoordinates(_37,_38,_39,_3a){
try{
var _3b=_3a-_38;
var _3c=_39-_37;
var _3d=Math.round(Math.sqrt(Math.pow(Math.abs(_3b),2)+Math.pow(Math.abs(_3c),2)));
return _3d;
}
catch(ex){
jsExDebug("getDistance",ex);
}
}
function getDistance(_3e,_3f){
try{
return distanceBetweenToMercatorCoordinates(_3e.mercY,_3e.mercX,_3f.mercY,_3f.mercX);
}
catch(ex){
jsExDebug("getDistance",ex);
}
}

try{
map_t.prototype=new widget_t();
map_t.prototype.map_super=widget_t.prototype.constructor;
map_t.prototype.constructor=map_t;
map_t.prototype.cleanUp=map_cleanUp;
map_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
map_t.prototype.createDom=map_createDom;
map_t.prototype.bindEvents=map_bindEvents;
map_t.prototype.drawingOverlayInitialised=map_drawingOverlayInitialised;
map_t.prototype.setDimensions=map_setDimensions;
map_t.prototype.fireEvent=map_fireEvent;
map_t.prototype.enableDragToPan=map_enableDragToPan;
map_t.prototype.enableDragToZoom=map_enableDragToZoom;
map_t.prototype.disableDrag=map_disableDrag;
map_t.prototype.enableDoubleClickInfo=map_enableDoubleClickInfo;
map_t.prototype.enableDoubleClickPan=map_enableDoubleClickPan;
map_t.prototype.enableDoubleClickZoom=map_enableDoubleClickZoom;
map_t.prototype.enableDoubleClickPanAndZoom=map_enableDoubleClickPanAndZoom;
map_t.prototype.disableDoubleClick=map_disableDoubleClick;
map_t.prototype.enableSingleClickZOom=map_enableSingleClickZOom;
map_t.prototype.enableSingleClickPan=map_enableSingleClickPan;
map_t.prototype.disableSingleClick=map_disableSingleClick;
map_t.prototype.enableMouseWheelZoom=map_enableMouseWheelZoom;
map_t.prototype.disableMouseWheelZoom=map_disableMouseWheelZoom;
map_t.prototype.setAutoPanSpeed=map_setAutoPanSpeed;
map_t.prototype.setZoomAnimationSpeed=map_setZoomAnimationSpeed;
map_t.prototype.setStyle=map_setStyle;
map_t.prototype.enableScalebar=map_enableScalebar;
map_t.prototype.disableScalebar=map_disableScalebar;
map_t.prototype.setOverlayCursor=map_setOverlayCursor;
map_t.prototype.setCrosshair=map_setCrosshair;
map_t.prototype.enableZoomControls=map_enableZoomControls;
map_t.prototype.enablePanControls=map_enablePanControls;
map_t.prototype.zoomIn=map_zoomIn;
map_t.prototype.zoomOut=map_zoomOut;
map_t.prototype.zoomToLevel=map_zoomToLevel;
map_t.prototype.autoPanDirection=map_autoPanDirection;
map_t.prototype.autoPan=map_autoPan;
map_t.prototype.centreOnCoordinates=map_centreOnCoordinates;
map_t.prototype.centerOnCoordinates=map_centreOnCoordinates;
map_t.prototype.fitBoundaryCoordinates=map_fitBoundaryCoordinates;
map_t.prototype.hideMapObjects=map_hideMapObjects;
map_t.prototype.showMapObjects=map_showMapObjects;
map_t.prototype.addMapObjectList=map_addMapObjectList;
map_t.prototype.setScalebar=map_setScalebar;
map_t.prototype.addMapObject=map_addMapObject;
map_t.prototype.removeMapObject=map_removeMapObject;
map_t.prototype.setRenderMode=map_setRenderMode;
map_t.prototype.showMapObjectList=map_showMapObjectList;
map_t.prototype.hideMapObjectList=map_hideMapObjectList;
map_t.prototype.notifyDrawerInitialisation=map_notifyDrawerInitialisation;
map_t.prototype.hidePeepelLogo=map_hidePeepelLogo;
map_t.prototype.panAndZoom=map_panAndZoom;
map_t.prototype.getZoom=map_getZoom;
map_t.prototype.getStyle=map_getStyle;
map_t.prototype.getCentreCoordinates=map_getCentreCoordinates;
map_t.prototype.getCenterCoordinates=map_getCentreCoordinates;
map_t.prototype.getCentreCoordinate=map_getCentreCoordinates;
map_t.prototype.getCenterCoordinate=map_getCentreCoordinates;
map_t.prototype.getBoundaryCoordinates=map_getBoundaryCoordinates;
map_t.prototype.getCoordinatesAtPixel=map_getCoordinatesAtPixel;
map_t.prototype.getCoordinateAtPixel=map_getCoordinatesAtPixel;
map_t.prototype.getHitCoordinates=map_getHitCoordinates;
map_t.prototype.getPixelsPerMetre=map_getPixelsPerMetre;
map_t.prototype.getMapInfoContainer=map_getMapInfoContainer;
map_t.prototype.getDrawingOverlay=map_getDrawingOverlay;
map_t.prototype.getPrintHTML=map_getPrintHTML;
map_t.prototype.hideAnimationBuffer=map_hideAnimationBuffer;
map_t.prototype.showAnimationBuffer=map_showAnimationBuffer;
map_t.prototype.addNewColumn=map_addNewColumn;
map_t.prototype.addNewRow=map_addNewRow;
map_t.prototype.removeRow=map_removeRow;
map_t.prototype.removeColumn=map_removeColumn;
map_t.prototype.fillFirstColumn=map_fillFirstColumn;
map_t.prototype.fillLastColumn=map_fillLastColumn;
map_t.prototype.fillFirstRow=map_fillFirstRow;
map_t.prototype.fillLastRow=map_fillLastRow;
map_t.prototype.fillAll=map_fillAll;
map_t.prototype.getBaseTilePath=map_getBaseTilePath;
map_t.prototype.startMarqueeZoom=map_startMarqueeZoom;
map_t.prototype.expandMarqueeZoom=map_expandMarqueeZoom;
map_t.prototype.doMarqueeZoom=map_doMarqueeZoom;
map_t.prototype.marqueeZoomInProgress=map_marqueeZoomInProgress;
map_t.prototype.cancelMarqueeZoom=map_cancelMarqueeZoom;
map_t.prototype.convertScreenToMapPixels=map_convertScreenToMapPixels;
map_t.prototype.clearMapObjectList=map_clearMapObjectList;
map_t.prototype.updateTileServer=map_updateTileServer;
map_t.prototype.clickEventHandler=map_clickEventHandler;
map_t.prototype.doubleClickEventHandler=map_doubleClickEventHandler;
map_t.prototype.dragStartEventHandler=map_dragStartEventHandler;
map_t.prototype.dragEventHandler=map_dragEventHandler;
map_t.prototype.dragEndEventHandler=map_dragEndEventHandler;
map_t.prototype.panelEventHandler=map_panelEventHandler;
map_t.prototype.addChildMap=map_addChildMap;
map_t.prototype.removeChildMap=map_removeChildMap;
map_t.prototype.updateChildMap=map_updateChildMap;
map_t.prototype.setParentMap=map_setParentMap;
map_t.prototype.unlinkFromParentMap=map_unlinkFromParentMap;
map_t.prototype.recentreChildMaps=map_recentreChildMaps;
map_t.prototype.setLinkGroupIconRefs=map_setLinkGroupIconRefs;
map_t.prototype.getLinkGroupIconRefs=map_getLinkGroupIconRefs;
map_t.prototype.resetIndexX=map_resetIndexX;
map_t.prototype.resetIndexY=map_resetIndexY;
map_t.prototype.addTileToArray=map_addTileToArray;
map_t.prototype.removeTileFromArray=map_removeTileFromArray;
map_t.prototype.scroll=map_scroll;
map_t.prototype.loadTileset=map_loadTileset;
map_t.prototype.loadCurrentTileset=map_loadCurrentTileset;
map_t.prototype.checkPreloadScrollMarkers=map_checkPreloadScrollMarkers;
map_t.prototype.calculateEdge=map_calculateEdge;
map_t.prototype.calculateCentre=map_calculateCentre;
map_t.prototype.drawMapObjects=map_drawMapObjects;
map_t.prototype.iPhoneHandler=map_iPhoneHandler;
map_t.prototype.startDragIEOnly=map_startDragIEOnly;
map_t.prototype.dragIEOnly=map_dragIEOnly;
map_t.prototype.endDragIEOnly=map_endDragIEOnly;
map_t.prototype.cancelEventCustom=map_cancelEventCustom;
map_t.prototype.DEFAULT_BACKGROUND_COLOUR="#cccccc";
map_t.prototype.DEFAULT_BORDER="solid 1px rgb( 125, 120, 175 )";
map_t.prototype.DEFAULT_CURSOR_TYPE="pan";
map_t.prototype.DEFAULT_TILE_SERVER=0;
map_t.prototype.TILE_WIDTH=256;
map_t.prototype.TILE_HEIGHT=256;
map_t.prototype.TILESET_WIDTH=64;
map_t.prototype.TILESET_HEIGHT=64;
map_t.prototype.MIN_ZOOM=1;
map_t.prototype.MAX_ZOOM=20;
map_t.prototype.MAX_MAP_OBJECTS=1000;
map_t.prototype.LIVE_RENDER_PATH="http://localhost:1774/mapImage/mapImage.aspx";
map_t.prototype.MINIMUM_TILE_COLUMN_COUNT=2;
map_t.prototype.MINIMUM_TILE_ROW_COUNT=2;
map_t.prototype.PRELOAD_SCROLL_X=map_t.prototype.TILESET_WIDTH*0.65;
map_t.prototype.PRELOAD_SCROLL_Y=map_t.prototype.TILESET_HEIGHT*0.65;
map_t.prototype.PRELOAD_SCROLL_NEG_X=map_t.prototype.TILESET_WIDTH*0.25;
map_t.prototype.PRELOAD_SCROLL_NEG_Y=map_t.prototype.TILESET_HEIGHT*0.25;
map_t.prototype.DEFAULT_SHORT_AUTOPAN_SPEED=7;
map_t.prototype.DEFAULT_MEDIUM_AUTOPAN_SPEED=12;
map_t.prototype.DEFAULT_LONG_AUTOPAN_SPEED=20;
map_t.prototype.ZOOMIN_STRETCH_INCREMENT=25;
map_t.prototype.ZOOMOUT_STRETCH_INCREMENT=14;
map_t.prototype.DEFAULT_ZOOMIN_SPEED=18;
map_t.prototype.DEFAULT_ZOOMOUT_SPEED=map_t.prototype.DEFAULT_ZOOMIN_SPEED;
map_t.prototype.NR_TICKS_AUTOPAN=20;
map_t.prototype.AUTO_PAN_DEFAULT=0.5;
map_t.prototype.FLUID_POINT_UPDATE_TRIGGER=3;
map_t.prototype.OFFMAP_TRACKING_TOLERANCE=6000;
map_t.prototype.OFFMAP_OPACITY=0.4;
map_t.prototype.RENDER_PRE=1;
map_t.prototype.RENDER_LIVE=2;
map_t.prototype.CROSSHAIR_SMALL="img/app/app/map/icons/CrosshairSm.png";
map_t.prototype.CROSSHAIR_SMALL_WIDTH=69;
map_t.prototype.CROSSHAIR_SMALL_HEIGHT=map_t.prototype.CROSSHAIR_SMALL_WIDTH;
map_t.prototype.CROSSHAIR_MEDIUM="img/app/app/map/icons/CrosshairMed.png";
map_t.prototype.CROSSHAIR_MEDIUM_WIDTH=162;
map_t.prototype.CROSSHAIR_MEDIUM_HEIGHT=map_t.prototype.CROSSHAIR_MEDIUM_WIDTH;
map_t.prototype.CROSSHAIR_LARGE="img/app/app/map/icons/CrosshairLg.png";
map_t.prototype.PAN_EVENT=1;
map_t.prototype.ZOOM_IN_EVENT=2;
map_t.prototype.ZOOM_OUT_EVENT=4;
map_t.prototype.ZOOM_TO_LEVEL_EVENT=8;
map_t.prototype.DOUBLE_CLICK_EVENT=16;
map_t.prototype.SINGLE_CLICK_EVENT=32;
map_t.prototype.COORDINATE_JUMP_EVENT=64;
map_t.prototype.REMOVE_MAP_OBJECT_EVENT=128;
}
catch(ex){
jsExDebug("map_t.prototype",ex);
}
function map_t(_1,_2,_3){
try{
this.map_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.settingDringleClickPan=false;
this.settingMouseWheelZoom=false;
this.settingLongAutoPanSpeed=this.DEFAULT_LONG_AUTOPAN_SPEED;
this.settingDragToPan=true;
this.settingDragToZoom=false;
this.settingDoubleClickJump=false;
this.settingDoubleClickInfo=false;
this.settingDoubleClickPan=true;
this.settingDoubleClickPanAndZoom=false;
this.settingSingleClickZoom=false;
this.settingSMediumAutoPanSpeed=this.DEFAULT_MEDIUM_AUTOPAN_SPEED;
this.settingShortAutoPanSpeed=this.DEFAULT_SHORT_AUTOPAN_SPEED;
this.settingZoomInAnimationSpeed=this.DEFAULT_ZOOMIN_SPEED;
this.settingZoomOutAnimationSpeed=this.DEFAULT_ZOOMOUT_SPEED;
this.settingMapStyle=this.SYSTEM.MapStyle.getDefaultStyle();
this.settingUseScalebar=false;
this.settingEnableKeyPan=true;
this.settingEnableVectorDrawing=true;
this.settingTileServer=this.DEFAULT_TILE_SERVER;
this.settingDBTileServer=this.SYSTEM.Environment.TILE_SERVER[this.settingTileServer].db;
this.stateInDragIEOnly=false;
this.stateRenderMode=this.RENDER_PRE;
this.zoom=0;
this.frame=_2;
this.mapLock=false;
this.tileColumnCount=this.MINIMUM_TILE_COLUMN_COUNT;
this.tileRowCount=this.MINIMUM_TILE_ROW_COUNT;
this.childMaps=[];
this.linkGroupNumbers=[];
this.linkGroupIcons=[];
this.mapObjectLists=[];
this.centreTileX=0;
this.centreTileY=0;
this.centrePixelX=0;
this.centrePixelY=0;
this.centrePercentageX=0;
this.centrePercentageY=0;
this.centreTilesetArrayIndexX=0;
this.centreTilesetArrayIndexY=0;
this.dragEventBufferX=0;
this.dragEventBufferY=0;
this.newDrag=true;
this.dragEventCounter=1;
this.layerTransition=false;
this.stateCrosshairType=null;
this.tileX=0;
this.tileY=0;
this.indexTileBufferX=0;
this.indexTileBufferY=0;
this.indexLastTileBufferX=this.tileColumnCount-1;
this.indexLastTileBufferY=this.tileRowCount-1;
this.indexSecondTileBufferX=this.indexTileBufferX+1;
this.indexSecondTileBufferY=this.indexTileBufferY+1;
this.indexSecondLastTileBufferX=null;
this.indexSecondLastTileBufferY=null;
this.mapObjectCount=0;
this.createDom();
this.bindEvents();
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE&&!this.SYSTEM.Environment.AGENT_STRING.match(/iPhone/)){
this.drawer=new mapOverlay_t(this.overlayElement,new this.SYSTEM.Delegate(this,this.drawingOverlayInitialised));
this.copyright.attach(this.overlayElement);
}else{
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
this.drawer=new mapOverlay_t(this.overlayElementIE,new this.SYSTEM.Delegate(this,this.drawingOverlayInitialised));
}
}
this.setOverlayCursor(this.DEFAULT_CURSOR_TYPE);
this.drawerEventsAttachedVML=false;
this.drawerSVGInitialisationDelegate=null;
this.mapInfoContainer.attach(this.overlayElement);
this.mapInfoContainer.setOverlayReference(this.drawer);
this.tileArray=new Array(this.tileColumnCount);
this.animationTileArray=new Array(this.tileColumnCount);
for(var x=0;x<this.tileArray.length;x++){
this.tileArray[x]=new Array(this.tileRowCount);
this.animationTileArray[x]=new Array(this.tileRowCount);
for(var y=0;y<this.tileRowCount;y++){
this.addTileToArray(x,y,(x*this.TILE_WIDTH),(y*this.TILE_HEIGHT));
}
}
this.tilesetsToCleanUp=[];
this.tilesetArray=new Array(3);
this.tilesetArray[0]=new Array(3);
this.tilesetArray[1]=new Array(3);
this.tilesetArray[2]=new Array(3);
for(var x=0;x<3;x++){
for(var y=0;y<3;y++){
this.tilesetArray[x][y]=new tileset_t(this);
}
}
}
catch(ex){
jsExDebug("map_t",ex);
}
}
function map_cleanUp(me){
try{
if(!me){
me=this;
}
me.mapInfoContainer.cleanUp();
me.mapInfoContainer=null;
for(var i in me.mapObjectLists){
if(me.mapObjectLists[i]){
me.mapObjectLists[i].cleanUp();
me.mapObjectLists[i]=null;
}
}
me.mapObjectLists=null;
me.frame=null;
if(me.SYSTEM.Drawing.drawMode==me.SYSTEM.Drawing.VML_MODE){
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondblclick","dblclick");
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondblclick","dblclick");
me.SYSTEM.Event.detachEvent(me.widgetElement,"onmousedown","mousedown");
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondragstartlight","dragstartlight");
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondraglight","draglight");
me.SYSTEM.Event.detachEvent(me.widgetElement,"ondragendlight","dragendlight");
}
me.settingDragToPan=null;
me.settingDragToZoom=null;
me.settingDoubleClickJump=null;
me.settingDoubleClickInfo=null;
me.settingDoubleClickPan=null;
me.settingDoubleClickPanAndZoom=null;
me.settingSingleClickZoom=null;
me.settingSingleClickPan=null;
me.settingMouseWheelZoom=null;
me.settingLongAutoPanSpeed=null;
me.settingShortAutoPanSpeed=null;
me.settingMediumAutoPanSpeed=null;
me.settingZoomInAnimationSpeed=null;
me.settingZoomOutAnimationSpeed=null;
me.settingMapStyle=null;
me.settingUseScalebar=null;
me.settingEnableKeyPan=null;
me.stateRenderMode=null;
me.zoom=null;
me.mapLock=null;
me.tileColumnCount=null;
me.tileRowCount=null;
me.centreTileX=null;
me.centreTileY=null;
me.centrePixelX=null;
me.centrePixelY=null;
me.centrePercentageX=null;
me.centrePercentageY=null;
me.centreTilesetArrayIndexX=null;
me.centreTilesetArrayIndexY=null;
me.dragEventBufferX=null;
me.dragEventBufferY=null;
me.newDrag=null;
me.dragEventCounter=null;
me.layerTransition=null;
me.tileX=null;
me.tileY=null;
me.indexTileBufferX=null;
me.indexTileBufferY=null;
me.indexLastTileBufferX=null;
me.indexLastTileBufferY=null;
me.indexSecondTileBufferX=null;
me.indexSecondTileBufferY=null;
me.indexSecondLastTileBufferX=null;
me.indexSecondLastTileBufferY=null;
me.buffer=null;
me.animationBuffer=null;
me.overlayElement=null;
me.scalebar.cleanUp();
me.scalebar=null;
me.copyright.cleanUp();
me.copyright=null;
me.animationBufferVisible=null;
me.objectOverlayAttached=null;
me.peepelLogo=null;
me.stateCrosshairType=null;
me.stateInDragIEOnly=null;
me.stateCursorType=null;
for(var i=0;i<me.childMaps.length;i++){
if(me.childMaps[i]){
me.childMaps[i].map=null;
me.childMaps[i].zoomOffset=null;
me.childMaps[i].matchStyle=null;
me.childMaps[i]=null;
delete me.childMaps[i];
}
}
me.childMaps=null;
me.parentMap=null;
me.parentMapChildIndex=null;
if(me.SYSTEM.MapLinker){
for(i=0;i<me.linkGroupNumbers.length;i++){
me.SYSTEM.MapLinker.removeMapFromGroup(me,me.linkGroupNumbers[i]);
me.linkGroupNumbers[i]=null;
}
me.linkGroupNumbers=null;
}
for(i=0;i<me.linkGroupIcons.length;i++){
me.linkGroupIcons[i]=null;
}
me.linkGroupIcons=null;
for(i=0;i<me.tileArray.length;i++){
for(var j=0;j<me.tileArray[i].length;j++){
if(me.tileArray[i][j]){
me.tileArray[i][j].cleanUp();
me.tileArray[i][j]=null;
}
}
me.tileArray[i]=null;
}
me.tileArray=null;
for(i=0;i<me.animationTileArray.length;i++){
for(var j=0;j<me.animationTileArray[i].length;j++){
if(me.animationTileArray[i][j]){
me.animationTileArray[i][j].cleanUp();
me.animationTileArray[i][j]=null;
}
}
me.animationTileArray[i]=null;
}
me.animationTileArray=null;
for(i=0;i<me.tilesetArray.length;i++){
for(var j=0;j<me.tilesetArray[i].length;j++){
if(me.tilesetArray[i][j]){
me.tilesetArray[i][j]=null;
}
}
me.tilesetArray[i]=null;
}
me.tilesetArray=null;
for(i=0;i<me.tilesetsToCleanUp.length;i++){
me.tilesetsToCleanUp[i].cleanUp();
me.tilesetsToCleanUp[i]=null;
}
me.tilesetsToCleanUp=null;
me.currentCoordinate.cleanUp();
me.currentCoordinate=null;
me.currentCoordinateClean=null;
me.currentTileset.cleanUp();
me.currentTileset=null;
me.settingDoubleClickZoom=null;
me.centreTilesetPositionX=null;
me.centreTilesetPositionY=null;
if(me.drawer){
me.drawer.cleanUp();
me.drawer=null;
me.drawerEventsAttachedVML=null;
if(me.drawerSVGInitialisationDelegate){
me.drawerSVGInitialisationDelegate.cleanUp();
me.drawerSVGInitialisationDelegate=null;
}
}
me.overlayElementIE=null;
me.eventElementIE=null;
me.mapObjectCount=null;
me.settingEnableVectorDrawing=null;
me.mouseX=null;
me.mouseY=null;
me.marqueeZoomWidth=null;
me.marqueeZoomHeight=null;
if(me.marqueeStartCoordinate){
me.marqueeStartCoordinate.cleanUp();
me.marqueeStartCoordinate=null;
}
me.marqueeStartX=null;
me.marqueeStartY=null;
me.crosshair=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("map_cleanup",ex);
}
}
function map_drawingOverlayInitialised(_9){
try{
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE){
_9.setDragStartHandler(new this.SYSTEM.Delegate(this,this.dragStartEventHandler));
_9.setDragHandler(new this.SYSTEM.Delegate(this,this.dragEventHandler));
_9.setDragEndHandler(new this.SYSTEM.Delegate(this,this.dragEndEventHandler));
_9.setClickHandler(new this.SYSTEM.Delegate(this,this.clickEventHandler));
_9.setDoubleClickHandler(new this.SYSTEM.Delegate(this,this.doubleClickEventHandler));
if(this.drawerSVGInitialisationDelegate){
this.drawerSVGInitialisationDelegate.invoke();
this.drawerSVGInitialisationDelegate.cleanUp();
this.drawerSVGInitialisationDelegate=null;
}
}else{
if(!this.drawerEventsAttachedVML){
var _a=this.eventElementIE;
var _b=this.SYSTEM.Event;
_b.attachIEEvent(_a,"ondblclick",this.doubleClickEventHandler,this);
_b.attachIEEvent(_a,"onmousedown",this.clickEventHandler,this,true);
_b.attachIEEvent(_a,"ondragstart",this.cancelEventCustom);
_b.attachIEEvent(_a,"ondragenter",this.cancelEventCustom);
_b.attachIEEvent(_a,"ondragover",this.cancelEventCustom);
_b.attachIEEvent(_a,"ondrop",this.cancelEventCustom);
_b.attachIEEvent(_a,"onmousedown",this.startDragIEOnly,this);
_b.attachIEEvent(_a,"onmousemove",this.dragIEOnly,this);
_b.attachIEEvent(_a,"allclickprop",this.endDragIEOnly,this);
this.drawerEventsAttachedVML=true;
}
}
}
catch(ex){
jsExDebug("map_drawingOverlayInitialised",ex);
}
}
function map_createDom(){
try{
this.setBorder(this.DEFAULT_BORDER);
this.setBackgroundColour(this.DEFAULT_BACKGROUND_COLOUR);
this.widgetElement.style.overflow="hidden";
this.SYSTEM.Dom.setElementClass(this.widgetElement,"map_container");
var _c=document.createElement("div");
_c.style.position="absolute";
_c.style.left="0px";
_c.style.top="0px";
this.buffer=_c;
var _d=document.createElement("div");
_d.style.position="absolute";
_d.style.left="0px";
_d.style.top="0px";
this.animationBuffer=_d;
if(document.all){
var _e=document.createElement("div");
_e.style.position="absolute";
_e.style.left="0px";
_e.style.top="0px";
_e.style.width="100%";
_e.style.height="100%";
_e.style.visibility="hidden";
this.overlayElementIE=_e;
var _f=document.createElement("img");
_f.style.position="absolute";
_f.style.left="0px";
_f.style.top="0px";
_f.style.width="100%";
_f.style.height="100%";
_f.src="img/site/global/pixel.png";
this.eventElementIE=_f;
}
var _10=document.createElement("div");
_10.style.position="absolute";
_10.style.left="0px";
_10.style.top="0px";
_10.style.width="100%";
_10.style.height="100%";
this.overlayElement=_10;
var _11=new widgetScalebar_t();
_11.setUnits("?");
_11.setDimensions(30);
_11.setValue("??");
_11.setPosition(13,3,0,1);
_11.hide();
_11.attach(this.overlayElement);
this.scalebar=_11;
var _12=new widgetMapCopyright_t();
_12.setPosition(this.pad,this.pad,true);
_12.show();
_12.attach(this.overlayElement);
this.copyright=_12;
var _13=document.createElement("img");
_13.style.position="absolute";
_13.style.left="5px";
_13.style.top="5px";
_13.style.width="100px";
_13.style.height="50px";
_13.style.visibility="visible";
_13.src="img/app/app/map/sml_peepel_logo.png";
this.overlayElement.appendChild(_13);
this.peepelLogo=_13;
if(this.SYSTEM.Environment.AGENT_STRING.match(/iPhone/)){
this.enableZoomControls(75,20);
this.enablePanControls(50,100);
}
this.widgetElement.appendChild(_d);
this.widgetElement.appendChild(_c);
var _14=this.SYSTEM.Dom.createImage();
_14.style.display="none";
this.widgetElement.appendChild(_14);
this.crosshair=_14;
if(document.all){
this.widgetElement.appendChild(_f);
this.widgetElement.appendChild(_e);
}
this.widgetElement.appendChild(_10);
this.animationBufferVisible=true;
this.objectOverlayAttached=true;
this.mapInfoContainer=new this.SYSTEM.Widget.MapInfoContainer("mapInfoContainer",this);
}
catch(ex){
jsExDebug("map_createDom",ex);
}
}
function map_bindEvents(){
try{
}
catch(ex){
jsExDebug("map_bindEvents",ex);
}
}
function map_setDimensions(_15,_16){
try{
this.width=_15;
this.height=_16;
this.widgetElement.style.maxWidth=this.width+"px";
this.widgetElement.style.maxHeight=this.height+"px";
this.widgetElement.style.width=this.width+"px";
this.widgetElement.style.height=this.height+"px";
switch(this.stateCrosshairType){
case this.CROSSHAIR_SMALL:
this.crosshair.style.left=((this.width/2)-(this.CROSSHAIR_SMALL_WIDTH/2))+"px";
this.crosshair.style.top=((this.height/2)-(this.CROSSHAIR_SMALL_HEIGHT/2))+"px";
break;
case this.CROSSHAIR_MEDIUM:
this.crosshair.style.left=((this.width/2)-(this.CROSSHAIR_MEDIUM_WIDTH/2))+"px";
this.crosshair.style.top=((this.height/2)-(this.CROSSHAIR_MEDIUM_HEIGHT/2))+"px";
break;
}
var _17=Math.ceil(this.width/this.TILE_WIDTH)+1;
var _18=Math.ceil(this.height/this.TILE_HEIGHT)+1;
while(_17>this.tileColumnCount){
this.addNewColumn();
}
while(_18>this.tileRowCount){
this.addNewRow();
}
while(_18<this.tileRowCount){
this.removeRow();
}
while(_17<this.tileColumnCount){
this.removeColumn();
}
this.calculateCentre();
this.currentCoordinateClean=false;
this.recentreChildMaps();
}
catch(ex){
jsExDebug("map_setDimensions",ex);
}
}
function map_fireEvent(_19,_1a,_1b){
try{
if(!this.eventBindings||!this.eventBindings[_19]){
return;
}
if(_1a){
var _1c=new SYSTEM.Event.Event(_1a.clientX,_1a.clientY);
if(document.all){
_1c.relatedTarget=_1a.toElement;
}else{
_1c.relatedTarget=_1a.relatedTarget;
}
}else{
var _1c=new SYSTEM.Event.Event();
}
if(_1b){
_1c.parameter=_1b;
}
for(var i=this.eventBindings[_19].length-1;i>=0;i--){
var _1e=this.eventBindings[_19][i];
_1e.invoke(_1c,this);
}
}
catch(ex){
jsExDebug("map_fireEvent",ex);
}
}
function map_enableDragToPan(){
try{
this.settingDragToPan=true;
this.settingDragToZoom=false;
}
catch(ex){
jsExDebug("map_enableDragging",ex);
}
}
function map_enableDragToZoom(){
try{
this.settingDragToZoom=true;
this.settingDragToPan=false;
}
catch(ex){
jsExDebug("map_enableDragToZoom",ex);
}
}
function map_disableDrag(){
try{
this.settingDragToPan=false;
this.settingDragToZoom=false;
}
catch(ex){
jsExDebug("map_disableDragging",ex);
}
}
function map_enableDoubleClickInfo(){
try{
this.settingDoubleClickInfo=true;
this.settingDoubleClickPan=false;
this.settingDoubleClickZoom=false;
this.settingDoubleClickPanAndZoom=false;
}
catch(ex){
jsExDebug("map_enableDoubleClickPan",ex);
}
}
function map_enableDoubleClickPan(){
try{
this.settingDoubleClickInfo=false;
this.settingDoubleClickPan=true;
this.settingDoubleClickZoom=false;
this.settingDoubleClickPanAndZoom=false;
}
catch(ex){
jsExDebug("map_enableDoubleClickPan",ex);
}
}
function map_enableDoubleClickZoom(){
try{
this.settingDoubleClickInfo=false;
this.settingDoubleClickPan=false;
this.settingDoubleClickZoom=true;
this.settingDoubleClickPanAndZoom=false;
}
catch(ex){
jsExDebug("map_enableDoubleClickZoom",ex);
}
}
function map_enableDoubleClickPanAndZoom(){
try{
this.settingDoubleClickInfo=false;
this.settingDoubleClickPan=false;
this.settingDoubleClickZoom=false;
this.settingDoubleClickPanAndZoom=true;
}
catch(ex){
jsExDebug("map_enableDoubleClickZoom",ex);
}
}
function map_disableDoubleClick(){
try{
this.settingDoubleClickInfo=false;
this.settingDoubleClickPan=false;
this.settingDoubleClickZoom=false;
this.settingDoubleClickPanAndZoom=false;
}
catch(ex){
jsExDebug("map_disableDoubleClick",ex);
}
}
function map_enableSingleClickZOom(){
try{
this.settingSingleClickPan=false;
this.settingSingleClickZoom=true;
}
catch(ex){
jsExDebug("map_enableSingleClickZOom",ex);
}
}
function map_enableSingleClickPan(){
try{
this.settingSingleClickPan=true;
this.settingSingleClickZoom=false;
}
catch(ex){
jsExDebug("map_enableSingleClickPan",ex);
}
}
function map_disableSingleClick(){
try{
this.settingSingleClickPan=false;
this.settingSingleClickZoom=false;
}
catch(ex){
jsExDebug("map_disableSingleClick",ex);
}
}
function map_enableMouseWheelZoom(){
try{
this.settingMouseWheelZoom=true;
}
catch(ex){
jsExDebug("map_enableMouseWheelZoom",ex);
}
}
function map_disableMouseWheelZoom(){
try{
this.settingMouseWheelZoom=false;
}
catch(ex){
jsExDebug("map_disableMouseWheelZoom",ex);
}
}
function map_setAutoPanSpeed(_1f,_20,_21){
try{
this.settingLongAutoPanSpeed=(_21?_21:this.DEFAULT_LONG_AUTOPAN_SPEED);
this.settingMediumAutoPanSpeed=(_20?_20:this.DEFAULT_MEDIUM_AUTOPAN_SPEED);
this.settingShortAutoPanSpeed=(_1f?_1f:this.DEFAULT_SHORT_AUTOPAN_SPEED);
}
catch(ex){
jsExDebug("map_setAutoPanSpeed",ex);
}
}
function map_setZoomAnimationSpeed(_22,_23){
try{
this.settingZoomInAnimationSpeed=(_22?_22:this.DEFAULT_ZOOMIN_SPEED);
this.settingZoomOutAnimationSpeed=(_23?_23:this.DEFAULT_ZOOMOUT_SPEED);
}
catch(ex){
jsExDebug("map_setAutoPanSpeed",ex);
}
}
function map_setStyle(_24,_25){
try{
this.settingMapStyle=_24;
this.updateTileServer();
this.fillAll();
var _26=null;
for(var i=0;i<this.childMaps.length;i++){
_26=this.childMaps[i];
if(_26&&_26.matchStyle){
_26.map.setStyle(_24);
}
}
var _28=this.getCentreCoordinates(true);
if(this.linkGroupNumbers.length&&!_25){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_STYLE,this.linkGroupNumbers,this);
}
}
catch(ex){
jsExDebug("map_setStyle",ex);
}
}
function map_enableScalebar(){
try{
this.settingUseScalebar=true;
this.setScalebar();
this.scalebar.show();
}
catch(ex){
jsExDebug("map_enableScalebar",ex);
}
}
function map_disableScalebar(){
try{
this.settingUseScalebar=false;
}
catch(ex){
jsExDebug("map_disableScalebar",ex);
}
}
function map_setOverlayCursor(_29,_2a){
try{
_29=(_29?_29:this.stateCursorType);
var _2b=_29+(_2a?"_"+_2a:"");
this.SYSTEM.Dom.setElementClass(this.widgetElement,"map_container "+_2b);
this.drawer.setCursor(_2b);
this.stateCursorType=_29;
}
catch(ex){
jsExDebug("map_setOverlayCursor",ex);
}
}
function map_setCrosshair(_2c){
try{
switch(_2c){
case this.CROSSHAIR_SMALL:
this.crosshair.style.width=this.CROSSHAIR_SMALL_WIDTH+"px";
this.crosshair.style.height=this.CROSSHAIR_SMALL_HEIGHT+"px";
this.crosshair.style.left=((this.width/2)-(this.CROSSHAIR_SMALL_WIDTH/2))+"px";
this.crosshair.style.top=((this.height/2)-(this.CROSSHAIR_SMALL_HEIGHT/2))+"px";
this.crosshair.src=_2c;
this.crosshair.style.visibility="visible";
break;
case this.CROSSHAIR_MEDIUM:
this.crosshair.style.width=this.CROSSHAIR_MEDIUM_WIDTH+"px";
this.crosshair.style.height=this.CROSSHAIR_MEDIUM_HEIGHT+"px";
this.crosshair.style.left=((this.width/2)-(this.CROSSHAIR_MEDIUM_WIDTH/2))+"px";
this.crosshair.style.top=((this.height/2)-(this.CROSSHAIR_MEDIUM_HEIGHT/2))+"px";
this.crosshair.src=_2c;
this.crosshair.style.visibility="visible";
break;
case this.CROSSHAIR_LARGE:
this.crosshair.style.width="100%";
this.crosshair.style.height="100%";
this.crosshair.style.left="0px";
this.crosshair.style.top="0px";
this.crosshair.src=_2c;
this.crosshair.style.visibility="visible";
break;
default:
this.crosshair.style.visibility="hidden";
break;
}
this.crosshair.style.display="block";
this.stateCrosshairType=_2c;
}
catch(ex){
jsExDebug("map_setOverlayCursor",ex);
}
}
function map_enableZoomControls(_2d,_2e,_2f){
try{
if(!_2d){
return;
}
var d=new this.SYSTEM.Delegate(this,this.iPhoneHandler);
var _31=new this.SYSTEM.Widget.Button("zoomInBtn","img/app/panel/zoom_group/plus_trans",null,_2d,_2d);
_31.setPosition(_2e,_2e);
_31.show();
_31.setValue(1);
_31.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,d);
_31.attach(this.overlayElement);
var _32=new this.SYSTEM.Widget.Button("zoomOutBtn","img/app/panel/zoom_group/minus_trans",null,_2d,_2d);
_32.setPosition(_2e,_31.positionY+_31.height+_2e);
_32.show();
_32.setValue(-1);
_32.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,d);
_32.attach(this.overlayElement);
if(_2f){
}
}
catch(ex){
jsExDebug("map_enableZoomControls",ex);
}
}
function map_enablePanControls(_33,_34,_35){
try{
if(!_33||!_34){
return;
}
var d=new this.SYSTEM.Delegate(this,this.iPhoneHandler);
var _37=new this.SYSTEM.Widget.Button("panNorthBtn","img/app/panel/navigation_group/up_trans",null,_34,_33);
_37.setPosition(0,20);
_37.show();
_37.widgetElement.style.left="40%";
_37.setValue("north");
_37.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,d);
_37.attach(this.overlayElement);
var _38=new this.SYSTEM.Widget.Button("panEastBtn","img/app/panel/navigation_group/right_trans",null,_33,_34);
_38.setPosition(20,0,true);
_38.show();
_38.widgetElement.style.top="50%";
_38.setValue("east");
_38.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,d);
_38.attach(this.overlayElement);
var _39=new this.SYSTEM.Widget.Button("panSouthBtn","img/app/panel/navigation_group/down_trans",null,_34,_33);
_39.setPosition(0,20,false,true);
_39.show();
_39.widgetElement.style.left="40%";
_39.setValue("south");
_39.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,d);
_39.attach(this.overlayElement);
var _3a=new this.SYSTEM.Widget.Button("panWestBtn","img/app/panel/navigation_group/left_trans",null,_33,_34);
_3a.setPosition(20,0);
_3a.show();
_3a.widgetElement.style.top="50%";
_3a.setValue("west");
_3a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,d);
_3a.attach(this.overlayElement);
if(_35){
}
}
catch(ex){
jsExDebug("map_enablePanControls",ex);
}
}
function map_zoomIn(_3b,_3c){
function complete(){
try{
me.zoomLock=false;
if(me.currentCoordinateClean){
me.centreOnCoordinates(me.currentCoordinate,me.zoom,true);
}else{
me.centreOnCoordinates(_3e,me.zoom,true);
}
me.mapLock=false;
me.drawMapObjects();
me.showMapObjects();
if(me.linkGroupNumbers.length&&!_3c){
me.SYSTEM.MapLinker.applyToGroups(me.SYSTEM.MapLinker.ACTION_ZOOM_IN,me.linkGroupNumbers,me,_3b);
}
}
catch(ex){
jsExDebug("map_zoomIn: complete",ex);
}
}
function animationLoop(){
try{
var _3f=me.ZOOMIN_STRETCH_INCREMENT;
var _40=me.ZOOMIN_STRETCH_INCREMENT;
_41+=_3f;
_42+=_40;
if(_41>_43){
_3f-=_41-_43;
_41=_43;
}
if(_42>_44){
_40-=_42-_44;
_42=_44;
}
var _45=(me.centrePercentageX*_3f)*-1;
var _46=(me.centrePercentageY*_40)*-1;
for(var x=0;x<me.tileColumnCount;x++){
for(var y=0;y<me.tileRowCount;y++){
me.animationTileArray[x][y].setDimensions(_41,_42);
me.animationTileArray[x][y].movePosition(((x-me.centreTileX)*_3f)+_45,((y-me.centreTileY)*_40)+_46);
}
}
if((_41>=_43)&&(_42>=_44)){
complete();
}else{
setTimeout(animationLoop,me.settingZoomInAnimationSpeed);
}
}
catch(ex){
jsExDebug("animationLoop",ex);
}
}
try{
if(!_3b){
var _3b=1;
}
if((this.zoom+_3b)>this.MAX_ZOOM){
return false;
}
var _49=null;
for(var i=0;i<this.childMaps.length;i++){
_49=this.childMaps[i];
if(_49){
_49.map.zoomIn(_3b);
}
}
this.mapLock=true;
if(this.zoomLock){
return false;
}
this.zoomLock=true;
this.hideMapObjects();
var _3e=this.getCentreCoordinates();
this.calculateCentre();
this.zoom+=_3b;
this.updateTileServer();
var _4b=Math.pow(2,_3b);
var _4c=this.centreTileX+this.tileX;
var _4d=this.centreTileY+this.tileY;
_4c*=_4b;
_4d*=_4b;
var _4e=(this.centreTilesetPositionX*_4b)+Math.floor(_4c/this.TILESET_WIDTH);
var _4f=(this.centreTilesetPositionY*_4b)+Math.floor(_4d/this.TILESET_HEIGHT);
if(this.centreTilesetPositionX<0){
_4e=0;
}
if(this.centreTilesetPositionY<0){
_4f=0;
}
_4c%=this.TILESET_WIDTH;
_4d%=this.TILESET_HEIGHT;
var _50=this.centrePixelX*_4b;
var _51=this.centrePixelY*_4b;
_4c+=Math.floor(_50/this.TILE_WIDTH);
_4d+=Math.floor(_51/this.TILE_HEIGHT);
_50%=this.TILE_WIDTH;
_51%=this.TILE_HEIGHT;
for(var x=0;x<this.tileColumnCount;x++){
for(var y=0;y<this.tileRowCount;y++){
var _54=this.tileArray[x][y].getPosition();
this.animationTileArray[x][y].resetDimensions();
this.animationTileArray[x][y].setPosition(_54.x,_54.y);
this.animationTileArray[x][y].setSource(this.tileArray[x][y].getSource());
this.tileArray[x][y].hide();
}
}
var _55=this.calculateEdge(_4c,_4d,_50,_51);
_4e-=_55.x;
_4f-=_55.y;
var me=this;
if(this.SYSTEM.Settings&&this.SYSTEM.Settings.get("map_animate_zoom")&&_3b==1){
var _43=this.TILE_WIDTH*_4b;
var _44=this.TILE_HEIGHT*_4b;
var _41=this.TILE_WIDTH;
var _42=this.TILE_HEIGHT;
this.showAnimationBuffer();
animationLoop();
}else{
complete();
}
this.fireEvent(this.ZOOM_IN_EVENT);
}
catch(ex){
jsExDebug("map_zoomIn",ex);
}
}
function map_zoomOut(_56,_57){
if(this.zoom-_56<6){
this.centreOnCoordinates(this.getCentreCoordinates(),this.zoom-_56);
}
function complete(){
try{
me.zoomLock=false;
me.centreOnCoordinates(_59,me.zoom,true);
me.mapLock=false;
me.drawMapObjects();
me.showMapObjects();
me.fireEvent(me.ZOOM_OUT_EVENT);
if(me.linkGroupNumbers.length&&!_57){
me.SYSTEM.MapLinker.applyToGroups(me.SYSTEM.MapLinker.ACTION_ZOOM_OUT,me.linkGroupNumbers,me,_56);
}
}
catch(ex){
jsExDebug("map_zoomOut: complete",ex);
}
}
function animationLoop(){
try{
var _5a=me.centrePixelX/me.TILE_WIDTH;
var _5b=me.centrePixelY/me.TILE_HEIGHT;
var _5c=null;
if((_5d-me.ZOOMOUT_STRETCH_INCREMENT)>=_5e){
_5c=me.ZOOMOUT_STRETCH_INCREMENT;
}else{
_5c=_5d-_5e;
}
var _5f=null;
if((_60-me.ZOOMOUT_STRETCH_INCREMENT)>=_61){
_5f=me.ZOOMOUT_STRETCH_INCREMENT;
}else{
_5f=_60-_61;
}
_5d-=_5c;
_60-=_5f;
var _62=-(_5a*_5c);
var _63=-(_5b*_5f);
var _64=null;
for(x=0;x<me.tileColumnCount;x++){
_64=((x-me.centreTileX)*_5c)+_62;
for(y=0;y<me.tileRowCount;y++){
me.animationTileArray[x][y].setDimensions(_5d,_60);
me.animationTileArray[x][y].decrementPosition(_64,((y-me.centreTileY)*_5f)+_63);
}
}
if((_5d<=_5e)&&(_60<=_61)){
complete();
}else{
setTimeout(animationLoop,me.settingZoomOutAnimationSpeed);
}
}
catch(ex){
jsExDebug("map_zoomOut:animationLoop",ex);
}
}
try{
if(!_56){
var _56=1;
}
if((this.zoom-_56)<this.MIN_ZOOM){
return false;
}
var _67=null;
for(var i=0;i<this.childMaps.length;i++){
_67=this.childMaps[i];
if(_67){
_67.map.zoomOut(_56);
}
}
this.mapLock=true;
if(this.zoomLock){
return false;
}
this.zoomLock=true;
this.hideMapObjects();
var _59=this.getCentreCoordinates();
this.calculateCentre();
this.zoom-=_56;
this.updateTileServer();
var _69=Math.pow(2,_56);
var _6a=Math.floor(this.centreTilesetPositionX/_69);
var _6b=Math.floor(this.centreTilesetPositionY/_69);
var _5e=this.TILE_WIDTH/_69;
var _61=this.TILE_HEIGHT/_69;
var _6c=this.TILE_WIDTH-_5e;
var _6d=this.TILE_HEIGHT-_61;
var _6e=(((this.centrePixelX/this.TILE_WIDTH)*_6c)*-1);
var _6f=(((this.centrePixelY/this.TILE_HEIGHT)*_6d)*-1);
var _70;
var _71;
this.tileX+=(this.centreTilesetPositionX%_69)*this.TILESET_WIDTH;
this.tileY+=(this.centreTilesetPositionY%_69)*this.TILESET_HEIGHT;
var _72=this.tileX%_69;
var _73=this.tileY%_69;
this.tileX=Math.floor(this.tileX/_69);
this.tileY=Math.floor(this.tileY/_69);
_70=Math.floor(this.tileArray[0][0].positionX-((-this.centreTileX)*_6c)-_6e);
if(_72){
_70-=(_72*(this.TILE_WIDTH/2));
}
if(_70>0){
_70-=this.TILE_WIDTH;
this.tileX--;
}
x=0;
_71=Math.floor(this.tileArray[0][0].positionY-((-this.centreTileY)*_6d)-_6f);
if(_73){
_71-=(_73*(this.TILE_HEIGHT/2));
}
if(_71>0){
_71-=this.TILE_HEIGHT;
this.tileY--;
}
if(this.tileX<0){
this.tileX+=this.TILESET_WIDTH;
_6a--;
}
if(this.tileY<0){
this.tileY+=this.TILESET_HEIGHT;
_6b--;
}
for(var x=0;x<this.tileColumnCount;x++){
for(var y=0;y<this.tileRowCount;y++){
var _74=this.tileArray[x][y].getPosition();
this.animationTileArray[x][y].setPosition(_74.x,_74.y);
this.animationTileArray[x][y].setSource(this.tileArray[x][y].getSource());
this.tileArray[x][y].hide();
}
}
var _75=_71;
for(x=0;x<this.tileColumnCount;x++){
for(y=0;y<this.tileRowCount;y++){
this.tileArray[x][y].setPosition(_70,_71);
_71+=this.TILE_HEIGHT;
}
_71=_75;
_70+=this.TILE_WIDTH;
}
var me=this;
if(this.SYSTEM.Settings&&this.SYSTEM.Settings.get("map_animate_zoom")&&_56==1){
var _5d=this.TILE_WIDTH;
var _60=this.TILE_HEIGHT;
this.showAnimationBuffer();
animationLoop();
}else{
complete();
}
}
catch(ex){
jsExDebug("map_zoomOut",ex);
}
}
function map_zoomToLevel(_76,_77){
try{
if(this.zoom==_76){
return;
}
if(this.zoom-_76==1){
this.zoomOut(this.zoom-_76);
return;
}else{
if(_76-this.zoom==1){
this.zoomIn(_76-this.zoom);
return;
}else{
var _78=this.zoom;
this.centreOnCoordinates(this.getCentreCoordinates(),_76,true);
this.recentreChildMaps();
this.drawMapObjects();
if(this.linkGroupNumbers.length&&!_77){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_ZOOM_TO_LEVEL,this.linkGroupNumbers,this,_76-_78);
}
this.fireEvent(this.ZOOM_TO_LEVEL_EVENT);
}
}
}
catch(ex){
jsExDebug("map_zoomToLevel",ex);
}
}
function map_autoPan(_79,_7a,_7b,_7c){
function autoPanClosure(){
try{
if(_7d<0){
_7e=0;
}
if(_7f<0){
_7f=0;
}
me.scroll(_81,_7e);
_7f--;
_7d--;
if(_7f>0||_7d>0){
setTimeout(autoPanClosure,15);
}else{
me.checkPreloadScrollMarkers();
me.setScalebar();
me.panLock=false;
if(_7b){
_7b(_7c);
}
if(me.linkGroupNumbers.length){
me.SYSTEM.MapLinker.applyToGroups(me.SYSTEM.MapLinker.ACTION_SCROLL_END,me.linkGroupNumbers,me);
}
}
}
catch(ex){
jsExDebug("map_autoPan:autoPan",ex);
}
}
try{
if(!_7b){
var _7b=null;
}
if(!this.panLock){
var me=this;
this.currentCoordinateClean=false;
this.panLock=true;
var _81=0;
var _7e=0;
var _7f=0;
var _7d=0;
if((_79+_7a)>1000){
_81=parseInt(_79/this.settingLongAutoPanSpeed);
_7e=parseInt(_7a/this.settingLongAutoPanSpeed);
_7f=this.settingLongAutoPanSpeed;
_7d=this.settingLongAutoPanSpeed;
}else{
if((_79+_7a)>500){
_81=parseInt(_79/this.settingMediumAutoPanSpeed);
_7e=parseInt(_7a/this.settingMediumAutoPanSpeed);
_7f=this.settingMediumAutoPanSpeed;
_7d=this.settingMediumAutoPanSpeed;
}else{
_81=parseInt(_79/this.settingShortAutoPanSpeed);
_7e=parseInt(_7a/this.settingShortAutoPanSpeed);
_7f=this.settingShortAutoPanSpeed;
_7d=this.settingShortAutoPanSpeed;
}
}
autoPanClosure();
}
}
catch(ex){
jsExDebug("map_autoPan",ex);
}
}
function map_autoPanDirection(_82,_83){
try{
switch(_82){
case "east":
this.autoPan(this.width*this.AUTO_PAN_DEFAULT,0);
break;
case "west":
this.autoPan(this.width*-this.AUTO_PAN_DEFAULT,0);
break;
case "north":
this.autoPan(0,this.height*-this.AUTO_PAN_DEFAULT);
break;
case "south":
this.autoPan(0,this.height*this.AUTO_PAN_DEFAULT);
break;
case "southeast":
this.autoPan(this.width*this.AUTO_PAN_DEFAULT,this.height*this.AUTO_PAN_DEFAULT);
break;
case "southwest":
this.autoPan(this.width*-this.AUTO_PAN_DEFAULT,this.height*this.AUTO_PAN_DEFAULT);
break;
case "northeast":
this.autoPan(this.width*this.AUTO_PAN_DEFAULT,this.height*-this.AUTO_PAN_DEFAULT);
break;
case "northwest":
this.autoPan(this.width*-this.AUTO_PAN_DEFAULT,this.height*-this.AUTO_PAN_DEFAULT);
break;
default:
jsDebug("map_autoPanDirection: Invalid direction");
}
}
catch(ex){
jsExDebug("map_autoPanDirection",ex);
}
}
function map_centreOnCoordinates(_84,_85,_86,_87){
try{
this.resetIndexX();
this.resetIndexY();
if(!_84){
return false;
}
var _88=this.zoom;
if(_85!=null){
this.zoom=_85;
}else{
if(_84.zoom){
this.zoom=_84.zoom;
}
}
this.currentCoordinate=_84;
this.currentCoordinate.setZoom(this.zoom);
this.currentCoordinateClean=true;
if(isNaN(this.zoom)){
this.zoom=13;
}
if(this.zoom<this.MIN_ZOOM){
this.zoom=this.MIN_ZOOM;
}
if(this.zoom>this.MAX_ZOOM){
this.zoom=this.MAX_ZOOM;
}
this.updateTileServer();
var _89=_84.mercX;
var _8a=_84.mercY;
if(_89==null||_8a==null){
return false;
}
var _8b=new tileset_t(this);
_8b.loadByMercator(_89,_8a,this.zoom);
var _8c=_8b.getTileAtMerc(_89,_8a);
var _8d=(_8c.x*256)+_8c.pixelX;
var _8e=(_8c.y*256)+_8c.pixelY;
var _8f=0;
var _90=0;
if(_8d<=(this.width*0.5)){
_8f+=1;
}
if(_8e<=(this.height*0.5)){
_90+=1;
}
this.tilesetArray[_8f+1][_90+1]=_8b;
if(_8f!=0||_90!=0){
var _91=new tileset_t(this);
_91.loadByTilesetCoordinates(_8b.tilesetX-_8f,_8b.tilesetY-_90,this.zoom);
this.tilesetArray[1][1]=_91;
}
this.currentTileset=this.tilesetArray[1][1];
this.calculateEdge(_8c.x,_8c.y,_8c.pixelX,_8c.pixelY);
this.checkPreloadScrollMarkers();
this.fillAll();
this.setScalebar();
this.recentreChildMaps();
this.fireEvent(this.COORDINATE_JUMP_EVENT,null,_87);
if(this.linkGroupNumbers.length&&!_86){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_CENTRE,this.linkGroupNumbers,this,this.zoom-_88);
}
}
catch(ex){
jsExDebug("map_centreOnCoordinates",ex);
}
}
function map_fitBoundaryCoordinates(_92,_93){
try{
var _94=_92.bottomRight.mercX-_92.topLeft.mercX;
var _95=_92.topLeft.mercY-_92.bottomRight.mercY;
var _96=(_93?_93:this.MAX_ZOOM);
var _97=convertMercatorLongitudeToPixels(_94,_96)-(128*Math.pow(2,_96));
var _98=Math.abs(convertMercatorLatitudeToPixels(_95,_96)-(128*Math.pow(2,_96)));
while((_98>this.height||_97>this.width)&&_96>this.MIN_ZOOM){
_96--;
_97*=0.5;
_98*=0.5;
}
var _99=(_92.bottomRight.mercX+_92.topLeft.mercX)*0.5;
var _9a=(_92.bottomRight.mercY+_92.topLeft.mercY)*0.5;
_92.cleanUp();
var _9b=new mapCoordinate_t(_9a,_99,1);
this.centreOnCoordinates(_9b,_96,false,true);
this.drawMapObjects();
}
catch(ex){
jsExDebug("map_fitBoundaryCoordinates",ex);
}
}
function map_hideMapObjects(){
try{
if(this.objectOverlayAttached){
this.overlayElement.style.display="none";
if(this.overlayElementIE){
this.overlayElementIE.style.display="none";
}
this.objectOverlayAttached=false;
}
}
catch(ex){
jsExDebug("map_hideMapObjects",ex);
}
}
function map_showMapObjects(){
try{
if(!this.objectOverlayAttached){
this.overlayElement.style.display="block";
if(this.overlayElementIE){
this.overlayElementIE.style.display="block";
}
this.objectOverlayAttached=true;
}
}
catch(ex){
jsExDebug("map_showMapObjects",ex);
}
}
function map_getZoom(){
try{
return this.zoom;
}
catch(ex){
jsExDebug("map_getZoom",ex);
}
}
function map_getStyle(){
try{
return this.settingMapStyle;
}
catch(ex){
jsExDebug("map_getStyle",ex);
}
}
function map_getCentreCoordinates(_9c){
try{
var _9d=null;
if(this.currentCoordinateClean){
this.currentCoordinate.setZoom(this.zoom);
_9d=this.currentCoordinate;
}else{
var _9e=this.getBoundaryCoordinates();
if(!_9e){
return;
}
var _9f=_9e.topLeft.getMercatorCoordinates(false);
var _a0=_9e.getSize();
var _a1=_9f.x+(_a0.width*0.5);
var _a2=_9f.y-(_a0.height*0.5);
_9e.cleanUp();
var _9d=new mapCoordinate_t(_a2,_a1,1);
_9d.setZoom(this.zoom);
}
return (_9c?{x:_9d.mercX,y:_9d.mercY}:_9d);
}
catch(ex){
jsExDebug("map_getCentreCoordinates",ex);
}
}
function map_getBoundaryCoordinates(){
try{
this.resetIndexX();
this.resetIndexY();
var _a3=this.tileArray[0][0].positionInformation;
if(!_a3){
return;
}
var _a4=0-this.tileArray[0][0].positionX;
var _a5=0-this.tileArray[0][0].positionY;
var _a6=convertTilePositionToPixels(_a3.tilesetX,_a3.tilesetY,_a3.tileX,_a3.tileY,_a4,_a5);
var x=_a6.x;
var y=_a6.y;
x=convertPixelLongitudeToMercator(x,this.zoom);
y=convertPixelLatitudeToMercator(y,this.zoom);
var _a9=this.tileArray[this.indexLastTileBufferX][this.indexLastTileBufferY].positionInformation;
var _aa=1+_a9.tilesetX-this.tilesetArray[1][1].tilesetX;
var _ab=1+_a9.tilesetY-this.tilesetArray[1][1].tilesetY;
var _ac=256-((this.tileColumnCount*256)-this.width-_a4);
var _ad=256-((this.tileRowCount*256)-this.height-_a5);
var _ae=convertTilePositionToPixels(_a9.tilesetX,_a9.tilesetY,_a9.tileX,_a9.tileY,_ac,_ad);
var lx=_ae.x;
var ly=_ae.y;
lx=convertPixelLongitudeToMercator(lx,this.zoom);
ly=convertPixelLatitudeToMercator(ly,this.zoom);
var _b1=new mapBoundary_t(x,lx,y,ly,1);
_b1.setZoom(this.zoom);
return _b1;
}
catch(ex){
jsExDebug("map_getBoundaryCoordinates; ",ex);
}
}
function map_getCoordinatesAtPixel(x,y){
try{
var _b4=this.getBoundaryCoordinates();
var _b5=_b4.topLeft.getMercatorCoordinates(false);
var _b6=_b4.getSize();
var _b7=_b5.x+((x/this.width)*_b6.width);
var _b8=_b5.y-((y/this.height)*_b6.height);
_b4.cleanUp();
var _b9=new mapCoordinate_t(_b8,_b7,1);
_b9.setZoom(this.zoom);
return _b9;
}
catch(ex){
jsExDebug("map_getCoordinatesAtPixel; ",ex);
}
}
function map_getHitCoordinates(x,y,_bc){
try{
var hit=null;
hit=this.convertScreenToMapPixels(x,y);
return hit;
}
catch(ex){
jsExDebug("map_getHitCoordinates",ex);
}
}
function map_getPixelsPerMetre(){
try{
var _be=this.getBoundaryCoordinates();
var _bf=_be.bottomRight.mercX-_be.topLeft.mercX;
_be.cleanUp();
return (this.width/_bf);
}
catch(ex){
jsExDebug("map_getPixelsPerMetre",ex);
}
}
function map_getMapInfoContainer(){
try{
return this.mapInfoContainer;
}
catch(ex){
jsExDebug("map_getMapInfoContainer",ex);
}
}
function map_getDrawingOverlay(){
try{
return this.drawer;
}
catch(ex){
jsExDebug("map_getDrawingOverlay",ex);
}
}
function map_getPrintHTML(_c0){
try{
var _c1=this.buffer.innerHTML+(this.overlayElementIE?this.overlayElementIE.innerHTML:"")+this.overlayElement.innerHTML;
return (_c0?escape(_c1):_c1);
}
catch(ex){
jsExDebug("map_getDrawingOverlay",ex);
}
}
function map_hideAnimationBuffer(){
try{
if(this.animationBufferVisible){
this.animationBufferVisible=false;
this.widgetElement.removeChild(this.animationBuffer);
}
}
catch(ex){
jsExDebug("map_hideAnimationBuffer",ex);
}
}
function map_showAnimationBuffer(){
try{
if(!this.animationBufferVisible){
this.animationBufferVisible=true;
this.widgetElement.insertBefore(this.animationBuffer,this.buffer);
}
}
catch(ex){
jsExDebug("map_showAnimationBuffer",ex);
}
}
function map_addTileToArray(x,y,_c4,_c5){
try{
var _c6=new tile_t(this.settingDBTileServer);
_c6.setPosition(_c4,_c5);
_c6.attach(this.buffer);
var _c7=new tile_t(this.settingDBTileServer);
_c7.setPosition(_c4,_c5);
_c7.attach(this.animationBuffer);
this.tileArray[x][y]=_c6;
this.animationTileArray[x][y]=_c7;
}
catch(ex){
jsExDebug("map_addTileToArray",ex);
}
}
function map_removeTileFromArray(x,y){
try{
this.tileArray[x][y].detach();
this.animationTileArray[x][y].detach();
this.tileArray[x][y].cleanUp();
this.tileArray[x][y]=null;
this.animationTileArray[x][y].cleanUp();
this.animationTileArray[x][y]=null;
delete this.tileArray[x][y];
delete this.animationTileArray[x][y];
}
catch(ex){
jsExDebug("map_removeTileFromArray",ex);
}
return;
}
function map_addNewColumn(){
try{
this.resetIndexX();
this.resetIndexY();
this.tileColumnCount++;
var x=this.tileColumnCount-1;
this.tileArray[x]=new Array();
this.animationTileArray[x]=new Array();
for(var y=0;y<this.tileRowCount;y++){
var _cc=this.tileArray[x-1][y].positionX+this.TILE_WIDTH;
var _cd=this.tileArray[x-1][y].positionY;
this.addTileToArray(x,y,_cc,_cd);
}
this.resetIndexX();
this.resetIndexY();
this.fillLastColumn();
}
catch(ex){
jsExDebug("map_addNewColumn",ex);
}
}
function map_addNewRow(){
try{
this.resetIndexX();
this.resetIndexY();
this.tileRowCount++;
var y=this.tileRowCount-1;
this.tileArray[x]=new Array();
this.animationTileArray[x]=new Array();
for(var x=0;x<this.tileColumnCount;x++){
var _d0=this.tileArray[x][y-1].positionX;
var _d1=this.tileArray[x][y-1].positionY+this.TILE_HEIGHT;
this.addTileToArray(x,y,_d0,_d1);
}
this.resetIndexX();
this.resetIndexY();
this.fillLastRow();
}
catch(ex){
jsExDebug("map_addNewRow",ex);
}
}
function map_removeRow(){
try{
this.resetIndexX();
this.resetIndexY();
this.tileRowCount--;
var y=this.tileRowCount;
for(var x=0;x<this.tileColumnCount;x++){
this.removeTileFromArray(x,y);
this.tileArray[x].length--;
}
this.resetIndexX();
this.resetIndexY();
}
catch(ex){
jsExDebug("map_removeRow",ex);
}
}
function map_removeColumn(){
try{
this.resetIndexX();
this.resetIndexY();
this.tileColumnCount--;
var x=this.tileColumnCount;
for(var y=0;y<this.tileRowCount;y++){
this.removeTileFromArray(x,y);
}
delete this.tileArray[x];
this.tileArray.length--;
this.resetIndexX();
this.resetIndexY();
}
catch(ex){
jsExDebug("map_removeColumn",ex);
}
}
function map_fillFirstColumn(){
try{
if(this.tileX<0){
this.tileX+=this.TILESET_WIDTH;
var tA0=this.tilesetArray[0];
var tA1=this.tilesetArray[1];
var tA2=this.tilesetArray[2];
tA2[0]=tA1[0];
tA2[1]=tA1[1];
tA2[2]=tA1[2];
tA1[0]=tA0[0];
tA1[1]=tA0[1];
tA1[2]=tA0[2];
var _d9=-1;
var _da=0;
tA0[0]=new tileset_t(this);
if(!tA0[0].loadByTilesetCoordinates(tA1[1].tilesetX+_d9,tA1[1].tilesetY+-1,this.zoom)){
}
tA0[1]=new tileset_t(this);
if(!tA0[1].loadByTilesetCoordinates(tA1[1].tilesetX+_d9,tA1[1].tilesetY+0,this.zoom)){
}
tA0[2]=new tileset_t(this);
if(!tA0[2].loadByTilesetCoordinates(tA1[1].tilesetX+_d9,tA1[1].tilesetY+1,this.zoom)){
}
}
var _db;
var _dc;
var _dd=null;
var _de=this.tilesetArray[1][1];
var _df=null;
var _e0=this.tileX;
for(var y=0;y<this.tileRowCount;y++){
_dc=this.tileY+y;
_df=_dc-this.TILESET_HEIGHT;
_dd=this.tileArray[this.indexTileBufferX][y];
if(_dc<this.TILESET_HEIGHT){
_db=(this.TILESET_WIDTH*_dc)+_e0;
_dd.setPositionInformation(_de.tilesetX,_de.tilesetY,_e0,_dc,this.zoom);
_dd.setSource(this.getBaseTilePath(_dd.positionInformation));
}else{
_db=(this.TILESET_WIDTH*_df)+_e0;
_dd.setPositionInformation(_de.tilesetX,_de.tilesetY+1,_e0,_df,this.zoom);
_dd.setSource(this.getBaseTilePath(_dd.positionInformation));
}
}
if(_e0<this.PRELOAD_SCROLL_NEG_X){
this.loadTileset(0,1,-1,0,this.zoom);
}
}
catch(ex){
jsExDebug("map_fillFirstColumn",ex);
}
}
function map_fillLastColumn(){
try{
var _e2;
var _e3=this.tileX+this.tileColumnCount;
var _e4;
var _e5=this.tilesetArray[1][1].tilesetX;
if(_e3>this.TILESET_WIDTH){
_e3-=this.TILESET_WIDTH;
_e5++;
}
for(var y=0;y<this.tileRowCount;y++){
_e4=this.tileY+y;
if(_e4<this.TILESET_HEIGHT){
this.tileArray[this.indexLastTileBufferX][y].setPositionInformation(_e5,this.tilesetArray[1][1].tilesetY,_e3-1,_e4,this.zoom);
this.tileArray[this.indexLastTileBufferX][y].setSource(this.getBaseTilePath(this.tileArray[this.indexLastTileBufferX][y].positionInformation));
}else{
this.tileArray[this.indexLastTileBufferX][y].setPositionInformation(_e5,this.tilesetArray[1][1].tilesetY+1,_e3-1,_e4-this.TILESET_HEIGHT,this.zoom);
this.tileArray[this.indexLastTileBufferX][y].setSource(this.getBaseTilePath(this.tileArray[this.indexLastTileBufferX][y].positionInformation));
}
}
if(this.tileX>this.PRELOAD_SCROLL_X){
this.loadTileset(2,1,1,0,this.zoom);
}
if(this.tileX>this.TILESET_WIDTH){
this.tileX-=this.TILESET_WIDTH;
this.tilesetArray[0][0]=this.tilesetArray[1][0];
this.tilesetArray[0][1]=this.tilesetArray[1][1];
this.tilesetArray[0][2]=this.tilesetArray[1][2];
this.tilesetArray[1][0]=this.tilesetArray[2][0];
this.tilesetArray[1][1]=this.tilesetArray[2][1];
this.tilesetArray[1][2]=this.tilesetArray[2][2];
var _e7=1;
var _e8=0;
this.tilesetArray[2][0]=new tileset_t(this);
if(!this.tilesetArray[2][0].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+_e7,this.tilesetArray[1][1].tilesetY+-1,this.zoom)){
}
this.tilesetArray[2][1]=new tileset_t(this);
if(!this.tilesetArray[2][1].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+_e7,this.tilesetArray[1][1].tilesetY+0,this.zoom)){
}
this.tilesetArray[2][2]=new tileset_t(this);
if(!this.tilesetArray[2][2].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+_e7,this.tilesetArray[1][1].tilesetY+1,this.zoom)){
}
}
}
catch(ex){
jsExDebug("map_fillLastColumn",ex);
}
}
function map_fillFirstRow(){
try{
if(this.tileY<0){
this.tileY+=this.TILESET_HEIGHT;
this.tilesetArray[0][2]=this.tilesetArray[0][1];
this.tilesetArray[1][2]=this.tilesetArray[1][1];
this.tilesetArray[2][2]=this.tilesetArray[2][1];
this.tilesetArray[0][1]=this.tilesetArray[0][0];
this.tilesetArray[1][1]=this.tilesetArray[1][0];
this.tilesetArray[2][1]=this.tilesetArray[2][0];
var _e9=0;
var _ea=-1;
this.tilesetArray[0][0]=new tileset_t(this);
this.tilesetArray[0][0].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+-1,this.tilesetArray[1][1].tilesetY+_ea,this.zoom);
this.tilesetArray[1][0]=new tileset_t(this);
this.tilesetArray[1][0].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+0,this.tilesetArray[1][1].tilesetY+_ea,this.zoom);
this.tilesetArray[2][0]=new tileset_t(this);
this.tilesetArray[2][0].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+1,this.tilesetArray[1][1].tilesetY+_ea,this.zoom);
}
var _eb;
var _ec;
for(var x=0;x<this.tileColumnCount;x++){
_ec=this.tileX+x;
if(_ec<this.TILESET_WIDTH){
_eb=(this.TILESET_WIDTH*this.tileY)+_ec;
this.tileArray[x][this.indexTileBufferY].setPositionInformation(this.tilesetArray[1][1].tilesetX,this.tilesetArray[1][1].tilesetY,_ec,this.tileY,this.zoom);
this.tileArray[x][this.indexTileBufferY].setSource(this.getBaseTilePath(this.tileArray[x][this.indexTileBufferY].positionInformation));
}else{
_eb=(this.tileY*this.TILESET_WIDTH)+(_ec-this.TILESET_WIDTH);
this.tileArray[x][this.indexTileBufferY].setPositionInformation(this.tilesetArray[1][1].tilesetX+1,this.tilesetArray[1][1].tilesetY,_ec-this.TILESET_WIDTH,this.tileY,this.zoom);
this.tileArray[x][this.indexTileBufferY].setSource(this.getBaseTilePath(this.tileArray[x][this.indexTileBufferY].positionInformation));
}
}
if(this.tileY<this.PRELOAD_SCROLL_NEG_Y){
this.loadTileset(1,0,0,-1,this.zoom);
}
}
catch(ex){
jsExDebug("map_fillFirstRow",ex);
}
}
function map_fillLastRow(){
try{
var _ee;
var _ef;
var _f0=this.tileY+this.tileRowCount;
var _f1=this.tilesetArray[1][1].tilesetY;
if(_f0>this.TILESET_HEIGHT){
_f0-=this.TILESET_HEIGHT;
_f1++;
}
for(var x=0;x<this.tileColumnCount;x++){
_ef=this.tileX+x;
if(_ef<this.TILESET_WIDTH){
_ee=(this.TILESET_WIDTH*(_f0-1))+_ef;
this.tileArray[x][this.indexLastTileBufferY].setPositionInformation(this.tilesetArray[1][1].tilesetX,_f1,_ef,_f0-1,this.zoom);
this.tileArray[x][this.indexLastTileBufferY].setSource(this.getBaseTilePath(this.tileArray[x][this.indexLastTileBufferY].positionInformation));
}else{
_ee=(this.TILESET_WIDTH*(_f0-1))+(_ef-this.TILESET_WIDTH);
this.tileArray[x][this.indexLastTileBufferY].setPositionInformation(this.tilesetArray[1][1].tilesetX+1,_f1,_ef-this.TILESET_WIDTH,_f0-1,this.zoom);
this.tileArray[x][this.indexLastTileBufferY].setSource(this.getBaseTilePath(this.tileArray[x][this.indexLastTileBufferY].positionInformation));
}
}
if(this.tileY>this.PRELOAD_SCROLL_Y){
this.loadTileset(1,2,0,1,this.zoom);
}
if(this.tileY>this.TILESET_HEIGHT){
this.tileY-=this.TILESET_HEIGHT;
this.tilesetArray[0][0]=this.tilesetArray[0][1];
this.tilesetArray[1][0]=this.tilesetArray[1][1];
this.tilesetArray[2][0]=this.tilesetArray[2][1];
this.tilesetArray[0][1]=this.tilesetArray[0][2];
this.tilesetArray[1][1]=this.tilesetArray[1][2];
this.tilesetArray[2][1]=this.tilesetArray[2][2];
var _f3=0;
var _f4=1;
this.tilesetArray[0][2]=new tileset_t(this);
this.tilesetArray[0][2].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+-1,this.tilesetArray[1][1].tilesetY+_f4,this.zoom);
this.tilesetArray[1][2]=new tileset_t(this);
this.tilesetArray[1][2].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+0,this.tilesetArray[1][1].tilesetY+_f4,this.zoom);
this.tilesetArray[2][2]=new tileset_t(this);
this.tilesetArray[2][2].loadByTilesetCoordinates(this.tilesetArray[1][1].tilesetX+1,this.tilesetArray[1][1].tilesetY+_f4,this.zoom);
}
}
catch(ex){
jsExDebug("map_fillLastRow",ex);
}
}
function map_fillAll(){
try{
if(this.tileX<0||this.tileY<0){
jsDebug("map_fillAll does not support negative tileX/Y values yet");
return;
}
var _f5;
var _f6;
this.resetIndexX();
this.resetIndexY();
for(var x=0;x<this.tileArray.length;x++){
for(var y=0;y<this.tileArray[x].length;y++){
_f5=this.tileY+y;
_f6=this.tileX+x;
if(_f6<this.TILESET_WIDTH){
if(_f5<this.TILESET_HEIGHT){
this.tileArray[x][y].setPositionInformation(this.tilesetArray[1][1].tilesetX,this.tilesetArray[1][1].tilesetY,_f6,_f5,this.zoom);
this.tileArray[x][y].setSource(this.getBaseTilePath(this.tileArray[x][y].positionInformation));
}else{
this.tileArray[x][y].setPositionInformation(this.tilesetArray[1][1].tilesetX,this.tilesetArray[1][1].tilesetY+1,_f6,_f5-this.TILESET_HEIGHT,this.zoom);
this.tileArray[x][y].setSource(this.getBaseTilePath(this.tileArray[x][y].positionInformation));
}
}else{
if(_f6>=this.TILESET_WIDTH){
if(_f5<this.TILESET_HEIGHT){
this.tileArray[x][y].setPositionInformation(this.tilesetArray[1][1].tilesetX+1,this.tilesetArray[1][1].tilesetY,_f6-this.TILESET_WIDTH,_f5,this.zoom);
this.tileArray[x][y].setSource(this.getBaseTilePath(this.tileArray[x][y].positionInformation));
}else{
if(_f5>=this.TILESET_HEIGHT){
this.tileArray[x][y].setPositionInformation(this.tilesetArray[1][1].tilesetX+1,this.tilesetArray[1][1].tilesetY+1,_f6-this.TILESET_WIDTH,_f5-this.TILESET_HEIGHT,this.zoom);
this.tileArray[x][y].setSource(this.getBaseTilePath(this.tileArray[x][y].positionInformation));
}
}
}
}
}
}
}
catch(ex){
jsExDebug("map_fillAll",ex);
}
}
function map_getBaseTilePath(_f9){
try{
if(!SYSTEM.Environment.TILE_SERVER[this.settingTileServer]){
return;
}
switch(this.stateRenderMode){
case this.RENDER_PRE:
return SYSTEM.Environment.TILE_SERVER[this.settingTileServer].url+[this.settingMapStyle,_f9.zoom,_f9.tilesetX,_f9.tilesetY,((_f9.tileY*64)+_f9.tileX)].join("/")+".png";
case this.RENDER_LIVE:
return {isObj:true,style:this.settingMapStyle,zoom:_f9.zoom,tX:_f9.tilesetX,tY:_f9.tilesetY,tileId:((_f9.tileY*64)+_f9.tileX)};
}
}
catch(ex){
jsExDebug("map_getBaseTilePath",ex);
}
}
function map_startMarqueeZoom(_fa,_fb){
try{
if(this.marqueeElement&&this.marqueeElement.parentNode){
this.overlayElement.removeChild(this.marqueeElement);
}
this.marqueeZoomWidth=0;
this.marqueeZoomHeight=0;
_fa++;
_fb++;
var box=document.createElement("div");
box.style.border="solid 2px blue";
box.style.position="absolute";
box.style.left=_fa+"px";
box.style.top=_fb+"px";
box.style.width=this.marqueeZoomWidth+"px";
box.style.height=this.marqueeZoomHeight+"px";
box.style.visibility="visible";
this.marqueeElement=box;
if(this.marqueeStartCoordinate){
this.marqueeStartCoordinate.cleanUp();
}
this.marqueeStartCoordinate=this.getCoordinatesAtPixel(_fa,_fb);
this.marqueeStartX=_fa;
this.marqueeStartY=_fb;
}
catch(ex){
jsExDebug("map_startMarqueeZoom",ex);
}
}
function map_expandMarqueeZoom(_fd,_fe,_ff,_100){
try{
if(!this.marqueeStartCoordinate){
return;
}
if(this.marqueeElement&&!this.marqueeElement.parentNode){
this.overlayElement.appendChild(this.marqueeElement);
}
if(_fd<0){
if(_fd>-30){
_fd=-30;
}
this.marqueeElement.style.right=(this.width-this.marqueeStartX)+"px";
this.marqueeElement.style.left=null;
}else{
if(_fd<30){
_fd=30;
}
this.marqueeElement.style.right=null;
this.marqueeElement.style.left=this.marqueeStartX+"px";
}
if(_fe<0){
if(_fe>-30){
_fe=-30;
}
this.marqueeElement.style.bottom=(this.height-this.marqueeStartY)+"px";
this.marqueeElement.style.top=null;
}else{
if(_fe<30){
_fe=30;
}
this.marqueeElement.style.bottom=null;
this.marqueeElement.style.top=this.marqueeStartY+"px";
}
this.marqueeZoomWidth=_fd;
this.marqueeZoomHeight=_fe;
if(this.marqueeElement){
this.marqueeElement.style.width=Math.abs(this.marqueeZoomWidth)+"px";
this.marqueeElement.style.height=Math.abs(this.marqueeZoomHeight)+"px";
}
}
catch(ex){
jsExDebug("map_expandMarqueeZoom",ex);
}
}
function map_doMarqueeZoom(){
try{
if(this.marqueeElement&&this.marqueeElement.parentNode){
this.overlayElement.removeChild(this.marqueeElement);
this.marqueeElement=null;
}
if(!this.marqueeStartCoordinate||(Math.abs(this.marqueeZoomWidth)<=30&&Math.abs(this.marqueeZoomHeight)<=30)){
return;
}
var _101=this.getCoordinatesAtPixel(this.marqueeStartX+this.marqueeZoomWidth,this.marqueeStartY+this.marqueeZoomHeight);
var _102=new mapBoundary_t();
_102.loadCoordinates(this.marqueeStartCoordinate,_101);
this.fitBoundaryCoordinates(_102);
}
catch(ex){
jsExDebug("map_doMarqueeZoom",ex);
}
}
function map_marqueeZoomInProgress(){
try{
return (this.marqueeStartCoordinate&&this.marqueeElement?true:false);
}
catch(ex){
jsExDebug("map_marqueeZoomInProgress",ex);
}
}
function map_cancelMarqueeZoom(){
try{
if(this.marqueeElement){
this.overlayElement.removeChild(this.marqueeElement);
this.marqueeElement=null;
this.marqueeStartCoordinate=null;
}
}
catch(ex){
jsExDebug("map_cancelMarqueeZoom",ex);
}
}
function map_convertScreenToMapPixels(x,y){
try{
var ex=x+document.documentElement.scrollLeft;
var ey=y+document.documentElement.scrollTop;
var hitX=ex-this.positionX;
if(this.frame){
hitX-=this.frame.positionX;
if(this.frame.leftShadowWidth){
hitX-=this.frame.leftShadowWidth;
}
}
var hitY=ey-this.positionY;
if(this.frame){
hitY-=this.frame.positionY;
if(this.frame.topShadowHeight){
hitY-=this.frame.topShadowHeight;
}
}
return {x:hitX,y:hitY};
}
catch(ex){
jsExDebug("map_convertScreenToMapPixels",ex);
}
}
function map_clearMapObjectList(_109,_10a){
try{
if(this.mapObjectLists[_109]){
var _10b=this.mapObjectLists[_109].mapObjectType;
this.mapObjectLists[_109].cleanUp();
if(_10a){
this.mapObjectLists[_109]=new mapObjectList_t(this,_10b);
}else{
this.mapObjectLists[_109]=null;
}
}
}
catch(ex){
jsExDebug("map_clearMapObjectList",ex);
}
}
function map_updateTileServer(){
try{
var _10c=null;
var _10d=null;
if(CUSTOM_TILE_SERVER[this.settingMapStyle]&&CUSTOM_TILE_SERVER[this.settingMapStyle][this.zoom]){
_10d=CUSTOM_TILE_SERVER[this.settingMapStyle][this.zoom];
}else{
if(CUSTOM_TILE_SERVER["all"]&&CUSTOM_TILE_SERVER["all"][this.zoom]){
_10d=CUSTOM_TILE_SERVER["all"][this.zoom];
}else{
_10d=this.DEFAULT_TILE_SERVER;
}
}
if(_10d.length){
}else{
this.settingTileServer=_10d;
this.settingDBTileServer=this.SYSTEM.Environment.TILE_SERVER[this.settingTileServer].db;
}
}
catch(ex){
jsExDebug("map_clearMapObjectList",ex);
}
}
function map_clickEventHandler(_10e,me){
try{
if(!me){
var me=this;
}
if(me.settingDragToZoom){
if(me.marqueeElement&&me.marqueeElement.parentNode){
me.doMarqueeZoom();
}
}
if(me.settingSingleClickPan){
me.hideAnimationBuffer();
if(_10e.clientX||_10e.clientY){
var ex=_10e.clientX+document.documentElement.scrollLeft;
var ey=_10e.clientY+document.documentElement.scrollTop;
var hitX=ex-me.positionX;
if(me.frame){
hitX-=me.frame.positionX;
if(me.frame.leftShadowWidth){
hitX-=me.frame.leftShadowWidth;
}
}
hitX=(hitX/me.width)-0.5;
var hitY=ey-me.positionY;
if(me.frame){
hitY-=me.frame.positionY;
if(me.frame.topShadowHeight){
hitY-=me.frame.topShadowHeight;
}
}
hitY=(hitY/me.height)-0.5;
var _114=me.width*hitX;
var _115=me.height*hitY;
me.autoPan(_114,_115);
}
}else{
if(me.settingSingleClickZoom){
}
}
me.fireEvent(me.SINGLE_CLICK_EVENT,_10e,_10e.fromSVG);
}
catch(ex){
jsExDebug("map_clickEventHandler",ex);
}
}
function map_doubleClickEventHandler(_116,me){
function zoomIn(){
try{
me.resetIndexX();
me.resetIndexY();
me.zoomIn();
}
catch(ex){
jsExDebug("map_doubleClickEventHandler:zoomIn",ex);
}
}
try{
if(!me){
var me=this;
}
if(me.settingDoubleClickPan){
me.hideAnimationBuffer();
if(_116.clientX||_116.clientY){
var hit=me.getHitCoordinates(_116.clientX,_116.clientY,_116.fromSVG);
hit.x=(hit.x/me.width)-0.5;
hit.y=(hit.y/me.height)-0.5;
var _119=me.width*hit.x;
var _11a=me.height*hit.y;
me.autoPan(_119,_11a);
}
}else{
if(me.settingDoubleClickZoom){
zoomIn();
}else{
if(me.settingDoubleClickPanAndZoom){
me.panAndZoom(_116);
}
}
}
me.fireEvent(me.DOUBLE_CLICK_EVENT,_116);
}
catch(ex){
jsExDebug("map_doubleClickEventHandler",ex);
}
}
function map_dragStartEventHandler(_11b,me){
try{
if(!me){
me=this;
}
if(!me.settingDragToPan&&!me.settingDragToZoom){
return;
}
me.newDrag=true;
me.mouseX=me.SYSTEM.Event.dragStartX;
me.mouseY=me.SYSTEM.Event.dragStartY;
me.setOverlayCursor(null,"drag");
if(me.settingDragToZoom){
var _11d=me.getHitCoordinates(_11b.clientX,_11b.clientY,_11b.fromSVG);
me.startMarqueeZoom(_11d.x,_11d.y);
}
}
catch(ex){
jsExDebug("map_dragStartEventHandler",ex);
}
}
function map_dragEventHandler(_11e,me){
try{
if(!me){
me=this;
}
if(!me.settingDragToPan&&!me.settingDragToZoom){
return;
}
if(document.all){
if(this.dragEventCounter>0){
this.dragEventCounter--;
return;
}
this.dragEventCounter=4;
}
_11e.cancelBubble=true;
var _120=-(me.SYSTEM.Event.dragStartX+me.SYSTEM.Event.dragDistanceX-me.mouseX);
var _121=-(me.SYSTEM.Event.dragStartY+me.SYSTEM.Event.dragDistanceY-me.mouseY);
me.dragEventBufferX+=Math.abs(_120);
me.dragEventBufferY+=Math.abs(_121);
me.mouseX=me.SYSTEM.Event.dragStartX+me.SYSTEM.Event.dragDistanceX;
me.mouseY=me.SYSTEM.Event.dragStartY+me.SYSTEM.Event.dragDistanceY;
if(me.dragEventBufferX>3||me.dragEventBufferY>3||me.newDrag){
if(me.settingDragToPan){
me.scroll(_120,_121);
}else{
if(me.settingDragToZoom){
me.expandMarqueeZoom(me.SYSTEM.Event.dragDistanceX,me.SYSTEM.Event.dragDistanceY,_120,_121);
}
}
me.dragEventBufferX=0;
me.dragEventBufferY=0;
}
me.newDrag=false;
}
catch(ex){
jsExDebug("map_dragEventHandler",ex);
}
}
function map_dragEndEventHandler(_122,me){
try{
if(!me){
me=this;
}
if(!me.settingDragToPan&&!me.settingDragToZoom){
return;
}
me.newDrag=false;
if(me.settingDragToZoom){
me.doMarqueeZoom();
}else{
if(me.linkGroupNumbers.length){
me.SYSTEM.MapLinker.applyToGroups(me.SYSTEM.MapLinker.ACTION_SCROLL_END,me.linkGroupNumbers,me);
}
}
var e=_122?_122:window.event;
e.cancelBubble=true;
me.checkPreloadScrollMarkers();
me.setScalebar();
me.setOverlayCursor(me.stateCursorType);
}
catch(ex){
jsExDebug("map_dragEndEventHandler",ex);
}
}
function map_panelEventHandler(me){
try{
}
catch(ex){
jsExDebug("map_panelEventHandler",ex);
}
}
function map_addChildMap(map,_127,_128){
try{
this.childMaps.push({map:map,zoomOffset:_127,matchStyle:_128});
map.hidePeepelLogo();
map.setParentMap(this,this.childMaps.length-1);
map.centreOnCoordinates(this.getCentreCoordinates(),this.zoom+_127);
if(_128){
map.setStyle(this.settingMapStyle);
}
}
catch(ex){
jsExDebug("map_addChildMap",ex);
}
}
function map_removeChildMap(_129){
try{
if(this.childMaps[_129]){
this.childMaps[_129].map=null;
this.childMaps[_129].zoomOffset=null;
this.childMaps[_129]=null;
}
}
catch(ex){
jsExDebug("map_removeChildMap",ex);
}
}
function map_updateChildMap(_12a,_12b,_12c){
try{
if(this.childMaps[_12a]){
if(_12b!=null){
this.childMaps[_12a].zoomOffset=_12b;
this.childMaps[_12a].map.zoomToLevel(this.zoom+_12b);
}
if(_12c!=null){
this.childMaps[_12a].matchStyle=_12c;
this.childMaps[_12a].map.setStyle(this.settingMapStyle);
}
}
}
catch(ex){
jsExDebug("map_updateChildMap",ex);
}
}
function map_setParentMap(map,_12e){
try{
this.parentMap=map;
this.parentMapChildIndex=_12e;
}
catch(ex){
jsExDebug("map_setParentMapd",ex);
}
}
function map_unlinkFromParentMap(){
try{
if(this.parentMap){
this.parentMap.removeChildMap(this.parentMapChildIndex);
this.parentMap=null;
this.parentMapChildIndex=null;
}
}
catch(ex){
jsExDebug("map_unlinkFromParentMap",ex);
}
}
function map_recentreChildMaps(){
try{
var _12f=null;
for(var i=0;i<this.childMaps.length;i++){
childMap=this.childMaps[i];
if(childMap){
childMap.map.centreOnCoordinates(this.getCentreCoordinate(),this.zoom+childMap.zoomOffset,false,true);
}
}
}
catch(ex){
jsExDebug("map_recentreChildMaps",ex);
}
}
function map_setLinkGroupIconRefs(_131){
try{
this.linkGroupIcons=_131;
}
catch(ex){
jsExDebug("map_setLinkGroupIconRefs",ex);
}
}
function map_getLinkGroupIconRefs(){
try{
return this.linkGroupIcons;
}
catch(ex){
jsExDebug("map_getLinkGroupIconRefs",ex);
}
}
function map_resetIndexX(){
try{
while(this.indexTileBufferX>0){
var temp=this.tileArray[0];
for(var x=0;x<this.tileColumnCount-1;x++){
this.tileArray[x]=this.tileArray[x+1];
}
this.tileArray[this.tileColumnCount-1]=temp;
this.indexTileBufferX--;
}
this.indexLastTileBufferX=this.tileColumnCount-1;
this.indexSecondLastTileBufferX=this.indexLastTileBufferX-1;
if(this.indexSecondLastTileBufferX<0){
this.indexSecondLastTileBufferX=this.tileColumnCount-1;
}
}
catch(ex){
jsExDebug("map_resetIndexX",ex);
}
return;
}
function map_resetIndexY(){
try{
var temp=null;
while(this.indexTileBufferY>0){
for(var x=0;x<this.tileColumnCount;x++){
temp=this.tileArray[x][0];
for(var y=0;y<this.tileRowCount-1;y++){
this.tileArray[x][y]=this.tileArray[x][y+1];
}
this.tileArray[x][this.tileRowCount-1]=temp;
}
this.indexTileBufferY--;
}
this.indexLastTileBufferY=this.tileRowCount-1;
this.indexSecondLastTileBufferY=this.indexLastTileBufferY-1;
if(this.indexSecondLastTileBufferY<0){
this.indexSecondLastTileBufferY=this.tileRowCount-1;
}
}
catch(ex){
jsExDebug("map_resetIndexY",ex);
}
return;
}
function map_checkPreloadScrollMarkers(){
try{
if(this.tileX<this.PRELOAD_SCROLL_NEG_X){
if(this.tileY<this.PRELOAD_SCROLL_NEG_Y){
this.loadTileset(0,0,-1,-1,this.zoom);
this.loadTileset(1,0,0,-1,this.zoom);
}else{
if(this.tileY>this.PRELOAD_SCROLL_Y){
this.loadTileset(1,2,0,1,this.zoom);
this.loadTileset(0,2,-1,1,this.zoom);
}
}
this.loadTileset(0,1,-1,0,this.zoom);
}else{
if(this.tileX>this.PRELOAD_SCROLL_X){
if(this.tileY<this.PRELOAD_SCROLL_NEG_Y){
this.loadTileset(0,0,1,-1,this.zoom);
this.loadTileset(1,0,0,-1,this.zoom);
}else{
if(this.tileY>this.PRELOAD_SCROLL_Y){
this.loadTileset(1,2,0,1,this.zoom);
this.loadTileset(0,2,1,1,this.zoom);
}
}
this.loadTileset(2,1,1,0,this.zoom);
}else{
if(this.tileY>this.PRELOAD_SCROLL_Y){
this.loadTileset(1,0,0,-1,this.zoom);
}else{
if(this.tileY<this.PRELOAD_SCROLL_NEG_Y){
this.loadTileset(1,2,0,1,this.zoom);
}
}
}
}
}
catch(ex){
jsExDebug("map_checkPreloadScrollMarkers",ex);
}
}
function map_calculateEdge(_137,_138,_139,_13a){
try{
var _13b=((this.width/2)-_139)/this.TILE_WIDTH;
var _13c=((this.height/2)-_13a)/this.TILE_HEIGHT;
this.tileX=_137-Math.ceil(_13b);
this.tileY=_138-Math.ceil(_13c);
var _13d=0;
while(this.tileX<0){
this.tileX+=this.TILESET_WIDTH;
_13d++;
}
var _13e=0;
while(this.tileY<0){
this.tileY+=this.TILESET_HEIGHT;
_13e++;
}
var _13f=(1-(_13b-Math.floor(_13b)))*this.TILE_WIDTH;
var _140=(1-(_13c-Math.floor(_13c)))*this.TILE_HEIGHT;
var _141=0-_13f;
var _142=0-_140;
for(var y=0;y<this.tileRowCount;y++){
for(var x=0;x<this.tileColumnCount;x++){
this.tileArray[x][y].setPosition(Math.floor(_141),Math.floor(_142));
_141+=this.TILE_WIDTH;
}
_142+=this.TILE_HEIGHT;
_141=0-_13f;
}
return {x:_13d,y:_13e};
}
catch(ex){
jsExDebug("map_calculateEdge",ex);
}
}
function map_loadTileset(_145,_146,_147,_148,zoom){
try{
var _147=parseInt(_147);
var _148=parseInt(_148);
var _14a=this.tilesetArray[_145][_146];
var _14b=this.tilesetArray[1][1];
if(_14a&&_14a.tilesetX==(_14b.tilesetX+_147)&&_14a.tilesetY==(_14b.tilesetY+_148)){
return;
}
var _14c=new tileset_t(this);
if(!_14c.loadByTilesetCoordinates(_14b.tilesetX+_147,_14b.tilesetY+_148,zoom)){
}
this.tilesetArray[_145][_146]=_14c;
if(!_145&&!_146){
this.currentTileset=_14c;
}
}
catch(ex){
jsExDebug("map_loadTileset",ex);
}
}
function map_loadCurrentTileset(x,y,zoom){
try{
var _150=new tileset_t(this);
if(!_150.loadByTilesetCoordinates(x,y,zoom)){
}
this.tilesetArray[1][1]=_150;
this.currentTileset=_150;
this.checkPreloadScrollMarkers();
this.fillAll();
}
catch(ex){
jsExDebug("map_loadCurrentTileset",ex);
}
}
function map_calculateCentre(){
try{
this.resetIndexX();
this.resetIndexY();
var _151=this.width/2;
var _152=this.height/2;
this.centreTilesetArrayIndexX=1;
this.centreTilesetArrayIndexY=1;
this.centreTilesetPositionX=this.tilesetArray[1][1].tilesetX;
this.centreTilesetPositionY=this.tilesetArray[1][1].tilesetY;
this.centreTileX=parseInt((_151-this.tileArray[0][0].positionX)/this.TILE_WIDTH);
this.centrePixelX=parseInt(((_151-this.tileArray[0][0].positionX)%this.TILE_WIDTH));
this.centreTileY=parseInt((_152-this.tileArray[0][0].positionY)/this.TILE_HEIGHT);
this.centrePixelY=parseInt(((_152-this.tileArray[0][0].positionY)%this.TILE_HEIGHT));
if(this.centreTileX+this.tileX>this.TILESET_WIDTH){
this.centreTilesetArrayIndexX++;
this.centreTilesetPositionX++;
}
if(this.centreTileY+this.tileY>this.TILESET_HEIGHT){
this.centreTilesetArrayIndexY++;
this.centreTilesetPositionY++;
}
this.centrePercentageX=this.centrePixelX/this.TILE_WIDTH;
this.centrePercentageY=this.centrePixelY/this.TILE_HEIGHT;
}
catch(ex){
jsExDebug("map_calculateCentre; ",ex);
}
}
function map_scroll(_153,_154,_155){
try{
if(this.scrollLock){
return;
}
var _156=null;
var _157=null;
for(var i=0;i<this.childMaps.length;i++){
_157=this.childMaps[i];
if(_157){
_156=Math.pow(2,Math.abs(_157.zoomOffset));
if(_157.zoomOffset<0){
_157.map.scroll(_153/_156,_154/_156,true);
}else{
_157.map.scroll(_153*_156,_154*_156,true);
}
}
}
if(this.linkGroupNumbers.length&&!_155){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_SCROLL,this.linkGroupNumbers,this,_153,_154);
}
this.currentCoordinateClean=false;
this.hideAnimationBuffer();
var _159=this.tileColumnCount;
var _15a=this.tileRowCount;
var _15b=null;
var tile=null;
for(var x=0;x<_159;x++){
_15b=this.tileArray[x];
for(var y=0;y<_15a;y++){
_15b[y].movePosition(-_153,-_154);
}
}
var _15f=0-this.TILE_WIDTH;
var _160=null;
var _161=this.tileArray[this.indexTileBufferX][0].positionX;
while(_161<_15f){
this.resetIndexY();
for(var y=0;y<this.tileArray[0].length;y++){
_160=this.tileArray[this.indexTileBufferX][y];
_160.hide();
_160.setPosition(this.tileArray[this.indexLastTileBufferX][0].positionX+this.TILE_WIDTH,null);
}
this.tileX++;
this.indexTileBufferX++;
if(this.indexTileBufferX>=this.tileArray.length){
this.indexTileBufferX-=this.tileArray.length;
}
_161=this.tileArray[this.indexTileBufferX][0].positionX;
this.indexLastTileBufferX=(this.indexTileBufferX-1);
if(this.indexLastTileBufferX<0){
this.indexLastTileBufferX=this.tileArray.length-1;
}
this.indexSecondLastTileBufferX=this.indexLastTileBufferX-1;
if(this.indexSecondLastTileBufferX<0){
this.indexSecondLastTileBufferX=this.tileArray.length-1;
}
this.fillLastColumn();
}
_160=null;
while(this.tileArray[this.indexTileBufferX][0].positionX>0){
this.resetIndexY();
for(var y=0;y<this.tileArray[0].length;y++){
_160=this.tileArray[this.indexLastTileBufferX][y];
_160.hide();
_160.setPosition(this.tileArray[this.indexTileBufferX][0].positionX-this.TILE_WIDTH,null);
}
this.tileX--;
this.indexTileBufferX--;
if(this.indexTileBufferX<0){
this.indexTileBufferX+=this.tileArray.length;
}
this.indexLastTileBufferX=(this.indexTileBufferX-1);
if(this.indexLastTileBufferX<0){
this.indexLastTileBufferX=this.tileArray.length-1;
}
this.indexSecondTileBufferX=this.indexTileBufferX+1;
if(this.indexSecondTileBufferX>=this.tileArray.length){
this.indexSecondTileBufferX-=this.tileArray.length;
}
this.fillFirstColumn();
}
var _162=0-this.TILE_HEIGHT;
_160=null;
while(this.tileArray[0][this.indexTileBufferY].positionY<_162){
this.resetIndexX();
for(var x=0;x<this.tileArray.length;x++){
_160=this.tileArray[x][this.indexTileBufferY];
_160.hide();
_160.setPosition(null,this.tileArray[0][this.indexLastTileBufferY].positionY+this.TILE_HEIGHT);
}
this.tileY++;
this.indexTileBufferY++;
if(this.indexTileBufferY>=this.tileArray[0].length){
this.indexTileBufferY-=this.tileArray[0].length;
}
this.indexLastTileBufferY=(this.indexTileBufferY-1);
if(this.indexLastTileBufferY<0){
this.indexLastTileBufferY=this.tileArray[0].length-1;
}
this.indexSecondLastTileBufferY=this.indexLastTileBufferY-1;
if(this.indexSecondLastTileBufferY<0){
this.indexSecondLastTileBufferY=this.tileArray[0].length-1;
}
this.fillLastRow();
}
_160=null;
while(this.tileArray[0][this.indexTileBufferY].positionY>0){
this.resetIndexX();
for(var x=0;x<this.tileArray.length;x++){
_160=this.tileArray[x][this.indexLastTileBufferY];
_160.hide();
_160.setPosition(null,this.tileArray[0][this.indexTileBufferY].positionY-this.TILE_HEIGHT);
}
this.tileY--;
this.indexTileBufferY--;
if(this.indexTileBufferY<0){
this.indexTileBufferY+=this.tileArray[0].length;
}
this.indexLastTileBufferY=(this.indexTileBufferY-1);
if(this.indexLastTileBufferY<0){
this.indexLastTileBufferY=this.tileArray[0].length-1;
}
this.indexSecondTileBufferY=this.indexTileBufferY+1;
if(this.indexSecondTileBufferY>=this.tileArray[0].length){
this.indexSecondTileBufferY-=this.tileArray[0].length;
}
this.fillFirstRow();
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("map_scroll",ex);
}
}
function map_drawMapObjects(){
try{
var _163=this.getBoundaryCoordinates();
var _164=_163.topLeft.mercX;
var _165=_163.topLeft.mercY;
var _166=_163.bottomRight.mercX;
var _167=_163.bottomRight.mercY;
var _168=_164-this.OFFMAP_TRACKING_TOLERANCE;
var _169=_166+this.OFFMAP_TRACKING_TOLERANCE;
var _16a=_165+this.OFFMAP_TRACKING_TOLERANCE;
var _16b=_167-this.OFFMAP_TRACKING_TOLERANCE;
var _16c=_166-_164;
var _16d=_167-_165;
var _16e=this.mapObjectLists;
var _16f=null;
var _170=null;
for(var i=0;i<_16e.length;i++){
if(!_16e[i]||!_16e[i].isVisible()){
continue;
}
_16f=_16e[i].mapObjectArray;
for(var j=0;j<_16f.length;j++){
_170=_16f[j];
if(!_170){
continue;
}
if(!_170.coordinate.cleanUpIndex){
jsDebugText("map_drawMapObjects: Coordinate has been cleaned up already (toString='"+_170.coordinate+"', hashstring='"+_170.hashString+"')");
continue;
}
if(_170.coordinate.mercX>_168&&_170.coordinate.mercX<_169&&_170.coordinate.mercY<_16a&&_170.coordinate.mercY>_16b){
var _173=(this.width*((_170.coordinate.mercX-_164)/_16c));
var _174=(this.height*((_170.coordinate.mercY-_165)/_16d));
var _175=false;
var _176=_170.getOffMapCheckX();
var _177=_170.getOffMapCheckY();
if((_174-_177)<0){
_174=_177;
_175=true;
}
if((_173-_176)<0){
_173=_176;
_175=true;
}
if((_173+(_170.settingOnMapWidth-_176))>this.width){
_173=this.width-(_170.settingOnMapWidth-_176);
_175=true;
}
if((_174+(_170.settingOnMapHeight-_177))>this.height){
_174=this.height-(_170.settingOnMapHeight-_177);
_175=true;
}
_170.setPosition(_173,_174);
if(_175){
_170.setOffMapMode();
}else{
_170.setOnMapMode();
}
}else{
_170.hide();
}
}
}
_163.cleanUp();
_163=null;
this.mapInfoContainer.updatePosition();
}
catch(ex){
jsExDebug("map_drawMapObjects",ex);
}
}
function map_addMapObjectList(_178){
try{
this.mapObjectLists[this.mapObjectLists.length]=_178;
this.drawMapObjects();
return this.mapObjectLists.length-1;
}
catch(ex){
jsExDebug("map_addMapObjectList",ex);
}
}
function map_setScalebar(){
try{
if(!this.settingUseScalebar){
return;
}
var _179=150;
var _17a=this.getBoundaryCoordinates();
if(!_17a){
return;
}
var _17b=_17a.topLeft.getDecimalCoordinates();
var _17c=_17a.bottomRight.getDecimalCoordinates();
var _17d=(_17b.y+_17c.y)*0.5;
if(_17d>88||_17d<-88){
this.scalebar.hide();
return;
}else{
this.scalebar.show();
}
var _17e=distanceBetweenTwoCoordinates(_17d,_17b.x,_17d,_17c.x);
var _17f=_17e*(_179/this.width);
var _180=0;
var _181=1;
switch(true){
case _17f>10000000:
_181=10000000;
break;
case _17f>5000000:
_181=5000000;
break;
case _17f>2000000:
_181=2000000;
break;
case _17f>1000000:
_181=1000000;
break;
case _17f>500000:
_181=500000;
break;
case _17f>200000:
_181=200000;
break;
case _17f>100000:
_181=100000;
break;
case _17f>50000:
_181=50000;
break;
case _17f>20000:
_181=20000;
break;
case _17f>10000:
_181=10000;
break;
case _17f>5000:
_181=5000;
break;
case _17f>2000:
_181=2000;
break;
case _17f>1000:
_181=1000;
break;
case _17f>500:
_181=500;
break;
case _17f>200:
_181=200;
break;
case _17f>100:
_181=100;
break;
case _17f>50:
_181=50;
break;
case _17f>20:
_181=20;
break;
case _17f>10:
_181=10;
break;
case _17f>5:
_181=5;
break;
case _17f>2:
_181=2;
break;
}
_180=_179-(((_17f-_181)/_17f)*_179);
var unit="";
if(_181<1000){
unit="m";
}else{
unit="km";
_181/=1000;
}
this.scalebar.setUnits(unit);
this.scalebar.setValue(_181);
this.scalebar.setDimensions(_180);
_17a.cleanUp();
}
catch(ex){
jsExDebug("map_setScalebar",ex);
}
}
function map_addMapObject(_183,_184,_185,_186){
try{
if(!_184){
return;
}
_184.setMapReference(this);
_184.settingShowOffMap=(_185?true:false);
_184.setOpacity(1,this.OFFMAP_OPACITY);
var _187=this.mapObjectLists[_183].add(_184,_186);
if(_187!=null){
_184.attachTo(this.overlayElement);
this.mapObjectCount++;
}
return _187;
}
catch(ex){
jsExDebug("map_addMapObject",ex);
}
}
function map_removeMapObject(_188,_189){
try{
var list=this.mapObjectLists[_188];
var _18b=list.getListIndexFromHash(_189);
if(_18b!=null){
list.removeByHash(_189);
this.mapObjectCount--;
this.fireEvent(this.REMOVE_MAP_OBJECT_EVENT,null,_189);
}
return _18b;
}
catch(ex){
jsExDebug("map_removeMapObject",ex);
}
}
function map_setRenderMode(mode){
try{
if(mode){
this.stateRenderMode=mode;
}
}
catch(ex){
jsExDebug("map_setRenderMode",ex);
}
}
function map_showMapObjectList(_18d){
try{
if(this.mapObjectLists[_18d]){
this.mapObjectLists[_18d].showAll();
}
}
catch(ex){
jsExDebug("map_showMapObjectList",ex);
}
}
function map_hideMapObjectList(_18e){
try{
if(this.mapObjectLists[_18e]){
this.mapObjectLists[_18e].hideAll();
}
}
catch(ex){
jsExDebug("map_hideMapObjectList",ex);
}
}
function map_notifyDrawerInitialisation(_18f){
try{
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE){
this.drawerSVGInitialisationDelegate=_18f;
}else{
_18f.invoke();
}
}
catch(ex){
jsExDebug("map_notifyDrawerInitialisation",ex);
}
}
function map_hidePeepelLogo(){
try{
if(this.peepelLogo.parentNode==this.overlayElement){
this.overlayElement.removeChild(this.peepelLogo);
}
}
catch(ex){
jsExDebug("map_hidePeepelLogo",ex);
}
}
function map_panAndZoom(_190){
function zoomIn(){
try{
me.resetIndexX();
me.resetIndexY();
me.zoomIn();
}
catch(ex){
jsExDebug("map_doubleClickEventHandler:zoomIn",ex);
}
}
try{
var me=this;
this.hideAnimationBuffer();
if(_190.clientX||_190.clientY){
var hit=this.getHitCoordinates(_190.clientX,_190.clientY,_190.fromSVG);
if(hit.x<0||hit.y<0||hit.x>this.width||hit.y>this.height){
return false;
}
hit.x=(hit.x/this.width)-0.5;
hit.y=(hit.y/this.height)-0.5;
var _193=this.width*hit.x;
var _194=this.height*hit.y;
this.autoPan(_193,_194,zoomIn);
return true;
}
}
catch(ex){
jsExDebug("map_panAndZoom",ex);
}
}
function map_iPhoneHandler(_195,_196){
try{
if(isNaN(_196.getValue())){
this.autoPanDirection(_196.getValue());
}else{
if(_196.getValue()==-1){
this.zoomOut();
}else{
this.zoomIn();
}
}
}
catch(ex){
jsExDebug("map_iPhoneHandler",ex);
}
}
function map_startDragIEOnly(_197,me){
try{
me.stateInDragIEOnly=true;
me.SYSTEM.Event.dragStartX=_197.clientX+document.body.scrollLeft;
me.SYSTEM.Event.dragStartY=_197.clientY+document.body.scrollTop;
me.SYSTEM.Event.dragDistanceX=0;
me.SYSTEM.Event.dragDistanceY=0;
me.dragStartEventHandler(_197,me);
}
catch(ex){
jsExDebug("map_startDragIEOnly",ex);
}
}
function map_dragIEOnly(_199,me){
try{
if(me.stateInDragIEOnly){
me.SYSTEM.Event.mouseX=_199.clientX+document.body.scrollLeft;
me.SYSTEM.Event.mouseY=_199.clientY+document.body.scrollTop;
me.SYSTEM.Event.dragDistanceX=me.SYSTEM.Event.mouseX-me.SYSTEM.Event.dragStartX;
me.SYSTEM.Event.dragDistanceY=me.SYSTEM.Event.mouseY-me.SYSTEM.Event.dragStartY;
me.dragEventHandler(_199,me);
}
}
catch(ex){
jsExDebug("map_dragIEOnly",ex);
}
}
function map_endDragIEOnly(_19b,me){
try{
if(me.stateInDragIEOnly){
me.stateInDragIEOnly=false;
me.SYSTEM.Event.mouseX=null;
me.SYSTEM.Event.mouseY=null;
me.SYSTEM.Event.dragDistanceX=0;
me.SYSTEM.Event.dragDistanceY=0;
me.dragEndEventHandler(_19b,me);
}
}
catch(ex){
jsExDebug("map_endDragIEOnly",ex);
}
}
function map_cancelEventCustom(_19d){
try{
_19d.returnValue=false;
}
catch(ex){
jsExDebug("map_cancelEventCustom",ex);
}
}

try{
trackingMap_t.prototype=new map_t();
trackingMap_t.prototype.trackingMap_super=map_t.prototype.constructor;
trackingMap_t.prototype.constructor=trackingMap_t;
trackingMap_t.prototype.cleanUp=trackingMap_cleanUp;
trackingMap_t.prototype.map_cleanUp=map_t.prototype.cleanUp;
trackingMap_t.prototype.map_createDom=map_t.prototype.createDom;
trackingMap_t.prototype.createDom=trackingMap_createDom;
trackingMap_t.prototype.map_bindEvents=map_t.prototype.bindEvents;
trackingMap_t.prototype.bindEvents=trackingMap_bindEvents;
trackingMap_t.prototype.map_zoomIn=map_t.prototype.zoomIn;
trackingMap_t.prototype.zoomIn=trackingMap_zoomIn;
trackingMap_t.prototype.map_zoomOut=map_t.prototype.zoomOut;
trackingMap_t.prototype.zoomOut=trackingMap_zoomOut;
trackingMap_t.prototype.map_autoPan=map_t.prototype.autoPan;
trackingMap_t.prototype.autoPan=trackingMap_autoPan;
trackingMap_t.prototype.map_centreOnCoordinates=map_t.prototype.centreOnCoordinates;
trackingMap_t.prototype.centreOnCoordinates=trackingMap_centreOnCoordinates;
trackingMap_t.prototype.map_doMarqueeZoom=map_t.prototype.doMarqueeZoom;
trackingMap_t.prototype.doMarqueeZoom=trackingMap_doMarqueeZoom;
trackingMap_t.prototype.map_dragEventHandler=map_t.prototype.dragEventHandler;
trackingMap_t.prototype.dragEventHandler=trackingMap_dragEventHandler;
trackingMap_t.prototype.map_dragEndEventHandler=map_t.prototype.dragEndEventHandler;
trackingMap_t.prototype.dragEndEventHandler=trackingMap_dragEndEventHandler;
trackingMap_t.prototype.map_addMapObject=map_t.prototype.addMapObject;
trackingMap_t.prototype.addMapObject=trackingMap_addMapObject;
trackingMap_t.prototype.map_removeMapObject=map_t.prototype.removeMapObject;
trackingMap_t.prototype.removeMapObject=trackingMap_removeMapObject;
trackingMap_t.prototype.drawMapObjects=trackingMap_drawMapObjects;
trackingMap_t.prototype.addMapObjectList=trackingMap_addMapObjectList;
trackingMap_t.prototype.showPoi=trackingMap_showPoi;
trackingMap_t.prototype.showSearchResult=trackingMap_showSearchResult;
trackingMap_t.prototype.showContact=trackingMap_showContact;
trackingMap_t.prototype.addSignificantPoints=trackingMap_addSignificantPoints;
trackingMap_t.prototype.showHistoryLocation=trackingMap_showHistoryLocation;
trackingMap_t.prototype.showUserLocation=trackingMap_showUserLocation;
trackingMap_t.prototype.waitForNextUserLocation=trackingMap_waitForNextUserLocation;
trackingMap_t.prototype.showPublicPoint=trackingMap_showPublicPoint;
trackingMap_t.prototype.showPublicUserLocation=trackingMap_showPublicUserLocation;
trackingMap_t.prototype.showMediaLocation=trackingMap_showMediaLocation;
trackingMap_t.prototype.hidePastLocations=trackingMap_hidePastLocations;
trackingMap_t.prototype.showPastLocations=trackingMap_showPastLocations;
trackingMap_t.prototype.removePoi=trackingMap_removePoi;
trackingMap_t.prototype.removeSearchResult=trackingMap_removeSearchResult;
trackingMap_t.prototype.removeContact=trackingMap_removeContact;
trackingMap_t.prototype.removeUserLocation=trackingMap_removeUserLocation;
trackingMap_t.prototype.removePublicUserLocation=trackingMap_removePublicUserLocation;
trackingMap_t.prototype.updatePoi=trackingMap_updatePoi;
trackingMap_t.prototype.startFollowingUser=trackingMap_startFollowingUser;
trackingMap_t.prototype.stopFollowingUser=trackingMap_stopFollowingUser;
trackingMap_t.prototype.isContactOnMap=trackingMap_isContactOnMap;
trackingMap_t.prototype.isPointOnMap=trackingMap_isPointOnMap;
trackingMap_t.prototype.isUserOnMap=trackingMap_isUserOnMap;
trackingMap_t.prototype.isPublicUserOnMap=trackingMap_isPublicUserOnMap;
trackingMap_t.prototype.clearHistoryLocationTrail=trackingMap_clearHistoryLocationTrail;
trackingMap_t.prototype.deletePointCallback=trackingMap_deletePointCallback;
trackingMap_t.prototype.centreOnFollowedUsers=trackingMap_centreOnFollowedUsers;
trackingMap_t.prototype.hideLocationTrails=trackingMap_hideLocationTrails;
trackingMap_t.prototype.contactRefreshCallback=trackingMap_contactRefreshCallback;
trackingMap_t.prototype.userDetailsSaveCallback=trackingMap_userDetailsSaveCallback;
trackingMap_t.prototype.drawLocationTrails=trackingMap_drawLocationTrails;
trackingMap_t.prototype.getNewContactTrailColour=trackingMap_getNewContactTrailColour;
trackingMap_t.prototype.highlightHistoryLocations=trackingMap_highlightHistoryLocations;
trackingMap_t.prototype.vectorHistoryClusterClickEvent=trackingMap_vectorHistoryClusterClickEvent;
trackingMap_t.prototype.getPointIdsOnMap=trackingMap_getPointIdsOnMap;
trackingMap_t.prototype.goToLatestUserLocation=trackingMap_goToLatestUserLocation;
trackingMap_t.prototype.goToLatestContactLocation=trackingMap_goToLatestContactLocation;
trackingMap_t.prototype.goToLatestPublicUserLocation=trackingMap_goToLatestPublicUserLocation;
trackingMap_t.prototype.setLabelColour=trackingMap_setLabelColour;
trackingMap_t.prototype.getListOfContactIdsOnMap=trackingMap_getListOfContactIdsOnMap;
trackingMap_t.prototype.loadCoordsFromString=trackingMap_loadCoordsFromString;
trackingMap_t.prototype.PEEPEL_POINT_LIST_INDEX=0;
trackingMap_t.prototype.PEEPEL_POINT_LIST_NAME="peepelpoints";
trackingMap_t.prototype.CONTACT_LIST_INDEX=1;
trackingMap_t.prototype.CONTACT_LIST_NAME="contacts";
trackingMap_t.prototype.SEARCH_RESULT_LIST_INDEX=2;
trackingMap_t.prototype.SEARCH_RESULT_LIST_NAME="searchresults";
trackingMap_t.prototype.HISTORY_LIST_INDEX=4;
trackingMap_t.prototype.HISTORY_LIST_NAME="other";
trackingMap_t.prototype.USER_LIST_INDEX=5;
trackingMap_t.prototype.USER_LIST_NAME="other";
trackingMap_t.prototype.PUBLIC_LOCATION_LIST_INDEX=6;
trackingMap_t.prototype.PUBLIC_LOCATION_LIST_NAME="publiclocations";
trackingMap_t.prototype.MEDIA_LIST_INDEX=7;
trackingMap_t.prototype.MEDIA_LIST_NAME="media";
trackingMap_t.prototype.MAX_PAST_CONTACT_LOCATIONS=100;
trackingMap_t.prototype.PAST_CONTACT_LOC_OPACITY_DECREMENT=0.15;
trackingMap_t.prototype.MAX_FOLLOWING_ZOOM=17;
trackingMap_t.prototype.MAX_TRAIL_LENGTH=5;
trackingMap_t.prototype.CLUSTER_PIXELS=90;
trackingMap_t.prototype.DEFAULT_LBL_COLOUR=SYSTEM.Style.DARK_BLUE_BORDER;
trackingMap_t.prototype.MAX_CLUSTER_ZOOM=14;
trackingMap_t.prototype.MIN_TRAIL_ZOOM=trackingMap_t.prototype.MAX_CLUSTER_ZOOM;
trackingMap_t.prototype.NO_CLUSTER_LIMIT=2;
trackingMap_t.prototype.FOLLOW_USER_EVENT=256;
trackingMap_t.prototype.STOP_FOLLOW_USER_EVENT=512;
trackingMap_t.prototype.FILTER_SIDEBAR_EVENT=1024;
}
catch(ex){
jsExDebug("trackingMap_t.prototype",ex);
}
function trackingMap_t(_1,_2,_3){
try{
this.trackingMap_super(_1,_2,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.listClusterFlags=[];
this.listClusterFlags[this.CONTACT_LIST_INDEX]=true;
this.listClusterFlags[this.PEEPEL_POINT_LIST_INDEX]=true;
this.listClusterFlags[this.HISTORY_LIST_INDEX]=true;
this.listClusterFlags[this.USER_LIST_INDEX]=true;
this.listClusterFlags[this.PUBLIC_LOCATION_LIST_INDEX]=true;
this.clusters=[];
this.zoomRound=[];
var _4=[];
_4[30]=0.00018310546875;
this.pastLocationsVisible=true;
for(var _5=this.MAX_ZOOM;_5>=this.MIN_ZOOM;_5--){
if(_4[_5+1]){
_4[_5]=(_4[_5+1]*2);
}else{
for(var _6=29;_6>=_5;_6--){
_4[_6]=(_4[_6+1]*2);
}
}
this.zoomRound[_5]=_4[_5]*this.CLUSTER_PIXELS;
}
this.visibleClusterPointsZoomLevel=null;
this.mapObjectLists[this.USER_LIST_INDEX]=new trackingMapObjectList_t(this,this.USER_LIST_NAME);
this.mapObjectLists[this.CONTACT_LIST_INDEX]=new trackingMapObjectList_t(this,this.CONTACT_LIST_NAME);
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX]=new trackingMapObjectList_t(this,this.PUBLIC_LOCATION_LIST_NAME);
this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX]=new mapObjectList_t(this,this.PEEPEL_POINT_LIST_NAME);
this.mapObjectLists[this.SEARCH_RESULT_LIST_INDEX]=new mapObjectList_t(this,this.SEARCH_RESULT_LIST_NAME);
this.mapObjectLists[this.HISTORY_LIST_INDEX]=new mapObjectList_t(this,this.HISTORY_LIST_NAME);
this.mapObjectLists[this.MEDIA_LIST_INDEX]=new mapObjectList_t(this,this.MEDIA_LIST_NAME);
for(var _7 in this.mapObjectLists){
this.clusters[_7]=[];
for(var j=this.MIN_ZOOM;j<=this.MAX_ZOOM;j++){
this.clusters[_7][j]=[];
}
}
this.historyLocationTrailList=[];
this.highlightedHistoryLocations=[];
this.publicUserData=[];
this.locationTrailsVisible=true;
this.contactTrailColours=[];
this.contactTrailColours[-1]="rgb(50,50,240)";
this.followedContacts=[];
this.followedUser=false;
this.followedPublicUsers=[];
this.stateHideTooltipOnNextUserLocation=false;
this.pointsActionIndex=this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_DELETE,new this.SYSTEM.Delegate(this,this.deletePointCallback));
this.contactsActionIndex=this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_SET_AVATAR,new this.SYSTEM.Delegate(this,this.contactRefreshCallback));
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ_CONTACT,new this.SYSTEM.Delegate(this,this.contactRefreshCallback),this.contactsActionIndex);
this.userDetailsActionIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_SAVE,new this.SYSTEM.Delegate(this,this.userDetailsSaveCallback));
this.currentLabelColour=this.DEFAULT_LBL_COLOUR;
if(this.SYSTEM.Settings.get("map_centre_mark")){
this.setCrosshair(this.CROSSHAIR_MEDIUM);
}
}
catch(ex){
jsExDebug("trackingMap_t",ex);
}
}
function trackingMap_cleanUp(me){
try{
if(!me){
me=this;
}
me.pastLocationsVisible=null;
me.clearMapObjectList(me.PEEPEL_POINT_LIST_INDEX);
me.clearMapObjectList(me.CONTACT_LIST_INDEX);
me.clearMapObjectList(me.SEARCH_RESULT_LIST_INDEX);
me.clearMapObjectList(me.HISTORY_LIST_INDEX);
me.clearMapObjectList(me.USER_LIST_INDEX);
me.clearMapObjectList(me.MEDIA_LIST_INDEX);
me.clearMapObjectList(me.PUBLIC_LOCATION_LIST_INDEX);
for(var _a in me.clusters){
for(var _b in me.clusters[_a]){
for(var y in me.clusters[_a][_b]){
for(var x in me.clusters[_a][_b][y]){
me.clusters[_a][_b][y][x].count=null;
me.clusters[_a][_b][y][x].clusterPoint=null;
for(var i in me.clusters[_a][_b][y][x].indexes){
me.clusters[_a][_b][y][x].indexes[i]=null;
}
me.clusters[_a][_b][y][x].indexes=null;
me.clusters[_a][_b][y][x]=null;
}
me.clusters[_a][_b][y]=null;
}
me.clusters[_a][_b]=null;
}
me.clusters[_a]=null;
}
me.clusters=null;
for(var _f in me.publicUserData){
me.publicUserData[_f]=null;
}
me.publicUserData=null;
for(contactId in me.historyLocationTrailList){
if(me.historyLocationTrailList[contactId]){
for(var i=0;i<me.historyLocationTrailList[contactId].length;i++){
me.historyLocationTrailList[contactId][i]=null;
}
me.historyLocationTrailList[contactId]=null;
}
}
me.historyLocationTrailList=null;
for(i=0;i<me.highlightedHistoryLocations.length;i++){
me.highlightedHistoryLocations[i]=null;
}
me.highlightedHistoryLocations=null;
for(contactId in me.followedContacts){
me.followedContacts[contactId]=null;
}
me.followedContacts=null;
for(_f in me.followedPublicUsers){
me.followedPublicUsers[_f]=null;
}
me.followedPublicUsers=null;
me.followedUser=null;
me.locationTrailsVisible=null;
for(var id in me.contactTrailColours){
me.contactTrailColours[id]=null;
}
me.contactTrailColours=null;
if(me.SYSTEM.PeepelPoints){
me.SYSTEM.PeepelPoints.unregisterActionListener(me.pointsActionIndex);
me.pointsActionIndex=null;
}
if(me.SYSTEM.Contacts){
me.SYSTEM.Contacts.unregisterActionListener(me.contactsActionIndex);
me.contactsActionIndex=null;
}
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsActionIndex);
me.userDetailsActionIndex=null;
}
me.stateHideTooltipOnNextUserLocation=null;
for(var zl in me.zoomRound){
me.zoomRound[zl]=null;
}
me.zoomRound=null;
for(var i in me.listClusterFlags){
me.listClusterFlags[i]=null;
}
me.listClusterFlags=null;
me.map_cleanUp();
}
catch(ex){
jsExDebug("trackingMap_cleanup",ex);
}
}
function trackingMap_createDom(){
try{
this.map_createDom();
}
catch(ex){
jsExDebug("trackingMap_createDom",ex);
}
}
function trackingMap_bindEvents(){
try{
this.map_bindEvents();
}
catch(ex){
jsExDebug("trackingMap_bindEvents",ex);
}
}
function trackingMap_zoomIn(_12,_13){
try{
this.hideLocationTrails();
var _14=this.zoom;
var _15=this.map_zoomIn(_12,_13);
if(!_15){
this.drawLocationTrails();
}
}
catch(ex){
jsExDebug("trackingMap_zoomIn",ex);
}
}
function trackingMap_zoomOut(_16,_17){
try{
this.hideLocationTrails();
var _18=this.zoom;
var _19=this.map_zoomOut(_16,_17);
if(!_19){
this.drawLocationTrails();
}
}
catch(ex){
jsExDebug("trackingMap_zoomOut",ex);
}
}
function trackingMap_autoPan(_1a,_1b,_1c,_1d){
function finished(me){
me.drawLocationTrails();
if(_1c){
_1c(_1d);
}
}
try{
this.hideLocationTrails();
this.map_autoPan(_1a,_1b,finished,this);
}
catch(ex){
jsExDebug("trackingMap_autoPan",ex);
}
}
function trackingMap_centreOnCoordinates(_1f,_20,_21,_22){
try{
this.hideLocationTrails();
var _23=this.zoom;
this.map_centreOnCoordinates(_1f,_20,_21,_22);
if(this.zoom<this.MIN_TRAIL_ZOOM){
this.hidePastLocations();
}else{
this.showPastLocations();
}
this.drawLocationTrails();
}
catch(ex){
jsExDebug("trackingMap_centreOnCoordinates",ex);
}
}
function trackingMap_doMarqueeZoom(){
try{
this.hideLocationTrails();
this.map_doMarqueeZoom();
}
catch(ex){
jsExDebug("trackingMap_doMarqueeZoom",ex);
}
}
function trackingMap_dragEventHandler(_24,me){
try{
if(!me){
me=this;
}
if(me.settingDragToPan){
if(me.newDrag){
me.hideLocationTrails();
}
}
me.map_dragEventHandler(_24,me);
}
catch(ex){
jsExDebug("trackingMap_dragEventHandler",ex);
}
}
function trackingMap_dragEndEventHandler(_26,me){
try{
if(!me){
me=this;
}
me.map_dragEndEventHandler(_26,me);
me.drawLocationTrails();
}
catch(ex){
jsExDebug("trackingMap_dragEndEventHandler",ex);
}
}
function trackingMap_deletePointCallback(_28){
try{
var _29=null;
var _2a=this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX];
for(var i=0;i<_2a.mapObjectArray.length;i++){
_29=_2a.mapObjectArray[i];
if(_29&&_29.pointId==_28){
if(_29.mapInfoClicked){
this.mapInfoContainer.hide();
}
this.removeMapObject(this.PEEPEL_POINT_LIST_INDEX,_29.getHashString());
return;
}
}
}
catch(ex){
jsExDebug("trackingMap_deletePointCallback",ex);
}
}
function trackingMap_centreOnFollowedUsers(){
try{
var _2c=null;
var _2d=null;
var _2e=null;
var _2f=null;
var _30=0;
var _31=null;
for(var _32 in this.followedContacts){
if(this.followedContacts[_32]){
_31=this.SYSTEM.Contacts.getContactLocation(_32);
if(!_31){
continue;
}
if(!_2c||_31.mercX<_2c){
_2c=_31.mercX;
}
if(!_2d||_31.mercY<_2d){
_2d=_31.mercY;
}
if(!_2e||_31.mercX>_2e){
_2e=_31.mercX;
}
if(!_2f||_31.mercY>_2f){
_2f=_31.mercY;
}
_30++;
}
}
for(var _33 in this.followedPublicUsers){
if(this.followedPublicUsers[_33]){
_31=this.SYSTEM.Tracking.getUserLocation(_33);
if(!_31){
continue;
}
if(!_2c||_31.mercX<_2c){
_2c=_31.mercX;
}
if(!_2d||_31.mercY<_2d){
_2d=_31.mercY;
}
if(!_2e||_31.mercX>_2e){
_2e=_31.mercX;
}
if(!_2f||_31.mercY>_2f){
_2f=_31.mercY;
}
_30++;
}
}
if(this.followedUser){
_31=this.SYSTEM.Tracking.getUserLocation(this.SYSTEM.Tracking.USER_ID);
if(_31){
if(!_2c||_31.mercX<_2c){
_2c=_31.mercX;
}
if(!_2d||_31.mercY<_2d){
_2d=_31.mercY;
}
if(!_2e||_31.mercX>_2e){
_2e=_31.mercX;
}
if(!_2f||_31.mercY>_2f){
_2f=_31.mercY;
}
_30++;
}
}
if(_30){
if(_30==1){
this.centreOnCoordinates(_31);
}else{
var _34=(_2e-_2c)/6;
var _35=(_2f-_2d)/6;
var _36=new mapBoundary_t(_2c-_34,_2e+_34,_2f+_35,_2d-_35,1);
this.fitBoundaryCoordinates(_36,this.MAX_FOLLOWING_ZOOM);
}
}
}
catch(ex){
jsExDebug("trackingMap_centreOnFollowedUsers",ex);
}
}
function trackingMap_hideLocationTrails(){
try{
if(!this.locationTrailsVisible){
return;
}
var _37=null;
var _38=null;
this.mapObjectLists[this.CONTACT_LIST_INDEX].hideTrails();
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].hideTrails();
this.mapObjectLists[this.USER_LIST_INDEX].hideTrails();
var _39=null;
for(contactId in this.historyLocationTrailList){
_39=this.historyLocationTrailList[contactId];
if(_39){
for(var i=0;i<_39.length;i++){
_39[i].hideNextTrackableObjectLines();
}
}
}
this.locationTrailsVisible=false;
}
catch(ex){
jsExDebug("trackingMap_hideLocationTrails",ex);
}
}
function trackingMap_contactRefreshCallback(_3b){
try{
var _3c=null;
var _3d=this.mapObjectLists[this.CONTACT_LIST_INDEX];
for(var i=0;i<_3d.mapObjectArray.length;i++){
_3c=_3d.mapObjectArray[i];
if(_3c&&_3c.cleanUpIndex&&_3c.getContactId&&_3c.getContactId()==_3b){
_3c.updateFromContact();
}
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_contactRefreshCallback",ex);
}
}
function trackingMap_userDetailsSaveCallback(){
try{
var _3f=null;
var _40=this.mapObjectLists[this.USER_LIST_INDEX];
for(var i=0;i<_40.mapObjectArray.length;i++){
_3f=_40.mapObjectArray[i];
if(_3f&&_3f.isUserLocation){
_3f.updateFromUserDetails();
}
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_userDetailsSaveCallback",ex);
}
}
function trackingMap_drawLocationTrails(_42){
try{
if(this.locationTrailsVisible&&!_42){
return;
}
this.drawMapObjects();
this.mapObjectLists[this.CONTACT_LIST_INDEX].drawTrails();
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].drawTrails();
this.mapObjectLists[this.USER_LIST_INDEX].drawTrails();
var _43=null;
for(contactId in this.historyLocationTrailList){
_43=this.historyLocationTrailList[contactId];
if(_43){
for(var i=0;i<_43.length;i++){
if(_43[i]){
_43[i].redrawTrails();
}
}
}
}
this.locationTrailsVisible=true;
}
catch(ex){
jsExDebug("trackingMap_drawLocationTrails "+contactId+","+i,ex);
}
}
function trackingMap_getNewContactTrailColour(_45){
try{
var _46="rgb("+parseInt(Math.random()*125)+","+parseInt(Math.random()*125)+","+parseInt(Math.random()*125)+")";
var _47=false;
while(!_47){
_47=true;
for(var id in this.contactTrailColours){
if(this.contactTrailColours[id]==_46){
_46="rgb("+parseInt(Math.random()*125)+","+parseInt(Math.random()*125)+","+parseInt(Math.random()*125)+")";
_47=false;
break;
}
}
}
this.contactTrailColours[_45]=_46;
}
catch(ex){
jsExDebug("trackingMap_getNewContactTrailColour",ex);
}
}
function trackingMap_getPointIdsOnMap(_49){
try{
var mos=this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX].mapObjectArray;
var ids=[];
for(var i=0;i<mos.length;i++){
if(mos[i]&&mos[i].pointId&&(_49||!mos[i].isPublic)){
ids.push(mos[i].pointId);
}
}
return ids;
}
catch(ex){
jsExDebug("trackingMap_getPointIdsOnMap",ex);
}
}
function trackingMap_goToLatestUserLocation(){
try{
var _4d=this.mapObjectLists[this.USER_LIST_INDEX].getLatestCoordinate(this.SYSTEM.Tracking.USER_ID);
if(_4d){
this.centreOnCoordinates(_4d,this.zoom);
this.drawMapObjects();
}
}
catch(ex){
jsExDebug("trackingMap_goToLatestUserLocation",ex);
}
}
function trackingMap_goToLatestContactLocation(_4e){
try{
var _4f=this.mapObjectLists[this.CONTACT_LIST_INDEX].getLatestCoordinate(_4e);
if(_4f){
this.centreOnCoordinates(_4f,this.zoom);
this.drawMapObjects();
}
}
catch(ex){
jsExDebug("trackingMap_goToLatestContactLocation",ex);
}
}
function trackingMap_goToLatestPublicUserLocation(_50){
try{
var _51=this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].getLatestCoordinate(_50);
if(_51){
this.centreOnCoordinates(_51,this.zoom);
this.drawMapObjects();
}
}
catch(ex){
jsExDebug("trackingMap_goToLatestPublicUserLocation",ex);
}
}
function trackingMap_setLabelColour(_52){
try{
if(_52){
this.currentLabelColour=_52;
}else{
this.currentLabelColour=this.DEFAULT_LBL_COLOUR;
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_setLabelColour",ex);
}
}
function trackingMap_getListOfContactIdsOnMap(){
try{
return this.mapObjectLists[this.CONTACT_LIST_INDEX].getIdsInList();
}
catch(ex){
jsExDebug("trackingMap_getListOfContactIdsOnMap",ex);
}
}
function trackingMap_loadCoordsFromString(_53){
try{
var _54=_53.split("\n");
var _55=null;
for(var i=0;i<_54.length;i++){
if(_54[i].length){
_55=_54[i].split(",");
var _57=new mapCoordinate_t(parseFloat(_55[0]),parseFloat(_55[1]),1);
_57.getMercatorCoordinates();
_57.setZoom(this.zoom);
this.addMapObject(this.HISTORY_LIST_INDEX,new mapDot_t(_57,null,20));
}
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_loadCoordsFromString",ex);
}
}
function trackingMap_addMapObject(_58,_59,_5a,_5b){
try{
var _5c=this.map_addMapObject(_58,_59,_5a,_5b);
if(_5c==null){
return null;
}
var _5d=_59.coordinate.mercX;
var _5e=_59.coordinate.mercY;
var _5f=true;
for(var z in this.clusters[_58]){
z=parseFloat(z);
_5f=true;
if(_59 instanceof mapSignificantPoint_t){
_5f=false;
}
if(this.listClusterFlags[_58]&&z<this.MAX_CLUSTER_ZOOM&&_5f){
var _61=this.zoomRound[z];
var x=Math.floor(_5d/_61)*_61;
var y=Math.floor(_5e/_61)*_61;
}else{
var x=_5d;
var y=_5e;
}
if(!this.clusters[_58][z][y]){
this.clusters[_58][z][y]=[];
}
if(!this.clusters[_58][z][y][x]){
this.clusters[_58][z][y][x]={count:0,clusterPoint:null,indexes:[]};
}
this.clusters[_58][z][y][x].count++;
this.clusters[_58][z][y][x].indexes.push(_5c);
if(this.clusters[_58][z][y][x].count>this.NO_CLUSTER_LIMIT){
var _64=this.mapObjectLists[_58];
if(this.clusters[_58][z][y][x].clusterPoint==null){
switch(_58){
case this.HISTORY_LIST_INDEX:
var _65=new vectorHistoryClusterPoint_t(_59.coordinate.copy(),this.drawer,z,_64,this.clusters[_58][z][y][x].indexes);
_65.setClickDelegate(_59.clickDelegate);
break;
case this.PEEPEL_POINT_LIST_INDEX:
var _65=new mapPointClusterPoint_t(_59.coordinate.copy(),z,_64,this.clusters[_58][z][y][x].indexes);
break;
default:
var _65=new mapClusterPoint_t(_59.coordinate.copy(),z,_64,this.clusters[_58][z][y][x].indexes);
}
_65.hide();
var _66=this.map_addMapObject(_58,_65,false);
this.clusters[_58][z][y][x].clusterPoint=_66;
}else{
var _65=_64.getByListIndex(this.clusters[_58][z][y][x].clusterPoint);
_65.updateCluster(this.clusters[_58][z][y][x].indexes);
}
}
}
return _5c;
}
catch(ex){
jsExDebug("trackingMap_addMapObject",ex);
}
}
function trackingMap_removeMapObject(_67,_68){
try{
var _69=this.map_removeMapObject(_67,_68);
for(var z in this.clusters[_67]){
for(var y in this.clusters[_67][z]){
for(var x in this.clusters[_67][z][y]){
for(var i=0;i<this.clusters[_67][z][y][x].indexes.length;i++){
if(this.clusters[_67][z][y][x].indexes[i]==_69){
this.clusters[_67][z][y][x].indexes[i]=null;
delete this.clusters[_67][z][y][x].indexes[i];
this.clusters[_67][z][y][x].count--;
var _6e=this.mapObjectLists[_67];
var _6f=_6e.getByListIndex(this.clusters[_67][z][y][x].clusterPoint);
if(this.clusters[_67][z][y][x].count==this.NO_CLUSTER_LIMIT){
var _70=this.map_removeMapObject(_67,_6f.getHashString());
if(_70!=this.clusters[_67][z][y][x].clusterPoint){
}
this.clusters[_67][z][y][x].clusterPoint=null;
}else{
if(this.clusters[_67][z][y][x].count>this.NO_CLUSTER_LIMIT){
_6f.updateCluster(this.clusters[_67][z][y][x].indexes);
}
}
}
}
if(this.clusters[_67][z][y][x].count==0){
this.clusters[_67][z][y][x].count=null;
this.clusters[_67][z][y][x].indexes=null;
this.clusters[_67][z][y][x].clusterPoint=null;
this.clusters[_67][z][y][x]=null;
delete this.clusters[_67][z][y][x];
}
}
}
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_removeMapObject",ex);
}
}
function trackingMap_drawMapObjects(){
function setPositionOnMap(mo){
try{
var _72=(_73==0?0:(this.width*((mo.coordinate.mercX-_74)/_73)));
var _75=(_76==0?0:(this.height*((mo.coordinate.mercY-_77)/_76)));
var _78=false;
var _79=mo.getOffMapCheckX();
var _7a=mo.getOffMapCheckY();
if((_75-_7a)<0){
_75=_7a;
_78=true;
}
if((_72-_79)<0){
_72=_79;
_78=true;
}
if((_72+(mo.settingOnMapWidth-_79))>this.width){
_72=this.width-(mo.settingOnMapWidth-_79);
_78=true;
}
if((_75+(mo.settingOnMapHeight-_7a))>this.height){
_75=this.height-(mo.settingOnMapHeight-_7a);
_78=true;
}
mo.setPosition(_72,_75);
if(mo.widget&&mo.widget.label){
mo.widget.label.setColour(this.currentLabelColour);
}
if(_78){
mo.setOffMapMode();
}else{
mo.setOnMapMode();
}
}
catch(ex){
jsExDebug("trackingMap_drawMapObjects: setPositionOnMap",ex);
}
}
function hideObject(_7b,_7c){
try{
var _7d=this.mapObjectLists[_7b];
if(_7c.count>this.NO_CLUSTER_LIMIT&&this.listClusterFlags[_7b]){
_7d.getByListIndex(_7c.clusterPoint).hide();
}
for(var i=0;i<_7c.indexes.length;i++){
if(_7c.indexes[i]!=null){
_7d.getByListIndex(_7c.indexes[i]).hide();
}
}
}
catch(ex){
jsExDebug("trackingMap_drawMapObjects: hideObject",ex);
}
}
function showObject(_7f,_80){
try{
var mo=null;
var _82=this.mapObjectLists[_7f];
var _83=(_80.count>this.NO_CLUSTER_LIMIT)&&this.listClusterFlags[_7f];
if(_83){
var _84=_82.getByListIndex(_80.clusterPoint);
var _85=[];
for(var i in _80.indexes){
if(_80.indexes[i]!=null){
mo=_82.getByListIndex(_80.indexes[i]);
if(mo.isPastLocation&&mo.isPastLocation()){
mo.setClusterPoint(null);
setPositionOnMap.call(this,mo);
}else{
_85.push(mo);
}
}
}
_83=(_85.length>this.NO_CLUSTER_LIMIT);
for(var i=0;i<_85.length;i++){
if(_83){
_85[i].hide();
_85[i].setClusterPoint(_84);
}else{
mo.setClusterPoint(null);
setPositionOnMap.call(this,mo);
}
}
if(_83){
setPositionOnMap.call(this,_84);
}
}else{
for(var i in _80.indexes){
var mo=null;
if(_80.indexes[i]!=null){
mo=_82.getByListIndex(_80.indexes[i]);
if(!mo){
jsDebugText("trackingMap_drawMapObjects: showObject, clustered map object doesn't exist");
return;
}
setPositionOnMap.call(this,mo);
mo.setClusterPoint(null);
}
}
}
}
catch(ex){
jsExDebug("trackingMap_drawMapObjects: showObject",ex);
}
}
try{
var _87=this.getBoundaryCoordinates();
var _74=_87.topLeft.mercX;
var _77=_87.topLeft.mercY;
var _88=_87.bottomRight.mercX;
var _89=_87.bottomRight.mercY;
var _8a=_74-this.OFFMAP_TRACKING_TOLERANCE;
var _8b=_88+this.OFFMAP_TRACKING_TOLERANCE;
var _8c=_77+this.OFFMAP_TRACKING_TOLERANCE;
var _8d=_89-this.OFFMAP_TRACKING_TOLERANCE;
var _73=_88-_74;
var _76=_89-_77;
if(this.visibleClusterPointsZoomLevel!=this.zoom){
var z=this.visibleClusterPointsZoomLevel;
for(var _8f in this.clusters){
for(var y in this.clusters[_8f][z]){
for(var x in this.clusters[_8f][z][y]){
if(this.clusters[_8f][z][y][x].clusterPoint!=null){
this.mapObjectLists[_8f].getByListIndex(this.clusters[_8f][z][y][x].clusterPoint).hide();
}
}
}
}
}
for(var _8f in this.clusters){
for(var y in this.clusters[_8f][this.zoom]){
for(var x in this.clusters[_8f][this.zoom][y]){
x=parseFloat(x);
y=parseFloat(y);
if(x>_8a&&x<_8b||y<_8c&&y>_8d){
showObject.call(this,_8f,this.clusters[_8f][this.zoom][y][x]);
}else{
hideObject.call(this,_8f,this.clusters[_8f][this.zoom][y][x]);
}
}
}
}
this.visibleClusterPointsZoomLevel=this.zoom;
this.mapInfoContainer.updatePosition();
}
catch(ex){
jsExDebug("trackingMap_drawMapObjects",ex);
}
}
function trackingMap_addMapObjectList(_92,_93){
try{
var _94=this.mapObjectLists.lengthl;
this.mapObjectLists[_94]=_92;
this.clusters[_94]=[];
for(var z=this.MIN_ZOOM;z<=this.MAX_ZOOM;z++){
this.clusters[_94][z]=[];
}
if(_93){
this.listClusterFlags[_94]=true;
}
this.drawMapObjects();
return _94;
}
catch(ex){
jsExDebug("trackingMap_addMapObjectList",ex);
}
}
function trackingMap_showPoi(_96,_97,_98,_99){
try{
if(!_96){
return;
}
var _9a=_96.coordinate.copy();
if(_97){
this.centreOnCoordinates(_9a,(_98?_9a.zoom:this.zoom),false,true);
}
var _9b=new mapPoi_t(_9a,_96);
this.addMapObject(this.PEEPEL_POINT_LIST_INDEX,_9b,true);
if(_99){
this.drawMapObjects();
}
if(this.linkGroupNumbers.length){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_SHOW_POINT,this.linkGroupNumbers,this,_96,_97,_98,_99);
}
return _9b;
}
catch(ex){
jsExDebug("trackingMap_showPoi",ex);
}
}
function trackingMap_showSearchResult(_9c,_9d,_9e,_9f,_a0){
try{
this.centreOnCoordinates(_9c,null,false,true);
var _a1=_9c.getDecimalCoordinates();
var _a2=new mapSearchResult_t(_9c,_9d,_9e);
if(_a0){
this.addMapObject(_a0,_a2,true);
}else{
this.addMapObject(this.SEARCH_RESULT_LIST_INDEX,_a2,true);
}
if(_9f){
this.drawMapObjects();
}
if(this.linkGroupNumbers.length){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_SHOW_S_RESULT,this.linkGroupNumbers,this,_9c,_9d,_9f);
}
}
catch(ex){
jsExDebug("trackingMap_showSearchResult",ex);
}
}
function trackingMap_showContact(_a3,_a4,_a5,_a6,_a7){
try{
var _a8=_a4.contactId;
if(!this.isContactOnMap(_a8)){
if(!_a7){
this.centreOnCoordinates(_a3,null,false,true);
}
}else{
if(this.followedContacts[_a8]){
this.centreOnFollowedUsers();
}
}
var _a9=this.CONTACT_LIST_INDEX;
var _aa=this.mapObjectLists[_a9];
var _ab=_aa.getObjectsForId(_a8);
if(_ab){
if(_ab.length>=this.MAX_TRAIL_LENGTH){
var _ac=0;
while(_ab[_ac] instanceof mapSignificantPoint_t){
this.removeMapObject(_a9,_ab[_ac].getHashString());
_ac++;
}
this.removeMapObject(_a9,_ab[_ac].getHashString());
}
}else{
this.getNewContactTrailColour(_a8);
}
var _ad=this.contactTrailColours[_a8];
var _ae=new mapContact_t(_a3,_a4,this.contactTrailColours[_a8]);
this.addSignificantPoints(_a3,_a8,_a9,_ae,_ad);
this.addMapObject(_a9,_ae,true,_a8);
if(_a5){
this.drawLocationTrails(true);
}
if(this.linkGroupNumbers.length&&!_a6){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_SHOW_CONTACT,this.linkGroupNumbers,this,_a3,_a4,_a5);
}
return _ae;
}
catch(ex){
jsExDebug("trackingMap_showContact",ex);
}
}
function trackingMap_addSignificantPoints(_af,id,_b1,_b2,_b3){
try{
var _b4=null;
var _b5=null;
var _b6=null;
for(var i=0;i<_af.significantPoints.length;i++){
_b4=_af.significantPoints[i];
_b6=new trackingCoordinate_t(_b4.y,_b4.x,_b2.coordinate.dateFound);
_b5=new mapSignificantPoint_t(_b6,_b2.clusterDescription,_b2.clusterName,_b3);
this.addMapObject(_b1,_b5,false,id);
}
}
catch(ex){
jsExDebug("trackingMap_addSignificantPoints",ex);
}
}
function trackingMap_showHistoryLocation(_b8,_b9,_ba,_bb,_bc){
try{
}
catch(ex){
jsExDebug("trackingMap_showHistoryLocation",ex);
}
}
function trackingMap_showUserLocation(_bd,_be,_bf){
try{
if(!_bd){
return;
}
if(!_bf){
this.centreOnCoordinates(_bd,null,false,true);
}
var _c0=new mapUserLocation_t(_bd,this.contactTrailColours[-1]);
var _c1=this.mapObjectLists[this.USER_LIST_INDEX];
if(!_c1.contains(_c0.getHashString())){
var _c2=_c1.getObjectsForId(this.SYSTEM.Tracking.USER_ID);
if(_c2&&_c2.length>=this.MAX_TRAIL_LENGTH){
var _c3=0;
while(_c2[_c3] instanceof mapSignificantPoint_t){
this.removeMapObject(this.USER_LIST_INDEX,_c2[_c3].getHashString());
_c3++;
}
this.removeMapObject(this.USER_LIST_INDEX,_c2[_c3].getHashString());
}
this.addSignificantPoints(_bd,this.SYSTEM.Tracking.USER_ID,this.USER_LIST_INDEX,_c0,this.contactTrailColours[-1]);
this.addMapObject(this.USER_LIST_INDEX,_c0,true,this.SYSTEM.Tracking.USER_ID);
}else{
_c0.cleanUp();
}
if(this.followedUser){
this.centreOnFollowedUsers();
}
if(_be){
this.drawLocationTrails(true);
}
if(this.stateHideTooltipOnNextUserLocation){
this.SYSTEM.Tooltip.hideLoading();
this.stateHideTooltipOnNextUserLocation=false;
}
return _c0;
}
catch(ex){
jsExDebug("trackingMap_showUserLocation",ex);
}
}
function trackingMap_waitForNextUserLocation(){
try{
this.stateHideTooltipOnNextUserLocation=true;
}
catch(ex){
jsExDebug("trackingMap_waitForNextUserLocation",ex);
}
}
function trackingMap_showPublicPoint(_c4,_c5,_c6,_c7){
try{
if(!_c6){
this.centreOnCoordinates(_c4,null,false,true);
}
var _c8=new mapPoi_t(_c4,_c5,true);
this.addMapObject(this.PEEPEL_POINT_LIST_INDEX,_c8,true);
if(_c7){
this.drawMapObjects();
}
}
catch(ex){
jsExDebug("trackingMap_showPublicPoint",ex);
}
}
function trackingMap_showPublicUserLocation(_c9,_ca,_cb,_cc,_cd,_ce,_cf){
try{
if(!this.isPublicUserOnMap(_ca)){
if(!_cf){
this.centreOnCoordinates(_c9,null,false,true);
}
}else{
if(this.followedPublicUsers[_ca]){
this.centreOnFollowedUsers();
}
}
if(_cb&&_cc!=null){
this.publicUserData[_ca]={username:_cb,accuracy:_cc,avatar:_cd};
}
var _d0=this.PUBLIC_LOCATION_LIST_INDEX;
var _d1=this.mapObjectLists[_d0];
var _d2=_d1.getObjectsForId(_ca);
if(_d2&&(_d2.length>=this.MAX_TRAIL_LENGTH)){
var _d3=0;
while(_d2[_d3] instanceof mapSignificantPoint_t){
this.removeMapObject(_d0,_d2[_d3].getHashString());
_d3++;
}
this.removeMapObject(_d0,_d2[_d3].getHashString());
}
var _d4=this.mapObjectLists[_d0];
var _d5=new mapPublicUserLocation_t(_c9,_ca,this.publicUserData[_ca].username,this.publicUserData[_ca].accuracy,this.publicUserData[_ca].avatar);
this.addSignificantPoints(_c9,_ca,_d0,_d5);
this.addMapObject(_d0,_d5,true,_ca);
if(_ce){
this.drawLocationTrails(true);
}
return _d5;
}
catch(ex){
jsExDebug("trackingMap_showPublicUserLocation",ex);
}
}
function trackingMap_showMediaLocation(_d6){
try{
this.centreOnCoordinates(_d6,null,false,true);
var _d7=this.mapObjectLists[this.MEDIA_LIST_INDEX];
var _d8=new mapUserLocation_t(_d6,this.contactTrailColours[-1],true);
this.addMapObject(this.MEDIA_LIST_INDEX,_d8,true,-2);
return _d8;
}
catch(ex){
jsExDebug("trackingMap_showMediaLocation",ex);
}
}
function trackingMap_hidePastLocations(){
try{
if(this.pastLocationsVisible){
this.mapObjectLists[this.CONTACT_LIST_INDEX].hidePastLocations();
this.mapObjectLists[this.USER_LIST_INDEX].hidePastLocations();
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].hidePastLocations();
this.pastLocationsVisible=false;
}
}
catch(ex){
jsExDebug("trackingMap_hidePastLocations",ex);
}
}
function trackingMap_showPastLocations(){
try{
if(this.pastLocationsVisible){
return;
}
this.mapObjectLists[this.CONTACT_LIST_INDEX].showPastLocations();
this.mapObjectLists[this.USER_LIST_INDEX].showPastLocations();
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].showPastLocations();
this.pastLocationsVisible=true;
}
catch(ex){
jsExDebug("trackingMap_showPastLocations",ex);
}
}
function trackingMap_removePoi(_d9,_da){
try{
this.removeMapObject(this.PEEPEL_POINT_LIST_INDEX,_d9);
if(this.linkGroupNumbers.length&&!_da){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_REMOVE_POINT,this.linkGroupNumbers,this,_d9);
}
}
catch(ex){
jsExDebug("trackingMap_removePoi",ex);
}
}
function trackingMap_removeSearchResult(_db,_dc){
try{
this.removeMapObject(this.SEARCH_RESULT_LIST_INDEX,_db);
if(this.linkGroupNumbers.length&&!_dc){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_REMOVE_S_RESULT,this.linkGroupNumbers,this,_db);
}
}
catch(ex){
jsExDebug("trackingMap_removeSearchResult",ex);
}
}
function trackingMap_removeContact(_dd,_de){
try{
var _df=this.mapObjectLists[this.CONTACT_LIST_INDEX].getObjectsForId(_dd);
if(_df){
for(var i=0;i<_df.length;i++){
this.removeMapObject(this.CONTACT_LIST_INDEX,_df[i].getHashString());
}
this.stopFollowingUser(_dd);
}
if(this.linkGroupNumbers.length&&!_de){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_REMOVE_CONTACT,this.linkGroupNumbers,this,_dd);
}
}
catch(ex){
jsExDebug("trackingMap_removeContact",ex);
}
}
function trackingMap_removeUserLocation(_e1){
try{
if(_e1){
this.removeMapObject(this.MEDIA_LIST_INDEX,_e1);
}else{
var _e2=this.mapObjectLists[this.USER_LIST_INDEX].getObjectsForId(this.SYSTEM.Tracking.USER_ID);
for(var i=0;i<_e2.length;i++){
this.removeMapObject(this.USER_LIST_INDEX,_e2[i].getHashString());
}
this.stopFollowingUser(null,true);
}
}
catch(ex){
jsExDebug("trackingMap_removeUserLocation",ex);
}
}
function trackingMap_removePublicUserLocation(_e4){
try{
var _e5=this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].getObjectsForId(_e4);
for(var i=0;i<_e5.length;i++){
this.removeMapObject(this.PUBLIC_LOCATION_LIST_INDEX,_e5[i].getHashString());
}
this.stopFollowingUser(null,null,_e4);
this.publicUserData[_e4]=null;
}
catch(ex){
jsExDebug("trackingMap_removePublicUserLocation",ex);
}
}
function trackingMap_updatePoi(_e7,_e8){
try{
var _e9=null;
var _ea=this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX].mapObjectArray;
var _eb=null;
for(var i=0;i<_ea.length;i++){
_e9=_ea[i];
if(_e9&&_e9.pointId==_e8){
this.removePoi(_e9.getHashString());
_eb=this.showPoi(_e7,false,false,true);
break;
}
}
return _eb;
}
catch(ex){
jsExDebug("trackingMap_updatePoi",ex);
}
}
function trackingMap_startFollowingUser(_ed,_ee,_ef){
try{
var _f0=false;
if(_ed){
this.followedContacts[_ed]=true;
this.fireEvent(this.FOLLOW_USER_EVENT,null,_ed);
_f0=true;
}
if(_ee){
this.followedUser=true;
this.fireEvent(this.FOLLOW_USER_EVENT);
_f0=true;
}
if(_ef){
this.followedPublicUsers[_ef]=true;
this.fireEvent(this.FOLLOW_USER_EVENT,null,"public_"+_ef);
_f0=true;
}
if(_f0){
this.centreOnFollowedUsers();
}
}
catch(ex){
jsExDebug("trackingMap_startFollowingUser",ex);
}
}
function trackingMap_stopFollowingUser(_f1,_f2,_f3){
try{
if(_f1&&this.followedContacts[_f1]){
this.followedContacts[_f1]=null;
delete this.followedContacts[_f1];
this.fireEvent(this.STOP_FOLLOW_USER_EVENT,null,_f1);
}
if(_f2&&this.followedUser){
this.followedUser=false;
this.fireEvent(this.STOP_FOLLOW_USER_EVENT);
}
if(_f3&&this.followedPublicUsers[_f3]){
this.followedPublicUsers[_f3]=null;
delete this.followedContacts[_f1];
this.fireEvent(this.STOP_FOLLOW_USER_EVENT,null,"public_"+_f3);
}
}
catch(ex){
jsExDebug("trackingMap_stopFollowingUser",ex);
}
}
function trackingMap_isContactOnMap(_f4){
try{
return this.mapObjectLists[this.CONTACT_LIST_INDEX].containsId(_f4);
}
catch(ex){
jsExDebug("trackingMap_isContactOnMap",ex);
}
}
function trackingMap_isPointOnMap(_f5){
try{
return this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX].contains(hashValue);
}
catch(ex){
jsExDebug("trackingMap_isPointOnMap",ex);
}
}
function trackingMap_isUserOnMap(){
try{
return this.mapObjectLists[this.USER_LIST_INDEX].containsId(this.SYSTEM.Tracking.USER_ID);
}
catch(ex){
jsExDebug("trackingMap_isUserOnMap",ex);
}
}
function trackingMap_isPublicUserOnMap(_f6){
try{
return this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].containsId(_f6);
}
catch(ex){
jsExDebug("trackingMap_isPublicUserOnMap",ex);
}
}
function trackingMap_clearHistoryLocationTrail(_f7){
try{
if(this.historyLocationTrailList[_f7]){
for(var i=0;i<this.historyLocationTrailList[_f7].length;i++){
if(this.historyLocationTrailList[_f7][i].getHashString()){
this.removeMapObject(this.HISTORY_LIST_INDEX,this.historyLocationTrailList[_f7][i].getHashString());
}
this.historyLocationTrailList[_f7][i]=null;
}
this.historyLocationTrailList[_f7]=null;
}
}
catch(ex){
jsExDebug("trackingMap_clearHistoryLocationTrail",ex);
}
}
function trackingMap_highlightHistoryLocations(_f9){
try{
for(var i=0;i<this.highlightedHistoryLocations.length;i++){
this.highlightedHistoryLocations[i].dim();
this.highlightedHistoryLocations[i]=null;
}
this.highlightedHistoryLocations=[];
var _fb=null;
var mo=null;
for(var _fd in _f9){
_fb=_f9[_fd];
if(this.historyLocationTrailList[_fd]&&this.historyLocationTrailList[_fd][_fb]){
mo=this.historyLocationTrailList[_fd][_fb];
mo.highlight();
this.highlightedHistoryLocations.push(mo);
}
}
}
catch(ex){
jsExDebug("trackingMap_highlightHistoryLocations",ex);
}
}
function trackingMap_vectorHistoryClusterClickEvent(mo){
try{
}
catch(ex){
jsExDebug("trackingMap_vectorHistoryClusterClickEvent",ex);
}
}

try{
trackingMap_t.prototype=new map_t();
trackingMap_t.prototype.trackingMap_super=map_t.prototype.constructor;
trackingMap_t.prototype.constructor=trackingMap_t;
trackingMap_t.prototype.cleanUp=trackingMap_cleanUp;
trackingMap_t.prototype.map_cleanUp=map_t.prototype.cleanUp;
trackingMap_t.prototype.map_createDom=map_t.prototype.createDom;
trackingMap_t.prototype.createDom=trackingMap_createDom;
trackingMap_t.prototype.map_bindEvents=map_t.prototype.bindEvents;
trackingMap_t.prototype.bindEvents=trackingMap_bindEvents;
trackingMap_t.prototype.map_zoomIn=map_t.prototype.zoomIn;
trackingMap_t.prototype.zoomIn=trackingMap_zoomIn;
trackingMap_t.prototype.map_zoomOut=map_t.prototype.zoomOut;
trackingMap_t.prototype.zoomOut=trackingMap_zoomOut;
trackingMap_t.prototype.map_autoPan=map_t.prototype.autoPan;
trackingMap_t.prototype.autoPan=trackingMap_autoPan;
trackingMap_t.prototype.map_centreOnCoordinates=map_t.prototype.centreOnCoordinates;
trackingMap_t.prototype.centreOnCoordinates=trackingMap_centreOnCoordinates;
trackingMap_t.prototype.map_doMarqueeZoom=map_t.prototype.doMarqueeZoom;
trackingMap_t.prototype.doMarqueeZoom=trackingMap_doMarqueeZoom;
trackingMap_t.prototype.map_dragEventHandler=map_t.prototype.dragEventHandler;
trackingMap_t.prototype.dragEventHandler=trackingMap_dragEventHandler;
trackingMap_t.prototype.map_dragEndEventHandler=map_t.prototype.dragEndEventHandler;
trackingMap_t.prototype.dragEndEventHandler=trackingMap_dragEndEventHandler;
trackingMap_t.prototype.map_addMapObject=map_t.prototype.addMapObject;
trackingMap_t.prototype.addMapObject=trackingMap_addMapObject;
trackingMap_t.prototype.map_removeMapObject=map_t.prototype.removeMapObject;
trackingMap_t.prototype.removeMapObject=trackingMap_removeMapObject;
trackingMap_t.prototype.drawMapObjects=trackingMap_drawMapObjects;
trackingMap_t.prototype.addMapObjectList=trackingMap_addMapObjectList;
trackingMap_t.prototype.showPoi=trackingMap_showPoi;
trackingMap_t.prototype.showSearchResult=trackingMap_showSearchResult;
trackingMap_t.prototype.showContact=trackingMap_showContact;
trackingMap_t.prototype.addSignificantPoints=trackingMap_addSignificantPoints;
trackingMap_t.prototype.showHistoryLocation=trackingMap_showHistoryLocation;
trackingMap_t.prototype.showUserLocation=trackingMap_showUserLocation;
trackingMap_t.prototype.waitForNextUserLocation=trackingMap_waitForNextUserLocation;
trackingMap_t.prototype.showPublicPoint=trackingMap_showPublicPoint;
trackingMap_t.prototype.showPublicUserLocation=trackingMap_showPublicUserLocation;
trackingMap_t.prototype.showMediaLocation=trackingMap_showMediaLocation;
trackingMap_t.prototype.hidePastLocations=trackingMap_hidePastLocations;
trackingMap_t.prototype.showPastLocations=trackingMap_showPastLocations;
trackingMap_t.prototype.removePoi=trackingMap_removePoi;
trackingMap_t.prototype.removeSearchResult=trackingMap_removeSearchResult;
trackingMap_t.prototype.removeContact=trackingMap_removeContact;
trackingMap_t.prototype.removeUserLocation=trackingMap_removeUserLocation;
trackingMap_t.prototype.removePublicUserLocation=trackingMap_removePublicUserLocation;
trackingMap_t.prototype.updatePoi=trackingMap_updatePoi;
trackingMap_t.prototype.startFollowingUser=trackingMap_startFollowingUser;
trackingMap_t.prototype.stopFollowingUser=trackingMap_stopFollowingUser;
trackingMap_t.prototype.isContactOnMap=trackingMap_isContactOnMap;
trackingMap_t.prototype.isPointOnMap=trackingMap_isPointOnMap;
trackingMap_t.prototype.isUserOnMap=trackingMap_isUserOnMap;
trackingMap_t.prototype.isPublicUserOnMap=trackingMap_isPublicUserOnMap;
trackingMap_t.prototype.clearHistoryLocationTrail=trackingMap_clearHistoryLocationTrail;
trackingMap_t.prototype.deletePointCallback=trackingMap_deletePointCallback;
trackingMap_t.prototype.centreOnFollowedUsers=trackingMap_centreOnFollowedUsers;
trackingMap_t.prototype.hideLocationTrails=trackingMap_hideLocationTrails;
trackingMap_t.prototype.contactRefreshCallback=trackingMap_contactRefreshCallback;
trackingMap_t.prototype.userDetailsSaveCallback=trackingMap_userDetailsSaveCallback;
trackingMap_t.prototype.drawLocationTrails=trackingMap_drawLocationTrails;
trackingMap_t.prototype.getNewContactTrailColour=trackingMap_getNewContactTrailColour;
trackingMap_t.prototype.highlightHistoryLocations=trackingMap_highlightHistoryLocations;
trackingMap_t.prototype.vectorHistoryClusterClickEvent=trackingMap_vectorHistoryClusterClickEvent;
trackingMap_t.prototype.getPointIdsOnMap=trackingMap_getPointIdsOnMap;
trackingMap_t.prototype.goToLatestUserLocation=trackingMap_goToLatestUserLocation;
trackingMap_t.prototype.goToLatestContactLocation=trackingMap_goToLatestContactLocation;
trackingMap_t.prototype.goToLatestPublicUserLocation=trackingMap_goToLatestPublicUserLocation;
trackingMap_t.prototype.setLabelColour=trackingMap_setLabelColour;
trackingMap_t.prototype.getListOfContactIdsOnMap=trackingMap_getListOfContactIdsOnMap;
trackingMap_t.prototype.loadCoordsFromString=trackingMap_loadCoordsFromString;
trackingMap_t.prototype.PEEPEL_POINT_LIST_INDEX=0;
trackingMap_t.prototype.PEEPEL_POINT_LIST_NAME="peepelpoints";
trackingMap_t.prototype.CONTACT_LIST_INDEX=1;
trackingMap_t.prototype.CONTACT_LIST_NAME="contacts";
trackingMap_t.prototype.SEARCH_RESULT_LIST_INDEX=2;
trackingMap_t.prototype.SEARCH_RESULT_LIST_NAME="searchresults";
trackingMap_t.prototype.HISTORY_LIST_INDEX=4;
trackingMap_t.prototype.HISTORY_LIST_NAME="other";
trackingMap_t.prototype.USER_LIST_INDEX=5;
trackingMap_t.prototype.USER_LIST_NAME="other";
trackingMap_t.prototype.PUBLIC_LOCATION_LIST_INDEX=6;
trackingMap_t.prototype.PUBLIC_LOCATION_LIST_NAME="publiclocations";
trackingMap_t.prototype.MEDIA_LIST_INDEX=7;
trackingMap_t.prototype.MEDIA_LIST_NAME="media";
trackingMap_t.prototype.MAX_PAST_CONTACT_LOCATIONS=100;
trackingMap_t.prototype.PAST_CONTACT_LOC_OPACITY_DECREMENT=0.15;
trackingMap_t.prototype.MAX_FOLLOWING_ZOOM=17;
trackingMap_t.prototype.MAX_TRAIL_LENGTH=5;
trackingMap_t.prototype.CLUSTER_PIXELS=90;
trackingMap_t.prototype.DEFAULT_LBL_COLOUR=SYSTEM.Style.DARK_BLUE_BORDER;
trackingMap_t.prototype.MAX_CLUSTER_ZOOM=14;
trackingMap_t.prototype.MIN_TRAIL_ZOOM=trackingMap_t.prototype.MAX_CLUSTER_ZOOM;
trackingMap_t.prototype.NO_CLUSTER_LIMIT=2;
trackingMap_t.prototype.FOLLOW_USER_EVENT=256;
trackingMap_t.prototype.STOP_FOLLOW_USER_EVENT=512;
trackingMap_t.prototype.FILTER_SIDEBAR_EVENT=1024;
}
catch(ex){
jsExDebug("trackingMap_t.prototype",ex);
}
function trackingMap_t(_1,_2,_3){
try{
this.trackingMap_super(_1,_2,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.listClusterFlags=[];
this.listClusterFlags[this.CONTACT_LIST_INDEX]=true;
this.listClusterFlags[this.PEEPEL_POINT_LIST_INDEX]=true;
this.listClusterFlags[this.HISTORY_LIST_INDEX]=true;
this.listClusterFlags[this.USER_LIST_INDEX]=true;
this.listClusterFlags[this.PUBLIC_LOCATION_LIST_INDEX]=true;
this.clusters=[];
this.zoomRound=[];
var _4=[];
_4[30]=0.00018310546875;
this.pastLocationsVisible=true;
for(var _5=this.MAX_ZOOM;_5>=this.MIN_ZOOM;_5--){
if(_4[_5+1]){
_4[_5]=(_4[_5+1]*2);
}else{
for(var _6=29;_6>=_5;_6--){
_4[_6]=(_4[_6+1]*2);
}
}
this.zoomRound[_5]=_4[_5]*this.CLUSTER_PIXELS;
}
this.visibleClusterPointsZoomLevel=null;
this.mapObjectLists[this.USER_LIST_INDEX]=new trackingMapObjectList_t(this,this.USER_LIST_NAME);
this.mapObjectLists[this.CONTACT_LIST_INDEX]=new trackingMapObjectList_t(this,this.CONTACT_LIST_NAME);
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX]=new trackingMapObjectList_t(this,this.PUBLIC_LOCATION_LIST_NAME);
this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX]=new mapObjectList_t(this,this.PEEPEL_POINT_LIST_NAME);
this.mapObjectLists[this.SEARCH_RESULT_LIST_INDEX]=new mapObjectList_t(this,this.SEARCH_RESULT_LIST_NAME);
this.mapObjectLists[this.HISTORY_LIST_INDEX]=new mapObjectList_t(this,this.HISTORY_LIST_NAME);
this.mapObjectLists[this.MEDIA_LIST_INDEX]=new mapObjectList_t(this,this.MEDIA_LIST_NAME);
for(var _7 in this.mapObjectLists){
this.clusters[_7]=[];
for(var j=this.MIN_ZOOM;j<=this.MAX_ZOOM;j++){
this.clusters[_7][j]=[];
}
}
this.historyLocationTrailList=[];
this.highlightedHistoryLocations=[];
this.publicUserData=[];
this.locationTrailsVisible=true;
this.contactTrailColours=[];
this.contactTrailColours[-1]="rgb(50,50,240)";
this.followedContacts=[];
this.followedUser=false;
this.followedPublicUsers=[];
this.stateHideTooltipOnNextUserLocation=false;
this.pointsActionIndex=this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_DELETE,new this.SYSTEM.Delegate(this,this.deletePointCallback));
this.contactsActionIndex=this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_SET_AVATAR,new this.SYSTEM.Delegate(this,this.contactRefreshCallback));
this.SYSTEM.Contacts.registerActionListener(this.SYSTEM.Contacts.ACTION_READ_CONTACT,new this.SYSTEM.Delegate(this,this.contactRefreshCallback),this.contactsActionIndex);
this.userDetailsActionIndex=this.SYSTEM.UserDetails.registerActionListener(this.SYSTEM.UserDetails.ACTION_SAVE,new this.SYSTEM.Delegate(this,this.userDetailsSaveCallback));
this.currentLabelColour=this.DEFAULT_LBL_COLOUR;
if(this.SYSTEM.Settings.get("map_centre_mark")){
this.setCrosshair(this.CROSSHAIR_MEDIUM);
}
}
catch(ex){
jsExDebug("trackingMap_t",ex);
}
}
function trackingMap_cleanUp(me){
try{
if(!me){
me=this;
}
me.pastLocationsVisible=null;
me.clearMapObjectList(me.PEEPEL_POINT_LIST_INDEX);
me.clearMapObjectList(me.CONTACT_LIST_INDEX);
me.clearMapObjectList(me.SEARCH_RESULT_LIST_INDEX);
me.clearMapObjectList(me.HISTORY_LIST_INDEX);
me.clearMapObjectList(me.USER_LIST_INDEX);
me.clearMapObjectList(me.MEDIA_LIST_INDEX);
me.clearMapObjectList(me.PUBLIC_LOCATION_LIST_INDEX);
for(var _a in me.clusters){
for(var _b in me.clusters[_a]){
for(var y in me.clusters[_a][_b]){
for(var x in me.clusters[_a][_b][y]){
me.clusters[_a][_b][y][x].count=null;
me.clusters[_a][_b][y][x].clusterPoint=null;
for(var i in me.clusters[_a][_b][y][x].indexes){
me.clusters[_a][_b][y][x].indexes[i]=null;
}
me.clusters[_a][_b][y][x].indexes=null;
me.clusters[_a][_b][y][x]=null;
}
me.clusters[_a][_b][y]=null;
}
me.clusters[_a][_b]=null;
}
me.clusters[_a]=null;
}
me.clusters=null;
for(var _f in me.publicUserData){
me.publicUserData[_f]=null;
}
me.publicUserData=null;
for(contactId in me.historyLocationTrailList){
if(me.historyLocationTrailList[contactId]){
for(var i=0;i<me.historyLocationTrailList[contactId].length;i++){
me.historyLocationTrailList[contactId][i]=null;
}
me.historyLocationTrailList[contactId]=null;
}
}
me.historyLocationTrailList=null;
for(i=0;i<me.highlightedHistoryLocations.length;i++){
me.highlightedHistoryLocations[i]=null;
}
me.highlightedHistoryLocations=null;
for(contactId in me.followedContacts){
me.followedContacts[contactId]=null;
}
me.followedContacts=null;
for(_f in me.followedPublicUsers){
me.followedPublicUsers[_f]=null;
}
me.followedPublicUsers=null;
me.followedUser=null;
me.locationTrailsVisible=null;
for(var id in me.contactTrailColours){
me.contactTrailColours[id]=null;
}
me.contactTrailColours=null;
if(me.SYSTEM.PeepelPoints){
me.SYSTEM.PeepelPoints.unregisterActionListener(me.pointsActionIndex);
me.pointsActionIndex=null;
}
if(me.SYSTEM.Contacts){
me.SYSTEM.Contacts.unregisterActionListener(me.contactsActionIndex);
me.contactsActionIndex=null;
}
if(me.SYSTEM.UserDetails){
me.SYSTEM.UserDetails.unregisterActionListener(me.userDetailsActionIndex);
me.userDetailsActionIndex=null;
}
me.stateHideTooltipOnNextUserLocation=null;
for(var zl in me.zoomRound){
me.zoomRound[zl]=null;
}
me.zoomRound=null;
for(var i in me.listClusterFlags){
me.listClusterFlags[i]=null;
}
me.listClusterFlags=null;
me.map_cleanUp();
}
catch(ex){
jsExDebug("trackingMap_cleanup",ex);
}
}
function trackingMap_createDom(){
try{
this.map_createDom();
}
catch(ex){
jsExDebug("trackingMap_createDom",ex);
}
}
function trackingMap_bindEvents(){
try{
this.map_bindEvents();
}
catch(ex){
jsExDebug("trackingMap_bindEvents",ex);
}
}
function trackingMap_zoomIn(_12,_13){
try{
this.hideLocationTrails();
var _14=this.zoom;
var _15=this.map_zoomIn(_12,_13);
if(!_15){
this.drawLocationTrails();
}
}
catch(ex){
jsExDebug("trackingMap_zoomIn",ex);
}
}
function trackingMap_zoomOut(_16,_17){
try{
this.hideLocationTrails();
var _18=this.zoom;
var _19=this.map_zoomOut(_16,_17);
if(!_19){
this.drawLocationTrails();
}
}
catch(ex){
jsExDebug("trackingMap_zoomOut",ex);
}
}
function trackingMap_autoPan(_1a,_1b,_1c,_1d){
function finished(me){
me.drawLocationTrails();
if(_1c){
_1c(_1d);
}
}
try{
this.hideLocationTrails();
this.map_autoPan(_1a,_1b,finished,this);
}
catch(ex){
jsExDebug("trackingMap_autoPan",ex);
}
}
function trackingMap_centreOnCoordinates(_1f,_20,_21,_22){
try{
this.hideLocationTrails();
var _23=this.zoom;
this.map_centreOnCoordinates(_1f,_20,_21,_22);
if(this.zoom<this.MIN_TRAIL_ZOOM){
this.hidePastLocations();
}else{
this.showPastLocations();
}
this.drawLocationTrails();
}
catch(ex){
jsExDebug("trackingMap_centreOnCoordinates",ex);
}
}
function trackingMap_doMarqueeZoom(){
try{
this.hideLocationTrails();
this.map_doMarqueeZoom();
}
catch(ex){
jsExDebug("trackingMap_doMarqueeZoom",ex);
}
}
function trackingMap_dragEventHandler(_24,me){
try{
if(!me){
me=this;
}
if(me.settingDragToPan){
if(me.newDrag){
me.hideLocationTrails();
}
}
me.map_dragEventHandler(_24,me);
}
catch(ex){
jsExDebug("trackingMap_dragEventHandler",ex);
}
}
function trackingMap_dragEndEventHandler(_26,me){
try{
if(!me){
me=this;
}
me.map_dragEndEventHandler(_26,me);
me.drawLocationTrails();
}
catch(ex){
jsExDebug("trackingMap_dragEndEventHandler",ex);
}
}
function trackingMap_deletePointCallback(_28){
try{
var _29=null;
var _2a=this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX];
for(var i=0;i<_2a.mapObjectArray.length;i++){
_29=_2a.mapObjectArray[i];
if(_29&&_29.pointId==_28){
if(_29.mapInfoClicked){
this.mapInfoContainer.hide();
}
this.removeMapObject(this.PEEPEL_POINT_LIST_INDEX,_29.getHashString());
return;
}
}
}
catch(ex){
jsExDebug("trackingMap_deletePointCallback",ex);
}
}
function trackingMap_centreOnFollowedUsers(){
try{
var _2c=null;
var _2d=null;
var _2e=null;
var _2f=null;
var _30=0;
var _31=null;
for(var _32 in this.followedContacts){
if(this.followedContacts[_32]){
_31=this.SYSTEM.Contacts.getContactLocation(_32);
if(!_31){
continue;
}
if(!_2c||_31.mercX<_2c){
_2c=_31.mercX;
}
if(!_2d||_31.mercY<_2d){
_2d=_31.mercY;
}
if(!_2e||_31.mercX>_2e){
_2e=_31.mercX;
}
if(!_2f||_31.mercY>_2f){
_2f=_31.mercY;
}
_30++;
}
}
for(var _33 in this.followedPublicUsers){
if(this.followedPublicUsers[_33]){
_31=this.SYSTEM.Tracking.getUserLocation(_33);
if(!_31){
continue;
}
if(!_2c||_31.mercX<_2c){
_2c=_31.mercX;
}
if(!_2d||_31.mercY<_2d){
_2d=_31.mercY;
}
if(!_2e||_31.mercX>_2e){
_2e=_31.mercX;
}
if(!_2f||_31.mercY>_2f){
_2f=_31.mercY;
}
_30++;
}
}
if(this.followedUser){
_31=this.SYSTEM.Tracking.getUserLocation(this.SYSTEM.Tracking.USER_ID);
if(_31){
if(!_2c||_31.mercX<_2c){
_2c=_31.mercX;
}
if(!_2d||_31.mercY<_2d){
_2d=_31.mercY;
}
if(!_2e||_31.mercX>_2e){
_2e=_31.mercX;
}
if(!_2f||_31.mercY>_2f){
_2f=_31.mercY;
}
_30++;
}
}
if(_30){
if(_30==1){
this.centreOnCoordinates(_31);
}else{
var _34=(_2e-_2c)/6;
var _35=(_2f-_2d)/6;
var _36=new mapBoundary_t(_2c-_34,_2e+_34,_2f+_35,_2d-_35,1);
this.fitBoundaryCoordinates(_36,this.MAX_FOLLOWING_ZOOM);
}
}
}
catch(ex){
jsExDebug("trackingMap_centreOnFollowedUsers",ex);
}
}
function trackingMap_hideLocationTrails(){
try{
if(!this.locationTrailsVisible){
return;
}
var _37=null;
var _38=null;
this.mapObjectLists[this.CONTACT_LIST_INDEX].hideTrails();
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].hideTrails();
this.mapObjectLists[this.USER_LIST_INDEX].hideTrails();
var _39=null;
for(contactId in this.historyLocationTrailList){
_39=this.historyLocationTrailList[contactId];
if(_39){
for(var i=0;i<_39.length;i++){
_39[i].hideNextTrackableObjectLines();
}
}
}
this.locationTrailsVisible=false;
}
catch(ex){
jsExDebug("trackingMap_hideLocationTrails",ex);
}
}
function trackingMap_contactRefreshCallback(_3b){
try{
var _3c=null;
var _3d=this.mapObjectLists[this.CONTACT_LIST_INDEX];
for(var i=0;i<_3d.mapObjectArray.length;i++){
_3c=_3d.mapObjectArray[i];
if(_3c&&_3c.cleanUpIndex&&_3c.getContactId&&_3c.getContactId()==_3b){
_3c.updateFromContact();
}
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_contactRefreshCallback",ex);
}
}
function trackingMap_userDetailsSaveCallback(){
try{
var _3f=null;
var _40=this.mapObjectLists[this.USER_LIST_INDEX];
for(var i=0;i<_40.mapObjectArray.length;i++){
_3f=_40.mapObjectArray[i];
if(_3f&&_3f.isUserLocation){
_3f.updateFromUserDetails();
}
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_userDetailsSaveCallback",ex);
}
}
function trackingMap_drawLocationTrails(_42){
try{
if(this.locationTrailsVisible&&!_42){
return;
}
this.drawMapObjects();
this.mapObjectLists[this.CONTACT_LIST_INDEX].drawTrails();
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].drawTrails();
this.mapObjectLists[this.USER_LIST_INDEX].drawTrails();
var _43=null;
for(contactId in this.historyLocationTrailList){
_43=this.historyLocationTrailList[contactId];
if(_43){
for(var i=0;i<_43.length;i++){
if(_43[i]){
_43[i].redrawTrails();
}
}
}
}
this.locationTrailsVisible=true;
}
catch(ex){
jsExDebug("trackingMap_drawLocationTrails "+contactId+","+i,ex);
}
}
function trackingMap_getNewContactTrailColour(_45){
try{
var _46="rgb("+parseInt(Math.random()*125)+","+parseInt(Math.random()*125)+","+parseInt(Math.random()*125)+")";
var _47=false;
while(!_47){
_47=true;
for(var id in this.contactTrailColours){
if(this.contactTrailColours[id]==_46){
_46="rgb("+parseInt(Math.random()*125)+","+parseInt(Math.random()*125)+","+parseInt(Math.random()*125)+")";
_47=false;
break;
}
}
}
this.contactTrailColours[_45]=_46;
}
catch(ex){
jsExDebug("trackingMap_getNewContactTrailColour",ex);
}
}
function trackingMap_getPointIdsOnMap(_49){
try{
var mos=this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX].mapObjectArray;
var ids=[];
for(var i=0;i<mos.length;i++){
if(mos[i]&&mos[i].pointId&&(_49||!mos[i].isPublic)){
ids.push(mos[i].pointId);
}
}
return ids;
}
catch(ex){
jsExDebug("trackingMap_getPointIdsOnMap",ex);
}
}
function trackingMap_goToLatestUserLocation(){
try{
var _4d=this.mapObjectLists[this.USER_LIST_INDEX].getLatestCoordinate(this.SYSTEM.Tracking.USER_ID);
if(_4d){
this.centreOnCoordinates(_4d,this.zoom);
this.drawMapObjects();
}
}
catch(ex){
jsExDebug("trackingMap_goToLatestUserLocation",ex);
}
}
function trackingMap_goToLatestContactLocation(_4e){
try{
var _4f=this.mapObjectLists[this.CONTACT_LIST_INDEX].getLatestCoordinate(_4e);
if(_4f){
this.centreOnCoordinates(_4f,this.zoom);
this.drawMapObjects();
}
}
catch(ex){
jsExDebug("trackingMap_goToLatestContactLocation",ex);
}
}
function trackingMap_goToLatestPublicUserLocation(_50){
try{
var _51=this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].getLatestCoordinate(_50);
if(_51){
this.centreOnCoordinates(_51,this.zoom);
this.drawMapObjects();
}
}
catch(ex){
jsExDebug("trackingMap_goToLatestPublicUserLocation",ex);
}
}
function trackingMap_setLabelColour(_52){
try{
if(_52){
this.currentLabelColour=_52;
}else{
this.currentLabelColour=this.DEFAULT_LBL_COLOUR;
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_setLabelColour",ex);
}
}
function trackingMap_getListOfContactIdsOnMap(){
try{
return this.mapObjectLists[this.CONTACT_LIST_INDEX].getIdsInList();
}
catch(ex){
jsExDebug("trackingMap_getListOfContactIdsOnMap",ex);
}
}
function trackingMap_loadCoordsFromString(_53){
try{
var _54=_53.split("\n");
var _55=null;
for(var i=0;i<_54.length;i++){
if(_54[i].length){
_55=_54[i].split(",");
var _57=new mapCoordinate_t(parseFloat(_55[0]),parseFloat(_55[1]),1);
_57.getMercatorCoordinates();
_57.setZoom(this.zoom);
this.addMapObject(this.HISTORY_LIST_INDEX,new mapDot_t(_57,null,20));
}
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_loadCoordsFromString",ex);
}
}
function trackingMap_addMapObject(_58,_59,_5a,_5b){
try{
var _5c=this.map_addMapObject(_58,_59,_5a,_5b);
if(_5c==null){
return null;
}
var _5d=_59.coordinate.mercX;
var _5e=_59.coordinate.mercY;
var _5f=true;
for(var z in this.clusters[_58]){
z=parseFloat(z);
_5f=true;
if(_59 instanceof mapSignificantPoint_t){
_5f=false;
}
if(this.listClusterFlags[_58]&&z<this.MAX_CLUSTER_ZOOM&&_5f){
var _61=this.zoomRound[z];
var x=Math.floor(_5d/_61)*_61;
var y=Math.floor(_5e/_61)*_61;
}else{
var x=_5d;
var y=_5e;
}
if(!this.clusters[_58][z][y]){
this.clusters[_58][z][y]=[];
}
if(!this.clusters[_58][z][y][x]){
this.clusters[_58][z][y][x]={count:0,clusterPoint:null,indexes:[]};
}
this.clusters[_58][z][y][x].count++;
this.clusters[_58][z][y][x].indexes.push(_5c);
if(this.clusters[_58][z][y][x].count>this.NO_CLUSTER_LIMIT){
var _64=this.mapObjectLists[_58];
if(this.clusters[_58][z][y][x].clusterPoint==null){
switch(_58){
case this.HISTORY_LIST_INDEX:
var _65=new vectorHistoryClusterPoint_t(_59.coordinate.copy(),this.drawer,z,_64,this.clusters[_58][z][y][x].indexes);
_65.setClickDelegate(_59.clickDelegate);
break;
case this.PEEPEL_POINT_LIST_INDEX:
var _65=new mapPointClusterPoint_t(_59.coordinate.copy(),z,_64,this.clusters[_58][z][y][x].indexes);
break;
default:
var _65=new mapClusterPoint_t(_59.coordinate.copy(),z,_64,this.clusters[_58][z][y][x].indexes);
}
_65.hide();
var _66=this.map_addMapObject(_58,_65,false);
this.clusters[_58][z][y][x].clusterPoint=_66;
}else{
var _65=_64.getByListIndex(this.clusters[_58][z][y][x].clusterPoint);
_65.updateCluster(this.clusters[_58][z][y][x].indexes);
}
}
}
return _5c;
}
catch(ex){
jsExDebug("trackingMap_addMapObject",ex);
}
}
function trackingMap_removeMapObject(_67,_68){
try{
var _69=this.map_removeMapObject(_67,_68);
for(var z in this.clusters[_67]){
for(var y in this.clusters[_67][z]){
for(var x in this.clusters[_67][z][y]){
for(var i=0;i<this.clusters[_67][z][y][x].indexes.length;i++){
if(this.clusters[_67][z][y][x].indexes[i]==_69){
this.clusters[_67][z][y][x].indexes[i]=null;
delete this.clusters[_67][z][y][x].indexes[i];
this.clusters[_67][z][y][x].count--;
var _6e=this.mapObjectLists[_67];
var _6f=_6e.getByListIndex(this.clusters[_67][z][y][x].clusterPoint);
if(this.clusters[_67][z][y][x].count==this.NO_CLUSTER_LIMIT){
var _70=this.map_removeMapObject(_67,_6f.getHashString());
if(_70!=this.clusters[_67][z][y][x].clusterPoint){
}
this.clusters[_67][z][y][x].clusterPoint=null;
}else{
if(this.clusters[_67][z][y][x].count>this.NO_CLUSTER_LIMIT){
_6f.updateCluster(this.clusters[_67][z][y][x].indexes);
}
}
}
}
if(this.clusters[_67][z][y][x].count==0){
this.clusters[_67][z][y][x].count=null;
this.clusters[_67][z][y][x].indexes=null;
this.clusters[_67][z][y][x].clusterPoint=null;
this.clusters[_67][z][y][x]=null;
delete this.clusters[_67][z][y][x];
}
}
}
}
this.drawMapObjects();
}
catch(ex){
jsExDebug("trackingMap_removeMapObject",ex);
}
}
function trackingMap_drawMapObjects(){
function setPositionOnMap(mo){
try{
var _72=(_73==0?0:(this.width*((mo.coordinate.mercX-_74)/_73)));
var _75=(_76==0?0:(this.height*((mo.coordinate.mercY-_77)/_76)));
var _78=false;
var _79=mo.getOffMapCheckX();
var _7a=mo.getOffMapCheckY();
if((_75-_7a)<0){
_75=_7a;
_78=true;
}
if((_72-_79)<0){
_72=_79;
_78=true;
}
if((_72+(mo.settingOnMapWidth-_79))>this.width){
_72=this.width-(mo.settingOnMapWidth-_79);
_78=true;
}
if((_75+(mo.settingOnMapHeight-_7a))>this.height){
_75=this.height-(mo.settingOnMapHeight-_7a);
_78=true;
}
mo.setPosition(_72,_75);
if(mo.widget&&mo.widget.label){
mo.widget.label.setColour(this.currentLabelColour);
}
if(_78){
mo.setOffMapMode();
}else{
mo.setOnMapMode();
}
}
catch(ex){
jsExDebug("trackingMap_drawMapObjects: setPositionOnMap",ex);
}
}
function hideObject(_7b,_7c){
try{
var _7d=this.mapObjectLists[_7b];
if(_7c.count>this.NO_CLUSTER_LIMIT&&this.listClusterFlags[_7b]){
_7d.getByListIndex(_7c.clusterPoint).hide();
}
for(var i=0;i<_7c.indexes.length;i++){
if(_7c.indexes[i]!=null){
_7d.getByListIndex(_7c.indexes[i]).hide();
}
}
}
catch(ex){
jsExDebug("trackingMap_drawMapObjects: hideObject",ex);
}
}
function showObject(_7f,_80){
try{
var mo=null;
var _82=this.mapObjectLists[_7f];
var _83=(_80.count>this.NO_CLUSTER_LIMIT)&&this.listClusterFlags[_7f];
if(_83){
var _84=_82.getByListIndex(_80.clusterPoint);
var _85=[];
for(var i in _80.indexes){
if(_80.indexes[i]!=null){
mo=_82.getByListIndex(_80.indexes[i]);
if(mo.isPastLocation&&mo.isPastLocation()){
mo.setClusterPoint(null);
setPositionOnMap.call(this,mo);
}else{
_85.push(mo);
}
}
}
_83=(_85.length>this.NO_CLUSTER_LIMIT);
for(var i=0;i<_85.length;i++){
if(_83){
_85[i].hide();
_85[i].setClusterPoint(_84);
}else{
mo.setClusterPoint(null);
setPositionOnMap.call(this,mo);
}
}
if(_83){
setPositionOnMap.call(this,_84);
}
}else{
for(var i in _80.indexes){
var mo=null;
if(_80.indexes[i]!=null){
mo=_82.getByListIndex(_80.indexes[i]);
if(!mo){
jsDebugText("trackingMap_drawMapObjects: showObject, clustered map object doesn't exist");
return;
}
setPositionOnMap.call(this,mo);
mo.setClusterPoint(null);
}
}
}
}
catch(ex){
jsExDebug("trackingMap_drawMapObjects: showObject",ex);
}
}
try{
var _87=this.getBoundaryCoordinates();
var _74=_87.topLeft.mercX;
var _77=_87.topLeft.mercY;
var _88=_87.bottomRight.mercX;
var _89=_87.bottomRight.mercY;
var _8a=_74-this.OFFMAP_TRACKING_TOLERANCE;
var _8b=_88+this.OFFMAP_TRACKING_TOLERANCE;
var _8c=_77+this.OFFMAP_TRACKING_TOLERANCE;
var _8d=_89-this.OFFMAP_TRACKING_TOLERANCE;
var _73=_88-_74;
var _76=_89-_77;
if(this.visibleClusterPointsZoomLevel!=this.zoom){
var z=this.visibleClusterPointsZoomLevel;
for(var _8f in this.clusters){
for(var y in this.clusters[_8f][z]){
for(var x in this.clusters[_8f][z][y]){
if(this.clusters[_8f][z][y][x].clusterPoint!=null){
this.mapObjectLists[_8f].getByListIndex(this.clusters[_8f][z][y][x].clusterPoint).hide();
}
}
}
}
}
for(var _8f in this.clusters){
for(var y in this.clusters[_8f][this.zoom]){
for(var x in this.clusters[_8f][this.zoom][y]){
x=parseFloat(x);
y=parseFloat(y);
if(x>_8a&&x<_8b||y<_8c&&y>_8d){
showObject.call(this,_8f,this.clusters[_8f][this.zoom][y][x]);
}else{
hideObject.call(this,_8f,this.clusters[_8f][this.zoom][y][x]);
}
}
}
}
this.visibleClusterPointsZoomLevel=this.zoom;
this.mapInfoContainer.updatePosition();
}
catch(ex){
jsExDebug("trackingMap_drawMapObjects",ex);
}
}
function trackingMap_addMapObjectList(_92,_93){
try{
var _94=this.mapObjectLists.lengthl;
this.mapObjectLists[_94]=_92;
this.clusters[_94]=[];
for(var z=this.MIN_ZOOM;z<=this.MAX_ZOOM;z++){
this.clusters[_94][z]=[];
}
if(_93){
this.listClusterFlags[_94]=true;
}
this.drawMapObjects();
return _94;
}
catch(ex){
jsExDebug("trackingMap_addMapObjectList",ex);
}
}
function trackingMap_showPoi(_96,_97,_98,_99){
try{
if(!_96){
return;
}
var _9a=_96.coordinate.copy();
if(_97){
this.centreOnCoordinates(_9a,(_98?_9a.zoom:this.zoom),false,true);
}
var _9b=new mapPoi_t(_9a,_96);
this.addMapObject(this.PEEPEL_POINT_LIST_INDEX,_9b,true);
if(_99){
this.drawMapObjects();
}
if(this.linkGroupNumbers.length){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_SHOW_POINT,this.linkGroupNumbers,this,_96,_97,_98,_99);
}
return _9b;
}
catch(ex){
jsExDebug("trackingMap_showPoi",ex);
}
}
function trackingMap_showSearchResult(_9c,_9d,_9e,_9f,_a0){
try{
this.centreOnCoordinates(_9c,null,false,true);
var _a1=_9c.getDecimalCoordinates();
var _a2=new mapSearchResult_t(_9c,_9d,_9e);
if(_a0){
this.addMapObject(_a0,_a2,true);
}else{
this.addMapObject(this.SEARCH_RESULT_LIST_INDEX,_a2,true);
}
if(_9f){
this.drawMapObjects();
}
if(this.linkGroupNumbers.length){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_SHOW_S_RESULT,this.linkGroupNumbers,this,_9c,_9d,_9f);
}
}
catch(ex){
jsExDebug("trackingMap_showSearchResult",ex);
}
}
function trackingMap_showContact(_a3,_a4,_a5,_a6,_a7){
try{
var _a8=_a4.contactId;
if(!this.isContactOnMap(_a8)){
if(!_a7){
this.centreOnCoordinates(_a3,null,false,true);
}
}else{
if(this.followedContacts[_a8]){
this.centreOnFollowedUsers();
}
}
var _a9=this.CONTACT_LIST_INDEX;
var _aa=this.mapObjectLists[_a9];
var _ab=_aa.getObjectsForId(_a8);
if(_ab){
if(_ab.length>=this.MAX_TRAIL_LENGTH){
var _ac=0;
while(_ab[_ac] instanceof mapSignificantPoint_t){
this.removeMapObject(_a9,_ab[_ac].getHashString());
_ac++;
}
this.removeMapObject(_a9,_ab[_ac].getHashString());
}
}else{
this.getNewContactTrailColour(_a8);
}
var _ad=this.contactTrailColours[_a8];
var _ae=new mapContact_t(_a3,_a4,this.contactTrailColours[_a8]);
this.addSignificantPoints(_a3,_a8,_a9,_ae,_ad);
this.addMapObject(_a9,_ae,true,_a8);
if(_a5){
this.drawLocationTrails(true);
}
if(this.linkGroupNumbers.length&&!_a6){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_SHOW_CONTACT,this.linkGroupNumbers,this,_a3,_a4,_a5);
}
return _ae;
}
catch(ex){
jsExDebug("trackingMap_showContact",ex);
}
}
function trackingMap_addSignificantPoints(_af,id,_b1,_b2,_b3){
try{
var _b4=null;
var _b5=null;
var _b6=null;
for(var i=0;i<_af.significantPoints.length;i++){
_b4=_af.significantPoints[i];
_b6=new trackingCoordinate_t(_b4.y,_b4.x,_b2.coordinate.dateFound);
_b5=new mapSignificantPoint_t(_b6,_b2.clusterDescription,_b2.clusterName,_b3);
this.addMapObject(_b1,_b5,false,id);
}
}
catch(ex){
jsExDebug("trackingMap_addSignificantPoints",ex);
}
}
function trackingMap_showHistoryLocation(_b8,_b9,_ba,_bb,_bc){
try{
}
catch(ex){
jsExDebug("trackingMap_showHistoryLocation",ex);
}
}
function trackingMap_showUserLocation(_bd,_be,_bf){
try{
if(!_bd){
return;
}
if(!_bf){
this.centreOnCoordinates(_bd,null,false,true);
}
var _c0=new mapUserLocation_t(_bd,this.contactTrailColours[-1]);
var _c1=this.mapObjectLists[this.USER_LIST_INDEX];
if(!_c1.contains(_c0.getHashString())){
var _c2=_c1.getObjectsForId(this.SYSTEM.Tracking.USER_ID);
if(_c2&&_c2.length>=this.MAX_TRAIL_LENGTH){
var _c3=0;
while(_c2[_c3] instanceof mapSignificantPoint_t){
this.removeMapObject(this.USER_LIST_INDEX,_c2[_c3].getHashString());
_c3++;
}
this.removeMapObject(this.USER_LIST_INDEX,_c2[_c3].getHashString());
}
this.addSignificantPoints(_bd,this.SYSTEM.Tracking.USER_ID,this.USER_LIST_INDEX,_c0,this.contactTrailColours[-1]);
this.addMapObject(this.USER_LIST_INDEX,_c0,true,this.SYSTEM.Tracking.USER_ID);
}else{
_c0.cleanUp();
}
if(this.followedUser){
this.centreOnFollowedUsers();
}
if(_be){
this.drawLocationTrails(true);
}
if(this.stateHideTooltipOnNextUserLocation){
this.SYSTEM.Tooltip.hideLoading();
this.stateHideTooltipOnNextUserLocation=false;
}
return _c0;
}
catch(ex){
jsExDebug("trackingMap_showUserLocation",ex);
}
}
function trackingMap_waitForNextUserLocation(){
try{
this.stateHideTooltipOnNextUserLocation=true;
}
catch(ex){
jsExDebug("trackingMap_waitForNextUserLocation",ex);
}
}
function trackingMap_showPublicPoint(_c4,_c5,_c6,_c7){
try{
if(!_c6){
this.centreOnCoordinates(_c4,null,false,true);
}
var _c8=new mapPoi_t(_c4,_c5,true);
this.addMapObject(this.PEEPEL_POINT_LIST_INDEX,_c8,true);
if(_c7){
this.drawMapObjects();
}
}
catch(ex){
jsExDebug("trackingMap_showPublicPoint",ex);
}
}
function trackingMap_showPublicUserLocation(_c9,_ca,_cb,_cc,_cd,_ce,_cf){
try{
if(!this.isPublicUserOnMap(_ca)){
if(!_cf){
this.centreOnCoordinates(_c9,null,false,true);
}
}else{
if(this.followedPublicUsers[_ca]){
this.centreOnFollowedUsers();
}
}
if(_cb&&_cc!=null){
this.publicUserData[_ca]={username:_cb,accuracy:_cc,avatar:_cd};
}
var _d0=this.PUBLIC_LOCATION_LIST_INDEX;
var _d1=this.mapObjectLists[_d0];
var _d2=_d1.getObjectsForId(_ca);
if(_d2&&(_d2.length>=this.MAX_TRAIL_LENGTH)){
var _d3=0;
while(_d2[_d3] instanceof mapSignificantPoint_t){
this.removeMapObject(_d0,_d2[_d3].getHashString());
_d3++;
}
this.removeMapObject(_d0,_d2[_d3].getHashString());
}
var _d4=this.mapObjectLists[_d0];
var _d5=new mapPublicUserLocation_t(_c9,_ca,this.publicUserData[_ca].username,this.publicUserData[_ca].accuracy,this.publicUserData[_ca].avatar);
this.addSignificantPoints(_c9,_ca,_d0,_d5);
this.addMapObject(_d0,_d5,true,_ca);
if(_ce){
this.drawLocationTrails(true);
}
return _d5;
}
catch(ex){
jsExDebug("trackingMap_showPublicUserLocation",ex);
}
}
function trackingMap_showMediaLocation(_d6){
try{
this.centreOnCoordinates(_d6,null,false,true);
var _d7=this.mapObjectLists[this.MEDIA_LIST_INDEX];
var _d8=new mapUserLocation_t(_d6,this.contactTrailColours[-1],true);
this.addMapObject(this.MEDIA_LIST_INDEX,_d8,true,-2);
return _d8;
}
catch(ex){
jsExDebug("trackingMap_showMediaLocation",ex);
}
}
function trackingMap_hidePastLocations(){
try{
if(this.pastLocationsVisible){
this.mapObjectLists[this.CONTACT_LIST_INDEX].hidePastLocations();
this.mapObjectLists[this.USER_LIST_INDEX].hidePastLocations();
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].hidePastLocations();
this.pastLocationsVisible=false;
}
}
catch(ex){
jsExDebug("trackingMap_hidePastLocations",ex);
}
}
function trackingMap_showPastLocations(){
try{
if(this.pastLocationsVisible){
return;
}
this.mapObjectLists[this.CONTACT_LIST_INDEX].showPastLocations();
this.mapObjectLists[this.USER_LIST_INDEX].showPastLocations();
this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].showPastLocations();
this.pastLocationsVisible=true;
}
catch(ex){
jsExDebug("trackingMap_showPastLocations",ex);
}
}
function trackingMap_removePoi(_d9,_da){
try{
this.removeMapObject(this.PEEPEL_POINT_LIST_INDEX,_d9);
if(this.linkGroupNumbers.length&&!_da){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_REMOVE_POINT,this.linkGroupNumbers,this,_d9);
}
}
catch(ex){
jsExDebug("trackingMap_removePoi",ex);
}
}
function trackingMap_removeSearchResult(_db,_dc){
try{
this.removeMapObject(this.SEARCH_RESULT_LIST_INDEX,_db);
if(this.linkGroupNumbers.length&&!_dc){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_REMOVE_S_RESULT,this.linkGroupNumbers,this,_db);
}
}
catch(ex){
jsExDebug("trackingMap_removeSearchResult",ex);
}
}
function trackingMap_removeContact(_dd,_de){
try{
var _df=this.mapObjectLists[this.CONTACT_LIST_INDEX].getObjectsForId(_dd);
if(_df){
for(var i=0;i<_df.length;i++){
this.removeMapObject(this.CONTACT_LIST_INDEX,_df[i].getHashString());
}
this.stopFollowingUser(_dd);
}
if(this.linkGroupNumbers.length&&!_de){
this.SYSTEM.MapLinker.applyToGroups(this.SYSTEM.MapLinker.ACTION_REMOVE_CONTACT,this.linkGroupNumbers,this,_dd);
}
}
catch(ex){
jsExDebug("trackingMap_removeContact",ex);
}
}
function trackingMap_removeUserLocation(_e1){
try{
if(_e1){
this.removeMapObject(this.MEDIA_LIST_INDEX,_e1);
}else{
var _e2=this.mapObjectLists[this.USER_LIST_INDEX].getObjectsForId(this.SYSTEM.Tracking.USER_ID);
for(var i=0;i<_e2.length;i++){
this.removeMapObject(this.USER_LIST_INDEX,_e2[i].getHashString());
}
this.stopFollowingUser(null,true);
}
}
catch(ex){
jsExDebug("trackingMap_removeUserLocation",ex);
}
}
function trackingMap_removePublicUserLocation(_e4){
try{
var _e5=this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].getObjectsForId(_e4);
for(var i=0;i<_e5.length;i++){
this.removeMapObject(this.PUBLIC_LOCATION_LIST_INDEX,_e5[i].getHashString());
}
this.stopFollowingUser(null,null,_e4);
this.publicUserData[_e4]=null;
}
catch(ex){
jsExDebug("trackingMap_removePublicUserLocation",ex);
}
}
function trackingMap_updatePoi(_e7,_e8){
try{
var _e9=null;
var _ea=this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX].mapObjectArray;
var _eb=null;
for(var i=0;i<_ea.length;i++){
_e9=_ea[i];
if(_e9&&_e9.pointId==_e8){
this.removePoi(_e9.getHashString());
_eb=this.showPoi(_e7,false,false,true);
break;
}
}
return _eb;
}
catch(ex){
jsExDebug("trackingMap_updatePoi",ex);
}
}
function trackingMap_startFollowingUser(_ed,_ee,_ef){
try{
var _f0=false;
if(_ed){
this.followedContacts[_ed]=true;
this.fireEvent(this.FOLLOW_USER_EVENT,null,_ed);
_f0=true;
}
if(_ee){
this.followedUser=true;
this.fireEvent(this.FOLLOW_USER_EVENT);
_f0=true;
}
if(_ef){
this.followedPublicUsers[_ef]=true;
this.fireEvent(this.FOLLOW_USER_EVENT,null,"public_"+_ef);
_f0=true;
}
if(_f0){
this.centreOnFollowedUsers();
}
}
catch(ex){
jsExDebug("trackingMap_startFollowingUser",ex);
}
}
function trackingMap_stopFollowingUser(_f1,_f2,_f3){
try{
if(_f1&&this.followedContacts[_f1]){
this.followedContacts[_f1]=null;
delete this.followedContacts[_f1];
this.fireEvent(this.STOP_FOLLOW_USER_EVENT,null,_f1);
}
if(_f2&&this.followedUser){
this.followedUser=false;
this.fireEvent(this.STOP_FOLLOW_USER_EVENT);
}
if(_f3&&this.followedPublicUsers[_f3]){
this.followedPublicUsers[_f3]=null;
delete this.followedContacts[_f1];
this.fireEvent(this.STOP_FOLLOW_USER_EVENT,null,"public_"+_f3);
}
}
catch(ex){
jsExDebug("trackingMap_stopFollowingUser",ex);
}
}
function trackingMap_isContactOnMap(_f4){
try{
return this.mapObjectLists[this.CONTACT_LIST_INDEX].containsId(_f4);
}
catch(ex){
jsExDebug("trackingMap_isContactOnMap",ex);
}
}
function trackingMap_isPointOnMap(_f5){
try{
return this.mapObjectLists[this.PEEPEL_POINT_LIST_INDEX].contains(hashValue);
}
catch(ex){
jsExDebug("trackingMap_isPointOnMap",ex);
}
}
function trackingMap_isUserOnMap(){
try{
return this.mapObjectLists[this.USER_LIST_INDEX].containsId(this.SYSTEM.Tracking.USER_ID);
}
catch(ex){
jsExDebug("trackingMap_isUserOnMap",ex);
}
}
function trackingMap_isPublicUserOnMap(_f6){
try{
return this.mapObjectLists[this.PUBLIC_LOCATION_LIST_INDEX].containsId(_f6);
}
catch(ex){
jsExDebug("trackingMap_isPublicUserOnMap",ex);
}
}
function trackingMap_clearHistoryLocationTrail(_f7){
try{
if(this.historyLocationTrailList[_f7]){
for(var i=0;i<this.historyLocationTrailList[_f7].length;i++){
if(this.historyLocationTrailList[_f7][i].getHashString()){
this.removeMapObject(this.HISTORY_LIST_INDEX,this.historyLocationTrailList[_f7][i].getHashString());
}
this.historyLocationTrailList[_f7][i]=null;
}
this.historyLocationTrailList[_f7]=null;
}
}
catch(ex){
jsExDebug("trackingMap_clearHistoryLocationTrail",ex);
}
}
function trackingMap_highlightHistoryLocations(_f9){
try{
for(var i=0;i<this.highlightedHistoryLocations.length;i++){
this.highlightedHistoryLocations[i].dim();
this.highlightedHistoryLocations[i]=null;
}
this.highlightedHistoryLocations=[];
var _fb=null;
var mo=null;
for(var _fd in _f9){
_fb=_f9[_fd];
if(this.historyLocationTrailList[_fd]&&this.historyLocationTrailList[_fd][_fb]){
mo=this.historyLocationTrailList[_fd][_fb];
mo.highlight();
this.highlightedHistoryLocations.push(mo);
}
}
}
catch(ex){
jsExDebug("trackingMap_highlightHistoryLocations",ex);
}
}
function trackingMap_vectorHistoryClusterClickEvent(mo){
try{
}
catch(ex){
jsExDebug("trackingMap_vectorHistoryClusterClickEvent",ex);
}
}

function scalebar_t(_1,_2,_3,_4,_5,_6){
var _7=0.5;
var x=_2;
var y=_3;
var _a=_4;
var _b=_5;
var _c=_6;
var _d=_1;
var _e;
var _f;
if(_a<0||_b<0){
alert("Error, can not instance a scalebar with negatived dimensions.");
return false;
}
populateHTMLElements();
updateMarkerPosition();
function populateHTMLElements(){
try{
_e=document.createElement("div");
_e.setAttribute("id","scalebar_"+_d);
_e.setAttribute("src","noimage.png");
_e.style.position="absolute";
_e.style.left=x+"px";
_e.style.top=y+"px";
_e.style.width=_a+"px";
_e.style.height=_b+"px";
_e.style.borderStyle="solid";
_e.style.borderWidth="thin";
_e.style.borderColor="black";
_e.style.backgroundColor="blue";
document.body.appendChild(_e);
_f=document.createElement("div");
_f.setAttribute("id","marker_"+_d);
_f.style.position="absolute";
_f.style.left=x+"px";
_f.style.top=(y-(_b/2))+"px";
_f.style.width="20"+"px";
_f.style.height=(_b*2)+"px";
_f.style.borderStyle="solid";
_f.style.borderWidth="thin";
_f.style.borderColor="black";
_f.style.backgroundColor="red";
document.body.appendChild(_f);
var _10=document.createElement("input");
_10.style.position="absolute";
_10.setAttribute("type","button");
_10.style.left="30px";
_10.style.top=(y-30)+"px";
_10.setAttribute("value","Pan In");
document.body.appendChild(_10);
_10.onclick=function(){
updateScale(-10);
};
var _10=document.createElement("input");
_10.style.position="absolute";
_10.setAttribute("type","button");
_10.style.left="100px";
_10.style.top=(y-30)+"px";
_10.setAttribute("value","Pan Out");
document.body.appendChild(_10);
_10.onclick=function(){
updateScale(10);
};
_e.ondragstart=function(){
setMousePosition();
};
_e.ondrag=function(){
_c.scalebarDrag(_d);
};
_e.ondragstop=function(){
alert("foobar");
_c.scalebarDragStop(_d);
};
}
catch(ex){
alert("DEBUG EXCEPTION: Populating Scalebar HTML; "+ex.message);
}
}
function updateMarkerPosition(){
_f.style.left=(_7*_a)+"px";
return;
}
function updateScale(_11){
try{
_7+=_11/(_a);
document.getElementById("Text1").value=_7;
document.getElementById("Text2").value=_a*0.01;
updateMarkerPosition();
_c.rescale(_d,_7);
return _7;
}
catch(ex){
alert("DEBUG EXCEPTION: Updating Scalebar position; "+ex.message);
}
}
}

try{
mapObject_t.prototype=new peepelObject_t();
mapObject_t.prototype.constructor=mapObject_t;
mapObject_t.prototype.cleanUp=mapObject_cleanUp;
mapObject_t.prototype.mapObject_super=peepelObject_t.prototype.constructor;
mapObject_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
mapObject_t.prototype.setPosition=mapObject_setPosition;
mapObject_t.prototype.setDimensions=mapObject_setDimensions;
mapObject_t.prototype.hide=mapObject_hide;
mapObject_t.prototype.show=mapObject_show;
mapObject_t.prototype.setBorder=mapObject_setBorder;
mapObject_t.prototype.setOpacity=mapObject_setOpacity;
mapObject_t.prototype.setClusterPoint=mapObject_setClusterPoint;
mapObject_t.prototype.setIcon=mapObject_setIcon;
mapObject_t.prototype.setCoordinates=mapObject_setCoordinates;
mapObject_t.prototype.setOnMapMode=mapObject_setOnMapMode;
mapObject_t.prototype.setOffMapMode=mapObject_setOffMapMode;
mapObject_t.prototype.makeBig=mapObject_makeBig;
mapObject_t.prototype.makeSmall=mapObject_makeSmall;
mapObject_t.prototype.attachTo=mapObject_attachTo;
mapObject_t.prototype.mapInfoHidden=mapObject_mapInfoHidden;
mapObject_t.prototype.getHashString=mapObject_getHashString;
mapObject_t.prototype.getDomElement=mapObject_getDomElement;
mapObject_t.prototype.isPoi=mapObject_isPoi;
mapObject_t.prototype.getOffMapCheckX=mapObject_getOffMapCheckX;
mapObject_t.prototype.getOffMapCheckY=mapObject_getOffMapCheckY;
mapObject_t.prototype.getCoordinate=mapObject_getCoordinate;
mapObject_t.prototype.isClustered=mapObject_isClustered;
mapObject_t.prototype.getClusterPoint=mapObject_getClusterPoint;
mapObject_t.prototype.getMapInfoXOffset=mapObject_getMapInfoXOffset;
mapObject_t.prototype.getMapInfoYOffset=mapObject_getMapInfoYOffset;
mapObject_t.prototype.updateLocationOnMap=mapObject_updateLocationOnMap;
mapObject_t.prototype.setMapReference=mapObject_setMapReference;
mapObject_t.prototype.createMapInfoInterface=mapObject_createMapInfoInterface;
mapObject_t.prototype.hideMapInfoWidgets=mapObject_hideMapInfoWidgets;
mapObject_t.prototype.showMapInfoWidgets=mapObject_showMapInfoWidgets;
mapObject_t.prototype.getReadableCoordinates=mapObject_getReadableCoordinates;
mapObject_t.prototype.widgetEnterEvent=mapObject_widgetEnterEvent;
mapObject_t.prototype.widgetMouseDownEvent=mapObject_widgetMouseDownEvent;
mapObject_t.prototype.widgetExitEvent=mapObject_widgetExitEvent;
mapObject_t.prototype.mapInfoCloseClickEvent=mapObject_mapInfoCloseClickEvent;
mapObject_t.prototype.DEFAULT_WIDTH=22;
mapObject_t.prototype.DEFAULT_HEIGHT=32;
mapObject_t.prototype.DEFAULT_ICON_PATH="img/app/system/icons/favicon2.png";
mapObject_t.prototype.WIDGET_OBJECT=mapObjectWidget_t;
mapObject_t.prototype.MAP_INFO_WIDTH=200;
mapObject_t.prototype.MAP_INFO_HEIGHT=100;
mapObject_t.prototype.MAP_INFO_BORDER="solid 1px black";
mapObject_t.prototype.MAP_INFO_BG_COLOUR="white";
mapObject_t.prototype.MAP_INFO_CONTENT_LEFT=5;
mapObject_t.prototype.MAP_INFO_CONTENT_TOP=5;
mapObject_t.prototype.MAP_INFO_CONTENT_WIDTH=mapObject_t.prototype.MAP_INFO_WIDTH-20;
mapObject_t.prototype.MAP_INFO_CONTENT_HEIGHT=mapObject_t.prototype.MAP_INFO_HEIGHT-20;
mapObject_t.prototype.MAP_INFO_TEXT_COLOUR="#000000";
mapObject_t.prototype.MAP_INFO_CLOSE_IMG="img/app/app/map/mapobjects/poi_close";
mapObject_t.prototype.MAP_INFO_CLOSE_SIDE=20;
mapObject_t.prototype.MAP_INFO_CLOSE_RIGHT=4;
mapObject_t.prototype.MAP_INFO_CLOSE_TOP=4;
mapObject_t.prototype.MAP_INFO_BG_IMAGE="img/site/global/pixel.png";
mapObject_t.prototype.ALLOW_MAP_INFO=true;
}
catch(ex){
jsExDebug("mapObject_t:prototype",ex);
}
function mapObject_t(_1,_2){
try{
this.mapObject_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.settingOnMapWidth=0;
this.settingOnMapHeight=0;
this.settingOffMapWidth=0;
this.settingOffMapHeight=0;
this.settingOnMapBorder="";
this.settingOffMapBorder="";
this.settingOnMapOpacity=1;
this.settingOffMapOpacity=0;
this.settingShowOffMap=true;
this.settingIconPath=_2;
this.mapInfoXOffset=0;
this.mapInfoYOffset=0;
if(this.WIDGET_OBJECT){
this.widget=new this.WIDGET_OBJECT();
this.widget.addEventHandler(this.SYSTEM.Event.MOUSE_ENTER_EVENT,new this.SYSTEM.Delegate(this,this.widgetEnterEvent));
this.widget.addEventHandler(this.SYSTEM.Event.MOUSE_EXIT_EVENT,new this.SYSTEM.Delegate(this,this.widgetExitEvent));
this.widget.addEventHandler(this.SYSTEM.Event.MOUSE_DOWN_EVENT,new this.SYSTEM.Delegate(this,this.widgetMouseDownEvent));
}
this.onMap=true;
this.width=0;
this.height=0;
this.path="";
this.positionX=0;
this.positionY=0;
this.mapReference=null;
this.mapInfoContainer=null;
this.mapInfoVisible=false;
this.mapInfoClicked=false;
this.hidden=false;
this.clusterName="unnamed";
this.clusterDescription="Map Object";
if(_1){
this.coordinate=_1;
this.setIcon(this.settingIconPath);
this.setDimensions(this.DEFAULT_WIDTH,this.DEFAULT_HEIGHT);
this.makeBig();
this.show();
}
this.createMapInfoInterface();
}
catch(ex){
jsExDebug("mapObject_t",ex);
}
}
function mapObject_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.mapInfoContainer&&me.mapInfoContainer.name&&(me.mapInfoVisible||me.mapInfoClicked)){
me.mapInfoContainer.hide();
}
me.SYSTEM.Dom.freeDom(me.mapInfoDiv);
me.mapInfoDiv=null;
if(me.closeBtn){
me.closeBtn.cleanUp();
me.closeBtn=null;
}
if(me.mapReference){
if(me.mapReference.currentCoordinate==me.coordinate){
me.mapReference.currentCoordinate=me.coordinate.copy();
}
me.mapReference=null;
}
me.mapInfoContainer=null;
me.mapInfoVisible=null;
me.mapInfoClicked=null;
me.clusterName=null;
me.clusterDescription=null;
me.clusterPointRef=null;
me.settingOnMapWidth=null;
me.settingOnMapHeight=null;
me.settingOffMapWidth=null;
me.settingOffMapHeight=null;
me.settingOnMapBorder=null;
me.settingOffMapBorder=null;
me.settingOnMapOpacity=null;
me.settingOffMapOpacity=null;
me.settingShowOffMap=null;
if(me.widget){
me.widget.cleanUp();
me.widget=null;
}
me.onMap=null;
me.width=null;
me.height=null;
me.path=null;
me.positionX=null;
me.positionY=null;
me.hidden=null;
me.settingIconPath=null;
me.parentElement=null;
if(me.coordinate){
if(!me.coordinate.dontCleanUp){
me.coordinate.cleanUp();
}
me.coordinate=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("mapObject_cleanUp",ex);
}
}
function mapObject_setPosition(x,y){
try{
if(!this.widget){
return;
}
this.positionX=x-(this.widget.width/2);
this.positionY=y-this.widget.height;
this.widget.setPosition(this.positionX,this.positionY);
}
catch(ex){
jsExDebug("mapObject_setPosition",ex);
}
}
function mapObject_setDimensions(_6,_7,_8,_9){
try{
_8=(_8?_8:_6);
_9=(_9?_9:_7);
this.settingOnMapWidth=_6;
this.settingOnMapHeight=_7;
this.settingOffMapWidth=_8;
this.settingOffMapHeight=_9;
if(!this.widget){
return;
}
if(this.onMap){
this.widget.setDimensions(_6,_7);
}else{
this.widget.setDimensions(_8,_9);
}
}
catch(ex){
jsExDebug("mapObject_setDimensions",ex);
}
}
function mapObject_hide(){
try{
this.hidden=true;
if(!this.widget){
return;
}
this.widget.hide();
}
catch(ex){
jsExDebug("mapObject_hide",ex);
}
}
function mapObject_show(){
try{
this.hidden=false;
if(!this.widget){
return;
}
this.widget.show();
}
catch(ex){
jsExDebug("mapObject_show",ex);
}
}
function mapObject_setBorder(_a,_b){
try{
this.settingOnMapBorder=_a;
this.settingOffMapBorder=_b;
if(!this.widget){
return;
}
if(this.onMap){
this.widget.setBorder(_a);
}else{
this.widget.setBorder(_b);
}
}
catch(ex){
jsExDebug("mapObject_setBorder",ex);
}
}
function mapObject_setOpacity(_c,_d){
try{
this.settingOnMapOpacity=_c;
this.settingOffMapOpacity=_d;
if(!this.widget){
return;
}
if(this.onMap){
this.widget.setOpacity(_c);
}else{
this.widget.setOpacity(_d);
}
}
catch(ex){
jsExDebug("mapObject_setOpacity",ex);
}
}
function mapObject_setClusterPoint(_e){
try{
this.clusterPointRef=_e;
}
catch(ex){
jsExDebug("mapObject_setClusterPoint",ex);
}
}
function mapObject_setIcon(_f){
try{
if(_f==null||_f==""){
_f=this.DEFAULT_ICON_PATH;
}
this.path=_f;
if(!this.widget){
return;
}
this.widget.setImage(_f);
}
catch(ex){
jsExDebug("mapObject_setIconPath",ex);
}
}
function mapObject_setCoordinates(_10){
try{
this.coordinate=_10.copy();
}
catch(ex){
jsExDebug("mapObject_setCoordinates",ex);
}
}
function mapObject_setOnMapMode(){
try{
this.onMap=true;
this.show();
this.makeBig();
}
catch(ex){
jsExDebug("mapObject_setOnMapMode",ex);
}
}
function mapObject_setOffMapMode(){
try{
if(!this.onMap&&!this.hidden){
return;
}
this.onMap=false;
if(this.settingShowOffMap){
this.makeSmall();
}else{
this.hide();
return false;
}
}
catch(ex){
jsExDebug("mapObject_setOffMapMode",ex);
}
}
function mapObject_makeSmall(){
try{
if(!this.widget){
return;
}
this.show();
this.widget.setDimensions(this.settingOffMapWidth,this.settingOffMapHeight);
this.widget.setBorderStyle(this.settingOffMapBorder);
this.widget.setOpacity(this.settingOffMapOpacity);
}
catch(ex){
jsExDebug("mapObject_makeSmall",ex);
}
}
function mapObject_makeBig(){
try{
if(!this.widget){
return;
}
this.widget.setDimensions(this.settingOnMapWidth,this.settingOnMapHeight);
this.widget.setBorderStyle(this.settingOnMapBorder);
this.widget.setOpacity(this.settingOnMapOpacity);
}
catch(ex){
jsExDebug("mapObject_makeBig",ex);
}
}
function mapObject_attachTo(_11,_12){
try{
this.parentElement=_11;
if(!this.widget){
return;
}
this.widget.attach(_11);
if(_12){
this.mapReference=_12;
this.mapInfoContainer=_12.getMapInfoContainer();
}
}
catch(ex){
jsExDebug("mapObject_attachTo",ex);
}
}
function mapObject_getDomElement(){
try{
if(!this.widget){
return;
}
if(this.widget&&this.widget.widgetElement){
return this.widget.widgetElement;
}
return null;
}
catch(ex){
jsExDebug("mapObject_getDomElement",ex);
}
}
function mapObject_isPoi(){
return false;
}
function mapObject_getOffMapCheckX(){
try{
return this.settingOnMapWidth/2;
}
catch(ex){
jsExDebug("mapObject_getOffMapCheckX",ex);
}
}
function mapObject_getOffMapCheckY(){
try{
return this.settingOnMapHeight;
}
catch(ex){
jsExDebug("mapObject_getOffMapCheckY",ex);
}
}
function mapObject_getCoordinate(){
try{
return this.coordinate;
}
catch(ex){
jsExDebug("mapObject_getCoordinate",ex);
}
}
function mapObject_isClustered(){
try{
return (this.clusterPointRef!=null);
}
catch(ex){
jsExDebug("mapObject_isClustered",ex);
}
}
function mapObject_getClusterPoint(){
try{
return this.clusterPointRef;
}
catch(ex){
jsExDebug("mapObject_getClusterPoint",ex);
}
}
function mapObject_getMapInfoXOffset(_13){
try{
return (_13?-1*this.mapInfoXOffset:this.mapInfoXOffset);
}
catch(ex){
jsExDebug("mapObject_getMapInfoXOffset",ex);
}
}
function mapObject_getMapInfoYOffset(_14){
try{
return (_14?-1*this.mapInfoYOffset:this.mapInfoYOffset);
}
catch(ex){
jsExDebug("mapObject_getMapInfoYOffset",ex);
}
}
function mapObject_setMapReference(map){
try{
if(map){
this.mapReference=map;
this.mapInfoContainer=map.getMapInfoContainer();
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("mapObject_addMapReference",ex);
}
}
function mapObject_createMapInfoInterface(){
try{
var _16=document.createElement("div");
_16.style.position="absolute";
_16.style.width=this.MAP_INFO_WIDTH+"px";
_16.style.height=this.MAP_INFO_HEIGHT+"px";
_16.style.border=this.MAP_INFO_BORDER;
_16.style.backgroundColor=this.MAP_INFO_BG_COLOUR;
_16.style.backgroundImage="url('"+this.MAP_INFO_BG_IMAGE+"')";
_16.style.backgroundPosition="0px 0px";
_16.style.backgroundRepeat="no-repeat";
_16.style.color=this.MAP_INFO_TEXT_COLOUR;
var _17=new this.SYSTEM.Widget.Button("closeBtn",this.MAP_INFO_CLOSE_IMG,this.SYSTEM.Widget.Button.HOVER_IMAGE,this.MAP_INFO_CLOSE_SIDE,this.MAP_INFO_CLOSE_SIDE);
_17.setPosition(this.MAP_INFO_CLOSE_RIGHT,this.MAP_INFO_CLOSE_TOP,1);
_17.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapInfoCloseClickEvent));
_17.hide();
_17.attach(_16);
this.mapInfoDiv=_16;
this.closeBtn=_17;
}
catch(ex){
jsExDebug("mapObject_createMapInfoInterface",ex);
}
}
function mapObject_mapInfoHidden(){
try{
this.mapInfoClicked=false;
this.mapInfoVisible=false;
}
catch(ex){
jsExDebug("mapObject_mapInfoHidden",ex);
}
}
function mapObject_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("mapObject_getHashString",ex);
}
}
function mapObject_updateLocationOnMap(){
try{
if(this.mapReference){
this.mapReference.updateMapObjectLocation(this);
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("mapObject_updateLocationOnMap",ex);
}
}
function mapObject_hideMapInfoWidgets(){
return;
}
function mapObject_showMapInfoWidgets(){
return;
}
function mapObject_getReadableCoordinates(_18){
try{
if(_18&&_18.mercX&&_18.mercY){
var _19=new Number(_18.mercX);
var _1a=new Number(_18.mercY);
_19=_19.toFixed(2);
_1a=_1a.toFixed(2);
return _19+", "+_1a;
}else{
return "-";
}
}
catch(ex){
jsExDebug("mapObject_getReadableCoordinates",ex);
}
}
function mapObject_widgetEnterEvent(_1b,_1c){
try{
if(this.mapInfoContainer&&!this.mapInfoClicked){
this.mapInfoContainer.showMapObjectInfo(this);
this.mapInfoVisible=true;
this.closeBtn.hide();
if(this.hideInfoContentWidgets){
this.hideInfoContentWidgets();
}
}
}
catch(ex){
jsExDebug("mapObject_widgetEnterEvent",ex);
}
}
function mapObject_widgetMouseDownEvent(_1d,_1e){
try{
if(this.mapInfoVisible&&this.onMap){
if(this.mapInfoVisible&&this.mapInfoClicked){
this.mapInfoContainer.hide();
this.mapInfoVisible=false;
this.mapInfoClicked=false;
this.closeBtn.hide();
if(this.hideInfoContentWidgets){
this.hideInfoContentWidgets();
}
}else{
this.mapInfoContainer.showMapObjectInfo(this);
this.mapInfoClicked=true;
this.closeBtn.show();
if(this.showInfoContentWidgets){
this.showInfoContentWidgets();
}
}
this.mapReference.clickEventHandler(_1d);
}
}
catch(ex){
jsExDebug("mapObject2_widgetMouseDownEvent",ex);
}
}
function mapObject_widgetExitEvent(){
try{
if(this.mapInfoContainer&&!this.mapInfoClicked){
this.mapInfoContainer.hide();
this.mapInfoVisible=false;
this.closeBtn.hide();
if(this.hideInfoContentWidgets){
this.hideInfoContentWidgets();
}
}
}
catch(ex){
jsExDebug("mapObject2_widgetExitEvent",ex);
}
}
function mapObject_mapInfoCloseClickEvent(){
try{
this.mapInfoContainer.hide();
this.mapInfoVisible=false;
this.mapInfoClicked=false;
this.closeBtn.hide();
if(this.hideInfoContentWidgets){
this.hideInfoContentWidgets();
}
}
catch(ex){
jsExDebug("mapObject_mapInfoCloseClickEvent",ex);
}
}

try{
mapObjectList_t.prototype=new peepelObject_t();
mapObjectList_t.prototype.constructor=mapObjectList_t;
mapObjectList_t.prototype.cleanUp=mapObjectList_cleanUp;
mapObjectList_t.prototype.mapObjectList_super=peepelObject_t.prototype.constructor;
mapObjectList_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
mapObjectList_t.prototype.add=mapObjectList_add;
mapObjectList_t.prototype.removeByHash=mapObjectList_removeByHash;
mapObjectList_t.prototype.getByHash=mapObjectList_getByHash;
mapObjectList_t.prototype.getByListIndex=mapObjectList_getByListIndex;
mapObjectList_t.prototype.getListIndexFromHash=mapObjectList_getListIndexFromHash;
mapObjectList_t.prototype.hideAll=mapObjectList_hideAll;
mapObjectList_t.prototype.showAll=mapObjectList_showAll;
mapObjectList_t.prototype.isVisible=mapObjectList_isVisible;
mapObjectList_t.prototype.contains=mapObjectList_contains;
}
catch(ex){
jsExDebug("mapObjectList_t:prototype",ex);
}
function mapObjectList_t(_1,_2){
try{
this.mapObjectList_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.parent=_1;
this.mapObjectType=_2;
this.mapObjectArray=[];
this.hashArray=[];
this.hashToIndexArray=[];
this.visible=true;
}
catch(ex){
jsExDebug("mapObjectList_t",ex);
}
}
function mapObjectList_cleanUp(me){
try{
if(!me){
me=this;
}
for(var i=0;i<me.mapObjectArray.length;i++){
if(me.mapObjectArray[i]){
me.mapObjectArray[i].cleanUp();
me.mapObjectArray[i]=null;
}
}
for(var _5 in me.hashArray){
me.hashArray[_5]=null;
me.hashToIndexArray[_5]=null;
}
me.hashArray=null;
me.mapObjectType=null;
me.hashToIndexArray=null;
me.mapObjectArray=null;
me.parent=null;
me.visible=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("mapObjectList_cleanUp",ex);
}
}
function mapObjectList_add(_6){
try{
for(var i=0;i<this.mapObjectArray.length;i++){
if(this.mapObjectArray[i]&&this.mapObjectArray[i].getHashString()==_6.getHashString()){
return null;
}
}
var _8=this.mapObjectArray.length;
this.mapObjectArray[_8]=_6;
this.hashArray[_6.getHashString()]=_6;
this.hashToIndexArray[_6.getHashString()]=_8;
return _8;
}
catch(ex){
jsExDebug("mapObjectList_add",ex);
}
}
function mapObjectList_removeByHash(_9){
try{
var _a=this.hashArray[_9];
if(_a){
var _b=this.hashToIndexArray[_9];
if(this.mapObjectArray[_b]){
this.mapObjectArray[_b].cleanUp();
this.mapObjectArray[_b]=null;
delete this.mapObjectArray[_b];
}
}
this.hashArray[_9]=null;
this.hashToIndexArray[_9]=null;
delete this.hashArray[_9];
delete this.hashToIndexArray[_9];
}
catch(ex){
jsExDebug("mapObjectList_removeByHash",ex);
}
}
function mapObjectList_getByHash(_c){
try{
return this.hashArray[_c];
}
catch(ex){
jsExDebug("mapObjectList_getByHash",ex);
}
}
function mapObjectList_getByListIndex(_d){
try{
return this.mapObjectArray[_d];
}
catch(ex){
jsExDebug("mapObjectList_getByListIndex",ex);
}
}
function mapObjectList_getListIndexFromHash(_e){
try{
return this.hashToIndexArray[_e];
}
catch(ex){
jsExDebug("mapObjectList_getListIndexFromHash",ex);
}
}
function mapObjectList_hideAll(){
try{
var _f=this.mapObjectArray;
for(var i in _f){
if(_f[i].hide){
_f[i].hide();
}
}
this.visible=false;
}
catch(ex){
jsExDebug("mapObjectList_hideAll",ex);
}
}
function mapObjectList_showAll(){
try{
var _11=this.mapObjectArray;
for(var i in _11){
if(_11[i].show&&_11[i].onMap){
_11[i].show();
}
}
this.visible=true;
}
catch(ex){
jsExDebug("mapObjectList_showAll",ex);
}
}
function mapObjectList_isVisible(){
try{
return this.visible;
}
catch(ex){
jsExDebug("mapObjectList_isVisible",ex);
}
}
function mapObjectList_contains(_13){
try{
return (this.hashArray[_13]?true:false);
}
catch(ex){
jsExDebug("mapObjectList_contains",ex);
}
}

try{
trackingMapObjectList_t.prototype=new mapObjectList_t();
trackingMapObjectList_t.prototype.constructor=trackingMapObjectList_t;
trackingMapObjectList_t.prototype.cleanUp=trackingMapObjectList_cleanUp;
trackingMapObjectList_t.prototype.trackingMapObjectList_super=mapObjectList_t.prototype.constructor;
trackingMapObjectList_t.prototype.mapObjectList_cleanUp=mapObjectList_t.prototype.cleanUp;
trackingMapObjectList_t.prototype.add=trackingMapObjectList_add;
trackingMapObjectList_t.prototype.mapObjectList_add=mapObjectList_t.prototype.add;
trackingMapObjectList_t.prototype.removeByHash=trackingMapObjectList_removeByHash;
trackingMapObjectList_t.prototype.mapObjectList_removeByHash=mapObjectList_t.prototype.removeByHash;
trackingMapObjectList_t.prototype.getLatestCoordinate=trackingMapObjectList_getLatestCoordinate;
trackingMapObjectList_t.prototype.getObjectsForId=trackingMapObjectList_getObjectsForId;
trackingMapObjectList_t.prototype.getAllObjects=trackingMapObjectList_getAllObjects;
trackingMapObjectList_t.prototype.drawTrails=trackingMapObjectList_drawTrails;
trackingMapObjectList_t.prototype.hideTrails=trackingMapObjectList_hideTrails;
trackingMapObjectList_t.prototype.containsId=trackingMapObjectList_containsId;
trackingMapObjectList_t.prototype.getIdsInList=trackingMapObjectList_getIdsInList;
trackingMapObjectList_t.prototype.showPastLocations=trackingMapObjectList_showPastLocations;
trackingMapObjectList_t.prototype.hidePastLocations=trackingMapObjectList_hidePastLocations;
trackingMapObjectList_t.prototype.setOverrideHidden=trackingMapObjectList_setOverrideHidden;
trackingMapObjectList_t.prototype.checkForPastLocation=trackingMapObjectList_checkForPastLocation;
}
catch(ex){
jsExDebug("trackingMapObjectList_t:prototype",ex);
}
function trackingMapObjectList_t(_1,_2){
try{
this.trackingMapObjectList_super(_1,_2);
this.trails=[];
this.stateShowPastLocations=true;
}
catch(ex){
jsExDebug("trackingMapObjectList_t",ex);
}
}
function trackingMapObjectList_cleanUp(me){
try{
if(!me){
me=this;
}
for(var id in me.trails){
for(var i=0;i<me.trails[id].length;i++){
me.trails[id][i]=null;
}
}
me.trails=null;
me.stateShowPastLocations=null;
me.mapObjectList_cleanUp();
}
catch(ex){
jsExDebug("trackingMapObjectList_cleanUp",ex);
}
}
function trackingMapObjectList_add(_6,id){
try{
var _8=this.mapObjectList_add(_6);
if((_8!=null)&&(!_6.isClusterPoint)){
if(!this.trails[id]){
this.trails[id]=[];
}
var _9=this.trails[id];
var _a=null;
if(_6.coordinate.dateFound){
var _b=(_6.coordinate.dateFound?_6.coordinate.dateFound.getTime():new Date().getTime());
var mo=null;
var _d=null;
for(var i=0;i<_9.length;i++){
mo=this.hashArray[_9[i]];
if(mo&&(mo.isPastLocation&&mo.isPastLocation())){
_d=(mo.coordinate.dateFound?mo.coordinate.dateFound.getTime():new Date().getTime());
if(_b<_d){
_a=i;
break;
}
}
}
}
if(_a==null){
_a=_9.push(_6.hashString)-1;
}else{
_a=parseInt(_a);
_9.splice(_a,1,_6.hashString);
}
for(var i=_a-1;i>=0;i--){
mo=this.hashArray[_9[i]];
if(mo&&mo.makePastLocation){
mo.makePastLocation();
if(!this.stateShowPastLocations){
mo.overrideHidden=true;
}
}
}
if(!this.stateShowPastLocations&&this.checkForPastLocation(_6)){
_6.overrideHidden=true;
}
}
return _8;
}
catch(ex){
jsExDebug("trackingMapObjectList_add",ex);
}
}
function trackingMapObjectList_removeByHash(_f){
try{
for(var id in this.trails){
if(this.trails[id]){
for(var i=0;i<this.trails[id].length;i++){
if(this.trails[id][i]==_f){
this.trails[id].splice(i,1);
break;
}
}
}
}
this.mapObjectList_removeByHash(_f);
}
catch(ex){
jsExDebug("trackingMapObjectList_removeByHash",ex);
}
}
function trackingMapObjectList_getLatestCoordinate(id){
try{
if(this.trails[id]){
var _13=this.trails[id][this.trails[id].length-1];
return (this.hashArray[_13]?this.hashArray[_13].coordinate:null);
}
}
catch(ex){
jsExDebug("trackingMapObjectList_getLatestCoordinate",ex);
}
}
function trackingMapObjectList_getObjectsForId(id){
try{
if(this.trails[id]){
var _15=[];
for(var i=0;i<this.trails[id].length;i++){
if(this.trails[id][i]){
_15.push(this.hashArray[this.trails[id][i]]);
}
}
return _15;
}else{
return null;
}
}
catch(ex){
jsExDebug("trackingMapObjectList_getObjectsForId",ex);
}
}
function trackingMapObjectList_getAllObjects(){
try{
var _17=[];
for(var id in this.trails){
_17[id]=[];
for(var i=0;i<this.trails[id].length;i++){
if(this.trails[id][i]){
_17.push(this.hashArray[this.trails[id][i]]);
}
}
}
return _17;
}
catch(ex){
jsExDebug("trackingMapObjectList_getAllObjects",ex);
}
}
function trackingMapObjectList_drawTrails(){
try{
var _1a=null;
var _1b=null;
for(var id in this.trails){
_1a=null;
_1b=null;
for(var i=0;i<this.trails[id].length;i++){
_1b=this.hashArray[this.trails[id][i]];
if(!_1b){
jsDebug("ERROR: trackingMapObjectList_drawTrails: line ~211");
return;
}
if(_1b.overrideHidden){
continue;
}
if(_1a){
_1a.joinTo(_1b);
}
_1a=_1b;
}
}
}
catch(ex){
jsExDebug("trackingMapObjectList_drawTrails",ex);
}
}
function trackingMapObjectList_hideTrails(){
try{
for(var id in this.trails){
for(var i=0;i<this.trails[id].length;i++){
this.hashArray[this.trails[id][i]].hideTrails();
}
}
}
catch(ex){
jsExDebug("trackingMapObjectList_hideTrails",ex);
}
}
function trackingMapObjectList_containsId(id){
try{
if(this.trails[id]){
var _21=0;
for(var i=0;i<this.trails[id].length;i++){
if(this.trails[id][i]){
_21++;
}
}
if(_21>0){
return true;
}
}
return false;
}
catch(ex){
jsExDebug("trackingMapObjectList_containsId",ex);
}
}
function trackingMapObjectList_getIdsInList(){
try{
var _23=[];
for(var id in this.trails){
_23.push(id);
}
return _23;
}
catch(ex){
jsExDebug("trackingMapObjectList_getIdsInList",ex);
}
}
function trackingMapObjectList_showPastLocations(){
try{
this.stateShowPastLocations=true;
for(var i=0;i<this.mapObjectArray.length;i++){
if(this.mapObjectArray[i]&&this.checkForPastLocation(this.mapObjectArray[i])){
this.mapObjectArray[i].overrideHidden=false;
}
}
}
catch(ex){
jsExDebug("trackingMapObjectList_showPastLocations",ex);
}
}
function trackingMapObjectList_hidePastLocations(){
try{
this.stateShowPastLocations=false;
for(var i=0;i<this.mapObjectArray.length;i++){
if(this.mapObjectArray[i]&&this.checkForPastLocation(this.mapObjectArray[i])){
this.mapObjectArray[i].overrideHidden=true;
}
}
}
catch(ex){
jsExDebug("trackingMapObjectList_hidePastLocations",ex);
}
}
function trackingMapObjectList_checkForPastLocation(_27){
try{
return (_27.isPastLocation&&_27.isPastLocation());
}
catch(ex){
jsExDebug("trackingMapObjectList_checkForPastLocation",ex);
}
}
function trackingMapObjectList_setOverrideHidden(_28,_29){
try{
var _2a=[];
_2a[1]=this.checkForSignificantPoint;
_2a[2]=this.checkForPastLocation;
for(var i=0;i<this.mapObjectArray.length;i++){
if(this.mapObjectArray[i]&&_2a[_29](this.mapObjectArray[i])){
this.mapObjectArray[i].overrideHidden=_28;
}
}
}
catch(ex){
jsExDebug("trackingMapObjectList_setOverrideHidden",ex);
}
}

try{
mapPoi_t.prototype=new mapObject_t();
mapPoi_t.prototype.mapPoi_super=mapObject_t.prototype.constructor;
mapPoi_t.prototype.constructor=mapPoi_t;
mapPoi_t.prototype.cleanUp=mapPoi_cleanUp;
mapPoi_t.prototype.mapObject_cleanUp=mapObject_t.prototype.cleanUp;
mapPoi_t.prototype.isPoi=mapPoi_isPoi;
mapPoi_t.prototype.getHashString=mapPoi_getHashString;
mapPoi_t.prototype.mapInfoDeleteClickEvent=mapPoi_mapInfoDeleteClickEvent;
mapPoi_t.prototype.mapInfoRemoveClickEvent=mapPoi_mapInfoRemoveClickEvent;
mapPoi_t.prototype.mapInfoImportClickEvent=mapPoi_mapInfoImportClickEvent;
mapPoi_t.prototype.mapInfoModerateClickEvent=mapPoi_mapInfoModerateClickEvent;
mapPoi_t.prototype.createMapInfoContent=mapPoi_createMapInfoContent;
mapPoi_t.prototype.showInfoContentWidgets=mapPoi_showInfoContentWidgets;
mapPoi_t.prototype.hideInfoContentWidgets=mapPoi_hideInfoContentWidgets;
mapPoi_t.prototype.DEFAULT_WIDTH=28;
mapPoi_t.prototype.DEFAULT_HEIGHT=32;
mapPoi_t.prototype.DEFAULT_ICON_PATH="img/app/app/map/icons/PeepelPointOfficial.png";
mapPoi_t.prototype.DEFAULT_SHOW_OFFMAP=true;
mapPoi_t.prototype.MAP_INFO_WIDTH=260;
mapPoi_t.prototype.MAP_INFO_HEIGHT=110;
mapPoi_t.prototype.MAP_INFO_BG_COLOUR=SYSTEM.Style.BLUE_TOOLGROUP_BG;
mapPoi_t.prototype.ACTION_GET_TILE_DOWNLOAD_URL=8;
}
catch(ex){
jsExDebug("mapPoi_t.prototype",ex);
}
function mapPoi_t(_1,_2,_3){
try{
this.mapPoi_super(_1);
this.isPublic=_3;
this.peepelPointRef=_2;
this.pointId=_2.locationId;
this.widget.setLabel(_2.name);
this.createMapInfoContent(_2.name);
this.hashString=this.pointId+"_"+_2.name+"_"+this.coordinate.toString();
this.clusterDescription="PeepelPoint";
this.clusterName=_2.name;
}
catch(ex){
jsExDebug("mapPoi_t",ex);
}
}
function mapPoi_cleanUp(){
try{
this.questionDialogue=null;
this.pointId=null;
if(this.isPublic){
this.peepelPointRef.cleanUp();
this.importLink.cleanUp();
this.moderateLink.cleanUp();
this.importLink=null;
this.moderateLink=null;
}else{
this.deleteLink.cleanUp();
this.deleteLink=null;
}
this.peepelPointRef=null;
this.isPublic=null;
this.titleLabel.cleanUp();
this.removeLink.cleanUp();
this.titleLabel=null;
this.removeLink=null;
this.mapObject_cleanUp();
}
catch(ex){
jsExDebug("mapPoi_cleanUp",ex);
}
}
function mapPoi_createMapInfoContent(_4){
try{
var _5=new this.SYSTEM.Widget.Label("titleLabel",_4,12);
_5.setPosition(5,0);
_5.setFontSize(null,13);
_5.setBold();
_5.attach(this.mapInfoDiv);
var _6=new this.SYSTEM.Widget.Label("descriptionLabel",(this.peepelPointRef.description?this.peepelPointRef.description:"<i>No description</i>"),95);
_6.setPosition(5,25);
_6.setDimensions(mapPoi_t.prototype.MAP_INFO_WIDTH-10,70);
_6.setOverflow("hidden");
_6.attach(this.mapInfoDiv);
var _7=new this.SYSTEM.Widget.Link("removeLink","Remove from map",110);
_7.setPosition(5,20,0,1);
_7.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapInfoRemoveClickEvent));
_7.hide();
_7.attach(this.mapInfoDiv);
if(this.isPublic){
this.mapInfoDiv.style.height=(this.MAP_INFO_HEIGHT+25)+"px";
var _8=new this.SYSTEM.Widget.Link("moderateLink","Mark as offensive",130);
_8.setPosition(135,40,0,1);
_8.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapInfoModerateClickEvent));
_8.hide();
_8.attach(this.mapInfoDiv);
var _9=new this.SYSTEM.Widget.Link("importLink","Import PeepelPoint");
_9.setPosition(135,20,0,1);
_9.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapInfoImportClickEvent));
_9.hide();
if(!this.SYSTEM.PeepelPoints.getPointFromLocationId(this.pointId)){
_9.attach(this.mapInfoDiv);
}
this.importLink=_9;
this.moderateLink=_8;
}else{
var _a=new this.SYSTEM.Widget.Link("removeLink","Delete PeepelPoint");
_a.setPosition(135,20,0,1);
_a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapInfoDeleteClickEvent));
_a.hide();
_a.attach(this.mapInfoDiv);
this.deleteLink=_a;
}
this.titleLabel=_5;
this.removeLink=_7;
}
catch(ex){
jsExDebug("mapPoi_createMapInfoContent",ex);
}
}
function mapPoi_showInfoContentWidgets(){
try{
this.removeLink.show();
if(this.isPublic){
this.importLink.show();
this.moderateLink.show();
}else{
this.deleteLink.show();
}
}
catch(ex){
jsExDebug("mapPoi_showInfoContentWidgets",ex);
}
}
function mapPoi_hideInfoContentWidgets(){
try{
this.removeLink.hide();
if(this.isPublic){
this.importLink.hide();
this.moderateLink.hide();
}else{
this.deleteLink.hide();
}
}
catch(ex){
jsExDebug("mapPoi_hideInfoContentWidgets",ex);
}
}
function mapPoi_isPoi(){
try{
return true;
}
catch(ex){
jsExDebug("mapPoi_isPoi",ex);
}
}
function mapPoi_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("mapPoi_getHashString",ex);
}
}
function mapPoi_mapInfoRemoveClickEvent(_b,_c){
try{
this.mapInfoContainer.hide();
this.mapReference.removePoi(this.getHashString());
}
catch(ex){
jsExDebug("mapPoi_mapInfoRemoveClickEvent",ex);
}
}
function mapPoi_mapInfoDeleteClickEvent(_d,_e){
try{
this.mapInfoContainer.hide();
this.SYSTEM.PeepelPoints.deletePeepelPoint(this.peepelPointRef.locationId);
}
catch(ex){
jsExDebug("mapPoi_mapInfoDeleteClickEvent",ex);
}
}
function mapPoi_mapInfoImportClickEvent(){
try{
this.mapInfoContainer.hide();
if(this.peepelPointRef&&this.mapReference){
this.SYSTEM.PeepelPoints.addPeepelPoint(this.peepelPointRef.coordinate.copy(),this.peepelPointRef.name,this.peepelPointRef.description,this.peepelPointRef.tags,this.peepelPointRef.privacy);
var d=new this.SYSTEM.Dialogue.OkAlert(null,"WebMap","The PeepelPoint "+this.peepelPointRef.name+" has been imported.");
}
}
catch(ex){
jsExDebug("mapPoi_mapInfoDeleteClickEvent",ex);
}
}
function mapPoi_mapInfoModerateClickEvent(){
function callback(_10){
try{
if(_10){
this.mapInfoContainer.hide();
this.mapReference.removePoi(this.getHashString());
}
}
catch(ex){
jsExDebug("mapPoi_mapInfoModerateClickEvent: callback",ex);
}
}
try{
var d=new this.SYSTEM.Dialogue.Moderate(null,"point",this.peepelPointRef.locationId,new this.SYSTEM.Delegate(this,callback),this.peepelPointRef.name);
}
catch(ex){
jsExDebug("mapPoi_mapInfoModerateClickEvent",ex);
}
}

try{
trackableMapObject_t.prototype=new mapObject_t();
trackableMapObject_t.prototype.trackableMapObject_super=mapObject_t.prototype.constructor;
trackableMapObject_t.prototype.constructor=trackableMapObject_t;
trackableMapObject_t.prototype.cleanUp=trackableMapObject_cleanUp;
trackableMapObject_t.prototype.mapObject_cleanUp=mapObject_t.prototype.cleanUp;
trackableMapObject_t.prototype.mapObject_makeSmall=mapObject_t.prototype.makeSmall;
trackableMapObject_t.prototype.mapObject_makeBig=mapObject_t.prototype.makeBig;
trackableMapObject_t.prototype.makeSmall=trackableMapObject_makeSmall;
trackableMapObject_t.prototype.makeBig=trackableMapObject_makeBig;
trackableMapObject_t.prototype.setPosition=trackableMapObject_setPosition;
trackableMapObject_t.prototype.getOffMapCheckY=trackableMapObject_getOffMapCheckY;
trackableMapObject_t.prototype.setOnMapMode=trackableMapObject_setOnMapMode;
trackableMapObject_t.prototype.setOffMapMode=trackableMapObject_setOffMapMode;
trackableMapObject_t.prototype.mapObject_setOnMapMode=mapObject_t.prototype.setOnMapMode;
trackableMapObject_t.prototype.mapObject_setOffMapMode=mapObject_t.prototype.setOffMapMode;
trackableMapObject_t.prototype.getHashString=trackableMapObject_getHashString;
trackableMapObject_t.prototype.isPastLocation=trackableMapObject_isPastLocation;
trackableMapObject_t.prototype.makePastLocation=trackableMapObject_makePastLocation;
trackableMapObject_t.prototype.joinTo=trackableMapObject_joinTo;
trackableMapObject_t.prototype.hideTrails=trackableMapObject_hideTrails;
trackableMapObject_t.prototype.getLocationGuid=trackableMapObject_getLocationGuid;
trackableMapObject_t.prototype.setImageURL=trackableMapObject_setImageURL;
trackableMapObject_t.prototype.createBaseMapInfoContent=trackableMapObject_createBaseMapInfoContent;
trackableMapObject_t.prototype.createMapInfoContent=trackableMapObject_createMapInfoContent;
trackableMapObject_t.prototype.getTimeText=trackableMapObject_getTimeText;
trackableMapObject_t.prototype.getLineCoords=trackableMapObject_getLineCoords;
trackableMapObject_t.prototype.locationImageClickEvent=trackableMapObject_locationImageClickEvent;
trackableMapObject_t.prototype.followBtnClickEvent=trackableMapObject_followBtnClickEvent;
trackableMapObject_t.prototype.mapInfoRemoveClickEvent=trackableMapObject_mapInfoRemoveClickEvent;
trackableMapObject_t.prototype.foundByImgMouseOverEvent=trackableMapObject_foundByImgMouseOverEvent;
trackableMapObject_t.prototype.foundByImgMouseOutEvent=trackableMapObject_foundByImgMouseOutEvent;
trackableMapObject_t.prototype.DEFAULT_WIDTH=32;
trackableMapObject_t.prototype.DEFAULT_HEIGHT=32;
trackableMapObject_t.prototype.DEFAULT_SHOW_OFFMAP=true;
trackableMapObject_t.prototype.MAP_INFO_WIDTH=220;
trackableMapObject_t.prototype.MAP_INFO_HEIGHT=139;
trackableMapObject_t.prototype.MAP_INFO_BG_COLOUR="";
trackableMapObject_t.prototype.MAP_INFO_BORDER="";
trackableMapObject_t.prototype.MAP_INFO_BG_IMAGE="img/app/app/map/mapobjects/bg.png";
trackableMapObject_t.prototype.MAP_INFO_CLOSE_RIGHT=15;
trackableMapObject_t.prototype.MAP_INFO_CLOSE_TOP=8;
trackableMapObject_t.prototype.CONTENT_LEFT=15;
trackableMapObject_t.prototype.CONTENT_TOP=10;
trackableMapObject_t.prototype.MAP_INFO_LGE_BG_IMAGE="img/app/app/map/mapobjects/bg_lge.png";
trackableMapObject_t.prototype.FOLLOW_OFF_IMG="img/app/app/map/mapobjects/follow_off";
trackableMapObject_t.prototype.FOLLOW_ON_IMG="img/app/app/map/mapobjects/follow_on";
trackableMapObject_t.prototype.FOLLOW_WIDTH=77;
trackableMapObject_t.prototype.FOLLOW_HEIGHT=25;
trackableMapObject_t.prototype.LINE_THICKNESS=3;
trackableMapObject_t.prototype.USE_BASE_INFO_CONTENT=true;
trackableMapObject_t.prototype.PAST_WIDTH=16;
trackableMapObject_t.prototype.PAST_HEIGHT=16;
trackableMapObject_t.prototype.LOC_IMAGE_WIDTH=trackableMapObject_t.prototype.MAP_INFO_WIDTH-20;
trackableMapObject_t.prototype.TOOLTIP_TIMER=650;
}
catch(ex){
jsExDebug("trackableMapObject_t.prototype",ex);
}
function trackableMapObject_t(_1,_2){
try{
if(!_1){
return;
}
this.trackableMapObject_super(_1);
this.trailLines=null;
this.overrideHidden=false;
this.trailColour=(_2?_2:"#000000");
this.foundBySpecs=[];
this.foundBySpecs["gps"]={src:"img/app/app/map/mapobjects/gps.png",width:41,height:42,text:"<b>GPS</b>  location"};
this.foundBySpecs["wifi"]={src:"img/app/app/map/mapobjects/wifi.png",width:33,height:33,text:"<b>WiFi</b>  location"};
this.foundBySpecs["user"]={src:"img/app/app/map/mapobjects/user_define.png",width:33,height:40,text:"<b>User Defined</b> location"};
this.foundBySpecs["cell"]={src:"img/app/app/map/mapobjects/cell.png",width:30,height:40,text:"<b>Cell Tower</b> location"};
this.foundBySpecs["peepelpoint"]={src:"img/app/app/map/icons/PeepelPointOfficial.png",width:28,height:32,text:"<b>PeepelPoint</b> location"};
if(this.USE_BASE_INFO_CONTENT){
this.createBaseMapInfoContent();
}
this.hashString=this.coordinate.toString();
this.locationTimeSeconds=(_1.dateFound?_1.dateFound.getTime():null);
this.settingIsPastLocation=false;
this.createMapInfoContent();
}
catch(ex){
jsExDebug("trackableMapObject_t",ex);
}
}
function trackableMapObject_cleanUp(me){
try{
if(!me){
me=this;
}
me.settingIsPastLocation=null;
me.overrideHidden=null;
for(var _4 in me.trailLines){
me.mapReference.drawer.removeElement(me.trailLines[_4]);
me.trailLines[_4]=null;
}
me.trailLines=null;
me.locationTimeSeconds=null;
if(me.USE_BASE_INFO_CONTENT){
me.titleLabel.cleanUp();
me.titleLabel=null;
me.removeLink.cleanUp();
me.removeLink=null;
me.timeLabel.cleanUp();
me.timeLabel=null;
me.followBtn.cleanUp();
me.followBtn=null;
me.avatarImg=null;
if(me.locationImage){
me.SYSTEM.Event.detachEvent(me.locationImage,"onclick","click");
me.locationImage=null;
}
}
me.foundByData=null;
for(var _5 in me.foundBySpecs){
me.foundBySpecs[_5].src=null;
me.foundBySpecs[_5].width=null;
me.foundBySpecs[_5].height=null;
me.foundBySpecs[_5].text=null;
}
me.foundBySpecs=null;
if(me.foundByImg){
me.SYSTEM.Event.detachEvent(me.foundByImg,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.foundByImg,"onmouseout","mouseout");
}
me.foundByImg=null;
me.mapObject_cleanUp();
}
catch(ex){
jsExDebug("trackableMapObject_cleanUp",ex);
}
}
function trackableMapObject_makeSmall(){
try{
if(this.isPastLocation()){
this.hide();
}else{
this.mapObject_makeSmall();
}
}
catch(ex){
jsExDebug("trackableMapObject_makeSmall",ex);
}
}
function trackableMapObject_makeBig(){
try{
this.mapObject_makeBig();
if(this.isPastLocation()){
this.show();
}
}
catch(ex){
jsExDebug("trackableMapObject_makeBig",ex);
}
}
function trackableMapObject_setPosition(x,y){
try{
if(!this.widget){
return;
}
this.positionX=x-(this.widget.width/2);
this.positionY=y-(this.widget.height/2);
this.widget.setPosition(this.positionX,this.positionY);
}
catch(ex){
jsExDebug("trackableMapObject_setPosition",ex);
}
}
function trackableMapObject_getOffMapCheckY(){
try{
return this.settingOnMapHeight/2;
}
catch(ex){
jsExDebug("trackableMapObject_getOffMapCheckY",ex);
}
}
function trackableMapObject_setOnMapMode(){
try{
if(this.overrideHidden){
this.onMap=false;
this.hide(true);
}else{
this.mapObject_setOnMapMode();
}
}
catch(ex){
jsExDebug("trackableMapObject_setOnMapMode",ex);
}
}
function trackableMapObject_setOffMapMode(){
try{
if(this.overrideHidden){
this.onMap=false;
this.hide(true);
}else{
this.mapObject_setOffMapMode();
}
}
catch(ex){
jsExDebug("trackableMapObject_setOffMapMode",ex);
}
}
function trackableMapObject_createBaseMapInfoContent(){
try{
var _8=this.SYSTEM.UserDetails.SIDE_50;
var _9=this.pad;
var _a=15;
var _b=this.SYSTEM.Dom.createImage(null,"absolute",_8,_8,this.CONTENT_LEFT,this.CONTENT_TOP);
this.mapInfoDiv.appendChild(_b);
var _c=new this.SYSTEM.Widget.Label("titleLabel",null,16);
_c.setPosition(this.CONTENT_LEFT+_8+_9,this.CONTENT_TOP+(_8/2)-(_a/2));
_c.setDimensions(this.MAP_INFO_WIDTH-_c.positionX,_a);
_c.setFontSize(null,null,13);
_c.setBold();
_c.attach(this.mapInfoDiv);
var _d=null;
var _e=_9;
if(this.coordinate.locationMethod){
if(this.coordinate.locationMethod.match(/gps/)){
_d=this.foundBySpecs["gps"];
}else{
if(this.coordinate.locationMethod.match(/wifi/)){
_d=this.foundBySpecs["wifi"];
}else{
if(this.coordinate.locationMethod.match(/peepelpoint/)){
_d=this.foundBySpecs["peepelpoint"];
_e+=this.pad;
}else{
if(this.coordinate.locationMethod.match(/user/)){
_d=this.foundBySpecs["user"];
}else{
if(this.coordinate.locationMethod.match(/cell/)){
_d=this.foundBySpecs["cell"];
}
}
}
}
}
}
if(_d){
var _f=this.SYSTEM.Dom.createImage(_d.src,"absolute",_d.width,_d.height,null,this.CONTENT_TOP+this.MAP_INFO_CLOSE_SIDE);
_f.style.right=_e+"px";
this.mapInfoDiv.appendChild(_f);
this.foundByImg=_f;
this.foundByData=_d;
this.SYSTEM.Event.attachEvent(_f,"onmouseover","mouseover",this.foundByImgMouseOverEvent,this);
this.SYSTEM.Event.attachEvent(_f,"onmouseoout","mouseout",this.foundByImgMouseOutEvent,this);
}
var _10=new this.SYSTEM.Widget.Label("timeLabel","Time: "+this.getTimeText(),27);
_10.setPosition(this.CONTENT_LEFT,this.CONTENT_TOP+_8+_9+2);
_10.setDimensions(this.MAP_INFO_WIDTH-_10.positionX-_9,_a);
_10.setFontSize(null,9);
_10.setBold();
_10.attach(this.mapInfoDiv);
var _11=new this.SYSTEM.Widget.Button("followBtn",this.FOLLOW_OFF_IMG,null,this.FOLLOW_WIDTH,this.FOLLOW_HEIGHT);
_11.setPosition(this.CONTENT_LEFT,_10.positionY+_10.height+_9+2);
_11.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.followBtnClickEvent));
_11.attach(this.mapInfoDiv);
var _12=new this.SYSTEM.Widget.Label("removeLink","Remove from map");
_12.setDimensions(this.MAP_INFO_WIDTH/2,_a);
_12.setUnderline();
_12.setCursor("pointer");
_12.setFontSize(null,8);
_12.setPosition(this.CONTENT_LEFT,_11.positionY+_11.height+_9);
_12.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapInfoRemoveClickEvent));
_12.hide();
_12.attach(this.mapInfoDiv);
if(this.coordinate.imageURL&&this.coordinate.imageURL.length){
var _13=this.MAP_INFO_WIDTH-(2*this.CONTENT_LEFT);
var _14=this.SYSTEM.Dom.createImage(this.coordinate.imageURL[0],"absolute",_13,null,this.CONTENT_LEFT);
_14.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
_14.style.bottom=this.CONTENT_TOP+"px";
_14.style.cursor="pointer";
this.locationImage=_14;
this.SYSTEM.Event.attachEvent(_14,"onclick","click",this.locationImageClickEvent,this,false,this.coordinate.imageURL[0]);
var _15=(480/640)*_13;
this.locationImage.style.height=_15+"px";
this.mapInfoDiv.style.height=(this.MAP_INFO_HEIGHT+_15+_9+this.CONTENT_TOP)+"px";
this.mapInfoDiv.style.backgroundImage="url('"+this.MAP_INFO_LGE_BG_IMAGE+"')";
this.mapInfoDiv.appendChild(this.locationImage);
if(this.widget&&this.widget.setMediaLocation){
this.widget.setMediaLocation();
}
}
this.avatarImg=_b;
this.titleLabel=_c;
this.timeLabel=_10;
this.followBtn=_11;
this.removeLink=_12;
}
catch(ex){
jsExDebug("trackableMapObject_createBaseMapInfoContent",ex);
}
}
function trackableMapObject_createMapInfoContent(){
}
function trackableMapObject_getTimeText(){
try{
if(!this.locationTimeSeconds){
return;
}
return getAgeTextFromMilliseconds(this.locationTimeSeconds);
}
catch(ex){
jsExDebug("trackableMapObject_getTimeText",ex);
}
}
function trackableMapObject_getLineCoords(_16){
try{
var _17=this.mapReference.getBoundaryCoordinates();
var _18=_17.topLeft.getMercatorCoordinates();
var _19=_17.bottomRight.getMercatorCoordinates();
var _1a=_19.x-_18.x;
var _1b=_19.y-_18.y;
var _1c=this.mapReference.width;
var _1d=this.mapReference.height;
var _1e=this.coordinate;
if(this.isClustered()){
_1e=this.clusterPointRef.coordinate;
}
var _1f=_16.coordinate;
if(_16.isClustered()){
_16=_16.getClusterPoint();
_1f=_16.coordinate;
}
var x1=(_1c*((_1e.mercX-_18.x)/_1a));
var y1=(_1d*((_1e.mercY-_18.y)/_1b));
var x2=(_1c*((_1f.mercX-_18.x)/_1a));
var y2=(_1d*((_1f.mercY-_18.y)/_1b));
var m=(y2-y1)/(x2-x1);
var c=y2-(m*x2);
if(x1<-_1c){
x1=-_1c/2;
y1=(m*x1)+c;
if(x2<0){
return false;
}
}else{
if(x1>(2*_1c)){
x1=_1c*1.5;
y1=(m*x1)+c;
if(x2>_1c){
return false;
}
}else{
if(x2<-_1c){
x2=-_1c/2;
y2=(m*x2)+c;
}else{
if(x2>(2*_1c)){
x2=_1c*1.5;
y2=(m*x2)+c;
}
}
}
}
if(y1<-_1d){
y1=-(_1d/2);
x1=(y1-c)/m;
if(y2<0){
return false;
}
}else{
if(y1>(2*_1d)){
y1=_1d*1.5;
x1=(y1-c)/m;
if(y2>_1d){
return false;
}
}else{
if(y2<-_1d){
y2=-(_1d/2);
x2=(y2-c)/m;
}else{
if(y2>(2*_1d)){
y2=_1d*1.5;
x2=(y2-c)/m;
}
}
}
}
_18=null;
_19=null;
_17.cleanUp();
return {x1:x1,y1:y1,x2:x2,y2:y2};
}
catch(ex){
jsExDebug("trackableMapObject_getLineCoords",ex);
}
}
function trackableMapObject_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("trackableMapObject_getHashString",ex);
}
}
function trackableMapObject_isPastLocation(){
try{
return this.settingIsPastLocation;
}
catch(ex){
jsExDebug("trackableMapObject_isPastLocation",ex);
}
}
function trackableMapObject_makePastLocation(){
try{
this.settingIsPastLocation=true;
if(!this.onMap&&!this.hidden){
this.onMap=true;
}
}
catch(ex){
jsExDebug("trackableMapObject_makePastLocation",ex);
}
}
function trackableMapObject_joinTo(_26){
try{
if(this.isPastLocation()){
if(this.trailLines==null){
var _27=this.positionX;
var _28=this.positionY;
if(this.widget){
if(this.widget.setPastLocation){
this.widget.setPastLocation();
}
_27+=this.DEFAULT_WIDTH/2;
_28+=this.DEFAULT_HEIGHT;
}
this.setDimensions(this.PAST_WIDTH,this.PAST_HEIGHT,this.PAST_WIDTH,this.PAST_HEIGHT);
this.setPosition(_27,_28);
this.trailLines=[];
}
var _29=this.getLineCoords(_26);
var _2a=false;
if(_29){
_2a=true;
}else{
_29={x1:0,y1:0,x2:0,y2:0};
}
var _2b=this.mapReference.drawer;
if(!this.trailLines[_26.hashString]){
var _2c=this.mapReference.drawer.drawLine(_29.x1,_29.y1,_29.x2,_29.y2,this.trailColour,this.LINE_THICKNESS);
this.trailLines[_26.hashString]=_2c;
}else{
_2c=this.trailLines[_26.hashString];
_2b.setLinePosition(_2c,_29.x1,_29.y1,_29.x2,_29.y2);
_2b.showElement(_2c);
}
if(_2a){
_2c.style.visibility="visible";
}else{
_2c.style.visibility="hidden";
}
}
}
catch(ex){
jsExDebug("trackableMapObject_joinTo",ex);
}
}
function trackableMapObject_hideTrails(){
try{
for(var _2d in this.trailLines){
this.mapReference.drawer.hideElement(this.trailLines[_2d]);
}
}
catch(ex){
jsExDebug("trackableMapObject_hideTrails",ex);
}
}
function trackableMapObject_getLocationGuid(){
try{
return this.coordinate.guid;
}
catch(ex){
jsExDebug("trackableMapObject_getLocationGuid",ex);
}
}
function trackableMapObject_setImageURL(_2e){
try{
if(!_2e||_2e.length){
return;
}
var _2f=this.SYSTEM.Dom.createImage(_2e[0],"absolute",this.LOC_IMAGE_WIDTH,null,(this.MAP_INFO_WIDTH-this.LOC_IMAGE_WIDTH)/2);
_2f.style.border="solid 1px black";
_2f.style.bottom="5px";
_2f.style.cursor="pointer";
this.locationImage=_2f;
this.SYSTEM.Event.attachEvent(_2f,"onclick","click",this.locationImageClickEvent,this,false,_2e[0]);
var _30=(480/640)*this.LOC_IMAGE_WIDTH;
this.locationImage.style.height=_30+"px";
this.mapInfoDiv.style.height=(this.MAP_INFO_HEIGHT+_30)+"px";
this.mapInfoDiv.appendChild(this.locationImage);
if(this.widget){
this.widget.setMediaLocation();
}
}
catch(ex){
jsExDebug("trackableMapObject_setImageURL",ex);
}
}
function trackableMapObject_locationImageClickEvent(_31,me,url){
try{
this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_MEDIA_VIEW,null,"Opening MediaView...",null,null,url);
}
catch(ex){
jsExDebug("trackableMapObject_locationImageClickEvent",ex);
}
}
function trackableMapObject_followBtnClickEvent(_34,_35){
}
function trackableMapObject_mapInfoRemoveClickEvent(_36,_37){
}
function trackableMapObject_foundByImgMouseOverEvent(_38,me){
function hover(){
try{
if(me.stateShowTooltip){
me.SYSTEM.Tooltip.createTooltip(null,me.foundByData.text,160,80,_3a.x+15,_3a.y+15);
}
}
catch(ex){
jsExDebug("trackableMapObject_foundByImgMouseOverEvent: hover",ex);
}
}
try{
var _3a=me.SYSTEM.Event.getMouseCoords(_38);
me.stateShowTooltip=true;
setTimeout(hover,me.TOOLTIP_TIMER);
}
catch(ex){
jsExDebug("trackableMapObject_foundByImgMouseOverEvent",ex);
}
}
function trackableMapObject_foundByImgMouseOutEvent(_3b,me){
try{
me.stateShowTooltip=false;
me.SYSTEM.Tooltip.hideTooltip();
}
catch(ex){
jsExDebug("trackableMapObject_foundByImgMouseOutEvent",ex);
}
}

try{
mapContact_t.prototype=new trackableMapObject_t();
mapContact_t.prototype.mapContact_super=trackableMapObject_t.prototype.constructor;
mapContact_t.prototype.constructor=mapContact_t;
mapContact_t.prototype.cleanUp=mapContact_cleanUp;
mapContact_t.prototype.trackableMapObject_cleanUp=trackableMapObject_t.prototype.cleanUp;
mapContact_t.prototype.mapObject_setPosition=mapObject_t.prototype.setPosition;
mapContact_t.prototype.trackableMapObject_setPosition=trackableMapObject_t.prototype.setPosition;
mapContact_t.prototype.setPosition=mapContact_setPosition;
mapContact_t.prototype.trackableMapObject_joinTo=trackableMapObject_t.prototype.joinTo;
mapContact_t.prototype.joinTo=mapContact_joinTo;
mapContact_t.prototype.getOffMapCheckY=mapObject_t.prototype.getOffMapCheckY;
mapContact_t.prototype.updateMapInfo=mapContact_updateMapInfo;
mapContact_t.prototype.updateFromContact=mapContact_updateFromContact;
mapContact_t.prototype.getContactId=mapContact_getContactId;
mapContact_t.prototype.mapInfoRemoveClickEvent=mapContact_mapInfoRemoveClickEvent;
mapContact_t.prototype.followBtnClickEvent=mapContact_followBtnClickEvent;
mapContact_t.prototype.widgetEnterEvent=mapContact_widgetEnterEvent;
mapContact_t.prototype.trackableMapObject_widgetEnterEvent=trackableMapObject_t.prototype.widgetEnterEvent;
mapContact_t.prototype.createMapInfoContent=mapContact_createMapInfoContent;
mapContact_t.prototype.showInfoContentWidgets=mapContact_showInfoContentWidgets;
mapContact_t.prototype.hideInfoContentWidgets=mapContact_hideInfoContentWidgets;
mapContact_t.prototype.DEFAULT_WIDTH=36;
mapContact_t.prototype.DEFAULT_HEIGHT=44;
mapContact_t.prototype.DEFAULT_ICON_PATH=userDetails_t.prototype.SIDE_32_DEFAULT_AVATAR;
mapContact_t.prototype.WIDGET_OBJECT=contactWidget_t;
}
catch(ex){
jsExDebug("mapContact_t.prototype",ex);
}
function mapContact_t(_1,_2,_3){
try{
if(!_2){
return;
}
this.contactId=_2.contactId;
this.mapContact_super(_1,_3);
this.mapInfoXOffset=-10;
this.mapInfoYOffset=0;
this.clusterDescription="Contact";
this.clusterName=_2.userName;
this.hashString="contact_"+this.contactId+"_"+this.coordinate.mercX+"_"+this.coordinate.mercY+"_"+this.coordinate.zoom+"_"+this.coordinate.guid;
this.setIcon(_2.getAvatarPath(_2.AVATAR_MAP_OBJECT));
this.widget.setAccuracy(_2.myTrackStatus);
this.widget.checkAge(this.locationTimeSeconds);
this.widget.setLabel(_2.username);
}
catch(ex){
jsExDebug("mapContact_t",ex);
}
}
function mapContact_cleanUp(me){
try{
if(!me){
me=this;
}
me.contactId=null;
me.trackableMapObject_cleanUp();
}
catch(ex){
jsExDebug("mapContact_cleanUp",ex);
}
}
function mapContact_setPosition(_5,_6,_7,_8){
try{
if(this.widget.isPastLocation){
this.trackableMapObject_setPosition(_5,_6);
}else{
this.mapObject_setPosition(_5,_6);
this.widget.checkAge(this.locationTimeSeconds);
}
}
catch(ex){
jsExDebug("mapContact_setPosition",ex);
}
}
function mapContact_joinTo(_9){
try{
this.trackableMapObject_joinTo(_9);
this.removeLink.hide();
this.mapInfoXOffset=0;
this.mapInfoYOffset=0;
}
catch(ex){
jsExDebug("mapContact_joinTo",ex);
}
}
function mapContact_createMapInfoContent(){
try{
var _a=this.SYSTEM.Contacts.getContact(this.contactId);
this.avatarImg.src=_a.getAvatarPath(_a.AVATAR_CONTACT_PROFILE);
this.titleLabel.setText(_a.userName);
this.timeLabel.setText("Time: "+this.getTimeText());
}
catch(ex){
jsExDebug("mapContact_createMapInfoContent",ex);
}
}
function mapContact_showInfoContentWidgets(){
try{
if(!this.isPastLocation()){
this.removeLink.show();
}
}
catch(ex){
jsExDebug("mapContact_showInfoContentWidgets",ex);
}
}
function mapContact_hideInfoContentWidgets(){
try{
if(!this.isPastLocation()){
this.removeLink.hide();
}
}
catch(ex){
jsExDebug("mapContact_hideInfoContentWidgets",ex);
}
}
function mapContact_updateMapInfo(_b){
try{
}
catch(ex){
jsExDebug("mapContact_updateMapInfo",ex);
}
}
function mapContact_updateFromContact(){
try{
var _c=this.SYSTEM.Contacts.getContact(this.contactId);
this.titleLabel.setText(_c.userName);
if(!this.isPastLocation()){
this.setIcon(_c.getAvatarPath(_c.AVATAR_MAP_OBJECT));
this.widget.setLabel(_c.username);
}
this.avatarImg.src=_c.getAvatarPath(_c.AVATAR_CONTACT_PROFILE);
}
catch(ex){
jsExDebug("mapContact_updateFromContact",ex);
}
}
function mapContact_getContactId(){
try{
return this.contactId;
}
catch(ex){
jsExDebug("mapContact_getContactId",ex);
}
}
function mapContact_mapInfoRemoveClickEvent(_d,_e){
try{
this.mapInfoContainer.hide();
this.mapReference.removeContact(this.contactId);
}
catch(ex){
jsExDebug("mapContact_mapInfoRemoveClickEvent",ex);
}
}
function mapContact_followBtnClickEvent(_f,_10){
try{
if(_10.getValue()){
this.mapReference.stopFollowingUser(this.contactId);
_10.setImage(this.FOLLOW_OFF_IMG);
_10.setPosition(this.CONTENT_LEFT);
_10.setValue(0);
}else{
this.mapReference.startFollowingUser(this.contactId);
_10.setImage(this.FOLLOW_ON_IMG);
_10.setPosition(this.CONTENT_LEFT+1);
_10.setValue(1);
}
}
catch(ex){
jsExDebug("mapContact_followBtnClickEvent",ex);
}
}
function mapContact_widgetEnterEvent(_11,_12){
try{
this.timeLabel.setText("Time: "+this.getTimeText());
if(this.mapReference.followedContacts[this.contactId]){
this.followBtn.setImage(this.FOLLOW_ON_IMG);
this.followBtn.setPosition(this.CONTENT_LEFT);
this.followBtn.setValue(1);
}else{
this.followBtn.setImage(this.FOLLOW_OFF_IMG);
this.followBtn.setPosition(this.CONTENT_LEFT+1);
this.followBtn.setValue(0);
}
this.trackableMapObject_widgetEnterEvent(_11,_12);
}
catch(ex){
jsExDebug("mapContact_widgetEnterEvent",ex);
}
}

try{
mapContainer_t.prototype=new widget_t();
mapContainer_t.prototype.constructor=mapContainer_t;
mapContainer_t.prototype.mapContainer_super=widget_t.prototype.constructor;
mapContainer_t.prototype.cleanUp=mapContainer_cleanUp;
mapContainer_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
mapContainer_t.prototype.setMap=mapContainer_setMap;
mapContainer_t.prototype.showHorizontalZoomControl=mapContainer_showHorizontalZoomControl;
mapContainer_t.prototype.showVerticalZoomControl=mapContainer_showVerticalZoomControl;
mapContainer_t.prototype.showStyleControl=mapContainer_showStyleControl;
mapContainer_t.prototype.showPanControl=mapContainer_showPanControl;
mapContainer_t.prototype.styleSelectBinding=mapContainer_styleSelectBinding;
mapContainer_t.prototype.panButtonBinding=mapContainer_panButtonBinding;
mapContainer_t.prototype.horizontalZoomBinding=mapContainer_horizontalZoomBinding;
mapContainer_t.prototype.verticalZoomBinding=mapContainer_verticalZoomBinding;
mapContainer_t.prototype.zoomInBinding=mapContainer_zoomInBinding;
mapContainer_t.prototype.zoomOutBinding=mapContainer_zoomOutBinding;
mapContainer_t.prototype.DEFAULT_WIDTH=40;
mapContainer_t.prototype.DEFAULT_HEIGHT=40;
mapContainer_t.prototype.DEFAULT_ICON_PATH="img/app/app/map/mapobjects/avatar6.png";
mapContainer_t.prototype.DROP_IMG="img/site/global/drop.png";
mapContainer_t.prototype.STYLE_IMG="img/site/global/avatars/avatar1.GIF";
mapContainer_t.prototype.N_IMG="img/app/panel/navigation_group/up.bmp";
mapContainer_t.prototype.NE_IMG="img/app/panel/navigation_group/upright.bmp";
mapContainer_t.prototype.E_IMG="img/app/panel/navigation_group/right.bmp";
mapContainer_t.prototype.SE_IMG="img/app/panel/navigation_group/downright.bmp";
mapContainer_t.prototype.S_IMG="img/app/panel/navigation_group/down.bmp";
mapContainer_t.prototype.SW_IMG="img/app/panel/navigation_group/downleft.bmp";
mapContainer_t.prototype.W_IMG="img/app/panel/navigation_group/left.bmp";
mapContainer_t.prototype.NW_IMG="img/app/panel/navigation_group/upleft.bmp";
mapContainer_t.prototype.MINUS_IMG="img/app/panel/zoom_group/minus.bmp";
mapContainer_t.prototype.PLUS_IMG="img/app/panel/zoom_group/plus.bmp";
mapContainer_t.prototype.ZOOM_BTN_WIDTH=20;
mapContainer_t.prototype.ZOOM_BTN_HEIGHT=20;
mapContainer_t.prototype.ZOOM_BAR_LENGTH=150;
mapContainer_t.prototype.ZOOM_BAR_WIDTH=15;
mapContainer_t.prototype.ZOOM_SLIDER_LENGTH=30;
mapContainer_t.prototype.STYLE_BTN_WIDTH=60;
mapContainer_t.prototype.STYLE_BTN_HEIGHT=30;
mapContainer_t.prototype.STYLE_IMG_WIDTH=50;
mapContainer_t.prototype.STYLE_IMG_HEIGHT=40;
mapContainer_t.prototype.PAN_WIDTH=60;
mapContainer_t.prototype.PAN_BTN_WIDTH=20;
mapContainer_t.prototype.ZOOM_LEVELS=18;
mapContainer_t.prototype.H_ZOOM_CTRL_LEFT=30;
mapContainer_t.prototype.H_ZOOM_CTRL_TOP=5;
mapContainer_t.prototype.V_ZOOM_CTRL_LEFT=5;
mapContainer_t.prototype.V_ZOOM_CTRL_TOP=30;
mapContainer_t.prototype.STYLE_CTRL_LEFT=5;
mapContainer_t.prototype.STYLE_CTRL_TOP=210;
mapContainer_t.prototype.PAN_CTRL_LEFT=5;
mapContainer_t.prototype.PAN_CTRL_TOP=250;
mapContainer_t.prototype.N_BTN=1;
mapContainer_t.prototype.NE_BTN=2;
mapContainer_t.prototype.E_BTN=3;
mapContainer_t.prototype.SE_BTN=4;
mapContainer_t.prototype.S_BTN=5;
mapContainer_t.prototype.SW_BTN=6;
mapContainer_t.prototype.W_BTN=7;
mapContainer_t.prototype.NW_BTN=8;
mapContainer_t.prototype.STYLE_0=0;
mapContainer_t.prototype.STYLE_1=1;
mapContainer_t.prototype.STYLE_2=2;
mapContainer_t.prototype.STYLE_3=3;
mapContainer_t.prototype.STYLE_4=4;
mapContainer_t.prototype.STYLE_5=5;
mapContainer_t.prototype.LOGO_WIDTH=100;
mapContainer_t.prototype.LOGO_HEIGHT=80;
mapContainer_t.prototype.LOGO_LEFT=10;
mapContainer_t.prototype.LOGO_BOTTOM=10;
mapContainer_t.prototype.LOGO_SRC="img/app/panel/main_menu/peepelbutton.png";
}
catch(ex){
jsExDebug("mapContainer_t:prototype",ex);
}
function mapContainer_t(){
try{
this.mapContainer_super();
this.horizontalZoomControl=new widgetSlidebar_t(this.ZOOM_BAR_LENGTH);
this.horizontalZoomControl.bindSelect(this.horizontalZoomBinding,this);
this.horizontalZoomControl.quantify(this.ZOOM_LEVELS);
this.verticalZoomControl=new widgetSlidebar_t(this.ZOOM_BAR_LENGTH,1);
this.verticalZoomControl.bindSelect(this.verticalZoomBinding,this);
this.verticalZoomControl.quantify(this.ZOOM_LEVELS);
this.zoomInBtn=new button_t();
this.zoomInBtn.setImage(this.PLUS_IMG);
this.zoomInBtn.setDimensions(this.ZOOM_BTN_WIDTH,this.ZOOM_BTN_HEIGHT);
this.zoomInBtn.notifyClick(this.zoomInBinding,this);
this.zoomOutBtn=new button_t();
this.zoomOutBtn.setImage(this.MINUS_IMG);
this.zoomOutBtn.setDimensions(this.ZOOM_BTN_WIDTH,this.ZOOM_BTN_HEIGHT);
this.zoomOutBtn.notifyClick(this.zoomOutBinding,this);
this.styleGrid=new gridSelectWidget_t(3,this.STYLE_IMG_WIDTH+6,this.STYLE_IMG_HEIGHT+4);
this.styleGrid.addImage(this.STYLE_0,this.STYLE_IMG,this.STYLE_IMG_WIDTH,this.STYLE_IMG_HEIGHT,"0");
this.styleGrid.addImage(this.STYLE_1,this.STYLE_IMG,this.STYLE_IMG_WIDTH,this.STYLE_IMG_HEIGHT,"1");
this.styleGrid.addImage(this.STYLE_2,this.STYLE_IMG,this.STYLE_IMG_WIDTH,this.STYLE_IMG_HEIGHT,"2");
this.styleGrid.addImage(this.STYLE_3,this.STYLE_IMG,this.STYLE_IMG_WIDTH,this.STYLE_IMG_HEIGHT,"3");
this.styleGrid.addImage(this.STYLE_4,this.STYLE_IMG,this.STYLE_IMG_WIDTH,this.STYLE_IMG_HEIGHT,"4");
this.styleGrid.addImage(this.STYLE_5,this.STYLE_IMG,this.STYLE_IMG_WIDTH,this.STYLE_IMG_HEIGHT,"5");
this.styleGrid.notifySelectChange(this.styleSelectBinding,this);
this.styleGrid.adjustDimensions();
this.styleSelect=new selectListWidget_t();
this.styleSelect.align(this.styleSelect.LEFT_ALIGN);
this.styleSelect.allowBorder("black");
this.styleSelect.disallowSelectedHighlight();
this.styleSelect.disallowPadding();
this.styleSelect.addWidget(null,this.styleGrid);
this.styleSelect.setItemPadding(0,0);
this.styleSelect.allowDocumentNotify();
this.styleSelect.attach(this.widgetElement);
this.styleDropBtn=new widgetDropBtn_t(this.STYLE_BTN_WIDTH,this.DROP_IMG,this.STYLE_BTN_HEIGHT);
this.styleDropBtn.allowDropList(this.styleSelect);
this.panDiv=document.createElement("div");
this.panDiv.style.position="absolute";
this.panDiv.style.width=this.PAN_WIDTH+"px";
this.panDiv.style.height=this.PAN_WIDTH+"px";
this.northBtn=new button_t();
this.northBtn.setImage(this.N_IMG);
this.northBtn.setDimensions(this.PAN_BTN_WIDTH,this.PAN_BTN_WIDTH);
this.northBtn.setPosition(20,0);
this.northBtn.notifyClick(this.panButtonBinding,this,this.N_BTN);
this.northBtn.attach(this.panDiv);
this.northEastBtn=new button_t();
this.northEastBtn.setImage(this.NE_IMG);
this.northEastBtn.setDimensions(this.PAN_BTN_WIDTH,this.PAN_BTN_WIDTH);
this.northEastBtn.setPosition(40,0);
this.northEastBtn.notifyClick(this.panButtonBinding,this,this.NE_BTN);
this.northEastBtn.attach(this.panDiv);
this.eastBtn=new button_t();
this.eastBtn.setImage(this.E_IMG);
this.eastBtn.setDimensions(this.PAN_BTN_WIDTH,this.PAN_BTN_WIDTH);
this.eastBtn.setPosition(40,20);
this.eastBtn.notifyClick(this.panButtonBinding,this,this.E_BTN);
this.eastBtn.attach(this.panDiv);
this.southEastBtn=new button_t();
this.southEastBtn.setImage(this.SE_IMG);
this.southEastBtn.setDimensions(this.PAN_BTN_WIDTH,this.PAN_BTN_WIDTH);
this.southEastBtn.setPosition(40,40);
this.southEastBtn.notifyClick(this.panButtonBinding,this,this.SE_BTN);
this.southEastBtn.attach(this.panDiv);
this.southBtn=new button_t();
this.southBtn.setImage(this.S_IMG);
this.southBtn.setDimensions(this.PAN_BTN_WIDTH,this.PAN_BTN_WIDTH);
this.southBtn.setPosition(20,40);
this.southBtn.notifyClick(this.panButtonBinding,this,this.S_BTN);
this.southBtn.attach(this.panDiv);
this.southWestBtn=new button_t();
this.southWestBtn.setImage(this.SW_IMG);
this.southWestBtn.setDimensions(this.PAN_BTN_WIDTH,this.PAN_BTN_WIDTH);
this.southWestBtn.setPosition(0,40);
this.southWestBtn.notifyClick(this.panButtonBinding,this,this.SW_BTN);
this.southWestBtn.attach(this.panDiv);
this.westBtn=new button_t();
this.westBtn.setImage(this.W_IMG);
this.westBtn.setDimensions(this.PAN_BTN_WIDTH,this.PAN_BTN_WIDTH);
this.westBtn.setPosition(0,20);
this.westBtn.notifyClick(this.panButtonBinding,this,this.W_BTN);
this.westBtn.attach(this.panDiv);
this.northWestBtn=new button_t();
this.northWestBtn.setImage(this.NW_IMG);
this.northWestBtn.setDimensions(this.PAN_BTN_WIDTH,this.PAN_BTN_WIDTH);
this.northWestBtn.setPosition(0,0);
this.northWestBtn.notifyClick(this.panButtonBinding,this,this.NW_BTN);
this.northWestBtn.attach(this.panDiv);
this.logo=document.createElement("img");
this.logo.style.position="absolute";
this.logo.style.width=this.LOGO_WIDTH+"px";
this.logo.style.height=this.LOGO_HEIGHT+"px";
this.logo.style.left=this.LOGO_LEFT+"px";
this.logo.style.bottom=this.LOGO_BOTTOM+"px";
this.logo.src=this.LOGO_SRC;
this.horizontalZoomControl.hide();
this.verticalZoomControl.hide();
this.zoomInBtn.hide();
this.zoomOutBtn.hide();
this.styleDropBtn.hide();
this.panDiv.style.visibility="hidden";
this.horizontalZoomControl.attach(this.widgetElement);
this.verticalZoomControl.attach(this.widgetElement);
this.zoomInBtn.attach(this.widgetElement);
this.zoomOutBtn.attach(this.widgetElement);
this.styleDropBtn.attach(this.widgetElement);
this.widgetElement.appendChild(this.panDiv);
this.widgetElement.appendChild(this.logo);
}
catch(ex){
jsExDebug("mapContainer_t",ex);
}
}
function mapContainer_cleanUp(me){
try{
if(!me){
var me=this;
}
me.horizontalZoomControl.cleanUp();
me.horizontalZoomControl=null;
me.verticalZoomControl.cleanUp();
me.verticalZoomControl=null;
me.zoomInBtn.cleanUp();
me.zoomInBtn=null;
me.zoomOutBtn.cleanUp();
me.zoomOutBtn=null;
me.styleGrid=null;
me.styleSelect.cleanUp();
me.styleSelect=null;
me.styleDropBtn.cleanUp();
me.styleDropBtn=null;
me.northBtn.cleanUp();
me.northBtn=null;
me.northEastBtn.cleanUp();
me.northEastBtn=null;
me.eastBtn.cleanUp();
me.eastBtn=null;
me.southEastBtn.cleanUp();
me.southEastBtn=null;
me.southBtn.cleanUp();
me.southBtn=null;
me.southWestBtn.cleanUp();
me.southWestBtn=null;
me.westBtn.cleanUp();
me.westBtn=null;
me.northWestBtn.cleanUp();
me.northWestBtn=null;
me.map.cleanUp();
me.map=null;
me.panDiv=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("mapContainer_cleanUp",ex);
}
}
function mapContainer_setMap(_2){
try{
this.map=_2;
this.widgetElement.insertBefore(this.map.widgetElement,this.horizontalZoomControl.widgetElement);
}
catch(ex){
jsExDebug("mapContainer_setMap",ex);
}
}
function mapContainer_showHorizontalZoomControl(_3,_4){
try{
if(_3==null){
var _3=this.H_ZOOM_CTRL_LEFT;
}
if(_4==null){
var _4=this.H_ZOOM_CTRL_TOP;
}
this.horizontalZoomControl.show();
this.horizontalZoomControl.setPosition(_3,_4);
this.horizontalZoomControl.setScreenPosition(this.positionX+_3,this.positionY+_4);
if(this.map){
this.horizontalZoomControl.setSlideValue(this.map.getZoom());
}
var _5=5;
var _6=2;
this.zoomOutBtn.show();
this.zoomOutBtn.setPosition(_3-(this.ZOOM_BTN_WIDTH+_5),_4-_6);
this.zoomInBtn.show();
this.zoomInBtn.setPosition(_3+this.ZOOM_BAR_LENGTH+_5,_4-_6);
}
catch(ex){
jsExDebug("mapContainer_showHorizontalZoomControl",ex);
}
}
function mapContainer_showVerticalZoomControl(_7,_8){
try{
if(_7==null){
var _7=this.V_ZOOM_CTRL_LEFT;
}
if(_8==null){
var _8=this.V_ZOOM_CTRL_TOP;
}
this.verticalZoomControl.show();
this.verticalZoomControl.setPosition(_7,_8);
this.verticalZoomControl.setScreenPosition(this.positionX+_7,this.positionY+_8);
if(this.map){
this.verticalZoomControl.setSlideValue(this.map.getZoom());
}
var _9=2;
var _a=5;
this.zoomOutBtn.show();
this.zoomOutBtn.setPosition(_7-_9,_8-(this.ZOOM_BTN_HEIGHT+_a));
this.zoomInBtn.show();
this.zoomInBtn.setPosition(_7-_9,_8+this.ZOOM_BAR_LENGTH+_a);
}
catch(ex){
jsExDebug("mapContainer_showVerticalZoomControl",ex);
}
}
function mapContainer_showStyleControl(_b,_c){
try{
if(_b==null){
var _b=this.STYLE_CTRL_LEFT;
}
if(_c==null){
var _c=this.STYLE_CTRL_TOP;
}
this.styleDropBtn.show();
this.styleDropBtn.setPosition(_b,_c);
this.styleSelect.setPosition(_b,_c+this.STYLE_BTN_HEIGHT);
}
catch(ex){
jsExDebug("mapContainer_showStyleControl",ex);
}
}
function mapContainer_showPanControl(_d,_e){
try{
if(_d==null){
var _d=this.PAN_CTRL_LEFT;
}
if(_e==null){
var _e=this.PAN_CTRL_TOP;
}
this.panDiv.style.left=_d+"px";
this.panDiv.style.top=_e+"px";
this.panDiv.style.visibility="visible";
}
catch(ex){
jsExDebug("mapContainer_showPanControl",ex);
}
}
function mapContainer_styleSelectBinding(me){
try{
if(!me.map){
return;
}
me.map.setStyle(me.styleGrid.selectedValue);
}
catch(ex){
jsExDebug("mapContainer_styleSelectBinding",ex);
}
}
function mapContainer_panButtonBinding(me,_11){
try{
if(!me.map){
return;
}
switch(_11){
case me.N_BTN:
me.map.autoPanDirection("north");
break;
case me.NE_BTN:
me.map.autoPanDirection("northeast");
break;
case me.E_BTN:
me.map.autoPanDirection("east");
break;
case me.SE_BTN:
me.map.autoPanDirection("southeast");
break;
case me.S_BTN:
me.map.autoPanDirection("south");
break;
case me.SW_BTN:
me.map.autoPanDirection("southwest");
break;
case me.W_BTN:
me.map.autoPanDirection("west");
break;
case me.NW_BTN:
me.map.autoPanDirection("northwest");
break;
}
}
catch(ex){
jsExDebug("mapContainer_panButtonBinding",ex);
}
}
function mapContainer_horizontalZoomBinding(me){
try{
if(!me.map){
return;
}
var _13=(me.horizontalZoomControl.slideValue?me.horizontalZoomControl.slideValue:1);
me.map.zoomToLevel(_13);
me.map.recentreLinks();
}
catch(ex){
jsExDebug("mapContainer_horizontalZoomBinding",ex);
}
}
function mapContainer_verticalZoomBinding(me){
try{
if(!me.map){
return;
}
var _15=(me.verticalZoomControl.slideValue?me.verticalZoomControl.slideValue:1);
me.map.zoomToLevel(_15);
me.map.recentreLinks();
}
catch(ex){
jsExDebug("mapContainer_verticalZoomBinding",ex);
}
}
function mapContainer_zoomInBinding(me){
try{
if(!me.map){
return;
}
me.map.zoomIn();
var _17=me.map.getZoom();
me.horizontalZoomControl.setSlideValue(_17);
me.verticalZoomControl.setSlideValue(_17);
}
catch(ex){
jsExDebug("mapContainer_zoomInBinding",ex);
}
}
function mapContainer_zoomOutBinding(me){
try{
if(!me.map){
return;
}
me.map.zoomOut();
var _19=me.map.getZoom();
me.horizontalZoomControl.setSlideValue(_19);
me.verticalZoomControl.setSlideValue(_19);
}
catch(ex){
jsExDebug("mapContainer_zoomOutBinding",ex);
}
}

try{
mapInfoContainer_t.prototype=new widget_t();
mapInfoContainer_t.prototype.constructor=mapInfoContainer_t;
mapInfoContainer_t.prototype.cleanUp=mapInfoContainer_cleanUp;
mapInfoContainer_t.prototype.mapInfoContainer_super=widget_t.prototype.constructor;
mapInfoContainer_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
mapInfoContainer_t.prototype.createDom=mapInfoContainer_createDom;
mapInfoContainer_t.prototype.bindEvents=mapInfoContainer_bindEvents;
mapInfoContainer_t.prototype.widget_setPosition=widget_t.prototype.setPosition;
mapInfoContainer_t.prototype.setPosition=mapInfoContainer_setPosition;
mapInfoContainer_t.prototype.setOverlayReference=mapInfoContainer_setOverlayReference;
mapInfoContainer_t.prototype.showMapObjectInfo=mapInfoContainer_showMapObjectInfo;
mapInfoContainer_t.prototype.hide=mapInfoContainer_hide;
mapInfoContainer_t.prototype.updatePosition=mapInfoContainer_updatePosition;
mapInfoContainer_t.prototype.BUBBLE_IMG_TR="img/app/app/map/mapobjects/bubble_tr.png";
mapInfoContainer_t.prototype.BUBBLE_IMG_TL="img/app/app/map/mapobjects/bubble_tl.png";
mapInfoContainer_t.prototype.BUBBLE_IMG_BR="img/app/app/map/mapobjects/bubble_br.png";
mapInfoContainer_t.prototype.BUBBLE_IMG_BL="img/app/app/map/mapobjects/bubble_bl.png";
mapInfoContainer_t.prototype.BUBBLE_WIDTH=18;
mapInfoContainer_t.prototype.BUBBLE_HEIGHT=46;
mapInfoContainer_t.prototype.TEXT_COLOUR="#000000";
}
catch(ex){
jsExDebug("mapInfoContainer_t.prototype",ex);
}
function mapInfoContainer_t(_1,_2,_3){
try{
this.mapInfoContainer_super(_1,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.stateCurrentMapObject=null;
this.stateHiddenOffMap=false;
this.stateMap=_2;
if(!_3){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("mapInfoContainer_t",ex);
}
}
function mapInfoContainer_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.stateCurrentMapObject){
try{
me.widgetElement.removeChild(me.stateCurrentMapObject.mapInfoDiv);
}
catch(ex){
}
me.stateCurrentMapObject=null;
}
me.stateHiddenOffMap=null;
me.stateMapOverlay=null;
me.bubbleImage=null;
me.stateMap=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("mapInfoContainer_cleanUp",ex);
}
}
function mapInfoContainer_createDom(){
try{
this.widgetElement.style.zIndex=TOOLTIP_ZINDEX;
var _5=document.createElement("img");
_5.style.position="absolute";
_5.style.width=this.BUBBLE_WIDTH+"px";
_5.style.height=this.BUBBLE_HEIGHT+"px";
_5.src=this.BUBBLE_IMG_TR;
this.widgetElement.appendChild(_5);
this.bubbleImage=_5;
this.widgetElement.style.visibility="hidden";
}
catch(ex){
jsExDebug("mapInfoContainer_createDom",ex);
}
}
function mapInfoContainer_bindEvents(){
try{
}
catch(ex){
jsExDebug("mapInfoContainer_bindEvents",ex);
}
}
function mapInfoContainer_setPosition(_6){
try{
var _7=true;
var _8=true;
var _9=null;
var _a=null;
var _b=5+_6.MAP_INFO_WIDTH;
var _c=this.BUBBLE_HEIGHT+_6.MAP_INFO_HEIGHT;
if(_6.positionX>(this.stateMap.width-_b)){
_9=_6.positionX-_b+_6.getMapInfoXOffset(true);
_8=false;
}else{
_9=_6.positionX+(_6.widget?_6.widget.width:_6.settingOnMapWidth+2)+_6.getMapInfoXOffset();
}
if(_6.positionY<_c){
_a=_6.positionY+(_6.widget?_6.widget.height:_6.settingOnMapHeight+2)+_6.getMapInfoYOffset(true);
_7=false;
}else{
_a=_6.positionY+_6.getMapInfoYOffset();
}
this.widget_setPosition(_9,_a);
var _d=_6.mapInfoDiv;
if(_7){
if(_8){
this.bubbleImage.src=this.BUBBLE_IMG_TR;
_d.style.left=(_9+5)+"px";
this.bubbleImage.style.left="0px";
}else{
this.bubbleImage.src=this.BUBBLE_IMG_TL;
_d.style.left=_9+"px";
this.bubbleImage.style.left=(_6.MAP_INFO_WIDTH-(this.BUBBLE_WIDTH-5))+"px";
}
this.bubbleImage.style.top="";
this.bubbleImage.style.bottom="0px";
_d.style.top=(_a-parseInt(_d.style.height)-this.BUBBLE_HEIGHT)+"px";
}else{
if(_8){
this.bubbleImage.src=this.BUBBLE_IMG_BR;
_d.style.left=(_9+5)+"px";
this.bubbleImage.style.left="0px";
}else{
this.bubbleImage.src=this.BUBBLE_IMG_BL;
_d.style.left=_9+"px";
this.bubbleImage.style.left=(_6.MAP_INFO_WIDTH-(this.BUBBLE_WIDTH-5))+"px";
}
this.bubbleImage.style.bottom="";
this.bubbleImage.style.top="0px";
_d.style.top=(_a+this.BUBBLE_HEIGHT)+"px";
}
}
catch(ex){
jsExDebug("mapInfoContainer_setPosition",ex);
}
}
function mapInfoContainer_setOverlayReference(_e){
try{
this.stateMapOverlay=_e;
}
catch(ex){
jsExDebug("setOverlayReference",ex);
}
}
function mapInfoContainer_showMapObjectInfo(_f){
try{
if(!_f.ALLOW_MAP_INFO){
return;
}
if(this.stateCurrentMapObject&&this.stateCurrentMapObject!=_f){
if(this.stateHiddenOffMap){
this.stateHiddenOffMap=false;
}else{
this.parentDiv.removeChild(this.stateCurrentMapObject.mapInfoDiv);
}
this.stateCurrentMapObject.mapInfoHidden();
}
var _10=_f.mapInfoDiv;
this.setPosition(_f);
_10.style.zIndex=TOOLTIP_ZINDEX;
this.parentDiv.appendChild(_10);
_10.style.visibility="visible";
this.widgetElement.style.visibility="visible";
this.stateCurrentMapObject=_f;
}
catch(ex){
jsExDebug("mapInfoContainer_showMapObjectInfo",ex);
}
}
function mapInfoContainer_hide(){
try{
if(this.stateCurrentMapObject&&this.stateCurrentMapObject.mapInfoDiv&&(this.stateCurrentMapObject.mapInfoDiv.parentNode==this.parentDiv)){
this.parentDiv.removeChild(this.stateCurrentMapObject.mapInfoDiv);
this.stateCurrentMapObject.mapInfoHidden();
this.stateCurrentMapObject=null;
}
this.widgetElement.style.visibility="hidden";
}
catch(ex){
jsExDebug("mapInfoContainer_hide",ex);
}
}
function mapInfoContainer_updatePosition(){
try{
var _11=this.stateCurrentMapObject;
if(!_11){
return;
}
if(_11.onMap&&!_11.hidden){
if(this.stateHiddenOffMap){
_11.mapInfoDiv.style.visibility="visible";
this.parentDiv.appendChild(_11.mapInfoDiv);
this.widgetElement.style.visibility="visible";
this.stateHiddenOffMap=false;
}
this.setPosition(_11);
}else{
if(!this.stateHiddenOffMap){
this.widgetElement.style.visibility="hidden";
this.parentDiv.removeChild(_11.mapInfoDiv);
this.stateHiddenOffMap=true;
}
}
}
catch(ex){
jsExDebug("mapInfoContainer_updatePosition",ex);
}
}

try{
mapSearchResult_t.prototype=new mapObject_t();
mapSearchResult_t.prototype.mapSearchResult_super=mapObject_t.prototype.constructor;
mapSearchResult_t.prototype.constructor=mapSearchResult_t;
mapSearchResult_t.prototype.cleanUp=mapSearchResult_cleanUp;
mapSearchResult_t.prototype.mapObject_cleanUp=mapObject_t.prototype.cleanUp;
mapSearchResult_t.prototype.getHashString=mapSearchResult_getHashString;
mapSearchResult_t.prototype.mapInfoRemoveClickEvent=mapSearchResult_mapInfoRemoveClickEvent;
mapSearchResult_t.prototype.mapInfoSaveClickEvent=mapSearchResult_mapInfoSaveClickEvent;
mapSearchResult_t.prototype.createMapInfoContent=mapSearchResult_createMapInfoContent;
mapSearchResult_t.prototype.showInfoContentWidgets=mapSearchResult_showInfoContentWidgets;
mapSearchResult_t.prototype.hideInfoContentWidgets=mapSearchResult_hideInfoContentWidgets;
mapSearchResult_t.prototype.DEFAULT_ICON_PATH=SYSTEM.Icon.SearchResult;
mapSearchResult_t.prototype.DEFAULT_SHOW_OFFMAP=true;
mapSearchResult_t.prototype.MAP_INFO_BG_COLOUR="rgb(255,255,185)";
mapSearchResult_t.prototype.MAP_INFO_WIDTH=260;
mapSearchResult_t.prototype.MAP_INFO_HEIGHT=75;
mapSearchResult_t.prototype.MAP_INFO_CONTENT_WIDTH=mapSearchResult_t.prototype.MAP_INFO_WIDTH-20;
mapSearchResult_t.prototype.MAP_INFO_CONTENT_HEIGHT=mapSearchResult_t.prototype.MAP_INFO_HEIGHT-20;
}
catch(ex){
jsExDebug("mapSearchResult_t.prototype",ex);
}
function mapSearchResult_t(_1,_2,_3){
try{
this.mapSearchResult_super(_1,this.DEFAULT_ICON_PATH);
this.createMapInfoContent(_2,_3);
this.hashString=this.nameLabel.getText().split("</b>")[1]+"_"+this.coordinate.toString();
this.widget.setLabel(_2);
}
catch(ex){
jsExDebug("mapSearchResult_t",ex);
}
}
function mapSearchResult_cleanUp(){
try{
this.mapInfoName=null;
this.mapInfoCountry=null;
this.titleLabel.cleanUp();
this.nameLabel.cleanUp();
this.coordinatesLabel.cleanUp();
this.removeLink.cleanUp();
this.saveLink.cleanUp();
this.titleLabel=null;
this.nameLabel=null;
this.coordinatesLabel=null;
this.removeLink=null;
this.saveLink=null;
this.mapObject_cleanUp();
}
catch(ex){
jsExDebug("mapSearchResult_cleanUp",ex);
}
}
function mapSearchResult_createMapInfoContent(_4,_5){
try{
this.mapInfoName=_4;
this.mapInfoCountry=(_5?_5:"");
var _6=new this.SYSTEM.Widget.Label("titleLabel");
_6.setText("SearchResult");
_6.setPosition(5,0);
_6.setFontSize(null,13);
_6.setBold();
_6.attach(this.mapInfoDiv);
var _7=new this.SYSTEM.Widget.Label("titleLabel");
_7.setText("<b>Name:</b> "+_4);
_7.setPosition(5,24);
_7.attach(this.mapInfoDiv);
var _8=new this.SYSTEM.Widget.Label("titleLabel");
_8.setText("<b>Coordinates:</b> "+this.getReadableCoordinates(this.coordinate));
_8.setPosition(5,39);
_8.attach(this.mapInfoDiv);
var _9=new this.SYSTEM.Widget.Link("removeLink","Remove from map",125);
_9.setPosition(5,20,0,1);
_9.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapInfoRemoveClickEvent));
_9.hide();
_9.attach(this.mapInfoDiv);
var _a=new this.SYSTEM.Widget.Link("saveLink","Save as PeepelPoint",125);
_a.setPosition(130,20,0,1);
_a.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapInfoSaveClickEvent));
_a.hide();
_a.attach(this.mapInfoDiv);
this.titleLabel=_6;
this.nameLabel=_7;
this.coordinatesLabel=_8;
this.removeLink=_9;
this.saveLink=_a;
}
catch(ex){
jsExDebug("mapSearchResult_createMapInfoContent",ex);
}
}
function mapSearchResult_showInfoContentWidgets(){
try{
this.removeLink.show();
this.saveLink.show();
}
catch(ex){
jsExDebug("mapSearchResult_showInfoContentWidgets",ex);
}
}
function mapSearchResult_hideInfoContentWidgets(){
try{
this.removeLink.hide();
this.saveLink.hide();
}
catch(ex){
jsExDebug("mapSearchResult_hideInfoContentWidgets",ex);
}
}
function mapSearchResult_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("mapSearchResult_getHashString",ex);
}
}
function mapSearchResult_mapInfoRemoveClickEvent(_b,_c){
try{
this.mapInfoContainer.hide();
this.mapReference.removeSearchResult(this.getHashString());
}
catch(ex){
jsExDebug("mapSearchResult_mapInfoRemoveClickEvent",ex);
}
}
function mapSearchResult_mapInfoSaveClickEvent(){
try{
if(this.mapInfoName&&this.mapReference){
this.SYSTEM.PeepelPoints.addPeepelPoint(this.coordinate.copy(),this.mapInfoName,this.mapInfoName+", "+this.mapInfoCountry);
var d=new this.SYSTEM.Dialogue.OkAlert(null,"WebMap","The PeepelPoint "+this.mapInfoName+" has been saved.");
}
}
catch(ex){
jsExDebug("mapSearchResult_mapInfoSaveClickEvent",ex);
}
}
function mapSearchResult_mapInfoDeleteClickEvent(_e,_f){
try{
this.SYSTEM.PeepelPoints.deletePeepelPoint(this.dataIndex);
this.mapInfoContainer.hide();
this.mapReference.removeMapObject(this.mapReference.SEARCH_RESULT_LIST_INDEX,this.getHashString());
}
catch(ex){
jsExDebug("mapSearchResult_mapInfoDeleteClickEvent",ex);
}
}

try{
mapLinker_t.prototype=new peepelObject_t();
mapLinker_t.prototype.constructor=mapLinker_t;
mapLinker_t.prototype.cleanUp=mapLinker_cleanUp;
mapLinker_t.prototype.mapLinker_super=peepelObject_t.prototype.constructor;
mapLinker_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
mapLinker_t.prototype.addMapToGroup=mapLinker_addMapToGroup;
mapLinker_t.prototype.removeMapFromGroup=mapLinker_removeMapFromGroup;
mapLinker_t.prototype.applyToGroups=mapLinker_applyToGroups;
mapLinker_t.prototype.getGroupImage=mapLinker_getGroupImage;
mapLinker_t.prototype.showLinks=mapLinker_showLinks;
mapLinker_t.prototype.hideLinks=mapLinker_hideLinks;
mapLinker_t.prototype.redrawLinks=mapLinker_redrawLinks;
mapLinker_t.prototype.areLinksVisible=mapLinker_areLinksVisible;
mapLinker_t.prototype.getOptionsForMap=mapLinker_getOptionsForMap;
mapLinker_t.prototype.drawLine=mapLinker_drawLine;
mapLinker_t.prototype.optionsBtnClickEvent=mapLinker_optionsBtnClickEvent;
mapLinker_t.prototype.optionsOkBtnClickEvent=mapLinker_optionsOkBtnClickEvent;
mapLinker_t.prototype.optionsCancelBtnClickEvent=mapLinker_optionsCancelBtnClickEvent;
mapLinker_t.prototype.optionsSynchroniseBtnClickEvent=mapLinker_optionsSynchroniseBtnClickEvent;
mapLinker_t.prototype.zoomIn=mapLinker_zoomIn;
mapLinker_t.prototype.zoomOut=mapLinker_zoomOut;
mapLinker_t.prototype.zoomToLevel=mapLinker_zoomToLevel;
mapLinker_t.prototype.setStyle=mapLinker_setStyle;
mapLinker_t.prototype.scroll=mapLinker_scroll;
mapLinker_t.prototype.scrollEnd=mapLinker_scrollEnd;
mapLinker_t.prototype.centre=mapLinker_centre;
mapLinker_t.prototype.showPoint=mapLinker_showPoint;
mapLinker_t.prototype.showSearchResult=mapLinker_showSearchResult;
mapLinker_t.prototype.showContact=mapLinker_showContact;
mapLinker_t.prototype.removePoint=mapLinker_removePoint;
mapLinker_t.prototype.removeSearchResult=mapLinker_removeSearchResult;
mapLinker_t.prototype.removeContact=mapLinker_removeContact;
mapLinker_t.prototype.ZOOM=1;
mapLinker_t.prototype.PAN=2;
mapLinker_t.prototype.STYLE=4;
mapLinker_t.prototype.POINTS=8;
mapLinker_t.prototype.S_RESULTS=16;
mapLinker_t.prototype.CONTACTS=32;
mapLinker_t.prototype.ACTION_ZOOM_IN=1;
mapLinker_t.prototype.ACTION_ZOOM_OUT=2;
mapLinker_t.prototype.ACTION_ZOOM_TO_LEVEL=3;
mapLinker_t.prototype.ACTION_SCROLL=4;
mapLinker_t.prototype.ACTION_SCROLL_END=5;
mapLinker_t.prototype.ACTION_CENTRE=6;
mapLinker_t.prototype.ACTION_STYLE=7;
mapLinker_t.prototype.ACTION_SHOW_POINT=8;
mapLinker_t.prototype.ACTION_SHOW_S_RESULT=9;
mapLinker_t.prototype.ACTION_SHOW_CONTACT=10;
mapLinker_t.prototype.ACTION_REMOVE_POINT=11;
mapLinker_t.prototype.ACTION_REMOVE_S_RESULT=12;
mapLinker_t.prototype.ACTION_REMOVE_CONTACT=13;
mapLinker_t.prototype.MAX_SCROLL_ZOOM_OFFSET=2;
mapLinker_t.prototype.OPTIONS_DIV_WIDTH=140;
mapLinker_t.prototype.OPTIONS_DIV_HEIGHT=225;
mapLinker_t.prototype.OPTIONS_WIDTH=30;
mapLinker_t.prototype.OPTIONS_HEIGHT=30;
mapLinker_t.prototype.OPTIONS_CB_LABEL_WIDTH=100;
mapLinker_t.prototype.GROUP1_IMG="img/app/app/map/icons/group1";
mapLinker_t.prototype.GROUP2_IMG="img/app/app/map/icons/group2";
mapLinker_t.prototype.GROUP3_IMG="img/app/app/map/icons/group3";
mapLinker_t.prototype.GROUP4_IMG="img/app/app/map/icons/group4";
mapLinker_t.prototype.NOGROUP_IMG="img/app/app/map/icons/nogroup";
mapLinker_t.prototype.OPTIONS_IMG="img/app/app/map/icons/linksettings";
}
catch(ex){
jsExDebug("mapLinker_t.prototype",ex);
}
function mapLinker_t(){
try{
this.mapLinker_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.linkGroups=[null];
var _1={};
_1.image=this.GROUP1_IMG;
_1.lineColour="red";
_1.maps=[];
this.linkGroups[1]=_1;
var _2={};
_2.image=this.GROUP2_IMG;
_2.lineColour="green";
_2.maps=[];
this.linkGroups[2]=_2;
var _3={};
_3.image=this.GROUP3_IMG;
_3.lineColour="blue";
_3.maps=[];
this.linkGroups[3]=_3;
var _4={};
_4.image=this.GROUP4_IMG;
_4.lineColour="yellow";
_4.maps=[];
this.linkGroups[4]=_4;
var _5=[];
_5[this.ACTION_ZOOM_IN]={handler:this.zoomIn,requiredOption:this.ZOOM};
_5[this.ACTION_ZOOM_OUT]={handler:this.zoomOut,requiredOption:this.ZOOM};
_5[this.ACTION_ZOOM_TO_LEVEL]={handler:this.zoomToLevel,requiredOption:this.ZOOM};
_5[this.ACTION_SCROLL]={handler:this.scroll,requiredOption:this.PAN};
_5[this.ACTION_SCROLL_END]={handler:this.scrollEnd,requiredOption:this.PAN};
_5[this.ACTION_CENTRE]={handler:this.centre,requiredOption:this.PAN};
_5[this.ACTION_STYLE]={handler:this.setStyle,requiredOption:this.STYLE};
_5[this.ACTION_SHOW_POINT]={handler:this.showPoint,requiredOption:this.POINTS};
_5[this.ACTION_SHOW_S_RESULT]={handler:this.showSearchResult,requiredOption:this.S_RESULTS};
_5[this.ACTION_SHOW_CONTACT]={handler:this.showContact,requiredOption:this.CONTACTS};
_5[this.ACTION_REMOVE_POINT]={handler:this.removePoint,requiredOption:this.POINTS};
_5[this.ACTION_REMOVE_S_RESULT]={handler:this.removeSearchResult,requiredOption:this.S_RESULTS};
_5[this.ACTION_REMOVE_CONTACT]={handler:this.removeContact,requiredOption:this.CONTACTS};
this.actions=_5;
this.lineDivArray=[];
this.optionsBtnArray=[];
this.stateLinksVisible=false;
this.stateOptionsVisible=false;
}
catch(ex){
jsExDebug("mapLinker_t",ex);
}
}
function mapLinker_cleanUp(me){
try{
if(!me){
var me=this;
}
for(var i=1;i<me.linkGroups.length;i++){
for(var j=0;j<me.linkGroups[i].maps.length;j++){
if(me.linkGroups[i].maps[j]){
me.linkGroups[i].maps[j].app=null;
me.linkGroups[i].maps[j].map=null;
me.linkGroups[i].maps[j].options=null;
me.linkGroups[i].maps[j]=null;
}
}
me.linkGroups[i].maps=null;
me.linkGroups[i].image=null;
me.linkGroups[i].lineColour=null;
me.linkGroups[i]=null;
}
me.linkGroups=null;
for(i=1;i<me.actions.length;i++){
me.actions[i].handler=null;
me.actions[i].requiredOption=null;
me.actions[i]=null;
}
me.actions=null;
for(i=0;i<me.lineDivArray.length;i++){
if(me.lineDivArray[i].parentNode){
document.body.removeChild(me.lineDivArray[i]);
}
me.lineDivArray[i]=null;
}
me.lineDivArray=null;
for(i=0;i<me.optionsBtnArray.length;i++){
me.optionsBtnArray[i].cleanUp();
me.optionsBtnArray[i]=null;
}
me.optionsBtnArray=null;
if(me.optionsDiv){
me.optionsTitleLabel.cleanUp();
me.optionsPanCheckbox.cleanUp();
me.optionsZoomCheckbox.cleanUp();
me.optionsStyleCheckbox.cleanUp();
me.optionsPointCheckbox.cleanUp();
me.optionsSearchResultCheckbox.cleanUp();
me.optionsContactCheckbox.cleanUp();
me.optionsSynchroniseBtn.cleanUp();
me.optionsOkBtn.cleanUp();
me.optionsCancelBtn.cleanUp();
me.optionsTitleLabel=null;
me.optionsPanCheckbox=null;
me.optionsZoomCheckbox=null;
me.optionsStyleCheckbox=null;
me.optionsPointCheckbox=null;
me.optionsSearchResultCheckbox=null;
me.optionsContactCheckbox=null;
me.optionsSynchroniseBtn=null;
me.optionsOkBtn=null;
me.optionsCancelBtn=null;
me.SYSTEM.Dom.freeDom(me.optionsDiv);
if(me.stateOptionsVisible){
document.body.removeChild(me.optionsDiv);
}
me.optionsDiv=null;
}
me.stateLinksVisible=null;
me.stateOptionsVisible=null;
if(me==SYSTEM.MapLinker){
SYSTEM.MapLinker=null;
}
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("mapLinker_cleanUp",ex);
}
}
function mapLinker_addMapToGroup(_9,_a,_b,_c){
try{
var _d=this.linkGroups[_b];
var _e=0;
if(_d.maps){
for(var i=0;i<this.linkGroups[_b].maps.length;i++){
if(this.linkGroups[_b].maps[i]){
if(this.linkGroups[_b].maps[i].map==_a){
return false;
}
_e++;
}
}
_d.maps.push({app:_9,map:_a,options:_c});
_a.linkGroupNumbers.push(_b);
if(_e&&this.stateLinksVisible){
this.redrawLinks();
}
return true;
}
return false;
}
catch(ex){
jsExDebug("mapLinker_addMapToGroup",ex);
}
}
function mapLinker_removeMapFromGroup(map,_11){
try{
var _12=0;
if(this.linkGroups[_11]){
for(var i=0;i<this.linkGroups[_11].maps.length;i++){
if(this.linkGroups[_11].maps[i]){
if(this.linkGroups[_11].maps[i].map==map){
this.linkGroups[_11].maps[i].map=null;
this.linkGroups[_11].maps[i].options=null;
this.linkGroups[_11].maps[i]=null;
}else{
_12++;
}
}
}
}
for(i=0;i<map.linkGroupNumbers.length;i++){
if(map.linkGroupNumbers[i]==_11){
map.linkGroupNumbers[i]=null;
}
}
if(this.stateLinksVisible&&_12){
this.redrawLinks();
}
}
catch(ex){
jsExDebug("mapLinker_addMapToGroup",ex);
}
}
function mapLinker_applyToGroups(_14,_15,_16){
try{
var _17=this.actions[_14];
if(!_17){
return;
}
for(var i=0;i<_15.length;i++){
if(_15[i]){
var _19=this.linkGroups[_15[i]];
if(_19.maps){
var _1a=[];
for(var j=3;j<arguments.length;j++){
_1a.push(arguments[j]);
}
var _1c=null;
for(j=0;j<_19.maps.length;j++){
if(_19.maps[j]&&_19.maps[j].map!=_16&&(_19.maps[j].options&_17.requiredOption)){
_1c=[_19.maps[j],_16];
_1c=_1c.concat(_1a);
_17.handler.apply(this,_1c);
}
}
}
}
}
}
catch(ex){
jsExDebug("mapLinker_applyToGroup",ex);
}
}
function mapLinker_getGroupImage(_1d){
try{
if(this.linkGroups[_1d]){
return this.linkGroups[_1d].image;
}
return this.NOGROUP_IMG;
}
catch(ex){
jsExDebug("mapLinker_getGroupImage",ex);
}
}
function mapLinker_showLinks(){
try{
if(this.stateLinksVisible){
this.hideLinks();
}
var _1e=null;
var _1f=null;
var _20=null;
var _21=null;
var _22=null;
var map=null;
var _24=null;
var _25=0;
this.currentDivIndex=0;
for(var i=1;i<this.linkGroups.length;i++){
_22=this.linkGroups[i];
_20=null;
_21=null;
map1=null;
map2=null;
for(var j=0;j<_22.maps.length;j++){
if(_22.maps[j]){
map=_22.maps[j].map;
if(!_20){
_20=map.getScreenPosition();
_20.x+=(map.width-199)+((26*i)-13);
_20.y-=10;
map1=j;
}else{
if(!_21){
_21=map.getScreenPosition();
_21.x+=(map.width-199)+((26*i)-13);
_21.y-=10;
map2=j;
this.drawLine(_20.x,_20.y,_21.x,_21.y,i,map1,map2);
_25++;
_20=_21;
map1=map2;
_21=null;
map2=null;
}
}
}
}
}
if(_25){
this.stateLinksVisible=true;
}
}
catch(ex){
jsExDebug("mapLinker_showLinks",ex);
}
}
function mapLinker_hideLinks(){
try{
for(var i=0;i<this.lineDivArray.length;i++){
if(this.lineDivArray[i].parentNode){
document.body.removeChild(this.lineDivArray[i]);
}
}
for(i=0;i<this.optionsBtnArray.length;i++){
this.optionsBtnArray[i].cleanUp();
this.optionsBtnArray[i]=null;
}
if(this.stateOptionsVisible){
document.body.removeChild(this.optionsDiv);
}
this.optionsBtnArray=[];
this.stateLinksVisible=false;
this.stateOptionsVisible=false;
}
catch(ex){
jsExDebug("mapLinker_hideLinks",ex);
}
}
function mapLinker_redrawLinks(){
try{
this.showLinks();
for(this.currentDivIndex;this.currentDivIndex<this.lineDivArray.length;this.currentDivIndex++){
if(this.lineDivArray[this.currentDivIndex].parentNode){
document.body.removeChild(this.lineDivArray[this.currentDivIndex]);
}
}
}
catch(ex){
jsExDebug("mapLinker_redrawLinks",ex);
}
}
function mapLinker_areLinksVisible(){
try{
return this.stateLinksVisible;
}
catch(ex){
jsExDebug("mapLinker_areLinksVisible",ex);
}
}
function mapLinker_getOptionsForMap(_29,map){
try{
var _2b=this.linkGroups[_29];
if(_2b){
for(var i=0;i<_2b.maps.length;i++){
if(_2b.maps[i]&&_2b.maps[i].map==map){
return _2b.maps[i].options;
}
}
}
}
catch(ex){
jsExDebug("mapLinker_getOptionsForMap",ex);
}
}
function mapLinker_zoomIn(_2d,_2e,_2f){
try{
_2d.map.zoomIn(_2f,true);
}
catch(ex){
jsExDebug("mapLinker_zoomIn",ex);
}
}
function mapLinker_zoomOut(_30,_31,_32){
try{
_30.map.zoomOut(_32,true);
}
catch(ex){
jsExDebug("mapLinker_zoomOut",ex);
}
}
function mapLinker_zoomToLevel(_33,_34,_35){
try{
_33.map.zoomToLevel(_33.map.zoom+_35,true);
}
catch(ex){
jsExDebug("mapLinker_zoomToLevel",ex);
}
}
function mapLinker_setStyle(_36,_37){
try{
_36.map.setStyle(_37.settingMapStyle,true);
}
catch(ex){
jsExDebug("mapLinker_setStyle",ex);
}
}
function mapLinker_scroll(_38,_39,_3a,_3b){
try{
var _3c=_38.map.zoom-_39.zoom;
if(_3c>this.MAX_SCROLL_ZOOM_OFFSET){
return;
}
var _3d=Math.pow(2,Math.abs(_3c));
_38.map.hideLocationTrails();
if(_3c<0){
_38.map.scroll(_3a/_3d,_3b/_3d,true);
}else{
_38.map.scroll(_3a*_3d,_3b*_3d,true);
}
}
catch(ex){
jsExDebug("mapLinker_scroll",ex);
}
}
function mapLinker_scrollEnd(_3e,_3f){
try{
var _40=_3e.map.zoom-_3f.zoom;
if(_40>this.MAX_SCROLL_ZOOM_OFFSET){
_3e.map.centreOnCoordinates(_3f.getCentreCoordinates(),_3e.map.zoom,true);
}
_3e.map.drawLocationTrails();
}
catch(ex){
jsExDebug("mapLinker_scrollEnd",ex);
}
}
function mapLinker_centre(_41,_42,_43){
try{
if(_41.options&this.ZOOM){
_41.map.centreOnCoordinates(_42.getCentreCoordinates(),_41.map.zoom+_43,true);
}else{
_41.map.centreOnCoordinates(_42.getCentreCoordinates(),_41.map.zoom,true);
}
_41.map.drawMapObjects();
}
catch(ex){
jsExDebug("mapLinker_centre",ex);
}
}
function mapLinker_showPoint(_44,_45,_46,_47,_48,_49){
try{
var map=_44.map;
if(!_46){
return;
}
var _4b=_46.coordinate.copy();
if(_47){
map.centreOnCoordinates(_4b,(_48?_4b.zoom:map.zoom),false,true);
}
var _4c=new mapPoi_t(_4b,_46);
if(map.addMapObject(map.PEEPEL_POINT_LIST_INDEX,_4c,true)){
if(_49){
map.drawMapObjects();
}
_44.app.sidebar.setPointOnMap(_46.locationId,_4c.getHashString());
}
}
catch(ex){
jsExDebug("mapLinker_showPoint",ex);
}
}
function mapLinker_showSearchResult(_4d,_4e,_4f,_50,_51){
try{
var _52=_4f.getDecimalCoordinates();
var _53=new mapSearchResult_t(_4f,_50);
_4d.map.addMapObject(_4d.map.SEARCH_RESULT_LIST_INDEX,_53,true);
if(_51){
_4d.map.drawMapObjects();
}
}
catch(ex){
jsExDebug("mapLinker_showSearchResult",ex);
}
}
function mapLinker_showContact(_54,_55,_56,_57,_58){
try{
var _59=_54.map.showContact(_56.copy(),_57,true,true);
_54.app.sidebar.setContactOnMap(_57.contactId,_59.getHashString());
}
catch(ex){
jsExDebug("mapLinker_showContact",ex);
}
}
function mapLinker_removePoint(_5a,_5b,_5c){
try{
_5a.map.removePoi(_5c,true);
}
catch(ex){
jsExDebug("mapLinker_removePoint",ex);
}
}
function mapLinker_removeSearchResult(_5d,_5e,_5f){
try{
_5d.map.removeSearchResult(_5f,true);
}
catch(ex){
jsExDebug("mapLinker_removeSearchResult",ex);
}
}
function mapLinker_removeContact(_60,_61,_62){
try{
_60.map.removeContact(_62,true);
}
catch(ex){
jsExDebug("mapLinker_removeContact",ex);
}
}
function mapLinker_drawLine(x1,y1,x2,y2,_67,_68,_69){
function draw(x,y){
try{
var _6c=me.lineDivArray[me.currentDivIndex];
if(!_6c){
_6c=document.createElement("div");
_6c.style.position="absolute";
_6c.style.width="1px";
_6c.style.height="1px";
_6c.style.zIndex=MAPLINK_ZINDEX-1;
me.lineDivArray[me.currentDivIndex]=_6c;
}
_6c.style.backgroundColor=_6e;
_6c.style.border="solid 1px "+_6e;
_6c.style.left=x+"px";
_6c.style.top=y+"px";
document.body.appendChild(_6c);
me.currentDivIndex++;
}
catch(ex){
jsExDebug("mapLinker_drawLine: draw",ex);
}
}
try{
var _6f=new this.SYSTEM.Widget.Button("fromBtn",this.OPTIONS_IMG,this.SYSTEM.Widget.Button.HOVER_IMAGE,this.OPTIONS_WIDTH,this.OPTIONS_HEIGHT);
_6f.widgetElement.style.zIndex=MAPLINK_ZINDEX;
_6f.setValue({group:_67,map:_68});
_6f.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.optionsBtnClickEvent));
var _70=new this.SYSTEM.Widget.Button("toBtn",this.OPTIONS_IMG,this.SYSTEM.Widget.Button.HOVER_IMAGE,this.OPTIONS_WIDTH,this.OPTIONS_HEIGHT);
_70.widgetElement.style.zIndex=MAPLINK_ZINDEX;
_70.setValue({group:_67,map:_69});
_70.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.optionsBtnClickEvent));
var me=this;
var dX=null;
var dY=null;
var m=null;
var y=null;
var x=null;
var _76=null;
var _6e=this.linkGroups[_67].lineColour;
var _77=null;
dX=x2-x1;
dY=y2-y1;
incX=(dX<0?-1:1);
incY=(dY<0?-1:1);
if(Math.abs(dY)<Math.abs(dX)){
m=dY/dX;
b=y1-m*x1;
x=x1;
while(x!=x2){
y=parseInt(Math.round(m*x+b));
draw(x,y);
x+=incX;
}
_77=(dX/5);
fromOptionsPos=x1+Math.round(_77-(this.OPTIONS_WIDTH/2));
y=parseInt(Math.round(m*fromOptionsPos+b));
_6f.setPosition(fromOptionsPos,y-(this.OPTIONS_WIDTH/2));
toOptionsPos=x1+Math.round(dX-_77-(this.OPTIONS_WIDTH/2));
y=parseInt(Math.round(m*toOptionsPos+b));
_70.setPosition(toOptionsPos,y-(this.OPTIONS_WIDTH/2));
}else{
m=dX/dY;
b=x1-m*y1;
y=y1;
while(y!=y2){
x=parseInt(Math.round(m*y+b));
draw(x,y);
y+=incY;
}
_77=(dY/5);
fromOptionsPos=y1+Math.round(_77-(this.OPTIONS_WIDTH/2));
x=parseInt(Math.round(m*fromOptionsPos+b));
_6f.setPosition(x-(this.OPTIONS_WIDTH/2),fromOptionsPos);
toOptionsPos=y1+Math.round(dY-_77-(this.OPTIONS_WIDTH/2));
x=parseInt(Math.round(m*toOptionsPos+b));
_70.setPosition(x-(this.OPTIONS_WIDTH/2),toOptionsPos);
}
_6f.attach(document.body);
_70.attach(document.body);
this.optionsBtnArray.push(_6f);
this.optionsBtnArray.push(_70);
}
catch(ex){
jsExDebug("mapLinker_drawLine",ex);
}
}
function mapLinker_optionsBtnClickEvent(_78,_79){
try{
if(!this.optionsDiv){
var _7a=this.SYSTEM.Dom.createClassElement("div","droplist_select","absolute");
_7a.style.zIndex=1000;
_7a.style.width=this.OPTIONS_DIV_WIDTH+"px";
_7a.style.height=this.OPTIONS_DIV_HEIGHT+"px";
_7a.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
document.body.appendChild(_7a);
var _7b=new this.SYSTEM.Widget.Label("optionsTitleLabel");
_7b.setText("Change:");
_7b.setBold();
_7b.setPosition(4,4);
this.SYSTEM.Dom.setElementClass(_7b.widgetElement,"option");
_7b.attach(_7a);
var _7c=new this.SYSTEM.Widget.Checkbox("optionsPanCheckbox");
_7c.allowLabel("Pan",_7c.LABEL_LEFT,this.OPTIONS_CB_LABEL_WIDTH);
_7c.setPosition(4,25);
this.SYSTEM.Dom.setElementClass(_7c.labelElement,"option");
_7c.attach(_7a);
var _7d=new this.SYSTEM.Widget.Checkbox("optionsZoomCheckbox");
_7d.allowLabel("Zoom",_7d.LABEL_LEFT,this.OPTIONS_CB_LABEL_WIDTH);
_7d.setPosition(4,48);
this.SYSTEM.Dom.setElementClass(_7d.labelElement,"option");
_7d.attach(_7a);
var _7e=new this.SYSTEM.Widget.Checkbox("optionsStyleCheckbox");
_7e.allowLabel("Style",_7e.LABEL_LEFT,this.OPTIONS_CB_LABEL_WIDTH);
_7e.setPosition(4,72);
this.SYSTEM.Dom.setElementClass(_7e.labelElement,"option");
_7e.attach(_7a);
var _7f=new this.SYSTEM.Widget.Checkbox("optionsPointCheckbox");
_7f.allowLabel("Peepel Points",_7f.LABEL_LEFT,this.OPTIONS_CB_LABEL_WIDTH);
_7f.setPosition(4,96);
this.SYSTEM.Dom.setElementClass(_7f.labelElement,"option");
_7f.attach(_7a);
var _80=new this.SYSTEM.Widget.Checkbox("optionsSearchResultCheckbox");
_80.allowLabel("Search Results",_80.LABEL_LEFT,this.OPTIONS_CB_LABEL_WIDTH);
_80.setPosition(4,120);
this.SYSTEM.Dom.setElementClass(_80.labelElement,"option");
_80.attach(_7a);
var _81=new this.SYSTEM.Widget.Checkbox("optionsContactCheckbox");
_81.allowLabel("Contacts",_81.LABEL_LEFT,this.OPTIONS_CB_LABEL_WIDTH);
_81.setPosition(4,144);
this.SYSTEM.Dom.setElementClass(_81.labelElement,"option");
_81.attach(_7a);
var _82=new this.SYSTEM.Widget.TextButton("optionsSynchroniseBtn",this.OPTIONS_DIV_WIDTH-15,"Synchronise");
_82.setPosition(4,165);
_82.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.optionsSynchroniseBtnClickEvent));
_82.attach(_7a);
var _83=new this.SYSTEM.Widget.TextButton("optionsOkBtn",45,"OK");
_83.setPosition(4,4,0,1);
_83.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.optionsOkBtnClickEvent));
_83.attach(_7a);
var _84=new this.SYSTEM.Widget.TextButton("optionsCancelBtn",60,"Cancel");
_84.setPosition(4,4,1,1);
_84.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.optionsCancelBtnClickEvent));
_84.attach(_7a);
this.optionsDiv=_7a;
this.optionsTitleLabel=_7b;
this.optionsPanCheckbox=_7c;
this.optionsZoomCheckbox=_7d;
this.optionsStyleCheckbox=_7e;
this.optionsPointCheckbox=_7f;
this.optionsSearchResultCheckbox=_80;
this.optionsContactCheckbox=_81;
this.optionsSynchroniseBtn=_82;
this.optionsOkBtn=_83;
this.optionsCancelBtn=_84;
}
var _85=_79.getValue();
var map=this.linkGroups[_85.group].maps[_85.map];
this.optionsPanCheckbox.setCheckedState(map.options&this.PAN);
this.optionsZoomCheckbox.setCheckedState(map.options&this.ZOOM);
this.optionsStyleCheckbox.setCheckedState(map.options&this.STYLE);
this.optionsPointCheckbox.setCheckedState(map.options&this.POINTS);
this.optionsSearchResultCheckbox.setCheckedState(map.options&this.S_RESULTS);
this.optionsContactCheckbox.setCheckedState(map.options&this.CONTACTS);
this.optionsOkBtn.setValue(_85);
if(!this.stateOptionsVisible){
document.body.appendChild(this.optionsDiv);
}
this.optionsDiv.style.left=(_79.positionX+_79.width)+"px";
this.optionsDiv.style.top=(_79.positionY+_79.height)+"px";
this.stateOptionsVisible=true;
}
catch(ex){
jsExDebug("mapLinker_optionsBtnClickEvent",ex);
}
}
function mapLinker_optionsOkBtnClickEvent(_87,_88){
try{
var _89=_88.getValue();
var _8a=0;
if(this.optionsPanCheckbox.isChecked()){
_8a=_8a|this.PAN;
}
if(this.optionsZoomCheckbox.isChecked()){
_8a=_8a|this.ZOOM;
}
if(this.optionsStyleCheckbox.isChecked()){
_8a=_8a|this.STYLE;
}
if(this.optionsPointCheckbox.isChecked()){
_8a=_8a|this.POINTS;
}
if(this.optionsSearchResultCheckbox.isChecked()){
_8a=_8a|this.S_RESULTS;
}
if(this.optionsContactCheckbox.isChecked()){
_8a=_8a|this.CONTACTS;
}
this.linkGroups[_89.group].maps[_89.map].options=_8a;
document.body.removeChild(this.optionsDiv);
this.stateOptionsVisible=false;
}
catch(ex){
jsExDebug("mapLinker_optionsOkBtnClickEvent",ex);
}
}
function mapLinker_optionsCancelBtnClickEvent(_8b,_8c){
try{
document.body.removeChild(this.optionsDiv);
this.stateOptionsVisible=false;
}
catch(ex){
jsExDebug("mapLinker_optionsCancelBtnClickEvent",ex);
}
}
function mapLinker_optionsSynchroniseBtnClickEvent(){
try{
var _8d=this.optionsOkBtn.getValue();
var map=this.linkGroups[_8d.group].maps[_8d.map].map;
var _8f=null;
if(this.linkGroups[_8d.group].maps[_8d.map-1]){
_8f=this.linkGroups[_8d.group].maps[_8d.map-1].map;
}else{
if(this.linkGroups[_8d.group].maps[_8d.map+1]){
_8f=this.linkGroups[_8d.group].maps[_8d.map+1].map;
}
}
if(_8f){
map.centreOnCoordinates(_8f.getCentreCoordinates());
map.drawMapObjects();
}
}
catch(ex){
jsExDebug("mapLinker_optionsSynchroniseBtnClickEvent",ex);
}
}

try{
mapDot_t.prototype=new mapObject_t();
mapDot_t.prototype.mapDot_super=mapObject_t.prototype.constructor;
mapDot_t.prototype.constructor=mapDot_t;
mapDot_t.prototype.cleanUp=mapDot_cleanUp;
mapDot_t.prototype.mapObject_cleanUp=mapObject_t.prototype.cleanUp;
mapDot_t.prototype.setPosition=mapDot_setPosition;
mapDot_t.prototype.getHashString=mapDot_getHashString;
mapDot_t.prototype.recalculateCoordinate=mapDot_recalculateCoordinate;
mapDot_t.prototype.DEFAULT_WIDTH=50;
mapDot_t.prototype.DEFAULT_HEIGHT=mapDot_t.prototype.DEFAULT_WIDTH;
mapDot_t.prototype.DEFAULT_ICON_PATH="img/app/app/map/icons/dot.png";
mapDot_t.prototype.MAP_INFO_WIDTH=50;
mapDot_t.prototype.MAP_INFO_HEIGHT=30;
mapDot_t.prototype.MAP_INFO_BG_COLOUR=SYSTEM.Style.BLUE_TOOLGROUP_BG;
}
catch(ex){
jsExDebug("mapDot_t.prototype",ex);
}
function mapDot_t(_1,_2,_3){
try{
this.mapDot_super(_1);
this.hashString="mapDot_t:"+this.coordinate.toString()+"_"+_2;
this.extraHashValue=_2;
this.mapInfoDiv.innerHTML+="<span>"+_2+"</span>";
if(_3){
this.setDimensions(_3,_3);
}
}
catch(ex){
jsExDebug("mapDot_t",ex);
}
}
function mapDot_cleanUp(me){
try{
if(!me){
me=this;
}
me.mapObject_cleanUp();
}
catch(ex){
jsExDebug("mapDot_cleanUp",ex);
}
}
function mapDot_setPosition(x,y){
try{
this.positionX=x-(this.widget.width/2);
this.positionY=y-(this.widget.height/2);
this.widget.setPosition(this.positionX,this.positionY);
}
catch(ex){
jsExDebug("mapDot_setPosition",ex);
}
}
function mapDot_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("mapDot_getHashString",ex);
}
}
function mapDot_recalculateCoordinate(_7,_8){
try{
if(_8.length){
var mo=null;
var _a=0;
var _b=0;
for(var i=0;i<_8.length;i++){
mo=_7.getByListIndex(_8[i]);
_a+=mo.coordinate.mercX;
_b+=mo.coordinate.mercY;
}
this.coordinate.mercX=Math.round(_a/_8.length);
this.coordinate.mercY=Math.round(_b/_8.length);
}
}
catch(ex){
jsExDebug("mapDot_recalculateCoordinate",ex);
}
}

try{
mapHistoryLocation_t.prototype=new mapObject_t();
mapHistoryLocation_t.prototype.mapHistoryLocation_super=mapObject_t.prototype.constructor;
mapHistoryLocation_t.prototype.constructor=mapHistoryLocation_t;
mapHistoryLocation_t.prototype.cleanUp=mapHistoryLocation_cleanUp;
mapHistoryLocation_t.prototype.mapObject_cleanUp=mapObject_t.prototype.cleanUp;
mapHistoryLocation_t.prototype.setPosition=mapHistoryLocation_setPosition;
mapHistoryLocation_t.prototype.getHashString=mapHistoryLocation_getHashString;
mapHistoryLocation_t.prototype.getContactId=mapHistoryLocation_getContactId;
mapHistoryLocation_t.prototype.getClusterLocationHash=mapHistoryLocation_getClusterLocationHash;
mapHistoryLocation_t.prototype.createMapInfoContent=mapHistoryLocation_createMapInfoContent;
mapHistoryLocation_t.prototype.highlight=mapHistoryLocation_highlight;
mapHistoryLocation_t.prototype.dim=mapHistoryLocation_dim;
mapHistoryLocation_t.prototype.DEFAULT_WIDTH=15;
mapHistoryLocation_t.prototype.DEFAULT_HEIGHT=15;
mapHistoryLocation_t.prototype.LARGE_WIDTH=30;
mapHistoryLocation_t.prototype.LARGE_HEIGHT=30;
mapHistoryLocation_t.prototype.DEFAULT_ICON_PATH="img/dev_only/dim";
mapHistoryLocation_t.prototype.MAP_INFO_WIDTH=50;
mapHistoryLocation_t.prototype.MAP_INFO_HEIGHT=30;
mapHistoryLocation_t.prototype.MAP_INFO_BG_COLOUR=SYSTEM.Style.BLUE_TOOLGROUP_BG;
mapHistoryLocation_t.prototype.DIM_IMG="img/dev_only/dim_off.png";
mapHistoryLocation_t.prototype.HIGHLIGHT_IMG="img/dev_only/highlight_off.png";
mapHistoryLocation_t.prototype.OPACITY_CHANGE=0.1;
mapHistoryLocation_t.prototype.MINIMUM_OPACITY=0.5;
mapHistoryLocation_t.prototype.MINIMUM_DIAMETER=15;
}
catch(ex){
jsExDebug("mapHistoryLocation_t.prototype",ex);
}
function mapHistoryLocation_t(_1,_2,_3,_4,_5){
try{
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.mapHistoryLocation_super(_1);
this.hashString=_5+"_"+this.coordinate.toString()+"_"+_2;
this.clusterLocationHash=_4;
this.contactId=_5;
this.widget.setBackgroundColour(_2);
this.widget.setBorder("solid 3px black");
this.setDimensions(_3,_3);
this.setOpacity(this.DEFAULT_ONMAP_OPACITY);
if(_3>this.MINIMUM_DIAMETER){
if(this.SYSTEM.Environment.userAgentIsIE()){
this.widget.widgetElement.style.filter="alpha(opacity=50)";
}else{
this.widget.widgetElement.style.opacity=0.5;
}
}
this.setPosition(this.positionX+(this.settingOnMapWidth/2),this.positionY+(this.settingOnMapHeight/2));
}
catch(ex){
jsExDebug("mapHistoryLocation_t",ex);
}
}
function mapHistoryLocation_cleanUp(){
try{
this.clusterLocationHash=null;
this.contactId=null;
this.mapObject_cleanUp();
}
catch(ex){
jsExDebug("mapHistoryLocation_cleanUp",ex);
}
}
function mapHistoryLocation_setPosition(x,y){
try{
this.positionX=x-(this.widget.width/2);
this.positionY=y-(this.widget.height/2);
this.widget.setPosition(this.positionX,this.positionY);
}
catch(ex){
jsExDebug("mapHistoryLocation_setPosition",ex);
}
}
function mapHistoryLocation_createMapInfoContent(_8){
try{
}
catch(ex){
jsExDebug("mapHistoryLocation_createMapInfoContent",ex);
}
}
function mapHistoryLocation_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("mapHistoryLocation_getHashString",ex);
}
}
function mapHistoryLocation_getContactId(){
try{
return this.contactId;
}
catch(ex){
jsExDebug("mapHistoryLocation_getContactId",ex);
}
}
function mapHistoryLocation_getClusterLocationHash(){
try{
return this.clusterLocationHash;
}
catch(ex){
jsExDebug("mapHistoryLocation_getClusterLocationHash",ex);
}
}
function mapHistoryLocation_highlight(){
try{
this.setIcon(this.HIGHLIGHT_IMG);
}
catch(ex){
jsExDebug("mapHistoryLocation_highlight",ex);
}
}
function mapHistoryLocation_dim(){
try{
this.setIcon(this.DIM_IMG);
}
catch(ex){
jsExDebug("mapHistoryLocation_dim",ex);
}
}

try{
vectorMapObject_t.prototype=new trackableMapObject_t();
vectorMapObject_t.prototype.constructor=vectorMapObject_t;
vectorMapObject_t.prototype.cleanUp=vectorMapObject_cleanUp;
vectorMapObject_t.prototype.vectorMapObject_super=trackableMapObject_t.prototype.constructor;
vectorMapObject_t.prototype.trackableMapObject_cleanUp=trackableMapObject_t.prototype.cleanUp;
vectorMapObject_t.prototype.bindEvents=vectorMapObject_bindEvents;
vectorMapObject_t.prototype.attachTo=vectorMapObject_attachTo;
vectorMapObject_t.prototype.makeSmall=vectorMapObject_makeSmall;
vectorMapObject_t.prototype.makeBig=vectorMapObject_makeBig;
vectorMapObject_t.prototype.hide=vectorMapObject_hide;
vectorMapObject_t.prototype.show=vectorMapObject_show;
vectorMapObject_t.prototype.setPosition=vectorMapObject_setPosition;
vectorMapObject_t.prototype.setDimensions=vectorMapObject_setDimensions;
vectorMapObject_t.prototype.setVectorElementDimensions=vectorMapObject_setVectorElementDimensions;
vectorMapObject_t.prototype.vectorElementEnterEvent=vectorMapObject_vectorElementEnterEvent;
vectorMapObject_t.prototype.vectorElementExitEvent=vectorMapObject_vectorElementExitEvent;
vectorMapObject_t.prototype.vectorElementMouseDownEvent=vectorMapObject_vectorElementMouseDownEvent;
vectorMapObject_t.prototype.WIDGET_OBJECT=null;
vectorMapObject_t.prototype.USE_BASE_INFO_CONTENT=false;
}
catch(ex){
jsExDebug("vectorvectorMapObject_t.prototype",ex);
}
function vectorMapObject_t(_1,_2){
try{
this.overlay=_2;
this.vectorElement=null;
this.vectorMapObject_super(_1);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.defaultEventsAttached=false;
this.bindEvents();
if(!_2){
jsDebug("vectorMapObject_t: No drawing overlay given.:");
return;
}
}
catch(ex){
jsExDebug("vectorMapObject_t",ex);
}
}
function vectorMapObject_cleanUp(){
try{
if(this.defaultEventsAttached){
this.SYSTEM.Event.detachEvent(this.vectorElement,"onmouseover","mouseover");
this.SYSTEM.Event.detachEvent(this.vectorElement,"onmouseout","mouseout");
this.SYSTEM.Event.detachEvent(this.vectorElement,"onmousedown","mousedown");
}
this.defaultEventsAttached=null;
this.overlay.removeElement(this.vectorElement);
this.overlay=null;
this.vectorElement=null;
this.trackableMapObject_cleanUp();
}
catch(ex){
jsExDebug("vectorMapObject_cleanUp",ex);
}
}
function vectorMapObject_createVectorElement(){
try{
}
catch(ex){
jsExDebug("vectorMapObject_createVectorElement",ex);
}
}
function vectorMapObject_bindEvents(){
try{
this.defaultEventsAttached=true;
this.SYSTEM.Event.attachEvent(this.vectorElement,"onmouseover","mouseover",this.vectorElementEnterEvent,this);
this.SYSTEM.Event.attachEvent(this.vectorElement,"onmouseout","mouseout",this.vectorElementExitEvent,this);
this.SYSTEM.Event.attachEvent(this.vectorElement,"onmousedown","mousedown",this.vectorElementMouseDownEvent,this);
}
catch(ex){
jsExDebug("vectorMapObject_bindEvents",ex);
}
}
function vectorMapObject_attachTo(){
return;
}
function vectorMapObject_makeSmall(){
try{
return;
}
catch(ex){
jsExDebug("vectorMapObject_makeSmall",ex);
}
}
function vectorMapObject_makeBig(){
try{
return;
}
catch(ex){
jsExDebug("vectorMapObject_makeBig",ex);
}
}
function vectorMapObject_hide(){
try{
this.hideVectorElement();
this.hidden=true;
}
catch(ex){
jsExDebug("vectorMapObject_hide",ex);
}
}
function vectorMapObject_show(){
try{
this.showVectorElement();
this.hidden=false;
}
catch(ex){
jsExDebug("vectorMapObject_show",ex);
}
}
function vectorMapObject_setPosition(x,y){
try{
this.overlay.setElementPosition(this.vectorElement,x,y);
this.positionX=x;
this.positionY=y;
}
catch(ex){
jsExDebug("vectorMapObject_setPosition",ex);
}
}
function vectorMapObject_setDimensions(_5,_6,_7,_8){
try{
if(!this.vectorElement){
this.createVectorElement();
}
_7=(_7?_7:_5);
_8=(_8?_8:_6);
this.settingOnMapWidth=_5;
this.settingOnMapHeight=_6;
this.settingOffMapWidth=_7;
this.settingOffMapHeight=_8;
this.setVectorElementDimensions();
}
catch(ex){
jsExDebug("vectorMapObject_setDimensions",ex);
}
}
function vectorMapObject_setVectorElementDimensions(){
try{
}
catch(ex){
jsExDebug("vectorMapObject_setVectorElementDimensions",ex);
}
}
function vectorMapObject_vectorElementEnterEvent(_9,me){
try{
me.widgetEnterEvent();
}
catch(ex){
jsExDebug("vectorMapObject_vectorElementEnterEvent",ex);
}
}
function vectorMapObject_vectorElementExitEvent(_b,me){
try{
me.widgetExitEvent();
}
catch(ex){
jsExDebug("vectorMapObject_vectorElementExitEvent",ex);
}
}
function vectorMapObject_vectorElementMouseDownEvent(_d,me){
try{
me.widgetMouseDownEvent();
}
catch(ex){
jsExDebug("vectorMapObject_vectorElementMouseDownEvent",ex);
}
}

try{
vectorHistoryLocation_t.prototype=new vectorMapObject_t();
vectorHistoryLocation_t.prototype.constructor=vectorHistoryLocation_t;
vectorHistoryLocation_t.prototype.cleanUp=vectorHistoryLocation_cleanUp;
vectorHistoryLocation_t.prototype.vectorHistoryLocation_super=vectorMapObject_t.prototype.constructor;
vectorHistoryLocation_t.prototype.vectorMapObject_cleanUp=vectorMapObject_t.prototype.cleanUp;
vectorHistoryLocation_t.prototype.vectorMapObject_bindEvents=vectorMapObject_t.prototype.bindEvents;
vectorHistoryLocation_t.prototype.bindEvents=vectorHistoryLocation_bindEvents;
vectorHistoryLocation_t.prototype.vectorMapObject_makePastLocation=vectorMapObject_t.prototype.makePastLocation;
vectorHistoryLocation_t.prototype.makePastLocation=vectorHistoryLocation_makePastLocation;
vectorHistoryLocation_t.prototype.setClusterPoint=vectorHistoryLocation_setClusterPoint;
vectorHistoryLocation_t.prototype.createVectorElement=vectorHistoryLocation_createVectorElement;
vectorHistoryLocation_t.prototype.setVectorElementDimensions=vectorHistoryLocation_setVectorElementDimensions;
vectorHistoryLocation_t.prototype.setPosition=vectorHistoryLocation_setPosition;
vectorHistoryLocation_t.prototype.getHashString=vectorHistoryLocation_getHashString;
vectorHistoryLocation_t.prototype.getContactId=vectorHistoryLocation_getContactId;
vectorHistoryLocation_t.prototype.highlight=vectorHistoryLocation_highlight;
vectorHistoryLocation_t.prototype.dim=vectorHistoryLocation_dim;
vectorHistoryLocation_t.prototype.hideVectorElement=vectorHistoryLocation_hideVectorElement;
vectorHistoryLocation_t.prototype.showVectorElement=vectorHistoryLocation_showVectorElement;
vectorHistoryLocation_t.prototype.reattachVectorElements=vectorHistoryLocation_reattachVectorElements;
vectorHistoryLocation_t.prototype.createMapInfoContent=vectorHistoryLocation_createMapInfoContent;
vectorHistoryLocation_t.prototype.vectorElementEnterEvent=vectorHistoryLocation_vectorElementEnterEvent;
vectorHistoryLocation_t.prototype.vectorElementExitEvent=vectorHistoryLocation_vectorElementExitEvent;
vectorHistoryLocation_t.prototype.vectorElementMouseDownEvent=vectorHistoryLocation_vectorElementMouseDownEvent;
vectorHistoryLocation_t.prototype.outerCircleEnterEvent=vectorHistoryLocation_outerCircleEnterEvent;
vectorHistoryLocation_t.prototype.outerCircleExitEvent=vectorHistoryLocation_outerCircleExitEvent;
vectorHistoryLocation_t.prototype.outerCircleMouseDownEvent=vectorHistoryLocation_outerCircleMouseDownEvent;
vectorHistoryLocation_t.prototype.NEXT_LINE_WIDTH=3;
vectorHistoryLocation_t.prototype.LINE_COLOUR="#000000";
vectorHistoryLocation_t.prototype.INNER_LINE_COLOUR="#FFFFFF";
vectorHistoryLocation_t.prototype.OUTER_LINE_COLOUR="#AAAAAA";
vectorHistoryLocation_t.prototype.LINE_WIDTH=1.5;
vectorHistoryLocation_t.prototype.HIGHLIGHT_LINE_WIDTH=3;
vectorHistoryLocation_t.prototype.INNER_LINE_WIDTH=2;
vectorHistoryLocation_t.prototype.MINIMUM_DIAMETER=6;
vectorHistoryLocation_t.prototype.HIGHLIGHT_DIM_MULT=2;
vectorHistoryLocation_t.prototype.EVENT_CANCELLED=1;
vectorHistoryLocation_t.prototype.USE_BASE_INFO_CONTENT=true;
vectorHistoryLocation_t.prototype.PREVIEW_WIDTH=vectorHistoryLocation_t.prototype.MAP_INFO_WIDTH-10;
vectorHistoryLocation_t.prototype.PREVIEW_HEIGHT=vectorHistoryLocation_t.prototype.PREVIEW_WIDTH*0.66;
}
catch(ex){
jsExDebug("vectorvectorHistoryLocation_t.prototype",ex);
}
function vectorHistoryLocation_t(_1,_2,_3,_4,_5,_6){
try{
this.colour=_5;
this.contactId=_3;
this.timelineLinePosition=_4;
this.vectorHistoryLocation_super(_1,_2);
if(_3==locationHistoryTimeline_t.prototype.USER_CONTACT_ID){
this.clusterName=this.SYSTEM.UserDetails.userName;
this.path=this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_32);
}else{
var _7=this.SYSTEM.Contacts.getContactIdFromUserId(_3);
var _8=this.SYSTEM.Contacts.getContact(_7);
this.path=_8.getAvatarPath(_8.AVATAR_MAP_OBJECT);
this.clusterName=_8.userName;
}
this.clusterDescription="Contact";
this.hashString=_3+"_"+this.coordinate.toString()+"_"+_5;
this.settingInnerSide=this.MINIMUM_DIAMETER;
this.setDimensions(this.MINIMUM_DIAMETER,this.MINIMUM_DIAMETER);
this.isHighlighted=false;
this.eventElement=null;
this.lineColour="black";
this.clickDelegate=_6;
this.setPosition(this.positionX+(this.settingOnMapWidth/2),this.positionY+(this.settingOnMapHeight/2));
}
catch(ex){
jsExDebug("vectorHistoryLocation_t",ex);
}
}
function vectorHistoryLocation_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.outerCircle,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.outerCircle,"onmouseout","mouseout");
me.SYSTEM.Event.detachEvent(me.outerCircle,"onmousedown","mousedown");
if(me.imageLink){
me.imageLink.cleanUp();
me.imageLink=null;
}
me.contactId=null;
me.colour=null;
me.isHighlighted=null;
me.overlay.removeElement(this.innerCircle);
me.overlay.removeElement(this.outerCircle);
me.innerCircle=null;
me.outerCircle=null;
me.eventElement=null;
me.settingInnerSide=null;
me.nextLocation=null;
me.nextLocationLine=null;
me.lineColour=null;
me.timelineLinePosition=null;
if(me.clickDelegate&&me.clickDelegate.cleanUpndex){
me.clickDelegate.cleanUp();
me.clickDelegate=null;
}
me.vectorMapObject_cleanUp();
}
catch(ex){
jsExDebug("vectorHistoryLocation_cleanUp",ex);
}
}
function vectorHistoryLocation_bindEvents(){
try{
this.vectorMapObject_bindEvents();
this.SYSTEM.Event.attachEvent(this.outerCircle,"onmouseover","mouseover",this.outerCircleEnterEvent,this);
this.SYSTEM.Event.attachEvent(this.outerCircle,"onmouseout","mouseout",this.outerCircleExitEvent,this);
this.SYSTEM.Event.attachEvent(this.outerCircle,"onmousedown","mousedown",this.outerCircleMouseDownEvent,this);
}
catch(ex){
jsExDebug("vectorHistoryLocation_bindEvents",ex);
}
}
function vectorHistoryLocation_createVectorElement(){
try{
this.innerCircle=this.overlay.drawCircle(0,0,this.MINIMUM_DIAMETER,null,this.INNER_LINE_COLOUR,this.INNER_LINE_WIDTH);
this.outerCircle=this.overlay.drawCircle(0,0,this.MINIMUM_DIAMETER,this.colour,this.OUTER_LINE_COLOUR,0);
this.overlay.setElementOpacity(this.outerCircle,0.2);
this.overlay.hideElement(this.innerCircle);
this.vectorElement=this.overlay.drawCircle(0,0,this.MINIMUM_DIAMETER,this.colour,this.LINE_COLOUR,this.LINE_WIDTH);
this.vectorElement.style.cursor="pointer";
}
catch(ex){
jsExDebug("vectorHistoryLocation_createVectorElement",ex);
}
}
function vectorHistoryLocation_setClusterPoint(_a){
try{
this.clusterPointRef=_a;
}
catch(ex){
jsExDebug("vectorHistoryLocation_setClusterPoint",ex);
}
}
function vectorHistoryLocation_setVectorElementDimensions(){
try{
var _b=(this.settingInnerSide?this.settingInnerSide:this.settingOnMapWidth);
this.overlay.setCircleRadius(this.vectorElement,_b);
this.overlay.setCircleRadius(this.innerCircle,_b-(this.LINE_WIDTH/2));
if(_b>this.MINIMUM_DIAMETER){
this.overlay.setElementOpacity(this.vectorElement,0.5);
}else{
this.overlay.setElementOpacity(this.vectorElement,1);
}
totalDiameter=_b;
this.overlay.hideElement(this.outerCircle);
this.settingOnMapWidth=totalDiameter;
this.settingOnMapHeight=totalDiameter;
}
catch(ex){
jsExDebug("vectorHistoryLocation_setVectorElementDimensions",ex);
}
}
function vectorHistoryLocation_setPosition(x,y){
try{
if(x!=this.positionX||y!=this.positionY){
this.positionX=x;
this.positionY=y;
this.overlay.setCirclePosition(this.vectorElement,this.positionX,this.positionY);
this.overlay.setCirclePosition(this.innerCircle,this.positionX,this.positionY);
this.overlay.setCirclePosition(this.outerCircle,this.positionX,this.positionY);
}
}
catch(ex){
jsExDebug("vectorHistoryLocation_setPosition",ex);
}
}
function vectorHistoryLocation_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("vectorHistoryLocation_getHashString",ex);
}
}
function vectorHistoryLocation_getContactId(){
try{
return this.contactId;
}
catch(ex){
jsExDebug("vectorHistoryLocation_getContactId",ex);
}
}
function vectorHistoryLocation_highlight(){
try{
if(this.isClustered()){
this.clusterPointRef.highlight();
}else{
if(!this.isHighlighted){
var _e=this.settingInnerSide+(4*this.LINE_WIDTH);
this.isHighlighted=true;
this.overlay.setCircleRadius(this.vectorElement,_e);
this.overlay.setCircleRadius(this.innerCircle,_e-(this.LINE_WIDTH*2));
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
this.vectorElement.setAttribute("strokeweight",this.HIGHLIGHT_LINE_WIDTH+"pt");
this.vectorElement.parentNode.appendChild(this.vectorElement);
}else{
this.vectorElement.setAttribute("stroke-width",this.HIGHLIGHT_LINE_WIDTH+"pt");
this.vectorElement.parentNode.appendChild(this.vectorElement);
}
this.overlay.showElement(this.innerCircle);
}
}
}
catch(ex){
jsExDebug("vectorHistoryLocation_highlight",ex);
}
}
function vectorHistoryLocation_dim(){
try{
if(this.isClustered()){
this.clusterPointRef.dim();
}else{
if(this.isHighlighted){
this.isHighlighted=false;
this.overlay.setCircleRadius(this.vectorElement,this.settingInnerSide);
this.overlay.hideElement(this.innerCircle);
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
this.vectorElement.setAttribute("strokeweight",this.LINE_WIDTH+"pt");
}else{
this.vectorElement.setAttribute("stroke-width",this.LINE_WIDTH+"pt");
}
}
}
}
catch(ex){
jsExDebug("vectorHistoryLocation_dim",ex);
}
}
function vectorHistoryLocation_hideVectorElement(){
try{
this.vectorElement.style.visibility="hidden";
this.innerCircle.style.visibility="hidden";
this.outerCircle.style.visibility="hidden";
}
catch(ex){
jsExDebug("vectorHistoryLocation_hideVectorElement",ex);
}
}
function vectorHistoryLocation_showVectorElement(){
try{
this.vectorElement.style.visibility="visible";
this.innerCircle.style.visibility="visible";
this.outerCircle.style.visibility="visible";
}
catch(ex){
jsExDebug("vectorHistoryLocation_showVectorElement",ex);
}
}
function vectorHistoryLocation_makePastLocation(_f,_10){
try{
this.vectorMapObject_makePastLocation(_f,this.colour);
_f.reattachVectorElements();
}
catch(ex){
jsExDebug("vectorHistoryLocation_makePastLocation",ex);
}
}
function vectorHistoryLocation_reattachVectorElements(){
try{
this.outerCircle.parentNode.appendChild(this.outerCircle);
this.vectorElement.parentNode.appendChild(this.vectorElement);
this.innerCircle.parentNode.appendChild(this.innerCircle);
}
catch(ex){
jsExDebug("vectorHistoryLocation_reattachVectorElements",ex);
}
}
function vectorHistoryLocation_createMapInfoContent(){
try{
var _11=this.SYSTEM.Contacts.getContactFromUserId(this.contactId);
if(_11){
this.avatarImg.src=_11.getAvatarPath(_11.AVATAR_CONTACT_PROFILE);
this.titleLabel.setText(_11.userName);
this.timeLabel.setText("<b>Time:</b> "+this.getTimeText());
}else{
this.avatarImg.src=this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_50);
this.titleLabel.setText("My Location");
this.timeLabel.setText("<b>Time:</b> "+this.getTimeText());
}
this.removeLink.hide();
this.followBtn.hide();
}
catch(ex){
jsExDebug("vectorHistoryLocation_createMapInfoContent",ex);
}
}
function vectorHistoryLocation_vectorElementEnterEvent(_12,me){
try{
me.eventElement=me.vectorElement;
me.timeLabel.setText("<b>Time:</b> "+me.getTimeText());
me.widgetEnterEvent();
}
catch(ex){
jsExDebug("vectorHistoryLocation_vectorElementEnterEvent",ex);
}
}
function vectorHistoryLocation_vectorElementExitEvent(_14,me){
try{
var _16=(_14.relatedTarget?_14.relatedTarget:_14.toElement);
if(_16==me.innerCircle||_16==me.outerCircle){
return;
}
me.widgetExitEvent();
me.eventElement=me.EVENT_CANCELLED;
}
catch(ex){
jsExDebug("vectorHistoryLocation_vectorElementExitEvent",ex);
}
}
function vectorHistoryLocation_vectorElementMouseDownEvent(_17,me){
try{
me.widgetMouseDownEvent();
if(me.clickDelegate){
me.clickDelegate.invoke(me);
}
}
catch(ex){
jsExDebug("vectorHistoryLocation_vectorElementMouseDownEvent",ex);
}
}
function vectorHistoryLocation_outerCircleEnterEvent(_19,me){
try{
if(me.eventElement!=me.EVENT_CANCELLED){
me.eventElement=me.outerCircle;
me.widgetEnterEvent();
}
}
catch(ex){
jsExDebug("vectorHistoryLocation_outerCircleEnterEvent",ex);
}
}
function vectorHistoryLocation_outerCircleExitEvent(_1b,me){
try{
if(me.eventElement==me.outerCircle){
var _1d=(_1b.relatedTarget?_1b.relatedTarget:_1b.toElement);
if(!_1d){
me.eventElement=me.EVENT_CANCELLED;
}else{
me.eventElement=null;
}
me.widgetExitEvent();
}else{
me.eventElement=null;
}
}
catch(ex){
jsExDebug("vectorHistoryLocation_outerCircleExitEvent",ex);
}
}
function vectorHistoryLocation_outerCircleMouseDownEvent(_1e,me){
try{
if(me.eventElement==me.outerCircle){
me.widgetMouseDownEvent();
}
}
catch(ex){
jsExDebug("vectorHistoryLocation_outerCircleMouseDownEvent",ex);
}
}

try{
mapClusterPoint_t.prototype=new mapObject_t();
mapClusterPoint_t.prototype.mapClusterPoint_super=mapObject_t.prototype.constructor;
mapClusterPoint_t.prototype.constructor=mapClusterPoint_t;
mapClusterPoint_t.prototype.cleanUp=mapClusterPoint_cleanUp;
mapClusterPoint_t.prototype.mapObject_cleanUp=mapObject_t.prototype.cleanUp;
mapClusterPoint_t.prototype.setPosition=mapClusterPoint_setPosition;
mapClusterPoint_t.prototype.getHashString=mapClusterPoint_getHashString;
mapClusterPoint_t.prototype.updateCluster=mapClusterPoint_updateCluster;
mapClusterPoint_t.prototype.createMapInfoContent=mapClusterPoint_createMapInfoContent;
mapClusterPoint_t.prototype.sidebarLinkClickEvent=mapClusterPoint_sidebarLinkClickEvent;
mapClusterPoint_t.prototype.zoomLinkClickEvent=mapClusterPoint_zoomLinkClickEvent;
mapClusterPoint_t.prototype.showInfoContentWidgets=mapClusterPoint_showInfoContentWidgets;
mapClusterPoint_t.prototype.hideInfoContentWidgets=mapClusterPoint_hideInfoContentWidgets;
mapClusterPoint_t.prototype.getOffMapCheckY=mapClusterPoint_getOffMapCheckY;
mapClusterPoint_t.prototype.DEFAULT_WIDTH=55;
mapClusterPoint_t.prototype.DEFAULT_HEIGHT=mapClusterPoint_t.prototype.DEFAULT_WIDTH;
mapClusterPoint_t.prototype.ICON_PATH="img/app/app/map/icons/cluster_";
mapClusterPoint_t.prototype.MAP_INFO_WIDTH=170;
mapClusterPoint_t.prototype.MAP_INFO_HEIGHT=130;
mapClusterPoint_t.prototype.WIDGET_OBJECT=clusterWidget_t;
mapClusterPoint_t.prototype.MAP_INFO_BG_COLOUR=SYSTEM.Style.BLUE_TOOLGROUP_BG;
mapClusterPoint_t.prototype.PREVIEW_WIDTH=mapClusterPoint_t.prototype.MAP_INFO_WIDTH-10;
mapClusterPoint_t.prototype.PREVIEW_HEIGHT=mapClusterPoint_t.prototype.PREVIEW_WIDTH*0.66;
mapClusterPoint_t.prototype.CONTENT_LEFT=5;
mapClusterPoint_t.prototype.CONTENT_TOP=5;
mapClusterPoint_t.prototype.SUMMARY_IMG_SIDE=32;
mapClusterPoint_t.prototype.SUMMARY_LBL_HEIGHT=15;
mapClusterPoint_t.prototype.SUMMARY_LBL_CHAR_LIMIT=5;
mapClusterPoint_t.prototype.SUMMARY_HPADDING=8;
mapClusterPoint_t.prototype.SUMMARY_VPADDING=5;
mapClusterPoint_t.prototype.MAX_SUMMARY_ITEMS=6;
}
catch(ex){
jsExDebug("mapClusterPoint_t.prototype",ex);
}
function mapClusterPoint_t(_1,_2,_3,_4){
try{
this.mapClusterPoint_super(_1);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.hashString="mapClusterPoint_t:"+this.coordinate.toString()+"_"+_2;
this.zoomLevel=_2;
this.mapObjectListRef=_3;
this.imageLabels=[];
this.visibleNames=null;
this.mapInfoXOffset=-10;
this.mapInfoYOffset=10;
this.isClusterPoint=true;
this.createMapInfoContent();
this.updateCluster(_4);
}
catch(ex){
jsExDebug("mapClusterPoint_t",ex);
}
}
function mapClusterPoint_cleanUp(me){
try{
if(!me){
me=this;
}
me.zoomLevel=null;
me.mapObjectListRef=null;
for(var i=0;i<me.imageLabels.length;i++){
me.imageLabels[i].cleanUp();
me.imageLabels[i]=null;
}
me.imageLabels=null;
me.summaryDiv=null;
me.label.cleanUp();
me.label=null;
me.sidebarLink.cleanUp();
me.sidebarLink=null;
me.zoomLink.cleanUp();
me.zoomLink=null;
me.isClusterPoint=null;
if(me.imagePreview&&me.imagePreview.cleanUpIndex){
me.imagePreview.cleanUp();
}
me.imagePreview=null;
me.minX=null;
me.maxX=null;
me.maxY=null;
me.minY=null;
me.uniqueClusterNameCount=null;
me.locationCount=null;
me.visibleNames=null;
me.mapObject_cleanUp();
}
catch(ex){
jsExDebug("mapClusterPoint_cleanUp",ex);
}
}
function mapClusterPoint_setPosition(x,y){
try{
this.positionX=x-(this.widget.width/2);
this.positionY=y-(this.widget.height/2);
this.widget.setPosition(this.positionX,this.positionY);
}
catch(ex){
jsExDebug("mapClusterPoint_setPosition",ex);
}
}
function mapClusterPoint_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("mapClusterPoint_getHashString",ex);
}
}
function mapClusterPoint_updateCluster(_9){
try{
if(_9.length){
var mo=null;
var _b=0;
var _c=0;
var _d=null;
var _e=null;
var _f=null;
var _10=null;
var _11=0;
var _12=0;
var _13="";
var _14=[];
var _15=[];
var _16=[];
for(var i=0;i<_9.length;i++){
mo=this.mapObjectListRef.getByListIndex(_9[i]);
if(mo){
_b+=mo.coordinate.mercX;
_c+=mo.coordinate.mercY;
_12++;
if(_d==null||mo.coordinate.mercX<_d){
_d=mo.coordinate.mercX;
}
if(_e==null||mo.coordinate.mercX>_e){
_e=mo.coordinate.mercX;
}
if(_f==null||mo.coordinate.mercY<_f){
_f=mo.coordinate.mercY;
}
if(_10==null||mo.coordinate.mercY>_10){
_10=mo.coordinate.mercY;
}
if(!_14[mo.clusterName]){
_13=mo.clusterDescription;
_14[mo.clusterName]=mo;
_15.push(mo.clusterName);
_11++;
}
if(mo.coordinate.imageURL&&mo.coordinate.imageURL.length){
for(var j=0;j<mo.coordinate.imageURL.length;j++){
_16.push(mo.coordinate.imageURL[j]);
}
}
}
}
this.coordinate.mercX=Math.round(_b/_12);
this.coordinate.mercY=Math.round(_c/_12);
this.minX=_d;
this.maxX=_e;
this.maxY=_10;
this.minY=_f;
this.uniqueClusterNameCount=_11;
this.locationCount=_12;
if(this.widget){
if(this.uniqueClusterNameCount<=4){
this.setIcon(this.ICON_PATH+"1.png");
}else{
if(this.uniqueClusterNameCount<=8){
this.setIcon(this.ICON_PATH+"2.png");
}else{
this.setIcon(this.ICON_PATH+"3.png");
}
}
this.widget.imageLabel.setText(this.uniqueClusterNameCount);
}
if(_11>this.MAX_SUMMARY_ITEMS){
this.label.setText(_11+" "+_13+"'s");
this.label.show();
this.summaryDiv.style.display="none";
}else{
this.label.hide();
this.summaryDiv.style.display="block";
var _19=0;
var mo=null;
var _1a=this.summaryDiv.getElementsByTagName("img");
var _1b=this.summaryDiv.getElementsByTagName("img");
for(var _1c in _14){
mo=_14[_1c];
if(mo){
_1a[_19].src=mo.path;
_1a[_19].style.visibility="visible";
_1b=this.imageLabels[_19];
if(_11<=2){
_1b.setDimensions(this.MAP_INFO_WIDTH-(this.SUMMARY_HPADDING*2));
_1b.setCharacterLimit(this.SUMMARY_LBL_CHAR_LIMIT*4);
var _1d=_19+3;
_19++;
for(_19;_19<_1d;_19++){
_1a[_19].style.visibility="hidden";
this.imageLabels[_19].hide();
}
_19=_1d;
}else{
_1b.setDimensions(this.SUMMARY_IMG_SIDE,this.SUMMARY_LBL_HEIGHT);
_1b.setCharacterLimit(this.SUMMARY_LBL_CHAR_LIMIT);
_19++;
}
_1b.setText(mo.clusterName);
_1b.show();
}
}
for(_19;_19<_1a.length;_19++){
_1a[_19].style.visibility="hidden";
this.imageLabels[_19].hide();
}
}
this.visibleNames=_15.join();
if(this.imagePreview){
this.imagePreview.cleanUp();
this.imagePreview=null;
}
if(_16.length){
var _1e=new SYSTEM.Widget.ImagePreview("imagePreview",this.PREVIEW_WIDTH,this.PREVIEW_HEIGHT,_16);
_1e.setPosition(5,30,false,true);
_1e.attach(this.mapInfoDiv);
this.imagePreview=_1e;
this.mapInfoDiv.style.height=(this.MAP_INFO_HEIGHT+this.PREVIEW_HEIGHT+_1e.positionY)+"px";
}
}
}
catch(ex){
jsExDebug("mapClusterPoint_updateCluster",ex);
}
}
function mapClusterPoint_createMapInfoContent(){
try{
var _1f=new this.SYSTEM.Widget.Label("label",null);
_1f.setPosition(5,5);
_1f.hide();
_1f.attach(this.mapInfoDiv);
var _20=this.SYSTEM.Dom.createDiv("absolute",3*(this.SUMMARY_IMG_SIDE+this.SUMMARY_HPADDING),2*(this.SUMMARY_IMG_SIDE+this.SUMMARY_LBL_HEIGHT+this.SUMMARY_VPADDING),this.CONTENT_LEFT,this.CONTENT_TOP);
_20.style.display="none";
var top=0;
for(var y=0;y<2;y++){
var _23=0;
for(var x=0;x<(this.MAX_SUMMARY_ITEMS/2);x++){
var _25=this.SYSTEM.Dom.createImage(null,"absolute",this.SUMMARY_IMG_SIDE,this.SUMMARY_IMG_SIDE,_23,top);
_20.appendChild(_25);
var _26=new this.SYSTEM.Widget.Label("imageLabel",null,this.SUMMARY_LBL_CHAR_LIMIT);
_26.setDimensions(this.SUMMARY_IMG_SIDE,this.SUMMARY_LBL_HEIGHT);
_26.setPosition(_23,top+this.SUMMARY_IMG_SIDE);
_26.setFontSize(null,10);
_26.attach(_20);
this.imageLabels.push(_26);
_23+=this.SUMMARY_IMG_SIDE+(2.5*this.SUMMARY_HPADDING);
}
top+=this.SUMMARY_IMG_SIDE+this.SUMMARY_LBL_HEIGHT+this.SUMMARY_VPADDING;
}
this.mapInfoDiv.appendChild(_20);
var _27=new this.SYSTEM.Widget.Link("sidebarLink","Show in sidebar",100);
_27.setPosition(this.CONTENT_LEFT,this.CONTENT_TOP,false,true);
_27.setDimensions(null,15);
_27.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.sidebarLinkClickEvent));
_27.attach(this.mapInfoDiv);
var _28=new this.SYSTEM.Widget.Link("zoomLink","Zoom to",50);
_28.setPosition(this.CONTENT_LEFT,this.CONTENT_TOP,true,true);
_28.setDimensions(null,15);
_28.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.zoomLinkClickEvent));
_28.attach(this.mapInfoDiv);
this.summaryDiv=_20;
this.label=_1f;
this.sidebarLink=_27;
this.zoomLink=_28;
}
catch(ex){
jsExDebug("mapClusterPoint_createMapInfoContent",ex);
}
}
function mapClusterPoint_sidebarLinkClickEvent(){
try{
this.mapReference.fireEvent(this.mapReference.FILTER_SIDEBAR_EVENT,null,this.visibleNames);
}
catch(ex){
jsExDebug("mapClusterPoint_sidebarLinkClickEvent",ex);
}
}
function mapClusterPoint_zoomLinkClickEvent(){
try{
this.mapReference.fitBoundaryCoordinates(new mapBoundary_t(this.minX,this.maxX,this.maxY,this.minY,1));
}
catch(ex){
jsExDebug("mapClusterPoint_zoomLinkClickEvent",ex);
}
}
function mapClusterPoint_showInfoContentWidgets(){
try{
this.sidebarLink.show();
this.zoomLink.show();
}
catch(ex){
jsExDebug("mapClusterPoint_showInfoContentWidgets",ex);
}
}
function mapClusterPoint_hideInfoContentWidgets(){
try{
this.sidebarLink.hide();
this.zoomLink.hide();
}
catch(ex){
jsExDebug("mapClusterPoint_hideInfoContentWidgets",ex);
}
}
function mapClusterPoint_getOffMapCheckY(){
try{
return this.settingOnMapHeight/2;
}
catch(ex){
jsExDebug("mapClusterPoint_getOffMapCheckY",ex);
}
}

try{
vectorHistoryClusterPoint_t.prototype=new vectorMapObject_t();
vectorHistoryClusterPoint_t.prototype.vectorHistoryClusterPoint_super=vectorMapObject_t.prototype.constructor;
vectorHistoryClusterPoint_t.prototype.constructor=vectorHistoryClusterPoint_t;
vectorHistoryClusterPoint_t.prototype.cleanUp=vectorHistoryClusterPoint_cleanUp;
vectorHistoryClusterPoint_t.prototype.vectorMapObject_cleanUp=vectorMapObject_t.prototype.cleanUp;
vectorHistoryClusterPoint_t.prototype.mapClusterPoint_updateCluster=mapClusterPoint_t.prototype.updateCluster;
vectorHistoryClusterPoint_t.prototype.updateCluster=vectorHistoryClusterPoint_updateCluster;
vectorHistoryClusterPoint_t.prototype.createMapInfoContent=mapClusterPoint_createMapInfoContent;
vectorHistoryClusterPoint_t.prototype.setClickDelegate=vectorHistoryClusterPoint_setClickDelegate;
vectorHistoryClusterPoint_t.prototype.createVectorElement=vectorHistoryClusterPoint_createVectorElement;
vectorHistoryClusterPoint_t.prototype.setVectorElementDimensions=vectorHistoryClusterPoint_setVectorElementDimensions;
vectorHistoryClusterPoint_t.prototype.setPosition=vectorHistoryClusterPoint_setPosition;
vectorHistoryClusterPoint_t.prototype.highlight=vectorHistoryClusterPoint_highlight;
vectorHistoryClusterPoint_t.prototype.dim=vectorHistoryClusterPoint_dim;
vectorHistoryClusterPoint_t.prototype.hideVectorElement=vectorHistoryClusterPoint_hideVectorElement;
vectorHistoryClusterPoint_t.prototype.showVectorElement=vectorHistoryClusterPoint_showVectorElement;
vectorHistoryClusterPoint_t.prototype.sidebarLinkClickEvent=vectorHistoryClusterPoint_sidebarLinkClickEvent;
vectorHistoryClusterPoint_t.prototype.zoomLinkClickEvent=vectorHistoryClusterPoint_zoomLinkClickEvent;
vectorHistoryClusterPoint_t.prototype.vectorElementMouseDownEvent=vectorHistoryClusterPoint_vectorElementMouseDownEvent;
vectorHistoryClusterPoint_t.prototype.showInfoContentWidgets=vectorHistoryClusterPoint_showInfoContentWidgets;
vectorHistoryClusterPoint_t.prototype.hideInfoContentWidgets=vectorHistoryClusterPoint_hideInfoContentWidgets;
vectorHistoryClusterPoint_t.prototype.getOffMapCheckY=vectorHistoryClusterPoint_getOffMapCheckY;
vectorHistoryClusterPoint_t.prototype.DEFAULT_WIDTH=50;
vectorHistoryClusterPoint_t.prototype.DEFAULT_HEIGHT=vectorHistoryClusterPoint_t.prototype.DEFAULT_WIDTH;
vectorHistoryClusterPoint_t.prototype.NEXT_LINE_WIDTH=3;
vectorHistoryClusterPoint_t.prototype.LINE_COLOUR="#000000";
vectorHistoryClusterPoint_t.prototype.BG_COLOUR="#FFFFFF";
vectorHistoryClusterPoint_t.prototype.LINE_WIDTH=1.5;
vectorHistoryClusterPoint_t.prototype.HIGHLIGHT_LINE_WIDTH=3;
vectorHistoryClusterPoint_t.prototype.PREVIEW_WIDTH=vectorHistoryClusterPoint_t.prototype.MAP_INFO_WIDTH-10;
vectorHistoryClusterPoint_t.prototype.PREVIEW_HEIGHT=vectorHistoryClusterPoint_t.prototype.PREVIEW_WIDTH*0.66;
vectorHistoryClusterPoint_t.prototype.SUMMARY_IMG_SIDE=32;
vectorHistoryClusterPoint_t.prototype.SUMMARY_LBL_HEIGHT=15;
vectorHistoryClusterPoint_t.prototype.SUMMARY_HPADDING=8;
vectorHistoryClusterPoint_t.prototype.SUMMARY_VPADDING=5;
vectorHistoryClusterPoint_t.prototype.MAX_SUMMARY_ITEMS=6;
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_t.prototype",ex);
}
function vectorHistoryClusterPoint_t(_1,_2,_3,_4,_5){
try{
this.imageLabels=[];
this.vectorHistoryClusterPoint_super(_1,_2);
this.hashString="vectorHistoryClusterPoint_t:"+this.coordinate.toString()+"_"+_3;
this.zoomLevel=_3;
this.mapObjectListRef=_4;
this.visibleNames=null;
this.updateCluster(_5);
this.setDimensions(this.DEFAULT_WIDTH/2,this.DEFAULT_HEIGHT/2);
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_t",ex);
}
}
function vectorHistoryClusterPoint_cleanUp(me){
try{
if(!me){
me=this;
}
me.zoomLevel=null;
me.mapObjectListRef=null;
for(var i=0;i<me.imageLabels.length;i++){
me.imageLabels[i].cleanUp();
me.imageLabels[i]=null;
}
me.imageLabels=null;
me.summaryDiv=null;
me.label.cleanUp();
me.label=null;
me.sidebarLink.cleanUp();
me.sidebarLink=null;
me.zoomLink.cleanUp();
me.zoomLink=null;
me.minX=null;
me.maxX=null;
me.maxY=null;
me.minY=null;
me.uniqueClusterNameCount=null;
me.locationCount=null;
me.visibleNames=null;
me.timelineItemInfo=null;
if(me.clickDelegate&&me.clickDelegate.cleanUpndex){
me.clickDelegate.cleanUp();
me.clickDelegate=null;
}
me.vectorMapObject_cleanUp();
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_cleanUp",ex);
}
}
function vectorHistoryClusterPoint_setClickDelegate(_8){
try{
this.clickDelegate=_8;
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_setClickDelegate",ex);
}
}
function vectorHistoryClusterPoint_updateCluster(_9){
try{
this.mapClusterPoint_updateCluster(_9);
var _a=this.BG_COLOUR;
if(this.uniqueClusterNameCount==1){
for(var i=0;i<_9.length;i++){
mo=this.mapObjectListRef.getByListIndex(_9[i]);
if(mo){
_a=mo.colour;
break;
}
}
}
this.overlay.setCircleColour(this.vectorElement,_a);
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_updateCluster",ex);
}
}
function vectorHistoryClusterPoint_createVectorElement(){
try{
this.vectorElement=this.overlay.drawCircle(0,0,this.DEFAULT_WIDTH/2,this.BG_COLOUR,this.LINE_COLOUR,this.LINE_WIDTH);
this.vectorElement.style.cursor="pointer";
this.overlay.setElementOpacity(this.vectorElement,0.5);
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_createVectorElement",ex);
}
}
function vectorHistoryClusterPoint_setVectorElementDimensions(){
try{
var _c=(this.settingInnerSide?this.settingInnerSide:this.settingOnMapWidth);
this.overlay.setCircleRadius(this.vectorElement,_c);
this.settingOnMapWidth=_c;
this.settingOnMapHeight=_c;
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_setVectorElementDimensions",ex);
}
}
function vectorHistoryClusterPoint_setPosition(x,y){
try{
if(x!=this.positionX||y!=this.positionY){
this.positionX=x;
this.positionY=y;
this.overlay.setCirclePosition(this.vectorElement,this.positionX,this.positionY);
}
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_setPosition",ex);
}
}
function vectorHistoryClusterPoint_highlight(){
try{
if(!this.isHighlighted){
this.isHighlighted=true;
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
this.vectorElement.setAttribute("strokeweight",this.HIGHLIGHT_LINE_WIDTH+"pt");
this.vectorElement.parentNode.appendChild(this.vectorElement);
}else{
this.vectorElement.setAttribute("stroke-width",this.HIGHLIGHT_LINE_WIDTH+"pt");
this.vectorElement.parentNode.appendChild(this.vectorElement);
}
}
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_highlight",ex);
}
}
function vectorHistoryClusterPoint_dim(){
try{
if(this.isHighlighted){
this.isHighlighted=false;
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
this.vectorElement.setAttribute("strokeweight",this.LINE_WIDTH+"pt");
}else{
this.vectorElement.setAttribute("stroke-width",this.LINE_WIDTH+"pt");
}
}
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_dim",ex);
}
}
function vectorHistoryClusterPoint_hideVectorElement(){
try{
this.vectorElement.style.visibility="hidden";
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_hideVectorElement",ex);
}
}
function vectorHistoryClusterPoint_showVectorElement(){
try{
this.vectorElement.style.visibility="visible";
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_showVectorElement",ex);
}
}
function vectorHistoryClusterPoint_sidebarLinkClickEvent(){
try{
this.mapReference.fireEvent(this.mapReference.FILTER_SIDEBAR_EVENT,null,this.visibleNames);
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_sidebarLinkClickEvent",ex);
}
}
function vectorHistoryClusterPoint_zoomLinkClickEvent(){
try{
this.mapReference.fitBoundaryCoordinates(new mapBoundary_t(this.minX,this.maxX,this.maxY,this.minY,1));
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_zoomLinkClickEvent",ex);
}
}
function vectorHistoryClusterPoint_vectorElementMouseDownEvent(_f,me){
try{
me.widgetMouseDownEvent();
if(me.clickDelegate){
me.clickDelegate.invoke(me,true);
}
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_vectorElementMouseDownEvent",ex);
}
}
function vectorHistoryClusterPoint_showInfoContentWidgets(){
try{
this.sidebarLink.show();
this.zoomLink.show();
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_showInfoContentWidgets",ex);
}
}
function vectorHistoryClusterPoint_hideInfoContentWidgets(){
try{
this.sidebarLink.hide();
this.zoomLink.hide();
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_hideInfoContentWidgets",ex);
}
}
function vectorHistoryClusterPoint_getOffMapCheckY(){
try{
return this.settingOnMapHeight/2;
}
catch(ex){
jsExDebug("vectorHistoryClusterPoint_getOffMapCheckY",ex);
}
}

try{
mapPublicUserLocation_t.prototype=new trackableMapObject_t();
mapPublicUserLocation_t.prototype.mapPublicUserLocation_super=trackableMapObject_t.prototype.constructor;
mapPublicUserLocation_t.prototype.constructor=mapPublicUserLocation_t;
mapPublicUserLocation_t.prototype.cleanUp=mapPublicUserLocation_cleanUp;
mapPublicUserLocation_t.prototype.trackableMapObject_cleanUp=trackableMapObject_t.prototype.cleanUp;
mapPublicUserLocation_t.prototype.setPosition=mapPublicUserLocation_setPosition;
mapPublicUserLocation_t.prototype.mapObject_setPosition=mapObject_t.prototype.setPosition;
mapPublicUserLocation_t.prototype.trackableMapObject_setPosition=trackableMapObject_t.prototype.setPosition;
mapPublicUserLocation_t.prototype.trackableMapObject_joinTo=trackableMapObject_t.prototype.joinTo;
mapPublicUserLocation_t.prototype.joinTo=mapPublicUserLocation_joinTo;
mapPublicUserLocation_t.prototype.getOffMapCheckY=mapObject_t.prototype.getOffMapCheckY;
mapPublicUserLocation_t.prototype.mapInfoRemoveClickEvent=mapPublicUserLocation_mapInfoRemoveClickEvent;
mapPublicUserLocation_t.prototype.followBtnClickEvent=mapPublicUserLocation_followBtnClickEvent;
mapPublicUserLocation_t.prototype.widgetEnterEvent=mapPublicUserLocation_widgetEnterEvent;
mapPublicUserLocation_t.prototype.trackableMapObject_widgetEnterEvent=trackableMapObject_t.prototype.widgetEnterEvent;
mapPublicUserLocation_t.prototype.createMapInfoContent=mapPublicUserLocation_createMapInfoContent;
mapPublicUserLocation_t.prototype.showInfoContentWidgets=mapPublicUserLocation_showInfoContentWidgets;
mapPublicUserLocation_t.prototype.hideInfoContentWidgets=mapPublicUserLocation_hideInfoContentWidgets;
mapPublicUserLocation_t.prototype.DEFAULT_WIDTH=36;
mapPublicUserLocation_t.prototype.DEFAULT_HEIGHT=44;
mapPublicUserLocation_t.prototype.WIDGET_OBJECT=contactWidget_t;
}
catch(ex){
jsExDebug("mapPublicUserLocation_t.prototype",ex);
}
function mapPublicUserLocation_t(_1,_2,_3,_4,_5,_6){
try{
this.userId=_2;
this.username=_3;
this.accuracy=_4;
this.iconAvatar=SYSTEM.UserDetails.SIDE_32_DEFAULT_AVATAR;
this.infoAvatar=SYSTEM.UserDetails.SIDE_50_DEFAULT_AVATAR;
if(_5&&_5.length){
var _7=new RegExp(SYSTEM.Icon.DEFAULT_AVATAR_PATH);
if(_5.match(_7)){
this.iconAvatar=_5+"_2.png";
this.infoAvatar=_5+"_1.png";
}else{
this.iconAvatar=_5+"_2.s";
this.infoAvatar=_5+"_1.s";
}
}
this.mapPublicUserLocation_super(_1,_6);
this.mapInfoXOffset=-10;
this.mapInfoYOffset=10;
this.clusterDescription="Public User Location";
this.clusterName=_3;
this.setIcon(this.iconAvatar);
this.widget.checkAge(this.locationTimeSeconds);
this.widget.trackingStatusImage.src=this.widget.TRACKING_STATUS_IMG+"_pub.png";
this.widget.setLabel(_3);
}
catch(ex){
jsExDebug("mapPublicUserLocation_t",ex);
}
}
function mapPublicUserLocation_cleanUp(me){
try{
if(!me){
me=this;
}
me.userId=null;
me.username=null;
me.accuracy=null;
me.avatar=null;
me.trackableMapObject_cleanUp();
}
catch(ex){
jsExDebug("mapPublicUserLocation_cleanUp",ex);
}
}
function mapPublicUserLocation_setPosition(_9,_a,_b,_c){
try{
if(this.widget.isPastLocation){
this.trackableMapObject_setPosition(_9,_a);
}else{
this.mapObject_setPosition(_9,_a);
this.widget.checkAge(this.locationTimeSeconds);
}
}
catch(ex){
jsExDebug("mapPublicUserLocation_setPosition",ex);
}
}
function mapPublicUserLocation_joinTo(_d){
try{
this.trackableMapObject_joinTo(_d);
this.removeLink.hide();
this.mapInfoXOffset=0;
this.mapInfoYOffset=0;
}
catch(ex){
jsExDebug("mapPublicUserLocation_joinTo",ex);
}
}
function mapPublicUserLocation_createMapInfoContent(){
try{
this.avatarImg.src=this.infoAvatar;
this.titleLabel.setText(this.username);
this.timeLabel.setText("Time: "+this.getTimeText());
}
catch(ex){
jsExDebug("mapPublicUserLocation_createMapInfoContent",ex);
}
}
function mapPublicUserLocation_showInfoContentWidgets(){
try{
if(!this.isPastLocation()){
this.removeLink.show();
}
}
catch(ex){
jsExDebug("mapPublicUserLocation_showInfoContentWidgets",ex);
}
}
function mapPublicUserLocation_hideInfoContentWidgets(){
try{
if(!this.isPastLocation()){
this.removeLink.hide();
}
}
catch(ex){
jsExDebug("mapPublicUserLocation_hideInfoContentWidgets",ex);
}
}
function mapPublicUserLocation_mapInfoRemoveClickEvent(_e,_f){
try{
this.mapInfoContainer.hide();
this.mapReference.removePublicUserLocation(this.userId);
}
catch(ex){
jsExDebug("mapPublicUserLocation_mapInfoRemoveClickEvent",ex);
}
}
function mapPublicUserLocation_followBtnClickEvent(_10,_11){
try{
if(_11.getValue()){
this.mapReference.stopFollowingUser(null,null,this.userId);
_11.setImage(this.FOLLOW_OFF_IMG);
_11.setPosition(this.CONTENT_LEFT);
_11.setValue(0);
}else{
this.mapReference.startFollowingUser(null,null,this.userId);
_11.setImage(this.FOLLOW_ON_IMG);
_11.setPosition(this.CONTENT_LEFT+1);
_11.setValue(1);
}
}
catch(ex){
jsExDebug("mapPublicUserLocation_followBtnClickEvent",ex);
}
}
function mapPublicUserLocation_widgetEnterEvent(_12,_13){
try{
this.timeLabel.setText("<b>Time:</b> "+this.getTimeText());
if(this.mapReference.followedPublicUsers[this.userId]){
this.followBtn.setImage(this.FOLLOW_ON_IMG);
this.followBtn.setPosition(this.CONTENT_LEFT);
this.followBtn.setValue(1);
}else{
this.followBtn.setImage(this.FOLLOW_OFF_IMG);
this.followBtn.setPosition(this.CONTENT_LEFT+1);
this.followBtn.setValue(0);
}
this.trackableMapObject_widgetEnterEvent(_12,_13);
}
catch(ex){
jsExDebug("mapPublicUserLocation_widgetEnterEvent",ex);
}
}

try{
mapPointClusterPoint_t.prototype=new mapClusterPoint_t();
mapPointClusterPoint_t.prototype.mapPointClusterPoint_super=mapClusterPoint_t.prototype.constructor;
mapPointClusterPoint_t.prototype.constructor=mapPointClusterPoint_t;
mapPointClusterPoint_t.prototype.ICON_PATH="img/app/app/map/icons/point_cluster_";
}
catch(ex){
jsExDebug("mapPointClusterPoint_t.prototype",ex);
}
function mapPointClusterPoint_t(_1,_2,_3,_4){
try{
this.mapPointClusterPoint_super(_1,_2,_3,_4);
}
catch(ex){
jsExDebug("mapPointClusterPoint_t",ex);
}
}

try{
mapUserWidget_t.prototype=new mapObjectWidget_t();
mapUserWidget_t.prototype.mapUserWidget_super=mapObjectWidget_t.prototype.constructor;
mapUserWidget_t.prototype.constructor=mapUserWidget_t;
mapUserWidget_t.prototype.cleanUp=mapUserWidget_cleanUp;
mapUserWidget_t.prototype.mapObjectWidget_cleanUp=mapObjectWidget_t.prototype.cleanUp;
mapUserWidget_t.prototype.mapObjectWidget_bindEvents=mapObjectWidget_t.prototype.bindEvents;
mapUserWidget_t.prototype.createDom=mapUserWidget_createDom;
mapUserWidget_t.prototype.bindEvents=mapUserWidget_bindEvents;
mapUserWidget_t.prototype.setOpacity=mapUserWidget_setOpacity;
mapUserWidget_t.prototype.setDimensions=mapUserWidget_setDimensions;
mapUserWidget_t.prototype.setPastLocation=mapUserWidget_setPastLocation;
mapUserWidget_t.prototype.setMediaLocation=mapUserWidget_setMediaLocation;
mapUserWidget_t.prototype.checkAge=mapUserWidget_checkAge;
mapUserWidget_t.prototype.NONE_IMG="img/site/global/pixel.png";
mapUserWidget_t.prototype.MOULD_IMG="img/app/app/map/icons/mould";
mapUserWidget_t.prototype.PAST_ICON_IMG="img/app/app/map/mapobjects/contact/point_norm_sml.png";
mapUserWidget_t.prototype.PAST_MEDIA_ICON_IMG="img/app/app/map/mapobjects/contact/photo_avatar.png";
mapUserWidget_t.prototype.TRACKING_STATUS_IMG="img/app/app/map/mapobjects/contact/track";
mapUserWidget_t.prototype.PAST_MEDIA_SIDE=32;
}
catch(ex){
jsExDebug("mapUserWidget_t.prototype",ex);
}
function mapUserWidget_t(_1){
try{
this.mapUserWidget_super("contact",true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.isPastLocation=false;
this.isMediaLocation=false;
this.accuracyValue=null;
this.trackingStatusImage=null;
if(!_1){
this.createDom();
this.bindEvents();
}
}
catch(ex){
jsExDebug("mapUserWidget_t",ex);
}
}
function mapUserWidget_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.topImageElement){
me.SYSTEM.Event.detachEvent(me.topImageElement,"onmousedown","mousedown");
me.SYSTEM.Event.detachEvent(me.topImageElement,"onmouseup","mouseup");
me.SYSTEM.Event.detachEvent(me.topImageElement,"onmouseover","mouseover");
me.SYSTEM.Event.detachEvent(me.topImageElement,"onmouseout","mouseout");
}
me.imageElement=null;
me.topImageElement=null;
me.accuracyValue=null;
me.isPastLocation=null;
me.isMediaLocation=null;
me.trackingStatusImage=null;
me.mapObjectWidget_cleanUp();
}
catch(ex){
jsExDebug("mapUserWidget_cleanUp",ex);
}
}
function mapUserWidget_createDom(){
try{
this.label=new this.SYSTEM.Widget.Label("label");
this.label.setDimensions(null,this.LABEL_HEIGHT);
this.label.setAlignment("center");
this.label.setBold();
this.label.setColour(this.SYSTEM.Style.DARK_BLUE_BORDER);
this.label.attach(this.widgetElement);
var _3=this.SYSTEM.Dom.createImage(this.TRACKING_STATUS_IMG+"_tr.png","absolute");
this.widgetElement.appendChild(_3);
var _4=this.SYSTEM.Dom.createImage(null,"absolute");
this.widgetElement.appendChild(_4);
var _5=this.SYSTEM.Dom.createImage(this.NONE_IMG,"absolute");
this.widgetElement.appendChild(_5);
this.widgetElement.style.visibility="visible";
this.trackingStatusImage=_3;
this.imageElement=_4;
this.topImageElement=_5;
}
catch(ex){
jsExDebug("mapUserWidget_createDom",ex);
}
}
function mapUserWidget_bindEvents(){
try{
this.SYSTEM.Event.attachEvent(this.topImageElement,"onmousedown","mousedown",this.mouseDownEvent,this);
this.SYSTEM.Event.attachEvent(this.topImageElement,"onmouseup","mouseup",this.mouseUpEvent,this);
this.SYSTEM.Event.attachEvent(this.topImageElement,"onmouseover","mouseover",this.enterEvent,this);
this.SYSTEM.Event.attachEvent(this.topImageElement,"onmouseout","mouseout",this.exitEvent,this);
}
catch(ex){
jsExDebug("mapUserWidget_bindEvents",ex);
}
}
function mapUserWidget_setOpacity(_6){
try{
this.opacity=_6;
if(this.SYSTEM.Environment.userAgentIsIE()){
this.widgetElement.style.filter="alpha(opacity="+(this.opacity*100)+")";
}else{
this.widgetElement.style.opacity=this.opacity;
}
}
catch(ex){
jsExDebug("mapUserWidget_setOpacity",ex);
}
}
function mapUserWidget_setDimensions(_7,_8){
try{
if(this.isPastLocation&&this.isMediaLocation){
_7=this.PAST_MEDIA_SIDE;
_8=this.PAST_MEDIA_SIDE;
}
this.width=(_7?_7:this.width);
this.height=(_8?_8:this.height);
var _9=(this.isPastLocation?this.width:this.width-8);
this.widgetElement.style.width=this.width+"px";
this.widgetElement.style.height=this.height+"px";
this.trackingStatusImage.style.width=this.widgetElement.style.width;
this.trackingStatusImage.style.height=this.widgetElement.style.height;
this.imageElement.style.width=_9+"px";
this.imageElement.style.height=_9+"px";
this.topImageElement.style.width=this.imageElement.style.width;
this.topImageElement.style.height=this.imageElement.style.height;
var _a=(this.width-_9)/2;
this.imageElement.style.left=_a+"px";
this.imageElement.style.top=_a+"px";
this.topImageElement.style.left=this.imageElement.style.left;
this.topImageElement.style.top=this.imageElement.style.top;
}
catch(ex){
jsExDebug("mapUserWidget_setDimensions",ex);
}
}
function mapUserWidget_setPastLocation(){
try{
if(this.isMediaLocation){
this.setImage(this.PAST_MEDIA_ICON_IMG);
}else{
this.setImage(this.PAST_ICON_IMG);
}
this.imageElement.style.left="0px";
this.widgetElement.style.border="";
this.topImageElement.src=this.NONE_IMG;
this.trackingStatusImage.src=this.NONE_IMG;
this.trackingStatusImage.style.display="none";
this.isPastLocation=true;
this.label.setText("");
}
catch(ex){
jsExDebug("mapUserWidget_setPastLocation",ex);
}
}
function mapUserWidget_setMediaLocation(){
try{
this.isMediaLocation=true;
if(this.isPastLocation){
this.setImage(this.PAST_MEDIA_ICON_IMG);
}
}
catch(ex){
jsExDebug("mapUserWidget_setMediaLocation",ex);
}
}
function mapUserWidget_checkAge(_b){
try{
if(this.SYSTEM.Settings.get("map_location_decay")){
var _c=60*60*24;
var _d=new Date();
var _e=Math.floor(((_d.getTime()-_b)/1000)/_c);
if(_e>0){
if(_e<5){
this.topImageElement.src=this.MOULD_IMG+".png";
}else{
if(_e<10){
this.topImageElement.src=this.MOULD_IMG+"2.png";
}else{
this.topImageElement.src=this.MOULD_IMG+"3.png";
}
}
this.topImageElement.style.display="block";
}
}else{
this.topImageElement.src=this.NONE_IMG;
}
}
catch(ex){
jsExDebug("mapUserWidget_checkAge",ex);
}
}

try{
mapUserLocation_t.prototype=new trackableMapObject_t();
mapUserLocation_t.prototype.mapUserLocation_super=trackableMapObject_t.prototype.constructor;
mapUserLocation_t.prototype.constructor=mapUserLocation_t;
mapUserLocation_t.prototype.cleanUp=mapUserLocation_cleanUp;
mapUserLocation_t.prototype.trackableMapObject_cleanUp=trackableMapObject_t.prototype.cleanUp;
mapUserLocation_t.prototype.mapObject_setPosition=mapObject_t.prototype.setPosition;
mapUserLocation_t.prototype.trackableMapObject_setPosition=trackableMapObject_t.prototype.setPosition;
mapUserLocation_t.prototype.setPosition=mapUserLocation_setPosition;
mapUserLocation_t.prototype.trackableMapObject_joinTo=trackableMapObject_t.prototype.joinTo;
mapUserLocation_t.prototype.joinTo=mapUserLocation_joinTo;
mapUserLocation_t.prototype.getOffMapCheckY=mapObject_t.prototype.getOffMapCheckY;
mapUserLocation_t.prototype.updateMapInfo=mapUserLocation_updateMapInfo;
mapUserLocation_t.prototype.updateFromUserDetails=mapUserLocation_updateFromUserDetails;
mapUserLocation_t.prototype.getHashString=mapUserLocation_getHashString;
mapUserLocation_t.prototype.mapInfoRemoveClickEvent=mapUserLocation_mapInfoRemoveClickEvent;
mapUserLocation_t.prototype.widgetEnterEvent=mapUserLocation_widgetEnterEvent;
mapUserLocation_t.prototype.trackableMapObject_widgetEnterEvent=trackableMapObject_t.prototype.widgetEnterEvent;
mapUserLocation_t.prototype.followBtnClickEvent=mapUserLocation_followBtnClickEvent;
mapUserLocation_t.prototype.createMapInfoContent=mapUserLocation_createMapInfoContent;
mapUserLocation_t.prototype.showInfoContentWidgets=mapUserLocation_showInfoContentWidgets;
mapUserLocation_t.prototype.hideInfoContentWidgets=mapUserLocation_hideInfoContentWidgets;
mapUserLocation_t.prototype.DEFAULT_WIDTH=36;
mapUserLocation_t.prototype.DEFAULT_HEIGHT=44;
mapUserLocation_t.prototype.DEFAULT_SHOW_OFFMAP=true;
mapUserLocation_t.prototype.WIDGET_OBJECT=mapUserWidget_t;
}
catch(ex){
jsExDebug("mapUserLocation_t.prototype",ex);
}
function mapUserLocation_t(_1,_2,_3){
try{
this.mapUserLocation_super(_1,_2);
this.mapInfoXOffset=-10;
this.mapInfoYOffset=0;
this.setIcon(this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_32));
this.isUserLocation=true;
this.clusterDescription="User Location";
this.clusterName=this.SYSTEM.UserDetails.userName;
this.singleMediaFlag=_3;
}
catch(ex){
jsExDebug("mapUserLocation_t",ex);
}
}
function mapUserLocation_cleanUp(me){
try{
if(!me){
me=this;
}
me.isUserLocation=null;
me.singleMediaFlag=null;
me.trackableMapObject_cleanUp();
}
catch(ex){
jsExDebug("mapUserLocation_cleanUp",ex);
}
}
function mapUserLocation_joinTo(_5){
try{
this.trackableMapObject_joinTo(_5);
this.removeLink.hide();
this.mapInfoXOffset=0;
this.mapInfoYOffset=0;
}
catch(ex){
jsExDebug("mapUserLocation_joinTo",ex);
}
}
function mapUserLocation_setPosition(_6,_7,_8,_9){
try{
if(this.widget.isPastLocation){
this.trackableMapObject_setPosition(_6,_7);
}else{
this.mapObject_setPosition(_6,_7);
if(!this.singleMediaFlag){
this.widget.checkAge(this.locationTimeSeconds);
}
}
}
catch(ex){
jsExDebug("mapUserLocation_setPosition",ex);
}
}
function mapUserLocation_createMapInfoContent(){
try{
this.avatarImg.src=this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_50);
this.titleLabel.setText("My Location");
this.timeLabel.setText("<b>Time:</b> "+this.getTimeText());
}
catch(ex){
jsExDebug("mapUserLocation_createMapInfoContent",ex);
}
}
function mapUserLocation_showInfoContentWidgets(){
try{
if(!this.isPastLocation()){
this.removeLink.show();
}else{
this.removeLink.hide();
}
}
catch(ex){
jsExDebug("mapUserLocation_showInfoContentWidgets",ex);
}
}
function mapUserLocation_hideInfoContentWidgets(){
try{
if(!this.isPastLocation()){
this.removeLink.hide();
}
}
catch(ex){
jsExDebug("mapUserLocation_hideInfoContentWidgets",ex);
}
}
function mapUserLocation_updateMapInfo(_a){
try{
}
catch(ex){
jsExDebug("mapUserLocation_updateMapInfo",ex);
}
}
function mapUserLocation_updateFromUserDetails(){
try{
if(!this.isPastLocation()){
this.setIcon(this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_32));
}
this.avatarImg.src=this.SYSTEM.UserDetails.getAvatarPath(this.SYSTEM.UserDetails.SIDE_50);
}
catch(ex){
jsExDebug("mapUserLocation_updateFromUserDetails",ex);
}
}
function mapUserLocation_getHashString(){
try{
return this.hashString;
}
catch(ex){
jsExDebug("mapUserLocation_getHashString",ex);
}
}
function mapUserLocation_mapInfoRemoveClickEvent(_b,_c){
try{
this.mapInfoContainer.hide();
this.mapReference.removeUserLocation((this.singleMediaFlag?this.hashString:false));
}
catch(ex){
jsExDebug("mapUserLocation_mapInfoRemoveClickEvent",ex);
}
}
function mapUserLocation_widgetEnterEvent(_d,_e){
try{
this.timeLabel.setText("<b>Time:</b> "+this.getTimeText());
if(this.mapReference.followedUser){
this.followBtn.setImage(this.FOLLOW_ON_IMG);
this.followBtn.setPosition(this.CONTENT_LEFT);
this.followBtn.setValue(1);
}else{
this.followBtn.setImage(this.FOLLOW_OFF_IMG);
this.followBtn.setPosition(this.CONTENT_LEFT+1);
this.followBtn.setValue(0);
}
this.trackableMapObject_widgetEnterEvent(_d,_e);
}
catch(ex){
jsExDebug("mapUserLocation_widgetEnterEvent",ex);
}
}
function mapUserLocation_followBtnClickEvent(_f,_10){
try{
if(_10.getValue()){
this.mapReference.stopFollowingUser(null,true);
_10.setImage(this.FOLLOW_OFF_IMG);
_10.setPosition(this.CONTENT_LEFT);
_10.setValue(0);
}else{
this.mapReference.startFollowingUser(null,true);
_10.setImage(this.FOLLOW_ON_IMG);
_10.setPosition(this.CONTENT_LEFT+1);
_10.setValue(1);
}
}
catch(ex){
jsExDebug("mapUserLocation_followBtnClickEvent",ex);
}
}

try{
mapSignificantPoint_t.prototype=new trackableMapObject_t();
mapSignificantPoint_t.prototype.mapSignificantPoint_super=trackableMapObject_t.prototype.constructor;
mapSignificantPoint_t.prototype.constructor=mapSignificantPoint_t;
mapSignificantPoint_t.prototype.ALLOW_MAP_INFO=false;
mapSignificantPoint_t.prototype.DEFAULT_WIDTH=12;
mapSignificantPoint_t.prototype.DEFAULT_HEIGHT=mapSignificantPoint_t.prototype.DEFAULT_WIDTH;
mapSignificantPoint_t.prototype.PAST_WIDTH=mapSignificantPoint_t.prototype.DEFAULT_WIDTH;
mapSignificantPoint_t.prototype.PAST_HEIGHT=mapSignificantPoint_t.prototype.DEFAULT_HEIGHT;
mapSignificantPoint_t.prototype.DEFAULT_ICON_PATH="img/app/app/map/mapobjects/significantpoint.png";
}
catch(ex){
jsExDebug("mapSignificantPoint_t.prototype",ex);
}
function mapSignificantPoint_t(_1,_2,_3,_4){
try{
this.mapSignificantPoint_super(_1,_4);
this.clusterDescription=_2;
this.clusterName=_3;
this.hashString="sigpoint_"+this.coordinate.mercX+"_"+this.coordinate.mercY+"_"+this.coordinate.zoom+"_"+this.coordinate.guid;
this.makePastLocation();
}
catch(ex){
jsExDebug("mapSignificantPoint_t",ex);
}
}

try{
styleToolgroup_t.prototype=new widgetToolgroup_t();
styleToolgroup_t.prototype.styleToolgroup_super=widgetToolgroup_t.prototype.constructor;
styleToolgroup_t.prototype.constructor=styleToolgroup_t;
styleToolgroup_t.prototype.cleanUp=styleToolgroup_cleanUp;
styleToolgroup_t.prototype.toolgroup_cleanUp=widgetToolgroup_t.prototype.cleanUp;
styleToolgroup_t.prototype.widgetToolgroup_createDom=widgetToolgroup_t.prototype.createDom;
styleToolgroup_t.prototype.createDom=styleToolgroup_createDom;
styleToolgroup_t.prototype.widgetToolgroup_bindEvents=widgetToolgroup_t.prototype.bindEvents;
styleToolgroup_t.prototype.bindEvents=styleToolgroup_bindEvents;
styleToolgroup_t.prototype.unbindEvents=styleToolgroup_unbindEvents;
styleToolgroup_t.prototype.update=styleToolgroup_update;
styleToolgroup_t.prototype.addStyle=styleToolgroup_addStyle;
styleToolgroup_t.prototype.useStyle=styleToolgroup_useStyle;
styleToolgroup_t.prototype.chooseBtnClickEvent=styleToolgroup_chooseBtnClickEvent;
styleToolgroup_t.prototype.useLinkClickEvent=styleToolgroup_useLinkClickEvent;
styleToolgroup_t.prototype.useEvent=styleToolgroup_useEvent;
styleToolgroup_t.prototype.hideListEvent=styleToolgroup_hideListEvent;
styleToolgroup_t.prototype.itemMouseOverEvent=styleToolgroup_itemMouseOverEvent;
styleToolgroup_t.prototype.WIDTH=200;
styleToolgroup_t.prototype.LIST_WIDTH=250;
}
catch(ex){
jsExDebug("styleToolgroup_t:prototype",ex);
}
function styleToolgroup_t(_1,_2){
try{
this.styleToolgroup_super("styleToolgroup_t",this.WIDTH,null,null,true);
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.application=_1;
this.styleWidgets=[];
this.items=[];
this.listVisible=false;
this.highlightedIndex=null;
this.selectedIndex=null;
if(!_2){
this.createDom(this.WIDTH,this.DEFAULT_HEIGHT);
this.bindEvents();
}
}
catch(ex){
jsExDebug("styleToolgroup_t",ex);
}
}
function styleToolgroup_cleanUp(me){
try{
if(!me){
me=this;
}
me.unbindEvents();
me.application=null;
for(var i=0;i<me.items.length;i++){
me.SYSTEM.Event.detachEvent(me.items[i],"onmousedown","mousedown");
me.items[i]=null;
}
me.items=null;
for(var i=0;i<me.styleWidgets.length;i++){
me.styleWidgets[i].cleanUp();
me.styleWidgets[i]=null;
}
me.styleWidgets=null;
me.previewDiv=null;
me.previewLabel=null;
me.chooseBtn=null;
me.listDiv=null;
me.toolgroup_cleanUp();
}
catch(ex){
jsExDebug("styleToolgroup_cleanUp",ex);
}
}
function styleToolgroup_createDom(_5,_6){
try{
this.widgetToolgroup_createDom(_5,_6);
this.allowOverflow();
this.allowLabel("Current Style");
var w=this.SYSTEM.Widget;
var _8=this.SYSTEM.Dom.createClassElement("div","map_sample");
_8.style.left=this.pad+"px";
_8.style.top=this.pad+"px";
_8.style.visibility="hidden";
this.PREVIEW_IMG_WIDTH=65;
this.LIST_ITEM_HEIGHT=this.PREVIEW_IMG_WIDTH+10;
var _9=new w.Label("previewLabel","<i>No style</i>");
_9.setDimensions(this.width-this.PREVIEW_IMG_WIDTH-(3*this.pad),this.height-this.LABEL_HEIGHT-(3*this.pad)-this.SYSTEM.Style.TEXT_BTN_HEIGHT);
_9.setFontSize(null,null,16);
_9.setBold();
var _a=new w.TextButton("chooseBtn",this.width-this.PREVIEW_IMG_WIDTH-(3*this.pad),"Change");
var _b=this.SYSTEM.MapStyle.getStyles();
var _c=this.SYSTEM.Dom.createDiv(null,this.LIST_WIDTH,null,0,this.height);
this.SYSTEM.Dom.setElementClass(_c,"droplist");
_c.style.overflowY="scroll";
_c.style.display="none";
this.contentElement.appendChild(_8);
this.addWidget(_9,this.PREVIEW_IMG_WIDTH+(2*this.pad),this.pad);
this.addWidget(_a,this.pad,this.LABEL_HEIGHT+this.pad,true,true);
this.contentElement.appendChild(_c);
this.previewDiv=_8;
this.previewLabel=_9;
this.chooseBtn=_a;
this.listDiv=_c;
_8.style.border="solid 2px "+this.SYSTEM.Dom.getCurrentStyle(this.labelElement).color;
for(var i=0;i<_b.length;i++){
this.addStyle(_b[i],i);
}
var _e=(this.items.length*this.LIST_ITEM_HEIGHT)+2;
if(_e>(this.SYSTEM.Environment.SCREEN_HEIGHT/2)){
_e=this.SYSTEM.Environment.SCREEN_HEIGHT/2;
}
_c.style.height=_e+"px";
}
catch(ex){
jsExDebug("styleToolgroup_createDom",ex);
}
}
function styleToolgroup_bindEvents(){
try{
this.widgetToolgroup_bindEvents();
this.chooseBtn.addEventHandler(this.SYSTEM.Event.CLICK_EVENT,new this.SYSTEM.Delegate(this,this.chooseBtnClickEvent));
this.SYSTEM.Event.attachEvent(this.widgetElement,"allclickprop","allclickprop",this.hideListEvent,this,false);
}
catch(ex){
jsExDebug("styleToolgroup_bindEvents",ex);
}
}
function styleToolgroup_unbindEvents(){
try{
this.SYSTEM.Event.detachEvent(this.widgetElement,"allclickprop","allclickprop");
}
catch(ex){
jsExDebug("styleToolgroup_unbindEvents",ex);
}
}
function styleToolgroup_update(_f){
try{
this.styleId=_f;
if(this.SYSTEM.MapStyle.isValidStyle(this.styleId)){
this.previewDiv.style.visibility="visible";
this.previewDiv.innerHTML="<img class=\"map_sample_img\" src='"+this.SYSTEM.MapStyle.getStyleSample(this.styleId)+"'/>";
this.previewLabel.setText(this.SYSTEM.MapStyle.getStyleName(this.styleId));
}else{
this.previewDiv.style.visibility="hidden";
this.previewLabel.setText("<i>No style</i>");
}
}
catch(ex){
jsExDebug("styleToolgroup_update",ex);
}
}
function styleToolgroup_addStyle(_10,_11){
try{
var w=this.SYSTEM.Widget;
var _13=this.LIST_WIDTH-20;
var _14=this.SYSTEM.Dom.createDiv(null,_13,this.LIST_ITEM_HEIGHT,0,_11*this.LIST_ITEM_HEIGHT);
_14.style.borderBottom="solid 2px rgb(100,100,100)";
_14.style.cursor="pointer";
this.SYSTEM.Dom.setElementClass(_14,"option");
var _15=this.SYSTEM.Dom.createClassElement("div","map_sample");
_15.style.left=this.pad+"px";
_15.style.top=this.pad+"px";
_15.style.border="solid 2px "+this.SYSTEM.Dom.getCurrentStyle(this.labelElement).color;
_15.innerHTML="<img class=\"map_sample_img\" src='"+_10.sample+"'/>";
_14.appendChild(_15);
var _16=new w.Label("label",_10.name);
_16.setFontSize(null,null,16);
_16.setBold();
_16.setPosition(this.PREVIEW_IMG_WIDTH+(2*this.pad),this.pad);
_16.setDimensions(_13-_16.positionX);
_16.setValue(_10.id);
_16.attach(_14);
var _17=new w.Label("label2",_10.description);
_17.setFontSize(null,null,12);
_17.setPosition(_16.positionX,_16.positionY+25);
_17.setDimensions(_13-_17.positionX);
_17.attach(_14);
this.styleWidgets.push(_16);
this.styleWidgets.push(_17);
this.listDiv.appendChild(_14);
this.items.push(_14);
this.SYSTEM.Event.attachEvent(_14,"onmousedown","mousedown",this.useEvent,this,false,_10.id+";"+_11);
this.SYSTEM.Event.attachEvent(_14,"onmouseover","mouseover",this.itemMouseOverEvent,this,false,_11);
}
catch(ex){
jsExDebug("styleToolgroup_addStyle",ex);
}
}
function styleToolgroup_useStyle(_18){
try{
this.listDiv.style.display="none";
this.listVisible=false;
if(this.application.map&&this.application.mapCustomLabelColours){
this.application.map.setStyle(_18);
this.application.map.setLabelColour(this.application.mapCustomLabelColours[_18]);
this.update(_18);
}
}
catch(ex){
jsExDebug("styleToolgroup_useStyle",ex);
}
}
function styleToolgroup_chooseBtnClickEvent(){
try{
if(this.listVisible){
return;
}
this.listDiv.style.display="block";
this.listVisible=true;
}
catch(ex){
jsExDebug("styleToolgroup_chooseBtnClickEvent",ex);
}
}
function styleToolgroup_useEvent(_19,me,_1b){
try{
var _1c=_1b.split(";");
var _1d=_1c[0];
var _1e=parseFloat(_1c[1]);
if(me.items[me.selectedIndex]){
if(me.selectedIndex==me.highlightedIndex){
me.SYSTEM.Dom.setElementClass(me.items[me.selectedIndex],"option hover");
}else{
me.SYSTEM.Dom.setElementClass(me.items[me.selectedIndex],"option");
}
}
me.selectedIndex=_1e;
me.SYSTEM.Dom.setElementClass(me.items[me.selectedIndex],"option on");
me.useStyle(_1d);
}
catch(ex){
jsExDebug("styleToolgroup_useEvent",ex);
}
}
function styleToolgroup_useLinkClickEvent(_1f,_20){
try{
this.useStyle(_20.getValue());
}
catch(ex){
jsExDebug("styleToolgroup_useLinkClickEvent",ex);
}
}
function styleToolgroup_hideListEvent(_21,me){
try{
if(me.listVisible){
me.listDiv.style.display="none";
me.listVisible=false;
if(me.items[me.highlightedIndex]){
if(me.highlightedIndex==me.selectedIndex){
me.SYSTEM.Dom.setElementClass(me.items[me.highlightedIndex],"option on");
}else{
me.SYSTEM.Dom.setElementClass(me.items[me.highlightedIndex],"option");
}
me.highlightedIndex=null;
}
}
}
catch(ex){
jsExDebug("styleToolgroup_hideListEvent",ex);
}
}
function styleToolgroup_itemMouseOverEvent(_23,me,_25){
try{
if(_25==me.highlightedIndex){
return;
}
if(me.items[me.highlightedIndex]){
if(me.highlightedIndex==me.selectedIndex){
me.SYSTEM.Dom.setElementClass(me.items[me.highlightedIndex],"option on");
}else{
me.SYSTEM.Dom.setElementClass(me.items[me.highlightedIndex],"option");
}
}
me.highlightedIndex=_25;
if(me.highlightedIndex==me.selectedIndex){
me.SYSTEM.Dom.setElementClass(me.items[me.highlightedIndex],"option on_hover");
}else{
me.SYSTEM.Dom.setElementClass(me.items[me.highlightedIndex],"option hover");
}
}
catch(ex){
jsExDebug("styleToolgroup_itemMouseOverEvent",ex);
}
}

try{
mapStyleList_t.prototype=new peepelObject_t();
mapStyleList_t.prototype.constructor=mapStyleList_t;
mapStyleList_t.prototype.mapStyleList_super=peepelObject_t.prototype.constructor;
mapStyleList_t.prototype.cleanUp=mapStyleList_cleanUp;
mapStyleList_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
mapStyleList_t.prototype.isValidStyle=mapStyleList_isValidStyle;
mapStyleList_t.prototype.getStyleName=mapStyleList_getStyleName;
mapStyleList_t.prototype.getStyleSample=mapStyleList_getStyleSample;
mapStyleList_t.prototype.getStyles=mapStyleList_getStyles;
mapStyleList_t.prototype.getDefaultStyle=mapStyleList_getDefaultStyle;
mapStyleList_t.prototype.styleListResponse=mapStyleList_styleListResponse;
mapStyleList_t.prototype.REQUEST_URL=network_t.prototype.SERVICES_PATH+"?service=tracking&action=21";
}
catch(ex){
jsExDebug("mapStyleList_t.prototype",ex);
}
function mapStyleList_t(_1){
try{
this.mapStyleList_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.styleArray=[];
this.defaultStyle=null;
this.initialised=false;
this.initialisationDelegate=_1;
this.SYSTEM.Network.JSONRequest(this.REQUEST_URL,null,this.styleListResponse,this);
}
catch(ex){
jsExDebug("mapStyleList_t",ex);
}
}
function mapStyleList_cleanUp(me){
try{
if(!me){
me=this;
}
for(var id in me.styleArray){
me.styleArray[id]=null;
}
me.styleArray=null;
me.defaultStyle=null;
me.initialised=null;
if(me.initialisationDelegate){
me.initialisationDelegate.cleanUp();
me.initialisationDelegate=null;
}
me.peepelObject_cleanUp();
if(me==SYSTEM.MapStyle){
SYSTEM.MapStyle==null;
}
}
catch(ex){
jsExDebug("mapStyleList_cleanUp",ex);
}
}
function mapStyleList_isValidStyle(_4){
try{
if(this.styleArray[_4]){
return true;
}else{
return false;
}
}
catch(ex){
jsExDebug("mapStyleList_isValidStyle",ex);
}
}
function mapStyleList_getStyleName(_5){
try{
if(this.styleArray[_5]){
return this.styleArray[_5].name;
}
}
catch(ex){
jsExDebug("mapStyleList_getStyleName",ex);
}
}
function mapStyleList_getStyleSample(_6){
try{
if(this.styleArray[_6]){
return this.styleArray[_6].sample;
}
}
catch(ex){
jsExDebug("mapStyleList_getStyleSample",ex);
}
}
function mapStyleList_getStyles(){
try{
var _7=[];
for(var id in this.styleArray){
_7.push(this.styleArray[id]);
}
return _7;
}
catch(ex){
jsExDebug("mapStyleList_getStyles",ex);
}
}
function mapStyleList_getDefaultStyle(){
try{
var _9=this.SYSTEM.Settings.get("map_default_style");
if(_9!=null&&this.isValidStyle(_9)){
return _9;
}else{
return this.defaultStyle;
}
}
catch(ex){
jsExDebug("mapStyleList_getDefaultStyle",ex);
}
}
function mapStyleList_styleListResponse(_a){
try{
var _b=null;
if(_a){
for(var i=0;i<_a.length;i++){
_b=_a[i].id;
if(this.defaultStyle==null){
this.defaultStyle=_b;
}
this.styleArray[_b]=_a[i];
}
}
this.initialised=true;
if(this.initialisationDelegate){
this.initialisationDelegate.invoke();
this.initialisationDelegate.cleanUp();
this.initialisationDelegate=null;
}
}
catch(ex){
jsExDebug("mapStyleList_styleListResponse",ex);
}
}

try{
widgetMapCopyright_t.prototype=new widget_t();
widgetMapCopyright_t.prototype.widgetMapCopyright_super=widget_t.prototype.constructor;
widgetMapCopyright_t.prototype.constructor=widgetMapCopyright_t;
widgetMapCopyright_t.prototype.cleanUp=widgetMapCopyright_cleanUp;
widgetMapCopyright_t.prototype.widget_cleanUp=widget_t.prototype.cleanUp;
widgetMapCopyright_t.prototype.showNotice=widgetMapCopyright_showNotice;
widgetMapCopyright_t.prototype.imgClickEvent=widgetMapCopyright_imgClickEvent;
widgetMapCopyright_t.prototype.DEFAULT_BELOW_12="{default < 12}";
widgetMapCopyright_t.prototype.DEFAULT_ABOVE_11="{default > 11}";
widgetMapCopyright_t.prototype.IMAGE="img/app/app/map/copyright.png";
widgetMapCopyright_t.prototype.IMG_WIDTH=80;
widgetMapCopyright_t.prototype.IMG_HEIGHT=24;
widgetMapCopyright_t.prototype.COPYRIGHT_TEXT="COPYRIGHT TEXT";
}
catch(ex){
jsExDebug("widgetMapCopyright_t.prototype",ex);
}
function widgetMapCopyright_t(){
try{
this.widgetMapCopyright_super();
this.setDimensions(this.IMG_WIDTH,this.IMG_HEIGHT);
var _1=this.SYSTEM.Dom.createDiv(null,this.IMG_WIDTH,this.IMG_HEIGHT,0,0);
_1.style.cursor="pointer";
this.widgetElement.appendChild(_1);
_1.innerHTML="&copy; Peepel.com";
this.SYSTEM.Event.attachEvent(_1,"onclick","click",this.imgClickEvent,this);
this.img=_1;
}
catch(ex){
jsExDebug("widgetMapCopyright_t",ex);
}
}
function widgetMapCopyright_cleanUp(me){
try{
if(!me){
me=this;
}
me.SYSTEM.Event.detachEvent(me.img,"onclick","click");
me.img=null;
me.widget_cleanUp();
}
catch(ex){
jsExDebug("widgetMapCopyright_cleanUp",ex);
}
}
function widgetMapCopyright_showNotice(_3,_4,_5,_6){
try{
var _7="";
if(_3<=11){
_7+=this.DEFAULT_BELOW_12;
if(COPYRIGHT_TEXT_BELOW_12[_4]){
_7+=","+COPYRIGHT_TEXT_BELOW_12[_4];
}
}else{
_7+=this.DEFAULT_ABOVE_11;
if(COPYRIGHT_TEXT_ABOVE_11[_4]){
var _8=COPYRIGHT_TEXT_ABOVE_11[_4];
for(var i=0;i<_8.length;i++){
if(_5>=_8[i].left&&_5<=_8[i].right&&_6>=_8[i].bottom&&_6<=_8[i].top){
_7+=","+_8[i].source;
}
}
}
}
this.noticeLabel.setText("Copyright "+_7);
}
catch(ex){
jsExDebug("widgetMapCopyright_showNotice",ex);
}
}
function widgetMapCopyright_imgClickEvent(_a,me){
try{
var d=new me.SYSTEM.Dialogue.TextDialogue(null,"Map Copyright Information","js/xml/copyright.xml",700,200);
}
catch(ex){
jsExDebug("widgetMapCopyright_imgClickEvent",ex);
}
}

try{
drawingOverlay_t.prototype=new peepelObject_t();
drawingOverlay_t.prototype.constructor=drawingOverlay_t;
drawingOverlay_t.prototype.cleanUp=drawingOverlay_cleanUp;
drawingOverlay_t.prototype.drawingOverlay_super=peepelObject_t.prototype.constructor;
drawingOverlay_t.prototype.peepelObject_cleanUp=peepelObject_t.prototype.cleanUp;
drawingOverlay_t.prototype.setElementPosition=drawingOverlay_setElementPosition;
drawingOverlay_t.prototype.matchElementPosition=drawingOverlay_matchElementPosition;
drawingOverlay_t.prototype.setLinePosition=drawingOverlay_setLinePosition;
drawingOverlay_t.prototype.setCirclePosition=drawingOverlay_setCirclePosition;
drawingOverlay_t.prototype.setCircleRadius=drawingOverlay_setCircleRadius;
drawingOverlay_t.prototype.setLineColour=drawingOverlay_setLineColour;
drawingOverlay_t.prototype.setCircleColour=drawingOverlay_setCircleColour;
drawingOverlay_t.prototype.setTrianglePosition=drawingOverlay_setTrianglePosition;
drawingOverlay_t.prototype.setRectanglePosition=drawingOverlay_setRectanglePosition;
drawingOverlay_t.prototype.setRectangleDimensions=drawingOverlay_setRectangleDimensions;
drawingOverlay_t.prototype.setCursor=drawingOverlay_setCursor;
drawingOverlay_t.prototype.getLineColour=drawingOverlay_getLineColour;
drawingOverlay_t.prototype.hide=drawingOverlay_hide;
drawingOverlay_t.prototype.show=drawingOverlay_show;
drawingOverlay_t.prototype.getLineObjects=drawingOverlay_getLineObjects;
drawingOverlay_t.prototype.drawLine=drawingOverlay_drawLine;
drawingOverlay_t.prototype.drawCircle=drawingOverlay_drawCircle;
drawingOverlay_t.prototype.drawRectangle=drawingOverlay_drawRectangle;
drawingOverlay_t.prototype.drawRectangleImage=drawingOverlay_drawRectangleImage;
drawingOverlay_t.prototype.drawTriangle=drawingOverlay_drawTriangle;
drawingOverlay_t.prototype.rotateShape=drawingOverlay_rotateShape;
drawingOverlay_t.prototype.removeElement=drawingOverlay_removeElement;
drawingOverlay_t.prototype.setElementOpacity=drawingOverlay_setElementOpacity;
drawingOverlay_t.prototype.hideElement=drawingOverlay_hideElement;
drawingOverlay_t.prototype.showElement=drawingOverlay_showElement;
drawingOverlay_t.prototype.prepareForDetach=drawingOverlay_prepareForDetach;
drawingOverlay_t.prototype.reattachSVGElement=drawingOverlay_reattachSVGElement;
}
catch(ex){
jsExDebug("drawingOverlay_t.prototype",ex);
}
function drawingOverlay_t(_1,_2){
try{
this.drawingOverlay_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.parentDomElement=_1;
this.objectArray=[];
this.svgns="http://www.w3.org/2000/svg";
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
var _3=document.createElementNS(this.svgns,"svg");
_3.setAttribute("width","100%");
_3.setAttribute("height","100%");
this.parentDomElement.appendChild(_3);
this.iframe=_3;
this.initialisationDelegate=null;
_2.invoke(this);
break;
case SYSTEM.Drawing.VML_MODE:
this.initialisationDelegate=null;
this.iframe=null;
_2.invoke(this);
break;
default:
jsDebug("drawingOverlay_t: Your browser cannot handle vector graphics");
return;
break;
}
this.tempSVGObjects=null;
}
catch(ex){
jsExDebug("drawingOverlay_t",ex);
}
}
function drawingOverlay_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.initialisationDelegate){
me.initialisationDelegate.cleanUp();
me.initialisationDelegate=null;
}
if(me.iframe){
if(me.iframe.parentNode!=me.parentDomElement){
}else{
me.parentDomElement.removeChild(me.iframe);
}
me.iframe=null;
}
me.SYSTEM.Dom.freeDom(me.parentDomElement);
for(var i=0;i<me.objectArray.length;i++){
if(me.objectArray[i]){
me.objectArray[i]=null;
}
}
me.objectArray=null;
me.parentDomElement=null;
me.peepelObject_cleanUp();
}
catch(ex){
jsExDebug("drawingOverlay_cleanUp",ex);
}
}
function drawingOverlay_setElementPosition(){
try{
if(!arguments[0]||!arguments[0].nodeName){
return;
}
var _6=arguments[0].nodeName.toLowerCase();
if(_6.match(/line/)){
this.setLinePosition.apply(this,arguments);
}else{
if(_6.match(/(circle|oval)/)){
this.setCirclePosition.apply(this,arguments);
}
}
}
catch(ex){
jsExDebug("drawingOverlay_setElementPosition",ex);
}
}
function drawingOverlay_matchElementPosition(_7,_8){
try{
var _9=arguments[0].nodeName.toLowerCase();
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE){
if(_9.match(/line/)){
_7.setAttribute("x1",_8.getAttribute("x1"));
_7.setAttribute("x2",_8.getAttribute("x2"));
_7.setAttribute("y1",_8.getAttribute("y1"));
_7.setAttribute("y2",_8.getAttribute("y2"));
}else{
if(_9.match(/circle/)){
_7.setAttribute("cx",_8.getAttribute("cx"));
_7.setAttribute("cy",_8.getAttribute("cy"));
}else{
if(_9.match(/rect/)){
}
}
}
}else{
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
if(_9.match(/line/)){
}else{
if(_9.match(/oval/)){
var _a=parseInt(_8.style.width)/2;
var x=parseInt(_8.style.left);
var y=parseInt(_8.style.top);
if(x!=null){
_7.style.left=(x-(_a/2))+"px";
}
if(y!=null){
_7.style.top=(y-(_a/2))+"px";
}
}else{
if(_9.match(/rect/)){
}
}
}
}
}
}
catch(ex){
jsExDebug("drawingOverlay_matchElementPosition",ex);
}
}
function drawingOverlay_setLinePosition(_d,x1,y1,x2,y2){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_d.setAttribute("x1",x1);
_d.setAttribute("y1",y1);
_d.setAttribute("x2",x2);
_d.setAttribute("y2",y2);
break;
case SYSTEM.Drawing.VML_MODE:
_d.setAttribute("from",x1+","+y1);
_d.setAttribute("to",x2+","+y2);
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setLinePosition",ex);
}
}
function drawingOverlay_setCirclePosition(_12,x,y){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
if(x!=null){
_12.setAttribute("cx",x);
}
if(y!=null){
_12.setAttribute("cy",y);
}
break;
case SYSTEM.Drawing.VML_MODE:
var _15=parseInt(_12.style.width)/2;
if(x!=null){
_12.style.left=(x-_15)+"px";
}
if(y!=null){
_12.style.top=(y-_15)+"px";
}
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setCirclePosition",ex);
}
}
function drawingOverlay_setCircleRadius(_16,_17){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_16.setAttribute("r",_17);
break;
case SYSTEM.Drawing.VML_MODE:
_16.style.width=(_17*2)+"px";
_16.style.height=(_17*2)+"px";
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setCircleRadius",ex);
}
}
function drawingOverlay_setLineColour(_18,_19){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_18.setAttribute("stroke",_19);
break;
case SYSTEM.Drawing.VML_MODE:
_18.setAttribute("strokecolor",_19);
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setLineColour",ex);
}
}
function drawingOverlay_setCircleColour(_1a,_1b){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_1a.setAttribute("fill",_1b);
break;
case SYSTEM.Drawing.VML_MODE:
var _1c=_1a.getElementsByTagName("fill")[0];
if(_1c.getAttribute("opacity")=="0"){
_1c.setAttribute("opacity","1");
}
_1c.setAttribute("color",_1b);
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setCircleColour",ex);
}
}
function drawingOverlay_setTrianglePosition(_1d,x,y,_20,_21){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_1d.setAttribute("d","M "+x+" "+y+" L "+(x+_20)+" "+y+" L "+(x+(_20/2))+" "+(y-_21)+" L "+x+" "+y);
break;
case SYSTEM.Drawing.VML_MODE:
_1d.setAttribute("path","m "+0+" "+_21+" l "+_20+","+_21+", "+(_20/2)+","+0+", "+0+","+_21+" x e");
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setTrianglePosition",ex);
}
}
function drawingOverlay_setRectanglePosition(_22,x,y){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_22.setAttribute("x",x);
_22.setAttribute("y",y);
break;
case SYSTEM.Drawing.VML_MODE:
_22.style.left=x+"px";
_22.style.top=y+"px";
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setRectanglePosition",ex);
}
}
function drawingOverlay_setRectangleDimensions(_25,_26,_27){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_25.setAttribute("width",_26);
_25.setAttribute("height",_27);
break;
case SYSTEM.Drawing.VML_MODE:
_25.style.width=_26+"px";
_25.style.height=_27+"px";
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setRectangleDimensions",ex);
}
}
function drawingOverlay_setCursor(_28){
try{
if(this.iframe){
}
}
catch(ex){
jsExDebug("drawingOverlay_setCursor",ex);
}
}
function drawingOverlay_getLineColour(_29,_2a){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
return _29.getAttribute("stroke");
case SYSTEM.Drawing.VML_MODE:
return _29.getAttribute("strokecolor");
}
}
catch(ex){
jsExDebug("drawingOverlay_getLineColour",ex);
}
}
function drawingOverlay_hide(){
try{
if(this.iframe){
this.iframe.style.visibility="hidden";
}else{
var _2b=null;
var _2c=this.objectArray;
for(var i=0;i<_2c.length;i++){
_2b=_2c[i];
if(_2b){
_2b.style.visibility="hidden";
}
}
}
}
catch(ex){
jsExDebug("drawingOverlay_hide",ex);
}
}
function drawingOverlay_show(){
try{
if(this.iframe){
this.iframe.style.visibility="visible";
}else{
var _2e=null;
var _2f=this.objectArray;
for(var i=0;i<_2f.length;i++){
_2e=_2f[i];
if(_2e){
_2e.style.visibility="visible";
}
}
}
}
catch(ex){
jsExDebug("drawingOverlay_show",ex);
}
}
function drawingOverlay_getLineObjects(){
try{
var _31=null;
var _32=this.objectArray;
var _33=[];
for(var i=0;i<_32.length;i++){
_31=_32[i];
if(_31){
if(_31.nodeName.toLowerCase()=="line"){
_33.push(_31);
}
}
}
return _33;
}
catch(ex){
jsExDebug("drawingOverlay_getLineObjects",ex);
}
}
function drawingOverlay_drawLine(x1,y1,x2,y2,_39,_3a){
try{
if(this.iframe){
var _3b=document.createElementNS(this.svgns,"line");
_3b.setAttribute("x1",x1);
_3b.setAttribute("y1",y1);
_3b.setAttribute("x2",x2);
_3b.setAttribute("y2",y2);
_3b.setAttribute("stroke",(_39?_39:"#000000"));
_3b.setAttribute("stroke-width",(_3a?_3a:1));
this.iframe.appendChild(_3b);
}else{
var _3b=document.createElement("v:line");
_3b.setAttribute("from",x1+","+y1);
_3b.setAttribute("to",x2+","+y2);
_3b.setAttribute("strokeweight",(_3a?_3a+"pt":"1pt"));
_3b.setAttribute("strokecolor",(_39?_39:"black"));
this.parentDomElement.appendChild(_3b);
}
this.objectArray.push(_3b);
return _3b;
}
catch(ex){
jsExDebug("drawingOverlay_drawLine",ex);
}
}
function drawingOverlay_drawCircle(x,y,_3e,_3f,_40,_41){
try{
if(!_40){
_40=_3f;
}
if(this.iframe){
var _42=document.createElementNS(this.svgns,"circle");
_42.setAttribute("stroke",(_40?_40:"#000000"));
_42.setAttribute("stroke-width",(_41?_41:"1"));
_42.setAttribute("cx",x);
_42.setAttribute("cy",y);
_42.setAttribute("r",_3e);
if(_3f){
_42.setAttribute("fill",_3f);
}else{
_42.setAttribute("fill","none");
}
_42.style.zIndex=500;
this.iframe.appendChild(_42);
}else{
var _42=document.createElement("v:oval");
_42.style.width=(_3e*2)+"px";
_42.style.height=(_3e*2)+"px";
_42.style.position="absolute";
_42.style.left=(x-_3e)+"px";
_42.style.top=(y-_3e)+"px";
_42.setAttribute("strokeweight",(_41?_41+"pt":"1pt"));
_42.setAttribute("strokecolor",(_40?_40:"black"));
var _43=document.createElement("v:fill");
if(_3f){
_43.setAttribute("color",_3f);
}else{
_43.setAttribute("opacity","0");
}
_42.appendChild(_43);
this.parentDomElement.appendChild(_42);
}
this.objectArray.push(_42);
return _42;
}
catch(ex){
jsExDebug("drawingOverlay_drawCircle",ex);
}
}
function drawingOverlay_drawRectangle(x,y,_46,_47,_48,_49,_4a){
try{
if(this.iframe){
var _4b=document.createElementNS(this.svgns,"rect");
_4b.setAttribute("x",x);
_4b.setAttribute("y",y);
_4b.setAttribute("width",_46);
_4b.setAttribute("height",_47);
_4b.setAttribute("stroke",(_49?_49:"#000000"));
_4b.setAttribute("stroke-width",(_4a?_4a:"1"));
_4b.setAttribute("fill",(_48?_48:"#FFFFFF"));
this.iframe.appendChild(_4b);
return _4b;
}else{
if(!_49){
_49=_48;
}
var vml=document.createElement("v:group");
vml.setAttribute("id","gr");
vml.style.position="absolute";
vml.style.left=x+"px";
vml.style.top=y+"px";
vml.style.width=_46+"px";
vml.style.height=_47+"px";
vml.setAttribute("coordsize",_46+","+_47);
var _4d=document.createElement("v:rect");
_4d.style.width=_46+"px";
_4d.style.height=_47+"px";
_4d.setAttribute("fillcolor",(_48?_48:"#FFFFFF"));
_4d.setAttribute("strokecolor",(_49?_49:"#000000"));
_4d.setAttribute("strokeweight",(_4a?_4a:"1"));
vml.appendChild(_4d);
this.parentDomElement.appendChild(vml);
this.objectArray.push(vml);
return vml;
}
}
catch(ex){
jsExDebug("drawingOverlay_drawRectangle",ex);
}
}
function drawingOverlay_drawRectangleImage(src,x,y,_51,_52,_53){
try{
return;
if(this.iframe){
var _54="http://www.w3.org/1999/xlink";
var _55=document.createElementNS(this.svgns,"image");
_55.setAttribute("id","image_"+src);
_55.setAttribute("x",x);
_55.setAttribute("y",y);
_55.setAttribute("width",_51+"px");
_55.setAttribute("height",_52+"px");
_55.setAttributeNS(_54,"href",src);
this.iframe.appendChild(_55);
}else{
var _55=document.createElement("v:image");
_55.setAttribute("src",src);
_55.style.position="absolute";
_55.style.width=_51+"px";
_55.style.height=_52+"px";
_55.style.left=x+"px";
_55.style.top=y+"px";
this.parentDomElement.appendChild(_55);
}
return _55;
}
catch(ex){
jsExDebug("drawingOverlay_drawRectangleImage",ex);
}
}
function drawingOverlay_drawTriangle(x,y,_58,_59,_5a,_5b,_5c){
try{
if(this.iframe){
var _5d=document.createElementNS(this.svgns,"path");
_5d.setAttribute("d","M "+x+" "+y+" L "+(x+_58)+" "+y+" L "+(x+(_58/2))+" "+(y-_59)+" L "+x+" "+y);
_5d.setAttribute("stroke",(_5b?_5b:"#000000"));
_5d.setAttribute("stroke-width",(_5c?_5c:"1"));
_5d.setAttribute("fill",(_5a?_5a:"#FFFFFF"));
this.iframe.appendChild(_5d);
return _5d;
}else{
var _5e=document.createElement("v:shape");
_5e.setAttribute("coordorigin",x+" "+(y-_59));
_5e.setAttribute("coordsize",_58+" "+_59);
_5e.setAttribute("fillcolor",(_5a?_5a:"#FFFFFF"));
_5e.setAttribute("strokecolor",(_5b?_5b:"#000000"));
_5e.setAttribute("strokeweight",(_5c?_5c:"1"));
_5e.setAttribute("path","m "+0+" "+_59+" l "+_58+","+_59+", "+(_58/2)+","+0+", "+0+","+_59+" x e");
this.parentDomElement.appendChild(_5e);
return _5e;
}
}
catch(ex){
jsExDebug("drawingOverlay_drawTriangle",ex);
}
}
function drawingOverlay_rotateShape(_5f,_60){
try{
if(this.iframe){
switch(_5f.nodeName.toLowerCase()){
case "image":
case "rect":
var x=parseInt(_5f.getAttribute("x"))+(parseInt(_5f.getAttribute("width"))/2);
var y=parseInt(_5f.getAttribute("y"))+(parseInt(_5f.getAttribute("height"))/2);
_5f.setAttribute("transform","rotate("+_60+","+x+" "+y+")");
break;
case "line":
var x1=parseInt(_5f.getAttribute("x1"));
var x2=parseInt(_5f.getAttribute("x2"));
var y1=parseInt(_5f.getAttribute("y1"));
var y2=parseInt(_5f.getAttribute("y2"));
var x=null;
var y=null;
if(x2<x1){
x=x1+((x2-x1)/2);
}else{
x=x2+((x1-x2)/2);
}
if(y2>y1){
y=y1+((y2-y1)/2);
}else{
y=y2+((y1-y2)/2);
}
_5f.setAttribute("transform","rotate("+_60+","+x+" "+y+")");
break;
case "circle":
_5f.setAttribute("transform","rotate("+_60+","+_5f.getAttribute("x")+" "+_5f.getAttribute("y")+")");
break;
}
}else{
_5f.style.rotation=_60+"deg";
}
}
catch(ex){
jsExDebug("drawingOverlay_rotateShape",ex);
}
}
function drawingOverlay_removeElement(_67){
try{
var obj=null;
var _69=_67.nodeName.toLowerCase();
for(var i=0;i<this.objectArray.length;i++){
obj=this.objectArray[i];
if(obj&&(obj.nodeName.toLowerCase()==_69)&&obj==_67){
this.objectArray[i]=null;
}
}
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
if(_67.parentNode==this.iframe){
this.iframe.removeChild(_67);
}
break;
case SYSTEM.Drawing.VML_MODE:
if(_67.parentNode==this.parentDomElement){
this.parentDomElement.removeChild(_67);
}
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_removeElement",ex);
}
}
function drawingOverlay_setElementOpacity(_6b,_6c){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_6b.setAttributeNS(null,"fill-opacity",_6c);
break;
case SYSTEM.Drawing.VML_MODE:
var _6d=_6b.getElementsByTagName("fill");
if(_6d.length){
_6d[0].setAttribute("opacity",_6c);
}else{
_6b.style.filter="alpha(opacity="+(_6c*100)+")";
}
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_setElementOpacity",ex);
}
}
function drawingOverlay_hideElement(_6e){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_6e.style.display="none";
break;
case SYSTEM.Drawing.VML_MODE:
_6e.style.display="none";
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_hideElement",ex);
}
}
function drawingOverlay_showElement(_6f){
try{
switch(this.SYSTEM.Drawing.drawMode){
case this.SYSTEM.Drawing.SVG_MODE:
_6f.style.display="block";
break;
case SYSTEM.Drawing.VML_MODE:
_6f.style.display="block";
break;
}
}
catch(ex){
jsExDebug("drawingOverlay_showElement",ex);
}
}
function drawingOverlay_prepareForDetach(){
try{
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE){
}
}
catch(ex){
jsExDebug("drawingOverlay_prepareForDetach",ex);
}
}
function drawingOverlay_reattachSVGElement(_70){
try{
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE){
}
}
catch(ex){
jsExDebug("drawingOverlay_reattachSVGElement",ex);
}
}

try{
mapOverlay_t.prototype=new drawingOverlay_t();
mapOverlay_t.prototype.constructor=mapOverlay_t;
mapOverlay_t.prototype.cleanUp=mapOverlay_cleanUp;
mapOverlay_t.prototype.mapOverlay_super=drawingOverlay_t.prototype.constructor;
mapOverlay_t.prototype.drawingOverlay_cleanUp=drawingOverlay_t.prototype.cleanUp;
mapOverlay_t.prototype.svgInitialised=mapOverlay_svgInitialised;
mapOverlay_t.prototype.setDragStartHandler=mapOverlay_setDragStartHandler;
mapOverlay_t.prototype.setDragHandler=mapOverlay_setDragHandler;
mapOverlay_t.prototype.setDragEndHandler=mapOverlay_setDragEndHandler;
mapOverlay_t.prototype.setClickHandler=mapOverlay_setClickHandler;
mapOverlay_t.prototype.setDoubleClickHandler=mapOverlay_setDoubleClickHandler;
mapOverlay_t.prototype.setKeyEventHandlers=mapOverlay_setKeyEventHandlers;
mapOverlay_t.prototype.dragStartEventSVG=mapOverlay_dragStartEventSVG;
mapOverlay_t.prototype.dragEventSVG=mapOverlay_dragEventSVG;
mapOverlay_t.prototype.dragEndEventSVG=mapOverlay_dragEndEventSVG;
mapOverlay_t.prototype.clickEventSVG=mapOverlay_clickEventSVG;
mapOverlay_t.prototype.doubleClickEventSVG=mapOverlay_doubleClickEventSVG;
mapOverlay_t.prototype.keyDownEventSVG=mapOverlay_keyDownEventSVG;
mapOverlay_t.prototype.mouseScrollEventSVG=mapOverlay_mouseScrollEventSVG;
mapOverlay_t.prototype.test=mapOverlay_test;
mapOverlay_t.prototype.DRAG_START=0;
mapOverlay_t.prototype.DRAG=1;
mapOverlay_t.prototype.NO_DRAG=2;
}
catch(ex){
jsExDebug("mapOverlay_t.prototype",ex);
}
function mapOverlay_t(_1,_2){
try{
this.mapOverlay_super(_1,_2);
this.dragState=this.NO_DRAG;
this.svgInitialised();
}
catch(ex){
jsExDebug("mapOverlay_t",ex);
}
}
function mapOverlay_cleanUp(me){
try{
if(!me){
me=this;
}
if(me.iframe){
me.SYSTEM.Event.detachW3CEvent(me.parentDomElement,"mousedown");
me.SYSTEM.Event.detachW3CEvent(me.parentDomElement,"mousemove");
me.SYSTEM.Event.detachW3CEvent(me.parentDomElement,"mouseup");
me.SYSTEM.Event.detachW3CEvent(me.parentDomElement,"dblclick");
me.SYSTEM.Event.detachW3CEvent(me.parentDomElement,"click");
me.SYSTEM.Event.detachW3CEvent(me.parentDomElement,"keydown");
me.SYSTEM.Event.detachW3CEvent(me.parentDomElement,"DOMMouseScroll");
}
if(me.dragStartDelegate){
me.dragStartDelegate.cleanUp();
me.dragStartDelegate=null;
}
if(me.dragDelegate){
me.dragDelegate.cleanUp();
me.dragDelegate=null;
}
if(me.dragEndDelegate){
me.dragEndDelegate.cleanUp();
me.dragEndDelegate=null;
}
if(me.clickDelegate){
me.clickDelegate.cleanUp();
me.clickDelegate=null;
}
if(me.doubleClickDelegate){
me.doubleClickDelegate.cleanUp();
me.doubleClickDelegate=null;
}
me.dragState=null;
me.drawingOverlay_cleanUp();
}
catch(ex){
jsExDebug("mapOverlay_cleanUp",ex);
}
}
function mapOverlay_svgInitialised(){
try{
this.SYSTEM.Event.attachW3CEvent(this.parentDomElement,"mousedown",this.dragStartEventSVG,this);
this.SYSTEM.Event.attachW3CEvent(this.parentDomElement,"mousemove",this.dragEventSVG,this);
this.SYSTEM.Event.attachW3CEvent(this.parentDomElement,"mouseup",this.dragEndEventSVG,this);
this.SYSTEM.Event.attachW3CEvent(this.parentDomElement,"dblclick",this.doubleClickEventSVG,this);
this.SYSTEM.Event.attachW3CEvent(this.parentDomElement,"click",this.clickEventSVG,this);
this.SYSTEM.Event.attachW3CEvent(this.parentDomElement,"keydown",this.keyDownEventSVG,this);
this.SYSTEM.Event.attachW3CEvent(this.parentDomElement,"DOMMouseScroll",this.mouseScrollEventSVG,this);
}
catch(ex){
jsExDebug("mapOverlay_svgInitialised",ex);
}
}
function mapOverlay_setDragStartHandler(_4,_5){
try{
this.dragStartDelegate=_4;
}
catch(ex){
jsExDebug("mapOverlay_setDragStartHandler",ex);
}
}
function mapOverlay_setDragHandler(_6,_7){
try{
this.dragDelegate=_6;
}
catch(ex){
jsExDebug("mapOverlay_setDragStartHandler",ex);
}
}
function mapOverlay_setDragEndHandler(_8,_9){
try{
this.dragEndDelegate=_8;
}
catch(ex){
jsExDebug("mapOverlay_setDragStartHandler",ex);
}
}
function mapOverlay_setClickHandler(_a){
try{
this.clickDelegate=_a;
}
catch(ex){
jsExDebug("mapOverlay_setDragStartHandler",ex);
}
}
function mapOverlay_setDoubleClickHandler(_b){
try{
this.doubleClickDelegate=_b;
}
catch(ex){
jsExDebug("mapOverlay_setDoubleClickHandler",ex);
}
}
function mapOverlay_setKeyEventHandlers(){
try{
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE){
var _c=this.iframe.contentWindow;
this.SYSTEM.Event.attachW3CEvent(_c,"keypress",this.SYSTEM.Event.keyPressHandler,this.SYSTEM.Event);
this.SYSTEM.Event.attachW3CEvent(_c,"keydown",this.SYSTEM.Event.keyDownHandler,this.SYSTEM.Event);
this.SYSTEM.Event.attachW3CEvent(_c,"keyup",this.SYSTEM.Event.keyUpHandler,this.SYSTEM.Event);
}
}
catch(ex){
jsExDebug("mapOverlay_setKeyEventHandlersf",ex);
}
}
function mapOverlay_dragStartEventSVG(_d,me){
try{
me.SYSTEM.Event.dragStartX=_d.pageX+document.documentElement.scrollLeft;
me.SYSTEM.Event.dragStartY=_d.pageY+document.documentElement.scrollTop;
me.SYSTEM.Event.dragDistanceX=0;
me.SYSTEM.Event.dragDistanceY=0;
me.dragState=me.DRAG_START;
_d.fromSVG=true;
if(me.dragStartDelegate){
me.dragStartDelegate.invoke(_d);
}
}
catch(ex){
jsExDebug("mapOverlay_dragStartEventSVG",ex);
}
}
function mapOverlay_dragEventSVG(_f,me){
try{
if(me.dragState==me.DRAG_START||me.dragState==me.DRAG){
me.SYSTEM.Event.mouseX=_f.pageX+document.documentElement.scrollLeft;
me.SYSTEM.Event.mouseY=_f.pageY+document.documentElement.scrollTop;
me.SYSTEM.Event.dragDistanceX=me.SYSTEM.Event.mouseX-me.SYSTEM.Event.dragStartX;
me.SYSTEM.Event.dragDistanceY=me.SYSTEM.Event.mouseY-me.SYSTEM.Event.dragStartY;
me.dragState=me.DRAG;
_f.fromSVG=true;
if(me.dragDelegate){
me.dragDelegate.invoke(_f);
}
}
}
catch(ex){
jsExDebug("mapOverlay_dragEvent",ex);
}
}
function mapOverlay_dragEndEventSVG(_11,me){
try{
if(me.dragState==me.DRAG||me.dragState==me.DRAG_START){
_11.fromSVG=true;
if(me.dragEndDelegate){
me.dragEndDelegate.invoke(_11);
}
me.SYSTEM.Event.mouseX=null;
me.SYSTEM.Event.mouseY=null;
me.SYSTEM.Event.dragDistanceX=0;
me.SYSTEM.Event.dragDistanceY=0;
}
me.dragState=me.NO_DRAG;
}
catch(ex){
jsExDebug("mapOverlay_dragEndEvent",ex);
}
}
function mapOverlay_clickEventSVG(_13,me){
try{
if(me.clickDelegate){
_13.fromSVG=true;
me.clickDelegate.invoke(_13);
}
}
catch(ex){
jsExDebug("mapOverlay_clickEvent",ex);
}
}
function mapOverlay_doubleClickEventSVG(_15,me){
try{
if(me.doubleClickDelegate){
_15.fromSVG=true;
me.doubleClickDelegate.invoke(_15);
}
}
catch(ex){
jsExDebug("mapOverlay_doubleClickEvent",ex);
}
}
function mapOverlay_keyDownEventSVG(_17,me){
try{
me.SYSTEM.Event.keyDownHandler(_17,me.SYSTEM.Event);
}
catch(ex){
jsExDebug("mapOverlay_keyDownEventSVG",ex);
}
}
function mapOverlay_mouseScrollEventSVG(_19,me){
try{
_19.fromSVG=true;
me.SYSTEM.Event.mouseScrollHandler(_19,me.SYSTEM.Event);
}
catch(ex){
jsExDebug("mapOverlay_mouseScrollEventSVG",ex);
}
}
function mapOverlay_test(){
try{
return;
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE){
var _1b="M100,10 L100,10 40,180 190,60 10,60 160,180 z";
this.iframe.contentWindow.pathTest(_1b);
}else{
var _1b="m 1,1 l 1,200, 200,200, 200,1 13,15 40,69 100,79 xe";
var _1c=document.createElement("v:shape");
_1c.setAttribute("id","path_shape");
_1c.setAttribute("fillcolor","red");
_1c.setAttribute("coordorigin","0 0");
_1c.setAttribute("strokeweight","2pt");
_1c.setAttribute("strokecolor","black");
_1c.setAttribute("path",_1b);
_1c.style.width="700px";
_1c.style.height="700px";
_1c.style.border="solid 1px green";
document.body.appendChild(_1c);
}
}
catch(ex){
jsExDebug("mapOverlay_dragEndEventVML",ex);
}
}

try{
mapApp_t.prototype=new application_t();
mapApp_t.prototype.constructor=mapApp_t;
mapApp_t.prototype.mapApp_super=application_t.prototype.constructor;
mapApp_t.prototype.cleanUp=mapApp_cleanUp;
mapApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
mapApp_t.prototype.capture=mapApp_capture;
mapApp_t.prototype.restore=mapApp_restore;
mapApp_t.prototype._SIG_KILL=mapApp__SIG_KILL;
mapApp_t.prototype._SIG_THEME=mapApp__SIG_THEME;
mapApp_t.prototype.mapFrame__onClose=mapApp_mapFrame__onClose;
mapApp_t.prototype.mapFrame__onResize=mapApp_mapFrame__onResize;
mapApp_t.prototype.mapFrame__onResizeEnd=mapApp_mapFrame__onResizeEnd;
mapApp_t.prototype.mapFrame__onFocus=mapApp_mapFrame__onFocus;
mapApp_t.prototype.mapFrame__onBlur=mapApp_mapFrame__onBlur;
mapApp_t.prototype.mapFrame_keyPress=mapApp_mapFrame_keyPress;
mapApp_t.prototype.mapFrame_keyDown=mapApp_mapFrame_keyDown;
mapApp_t.prototype.mapFrame__onMove=mapApp_mapFrame__onMove;
mapApp_t.prototype.mapFrame__onMoveEnd=mapApp_mapFrame__onMoveEnd;
mapApp_t.prototype.scrollUp=mapApp_scrollUp;
mapApp_t.prototype.scrollDown=mapApp_scrollDown;
mapApp_t.prototype.binding_groupBtn_click=mapApp_binding_groupBtn_click;
mapApp_t.prototype.dragDivClickEvent=mapApp_dragDivClickEvent;
mapApp_t.prototype.binding_sideBarToggleBtn_click=mapApp_binding_sideBarToggleBtn_click;
mapApp_t.prototype.mapInfoFrame__onClose=mapApp_mapInfoFrame__onClose;
mapApp_t.prototype.errorFrame__onClose=mapApp_errorFrame__onClose;
mapApp_t.prototype.savePeepelPointFrame__onClose=mapApp_savePeepelPointFrame__onClose;
mapApp_t.prototype.jumpToCoordsFrame__onClose=mapApp_jumpToCoordsFrame__onClose;
mapApp_t.prototype.searchResultsFrame__onClose=mapApp_searchResultsFrame__onClose;
mapApp_t.prototype.searchResultsFrame__onResize=mapApp_searchResultsFrame__onResize;
mapApp_t.prototype.searchResultsFrame__onResizeEnd=mapApp_searchResultsFrame__onResizeEnd;
mapApp_t.prototype.mapInfoFrame__onBlur=mapApp_appendDragDiv;
mapApp_t.prototype.jumpToCoordsFrame__onBlur=mapApp_appendDragDiv;
mapApp_t.prototype.savePeepelPointFrame__onBlur=mapApp_appendDragDiv;
mapApp_t.prototype.createTimelineFrame__onBlur=mapApp_appendDragDiv;
mapApp_t.prototype.addTimelineContactsFrame__onBlur=mapApp_appendDragDiv;
mapApp_t.prototype.removeTimelineContactsFrame__onBlur=mapApp_appendDragDiv;
mapApp_t.prototype.changeTimelineDatesFrame__onBlur=mapApp_appendDragDiv;
mapApp_t.prototype.mapInfoFrame__onMove=mapApp_appendDragDiv;
mapApp_t.prototype.mapInfoFrame__onMoveEnd=mapApp_removeDragDiv;
mapApp_t.prototype.mapInfoFrame__onResize=mapApp_appendDragDiv;
mapApp_t.prototype.mapInfoFrame__onResizeEnd=mapApp_removeDragDiv;
mapApp_t.prototype.jumpToCoordsFrame__onMove=mapApp_appendDragDiv;
mapApp_t.prototype.jumpToCoordsFrame__onMoveEnd=mapApp_removeDragDiv;
mapApp_t.prototype.jumpToCoordsFrame__onResize=mapApp_appendDragDiv;
mapApp_t.prototype.jumpToCoordsFrame__onResizeEnd=mapApp_removeDragDiv;
mapApp_t.prototype.savePeepelPointFrame__onMove=mapApp_appendDragDiv;
mapApp_t.prototype.savePeepelPointFrame__onMoveEnd=mapApp_removeDragDiv;
mapApp_t.prototype.savePeepelPointFrame__onResize=mapApp_appendDragDiv;
mapApp_t.prototype.savePeepelPointFrame__onResizeEnd=mapApp_removeDragDiv;
mapApp_t.prototype.createTimelineFrame__onMove=mapApp_appendDragDiv;
mapApp_t.prototype.createTimelineFrame__onMoveEnd=mapApp_removeDragDiv;
mapApp_t.prototype.createTimelineFrame__onResize=mapApp_appendDragDiv;
mapApp_t.prototype.createTimelineFrame__onResizeEnd=mapApp_removeDragDiv;
mapApp_t.prototype.addTimelineContactsFrame__onMove=mapApp_appendDragDiv;
mapApp_t.prototype.addTimelineContactsFrame__onMoveEnd=mapApp_removeDragDiv;
mapApp_t.prototype.addTimelineContactsFrame__onResize=mapApp_appendDragDiv;
mapApp_t.prototype.addTimelineContactsFrame__onResizeEnd=mapApp_removeDragDiv;
mapApp_t.prototype.removeTimelineContactsFrame__onMove=mapApp_appendDragDiv;
mapApp_t.prototype.removeTimelineContactsFrame__onMoveEnd=mapApp_removeDragDiv;
mapApp_t.prototype.removeTimelineContactsFrame__onResize=mapApp_appendDragDiv;
mapApp_t.prototype.removeTimelineContactsFrame__onResizeEnd=mapApp_removeDragDiv;
mapApp_t.prototype.changeTimelineDatesFrame__onMove=mapApp_appendDragDiv;
mapApp_t.prototype.changeTimelineDatesFrame__onMoveEnd=mapApp_removeDragDiv;
mapApp_t.prototype.changeTimelineDatesFrame__onResize=mapApp_appendDragDiv;
mapApp_t.prototype.changeTimelineDatesFrame__onResizeEnd=mapApp_removeDragDiv;
mapApp_t.prototype.peepelPointLocationFrame__onClose=mapApp_peepelPointLocationFrame__onClose;
mapApp_t.prototype.coordTextFrame__onClose=mapApp_coordTextFrame__onClose;
mapApp_t.prototype.binding_printBtn_click=mapApp_binding_printBtn_click;
mapApp_t.prototype.binding_infoBtn_click=mapApp_binding_infoBtn_click;
mapApp_t.prototype.binding_refreshBtn_click=mapApp_binding_refreshBtn_click;
mapApp_t.prototype.binding_detachBtn_click=mapApp_binding_detachBtn_click;
mapApp_t.prototype.binding_quickHelpBtn_click=mapApp_binding_quickHelpBtn_click;
mapApp_t.prototype.mapZoomInEvent=mapApp_mapZoomInEvent;
mapApp_t.prototype.mapZoomOutEvent=mapApp_mapZoomOutEvent;
mapApp_t.prototype.mapZoomToLevelEvent=mapApp_mapZoomToLevelEvent;
mapApp_t.prototype.mapSingleClickEvent=mapApp_mapSingleClickEvent;
mapApp_t.prototype.mapCoordinateJumpEvent=mapApp_mapCoordinateJumpEvent;
mapApp_t.prototype.mapFilterSidebarEvent=mapApp_mapFilterSidebarEvent;
mapApp_t.prototype.mapObjectRemoveEvent=mapApp_mapObjectRemoveEvent;
mapApp_t.prototype.mapFollowContactEvent=mapApp_mapFollowContactEvent;
mapApp_t.prototype.mapStopFollowContactEvent=mapApp_mapStopFollowContactEvent;
mapApp_t.prototype.binding_mapInfoClearBtn_click=mapApp_binding_mapInfoClearBtn_click;
mapApp_t.prototype.binding_mapInfoExportBtn_click=mapApp_binding_mapInfoExportBtn_click;
mapApp_t.prototype.binding_mapInfoQuickLaunchText_focus=mapApp_binding_mapInfoQuickLaunchText_focus;
mapApp_t.prototype.binding_errorSendLink_click=mapApp_binding_errorSendLink_click;
mapApp_t.prototype.binding_jumpJumpLink_click=mapApp_binding_jumpJumpLink_click;
mapApp_t.prototype.savePeepelPointKeyPressEvent=mapApp_savePeepelPointKeyPressEvent;
mapApp_t.prototype.binding_savePeepelPointSaveBtn_click=mapApp_binding_savePeepelPointSaveBtn_click;
mapApp_t.prototype.binding_searchResultsMapBtn_click=mapApp_binding_searchResultsMapBtn_click;
mapApp_t.prototype.binding_searchResultsUpBtn_click=mapApp_binding_searchResultsUpBtn_click;
mapApp_t.prototype.binding_searchResultsDownBtn_click=mapApp_binding_searchResultsDownBtn_click;
mapApp_t.prototype.binding_contactsOnMapBtn_click=mapApp_binding_contactsOnMapBtn_click;
mapApp_t.prototype.binding_sharedPointsOnMapBtn_click=mapApp_binding_sharedPointsOnMapBtn_click;
mapApp_t.prototype.binding_peepelPointLocationCentreBtn_click=mapApp_binding_peepelPointLocationCentreBtn_click;
mapApp_t.prototype.binding_peepelPointLocationOkBtn_click=mapApp_binding_peepelPointLocationOkBtn_click;
mapApp_t.prototype.binding_coordTextFrameGoBtn_click=mapApp_binding_coordTextFrameGoBtn_click;
mapApp_t.prototype.sidebarMapToggleEvent=mapApp_sidebarMapToggleEvent;
mapApp_t.prototype.sidebarFollowToggleEvent=mapApp_sidebarFollowToggleEvent;
mapApp_t.prototype.sidebarPointZoomCentreEvent=mapApp_sidebarPointZoomCentreEvent;
mapApp_t.prototype.sidebarPointCentreEvent=mapApp_sidebarPointCentreEvent;
mapApp_t.prototype.sidebarPointNoChangeEvent=mapApp_sidebarPointNoChangeEvent;
mapApp_t.prototype.sidebarPointRemoveEvent=mapApp_sidebarPointRemoveEvent;
mapApp_t.prototype.sidebarAvatarClickEvent=mapApp_sidebarAvatarClickEvent;
mapApp_t.prototype.binding_zoomSlider_valueChange=mapApp_binding_zoomSlider_valueChange;
mapApp_t.prototype.binding_zoomOutBtn_click=mapApp_binding_zoomOutBtn_click;
mapApp_t.prototype.binding_zoomInBtn_click=mapApp_binding_zoomInBtn_click;
mapApp_t.prototype.binding_zoomLabel_click=mapApp_binding_zoomLabel_click;
mapApp_t.prototype.binding_saveAsPeepelPointBtn_click=mapApp_binding_saveAsPeepelPointBtn_click;
mapApp_t.prototype.binding_zoomPresetBtn_click=mapApp_binding_zoomPresetBtn_click;
mapApp_t.prototype.binding_panPresetBtn_click=mapApp_binding_panPresetBtn_click;
mapApp_t.prototype.binding_rulerPresetBtn_click=mapApp_binding_rulerPresetBtn_click;
mapApp_t.prototype.binding_crosshairPresetBtn_click=mapApp_binding_crosshairPresetBtn_click;
mapApp_t.prototype.binding_jumpToDropList_click=mapApp_binding_jumpToDropList_click;
mapApp_t.prototype.binding_jumpToDropList_itemSelect=mapApp_binding_jumpToDropList_itemSelect;
mapApp_t.prototype.binding_jumpToPeepelPointDropList_click=mapApp_binding_jumpToPeepelPointDropList_click;
mapApp_t.prototype.binding_jumpToPeepelPointDropList_itemSelect=mapApp_binding_jumpToPeepelPointDropList_itemSelect;
mapApp_t.prototype.binding_jumpToPeepelPointDropList_listExpand=mapApp_binding_jumpToPeepelPointDropList_listExpand;
mapApp_t.prototype.binding_jumpToContactDropList_click=mapApp_binding_jumpToContactDropList_click;
mapApp_t.prototype.binding_jumpToContactDropList_itemSelect=mapApp_binding_jumpToContactDropList_itemSelect;
mapApp_t.prototype.binding_jumpToContactDropList_listExpand=mapApp_binding_jumpToContactDropList_listExpand;
mapApp_t.prototype.binding_searchBtn_click=mapApp_binding_searchBtn_click;
mapApp_t.prototype.binding_publicPointSearchBtn_click=mapApp_binding_publicPointSearchBtn_click;
mapApp_t.prototype.binding_leftMinimapModeBtn_click=mapApp_binding_leftMinimapModeBtn_click;
mapApp_t.prototype.binding_rightMinimapModeBtn_click=mapApp_binding_rightMinimapModeBtn_click;
mapApp_t.prototype.binding_leftMinimapStyleCheckbox_valueChange=mapApp_binding_leftMinimapStyleCheckbox_valueChange;
mapApp_t.prototype.binding_leftMinimapZoomDropText_itemSelect=mapApp_binding_leftMinimapZoomDropText_itemSelect;
mapApp_t.prototype.binding_rightMinimapStyleCheckbox_valueChange=mapApp_binding_rightMinimapStyleCheckbox_valueChange;
mapApp_t.prototype.binding_rightMinimapZoomDropText_itemSelect=mapApp_binding_rightMinimapZoomDropText_itemSelect;
mapApp_t.prototype.binding_setLocationClickBtn_click=mapApp_binding_setLocationClickBtn_click;
mapApp_t.prototype.binding_setLocationBtn_click=mapApp_binding_setLocationBtn_click;
mapApp_t.prototype.binding_sendLocationBtn_click=mapApp_binding_sendLocationBtn_click;
mapApp_t.prototype.binding_showHideLinksBtn_click=mapApp_binding_showHideLinksBtn_click;
mapApp_t.prototype.binding_testSelect_itemSelect=mapApp_binding_testSelect_itemSelect;
mapApp_t.prototype.binding_jumpTileFrameGoBtn_click=mapApp_binding_jumpTileFrameGoBtn_click;
mapApp_t.prototype.createPanel=mapApp_createPanel;
mapApp_t.prototype.createFrame=mapApp_createFrame;
mapApp_t.prototype.setMapDimensions=mapApp_setMapDimensions;
mapApp_t.prototype.showRightMinimap=mapApp_showRightMinimap;
mapApp_t.prototype.hideRightMinimap=mapApp_hideRightMinimap;
mapApp_t.prototype.showLeftMinimap=mapApp_showLeftMinimap;
mapApp_t.prototype.hideLeftMinimap=mapApp_hideLeftMinimap;
mapApp_t.prototype.setRightMinimapMode=mapApp_setRightMinimapMode;
mapApp_t.prototype.setLeftMinimapMode=mapApp_setLeftMinimapMode;
mapApp_t.prototype.detachMap=mapApp_detachMap;
mapApp_t.prototype.printMap=mapApp_printMap;
mapApp_t.prototype.launchMapInfoFrame=mapApp_launchMapInfoFrame;
mapApp_t.prototype.setInfoFrameCurrentCoords=mapApp_setInfoFrameCurrentCoords;
mapApp_t.prototype.launchMapErrorFrame=mapApp_launchMapErrorFrame;
mapApp_t.prototype.launchJumpToCoordinatesFrame=mapApp_launchJumpToCoordinatesFrame;
mapApp_t.prototype.launchSavePeepelPointFrame=mapApp_launchSavePeepelPointFrame;
mapApp_t.prototype.savePeepelPointFrameSave=mapApp_savePeepelPointFrameSave;
mapApp_t.prototype.jumpToPeepelPoint=mapApp_jumpToPeepelPoint;
mapApp_t.prototype.searchCallback=mapApp_searchCallback;
mapApp_t.prototype.publicPointSearchCallback=mapApp_publicPointSearchCallback;
mapApp_t.prototype.launchSearchResultsFrame=mapApp_launchSearchResultsFrame;
mapApp_t.prototype.launchPublicPointSearchResultsFrame=mapApp_launchPublicPointSearchResultsFrame;
mapApp_t.prototype.addContactToMap=mapApp_addContactToMap;
mapApp_t.prototype.setUserLocation=mapApp_setUserLocation;
mapApp_t.prototype.getUserLocation=mapApp_getUserLocation;
mapApp_t.prototype.showUnderAgeAlert=mapApp_showUnderAgeAlert;
mapApp_t.prototype.showSideBar=mapApp_showSideBar;
mapApp_t.prototype.hideSideBar=mapApp_hideSideBar;
mapApp_t.prototype.showQuickLaunchPoints=mapApp_showQuickLaunchPoints;
mapApp_t.prototype.showQuickLaunchUsers=mapApp_showQuickLaunchUsers;
mapApp_t.prototype.waitForUserLocation=mapApp_waitForUserLocation;
mapApp_t.prototype.isWaitingForUserLocation=mapApp_isWaitingForUserLocation;
mapApp_t.prototype.newUserLocationCallback=mapApp_newUserLocationCallback;
mapApp_t.prototype.peepelPointUpdateCallback=mapApp_peepelPointUpdateCallback;
mapApp_t.prototype.showMediaLocations=mapApp_showMediaLocations;
mapApp_t.prototype.getQuickLaunchAddress=mapApp_getQuickLaunchAddress;
mapApp_t.prototype.APP_ID=APP_ID_MAP;
mapApp_t.prototype.APP_NAME="WebMap";
mapApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.MAP;
mapApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
mapApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
mapApp_t.prototype.AUTO_PAN=0.5;
mapApp_t.prototype.MINIMAP_WIDTH=100;
mapApp_t.prototype.MINIMAP_HEIGHT=100;
mapApp_t.prototype.RIGHT_MINI_VANISH_X=500;
mapApp_t.prototype.RIGHT_MINI_VANISH_Y=450;
mapApp_t.prototype.RIGHT_MINI_VANISH_Y_ON=160;
mapApp_t.prototype.LEFT_MINI_VANISH_X=650;
mapApp_t.prototype.LEFT_MINI_VANISH_Y=600;
mapApp_t.prototype.LEFT_MINI_VANISH_Y_ON=160;
mapApp_t.prototype.MINIMAP_MODE_ON=1;
mapApp_t.prototype.MINIMAP_MODE_OFF=2;
mapApp_t.prototype.MINIMAP_MODE_AUTO=3;
mapApp_t.prototype.TOOLGROUP_HEIGHT=80;
mapApp_t.prototype.DROP_IMG="img/site/global/drop.png";
mapApp_t.prototype.DROP_BTN_HEIGHT=20;
mapApp_t.prototype.UTILITY_WIDTH=22;
mapApp_t.prototype.UTILITY_HEIGHT=22;
mapApp_t.prototype.INFO_IMG="img/app/system/icons/utility/info.png";
mapApp_t.prototype.SHOWHIDE_LINKS_IMG="img/app/app/map/icons/link.png";
mapApp_t.prototype.SHOWHIDE_LINKS_ON_IMG="img/app/app/map/icons/linkon.png";
mapApp_t.prototype.PAN_TOOLGROUP_PADDING=5;
mapApp_t.prototype.PAN_TOOLGROUP_WIDTH=68;
mapApp_t.prototype.PAN_BUTTON_WIDTH=15;
mapApp_t.prototype.PAN_BUTTON_HEIGHT=15;
mapApp_t.prototype.ZOOM_TOOLGROUP_WIDTH=176;
mapApp_t.prototype.ZOOM_TOOLGROUP_HEIGHT=80;
mapApp_t.prototype.ZOOM_BUTTON_WIDTH=24;
mapApp_t.prototype.ZOOM_BUTTON_HEIGHT=24;
mapApp_t.prototype.ZOOM_SLIDER_LENGTH=mapApp_t.prototype.ZOOM_TOOLGROUP_WIDTH-10;
mapApp_t.prototype.ZOOM_LEVELS=trackingMap_t.prototype.MAX_ZOOM;
mapApp_t.prototype.ZOOM_SLIDER_TOP=30;
mapApp_t.prototype.ZOOM_LBL_LEFT=70;
mapApp_t.prototype.ZOOM_LBL_TOP=10;
mapApp_t.prototype.ZOOM_OUT_IMG="img/app/app/map/icons/zoom_out.png";
mapApp_t.prototype.ZOOM_IN_IMG="img/app/app/map/icons/zoom_in.png";
mapApp_t.prototype.ZOOM_LBL_WIDTH=(mapApp_t.prototype.ZOOM_TOOLGROUP_WIDTH-14)/3;
mapApp_t.prototype.ZOOM_LBL_HEIGHT=17;
mapApp_t.prototype.ZOOM_LBL_BORDER_COLOUR="rgb(205,205,205)";
mapApp_t.prototype.ZOOM_LBL_BG_IMG="img/app/app/map/icons/zoom_";
mapApp_t.prototype.QUICKNAV_TOOLGROUP_WIDTH=181;
mapApp_t.prototype.QUICKNAV_PADDING=4;
mapApp_t.prototype.QUICKNAV_BUTTON_WIDTH=40;
mapApp_t.prototype.QUICKNAV_BUTTON_HEIGHT=60;
mapApp_t.prototype.QUICKNAV_DEFAULT_BTN_HEIGHT=40;
mapApp_t.prototype.JUMPTO_ITEM_WIDTH=60;
mapApp_t.prototype.JUMPTO_ITEM_HEIGHT=50;
mapApp_t.prototype.SAVE_PEEPELPOINT_IMG="img/app/app/map/icons/SavePeepelPoint.png";
mapApp_t.prototype.JUMPTO_PEEPELPOINT_IMG="img/app/system/icons/40x40/map_point.png";
mapApp_t.prototype.JUMPTO_CONTACT_IMG="img/app/system/icons/40x40/map_contact.png";
mapApp_t.prototype.JUMPTO_IMG="img/app/system/icons/40x40/map_jumpLoc.png";
mapApp_t.prototype.JUMPTO_GRID_COLS=3;
mapApp_t.prototype.JUMP_TO_COORDINATES=1;
mapApp_t.prototype.CENTRE_MARK_TG_WIDTH=100;
mapApp_t.prototype.CONTROLS_BUTTON_WIDTH=40;
mapApp_t.prototype.CONTROLS_BUTTON_HEIGHT=60;
mapApp_t.prototype.CONTROLS_ZOOM_IMG="img/app/app/map/icons/ZoomMode.png";
mapApp_t.prototype.CONTROLS_PAN_IMG="img/app/app/map/icons/PanMode.png";
mapApp_t.prototype.CONTROLS_RULER_IMG="img/app/app/map/icons/RulerMode.png";
mapApp_t.prototype.TOGGLE_CROSSHAIR_IMG="img/app/system/icons/40x60/crosshair.png";
mapApp_t.prototype.STYLE_TOOLGROUP_WIDTH=66;
mapApp_t.prototype.STYLE_IMG="img/app/app/map/icons/style";
mapApp_t.prototype.STYLE_BTN_LEFT=4;
mapApp_t.prototype.STYLE_BTN_TOP=4;
mapApp_t.prototype.CHILD_TOOLGROUP_WIDTH=190;
mapApp_t.prototype.CHILD_MAP_OFF_TEXT="Off";
mapApp_t.prototype.CHILD_MAP_ON_TEXT="On";
mapApp_t.prototype.CHILD_MAP_AUTO_TEXT="Automatic";
mapApp_t.prototype.CHILD_MAP_IMG_WIDTH=65;
mapApp_t.prototype.CHILD_MAP_ZOOM_SELECT_WIDTH=60;
mapApp_t.prototype.CHILD_MAP_ZOOM_SELECT_HEIGHT=22;
mapApp_t.prototype.CHILD_MAP_MODE_BTN_LEFT=4;
mapApp_t.prototype.CHILD_MAP_MODE_BTN_TOP=4;
mapApp_t.prototype.CHILD_MAP_MODE_CHECKBOX_LEFT=73;
mapApp_t.prototype.CHILD_MAP_MODE_CHECKBOX_TOP=4;
mapApp_t.prototype.CHILD_MAP_ZOOMLBL_LEFT=4;
mapApp_t.prototype.CHILD_MAP_ZOOMLBL_TOP=35;
mapApp_t.prototype.CHILD_MAP_MODE_SELECT_LEFT=80;
mapApp_t.prototype.CHILD_MAP_MODE_SELECT_TOP=32;
mapApp_t.prototype.SEARCH_CONT_TOOLGROUP_WIDTH=200;
mapApp_t.prototype.CON_SEARCH_LBL_LEFT=4;
mapApp_t.prototype.CON_SEARCH_LBL_TOP=4;
mapApp_t.prototype.CON_SEARCH_NAME_LEFT=45;
mapApp_t.prototype.CON_SEARCH_NAME_TOP=4;
mapApp_t.prototype.CON_RESULTS_LBL_LEFT=4;
mapApp_t.prototype.CON_RESULTS_LBL_TOP=30;
mapApp_t.prototype.SEARCH_KEYWORD_MIN_LENGTH=3;
mapApp_t.prototype.CONTACTS_TOOLGROUP_WIDTH=250;
mapApp_t.prototype.CON_LIST_LEFT=4;
mapApp_t.prototype.CON_LIST_TOP=4;
mapApp_t.prototype.CON_TRACKING_TOOLGROUP_WIDTH=(mapApp_t.prototype.QUICKNAV_BUTTON_WIDTH*3)+(4*SYSTEM.Style.WIDGET_PADDING);
mapApp_t.prototype.CON_ON_MAP_LEFT=4;
mapApp_t.prototype.CON_ON_MAP_TOP=4;
mapApp_t.prototype.CON_ON_MAP_IMG="img/app/app/map/icons/on_map";
mapApp_t.prototype.SEARCH_MAP_IMG="img/app/app/map/icons/searchmap";
mapApp_t.prototype.SET_LOC_IMG="img/app/app/map/icons/SetLocationCenter.png";
mapApp_t.prototype.SET_LOC_CLICK_IMG="img/app/app/map/icons/SetLocationCursor.png";
mapApp_t.prototype.SEND_LOC_IMG="img/app/app/map/icons/send.png";
mapApp_t.prototype.SEARCH_TOOLGROUP_WIDTH=240;
mapApp_t.prototype.ADV_SEARCH_TOOLGROUP_WIDTH=319;
mapApp_t.prototype.KEYWORD_LBL_LEFT=4;
mapApp_t.prototype.KEYWORD_LBL_TOP=4;
mapApp_t.prototype.KEYWORD_TXT_LEFT=70;
mapApp_t.prototype.KEYWORD_TXT_TOP=4;
mapApp_t.prototype.KEYWORD_TXT_WIDTH=160;
mapApp_t.prototype.SEARCH_BTN_TOP=32;
mapApp_t.prototype.ADV_KEYWORD_TXT_LEFT=100;
mapApp_t.prototype.ADV_KEYWORD_TXT_TOP=4;
mapApp_t.prototype.ADV_KEYWORD_TXT_WIDTH=210;
mapApp_t.prototype.TYPE_LBL_LEFT=4;
mapApp_t.prototype.TYPE_LBL_TOP=34;
mapApp_t.prototype.TYPE_SELECT_LEFT=100;
mapApp_t.prototype.TYPE_SELECT_TOP=32;
mapApp_t.prototype.TYPE_SELECT_WIDTH=120;
mapApp_t.prototype.TYPE_SELECT_HEIGHT=22;
mapApp_t.prototype.TYPE_SELECT_LIST_WIDTH=124;
mapApp_t.prototype.ADV_SEARCH_BTN_LEFT=254;
mapApp_t.prototype.ADV_SEARCH_BTN_TOP=32;
mapApp_t.prototype.SEARCH_SERVICE_PATH="peepel_services.php?service=search";
mapApp_t.prototype.ACTION_FIND_BY_KEYWORD=1;
mapApp_t.prototype.ACTION_FIND_BY_KEYWORD_AND_TYPE=2;
mapApp_t.prototype.SEARCH_RESULTS_WIDTH=350;
mapApp_t.prototype.SEARCH_RESULTS_HEIGHT=400;
mapApp_t.prototype.PP_SEARCH_RESULTS_WIDTH=700;
mapApp_t.prototype.MAX_SEARCH_RESULT_COUNT=25;
mapApp_t.prototype.SCROLL_BTN_SIDE=15;
mapApp_t.prototype.TYPEMATIC_PERIOD=50;
mapApp_t.prototype.UP_IMG="img/app/system/widgets/scrollbar/scroll_up";
mapApp_t.prototype.DOWN_IMG="img/app/system/widgets/scrollbar/scroll_down";
mapApp_t.prototype.STYLE_FRAME_WIDTH=350;
mapApp_t.prototype.STYLE_FRAME_HEIGHT=430;
mapApp_t.prototype.STYLE_MAX_FRAME_WIDTH=670;
mapApp_t.prototype.STYLE_FRAME_MAX_HEIGHT=760;
mapApp_t.prototype.STYLE_LIST_ITEM_WIDTH=300;
mapApp_t.prototype.STYLE_LIST_ITEM_HEIGHT=38;
mapApp_t.prototype.STYLE_FRAME_LIST_LEFT=15;
mapApp_t.prototype.STYLE_FRAME_LIST_TOP=25;
mapApp_t.prototype.STYLE_FRAME_LIST_WIDTH=320;
mapApp_t.prototype.STYLE_FRAME_LIST_HEIGHT_DIFF=60;
mapApp_t.prototype.STYLE_MORE_INFO_RIGHT=300;
mapApp_t.prototype.STYLE_MORE_NAME_TOP=25;
mapApp_t.prototype.STYLE_MORE_SUMMARY_TOP=50;
mapApp_t.prototype.STYLE_MORE_IMAGE_TOP=100;
mapApp_t.prototype.STYLE_MORE_HIDE_BOTTOM=50;
mapApp_t.prototype.STYLE_MORE_IMG_SIDE=256;
mapApp_t.prototype.CONTROL_PANEL_HEIGHT=0;
mapApp_t.prototype.CONTROL_PANEL_MAP_PAD=0;
mapApp_t.prototype.ACTION_SET_USER_LOCATION=1;
mapApp_t.prototype.ACTION_GET_USER_LOCATION=2;
mapApp_t.prototype.HOR_TOGGLE_RIGHT_IMG="img/app/app/map/icons/r_arrow";
mapApp_t.prototype.HOR_TOGGLE_LEFT_IMG="img/app/app/map/icons/l_arrow";
mapApp_t.prototype.TOGGLE_IMG_WIDTH=6;
mapApp_t.prototype.TOGGLE_IMG_HEIGHT=31;
mapApp_t.prototype.STYLE_SELECT_WIDTH=100;
mapApp_t.prototype.VERT_TOGGLE_UP_IMG="img/app/app/map/icons/u_arrow";
mapApp_t.prototype.VERT_TOGGLE_DOWN_IMG="img/app/app/map/icons/d_arrow";
mapApp_t.prototype.MIN_MAPFRAME_WIDTH=500;
mapApp_t.prototype.MIN_MAPFRAME_HEIGHT=400;
mapApp_t.prototype.LINK_ICON_SIDE=20;
mapApp_t.prototype.DEFAULT_MEDIA_LOCATION_ZOOM=13;
}
catch(ex){
jsExDebug("mapApp_t.prototype",ex);
}
function mapApp_t(_1){
try{
this.mapApp_super();
this.infoFrameVisible=false;
this.mapCustomLabelColours=[];
this.mapCustomLabelColours[1]="rgb(255,255,0)";
this.mapCustomLabelColours[2]=this.mapCustomLabelColours[1];
this.waitingForUserLocation=[];
this.createPanel();
this.createFrame(_1[0],_1[1],_1[3]);
this.showSideBar();
this.leftMinimapMode=this.MINIMAP_MODE_AUTO;
this.binding_leftMinimapModeBtn_click(this.leftMinimapModeBtn);
this.rightMinimapMode=this.MINIMAP_MODE_AUTO;
this.binding_rightMinimapModeBtn_click(this.rightMinimapModeBtn);
this.searchResults=[];
this.selectedStyleItem=null;
this.currentMapStyle=0;
this.timelineEnabled=false;
if(_1[2]){
var _2=_1[2];
if(!_2.zoom){
_2.setZoom(1);
}
this.mapFrame.maximise();
this.map.centreOnCoordinates(_2);
}
this.catchClickToSetUserLocation=false;
this.SYSTEM.Tooltip.hideLoading();
this.keyUpEventIndex=this.SYSTEM.Event.notifyKeyUpEvent(this.keyUpEvent,this);
this.savePeepelPointCoordinate=null;
this.catchClickToSetPeepelPointLocation=false;
if(_1[4]){
this.quickLaunchPointNames=_1[4];
this.mapFrame.maximise();
if(this.SYSTEM.PeepelPoints.initialised){
this.showQuickLaunchPoints();
}else{
this.pointsActionIndex=this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_READ,new this.SYSTEM.Delegate(this,this.showQuickLaunchPoints));
}
}
if(_1[5]){
this.quickLaunchUserEmails=_1[5];
this.mapFrame.maximise();
this.showQuickLaunchUsers();
}
if(_1[6]){
var _3=_1[6];
this.mapFrame.maximise();
for(var i=0;i<_3.length;i++){
this.map.showPublicPoint(_3[i].coordinate.copy(),_3[i]);
}
this.map.drawMapObjects();
}
if(_1[7]){
var _5=parseFloat(_1[7].splice(0,1));
this.quickLaunchUserEmails=_1[7];
this.mapFrame.maximise();
this.showQuickLaunchUsers(_5);
}
if(_1[8]){
this.showMediaLocations(_1[8],this.DEFAULT_MEDIA_LOCATION_ZOOM);
}
this.SYSTEM.Tracking.mapOpen();
this.scrollUpIndex=this.SYSTEM.Event.notifyMouseScrollUp(this.scrollUp,this);
this.scrollDownIndex=this.SYSTEM.Event.notifyMouseScrollDown(this.scrollDown,this);
this.trackingIndex=this.SYSTEM.Tracking.registerActionListener(this.SYSTEM.Tracking.ACTION_USER_LOCATION_UPDATE,new this.SYSTEM.Delegate(this,this.newUserLocationCallback));
this.pointsActionIndex=this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_UPDATE,new this.SYSTEM.Delegate(this,this.peepelPointUpdateCallback),this.pointsActionIndex);
}
catch(ex){
jsExDebug("mapApp_t",ex);
}
}
function mapApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Tracking.mapClosed();
me.SYSTEM.Tracking.unregisterActionListener(me.trackingIndex);
me.trackingIndex=null;
if(me.SYSTEM.PeepelPoints){
me.SYSTEM.PeepelPoints.unregisterActionListener(me.pointsActionIndex);
me.pointsActionIndex=null;
}
if(me.savePeepelPointKeyPressIndex){
me.SYSTEM.Event.removeKeyPressHandler(me.savePeepelPointKeyPressIndex);
me.savePeepelPointKeyPressIndex=null;
me.savePeepelPointKeyPressIndex=null;
}
me.SYSTEM.Event.removeKeyUpHandler(me.keyUpEventIndex);
me.SYSTEM.Event.removeMouseScrollUpHandler(me.scrollUpIndex);
me.SYSTEM.Event.removeMouseScrollDownHandler(me.scrollDownIndex);
me.keyUpEventIndex=null;
me.scrollUpIndex=null;
me.scrollDownIndex=null;
me.waitingForUserLocation=null;
if(me.dragDiv){
me.SYSTEM.Event.disableDropTarget(me.dragDiv);
me.SYSTEM.Event.detachEvent(me.dragDiv,"onmousedown","mousedown");
}else{
me.SYSTEM.Event.disableDropTarget(me.map.widgetElement);
}
me.mapInfoFrame=null;
me.mapInfoCoordinatesText=null;
me.mapInfoClearBtn=null;
me.mapInfoDrawBtn=null;
me.quickLaunchMediaLocations=null;
me.mapInfoCurrentCoord=null;
me.infoFrameVisible=null;
me.errorFrame=null;
me.errorBoundsLabel=null;
me.errorTextArea=null;
me.errorSendLink=null;
me.savePeepelPointFrame=null;
me.savePeepelPointNameText=null;
me.savePeepelPointDescriptionText=null;
me.savePeepelPointTagsText=null;
me.savePeepelPointPrivacySelect=null;
me.jumpToCoordsFrame=null;
me.jumpInfoLabel=null;
me.jumpLatLabel=null;
me.jumpLatText=null;
me.jumpLongLabel=null;
me.jumpLongText=null;
me.jumpJumpLink=null;
me.jumpDecimalCheckbox=null;
me.mapFrame=null;
me.panelSwitcherIndex=null;
me.printBtn=null;
me.infoBtn=null;
me.refreshBtn=null;
me.detachBtn=null;
me.adGroup=null;
me.panNorthBtn=null;
me.panNorthEastBtn=null;
me.panEastBtn=null;
me.panSouthEastBtn=null;
me.panSouthBtn=null;
me.panSouthWestBtn=null;
me.panWestBtn=null;
me.panNorthWestBtn=null;
me.zoomSlider=null;
me.zoomOutBtn=null;
me.zoomInBtn=null;
me.saveAsPeepelPointBtn=null;
me.jumpToContinents=null;
me.jumpToAustralia=null;
me.jumpToUSA=null;
me.jumpToUK=null;
me.jumpToAsia=null;
me.jumpToSelect=null;
me.jumpToDropList=null;
me.jumpToPeepelPointGrid=null;
me.jumpToPeepelPointDropList=null;
me.jumpToContactDropList=null;
me.zoomPresetBtn=null;
me.panPresetBtn=null;
me.infoPresetBtn=null;
me.rulerPresetBtn=null;
me.quickHelpBtn=null;
if(me.leftMinimap){
me.leftMinimap.cleanUp();
me.leftMinimap=null;
}
me.leftMinimapModeBtn=null;
me.leftMinimapStyleCheckbox=null;
me.leftMinimapZoomDropText=null;
me.leftMinimapZoomLabel=null;
me.rightMinimapModeBtn=null;
me.rightMinimapStyleCheckbox=null;
me.rightMinimapZoomDropText=null;
me.rightMinimapZoomLabel=null;
me.keywordText=null;
me.publicPointKeywordText=null;
me.currentSearchKeyword=null;
me.currentPublicPointSearchKeyword=null;
if(me.rightMinimap){
me.rightMinimap.cleanUp();
me.rightMinimap=null;
}
me.rightMinimapMode=null;
me.rightMinimapVisible=null;
me.rightContainerDiv=null;
me.leftMinimapMode=null;
me.leftMinimapVisible=null;
me.leftContainerDiv=null;
me.setLocationClickBtn=null;
me.linksHiddenForResize=null;
for(i=0;i<me.linkIconRefs.length;i++){
me.linkIconRefs[i]=null;
}
me.linkIconRefs=null;
for(var _8 in me.searchResults){
if(me.searchResults[_8]){
var _9=me.searchResults[_8].checkboxes.length;
var _a=me.searchResults[_8].locations.length;
for(var i=0;i<_a;i++){
if(me.searchResults[_8].locations){
if(me.searchResults[_8].locations[i]){
me.searchResults[_8].locations[i].name=null;
me.searchResults[_8].locations[i].country=null;
me.searchResults[_8].locations[i].id=null;
me.searchResults[_8].locations[i].x=null;
me.searchResults[_8].locations[i].y=null;
me.searchResults[_8].locations[i].type=null;
me.searchResults[_8].locations[i]=null;
}
}
}
for(i=0;i<_9;i++){
me.searchResults[_8].checkboxes[i]=null;
}
me.searchResults[_8].table=null;
me.searchResults[_8]=null;
}
}
me.timelineEnabled=null;
if(me.dragDiv){
me.dragDiv=null;
}
me.contactSearchNameText=null;
me.sideBarToggleBtn=null;
me.sidebar=null;
if(me.savePeepelPointCoordinate){
me.savePeepelPointCoordinate.cleanUp();
me.savePeepelPointCoordinate=null;
}
me.catchClickToSetPeepelPointLocation=null;
me.zoomLabel=null;
me.showHideLinksBtn=null;
me.map=null;
me.searchResults=null;
me.keyUpEventIndex=null;
me.lastJumpToLocation=null;
me.coordTextFrame=null;
me.jumpTileFrame=null;
me.quickLaunchPointNames=null;
me.quickLaunchUserEmails=null;
for(var i in me.mapCustomLabelColours){
me.mapCustomLabelColours[i]=null;
}
me.mapCustomLabelColours=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("mapApp_cleanUp",ex);
}
}
function mapApp_capture(){
try{
var _b=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _c=this.SYSTEM.Environment.SCREEN_WIDTH;
var _d=this.map.getCentreCoordinates();
this.captureString="mapFrame:"+(this.mapFrame.width/_c)+","+(this.mapFrame.height/_b)+","+(this.mapFrame.positionX/_c)+","+((this.mapFrame.positionY-this.SYSTEM.Panel.getHeight())/_b)+","+_d.mercY+"_"+_d.mercX+"_"+_d.zoom+","+this.map.settingMapStyle+","+(this.sidebar.visible?"side_open":"side_closed")+","+this.sidebar.getWorkspaceFriendlySearchTerm()+","+this.sidebar.currentSortType+","+this.sidebar.currentExtraContactInfo+","+(this.map.isUserOnMap()?"user_on":"user_off");
var _e=this.SYSTEM.MapLinker.areLinksVisible();
var _f=this.map.linkGroupNumbers;
var _10=null;
var _11=null;
for(var i=0;i<_f.length;i++){
_10=_f[i];
_11=this.SYSTEM.MapLinker.getOptionsForMap(_10,this.map);
if(i>0){
this.captureString+=","+_10+"_"+_11;
}else{
if(_e){
this.captureString+="::1,"+_10+"_"+_11;
}else{
this.captureString+="::0,"+_10+"_"+_11;
}
}
}
var _13=this.map.getListOfContactIdsOnMap();
this.captureString+=",c:";
for(var i=0;i<_13.length;i++){
if(this.map.followedContacts[_13[i]]){
this.captureString+=_13[i]+"f,";
}else{
this.captureString+=_13[i]+",";
}
}
var _14=this.map.getPointIdsOnMap(false);
this.captureString+=",p:";
for(var i=0;i<_14.length;i++){
this.captureString+=_14[i]+",";
}
this.captureString=this.captureString.replace(/,$/,"");
return this.captureString;
}
catch(ex){
jsExDebug("mapApp_capture",ex);
}
}
function mapApp_restore(_15){
try{
if(!_15){
return;
}
var _16=_15.split(":")[1].split(",");
var _17=(this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight());
var _18=this.SYSTEM.Environment.SCREEN_WIDTH;
var _19=parseInt(_18*parseFloat(_16[0]));
var _1a=parseInt(_17*parseFloat(_16[1]));
var _1b=parseInt(_18*parseFloat(_16[2]));
var top=parseInt((_17*parseFloat(_16[3]))+this.SYSTEM.Panel.getHeight());
this.mapFrame.setDimensions(_19,_1a);
this.mapFrame.setPosition(_1b,top);
if(this.dragDiv&&this.dragDiv.parentNode==this.mapFrame.windowDiv){
this.mapFrame.windowDiv.removeChild(this.dragDiv);
}
var _1d=_16[4].split("_");
var _1e=new mapCoordinate_t();
_1e.fromString(_1d[0]+","+_1d[1]+","+_1d[2]);
this.map.centreOnCoordinates(_1e);
this.map.recentreChildMaps();
var _1f=parseFloat(_16[5]);
this.map.setStyle(_1f);
this.map.setLabelColour(this.mapCustomLabelColours[_1f]);
var _20=_16[6];
if(_20&&_20=="side_open"){
this.showSideBar();
}else{
this.hideSideBar();
}
var _21=_16[7];
if(_21){
this.sidebar.overrideSearchTerm(_21,true);
}
var _22=_16[8];
if(_22){
this.sidebar.overrideSortType(parseFloat(_22));
}
var _23=_16[9];
if(_23){
this.sidebar.overrideExtraContactInfo(parseFloat(_23));
}
var _24=_16[10];
if(_24&&_24=="user_on"){
this.getUserLocation(true,true);
}
var _25=_15.split("::");
if(_25[1]){
var _26=_25[1].split(",");
var _27=false;
if(_26[0]=="1"){
_27=true;
}
var _28=null;
var _29=null;
for(var i=1;i<_26.length;i++){
_28=_26[i].split("_");
_29=parseInt(_28[0]);
if(this.linkIconRefs[_29]){
this.SYSTEM.MapLinker.addMapToGroup(this,this.map,_29,parseInt(_28[1]));
this.linkIconRefs[_29].turnOn();
}
}
if(_27){
this.SYSTEM.MapLinker.showLinks();
this.showHideLinksBtn.setImage(this.SHOWHIDE_LINKS_ON_IMG);
}
}
var _2b=_15.split("c:");
if(_2b[1].length){
var _2c=_2b[1].split(",");
var _2d=null;
var _2e=null;
for(i=0;i<_2c.length;i++){
_2d=parseInt(_2c[i]);
_2e=this.SYSTEM.Contacts.getContact(_2d);
if(_2e){
this.addContactToMap(_2e,true,true);
if(_2c[i].match(/f$/)){
this.map.startFollowingUser(_2d);
}
}
}
}
var _2f=_15.split("p:");
if(_2f[1]&&_2f[1].length){
var _30=_2f[1].split(",");
var _31=null;
var _32=null;
for(i=0;i<_30.length;i++){
_31=parseInt(_30[i]);
_32=this.SYSTEM.PeepelPoints.getPointFromLocationId(_31);
if(_32){
this.jumpToPeepelPoint(_32,false,false);
}
}
}
}
catch(ex){
jsExDebug("mapApp_restore",ex);
}
}
function mapApp__SIG_KILL(){
try{
if(this.SYSTEM.MapLinker&&this.map.linkGroupNumbers.length&&this.SYSTEM.MapLinker.areLinksVisible()){
this.SYSTEM.MapLinker.hideLinks();
}
this.cleanUp();
}
catch(ex){
jsExDebug("mapApp__SIG_KILL",ex);
}
}
function mapApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("mapApp__SIG_THEME",ex);
}
}
function mapApp_createFrame(_33,_34,_35){
try{
var _36=this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.MAXIMISE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN;
_33=(_33?_33:this.MIN_MAPFRAME_WIDTH);
_34=(_34?_34:this.MIN_MAPFRAME_HEIGHT);
this.mapFrame=new this.SYSTEM.Frame.Window("mapFrame","Webmap",this,_33,_34,true,true,_36);
this.mapFrame.setMinimumSize(this.MIN_MAPFRAME_WIDTH,this.MIN_MAPFRAME_HEIGHT);
this.map=new trackingMap_t("map",this.mapFrame);
this.mapFrame.addWidget(this.map,this.mapFrame.leftEdgeWidth,this.mapFrame.topEdgeHeight);
this.setMapDimensions(this.mapFrame.width,this.mapFrame.height);
var _37=new mapCoordinate_t(1252344,2035060,1);
_37.setZoom(1);
this.map.centreOnCoordinates(_37);
if(_35){
this.map.setStyle(_35);
this.map.setLabelColour(this.mapCustomLabelColours[_35]);
}
this.map.addEventHandler(this.map.ZOOM_IN_EVENT,new this.SYSTEM.Delegate(this,this.mapZoomInEvent));
this.map.addEventHandler(this.map.ZOOM_OUT_EVENT,new this.SYSTEM.Delegate(this,this.mapZoomOutEvent));
this.map.addEventHandler(this.map.ZOOM_TO_LEVEL_EVENT,new this.SYSTEM.Delegate(this,this.mapZoomToLevelEvent));
this.map.addEventHandler(this.map.SINGLE_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.mapSingleClickEvent));
this.map.addEventHandler(this.map.COORDINATE_JUMP_EVENT,new this.SYSTEM.Delegate(this,this.mapCoordinateJumpEvent));
this.map.addEventHandler(this.map.REMOVE_MAP_OBJECT_EVENT,new this.SYSTEM.Delegate(this,this.mapObjectRemoveEvent));
this.map.addEventHandler(this.map.FOLLOW_USER_EVENT,new this.SYSTEM.Delegate(this,this.mapFollowContactEvent));
this.map.addEventHandler(this.map.STOP_FOLLOW_USER_EVENT,new this.SYSTEM.Delegate(this,this.mapStopFollowContactEvent));
this.map.addEventHandler(this.map.FILTER_SIDEBAR_EVENT,new this.SYSTEM.Delegate(this,this.mapFilterSidebarEvent));
if(this.APPLICATION.Panel){
this.zoomSlider.setSlideValue(this.map.getZoom());
this.zoomPresetBtn.turnOff();
this.panPresetBtn.turnOn();
this.rulerPresetBtn.turnOff();
}
if(this.map.enableDoubleClickPan){
this.map.enableDoubleClickPan();
this.map.enableDragToPan();
}
var _38=new this.SYSTEM.Widget.Button("sideBarToggleBtn",this.HOR_TOGGLE_RIGHT_IMG,null,this.TOGGLE_IMG_WIDTH,this.TOGGLE_IMG_HEIGHT,"Toggle side bar","Click to hide/show the side bar");
var _39=new mapSidebar_t("sidebar");
_39.addEventHandler(_39.MAP_TOGGLE_EVENT,new this.SYSTEM.Delegate(this,this.sidebarMapToggleEvent));
_39.addEventHandler(_39.FOLLOW_TOGGLE_EVENT,new this.SYSTEM.Delegate(this,this.sidebarFollowToggleEvent));
_39.addEventHandler(_39.POINT_ZOOM_CENTRE_EVENT,new this.SYSTEM.Delegate(this,this.sidebarPointZoomCentreEvent));
_39.addEventHandler(_39.POINT_CENTRE_EVENT,new this.SYSTEM.Delegate(this,this.sidebarPointCentreEvent));
_39.addEventHandler(_39.POINT_NO_CHANGE_EVENT,new this.SYSTEM.Delegate(this,this.sidebarPointNoChangeEvent));
_39.addEventHandler(_39.POINT_REMOVE_EVENT,new this.SYSTEM.Delegate(this,this.sidebarPointRemoveEvent));
_39.addEventHandler(_39.AVATAR_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.sidebarAvatarClickEvent));
_39.setMapReference(this.map);
_39.hide(true);
this.mapFrame.addWidget(_38,this.mapFrame.rightEdgeWidth+_39.width,this.map.positionY+(this.map.height/2)-(_38.height/2),true);
this.mapFrame.addWidget(_39,this.mapFrame.leftEdgeWidth,this.mapFrame.topEdgeHeight,true);
this.sideBarToggleBtn=_38;
this.sidebar=_39;
this.mapFrame.show();
this.zoomLabel.setText("Level "+this.map.zoom);
var _3a=new this.SYSTEM.Widget.Button("groupBtn",this.SYSTEM.MapLinker.getGroupImage(1),button_t.prototype.ON_IMAGE,this.LINK_ICON_SIDE,this.LINK_ICON_SIDE);
_3a.setValue(1);
var _3b=new this.SYSTEM.Widget.Button("groupBtn",this.SYSTEM.MapLinker.getGroupImage(2),button_t.prototype.ON_IMAGE,this.LINK_ICON_SIDE,this.LINK_ICON_SIDE);
_3b.setValue(2);
var _3c=new this.SYSTEM.Widget.Button("groupBtn",this.SYSTEM.MapLinker.getGroupImage(3),button_t.prototype.ON_IMAGE,this.LINK_ICON_SIDE,this.LINK_ICON_SIDE);
_3c.setValue(3);
var _3d=new this.SYSTEM.Widget.Button("groupBtn",this.SYSTEM.MapLinker.getGroupImage(4),button_t.prototype.ON_IMAGE,this.LINK_ICON_SIDE,this.LINK_ICON_SIDE);
_3d.setValue(4);
this.mapFrame.addCustomControl(_3d);
this.mapFrame.addCustomControl(_3c);
this.mapFrame.addCustomControl(_3b);
this.mapFrame.addCustomControl(_3a);
this.linkIconRefs=[null,_3a,_3b,_3c,_3d];
this.map.setLinkGroupIconRefs(this.linkIconRefs);
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE){
var _3e=document.createElement("div");
_3e.style.position="absolute";
_3e.style.left=this.mapFrame.leftEdgeWidth+"px";
_3e.style.top=this.mapFrame.topEdgeHeight+"px";
_3e.style.width=this.mapFrame.getInternalWidth()+"px";
_3e.style.height=this.mapFrame.getInternalHeight()+"px";
this.dragDiv=_3e;
this.SYSTEM.Event.attachEvent(this.dragDiv,"onmousedown","mousedown",this.dragDivClickEvent,this);
}
}
catch(ex){
jsExDebug("mapApp_createFrame",ex);
}
}
function mapApp_createPanel(){
try{
var _3f=this.APPLICATION.Panel;
if(!_3f){
return;
}
var w=this.SYSTEM.Widget;
var _41=button_t.prototype.HOVER_IMAGE;
var _42=24;
var _43=new w.ClassButton("infoBtn",2,_42,_42,null,this.INFO_IMG,"Map information","Show map information.");
var _44=new w.ClassButton("quickHelpBtn",2,_42,_42,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the Peepel WebMap.");
var _45=new w.ClassButton("showHideLinksBtn",2,_42,_42,null,this.SHOWHIDE_LINKS_IMG,"Map links","Turn map link visibility on/off.");
if(this.SYSTEM.MapLinker.areLinksVisible()){
_45.setImage(this.SHOWHIDE_LINKS_ON_IMG);
}
this.infoBtn=_43;
this.showHideLinksBtn=_45;
this.quickHelpBtn=_44;
var _46=new w.Label("zoomLabel");
var _47=new w.ClassButton("zoomOutBtn",2,this.ZOOM_BUTTON_WIDTH,this.ZOOM_BUTTON_HEIGHT,null,this.ZOOM_OUT_IMG,"Zoom out","Zoom the map out on the centre location.");
var _48=new w.ClassButton("zoomInBtn",2,this.ZOOM_BUTTON_WIDTH,this.ZOOM_BUTTON_HEIGHT,null,this.ZOOM_IN_IMG,"Zoom in","Zoom the map in on the centre location.");
var _49=new w.Slider("zoomSlider",this.ZOOM_SLIDER_LENGTH);
_49.quantify(this.ZOOM_LEVELS);
_49.allowValueDisplay(35,15);
var _4a="solid 1px "+this.ZOOM_LBL_BORDER_COLOUR;
var _4b="rgb(255,255,255)";
var _4c=["World","State","Street"];
var _4d=[];
for(var i=0;i<_4c.length;i++){
var _4f=_4c[i].toLowerCase();
var _50=new w.Label("zoomLabel",_4c[i]);
_50.setDimensions(this.ZOOM_LBL_WIDTH,this.ZOOM_LBL_HEIGHT);
_50.setBorder(_4a);
_50.setValue(_4c[i]);
_50.setAlignment("center");
_50.setLineHeight(this.ZOOM_LBL_HEIGHT);
_50.setBackgroundImage(this.ZOOM_LBL_BG_IMG+_4f+".png");
_50.setCursor("pointer");
_4d.push(_50);
}
this.zoomLabel=_46;
this.zoomSlider=_49;
this.zoomOutBtn=_47;
this.zoomInBtn=_48;
var _51=new w.ClassButton("saveAsPeepelPointBtn",2,this.QUICKNAV_BUTTON_WIDTH,this.QUICKNAV_BUTTON_HEIGHT,null,this.SAVE_PEEPELPOINT_IMG,"Save PeepelPoint","Save a new PeepelPoint from the map.");
var _52=new w.DropList("jumpToDropList",this.QUICKNAV_BUTTON_WIDTH,this.QUICKNAV_DEFAULT_BTN_HEIGHT,this.JUMPTO_IMG,this.DROP_BTN_HEIGHT,null,null,null,"custom_button");
_52.alignLeft();
_52.allowBorder("black");
_52.disallowSelectedHighlight();
_52.disallowPadding();
_52.disallowFadeIn();
_52.allowTooltip("Jump to location","Centres the map on the location you choose.");
_52.addItem(null,"<b>Continents</b>");
_52.addItem({left:12500000,top:-1000000,right:17500000,bottom:-5500000},"Australia");
_52.addItem({left:-14000000,top:6500000,right:-7000000,bottom:2500000},"USA");
_52.addItem({left:-1500000,top:11500000,right:7500000,bottom:3000000},"Europe");
_52.addItem(null,"<b>Australian cities</b>");
_52.addItem({left:17000000,top:-3100000,right:17100000,bottom:-3250000},"Brisbane");
_52.addItem({left:16750000,top:-3950000,right:16850000,bottom:-4020000},"Sydney");
_52.addItem({left:16100000,top:-4500000,right:16200000,bottom:-4615000},"Melbourne");
_52.addItem({left:17028600,top:-3165000,right:17032000,bottom:-3170000},"Peepel Office");
_52.addItem(null,"<b>American cities</b>");
_52.addItem({left:-8300000,top:5040000,right:-7980000,bottom:4920000},"New York");
_52.addItem({left:-13200000,top:4060000,right:-13000000,bottom:3930000},"Los Angeles");
_52.addItem({left:-13700000,top:6100000,right:-13560000,bottom:5910000},"Seattle");
_52.addItem(null,"<b>English cities</b>");
_52.addItem({left:-65000,top:6720000,right:40000,bottom:6620000},"London");
_52.addItem({left:-575000,top:7693000,right:-560000,bottom:7685000},"Fort William (Scotland)");
_52.addItem(null,"<b>Asian cities</b>");
_52.addItem({left:15500000,top:4300000,right:15610000,bottom:4150000},"Tokyo");
_52.addItem({left:12900000,top:4850000,right:13000000,bottom:4810000},"Beijing");
_52.addItem({left:1865000,top:-330000,right:1870000,bottom:-336000},"Timbuctoo");
_52.addItem(this.JUMP_TO_COORDINATES,"Coordinates");
_52.setItemPadding(0,0);
var _53=new w.DropList("jumpToPeepelPointDropList",this.QUICKNAV_BUTTON_WIDTH,this.QUICKNAV_DEFAULT_BTN_HEIGHT,this.JUMPTO_PEEPELPOINT_IMG,this.DROP_BTN_HEIGHT,null,null,null,"custom_button");
_53.alignLeft();
_53.allowBorder("black");
_53.disallowSelectedHighlight();
_53.disallowPadding();
_53.disallowFadeIn();
_53.allowTooltip("Jump to PeepelPoint","Centres the map on your first PeepelPoint. Click to open PointManager.",null,115);
var _54=new w.DropList("jumpToContactDropList",this.QUICKNAV_BUTTON_WIDTH,this.QUICKNAV_DEFAULT_BTN_HEIGHT,this.JUMPTO_CONTACT_IMG,this.DROP_BTN_HEIGHT,null,null,null,"custom_button");
_54.alignLeft();
_54.allowBorder("black");
_54.disallowSelectedHighlight();
_54.disallowPadding();
_54.disallowFadeIn();
_54.allowTooltip("Jump to Contact","Centres the map on your first contact. Click to open ContactManager.",null,115);
this.saveAsPeepelPointBtn=_51;
this.jumpToDropList=_52;
this.jumpToPeepelPointDropList=_53;
this.jumpToContactDropList=_54;
var _55=classButton_t.prototype.TYPE_PANEL_BUTTON;
var _56=new w.ClassButton("zoomPresetBtn",_55,this.CONTROLS_BUTTON_WIDTH,this.CONTROLS_BUTTON_HEIGHT,"custom_button",this.CONTROLS_ZOOM_IMG,"Enable zoom mode","Changes map settings:<br><u>Double-click</u>: Pan and zoom in.<br><u>Drag</u>: create a rectangle to represent the maps new boundary.",null,130);
var _57=new w.ClassButton("panPresetBtn",_55,this.CONTROLS_BUTTON_WIDTH,this.CONTROLS_BUTTON_HEIGHT,"custom_button",this.CONTROLS_PAN_IMG,"Enable pan mode","Changes map settings:<br><u>Double-click</u>: Pans the map.<br><u>Drag</u>: Pans the map",null,130);
var _58=new w.ClassButton("rulerPresetBtn",_55,this.CONTROLS_BUTTON_WIDTH,this.CONTROLS_BUTTON_HEIGHT,"custom_button",this.CONTROLS_RULER_IMG,"Enable ruler","Measure distances on the map with two clicks.");
var _59=new w.ClassButton("crosshairPresetBtn",_55,this.CONTROLS_BUTTON_WIDTH,this.CONTROLS_BUTTON_HEIGHT,null,this.TOGGLE_CROSSHAIR_IMG,"Toggle Centre Mark","Turns the map centre mark on/off.");
if(this.SYSTEM.Settings.get("map_centre_mark")){
_59.turnOn();
}
this.zoomPresetBtn=_56;
this.panPresetBtn=_57;
this.rulerPresetBtn=_58;
var _5a=new w.TextButton("leftMinimapModeBtn",this.CHILD_MAP_IMG_WIDTH,this.CHILD_MAP_AUTO_TEXT);
var _5b=new w.Checkbox("leftMinimapStyleCheckbox");
_5b.allowLabel("Match map style",_5b.LABEL_LEFT,95);
var _5c=new w.Label("leftMinimapZoomLabel");
_5c.setText("Zoom offset");
var _5d=new w.DropText("leftMinimapZoomDropText",this.CHILD_MAP_ZOOM_SELECT_WIDTH,this.CHILD_MAP_ZOOM_SELECT_HEIGHT,this.CHILD_MAP_ZOOM_SELECT_WIDTH+4);
var _5e=new w.TextButton("rightMinimapModeBtn",this.CHILD_MAP_IMG_WIDTH,this.CHILD_MAP_AUTO_TEXT);
var _5f=new w.Checkbox("rightMinimapStyleCheckbox");
_5f.allowLabel("Match map style",_5f.LABEL_LEFT,95);
var _60=new w.Label("rightMinimapZoomLabel");
_60.setText("Zoom offset");
var _61=new w.DropText("rightMinimapZoomDropText",this.CHILD_MAP_ZOOM_SELECT_WIDTH,this.CHILD_MAP_ZOOM_SELECT_HEIGHT,this.CHILD_MAP_ZOOM_SELECT_WIDTH+4);
for(var _62=-3;_62<4;_62++){
_5d.addItem(_62,""+_62+"",""+_62+"");
_61.addItem(_62,""+_62+"",""+_62+"");
}
_5d.setSelectedValue(2);
_61.setSelectedValue(-2);
this.leftMinimapModeBtn=_5a;
this.leftMinimapStyleCheckbox=_5b;
this.leftMinimapZoomLabel=_5c;
this.leftMinimapZoomDropText=_5d;
this.rightMinimapModeBtn=_5e;
this.rightMinimapStyleCheckbox=_5f;
this.rightMinimapZoomLabel=_60;
this.rightMinimapZoomDropText=_61;
var _63=new w.Label("keywordLabel");
_63.setText("Keyword");
var _64=new w.Text("keywordText");
_64.setDimensions(this.KEYWORD_TXT_WIDTH);
var _65=new w.Label("keywordLabel2",this.SEARCH_KEYWORD_MIN_LENGTH+" characters minimum");
var _66=this.SYSTEM.Style.TEXT_BTN_HEIGHT;
var _67=new w.TextButton("searchBtn",60,"Search","Start search","Searches for the place you have entered and displays a new window with search results.");
this.keywordText=_64;
var _68=new w.Label("publicPointKeywordLabel");
_68.setText("Keyword");
var _69=new w.Text("publicPointKeywordText");
_69.setDimensions(this.KEYWORD_TXT_WIDTH);
var _6a=new w.Label("publicPointLabel",this.SEARCH_KEYWORD_MIN_LENGTH+" characters minimum");
var _6b=new w.TextButton("publicPointSearchBtn",_67.width,"Search");
this.publicPointKeywordText=_69;
var _6c=new w.TextButton("contactsOnMapBtn",150,"Contacts","Show contacts on map","Show which of your contacts are located on the current map.");
var _6d=this.SYSTEM.PeepelPoints.getPrivacyText(this.SYSTEM.PeepelPoints.PRIVACY_SHARED);
var _6e=this.SYSTEM.PeepelPoints.getPrivacyText(this.SYSTEM.PeepelPoints.PRIVACY_PUBLIC);
var _6f=new w.TextButton("sharedPointsOnMapBtn",_6c.width,_6d+"/"+_6e+" Points","Show "+_6d+"/"+_6e+" PeepelPoints on map","Show which "+_6d+"/"+_6e+" PeepelPoints are located on the current map.",null,125);
var _70=new w.ClassButton("setLocationBtn",2,this.QUICKNAV_BUTTON_WIDTH,this.QUICKNAV_BUTTON_HEIGHT,null,this.SET_LOC_IMG,"Set your location","The centre of the map will be recorded as your location.");
var _71=new w.ClassButton("setLocationClickBtn",2,this.QUICKNAV_BUTTON_WIDTH,this.QUICKNAV_BUTTON_HEIGHT,null,this.SET_LOC_CLICK_IMG,"Set your location","Click on the map to record where you are.");
var _72=new w.ClassButton("sendLocationBtn",2,this.QUICKNAV_BUTTON_WIDTH,this.QUICKNAV_BUTTON_HEIGHT,null,this.SEND_LOC_IMG,"Send your location","Send your location to someone via email.");
this.setLocationClickBtn=_71;
_3f.addTab("Map");
_3f.addTab("Find");
_3f.addTab("Minimap");
_3f.addUtility(_43);
_3f.addUtility(_44);
_3f.addUtility(_45);
_3f.addToolgroup("Zoom",this.ZOOM_TOOLGROUP_WIDTH,"Map");
_3f.addToolgroup("Quick Navigation",this.QUICKNAV_TOOLGROUP_WIDTH,"Map");
_3f.addToolgroup("Centre Mark",this.CENTRE_MARK_TG_WIDTH,"Map");
_3f.addToolgroup("Controls",(3*this.CONTROLS_BUTTON_WIDTH)+(4*this.pad),"Map");
_3f.addToolgroup("Your Location",this.CON_TRACKING_TOOLGROUP_WIDTH,"Map");
_3f.addToolgroup("Left Minimap",this.CHILD_TOOLGROUP_WIDTH,"Minimap");
_3f.addToolgroup("Right Minimap",this.CHILD_TOOLGROUP_WIDTH,"Minimap");
_3f.addToolgroup("Search Places",this.SEARCH_TOOLGROUP_WIDTH,"Find");
_3f.addToolgroup("Search Public PeepelPoints",this.SEARCH_TOOLGROUP_WIDTH,"Find");
_3f.addToolgroup("Show on Map",_6c.width+8,"Find");
_3f.addToolgroup("Test",180,"Test");
_3f.addWidget(_46,this.ZOOM_LBL_LEFT,this.ZOOM_LBL_TOP,"Zoom");
_3f.addWidget(_47,this.pad-1,this.pad-1,"Zoom");
_3f.addWidget(_48,this.ZOOM_TOOLGROUP_WIDTH-_48.width-this.pad-1,this.pad-1,"Zoom");
_3f.addWidget(_49,this.pad-1,_47.positionY+_47.height+(this.pad/2),"Zoom");
var _73=this.pad-1;
var top=_49.positionY+_49.barHeight;
for(var i=0;i<_4d.length;i++){
_3f.addWidget(_4d[i],_73,top,"Zoom");
_73+=_4d[i].width+1;
}
_3f.addWidget(_51,this.QUICKNAV_PADDING,this.QUICKNAV_PADDING,"Quick Navigation");
_3f.addWidget(_52,_51.positionX+_51.width+this.QUICKNAV_PADDING,this.QUICKNAV_PADDING,"Quick Navigation");
_3f.addWidget(_53,_52.positionX+_52.width+this.QUICKNAV_PADDING,this.QUICKNAV_PADDING,"Quick Navigation");
_3f.addWidget(_54,_53.positionX+_53.width+this.QUICKNAV_PADDING,this.QUICKNAV_PADDING,"Quick Navigation");
_3f.addWidget(_57,this.pad,this.pad,"Controls");
_3f.addWidget(_56,(this.pad*2)+this.CONTROLS_BUTTON_WIDTH,this.pad,"Controls");
_3f.addWidget(_58,(this.pad*3)+(2*this.CONTROLS_BUTTON_WIDTH),this.pad,"Controls");
_3f.addWidget(_59,(this.CENTRE_MARK_TG_WIDTH-_59.width)/2,this.pad,"Centre Mark");
_3f.addWidget(_5a,this.CHILD_MAP_MODE_BTN_LEFT,this.CHILD_MAP_MODE_BTN_TOP,"Left Minimap");
_3f.addWidget(_5b,this.CHILD_MAP_MODE_CHECKBOX_LEFT,this.CHILD_MAP_MODE_CHECKBOX_TOP,"Left Minimap");
_3f.addWidget(_5c,this.CHILD_MAP_ZOOMLBL_LEFT,this.CHILD_MAP_ZOOMLBL_TOP,"Left Minimap");
_3f.addWidget(_5d,this.CHILD_MAP_MODE_SELECT_LEFT,this.CHILD_MAP_MODE_SELECT_TOP,"Left Minimap");
_3f.addWidget(_5e,this.CHILD_MAP_MODE_BTN_LEFT,this.CHILD_MAP_MODE_BTN_TOP,"Right Minimap");
_3f.addWidget(_5f,this.CHILD_MAP_MODE_CHECKBOX_LEFT,this.CHILD_MAP_MODE_CHECKBOX_TOP,"Right Minimap");
_3f.addWidget(_60,this.CHILD_MAP_ZOOMLBL_LEFT,this.CHILD_MAP_ZOOMLBL_TOP,"Right Minimap");
_3f.addWidget(_61,this.CHILD_MAP_MODE_SELECT_LEFT,this.CHILD_MAP_MODE_SELECT_TOP,"Right Minimap");
_3f.addWidget(_63,this.KEYWORD_LBL_LEFT,this.KEYWORD_LBL_TOP,"Search Places");
_3f.addWidget(_65,this.KEYWORD_LBL_LEFT,this.SEARCH_BTN_TOP,"Search Places");
_3f.addWidget(_64,this.KEYWORD_TXT_LEFT,this.KEYWORD_TXT_TOP,"Search Places");
_3f.addWidget(_67,this.SYSTEM.Style.WIDGET_PADDING,this.SEARCH_BTN_TOP,"Search Places",true,true);
_3f.addWidget(_68,this.KEYWORD_LBL_LEFT,this.KEYWORD_LBL_TOP,"Search Public PeepelPoints");
_3f.addWidget(_69,this.KEYWORD_TXT_LEFT,this.KEYWORD_TXT_TOP,"Search Public PeepelPoints");
_3f.addWidget(_6a,this.KEYWORD_LBL_LEFT,this.SEARCH_BTN_TOP,"Search Public PeepelPoints");
_3f.addWidget(_6b,this.SYSTEM.Style.WIDGET_PADDING,this.SEARCH_BTN_TOP,"Search Public PeepelPoints",true,true);
_3f.addWidget(_6c,this.pad,this.pad,"Show on Map");
_3f.addWidget(_6f,this.pad,_6c.positionY+_6c.height+this.pad,"Show on Map");
_3f.addWidget(_70,this.pad,this.pad,"Your Location");
_3f.addWidget(_71,_70.positionX+_70.width+this.pad,this.pad,"Your Location");
_3f.addWidget(_72,_71.positionX+_71.width+this.pad,this.pad,"Your Location");
if(DEBUG_MESSAGES){
_3f.addTab("Test");
var _75=new this.SYSTEM.Widget.DropText("testSelect",100);
_75.addItem("coords test","Show coords from text");
_75.addItem("draw","Draw map objs");
_75.addItem("centrecoords","Get map centre coords");
_75.addItem("jumptile","Jump to tileset");
_3f.addWidget(_75,4,30,"Test");
}
var _76=this.SYSTEM.Panel.panelSwitcher.positionX+_3f.positionX+adToolgroup_t.prototype.WIDTH+22;
var _77=_3f.positionY+3;
_49.setScreenPosition(_76+_49.positionX,_77+this.ZOOM_SLIDER_TOP);
}
catch(ex){
jsExDebug("mapApp_createPanel",ex);
}
}
function mapApp_setMapDimensions(_78,_79,_7a,_7b){
try{
this.map.setDimensions(this.mapFrame.getInternalWidth(_78)-2,this.mapFrame.getInternalHeight(_79)-(this.CONTROL_PANEL_HEIGHT+this.CONTROL_PANEL_MAP_PAD)-2);
if(this.rightMinimapMode==this.MINIMAP_MODE_AUTO){
if((_78<this.RIGHT_MINI_VANISH_X&&_79<this.RIGHT_MINI_VANISH_Y)||(_79<this.RIGHT_MINI_VANISH_Y&&this.timelineEnabled)){
this.hideRightMinimap();
}else{
this.showRightMinimap(_7a,_7b);
}
}else{
if(this.rightMinimapMode==this.MINIMAP_MODE_ON&&this.timelineEnabled){
if(_79<this.RIGHT_MINI_VANISH_Y_ON){
this.hideRightMinimap();
}else{
this.showRightMinimap(_7a,_7b);
}
}
}
if(this.leftMinimapMode==this.MINIMAP_MODE_AUTO){
if((_78<this.LEFT_MINI_VANISH_X&&_79<this.LEFT_MINI_VANISH_Y)||(_79<this.LEFT_MINI_VANISH_Y&&this.timelineEnabled)){
this.hideLeftMinimap();
}else{
this.showLeftMinimap(_7a,_7b);
}
}else{
if(this.leftMinimapMode==this.MINIMAP_MODE_ON&&this.timelineEnabled){
if(_79<this.LEFT_MINI_VANISH_Y_ON){
this.hideLeftMinimap();
}else{
this.showLeftMinimap(_7a,_7b);
}
}
}
}
catch(ex){
jsExDebug("mapApp_setMapDimensions",ex);
}
}
function mapApp_showRightMinimap(_7c,_7d){
try{
if(this.rightMinimapVisible){
return;
}
this.rightMinimapVisible=true;
if(!this.rightMinimap){
var _7e=new map_t(this);
_7e.setPosition(0,0,1,1);
_7e.setDimensions(this.MINIMAP_WIDTH,this.MINIMAP_HEIGHT);
_7e.disableDrag();
_7e.disableDoubleClick();
_7e.disableSingleClick();
var _7f=document.createElement("div");
_7f.style.position="absolute";
_7f.style.width="110px";
_7f.style.height="110px";
_7f.style.backgroundColor="rgb(231,241,250)";
_7f.style.borderTop="solid 1px rgb( 125, 120, 175 )";
_7f.style.borderLeft="solid 1px rgb( 125, 120, 175 )";
this.mapFrame.windowDiv.appendChild(_7f);
this.rightMinimap=_7e;
this.rightContainerDiv=_7f;
}
this.rightContainerDiv.style.right=(_7c-this.map.positionX-this.map.width-2)+"px";
this.rightContainerDiv.style.bottom=(_7d-this.map.positionY-this.map.height-2)+"px";
this.rightContainerDiv.style.visibility="visible";
this.map.addChildMap(this.rightMinimap,this.rightMinimapZoomDropText.getSelectedValue(),this.rightMinimapStyleCheckbox.isChecked());
this.rightMinimap.attach(this.rightContainerDiv);
}
catch(ex){
jsExDebug("mapApp_showRightMinimap",ex);
}
}
function mapApp_hideRightMinimap(){
try{
if(!this.rightMinimapVisible){
return;
}
this.rightMinimapVisible=false;
this.rightContainerDiv.style.visibility="hidden";
this.rightMinimap.detach();
this.rightMinimap.unlinkFromParentMap();
}
catch(ex){
jsExDebug("mapApp_hideRightMinimap",ex);
}
}
function mapApp_showLeftMinimap(_80,_81){
try{
if(this.leftMinimapVisible){
return;
}
this.leftMinimapVisible=true;
if(!this.leftMinimap){
var _82=new map_t(this);
_82.setPosition(0,0,0,1);
_82.setDimensions(this.MINIMAP_WIDTH,this.MINIMAP_HEIGHT);
_82.disableDrag();
_82.disableDoubleClick();
_82.disableSingleClick();
var _83=document.createElement("div");
_83.style.position="absolute";
_83.style.width="110px";
_83.style.height="110px";
_83.style.backgroundColor="rgb(231,241,250)";
_83.style.borderTop="solid 1px rgb( 125, 120, 175 )";
_83.style.borderRight="solid 1px rgb( 125, 120, 175 )";
this.mapFrame.windowDiv.appendChild(_83);
this.leftMinimap=_82;
this.leftContainerDiv=_83;
}
this.leftContainerDiv.style.left=this.map.positionX+"px";
this.leftContainerDiv.style.bottom=(_81-this.map.positionY-this.map.height-2)+"px";
this.leftContainerDiv.style.visibility="visible";
this.map.addChildMap(this.leftMinimap,this.leftMinimapZoomDropText.getSelectedValue(),this.leftMinimapStyleCheckbox.isChecked());
this.leftMinimap.attach(this.leftContainerDiv);
}
catch(ex){
jsExDebug("mapApp_showLeftMinimap",ex);
}
}
function mapApp_hideLeftMinimap(){
try{
if(!this.leftMinimapVisible){
return;
}
this.leftMinimapVisible=false;
this.leftContainerDiv.style.visibility="hidden";
this.leftMinimap.detach();
this.leftMinimap.unlinkFromParentMap();
}
catch(ex){
jsExDebug("mapApp_hideLeftMinimap",ex);
}
}
function mapApp_setRightMinimapMode(_84){
try{
var _85=true;
this.rightMinimapMode=_84;
var _86=this.mapFrame.width;
var _87=this.mapFrame.height;
switch(_84){
case this.MINIMAP_MODE_ON:
this.showRightMinimap(_86,_87);
break;
case this.MINIMAP_MODE_OFF:
this.hideRightMinimap();
_85=false;
break;
case this.MINIMAP_MODE_AUTO:
if(this.width<this.RIGHT_MINI_VANISH_X&&this.height<this.RIGHT_MINI_VANISH_Y){
this.hideRightMinimap();
}else{
this.showRightMinimap(_86,_87);
}
break;
}
if(_85){
this.rightMinimapStyleCheckbox.show();
this.rightMinimapZoomDropText.show();
this.rightMinimapZoomLabel.show();
}else{
this.rightMinimapStyleCheckbox.hide();
this.rightMinimapZoomDropText.hide();
this.rightMinimapZoomLabel.hide();
}
}
catch(ex){
jsExDebug("mapApp_setRightMinimapMode",ex);
}
}
function mapApp_setLeftMinimapMode(_88){
try{
var _89=true;
this.leftMinimapMode=_88;
var _8a=this.mapFrame.width;
var _8b=this.mapFrame.height;
switch(_88){
case this.MINIMAP_MODE_ON:
this.showLeftMinimap(_8a,_8b);
break;
case this.MINIMAP_MODE_OFF:
this.hideLeftMinimap();
_89=false;
break;
case this.MINIMAP_MODE_AUTO:
if(this.width<this.LEFT_MINI_VANISH_X&&this.height<this.LEFT_MINI_VANISH_Y){
this.hideLeftMinimap();
}else{
this.showLeftMinimap(_8a,_8b);
}
break;
}
if(_89){
this.leftMinimapStyleCheckbox.show();
this.leftMinimapZoomDropText.show();
this.leftMinimapZoomLabel.show();
}else{
this.leftMinimapStyleCheckbox.hide();
this.leftMinimapZoomDropText.hide();
this.leftMinimapZoomLabel.hide();
}
}
catch(ex){
jsExDebug("mapApp_setLeftMinimapMode",ex);
}
}
function mapApp_detachMap(){
try{
}
catch(ex){
jsExDebug("mapApp_detachMap",ex);
}
}
function mapApp_printMap(){
try{
}
catch(ex){
jsExDebug("mapApp_printMap",ex);
}
}
function mapApp_launchMapInfoFrame(){
try{
if(!this.mapInfoFrame){
var _8c=500;
var _8d=new this.SYSTEM.Frame.Window("mapInfoFrame","map information",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_8d.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var w=this.SYSTEM.Widget;
var _8f=new w.Label("mapInfoQuickLaunchLabel","Quick Launch Address");
var _90=new w.Text("mapInfoQuickLaunchText");
_90.setDimensions(_8d.getInternalWidth());
var _91=new w.Label("mouseCoordsTitle");
_91.setText("Click map for mouse coordinates:");
_91.setBold();
_91.setUnderline();
_91.setDimensions(_8d.getInternalWidth(),20);
var _92=new w.Text("coordinatesText",1);
_92.setDimensions(_8d.getInternalWidth(_8c)-3,100);
var _93=new w.Checkbox("typeCheckbox");
_93.allowLabel("Show mercator metres",_93.LABEL_RIGHT,140);
var _94=new w.TextButton("mapInfoClearBtn",50,"Clear");
var _95=new w.TextButton("mapInfoExportBtn",135,"Send to WebSheet");
this.mapInfoFrame=_8d;
this.mapInfoCoordinatesText=_92;
this.mapInfoClearBtn=_94;
this.mapInfoCurrentCoord=null;
var _96=_8d.topEdgeHeight;
var _97=_8d.leftEdgeWidth;
_8d.addWidget(_8f,_97,_96);
_8d.addWidget(_90,_97,_8f.positionY+_8f.getClientHeight()+this.pad);
_8d.addWidget(_91,_97,_90.positionY+_90.getClientHeight()+this.pad);
_8d.addWidget(_92,_97,_91.positionY+_91.getClientHeight()+this.pad);
_8d.addWidget(_93,_97,_92.positionY+_92.getClientHeight()+this.pad);
_8d.addWidget(_94,_8d.rightEdgeWidth,_8d.bottomEdgeHeight,true,true);
_8d.addWidget(_95,_8d.rightEdgeWidth+_94.width+this.pad,_8d.bottomEdgeHeight,true,true);
_8d.setFixedDimensions(_8c,_93.positionY+_93.getClientHeight()+this.pad+_94.height+_8d.bottomEdgeHeight);
}
this.mapInfoFrame.getWidget("mapInfoQuickLaunchText").setContent(this.getQuickLaunchAddress());
this.mapInfoFrame.show();
this.infoFrameVisible=true;
}
catch(ex){
jsExDebug("mapApp_launchMapInfoFrame",ex);
}
}
function mapApp_setInfoFrameCurrentCoords(_98){
try{
if(_98!=null){
if(this.mapInfoFrame.getWidget("typeCheckbox").isChecked()){
this.mapInfoCurrentCoord=_98.toString();
}else{
_98.getDecimalCoordinates();
this.mapInfoCurrentCoord=[_98.decimalY,_98.decimalX,_98.zoom].join(",");
}
if(DEBUG_MESSAGES){
var _99=_98.getTileset();
var _9a=_98.getTile();
this.mapInfoCurrentCoord+="(tsX:"+_99.x+",tsY:"+_99.y+",tX:"+_9a.x+",tY:"+_9a.y+",tNum:"+(_9a.x+(_9a.y*64))+")";
}
this.mapInfoCoordinatesText.appendContent(this.mapInfoCurrentCoord+"\r\n");
}
}
catch(ex){
jsExDebug("mapApp_setInfoFrameCurrentCoords",ex);
}
}
function mapApp_launchMapErrorFrame(){
try{
if(!this.errorFrame){
var _9b=360;
var _9c=200;
var _9d=new this.SYSTEM.Frame.Window("errorFrame","Report map error",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_9d.windowDiv.style.overflow="hidden";
_9d.boundary=_9e;
_9d.setMinimumSize(_9b,_9c);
_9d.setMaximumSize(_9b,_9c);
_9d.setDimensions(_9b,_9c);
_9d.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var _9e=this.map.getBoundaryCoordinates();
var _9f=new this.SYSTEM.Widget.Label("boundsLabel");
_9f.setText("Bounds: "+_9e);
_9f.widgetElement.style.width=_9d.getInternalWidth()+"px";
_9f.widgetElement.style.overflow="hidden";
_9f.widgetElement.style.whiteSpace="nowrap";
_9e.cleanUp();
var _a0=new this.SYSTEM.Widget.Text("textArea",1);
_a0.setDimensions(300,100);
var _a1=new this.SYSTEM.Widget.Link("errorSendLink","Send error");
this.errorFrame=_9d;
this.errorBoundsLabel=_9f;
this.errorTextArea=_a0;
this.errorSendLink=_a1;
var _a2=_9d.leftEdgeWidth;
var _a3=_9d.topEdgeHeight;
_9d.addWidget(_9f,_a2,_a3);
_9d.addWidget(_a0,_a2,_a3+20);
_9d.addWidget(_a1,_9b-95,_9c-35);
}
this.errorFrame.show();
}
catch(ex){
jsExDebug("mapApp_launchMapErrorFrame",ex);
}
}
function mapApp_launchSavePeepelPointFrame(){
try{
if(!this.savePeepelPointFrame){
var _a4=280;
var _a5=250;
var _a6=new this.SYSTEM.Frame.Window("savePeepelPointFrame","New PeepelPoint",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_a6.allowWindowOverflow();
_a6.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var _a7=_a6.leftEdgeWidth;
var _a8=_a6.topEdgeHeight;
var _a9=90;
var _aa=this.SYSTEM.Widget;
var _ab=new _aa.Label("nameLabel","Name");
var _ac=new _aa.Text("nameText");
var _ad=new _aa.Label("descriptionLabel","Description");
var _ae=new _aa.Text("savePeepelPointDescriptionText",true);
_ae.setDimensions(142,60);
var _af=new _aa.Label("tagsLabel","Search Tags");
var _b0=new _aa.Label("tagsLabel","(separate with commas)");
var _b1=new _aa.Text("savePeepelPointTagsText");
var _b2=this.SYSTEM.PeepelPoints.getPrivacyText(this.SYSTEM.PeepelPoints.PRIVACY_PRIVATE);
var _b3=this.SYSTEM.PeepelPoints.getPrivacyText(this.SYSTEM.PeepelPoints.PRIVACY_SHARED);
var _b4=this.SYSTEM.PeepelPoints.getPrivacyText(this.SYSTEM.PeepelPoints.PRIVACY_PUBLIC);
var _b5=new _aa.Label("privacyLabel","Privacy");
var _b6=new _aa.DropText("privacySelect",_ae.width-30);
_b6.addItem(this.SYSTEM.PeepelPoints.PRIVACY_PRIVATE,_b2+" (only you can see)",_b2);
_b6.addItem(this.SYSTEM.PeepelPoints.PRIVACY_SHARED,_b3+" (shared with your contacts)",_b3);
_b6.addItem(this.SYSTEM.PeepelPoints.PRIVACY_PUBLIC,_b4+" (all users can see)",_b4);
_b6.setSelectedValue(this.SYSTEM.PeepelPoints.PRIVACY_PRIVATE);
var _b7=new _aa.TextButton("savePeepelPointSaveBtn",50,"Save","Save","Save the PeepelPoint");
this.savePeepelPointKeyPressIndex=this.SYSTEM.Event.notifyKeyPressEvent(this.savePeepelPointKeyPressEvent,this);
this.savePeepelPointFrame=_a6;
this.savePeepelPointNameText=_ac;
this.savePeepelPointDescriptionText=_ae;
this.savePeepelPointTagsText=_b1;
this.savePeepelPointPrivacySelect=_b6;
var _b8=2*this.pad;
_a6.addWidget(_ab,_a7,_a8+this.pad);
_a6.addWidget(_ac,_a7+_a9,_a8);
_a6.addWidget(_ad,_a7,_ab.positionY+_ab.getClientHeight()+_b8);
_a6.addWidget(_ae,_a7+_a9,_ad.positionY);
_a6.addWidget(_af,_a7,_ad.positionY+_ae.height+_b8);
_a6.addWidget(_b0,_a7,_af.positionY+_af.getClientHeight()+_b8);
_a6.addWidget(_b1,_a7+_a9,_af.positionY);
_a6.addWidget(_b5,_a7,_b0.positionY+_b0.getClientHeight()+_b8);
_a6.addWidget(_b7,_a6.leftEdgeWidth,_a6.bottomEdgeHeight,true,true);
_a6.addWidget(_b6,_a7+_a9,_b5.positionY);
_a6.setFixedDimensions(_a4,_b6.positionY+_b6.height+this.pad+_b7.height+_a6.bottomEdgeHeight);
}
this.savePeepelPointFrame.show();
this.savePeepelPointNameText.focus();
}
catch(ex){
jsExDebug("mapApp_launchSavePeepelPointFrame",ex);
}
}
function mapApp_savePeepelPointFrameSave(){
function callback(_b9){
try{
this.jumpToPeepelPoint(_b9);
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("mapApp_savePeepelPointFrameSave: callback",ex);
}
}
function tooltipTimeout(){
try{
this.SYSTEM.PeepelPoints.addPeepelPoint(this.savePeepelPointCoordinate,_ba,this.savePeepelPointDescriptionText.getContent(),this.savePeepelPointTagsText.getContent(),this.savePeepelPointPrivacySelect.getSelectedValue(),new this.SYSTEM.Delegate(this,callback));
this.savePeepelPointNameText.widgetElement.blur();
this.savePeepelPointFrame.close();
}
catch(ex){
jsExDebug("mapApp_savePeepelPointFrameSave: tooltipTimeout",ex);
}
}
try{
if(!this.map){
return;
}
var _ba=this.savePeepelPointNameText.getContent();
if(!_ba){
var d=new this.SYSTEM.Dialogue.OkAlert(this,"WebMap","Please give a name for the PeepelPoint.");
return;
}
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),this.APP_NAME,"Saving "+_ba+"...");
}
catch(ex){
jsExDebug("mapApp_savePeepelPointFrameSave",ex);
}
}
function mapApp_jumpToPeepelPoint(_bc,_bd,_be){
try{
if(!_bc){
return;
}
var _bf=this.map.showPoi(_bc,(_bd!=null?_bd:true),(_be!=null?_be:true),true);
this.sidebar.setPointOnMap(_bc.locationId,_bf.getHashString());
}
catch(ex){
jsExDebug("mapApp_jumpToPeepelPoint",ex);
}
}
function mapApp_launchJumpToCoordinatesFrame(){
try{
if(!this.jumpToCoordsFrame){
var _c0=370;
var _c1=120;
var _c2=new this.SYSTEM.Frame.Window("jumpToCoordsFrame","Jump to coordinates",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_c2.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var _c3=new this.SYSTEM.Widget.Label("infoLabel");
_c3.setText("Coordinates should be in mercator metres by default.");
var _c4=new this.SYSTEM.Widget.Label("latLabel");
_c4.setText("Lat:");
var _c5=new this.SYSTEM.Widget.Text("latText");
_c5.setWidth(100);
var _c6=new this.SYSTEM.Widget.Label("longLabel");
_c6.setText("Long:");
var _c7=new this.SYSTEM.Widget.Text("longText");
_c7.setWidth(100);
var _c8=new this.SYSTEM.Widget.Checkbox("jumpDecimalCheckbox");
_c8.allowLabel("Use decimal degrees coordinates",_c8.LABEL_RIGHT,200);
var _c9=new this.SYSTEM.Widget.Link("jumpJumpLink","Jump");
this.jumpToCoordsFrame=_c2;
this.jumpInfoLabel=_c3;
this.jumpLatLabel=_c4;
this.jumpLatText=_c5;
this.jumpLongLabel=_c6;
this.jumpLongText=_c7;
this.jumpDecimalCheckbox=_c8;
this.jumpJumpLink=_c9;
var _ca=_c2.leftEdgeWidth;
var _cb=_c2.topEdgeHeight;
_c2.addWidget(_c3,_ca,_cb);
_c2.addWidget(_c4,_ca,_cb+30);
_c2.addWidget(_c5,_ca+40,_cb+30);
_c2.addWidget(_c6,_ca+170,_cb+30);
_c2.addWidget(_c7,_ca+210,_cb+30);
_c2.addWidget(_c8,_ca,_cb+60);
_c2.addWidget(_c9,_ca+280,_cb+60);
_c2.setFixedDimensions(_c0,_c8.positionY+_c8.getClientHeight()+_c2.bottomEdgeHeight);
}
this.jumpToCoordsFrame.show();
}
catch(ex){
jsExDebug("mapApp_launchJumpToCoordinatesFrame",ex);
}
}
function mapApp_searchCallback(_cc){
try{
if(!_cc[0]||!_cc[0].locations){
var _cd=new this.SYSTEM.Dialogue.OkAlert(this,"WebMap","There were no results for your search.",null,310);
}else{
this.launchSearchResultsFrame(this.currentSearchKeyword,_cc[0].locations);
}
this.SYSTEM.Tooltip.hideLoading();
this.currentSearchKeyword=null;
}
catch(ex){
jsExDebug("mapApp_searchCallback",ex);
}
}
function mapApp_publicPointSearchCallback(_ce){
try{
if(!_ce||!_ce.length){
var _cf=new this.SYSTEM.Dialogue.OkAlert(this,"WebMap","There were no results for your search.",null,310);
}else{
this.launchPublicPointSearchResultsFrame(this.currentPublicPointSearchKeyword,_ce);
}
this.SYSTEM.Tooltip.hideLoading();
this.currentPublicPointSearchKeyword=null;
}
catch(ex){
jsExDebug("mapApp_publicPointSearchCallback",ex);
}
}
function mapApp_launchSearchResultsFrame(_d0,_d1){
try{
if(_d1&&_d1.length){
var _d2=new this.SYSTEM.Frame.Window("searchResultsFrame","Search Results",this,this.SEARCH_RESULTS_WIDTH,this.SEARCH_RESULTS_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN);
_d2.setMinimumSize(this.SEARCH_RESULTS_WIDTH,this.SEARCH_RESULTS_HEIGHT);
_d2.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var _d3=_d1.length;
if(_d3>this.MAX_SEARCH_RESULT_COUNT){
var d=new this.SYSTEM.Dialogue.OkAlert(this,"Search Results","There were a "+_d3+" results returned by your search, only the first "+this.MAX_SEARCH_RESULT_COUNT+" are shown");
_d3=this.MAX_SEARCH_RESULT_COUNT;
}
var _d5=new this.SYSTEM.Widget.Label("searchResultsLabel");
_d5.setText("Search '"+_d0+"' returned "+_d3+" results.");
var _d6=new this.SYSTEM.Widget.TextButton("searchResultsMapBtn",170,"View selected locations");
_d6.setValue(_d0);
var _d7=new this.SYSTEM.Widget.Button("searchResultsUpBtn",this.UP_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE,this.SCROLL_BTN_SIDE,this.SCROLL_BTN_SIDE);
_d7.setValue(_d0);
_d7.enableTypematic(this.TYPEMATIC_PERIOD);
var _d8=new this.SYSTEM.Widget.Button("searchResultsDownBtn",this.DOWN_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE,this.SCROLL_BTN_SIDE,this.SCROLL_BTN_SIDE);
_d8.setValue(_d0);
_d8.enableTypematic(this.TYPEMATIC_PERIOD);
var _d9=new this.SYSTEM.Widget.SortTable("table",["Name","View"],300);
var _da={};
_da.locations=[];
_da.checkboxes=[];
_da.table=_d9;
var _db=null;
var _dc=null;
var _dd=null;
for(var i=0;i<_d3;i++){
_dd=_d1[i].label.split(",");
_d1[i].name=_dd[0];
_d1[i].country=_dd[1];
_db=_d9.addRow(null,_d1[i].name,_d1[i].country);
_dc=new this.SYSTEM.Widget.Checkbox("matchCheckbox_"+i);
_dc.makeRelativePositioned();
_d9.addWidgetToRow(_db,"View",_dc);
_da.locations[_db]=_d1[i];
_da.checkboxes[_db]=_dc;
}
_d9.sortByHeading("Name");
_d9.setCellPadding(5);
_d9.setColumnWidth(0,150);
_d9.refresh();
this.searchResults[_d0]=_da;
var _df=_d2.leftEdgeWidth;
var top=_d2.topEdgeHeight;
_d2.addWidget(_d5,_df,top);
_d2.addWidget(_d6,_d2.rightEdgeWidth,_d2.bottomEdgeHeight,true,true);
_d2.addWidget(_d8,_d2.rightEdgeWidth,_d6.positionY+_d6.height+this.pad,true,true);
_d2.addWidget(_d7,_d2.rightEdgeWidth,_d8.positionY+_d8.height+this.pad,true,true);
_d2.addWidget(_d9,_df,top+_d5.getClientHeight()+this.pad);
_d2.setDimensions(_d2.width,_d2.height);
_d2.show();
}else{
var d=new this.SYSTEM.Dialogue.OkAlert(this,this.APP_NAME,["There were no results for '",_d0,"'."].join(""));
}
}
catch(ex){
jsExDebug("mapApp_launchSearchResultsFrame",ex);
}
}
function mapApp_launchPublicPointSearchResultsFrame(_e1,_e2){
try{
var _e3=new this.SYSTEM.Frame.Window("searchResultsFrame","PeepelPoint Search Results",this,this.PP_SEARCH_RESULTS_WIDTH,this.SEARCH_RESULTS_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN);
_e3.setMinimumSize(this.SEARCH_RESULTS_WIDTH,this.SEARCH_RESULTS_HEIGHT);
_e3.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var _e4=_e2.length;
if(_e4>this.MAX_SEARCH_RESULT_COUNT){
var d=new this.SYSTEM.Dialogue.OkAlert(this,"PeepelPoint Search Results","There were a "+_e4+" results returned by your search, only the first "+this.MAX_SEARCH_RESULT_COUNT+" are shown");
_e4=this.MAX_SEARCH_RESULT_COUNT;
}
var _e6=new this.SYSTEM.Widget.Label("searchResultsLabel");
_e6.setText("Search '"+_e1+"' returned "+_e2.length+" points.");
var _e7=new this.SYSTEM.Widget.TextButton("searchResultsMapBtn",170,"View selected points");
_e7.setValue(_e1);
var _e8=new this.SYSTEM.Widget.Button("searchResultsUpBtn",this.UP_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE,this.SCROLL_BTN_SIDE,this.SCROLL_BTN_SIDE);
_e8.setValue(_e1);
_e8.enableTypematic(this.TYPEMATIC_PERIOD);
var _e9=new this.SYSTEM.Widget.Button("searchResultsDownBtn",this.DOWN_IMG,button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE,this.SCROLL_BTN_SIDE,this.SCROLL_BTN_SIDE);
_e9.setValue(_e1);
_e9.enableTypematic(this.TYPEMATIC_PERIOD);
var _ea=new this.SYSTEM.Widget.SortTable("table",["Name","Description","Tags","View"],300);
_ea.setColumnWidth(0,200);
_ea.setColumnWidth(1,200);
_ea.setColumnWidth(2,200);
var _eb={};
_eb.locations=[];
_eb.checkboxes=[];
_eb.table=_ea;
var _ec=null;
var _ed=null;
var _ee=null;
for(var i=0;i<_e4;i++){
_ec=_ea.addRow(null,_e2[i].label,_e2[i].description,_e2[i].tags);
_ed=new this.SYSTEM.Widget.Checkbox("matchCheckbox_"+i);
_ed.makeRelativePositioned();
_ea.addWidgetToRow(_ec,"View",_ed);
_eb.locations[_ec]=_e2[i];
_eb.checkboxes[_ec]=_ed;
}
_ea.sortByHeading("Name");
_ea.setCellPadding(5);
_ea.refresh();
this.searchResults[_e1]=_eb;
var _f0=_e3.leftEdgeWidth;
var top=_e3.topEdgeHeight;
_e3.addWidget(_e6,_f0,top);
_e3.addWidget(_e7,_e3.rightEdgeWidth,_e3.bottomEdgeHeight,true,true);
_e3.addWidget(_e9,_e3.rightEdgeWidth,_e7.positionY+_e7.height+this.pad,true,true);
_e3.addWidget(_e8,_e3.rightEdgeWidth,_e9.positionY+_e9.height+this.pad,true,true);
_e3.addWidget(_ea,_f0,top+_e6.getClientHeight()+this.pad);
_e3.setDimensions(_e3.width,_e3.height);
_e3.show();
}
catch(ex){
jsExDebug("mapApp_launchPublicPointSearchResultsFrame",ex);
}
}
function mapApp_addContactToMap(_f2,_f3,_f4){
try{
if(_f2){
if(this.map.isContactOnMap(_f2.contactId)){
this.map.goToLatestContactLocation(_f2.contactId);
}else{
var _f5=this.SYSTEM.Contacts.getContactLocation(_f2.contactId);
if(_f5){
var _f6=this.map.showContact(_f5,_f2,true,false,_f3);
this.sidebar.setContactOnMap(_f2.contactId,_f6.getHashString());
}else{
if(_f4){
this.waitForUserLocation(_f2.userId);
}else{
if(this.SYSTEM.UserDetails.isLegalTrackingAge()){
if(_f2&&_f2.contactId){
var d=new this.SYSTEM.Dialogue.OkAlert(this,"Webmap","<b>"+_f2.userName+"</b> has not allowed you to track them at this time.");
}
}else{
this.showUnderAgeAlert();
}
}
}
}
}
}
catch(ex){
jsExDebug("mapApp_addContactToMap",ex);
}
}
function mapApp_setUserLocation(_f8){
function responseHandler(xml,me,_fb){
try{
var _fc=xml.getElementsByTagName("success");
if(_fc[0]&&_fc[0].firstChild.nodeValue=="0"){
if(me.map.isUserOnMap()){
me.map.waitForNextUserLocation();
return;
}
}else{
var d=new me.SYSTEM.Dialogue.OkAlert(me,"Webmap","An error occured setting your location, please try again.");
}
me.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("mapApp_setUserLocation: responseHandler",ex);
}
}
function tooltipTimeout(){
try{
this.SYSTEM.Network.asyncRequest(this.SYSTEM.Network.SERVICES_PATH+"?service=tracking&action="+this.ACTION_SET_USER_LOCATION,"location="+parseInt(_f8.mercY)+","+parseInt(_f8.mercX),responseHandler,this);
}
catch(ex){
jsExDebug("mapApp_setUserLocation: tooltipTimeout",ex);
}
}
try{
if(this.SYSTEM.UserDetails.isLegalTrackingAge()){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),"Webmap","Setting your location...");
}else{
this.showUnderAgeAlert();
}
}
catch(ex){
jsExDebug("mapApp_setUserLocation",ex);
}
}
function mapApp_getUserLocation(_fe,_ff){
try{
if(this.map.isUserOnMap()){
this.map.goToLatestUserLocation();
}else{
var _100=this.SYSTEM.Tracking.getMyLocation();
if(_100){
var _101=this.map.showUserLocation(_100,true,_fe);
this.sidebar.setUserOnMap(_101.getHashString());
}else{
if(!this.SYSTEM.UserDetails.isLegalTrackingAge()){
this.showUnderAgeAlert();
}else{
if(_ff){
this.waitForUserLocation(this.SYSTEM.UserDetails.id);
}
}
}
}
}
catch(ex){
jsExDebug("mapApp_getUserLocation",ex);
}
}
function mapApp_showUnderAgeAlert(){
function callback(){
try{
this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_ACCOUNT_MANAGER,null,"Launching Profile...");
}
catch(ex){
jsExDebug("mapApp_showUnderAgeAlert: callback",ex);
}
}
try{
var d=new this.SYSTEM.Dialogue.OkAlert(this,"Age Verification","You cannot track any of your contacts or be tracked yourself until you have verified that you are over 13 years old.",new this.SYSTEM.Delegate(this,callback),null,"Change your age",120);
}
catch(ex){
jsExDebug("mapApp_showUnderAgeAlert",ex);
}
}
function mapApp_showSideBar(){
try{
if(this.sidebar.visible){
return;
}
this.sideBarToggleBtn.setPosition(this.sidebar.width+this.mapFrame.rightEdgeWidth+this.SYSTEM.Style.WIDGET_PADDING,null,true);
this.sidebar.show(true);
this.mapFrame.setDimensions(this.mapFrame.width,this.mapFrame.height);
this.sideBarToggleBtn.setImage(this.HOR_TOGGLE_RIGHT_IMG);
}
catch(ex){
jsExDebug("mapApp_showSideBar",ex);
}
}
function mapApp_hideSideBar(){
try{
if(!this.sidebar.visible){
return;
}
this.sideBarToggleBtn.setPosition(this.mapFrame.rightEdgeWidth,null,true);
this.sidebar.hide(true);
this.mapFrame.setDimensions(this.mapFrame.width,this.mapFrame.height);
this.sideBarToggleBtn.setImage(this.HOR_TOGGLE_LEFT_IMG);
}
catch(ex){
jsExDebug("mapApp_hideSideBar",ex);
}
}
function mapApp_showQuickLaunchPoints(){
try{
if(this.quickLaunchPointNames){
for(var i=0;i<this.quickLaunchPointNames.length;i++){
var _104=this.SYSTEM.PeepelPoints.getPointFromName(this.quickLaunchPointNames[i]);
if(_104&&this.quickLaunchPointNames.length==1){
this.jumpToPeepelPoint(_104,true,true);
}else{
this.jumpToPeepelPoint(_104,true,false);
}
}
this.quickLaunchPointNames=null;
}
this.SYSTEM.PeepelPoints.unregisterActionListener(this.pointsActionIndex);
this.pointsActionIndex=null;
}
catch(ex){
jsExDebug("mapApp_showQuickLaunchPoints",ex);
}
}
function mapApp_showQuickLaunchUsers(zoom){
function publicLocationCallback(_106,_107,_108,_109,_10a){
try{
var _10b=this.SYSTEM.Tracking.getUserLocation(_106);
if(_10b){
_10b.setZoom(zoom);
var mo=this.map.showPublicUserLocation(_10b,_106,_108,_109,_10a,true,false);
var _10d=_106;
this.sidebar.addPublicUser(_10d,_108,_109,_10a);
this.sidebar.setPublicUserOnMap(_10d,mo.getHashString());
this.sidebar.applySearchAndSort();
if(_10e[_107]){
this.map.startFollowingUser(null,true,_106);
}
}
}
catch(ex){
jsExDebug("mapApp_showQuickLaunchUsers: publicLocationCallback",ex);
}
}
try{
var _10e=[];
if(this.quickLaunchUserEmails){
var _10f=null;
for(var i=0;i<this.quickLaunchUserEmails.length;i++){
_10f=this.quickLaunchUserEmails[i];
if(_10f.match(/\:f$/)){
_10f=_10f.replace(/\:f$/,"");
_10e[_10f]=true;
}
if(_10f==this.SYSTEM.UserDetails.emailAddress){
if(_10e[_10f]){
this.map.startFollowingUser(null,true);
}
this.getUserLocation((zoom?false:true),true);
if(zoom){
this.map.zoomToLevel(zoom);
}
}else{
var _111=this.SYSTEM.Contacts.getContactIdFromEmail(_10f);
if(_111){
if(_10e[_10f]){
this.map.startFollowingUser(_111);
}
var _112=this.SYSTEM.Contacts.getContact(_111);
this.addContactToMap(_112,(zoom?false:true),true);
if(zoom){
this.map.zoomToLevel(zoom);
}
}else{
this.SYSTEM.Tracking.getUserPublicLocation(_10f,new this.SYSTEM.Delegate(this,publicLocationCallback));
}
}
}
this.quickLaunchUserEmails=null;
}
}
catch(ex){
jsExDebug("mapApp_showQuickLaunchUsers",ex);
}
}
function mapApp_waitForUserLocation(_113){
try{
this.waitingForUserLocation[_113]=true;
}
catch(ex){
jsExDebug("mapApp_waitForUserLocation",ex);
}
}
function mapApp_isWaitingForUserLocation(_114){
try{
return this.waitingForUserLocation[_114];
}
catch(ex){
jsExDebug("mapApp_isWaitingForUserLocation",ex);
}
}
function mapApp_newUserLocationCallback(_115){
try{
var _116=this.SYSTEM.Tracking.locations[_115];
var _117=_116.coordinate.copy();
if(_115==this.SYSTEM.Tracking.USER_ID){
if(this.map.isUserOnMap()||this.isWaitingForUserLocation(this.SYSTEM.UserDetails.id)){
var _118=this.map.showUserLocation(_117,true,true);
this.sidebar.setUserOnMap(_118.getHashString());
}
}else{
if(_116.isPublicUser){
if(this.map.isPublicUserOnMap(_115)||this.isWaitingForUserLocation(_115)){
var _118=this.map.showPublicUserLocation(_117,_115,"",null,true,true);
this.sidebar.setPublicUserOnMap(_115,_118.getHashString());
}
}else{
var _119=this.SYSTEM.Contacts.getContactFromUserId(_115);
if(_119){
if(this.map.isContactOnMap(_119.contactId)||this.isWaitingForUserLocation(_115)){
var _118=this.map.showContact(_117,_119,true,true);
this.sidebar.setContactOnMap(_119.contactId,_118.getHashString());
}
var _11a=this.sidebar.getItem(null,_119.contactId);
if(_11a){
this.sidebar.showExtraInfoForItem(null,null,_11a);
this.sidebar.applySearchAndSort();
}
}
}
}
}
catch(ex){
jsExDebug("mapApp_newUserLocationCallback",ex);
}
}
function mapApp_peepelPointUpdateCallback(_11b,_11c){
try{
var _11d=this.map.updatePoi(_11b,_11c);
if(_11d){
this.sidebar.setPointOnMap(_11b.locationId,_11d.getHashString());
}
}
catch(ex){
jsExDebug("mapApp_peepelPointUpdateCallback",ex);
}
}
function mapApp_showMediaLocations(_11e,zoom){
try{
for(var i=0;i<_11e.length;i++){
var _121=new trackingCoordinate_t();
if(_121.fromJSON(_11e[i])){
if(zoom){
_121.setZoom(zoom);
}
this.map.showMediaLocation(_121);
}
}
this.map.drawMapObjects();
}
catch(ex){
jsExDebug("mapApp_showMediaLocations",ex);
}
}
function mapApp_getQuickLaunchAddress(){
try{
var _122=this.map.getCentreCoordinates();
var _123=this.map.getStyle();
var zoom=this.map.getZoom();
return [this.SYSTEM.Environment.DOCUMENT_NAME,"?m=x:",_122.mercX,",y:",_122.mercY,",z:",zoom,",s:",_123].join("");
}
catch(ex){
jsExDebug("mapApp_getQuickLaunchAddress",ex);
}
}
function mapApp_mapFrame__onClose(_125){
try{
showLinks=false;
if(this.SYSTEM.MapLinker&&this.map.linkGroupNumbers.length&&this.SYSTEM.MapLinker.areLinksVisible()){
showLinks=true;
}
this.cleanUp();
if(showLinks){
SYSTEM.MapLinker.redrawLinks();
}
}
catch(ex){
jsExDebug("mapApp_mapFrame__onClose",ex);
}
}
function mapApp_mapFrame__onResize(_126){
try{
if(!this.map){
return;
}
var _127;
var _128;
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
if(dX||dY){
_127=this.mapFrame.width+this.SYSTEM.Event.dragDistanceX;
_128=this.mapFrame.height+this.SYSTEM.Event.dragDistanceY;
var _12b=this.mapFrame.minimumWidth;
var _12c=this.mapFrame.minimumHeight;
_127=(_127<_12b?_12b:_127);
_128=(_128<_12c?_12c:_128);
var _12d=this.mapFrame.maximumWidth;
var _12e=this.mapFrame.maximumHeight;
_127=(_127>_12d?_12d:_127);
_128=(_128>_12e?_12e:_128);
}else{
_127=this.mapFrame.width;
_128=this.mapFrame.height;
}
var _12f=_126.getInternalWidth(_127);
var _130=_126.getInternalHeight(_128);
if(this.dragDiv){
this.dragDiv.style.width=_12f+"px";
this.dragDiv.style.height=_130+"px";
_126.windowDiv.appendChild(this.dragDiv);
}
var _131=(this.sidebar.visible?_127-this.sidebar.width-this.SYSTEM.Style.WIDGET_PADDING:_127);
var _132=_128;
var _133=_126.getInternalHeight(_128)-(this.CONTROL_PANEL_HEIGHT+this.CONTROL_PANEL_MAP_PAD);
var _134=this.mapFrame.bottomEdgeHeight;
this.setMapDimensions(_131,_132,_127,_128);
var _135=_126.topEdgeHeight+(this.map.height/2)-(this.sideBarToggleBtn.height/2);
this.sideBarToggleBtn.setPosition(null,_135);
this.sidebar.setDimensions(null,_133);
this.map.drawMapObjects();
}
catch(ex){
jsExDebug("mapApp_mapFrame__onResize",ex);
}
}
function mapApp_mapFrame__onResizeEnd(_136){
try{
if(!this.map){
return;
}
if(this.dragDiv){
_136.windowDiv.removeChild(this.dragDiv);
}
this.map.hideLocationTrails();
this.map.drawLocationTrails();
}
catch(ex){
jsExDebug("mapApp_mapFrame__onResizeEnd",ex);
}
}
function mapApp_mapFrame__onFocus(_137){
try{
if(!this.map){
return;
}
if(this.dragDiv&&this.dragDiv.parentNode==_137.windowDiv){
_137.windowDiv.removeChild(this.dragDiv);
}
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
this.SYSTEM.Event.disableDropTarget(this.map.widgetElement);
}
if(this.mapInfoFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.mapInfoFrame);
}
if(this.errorFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.errorFrame);
}
if(this.savePeepelPointFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.savePeepelPointFrame);
}
if(this.jumpToCoordsFrame){
this.SYSTEM.WINDOW_MANAGER.focus(this.jumpToCoordsFrame);
}
if(this.SYSTEM.MapLinker.areLinksVisible()){
this.showHideLinksBtn.setImage(this.SHOWHIDE_LINKS_ON_IMG);
}else{
this.showHideLinksBtn.setImage(this.SHOWHIDE_LINKS_IMG);
}
}
catch(ex){
jsExDebug("mapApp_mapFrame__onFocus",ex);
}
}
function mapApp_mapFrame__onBlur(_138){
try{
if(this.mapInfoFrame||this.errorFrame||this.savePeepelPointFrame||this.jumpToCoordsFrame||!this.map){
return;
}
if(this.dragDiv&&(this.SYSTEM.WINDOW_MANAGER.getFocusedApplication()==this)){
_138.windowDiv.appendChild(this.dragDiv);
}
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
this.SYSTEM.Event.makeDropTarget(this.map.widgetElement,this.mapDropEvent,this);
}
}
catch(ex){
jsExDebug("mapApp_mapFrame__onBlur",ex);
}
}
function mapApp_mapFrame_keyPress(key){
try{
switch(key.which){
case 13:
if(this.keywordText.hasFocus()){
this.binding_searchBtn_click();
}else{
if(this.publicPointKeywordText.hasFocus()){
this.binding_publicPointSearchBtn_click();
}
}
break;
default:
}
}
catch(ex){
jsExDebug("mapApp_mapFrame_keyPress",ex);
}
}
function mapApp_mapFrame_keyDown(key){
try{
switch(key.which){
case 37:
this.map.autoPanDirection("west");
key.preventDefault();
break;
case 38:
this.map.autoPanDirection("north");
key.preventDefault();
break;
case 39:
this.map.autoPanDirection("east");
key.preventDefault();
break;
case 40:
this.map.autoPanDirection("south");
key.preventDefault();
break;
case 33:
this.map.zoomIn();
key.preventDefault();
break;
case 34:
this.map.zoomOut();
key.preventDefault();
break;
case 27:
if(this.map.marqueeZoomInProgress()){
this.map.cancelMarqueeZoom();
}
break;
default:
var _13b=((this.mapFrame.frame.pixelX+this.mapFrame.width)>this.SYSTEM.Environment.SCREEN_WIDTH)||((this.mapFrame.frame.pixelY+this.mapFrame.height)>this.SYSTEM.Environment.SCREEN_HEIGHT);
if(!this.publicPointKeywordText.hasFocus()&&!this.keywordText.hasFocus()&&this.sidebar.visible&&!_13b){
this.sidebar.searchText.focus();
}
}
}
catch(ex){
jsExDebug("mapApp_mapFrame_keyDown",ex);
}
}
function mapApp_mapFrame__onMove(_13c){
try{
if(!this.map){
return;
}
if(this.dragDiv){
_13c.windowDiv.appendChild(this.dragDiv);
}
if(!this.linksHiddenForResize&&this.map.linkGroupNumbers.length&&this.SYSTEM.MapLinker.areLinksVisible()){
this.SYSTEM.MapLinker.hideLinks();
this.linksHiddenForResize=true;
}
}
catch(ex){
jsExDebug("mapApp_mapFrame_onMove",ex);
}
}
function mapApp_mapFrame__onMoveEnd(_13d){
try{
if(this.dragDiv){
if(this.dragDiv.parentNode==_13d.windowDiv){
_13d.windowDiv.removeChild(this.dragDiv);
}
}
if(this.linksHiddenForResize){
this.SYSTEM.MapLinker.showLinks();
this.linksHiddenForResize=false;
}
}
catch(ex){
jsExDebug("mapApp_mapFrame_onMoveEnd",ex);
}
}
function mapApp_scrollUp(_13e,_13f,me){
try{
if(me.SYSTEM.WindowManager.getFocusedApplication()==me&&!me.map.zoomLock){
var hit=me.map.getHitCoordinates(_13e.clientX,_13e.clientY,_13e.fromSVG);
if(hit.x<0||hit.y<0||hit.x>me.map.width||hit.y>me.map.height){
return;
}
if(me.SYSTEM.Settings.get("map_pan_on_scroll_zoom")){
me.map.panAndZoom(_13e);
}else{
me.map.zoomIn();
}
}
}
catch(ex){
jsExDebug("mapApp_scrollUp",ex);
}
}
function mapApp_scrollDown(_142,_143,me){
try{
if(me.SYSTEM.WindowManager.getFocusedApplication()==me&&!me.map.zoomLock){
var hit=me.map.getHitCoordinates(_142.clientX,_142.clientY,_142.fromSVG);
if(hit.x<0||hit.y<0||hit.x>me.map.width||hit.y>me.map.height){
return;
}
me.map.zoomOut();
}
}
catch(ex){
jsExDebug("mapApp_scrollDown",ex);
}
}
function mapApp_binding_groupBtn_click(_146){
try{
if(_146.buttonState==_146.ON_STATE){
_146.turnOff();
this.SYSTEM.MapLinker.removeMapFromGroup(this.map,_146.getValue());
}else{
_146.turnOn();
this.SYSTEM.MapLinker.addMapToGroup(this,this.map,_146.getValue(),this.SYSTEM.MapLinker.ZOOM|this.SYSTEM.MapLinker.PAN|this.SYSTEM.MapLinker.STYLE|this.SYSTEM.MapLinker.POINTS|this.SYSTEM.MapLinker.S_RESULTS|this.SYSTEM.MapLinker.CONTACTS);
}
}
catch(ex){
jsExDebug("mapFrame_binding_group1Btn_click",ex);
}
}
function mapApp_dragDivClickEvent(_147,me){
try{
me.mapFrame.focus();
}
catch(ex){
jsExDebug("mapApp_dragDivClickEvent",ex);
}
}
function mapApp_binding_sideBarToggleBtn_click(_149){
try{
var _14a=this.rightMinimapVisible;
if(_14a){
this.hideRightMinimap();
}
if(this.sidebar.visible){
this.hideSideBar();
}else{
this.showSideBar();
}
if(_14a){
this.showRightMinimap(this.mapFrame.width,this.mapFrame.height);
}
}
catch(ex){
jsExDebug("mapApp_binding_sideBarToggleBtn_click",ex);
}
}
function mapApp_getPrintHTML(){
return SYSTEM.printMapInfo;
}
function mapApp_mapZoomInEvent(_14b,_14c){
try{
this.zoomLabel.setText("Level "+_14c.getZoom());
}
catch(ex){
jsExDebug("mapApp_mapZoomInEvent",ex);
}
}
function mapApp_mapZoomOutEvent(_14d,_14e){
try{
this.zoomLabel.setText("Level "+_14e.getZoom());
}
catch(ex){
jsExDebug("mapApp_mapZoomOutEvent",ex);
}
}
function mapApp_mapZoomToLevelEvent(_14f,_150){
try{
this.zoomLabel.setText("Level "+_150.getZoom());
}
catch(ex){
jsExDebug("mapApp_mapZoomToLevelEvent",ex);
}
}
function mapApp_mapSingleClickEvent(_151,_152){
try{
var hit=_152.getHitCoordinates(_151.x,_151.y,_151.parameter);
var _154=_152.getCoordinatesAtPixel(hit.x,hit.y);
if(this.infoFrameVisible){
this.setInfoFrameCurrentCoords(_154);
}else{
if(this.catchClickToSetUserLocation){
this.setUserLocation(_154,this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.SVG_MODE);
this.catchClickToSetUserLocation=false;
this.setLocationClickBtn.turnOff();
}else{
if(this.catchClickToSetPeepelPointLocation){
this.savePeepelPointCoordinate=_154;
this.launchSavePeepelPointFrame();
this.catchClickToSetPeepelPointLocation=false;
}else{
if(this.rulerPresetBtn.isOn()){
if(this.distanceMeasureStartCoordinate){
var _155=_154;
var _156=getDistance(this.distanceMeasureStartCoordinate,_155);
var _157=_156+" metres";
if(_156>1000){
_157=Math.round(_156/1000)+" kilometres";
}
this.distanceMeasureStartCoordinate.cleanUp();
this.distanceMeasureStartCoordinate=null;
var d=new this.SYSTEM.Dialogue.OkAlert(this,"WebMap","The distance is approximately: <b>"+_157+"</b>");
this.map.setOverlayCursor(null);
}else{
this.distanceMeasureStartCoordinate=_154;
this.map.setOverlayCursor(null,"drag");
}
}else{
if(this.SYSTEM.Drawing.drawMode==this.SYSTEM.Drawing.VML_MODE){
this.mapFrame.focus();
}
}
}
}
}
}
catch(ex){
jsExDebug("mapApp_mapSingleClickEvent",ex);
}
}
function mapApp_mapCoordinateJumpEvent(_159,_15a){
try{
var zoom=_15a.getZoom();
if(this.zoomSlider.slideValue!=zoom){
this.zoomSlider.setSlideValue(zoom);
this.zoomLabel.setText("Level "+zoom);
}
}
catch(ex){
jsExDebug("mapApp_mapCoordinateJumpEvent",ex);
}
}
function mapApp_mapObjectRemoveEvent(_15c,_15d){
try{
if(_15c.parameter){
this.sidebar.setOffMapByHash(_15c.parameter);
}
}
catch(ex){
jsExDebug("mapApp_mapObjectRemoveEvent",ex);
}
}
function mapApp_mapFollowContactEvent(_15e,_15f){
try{
if(_15e.parameter){
if(this.SYSTEM.Contacts.getContact(_15e.parameter)){
this.sidebar.setContactFollowed(_15e.parameter,true);
}else{
var _160=_15e.parameter.split("_")[1];
this.sidebar.setPublicUserFollowed(_160,true);
}
}else{
this.sidebar.setUserFollowed(true);
}
}
catch(ex){
jsExDebug("mapApp_mapFollowContactEvent",ex);
}
}
function mapApp_mapStopFollowContactEvent(_161,_162){
try{
if(_161.parameter){
if(this.SYSTEM.Contacts.getContact(_161.parameter)){
this.sidebar.setContactFollowed(_161.parameter,false);
}else{
var _163=_161.parameter.split("_")[1];
this.sidebar.setPublicUserFollowed(_163,false);
}
}else{
this.sidebar.setUserFollowed(false);
}
}
catch(ex){
jsExDebug("mapApp_mapStopFollowContactEvent",ex);
}
}
function mapApp_mapFilterSidebarEvent(_164,_165){
try{
if(_164.parameter){
this.sidebar.overrideSearchTerm(_164.parameter);
}
}
catch(ex){
jsExDebug("mapApp_mapFilterSidebarEvent",ex);
}
}
function mapApp_mapInfoFrame__onClose(_166){
try{
this.mapInfoFrame=null;
_166.cleanUp();
this.mapInfoCoordinatesText=null;
this.mapInfoCurrentCoord=null;
this.infoFrameVisible=false;
}
catch(ex){
jsExDebug("mapApp_mapInfoFrame__onClose",ex);
}
}
function mapApp_errorFrame__onClose(_167){
try{
this.errorFrame=null;
_167.cleanUp();
this.errorBoundsLabel=null;
this.errorTextArea=null;
this.errorSendLink=null;
}
catch(ex){
jsExDebug("mapApp_errorFrame__onClose",ex);
}
}
function mapApp_savePeepelPointFrame__onClose(_168){
try{
this.savePeepelPointFrame=null;
_168.cleanUp();
this.SYSTEM.Event.removeKeyPressHandler(this.savePeepelPointKeyPressIndex);
this.savePeepelPointKeyPressIndex=null;
this.savePeepelPointNameLabel=null;
this.savePeepelPointNameText=null;
this.savePeepelPointSaveBtn=null;
}
catch(ex){
jsExDebug("mapApp_savePeepelPointFrame__onClose",ex);
}
}
function mapApp_jumpToCoordsFrame__onClose(_169){
try{
this.jumpToCoordsFrame=null;
_169.cleanUp();
this.jumpInfoLabel=null;
this.jumpLatLabel=null;
this.jumpLatText=null;
this.jumpLongLabel=null;
this.jumpLongText=null;
this.jumpJumpLink=null;
this.jumpDecimalCheckbox=null;
}
catch(ex){
jsExDebug("mapApp_jumpToCoordsFrame__onClose",ex);
}
}
function mapApp_searchResultsFrame__onClose(_16a){
try{
_16a.cleanUp();
}
catch(ex){
jsExDebug("mapApp_searchResultsFrame__onClose",ex);
}
}
function mapApp_searchResultsFrame__onResize(_16b){
try{
var _16c;
var _16d;
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
if(dX||dY){
_16c=_16b.width+this.SYSTEM.DM.dragDistanceX;
_16d=_16b.height+this.SYSTEM.DM.dragDistanceY;
var _170=_16b.minimumWidth;
var _171=_16b.minimumHeight;
_16c=(_16c<_170?_170:_16c);
_16d=(_16d<_171?_171:_16d);
var _172=_16b.maximumWidth;
var _173=_16b.maximumHeight;
_16c=(_16c>_172?_172:_16c);
_16d=(_16d>_173?_173:_16d);
}else{
_16c=_16b.width;
_16d=_16b.height;
}
var _174=_16b.getWidget("table");
var _175=_16b.getWidget("searchResultsMapBtn");
var _176=_16b.getWidget("searchResultsUpBtn");
var _177=_16b.getWidget("searchResultsDownBtn");
if(_174){
_174.setDimensions(_16b.getInternalWidth(_16c)-_176.width-this.pad,_16b.getInternalHeight(_16d)-_16b.getWidget("searchResultsLabel").getClientHeight()-_175.height-(2*this.pad));
}
}
catch(ex){
jsExDebug("mapApp_searchResultsFrame__onResize",ex);
}
}
function mapApp_searchResultsFrame__onResizeEnd(_178){
try{
var _179=_178.getWidget("table");
if(_179){
_179.refitTable();
_179.refresh();
}
}
catch(ex){
jsExDebug("mapApp_searchResultsFrame__onResizeEnd",ex);
}
}
function mapApp_peepelPointLocationFrame__onClose(_17a){
try{
this.peepelPointLocationFrame=null;
_17a.cleanUp();
}
catch(ex){
jsExDebug("mapApp_peepelPointLocationFrame__onClose",ex);
}
}
function mapApp_coordTextFrame__onClose(_17b){
try{
this.coordTextFrame=null;
_17b.cleanUp();
}
catch(ex){
jsExDebug("mapApp_coordTextFrame__onClose",ex);
}
}
function mapApp_removeDragDiv(_17c){
try{
if(this.dragDiv){
this.mapFrame.windowDiv.removeChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("mapApp_removeDragDiv",ex);
}
}
function mapApp_appendDragDiv(_17d){
try{
if(this.dragDiv){
this.mapFrame.windowDiv.appendChild(this.dragDiv);
}
}
catch(ex){
jsExDebug("mapApp_appendDragDiv",ex);
}
}
function mapApp_binding_mapInfoClearBtn_click(_17e){
try{
this.mapInfoCoordinatesText.clearContent();
}
catch(ex){
jsExDebug("mapApp_binding_mapInfoClearBtn_click",ex);
}
}
function mapApp_binding_mapInfoExportBtn_click(){
try{
var txt=this.mapInfoCoordinatesText.getContent();
var _180=txt.split("\n");
var line=null;
var _182=null;
var data=[];
data[1]=[];
data[1][1]="Latitude";
data[1][2]="Longitude";
data[1][3]="Map Zoom";
for(var i=0;i<_180.length;i++){
row=i+2;
data[row]=[];
line=_180[i];
if(line.length>0){
if(DEBUG_MESSAGES){
line=line.replace(/\(.*\)/,"");
}
_182=line.split(",");
data[row][1]=_182[0];
data[row][2]=_182[1];
data[row][3]=_182[2];
}
}
var ss=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET);
ss.loadDataFromArray(data);
}
catch(ex){
jsExDebug("mapApp_binding_mapInfoClearBtn_click",ex);
}
}
function mapApp_binding_mapInfoQuickLaunchText_focus(_186){
try{
_186.textBox.select();
}
catch(ex){
jsExDebug("mapApp_binding_mapInfoQuickLaunchText_focus",ex);
}
}
function mapApp_binding_errorSendLink_click(_187){
try{
this.errorFrame.close();
}
catch(ex){
jsExDebug("mapApp_binding_errorSendLink",ex);
}
}
function mapApp_binding_jumpJumpLink_click(_188){
try{
var _189=this.jumpLatText.getContent();
var _18a=this.jumpLongText.getContent();
if(_189&&_18a){
if(this.jumpDecimalCheckbox.isChecked()){
var _18b=new mapCoordinate_t(_189,_18a,0);
}else{
var _18b=new mapCoordinate_t(_189,_18a,1);
}
_18b.calculateCartesian(this.map.zoom);
this.map.centreOnCoordinates(_18b,null,false,true);
}
}
catch(ex){
jsExDebug("mapApp_binding_jumpJumpLink",ex);
}
}
function mapApp_savePeepelPointKeyPressEvent(key,me){
try{
if(me.savePeepelPointFrame){
if(key.which==13){
me.savePeepelPointFrameSave();
}
}
}
catch(ex){
jsExDebug("mapApp_savePeepelPointKeyPressEvent",ex);
}
}
function mapApp_binding_savePeepelPointSaveBtn_click(_18e){
try{
this.savePeepelPointFrameSave();
}
catch(ex){
jsExDebug("mapApp_binding_savePeepelPointSaveBtn",ex);
}
}
function mapApp_binding_searchResultsMapBtn_click(_18f){
try{
var _190=this.searchResults[_18f.getValue()];
var _191=[];
for(var i=1;i<_190.checkboxes.length;i++){
if(_190.checkboxes[i].isChecked()){
_191.push(_190.locations[i]);
}
}
if(_191.length==0){
return;
}
this.map.hideMapObjects();
if(_191.length>1){
var _193=null;
var lowX=null;
var _195=null;
var lowY=null;
var _197=null;
var _198=null;
var x=null;
var y=null;
for(var i=0;i<_191.length;i++){
_198=_191[i];
x=parseFloat(_198.x);
y=parseFloat(_198.y);
_193=new mapCoordinate_t(y,x,mapCoordinate_t.prototype.COORD_MERCATOR);
if(_198.name){
this.map.showSearchResult(_193,_198.name,_198.country);
}else{
var _19b=new peepelPoint_t();
_19b.fromJSON(_198);
this.map.showPublicPoint(_193,_19b);
}
if(!lowX||x<lowX){
lowX=x;
}
if(!_195||x>_195){
_195=x;
}
if(!lowY||y<lowY){
lowY=y;
}
if(!_197||y>_197){
_197=y;
}
}
var _19c=Math.round((_195-lowX)/30);
var _19d=Math.round((_197-lowY)/30);
lowX-=_19c;
_195+=_19c;
lowY-=_19d;
_197+=_19d;
var _19e=new mapBoundary_t(lowX,_195,lowY,_197,1);
this.map.fitBoundaryCoordinates(_19e);
}else{
var _198=_191[0];
var x=parseFloat(_198.x);
var y=parseFloat(_198.y);
var _193=new mapCoordinate_t(y,x,mapCoordinate_t.prototype.COORD_MERCATOR);
if(_198.name){
this.map.showSearchResult(_193,_198.name,_198.country);
}else{
var _19b=new peepelPoint_t();
_19b.fromJSON(_198);
this.map.showPublicPoint(_193,_19b);
}
this.map.centreOnCoordinates(_193,15);
}
this.map.drawMapObjects();
this.map.showMapObjects();
this.zoomSlider.setSlideValue(this.map.getZoom());
this.zoomLabel.setText("Level "+this.map.zoom);
this.mapFrame.focus();
this.map.recentreChildMaps();
}
catch(ex){
jsExDebug("mapApp_binding_searchResultsMapBtn_click",ex);
}
}
function mapApp_binding_searchResultsUpBtn_click(_19f){
try{
var _1a0=_19f.getValue();
var _1a1=this.searchResults[_1a0].table;
if(_1a1){
_1a1.scrollUp();
}
}
catch(ex){
jsExDebug("mapApp_binding_searchResultsUpBtn_click",ex);
}
}
function mapApp_binding_searchResultsDownBtn_click(_1a2){
try{
var _1a3=_1a2.getValue();
var _1a4=this.searchResults[_1a3].table;
if(_1a4){
_1a4.scrollDown();
}
}
catch(ex){
jsExDebug("mapApp_binding_searchResultsUpBtn_click",ex);
}
}
function mapApp_binding_contactsOnMapBtn_click(){
try{
var _1a5=this.SYSTEM.Contacts.getAcceptedContacts();
var _1a6=this.map.getBoundaryCoordinates();
var _1a7=_1a6.topLeft.mercX;
var _1a8=_1a6.bottomRight.mercX;
var _1a9=_1a6.topLeft.mercY;
var _1aa=_1a6.bottomRight.mercY;
for(var i=0;i<_1a5.length;i++){
var _1ac=this.SYSTEM.Tracking.getUserLocation(_1a5[i].userId);
if(_1ac){
if(_1ac.mercX>_1a7&&_1ac.mercX<_1a8&&_1ac.mercY<_1a9&&_1ac.mercY>_1aa){
if(!this.map.isContactOnMap(_1a5[i].contactId)){
var _1ad=this.map.showContact(_1ac,_1a5[i],false,true,true);
this.sidebar.setContactOnMap(_1a5[i].contactId,_1ad.getHashString());
}
}
}
}
this.map.drawMapObjects();
}
catch(ex){
jsExDebug("mapApp_binding_contactsOnMapBtn_click",ex);
}
}
function mapApp_binding_sharedPointsOnMapBtn_click(){
function callback(_1ae){
try{
for(var i=0;i<_1ae.length;i++){
this.map.showPublicPoint(_1ae[i].coordinate,_1ae[i],true);
}
this.map.drawMapObjects();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("mapApp_binding_sharedPointsOnMapBtn_click: callback",ex);
}
}
function tooltipTimeout(){
try{
var _1b0=this.map.getBoundaryCoordinates();
this.SYSTEM.PeepelPoints.getSharedPointsWithinBox(_1b0,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("mapApp_binding_sharedPointsOnMapBtn_click: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Searching for points...");
}
catch(ex){
jsExDebug("mapApp_binding_sharedPointsOnMapBtn_click",ex);
}
}
function mapApp_binding_peepelPointLocationCentreBtn_click(){
try{
this.savePeepelPointCoordinate=this.map.getCentreCoordinates();
this.peepelPointLocationFrame.close();
this.launchSavePeepelPointFrame();
}
catch(ex){
jsExDebug("mapApp_binding_peepelPointLocationCentreBtn_click",ex);
}
}
function mapApp_binding_peepelPointLocationOkBtn_click(){
try{
this.catchClickToSetPeepelPointLocation=true;
this.peepelPointLocationFrame.close();
}
catch(ex){
jsExDebug("mapApp_binding_peepelPointLocationOkBtn_click",ex);
}
}
function mapApp_binding_coordTextFrameGoBtn_click(_1b1){
try{
var text=_1b1.getValue().getContent();
this.map.loadCoordsFromString(text);
this.coordTextFrame.close();
}
catch(ex){
jsExDebug("mapApp_binding_coordTextFrameGoBtn_click",ex);
}
}
function mapApp_sidebarMapToggleEvent(_1b3,_1b4){
try{
var _1b5=_1b3.toggleValue;
var _1b6=_1b3.parameter;
if(_1b6){
if(this.SYSTEM.Contacts.getContact(_1b6)){
if(_1b5){
this.addContactToMap(this.SYSTEM.Contacts.getContact(_1b6));
}else{
this.map.removeContact(_1b6);
}
}else{
var _1b7=_1b6.split("_")[1];
if(_1b5){
if(this.map.isPublicUserOnMap(_1b7)){
this.map.goToLatestPublicUserLocation(_1b7);
}else{
var _1b8=this.SYSTEM.Tracking.getUserLocation(_1b7);
if(_1b8){
var _1b9=this.sidebar.getItem(null,null,null,_1b6).data;
var _1ba=this.map.showPublicUserLocation(_1b8,_1b7,_1b9.username,_1b9.accuracy,_1b9.avatar,true,true);
this.sidebar.setPublicUserOnMap(_1b7,_1ba.getHashString());
}
}
}else{
this.map.removePublicUserLocation(_1b7);
}
}
}else{
if(_1b5){
if(this.map.isUserOnMap()){
this.map.goToLatestUserLocation();
}else{
this.getUserLocation();
}
}else{
this.map.removeUserLocation();
}
}
}
catch(ex){
jsExDebug("mapApp_sidebarMapToggleEvent",ex);
}
}
function mapApp_sidebarFollowToggleEvent(_1bb,_1bc){
try{
var _1bd=_1bb.toggleValue;
var _1be=_1bb.parameter;
if(_1be){
if(this.SYSTEM.Contacts.getContact(_1be)){
if(_1bd){
if(this.map.isContactOnMap(_1be)){
this.map.goToLatestContactLocation(_1be);
}else{
this.addContactToMap(this.SYSTEM.Contacts.getContact(_1be));
}
this.map.startFollowingUser(_1be,false);
}else{
this.map.stopFollowingUser(_1be,false);
}
}else{
var _1bf=_1be.split("_")[1];
if(_1bd){
if(this.map.isPublicUserOnMap(_1bf)){
this.map.goToLatestPublicUserLocation(_1bf);
}else{
var _1c0=this.SYSTEM.Tracking.getUserLocation(_1bf);
if(_1c0){
var _1c1=this.sidebar.getItem(null,null,null,_1be).data;
var _1c2=this.map.showPublicUserLocation(_1c0,_1bf,_1c1.username,_1c1.accuracy,_1c1.avatar,true,true);
this.sidebar.setPublicUserOnMap(_1bf,_1c2.getHashString());
}
}
this.map.startFollowingUser(null,false,_1bf);
}else{
this.map.stopFollowingUser(null,false,_1bf);
}
}
}else{
if(!this.map.isUserOnMap()){
this.getUserLocation();
}
if(_1bd){
this.map.startFollowingUser(null,true);
}else{
this.map.stopFollowingUser(null,true);
}
}
}
catch(ex){
jsExDebug("mapApp_sidebarFollowToggleEvent",ex);
}
}
function mapApp_sidebarPointZoomCentreEvent(_1c3,_1c4){
try{
var _1c5=_1c3.parameter;
var _1c6=this.SYSTEM.PeepelPoints.getPointFromLocationId(_1c5);
var _1c7=this.map.showPoi(_1c6,true,true,true);
this.sidebar.setPointOnMap(_1c5,_1c7.getHashString());
}
catch(ex){
jsExDebug("mapApp_sidebarPointZoomCentreEvent",ex);
}
}
function mapApp_sidebarPointCentreEvent(_1c8,_1c9){
try{
var _1ca=_1c8.parameter;
var _1cb=this.SYSTEM.PeepelPoints.getPointFromLocationId(_1ca);
var _1cc=this.map.showPoi(_1cb,true,false,true);
this.sidebar.setPointOnMap(_1ca,_1cc.getHashString());
}
catch(ex){
jsExDebug("mapApp_sidebarPointCentreEvent",ex);
}
}
function mapApp_sidebarPointNoChangeEvent(_1cd,_1ce){
try{
var _1cf=_1cd.parameter;
var _1d0=this.SYSTEM.PeepelPoints.getPointFromLocationId(_1cf);
var _1d1=this.map.showPoi(_1d0,false,false,true);
this.sidebar.setPointOnMap(_1cf,_1d1.getHashString());
}
catch(ex){
jsExDebug("mapApp_sidebarPointNoChangeEvent",ex);
}
}
function mapApp_sidebarPointRemoveEvent(_1d2,_1d3){
try{
var _1d4=_1d2.parameter;
this.map.removePoi(_1d4);
}
catch(ex){
jsExDebug("mapApp_sidebarPointRemoveEvent",ex);
}
}
function mapApp_sidebarAvatarClickEvent(_1d5,_1d6){
try{
var _1d7=_1d5.parameter;
if(_1d7){
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_CONTACT_MANAGER,_1d7);
}else{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_ACCOUNT_MANAGER);
}
}
catch(ex){
jsExDebug("mapApp_sidebarAvatarClickEvent",ex);
}
}
function mapApp_binding_printBtn_click(_1d8){
try{
this.printMap();
}
catch(ex){
jsExDebug("mapApp_binding_printBtn_click",ex);
}
}
function mapApp_binding_infoBtn_click(_1d9){
try{
this.launchMapInfoFrame();
}
catch(ex){
jsExDebug("mapApp_binding_infoBtn_click",ex);
}
}
function mapApp_binding_refreshBtn_click(_1da){
try{
this.map.fillAll();
}
catch(ex){
jsExDebug("mapApp_binding_refreshBtn_click",ex);
}
}
function mapApp_binding_detachBtn_click(_1db){
try{
this.detachMap();
}
catch(ex){
jsExDebug("mapApp_binding_detachBtn_click",ex);
}
}
function mapApp_binding_quickHelpBtn_click(_1dc){
try{
var _1dd=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"map");
}
catch(ex){
jsExDebug("mapApp_binding_quickHelpBtn_click",ex);
}
}
function mapApp_binding_zoomSlider_valueChange(_1de){
try{
if(this.zoomSlider.slideValue!=null){
this.map.zoomToLevel(this.zoomSlider.slideValue);
}
}
catch(ex){
jsExDebug("mapApp_binding_zoomSlider_valueChange",ex);
}
}
function mapApp_binding_zoomOutBtn_click(_1df){
try{
this.map.zoomOut();
this.zoomSlider.setSlideValue(this.map.getZoom());
}
catch(ex){
jsExDebug("mapApp_binding_zoomOutBtn_click",ex);
}
}
function mapApp_binding_zoomInBtn_click(_1e0){
try{
this.map.zoomIn();
this.zoomSlider.setSlideValue(this.map.getZoom());
}
catch(ex){
jsExDebug("mapApp_binding_zoomInBtn_click",ex);
}
}
function mapApp_binding_zoomLabel_click(_1e1){
try{
switch(_1e1.getValue()){
case "World":
this.map.zoomToLevel(1);
break;
case "State":
this.map.zoomToLevel(8);
break;
case "Street":
this.map.zoomToLevel(15);
break;
}
}
catch(ex){
jsExDebug("mapApp_binding_zoomLabel_click",ex);
}
}
function mapApp_binding_saveAsPeepelPointBtn_click(_1e2){
try{
if(!this.peepelPointLocationFrame){
var _1e3=280;
var _1e4=new this.SYSTEM.Frame.Window("peepelPointLocationFrame","Choose Location",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_1e4.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var _1e5=new this.SYSTEM.Widget.Label("infoLabel");
_1e5.setDimensions(_1e4.getInternalWidth(_1e3));
_1e5.setText("Choose the PeepelPoint location by using the centre of the map or clicking on the map in the desired spot.");
var _1e6=new this.SYSTEM.Widget.TextButton("peepelPointLocationCentreBtn",110,"Use Map Centre");
var _1e7=new this.SYSTEM.Widget.TextButton("peepelPointLocationOkBtn",100,"Click on Map");
this.peepelPointLocationFrame=_1e4;
_1e4.addWidget(_1e5,_1e4.leftEdgeWidth,_1e4.topEdgeHeight);
_1e4.addWidget(_1e7,_1e4.rightEdgeWidth,_1e4.bottomEdgeHeight,true,true);
_1e4.addWidget(_1e6,_1e4.rightEdgeWidth+_1e7.width+this.pad,_1e4.bottomEdgeHeight,true,true);
_1e4.setFixedDimensions(_1e3,_1e4.topEdgeHeight+_1e5.getClientHeight()+this.pad+_1e7.height+_1e4.bottomEdgeHeight);
}
this.peepelPointLocationFrame.show();
this.peepelPointLocationFrame.focus();
}
catch(ex){
jsExDebug("mapApp_binding_saveAsPeepelPointBtn_click",ex);
}
}
function mapApp_binding_zoomPresetBtn_click(_1e8){
try{
var map=this.map;
this.zoomPresetBtn.turnOff();
this.panPresetBtn.turnOff();
this.rulerPresetBtn.turnOff();
this.zoomPresetBtn.turnOn();
map.enableDoubleClickPanAndZoom();
map.enableDragToZoom();
map.setOverlayCursor("zoom");
}
catch(ex){
jsExDebug("mapApp_binding_zoomPresetBtn_click",ex);
}
}
function mapApp_binding_panPresetBtn_click(_1ea){
try{
var map=this.map;
this.zoomPresetBtn.turnOff();
this.panPresetBtn.turnOff();
this.rulerPresetBtn.turnOff();
this.panPresetBtn.turnOn();
map.enableDoubleClickPan();
map.enableDragToPan();
map.setOverlayCursor("pan");
}
catch(ex){
jsExDebug("mapApp_binding_panPresetBtn_click",ex);
}
}
function mapApp_binding_rulerPresetBtn_click(_1ec){
try{
var map=this.map;
this.zoomPresetBtn.turnOff();
this.panPresetBtn.turnOff();
this.rulerPresetBtn.turnOff();
this.rulerPresetBtn.turnOn();
if(this.distanceMeasureStartCoordinate){
this.distanceMeasureStartCoordinate.cleanUp();
this.distanceMeasureStartCoordinate=null;
}
map.disableDoubleClick();
map.disableDrag();
map.setOverlayCursor("ruler");
}
catch(ex){
jsExDebug("mapApp_binding_rulerPresetBtn_click",ex);
}
}
function mapApp_binding_crosshairPresetBtn_click(_1ee){
try{
if(this.map.stateCrosshairType){
this.map.setCrosshair(null);
_1ee.turnOff();
}else{
this.map.setCrosshair(this.map.CROSSHAIR_MEDIUM);
_1ee.turnOn();
}
}
catch(ex){
jsExDebug("mapApp_binding_crosshairPresetBtn_click",ex);
}
}
function mapApp_binding_jumpToDropList_click(_1ef){
try{
var _1f0=(this.lastJumpToLocation?this.lastJumpToLocation:this.jumpToDropList.list.items[1].itemListValueReference);
var _1f1=new mapBoundary_t(_1f0.left,_1f0.right,_1f0.top,_1f0.bottom,1);
this.map.fitBoundaryCoordinates(_1f1);
this.map.recentreChildMaps();
}
catch(ex){
jsExDebug("mapApp_binding_jumpToDropList_click",ex);
}
}
function mapApp_binding_jumpToDropList_itemSelect(_1f2){
try{
if(_1f2.getSelectedValue()==this.JUMP_TO_COORDINATES){
this.launchJumpToCoordinatesFrame();
}else{
this.lastJumpToLocation=_1f2.getSelectedValue();
var _1f3=new mapBoundary_t(this.lastJumpToLocation.left,this.lastJumpToLocation.right,this.lastJumpToLocation.top,this.lastJumpToLocation.bottom,1);
this.map.fitBoundaryCoordinates(_1f3);
this.map.recentreChildMaps();
}
}
catch(ex){
jsExDebug("mapApp_binding_jumpToDropList_itemSelect",ex);
}
}
function mapApp_binding_jumpToPeepelPointDropList_click(_1f4){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_PEEPELPOINT_MANAGER);
}
catch(ex){
jsExDebug("mapApp_binding_jumpToPeepelPointDropList_click",ex);
}
}
function mapApp_binding_jumpToPeepelPointDropList_itemSelect(_1f5){
try{
var _1f6=_1f5.getSelectedValue();
switch(_1f6){
case "manager":
case "more":
this.SYSTEM.APPLICATION_MANAGER.launchWithTooltip(APP_ID_PEEPELPOINT_MANAGER,"Peepel","Launching PointManager...");
break;
default:
this.jumpToPeepelPoint(_1f5.getSelectedValue());
}
}
catch(ex){
jsExDebug("mapApp_binding_jumpToPeepelPointDropList_itemWidget",ex);
}
}
function mapApp_binding_jumpToPeepelPointDropList_listExpand(_1f7){
try{
var _1f8=this.SYSTEM.PeepelPoints.getPeepelPoints("PeepelPoint");
var _1f9=0;
var _1fa=20;
_1f7.clearList(1);
_1f7.addItem(null,"<b>PeepelPoints</b>");
_1f7.addItem("manager","<b>PointManager</b>");
var _1fb=[];
var _1fc=[];
for(var i=0;i<_1f8.length;i++){
if(_1f8[i]){
var name=_1f8[i].name.toLowerCase();
_1fb.push(name);
if(!_1fc[name]){
_1fc[name]=[];
}
_1fc[name].push(i);
}
}
sortListAsc(_1fb);
var _1ff=false;
for(var i=0;i<_1fb.length;i++){
var _200=_1fc[_1fb[i]];
for(var j=0;j<_200.length;j++){
if(_1f9<=_1fa){
_1f7.addItem(_1f8[_200[j]],_1f8[_200[j]].name);
_1f9++;
}else{
if(!_1ff){
_1f7.addItem("more","<b>More...</b>");
_1ff=true;
break;
}
}
}
if(_1ff){
break;
}
}
if(!_1f9){
this.jumpToPeepelPointDropList.list.hideList();
var _202=new this.SYSTEM.Dialogue.OkAlert(this,"No PeepelPoints","To save the maps location as PeepelPoint, find the spot using the map, click on the 'Save PeepelPoint' button and give it a name");
}
}
catch(ex){
jsExDebug("mapApp_binding_jumpToPeepelPointDropList_listExpand",ex);
}
}
function mapApp_binding_jumpToContactDropList_listExpand(_203){
try{
var _204=this.SYSTEM.Contacts.getAcceptedContacts();
var _205=0;
_203.clearList(1);
_203.addItem(null,"<b>Contacts</b>");
for(var i=0;i<_204.length;i++){
if(_204[i]){
_203.addItem(_204[i],_204[i].userName);
_205++;
}
}
if(!_205){
_203.list.hideList();
var _207=new this.SYSTEM.Dialogue.OkAlert(this,"No trackable contacts","You have no trackable contacts.");
}
}
catch(ex){
jsExDebug("mapApp_binding_jumpToContactDropList_listExpand",ex);
}
}
function mapApp_binding_jumpToContactDropList_click(){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_CONTACT_MANAGER);
}
catch(ex){
jsExDebug("mapApp_binding_jumpToContactDropList_click",ex);
}
}
function mapApp_binding_jumpToContactDropList_itemSelect(_208){
try{
var _209=_208.getSelectedValue();
this.addContactToMap(_209);
}
catch(ex){
jsExDebug("mapApp_binding_jumpToContactDropList_itemSelect",ex);
}
}
function mapApp_binding_leftMinimapModeBtn_click(_20a){
try{
switch(this.leftMinimapMode){
case this.MINIMAP_MODE_AUTO:
this.setLeftMinimapMode(this.MINIMAP_MODE_OFF);
_20a.setText(this.CHILD_MAP_OFF_TEXT);
break;
case this.MINIMAP_MODE_OFF:
this.setLeftMinimapMode(this.MINIMAP_MODE_ON);
_20a.setText(this.CHILD_MAP_ON_TEXT);
break;
case this.MINIMAP_MODE_ON:
this.setLeftMinimapMode(this.MINIMAP_MODE_AUTO);
_20a.setText(this.CHILD_MAP_AUTO_TEXT);
break;
}
}
catch(ex){
jsExDebug("mapApp_binding_leftMinimapModeBtn_click",ex);
}
}
function mapApp_binding_rightMinimapModeBtn_click(_20b){
try{
switch(this.rightMinimapMode){
case this.MINIMAP_MODE_AUTO:
this.setRightMinimapMode(this.MINIMAP_MODE_OFF);
_20b.setText(this.CHILD_MAP_OFF_TEXT);
break;
case this.MINIMAP_MODE_OFF:
this.setRightMinimapMode(this.MINIMAP_MODE_ON);
_20b.setText(this.CHILD_MAP_ON_TEXT);
break;
case this.MINIMAP_MODE_ON:
this.setRightMinimapMode(this.MINIMAP_MODE_AUTO);
_20b.setText(this.CHILD_MAP_AUTO_TEXT);
break;
}
}
catch(ex){
jsExDebug("mapApp_binding_rightMinimapModeBtn_click",ex);
}
}
function mapApp_binding_leftMinimapStyleCheckbox_valueChange(_20c){
try{
if(this.leftMinimap){
this.map.updateChildMap(this.leftMinimap.parentMapChildIndex,null,_20c.isChecked());
}
}
catch(ex){
jsExDebug("mapApp_binding_leftMinimapStyleCheckbox_valueChange",ex);
}
}
function mapApp_binding_leftMinimapZoomDropText_itemSelect(_20d){
try{
if(this.leftMinimap){
this.map.updateChildMap(this.leftMinimap.parentMapChildIndex,_20d.getSelectedValue());
}
}
catch(ex){
jsExDebug("mapApp_binding_leftMinimapZoomDropText_itemSelect",ex);
}
}
function mapApp_binding_rightMinimapStyleCheckbox_valueChange(_20e){
try{
if(this.rightMinimap){
this.map.updateChildMap(this.rightMinimap.parentMapChildIndex,null,_20e.isChecked());
}
}
catch(ex){
jsExDebug("mapApp_binding_rightMinimapStyleCheckbox_valueChange",ex);
}
}
function mapApp_binding_rightMinimapZoomDropText_itemSelect(_20f){
try{
if(this.rightMinimap){
this.map.updateChildMap(this.rightMinimap.parentMapChildIndex,_20f.getSelectedValue());
}
}
catch(ex){
jsExDebug("mapApp_binding_rightMinimapZoomDropText_itemSelect",ex);
}
}
function mapApp_keyUpEvent(_210,me){
try{
}
catch(ex){
jsExDebug("mapApp_keyUpEvent",ex);
}
}
function mapApp_binding_setLocationClickBtn_click(_212){
try{
if(_212.isOn()){
_212.turnOff();
this.catchClickToSetUserLocation=false;
}else{
_212.turnOn();
this.catchClickToSetUserLocation=true;
}
}
catch(ex){
jsExDebug("mapApp_binding_setLocationClickBtn_click",ex);
}
}
function mapApp_binding_setLocationBtn_click(_213){
try{
this.setUserLocation(this.map.getCentreCoordinates());
}
catch(ex){
jsExDebug("mapApp_binding_setLocationBtn_click",ex);
}
}
function mapApp_binding_showHideLinksBtn_click(_214){
try{
if(_214.content==this.SHOWHIDE_LINKS_ON_IMG){
_214.setImage(this.SHOWHIDE_LINKS_IMG);
this.SYSTEM.MapLinker.hideLinks();
}else{
_214.setImage(this.SHOWHIDE_LINKS_ON_IMG);
this.SYSTEM.MapLinker.showLinks();
}
}
catch(ex){
jsExDebug("mapApp_binding_showHideLinksBtn_click",ex);
}
}
function mapApp_binding_sendLocationBtn_click(){
try{
if(this.SYSTEM.Settings.get("public_accuracy")!=-1){
var d=new this.SYSTEM.Dialogue.SendLocation(this);
}else{
var d=new this.SYSTEM.Dialogue.Error(this,this.APP_NAME,"You cannot send your location unless your location is publicly available. To make your location public go to the Tracking section of the Settings application.");
}
}
catch(ex){
jsExDebug("mapApp_binding_sendLocationBtn_click",ex);
}
}
function mapApp_binding_testSelect_itemSelect(_216){
try{
switch(_216.getSelectedValue()){
case "coords test":
var _217=new this.SYSTEM.Frame.Window("coordTextFrame","Show coordinates",this,400,400,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_217.setFixedDimensions(_217.width,_217.height);
_217.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var _218=new this.SYSTEM.Widget.Text("coordTextFrameText",true);
_218.setDimensions(_217.getInternalWidth(),_217.getInternalHeight()-50);
var _219=new this.SYSTEM.Widget.TextButton("coordTextFrameGoBtn",35,"GO!");
_219.setValue(_218);
_217.addWidget(_218,_217.leftEdgeWidth,_217.topEdgeHeight);
_217.addWidget(_219,_217.leftEdgeWidth,_217.bottomEdgeHeight,true,true);
_217.show();
this.coordTextFrame=_217;
break;
case "who":
break;
case "draw":
this.map.drawMapObjects2();
break;
case "centrecoords":
var d=new this.SYSTEM.Dialogue.OkAlert(this,this.APP_NAME,this.map.getCentreCoordinates());
break;
case "jumptile":
var _21b=new this.SYSTEM.Frame.Window("jumpTileFrame","Go to tileset",this,400,100,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_21b.setFixedDimensions(_21b.width,_21b.height);
_21b.setPosition(this.mapFrame.positionX+this.mapFrame.leftEdgeWidth,this.mapFrame.positionY+this.mapFrame.topEdgeHeight);
var _21c=new this.SYSTEM.Widget.Label("tilesetLabel","X, Y, Zoom");
var _21d=new this.SYSTEM.Widget.Text("tilesetXText");
_21d.setDimensions(80);
var _21e=new this.SYSTEM.Widget.Text("tilesetYText");
_21e.setDimensions(80);
var _21f=new this.SYSTEM.Widget.Text("tilesetZoomText");
_21f.setDimensions(80);
var _220=new this.SYSTEM.Widget.TextButton("jumpTileFrameGoBtn",35,"GO!");
_220.setValue(_218);
_21b.addWidget(_21c,_21b.leftEdgeWidth,_21b.topEdgeHeight);
_21b.addWidget(_21d,_21b.leftEdgeWidth+80,_21b.topEdgeHeight);
_21b.addWidget(_21e,_21b.leftEdgeWidth+180,_21b.topEdgeHeight);
_21b.addWidget(_21f,_21b.leftEdgeWidth+280,_21b.topEdgeHeight);
_21b.addWidget(_220,_21b.leftEdgeWidth,_21b.bottomEdgeHeight,true,true);
_21b.show();
this.jumpTileFrame=_21b;
break;
}
}
catch(ex){
jsExDebug("mapApp_binding_testSelect_itemSelect",ex);
}
}
function mapApp_binding_jumpTileFrameGoBtn_click(){
try{
var zoom=this.jumpTileFrame.getWidget("tilesetZoomText").getContent();
var tsX=this.jumpTileFrame.getWidget("tilesetXText").getContent();
var tsY=this.jumpTileFrame.getWidget("tilesetYText").getContent();
var _224=convertTilePositionToPixels(tsX,tsY,0,0,0,0);
var y=convertPixelLatitudeToMercator(_224.y,zoom);
var x=convertPixelLongitudeToMercator(_224.x,zoom);
var _227=new mapCoordinate_t(y,x,1);
_227.setZoom(parseFloat(zoom));
this.map.centreOnCoordinates(_227);
}
catch(ex){
jsExDebug("mapApp_binding_jumpTileFrameGoBtn_click",ex);
}
}
function mapApp_binding_searchBtn_click(_228){
function go(){
try{
this.SYSTEM.Network.JSONRequest(this.SEARCH_SERVICE_PATH+"&action="+this.ACTION_FIND_BY_KEYWORD+"&keyword="+_229,null,this.searchCallback,this);
}
catch(ex){
jsExDebug("mapApp_binding_searchBtn_click: go",ex);
}
}
try{
var _229=this.keywordText.getContent();
if(!_229){
var _22a=new this.SYSTEM.Dialogue.Error(this,"WebMap","Please enter a search keyword.",null,280);
return;
}
if(_229.length>=this.SEARCH_KEYWORD_MIN_LENGTH){
this.currentSearchKeyword=_229;
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,go),null,"Finding places with '"+_229+"'...");
}
}
catch(ex){
jsExDebug("mapApp_binding_searchBtn_click",ex);
}
}
function mapApp_binding_publicPointSearchBtn_click(_22b){
function go(){
try{
_22c=_22c.replace(/,\s*/g,",");
var _22d=_22c.split(",");
var _22e=[];
_22c="";
for(var i in _22d){
if(_22d[i]&&!_22e[_22d[i]]){
_22e[_22d[i]]=true;
_22c+=_22d[i]+",";
}
}
_22c=_22c.replace(/,$/,"");
this.SYSTEM.PeepelPoints.findPublicPoints(_22c,new this.SYSTEM.Delegate(this,this.publicPointSearchCallback));
}
catch(ex){
jsExDebug("mapApp_binding_publicPointSearchBtn_click: go",ex);
}
}
try{
var _22c=this.publicPointKeywordText.getContent();
if(!_22c){
var _230=new this.SYSTEM.Dialogue.Error(this,"WebMap","Please enter a search keyword. You can use multiple keywords and separate them with commas.<br/><i>word1,word2,word3</i>",null,280);
return;
}
if(_22c.length>=this.SEARCH_KEYWORD_MIN_LENGTH){
this.currentPublicPointSearchKeyword=_22c;
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,go),null,"Finding points with '"+_22c+"'...");
}
}
catch(ex){
jsExDebug("mapApp_binding_publicPointSearchBtn_click",ex);
}
}

try{
peepelPointManagerApp_t.prototype=new application_t();
peepelPointManagerApp_t.prototype.constructor=peepelPointManagerApp_t;
peepelPointManagerApp_t.prototype.peepelPointManagerApp_super=application_t.prototype.constructor;
peepelPointManagerApp_t.prototype.cleanUp=peepelPointManagerApp_cleanUp;
peepelPointManagerApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
peepelPointManagerApp_t.prototype.capture=peepelPointManagerApp_capture;
peepelPointManagerApp_t.prototype.restore=peepelPointManagerApp_restore;
peepelPointManagerApp_t.prototype._SIG_KILL=peepelPointManagerApp__SIG_KILL;
peepelPointManagerApp_t.prototype._SIG_THEME=peepelPointManagerApp__SIG_THEME;
peepelPointManagerApp_t.prototype.createPanel=peepelPointManagerApp_createPanel;
peepelPointManagerApp_t.prototype.createManager=peepelPointManagerApp_createManager;
peepelPointManagerApp_t.prototype.populate=peepelPointManagerApp_populate;
peepelPointManagerApp_t.prototype.refreshCallback=peepelPointManagerApp_refreshCallback;
peepelPointManagerApp_t.prototype.newPointCallback=peepelPointManagerApp_newPointCallback;
peepelPointManagerApp_t.prototype.deletePointCallback=peepelPointManagerApp_deletePointCallback;
peepelPointManagerApp_t.prototype.updatePointCallback=peepelPointManagerApp_updatePointCallback;
peepelPointManagerApp_t.prototype.applySearchAndSort=peepelPointManagerApp_applySearchAndSort;
peepelPointManagerApp_t.prototype.frame__onClose=peepelPointManagerApp_frame__onClose;
peepelPointManagerApp_t.prototype.frame__onResize=peepelPointManagerApp_frame__onResize;
peepelPointManagerApp_t.prototype.frame_keyUp=peepelPointManagerApp_frame_keyUp;
peepelPointManagerApp_t.prototype.binding_refreshBtn_click=peepelPointManagerApp_binding_refreshBtn_click;
peepelPointManagerApp_t.prototype.binding_sortSelect_itemSelect=peepelPointManagerApp_binding_sortSelect_itemSelect;
peepelPointManagerApp_t.prototype.binding_quickHelpBtn_click=peepelPointManagerApp_binding_quickHelpBtn_click;
peepelPointManagerApp_t.prototype.APP_ID=APP_ID_PEEPELPOINT_MANAGER;
peepelPointManagerApp_t.prototype.APP_NAME="PointManager";
peepelPointManagerApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.PEEPELPOINT_MANAGER;
peepelPointManagerApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
peepelPointManagerApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
peepelPointManagerApp_t.prototype.FRAME_WIDTH=400;
peepelPointManagerApp_t.prototype.FRAME_HEIGHT=450;
peepelPointManagerApp_t.prototype.FRAME_MIN_HEIGHT=250;
peepelPointManagerApp_t.prototype.INFO_LEFT=0;
peepelPointManagerApp_t.prototype.INFO_TOP=0;
peepelPointManagerApp_t.prototype.LIST_ITEM_WIDTH=350;
peepelPointManagerApp_t.prototype.LIST_ITEM_HEIGHT=140;
peepelPointManagerApp_t.prototype.LIST_ITEM_COLLAPSED_HEIGHT=25;
peepelPointManagerApp_t.prototype.LIST_LEFT=0;
peepelPointManagerApp_t.prototype.LIST_TOP=50;
peepelPointManagerApp_t.prototype.LIST_HEIGHT_DIFF=150;
peepelPointManagerApp_t.prototype.REFRESH_LEFT=230;
peepelPointManagerApp_t.prototype.REFRESH_TOP=460;
peepelPointManagerApp_t.prototype.REFRESH_IMG="img/app/system/icons/utility/refresh.png";
peepelPointManagerApp_t.prototype.SORT_LEFT=10;
peepelPointManagerApp_t.prototype.SORT_PRIVACY=1;
peepelPointManagerApp_t.prototype.SORT_NAME=2;
}
catch(ex){
jsExDebug("peepelPointManagerApp_t.prototype",ex);
}
function peepelPointManagerApp_t(_1){
try{
this.peepelPointManagerApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.idArray=[];
this.currentSortType=this.SORT_NAME;
this.currentSearchTerm="";
this.SYSTEM.Tooltip.hideLoading();
this.createPanel();
this.createManager();
this.pointsActionIndex=this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_READ,new this.SYSTEM.Delegate(this,this.refreshCallback));
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_ADD,new this.SYSTEM.Delegate(this,this.newPointCallback),this.pointsActionIndex);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_DELETE,new this.SYSTEM.Delegate(this,this.deletePointCallback),this.pointsActionIndex);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_UPDATE,new this.SYSTEM.Delegate(this,this.updatePointCallback),this.pointsActionIndex);
}
catch(ex){
jsExDebug("peepelPointManagerApp_t",ex);
}
}
function peepelPointManagerApp_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.PeepelPoints){
me.SYSTEM.PeepelPoints.unregisterActionListener(me.pointsActionIndex);
me.pointsActionIndex=null;
}
me.fileBrowser=null;
me.frame=null;
for(var i=0;i<me.idArray.length;i++){
me.idArray[i]=null;
}
me.idArray=null;
me.infoLabel=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("peepelPointManagerApp_cleanUp",ex);
}
}
function peepelPointManagerApp_createPanel(){
try{
var _4=this.APPLICATION.Panel;
}
catch(ex){
jsExDebug("peepelPointManagerApp_createPanel",ex);
}
}
function peepelPointManagerApp_createManager(){
try{
var _5=new this.SYSTEM.Frame.Window("frame","PointManager",this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_5.setMinimumSize(this.FRAME_WIDTH,this.FRAME_MIN_HEIGHT);
_5.setMaximumSize(this.FRAME_WIDTH);
_5.allowWindowOverflow();
var _6=this.SYSTEM.Widget;
var _7=new _6.Label("infoLabel");
_7.setDimensions(_5.getInternalWidth());
_7.setText("Double click on an item to view the Peepel Point, or single click to expand the item for more options.");
var _8=_5.getInternalWidth()-50;
var _9=new _6.FixedList("pointList",_8,this.LIST_ITEM_HEIGHT,_8,this.LIST_ITEM_COLLAPSED_HEIGHT);
_9.setBorder("solid 1px black");
var _a=new _6.ClassButton("refreshBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.REFRESH_IMG,"Refresh","Refresh the list of PeepelPoints.");
var _b=new _6.Label("sortLabel","Sort");
var _c=new _6.DropText("sortSelect",120);
_c.addItem(this.SORT_PRIVACY,"By Privacy Status");
_c.addItem(this.SORT_NAME,"By Name (Alphabetical)","By Name");
_c.setSelectedValue(this.currentSortType);
var _d=new _6.Label("sortLabel","Filter");
var _e=new _6.Text("searchText");
var _f=_5.topEdgeHeight;
var _10=_5.leftEdgeWidth;
_5.addWidget(_7,_10+this.INFO_LEFT,_f+this.INFO_TOP);
_5.addWidget(_9,_10+this.LIST_LEFT,_f+this.LIST_TOP);
_5.addWidget(_a,_10+this.REFRESH_LEFT,_5.bottomEdgeHeight,false,true);
_5.addWidget(_d,_10+this.SORT_LEFT,_5.bottomEdgeHeight,false,true);
_5.addWidget(_e,_10+this.SORT_LEFT+50,_5.bottomEdgeHeight,false,true);
_5.addWidget(_b,_d.positionX,_d.positionY+_d.getClientHeight()+this.pad,false,true);
_5.addWidget(_c,_e.positionX,_e.positionY+_e.getClientHeight()+this.pad+_c.height,false,true);
this.frame=_5;
this.infoLabel=_7;
this.populate();
_5.setDimensions(_5.width,_5.height);
_5.show();
var _11=this.APPLICATION.Panel;
var _12=this.SYSTEM.Widget.Button.HOVER_IMAGE;
var _13=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
_11.addUtility(_13);
}
catch(ex){
jsExDebug("peepelPointManagerApp_createManager",ex);
}
}
function peepelPointManagerApp_capture(){
try{
var _14=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
var _15=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="mm:"+(this.frame.positionX/_15)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_14);
return this.captureString;
}
catch(ex){
jsExDebug("peepelPointManagerApp_capture",ex);
}
}
function peepelPointManagerApp_restore(_16){
try{
if(!_16){
return;
}
var _17=_16.split(":")[1].split(",");
var _18=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
var _19=this.SYSTEM.Environment.SCREEN_WIDTH;
var _1a=parseInt(_19*parseFloat(_17[0]));
var top=parseInt((_18*parseFloat(_17[1]))+this.SYSTEM.Panel.getHeight());
this.frame.setPosition(_1a,top);
}
catch(ex){
jsExDebug("peepelPointManagerApp_restore",ex);
}
}
function peepelPointManagerApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("peepelPointManagerApp__SIG_KILL",ex);
}
}
function peepelPointManagerApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("peepelPointManagerApp__SIG_THEME",ex);
}
}
function peepelPointManagerApp_populate(){
function timeout(){
try{
this.SYSTEM.PeepelPoints.refresh();
}
catch(ex){
jsExDebug("peepelPointManagerApp_populate: timeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,timeout),"PointManager","Getting your points...");
}
catch(ex){
jsExDebug("peepelPointManagerApp_populate",ex);
}
}
function peepelPointManagerApp_refreshCallback(){
try{
this.applySearchAndSort();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("peepelPointManagerApp_refreshCallback",ex);
}
}
function peepelPointManagerApp_newPointCallback(_1c){
try{
this.applySearchAndSort();
}
catch(ex){
jsExDebug("peepelPointManagerApp_newPointCallback",ex);
}
}
function peepelPointManagerApp_deletePointCallback(_1d){
try{
this.applySearchAndSort();
}
catch(ex){
jsExDebug("peepelPointManagerApp_deletePointCallback",ex);
}
}
function peepelPointManagerApp_updatePointCallback(_1e){
try{
this.applySearchAndSort();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("peepelPointManagerApp_updatePointCallback",ex);
}
}
function peepelPointManagerApp_applySearchAndSort(){
try{
var _1f=(this.currentSearchTerm?"^.*"+this.currentSearchTerm.toLowerCase()+".*$":".*");
var _20=new RegExp(_1f);
var _21=this.SYSTEM.PeepelPoints.getPeepelPoints();
var _22=this.frame.getWidget("pointList");
_22.removeAllItems();
this.idArray=[];
switch(this.currentSortType){
case this.SORT_PRIVACY:
var _23=[];
var _24=[];
var _25=null;
for(var i=0;i<_21.length;i++){
if(_21[i].name.toLowerCase().match(_20)||_21[i].match(_20)){
_25=_21[i].privacy;
if(!_23[_25]){
_24.push(_25);
_23[_25]=[];
}
_23[_25].push(i);
}
}
sortListAsc(_24);
var _27=null;
var _28=null;
var _29=0;
for(var i=0;i<_24.length;i++){
_27=_23[_24[i]];
for(var j=0;j<_27.length;j++){
_28=_27[j];
var _2b=new peepelPointItem_t(_21[_28].name,_21[_28]);
_22.addItem(_2b);
this.idArray[_21[_28].getId()]=_29;
_29++;
}
}
break;
case this.SORT_NAME:
var _2c=[];
var _2d=[];
for(var i=0;i<_21.length;i++){
if(_21[i].name.toLowerCase().match(_20)||_21[i].match(_20)){
if(!_2c[_21[i].name]){
_2d.push(_21[i].name);
_2c[_21[i].name]=[];
}
_2c[_21[i].name].push(i);
}
}
sortListAsc(_2d,true);
var _27=null;
var _28=null;
var _29=0;
for(var i=0;i<_2d.length;i++){
_27=_2c[_2d[i]];
for(var j=0;j<_27.length;j++){
_28=_27[j];
var _2b=new peepelPointItem_t(_21[_28].name,_21[_28]);
_22.addItem(_2b);
this.idArray[_21[_28].getId()]=_29;
_29++;
}
}
break;
}
_22.collapseAllItems();
}
catch(ex){
jsExDebug("peepelPointManagerApp_applySearchAndSort",ex);
}
}
function peepelPointManagerApp_frame__onClose(_2e){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("peepelPointManagerApp_frame__onClose",ex);
}
}
function peepelPointManagerApp_frame__onResize(_2f){
try{
if(!_2f.getWidget("pointList")){
return;
}
var _30;
var _31;
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
if(dX||dY){
_30=_2f.width+this.SYSTEM.Event.dragDistanceX;
_31=_2f.height+this.SYSTEM.Event.dragDistanceY;
var _34=_2f.minimumWidth;
var _35=_2f.minimumHeight;
_30=(_30<_34?_34:_30);
_31=(_31<_35?_35:_31);
var _36=_2f.maximumWidth;
var _37=_2f.maximumHeight;
_30=(_30>_36?_36:_30);
_31=(_31>_37?_37:_31);
}else{
_30=_2f.width;
_31=_2f.height;
}
var _38=_2f.getWidget("sortSelect");
var _39=_2f.getWidget("searchText");
var _3a=_2f.getWidget("pointList");
_3a.setDimensions(_2f.getInternalWidth(_30),_2f.getInternalHeight(_31)-this.LIST_TOP-_38.height-_39.getClientHeight()-(2*this.pad));
}
catch(ex){
jsExDebug("peepelPointManagerApp_frame__onResize",ex);
}
}
function peepelPointManagerApp_frame_keyUp(key){
try{
var _3c=this.frame.getWidget("searchText");
if(_3c.hasFocus()){
var _3d=_3c.getContent();
var _3e=_3d.split(",");
_3d="";
for(var i in _3e){
if(_3e[i]){
_3d+="("+_3e[i]+")|";
}
}
_3d=_3d.replace(/\|$/,"");
this.currentSearchTerm=_3d;
this.applySearchAndSort();
}
}
catch(ex){
jsExDebug("peepelPointManagerApp_frame_keyUp",ex);
}
}
function peepelPointManagerApp_binding_refreshBtn_click(_40){
try{
this.populate();
}
catch(ex){
jsExDebug("peepelPointManagerApp_binding_refreshBtn_click",ex);
}
}
function peepelPointManagerApp_binding_sortSelect_itemSelect(_41){
try{
this.currentSortType=_41.getSelectedValue();
this.applySearchAndSort();
}
catch(ex){
jsExDebug("peepelPointManagerApp_binding_sortSelect_itemSelect",ex);
}
}
function peepelPointManagerApp_binding_quickHelpBtn_click(_42){
try{
var _43=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"people pointmanager");
}
catch(ex){
jsExDebug("peepelPointManagerApp_binding_quickHelpBtn_click",ex);
}
}

try{
peepelPointManagerApp_t.prototype=new application_t();
peepelPointManagerApp_t.prototype.constructor=peepelPointManagerApp_t;
peepelPointManagerApp_t.prototype.peepelPointManagerApp_super=application_t.prototype.constructor;
peepelPointManagerApp_t.prototype.cleanUp=peepelPointManagerApp_cleanUp;
peepelPointManagerApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
peepelPointManagerApp_t.prototype.capture=peepelPointManagerApp_capture;
peepelPointManagerApp_t.prototype.restore=peepelPointManagerApp_restore;
peepelPointManagerApp_t.prototype._SIG_KILL=peepelPointManagerApp__SIG_KILL;
peepelPointManagerApp_t.prototype._SIG_THEME=peepelPointManagerApp__SIG_THEME;
peepelPointManagerApp_t.prototype.createPanel=peepelPointManagerApp_createPanel;
peepelPointManagerApp_t.prototype.createManager=peepelPointManagerApp_createManager;
peepelPointManagerApp_t.prototype.populate=peepelPointManagerApp_populate;
peepelPointManagerApp_t.prototype.refreshCallback=peepelPointManagerApp_refreshCallback;
peepelPointManagerApp_t.prototype.newPointCallback=peepelPointManagerApp_newPointCallback;
peepelPointManagerApp_t.prototype.deletePointCallback=peepelPointManagerApp_deletePointCallback;
peepelPointManagerApp_t.prototype.updatePointCallback=peepelPointManagerApp_updatePointCallback;
peepelPointManagerApp_t.prototype.applySearchAndSort=peepelPointManagerApp_applySearchAndSort;
peepelPointManagerApp_t.prototype.frame__onClose=peepelPointManagerApp_frame__onClose;
peepelPointManagerApp_t.prototype.frame__onResize=peepelPointManagerApp_frame__onResize;
peepelPointManagerApp_t.prototype.frame_keyUp=peepelPointManagerApp_frame_keyUp;
peepelPointManagerApp_t.prototype.binding_refreshBtn_click=peepelPointManagerApp_binding_refreshBtn_click;
peepelPointManagerApp_t.prototype.binding_sortSelect_itemSelect=peepelPointManagerApp_binding_sortSelect_itemSelect;
peepelPointManagerApp_t.prototype.binding_quickHelpBtn_click=peepelPointManagerApp_binding_quickHelpBtn_click;
peepelPointManagerApp_t.prototype.APP_ID=APP_ID_PEEPELPOINT_MANAGER;
peepelPointManagerApp_t.prototype.APP_NAME="PointManager";
peepelPointManagerApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.PEEPELPOINT_MANAGER;
peepelPointManagerApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
peepelPointManagerApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
peepelPointManagerApp_t.prototype.FRAME_WIDTH=400;
peepelPointManagerApp_t.prototype.FRAME_HEIGHT=450;
peepelPointManagerApp_t.prototype.FRAME_MIN_HEIGHT=250;
peepelPointManagerApp_t.prototype.INFO_LEFT=0;
peepelPointManagerApp_t.prototype.INFO_TOP=0;
peepelPointManagerApp_t.prototype.LIST_ITEM_WIDTH=350;
peepelPointManagerApp_t.prototype.LIST_ITEM_HEIGHT=140;
peepelPointManagerApp_t.prototype.LIST_ITEM_COLLAPSED_HEIGHT=25;
peepelPointManagerApp_t.prototype.LIST_LEFT=0;
peepelPointManagerApp_t.prototype.LIST_TOP=50;
peepelPointManagerApp_t.prototype.LIST_HEIGHT_DIFF=150;
peepelPointManagerApp_t.prototype.REFRESH_LEFT=230;
peepelPointManagerApp_t.prototype.REFRESH_TOP=460;
peepelPointManagerApp_t.prototype.REFRESH_IMG="img/app/system/icons/utility/refresh.png";
peepelPointManagerApp_t.prototype.SORT_LEFT=10;
peepelPointManagerApp_t.prototype.SORT_PRIVACY=1;
peepelPointManagerApp_t.prototype.SORT_NAME=2;
}
catch(ex){
jsExDebug("peepelPointManagerApp_t.prototype",ex);
}
function peepelPointManagerApp_t(_1){
try{
this.peepelPointManagerApp_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.idArray=[];
this.currentSortType=this.SORT_NAME;
this.currentSearchTerm="";
this.SYSTEM.Tooltip.hideLoading();
this.createPanel();
this.createManager();
this.pointsActionIndex=this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_READ,new this.SYSTEM.Delegate(this,this.refreshCallback));
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_ADD,new this.SYSTEM.Delegate(this,this.newPointCallback),this.pointsActionIndex);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_DELETE,new this.SYSTEM.Delegate(this,this.deletePointCallback),this.pointsActionIndex);
this.SYSTEM.PeepelPoints.registerActionListener(this.SYSTEM.PeepelPoints.ACTION_UPDATE,new this.SYSTEM.Delegate(this,this.updatePointCallback),this.pointsActionIndex);
}
catch(ex){
jsExDebug("peepelPointManagerApp_t",ex);
}
}
function peepelPointManagerApp_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.SYSTEM.PeepelPoints){
me.SYSTEM.PeepelPoints.unregisterActionListener(me.pointsActionIndex);
me.pointsActionIndex=null;
}
me.fileBrowser=null;
me.frame=null;
for(var i=0;i<me.idArray.length;i++){
me.idArray[i]=null;
}
me.idArray=null;
me.infoLabel=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("peepelPointManagerApp_cleanUp",ex);
}
}
function peepelPointManagerApp_createPanel(){
try{
var _4=this.APPLICATION.Panel;
}
catch(ex){
jsExDebug("peepelPointManagerApp_createPanel",ex);
}
}
function peepelPointManagerApp_createManager(){
try{
var _5=new this.SYSTEM.Frame.Window("frame","PointManager",this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,true,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.HALF_MAXIMISE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_5.setMinimumSize(this.FRAME_WIDTH,this.FRAME_MIN_HEIGHT);
_5.setMaximumSize(this.FRAME_WIDTH);
_5.allowWindowOverflow();
var _6=this.SYSTEM.Widget;
var _7=new _6.Label("infoLabel");
_7.setDimensions(_5.getInternalWidth());
_7.setText("Double click on an item to view the Peepel Point, or single click to expand the item for more options.");
var _8=_5.getInternalWidth()-50;
var _9=new _6.FixedList("pointList",_8,this.LIST_ITEM_HEIGHT,_8,this.LIST_ITEM_COLLAPSED_HEIGHT);
_9.setBorder("solid 1px black");
var _a=new _6.ClassButton("refreshBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.REFRESH_IMG,"Refresh","Refresh the list of PeepelPoints.");
var _b=new _6.Label("sortLabel","Sort");
var _c=new _6.DropText("sortSelect",120);
_c.addItem(this.SORT_PRIVACY,"By Privacy Status");
_c.addItem(this.SORT_NAME,"By Name (Alphabetical)","By Name");
_c.setSelectedValue(this.currentSortType);
var _d=new _6.Label("sortLabel","Filter");
var _e=new _6.Text("searchText");
var _f=_5.topEdgeHeight;
var _10=_5.leftEdgeWidth;
_5.addWidget(_7,_10+this.INFO_LEFT,_f+this.INFO_TOP);
_5.addWidget(_9,_10+this.LIST_LEFT,_f+this.LIST_TOP);
_5.addWidget(_a,_10+this.REFRESH_LEFT,_5.bottomEdgeHeight,false,true);
_5.addWidget(_d,_10+this.SORT_LEFT,_5.bottomEdgeHeight,false,true);
_5.addWidget(_e,_10+this.SORT_LEFT+50,_5.bottomEdgeHeight,false,true);
_5.addWidget(_b,_d.positionX,_d.positionY+_d.getClientHeight()+this.pad,false,true);
_5.addWidget(_c,_e.positionX,_e.positionY+_e.getClientHeight()+this.pad+_c.height,false,true);
this.frame=_5;
this.infoLabel=_7;
this.populate();
_5.setDimensions(_5.width,_5.height);
_5.show();
var _11=this.APPLICATION.Panel;
var _12=this.SYSTEM.Widget.Button.HOVER_IMAGE;
var _13=new this.SYSTEM.Widget.ClassButton("quickHelpBtn",2,24,24,null,this.SYSTEM.Icon.Small.HELP,"Quick Help","Get help using the "+this.APP_NAME+".");
_11.addUtility(_13);
}
catch(ex){
jsExDebug("peepelPointManagerApp_createManager",ex);
}
}
function peepelPointManagerApp_capture(){
try{
var _14=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
var _15=this.SYSTEM.Environment.SCREEN_WIDTH;
this.captureString="mm:"+(this.frame.positionX/_15)+","+((this.frame.positionY-this.SYSTEM.Panel.getHeight())/_14);
return this.captureString;
}
catch(ex){
jsExDebug("peepelPointManagerApp_capture",ex);
}
}
function peepelPointManagerApp_restore(_16){
try{
if(!_16){
return;
}
var _17=_16.split(":")[1].split(",");
var _18=this.SYSTEM.Environment.SCREEN_HEIGHT-this.SYSTEM.Panel.getHeight();
var _19=this.SYSTEM.Environment.SCREEN_WIDTH;
var _1a=parseInt(_19*parseFloat(_17[0]));
var top=parseInt((_18*parseFloat(_17[1]))+this.SYSTEM.Panel.getHeight());
this.frame.setPosition(_1a,top);
}
catch(ex){
jsExDebug("peepelPointManagerApp_restore",ex);
}
}
function peepelPointManagerApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("peepelPointManagerApp__SIG_KILL",ex);
}
}
function peepelPointManagerApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("peepelPointManagerApp__SIG_THEME",ex);
}
}
function peepelPointManagerApp_populate(){
function timeout(){
try{
this.SYSTEM.PeepelPoints.refresh();
}
catch(ex){
jsExDebug("peepelPointManagerApp_populate: timeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,timeout),"PointManager","Getting your points...");
}
catch(ex){
jsExDebug("peepelPointManagerApp_populate",ex);
}
}
function peepelPointManagerApp_refreshCallback(){
try{
this.applySearchAndSort();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("peepelPointManagerApp_refreshCallback",ex);
}
}
function peepelPointManagerApp_newPointCallback(_1c){
try{
this.applySearchAndSort();
}
catch(ex){
jsExDebug("peepelPointManagerApp_newPointCallback",ex);
}
}
function peepelPointManagerApp_deletePointCallback(_1d){
try{
this.applySearchAndSort();
}
catch(ex){
jsExDebug("peepelPointManagerApp_deletePointCallback",ex);
}
}
function peepelPointManagerApp_updatePointCallback(_1e){
try{
this.applySearchAndSort();
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("peepelPointManagerApp_updatePointCallback",ex);
}
}
function peepelPointManagerApp_applySearchAndSort(){
try{
var _1f=(this.currentSearchTerm?"^.*"+this.currentSearchTerm.toLowerCase()+".*$":".*");
var _20=new RegExp(_1f);
var _21=this.SYSTEM.PeepelPoints.getPeepelPoints();
var _22=this.frame.getWidget("pointList");
_22.removeAllItems();
this.idArray=[];
switch(this.currentSortType){
case this.SORT_PRIVACY:
var _23=[];
var _24=[];
var _25=null;
for(var i=0;i<_21.length;i++){
if(_21[i].name.toLowerCase().match(_20)||_21[i].match(_20)){
_25=_21[i].privacy;
if(!_23[_25]){
_24.push(_25);
_23[_25]=[];
}
_23[_25].push(i);
}
}
sortListAsc(_24);
var _27=null;
var _28=null;
var _29=0;
for(var i=0;i<_24.length;i++){
_27=_23[_24[i]];
for(var j=0;j<_27.length;j++){
_28=_27[j];
var _2b=new peepelPointItem_t(_21[_28].name,_21[_28]);
_22.addItem(_2b);
this.idArray[_21[_28].getId()]=_29;
_29++;
}
}
break;
case this.SORT_NAME:
var _2c=[];
var _2d=[];
for(var i=0;i<_21.length;i++){
if(_21[i].name.toLowerCase().match(_20)||_21[i].match(_20)){
if(!_2c[_21[i].name]){
_2d.push(_21[i].name);
_2c[_21[i].name]=[];
}
_2c[_21[i].name].push(i);
}
}
sortListAsc(_2d,true);
var _27=null;
var _28=null;
var _29=0;
for(var i=0;i<_2d.length;i++){
_27=_2c[_2d[i]];
for(var j=0;j<_27.length;j++){
_28=_27[j];
var _2b=new peepelPointItem_t(_21[_28].name,_21[_28]);
_22.addItem(_2b);
this.idArray[_21[_28].getId()]=_29;
_29++;
}
}
break;
}
_22.collapseAllItems();
}
catch(ex){
jsExDebug("peepelPointManagerApp_applySearchAndSort",ex);
}
}
function peepelPointManagerApp_frame__onClose(_2e){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("peepelPointManagerApp_frame__onClose",ex);
}
}
function peepelPointManagerApp_frame__onResize(_2f){
try{
if(!_2f.getWidget("pointList")){
return;
}
var _30;
var _31;
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
if(dX||dY){
_30=_2f.width+this.SYSTEM.Event.dragDistanceX;
_31=_2f.height+this.SYSTEM.Event.dragDistanceY;
var _34=_2f.minimumWidth;
var _35=_2f.minimumHeight;
_30=(_30<_34?_34:_30);
_31=(_31<_35?_35:_31);
var _36=_2f.maximumWidth;
var _37=_2f.maximumHeight;
_30=(_30>_36?_36:_30);
_31=(_31>_37?_37:_31);
}else{
_30=_2f.width;
_31=_2f.height;
}
var _38=_2f.getWidget("sortSelect");
var _39=_2f.getWidget("searchText");
var _3a=_2f.getWidget("pointList");
_3a.setDimensions(_2f.getInternalWidth(_30),_2f.getInternalHeight(_31)-this.LIST_TOP-_38.height-_39.getClientHeight()-(2*this.pad));
}
catch(ex){
jsExDebug("peepelPointManagerApp_frame__onResize",ex);
}
}
function peepelPointManagerApp_frame_keyUp(key){
try{
var _3c=this.frame.getWidget("searchText");
if(_3c.hasFocus()){
var _3d=_3c.getContent();
var _3e=_3d.split(",");
_3d="";
for(var i in _3e){
if(_3e[i]){
_3d+="("+_3e[i]+")|";
}
}
_3d=_3d.replace(/\|$/,"");
this.currentSearchTerm=_3d;
this.applySearchAndSort();
}
}
catch(ex){
jsExDebug("peepelPointManagerApp_frame_keyUp",ex);
}
}
function peepelPointManagerApp_binding_refreshBtn_click(_40){
try{
this.populate();
}
catch(ex){
jsExDebug("peepelPointManagerApp_binding_refreshBtn_click",ex);
}
}
function peepelPointManagerApp_binding_sortSelect_itemSelect(_41){
try{
this.currentSortType=_41.getSelectedValue();
this.applySearchAndSort();
}
catch(ex){
jsExDebug("peepelPointManagerApp_binding_sortSelect_itemSelect",ex);
}
}
function peepelPointManagerApp_binding_quickHelpBtn_click(_42){
try{
var _43=this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_QUICKHELP,"people pointmanager");
}
catch(ex){
jsExDebug("peepelPointManagerApp_binding_quickHelpBtn_click",ex);
}
}

try{
okAlertDialogue_t.prototype=new systemApplication_t();
okAlertDialogue_t.prototype.constructor=okAlertDialogue_t;
okAlertDialogue_t.prototype.okAlertDialogue_super=systemApplication_t.prototype.constructor;
okAlertDialogue_t.prototype.cleanUp=okAlertDialogue_cleanUp;
okAlertDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
okAlertDialogue_t.prototype.hideOkButton=okAlertDialogue_hideOkButton;
okAlertDialogue_t.prototype.hideIcon=okAlertDialogue_hideIcon;
okAlertDialogue_t.prototype.setPosition=okAlertDialogue_setPosition;
okAlertDialogue_t.prototype.dialogueFrame__onClose=okAlertDialogue_dialogueFrame__onClose;
okAlertDialogue_t.prototype.dialogueFrame_keyPress=okAlertDialogue_dialogueFrame_keyPress;
okAlertDialogue_t.prototype.binding_okBtn_click=okAlertDialogue_binding_okBtn_click;
okAlertDialogue_t.prototype.DIALOGUE_WIDTH=400;
okAlertDialogue_t.prototype.DIALOGUE_HEIGHT=130;
okAlertDialogue_t.prototype.OK_WIDTH=20;
okAlertDialogue_t.prototype.ICON_WIDTH=30;
okAlertDialogue_t.prototype.ICON_HEIGHT=30;
okAlertDialogue_t.prototype.ICON_SRC="img/app/app/dialogue/ok_icon.png";
okAlertDialogue_t.prototype.TEXT_BOTTOM=40;
okAlertDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function okAlertDialogue_t(_1,_2,_3,_4,_5,_6,_7){
try{
this.okAlertDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=(_5?_5:this.DIALOGUE_WIDTH);
var _8=(_2?_2:"Alert");
var _9=new this.SYSTEM.Frame.Window("dialogueFrame",_8,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var _a=document.createElement("img");
_a.style.position="absolute";
_a.style.left=_9.leftEdgeWidth+"px";
_a.style.top=_9.topEdgeHeight+"px";
_a.style.width=this.ICON_WIDTH+"px";
_a.style.height=this.ICON_HEIGHT+"px";
_a.src=this.ICON_SRC;
_9.windowDiv.appendChild(_a);
this.text=_3;
var _b=document.createElement("div");
_b.style.position="absolute";
_b.style.left=(_9.leftEdgeWidth+this.ICON_WIDTH+this.SYSTEM.Style.WIDGET_PADDING)+"px";
_b.style.top=_9.topEdgeHeight+"px";
_b.style.height="auto";
_b.style.width=(this.width-parseFloat(_b.style.left)-_9.rightEdgeWidth)+"px";
_b.style.overflow="hidden";
_b.className="boxcontent";
if(_3){
_b.innerHTML=_3;
}
_9.windowDiv.appendChild(_b);
var _c=new this.SYSTEM.Widget.TextButton("okBtn",40,"OK");
_9.setFixedDimensions(this.width,_b.clientHeight+_9.topEdgeHeight+_9.bottomEdgeHeight+_c.height+this.SYSTEM.Style.WIDGET_PADDING);
this.dialogueFrame=_9;
this.iconImage=_a;
this.textDiv=_b;
this.okBtn=_c;
this.actionDelegate=_4;
_9.addWidget(_c,_9.rightEdgeWidth,_9.bottomEdgeHeight,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_9.show();
}
catch(ex){
jsExDebug("okAlertDialogue_t",ex);
}
}
function okAlertDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textDiv=null;
me.iconImage=null;
me.okBtn=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("okAlertDialogue_cleanUp",ex);
}
}
function okAlertDialogue_hideOkButton(){
try{
this.okBtn.hide();
}
catch(ex){
jsExDebug("okAlertDialogue_hideOkButton",ex);
}
}
function okAlertDialogue_hideIcon(){
try{
this.dialogueFrame.windowDiv.removeChild(this.iconImage);
if(this.textDiv){
this.textDiv.style.left=this.dialogueFrame.leftEdgeWidth+"px";
this.textDiv.style.width=this.dialogueFrame.getInternalWidth()+"px";
}
}
catch(ex){
jsExDebug("okAlertDialogue_hideIcon",ex);
}
}
function okAlertDialogue_setPosition(_e,_f){
try{
this.dialogueFrame.setPosition(_e,_f);
}
catch(ex){
jsExDebug("okAlertDialogue_setPosition",ex);
}
}
function okAlertDialogue_dialogueFrame__onClose(_10){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("okAlertDialogue_dialogueFrame__onClose",ex);
}
}
function okAlertDialogue_dialogueFrame_keyPress(key){
try{
switch(key.which){
case 13:
this.binding_okBtn_click();
break;
default:
}
}
catch(ex){
jsExDebug("okAlertDialogue_dialogueFrame_keyPress",ex);
}
}
function okAlertDialogue_binding_okBtn_click(_12){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(null,this);
}
this.cleanUp();
}
catch(ex){
jsExDebug("okAlertDialogue_binding_okBtn_click",ex);
}
}

try{
okCancelAlertDialogue_t.prototype=new systemApplication_t();
okCancelAlertDialogue_t.prototype.constructor=okCancelAlertDialogue_t;
okCancelAlertDialogue_t.prototype.okCancelAlertDialogue_super=systemApplication_t.prototype.constructor;
okCancelAlertDialogue_t.prototype.cleanUp=okCancelAlertDialogue_cleanUp;
okCancelAlertDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
okCancelAlertDialogue_t.prototype.dialogueFrame__onClose=okCancelAlertDialogue_dialogueFrame__onClose;
okCancelAlertDialogue_t.prototype.setPosition=okCancelAlertDialogue_setPosition;
okCancelAlertDialogue_t.prototype.binding_okBtn_click=okCancelAlertDialogue_binding_okBtn_click;
okCancelAlertDialogue_t.prototype.binding_cancelBtn_click=okCancelAlertDialogue_binding_cancelBtn_click;
okCancelAlertDialogue_t.prototype.DIALOGUE_WIDTH=400;
okCancelAlertDialogue_t.prototype.DIALOGUE_HEIGHT=130;
okCancelAlertDialogue_t.prototype.OK_RIGHT=115;
okCancelAlertDialogue_t.prototype.OK_BOTTOM=40;
okCancelAlertDialogue_t.prototype.OK_WIDTH=20;
okCancelAlertDialogue_t.prototype.CANCEL_RIGHT=70;
okCancelAlertDialogue_t.prototype.CANCEL_BOTTOM=40;
okCancelAlertDialogue_t.prototype.CANCEL_WIDTH=50;
okCancelAlertDialogue_t.prototype.TEXT_RIGHT=20;
okCancelAlertDialogue_t.prototype.TEXT_BOTTOM=55;
okCancelAlertDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function okCancelAlertDialogue_t(_1,_2,_3,_4,_5){
try{
this.okCancelAlertDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=(_5?_5:this.DIALOGUE_WIDTH);
var _6=(_2?_2:"Alert");
var _7=new this.SYSTEM.Frame.Window("dialogueFrame",_6,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var _8=document.createElement("img");
_8.style.position="absolute";
_8.style.left=_7.leftEdgeWidth+"px";
_8.style.top=_7.topEdgeHeight+"px";
_8.style.width=this.ICON_WIDTH+"px";
_8.style.height=this.ICON_HEIGHT+"px";
_8.src=this.ICON_SRC;
_7.windowDiv.appendChild(_8);
this.text=_3;
var _9=document.createElement("div");
_9.style.position="absolute";
_9.style.left=(_7.leftEdgeWidth+this.ICON_WIDTH+this.SYSTEM.Style.WIDGET_PADDING)+"px";
_9.style.top=_7.topEdgeHeight+"px";
_9.style.height="auto";
_9.style.width=(this.width-parseFloat(_9.style.left)-_7.rightEdgeWidth)+"px";
_9.style.overflow="hidden";
_9.className="boxcontent";
if(_3){
_9.innerHTML=_3;
}
_7.windowDiv.appendChild(_9);
var _a=new this.SYSTEM.Widget.TextButton("okBtn",40,"OK");
var _b=new this.SYSTEM.Widget.TextButton("cancelBtn",60,"Cancel");
_7.setFixedDimensions(this.width,_9.clientHeight+_7.topEdgeHeight+_7.bottomEdgeHeight+_a.height+this.SYSTEM.Style.WIDGET_PADDING);
this.dialogueFrame=_7;
this.textDiv=_9;
this.okBtn=_a;
this.cancelBtn=_b;
this.actionDelegate=_4;
_7.addWidget(_a,_7.rightEdgeWidth,_7.bottomEdgeHeight,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_7.show();
}
catch(ex){
jsExDebug("okAlertDialog_t",ex);
}
}
function okCancelAlertDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textDiv=null;
me.okBtn=null;
me.cancelBtn=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("okCancelAlertDialogue_cleanUp",ex);
}
}
function okCancelAlertDialogue_setPosition(_d,_e){
try{
this.dialogueFrame.setPosition(_d,_e);
}
catch(ex){
jsExDebug("okCancelAlertDialogue_setPosition",ex);
}
}
function okCancelAlertDialogue_dialogueFrame__onClose(_f){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("okCancelAlertDialogue_dialogueFrame__onClose",ex);
}
}
function okCancelAlertDialogue_binding_okBtn_click(_10){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(true);
}
this.cleanUp();
}
catch(ex){
jsExDebug("okCancelAlertDialogue_binding_okBtn_click",ex);
}
}
function okCancelAlertDialogue_binding_cancelBtn_click(_11){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(false);
}
this.cleanUp();
}
catch(ex){
jsExDebug("okCancelAlertDialogue_binding_cancelBtn_click",ex);
}
}

try{
yesNoAlertDialogue_t.prototype=new systemApplication_t();
yesNoAlertDialogue_t.prototype.constructor=yesNoAlertDialogue_t;
yesNoAlertDialogue_t.prototype.yesNoAlertDialogue_super=systemApplication_t.prototype.constructor;
yesNoAlertDialogue_t.prototype.cleanUp=yesNoAlertDialogue_cleanUp;
yesNoAlertDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
yesNoAlertDialogue_t.prototype.setPosition=yesNoAlertDialogue_setPosition;
yesNoAlertDialogue_t.prototype.addWidget=yesNoAlertDialogue_addWidget;
yesNoAlertDialogue_t.prototype.show=yesNoAlertDialogue_show;
yesNoAlertDialogue_t.prototype.dialogueFrame__onClose=yesNoAlertDialogue_dialogueFrame__onClose;
yesNoAlertDialogue_t.prototype.binding_yesBtn_click=yesNoAlertDialogue_binding_yesBtn_click;
yesNoAlertDialogue_t.prototype.binding_noBtn_click=yesNoAlertDialogue_binding_noBtn_click;
yesNoAlertDialogue_t.prototype.DIALOGUE_WIDTH=400;
yesNoAlertDialogue_t.prototype.DIALOGUE_HEIGHT=130;
yesNoAlertDialogue_t.prototype.BUTTON_BOTTOM=40;
yesNoAlertDialogue_t.prototype.YES_RIGHT=102;
yesNoAlertDialogue_t.prototype.NO_RIGHT=52;
yesNoAlertDialogue_t.prototype.TEXT_RIGHT=20;
yesNoAlertDialogue_t.prototype.TEXT_BOTTOM=55;
yesNoAlertDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function yesNoAlertDialogue_t(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a){
try{
this.yesNoAlertDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=(_5?_5:this.DIALOGUE_WIDTH);
var _b=(_2?_2:"Alert");
var _c=new this.SYSTEM.Frame.Window("dialogueFrame",_b,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
this.text=_3;
var _d=document.createElement("div");
_d.style.position="absolute";
_d.style.left=_c.leftEdgeWidth+"px";
_d.style.top=_c.topEdgeHeight+"px";
_d.style.height="auto";
_d.style.width=(this.width-parseFloat(_d.style.left)-_c.rightEdgeWidth)+"px";
_d.style.overflow="hidden";
_d.className="boxcontent";
if(_3){
_d.innerHTML=_3;
}
_c.windowDiv.appendChild(_d);
var _e=new this.SYSTEM.Widget.TextButton("yesBtn",(_8?_8:40),(_7?_7:"Yes"));
var _f=new this.SYSTEM.Widget.TextButton("noBtn",(_a?_a:40),(_9?_9:"No"));
_c.setFixedDimensions(this.width,_d.clientHeight+_c.topEdgeHeight+_c.bottomEdgeHeight+_e.height+this.SYSTEM.Style.WIDGET_PADDING);
this.dialogueFrame=_c;
this.textDiv=_d;
this.yesBtn=_e;
this.noBtn=_f;
this.actionDelegate=_4;
_c.addWidget(_f,_c.rightEdgeWidth,_c.bottomEdgeHeight,true,true);
_c.addWidget(_e,_f.positionX+_f.width+this.SYSTEM.Style.WIDGET_PADDING,_f.positionY,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
if(!_6){
_c.show();
}
}
catch(ex){
jsExDebug("okAlertDialog_t",ex);
}
}
function yesNoAlertDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textDiv=null;
me.yesBtn=null;
me.noBtn=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("yesNoAlertDialogue_cleanUp",ex);
}
}
function yesNoAlertDialogue_setPosition(_11,_12){
try{
this.dialogueFrame.setPosition(_11,_12);
}
catch(ex){
jsExDebug("yesNoAlertDialogue_setPosition",ex);
}
}
function yesNoAlertDialogue_addWidget(_13,_14,_15,_16,_17){
try{
this.dialogueFrame.addWidget(_13,_14,_15,_16,_17);
}
catch(ex){
jsExDebug("yesNoAlertDialogue_addWidget",ex);
}
}
function yesNoAlertDialogue_show(){
try{
this.dialogueFrame.show();
}
catch(ex){
jsExDebug("yesNoAlertDialogue_show",ex);
}
}
function yesNoAlertDialogue_dialogueFrame__onClose(_18){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(false);
}
if(this.applicationId){
this.cleanUp();
}
}
catch(ex){
jsExDebug("yesNoAlertDialogue_dialogueFrame__onClose",ex);
}
}
function yesNoAlertDialogue_binding_yesBtn_click(_19){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(true);
}
if(this.applicationId){
this.cleanUp();
}
}
catch(ex){
jsExDebug("yesNoAlertDialogue_binding_yesBtn_click",ex);
}
}
function yesNoAlertDialogue_binding_noBtn_click(_1a){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(false);
}
if(this.applicationId){
this.cleanUp();
}
}
catch(ex){
jsExDebug("yesNoAlertDialogue_binding_noBtn_click",ex);
}
}

try{
errorDialogue_t.prototype=new systemApplication_t();
errorDialogue_t.prototype.constructor=errorDialogue_t;
errorDialogue_t.prototype.errorDialogue_super=systemApplication_t.prototype.constructor;
errorDialogue_t.prototype.cleanUp=errorDialogue_cleanUp;
errorDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
errorDialogue_t.prototype.setPosition=errorDialogue_setPosition;
errorDialogue_t.prototype.dialogueFrame__onClose=errorDialogue_dialogueFrame__onClose;
errorDialogue_t.prototype.dialogueFrame_keyPress=errorDialogue_dialogueFrame_keyPress;
errorDialogue_t.prototype.binding_okBtn_click=errorDialogue_binding_okBtn_click;
errorDialogue_t.prototype.DIALOGUE_WIDTH=400;
errorDialogue_t.prototype.DIALOGUE_HEIGHT=130;
errorDialogue_t.prototype.ICON_WIDTH=30;
errorDialogue_t.prototype.ICON_HEIGHT=30;
errorDialogue_t.prototype.ICON_SRC="img/app/app/dialogue/error_icon.png";
errorDialogue_t.prototype.OK_BOTTOM=40;
errorDialogue_t.prototype.OK_RIGHT=55;
errorDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("errorDialogue_t.prototype",ex);
}
function errorDialogue_t(_1,_2,_3,_4,_5){
try{
this.errorDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=(_5?_5:this.DIALOGUE_WIDTH);
var _6=(_2?_2:"Alert");
var _7=new this.SYSTEM.Frame.Window("dialogueFrame",_6,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var _8=document.createElement("img");
_8.style.position="absolute";
_8.style.left=_7.leftEdgeWidth+"px";
_8.style.top=_7.topEdgeHeight+"px";
_8.style.width=this.ICON_WIDTH+"px";
_8.style.height=this.ICON_HEIGHT+"px";
_8.src=this.ICON_SRC;
_7.windowDiv.appendChild(_8);
this.text=_3;
var _9=document.createElement("div");
_9.style.position="absolute";
_9.style.left=(_7.leftEdgeWidth+this.ICON_WIDTH+this.SYSTEM.Style.WIDGET_PADDING)+"px";
_9.style.top=_7.topEdgeHeight+"px";
_9.style.height="auto";
_9.style.width=(this.width-parseFloat(_9.style.left)-_7.rightEdgeWidth)+"px";
_9.style.overflow="hidden";
_9.className="boxcontent";
if(_3){
_9.innerHTML=_3;
}
_7.windowDiv.appendChild(_9);
var _a=new this.SYSTEM.Widget.TextButton("okBtn",40,"OK");
_7.setFixedDimensions(this.width,_9.clientHeight+_7.topEdgeHeight+_7.bottomEdgeHeight+_a.height+this.SYSTEM.Style.WIDGET_PADDING);
this.dialogueFrame=_7;
this.textDiv=_9;
this.okBtn=_a;
this.actionDelegate=_4;
_7.addWidget(_a,_7.rightEdgeWidth,_7.bottomEdgeHeight,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_7.show();
}
catch(ex){
jsExDebug("errorDialogue_t",ex);
}
}
function errorDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textDiv=null;
me.iconImage=null;
me.okBtn=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("errorDialogue_cleanUp",ex);
}
}
function errorDialogue_setPosition(_c,_d){
try{
this.dialogueFrame.setPosition(_c,_d);
}
catch(ex){
jsExDebug("errorDialogue_setPosition",ex);
}
}
function errorDialogue_dialogueFrame__onClose(_e){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("errorDialogue_dialogueFrame__onClose",ex);
}
}
function errorDialogue_dialogueFrame_keyPress(_f){
try{
switch(_f.which){
case 13:
this.binding_okBtn_click();
break;
default:
}
}
catch(ex){
jsExDebug("errorDialogue_dialogueFrame_keyPress",ex);
}
}
function errorDialogue_binding_okBtn_click(_10){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(null,this);
}
this.cleanUp();
}
catch(ex){
jsExDebug("errorDialogue_binding_okBtn_click",ex);
}
}

try{
debugDialogue_t.prototype=new systemApplication_t();
debugDialogue_t.prototype.constructor=debugDialogue_t;
debugDialogue_t.prototype.debugDialogue_super=systemApplication_t.prototype.constructor;
debugDialogue_t.prototype.cleanUp=debugDialogue_cleanUp;
debugDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
debugDialogue_t.prototype.dialogueFrame__onClose=debugDialogue_dialogueFrame__onClose;
debugDialogue_t.prototype.binding_okBtn_click=debugDialogue_binding_okBtn_click;
debugDialogue_t.prototype.DIALOGUE_WIDTH=400;
debugDialogue_t.prototype.DIALOGUE_HEIGHT=220;
debugDialogue_t.prototype.OK_RIGHT=55;
debugDialogue_t.prototype.OK_WIDTH=20;
debugDialogue_t.prototype.OK_BOTTOM=40;
debugDialogue_t.prototype.TEXT_RIGHT=20;
debugDialogue_t.prototype.TEXT_BOTTOM=80;
debugDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function debugDialogue_t(_1,_2,_3,_4,_5){
try{
this.debugDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=(_4?_4:this.DIALOGUE_WIDTH);
this.height=(_5?_5:this.DIALOGUE_HEIGHT);
var _6=(_2?_2:"Alert");
var _7=new this.SYSTEM.Frame.Window("dialogueFrame",_6,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_7.setMinimumSize(this.width,this.height);
_7.setMaximumSize(this.width,this.height);
_7.setDimensions(this.width,this.height);
_7.show();
var _8=document.createElement("textarea");
_8.style.position="absolute";
_8.style.left=_7.leftEdgeWidth+"px";
_8.style.top=_7.topEdgeHeight+"px";
_8.style.width=(this.width-this.TEXT_RIGHT)+"px";
_8.style.height=(this.height-this.TEXT_BOTTOM)+"px";
_8.style.overflowY="scroll";
_8.style.border="solid 1px black";
_8.style.backgroundColor="white";
_8.value=_3;
_7.windowDiv.appendChild(_8);
var _9=new this.SYSTEM.Widget.TextButton("okBtn",40,"OK");
this.dialogueFrame=_7;
this.okBtn=_9;
_7.addWidget(_9,this.width-this.OK_RIGHT,this.height-this.OK_BOTTOM);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
}
catch(ex){
jsExDebug("okAlertDialog_t",ex);
}
}
function debugDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textInput=null;
me.okBtn=null;
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("debugDialogue_cleanUp",ex);
}
}
function debugDialogue_dialogueFrame__onClose(_b){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("debugDialogue_dialogueFrame__onClose",ex);
}
}
function debugDialogue_binding_okBtn_click(_c){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("debugDialogue_binding_okBtn_click",ex);
}
}

try{
openDialogue_t.prototype=new systemApplication_t();
openDialogue_t.prototype.constructor=openDialogue_t;
openDialogue_t.prototype.openDialogue_super=systemApplication_t.prototype.constructor;
openDialogue_t.prototype.cleanUp=openDialogue_cleanUp;
openDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
openDialogue_t.prototype.setPosition=openDialogue_setPosition;
openDialogue_t.prototype.openFile=openDialogue_openFile;
openDialogue_t.prototype.dialogueFrame__onClose=openDialogue_dialogueFrame__onClose;
openDialogue_t.prototype.binding_openBtn_click=openDialogue_binding_openBtn_click;
openDialogue_t.prototype.fileDblClickEvent=openDialogue_fileDblClickEvent;
openDialogue_t.prototype.folderDblClickEvent=openDialogue_folderDblClickEvent;
openDialogue_t.prototype.backBtnClickEvent=openDialogue_backBtnClickEvent;
openDialogue_t.prototype.DIALOGUE_WIDTH=420;
openDialogue_t.prototype.DIALOGUE_HEIGHT=275;
openDialogue_t.prototype.FILES_TOP=25;
openDialogue_t.prototype.OPEN_WIDTH=60;
openDialogue_t.prototype.OPEN_HEIGHT=24;
openDialogue_t.prototype.OPEN_LEFT=345;
openDialogue_t.prototype.OPEN_TOP=210;
openDialogue_t.prototype.HELP_LEFT=10;
openDialogue_t.prototype.HELP_TOP=0;
openDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
openDialogue_t.prototype.BUTTON_IMG="img/app/system/widgets/blankbutton/40x30";
}
catch(ex){
jsExDebug("openDialogue_t.prototype",ex);
}
function openDialogue_t(_1,_2,_3){
try{
this.openDialogue_super();
this.openFileText="To open a file: Double-click on it or select the file and click 'Open'.";
this.openFolderText="Double-click on a folder to view its contents.";
if(!this.FRAMEWORK_INITIALISED){
return;
}
var _4=new this.SYSTEM.Frame.Window("dialogueFrame","Open",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_4.setMinimumSize(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
_4.setMaximumSize(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
_4.setDimensions(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
var _5=new this.SYSTEM.Widget.Label("helpLabel");
_5.setText(this.openFolderText);
var _6=new this.SYSTEM.Widget.TextButton("openBtn",this.OPEN_WIDTH,"Open");
var _7=new this.SYSTEM.Controls.FileBrowser("fileBrowser",SYSTEM.Controls.FileBrowser.TYPE_OPEN,_3);
_7.setDimensions(_4.getInternalWidth(),_4.getInternalHeight()-_6.height-this.SYSTEM.Style.WIDGET_PADDING-this.FILES_TOP);
_7.addEventHandler(_7.FILE_DBL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.fileDblClickEvent));
_7.addEventHandler(_7.FOLDER_DBL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.folderDblClickEvent));
_7.addEventHandler(_7.BACK_BTN_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.backBtnClickEvent));
_7.listFolders();
_4.addWidget(_5,_4.leftEdgeWidth+this.HELP_LEFT,_4.topEdgeHeight+this.HELP_TOP);
_4.addControl(_7,_4.leftEdgeWidth,_4.topEdgeHeight+this.FILES_TOP);
_4.addWidget(_6,_4.rightEdgeWidth,_4.bottomEdgeHeight,true,true);
this.dialogueFrame=_4;
this.helpLabel=_5;
this.fileBrowser=_7;
this.openBtn=_6;
this.application=_1;
this.actionDelegate=_2;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_4.show();
}
catch(ex){
jsExDebug("openDialogue_t",ex);
}
}
function openDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.fileBrowser=null;
me.openBtn=null;
me.helpLabel=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("openDialogue_cleanUp",ex);
}
}
function openDialogue_openFile(){
function open(){
try{
switch(parseInt(_9.filetype)){
case me.SYSTEM.Filesystem.File.TYPE_WRITER:
if(_9.ispublic){
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WRITER,_9.fileid,null,true);
}else{
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WRITER,_9.fileid);
}
break;
case me.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
if(_9.ispublic){
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET,_9.fileid,null,true);
}else{
me.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET,_9.fileid);
}
break;
case me.SYSTEM.Filesystem.File.TYPE_IMAGE:
me.dialogueFrame.close();
return;
}
if(me.actionDelegate){
me.actionDelegate.invoke(_9);
}
me.dialogueFrame.close();
}
catch(ex){
jsExDebug("openDialogue_openFile: open",ex);
}
}
try{
var me=this;
var _9=this.fileBrowser.getSelectedFile();
var _b=this.fileBrowser.getSelectedFolder();
if(_b&&_9){
if(_9.filetype&&(_9.filetype==this.SYSTEM.Filesystem.File.TYPE_WRITER||_9.filetype==this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET)){
this.SYSTEM.Tooltip.showLoading(open,"Open","Opening "+_9.filename+"...");
}else{
var _c=new this.SYSTEM.Dialogue.Error(null,"Open error","Please select a file to open");
}
}else{
if(_b&&!this.fileBrowser.openedFolder){
this.fileBrowser.openSelectedFolder();
}
}
}
catch(ex){
jsExDebug("openDialogue_openFile",ex);
}
}
function openDialogue_setPosition(_d,_e){
try{
this.dialogueFrame.setPosition(_d,_e);
}
catch(ex){
jsExDebug("openDialogue_setPosition",ex);
}
}
function openDialogue_dialogueFrame__onClose(_f){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("openDialogue_dialogueFrame__onClose",ex);
}
}
function openDialogue_binding_openBtn_click(_10){
try{
this.openFile();
}
catch(ex){
jsExDebug("openDialogue_binding_openBtn_click",ex);
}
}
function openDialogue_fileDblClickEvent(_11,_12){
try{
this.openFile();
}
catch(ex){
jsExDebug("openDialogue_fileDblClickEvent",ex);
}
}
function openDialogue_folderDblClickEvent(_13,_14){
try{
this.helpLabel.setText(this.openFileText);
}
catch(ex){
jsExDebug("openDialogue_folderDblClickEvent",ex);
}
}
function openDialogue_backBtnClickEvent(_15,_16){
try{
this.helpLabel.setText(this.openFolderText);
}
catch(ex){
jsExDebug("openDialogue_backBtnClickEvent",ex);
}
}

try{
saveDialogue_t.prototype=new systemApplication_t();
saveDialogue_t.prototype.constructor=saveDialogue_t;
saveDialogue_t.prototype.saveDialogue_super=systemApplication_t.prototype.constructor;
saveDialogue_t.prototype.cleanUp=saveDialogue_cleanUp;
saveDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
saveDialogue_t.prototype._SIG_THEME=saveDialogue__SIG_THEME;
saveDialogue_t.prototype.setFilename=saveDialogue_setFilename;
saveDialogue_t.prototype.setPosition=saveDialogue_setPosition;
saveDialogue_t.prototype.openErrorDialog=saveDialogue_openErrorDialog;
saveDialogue_t.prototype.folderCreationCallback=saveDialogue_folderCreationCallback;
saveDialogue_t.prototype.saveNewFolder=saveDialogue_saveNewFolder;
saveDialogue_t.prototype.rename=saveDialogue_rename;
saveDialogue_t.prototype.performCurrentAction=saveDialogue_performCurrentAction;
saveDialogue_t.prototype.saveFile=saveDialogue_saveFile;
saveDialogue_t.prototype.getFileTypeName=saveDialogue_getFileTypeName;
saveDialogue_t.prototype.backBtnClickEvent=saveDialogue_backBtnClickEvent;
saveDialogue_t.prototype.fileSelectEvent=saveDialogue_fileSelectEvent;
saveDialogue_t.prototype.folderSelectEvent=saveDialogue_folderSelectEvent;
saveDialogue_t.prototype.folderDblClickEvent=saveDialogue_folderDblClickEvent;
saveDialogue_t.prototype.dialogueFrame__onClose=saveDialogue_dialogueFrame__onClose;
saveDialogue_t.prototype.dialogueFrameKeyPress=saveDialogue_dialogueFrameKeyPress;
saveDialogue_t.prototype.dialogueFrameKeyDown=saveDialogue_dialogueFrameKeyDown;
saveDialogue_t.prototype.binding_renameBtn_click=saveDialogue_binding_renameBtn_click;
saveDialogue_t.prototype.binding_newFolderBtn_click=saveDialogue_binding_newFolderBtn_click;
saveDialogue_t.prototype.binding_saveBtn_click=saveDialogue_binding_saveBtn_click;
saveDialogue_t.prototype.binding_okBtn_click=saveDialogue_binding_okBtn_click;
saveDialogue_t.prototype.binding_cancelBtn_click=saveDialogue_binding_cancelBtn_click;
saveDialogue_t.prototype.binding_deleteBtn_click=saveDialogue_binding_deleteBtn_click;
saveDialogue_t.prototype.RENAME=1;
saveDialogue_t.prototype.NEW_FOLDER=2;
saveDialogue_t.prototype.FOLDER_VIEW=1;
saveDialogue_t.prototype.FILE_VIEW=2;
saveDialogue_t.prototype.ALL_FILES_ID=1;
saveDialogue_t.prototype.OTHERS_FILES_ID=2;
saveDialogue_t.prototype.DIALOGUE_WIDTH=500;
saveDialogue_t.prototype.DIALOGUE_HEIGHT=295;
saveDialogue_t.prototype.FOLDERS_LEFT=0;
saveDialogue_t.prototype.FOLDERS_TOP=60;
saveDialogue_t.prototype.FOLDERS_WIDTH=480;
saveDialogue_t.prototype.FOLDERS_HEIGHT=155;
saveDialogue_t.prototype.SAVE_WIDTH=60;
saveDialogue_t.prototype.SAVE_LEFT=420;
saveDialogue_t.prototype.NAME_LBL_LEFT=0;
saveDialogue_t.prototype.NAME_LBL_TOP=230;
saveDialogue_t.prototype.NAME_LEFT=75;
saveDialogue_t.prototype.NAME_WIDTH=320;
saveDialogue_t.prototype.NAME_HEIGHT=20;
saveDialogue_t.prototype.RENAME_LEFT=0;
saveDialogue_t.prototype.TEXT_LEFT=10;
saveDialogue_t.prototype.OK_LEFT=175;
saveDialogue_t.prototype.OK_WIDTH=40;
saveDialogue_t.prototype.CANCEL_WIDTH=60;
saveDialogue_t.prototype.CANCEL_LEFT=220;
saveDialogue_t.prototype.HELP_LEFT=0;
saveDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
saveDialogue_t.prototype.SEPARATOR_TOP=20;
saveDialogue_t.prototype.BTN_TOP=30;
saveDialogue_t.prototype.HELP_TOP=0;
saveDialogue_t.prototype.OK_TOP=saveDialogue_t.prototype.BTN_TOP;
saveDialogue_t.prototype.TEXT_TOP=saveDialogue_t.prototype.BTN_TOP;
saveDialogue_t.prototype.CANCEL_TOP=saveDialogue_t.prototype.BTN_TOP;
saveDialogue_t.prototype.RENAME_IMG="img/app/system/icons/24x24/fm_rename.png";
saveDialogue_t.prototype.NEW_FOLDER_IMG="img/app/system/icons/24x24/fm_newfolder.png";
}
catch(ex){
jsExDebug("saveDialogue_t.prototype",ex);
}
function saveDialogue_t(_1,_2,_3,_4){
try{
this.saveDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.actionDelegate=_2;
this.closeDelegate=_3;
this.fileType=_4;
this.saveFileText="To save a file: Type a file name and click 'Save'.";
this.openFolderText="Double-click on a folder to view its contents.";
this.renameFolderText="Type in the new folder name and click 'OK' to save it.";
this.renameFileText="Type in the new file name and click 'OK' to save it.";
this.moveToText="Choose the folder to move the file to and click 'OK'.";
this.newFolderText="Type in the folders name and click 'OK' to save it.";
var _5=new this.SYSTEM.Frame.Window("dialogueFrame","Save",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_5.setMinimumSize(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
_5.setMaximumSize(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
_5.setDimensions(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
var _6=new this.SYSTEM.Widget.Label("helpLabel");
_6.setText(this.openFolderText);
var _7=document.createElement("div");
_7.style.position="absolute";
_7.style.left=_5.leftEdgeWidth+"px";
_7.style.top=(_5.topEdgeHeight+this.SEPARATOR_TOP)+"px";
_7.style.width=_5.getInternalWidth()+"px";
_7.style.height="2px";
_7.style.backgroundColor="rgb(192, 192, 192)";
_5.windowDiv.appendChild(_7);
var _8=24;
var _9=new this.SYSTEM.Controls.FileBrowser("fileBrowser",this.SYSTEM.Controls.FileBrowser.TYPE_SAVE);
_9.setDimensions(_5.getInternalWidth(),_5.getInternalHeight()-this.FOLDERS_TOP-_8-this.SYSTEM.Style.WIDGET_PADDING);
_9.addEventHandler(_9.FILE_SELECT_EVENT,new this.SYSTEM.Delegate(this,this.fileSelectEvent));
_9.addEventHandler(_9.FILE_DBL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.fileDblClickEvent));
_9.addEventHandler(_9.BACK_BTN_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.backBtnClickEvent));
_9.addEventHandler(_9.FOLDER_SELECT_EVENT,new this.SYSTEM.Delegate(this,this.folderSelectEvent));
_9.addEventHandler(_9.FOLDER_DBL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.folderDblClickEvent));
_9.listFolders();
var _a=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE;
var _b="normal 12px verdana";
var _c=new this.SYSTEM.Widget.ClassButton("deleteBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.SYSTEM.Icon.Small.DELETE,"Delete","Delete the selected file/folder");
var _d=new this.SYSTEM.Widget.ClassButton("renameBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.RENAME_IMG,"Rename","Rename the selected file/folder");
var _e=new this.SYSTEM.Widget.ClassButton("newFolderBtn",classButton_t.prototype.TYPE_PANEL_BUTTON,24,24,null,this.NEW_FOLDER_IMG,"New folder","Create a new folder");
var _f=new this.SYSTEM.Widget.Text("textBox");
_f.setDimensions(155,20);
_f.textBox.style.paddingLeft="5px";
var _10=new this.SYSTEM.Widget.TextButton("okBtn",this.OK_WIDTH,"OK");
var _11=new this.SYSTEM.Widget.TextButton("cancelBtn",this.CANCEL_WIDTH,"Cancel");
var _12=new this.SYSTEM.Widget.Label("nameLabel");
_12.setText("Filename:");
var _13=new this.SYSTEM.Widget.Text("nameText");
_13.setDimensions(this.NAME_WIDTH);
_13.setContent("untitled");
var _14=new this.SYSTEM.Widget.TextButton("saveBtn",this.SAVE_WIDTH,"Save");
_f.hide();
_10.hide();
_11.hide();
var _15=_5.leftEdgeWidth;
var top=_5.topEdgeHeight;
var pad=this.SYSTEM.Style.WIDGET_PADDING;
_5.addWidget(_6,_15+this.HELP_LEFT,top+this.HELP_TOP);
_5.addWidget(_12,_15+this.NAME_LBL_LEFT,_5.bottomEdgeHeight,false,true);
_5.addWidget(_13,_15+this.NAME_LEFT,_5.bottomEdgeHeight,false,true);
_5.addControl(_9,_15+this.FOLDERS_LEFT,top+this.FOLDERS_TOP);
_5.addWidget(_d,_15+this.RENAME_LEFT,top+this.BTN_TOP);
_5.addWidget(_c,_d.positionX+_d.width+pad,top+this.BTN_TOP);
_5.addWidget(_e,_c.positionX+_c.width+pad,top+this.BTN_TOP);
_5.addWidget(_f,_15+this.TEXT_LEFT,top+this.TEXT_TOP);
_5.addWidget(_10,_15+this.OK_LEFT,top+this.OK_TOP);
_5.addWidget(_11,_15+this.CANCEL_LEFT,top+this.CANCEL_TOP);
_5.addWidget(_14,_5.rightEdgeWidth,_5.bottomEdgeHeight,true,true);
this.dialogueFrame=_5;
this.nameLabel=_12;
this.separator=_7;
this.helpLabel=_6;
this.nameText=_13;
this.fileBrowser=_9;
this.saveBtn=_14;
this.deleteBtn=_c;
this.renameBtn=_d;
this.newFolderBtn=_e;
this.textBox=_f;
this.okBtn=_10;
this.cancelBtn=_11;
this.SYSTEM.Event.registerKeyPressOverride(this.dialogueFrameKeyPress,this);
this.SYSTEM.Event.registerKeyDownOverride(this.dialogueFrameKeyDown,this);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_5.show();
this.stateView=this.FOLDER_VIEW;
this.stateOkAction=null;
}
catch(ex){
jsExDebug("saveDialogue_t",ex);
}
}
function saveDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.stateOkAction=null;
me.stateView=null;
me.SYSTEM.Event.unregisterKeyPressOverride(me.dialogueFrameKeyPress);
me.SYSTEM.Event.unregisterKeyDownOverride(me.dialogueFrameKeyDown);
me.nameLabel=null;
me.nameText=null;
me.fileBrowser=null;
me.saveBtn=null;
me.deleteBtn=null;
me.renameBtn=null;
me.newFolderBtn=null;
me.textBox=null;
me.okBtn=null;
me.cancelBtn=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
if(me.closeDelegate){
me.closeDelegate.cleanUp();
me.closeDelegate=null;
}
me.dialogueFrame=null;
me.separator=null;
me.helpLabel=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("saveDialogue_cleanUp",ex);
}
}
function saveDialogue_setFilename(_19){
try{
this.nameText.setContent(_19);
this.nameText.focus();
}
catch(ex){
jsExDebug("saveDialogue_setFilename",ex);
}
}
function saveDialogue__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("saveDialogue__SIG_THEME",ex);
}
}
function saveDialogue_setPosition(_1a,_1b){
try{
this.dialogueFrame.setPosition(_1a,_1b);
}
catch(ex){
jsExDebug("saveDialogue_setPosition",ex);
}
}
function saveDialogue_openErrorDialog(_1c){
try{
if(!_1c){
return;
}
var _1d=new this.SYSTEM.Dialogue.Error(null,"Save Error",_1c);
}
catch(ex){
jsExDebug("saveDialogue_openErrorDialog",ex);
}
}
function saveDialogue_folderCreationCallback(_1e,me){
try{
if(_1e){
var _20=me.SYSTEM.Filesystem.getFolderContentsById(_1e);
me.fileBrowser.addFolder({folderName:me.newFolderName,folderId:_1e,contents:_20.contents});
}else{
var _21=new me.SYSTEM.Dialogue.Error(null,"New Folder Error","The folder was not created, folders must have a unique name and contain at least one letter. The following characters are not allowed: ?*+/\\$()[]{}|;:,%@&'\"`~^");
}
}
catch(ex){
jsExDebug("saveDialogue_folderCreationCallback",ex);
}
}
function saveDialogue_saveNewFolder(_22){
try{
if(!_22){
var _23=new this.SYSTEM.Dialogue.Error(null,"New Folder","You need to give the folder a name.");
return;
}
this.newFolderName=_22;
this.SYSTEM.Filesystem.createFolder(_22,this.folderCreationCallback,this);
}
catch(ex){
jsExDebug("saveDialogue_saveNewFolder",ex);
}
}
function saveDialogue_rename(_24){
function renameCallback(_25,me){
try{
if(_25){
me.fileBrowser.refresh();
}else{
var _27=new this.SYSTEM.Dialogue.Error(null,"New Folder Error","The folder was not renamed, folders must have a unique name and contain at least one letter. The following characters are not allowed: ?*+/\\$()[]{}|;:,%@&'\"`~^");
}
}
catch(ex){
jsExDebug("saveDialogue_rename: renameCallback",ex);
}
}
try{
if(this.stateView==this.FOLDER_VIEW){
var _28=this.fileBrowser.getSelectedFolder();
if(_28&&_28.folderId!=this.ALL_FILES_ID){
this.SYSTEM.Filesystem.renameFolder(_28.folderId,_24,renameCallback,this);
this.fileBrowser.clearSelectedFolder();
}
}else{
var _29=this.fileBrowser.getSelectedFile();
this.SYSTEM.Filesystem.renameFile(_29.fileid,_24,renameCallback,this);
}
}
catch(ex){
jsExDebug("saveDialogue_rename",ex);
}
}
function saveDialogue_performCurrentAction(){
try{
this.okBtn.hide();
this.cancelBtn.hide();
switch(this.stateOkAction){
case this.RENAME:
this.rename(this.textBox.getContent());
this.textBox.hide();
break;
case this.NEW_FOLDER:
this.saveNewFolder(this.textBox.getContent());
this.textBox.hide();
this.textBox.clearContent();
break;
}
if(this.stateView==this.FOLDER_VIEW){
this.renameBtn.show();
this.newFolderBtn.show();
this.deleteBtn.show();
this.helpLabel.setText(this.openFolderText);
}else{
this.renameBtn.show();
this.deleteBtn.show();
this.helpLabel.setText(this.saveFileText);
}
this.stateOkAction=null;
}
catch(ex){
jsExDebug("saveDialogue_performCurrentAction",ex);
}
}
function saveDialogue_saveFile(){
function getTokenOwnerCallback(_2a){
try{
if(_2a){
if(!_2a.userId||_2a.userId==this.SYSTEM.UserDetails.id){
this.actionDelegate.invoke(_2b,_2c,_2d);
this.cleanUp();
}else{
var _2e=new this.SYSTEM.Dialogue.Error(null,"Save","Another user is currently editing this file.<br>To save over it, first take edit control.");
}
}
}
catch(ex){
jsExDebug("saveDialogue_saveFile: getTokenOwnerCallback",ex);
}
}
try{
var _2b=this.nameText.getContent();
if(!_2b){
this.openErrorDialog("You need to give the file a name.");
return;
}
if(!this.actionDelegate){
return;
}
var _2c=parseInt((this.fileBrowser.selectedFolder?this.fileBrowser.selectedFolder.folderId:null));
switch(_2c){
case this.ALL_FILES_ID:
break;
case this.OTHERS_FILES_ID:
this.openErrorDialog("You can't save files into this folder. Files in this folder have been shared with you by other Peepel users.");
return;
case this.fileBrowser.PUBLIC_FILES_ID:
this.openErrorDialog("You can't save files into this folder. This folder is where you can search for public files created by users.");
return;
}
var _2f=this.fileBrowser.getFileList();
var _2d=null;
for(var i=0;i<_2f.length;i++){
var _31=_2f[i];
if(_31&&_31.fileName==_2b){
var _32=this.SYSTEM.Filesystem.getFileTypeFromId(_31.fileId);
if(_32==this.fileType){
_2d=_31.fileId;
}else{
var _33=this.getFileTypeName(this.fileType);
var _34=this.getFileTypeName(_32);
this.openErrorDialog("Can't save over file. You are trying to save a <b>"+_33+"</b> over a <b>"+_34+"</b>");
return;
}
break;
}
}
if(_2d){
this.SYSTEM.Filesystem.getCurrentWriteTokenOwner(_2d,new this.SYSTEM.Delegate(this,getTokenOwnerCallback));
}else{
this.actionDelegate.invoke(_2b,_2c);
this.cleanUp();
}
}
catch(ex){
jsExDebug("saveDialogue_saveFile",ex);
}
}
function saveDialogue_getFileTypeName(_35){
try{
switch(parseInt(_35)){
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
return "WebSheet";
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
return "WebWriter";
}
}
catch(ex){
jsExDebug("saveDialogue_getFileTypeName",ex);
}
}
function saveDialogue_folderDblClickEvent(_36,_37){
try{
this.newFolderBtn.hide();
this.stateView=this.FILE_VIEW;
this.helpLabel.setText(this.saveFileText);
}
catch(ex){
jsExDebug("saveDialogue_folderDblClickEvent",ex);
}
}
function saveDialogue_backBtnClickEvent(_38,_39){
try{
this.newFolderBtn.show();
this.stateView=this.FOLDER_VIEW;
this.helpLabel.setText(this.openFolderText);
}
catch(ex){
jsExDebug("saveDialogue_backBtnClickEvent",ex);
}
}
function saveDialogue_fileSelectEvent(_3a,_3b){
try{
var _3c=this.fileBrowser.getSelectedFile().filename;
if(!_3c){
return;
}
if(this.stateOkAction==this.RENAME){
this.textBox.setContent(_3c);
}
this.nameText.setContent(_3c);
}
catch(ex){
jsExDebug("saveDialogue_fileSelectEvent",ex);
}
}
function saveDialogue_folderSelectEvent(_3d,_3e){
try{
if(this.stateOkAction==this.NEW_FOLDER){
this.textBox.setContent(this.fileBrowser.getSelectedFolder().folderName);
}
}
catch(ex){
jsExDebug("saveDialogue_folderSelectEvent",ex);
}
}
function saveDialogue_dialogueFrame__onClose(_3f){
try{
if(this.closeDelegate){
this.closeDelegate.invoke();
}
this.cleanUp();
}
catch(ex){
jsExDebug("saveDialogue_dialogueFrame__onClose",ex);
}
}
function saveDialogue_dialogueFrameKeyPress(key,me){
try{
if(key.which==13){
if(me.stateOkAction){
me.performCurrentAction();
}else{
me.saveFile();
}
}
}
catch(ex){
jsExDebug("saveDialogue_dialogueFrameKeyPress",ex);
}
}
function saveDialogue_dialogueFrameKeyDown(key,me){
try{
}
catch(ex){
jsExDebug("saveDialogue_dialogueFrameKeyDown",ex);
}
}
function saveDialogue_binding_renameBtn_click(_44){
try{
if(this.stateView==this.FOLDER_VIEW){
var _45=this.fileBrowser.getSelectedFolder();
if(!_45){
return;
}
this.stateOkAction=this.RENAME;
this.textBox.setContent(_45.folderName);
this.helpLabel.setText(this.renameFolderText);
}else{
var _46=this.fileBrowser.getSelectedFile();
if(!_46){
return;
}
this.textBox.setContent(_46.filename);
this.stateOkAction=this.RENAME;
this.helpLabel.setText(this.renameFileText);
}
this.renameBtn.hide();
this.newFolderBtn.hide();
this.deleteBtn.hide();
this.textBox.show();
this.okBtn.show();
this.cancelBtn.show();
}
catch(ex){
jsExDebug("saveDialogue_binding_renameBtn_click",ex);
}
}
function saveDialogue_binding_newFolderBtn_click(_47){
try{
this.renameBtn.hide();
this.newFolderBtn.hide();
this.deleteBtn.hide();
this.textBox.show();
this.okBtn.show();
this.cancelBtn.show();
this.textBox.setContent("new");
this.stateOkAction=this.NEW_FOLDER;
this.helpLabel.setText(this.newFolderText);
}
catch(ex){
jsExDebug("saveDialogue_binding_newFolderBtn_click",ex);
}
}
function saveDialogue_binding_saveBtn_click(_48){
try{
this.saveFile();
}
catch(ex){
jsExDebug("saveDialogue_binding_saveBtn_click",ex);
}
}
function saveDialogue_binding_deleteBtn_click(_49){
function deleteCallback(_4a,me){
try{
if(_4a){
if(me.stateView==me.FOLDER_VIEW){
me.fileBrowser.clearSelectedFolder();
}
me.fileBrowser.refresh();
}else{
jsDebug("saveDialogue_binding_deleteBtn_click: deleteCallback - Failed delete.");
}
}
catch(ex){
jsExDebug("saveDialogue_binding_deleteBtn_click: deleteCallback",ex);
}
}
function dialogueCallback(_4c){
try{
if(!_4c){
return;
}
var _4d=this.fileBrowser.getSelectedFolder();
if(this.stateView==this.FOLDER_VIEW){
if(_4d&&_4d.folderId!=this.ALL_FILES_ID){
this.SYSTEM.Filesystem.deleteFolder(_4d.folderId,deleteCallback,this);
}
}else{
var _4e=this.fileBrowser.getSelectedFile();
if(_4e&&_4d&&_4d.folderId!=this.ALL_FILES_ID){
this.SYSTEM.Filesystem.deleteFile(_4e.fileid,deleteCallback,this);
}
}
}
catch(ex){
jsExDebug("saveDialogue_binding_deleteBtn_click: dialogueCallback",ex);
}
}
try{
var _4f=new this.SYSTEM.Delegate(this,dialogueCallback);
if(this.stateView==this.FOLDER_VIEW){
if(this.fileBrowser.getSelectedFolder()){
var _50=new this.SYSTEM.Dialogue.YesNoAlert(null,"Delete Folder","Are you sure you want to delete this folder?",_4f);
}
}else{
if(this.fileBrowser.getSelectedFile()){
var _50=new this.SYSTEM.Dialogue.YesNoAlert(null,"Delete File","Are you sure you want to delete this file?",_4f);
}
}
}
catch(ex){
jsExDebug("saveDialogue_binding_deleteBtn_click",ex);
}
}
function saveDialogue_binding_okBtn_click(_51){
try{
this.performCurrentAction();
}
catch(ex){
jsExDebug("saveDialogue_binding_okBtn_click",ex);
}
}
function saveDialogue_binding_cancelBtn_click(_52){
try{
this.okBtn.hide();
this.cancelBtn.hide();
this.textBox.hide();
if(this.stateView==this.FOLDER_VIEW){
this.renameBtn.show();
this.newFolderBtn.show();
this.deleteBtn.show();
this.helpLabel.setText(this.openFolderText);
}else{
this.renameBtn.show();
this.deleteBtn.show();
this.helpLabel.setText(this.saveFileText);
}
this.stateOkAction=null;
}
catch(ex){
jsExDebug("saveDialogue_binding_cancelBtn_click",ex);
}
}

try{
yesNoCancelAlertDialogue_t.prototype=new systemApplication_t();
yesNoCancelAlertDialogue_t.prototype.constructor=yesNoCancelAlertDialogue_t;
yesNoCancelAlertDialogue_t.prototype.yesNoCancelAlertDialogue_super=systemApplication_t.prototype.constructor;
yesNoCancelAlertDialogue_t.prototype.cleanUp=yesNoCancelAlertDialogue_cleanUp;
yesNoCancelAlertDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
yesNoCancelAlertDialogue_t.prototype.setPosition=yesNoCancelAlertDialogue_setPosition;
yesNoCancelAlertDialogue_t.prototype.dialogueFrame__onClose=yesNoCancelAlertDialogue_dialogueFrame__onClose;
yesNoCancelAlertDialogue_t.prototype.binding_yesBtn_click=yesNoCancelAlertDialogue_binding_yesBtn_click;
yesNoCancelAlertDialogue_t.prototype.binding_noBtn_click=yesNoCancelAlertDialogue_binding_noBtn_click;
yesNoCancelAlertDialogue_t.prototype.binding_cancelBtn_click=yesNoCancelAlertDialogue_binding_cancelBtn_click;
yesNoCancelAlertDialogue_t.prototype.DIALOGUE_WIDTH=400;
yesNoCancelAlertDialogue_t.prototype.DIALOGUE_HEIGHT=130;
yesNoCancelAlertDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function yesNoCancelAlertDialogue_t(_1,_2,_3,_4,_5){
try{
this.yesNoCancelAlertDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=(_5?_5:this.DIALOGUE_WIDTH);
var _6=(_2?_2:"Alert");
var _7=new this.SYSTEM.Frame.Window("dialogueFrame",_6,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
this.text=_3;
var _8=document.createElement("div");
_8.style.position="absolute";
_8.style.left=_7.leftEdgeWidth+"px";
_8.style.top=_7.topEdgeHeight+"px";
_8.style.height="auto";
_8.style.width=(this.width-parseFloat(_8.style.left)-_7.rightEdgeWidth)+"px";
_8.style.overflow="hidden";
_8.className="boxcontent";
if(_3){
_8.innerHTML=_3;
}
_7.windowDiv.appendChild(_8);
var _9=new this.SYSTEM.Widget.TextButton("yesBtn",40,"Yes");
var _a=new this.SYSTEM.Widget.TextButton("noBtn",40,"No");
var _b=new this.SYSTEM.Widget.TextButton("cancelBtn",60,"Cancel");
_7.setFixedDimensions(this.width,_8.clientHeight+_7.topEdgeHeight+_7.bottomEdgeHeight+_9.height+this.SYSTEM.Style.WIDGET_PADDING);
this.dialogueFrame=_7;
this.textDiv=_8;
this.yesBtn=_9;
this.noBtn=_a;
this.actionDelegate=_4;
var _c=this.SYSTEM.Style.WIDGET_PADDING;
_7.addWidget(_b,_7.rightEdgeWidth,_7.bottomEdgeHeight,true,true);
_7.addWidget(_a,_b.positionX+_b.width+_c,_b.positionY,true,true);
_7.addWidget(_9,_a.positionX+_a.width+_c,_a.positionY,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_7.show();
}
catch(ex){
jsExDebug("okAlertDialog_t",ex);
}
}
function yesNoCancelAlertDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textDiv=null;
me.yesBtn=null;
me.noBtn=null;
me.cancelBtn=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("yesNoCancelAlertDialogue_cleanUp",ex);
}
}
function yesNoCancelAlertDialogue_setPosition(_e,_f){
try{
this.dialogueFrame.setPosition(_e,_f);
}
catch(ex){
jsExDebug("yesNoCancelAlertDialogue_setPosition",ex);
}
}
function yesNoCancelAlertDialogue_dialogueFrame__onClose(_10){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("yesNoCancelAlertDialogue_dialogueFrame__onClose",ex);
}
}
function yesNoCancelAlertDialogue_binding_yesBtn_click(_11){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(true);
}
this.cleanUp();
}
catch(ex){
jsExDebug("yesNoCancelAlertDialogue_binding_yesBtn_click",ex);
}
}
function yesNoCancelAlertDialogue_binding_noBtn_click(_12){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(false);
}
this.cleanUp();
}
catch(ex){
jsExDebug("yesNoCancelAlertDialogue_binding_noBtn_click",ex);
}
}
function yesNoCancelAlertDialogue_binding_cancelBtn_click(_13){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(null);
}
this.cleanUp();
}
catch(ex){
jsExDebug("yesNoCancelAlertDialogue_binding_cancelBtn_click",ex);
}
}

try{
dirtyAppDialogue_t.prototype=new systemApplication_t();
dirtyAppDialogue_t.prototype.constructor=dirtyAppDialogue_t;
dirtyAppDialogue_t.prototype.dirtyAppDialogue_super=systemApplication_t.prototype.constructor;
dirtyAppDialogue_t.prototype.cleanUp=dirtyAppDialogue_cleanUp;
dirtyAppDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
dirtyAppDialogue_t.prototype.setPosition=dirtyAppDialogue_setPosition;
dirtyAppDialogue_t.prototype.dialogueFrame__onClose=dirtyAppDialogue_dialogueFrame__onClose;
dirtyAppDialogue_t.prototype.binding_saveBtn_click=dirtyAppDialogue_binding_saveBtn_click;
dirtyAppDialogue_t.prototype.binding_saveCloseBtn_click=dirtyAppDialogue_binding_saveCloseBtn_click;
dirtyAppDialogue_t.prototype.binding_closeBtn_click=dirtyAppDialogue_binding_closeBtn_click;
dirtyAppDialogue_t.prototype.binding_cancelBtn_click=dirtyAppDialogue_binding_cancelBtn_click;
dirtyAppDialogue_t.prototype.binding_unsavedAppList_itemSelect=dirtyAppDialogue_binding_unsavedAppList_itemSelect;
dirtyAppDialogue_t.prototype.cleanActionCallback=dirtyAppDialogue_cleanActionCallback;
dirtyAppDialogue_t.prototype.DIALOGUE_WIDTH=340;
dirtyAppDialogue_t.prototype.BUTTON_TOP=150;
dirtyAppDialogue_t.prototype.CLOSE_BUTTON_TOP=375;
dirtyAppDialogue_t.prototype.UNSAVED_INFO_TOP=200;
dirtyAppDialogue_t.prototype.SAVED_LIST_TOP=30;
dirtyAppDialogue_t.prototype.LIST_WIDTH=300;
dirtyAppDialogue_t.prototype.LIST_HEIGHT=120;
dirtyAppDialogue_t.prototype.UNSAVED_LIST_TOP=230;
dirtyAppDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function dirtyAppDialogue_t(_1,_2,_3){
try{
this.dirtyAppDialogue_super();
var _4=new this.SYSTEM.Frame.Window("dialogueFrame","Close all applications",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_4.show();
var _5=new this.SYSTEM.Widget.Label("infoLabel");
_5.setText("The following documents have unsaved changes.<br>Please select the ones you wish to save:");
_5.setDimensions(_4.getInternalWidth(this.DIALOGUE_WIDTH));
var _6=new this.SYSTEM.Widget.CheckboxList("savedAppList");
_6.setVertical(_4.getInternalWidth(this.DIALOGUE_WIDTH));
_6.disallowSelectedHighlight();
_6.disallowItemBorder();
_6.disallowMouseOverHighlight();
_6.disallowBackgroundImage();
_6.setBackgroundColour("white");
_6.setDimensions(_4.getInternalWidth(this.DIALOGUE_WIDTH),this.LIST_HEIGHT);
var _7=new this.SYSTEM.Widget.Label("unsavedInfoLabel");
_7.setText("The following documents have not been saved at all. Click on the name of the application to save it:");
_7.setDimensions(_4.getInternalWidth(this.DIALOGUE_WIDTH));
var _8=new this.SYSTEM.Widget.SelectList("unsavedAppList");
_8.align(_8.LEFT_ALIGN);
_8.setVertical(_4.getInternalWidth(this.DIALOGUE_WIDTH));
_8.disallowBackgroundImage();
_8.setBackgroundColour("white");
_8.setDimensions(_4.getInternalWidth(this.DIALOGUE_WIDTH),this.LIST_HEIGHT);
_8.allowStartVisible();
this.savedArray=[];
for(var i=0;i<_2.length;i++){
var _a=_2[i];
if(_a.fileName){
_6.addCheckboxItem(_a.application,_a.fileName+" ("+_a.application.APP_NAME+")",true);
this.savedArray.push(_2[i]);
}else{
_8.addItem(_a.application,_a.application.APP_NAME);
}
}
var _b=new this.SYSTEM.Widget.TextButton("saveBtn",60,"Save");
var _c=new this.SYSTEM.Widget.TextButton("saveCloseBtn",120,"Save and Close");
var _d=new this.SYSTEM.Widget.TextButton("closeBtn",60,"Close");
var _e=new this.SYSTEM.Widget.TextButton("cancelBtn",65,"Cancel");
var _f=_4.leftEdgeWidth;
var top=_4.topEdgeHeight;
var pad=this.SYSTEM.Style.WIDGET_PADDING;
_4.addWidget(_5,_f,top);
_4.addWidget(_6,_f,top+_5.getClientHeight()+pad);
_4.addWidget(_c,_4.rightEdgeWidth,_6.positionY+_6.height+pad,true);
_4.addWidget(_b,_c.positionX+_c.width+pad,_c.positionY,true);
_4.addWidget(_7,_f,_b.positionY+_b.height+pad);
_4.addWidget(_8,_f,_7.positionY+_7.getClientHeight()+pad);
_4.addWidget(_e,_4.rightEdgeWidth,_8.positionY+_8.height+pad,true);
_4.addWidget(_d,_e.positionX+_e.width+pad,_e.positionY,true);
this.dialogueFrame=_4;
this.infoLabel=_5;
this.savedAppList=_6;
this.unsavedAppList=_8;
this.saveBtn=_b;
this.saveCloseBtn=_c;
this.closeBtn=_d;
this.cancelBtn=_e;
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
this.dirtyAppArray=_2;
this.appCount=null;
this.cleanActionDelegate=new this.SYSTEM.Delegate(this,this.cleanActionCallback);
this.completionDelegate=_3;
_4.setFixedDimensions(this.DIALOGUE_WIDTH,_e.positionY+_e.height+_4.bottomEdgeHeight);
this.dialogueFrame.show();
}
catch(ex){
jsExDebug("okAlertDialog_t",ex);
}
}
function dirtyAppDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.dialogueFrame=null;
me.infoLabel=null;
me.savedAppList=null;
me.unsavedAppList=null;
me.saveBtn=null;
me.saveCloseBtn=null;
me.closeBtn=null;
me.cancelBtn=null;
for(var i=0;i<me.dirtyAppArray.length;i++){
me.dirtyAppArray[i].string=null;
me.dirtyAppArray[i].application=null;
me.dirtyAppArray[i]=null;
delete me.dirtyAppArray[i];
}
me.dirtyAppArray=null;
for(var i=0;i<me.savedArray.length;i++){
me.savedArray[i].string=null;
me.savedArray[i].application=null;
me.savedArray[i]=null;
delete me.savedArray[i];
}
me.savedArray=null;
me.cleanActionDelegate.cleanUp();
me.cleanActionDelegate=null;
if(me.completionDelegate){
me.completionDelegate.cleanUp();
me.completionDelegate=null;
}
me.application_cleanUp();
}
catch(ex){
jsExDebug("dirtyAppDialogue_cleanUp",ex);
}
}
function dirtyAppDialogue_setPosition(_14,_15){
try{
this.dialogueFrame.setPosition(_14,_15);
}
catch(ex){
jsExDebug("dirtyAppDialogue_setPosition",ex);
}
}
function dirtyAppDialogue_dialogueFrame__onClose(_16){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("dirtyAppDialogue_dialogueFrame__onClose",ex);
}
}
function dirtyAppDialogue_binding_saveBtn_click(_17){
try{
var _18=this.savedAppList.getSelectedValues();
this.appCount=_18.length;
this.closeOnCompletion=false;
if(this.appCount){
for(var i=0;i<_18.length;i++){
if(_18[i]){
if(_18[i].cleanUpIndex){
_18[i].cleanAction(this.cleanActionDelegate);
}
this.savedAppList.removeItem(null,_18[i]);
}
}
}
}
catch(ex){
jsExDebug("dirtyAppDialogue_binding_saveBtn_click",ex);
}
}
function dirtyAppDialogue_binding_saveCloseBtn_click(_1a){
try{
var _1b=this.savedAppList.getSelectedValues();
this.appCount=(this.appCount!=null?this.appCount:_1b.length);
this.closeOnCompletion=true;
if(this.appCount){
for(var i=0;i<_1b.length;i++){
if(_1b[i]){
if(_1b[i].cleanUpIndex){
_1b[i].cleanAction(this.cleanActionDelegate);
}
this.savedAppList.removeItem(null,_1b[i]);
}
}
}
if(this.completionDelegate){
this.completionDelegate.invoke();
}
}
catch(ex){
jsExDebug("dirtyAppDialogue_binding_saveCloseBtn_click",ex);
}
}
function dirtyAppDialogue_binding_closeBtn_click(_1d){
try{
if(this.completionDelegate){
this.completionDelegate.invoke();
}
}
catch(ex){
jsExDebug("dirtyAppDialogue_binding_closeBtn_click",ex);
}
}
function dirtyAppDialogue_binding_cancelBtn_click(_1e){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("dirtyAppDialogue_binding_cancelBtn_click",ex);
}
}
function dirtyAppDialogue_binding_unsavedAppList_itemSelect(_1f){
function cleanActionCallback(){
try{
this.unsavedAppList.removeItem(null,app);
}
catch(ex){
jsExDebug("dirtyAppDialogue_binding_unsavedAppList_itemSelect: cleanActionCallback",ex);
}
}
try{
var app=_1f.getSelectedValue();
if(app.cleanUpIndex){
this.SYSTEM.WINDOW_MANAGER.focus(app.getRunId());
app.cleanAction(new this.SYSTEM.Delegate(this,cleanActionCallback));
}else{
jsDebug("already closed");
this.unsavedAppList.removeItem(null,app);
}
}
catch(ex){
jsExDebug("dirtyAppDialogue_unsavedAppList_itemSelect",ex);
}
}
function dirtyAppDialogue_cleanActionCallback(){
try{
this.appCount--;
if(this.appCount==0){
if(this.closeOnCompletion){
if(this.completionDelegate){
this.completionDelegate.invoke();
}
}
}
}
catch(ex){
jsExDebug("dirtyAppDialogue_cleanActionCallback",ex);
}
}

try{
spellcheckDialogue_t.prototype=new systemApplication_t();
spellcheckDialogue_t.prototype.constructor=spellcheckDialogue_t;
spellcheckDialogue_t.prototype.spellcheckDialogue_super=systemApplication_t.prototype.constructor;
spellcheckDialogue_t.prototype.cleanUp=spellcheckDialogue_cleanUp;
spellcheckDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
spellcheckDialogue_t.prototype._SIG_THEME=spellcheckDialogue__SIG_THEME;
spellcheckDialogue_t.prototype.close=spellcheckDialogue_close;
spellcheckDialogue_t.prototype.setPosition=spellcheckDialogue_setPosition;
spellcheckDialogue_t.prototype.dialogueFrame__onClose=spellcheckDialogue_dialogueFrame__onClose;
spellcheckDialogue_t.prototype.binding_cancelBtn_click=spellcheckDialogue_binding_cancelBtn_click;
spellcheckDialogue_t.prototype.binding_correctionText_focus=spellcheckDialogue_binding_correctionText_focus;
spellcheckDialogue_t.prototype.binding_ignoreBtn_click=spellcheckDialogue_binding_ignoreBtn_click;
spellcheckDialogue_t.prototype.binding_ignoreAllBtn_click=spellcheckDialogue_binding_ignoreAllBtn_click;
spellcheckDialogue_t.prototype.binding_changeBtn_click=spellcheckDialogue_binding_changeBtn_click;
spellcheckDialogue_t.prototype.binding_changeAllBtn_click=spellcheckDialogue_binding_changeAllBtn_click;
spellcheckDialogue_t.prototype.binding_suggestionSelect_itemSelect=spellcheckDialogue_binding_suggestionSelect_itemSelect;
spellcheckDialogue_t.prototype.createFrame=spellcheckDialogue_createFrame;
spellcheckDialogue_t.prototype.checkFormattedText=spellcheckDialogue_checkFormattedText;
spellcheckDialogue_t.prototype.doSentence=spellcheckDialogue_doSentence;
spellcheckDialogue_t.prototype.sentenceCheckedCallback=spellcheckDialogue_sentenceCheckedCallback;
spellcheckDialogue_t.prototype.escapeRegexChars=spellcheckDialogue_escapeRegexChars;
spellcheckDialogue_t.prototype.nextError=spellcheckDialogue_nextError;
spellcheckDialogue_t.prototype.addSuggestion=spellcheckDialogue_addSuggestion;
spellcheckDialogue_t.prototype.clearSuggestions=spellcheckDialogue_clearSuggestions;
spellcheckDialogue_t.prototype.wordSuggestionCallback=spellcheckDialogue_wordSuggestionCallback;
spellcheckDialogue_t.prototype.getSuggestionList=spellcheckDialogue_getSuggestionList;
spellcheckDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
spellcheckDialogue_t.prototype.SENTENCE_CHECK=1;
spellcheckDialogue_t.prototype.GET_SUGGESTIONS=2;
spellcheckDialogue_t.prototype.SERVER_PATH="spellcheck.php";
spellcheckDialogue_t.prototype.REPLACE_WORD=3;
spellcheckDialogue_t.prototype.AUTO_IGNORE=1;
spellcheckDialogue_t.prototype.WIDTH=350;
spellcheckDialogue_t.prototype.HEIGHT=290;
spellcheckDialogue_t.prototype.SENTENCE_WIDTH=235;
spellcheckDialogue_t.prototype.SENTENCE_HEIGHT=60;
spellcheckDialogue_t.prototype.SUGGESTION_SELECT_WIDTH=235;
spellcheckDialogue_t.prototype.SUGGESTION_SELECT_HEIGHT=110;
spellcheckDialogue_t.prototype.BTN_WIDTH=80;
spellcheckDialogue_t.prototype.SENTENCE_LBL_LEFT=0;
spellcheckDialogue_t.prototype.SENTENCE_LBL_TOP=0;
spellcheckDialogue_t.prototype.SENTENCE_LEFT=0;
spellcheckDialogue_t.prototype.SENTENCE_TOP=20;
spellcheckDialogue_t.prototype.SUGGESTION_SELECT_LEFT=0;
spellcheckDialogue_t.prototype.SUGGESTION_SELECT_TOP=110;
spellcheckDialogue_t.prototype.SUGGESTION_LBL_LEFT=0;
spellcheckDialogue_t.prototype.SUGGESTION_LBL_TOP=90;
spellcheckDialogue_t.prototype.CORRECTION_TEXT_LEFT=0;
spellcheckDialogue_t.prototype.CHANGE_TOP=20;
spellcheckDialogue_t.prototype.CHANGE_ALL_TOP=50;
spellcheckDialogue_t.prototype.IGNORE_TOP=80;
spellcheckDialogue_t.prototype.IGNORE_ALL_TOP=110;
}
catch(ex){
jsExDebug("spellcheckDialogue_t.prototype",ex);
}
function spellcheckDialogue_t(_1,_2){
try{
this.spellcheckDialogue_super();
this.createFrame();
this.changeAllDelegate=_2;
this.started=false;
this.text=null;
this.checkedText=null;
this.completionDelegate=null;
this.completionParameter=null;
this.originalText=null;
this.checkSentence=null;
this.errorIndex=null;
this.errors=null;
this.word=null;
this.correction=null;
this.checkCleanSentence=null;
this.autoActionList=[];
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
this.dialogueFrame.show();
}
catch(ex){
jsExDebug("spellcheckDialogue_t",ex);
}
}
function spellcheckDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.dialogueFrame=null;
me.sentenceLabel=null;
me.sentenceBox=null;
me.ignoreBtn=null;
me.suggestionsLabel=null;
me.suggestionSelect=null;
me.changeBtn=null;
me.cancelBtn=null;
me.correctionText=null;
me.ignoreAllBtn=null;
me.changeAllBtn=null;
for(var i in me.autoActionList){
me.autoActionList[i]=null;
delete me.autoActionList[i];
}
me.autoActionList=null;
me.autoReplaceWords=null;
me.started=null;
me.text=null;
me.checkedText=null;
me.completionDelegate=null;
me.completionParameter=null;
me.originalText=null;
me.checkSentence=null;
me.errorIndex=null;
me.errors=null;
me.word=null;
me.correction=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("spellcheckDialogue_t",ex);
}
}
function spellcheckDialogue__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("spellcheckDialogue__SIG_THEME",ex);
}
}
function spellcheckDialogue_close(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("spellcheckDialogue_close",ex);
}
}
function spellcheckDialogue_setPosition(_5,_6){
try{
this.dialogueFrame.setPosition(_5,_6);
}
catch(ex){
jsExDebug("spellcheckDialogue_setPosition",ex);
}
}
function spellcheckDialogue_dialogueFrame__onClose(_7){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("spellcheckDialogue_dialogueFrame__onClose",ex);
}
}
function spellcheckDialogue_binding_cancelBtn_click(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("spellcheckDialogue_binding_cancelBtn_click",ex);
}
}
function spellcheckDialogue_binding_correctionText_focus(){
try{
this.suggestionSelect.setSelectedValue(null);
this.correction=null;
}
catch(ex){
jsExDebug("spellcheckDialogue_binding_correctionText_focus",ex);
}
}
function spellcheckDialogue_createFrame(){
try{
var _8=new this.SYSTEM.Frame.Window("dialogueFrame","Spell check",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var _9=new this.SYSTEM.Widget.Label("sentenceLabel");
_9.setText("Sentence");
var _a=new this.SYSTEM.Widget.Text("sentenceBox",false,true);
_a.setDimensions(this.SENTENCE_WIDTH,this.SENTENCE_HEIGHT);
_a.allowOverflow("auto");
var _b=new this.SYSTEM.Widget.TextButton("ignoreBtn",this.BTN_WIDTH,"Ignore");
var _c=new this.SYSTEM.Widget.TextButton("ignoreAllBtn",this.BTN_WIDTH,"Ignore All");
var _d=new this.SYSTEM.Widget.Label("suggestionLabel");
_d.setText("Suggestions");
var _e=new this.SYSTEM.Widget.SelectList("suggestionSelect");
_e.allowStartVisible();
_e.setDimensions(this.SUGGESTION_SELECT_WIDTH,this.SUGGESTION_SELECT_HEIGHT);
_e.allowBorder("#AAAAAA");
var _f=new this.SYSTEM.Widget.Text("correctionText");
_f.setWidth(this.SUGGESTION_SELECT_WIDTH);
var _10=new this.SYSTEM.Widget.TextButton("changeBtn",this.BTN_WIDTH,"Change");
var _11=new this.SYSTEM.Widget.TextButton("changeAllBtn",this.BTN_WIDTH,"Change All");
var _12=new this.SYSTEM.Widget.TextButton("cancelBtn",this.BTN_WIDTH,"Cancel");
var _13=_8.leftEdgeWidth;
var top=_8.topEdgeHeight;
_8.addWidget(_9,_13+this.SENTENCE_LBL_LEFT,top+this.SENTENCE_LBL_TOP);
_8.addWidget(_a,_13+this.SENTENCE_LEFT,top+this.SENTENCE_TOP);
_8.addWidget(_b,_8.rightEdgeWidth,top+this.IGNORE_TOP,true);
_8.addWidget(_10,_8.rightEdgeWidth,top+this.CHANGE_TOP,true);
_8.addWidget(_d,_13+this.SUGGESTION_LBL_LEFT,top+this.SUGGESTION_LBL_TOP);
_8.addWidget(_e,_13+this.SUGGESTION_SELECT_LEFT,top+this.SUGGESTION_SELECT_TOP);
_8.addWidget(_12,_8.rightEdgeWidth,_8.bottomEdgeHeight,true,true);
_8.addWidget(_f,_13+this.CORRECTION_TEXT_LEFT,_8.bottomEdgeHeight,false,true);
_8.addWidget(_c,_8.rightEdgeWidth,top+this.IGNORE_ALL_TOP,true);
_8.addWidget(_11,_8.rightEdgeWidth,top+this.CHANGE_ALL_TOP,true);
_8.setFixedDimensions(_8.leftEdgeWidth+this.SENTENCE_WIDTH+this.SYSTEM.Style.WIDGET_PADDING+_10.width+_8.rightEdgeWidth,this.HEIGHT);
this.dialogueFrame=_8;
this.sentenceLabel=_9;
this.sentenceBox=_a;
this.ignoreBtn=_b;
this.suggestionsLabel=_d;
this.suggestionSelect=_e;
this.changeBtn=_10;
this.cancelBtn=_12;
this.correctionText=_f;
this.ignoreAllBtn=_c;
this.changeAllBtn=_11;
}
catch(ex){
jsExDebug("spellcheckDialogue_createFrame",ex);
}
}
function spellcheckDialogue_checkFormattedText(_15,_16,_17){
try{
if(this.started){
return;
}
this.started=true;
this.text=_16+"";
this.checkedText="";
this.completionDelegate=_15;
this.completionParameter=_17;
this.doSentence();
}
catch(ex){
jsExDebug("spellcheckDialogue_checkFormattedText",ex);
}
}
function spellcheckDialogue_doSentence(){
try{
var _18=/(([.?!\n])[$\s+<]|<br>.|<\/br>.|<p>.|<\/p>.|$)/i;
var se=_18.exec(this.text);
if(se.index<=1){
if(this.completionDelegate){
this.started=false;
this.completionDelegate.invoke(this.checkedText,this.completionParameter);
}
return;
}
this.originalText=this.text+":";
var _1a=RegExp.$1.length;
if(_1a){
this.checkSentence=this.text.slice(0,se.index+_1a-1);
this.text=this.text.slice(se.index+_1a-1);
}else{
this.checkSentence=this.text.slice(0,se.index);
this.text=this.text.slice(se.index);
}
this.checkCleanSentence=this.checkSentence.replace(/[!?.,"]/g," ");
this.checkCleanSentence=this.checkCleanSentence.stripMarkup();
this.checkCleanSentence=this.checkCleanSentence.replace(/(&[\w\s]+;)|:|;/g," ");
this.checkCleanSentence=this.checkCleanSentence.replace(/\s+/g," ");
var _1b="action="+this.SENTENCE_CHECK+"&sentence= "+this.checkCleanSentence;
this.SYSTEM.Network.request(this.SERVER_PATH,_1b,this.sentenceCheckedCallback,this);
}
catch(ex){
jsExDebug("spellcheckDialogue_doSentence - "+this.text,ex);
}
}
function spellcheckDialogue_sentenceCheckedCallback(_1c,me){
try{
if(!me){
var me=this;
}
if(!_1c||!_1c.firstChild||!_1c.firstChild.childNodes){
return;
}
if(_1c.firstChild.childNodes.length){
me.errorIndex=0;
me.errors=_1c;
me.nextError();
}else{
me.checkedText+=me.checkSentence;
me.doSentence();
}
}
catch(ex){
jsExDebug("spellcheckDialogue_sentenceCheckedCallback",ex);
}
}
function spellcheckDialogue_escapeRegexChars(_1e){
try{
_1e=_1e.replace(/([$*()+?\.|[^])/g,function($1){
return "\\"+$1;
});
return _1e;
}
catch(ex){
jsExDebug("spellcheckDialogue_escapeRegexChars",ex);
}
}
function spellcheckDialogue_nextError(_20){
try{
var _21=null;
if(_20==this.REPLACE_WORD&&this.word&&this.correction){
_21=new RegExp(this.word);
this.checkSentence=this.checkSentence.replace(_21,this.correction);
this.sentenceBox.setContent(this.checkSentence);
}
if(this.errors){
if(this.errorIndex<0||this.errorIndex>=this.errors.firstChild.childNodes.length){
this.checkedText+=this.checkSentence;
this.doSentence();
return;
}
this.word=this.errors.firstChild.childNodes[this.errorIndex].firstChild.nodeValue;
if(!isNaN(this.word*1)){
this.errorIndex++;
this.nextError();
return;
}
switch(this.autoActionList[this.word]){
case this.AUTO_IGNORE:
this.errorIndex++;
this.nextError();
return;
}
var _22=this.word;
this.word=this.escapeRegexChars(this.word);
_21=new RegExp("\\b"+this.word+"\\b");
this.clearSuggestions();
this.sentenceBox.setContent(this.checkSentence.replace(_22,"<font color='red'>"+_22+"</font>"));
this.correctionText.setContent(_22);
this.getSuggestionList();
this.errorIndex++;
}
}
catch(ex){
jsExDebug("spellcheckDialogue_nextError",ex);
}
}
function spellcheckDialogue_clearSuggestions(_23){
try{
this.suggestionSelect.clearList();
}
catch(ex){
jsExDebug("spellcheckDialogue_clearSuggestions",ex);
}
}
function spellcheckDialogue_addSuggestion(_24){
try{
this.suggestionSelect.addItem(_24,_24);
if(this.suggestionSelect.getItemCount()==1){
this.suggestionSelect.setSelectedIndex(0);
this.correction=_24;
}
}
catch(ex){
jsExDebug("spellcheckDialogue_addSuggestion",ex);
}
}
function spellcheckDialogue_wordSuggestionCallback(_25,me){
try{
if(!me){
var me=this;
}
var _27=_25.firstChild.childNodes;
for(var i=0;i<_27.length;i++){
me.addSuggestion(_27[i].firstChild.nodeValue);
}
}
catch(ex){
jsExDebug("spellcheckDialogue_wordSuggestionCallback",ex);
}
}
function spellcheckDialogue_getSuggestionList(){
try{
var _29="action="+this.GET_SUGGESTIONS+"&word= "+this.word;
this.SYSTEM.Network.request(this.SERVER_PATH,_29,this.wordSuggestionCallback,this);
}
catch(ex){
jsExDebug("spellcheckDialogue_getSuggestionList",ex);
}
}
function spellcheckDialogue_binding_ignoreBtn_click(){
try{
this.nextError();
this.correction=null;
}
catch(ex){
jsExDebug("spellcheckDialogue_binding_ignoreBtn_click",ex);
}
}
function spellcheckDialogue_binding_ignoreAllBtn_click(){
try{
this.autoActionList[this.word]=this.AUTO_IGNORE;
this.nextError();
this.correction=null;
}
catch(ex){
jsExDebug("spellcheckDialogue_binding_ignoreAllBtn_click",ex);
}
}
function spellcheckDialogue_binding_changeBtn_click(){
try{
if(!this.correction){
this.correction=this.correctionText.getContent();
this.correctionText.clearContent();
}
if(this.correction){
this.nextError(this.REPLACE_WORD);
this.correction=null;
}
}
catch(ex){
jsExDebug("spellcheckDialogue_binding_changeBtn_click",ex);
}
}
function spellcheckDialogue_binding_changeAllBtn_click(){
function changeAllCompleteCallback(){
try{
this.correction=null;
this.nextError();
}
catch(ex){
jsExDebug("spellcheckDialogue_binding_changeAllBtn_click: changeAllCompleteCallback",ex);
}
}
try{
if(!this.correction){
this.correction=this.correctionText.getContent();
this.correctionText.clearContent();
}
this.autoActionList[this.word]=this.AUTO_IGNORE;
var _2a=new RegExp("\\b"+this.word+"\\b","g");
this.checkSentence=this.checkSentence.replace(_2a,this.correction);
this.sentenceBox.setContent(this.checkSentence);
if(this.changeAllDelegate){
this.changeAllDelegate.invoke(this.word,this.correction,new this.SYSTEM.Delegate(this,changeAllCompleteCallback));
}
}
catch(ex){
jsExDebug("spellcheckDialogue_binding_changeAllBtn_click",ex);
}
}
function spellcheckDialogue_binding_suggestionSelect_itemSelect(_2b){
try{
this.correction=_2b.getSelectedValue();
}
catch(ex){
jsExDebug("spellcheckDialogue_binding_suggestionSelect_itemSelect",ex);
}
}

try{
contactShareDialogue_t.prototype=new systemApplication_t();
contactShareDialogue_t.prototype.constructor=contactShareDialogue_t;
contactShareDialogue_t.prototype.contactShareDialogue_super=systemApplication_t.prototype.constructor;
contactShareDialogue_t.prototype.cleanUp=contactShareDialogue_cleanUp;
contactShareDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
contactShareDialogue_t.prototype.setFile=contactShareDialogue_setFile;
contactShareDialogue_t.prototype.close=contactShareDialogue_close;
contactShareDialogue_t.prototype.setNoFileMessage=contactShareDialogue_setNoFileMessage;
contactShareDialogue_t.prototype.setPosition=contactShareDialogue_setPosition;
contactShareDialogue_t.prototype.frame__onClose=contactShareDialogue_frame__onClose;
contactShareDialogue_t.prototype.binding_publicCheckbox_valueChange=contactShareDialogue_binding_publicCheckbox_valueChange;
contactShareDialogue_t.prototype.binding_readAddBtn_click=contactShareDialogue_binding_readAddBtn_click;
contactShareDialogue_t.prototype.binding_writeAddBtn_click=contactShareDialogue_binding_writeAddBtn_click;
contactShareDialogue_t.prototype.binding_readRemoveBtn_click=contactShareDialogue_binding_readRemoveBtn_click;
contactShareDialogue_t.prototype.binding_writeRemoveBtn_click=contactShareDialogue_binding_writeRemoveBtn_click;
contactShareDialogue_t.prototype.binding_okBtn_click=contactShareDialogue_binding_okBtn_click;
contactShareDialogue_t.prototype.keyDownEvent=contactShareDialogue_keyDownEvent;
contactShareDialogue_t.prototype.createFrame=contactShareDialogue_createFrame;
contactShareDialogue_t.prototype.refreshContacts=contactShareDialogue_refreshContacts;
contactShareDialogue_t.prototype.refreshLists=contactShareDialogue_refreshLists;
contactShareDialogue_t.prototype.error=contactShareDialogue_error;
contactShareDialogue_t.prototype.okAlert=contactShareDialogue_okAlert;
contactShareDialogue_t.prototype.getEmailText=contactShareDialogue_getEmailText;
contactShareDialogue_t.prototype.getSelectIndex=contactShareDialogue_getSelectIndex;
contactShareDialogue_t.prototype.hideInterface=contactShareDialogue_hideInterface;
contactShareDialogue_t.prototype.showInterface=contactShareDialogue_showInterface;
contactShareDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
contactShareDialogue_t.prototype.WIDTH=480;
contactShareDialogue_t.prototype.HEIGHT=350;
contactShareDialogue_t.prototype.EMAIL_TEXT_WIDTH=120;
contactShareDialogue_t.prototype.CONTACT_WIDTH=160;
contactShareDialogue_t.prototype.CONTACT_HEIGHT=250;
contactShareDialogue_t.prototype.SELECT_WIDTH=135;
contactShareDialogue_t.prototype.SELECT_HEIGHT=110;
contactShareDialogue_t.prototype.HIDDEN_LBL_WIDTH=150;
contactShareDialogue_t.prototype.FILE_LEFT=0;
contactShareDialogue_t.prototype.FILE_TOP=0;
contactShareDialogue_t.prototype.EMAIL_LBL_LEFT=0;
contactShareDialogue_t.prototype.EMAIL_LBL_TOP=30;
contactShareDialogue_t.prototype.EMAIL_TXT_LEFT=40;
contactShareDialogue_t.prototype.EMAIL_TXT_TOP=contactShareDialogue_t.prototype.EMAIL_LBL_TOP;
contactShareDialogue_t.prototype.CONTACT_LEFT=0;
contactShareDialogue_t.prototype.CONTACT_TOP=60;
contactShareDialogue_t.prototype.READ_ADD_LEFT=170;
contactShareDialogue_t.prototype.READ_ADD_TOP=100;
contactShareDialogue_t.prototype.WRITE_ADD_LEFT=170;
contactShareDialogue_t.prototype.WRITE_ADD_TOP=240;
contactShareDialogue_t.prototype.READ_REM_LEFT=390;
contactShareDialogue_t.prototype.READ_REM_TOP=60;
contactShareDialogue_t.prototype.WRITE_REM_LEFT=390;
contactShareDialogue_t.prototype.WRITE_REM_TOP=200;
contactShareDialogue_t.prototype.READ_LEFT=240;
contactShareDialogue_t.prototype.READ_TOP=60;
contactShareDialogue_t.prototype.WRITE_LEFT=240;
contactShareDialogue_t.prototype.WRITE_TOP=200;
contactShareDialogue_t.prototype.WRITE_LBL_LEFT=240;
contactShareDialogue_t.prototype.WRITE_LBL_TOP=180;
contactShareDialogue_t.prototype.READ_LBL_LEFT=240;
contactShareDialogue_t.prototype.READ_LBL_TOP=30;
contactShareDialogue_t.prototype.HIDDEN_LBL_LEFT=165;
contactShareDialogue_t.prototype.HIDDEN_LBL_TOP=150;
contactShareDialogue_t.prototype.ADD_IMG="img/app/system/icons/small/add";
contactShareDialogue_t.prototype.REMOVE_IMG="img/app/system/icons/small/remove";
}
catch(ex){
jsExDebug("contactShareDialogue_t.prototype",ex);
}
function contactShareDialogue_t(_1,_2){
try{
this.contactShareDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.closeDelegate=_2;
this.fileId=null;
this.createFrame();
this.refreshContacts();
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
this.frame.show();
}
catch(ex){
jsExDebug("contactShareDialogue_t",ex);
}
}
function contactShareDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.unregisterKeyPressOverride(me.keyDownEvent);
me.frame=null;
me.fileLabel=null;
me.readLabel=null;
me.writeLabel=null;
me.emailLabel=null;
me.emailText=null;
me.contactSelect=null;
me.readAddBtn=null;
me.writeAddBtn=null;
me.readSelect=null;
me.writeSelect=null;
me.readRemoveBtn=null;
me.writeRemoveBtn=null;
me.okBtn=null;
me.sharedLabel=null;
me.usersLabel=null;
me.usersSelect=null;
me.usersAddBtn=null;
me.usersRemoveBtn=null;
if(me.closeDelegate){
me.closeDelegate.invoke();
me.closeDelegate.cleanUp();
}
me.closeDelegate=null;
me.fileId=null;
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application_cleanUp();
}
catch(ex){
jsExDebug("contactShareDialogue_t",ex);
}
}
function contactShareDialogue_setFile(_4,_5,_6){
try{
if(_4){
var _5=_4.fileid;
var _6=_4.filename;
}
if(!_5){
this.hideInterface(this.noFileMessage);
}else{
if(this.SYSTEM.Filesystem.ownsFile(_5)){
this.showInterface();
this.fileId=_5;
this.refreshLists(true,true);
}else{
this.fileId=null;
this.hideInterface("You do not own this file.");
}
}
}
catch(ex){
jsExDebug("contactShareDialogue_setFile",ex);
}
}
function contactShareDialogue_close(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("contactShareDialogue_close",ex);
}
}
function contactShareDialogue_setNoFileMessage(_7){
try{
this.noFileMessage=_7;
}
catch(ex){
jsExDebug("contactShareDialogue_setNoFileMessage",ex);
}
}
function contactShareDialogue_setPosition(_8,_9){
try{
this.frame.setPosition(_8,_9);
}
catch(ex){
jsExDebug("contactShareDialogue_setPosition",ex);
}
}
function contactShareDialogue_createFrame(){
try{
var _a=new this.SYSTEM.Frame.Window("frame","Share with Contacts",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var _b=new this.SYSTEM.Widget.Label("fileLabel");
_b.setText("File: -");
var _c=new this.SYSTEM.Widget.Label("emailLabel");
_c.setText("Email");
var _d=new this.SYSTEM.Widget.Text("emailText");
_d.setWidth(this.EMAIL_TEXT_WIDTH);
var _e=new this.SYSTEM.Widget.SelectList("contactSelect");
_e.setDimensions(this.CONTACT_WIDTH,this.CONTACT_HEIGHT);
_e.allowStartVisible();
_e.allowBorder("#AAAAAA");
_e.align(_e.LEFT_ALIGN);
_e.allowSelect(_e.MULTIPLE_SELECT);
_e.disallowItemTextPadding();
var _f=new this.SYSTEM.Widget.Checkbox("publicCheckbox");
_f.allowLabel("Make this file public",_f.LABEL_RIGHT,200);
var _10=new this.SYSTEM.Widget.Label("readLabel");
_10.setText("Read access");
var _11=new this.SYSTEM.Widget.SelectList("readSelect");
_11.setDimensions(this.SELECT_WIDTH,this.SELECT_HEIGHT);
_11.allowStartVisible();
_11.allowBorder("#AAAAAA");
_11.allowSelect(_11.MULTIPLE_SELECT);
_11.disallowItemTextPadding();
_11.align(_11.LEFT_ALIGN);
var _12=new this.SYSTEM.Widget.Label("writeLabel");
_12.setText("Write access");
var _13=new this.SYSTEM.Widget.SelectList("writeSelect");
_13.setDimensions(this.SELECT_WIDTH,this.SELECT_HEIGHT);
_13.allowStartVisible();
_13.allowBorder("#AAAAAA");
_13.allowSelect(_13.MULTIPLE_SELECT);
_13.disallowItemTextPadding();
_13.align(_13.LEFT_ALIGN);
var _14=new this.SYSTEM.Widget.TextButton("readAddBtn",60,"Add");
var _15=new this.SYSTEM.Widget.TextButton("writeAddBtn",60,"Add");
var _16=new this.SYSTEM.Widget.TextButton("readRemoveBtn",60,"Remove");
var _17=new this.SYSTEM.Widget.TextButton("writeRemoveBtn",60,"Remove");
this.fileLabel=_b;
this.readLabel=_10;
this.writeLabel=_12;
this.readAddBtn=_14;
this.writeAddBtn=_15;
this.readSelect=_11;
this.writeSelect=_13;
this.readRemoveBtn=_16;
this.writeRemoveBtn=_17;
var _18=_a.leftEdgeWidth;
var top=_a.topEdgeHeight;
var pad=this.SYSTEM.Style.WIDGET_PADDING;
var _1b=_18+_e.width+pad;
var _1c=_1b+_16.width+pad;
_a.addWidget(_b,_18+this.FILE_LEFT,top+this.FILE_TOP);
_a.addWidget(_f,_18+this.READ_LBL_LEFT-5,top+this.FILE_TOP);
_a.addWidget(_14,_1b,top+this.READ_ADD_TOP);
_a.addWidget(_15,_1b,top+this.WRITE_ADD_TOP);
_a.addWidget(_16,_a.rightEdgeWidth,top+this.READ_REM_TOP,true);
_a.addWidget(_17,_a.rightEdgeWidth,top+this.WRITE_REM_TOP,true);
_a.addWidget(_10,_1c,top+this.READ_LBL_TOP);
_a.addWidget(_12,_1c,top+this.WRITE_LBL_TOP);
_a.addWidget(_11,_1c,top+this.READ_TOP);
_a.addWidget(_13,_1c,top+this.WRITE_TOP);
var _1d=new this.SYSTEM.Widget.TextButton("okBtn",40,"OK");
var _1e=new this.SYSTEM.Widget.Label("sharedLabel");
_1e.setDimensions(this.HIDDEN_LBL_WIDTH);
_1e.hide();
_a.addWidget(_c,_18+this.EMAIL_LBL_LEFT,top+this.EMAIL_LBL_TOP);
_a.addWidget(_d,_18+this.EMAIL_TXT_LEFT,top+this.EMAIL_TXT_TOP);
_a.addWidget(_e,_18+this.CONTACT_LEFT,top+this.CONTACT_TOP);
_a.addWidget(_1d,_a.rightEdgeWidth,_a.bottomEdgeHeight,true,true);
_a.addWidget(_1e,_18+this.HIDDEN_LBL_LEFT,top+this.HIDDEN_LBL_TOP);
this.frame=_a;
this.emailLabel=_c;
this.emailText=_d;
this.contactSelect=_e;
this.okBtn=_1d;
this.hiddenLabel=_1e;
this.SYSTEM.Event.registerKeyPressOverride(this.keyDownEvent,this);
_a.setFixedDimensions(_a.leftEdgeWidth+_1c+_13.width+_16.width+(2*pad),_e.positionY+_e.height+pad+_a.bottomEdgeHeight);
}
catch(ex){
jsExDebug("contactShareDialogue_createFrame",ex);
}
}
function contactShareDialogue_refreshContacts(){
function refreshCallback(){
try{
var _1f=this.SYSTEM.Contacts.getAcceptedContacts();
for(var i=0;i<_1f.length;i++){
this.contactSelect.addItem(_1f[i],_1f[i].getUserName());
}
}
catch(ex){
jsExDebug("contactShareDialogue_refreshContacts: refreshCallback",ex);
}
}
try{
this.SYSTEM.Contacts.refresh(new this.SYSTEM.Delegate(this,refreshCallback));
}
catch(ex){
jsExDebug("contactShareDialogue_refreshContacts",ex);
}
}
function contactShareDialogue_refreshLists(_21,_22){
var me=this;
function refreshCallback(){
try{
me.emailText.clearContent();
if(_21){
var _24=me.SYSTEM.Filesystem.getUsersWithReadAccessById(me.fileId);
me.readSelect.clearList();
for(var i=0;i<_24.length;i++){
var _26=_24[i];
if(me.SYSTEM.Contacts.isAccepted(_26.userId)){
me.readSelect.addItem({isContact:true,userId:_26.userId},_26.userName);
}else{
me.readSelect.addItem({isContact:false,email:_26.email},me.getEmailText(_26.email));
}
}
}
if(_22){
var _27=me.SYSTEM.Filesystem.getUsersWithReadWriteAccessById(me.fileId);
me.writeSelect.clearList();
for(i=0;i<_27.length;i++){
var _26=_27[i];
if(_26.email!=me.SYSTEM.UserDetails.emailAddress){
if(me.SYSTEM.Contacts.isAccepted(_26.userId)){
me.writeSelect.addItem({isContact:true,userId:_26.userId},_26.userName);
}else{
me.writeSelect.addItem({isContact:false,email:_26.email},me.getEmailText(_26.email));
}
}
}
}
var _28=me.SYSTEM.Filesystem.getPublicAccess(me.fileId);
me.frame.getWidget("publicCheckbox").setCheckedState((_28==me.SYSTEM.Filesystem.FILE_ACCESS_READ?true:false));
}
catch(ex){
jsExDebug("contactShareDialogue_refreshLists: refreshCallback",ex);
}
}
try{
this.SYSTEM.Filesystem.refresh(refreshCallback,this);
}
catch(ex){
jsExDebug("contactShareDialogue_refreshLists",ex);
}
}
function contactShareDialogue_error(msg,_2a,_2b){
try{
var _2c=new this.SYSTEM.Dialogue.Error(null,"Share with Contacts",msg,_2a,_2b);
}
catch(ex){
jsExDebug("contactShareDialogue_error",ex);
}
}
function contactShareDialogue_okAlert(msg,_2e,_2f){
try{
var _30=new this.SYSTEM.Dialogue.OkAlert(null,"Share with Contacts",msg,_2e,_2f);
}
catch(ex){
jsExDebug("contactShareDialogue_okAlert",ex);
}
}
function contactShareDialogue_getEmailText(_31){
try{
return "<i>"+_31+"</i>";
}
catch(ex){
jsExDebug("contactShareDialogue_getEmailText",ex);
}
}
function contactShareDialogue_getSelectIndex(_32,_33,_34){
try{
for(i=0;i<_32.items.length;i++){
if(_32.items[i]){
var _35=_32.items[i].value;
if(_33&&_35.isContact&&_35.userId==_33){
return i;
}else{
if(_34&&!_35.isContact&&_35.email==_34){
return i;
}
}
}
}
return null;
}
catch(ex){
jsExDebug("contactShareDialogue_getSelectIndex",ex);
}
}
function contactShareDialogue_hideInterface(msg){
try{
this.readLabel.hide();
this.writeLabel.hide();
this.readAddBtn.hide();
this.writeAddBtn.hide();
this.readSelect.hide();
this.writeSelect.hide();
this.frame.getWidget("publicCheckbox").hide();
this.readRemoveBtn.hide();
this.writeRemoveBtn.hide();
this.fileLabel.hide();
this.emailLabel.hide();
this.emailText.hide();
this.contactSelect.hide();
this.hiddenLabel.show();
this.hiddenLabel.setText(msg);
this.stateInterfaceVisible=false;
}
catch(ex){
jsExDebug("contactShareDialogue_hideInterface",ex);
}
}
function contactShareDialogue_showInterface(){
try{
if(this.stateInterfaceVisible){
return;
}
this.readLabel.show();
this.writeLabel.show();
this.readAddBtn.show();
this.writeAddBtn.show();
this.readSelect.show();
this.writeSelect.show();
this.frame.getWidget("publicCheckbox").show();
this.readRemoveBtn.show();
this.writeRemoveBtn.show();
this.fileLabel.show();
this.emailLabel.show();
this.emailText.show();
this.contactSelect.show();
this.hiddenLabel.hide();
this.stateInterfaceVisible=true;
}
catch(ex){
jsExDebug("contactShareDialogue_showInterface",ex);
}
}
function contactShareDialogue_frame__onClose(_37){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("contactShareDialogue_frame__onClose",ex);
}
}
function contactShareDialogue_binding_publicCheckbox_valueChange(_38){
function callback(){
try{
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("contactShareDialogue_binding_publicCheckbox_valueChange",ex);
}
}
function tooltipTimeout(){
try{
var _39=(this.frame.getWidget("publicCheckbox").isChecked()?this.SYSTEM.Filesystem.FILE_ACCESS_READ:this.SYSTEM.Filesystem.FILE_ACCESS_NONE);
this.SYSTEM.Filesystem.setPublicAccess(this.fileId,_39,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("contactShareDialogue_binding_publicCheckbox_valueChange: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Setting public access...");
}
catch(ex){
jsExDebug("contactShareDialogue_binding_publicCheckbox_valueChange",ex);
}
}
function contactShareDialogue_binding_readAddBtn_click(){
function emailCallback(_3a){
try{
if(_3a){
this.readSelect.addItem({isContact:false,email:_3b},this.getEmailText(_3b));
this.emailText.clearContent();
if(_3c!=null){
this.writeSelect.removeItem(_3c);
}
}else{
var d=new this.SYSTEM.Dialogue.Invite(null,_3b,inviteDialogue_t.prototype.ACTION_COLLABORATION_INVITE,new this.SYSTEM.Delegate(this,this.binding_readAddBtn_click));
d.setQuickLinkData("f="+this.SYSTEM.Filesystem.getFileGuidFromId(this.fileId));
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_readAddBtn_click: emailCallback",ex);
}
}
function contactCallback(_3e){
try{
if(_3e){
_3f++;
if(_3f==_40.length){
for(var i=0;i<_40.length;i++){
if(_40[i]){
this.readSelect.addItem({isContact:true,userId:_40[i].userId},_40[i].getUserName());
}
}
for(var i=0;i<_42.length;i++){
this.writeSelect.removeItem(_42[i]);
}
}
this.contactSelect.deselectAll();
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_readAddBtn_click: contactCallback",ex);
}
}
try{
if(!this.fileId){
return;
}
var _3b=this.emailText.getContent();
if(_3b){
var _3c=null;
if(this.getSelectIndex(this.readSelect,null,_3b)==null){
var _43=this.getSelectIndex(this.writeSelect,null,_3b);
if(_43!=null){
_3c=_43;
}
this.SYSTEM.Filesystem.setFileAccess(this.fileId,this.SYSTEM.Filesystem.FILE_ACCESS_READ,null,null,_3b,new this.SYSTEM.Delegate(this,emailCallback));
}
}else{
var _40=this.contactSelect.getSelectedValues();
var _3f=0;
var _42=[];
if(_40){
for(var i=0;i<_40.length;i++){
var _45=_40[i].userId;
if(this.getSelectIndex(this.readSelect,_45)==null){
var _43=this.getSelectIndex(this.writeSelect,_45);
if(_43!=null){
_42.push(_43);
}
this.SYSTEM.Filesystem.setFileAccess(this.fileId,this.SYSTEM.Filesystem.FILE_ACCESS_READ,_45,null,null,new this.SYSTEM.Delegate(this,contactCallback));
}else{
_3f++;
_40[i]=null;
delete _40[i];
}
}
}
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_readAddBtn_click",ex);
}
}
function contactShareDialogue_binding_writeAddBtn_click(){
function emailCallback(_46){
try{
if(_46){
this.writeSelect.addItem({isContact:false,email:_47},this.getEmailText(_47));
this.emailText.clearContent();
if(_48!=null){
this.readSelect.removeItem(_48);
}
}else{
var d=new this.SYSTEM.Dialogue.Invite(null,_47,inviteDialogue_t.prototype.ACTION_COLLABORATION_INVITE,new this.SYSTEM.Delegate(this,this.binding_writeAddBtn_click));
d.setQuickLinkData("f="+this.SYSTEM.Filesystem.getFileGuidFromId(this.fileId));
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_writeAddBtn_click: emailCallback",ex);
}
}
function contactCallback(_4a){
try{
if(_4a){
_4b++;
if(_4b==_4c.length){
for(var i=0;i<_4c.length;i++){
if(_4c[i]){
this.writeSelect.addItem({isContact:true,userId:_4c[i].userId},_4c[i].getUserName());
}
}
for(var i=0;i<_4e.length;i++){
this.readSelect.removeItem(_4e[i]);
}
}
this.contactSelect.deselectAll();
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_writeAddBtn_click: contactCallback",ex);
}
}
try{
if(!this.fileId){
return;
}
var _47=this.emailText.getContent();
if(_47){
var _48=null;
if(this.getSelectIndex(this.writeSelect,null,_47)==null){
var _4f=this.getSelectIndex(this.readSelect,null,_47);
if(_4f!=null){
_48=_4f;
}
this.SYSTEM.Filesystem.setFileAccess(this.fileId,this.SYSTEM.Filesystem.FILE_ACCESS_WRITE,null,null,_47,new this.SYSTEM.Delegate(this,emailCallback));
}
}else{
var _4c=this.contactSelect.getSelectedValues();
var _4b=0;
var _4e=[];
if(_4c){
for(var i=0;i<_4c.length;i++){
var _51=_4c[i].userId;
if(this.getSelectIndex(this.writeSelect,_51)==null){
var _4f=this.getSelectIndex(this.readSelect,_51);
if(_4f!=null){
_4e.push(_4f);
}
this.SYSTEM.Filesystem.setFileAccess(this.fileId,this.SYSTEM.Filesystem.FILE_ACCESS_WRITE,_51,null,null,new this.SYSTEM.Delegate(this,contactCallback));
}else{
_4b++;
_4c[i]=null;
delete _4c[i];
}
}
}
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_writeAddBtn_click",ex);
}
}
function contactShareDialogue_binding_readRemoveBtn_click(){
function deleteCallback(_52){
try{
if(_52){
_53++;
if(_53==_54.length){
for(var i=0;i<_54.length;i++){
this.readSelect.removeItem(null,_54[i]);
}
}
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_readRemoveBtn_click: deleteCallback",ex);
}
}
try{
if(!this.fileId){
return;
}
var _54=this.readSelect.getSelectedValues();
var _53=0;
if(_54){
for(var i=0;i<_54.length;i++){
var _57=_54[i];
if(_57.isContact){
this.SYSTEM.Filesystem.deleteFileAccess(this.fileId,_57.userId,null,null,new this.SYSTEM.Delegate(this,deleteCallback));
}else{
this.SYSTEM.Filesystem.deleteFileAccess(this.fileId,null,null,_57.email,new this.SYSTEM.Delegate(this,deleteCallback));
}
}
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_readRemoveBtn_click",ex);
}
}
function contactShareDialogue_binding_writeRemoveBtn_click(){
function deleteCallback(_58){
try{
if(_58){
_59++;
if(_59==_5a.length){
for(var i=0;i<_5a.length;i++){
this.writeSelect.removeItem(null,_5a[i]);
}
}
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_writeRemoveBtn_click: deleteCallback",ex);
}
}
try{
if(!this.fileId){
return;
}
var _5a=this.writeSelect.getSelectedValues();
var _59=0;
if(_5a){
for(var i=0;i<_5a.length;i++){
var _5d=_5a[i];
if(_5d.isContact){
this.SYSTEM.Filesystem.deleteFileAccess(this.fileId,_5d.userId,null,null,new this.SYSTEM.Delegate(this,deleteCallback));
}else{
this.SYSTEM.Filesystem.deleteFileAccess(this.fileId,null,null,_5d.email,new this.SYSTEM.Delegate(this,deleteCallback));
}
}
}
}
catch(ex){
jsExDebug("contactShareDialogue_binding_writeRemoveBtn_click",ex);
}
}
function contactShareDialogue_binding_okBtn_click(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("contactShareDialogue_binding_okBtn_click",ex);
}
}
function contactShareDialogue_keyDownEvent(_5e,me){
return;
}

try{
imageSelectDialogue_t.prototype=new systemApplication_t();
imageSelectDialogue_t.prototype.constructor=imageSelectDialogue_t;
imageSelectDialogue_t.prototype.imageSelectDialogue_super=systemApplication_t.prototype.constructor;
imageSelectDialogue_t.prototype.cleanUp=imageSelectDialogue_cleanUp;
imageSelectDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
imageSelectDialogue_t.prototype.setPosition=imageSelectDialogue_setPosition;
imageSelectDialogue_t.prototype.openFile=imageSelectDialogue_openFile;
imageSelectDialogue_t.prototype.imageUploadComplete=imageSelectDialogue_imageUploadComplete;
imageSelectDialogue_t.prototype.dialogueFrame__onClose=imageSelectDialogue_dialogueFrame__onClose;
imageSelectDialogue_t.prototype.dialogueFrame__onResize=imageSelectDialogue_dialogueFrame__onResize;
imageSelectDialogue_t.prototype.dialogueFrame__onResizeEnd=imageSelectDialogue_dialogueFrame__onResizeEnd;
imageSelectDialogue_t.prototype.binding_openBtn_click=imageSelectDialogue_binding_openBtn_click;
imageSelectDialogue_t.prototype.binding_newAvatarBtn_click=imageSelectDialogue_binding_newAvatarBtn_click;
imageSelectDialogue_t.prototype.binding_peepelAvatarBackBtn_click=imageSelectDialogue_binding_peepelAvatarBackBtn_click;
imageSelectDialogue_t.prototype.binding_peepelAvatarBtn_click=imageSelectDialogue_binding_peepelAvatarBtn_click;
imageSelectDialogue_t.prototype.binding_peepelAvatarUseBtn_click=imageSelectDialogue_binding_peepelAvatarUseBtn_click;
imageSelectDialogue_t.prototype.fileDblClickEvent=imageSelectDialogue_fileDblClickEvent;
imageSelectDialogue_t.prototype.folderDblClickEvent=imageSelectDialogue_folderDblClickEvent;
imageSelectDialogue_t.prototype.backBtnClickEvent=imageSelectDialogue_backBtnClickEvent;
imageSelectDialogue_t.prototype.DIALOGUE_WIDTH=420;
imageSelectDialogue_t.prototype.DIALOGUE_HEIGHT=270;
imageSelectDialogue_t.prototype.FILES_WIDTH=400;
imageSelectDialogue_t.prototype.FILES_HEIGHT=175;
imageSelectDialogue_t.prototype.FILES_LEFT=10;
imageSelectDialogue_t.prototype.FILES_TOP=25;
imageSelectDialogue_t.prototype.OPEN_WIDTH=60;
imageSelectDialogue_t.prototype.UPLOAD_LEFT=220;
imageSelectDialogue_t.prototype.UPLOAD_WIDTH=120;
imageSelectDialogue_t.prototype.OPEN_HEIGHT=24;
imageSelectDialogue_t.prototype.OPEN_LEFT=350;
imageSelectDialogue_t.prototype.OPEN_TOP=235;
imageSelectDialogue_t.prototype.HELP_LEFT=10;
imageSelectDialogue_t.prototype.HELP_TOP=0;
imageSelectDialogue_t.prototype.PEEPEL_WIDTH=180;
imageSelectDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
imageSelectDialogue_t.prototype.BUTTON_IMG="img/app/system/widgets/blankbutton/40x30";
}
catch(ex){
jsExDebug("imageSelectDialogue_t.prototype",ex);
}
function imageSelectDialogue_t(_1,_2,_3){
try{
this.imageSelectDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.openFileText="To open a file: Double-click on it or select the file and click 'Open'.";
this.openFolderText="Double-click on a folder to view its contents.";
this.peepelAvatarText="Click on an image to use it.";
var _4=new this.SYSTEM.Frame.Window("dialogueFrame","Choose an Image",this,null,null,true,true,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_4.setMinimumSize(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
_4.setDimensions(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
var _5=this.SYSTEM.Style.WIDGET_PADDING;
var _6=new this.SYSTEM.Widget.Label("helpLabel");
_6.setText(this.openFolderText);
var _7=new this.SYSTEM.Widget.TextButton("openBtn",this.OPEN_WIDTH,"Use",null,"Use the selected image");
var _8=new this.SYSTEM.Widget.TextButton("newAvatarBtn",this.UPLOAD_WIDTH,"Upload an image");
var _9=new this.SYSTEM.Controls.FileBrowser("fileBrowser",this.SYSTEM.Controls.FileBrowser.TYPE_OPEN,this.SYSTEM.Filesystem.File.TYPE_IMAGE);
_9.setDimensions(_4.getInternalWidth(),_4.getInternalHeight()-_7.height-_5-this.FILES_TOP);
_9.addEventHandler(_9.FILE_DBL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.fileDblClickEvent));
_9.addEventHandler(_9.FOLDER_DBL_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.folderDblClickEvent));
_9.addEventHandler(_9.BACK_BTN_CLICK_EVENT,new this.SYSTEM.Delegate(this,this.backBtnClickEvent));
_9.listFolders();
var _a=_4.leftEdgeWidth;
var _b=_4.topEdgeHeight;
_4.addWidget(_6,_a,_b+this.HELP_TOP);
_4.addControl(_9,_a,_b+this.FILES_TOP);
_4.addWidget(_7,_4.rightEdgeWidth,_4.bottomEdgeHeight,true,true);
_4.addWidget(_8,_7.positionX+_7.width+_5,_7.positionY,true,true);
if(_3){
var _c=new this.SYSTEM.Widget.TextButton("peepelAvatarBtn",this.PEEPEL_WIDTH,"Choose a Peepel Avatar");
var _d=new this.SYSTEM.Widget.TextButton("peepelAvatarBackBtn",this.UPLOAD_WIDTH,"Back to files");
var _e=new this.SYSTEM.Widget.TextButton("peepelAvatarUseBtn",this.UPLOAD_WIDTH,"Use Avatar");
_d.hide();
_e.hide();
_4.addWidget(_c,_8.positionX+_8.width+_5,_8.positionY,true,true);
_4.addWidget(_e,_4.rightEdgeWidth,_4.bottomEdgeHeight,true,true);
_4.addWidget(_d,_e.positionX+_e.width+_5,_e.positionY,true,true);
var _f=new this.SYSTEM.Widget.AvatarBrowser("peepelAvatarBrowser",_9.width,_9.height);
_f.hide();
_4.addWidget(_f,_9.positionX,_9.positionY);
}
this.dialogueFrame=_4;
this.helpLabel=_6;
this.fileBrowser=_9;
this.openBtn=_7;
this.application=_1;
this.actionDelegate=_2;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_4.show();
}
catch(ex){
jsExDebug("imageSelectDialogue_t",ex);
}
}
function imageSelectDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.fileBrowser=null;
me.openBtn=null;
me.helpLabel=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
if(me.uploadDialogue){
me.uploadDialogue.cleanUp();
}
me.uploadDialogue=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("imageSelectDialogue_cleanUp",ex);
}
}
function imageSelectDialogue_openFile(){
try{
var _11=this.fileBrowser.getSelectedFile();
var _12=this.fileBrowser.getSelectedFolder();
if(_12&&_11){
if(_11.filetype&&_11.filetype==this.SYSTEM.Filesystem.File.TYPE_IMAGE){
if(this.actionDelegate){
this.actionDelegate.invoke(_11.fileid);
}
this.dialogueFrame.close();
}else{
var _13=new this.SYSTEM.Dialogue.Error(null,"Open error","Please select an image file to use.");
}
}else{
if(_12&&!this.fileBrowser.openedFolder){
this.fileBrowser.openSelectedFolder();
}
}
}
catch(ex){
jsExDebug("imageSelectDialogue_openFile",ex);
}
}
function imageSelectDialogue_imageUploadComplete(_14){
try{
this.fileBrowser.openFolderWithId(this.SYSTEM.Settings.get("file_import_folder"));
this.uploadDialogue=null;
}
catch(ex){
jsExDebug("imageSelectDialogue_imageUploadComplete",ex);
}
}
function imageSelectDialogue_setPosition(_15,_16){
try{
this.dialogueFrame.setPosition(_15,_16);
}
catch(ex){
jsExDebug("imageSelectDialogue_setPosition",ex);
}
}
function imageSelectDialogue_dialogueFrame__onClose(_17){
try{
if(this.actionDelegate){
this.actionDelegate.invoke();
}
this.cleanUp();
}
catch(ex){
jsExDebug("imageSelectDialogue_dialogueFrame__onClose",ex);
}
}
function imageSelectDialogue_dialogueFrame__onResize(_18){
try{
if(!this.dialogueFrame){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _1b=null;
var _1c=null;
if(dX||dY){
_1b=_18.width+this.SYSTEM.Event.dragDistanceX;
_1c=_18.height+this.SYSTEM.Event.dragDistanceY;
if(_1b<=_18.minimumWidth){
_1b=_18.minimumWidth;
}
if(_1c<=_18.minimumHeight){
_1c=_18.minimumHeight;
}
}else{
_1b=_18.width;
_1c=_18.height;
}
var _1d=_18.getInternalWidth(_1b);
var _1e=_18.getInternalHeight(_1c);
this.fileBrowser.setDimensions(_1d,_1e-this.openBtn.height-this.pad-this.FILES_TOP);
if(_18.getWidget("peepelAvatarBrowser")){
_18.getWidget("peepelAvatarBrowser").setDimensions(this.fileBrowser.width,this.fileBrowser.height);
}
}
catch(ex){
jsExDebug("imageSelectDialogue_dialogueFrame__onResize",ex);
}
}
function imageSelectDialogue_dialogueFrame__onResizeEnd(_1f){
try{
if(this.peepelAvatarsVisible){
this.dialogueFrame.getWidget("peepelAvatarBrowser").refresh();
}else{
if(this.fileBrowser){
this.fileBrowser.refresh(true);
}
}
}
catch(ex){
jsExDebug("imageSelectDialogue_dialogueFrame__onResizeEnd",ex);
}
}
function imageSelectDialogue_binding_openBtn_click(_20){
try{
this.openFile();
}
catch(ex){
jsExDebug("imageSelectDialogue_binding_openBtn_click",ex);
}
}
function imageSelectDialogue_binding_newAvatarBtn_click(_21){
try{
if(this.uploadDialogue){
return;
}
this.uploadDialogue=new this.SYSTEM.Dialogue.ImageUpload(null,new this.SYSTEM.Delegate(this,this.imageUploadComplete));
}
catch(ex){
jsExDebug("imageSelectDialogue_binding_newAvatarBtn_click",ex);
}
}
function imageSelectDialogue_binding_peepelAvatarBackBtn_click(){
try{
var _22=this.dialogueFrame;
this.fileBrowser.show();
this.fileBrowser.refresh();
this.openBtn.show();
_22.getWidget("newAvatarBtn").show();
_22.getWidget("peepelAvatarBtn").show();
this.helpLabel.setText(this.fileBrowser.openedFolder?this.openFileText:this.openFolderText);
_22.getWidget("peepelAvatarUseBtn").hide();
_22.getWidget("peepelAvatarBackBtn").hide();
_22.getWidget("peepelAvatarBrowser").hide();
this.peepelAvatarsVisible=false;
}
catch(ex){
jsExDebug("imageSelectDialogue_binding_peepelAvatarBtn_click",ex);
}
}
function imageSelectDialogue_binding_peepelAvatarUseBtn_click(){
try{
var _23=this.dialogueFrame.getWidget("peepelAvatarBrowser").selectedFile;
if(_23!=null&&this.actionDelegate){
this.actionDelegate.invoke(_23);
this.dialogueFrame.close();
}
}
catch(ex){
jsExDebug("imageSelectDialogue_binding_peepelAvatarUseBtn_click",ex);
}
}
function imageSelectDialogue_binding_peepelAvatarBtn_click(){
try{
var _24=this.dialogueFrame;
this.fileBrowser.hide();
this.openBtn.hide();
_24.getWidget("newAvatarBtn").hide();
_24.getWidget("peepelAvatarBtn").hide();
this.helpLabel.setText(this.peepelAvatarText);
_24.getWidget("peepelAvatarUseBtn").show();
_24.getWidget("peepelAvatarBackBtn").show();
_24.getWidget("peepelAvatarBrowser").show();
_24.getWidget("peepelAvatarBrowser").refresh();
this.peepelAvatarsVisible=true;
}
catch(ex){
jsExDebug("imageSelectDialogue_binding_peepelAvatarBtn_click",ex);
}
}
function imageSelectDialogue_fileDblClickEvent(_25,_26){
try{
this.openFile();
}
catch(ex){
jsExDebug("imageSelectDialogue_fileDblClickEvent",ex);
}
}
function imageSelectDialogue_folderDblClickEvent(_27,_28){
try{
this.helpLabel.setText(this.openFileText);
}
catch(ex){
jsExDebug("imageSelectDialogue_folderDblClickEvent",ex);
}
}
function imageSelectDialogue_backBtnClickEvent(_29,_2a){
try{
this.helpLabel.setText(this.openFolderText);
}
catch(ex){
jsExDebug("imageSelectDialogue_backBtnClickEvent",ex);
}
}

try{
imageUploadDialogue_t.prototype=new systemIframeApplication_t();
imageUploadDialogue_t.prototype.constructor=imageUploadDialogue_t;
imageUploadDialogue_t.prototype.cleanUp=imageUploadDialogue_cleanUp;
imageUploadDialogue_t.prototype.imageUploadDialogue_super=systemIframeApplication_t.prototype.constructor;
imageUploadDialogue_t.prototype.systemIframeApplication_cleanUp=systemIframeApplication_t.prototype.cleanUp;
imageUploadDialogue_t.prototype.frame__onClose=imageUploadDialogue_frame__onClose;
imageUploadDialogue_t.prototype.setPosition=imageUploadDialogue_setPosition;
imageUploadDialogue_t.prototype.iframeOnLoadEvent=imageUploadDialogue_iframeOnLoadEvent;
imageUploadDialogue_t.prototype.ICON_SRC="img/app/system/icons/apps/avatar";
imageUploadDialogue_t.prototype.AD_IMAGE="img/site/friends/particls";
imageUploadDialogue_t.prototype.AD_URL="http://www.touchstonelive.com/peepel";
imageUploadDialogue_t.prototype.APP_NAME="Image Upload";
imageUploadDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
imageUploadDialogue_t.prototype.FRAME_WIDTH=485;
imageUploadDialogue_t.prototype.FRAME_HEIGHT=395;
imageUploadDialogue_t.prototype.FRAME_INIT_TITLE=imageUploadDialogue_t.prototype.APP_NAME;
imageUploadDialogue_t.prototype.IFRAME_TOP=0;
imageUploadDialogue_t.prototype.IFRAME_BORDER="none";
imageUploadDialogue_t.prototype.IFRAME_FRAMEBORDER="0";
imageUploadDialogue_t.prototype.IFRAME_BG_COLOUR="";
imageUploadDialogue_t.prototype.INTIAL_LOCATION="image.php";
imageUploadDialogue_t.prototype.FRAME_RESIZE=false;
imageUploadDialogue_t.prototype.IFRAME_WIDTH=imageUploadDialogue_t.prototype.FRAME_WIDTH-30;
imageUploadDialogue_t.prototype.IFRAME_HEIGHT=85;
imageUploadDialogue_t.prototype.OUTER_DIV_TOP=50;
imageUploadDialogue_t.prototype.DESC_HEIGHT=300;
imageUploadDialogue_t.prototype.FRAME_ON_TOP=true;
}
catch(ex){
jsExDebug("imageUploadDialogue_t.prototype",ex);
}
function imageUploadDialogue_t(_1,_2){
try{
this.imageUploadDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.application=_1;
this.actionDelegate=_2;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
}
catch(ex){
jsExDebug("imageUploadDialogue_t",ex);
}
}
function imageUploadDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.frame=null;
me.iframe=null;
me.outerDiv=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.systemIframeApplication_cleanUp();
}
catch(ex){
jsExDebug("imageUploadDialogue_cleanUp",ex);
}
}
function imageUploadDialogue_frame__onClose(_4){
try{
if(this.actionDelegate){
this.actionDelegate.invoke();
}
this.cleanUp();
}
catch(ex){
jsExDebug("imageUploadDialogue_frame__onClose",ex);
}
}
function imageUploadDialogue_setPosition(_5,_6){
try{
this.frame.setPosition(_5,_6);
}
catch(ex){
jsExDebug("imageUploadDialogue_setPosition",ex);
}
}
function imageUploadDialogue_iframeOnLoadEvent(_7,me){
function avatarUploadComplete(){
try{
if(me.actionDelegate){
me.actionDelegate.invoke();
}
me.cleanUp();
}
catch(ex){
jsExDebug("avatarUploadComplete",ex);
}
}
try{
var _9=me.iframe.contentWindow.document.getElementById("finishedLink");
if(_9){
_9.onclick=avatarUploadComplete;
}
if(!me.firstLoadComplete){
me.firstLoadComplete=true;
me.iframe.contentWindow.location=me.INTIAL_LOCATION;
}
}
catch(ex){
jsExDebug("imageUploadDialogue_iframeOnLoadEvent",ex);
}
}

try{
pointEditDialogue_t.prototype=new systemApplication_t();
pointEditDialogue_t.prototype.constructor=pointEditDialogue_t;
pointEditDialogue_t.prototype.pointEditDialogue_super=systemApplication_t.prototype.constructor;
pointEditDialogue_t.prototype.cleanUp=pointEditDialogue_cleanUp;
pointEditDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
pointEditDialogue_t.prototype.setPosition=pointEditDialogue_setPosition;
pointEditDialogue_t.prototype.dialogueFrame__onClose=pointEditDialogue_dialogueFrame__onClose;
pointEditDialogue_t.prototype.binding_cancelBtn_click=pointEditDialogue_binding_cancelBtn_click;
pointEditDialogue_t.prototype.binding_updateBtn_click=pointEditDialogue_binding_updateBtn_click;
pointEditDialogue_t.prototype.DIALOGUE_WIDTH=300;
pointEditDialogue_t.prototype.DIALOGUE_HEIGHT=210;
pointEditDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("pointEditDialogue_t.prototype",ex);
}
function pointEditDialogue_t(_1,_2){
try{
this.pointEditDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.point=this.SYSTEM.PeepelPoints.getPointFromLocationId(_2);
if(!this.point){
return;
}
this.width=this.DIALOGUE_WIDTH;
this.height=this.DIALOGUE_HEIGHT;
var _3="Edit Point";
var _4=new this.SYSTEM.Frame.Window("dialogueFrame",_3,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_4.allowWindowOverflow();
var _5=[_4.leftEdgeWidth,100];
var w=[];
var _7=this.SYSTEM.Widget;
var _8=new _7.Label("nameLabel","Name");
var _9=new _7.Text("nameText");
var _a=new _7.Label("descriptionLabel","Description");
var _b=new _7.Text("descriptionText");
var _c=new _7.Label("tagsLabel","Tags");
var _d=new _7.Text("tagsText");
var _e=this.SYSTEM.PeepelPoints.getPrivacyText(this.SYSTEM.PeepelPoints.PRIVACY_PRIVATE);
var _f=this.SYSTEM.PeepelPoints.getPrivacyText(this.SYSTEM.PeepelPoints.PRIVACY_SHARED);
var _10=this.SYSTEM.PeepelPoints.getPrivacyText(this.SYSTEM.PeepelPoints.PRIVACY_PUBLIC);
var _11=new _7.Label("privacyLabel","Privacy");
var _12=new _7.DropText("privacySelect",120);
_12.addItem(this.SYSTEM.PeepelPoints.PRIVACY_PRIVATE,_e+" (only you can see)",_e);
_12.addItem(this.SYSTEM.PeepelPoints.PRIVACY_SHARED,_f+" (shared with your contacts)",_f);
_12.addItem(this.SYSTEM.PeepelPoints.PRIVACY_PUBLIC,_10+" (all users can see)",_10);
_9.setContent(this.point.name);
_b.setContent(this.point.description);
_d.setContent(this.point.tags);
_12.setSelectedValue(this.point.privacy);
w.push([_8,_9]);
w.push([_a,_b]);
w.push([_c,_d]);
w.push([_11,_12]);
var _13=new _7.TextButton("updateBtn",80,"Update");
var _14=new _7.TextButton("cancelBtn",80,"Cancel");
_4.addWidget(_14,_4.leftEdgeWidth,_4.bottomEdgeHeight,true,true);
_4.addWidget(_13,_4.rightEdgeWidth+_14.width+this.SYSTEM.Style.WIDGET_PADDING,_4.bottomEdgeHeight,true,true);
for(var i=0;i<w.length;i++){
var top=_4.topEdgeHeight+(i*30);
for(var j=0;j<w[i].length;j++){
_4.addWidget(w[i][j],_5[j],top);
}
}
this.dialogueFrame=_4;
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_4.setFixedDimensions(this.width,top+30+this.SYSTEM.Style.WIDGET_PADDING+_13.height+_4.bottomEdgeHeight);
_4.show();
}
catch(ex){
jsExDebug("pointEditDialogue_t",ex);
}
}
function pointEditDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.dialogueFrame=null;
me.point=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("pointEditDialogue_cleanUp",ex);
}
}
function pointEditDialogue_setPosition(_19,_1a){
try{
this.dialogueFrame.setPosition(_19,_1a);
}
catch(ex){
jsExDebug("pointEditDialogue_setPosition",ex);
}
}
function pointEditDialogue_dialogueFrame__onClose(_1b){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("pointEditDialogue_dialogueFrame__onClose",ex);
}
}
function pointEditDialogue_binding_cancelBtn_click(_1c){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("pointEditDialogue_binding_cancelBtn_click",ex);
}
}
function pointEditDialogue_binding_updateBtn_click(_1d){
function updatePointCallback(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("pointEditDialogue_binding_updateBtn_click: updatePointCallback",ex);
}
}
function tooltipTimeout(){
try{
var _1e=this.dialogueFrame;
if(!_1e.getWidget("nameText").getContent()){
var er=new this.SYSTEM.Dialogue.Error(null,"Edit Point","A name is required");
return;
}
this.SYSTEM.PeepelPoints.updatePeepelPoint(this.point.locationId,this.point.coordinate,_1e.getWidget("nameText").getContent(),_1e.getWidget("descriptionText").getContent(),_1e.getWidget("tagsText").getContent(),_1e.getWidget("privacySelect").getSelectedValue(),new this.SYSTEM.Delegate(this,updatePointCallback));
}
catch(ex){
jsExDebug("pointEditDialogue_binding_updateBtn_click: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Updating your point...");
}
catch(ex){
jsExDebug("pointEditDialogue_binding_updateBtn_click",ex);
}
}

try{
acceptRequestDialogue_t.prototype=new systemApplication_t();
acceptRequestDialogue_t.prototype.constructor=acceptRequestDialogue_t;
acceptRequestDialogue_t.prototype.acceptRequestDialogue_super=systemApplication_t.prototype.constructor;
acceptRequestDialogue_t.prototype.cleanUp=acceptRequestDialogue_cleanUp;
acceptRequestDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
acceptRequestDialogue_t.prototype.setPosition=acceptRequestDialogue_setPosition;
acceptRequestDialogue_t.prototype.dialogueFrame__onClose=acceptRequestDialogue_dialogueFrame__onClose;
acceptRequestDialogue_t.prototype.binding_acceptBtn_click=acceptRequestDialogue_binding_acceptBtn_click;
acceptRequestDialogue_t.prototype.binding_sendBtn_click=acceptRequestDialogue_binding_sendBtn_click;
acceptRequestDialogue_t.prototype.binding_trackOffBtn_click=acceptRequestDialogue_binding_trackOffBtn_click;
acceptRequestDialogue_t.prototype.binding_trackAcqBtn_click=acceptRequestDialogue_binding_trackAcqBtn_click;
acceptRequestDialogue_t.prototype.binding_trackFriendBtn_click=acceptRequestDialogue_binding_trackFriendBtn_click;
acceptRequestDialogue_t.prototype.binding_trackTrustBtn_click=acceptRequestDialogue_binding_trackTrustBtn_click;
acceptRequestDialogue_t.prototype.binding_trackStatusLink_click=acceptRequestDialogue_binding_trackStatusLink_click;
acceptRequestDialogue_t.prototype.DIALOGUE_WIDTH=400;
acceptRequestDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
acceptRequestDialogue_t.prototype.TRACK_STATUS_OFF_IMG="img/app/app/contactmanager/off";
acceptRequestDialogue_t.prototype.TRACK_STATUS_ACQ_IMG="img/app/app/contactmanager/acq";
acceptRequestDialogue_t.prototype.TRACK_STATUS_FRIEND_IMG="img/app/app/contactmanager/friend";
acceptRequestDialogue_t.prototype.TRACK_STATUS_TRUST_IMG="img/app/app/contactmanager/trust";
}
catch(ex){
jsExDebug("acceptRequestDialogue_t.prototype",ex);
}
function acceptRequestDialogue_t(_1,_2,_3,_4){
try{
this.acceptRequestDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
this.usernames=_2;
this.completionDelegate=_4;
var _5=this.SYSTEM.Settings.get("default_track_status");
if(_5!=this.SYSTEM.Settings.NO_DEFAULT_TRACK_STATUS){
this.currentStatus=_5;
if(_3){
this.binding_sendBtn_click();
}else{
this.binding_acceptBtn_click();
}
return;
}
var _6=new this.SYSTEM.Frame.Window("dialogueFrame",(_3?"Send ":"Accept ")+"Request",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var _7=this.SYSTEM.Widget;
var _8=button_t.prototype.ON_IMAGE|button_t.prototype.HOVER_IMAGE;
var _9=27;
var _a="";
if(_2.length>1){
_a="What kind of contacts are these? This determines how accurate they will be able to view your location on a Webmap.";
}else{
_a="What kind of contact is <b>"+_2[0]+"</b>? This determines how accurate they will be able to view your location on a Webmap.";
}
var _b=new _7.Label("trackLabel",_a);
_b.setDimensions(_6.getInternalWidth(this.DIALOGUE_WIDTH));
var _c=new _7.Link("trackStatusLink","What does this mean?");
_c.setFontSize(null,11);
_c.setDimensions(null,15);
var _d=new _7.Button("trackOffBtn",this.TRACK_STATUS_OFF_IMG,_8,32,_9);
_d.turnOn();
this.currentStatus=this.SYSTEM.Contacts.TRACKING_STATUS_OFF;
var _e=new _7.Button("trackAcqBtn",this.TRACK_STATUS_ACQ_IMG,_8,102,_9);
var _f=new _7.Button("trackFriendBtn",this.TRACK_STATUS_FRIEND_IMG,_8,51,_9);
var _10=new _7.Button("trackTrustBtn",this.TRACK_STATUS_TRUST_IMG,_8,63,_9);
_d.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_OFF);
_e.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_ACQUAINTANCE);
_f.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_FRIEND);
_10.setValue(this.SYSTEM.Contacts.TRACKING_STATUS_TRUSTED);
if(_3){
var _11=new _7.TextButton("sendBtn",60,"Send");
_6.addWidget(_11,_6.leftEdgeWidth,_6.bottomEdgeHeight,true,true);
}else{
var _12=new _7.TextButton("acceptBtn",60,"Accept");
_6.addWidget(_12,_6.leftEdgeWidth,_6.bottomEdgeHeight,true,true);
}
this.dialogueFrame=_6;
_6.addWidget(_b,_6.leftEdgeWidth,_6.topEdgeHeight);
_6.addWidget(_c,_6.leftEdgeWidth,_b.positionY+_b.getClientHeight()+this.pad);
_6.addWidget(_d,_6.leftEdgeWidth,_6.bottomEdgeHeight,false,true);
_6.addWidget(_e,_d.positionX+_d.width-1,_d.positionY,false,true);
_6.addWidget(_f,_e.positionX+_e.width-1,_d.positionY,false,true);
_6.addWidget(_10,_f.positionX+_f.width-1,_d.positionY,false,true);
_6.setFixedDimensions(this.DIALOGUE_WIDTH,_c.positionY+_c.getClientHeight()+_d.height+(2*this.SYSTEM.Style.WIDGET_PADDING)+_6.bottomEdgeHeight);
_6.show();
}
catch(ex){
jsExDebug("acceptRequestDialogue_t",ex);
}
}
function acceptRequestDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Tooltip.hideLoading();
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
if(me.completionDelegate){
me.completionDelegate.invoke();
}
me.application=null;
me.dialogueFrame=null;
me.usernames=null;
me.currentStatus=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("acceptRequestDialogue_cleanUp",ex);
}
}
function acceptRequestDialogue_setPosition(_14,_15){
try{
if(this.dialogueFrame){
this.dialogueFrame.setPosition(_14,_15);
}
}
catch(ex){
jsExDebug("acceptRequestDialogue_setPosition",ex);
}
}
function acceptRequestDialogue_dialogueFrame__onClose(_16){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("acceptRequestDialogue_dialogueFrame__onClose",ex);
}
}
function acceptRequestDialogue_binding_acceptBtn_click(_17){
function refreshCallback(){
try{
var _18=[];
for(var i=0;i<this.usernames.length;i++){
_18.push(this.SYSTEM.Contacts.getContactIdFromName(this.usernames[i]));
}
this.SYSTEM.Contacts.acceptRequest(_18,this.currentStatus,new this.SYSTEM.Delegate(this,this.cleanUp));
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_acceptBtn_click: refreshCallback",ex);
}
}
function tooltipTimeout(){
try{
this.SYSTEM.Contacts.refreshReceived(new this.SYSTEM.Delegate(this,refreshCallback));
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_acceptBtn_click: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Accepting request...");
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_acceptBtn_click",ex);
}
}
function acceptRequestDialogue_binding_sendBtn_click(_1a){
function tooltipTimeout(){
try{
var _1b=this.SYSTEM.Contacts.sendRequest(this.usernames,this.currentStatus,new this.SYSTEM.Delegate(this,this.cleanUp),this.application);
if(!_1b){
this.cleanUp();
}
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_sendBtn_click: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Sending request...");
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_sendBtn_click",ex);
}
}
function acceptRequestDialogue_binding_trackOffBtn_click(_1c){
try{
_1c.turnOn();
this.dialogueFrame.getWidget("trackAcqBtn").turnOff();
this.dialogueFrame.getWidget("trackFriendBtn").turnOff();
this.dialogueFrame.getWidget("trackTrustBtn").turnOff();
this.currentStatus=_1c.getValue();
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_trackOffBtn_click",ex);
}
}
function acceptRequestDialogue_binding_trackAcqBtn_click(_1d){
try{
_1d.turnOn();
this.dialogueFrame.getWidget("trackOffBtn").turnOff();
this.dialogueFrame.getWidget("trackFriendBtn").turnOff();
this.dialogueFrame.getWidget("trackTrustBtn").turnOff();
this.currentStatus=_1d.getValue();
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_trackAcqBtn_click",ex);
}
}
function acceptRequestDialogue_binding_trackFriendBtn_click(_1e){
try{
_1e.turnOn();
this.dialogueFrame.getWidget("trackAcqBtn").turnOff();
this.dialogueFrame.getWidget("trackOffBtn").turnOff();
this.dialogueFrame.getWidget("trackTrustBtn").turnOff();
this.currentStatus=_1e.getValue();
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_trackFriendBtn_click",ex);
}
}
function acceptRequestDialogue_binding_trackTrustBtn_click(_1f){
try{
_1f.turnOn();
this.dialogueFrame.getWidget("trackAcqBtn").turnOff();
this.dialogueFrame.getWidget("trackFriendBtn").turnOff();
this.dialogueFrame.getWidget("trackOffBtn").turnOff();
this.currentStatus=_1f.getValue();
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_trackTrustBtn_click",ex);
}
}
function acceptRequestDialogue_binding_trackStatusLink_click(){
try{
var d=new this.SYSTEM.Dialogue.TrackStatusInfo(this.application);
}
catch(ex){
jsExDebug("acceptRequestDialogue_binding_trackStatusLink_click",ex);
}
}

try{
colourPickDialogue_t.prototype=new systemApplication_t();
colourPickDialogue_t.prototype.constructor=colourPickDialogue_t;
colourPickDialogue_t.prototype.colourPickDialogue_super=systemApplication_t.prototype.constructor;
colourPickDialogue_t.prototype.cleanUp=colourPickDialogue_cleanUp;
colourPickDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
colourPickDialogue_t.prototype.setPosition=colourPickDialogue_setPosition;
colourPickDialogue_t.prototype.dialogueFrame__onClose=colourPickDialogue_dialogueFrame__onClose;
colourPickDialogue_t.prototype.binding_colourChooser_click=colourPickDialogue_binding_colourChooser_click;
colourPickDialogue_t.prototype.DIALOGUE_WIDTH=400;
colourPickDialogue_t.prototype.DIALOGUE_HEIGHT=400;
colourPickDialogue_t.prototype.COLOUR_CELLS=20;
colourPickDialogue_t.prototype.OTHER_COLOURS_HEIGHT=0;
colourPickDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("colourPickDialogue_t.prototype",ex);
}
function colourPickDialogue_t(_1,_2){
try{
this.colourPickDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
var _3=new this.SYSTEM.Frame.Window("dialogueFrame","ColourPick",this,this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_3.setFixedDimensions(this.DIALOGUE_WIDTH,this.DIALOGUE_HEIGHT);
var _4=this.SYSTEM.Widget;
var _5=_3.getInternalWidth();
var _6=new _4.ColourChooser("colourChooser",this.COLOUR_CELLS,this.COLOUR_CELLS,_5,_3.getInternalHeight()-this.OTHER_COLOURS_HEIGHT,false);
_3.addWidget(_6,_3.leftEdgeWidth,_3.topEdgeHeight);
this.colourChooser=_6;
this.dialogueFrame=_3;
_3.show();
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
this.completionDelegate=_2;
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("colourPickDialogue_t",ex);
}
}
function colourPickDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
if(me.completionDelegate){
me.completionDelegate.invoke(me.selectedColour);
me.completionDelegate.cleanUp();
me.completionDelegate=null;
}
me.colourChooser=null;
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("colourPickDialogue_cleanUp",ex);
}
}
function colourPickDialogue_setPosition(_8,_9){
try{
if(this.dialogueFrame){
this.dialogueFrame.setPosition(_8,_9);
}
}
catch(ex){
jsExDebug("colourPickDialogue_setPosition",ex);
}
}
function colourPickDialogue_dialogueFrame__onClose(_a){
try{
this.selectedColour=null;
this.cleanUp();
}
catch(ex){
jsExDebug("colourPickDialogue_dialogueFrame__onClose",ex);
}
}
function colourPickDialogue_binding_colourChooser_click(_b){
try{
this.selectedColour=_b.selectedColour;
this.cleanUp();
}
catch(ex){
jsExDebug("colourPickDialogue_binding_colourChooser_click",ex);
}
}

try{
timelineZoomDialogue_t.prototype=new systemApplication_t();
timelineZoomDialogue_t.prototype.constructor=timelineZoomDialogue_t;
timelineZoomDialogue_t.prototype.timelineZoomDialogue_super=systemApplication_t.prototype.constructor;
timelineZoomDialogue_t.prototype.cleanUp=timelineZoomDialogue_cleanUp;
timelineZoomDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
timelineZoomDialogue_t.prototype.hideOkButton=timelineZoomDialogue_hideOkButton;
timelineZoomDialogue_t.prototype.setPosition=timelineZoomDialogue_setPosition;
timelineZoomDialogue_t.prototype.dialogueFrame__onClose=timelineZoomDialogue_dialogueFrame__onClose;
timelineZoomDialogue_t.prototype.binding_okBtn_click=timelineZoomDialogue_binding_okBtn_click;
timelineZoomDialogue_t.prototype.binding_dontShowCheck_valueChange=timelineZoomDialogue_binding_dontShowCheck_valueChange;
timelineZoomDialogue_t.prototype.DIALOGUE_WIDTH=570;
timelineZoomDialogue_t.prototype.DIALOGUE_HEIGHT=200;
timelineZoomDialogue_t.prototype.OK_WIDTH=20;
timelineZoomDialogue_t.prototype.TEXT_BOTTOM=40;
timelineZoomDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
timelineZoomDialogue_t.prototype.TL_ZOOMIN_CANCEL_IMG="img/app/app/map/icons/cancel";
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function timelineZoomDialogue_t(_1,_2){
try{
this.timelineZoomDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=this.DIALOGUE_WIDTH;
this.height=this.DIALOGUE_HEIGHT;
var _3=new this.SYSTEM.Frame.Window("dialogueFrame",_1.APP_NAME,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_3.setMinimumSize(this.width,this.height);
_3.setMaximumSize(this.width,this.height);
_3.setDimensions(this.width,this.height);
this.text="<b>Zoom Instructions:</b><p>"+"A grey box will appear over the timeline. Move your mouse over the timeline to choose where to 'zoom' in, "+"the box will follow (centred on your mouses location). <br/>"+"If your mouse has a scroll wheel use it to change the "+"size of the box, this changes the size of the time period. </p>"+"To cancel, click the <img src =\""+this.TL_ZOOMIN_CANCEL_IMG+"_off.png\"/> button.";
var _4=_3.leftEdgeWidth+5;
var _5=document.createElement("div");
_5.style.position="absolute";
_5.style.left=_4+"px";
_5.style.top=_3.topEdgeHeight+"px";
_5.style.width=(this.width-(_4+_3.leftEdgeWidth))+"px";
_5.style.height=(this.height-(this.TEXT_BOTTOM+_3.topEdgeHeight))+"px";
_5.style.overflow="hidden";
_5.className="boxcontent";
_5.innerHTML=this.text;
_3.windowDiv.appendChild(_5);
var _6=new this.SYSTEM.Widget.Checkbox("dontShowCheck");
_6.allowLabel("Don't show me again",_6.LABEL_RIGHT,150);
var _7=new this.SYSTEM.Widget.TextButton("okBtn",50,"OK");
this.dialogueFrame=_3;
this.textDiv=_5;
this.okBtn=_7;
this.actionDelegate=_2;
_3.addWidget(_6,_3.leftEdgeWidth+200,_3.bottomEdgeHeight,true,true);
_3.addWidget(_7,_3.leftEdgeWidth,_3.bottomEdgeHeight,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_3.show();
}
catch(ex){
jsExDebug("timelineZoomDialogue_t",ex);
}
}
function timelineZoomDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textDiv=null;
me.okBtn=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("timelineZoomDialogue_cleanUp",ex);
}
}
function timelineZoomDialogue_hideOkButton(){
try{
this.okBtn.hide();
if(this.textDiv){
this.textDiv.style.height=(this.height-(this.dialogueFrame.topEdgeHeight))+"px";
}
}
catch(ex){
jsExDebug("timelineZoomDialogue_hideOkButton",ex);
}
}
function timelineZoomDialogue_setPosition(_9,_a){
try{
this.dialogueFrame.setPosition(_9,_a);
}
catch(ex){
jsExDebug("timelineZoomDialogue_setPosition",ex);
}
}
function timelineZoomDialogue_dialogueFrame__onClose(_b){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("timelineZoomDialogue_dialogueFrame__onClose",ex);
}
}
function timelineZoomDialogue_binding_okBtn_click(_c){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(null,this);
}
this.cleanUp();
}
catch(ex){
jsExDebug("timelineZoomDialogue_binding_okBtn_click",ex);
}
}
function timelineZoomDialogue_binding_dontShowCheck_valueChange(_d){
try{
this.SYSTEM.Settings.set("map_timeline_zoom_help",(_d.isChecked()?0:1));
this.SYSTEM.Settings.commit();
}
catch(ex){
jsExDebug("timelineZoomDialogue_binding_dontShowCheck_valueChange",ex);
}
}

try{
moderateDialogue_t.prototype=new systemApplication_t();
moderateDialogue_t.prototype.constructor=moderateDialogue_t;
moderateDialogue_t.prototype.moderateDialogue_super=systemApplication_t.prototype.constructor;
moderateDialogue_t.prototype.cleanUp=moderateDialogue_cleanUp;
moderateDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
moderateDialogue_t.prototype.setPosition=moderateDialogue_setPosition;
moderateDialogue_t.prototype.dialogueFrame__onClose=moderateDialogue_dialogueFrame__onClose;
moderateDialogue_t.prototype.binding_okBtn_click=moderateDialogue_binding_okBtn_click;
moderateDialogue_t.prototype.DIALOGUE_WIDTH=400;
moderateDialogue_t.prototype.DIALOGUE_HEIGHT=290;
moderateDialogue_t.prototype.OK_WIDTH=20;
moderateDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function moderateDialogue_t(_1,_2,_3,_4,_5){
try{
this.moderateDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
var _6="";
var _7=[];
var _8="";
switch(_2){
case "point":
_6="PeepelPoint";
_8="Moderate Point";
_7.push({value:0,text:"Name/description is offsensive"});
break;
}
this.width=this.DIALOGUE_WIDTH;
this.height=this.DIALOGUE_HEIGHT;
var _9=new this.SYSTEM.Frame.Window("dialogueFrame",_8,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_9.setFixedDimensions(this.width,this.height);
this.type=_2;
this.itemId=_3;
this.extraInfo=_5;
var _a=this.SYSTEM.Widget;
var _b=new _a.Label("instructionLabel",["To mark a ",_6," as offensive/unnecessary please leave a reason and then click 'OK'."].join(""));
_b.setDimensions(_9.getInternalWidth(this.DIALOGUE_WIDTH));
var _c=new _a.Label("commentLabel","Reason (Optional)");
var _d=new _a.Text("commentText",true);
_d.setDimensions(_9.getInternalWidth(this.width),80);
var _e=new _a.TextButton("okBtn",60,"Send");
this.dialogueFrame=_9;
this.actionDelegate=_4;
_9.addWidget(_b,_9.leftEdgeWidth,_9.topEdgeHeight);
_9.addWidget(_c,_9.leftEdgeWidth,_b.positionY+_b.getClientHeight()+10);
_9.addWidget(_d,_9.leftEdgeWidth,_c.positionY+20);
_9.addWidget(_e,_9.rightEdgeWidth,_9.bottomEdgeHeight,true,true);
_9.setFixedDimensions(this.width,_d.positionY+_d.getClientHeight()+_e.height+(2*this.pad));
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_9.show();
}
catch(ex){
jsExDebug("moderateDialogue_t",ex);
}
}
function moderateDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.type=null;
me.itemId=null;
me.extraInfo=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("moderateDialogue_cleanUp",ex);
}
}
function moderateDialogue_setPosition(_10,_11){
try{
this.dialogueFrame.setPosition(_10,_11);
}
catch(ex){
jsExDebug("moderateDialogue_setPosition",ex);
}
}
function moderateDialogue_dialogueFrame__onClose(_12){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("moderateDialogue_dialogueFrame__onClose",ex);
}
}
function moderateDialogue_binding_okBtn_click(_13){
function response(_14){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(_14);
}
this.SYSTEM.Tooltip.hideLoading();
this.cleanUp();
}
catch(ex){
jsExDebug("moderateDialogue_binding_okBtn_click",ex);
}
}
function tooltipTimeout(){
try{
switch(this.type){
case "point":
var _15=this.dialogueFrame.getWidget("commentText").getContent();
this.SYSTEM.PeepelPoints.moderatePoint(this.itemId,_15,this.extraInfo,new this.SYSTEM.Delegate(this,response));
break;
}
}
catch(ex){
jsExDebug("moderateDialogue_binding_okBtn_click: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Sending moderation...");
}
catch(ex){
jsExDebug("moderateDialogue_binding_okBtn_click",ex);
}
}

try{
inviteDialogue_t.prototype=new systemApplication_t();
inviteDialogue_t.prototype.constructor=inviteDialogue_t;
inviteDialogue_t.prototype.inviteDialogue_super=systemApplication_t.prototype.constructor;
inviteDialogue_t.prototype.cleanUp=inviteDialogue_cleanUp;
inviteDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
inviteDialogue_t.prototype.setPosition=inviteDialogue_setPosition;
inviteDialogue_t.prototype.setQuickLinkData=inviteDialogue_setQuickLinkData;
inviteDialogue_t.prototype.frame__onClose=inviteDialogue_frame__onClose;
inviteDialogue_t.prototype.binding_sendBtn_click=inviteDialogue_binding_sendBtn_click;
inviteDialogue_t.prototype.inviteResponse=inviteDialogue_inviteResponse;
inviteDialogue_t.prototype.getMessageText=inviteDialogue_getMessageText;
inviteDialogue_t.prototype.DIALOGUE_WIDTH=500;
inviteDialogue_t.prototype.DIALOGUE_HEIGHT=350;
inviteDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
inviteDialogue_t.prototype.ACTION_INVITE_USER=13;
inviteDialogue_t.prototype.ACTION_COLLABORATION_INVITE=14;
inviteDialogue_t.prototype.ACTION_INVITE_QUICK_LINK=16;
inviteDialogue_t.prototype.SERVICE_PATH="peepel_services.php?service=user";
}
catch(ex){
jsExDebug("inviteDialogue_t.prototype",ex);
}
function inviteDialogue_t(_1,_2,_3,_4){
try{
this.inviteDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=this.DIALOGUE_WIDTH;
this.height=this.DIALOGUE_HEIGHT;
var _5=new this.SYSTEM.Frame.Window("frame","Invitation",this,this.width,this.height,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_5.setFixedDimensions(this.width,this.height);
var w=this.SYSTEM.Widget;
var _7=new w.Label("helpLabel");
_7.setDimensions(_5.getInternalWidth(this.width));
var _8=new w.Text("peepelText",true);
_8.setDimensions(_5.getInternalWidth(this.width),100);
var _9=!_2||_3==this.ACTION_INVITE_QUICK_LINK;
if(_9){
var _a=new w.Label("emailLabel","Email address");
var _b=new w.Text("emailText");
}
switch(_3){
case this.ACTION_INVITE_USER:
if(_2){
_7.setText("The email address '"+_2+"' does not belong to a Peepel user. "+"To invite the owner of the email address to Peepel type in a message you would "+"like them to receive and click 'Send'. We will send an email to the address with the following invitation.");
}else{
_7.setText("To invite a user to Peepel type in their email and a message you would like "+"them to receive and click 'Send'. We will send an email to the address with the following invitation.");
}
_8.setContent("You have been invited to use Peepel.com by "+this.SYSTEM.UserDetails.userName+". An account has been created for you, click on the link below to go to Peepel.com "+"and start using it!\n\n "+this.SYSTEM.UserDetails.userName+" says ");
break;
case this.ACTION_COLLABORATION_INVITE:
_7.setText("The email address '"+_2+"' does not belong to a Peepel user. "+"To share the file with and invite the owner of the email address to Peepel type in a message you would "+"like them to receive and click 'Send'. We will send an email to the address with the following invitation.");
_8.setContent("You have been invited to use Peepel.com by "+this.SYSTEM.UserDetails.userName+", they have shared a document with you. An account has been created for you, click "+"on the link below to go to Peepel.com and start collaborating!\n\n "+this.SYSTEM.UserDetails.userName+" says ");
break;
case this.ACTION_INVITE_QUICK_LINK:
_7.setText("The following email addresses do not belong to a user. Type in their email and a message you would like "+"them to receive and click 'Send'. We will send an email to the address containing the following invitation, as well as the quick link.");
_8.setContent("You have been invited to use Peepel.com by "+this.SYSTEM.UserDetails.userName+". An account has been created for you, click on the link below to go to Peepel.com "+"and start using it!\n\n "+this.SYSTEM.UserDetails.userName+" says ");
_b.setContent(_2.join(", "));
break;
}
var _c=new w.Label("messageLabel","Your message:");
var _d=new w.Text("messageText",true);
_d.setDimensions(_5.getInternalWidth(this.width),68);
var _e=new w.TextButton("sendBtn",50,"Send");
_5.addWidget(_7,_5.leftEdgeWidth,_5.topEdgeHeight);
var _f=this.SYSTEM.Style.WIDGET_PADDING;
if(_9){
_5.addWidget(_a,_5.leftEdgeWidth,_5.topEdgeHeight+_7.getClientHeight()+_f);
_5.addWidget(_b,_a.positionX+_a.getClientWidth()+(2*_f),_a.positionY);
_b.setDimensions(_5.getInternalWidth()-_b.positionX);
}
_5.addWidget(_8,_5.leftEdgeWidth,(_9?_b.positionY+30:_5.topEdgeHeight+_7.getClientHeight()+_f));
_5.addWidget(_c,_5.leftEdgeWidth,_8.positionY+_8.height+_f);
_5.addWidget(_d,_5.leftEdgeWidth,_c.positionY+_c.getClientHeight()+_f);
_5.addWidget(_e,_5.leftEdgeWidth,_5.bottomEdgeHeight,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_5.setFixedDimensions(this.width,_d.positionY+_d.height+_f+_e.height+_5.bottomEdgeHeight);
_5.show();
this.frame=_5;
this.action=_3;
this.email=_2;
this.completionDelegate=_4;
}
catch(ex){
jsExDebug("inviteDialogue_t",ex);
}
}
function inviteDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.frame=null;
me.email=null;
me.action=null;
me.quickLinkData=null;
if(me.completionDelegate){
me.completionDelegate.invoke();
me.completionDelegate.cleanUp();
}
me.completionDelegate=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("inviteDialogue_cleanUp",ex);
}
}
function inviteDialogue_setPosition(_11,_12){
try{
if(this.frame){
this.frame.setPosition(_11,_12);
}
}
catch(ex){
jsExDebug("inviteDialogue_setPosition",ex);
}
}
function inviteDialogue_setQuickLinkData(_13){
try{
this.quickLinkData=escape(_13);
}
catch(ex){
jsExDebug("inviteDialogue_setQuickLinkData",ex);
}
}
function inviteDialogue_frame__onClose(_14){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("inviteDialogue_frame__onClose",ex);
}
}
function inviteDialogue_binding_sendBtn_click(_15){
function tooltipTimeout(){
try{
switch(this.action){
case this.ACTION_INVITE_USER:
case this.ACTION_COLLABORATION_INVITE:
case this.ACTION_INVITE_QUICK_LINK:
var _16=(this.email?this.email:this.frame.getWidget("emailText").getContent());
if(_16){
this.SYSTEM.Network.request(this.SERVICE_PATH+"&action="+this.ACTION_INVITE_USER,"&peepel_email="+_16+"&message="+this.getMessageText()+(this.quickLinkData?"&quick_link="+this.quickLinkData:""),this.inviteResponse,this);
}else{
this.SYSTEM.Tooltip.hideLoading();
}
break;
default:
this.SYSTEM.Tooltip.hideLoading();
}
}
catch(ex){
jsExDebug("inviteDialogue_binding_sendBtn_click: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Sending invitation...");
}
catch(ex){
jsExDebug("inviteDialogue_binding_sendBtn_click",ex);
}
}
function inviteDialogue_inviteResponse(xml,me){
try{
me.SYSTEM.Tooltip.hideLoading();
if(getChildNode(xml,"bademail",0)){
var d=new me.SYSTEM.Dialogue.Error(me.application,"Invitation","The email you supplied is already in use by a peepel user.");
}else{
me.cleanUp();
}
}
catch(ex){
jsExDebug("inviteDialogue_inviteResponse",ex);
}
}
function inviteDialogue_getMessageText(){
try{
return escape(this.frame.getWidget("peepelText").getContent()+"\""+this.frame.getWidget("messageText").getContent()+"\"");
}
catch(ex){
jsExDebug("inviteDialogue_getMessageText",ex);
}
}

try{
quickLinkSendDialogue_t.prototype=new systemApplication_t();
quickLinkSendDialogue_t.prototype.constructor=quickLinkSendDialogue_t;
quickLinkSendDialogue_t.prototype.quickLinkSendDialogue_super=systemApplication_t.prototype.constructor;
quickLinkSendDialogue_t.prototype.cleanUp=quickLinkSendDialogue_cleanUp;
quickLinkSendDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
quickLinkSendDialogue_t.prototype.close=quickLinkSendDialogue_close;
quickLinkSendDialogue_t.prototype.setPosition=quickLinkSendDialogue_setPosition;
quickLinkSendDialogue_t.prototype.frame__onClose=quickLinkSendDialogue_frame__onClose;
quickLinkSendDialogue_t.prototype.binding_usersAddBtn_click=quickLinkSendDialogue_binding_usersAddBtn_click;
quickLinkSendDialogue_t.prototype.binding_usersRemoveBtn_click=quickLinkSendDialogue_binding_usersRemoveBtn_click;
quickLinkSendDialogue_t.prototype.binding_okBtn_click=quickLinkSendDialogue_binding_okBtn_click;
quickLinkSendDialogue_t.prototype.keyDownEvent=quickLinkSendDialogue_keyDownEvent;
quickLinkSendDialogue_t.prototype.createFrame=quickLinkSendDialogue_createFrame;
quickLinkSendDialogue_t.prototype.refreshContacts=quickLinkSendDialogue_refreshContacts;
quickLinkSendDialogue_t.prototype.error=quickLinkSendDialogue_error;
quickLinkSendDialogue_t.prototype.okAlert=quickLinkSendDialogue_okAlert;
quickLinkSendDialogue_t.prototype.getEmailText=quickLinkSendDialogue_getEmailText;
quickLinkSendDialogue_t.prototype.getSelectIndex=quickLinkSendDialogue_getSelectIndex;
quickLinkSendDialogue_t.prototype.hideInterface=quickLinkSendDialogue_hideInterface;
quickLinkSendDialogue_t.prototype.showInterface=quickLinkSendDialogue_showInterface;
quickLinkSendDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
quickLinkSendDialogue_t.prototype.WIDTH=480;
quickLinkSendDialogue_t.prototype.HEIGHT=320;
quickLinkSendDialogue_t.prototype.EMAIL_TEXT_WIDTH=120;
quickLinkSendDialogue_t.prototype.CONTACT_WIDTH=160;
quickLinkSendDialogue_t.prototype.CONTACT_HEIGHT=250;
quickLinkSendDialogue_t.prototype.SELECT_WIDTH=135;
quickLinkSendDialogue_t.prototype.SELECT_HEIGHT=110;
quickLinkSendDialogue_t.prototype.HIDDEN_LBL_WIDTH=150;
quickLinkSendDialogue_t.prototype.CONTACT_TOP=30;
quickLinkSendDialogue_t.prototype.READ_ADD_LEFT=185;
quickLinkSendDialogue_t.prototype.READ_REM_LEFT=405;
quickLinkSendDialogue_t.prototype.READ_REM_TOP=quickLinkSendDialogue_t.prototype.CONTACT_TOP;
quickLinkSendDialogue_t.prototype.READ_LEFT=255;
quickLinkSendDialogue_t.prototype.READ_LBL_LEFT=255;
quickLinkSendDialogue_t.prototype.READ_LBL_TOP=10;
quickLinkSendDialogue_t.prototype.HIDDEN_LBL_LEFT=180;
quickLinkSendDialogue_t.prototype.HIDDEN_LBL_TOP=150;
}
catch(ex){
jsExDebug("quickLinkSendDialogue_t.prototype",ex);
}
function quickLinkSendDialogue_t(_1,_2,_3){
try{
this.quickLinkSendDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.closeDelegate=_3;
this.quickLink=escape(_2);
this.createFrame();
this.refreshContacts();
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
this.frame.show();
}
catch(ex){
jsExDebug("quickLinkSendDialogue_t",ex);
}
}
function quickLinkSendDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.unregisterKeyPressOverride(me.keyDownEvent);
me.frame=null;
me.emailLabel=null;
me.emailText=null;
me.contactSelect=null;
me.usersLabel=null;
me.usersSelect=null;
me.usersAddBtn=null;
me.usersRemoveBtn=null;
me.quickLink=null;
if(me.closeDelegate){
me.closeDelegate.invoke();
me.closeDelegate.cleanUp();
me.closeDelegate=null;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application_cleanUp();
}
catch(ex){
jsExDebug("quickLinkSendDialogue_t",ex);
}
}
function quickLinkSendDialogue_close(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("quickLinkSendDialogue_close",ex);
}
}
function quickLinkSendDialogue_setPosition(_5,_6){
try{
this.frame.setPosition(_5,_6);
}
catch(ex){
jsExDebug("quickLinkSendDialogue_setPosition",ex);
}
}
function quickLinkSendDialogue_createFrame(){
try{
var _7=new this.SYSTEM.Frame.Window("frame","Send Quick Link to Users",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var _8=new this.SYSTEM.Widget.Label("emailLabel");
_8.setText("Email address");
var _9=new this.SYSTEM.Widget.Text("emailText");
_9.setWidth(this.EMAIL_TEXT_WIDTH);
var _a=new this.SYSTEM.Widget.SelectList("contactSelect");
_a.setDimensions(this.CONTACT_WIDTH,_7.getInternalHeight(this.HEIGHT)-this.CONTACT_TOP);
_a.allowStartVisible();
_a.allowBorder("#AAAAAA");
_a.align(_a.LEFT_ALIGN);
_a.allowSelect(_a.MULTIPLE_SELECT);
_a.disallowItemTextPadding();
var _b=new this.SYSTEM.Widget.Label("usersLabel");
_b.setText("Users (*=Requires invitation)");
var _c=new this.SYSTEM.Widget.SelectList("usersSelect");
_c.setDimensions(this.SELECT_WIDTH,_a.height);
_c.allowStartVisible();
_c.allowBorder("#AAAAAA");
_c.allowSelect(_c.MULTIPLE_SELECT);
_c.disallowItemTextPadding();
_c.align(_c.LEFT_ALIGN);
var _d=new this.SYSTEM.Widget.TextButton("usersAddBtn",60,"Add");
var _e=new this.SYSTEM.Widget.TextButton("usersRemoveBtn",60,"Remove");
var _f=new this.SYSTEM.Widget.TextButton("okBtn",50,"Send");
var _10=new this.SYSTEM.Widget.Label("sharedLabel");
_10.setDimensions(this.HIDDEN_LBL_WIDTH);
_10.hide();
var _11=_7.leftEdgeWidth;
var top=_7.topEdgeHeight;
_7.addWidget(_8,_11,top+this.READ_LBL_TOP);
_7.addWidget(_9,_11+_8.getClientWidth()+this.pad,top+this.READ_LBL_TOP-this.pad);
_7.addWidget(_a,_11,top+this.CONTACT_TOP);
_7.addWidget(_b,_11+this.CONTACT_WIDTH+this.pad+_d.width+this.pad,top+this.READ_LBL_TOP);
_7.addWidget(_c,_b.positionX,top+this.CONTACT_TOP);
_7.addWidget(_d,_11+this.CONTACT_WIDTH+this.pad,top+this.CONTACT_TOP);
_7.addWidget(_e,_7.rightEdgeWidth,top+this.READ_REM_TOP,true);
_7.addWidget(_f,_11,_7.bottomEdgeHeight,true,true);
_7.addWidget(_10,_11+this.HIDDEN_LBL_LEFT,top+this.HIDDEN_LBL_TOP);
this.frame=_7;
this.emailLabel=_8;
this.emailText=_9;
this.contactSelect=_a;
this.okBtn=_f;
this.hiddenLabel=_10;
this.usersLabel=_b;
this.usersSelect=_c;
this.usersAddBtn=_d;
this.usersRemoveBtn=_e;
this.SYSTEM.Event.registerKeyPressOverride(this.keyDownEvent,this);
_7.setFixedDimensions(_c.positionX+_c.width+_e.positionX+_e.width+_7.rightEdgeWidth,this.HEIGHT);
}
catch(ex){
jsExDebug("quickLinkSendDialogue_createFrame",ex);
}
}
function quickLinkSendDialogue_refreshContacts(){
function refreshCallback(){
try{
var _13=this.SYSTEM.Contacts.getAcceptedContacts();
for(var i=0;i<_13.length;i++){
this.contactSelect.addItem(_13[i],_13[i].getUserName());
}
}
catch(ex){
jsExDebug("quickLinkSendDialogue_refreshContacts: refreshCallback",ex);
}
}
try{
this.SYSTEM.Contacts.refresh(new this.SYSTEM.Delegate(this,refreshCallback));
}
catch(ex){
jsExDebug("quickLinkSendDialogue_refreshContacts",ex);
}
}
function quickLinkSendDialogue_error(msg,_16,_17){
try{
var _18=new this.SYSTEM.Dialogue.Error(null,"Share with Contacts",msg,_16,_17);
}
catch(ex){
jsExDebug("quickLinkSendDialogue_error",ex);
}
}
function quickLinkSendDialogue_okAlert(msg,_1a,_1b){
try{
var _1c=new this.SYSTEM.Dialogue.OkAlert(null,"Share with Contacts",msg,_1a,_1b);
}
catch(ex){
jsExDebug("quickLinkSendDialogue_okAlert",ex);
}
}
function quickLinkSendDialogue_getEmailText(_1d){
try{
return "<i>"+_1d+"</i>";
}
catch(ex){
jsExDebug("quickLinkSendDialogue_getEmailText",ex);
}
}
function quickLinkSendDialogue_getSelectIndex(_1e,_1f,_20){
try{
for(i=0;i<_1e.items.length;i++){
if(_1e.items[i]){
var _21=_1e.items[i].value;
if(_1f&&_21.isContact&&_21.userId==_1f){
return i;
}else{
if(_20&&!_21.isContact&&_21.email==_20){
return i;
}
}
}
}
return null;
}
catch(ex){
jsExDebug("quickLinkSendDialogue_getSelectIndex",ex);
}
}
function quickLinkSendDialogue_hideInterface(msg){
try{
this.usersLabel.hide();
this.usersSelect.hide();
this.usersAddBtn.hide();
this.usersRemoveBtn.hide();
this.emailLabel.hide();
this.emailText.hide();
this.contactSelect.hide();
this.hiddenLabel.show();
this.hiddenLabel.setText(msg);
this.stateInterfaceVisible=false;
}
catch(ex){
jsExDebug("quickLinkSendDialogue_hideInterface",ex);
}
}
function quickLinkSendDialogue_showInterface(){
try{
if(this.stateInterfaceVisible){
return;
}
this.usersLabel.show();
this.usersSelect.show();
this.usersAddBtn.show();
this.usersRemoveBtn.show();
this.emailLabel.show();
this.emailText.show();
this.contactSelect.show();
this.hiddenLabel.hide();
this.stateInterfaceVisible=true;
}
catch(ex){
jsExDebug("quickLinkSendDialogue_showInterface",ex);
}
}
function quickLinkSendDialogue_frame__onClose(_23){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("quickLinkSendDialogue_frame__onClose",ex);
}
}
function quickLinkSendDialogue_binding_okBtn_click(){
function sendInvitations(){
try{
var d=new this.SYSTEM.Dialogue.Invite(this.application,_25,inviteDialogue_t.prototype.ACTION_INVITE_QUICK_LINK,new this.SYSTEM.Delegate(this,inviteCallback));
d.setQuickLinkData(this.quickLink);
}
catch(ex){
jsExDebug("quickLinkSendDialogue_binding_okBtn_click: sendInvitations",ex);
}
}
function inviteCallback(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("quickLinkSendDialogue_binding_okBtn_click: inviteCallback",ex);
}
}
function sendResponse(xml,me){
try{
if(getNodeValue(xml,"success")=="0"){
if(_25.length){
sendInvitations.call(me);
}else{
me.cleanUp();
}
}else{
var d=new me.SYSTEM.Dialogue.Error(me.application,"Error","An error occured sending the quick link to those users.");
}
}
catch(ex){
jsExDebug("quickLinkSendDialogue_binding_okBtn_click: sendResponse",ex);
}
}
try{
var _29=this.usersSelect.items;
var _2a=null;
var _25=[];
var _2b=[];
for(var i=0;i<_29.length;i++){
_2a=_29[i].value;
if(_2a&&_2a.email){
if(_2a.requiresInvite){
_25.push(_2a.email);
}else{
_2b.push(_2a.email);
}
}
}
if(_2b.length){
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action=14","peepel_email="+_2b.join()+"&quick_link="+this.quickLink+"&peepel_username="+this.SYSTEM.UserDetails.userName,sendResponse,this);
}else{
sendInvitations.call(this);
}
}
catch(ex){
jsExDebug("quickLinkSendDialogue_binding_okBtn_click",ex);
}
}
function quickLinkSendDialogue_keyDownEvent(_2d,me){
return;
}
function quickLinkSendDialogue_binding_usersAddBtn_click(){
function emailCheckResponse(xml,me){
try{
var _31=getNodeValue(xml,"avail");
switch(_31){
case "true":
_31=true;
break;
case "false":
default:
_31=false;
}
if(_31){
me.usersSelect.addItem({isContact:false,email:_32,requiresInvite:true},me.getEmailText(_32)+"*");
}else{
me.usersSelect.addItem({isContact:false,email:_32,requiresInvite:false},me.getEmailText(_32));
}
me.emailText.clearContent();
}
catch(ex){
jsExDebug("quickLinkSendDialogue_binding_usersAddBtn_click: emailCheckResponse",ex);
}
}
try{
if(!this.quickLink){
return;
}
var _32=this.emailText.getContent();
if(_32){
if(this.getSelectIndex(this.usersSelect,null,_32)==null){
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action=12","peepel_email="+secureStringForRequest(_32),emailCheckResponse,this);
}
}else{
var _33=this.contactSelect.getSelectedValues();
if(_33){
for(var i=0;i<_33.length;i++){
var _35=_33[i].userId;
if(this.getSelectIndex(this.usersSelect,_35)==null){
this.usersSelect.addItem({isContact:true,userId:_33[i].userId,email:_33[i].email},_33[i].getUserName());
}else{
_33[i]=null;
delete _33[i];
}
this.contactSelect.deselectAll();
}
}
}
}
catch(ex){
jsExDebug("quickLinkSendDialogue_binding_usersAddBtn_click",ex);
}
}
function quickLinkSendDialogue_binding_usersRemoveBtn_click(){
try{
var _36=this.usersSelect.getSelectedIndexes();
for(var i=0;i<_36.length;i++){
this.usersSelect.removeItem(_36[i]);
}
}
catch(ex){
jsExDebug("quickLinkSendDialogue_binding_usersRemoveBtn_click",ex);
}
}

try{
changePasswordDialogue_t.prototype=new systemApplication_t();
changePasswordDialogue_t.prototype.constructor=changePasswordDialogue_t;
changePasswordDialogue_t.prototype.changePasswordDialogue_super=systemApplication_t.prototype.constructor;
changePasswordDialogue_t.prototype.cleanUp=changePasswordDialogue_cleanUp;
changePasswordDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
changePasswordDialogue_t.prototype.setPosition=changePasswordDialogue_setPosition;
changePasswordDialogue_t.prototype.frame__onClose=changePasswordDialogue_frame__onClose;
changePasswordDialogue_t.prototype.binding_saveBtn_click=changePasswordDialogue_binding_saveBtn_click;
changePasswordDialogue_t.prototype.binding_cancelBtn_click=changePasswordDialogue_binding_cancelBtn_click;
changePasswordDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
changePasswordDialogue_t.prototype.APP_NAME="Change Password";
changePasswordDialogue_t.prototype.TEXT_WIDTH=160;
}
catch(ex){
jsExDebug("changePasswordDialogue_t.prototype",ex);
}
function changePasswordDialogue_t(_1,_2){
try{
this.changePasswordDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
var _3=this.SYSTEM.UserDetails.isEmailPassUser();
var _4=new this.SYSTEM.Frame.Window("frame",this.APP_NAME,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var wL=this.SYSTEM.Widget;
if(_3){
var _6=new wL.Label("oldPasswordLabel","Old password");
var _7=new wL.Text("oldPasswordText",false,false,true);
_7.setDimensions(this.TEXT_WIDTH);
}
var _8=new wL.Label("newPasswordLabel","New password");
var _9=new wL.Text("newPasswordText",false,false,true);
_9.setDimensions(this.TEXT_WIDTH);
var _a=new wL.Label("confirmPasswordLabel","Confirm password");
var _b=new wL.Text("confirmPasswordText",false,false,true);
_b.setDimensions(this.TEXT_WIDTH);
var _c=new this.SYSTEM.Widget.TabGroup("tabGroup");
if(_3){
_c.addTextWidget(_7);
}
_c.addTextWidget(_9);
_c.addTextWidget(_b);
var _d=new wL.TextButton("saveBtn",120,"Save Password");
var _e=new wL.TextButton("cancelBtn",70,"Cancel");
var _f=120;
var pad=this.SYSTEM.Style.WIDGET_PADDING;
var _11=6*pad;
var _12=_4.leftEdgeWidth+_f+pad;
if(_3){
_4.addWidget(_6,_4.leftEdgeWidth,_4.topEdgeHeight);
_4.addWidget(_7,_12,_6.positionY);
}
_4.addWidget(_8,_4.leftEdgeWidth,_4.topEdgeHeight+_11);
_4.addWidget(_9,_12,_8.positionY);
_4.addWidget(_a,_4.leftEdgeWidth,_8.positionY+_11);
_4.addWidget(_b,_12,_a.positionY);
_4.addWidget(_e,_4.rightEdgeWidth,_4.bottomEdgeHeight,true,true);
_4.addWidget(_d,_e.positionX+_e.width+pad,_4.bottomEdgeHeight,true,true);
_4.addWidget(_c,0,0);
this.application=_1;
this.actionDelegate=_2;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_4.setFixedDimensions(_12+this.TEXT_WIDTH+_4.rightEdgeWidth,_4.topEdgeHeight+_b.positionY+_11+_d.height+_4.bottomEdgeHeight);
_4.show();
this.frame=_4;
this.emailPassUserFlag=_3;
}
catch(ex){
jsExDebug("changePasswordDialogue_t",ex);
}
}
function changePasswordDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.emailPassUserFlag=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.frame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("changePasswordDialogue_cleanUp",ex);
}
}
function changePasswordDialogue_setPosition(_14,_15){
try{
if(this.frame){
this.frame.setPosition(_14,_15);
}
}
catch(ex){
jsExDebug("changePasswordDialogue_setPosition",ex);
}
}
function changePasswordDialogue_frame__onClose(_16){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("changePasswordDialogue_frame__onClose",ex);
}
}
function changePasswordDialogue_binding_saveBtn_click(_17){
function callback(_18,_19){
try{
global_restartTimedServiceRequests();
this.SYSTEM.Workspaces.startDefaultWorkspaceUpdate();
this.SYSTEM.Tooltip.hideLoading();
if(_18){
var _1a=new this.SYSTEM.Dialogue.OkAlert(this.application,this.APP_NAME,"Your password has been saved successfully!");
if(this.actionDelegate){
this.actionDelegate.invoke(true);
}
this.cleanUp();
}else{
var _1b=new this.SYSTEM.Dialogue.Error(this.application,this.APP_NAME,"Your password was not saved, please try again.<br/><b>Errors:</b><br/>"+_19.join("<br/>"));
}
}
catch(ex){
jsExDebug("changePasswordDialogue_binding_saveBtn_click: callback",ex);
}
}
function overwriteCallback(){
try{
callback.call(this,true);
}
catch(ex){
jsExDebug("changePasswordDialogue_binding_saveBtn_click: overwriteCallback",ex);
}
}
function tooltipTimeout(){
try{
if(this.emailPassUserFlag){
this.SYSTEM.Security.updateUserPassword(_1c,_1d,new this.SYSTEM.Delegate(this,callback));
}else{
this.SYSTEM.Security.overwriteNonEmailPassUserPassword(_1d,new this.SYSTEM.Delegate(this,overwriteCallback));
}
}
catch(ex){
jsExDebug("changePasswordDialogue_binding_saveBtn_click: tooltipTimeout",ex);
}
}
try{
var _1d=this.frame.getWidget("newPasswordText").getContent();
var _1e=this.frame.getWidget("confirmPasswordText").getContent();
var _1f=false;
var _20="";
if(this.emailPassUserFlag){
var _1c=this.frame.getWidget("oldPasswordText").getContent();
if(_1c.length<MIN_PASSWORD_LENGTH){
_20+="<li>The old password is too short (min. "+MIN_PASSWORD_LENGTH+").</li>";
_1f=true;
}else{
if(_1c.length>MAX_PASSWORD_LENGTH){
_20+="<li>The old password is too long (max. "+MAX_PASSWORD_LENGTH+").</li>";
_1f=true;
}
}
}
if(_1d.length<MIN_PASSWORD_LENGTH){
_20+="<li>The new password is too short (min. "+MIN_PASSWORD_LENGTH+").</li>";
_1f=true;
}else{
if(_1d.length>MAX_PASSWORD_LENGTH){
_20+="<li>The new password is too long (max. "+MAX_PASSWORD_LENGTH+").</li>";
_1f=true;
}
}
if(_1d!=_1e){
_20+="<li>The new password and password confirmation are not the same.</li>";
_1f=true;
}
if(_1f){
var d=new this.SYSTEM.Dialogue.Error(this.application,this.APP_NAME+" Error","<ul style='padding-left:20px'>"+_20+"</ul>");
}else{
global_stopTimedServiceRequests();
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Saving your new password...");
}
}
catch(ex){
jsExDebug("changePasswordDialogue_binding_saveBtn_click",ex);
}
}
function changePasswordDialogue_binding_cancelBtn_click(_22){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(false);
}
this.cleanUp();
}
catch(ex){
jsExDebug("changePasswordDialogue_binding_cancelBtn_click",ex);
}
}

try{
browserCompatDialogue_t.prototype=new systemApplication_t();
browserCompatDialogue_t.prototype.constructor=browserCompatDialogue_t;
browserCompatDialogue_t.prototype.browserCompatDialogue_super=systemApplication_t.prototype.constructor;
browserCompatDialogue_t.prototype.cleanUp=browserCompatDialogue_cleanUp;
browserCompatDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
browserCompatDialogue_t.prototype.setPosition=browserCompatDialogue_setPosition;
browserCompatDialogue_t.prototype.addWidget=browserCompatDialogue_addWidget;
browserCompatDialogue_t.prototype.show=browserCompatDialogue_show;
browserCompatDialogue_t.prototype.dialogueFrame__onClose=browserCompatDialogue_dialogueFrame__onClose;
browserCompatDialogue_t.prototype.dialogueFrame_keyPress=browserCompatDialogue_dialogueFrame_keyPress;
browserCompatDialogue_t.prototype.binding_okBtn_click=browserCompatDialogue_binding_okBtn_click;
browserCompatDialogue_t.prototype.DIALOGUE_WIDTH=400;
browserCompatDialogue_t.prototype.DIALOGUE_HEIGHT=130;
browserCompatDialogue_t.prototype.BUTTON_BOTTOM=40;
browserCompatDialogue_t.prototype.YES_RIGHT=102;
browserCompatDialogue_t.prototype.NO_RIGHT=52;
browserCompatDialogue_t.prototype.TEXT_RIGHT=20;
browserCompatDialogue_t.prototype.TEXT_BOTTOM=55;
browserCompatDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function browserCompatDialogue_t(_1,_2,_3){
try{
this.browserCompatDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=this.DIALOGUE_WIDTH;
var _4=(_1?_1.APP_NAME:"Browser Compatibility Message");
var _5=new this.SYSTEM.Frame.Window("dialogueFrame",_4,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
this.text=_2;
var _6=document.createElement("div");
_6.style.position="absolute";
_6.style.left=_5.leftEdgeWidth+"px";
_6.style.top=_5.topEdgeHeight+"px";
_6.style.height="auto";
_6.style.width=(this.width-parseFloat(_6.style.left)-_5.rightEdgeWidth)+"px";
_6.style.overflow="hidden";
_6.className="boxcontent";
if(_2){
_6.innerHTML=_2;
}
_5.windowDiv.appendChild(_6);
var w=this.SYSTEM.Widget;
var _8=new w.TextButton("okBtn",40,"OK");
var _9=new w.Checkbox("settingCheckbox");
_9.allowLabel("Don't show me browser compatibility messages",_9.LABEL_RIGHT,_5.getInternalWidth(this.width)-_8.width-this.pad);
_5.setFixedDimensions(this.width,_6.clientHeight+_5.topEdgeHeight+_5.bottomEdgeHeight+_8.height+this.SYSTEM.Style.WIDGET_PADDING);
this.dialogueFrame=_5;
this.textDiv=_6;
this.okBtn=_8;
this.actionDelegate=_3;
_5.addWidget(_8,_5.rightEdgeWidth,_5.bottomEdgeHeight,true,true);
_5.addWidget(_9,_5.leftEdgeWidth,_8.positionY,false,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_5.show();
}
catch(ex){
jsExDebug("okAlertDialog_t",ex);
}
}
function browserCompatDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textDiv=null;
me.okBtn=null;
if(me.actionDelegate){
me.actionDelegate.cleanUp();
me.actionDelegate=null;
}
me.dialogueFrame=null;
if(me.commitDelegate){
me.commitDelegate.cleanUp();
me.commitDelegate=null;
}
me.application_cleanUp();
}
catch(ex){
jsExDebug("browserCompatDialogue_cleanUp",ex);
}
}
function browserCompatDialogue_setPosition(_b,_c){
try{
this.dialogueFrame.setPosition(_b,_c);
}
catch(ex){
jsExDebug("browserCompatDialogue_setPosition",ex);
}
}
function browserCompatDialogue_addWidget(_d,_e,_f,_10,_11){
try{
this.dialogueFrame.addWidget(_d,_e,_f,_10,_11);
}
catch(ex){
jsExDebug("browserCompatDialogue_addWidget",ex);
}
}
function browserCompatDialogue_show(){
try{
this.dialogueFrame.show();
}
catch(ex){
jsExDebug("browserCompatDialogue_show",ex);
}
}
function browserCompatDialogue_dialogueFrame__onClose(_12){
try{
if(this.actionDelegate){
this.actionDelegate.invoke(false);
}
if(this.applicationId){
this.cleanUp();
}
}
catch(ex){
jsExDebug("browserCompatDialogue_dialogueFrame__onClose",ex);
}
}
function browserCompatDialogue_dialogueFrame_keyPress(key){
try{
this.binding_okBtn_click();
}
catch(ex){
jsExDebug("browserCompatDialogue_dialogueFrame_keyPress",ex);
}
}
function browserCompatDialogue_binding_okBtn_click(_14){
function finished(){
try{
if(this.commitDelegate){
var d=new this.SYSTEM.Dialogue.OkAlert(null,"Peepel","Browser compatibility messages have been turned off. If you wish to turn them back on you can do so in the Settings application.");
}
if(this.actionDelegate){
this.actionDelegate.invoke();
}
if(this.applicationId){
this.cleanUp();
}
}
catch(ex){
jsExDebug("browserCompatDialogue_dialogueFrame__onClose",ex);
}
}
try{
if(this.dialogueFrame.getWidget("settingCheckbox").isChecked()){
this.SYSTEM.Settings.set("browser_compat_msgs",0);
this.commitDelegate=new this.SYSTEM.Delegate(this,finished);
this.SYSTEM.Settings.commit(this.commitDelegate);
this.dialogueFrame.hide();
}else{
finished.call(this);
}
}
catch(ex){
jsExDebug("browserCompatDialogue_binding_okBtn_click",ex);
}
}

try{
textDialogue_t.prototype=new systemApplication_t();
textDialogue_t.prototype.constructor=textDialogue_t;
textDialogue_t.prototype.textDialogue_super=systemApplication_t.prototype.constructor;
textDialogue_t.prototype.cleanUp=textDialogue_cleanUp;
textDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
textDialogue_t.prototype.setPosition=textDialogue_setPosition;
textDialogue_t.prototype.dialogueFrame__onClose=textDialogue_dialogueFrame__onClose;
textDialogue_t.prototype.binding_okBtn_click=textDialogue_binding_okBtn_click;
textDialogue_t.prototype.xmlResponse=textDialogue_xmlResponse;
textDialogue_t.prototype.DIALOGUE_WIDTH=400;
textDialogue_t.prototype.DIALOGUE_HEIGHT=220;
textDialogue_t.prototype.OK_RIGHT=55;
textDialogue_t.prototype.OK_WIDTH=20;
textDialogue_t.prototype.OK_BOTTOM=40;
textDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
}
catch(ex){
jsExDebug("textDialogue_t.prototype",ex);
}
function textDialogue_t(_1,_2,_3,_4,_5){
try{
this.textDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.width=(_4?_4:this.DIALOGUE_WIDTH);
this.height=(_5?_5:this.DIALOGUE_HEIGHT);
var _6=(_2?_2:"Text");
var _7=new this.SYSTEM.Frame.Window("dialogueFrame",_6,this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_7.setFixedDimensions(this.width,this.height);
_7.show();
var _8=new this.SYSTEM.Widget.TextButton("okBtn",40,"OK");
var _9=document.createElement("textarea");
_9.style.position="absolute";
_9.style.left=_7.leftEdgeWidth+"px";
_9.style.top=_7.topEdgeHeight+"px";
_9.style.width=_7.getInternalWidth()+"px";
_9.style.height=(_7.getInternalHeight()-_8.height-this.pad-2)+"px";
_9.style.overflowY="scroll";
_9.style.border="solid 1px black";
_9.style.backgroundColor="white";
_7.windowDiv.appendChild(_9);
this.dialogueFrame=_7;
this.okBtn=_8;
this.textInput=_9;
_7.addWidget(_8,_7.rightEdgeWidth,_7.bottomEdgeHeight,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
if(_3.match(/\.xml/)){
this.SYSTEM.Network.request(_3,null,this.xmlResponse,this);
}else{
_9.value=xmFile;
}
}
catch(ex){
jsExDebug("textDialogue_t",ex);
}
}
function textDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textInput=null;
me.okBtn=null;
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("textDialogue_cleanUp",ex);
}
}
function textDialogue_setPosition(_b,_c){
try{
this.dialogueFrame.setPosition(_b,_c);
}
catch(ex){
jsExDebug("textDialogue_setPosition",ex);
}
}
function textDialogue_dialogueFrame__onClose(_d){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("textDialogue_dialogueFrame__onClose",ex);
}
}
function textDialogue_binding_okBtn_click(_e){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("textDialogue_binding_okBtn_click",ex);
}
}
function textDialogue_xmlResponse(_f,me){
try{
me.textInput.value=getChildNode(_f,"text",0).firstChild.nodeValue;
}
catch(ex){
jsExDebug("textDialogue_xmlResponse",ex);
}
}

try{
trackStatusInfoDialogue_t.prototype=new systemApplication_t();
trackStatusInfoDialogue_t.prototype.constructor=trackStatusInfoDialogue_t;
trackStatusInfoDialogue_t.prototype.trackStatusInfoDialogue_super=systemApplication_t.prototype.constructor;
trackStatusInfoDialogue_t.prototype.cleanUp=trackStatusInfoDialogue_cleanUp;
trackStatusInfoDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
trackStatusInfoDialogue_t.prototype.hideOkButton=trackStatusInfoDialogue_hideOkButton;
trackStatusInfoDialogue_t.prototype.setPosition=trackStatusInfoDialogue_setPosition;
trackStatusInfoDialogue_t.prototype.dialogueFrame__onClose=trackStatusInfoDialogue_dialogueFrame__onClose;
trackStatusInfoDialogue_t.prototype.dialogueFrame_keyPress=trackStatusInfoDialogue_dialogueFrame_keyPress;
trackStatusInfoDialogue_t.prototype.binding_okBtn_click=trackStatusInfoDialogue_binding_okBtn_click;
trackStatusInfoDialogue_t.prototype.DIALOGUE_WIDTH=400;
trackStatusInfoDialogue_t.prototype.DIALOGUE_HEIGHT=130;
trackStatusInfoDialogue_t.prototype.OK_WIDTH=20;
trackStatusInfoDialogue_t.prototype.ICON_HEIGHT=30;
trackStatusInfoDialogue_t.prototype.ICON_SRC="img/app/app/dialogue/ok_icon.png";
trackStatusInfoDialogue_t.prototype.TEXT_BOTTOM=40;
trackStatusInfoDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
trackStatusInfoDialogue_t.prototype.TRACK_STATUS_OFF_IMG="img/app/app/contactmanager/off";
trackStatusInfoDialogue_t.prototype.TRACK_STATUS_ACQ_IMG="img/app/app/contactmanager/acq";
trackStatusInfoDialogue_t.prototype.TRACK_STATUS_FRIEND_IMG="img/app/app/contactmanager/friend";
trackStatusInfoDialogue_t.prototype.TRACK_STATUS_TRUST_IMG="img/app/app/contactmanager/trust";
}
catch(ex){
jsExDebug("okAlertDialog_t.prototype",ex);
}
function trackStatusInfoDialogue_t(_1){
try{
this.trackStatusInfoDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
var _2=new this.SYSTEM.Frame.Window("dialogueFrame","Tracking Permissons",this,null,null,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
var _3=document.createElement("div");
_3.style.position="absolute";
_3.style.left=(_2.leftEdgeWidth+this.SYSTEM.Style.WIDGET_PADDING)+"px";
_3.style.top=_2.topEdgeHeight+"px";
_3.style.height="auto";
_3.style.width=(this.DIALOGUE_WIDTH-parseFloat(_3.style.left)-_2.rightEdgeWidth)+"px";
_3.style.overflow="hidden";
_3.className="boxcontent";
var _4="border: solid 1px grey;";
var _5="border-right: solid 1px grey; border-left: solid 1px grey;";
var _6="You can decide how accurately your contacts can see you when they view your location on a "+mapApp_t.prototype.APP_NAME+".<br/><br/>";
_6+="<table cellspacing='0' cellpadding='2' border='1'>";
_6+="<tr><td><img src='"+this.TRACK_STATUS_OFF_IMG+"_on.png'/></td>";
_6+="<td>The user will <b>not</b> be able to view your location.</td></tr>";
_6+="<tr><td><img src='"+this.TRACK_STATUS_ACQ_IMG+"_on.png'/></td>";
_6+="<td>You will appear to be somewhere <b>within "+(SYSTEM.Contacts.TRACK_STATUS_OBFUSCATION[SYSTEM.Contacts.TRACKING_STATUS_ACQUAINTANCE]/1000)+"km</b> of your actual recorded location.</td></tr>";
_6+="<tr><td><img src='"+this.TRACK_STATUS_FRIEND_IMG+"_on.png'/></td>";
_6+="<td>You will appear to be somewhere <b>within "+(SYSTEM.Contacts.TRACK_STATUS_OBFUSCATION[SYSTEM.Contacts.TRACKING_STATUS_FRIEND]/1000)+"km</b> of your actual recorded location.</td></tr>";
_6+="<tr><td><img src='"+this.TRACK_STATUS_TRUST_IMG+"_on.png'/></td>";
_6+="<td>The user will see your <b>exact</b> recorded location.</td></tr>";
_6+="</table><br/>";
_3.innerHTML=_6;
_2.windowDiv.appendChild(_3);
var _7=new this.SYSTEM.Widget.TextButton("okBtn",40,"OK");
_2.setFixedDimensions(this.DIALOGUE_WIDTH,_3.clientHeight+_2.topEdgeHeight+_2.bottomEdgeHeight+_7.height+this.SYSTEM.Style.WIDGET_PADDING);
this.dialogueFrame=_2;
this.textDiv=_3;
this.okBtn=_7;
_2.addWidget(_7,_2.rightEdgeWidth,_2.bottomEdgeHeight,true,true);
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
_2.show();
}
catch(ex){
jsExDebug("trackStatusInfoDialogue_t",ex);
}
}
function trackStatusInfoDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.textDiv=null;
me.okBtn=null;
me.dialogueFrame=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("trackStatusInfoDialogue_cleanUp",ex);
}
}
function trackStatusInfoDialogue_hideOkButton(){
try{
this.okBtn.hide();
}
catch(ex){
jsExDebug("trackStatusInfoDialogue_hideOkButton",ex);
}
}
function trackStatusInfoDialogue_setPosition(_9,_a){
try{
this.dialogueFrame.setPosition(_9,_a);
}
catch(ex){
jsExDebug("trackStatusInfoDialogue_setPosition",ex);
}
}
function trackStatusInfoDialogue_dialogueFrame__onClose(_b){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("trackStatusInfoDialogue_dialogueFrame__onClose",ex);
}
}
function trackStatusInfoDialogue_dialogueFrame_keyPress(_c){
try{
switch(_c.which){
case 13:
this.binding_okBtn_click();
break;
default:
}
}
catch(ex){
jsExDebug("trackStatusInfoDialogue_dialogueFrame_keyPress",ex);
}
}
function trackStatusInfoDialogue_binding_okBtn_click(_d){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("trackStatusInfoDialogue_binding_okBtn_click",ex);
}
}

try{
sendLocationDialogue_t.prototype=new systemApplication_t();
sendLocationDialogue_t.prototype.constructor=sendLocationDialogue_t;
sendLocationDialogue_t.prototype.sendLocationDialogue_super=systemApplication_t.prototype.constructor;
sendLocationDialogue_t.prototype.cleanUp=sendLocationDialogue_cleanUp;
sendLocationDialogue_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
sendLocationDialogue_t.prototype.close=sendLocationDialogue_close;
sendLocationDialogue_t.prototype.setPosition=sendLocationDialogue_setPosition;
sendLocationDialogue_t.prototype.frame__onClose=sendLocationDialogue_frame__onClose;
sendLocationDialogue_t.prototype.binding_usersAddBtn_click=sendLocationDialogue_binding_usersAddBtn_click;
sendLocationDialogue_t.prototype.binding_usersRemoveBtn_click=sendLocationDialogue_binding_usersRemoveBtn_click;
sendLocationDialogue_t.prototype.binding_okBtn_click=sendLocationDialogue_binding_okBtn_click;
sendLocationDialogue_t.prototype.keyDownEvent=sendLocationDialogue_keyDownEvent;
sendLocationDialogue_t.prototype.createFrame=sendLocationDialogue_createFrame;
sendLocationDialogue_t.prototype.error=sendLocationDialogue_error;
sendLocationDialogue_t.prototype.okAlert=sendLocationDialogue_okAlert;
sendLocationDialogue_t.prototype.getSelectIndex=sendLocationDialogue_getSelectIndex;
sendLocationDialogue_t.prototype.APP_ID=APP_ID_DIALOGUE;
sendLocationDialogue_t.prototype.WIDTH=400;
sendLocationDialogue_t.prototype.HEIGHT=320;
sendLocationDialogue_t.prototype.EMAIL_TEXT_WIDTH=260;
sendLocationDialogue_t.prototype.SELECT_TOP=30;
}
catch(ex){
jsExDebug("sendLocationDialogue_t.prototype",ex);
}
function sendLocationDialogue_t(_1){
try{
this.sendLocationDialogue_super();
if(!this.FRAMEWORK_INITIALISED){
return;
}
this.createFrame();
this.application=_1;
if(_1){
this.registrationIndex=_1.registerDialogue(this);
}
this.frame.show();
}
catch(ex){
jsExDebug("sendLocationDialogue_t",ex);
}
}
function sendLocationDialogue_cleanUp(me){
try{
if(!me){
var me=this;
}
me.SYSTEM.Event.unregisterKeyPressOverride(me.keyDownEvent);
me.frame=null;
if(me.registrationIndex!=null){
me.application.unregisterDialogue(me.registrationIndex);
}
me.application=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("sendLocationDialogue_t",ex);
}
}
function sendLocationDialogue_close(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("sendLocationDialogue_close",ex);
}
}
function sendLocationDialogue_setPosition(_3,_4){
try{
this.frame.setPosition(_3,_4);
}
catch(ex){
jsExDebug("sendLocationDialogue_setPosition",ex);
}
}
function sendLocationDialogue_createFrame(){
try{
var _5=new this.SYSTEM.Frame.Window("frame","Send Location",this,this.WIDTH,this.HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN,false,true);
_5.setFixedDimensions(this.WIDTH,this.HEIGHT);
var _6=new this.SYSTEM.Widget.Label("emailLabel");
_6.setText("Email address");
var _7=new this.SYSTEM.Widget.Text("emailText");
_7.setWidth(this.EMAIL_TEXT_WIDTH);
var _8=new this.SYSTEM.Widget.TextButton("usersAddBtn",60,"Add");
var _9=new this.SYSTEM.Widget.TextButton("usersRemoveBtn",60,"Remove");
var _a=new this.SYSTEM.Widget.SelectList("usersSelect");
_a.setDimensions(_5.getInternalWidth()-_8.width-this.pad,_5.getInternalHeight()-this.SELECT_TOP-_8.height-this.pad);
_a.allowStartVisible();
_a.allowBorder("#AAAAAA");
_a.allowSelect(_a.MULTIPLE_SELECT);
_a.disallowItemTextPadding();
_a.align(_a.LEFT_ALIGN);
var _b=new this.SYSTEM.Widget.TextButton("okBtn",50,"Send");
var _c=_5.leftEdgeWidth;
var _d=_5.topEdgeHeight;
var _e=25;
_5.addWidget(_6,_c,_d);
_5.addWidget(_7,_c+_6.getClientWidth()+this.pad,_d);
_5.addWidget(_a,_6.positionX,_d+this.SELECT_TOP);
_5.addWidget(_8,_5.rightEdgeWidth,_a.positionY,true);
_5.addWidget(_9,_5.rightEdgeWidth,_8.positionY+_8.height+this.pad,true);
_5.addWidget(_b,_c,_5.bottomEdgeHeight,true,true);
this.frame=_5;
this.SYSTEM.Event.registerKeyPressOverride(this.keyDownEvent,this);
}
catch(ex){
jsExDebug("sendLocationDialogue_createFrame",ex);
}
}
function sendLocationDialogue_error(_f,_10,_11){
try{
var _12=new this.SYSTEM.Dialogue.Error(null,"Share with Contacts",_f,_10,_11);
}
catch(ex){
jsExDebug("sendLocationDialogue_error",ex);
}
}
function sendLocationDialogue_okAlert(msg,_14,_15){
try{
var _16=new this.SYSTEM.Dialogue.OkAlert(null,"Share with Contacts",msg,_14,_15);
}
catch(ex){
jsExDebug("sendLocationDialogue_okAlert",ex);
}
}
function sendLocationDialogue_getSelectIndex(_17,_18,_19){
try{
for(i=0;i<_17.items.length;i++){
if(_17.items[i]){
var _1a=_17.items[i].value;
if(_19&&_1a==_19){
return i;
}
}
}
return null;
}
catch(ex){
jsExDebug("sendLocationDialogue_getSelectIndex",ex);
}
}
function sendLocationDialogue_frame__onClose(_1b){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("sendLocationDialogue_frame__onClose",ex);
}
}
function sendLocationDialogue_binding_okBtn_click(){
function callback(){
try{
this.SYSTEM.Tooltip.hideLoading();
this.cleanUp();
}
catch(ex){
jsExDebug("sendLocationDialogue_binding_okBtn_click: callback",ex);
}
}
function tooltipTimeout(){
try{
this.SYSTEM.Tracking.sendLocation(_1c,new this.SYSTEM.Delegate(this,callback));
}
catch(ex){
jsExDebug("sendLocationDialogue_binding_okBtn_click: tooltipTimeout",ex);
}
}
try{
var _1d=this.frame.getWidget("usersSelect").items;
var _1c=[];
for(var i=0;i<_1d.length;i++){
if(_1d[i]){
_1c.push(_1d[i].value);
}
}
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Sending location...");
}
catch(ex){
jsExDebug("sendLocationDialogue_binding_okBtn_click",ex);
}
}
function sendLocationDialogue_keyDownEvent(_1f,me){
return;
}
function sendLocationDialogue_binding_usersAddBtn_click(){
function emailCheckResponse(xml,me){
try{
_23.addItem(_24,_24);
me.frame.getWidget("emailText").clearContent();
}
catch(ex){
jsExDebug("sendLocationDialogue_binding_usersAddBtn_click: emailCheckResponse",ex);
}
}
try{
var _24=this.frame.getWidget("emailText").getContent();
var _23=this.frame.getWidget("usersSelect");
if(_24&&_24.match(EMAIL_REGEX)&&this.getSelectIndex(_23,null,_24)==null){
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action=12","peepel_email="+secureStringForRequest(_24),emailCheckResponse,this);
}
}
catch(ex){
jsExDebug("sendLocationDialogue_binding_usersAddBtn_click",ex);
}
}
function sendLocationDialogue_binding_usersRemoveBtn_click(){
try{
var _25=this.frame.getWidget("usersSelect");
var _26=_25.getSelectedIndexes();
for(var i=0;i<_26.length;i++){
_25.removeItem(_26[i]);
}
}
catch(ex){
jsExDebug("sendLocationDialogue_binding_usersRemoveBtn_click",ex);
}
}

try{
authApp_t.prototype=new application_t();
authApp_t.prototype.constructor=authApp_t;
authApp_t.prototype.authApp_super=application_t.prototype.constructor;
authApp_t.prototype.cleanUp=authApp_cleanUp;
authApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
authApp_t.prototype.createFrame=authApp_createFrame;
authApp_t.prototype._SIG_KILL=authApp__SIG_KILL;
authApp_t.prototype._SIG_THEME=authApp__SIG_THEME;
authApp_t.prototype.binding_currentAuthStatusBtn_click=authApp_binding_currentAuthStatusBtn_click;
authApp_t.prototype.binding_signInBtn_click=authApp_binding_signInBtn_click;
authApp_t.prototype.binding_forgotPasswordBtn_click=authApp_binding_forgotPasswordBtn_click;
authApp_t.prototype.binding_signUpEmailPassBtn_click=authApp_binding_signUpBtn_click;
authApp_t.prototype.binding_signUpOpenIDBtn_click=authApp_binding_signUpBtn_click;
authApp_t.prototype.binding_deAuthBtn_click=authApp_binding_deAuthBtn_click;
authApp_t.prototype.binding_openIDLoginBtn_click=authApp_binding_openIDLoginBtn_click;
authApp_t.prototype.binding_signUpOpenIDLink_click=authApp_binding_signUpOpenIDLink_click;
authApp_t.prototype.binding_signUpTacLink_click=authApp_binding_signUpTacLink_click;
authApp_t.prototype.binding_signUpOpenIDDisclaimerLink_click=authApp_binding_signUpOpenIDDisclaimerLink_click;
authApp_t.prototype.binding_tabList_itemSelect=authApp_binding_tabList_itemSelect;
authApp_t.prototype.binding_forgotSendEmailBtn_click=authApp_binding_forgotSendEmailBtn_click;
authApp_t.prototype.frame__onClose=authApp_frame__onClose;
authApp_t.prototype.frame__onResize=authApp_frame__onResize;
authApp_t.prototype.frame_keyPress=authApp_frame_keyPress;
authApp_t.prototype.frame_keyUp=authApp_frame_keyUp;
authApp_t.prototype.forgotFrame__onClose=authApp_forgotFrame__onClose;
authApp_t.prototype.getAuthStatusCallback=authApp_getAuthStatusCallback;
authApp_t.prototype.updateAuthStatusText=authApp_updateAuthStatusText;
authApp_t.prototype.updateUserIdText=authApp_updateUserIdText;
authApp_t.prototype.openIDAuthenticateErrorCallback=authApp_openIDAuthenticateErrorCallback;
authApp_t.prototype.getAuthStatus=authApp_getAuthStatus;
authApp_t.prototype.setEmailImage=authApp_setEmailImage;
authApp_t.prototype.APP_ID=APP_ID_AUTH;
authApp_t.prototype.APP_NAME="Login/Sign Up";
authApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.ACCOUNT_MANAGER;
authApp_t.prototype.AD_IMAGE="img/site/friends/pocketpeepel";
authApp_t.prototype.AD_URL=SYSTEM.Environment.DOCUMENT_NAME.replace(/peepel\.php/,"pp.php");
authApp_t.prototype.FORGOT_FRAME_WIDTH=400;
authApp_t.prototype.FORGOT_FRAME_HEIGHT=160;
authApp_t.prototype.FRAME_WIDTH=400;
authApp_t.prototype.FRAME_HEIGHT=420;
authApp_t.prototype.FRAME_TOP=50;
authApp_t.prototype.FRAME_BOTTOM=40;
authApp_t.prototype.TEXT_PADDING=10;
authApp_t.prototype.DONE_IMG="img/dev_only/done.png";
authApp_t.prototype.GOOD_IMG="img/app/system/icons/silk/tick";
authApp_t.prototype.BAD_IMG="img/app/system/icons/silk/cross";
authApp_t.prototype.SIGNUP_OPEN_ID=1;
authApp_t.prototype.SIGNUP_EMAIL_PASS=2;
}
catch(ex){
jsExDebug("authApp_t.prototype",ex);
}
function authApp_t(_1){
try{
this.authApp_super();
this.createFrame();
this.getAuthStatus();
this.SYSTEM.Tooltip.hideLoading();
this.updateUserIdText(this.SYSTEM.UserDetails.id);
this.disableEnterLogin=false;
this.usernameOk=false;
this.emailOk=false;
this.currentlyLoggingIn=false;
if(_1[0]){
this.frame.getWidget("tabList").selectTab(null,_1[0]);
}else{
if(this.SYSTEM.UserDetails.isTempUser()){
this.frame.getWidget("tabList").selectTab(1);
}else{
this.frame.getWidget("tabList").selectTab(0);
}
}
}
catch(ex){
jsExDebug("authApp_t",ex);
}
}
function authApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.frame=null;
me.loginContainer=null;
me.signUpContainer=null;
me.blankSignUpContainer=null;
me.disableEnterLogin=null;
me.usernameOk=null;
me.emailOk=null;
me.currentlyLoggingIn=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("authApp_cleanUp",ex);
}
}
function authApp_createFrame(){
try{
var _3=190;
var _4=new this.SYSTEM.Frame.Window("frame",this.APP_NAME,this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN|this.SYSTEM.Frame.MINIMISE_BTN);
_4.setFixedDimensions(this.FRAME_WIDTH,this.FRAME_HEIGHT);
_4.allowWindowOverflow();
var _5=this.SYSTEM.Widget;
var _6=new _5.TabList("tabList",_4.getInternalWidth(),false,true);
_6.disallowBorder();
_6.disallowItemBorder();
_6.addTab("Login",true,"Login");
_6.addTab("Sign Up",true,"Sign Up");
_4.addWidget(_6,_4.leftEdgeWidth,_4.topEdgeHeight);
var _7=2;
var _8=_4.getInternalWidth()-_7;
var _9=_4.getInternalHeight()-_6.getHeight()-_7;
var _a=_4.leftEdgeWidth;
var _b=_4.topEdgeHeight+_6.getHeight();
var _c=this.SYSTEM.Dom.createDiv("absolute",_8,_9,_a,_b);
_c.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
_c.style.display="none";
var _d=new _5.Label("signInLabel","Login with...");
_d.setBold();
var _e=new _5.Label("signInUserLabel","Email address");
var _f=new _5.Text("signInUserText");
var _10=new _5.Label("signInPassLabel","Password");
var _11=new _5.Text("signInPassText",false,false,true);
var _12=new this.SYSTEM.Widget.TextButton("signInBtn",80,"Login");
var _13=new this.SYSTEM.Widget.TextButton("forgotPasswordBtn",160,"Forgot Password?");
var _14=new _5.Label("orLabel","Or using OpenID...");
_14.setBold();
var _15=new _5.Label("openIDLabel","OpenID");
var _16=new _5.Text("openIDText");
_16.setDimensions(_3);
var _17=new this.SYSTEM.Widget.TextButton("openIDLoginBtn",_12.width,"Login");
var _18=new this.SYSTEM.Widget.TextButton("deAuthBtn",_12.width,"Logout");
var _19=new _5.TabGroup("loginTabGroup");
_19.addTextWidget(_f);
_19.addTextWidget(_11);
var _1a=this.SYSTEM.Dom.createDiv("absolute",_8,_9,_a,_b);
_1a.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
_1a.style.display="none";
var _1b=new _5.Label("blankUpgradeLabel","You have already signed up!");
var _1c=this.SYSTEM.Dom.createDiv("absolute",_8,_9,_a,_b);
_1c.style.border="solid 1px "+this.SYSTEM.Style.DARK_BLUE_BORDER;
_1c.style.display="none";
var _1d=new _5.Checkbox("signUpTacCheckbox");
_1d.allowLabel("I agree with the Terms and Conditions",_1d.LABEL_RIGHT,_4.getInternalWidth()-40);
var _1e=new _5.Link("signUpTacLink","Click here to view the Terms and Conditions");
var _1f=new _5.Label("signUpHelp1Label","Choose one of the following methods of signing up:");
var _20=new _5.Label("signUpHelp1Label","Email address & password");
_20.setBold();
var _21=new _5.Label("signUpEmailLabel","Email address *");
var _22=new _5.Text("signUpEmailText");
_22.setDimensions(_3);
var _23=new _5.Button("signUpEmailBtn",this.BAD_IMG,null,16,16);
_23.hide();
var _24=new _5.Label("signUpPassLabel","Password *");
var _25=new _5.Text("signUpPassText",false,false,true);
_25.setDimensions(_3);
var _26=new _5.Label("signUpConfirmPassLabel","Confirm Password *");
var _27=new _5.Text("signUpConfirmPassText",false,false,true);
_27.setDimensions(_3);
var _28=new this.SYSTEM.Widget.TextButton("signUpEmailPassBtn",80,"Sign Up");
_28.setValue(this.SIGNUP_EMAIL_PASS);
var _29=new _5.Label("signUpHelp3Label","OpenID");
_29.setBold();
var _2a=new _5.Link("signUpOpenIDLink","What is OpenID?");
var _2b=new _5.Label("signUpOpenIDHelpLabel","Before signing up with your OpenID, please read our: ");
var _2c=new _5.Link("signUpOpenIDDisclaimerLink","OpenID Disclaimer");
var _2d=new _5.Label("signUpOpenIDLabel","OpenID *");
var _2e=new _5.Text("signUpOpenIDText");
_2e.setDimensions(_3);
var _2f=new this.SYSTEM.Widget.TextButton("signUpOpenIDBtn",80,"Sign Up");
_2f.setValue(this.SIGNUP_OPEN_ID);
var _30=new _5.Label("signUpHelpLabel","* = required");
var _31=new _5.TabGroup("signUpTabGroup");
_31.addTextWidget(_22);
_31.addTextWidget(_25);
_31.addTextWidget(_27);
_31.addTextWidget(_2e);
var _32=this.SYSTEM.Style.WIDGET_PADDING;
var _33=_32*5;
var _34=_33*1.5;
var _35=_33*2;
var _36=140;
_4.windowDiv.appendChild(_c);
_4.windowDiv.appendChild(_1a);
_4.windowDiv.appendChild(_1c);
_4.addWidgetToDom(_d,_c,_32,_32);
_4.addWidgetToDom(_e,_c,_32,_d.positionY+_33);
_4.addWidgetToDom(_f,_c,_32+_36,_e.positionY);
_4.addWidgetToDom(_10,_c,_32,_f.positionY+_33);
_4.addWidgetToDom(_11,_c,_32+_36,_10.positionY);
_4.addWidgetToDom(_12,_c,_32,_11.positionY+_33);
_4.addWidgetToDom(_13,_c,_12.positionX+_12.width+10,_12.positionY);
_4.addWidgetToDom(_14,_c,_32,_13.positionY+_34);
_4.addWidgetToDom(_15,_c,_32,_14.positionY+_33);
_4.addWidgetToDom(_16,_c,_32+_36,_15.positionY);
_4.addWidgetToDom(_17,_c,_32,_16.positionY+_33);
_4.addWidgetToDom(_18,_c,_32,_32,true,true);
_4.addWidgetToDom(_19,_c,0,0);
_4.addWidgetToDom(_1b,_1a,_32,_32);
_4.addWidgetToDom(_1d,_1c,_32,_32);
_4.addWidgetToDom(_1e,_1c,_32,_1d.positionY+_33);
_4.addWidgetToDom(_1f,_1c,_32,_1e.positionY+(_33*1.5));
_4.addWidgetToDom(_20,_1c,_32,_1f.positionY+_33);
_4.addWidgetToDom(_21,_1c,_32+this.pad,_20.positionY+_33);
_4.addWidgetToDom(_22,_1c,_32+this.pad+_36,_21.positionY);
_4.addWidgetToDom(_23,_1c,_22.positionX+_22.width+10,_21.positionY);
_4.addWidgetToDom(_24,_1c,_32+this.pad,_21.positionY+_33);
_4.addWidgetToDom(_25,_1c,_32+this.pad+_36,_24.positionY);
_4.addWidgetToDom(_26,_1c,_32+this.pad,_24.positionY+_33);
_4.addWidgetToDom(_27,_1c,_32+this.pad+_36,_26.positionY);
_4.addWidgetToDom(_28,_1c,_32+this.pad,_26.positionY+_33);
_4.addWidgetToDom(_29,_1c,_32,_28.positionY+_34);
_4.addWidgetToDom(_2a,_1c,_32+this.pad+_36,_29.positionY);
_4.addWidgetToDom(_2b,_1c,_32+this.pad,_29.positionY+_33);
_4.addWidgetToDom(_2c,_1c,_2b.positionX,_2b.positionY+(_32*4));
_4.addWidgetToDom(_2d,_1c,_32+this.pad,_2c.positionY+_33);
_4.addWidgetToDom(_2e,_1c,_32+this.pad+_36,_2d.positionY);
_4.addWidgetToDom(_2f,_1c,_32+this.pad,_2e.positionY+_33);
_4.addWidgetToDom(_30,_1c,_32,_32,true,true);
_4.addWidgetToDom(_31,_1c,0,0);
_4.show();
this.loginContainer=_c;
this.signUpContainer=_1c;
this.blankSignUpContainer=_1a;
this.frame=_4;
}
catch(ex){
jsExDebug("authApp_createFrame",ex);
}
}
function authApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("authApp__SIG_KILL",ex);
}
}
function authApp__SIG_THEME(){
try{
}
catch(ex){
jsExDebug("authApp__SIG_THEME",ex);
}
}
function authApp_binding_currentAuthStatusBtn_click(){
try{
this.getAuthStatus();
}
catch(ex){
jsExDebug("authApp_binding_currentAuthStatusBtn_click",ex);
}
}
function authApp_binding_signInBtn_click(){
function dialogueCallback(){
try{
this.disableEnterLogin=false;
}
catch(ex){
jsExDebug("authApp_binding_signInBtn_click: dialogueCallback",ex);
}
}
function loginAsDifferentUserCallback(_37,_38,_39){
try{
this.currentlyLoggingIn=false;
if(!_37){
this.disableEnterLogin=true;
var d=new this.SYSTEM.Dialogue.Error(this,"Peepel","Could not log in as new user.",new this.SYSTEM.Delegate(this,dialogueCallback));
return;
}
this.updateUserIdText(_38);
this.updateAuthStatusText(_39);
resetSYSTEMAfterUserChange();
}
catch(ex){
jsExDebug("authApp_binding_signInBtn_click: loginAsDifferntUserCallback",ex);
}
}
try{
if(this.currentlyLoggingIn){
return;
}
var _3b=this.frame.getWidget("signInUserText").getContent();
var _3c=this.frame.getWidget("signInPassText").getContent();
this.currentlyLoggingIn=true;
this.SYSTEM.Security.signInAsUser(_3b,_3c,new delegate_t(this,loginAsDifferentUserCallback));
}
catch(ex){
jsExDebug("authApp_binding_signInBtn_click",ex);
}
}
function authApp_binding_forgotPasswordBtn_click(){
try{
if(this.forgotFrame){
this.forgotFrame.focus();
return;
}
var _3d=this.SYSTEM.Widget;
var _3e=new this.SYSTEM.Frame.Window("forgotFrame","Forgot Password",this,this.FORGOT_FRAME_WIDTH,this.FORGOT_FRAME_HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN);
var _3f=new _3d.Label("label","Please enter the email address used for the account. An email will be sent to it which will allow you to change your password. "+"You have 24 hours after it has been sent to change your password otherwise you will need to repeat this process.");
_3f.setDimensions(_3e.getInternalWidth());
var _40=new _3d.Text("text");
_40.setDimensions(_3e.getInternalWidth());
var _41=new this.SYSTEM.Widget.TextButton("forgotSendEmailBtn",90,"Send Email");
_3e.addWidget(_3f,_3e.leftEdgeWidth,_3e.topEdgeHeight);
_3e.addWidget(_40,_3e.leftEdgeWidth,_3e.bottomEdgeHeight+30,false,true);
_3e.addWidget(_41,_3e.leftEdgeWidth,_3e.bottomEdgeHeight,true,true);
_3e.show();
_3e.setFixedDimensions(this.FORGOT_FRAME_WIDTH,_3f.positionY+_3f.getClientHeight()+_40.getClientHeight()+_41.height+(3*this.pad));
this.forgotFrame=_3e;
}
catch(ex){
jsExDebug("authApp_binding_forgotPasswordBtn_click",ex);
}
}
function authApp_binding_signUpBtn_click(_42){
function signUpEmailCallback(_43,_44){
try{
if(_43){
var _45=new widgetSignUp_t("signUp");
_45.setPosition(this.SYSTEM.Environment.SCREEN_WIDTH/2-(_45.width/2),this.SYSTEM.Environment.SCREEN_HEIGHT/2-(_45.height/2));
_45.attach(document.body);
this.cleanUp();
}else{
global_restartTimedServiceRequests();
if(_44){
var d=new this.SYSTEM.Dialogue.Error(this,this.APP_NAME,_44.join("<br/>"),null,null,100+(_44.length*15));
}
}
}
catch(ex){
jsExDebug("authApp_binding_signUpBtn_click: signUpEmailCallback",ex);
}
}
function signUpOpenIDCallback(_47){
try{
global_restartTimedServiceRequests();
if(_47){
var d=new this.SYSTEM.Dialogue.Error(this,this.APP_NAME,_47.join("<br/>"));
}
}
catch(ex){
jsExDebug("authApp_binding_signUpBtn_click: signUpOpenIDCallback",ex);
}
}
try{
if(!this.frame.getWidget("signUpTacCheckbox").isChecked()){
var d=new this.SYSTEM.Dialogue.OkAlert(this,this.APP_NAME,"You cannot sign up unless you agree to our terms and conditions.");
return;
}
var _4a="";
var _4b=0;
switch(_42.getValue()){
case this.SIGNUP_EMAIL_PASS:
var _4c=this.frame.getWidget("signUpEmailText").getContent();
var _4d=this.frame.getWidget("signUpPassText").getContent();
var _4e=this.frame.getWidget("signUpConfirmPassText").getContent();
if(!_4c||!_4c.length){
_4a+="Email address not given";
_4b++;
}else{
if(!this.emailOk){
_4a+="Email address: "+this.frame.getWidget("signUpEmailBtn").tooltipContent;
_4b++;
}
}
if(!_4d||!_4d.length){
_4a+=(_4b?"<br/>":"")+"Password not given";
_4b++;
}
if(_4e!=_4d){
_4a+=(_4b?"<br/>":"")+"Password confirmation does not match password";
_4b++;
}
if(_4b){
var d=new this.SYSTEM.Dialogue.Error(this,this.APP_NAME,_4a);
}else{
global_stopTimedServiceRequests();
this.SYSTEM.Security.signUpEmailPass(_4c,_4d,new this.SYSTEM.Delegate(this,signUpEmailCallback));
}
break;
case this.SIGNUP_OPEN_ID:
var _4f=this.frame.getWidget("signUpOpenIDText").getContent();
if(!_4f||!_4f.length){
_4a+=(_4b?"<br/>":"")+"OpenID not given";
_4b++;
}
if(_4b){
var d=new this.SYSTEM.Dialogue.Error(this,this.APP_NAME,_4a);
}else{
global_stopTimedServiceRequests();
this.SYSTEM.Security.signUpOpenID(_4f,new this.SYSTEM.Delegate(this,signUpOpenIDCallback));
}
break;
}
}
catch(ex){
jsExDebug("authApp_binding_signUpBtn_click",ex);
}
}
function authApp_binding_deAuthBtn_click(){
function apiRegistryCallback(){
try{
this.SYSTEM.Security.handleDeauthentication(0);
}
catch(ex){
jsExDebug("authApp_binding_deAuthBtn_click: apiRegistryCallback",ex);
}
}
function logoutCallback(_50){
try{
if(_50){
this.SYSTEM.ApiRegistry.deRegister(new this.SYSTEM.Delegate(this,apiRegistryCallback));
}else{
jsDebug("deauth failed: check app/mal logs");
}
}
catch(ex){
jsExDebug("logoutCallback",ex);
}
}
try{
this.SYSTEM.Security.deauthenticate(new delegate_t(this,logoutCallback));
}
catch(ex){
jsExDebug("authApp_binding_deAuthBtn_click",ex);
}
}
function authApp_binding_openIDAttachBtn_click(){
function tooltipTimeout(){
try{
this.SYSTEM.Security.simpleOpenIDAuthenticate(this.frame.getWidget("openIDText").getContent(),this.SYSTEM.Security.ACTION_ATTACH_OPEN_ID,new this.SYSTEM.Delegate(this,this.openIDAuthenticateErrorCallback));
}
catch(ex){
jsExDebug("authApp_binding_openIDAttachBtn_click: tooltipTimeout",ex);
}
}
try{
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Now taking you to the OpenID provider...");
}
catch(ex){
jsExDebug("authApp_binding_openIDAttachBtn_click",ex);
}
}
function authApp_binding_openIDLoginBtn_click(){
function tooltipTimeout(){
try{
this.SYSTEM.Security.simpleOpenIDAuthenticate(this.frame.getWidget("openIDText").getContent(),this.SYSTEM.Security.ACTION_LOGIN_OPEN_ID,new this.SYSTEM.Delegate(this,this.openIDAuthenticateErrorCallback));
this.currentlyLoggingIn=true;
}
catch(ex){
jsExDebug("authApp_binding_openIDLoginBtn_click: tooltipTimeout",ex);
}
}
try{
if(this.currentlyLoggingIn){
return;
}
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Now taking you to the OpenID provider...");
}
catch(ex){
jsExDebug("authApp_binding_openIDLoginBtn_click",ex);
}
}
function authApp_binding_signUpOpenIDLink_click(){
try{
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_BROWSER,"http://openid.net");
}
catch(ex){
jsExDebug("authApp_binding_signUpOpenIDLink_click",ex);
}
}
function authApp_binding_signUpTacLink_click(){
try{
var d=new this.SYSTEM.Dialogue.TextDialogue(this,"Peepel Terms and Conditions","js/xml/tac.xml",450,450);
}
catch(ex){
jsExDebug("authApp_binding_signUpTacLink_click",ex);
}
}
function authApp_binding_signUpOpenIDDisclaimerLink_click(){
try{
var d=new this.SYSTEM.Dialogue.OkAlert(this,"OpenID Disclaimer",OPEN_ID_DISCLAIMER,null,500);
}
catch(ex){
jsExDebug("authApp_binding_signUpTacLink_click",ex);
}
}
function authApp_binding_tabList_itemSelect(_53){
try{
var _54=_53.getSelectedTabData();
switch(_54){
case "Login":
this.loginContainer.style.display="block";
this.signUpContainer.style.display="none";
this.blankSignUpContainer.style.display="none";
this.frame.getWidget("loginTabGroup").enable();
this.frame.getWidget("signUpTabGroup").disable();
this.frame.getWidget("loginTabGroup").focusNext();
break;
case "Sign Up":
this.loginContainer.style.display="none";
this.frame.getWidget("loginTabGroup").disable();
this.frame.getWidget("signUpTabGroup").enable();
if(this.SYSTEM.UserDetails.isTempUser()){
this.signUpContainer.style.display="block";
this.blankSignUpContainer.style.display="none";
var _55=this.frame.getWidget("signUpHelp3Label");
var _56=this.frame.getWidget("signUpOpenIDHelpLabel");
this.frame.getWidget("signUpOpenIDLink").setPosition(_55.positionX+_55.getClientWidth()+20);
this.frame.getWidget("signUpOpenIDDisclaimerLink").setPosition(null,_56.positionY+_56.getClientHeight()+this.pad);
}else{
this.signUpContainer.style.display="none";
this.blankSignUpContainer.style.display="block";
}
this.frame.getWidget("signUpTabGroup").focusNext();
break;
case "OpenID":
this.loginContainer.style.display="none";
this.signUpContainer.style.display="none";
this.blankSignUpContainer.style.display="none";
this.frame.getWidget("loginTabGroup").disable();
this.frame.getWidget("signUpTabGroup").disable();
break;
}
}
catch(ex){
jsExDebug("authApp_binding_tabList_itemSelect",ex);
}
}
function authApp_binding_forgotSendEmailBtn_click(){
function response(xml,me){
try{
if(getNodeValue(xml,"success")=="0"){
var d=new me.SYSTEM.Dialogue.OkAlert(me,null,"Email sent");
}else{
var d=new me.SYSTEM.Dialogue.Error(me,null,"Email not sent");
}
}
catch(ex){
jsExDebug("authApp_binding_forgotSendEmailBtn_click: response",ex);
}
}
try{
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action=3","peepel_email="+this.forgotFrame.getWidget("text").getContent(),response,this);
this.forgotFrame.close();
}
catch(ex){
jsExDebug("authApp_binding_forgotSendEmailBtn_click",ex);
}
}
function authApp_frame__onClose(_5a){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("authApp_frame__onClose",ex);
}
}
function authApp_frame__onResize(_5b){
try{
if(!this.contentText){
return;
}
var dX=this.SYSTEM.Event.dragDistanceX;
var dY=this.SYSTEM.Event.dragDistanceY;
var _5e=null;
var _5f=null;
if(dX||dY){
_5e=_5b.width+this.SYSTEM.DM.dragDistanceX;
_5f=_5b.height+this.SYSTEM.DM.dragDistanceY;
if(_5e<=_5b.minimumWidth){
_5e=_5b.minimumWidth;
}
if(_5f<=_5b.minimumHeight){
_5f=_5b.minimumHeight;
}
}else{
_5e=_5b.width;
_5f=_5b.height;
}
}
catch(ex){
jsExDebug("authApp_frame__onResize",ex);
}
}
function authApp_frame_keyPress(key){
try{
switch(key.which){
case 13:
switch(this.frame.getWidget("tabList").getSelectedTabIndex()){
case 0:
if(this.frame.getWidget("signInUserText").hasFocus()||this.frame.getWidget("signInPassText").hasFocus()){
this.binding_signInBtn_click();
}else{
if(this.frame.getWidget("openIDText").hasFocus()){
this.binding_openIDLoginBtn_click();
}
}
break;
case 1:
if(this.frame.getWidget("signUpEmailText").hasFocus()||this.frame.getWidget("signUpPassText").hasFocus()||this.frame.getWidget("signUpConfirmPassText").hasFocus()){
this.binding_signUpEmailPassBtn_click(this.frame.getWidget("signUpEmailPassBtn"));
}else{
if(this.frame.getWidget("signUpOpenIDText").hasFocus()){
this.binding_signUpOpenIDBtn_click(this.frame.getWidget("signUpOpenIDBtn"));
}
}
break;
}
break;
default:
}
}
catch(ex){
jsExDebug("authApp_frame_keyPress",ex);
}
}
function authApp_frame_keyUp(key){
function usernameCheckResponse(xml,me){
try{
var _64=getNodeValue(xml,"avail");
switch(_64){
case "true":
_64=true;
break;
case "false":
default:
_64=false;
}
if(_64){
me.setUsernameImage(true,"Name OK :)");
}else{
me.setUsernameImage(false,"Name taken :(");
}
}
catch(ex){
jsExDebug("authApp_frame_keyUp: usernameCheckResponse",ex);
}
}
function emailResponse(xml,me){
try{
var _67=getNodeValue(xml,"avail");
switch(_67){
case "true":
_67=true;
break;
case "false":
default:
_67=false;
}
if(_67){
me.setEmailImage(true,"Email address OK :)");
}else{
me.setEmailImage(false,"Email address taken :(");
}
}
catch(ex){
jsExDebug("authApp_frame_keyUp: emailResponse",ex);
}
}
try{
if(this.frame.getWidget("tabList").getSelectedTabIndex()!=1){
return;
}
var _68=this.frame.getWidget("signUpEmailText");
var _69=this.frame.getWidget("signUpPassText");
var _6a=this.frame.getWidget("signUpConfirmPassText");
if(_68.hasFocus()){
var _6b=_68.getContent();
if(_6b==this.emailAddress){
this.frame.getWidget("signUpEmailBtn").hide();
this.emailOK=true;
}else{
if(_6b.match(EMAIL_REGEX)){
this.SYSTEM.Network.request(this.SYSTEM.Network.SERVICES_PATH+"?service=user&action=12","peepel_email="+secureStringForRequest(_6b),emailResponse,this);
}else{
this.setEmailImage(false,"Not a valid email address");
}
}
}else{
if(_69.hasFocus()){
checkStringForInvalidCharacters(_69,"password",this);
}else{
if(_6a.hasFocus()){
checkStringForInvalidCharacters(_6a,"password",this);
}
}
}
}
catch(ex){
jsExDebug("authApp_frame_keyUp",ex);
}
}
function authApp_forgotFrame__onClose(_6c){
try{
_6c.cleanUp();
this.forgotFrame=null;
}
catch(ex){
jsExDebug("authApp_forgotFrame__onClose",ex);
}
}
function authApp_getAuthStatusCallback(_6d){
try{
if(!this.SYSTEM){
return;
}
_6d=parseFloat(_6d);
if(_6d&this.SYSTEM.Security.TEMP_USER_MASK){
}
if(_6d&this.SYSTEM.Security.EMAIL_USER_MASK){
}
if(_6d&this.SYSTEM.Security.EMAILPASS_USER_MASK){
}
if(_6d&this.SYSTEM.Security.OPENID_USER_MASK){
}
}
catch(ex){
jsExDebug("authApp_getAuthStatusCallback",ex);
}
}
function authApp_updateAuthStatusText(_6e){
try{
return;
this.frame.getWidget("currentAuthStatusText").setContent(_6e);
}
catch(ex){
jsExDebug("authApp_updateAuthStatusText",ex);
}
}
function authApp_updateUserIdText(_6f){
try{
return;
this.frame.getWidget("userIdText").setContent("userid: "+_6f);
}
catch(ex){
jsExDebug("authApp_updateUserIdText",ex);
}
}
function authApp_openIDAuthenticateErrorCallback(xml){
try{
this.currentlyLoggingIn=false;
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("authApp_openIDAuthenticateErrorCallback",ex);
}
}
function authApp_getAuthStatus(){
try{
this.SYSTEM.Security.getAuthenticationStatus(new delegate_t(this,this.getAuthStatusCallback));
}
catch(ex){
jsExDebug("authApp_getAuthStatus",ex);
}
}
function authApp_setEmailImage(_71,_72){
try{
var _73=this.frame.getWidget("signUpEmailBtn");
if(_71){
_73.setImage(this.GOOD_IMG);
}else{
_73.setImage(this.BAD_IMG);
}
_73.allowTooltip(null,_72);
_73.show();
this.emailOk=_71;
}
catch(ex){
jsExDebug("authApp_setEmailImage",ex);
}
}

try{
testApp_t.prototype=new application_t();
testApp_t.prototype.constructor=testApp_t;
testApp_t.prototype.testApp_super=application_t.prototype.constructor;
testApp_t.prototype.cleanUp=testApp_cleanUp;
testApp_t.prototype.application_cleanUp=application_t.prototype.cleanUp;
testApp_t.prototype.createFrame=testApp_createFrame;
testApp_t.prototype._SIG_KILL=testApp__SIG_KILL;
testApp_t.prototype.frame__onClose=testApp_frame__onClose;
testApp_t.prototype.frame__onMove=testApp_frame__onMove;
testApp_t.prototype.publicFileSearchCallback=testApp_publicFileSearchCallback;
testApp_t.prototype.binding_tabList_itemSelect=testApp_binding_tabList_itemSelect;
testApp_t.prototype.binding_fileList_itemSelect=testApp_binding_fileList_itemSelect;
testApp_t.prototype.binding_publicStatusSelect_itemSelect=testApp_binding_publicStatusSelect_itemSelect;
testApp_t.prototype.binding_resultSelect_itemSelect=testApp_binding_resultSelect_itemSelect;
testApp_t.prototype.APP_ID=APP_ID_TEST;
testApp_t.prototype.APP_NAME="Test";
testApp_t.prototype.ICON_SRC=SYSTEM.Icon.App.WELCOME;
testApp_t.prototype.FRAME_WIDTH=800;
testApp_t.prototype.FRAME_HEIGHT=400;
}
catch(ex){
jsExDebug("testApp_t.prototype",ex);
}
function testApp_t(_1){
try{
this.testApp_super();
this.createFrame();
this.SYSTEM.Tooltip.hideLoading();
this.publicFileSearchDelegate=new this.SYSTEM.Delegate(this,this.publicFileSearchCallback);
}
catch(ex){
jsExDebug("testApp_t",ex);
}
}
function testApp_cleanUp(me){
try{
if(!me){
var me=this;
}
me.frame=null;
me.publicFilesContainer=null;
me.widgetContainer=null;
me.application_cleanUp();
}
catch(ex){
jsExDebug("testApp_cleanUp",ex);
}
}
var s=null;
function testApp_createFrame(){
try{
var _3=new this.SYSTEM.Frame.Window("frame",this.APP_NAME,this,this.FRAME_WIDTH,this.FRAME_HEIGHT,true,false,this.SYSTEM.Frame.CLOSE_BTN);
_3.setFixedDimensions(this.FRAME_WIDTH,this.FRAME_HEIGHT);
var w=this.SYSTEM.Widget;
var _5=[];
_5["Blue Care Location"]=[];
_5["Blue Care Location"]["Brisbane"]=[];
_5["Blue Care Location"]["Brisbane"]["Community Care"]=[];
_5["Blue Care Location"]["Brisbane"]["Community Care"]["..."]=[];
_5["Blue Care Location"]["Brisbane"]["Administration"]=[];
_5["Blue Care Location"]["Brisbane"]["Administration"]["..."]=[];
_5["Blue Care Location"]["Brisbane"]["Nursing Home"]=[];
_5["Blue Care Location"]["Brisbane"]["Nursing Home"]["..."]=[];
_5["Blue Care Location"]["Gold Coast"]=[];
_5["Blue Care Location"]["Gold Coast"]["Option1"]=[];
_5["Blue Care Location"]["Gold Coast"]["Option2"]=[];
_5["Blue Care Location"]["Gold Coast"]["Option3"]=[];
_5["Blue Care Location"]["Sunshine Coast"]=[];
_5["Blue Care Location"]["Sunshine Coast"]["Travel Agent"]=[];
_5["Blue Care Location"]["Sunshine Coast"]["Travel Agent"]["..."]=[];
_5["Blue Care Type"]=[];
_5["Blue Care Type"]["Aged Care"]=[];
_5["Blue Care Type"]["Aged Care"]["..."]=[];
_5["Blue Care Type"]["Community Care"]=[];
_5["Blue Care Type"]["Community Care"]["Brisbane"]=[];
_5["Blue Care Type"]["Community Care"]["Brisbane"]["..."]=[];
_5["Blue Care Type"]["Community Care"]["Gold Coast"]=[];
_5["Blue Care Type"]["Community Care"]["Gold Coast"]["Option1"]=[];
_5["Blue Care Type"]["Community Care"]["Gold Coast"]["Option2"]=[];
_5["Blue Care Type"]["Community Care"]["Gold Coast"]["Option3"]=[];
_5["Blue Care Type"]["Community Care"]["Sunshine Coast"]=[];
_5["Blue Care Type"]["Community Care"]["Sunshine Coast"]["..."]=[];
_5["Blue Care Type"]["Administration"]=[];
_5["Blue Care Type"]["Administration"]["Head Office"]=[];
_5["Blue Care Type"]["Administration"]["Head Office"]["..."]=[];
_5["Blue Care Type"]["Administration"]["Sunshine Coast"]=[];
_5["Blue Care Type"]["Administration"]["Sunshine Coast"]["..."]=[];
var _6=new basicTreeView_t("tree",12,true);
_6.setDimensions(250,500);
function addToTree(_7,_8,_9){
var _a=0;
for(var _b in _9){
_7.addItem(_8,_a,_b,1,(_8==null));
_a++;
addToTree(_7,_b,_9[_b]);
}
}
addToTree(_6,null,_5);
_6.draw();
_3.addWidget(_6,_3.leftEdgeWidth,_3.topEdgeHeight);
var _c=new basicTreeView_t("fileTree",12,true);
_c.setDimensions(500,500);
var fs=this.SYSTEM.Filesystem.folders;
var _e=[];
for(var _f in fs){
var _10=fs[_f].folderName;
_e[_10]=[];
for(var _11 in fs[_f].contents){
_e[_10][fs[_f].contents[_11].fileName]=[];
}
}
addToTree(_c,null,_e);
_c.draw();
_3.addWidget(_c,_3.leftEdgeWidth+250,_3.topEdgeHeight);
_3.show();
this.frame=_3;
}
catch(ex){
jsExDebug("testApp_createFrame",ex);
}
}
function testApp__SIG_KILL(){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("testApp__SIG_KILL",ex);
}
}
function testApp_frame__onClose(_12){
try{
this.cleanUp();
}
catch(ex){
jsExDebug("testApp_frame__onClose",ex);
}
}
function testApp_frame__onMove(_13){
try{
}
catch(ex){
jsExDebug("testApp_frame__onMove",ex);
}
}
function testApp_frame_keyUp(_14){
try{
var _15=this.frame.getWidget("searchText");
if(_15.hasFocus()){
this.SYSTEM.Filesystem.findPublicFiles(_15.getContent().toLowerCase(),this.publicFileSearchDelegate);
}
}
catch(ex){
jsExDebug("testApp_frame_keyUp",ex);
}
}
function testApp_publicFileSearchCallback(_16){
try{
if(_16){
this.frame.getWidget("resultSelect").clearList();
for(var i=0;i<_16.length;i++){
this.frame.getWidget("resultSelect").addItem(_16[i],"["+_16[i].fileType+"]"+_16[i].fileId+": "+_16[i].fileName+" ("+_16[i].fileAccess+")");
}
}
}
catch(ex){
jsExDebug("testApp_publicFileSearchCallback",ex);
}
}
function testApp_binding_tabList_itemSelect(_18){
try{
var _19=_18.getSelectedTabData();
switch(_19){
case "Public files":
this.publicFilesContainer.style.display="block";
this.widgetContainer.style.display="none";
break;
case "Widgets":
this.publicFilesContainer.style.display="none";
this.widgetContainer.style.display="block";
break;
}
}
catch(ex){
jsExDebug("testApp_binding_tabList_itemSelect",ex);
}
}
function testApp_binding_fileList_itemSelect(_1a){
try{
var _1b=_1a.getSelectedValue();
var _1c=this.SYSTEM.Filesystem.getPublicAccess(_1b);
this.frame.getWidget("fileIdLabel").setText("File ID: "+_1b);
this.frame.getWidget("publicStatusSelect").setSelectedValue(_1c);
}
catch(ex){
jsExDebug("testApp_binding_fileList_itemSelect",ex);
}
}
function testApp_binding_publicStatusSelect_itemSelect(_1d){
function callback(){
try{
this.SYSTEM.Tooltip.hideLoading();
}
catch(ex){
jsExDebug("testApp_binding_publicStatusSelect_itemSelect",ex);
}
}
function tooltipTimeout(){
try{
var _1e=this.frame.getWidget("fileList").getSelectedValue();
if(_1e&&_1f!=null){
this.SYSTEM.Filesystem.setPublicAccess(_1e,_1f,new this.SYSTEM.Delegate(this,callback));
}
}
catch(ex){
jsExDebug("testApp_binding_publicStatusSelect_itemSelect: tooltipTimeout",ex);
}
}
try{
var _1f=_1d.getSelectedValue();
if(_1f!=null){
this.SYSTEM.Tooltip.showLoading(new this.SYSTEM.Delegate(this,tooltipTimeout),null,"Setting public access...");
}
}
catch(ex){
jsExDebug("testApp_binding_publicStatusSelect_itemSelect",ex);
}
}
function testApp_binding_resultSelect_itemSelect(_20){
try{
var _21=_20.getSelectedValue();
if(_21&&_21.id){
switch(parseInt(_21.type)){
case this.SYSTEM.Filesystem.File.TYPE_SPREADSHEET:
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_SPREADSHEET,_21.id,null,true);
break;
case this.SYSTEM.Filesystem.File.TYPE_WRITER:
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_WRITER,_21.id,null,true);
break;
case this.SYSTEM.Filesystem.File.TYPE_IMAGE:
this.SYSTEM.APPLICATION_MANAGER.launch(APP_ID_MEDIA_VIEW,null,_21.id);
break;
}
}
}
catch(ex){
jsExDebug("testApp_binding_resultSelect_itemSelect",ex);
}
}

