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="";
m