(function()
{Profiler.profile('view/shared/assets/javascript/class.js',4,'(','function()',arguments);var initializing=false,fnTest=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;this.Base=function(){};Base.extend=function(prop)
{Profiler.profile('view/shared/assets/javascript/class.js',12,'Base.extend =','function(prop)',arguments);var _super=this.prototype;initializing=true;var prototype=new this();initializing=false;for(var name in prop)
{prototype[name]=typeof prop[name]=="function"&&typeof _super[name]=="function"&&fnTest.test(prop[name])?(function(name,fn)
{Profiler.profile('view/shared/assets/javascript/class.js',28,'(','function(name, fn)',arguments);return function()
{Profiler.profile('view/shared/assets/javascript/class.js',30,'return','function()',arguments);var tmp=this._super;this._super=_super[name];var ret=fn.apply(this,arguments);this._super=tmp;return ret;};})(name,prop[name]):prop[name];}
function Base()
{Profiler.profile('view/shared/assets/javascript/class.js',49,'Base','function Base()',arguments);if(!initializing&&this.init)
this.init.apply(this,arguments);}
Base.prototype=prototype;Base.constructor=Base;Base.extend=arguments.callee;return Base;};})();var ComponentBase=Class.extend({initialize:function(objElement,objParentObject,strComponentType,strComponentColumn)
{Profiler.profile('view/shared/assets/javascript/component_base.js',30,'initialize:','function(objElement, objParentObject, strComponentType, strComponentColumn)',arguments);var strComponentElementId=objElement.id;var reIdFormat=new RegExp('^'+strComponentType+'\\d+$');if(!strComponentElementId.match(reIdFormat))
{throw'Invalid source element for '+strComponentType+', ID: '+strComponentElementId;}
this.intId=strComponentElementId.substr(strComponentElementId.search(/\d+/));this.strUrlPrefix='/'+strComponentType+'/'+this.intId+'/';this.arrChildComponentElements=[];this.objChildComponentObjects={};this.objElementId=strComponentElementId;this.objParentObject=objParentObject;this.strComponentType=strComponentType;this.strComponentColumn=strComponentColumn;objComponentReferences[this.objElementId]=this;$j(objElement).data('objComponentInstance',this);},unLoad:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',67,'unLoad:','function()',arguments);},returnElementReference:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',73,'returnElementReference:','function()',arguments);return document.getElementById(this.objElementId);},returnComponentInstanceFromElement:function(objElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',78,'returnComponentInstanceFromElement:','function(objElement)',arguments);if($j(objElement).hasClass('component')===true)
{return $j(objElement).data('objComponentInstance');}
else
{var objComponentInstance=$j(objElement).parents('.component:first').data('objComponentInstance');if(typeof(objComponentInstance)=='undefined'||objComponentInstance==null)
{var strId=$j(objElement).parents('.component:first').attr('id');return this.returnComponentInstanceFromId(strId);}
else
{return objComponentInstance;}}},returnComponentInstanceFromId:function(strId)
{Profiler.profile('view/shared/assets/javascript/component_base.js',105,'returnComponentInstanceFromId:','function(strId)',arguments);if(typeof(objComponentReferences[strId])!='undefined')
{return objComponentReferences[strId];}
else
{return null;}},findChildComponents:function(objComponentElement,blnOnlyReturnComponentsArray)
{Profiler.profile('view/shared/assets/javascript/component_base.js',119,'findChildComponents:','function(objComponentElement, blnOnlyReturnComponentsArray)',arguments);var objFirstDecendantComponentElement=$j(objComponentElement).find('.component:first').get(0);if(objFirstDecendantComponentElement)
{this.arrChildComponentElements.push(objFirstDecendantComponentElement);this.findSiblingComponent(objFirstDecendantComponentElement);}
if(blnOnlyReturnComponentsArray===true)
{var arrChildComponentElements=[].concat(this.arrChildComponentElements);this.arrChildComponentElements=[];return arrChildComponentElements;}
else
{if(this.arrChildComponentElements.length>0)
{this.instantiateChildComponents();}}},findSiblingComponent:function(objComponentElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',155,'findSiblingComponent:','function(objComponentElement)',arguments);var blnIsContainerComponent=objComponentElement.className.split(' ').indexOf('container');switch(blnIsContainerComponent!=-1)
{case true:var objSourceSiblingComponentWrapperElement=$j(objComponentElement).parent('.containerWrapper:first').get(0);var objNextSiblingComponentWrapperElement=$j(objSourceSiblingComponentWrapperElement).next('.containerWrapper:first').get(0);if(objNextSiblingComponentWrapperElement)
{var objNextSiblingComponentElement=$j(objNextSiblingComponentWrapperElement).find('.component:first').get(0);}
break;case false:var objNextSiblingComponentElement=$j(objComponentElement).next('.component:first').get(0);break;}
if(objNextSiblingComponentElement)
{this.arrChildComponentElements.push(objNextSiblingComponentElement);this.findSiblingComponent(objNextSiblingComponentElement);}
return false;},instantiateChildComponents:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',190,'instantiateChildComponents:','function()',arguments);var _this=this;$j.each(this.arrChildComponentElements,function(intKey,objElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',195,'$j.each(this.arrChildComponentElements,','function(intKey, objElement)',arguments);var strComponentType=_this.getComponentType(objElement);var strComponentColumn=_this.getComponentColumn(objElement);if(eval("typeof("+_this.convertComponentTypeToJavascriptClass(strComponentType)+")")!='undefined')
{eval("var objComponent = new "+_this.convertComponentTypeToJavascriptClass(strComponentType)+"(objElement, _this, '"+strComponentType+"', '"+strComponentColumn+"')");if(typeof(_this.objChildComponentObjects[strComponentColumn])=='undefined')
{_this.objChildComponentObjects[strComponentColumn]=[];}
_this.objChildComponentObjects[strComponentColumn].push(objComponent);}});this.arrChildComponentElements=[];},removeChildComponent:function(objComponentObject)
{Profiler.profile('view/shared/assets/javascript/component_base.js',231,'removeChildComponent:','function(objComponentObject)',arguments);var strComponentColumn=objComponentObject.returnComponentColumn();if(typeof(this.objChildComponentObjects[strComponentColumn])!='undefined')
{var intIndex=$j.inArray(objComponentObject,this.objChildComponentObjects[strComponentColumn]);if(intIndex>-1)
{this.objChildComponentObjects[strComponentColumn].splice(intIndex,1);}}
if(this.countChildComponents("left")==0)
{Shell.resizeLeftColumnTo0Percent();}
if(strComponentColumn=='right'&&this.countChildComponents('right')==1)
{Shell.setRightColumnMode('fixed');}},countChildComponents:function(strComponentColumn)
{Profiler.profile('view/shared/assets/javascript/component_base.js',262,'countChildComponents:','function(strComponentColumn)',arguments);if(typeof(strComponentColumn)!='undefined')
{if(typeof(this.objChildComponentObjects[strComponentColumn])!='undefined')
{return this.objChildComponentObjects[strComponentColumn].length;}
else
{return 0;}}
else
{var intTotalComponentCount=0;$j.each(this.objChildComponentObjects,function(strKey,objProperty)
{Profiler.profile('view/shared/assets/javascript/component_base.js',285,'$j.each(this.objChildComponentObjects,','function(strKey, objProperty)',arguments);intTotalComponentCount+=objProperty.length;});return intTotalComponentCount;}},getComponentType:function(objComponentElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',297,'getComponentType:','function(objComponentElement)',arguments);var strComponentClass=$j(objComponentElement).attr('class').split(' ');if(strComponentClass[1])
{return strComponentClass[1];}
else
{return'';}},getComponentColumn:function(objComponentElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',314,'getComponentColumn:','function(objComponentElement)',arguments);var strComponentColumn=$j(objComponentElement).attr('class').split(' ');if(strComponentColumn[2])
{return strComponentColumn[2].split('_')[1];}
else
{return'';}},getComponentFromType:function(strRequestedComponentType,strComponentColumn,blnIncludeLocked)
{Profiler.profile('view/shared/assets/javascript/component_base.js',331,'getComponentFromType:','function(strRequestedComponentType, strComponentColumn, blnIncludeLocked)',arguments);var blnIncludeLocked=(typeof(blnIncludeLocked)!='undefined')?blnIncludeLocked:false;var strComponentColumn=(typeof(strComponentColumn)!='undefined')?strComponentColumn:'';var arrMatchingComponentTypes=this.getComponentsFromType(strRequestedComponentType,strComponentColumn,blnIncludeLocked);return arrMatchingComponentTypes[0];},getComponentsFromType:function(strRequestedComponentType,strComponentColumn,blnIncludeLocked)
{Profiler.profile('view/shared/assets/javascript/component_base.js',346,'getComponentsFromType:','function(strRequestedComponentType, strComponentColumn, blnIncludeLocked)',arguments);var blnIncludeLocked=(typeof(blnIncludeLocked)!='undefined')?blnIncludeLocked:false;var strComponentColumn=(typeof(strComponentColumn)!='undefined')?strComponentColumn:'';var arrMatchingComponentTypes=[];var arrMergedChildComponentObjects=[];if(strComponentColumn!='')
{if(typeof(this.objChildComponentObjects[strComponentColumn])!='undefined')
{var arrMergedChildComponentObjects=this.objChildComponentObjects[strComponentColumn];}
else
{return[];}}
else
{$j.each(this.objChildComponentObjects,function(mixKey,objComponent)
{Profiler.profile('view/shared/assets/javascript/component_base.js',376,'$j.each(this.objChildComponentObjects,','function(mixKey, objComponent)',arguments);arrMergedChildComponentObjects.push(objComponent);});}
arrMergedChildComponentObjects=arrMergedChildComponentObjects.concat.apply([],arrMergedChildComponentObjects);$j.each(arrMergedChildComponentObjects,function(intKey,objComponent)
{Profiler.profile('view/shared/assets/javascript/component_base.js',385,'$j.each(arrMergedChildComponentObjects,','function(intKey, objComponent)',arguments);var strCurrentComponentType=objComponent.returnComponentType();var objComponentParent=objComponent.returnComponentParent();var blnIsContainerLocked=(typeof(objComponent.returnLockedState)!="undefined")?objComponent.returnLockedState():false;var blnIsComponentParentContainerLocked=(typeof(objComponentParent.returnLockedState)!="undefined")?objComponentParent.returnLockedState():false;if(!blnIncludeLocked)
{if(blnIsComponentParentContainerLocked||blnIsContainerLocked)
{return true;}}
if(strCurrentComponentType==strRequestedComponentType)
{arrMatchingComponentTypes.push(objComponent);}
arrMatchingComponentTypes=arrMatchingComponentTypes.concat(objComponent.getComponentsFromType(strRequestedComponentType,strComponentColumn,blnIncludeLocked));});return arrMatchingComponentTypes;},returnComponentType:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',420,'returnComponentType:','function()',arguments);if(!this.strComponentType||typeof(this.strComponentType)=="undefined")
{alert("String strComponentType property is not defined!");return false;}
return this.strComponentType;},returnComponentColumn:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',435,'returnComponentColumn:','function()',arguments);if(!this.strComponentColumn||typeof(this.strComponentColumn)=="undefined")
{alert("String strComponentColumn property is not defined!");return false;}
return this.strComponentColumn;},returnComponentParent:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',450,'returnComponentParent:','function()',arguments);if(!this.objParentObject||typeof(this.objParentObject)=="undefined")
{alert("Object objParentObject property is not defined!");return false;}
return this.objParentObject;},convertComponentTypeToJavascriptClass:function(strComponentType)
{Profiler.profile('view/shared/assets/javascript/component_base.js',465,'convertComponentTypeToJavascriptClass:','function(strComponentType)',arguments);var strComponentJavascriptClassName="";strComponentJavascriptClassName=strComponentType.substr(0,1).toUpperCase()+strComponentType.substr(1);var explode=strComponentJavascriptClassName.split('_');var implode=[];$j.each(explode,function(mixKey,strWord)
{Profiler.profile('view/shared/assets/javascript/component_base.js',476,'$j.each(explode,','function(mixKey, strWord)',arguments);implode.push(strWord.substr(0,1).toUpperCase()+strWord.substr(1));});strComponentJavascriptClassName=implode.join('');return strComponentJavascriptClassName;},beginUpdateInitCode:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',488,'beginUpdateInitCode:','function()',arguments);this.executeUpdateInitCode();this.executeUpdateInitCode();$j.each(this.objChildComponentObjects,function(strKey,objProperty)
{Profiler.profile('view/shared/assets/javascript/component_base.js',495,'$j.each(this.objChildComponentObjects,','function(strKey, objProperty)',arguments);$j.each(objProperty,function(mixKey,objComponent)
{Profiler.profile('view/shared/assets/javascript/component_base.js',499,'$j.each(objProperty,','function(mixKey, objComponent)',arguments);objComponent.beginUpdateInitCode();});});},executeUpdateInitCode:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',508,'executeUpdateInitCode:','function()',arguments);var _this=this;if($j('#'+this.strComponentType+this.intId).length==0)
{delete objComponentUpdateCode[this.intId];return false;}
if(typeof(objComponentUpdateCode[this.intId])!='undefined')
{$j.each(objComponentUpdateCode[this.intId],function(mixKey,objFunction)
{Profiler.profile('view/shared/assets/javascript/component_base.js',523,'$j.each(objComponentUpdateCode[this.intId],','function(mixKey, objFunction)',arguments);objFunction();});delete objComponentUpdateCode[this.intId];}},shutDown:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',537,'shutDown:','function()',arguments);this.executePreUpdateHandler();},enable:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',544,'enable:','function()',arguments);if(this.strComponentType=='container')
{Container.enable(this);}
else if(this.objParentObject!=null)
{Container.enable(this.objParentObject);}},disable:function(strOpacity)
{Profiler.profile('view/shared/assets/javascript/component_base.js',559,'disable:','function(strOpacity)',arguments);if(this.strComponentType=='container')
{Container.disable(this,strOpacity);}
else if(this.objParentObject!=null)
{Container.disable(this.objParentObject,strOpacity);}},enableElement:function(mixElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',572,'enableElement:','function(mixElement)',arguments);if(typeof(mixElement)!='object')
{var objElement=$j('#'+mixElement);if(!objElement)
{return false;}}
else
{var objElement=$j(mixElement);}
$j('.overlay',objElement).remove();return true;},disableElement:function(mixElement,strOpacity,strHexColor,strCursorMode,blnDisableLoadingWidget)
{Profiler.profile('view/shared/assets/javascript/component_base.js',596,'disableElement:','function(mixElement, strOpacity, strHexColor, strCursorMode, blnDisableLoadingWidget)',arguments);if(typeof(mixElement)!='object')
{var objElement=$j('#'+mixElement);if(!objElement)
{return false;}}
else
{var objElement=$j(mixElement);}
if($j('.overlay',objElement).length>0)
{return true;}
var objOverlay=$j(document.createElement('div'));objOverlay.attr('class','overlay');var objElementOffset=objElement.offset();var intTop=objElementOffset.top;var intLeft=objElementOffset.left;var intWidth=objElement.width();var intHeight=objElement.height();var strOpacity=(typeof(strOpacity)!="undefined")?strOpacity:"0.5";var strHexColor=(typeof(strHexColor)!="undefined")?strHexColor:"#ffffff";var strCursorMode=(typeof(strCursorMode)!="undefined")?strCursorMode:"wait";objOverlay.css({'position':'absolute','top':'0px','left':'0px','width':parseInt(intWidth)+'px','height':parseInt(intHeight)+'px','background':strHexColor,'opacity':strOpacity,'cursor':strCursorMode,'z-index':9999});objElement.append(objOverlay);return true;},registerPreUpdateHandler:function(handler)
{Profiler.profile('view/shared/assets/javascript/component_base.js',665,'registerPreUpdateHandler:','function(handler)',arguments);this.preUpdateHandler=handler;},executePreUpdateHandler:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',672,'executePreUpdateHandler:','function()',arguments);if(this.preUpdateHandler&&this.preUpdateHandler!=null)
{this.preUpdateHandler();}
this.preUpdateHandler=undefined;},ajaxRequest:function(strURL,objParams,objOnComplete,objSettings)
{Profiler.profile('view/shared/assets/javascript/component_base.js',698,'ajaxRequest:','function(strURL, objParams, objOnComplete, objSettings)',arguments);if(typeof(objSettings)!='undefined')
{if(typeof(objSettings.blnDisableComponent)!='undefined'&&objSettings.blnDisableComponent===true)
{this.disable();}
var blnRenableComponent=typeof(objSettings.blnRenableComponent)!='undefined'?objSettings.blnRenableComponent:true;if(typeof(objSettings.blnApplyPrefix)!='undefined'&&objSettings.blnApplyPrefix===true)
{strURL=this.strUrlPrefix+strURL;}
if((typeof(objSettings.blnUpdateElement)!='undefined')&&(objSettings.blnUpdateElement===true))
{var blnUpdateElement=true;}
else
{var blnUpdateElement=false;}}
else
{var blnUpdateElement=false;var blnRenableComponent=true;}
var _this=this;var objOptions={async:true,cache:false,data:objParams,type:'POST',url:strURL};if(blnUpdateElement===true)
{var objTargetElement=(typeof(objSettings.objTargetElement)!='undefined')?objSettings.objTargetElement:this.returnElementReference();if($j(objTargetElement).attr('id')=='lbContent')
{objOptions.data.blnIsLightBox=true;}
else
{objOptions.data.blnIsLightBox=false;}
var objOnCompleteFunction=function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/component_base.js',761,'var objOnCompleteFunction =','function(XMLHttpRequest)',arguments);var objElement=$j(objTargetElement);if(objElement.length>0)
{var strResponseText=_this.filterXmlResponse(XMLHttpRequest.responseText,objElement.get(0)==_this.returnElementReference());objElement.html(strResponseText);}
else
{dbg('Element does not exist:');dbg(objSettings.objTargetElement);}
_this.respondToUpdate(objOnComplete,XMLHttpRequest,blnRenableComponent,strURL);};}
else
{var objOnCompleteFunction=function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/component_base.js',787,'var objOnCompleteFunction =','function(XMLHttpRequest)',arguments);_this.respondToUpdate(objOnComplete,XMLHttpRequest,blnRenableComponent,strURL);};}
objOptions.complete=objOnCompleteFunction;if(typeof(objSettings)!='undefined')
{if(typeof(objSettings.strResponseDataType)!='undefined')
{objOptions.dataType=objSettings.strResponseDataType;}
if(typeof(objSettings.objOnSuccess)!='undefined')
{objOptions.success=function(strResponseText)
{Profiler.profile('view/shared/assets/javascript/component_base.js',804,'objOptions.success =','function(strResponseText)',arguments);objSettings.objOnSuccess.call(null,strResponseText);};}}
$j.ajax(objOptions);},filterXmlResponse:function(strXml,blnTargetIsComponent)
{Profiler.profile('view/shared/assets/javascript/component_base.js',815,'filterXmlResponse:','function(strXml, blnTargetIsComponent)',arguments);strXml=strXml.replace(/<\?xml [^<]*?>/gi,'');strXml=strXml.replace(/<!doctype [^<]*>/gi,'');if(blnTargetIsComponent===false)
{strXml=strXml.replace(/<div [^>]*class="notification_message".*?>([\s\S]*?)<\/div>/i,'');}
strXml=$j.trim(strXml);return strXml;},update:function(urlSuffix,objParams,objOnComplete,objOverrideTargetElement,blnDisableComponent,blnBypassPreUpdate,blnRenableComponent)
{Profiler.profile('view/shared/assets/javascript/component_base.js',839,'update:','function(urlSuffix, objParams, objOnComplete, objOverrideTargetElement, blnDisableComponent, blnBypassPreUpdate, blnRenableComponent)',arguments);var objParams=(typeof(objParams)!='undefined')?objParams:{};var objOnComplete=(typeof(objOnComplete)!='undefined')?objOnComplete:null;var objTargetElement=(typeof(objOverrideTargetElement)!='undefined'&&objOverrideTargetElement!=null)?objOverrideTargetElement:this.returnElementReference();var blnBypassPreUpdate=(typeof(blnBypassPreUpdate)!='undefined')?blnBypassPreUpdate:false;var blnRenableComponent=(typeof(blnRenableComponent)!='undefined')?blnRenableComponent:true;if(($j(objTargetElement).get(0)!=this.returnElementReference())&&(blnDisableComponent!==true))
{var blnDisableComponent=false;}
else
{var blnDisableComponent=(typeof(blnDisableComponent)!='undefined')?blnDisableComponent:true;}
objParams['IM4SESSID']=Shell.getCurrentSession();if(blnBypassPreUpdate!==true)
{this.executePreUpdateHandler();}
var objSettings={blnApplyPrefix:true,blnDisableComponent:blnDisableComponent,blnRenableComponent:blnRenableComponent,blnUpdateElement:true,objTargetElement:objTargetElement};this.ajaxRequest(urlSuffix,objParams,objOnComplete,objSettings);},respondToUpdate:function(objOnComplete,XMLHttpRequest,blnRenableComponent,requestURL)
{Profiler.profile('view/shared/assets/javascript/component_base.js',883,'respondToUpdate:','function(objOnComplete, XMLHttpRequest, blnRenableComponent, requestURL)',arguments);if(blnRenableComponent===true)
{this.executeUpdateInitCode();this.enable();}
if(objOnComplete!=null)
{objOnComplete(XMLHttpRequest);}
var arrRequestURLParts=requestURL.split("/");var strComponent=arrRequestURLParts[1];ContextualHelp.registerContextHelpers(strComponent);},externalUpdate:function(strURL,objParams)
{Profiler.profile('view/shared/assets/javascript/component_base.js',912,'externalUpdate:','function(strURL, objParams)',arguments);var objParams=(typeof(objParams)!='undefined')?objParams:{};this.preUpdateHandler=(typeof(this.calculatePreUpdateHandlerForUpdate)!='undefined')?this.calculatePreUpdateHandlerForUpdate(strURL):null;this.executePreUpdateHandler();var objOverrideTargetElement=(typeof(this.calculateTargetForUpdate)!='undefined')?this.calculateTargetForUpdate():null;var strURL=strURL.replace('%3F','?');this.update(strURL,objParams,null,objOverrideTargetElement,true);},notify:function(urlSuffix,objParams,objOnComplete)
{Profiler.profile('view/shared/assets/javascript/component_base.js',932,'notify:','function(urlSuffix, objParams, objOnComplete)',arguments);var objParams=(typeof(objParams)!='undefined')?objParams:{};var objOnComplete=(typeof(objOnComplete)!='undefined')?objOnComplete:null;objParams['IM4SESSID']=Shell.getCurrentSession();var objSettings={blnApplyPrefix:true};this.ajaxRequest(urlSuffix,objParams,objOnComplete,objSettings);},showNotifcationMessage:function(strMessage,objStyles)
{Profiler.profile('view/shared/assets/javascript/component_base.js',951,'showNotifcationMessage:','function(strMessage, objStyles)',arguments);var objStyles=(typeof(objStyles)!="undefined")?objStyles:false;var objNotificationMessageElement=$j(this.returnElementReference()).find('.notification_message:first');var strMessageHTML=strMessage;objNotificationMessageElement.css('display','');objNotificationMessageElement.html(strMessageHTML);if(objStyles)
{objNotificationMessageElement.css(objStyles);}},hideNotifcationMessage:function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',976,'hideNotifcationMessage:','function()',arguments);var objNotificationMessageElement=$j(this.returnElementReference()).find('.notification_message:first');objNotificationMessageElement.css('display','none');},cloneDraggableElement:function(srcElement,intElementId,strIdPrefix,strClassName,blnShadow)
{Profiler.profile('view/shared/assets/javascript/component_base.js',986,'cloneDraggableElement:','function(srcElement, intElementId, strIdPrefix, strClassName, blnShadow)',arguments);if(typeof(blnShadow)=='undefined')
{blnShadow=true;}
var objElement=$j(srcElement);var strElementSrcClass=objElement.attr('class');var strElementSrc=objElement.attr('original_src');var objClonedElement=document.createElement('img');$j(objClonedElement).attr({'id':strIdPrefix+'_'+intElementId,'class':strClassName+' '+strElementSrcClass,'src':strElementSrc,'original_src':strElementSrc,'style':'position:absolute;z-index:1000000;display:none;'});document.body.appendChild(objClonedElement);$j('#'+strIdPrefix+'_'+intElementId).css({width:objElement.width(),height:objElement.height(),top:objElement.offset().top,left:objElement.offset().left,display:''});var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{this.makePngsTransparent(strIdPrefix+'_'+intElementId,true);}
return objClonedElement;},removeClonedDraggableElement:function(strElementId)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1041,'removeClonedDraggableElement:','function(strElementId)',arguments);$j('#'+strElementId).draggable('destroy');$j('#'+strElementId).unbind();$j('#'+strElementId).remove();},initiateMouseMoveTracking:function(event)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1053,'initiateMouseMoveTracking:','function(event)',arguments);this.objMouseMoveStartPosition={x:event.pageX,y:event.pageY};$j(document).bind('mouseup',this.objCachedMethod_Release);},killMouseMoveTracking:function(event)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1061,'killMouseMoveTracking:','function(event)',arguments);$j(document).unbind('mouseup',this.objCachedMethod_Release);var intXMovement=Math.abs(this.objMouseMoveStartPosition.x-event.pageX);var intYMovement=Math.abs(this.objMouseMoveStartPosition.y-event.pageY);return{x:intXMovement,y:intYMovement};},makePngsTransparent:function(mixString,blnIsId,objOverridingContainerElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1073,'makePngsTransparent:','function(mixString, blnIsId, objOverridingContainerElement)',arguments);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{if(blnIsId===true)
{var arrElements=[document.getElementById(mixString)];}
else
{var objElement=(typeof(objOverridingContainerElement)!="undefined")?objOverridingContainerElement:this.returnElementReference();if(typeof(mixString)!='undefined'&&mixString!='')
{var arrElements=$j(objElement).find('img.'+mixString);}
else
{var arrElements=$j(objElement).find('img');}}
$j.each(arrElements,function(strKey,objChildElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1098,'$j.each(arrElements,','function(strKey, objChildElement)',arguments);var strSource=objChildElement.src;var intWidth=parseInt(objChildElement.width);var intHeight=parseInt(objChildElement.height);$j(objChildElement).bind('load',function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',1105,'$j(objChildElement).bind(\'load\',','function()',arguments);$j(objChildElement).unbind('load');$j(objChildElement).css({background:'none',filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+strSource+"', sizingMethod='scale')",width:intWidth+'px',height:intHeight+'px'});$j(objChildElement).attr('src','/view/shared/assets/images/blank.gif');});$j(objChildElement).attr('src',strSource);});}},makeBackgroundPngTransparent:function(strElementId,blnIsElement,intOverridingWidth,intOverridingHeight)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1128,'makeBackgroundPngTransparent:','function(strElementId, blnIsElement, intOverridingWidth, intOverridingHeight)',arguments);var blnIsElement=(typeof(blnIsElement)!='undefined')?blnIsElement:false;var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{if(blnIsElement)
{var objElements=$j(strElementId);}
else
{var objElements=$j('#'+strElementId);}
objElements.each(function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',1145,'objElements.each(','function()',arguments);var objElement=$j(this);var strBackgroundUrl=objElement.css('background-image');strBackgroundUrl=strBackgroundUrl.substr(5);strBackgroundUrl=strBackgroundUrl.substr(0,strBackgroundUrl.length-2);var intWidth=(typeof(intOverridingWidth)=='number')?intOverridingWidth:parseInt(objElement.css('width'));var intHeight=(typeof(intOverridingHeight)=='number')?intOverridingHeight:parseInt(objElement.css('height'));var objPreloadedImage=new Image(intWidth,intHeight);$j(objPreloadedImage).bind('load',function()
{Profiler.profile('view/shared/assets/javascript/component_base.js',1158,'$j(objPreloadedImage).bind(\'load\',','function()',arguments);$j(objPreloadedImage).unbind('load');objElement.css({background:'none',filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+strBackgroundUrl+"', sizingMethod='crop')",width:intWidth+'px',height:intHeight+'px'});});$j(objPreloadedImage).attr('src',strBackgroundUrl);});}}});ComponentBase.getComponentElement=function(srcElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1185,'ComponentBase.getComponentElement =','function(srcElement)',arguments);var componentElement=$j(srcElement).parents('.component:first').get(0);return componentElement;};ComponentBase.getComponentInstance=function(srcElement)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1195,'ComponentBase.getComponentInstance =','function(srcElement)',arguments);var objComponentInstance=objShell.returnComponentInstanceFromElement(srcElement);if(objComponentInstance==null)
{throw'Missing component instance';}
return objComponentInstance;};ComponentBase.getComponentInstanceFromId=function(strComponentType,intComponentId)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1209,'ComponentBase.getComponentInstanceFromId =','function(strComponentType, intComponentId)',arguments);var objComponentInstance=objShell.returnComponentInstanceFromId(strComponentType+intComponentId);if(objComponentInstance==null)
{throw'Missing component instance';}
return objComponentInstance;};ComponentBase.setupAutoCompletion=function(strCompletionType,strDestinationElementId,strSuggestionsElementId,objAdditionalParams,objFormatItem,objFormatMatch,objFormatResult)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1220,'ComponentBase.setupAutoCompletion =','function(strCompletionType, strDestinationElementId, strSuggestionsElementId, objAdditionalParams, objFormatItem, objFormatMatch, objFormatResult)',arguments);var objAdditionalParams=(typeof(objAdditionalParams)!='undefined')?objAdditionalParams:{};var objSuggestionsElement=$j('#'+strDestinationElementId);if(objSuggestionsElement.length==0)
{return false;}
var objFormatItem=function(strResult,intPosition,intTotalItems,strSearchTerm)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1235,'var objFormatItem =','function(strResult, intPosition, intTotalItems, strSearchTerm)',arguments);var objResult=$j.evalJSON(strResult);return objResult.name;};var objFormatResult=function(strResult,intPosition,intTotalItems)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1242,'var objFormatResult =','function(strResult, intPosition, intTotalItems)',arguments);var objResult=$j.evalJSON(strResult);return objResult.name;};objSuggestionsElement.autocomplete('/shell/0/autoCompletion/'+strCompletionType,{minChars:3,cacheLength:1,matchSubset:true,matchCase:false,matchContains:true,selectFirst:true,extraParams:objAdditionalParams,multiple:true,multipleSeparator:', ',max:100,scroll:true,scrollHeight:180,formatItem:objFormatItem,formatResult:objFormatResult}).result(function(event,objData,strFormatted)
{Profiler.profile('view/shared/assets/javascript/component_base.js',1267,'}).result(','function(event, objData, strFormatted)',arguments);if(objData)
{$j('#'+strDestinationElementId).val(objData[1]);}});};blnDebugActive=false;if(String(document.location).indexOf('debug=on')>-1)
{setDebugMode(true);}
function dbg(value)
{Profiler.profile('view/shared/assets/javascript/misc.js',40,'dbg','function dbg(value)',arguments);if(blnDebugActive===true)
{console.log(value);}}
function setDebugMode(blnMode)
{Profiler.profile('view/shared/assets/javascript/misc.js',51,'setDebugMode','function setDebugMode(blnMode)',arguments);blnDebugActive=blnMode;$j('#consoleLogArea').show();if(blnMode===true&&typeof(console)=='undefined')
{$j(document).find('body:first').append("<script type='text/javascript' src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>");}}
function emulateConsoleLog()
{Profiler.profile('view/shared/assets/javascript/misc.js',64,'emulateConsoleLog','function emulateConsoleLog()',arguments);var objDebugAreaText=$j('#consoleLogAreaText');if(objDebugAreaText.length==0)
{var objDebugArea=document.createElement('div');$j(objDebugArea).attr({'id':'consoleLogArea'});$j(objDebugArea).css({'position':'absolute','bottom':'0px','left':'0px','width':'100%','background-color':'#ffffff','border-top-style':'solid','border-top-width':'2px','border-top-color':'#000000','padding':'0px','zIndex':'100000','display':'none'});var objDebugAreaHandle=document.createElement('div');$j(objDebugAreaHandle).attr({'id':'consoleLogAreaHandle'});$j(objDebugAreaHandle).css({'position':'absolute','top':'0px','left':'100px','margin-top':'-27px','width':'125px','height':'20px','padding-top':'5px','border-style':'solid','border-width':'2px','border-color':'#000000','border-bottom':'none','background-color':'#C9EDFB','color':'#25408F','font-weight':'bold','font-size':'12px','text-align':'center','cursor':'pointer'});$j(objDebugAreaHandle).html('Toggle Console');$j(objDebugAreaHandle).bind('click',function()
{Profiler.profile('view/shared/assets/javascript/misc.js',126,'$j(objDebugAreaHandle).bind(\'click\',','function()',arguments);if($j('#consoleLogAreaText').css('display')=='none')
{$j('#consoleLogAreaText').toggle('blind',{},500,function()
{Profiler.profile('view/shared/assets/javascript/misc.js',130,'$j(\'#consoleLogAreaText\').toggle(\'blind\', {}, 500,','function()',arguments);$j('#consoleLogAreaConsole').toggle();$j('#consoleLogAreaText').scrollTo('max');});}
else
{$j('#consoleLogAreaConsole').toggle();$j('#consoleLogAreaText').toggle('blind',{},500,function()
{Profiler.profile('view/shared/assets/javascript/misc.js',142,'$j(\'#consoleLogAreaText\').toggle(\'blind\', {}, 500,','function()',arguments);$j('#consoleLogAreaText').scrollTo('max');});}});var objDebugAreaContent=document.createElement('div');$j(objDebugAreaContent).attr({'id':'consoleLogAreaContent'});$j(objDebugAreaContent).css({'position':'relative','top':'0px','left':'0px','width':'100%','padding':'0px','margin':'0px'});var objDebugAreaText=document.createElement('div');$j(objDebugAreaText).attr({'id':'consoleLogAreaText'});$j(objDebugAreaText).css({'position':'relative','top':'0px','left':'0px','width':'100%','height':'500px','padding':'5px','padding-bottom':'15px','margin-bottom':'20px','overflow':'auto','overflow-x':'hidden','display':'none'});var objDebugAreaConsole=document.createElement('input');$j(objDebugAreaConsole).attr({'id':'consoleLogAreaConsole'});$j(objDebugAreaConsole).css({'position':'absolute','bottom':'0px','left':'0px','width':'100%','height':'20px','padding':'0px','display':'none'});$j(objDebugAreaConsole).bind('keydown',function(event)
{Profiler.profile('view/shared/assets/javascript/misc.js',211,'$j(objDebugAreaConsole).bind(\'keydown\',','function(event)',arguments);if(event.keyCode==13)
{var strJSCommand=$j('#consoleLogAreaConsole').val();$j('#consoleLogAreaConsole').val('');eval(strJSCommand);}});$j(objDebugAreaContent).append(objDebugAreaHandle);$j(objDebugAreaContent).append(objDebugAreaText);$j(objDebugAreaContent).append(objDebugAreaConsole);$j(objDebugArea).append(objDebugAreaContent);$j(document).find('body:first').append(objDebugArea);objDebugAreaText=$j(objDebugAreaText);}
$j.each(arguments,function(intKey,mixArgument)
{Profiler.profile('view/shared/assets/javascript/misc.js',237,'$j.each(arguments,','function(intKey, mixArgument)',arguments);objDebugAreaText.append('<hr />');var strType=typeof(mixArgument);switch(strType)
{case'undefined':objDebugAreaText.append('undefined');break;case'string':objDebugAreaText.append(mixArgument);break;case'number':case'boolean':objDebugAreaText.append(mixArgument+'');break;case'function':objDebugAreaText.append(mixArgument.toString());break;default:if(mixArgument==null)
{objDebugAreaText.append('null');}
else
{objDebugAreaText.append(emulateConsoleLogObject(mixArgument));}}});objDebugAreaText.scrollTo('max');}
function emulateConsoleLogObject(objObject)
{Profiler.profile('view/shared/assets/javascript/misc.js',281,'emulateConsoleLogObject','function emulateConsoleLogObject(objObject)',arguments);var strOutput='';$j.each(objObject,function(mixKey,mixValue)
{Profiler.profile('view/shared/assets/javascript/misc.js',285,'$j.each(objObject,','function(mixKey, mixValue)',arguments);var strType=typeof(mixValue);strOutput+='<strong>'+mixKey+':</strong><ul style="margin-bottom:10px;"><li style="margin-top:5px;margin-left:25px;">'
switch(strType)
{case'string':strOutput+=mixValue;break;case'number':case'boolean':strOutput+=mixValue+'';break;case'function':strOutput+='function()';break;default:if(mixValue==null)
{strOutput+='null';}
else
{}}
strOutput+='</li></ul>';});return strOutput;}
function onKeyDownCheckForEnter(event,actionFunc)
{Profiler.profile('view/shared/assets/javascript/misc.js',329,'onKeyDownCheckForEnter','function onKeyDownCheckForEnter(event, actionFunc)',arguments);if(event.keyCode==13)
{actionFunc();}}
function getSelectedRadioValue(strRadioGroupName)
{Profiler.profile('view/shared/assets/javascript/misc.js',340,'getSelectedRadioValue','function getSelectedRadioValue(strRadioGroupName)',arguments);var objSelectedRadioElement=$j('input[type="radio"][name="'+strRadioGroupName+'"]:checked');if(objSelectedRadioElement.length>0)
{return objSelectedRadioElement.val();}
else
{return'';}}
function initDateFields(strPrefix,intDefaultYear,intDefaultMonth,intDefaultDay)
{Profiler.profile('view/shared/assets/javascript/misc.js',355,'initDateFields','function initDateFields(strPrefix, intDefaultYear, intDefaultMonth, intDefaultDay)',arguments);var objNow=new Date();var intDefaultYear=(typeof(intDefaultYear)!='undefined')?intDefaultYear:objNow.getFullYear();var intDefaultMonth=(typeof(intDefaultMonth)!='undefined')?intDefaultMonth:objNow.getMonth();var intDefaultDay=(typeof(intDefaultDay)!='undefined')?intDefaultDay:objNow.getDate();var arrYearOptions=$j('#'+strPrefix+'_year option');$j.each(arrYearOptions,function(intKey,objOption)
{Profiler.profile('view/shared/assets/javascript/misc.js',366,'$j.each(arrYearOptions,','function(intKey, objOption)',arguments);if(objOption.value==intDefaultYear)
{$j('#'+strPrefix+'_year').get(0).selectedIndex=intKey;return false;}});var arrMonthOptions=$j('#'+strPrefix+'_month option');$j.each(arrMonthOptions,function(intKey,objOption)
{Profiler.profile('view/shared/assets/javascript/misc.js',376,'$j.each(arrMonthOptions,','function(intKey, objOption)',arguments);if(objOption.value==intDefaultMonth)
{$j('#'+strPrefix+'_month').get(0).selectedIndex=intKey;return false;}});updateDateFields(strPrefix);var arrDayOptions=$j('#'+strPrefix+'_day option');$j.each(arrDayOptions,function(intKey,objOption)
{Profiler.profile('view/shared/assets/javascript/misc.js',389,'$j.each(arrDayOptions,','function(intKey, objOption)',arguments);if(objOption.value==intDefaultDay)
{$j('#'+strPrefix+'_day').get(0).selectedIndex=intKey;return false;}});}
function updateDateFields(strPrefix)
{Profiler.profile('view/shared/assets/javascript/misc.js',399,'updateDateFields','function updateDateFields(strPrefix)',arguments);intYear=$j('#'+strPrefix+'_year').val();intMonth=$j('#'+strPrefix+'_month').val();intTotalDays=calculateDaysInMonth(intYear,intMonth);var objDay=$j('#'+strPrefix+'_day').get(0);intSelectedDay=objDay.selectedIndex;objDay.options.length=0;for(intCount=1;intCount<=intTotalDays;intCount++)
{objDay.options[intCount-1]=new Option(intCount,intCount);}
objDay.selectedIndex=(intSelectedDay<=intTotalDays-1)?intSelectedDay:intTotalDays-1;}
function calculateDaysInMonth(intYear,intMonth)
{Profiler.profile('view/shared/assets/javascript/misc.js',422,'calculateDaysInMonth','function calculateDaysInMonth(intYear, intMonth)',arguments);objDate=new Date(intYear,intMonth,0);intTotalDays=objDate.getDate();return intTotalDays;}
function doRegExp(value,regExp)
{Profiler.profile('view/shared/assets/javascript/misc.js',433,'doRegExp','function doRegExp(value, regExp)',arguments);return regExp.test(value);}
function isFieldBlank(value)
{Profiler.profile('view/shared/assets/javascript/misc.js',440,'isFieldBlank','function isFieldBlank(value)',arguments);var strFilteredValue=value.replace(/\s/g,'');if(strFilteredValue=='')
{return true;}
else
{return false;}}
function isFieldNumeric(value)
{Profiler.profile('view/shared/assets/javascript/misc.js',458,'isFieldNumeric','function isFieldNumeric(value)',arguments);var regExp=/^[0-9]+$/;return doRegExp(value,regExp);}
function isFieldDecimal(value)
{Profiler.profile('view/shared/assets/javascript/misc.js',469,'isFieldDecimal','function isFieldDecimal(value)',arguments);var regExp=/^[0-9]+\.[0-9]+$/;return doRegExp(value,regExp);}
function isFieldEmail(value)
{Profiler.profile('view/shared/assets/javascript/misc.js',480,'isFieldEmail','function isFieldEmail(value)',arguments);var regExp=/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;return doRegExp(value,regExp);}
function highlightFields(arrFields,blnFocusFirst)
{Profiler.profile('view/shared/assets/javascript/misc.js',492,'highlightFields','function highlightFields(arrFields, blnFocusFirst)',arguments);var arrFields=arrFields.concat.apply([],arrFields);$j.each(arrFields,function(intKey,objFieldElement)
{Profiler.profile('view/shared/assets/javascript/misc.js',497,'$j.each(arrFields,','function(intKey, objFieldElement)',arguments);$j(objFieldElement).addClass('highlightField');});if(blnFocusFirst)
{arrFields[0].focus();}}
function unHighlightFields(arrFields)
{Profiler.profile('view/shared/assets/javascript/misc.js',510,'unHighlightFields','function unHighlightFields(arrFields)',arguments);var arrFields=arrFields.concat.apply([],arrFields);$j.each(arrFields,function(intKey,objFieldElement)
{Profiler.profile('view/shared/assets/javascript/misc.js',515,'$j.each(arrFields,','function(intKey, objFieldElement)',arguments);$j(objFieldElement).removeClass('highlightField');});}
function checkEmptyFields(arrMandatoryFields,objFunc)
{Profiler.profile('view/shared/assets/javascript/misc.js',532,'checkEmptyFields','function checkEmptyFields(arrMandatoryFields, objFunc)',arguments);unHighlightFields(arrMandatoryFields);var arrNonCompletedFields=[];$j.each(arrMandatoryFields,function(intKey,arrFieldGroup)
{Profiler.profile('view/shared/assets/javascript/misc.js',541,'$j.each(arrMandatoryFields,','function(intKey, arrFieldGroup)',arguments);if(arrFieldGroup.length==1)
{$j.each(arrFieldGroup,function(intKey2,objFieldElement)
{Profiler.profile('view/shared/assets/javascript/misc.js',548,'$j.each(arrFieldGroup,','function(intKey2, objFieldElement)',arguments);if(isFieldBlank($j(objFieldElement).val()))
{arrNonCompletedFields.push(objFieldElement);}});}
else if(arrFieldGroup.length>1)
{var blnAtLeastOneInGroupHasValue=false;$j.each(arrFieldGroup,function(intKey2,objFieldElement)
{Profiler.profile('view/shared/assets/javascript/misc.js',585,'$j.each(arrFieldGroup,','function(intKey2, objFieldElement)',arguments);if(!isFieldBlank($j(objFieldElement).val()))
{blnAtLeastOneInGroupHasValue=true;return false;}});if(blnAtLeastOneInGroupHasValue)
{$j.each(arrFieldGroup,function(intKey2,objFieldElement)
{Profiler.profile('view/shared/assets/javascript/misc.js',601,'$j.each(arrFieldGroup,','function(intKey2, objFieldElement)',arguments);if(isFieldBlank($j(objFieldElement).val()))
{arrNonCompletedFields.push(objFieldElement);}});}}});if(arrNonCompletedFields.length>0)
{if(typeof(objFunc)!='undefined'&&typeof(objFunc)=='function')
{objFunc();}
else
{alert('Some mandatory fields have not been filled in!\n\nPlease complete any fields highlighted in red and try again.');}
highlightFields(arrNonCompletedFields,true);return false;}
return true;}
function getScrollXY()
{Profiler.profile('view/shared/assets/javascript/misc.js',639,'getScrollXY','function getScrollXY()',arguments);var strBrowser=BrowserDetect.browser;var intVersion=BrowserDetect.version;var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number')
{scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}
else if(document.body&&(document.body.scrollLeft||document.body.scrollTop))
{scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}
else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop))
{scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
else if(strBrowser=="Explorer"&&intVersion<=6)
{scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}
return[scrOfX,scrOfY];}
var Button={__previous:[],active:function(buttonId)
{Profiler.profile('view/shared/assets/javascript/misc.js',693,'active:','function(buttonId)',arguments);var buttonState=this.__previous[buttonId];if(buttonState)
{buttonState['count']+=1;}
else
{var objButtonSpan=$j('#'+buttonId);if(objButtonSpan.length==0)
{return;}
var objImage=objButtonSpan.find('img:first');if(objImage.length==0)
{return;}
var objBackground=$j('#'+buttonId+' .buttonBackground');this.__previous[buttonId]={img:objImage.get(0),src:objImage.attr('src'),count:1,span:objButtonSpan.get(0),background:objBackground.get(0),backgroundClass:objBackground.attr('class')};objBackground.attr('class','buttonBackground labelButtonBackground');objImage.attr('src','/view/shared/assets/images/buttonActivity.gif');}},inactive:function(buttonId)
{Profiler.profile('view/shared/assets/javascript/misc.js',740,'inactive:','function(buttonId)',arguments);var buttonState=this.__previous[buttonId];if(!buttonState)
{return;}
if(buttonState['count']==1)
{$j(buttonState['img']).attr('src',buttonState['src']);$j(buttonState['background']).attr('class',buttonState['backgroundClass']);if(buttonState['labelElement'])
{$j(buttonState['labelElement']).html(buttonState['label']);}
this.__previous[buttonId]=undefined;}
else
{buttonState['count']-=1;}},isActive:function(buttonId)
{Profiler.profile('view/shared/assets/javascript/misc.js',771,'isActive:','function(buttonId)',arguments);var buttonState=this.__previous[buttonId];if(buttonState)
{return true;}
return false;},feedback:function(buttonId,message)
{Profiler.profile('view/shared/assets/javascript/misc.js',782,'feedback:','function(buttonId, message)',arguments);var buttonState=this.__previous[buttonId];if(!buttonState)
{return;}
var objButtonSpan=$j(buttonState['span']);var objLabel=objButtonSpan.find('.buttonLabel:first');var objBackground=$j(buttonState['background']);objBackground.attr('class','buttonBackground actionButtonBackground');buttonState['labelElement']=objLabel.get(0);buttonState['label']=objLabel.html();objLabel.html(message);$j(buttonState['img']).attr('src','/view/shared/assets/images/buttonSuccess.png');setTimeout(function(){Profiler.profile('view/shared/assets/javascript/misc.js',810,'setTimeout(','function()',arguments);Button.inactive(buttonId);},3000);},setLabel:function(buttonId,label)
{Profiler.profile('view/shared/assets/javascript/misc.js',813,'setLabel:','function(buttonId, label)',arguments);var objButtonSpan=$j('#'+buttonId);if(objButtonSpan.length==0)
{return;}
var objLabelSpan=objButtonSpan.find('.buttonLabel:first');objLabelSpan.html(label);},setType:function(buttonId,type)
{Profiler.profile('view/shared/assets/javascript/misc.js',828,'setType:','function(buttonId, type)',arguments);var objButtonSpan=$j('#'+buttonId);if(objButtonSpan.length>0)
{var objButtonBackgroundSpan=objButtonSpan.find('.buttonBackground');objButtonBackgroundSpan.attr('class','buttonBackground '+type+'ButtonBackground');}}};Gradient={h2d:function(x)
{Profiler.profile('view/shared/assets/javascript/misc.js',847,'h2d:','function(x)',arguments);return parseInt("0x"+x,16)},d2h:function(x)
{Profiler.profile('view/shared/assets/javascript/misc.js',854,'d2h:','function(x)',arguments);var y="0123456789abcdef";var z=y.substr(x&15,1);while(x>15){x>>=4;z=y.substr(x&15,1)+z};while(z.length<2){z="0"+z};return z},create:function(startColor,endColor,steps)
{Profiler.profile('view/shared/assets/javascript/misc.js',865,'create:','function(startColor,endColor,steps)',arguments);var s=startColor;var e=endColor;if(typeof s!="string"||typeof e!="string"){return};s=s.replace(/\#/g,"");e=e.replace(/\#/g,"");var s=s.toLowerCase().split("");var e=e.toLowerCase().split("");if(s.length==3){s[5]=s[2];s[4]=s[2];s[3]=s[1];s[2]=s[1];s[1]=s[0]};if(e.length==3){e[5]=e[2];e[4]=e[2];e[3]=e[1];e[2]=e[1];e[1]=e[0]};if((s.join("")+e.join("")).replace(/[0-f]/g,"")!=""){return};var r1=this.h2d(s[0]+s[1]);var g1=this.h2d(s[2]+s[3]);var b1=this.h2d(s[4]+s[5]);var r2=this.h2d(e[0]+e[1]);var g2=this.h2d(e[2]+e[3]);var b2=this.h2d(e[4]+e[5]);var r=r1;var g=g1;var b=b1;steps--;var rs=(r2-r1)/steps;var gs=(g2-g1)/steps;var bs=(b2-b1)/steps;var a=[];for(var i=0;i<steps;i++){a.push(this.d2h(r)+this.d2h(g)+this.d2h(b));r+=rs;g+=gs;b+=bs;};a.push(e.join(''));return a}}
function createSliderBar(parentDiv,width)
{Profiler.profile('view/shared/assets/javascript/misc.js',897,'createSliderBar','function createSliderBar(parentDiv, width)',arguments);var trackObject={};trackObject.trackDiv=new Element("div");parentDiv.appendChild(trackObject.trackDiv);trackObject.trackDiv.setStyle({width:width+"px"});Element.addClassName(trackObject.trackDiv,"horizontalTrack");var leftCap=new Element("div");trackObject.trackDiv.appendChild(leftCap);Element.addClassName(leftCap,"leftCap");var middle=new Element("div");trackObject.trackDiv.appendChild(middle);middle.setStyle({width:width-6+"px"});Element.addClassName(middle,"middle");var rightCap=new Element("div");trackObject.trackDiv.appendChild(rightCap);rightCap.setStyle({left:width-3+"px"});Element.addClassName(rightCap,"rightCap");var notches=new Element("div");trackObject.trackDiv.appendChild(notches);notches.setStyle({width:width+"px"});Element.addClassName(notches,"notches");trackObject.handleDiv=new Element("div");trackObject.trackDiv.appendChild(trackObject.handleDiv);Element.addClassName(trackObject.handleDiv,"handle");return trackObject;}
function cloneObject(objSourceObject,arrExcludeProperties)
{Profiler.profile('view/shared/assets/javascript/misc.js',936,'cloneObject','function cloneObject(objSourceObject, arrExcludeProperties)',arguments);var objClonedObject={};$j.each(objSourceObject,function(strKey,objValue)
{Profiler.profile('view/shared/assets/javascript/misc.js',940,'$j.each(objSourceObject,','function(strKey, objValue)',arguments);if($j.inArray(strKey,arrExcludeProperties)==-1)
{objClonedObject[strKey]=objValue;}});return objClonedObject;}
function microtime(get_as_float)
{Profiler.profile('view/shared/assets/javascript/misc.js',952,'microtime','function microtime(get_as_float)',arguments);var now=new Date().getTime()/1000;var s=parseInt(now);return(get_as_float)?now:(Math.round((now-s)*1000)/1000)+' '+s;}
function resizeImageToFit(mixImage,intAvailableWidth,intAvailableHeight,blnMaintainAspectRatio)
{Profiler.profile('view/shared/assets/javascript/misc.js',965,'resizeImageToFit','function resizeImageToFit(mixImage, intAvailableWidth, intAvailableHeight, blnMaintainAspectRatio)',arguments);if(typeof(mixImage)=='object')
{var objImage=$j(mixImage);}
else
{var objImage=$j('#'+mixImage);}
if(objImage.length==0)
{return null;}
var blnMaintainAspectRatio=(typeof(blnMaintainAspectRatio)!='undefined')?blnMaintainAspectRatio:true;if(blnMaintainAspectRatio===true)
{var intImageWidth=parseInt(objImage.width());var intImageHeight=parseInt(objImage.height());var objNewSize=getScaledImageSize(intImageWidth,intImageHeight,intAvailableWidth,intAvailableHeight);}
else
{var objNewSize={intWidth:intAvailableWidth,intHeight:intAvailableHeight};}
objImage.css
({'width':objNewSize.intWidth+'px','height':objNewSize.intHeight+'px'});return{'intWidth':objNewSize.intWidth,'intHeight':objNewSize.intHeight};}
function getScaledImageSize(intImageWidth,intImageHeight,intAvailableWidth,intAvailableHeight)
{Profiler.profile('view/shared/assets/javascript/misc.js',1010,'getScaledImageSize','function getScaledImageSize(intImageWidth, intImageHeight, intAvailableWidth, intAvailableHeight)',arguments);if(intImageWidth<intAvailableWidth&&intImageHeight<intAvailableHeight)
{var intNewWidth=intImageWidth;var intNewHeight=intImageHeight;}
else if(intImageWidth<intAvailableWidth||intImageHeight<intAvailableHeight)
{if(intImageWidth>=intImageHeight)
{var fltRatio=intAvailableWidth/intImageWidth;var intNewWidth=parseInt(intImageWidth*fltRatio);var intNewHeight=parseInt(intImageHeight*fltRatio);if(intNewHeight>intImageHeight)
{fltRatio=intImageHeight/intNewHeight;intNewWidth=parseInt(intNewWidth*fltRatio);intNewHeight=intImageHeight;}}
else
{var fltRatio=intAvailableHeight/intImageHeight;var intNewWidth=parseInt(intImageWidth*fltRatio);var intNewHeight=parseInt(intImageHeight*fltRatio);if(intNewWidth>intImageWidth)
{fltRatio=intImageWidth/intNewWidth;intNewWidth=intImageWidth;intNewHeight=parseInt(intNewHeight*fltRatio);}}}
else
{var fltRatio=Math.min(intAvailableWidth/intImageWidth,intAvailableHeight/intImageHeight);var intNewWidth=parseInt(intImageWidth*fltRatio);var intNewHeight=parseInt(intImageHeight*fltRatio);}
return{'intWidth':intNewWidth,'intHeight':intNewHeight};}
var Container=Class.extend(ComponentBase,{initialize:function(objContainerElement,objParentObject,strComponentType,strComponentColumn)
{Profiler.profile('view/components/container/assets/javascript/container.js',22,'initialize:','function(objContainerElement, objParentObject, strComponentType, strComponentColumn)',arguments);this.parent(objContainerElement,objParentObject,strComponentType,strComponentColumn);$j(objContainerElement).parents('.containerWrapper:first').attr('id','containerWrapper_'+this.intId);this.strCollapseWidgetSelector='.collapse_widget:first';this.strCollapseWidgetImgSelector='.collapse_widget:first img:first';this.strMenuWidgetSelector='.menu_widget:first';this.strCloseWidgetSelector='.close_widget:first';this.strLockWidgetSelector='.lock_widget:first';this.strLockWidgetImgSelector='.lock_widget:first img:first';this.strBodySelector='.body:first';this.strContainerContentSelector='.containerContent:first';this.strTitleBarSelector='.title_bar:first';this.strTitleBarTextSelector='.title_bar:first .handle:first h2:first';this.strTitleBarHandleSelector='.title_bar:first .handle:first';var objCollapseWidget=$j(objContainerElement).find(this.strCollapseWidgetSelector);var objCollapseWidgetImg=$j(objContainerElement).find(this.strCollapseWidgetImgSelector);var objMenuWidget=$j(objContainerElement).find(this.strMenuWidgetSelector);var objCloseWidget=$j(objContainerElement).find(this.strCloseWidgetSelector);var objLockWidget=$j(objContainerElement).find(this.strLockWidgetSelector);var objLockWidgetImg=$j(objContainerElement).find(this.strLockWidgetImgSelector);var objTitleBar=$j(objContainerElement).find(this.strTitleBarSelector);objCollapseWidget.bind('click',{_this:this},function(event)
{Profiler.profile('view/components/container/assets/javascript/container.js',63,'objCollapseWidget.bind(\'click\', {_this: this},','function(event)',arguments);event.data._this.toggle(event);});objCloseWidget.bind('click',{_this:this},function(event)
{Profiler.profile('view/components/container/assets/javascript/container.js',68,'objCloseWidget.bind(\'click\', {_this: this},','function(event)',arguments);event.data._this.close(event);});objLockWidget.bind('click',{_this:this},function(event)
{Profiler.profile('view/components/container/assets/javascript/container.js',73,'objLockWidget.bind(\'click\', {_this: this},','function(event)',arguments);event.data._this.lock(event);});objMenuWidget.bind('click',{_this:this},function(event)
{Profiler.profile('view/components/container/assets/javascript/container.js',78,'objMenuWidget.bind(\'click\', {_this: this},','function(event)',arguments);event.data._this.showMenu(event);});this.blnCollapsed=(objCollapseWidgetImg.attr('src').indexOf('hide')==-1)?true:false;this.blnLocked=(objLockWidgetImg.attr('src').indexOf('unlocked')==-1)?true:false;this.blnHidden=false;this.toggleButtonAcceptingNewEvents=true;this.strDefaultTitle=$j(objContainerElement).find(this.strTitleBarTextSelector).html();this.strCurrentTitle=this.strDefaultTitle;this.arrExtraMenuItems=[];this.blnIsMapContainer=false;this.blnIsPlaceExplorerContainer=false;if(!this.objParentObject.blnLinkToMapMode)
{var _this=this;if(this.strComponentColumn=='left')
{var objFunction=function()
{Profiler.profile('view/components/container/assets/javascript/container.js',120,'var objFunction =','function()',arguments);_this.resizeContainerBodyLeft();};this.objParentObject.registerResizeFunction(objFunction);this.resizeContainerBodyLeft();}
if(this.strComponentColumn=='right')
{var objFunction=function()
{Profiler.profile('view/components/container/assets/javascript/container.js',133,'var objFunction =','function()',arguments);_this.resizeContainerRight();};this.objParentObject.registerResizeFunction(objFunction);this.resizeContainerRight();}}
this.findChildComponents(objContainerElement);this.setTitle('');},addCustomCSSClass:function(strNewClass)
{Profiler.profile('view/components/container/assets/javascript/container.js',152,'addCustomCSSClass:','function(strNewClass)',arguments);var objContainerElement=$j(this.returnElementReference());objContainerElement.addClass(strNewClass);},resizeContainerBodyLeft:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',160,'resizeContainerBodyLeft:','function()',arguments);var intShellLeftColumnWidth=this.objParentObject.getColumnLeftAbsoluteWidth();var intMaxBodyWidth=(intShellLeftColumnWidth>10)?intShellLeftColumnWidth-10:0;if(this.objParentObject.strBrowser=="Explorer"&&this.objParentObject.intVersion<=6)
{intMaxBodyWidth+=5}
intMaxBodyWidth-=13;if(intMaxBodyWidth<0)
{intMaxBodyWidth=0;}
$j(this.returnElementReference()).find(this.strBodySelector).css({width:intMaxBodyWidth+'px'});this.intMaxBodyWidth=intMaxBodyWidth;},resizeContainerRight:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',193,'resizeContainerRight:','function()',arguments);$j(this.returnElementReference()).css({position:'absolute',top:'0px',left:'0px'});var intShellRightColumnWidth=this.objParentObject.getColumnRightAbsoluteWidth();var intShellRightColumnHeight=this.objParentObject.getContentAbsoluteHeight();var intMaxContainerWidth=intShellRightColumnWidth;var intMaxContainerHeight=intShellRightColumnHeight;switch(this.blnIsMapContainer)
{case true:intMaxContainerHeight=intMaxContainerHeight+'px';break;case false:switch(this.objParentObject.getRightColumnScrollingMode())
{case true:intMaxContainerWidth-=19;intMaxContainerHeight='auto';break;case false:intMaxContainerHeight=intMaxContainerHeight+'px';break;}
break;}
$j(this.returnElementReference()).css({width:intMaxContainerWidth+'px',height:intMaxContainerHeight});},collapse:function(event)
{Profiler.profile('view/components/container/assets/javascript/container.js',247,'collapse:','function(event)',arguments);if(this.toggleButtonAcceptingNewEvents)
{var _this=this;this.blnCollapsed=false;this.toggleButtonAcceptingNewEvents=false;var objBody=$j(this.returnElementReference()).find(this.strBodySelector);objBody.css('zoom','1');objBody.slideUp(200,function()
{Profiler.profile('view/components/container/assets/javascript/container.js',263,'objBody.slideUp(200,','function()',arguments);_this.toggleCallback();return false;});}},expand:function(event)
{Profiler.profile('view/components/container/assets/javascript/container.js',274,'expand:','function(event)',arguments);if(this.toggleButtonAcceptingNewEvents)
{var _this=this;this.blnCollapsed=true;this.toggleButtonAcceptingNewEvents=false;var objBody=$j(this.returnElementReference()).find(this.strBodySelector);objBody.css('zoom','1');objBody.slideDown(200,function()
{Profiler.profile('view/components/container/assets/javascript/container.js',290,'objBody.slideDown(200,','function()',arguments);_this.toggleCallback();return false;});}},toggle:function(event)
{Profiler.profile('view/components/container/assets/javascript/container.js',301,'toggle:','function(event)',arguments);if(this.toggleButtonAcceptingNewEvents)
{if(this.blnCollapsed===true)
{this.expand(event);}
else
{this.collapse(event);}}
return false;},toggleCallback:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',322,'toggleCallback:','function()',arguments);if(!this.blnCollapsed)
{$j(this.returnElementReference()).find(this.strCollapseWidgetImgSelector).attr('src','/view/components/container/assets/images/widgets/show_arrow.png');this.blnCollapsed=true;}
else
{$j(this.returnElementReference()).find(this.strCollapseWidgetImgSelector).attr('src','/view/components/container/assets/images/widgets/hide_arrow.png');this.blnCollapsed=false;}
this.toggleButtonAcceptingNewEvents=true;this.saveState();},close:function(event,blnForceClose)
{Profiler.profile('view/components/container/assets/javascript/container.js',347,'close:','function(event, blnForceClose)',arguments);var blnResourceExplorerInPlaylistMode=false;$j.each(this.objChildComponentObjects,function(strKey,objProperty)
{Profiler.profile('view/components/container/assets/javascript/container.js',352,'$j.each(this.objChildComponentObjects,','function(strKey, objProperty)',arguments);$j.each(objProperty,function(intKey,objComponent)
{Profiler.profile('view/components/container/assets/javascript/container.js',356,'$j.each(objProperty,','function(intKey, objComponent)',arguments);if(objComponent.strComponentType=='resourceExplorer'&&Map.getPlaylistMode()===true)
{blnResourceExplorerInPlaylistMode=true;return false;}});});if(this.blnLocked&&(blnForceClose!==true)&&blnResourceExplorerInPlaylistMode!==true)
{var strMessage="This component is locked and cannot be closed.";Shell.openSpeechBubble(strMessage,$j(this.returnElementReference()).find(this.strCloseWidgetSelector).get(0));if($j.fx.off!==true)
{$j(this.returnElementReference()).find(this.strLockWidgetSelector).effect('pulsate',{times:4},500);}
return false;}
var blnContinueShutdown=true;$j.each(this.objChildComponentObjects,function(strKey,objProperty)
{Profiler.profile('view/components/container/assets/javascript/container.js',387,'$j.each(this.objChildComponentObjects,','function(strKey, objProperty)',arguments);$j.each(objProperty,function(intKey,objComponent)
{Profiler.profile('view/components/container/assets/javascript/container.js',391,'$j.each(objProperty,','function(intKey, objComponent)',arguments);if(typeof(objComponent.shutDown)!='undefined')
{blnContinueShutdown=objComponent.shutDown();if(blnContinueShutdown===false)
{return false;}}
else
{dbg("Child component "+intKey+" Javascript object does not implement the shutDown() method.\n\nNo shutdown related-y things will be run!");}});});if(blnContinueShutdown===false)
{return false;}
this.blnHidden=true;this.blnCollapsed=false;this.locked=false;this.saveState();this.unLoadComponent();},unLoadComponent:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',431,'unLoadComponent:','function()',arguments);$j(this.returnElementReference()).find(this.strCollapseWidgetSelector).unbind();$j(this.returnElementReference()).find(this.strCloseWidgetSelector).unbind();$j(this.returnElementReference()).find(this.strLockWidgetSelector).unbind();$j(this.returnElementReference()).find(this.strMenuWidgetSelector).unbind();$j.each(this.objChildComponentObjects,function(strKey,objProperty)
{Profiler.profile('view/components/container/assets/javascript/container.js',442,'$j.each(this.objChildComponentObjects,','function(strKey, objProperty)',arguments);$j.each(objProperty,function(intKey,objComponent)
{Profiler.profile('view/components/container/assets/javascript/container.js',446,'$j.each(objProperty,','function(intKey, objComponent)',arguments);if(typeof(objComponent.unLoad)!='undefined')
{objComponent.unLoad();}});});$j(this.returnElementReference()).parents('.containerWrapper:first').remove();this.objParentObject.removeChildComponent(this);},show:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',462,'show:','function()',arguments);$j(this.returnElementReference()).css('visibility','');},hide:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',467,'hide:','function()',arguments);$j(this.returnElementReference()).css('visibility','hidden');},lock:function(event,blnKeepExpanded)
{Profiler.profile('view/components/container/assets/javascript/container.js',474,'lock:','function(event, blnKeepExpanded)',arguments);if(!this.blnLocked)
{$j(this.returnElementReference()).find(this.strLockWidgetImgSelector).attr('src','/view/components/container/assets/images/widgets/padlock.png');this.blnLocked=true;if(blnKeepExpanded!==true)
{this.collapse();}
var strMessage="This component is now locked.<br/><br/>Component contents will not be overwritten/closed<br/>until you manually unlock it.";Shell.openSpeechBubble(strMessage,$j(this.returnElementReference()).find(this.strLockWidgetSelector).get(0));}
else
{$j(this.returnElementReference()).find(this.strLockWidgetImgSelector).attr('src','/view/components/container/assets/images/widgets/padlock_unlocked.png');this.blnLocked=false;var strMessage="This component is now unlocked.";Shell.openSpeechBubble(strMessage,$j(this.returnElementReference()).find(this.strLockWidgetSelector).get(0));}
this.setTitle(this.strCurrentTitle);this.saveState();return false;},saveState:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',512,'saveState:','function()',arguments);var strState=((this.blnHidden)?"hidden":"visible")+"/"+((this.blnCollapsed)?"collapsed":"expanded")+"/"+((this.blnLocked)?"locked":"unlocked");var url='saveState/'+strState;this.notify(url);},returnCollapsedState:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',523,'returnCollapsedState:','function()',arguments);return this.blnCollapsed;},returnLockedState:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',530,'returnLockedState:','function()',arguments);return this.blnLocked;},setTitle:function(strTitle)
{Profiler.profile('view/components/container/assets/javascript/container.js',537,'setTitle:','function(strTitle)',arguments);var objTitle=$j(this.returnElementReference()).find(this.strTitleBarTextSelector);this.strCurrentTitle=isFieldBlank(strTitle)?this.strDefaultTitle:strTitle;if(this.strCurrentTitle==''||this.strCurrentTitle=='&nbsp;')
{this.strCurrentTitle='&nbsp;';}
var strTitleSuffix=(this.blnLocked)?' (Locked)':'';objTitle.html(this.strCurrentTitle+strTitleSuffix);},hideTitle:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',556,'hideTitle:','function()',arguments);$j(this.returnElementReference()).find(this.strTitleBarTextSelector).css('visibility','hidden');},createToolbarButton:function(strText,strAlignment,strOnClick)
{Profiler.profile('view/components/container/assets/javascript/container.js',563,'createToolbarButton:','function(strText, strAlignment, strOnClick)',arguments);var strHTML="<a href=\"#\" onclick=\""+strOnClick+"\" class=\"containerToolbarButton containerToolbarButtonAlign_"+strAlignment+"\">"+strText+"</a>";this.createToolbarElement(strHTML);},createHandleButton:function(strText,strAlignment,strOnClick,strPosition)
{Profiler.profile('view/components/container/assets/javascript/container.js',573,'createHandleButton:','function(strText, strAlignment, strOnClick, strPosition)',arguments);var strHTML="<a href=\"#\" onclick=\""+strOnClick+"\" class=\"containerToolbarButton containerToolbarButtonAlign_"+strAlignment+"\">"+strText+"</a>";this.createHandleElement(strHTML,strPosition);},createToolbarElement:function(strHTML,strPosition)
{Profiler.profile('view/components/container/assets/javascript/container.js',580,'createToolbarElement:','function(strHTML, strPosition)',arguments);strPosition=(strPosition)?strPosition:'Top';var objTitleBar=$j(this.returnElementReference()).find(this.strTitleBarSelector);switch(strPosition.toUpperCase())
{case'TOP':objTitleBar.prepend(strHTML);break;case'BOTTOM':objTitleBar.append(strHTML);break;case'AFTER':objTitleBar.after(strHTML);break;case'BEFORE':objTitleBar.before(strHTML);break;}},createHandleElement:function(strHTML,strPosition)
{Profiler.profile('view/components/container/assets/javascript/container.js',597,'createHandleElement:','function(strHTML, strPosition)',arguments);strPosition=(strPosition)?strPosition:'Top';var objTitleBarHandle=$j(this.returnElementReference()).find(this.strTitleBarHandleSelector);switch(strPosition.toUpperCase())
{case'TOP':objTitleBarHandle.prepend(strHTML);break;case'BOTTOM':objTitleBarHandle.append(strHTML);break;case'AFTER':objTitleBarHandle.after(strHTML);break;case'BEFORE':objTitleBarHandle.before(strHTML);break;}},registerNewMenuItem:function(strItemText,objOnClickFunc,objPreMenuBuildFunc)
{Profiler.profile('view/components/container/assets/javascript/container.js',615,'registerNewMenuItem:','function(strItemText, objOnClickFunc, objPreMenuBuildFunc)',arguments);var objPreMenuBuildFunc=(typeof(objPreMenuBuildFunc)!='undefined')?objPreMenuBuildFunc:null;this.arrExtraMenuItems.push({strItemText:strItemText,objOnClickFunc:objOnClickFunc,objPreMenuBuildFunc:objPreMenuBuildFunc});},scrollTo:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',622,'scrollTo:','function()',arguments);if(this.returnCollapsedState())
{this.expand();}
$j(this.returnElementReference()).parents('.containerWrapper:first').parent().scrollTo
($j(this.returnElementReference()).parents('.containerWrapper:first'),{duration:2500,easing:'easeInOutCirc',axis:'y',offset:-8});},showMenu:function(event)
{Profiler.profile('view/components/container/assets/javascript/container.js',644,'showMenu:','function(event)',arguments);var _this=this;var scrollToSubmenu=new UMenu(200);var components=Shell.generateComponentList('left');$j.each(components,function(mixKey,objComponent)
{Profiler.profile('view/components/container/assets/javascript/container.js',651,'$j.each(components,','function(mixKey, objComponent)',arguments);scrollToSubmenu.addItem(objComponent.strCurrentTitle,function(){Shell.scrollToComponent(objComponent)});});var menu=new UMenu(200);menu.addItem(this.blnLocked?'Unlock':'Lock',function(){_this.lock()});menu.addItem(this.blnCollapsed?'Expand':'Collapse',function(){_this.toggle()});menu.addItem('Close',function(){_this.close()});menu.addSpacer();menu.addItem('Collapse All',function(){Shell.collapseAll('left')});menu.addItem('Collapse All But This',function(){Shell.collapseAllBut('left',_this.intId)});menu.addItem('Bring To Top',function(){Shell.bringToTop(_this)});menu.addSpacer();menu.addSubmenu('Scroll To',scrollToSubmenu);if(this.arrExtraMenuItems.length>0)
{menu.addSpacer();$j.each(this.arrExtraMenuItems,function(mixKey,objMenuItem)
{Profiler.profile('view/components/container/assets/javascript/container.js',673,'$j.each(this.arrExtraMenuItems,','function(mixKey, objMenuItem)',arguments);if(objMenuItem.objPreMenuBuildFunc!=null)
{var objRuntimeMenuItemValues=objMenuItem.objPreMenuBuildFunc();objMenuItem.strItemText=objRuntimeMenuItemValues["strItemText"];objMenuItem.objOnClickFunc=objRuntimeMenuItemValues["objOnClickFunc"];}
menu.addItem(objMenuItem.strItemText,objMenuItem.objOnClickFunc);});}
menu.show(event,40);},disableContainerElementsForMap:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',692,'disableContainerElementsForMap:','function()',arguments);$j(this.returnElementReference()).css({border:'0px'});$j(this.returnElementReference()).find(this.strTitleBarSelector).css({height:'0px',overflow:'hidden',display:'none'});$j(this.returnElementReference()).find(this.strBodySelector).css({padding:'0px'});this.blnIsMapContainer=true;},showActivity:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',715,'showActivity:','function()',arguments);var objContainerActivityWidgetElement=$j(this.returnElementReference()).find('.activity_widget');if(objContainerActivityWidgetElement.length==0)
{return;}
objContainerActivityWidgetElement.removeClass('activity_widget_hidden');objContainerActivityWidgetElement.addClass('activity_widget_visible');},hideActivity:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',730,'hideActivity:','function()',arguments);var objContainerActivityWidgetElement=$j(this.returnElementReference()).find('.activity_widget');objContainerActivityWidgetElement.removeClass('activity_widget_visible');objContainerActivityWidgetElement.addClass('activity_widget_hidden');},flash:function()
{Profiler.profile('view/components/container/assets/javascript/container.js',740,'flash:','function()',arguments);}});Container.disable=function(objContainerObject,strOpacity,strHexColor,strCursorMode,blnDisableLoadingWidget)
{Profiler.profile('view/components/container/assets/javascript/container.js',749,'Container.disable =','function(objContainerObject, strOpacity, strHexColor, strCursorMode, blnDisableLoadingWidget)',arguments);if(!objContainerObject)
{return;}
var objContainerElement=$j(objContainerObject.returnElementReference());var objContainerBodyOverlayElement=objContainerElement.find('.overlay');if(objContainerBodyOverlayElement.length>0)
{return;}
var strOpacity=(typeof(strOpacity)!='undefined')?strOpacity:'0.5';var strHexColor=(typeof(strHexColor)!='undefined')?strHexColor:'#ffffff';var strCursorMode=(typeof(strCursorMode)!='undefined')?strCursorMode:'wait';var objContainerBodyElement=objContainerElement.find('.body');var strOverlayHTML="<div class=\"overlay\" style=\"position:absolute;top:"+parseInt(objContainerBodyElement.css('padding-top'))+"px;left:"+parseInt(objContainerBodyElement.css('padding-left'))+"px;width:"+parseInt(objContainerBodyElement.innerWidth())+"px;height:"+parseInt(objContainerBodyElement.innerHeight())+"px;z-index:9999;background:"+strHexColor+";cursor:"+strCursorMode+"\" />";objContainerBodyElement.prepend(strOverlayHTML);objContainerElement.find('.overlay:first').css({opacity:strOpacity});if(typeof(blnDisableLoadingWidget)=='undefined'||(typeof(blnDisableLoadingWidget)!='undefined'&&!blnDisableLoadingWidget))
{objContainerObject.showActivity();}}
Container.enable=function(objContainerObject)
{Profiler.profile('view/components/container/assets/javascript/container.js',797,'Container.enable =','function(objContainerObject)',arguments);if(!objContainerObject)
{return;}
var objContainerElement=$j(objContainerObject.returnElementReference());var objContainerBodyOverlayElement=objContainerElement.find('.overlay:first');if(objContainerBodyOverlayElement.length==0)
{return;}
objContainerBodyOverlayElement.remove();if(typeof(objContainerObject.hideActivity)!='undefined')
{objContainerObject.hideActivity();}}
Container.showActivity=function(objContainerObject)
{Profiler.profile('view/components/container/assets/javascript/container.js',827,'Container.showActivity =','function(objContainerObject)',arguments);objContainerObject.showActivity();}
Container.hideActivity=function(objContainerObject)
{Profiler.profile('view/components/container/assets/javascript/container.js',832,'Container.hideActivity =','function(objContainerObject)',arguments);objContainerObject.hideActivity();}
$j(window).load(function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',17,'$j(window).load(','function()',arguments);shellPreInitialisation();$j(document).find('body:first').append('<iframe style="display:none;" src="/static/back_button_blocker1.html"></iframe>');});$j(window).unload(function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',32,'$j(window).unload(','function()',arguments);shellUnload();});function shellPreInitialisation()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',42,'shellPreInitialisation','function shellPreInitialisation()',arguments);var strMode=strShellMode;switch(strMode)
{case'normal':if(false)
{var strBrowser=BrowserDetect.browser;var intVersion=BrowserDetect.version;var strLocation=top.location.href;var blnMatchULearnLive=/ulearn.infomapper.com/.test(strLocation);var blnMatchScoilnetLive=/scoilnet.infomapper.com/.test(strLocation);var blnMatch=blnMatchULearnLive||blnMatchScoilnetLive;if(strBrowser=="Explorer"&&intVersion<=6&&blnMatch)
{Shell.redirect('static/unsupported_browser.htm');return;}}
objShell=new Shell(document.body,null,'shell','page',strMode);try
{window.onerror=Shell.processError;}
catch(error)
{}
objShell.beginUpdateInitCode();if(shell_switchToPageMode)
{objShell.showPage();}
if(Shell.countChildComponents('left')==0)
{Shell.resizeLeftColumnTo0Percent();}
objShell.resizeShell();if(Shell.getUserAthenticatedStatus()&&!Shell.getAcceptedTermsAndConditionsStatus()&&(Shell.getUserEstablishmentAdminStatus()||Shell.getUserStaffStatus()))
{Shell.showTermsAndConditions();}
if(Shell.getUserAthenticatedStatus()&&Shell.getInfomapperClassicImportStatus()&&!Shell.getHasCompletedDetailsUpdateForm()&&(Shell.getUserEstablishmentAdminStatus()||Shell.getUserStaffStatus()))
{Shell.showUserDetailsUpdateForm();}
if(Shell.getUserAthenticatedStatus()&&Shell.getPasswordResetRequiredStatus())
{Shell.showPasswordResetPrompt();}
if(Shell.getUserAthenticatedStatus()&&Shell.getIsShibbolethUser()&&!Shell.getHasCompletedDetailsUpdateForm()&&(Shell.getUserEstablishmentAdminStatus()||Shell.getUserStaffStatus()))
{Shell.showShibbolethUserDetailsUpdateForm();}
var arrPromotionalResources=Shell.getPromotionalResources();if(arrPromotionalResources.length>0)
{Shell.showPromotionalResources();}
if(Shell.getIsPrintOnlyUser()===true)
{Shell.showPrintOnlyLoginNotification();}
if(Shell.getIsExpiredUser()===true&&Shell.getIsNoPreviousLicenceUser()===false)
{Shell.showExpiredLicenceNotification();}
Shell.systemStatusChecks();Shell.hideOverlay();break;case'linkToUlearnMaps':objShell=new Shell(document.body,null,'shell','page',strMode);objShell.beginUpdateInitCode();Shell.hideOverlay();break;}}
function shellUnload()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',204,'shellUnload','function shellUnload()',arguments);objShell.shutDown();}
var Shell=Class.extend(ComponentBase,{initialize:function(objShellElement,objParentObject,strComponentType,strComponentColumn,strShellMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',221,'initialize:','function(objShellElement, objParentObject, strComponentType, strComponentColumn, strShellMode)',arguments);this.parent(objShellElement,objParentObject,strComponentType,strComponentColumn);this.strShellMode=strShellMode;this.strCulture=strCulture;this.blnLightboxAlreadyActive=false;this.arrLightboxQueue=[];this.objCurrentLightboxProperties={};this.objCustomLightboxButtons={};this.strBrowser=BrowserDetect.browser;this.intVersion=BrowserDetect.version;this.strOS=BrowserDetect.OS;this.blnLinkToMapMode=false;this.blnUloadMode=true;if(this.strBrowser=='Explorer'&&this.intVersion<=6)
{jQuery.fx.off=true;}
switch(strShellMode)
{case'normal':this.initializeNormal(objShellElement,objParentObject,strComponentType,strComponentColumn);break;case'linkToUlearnMaps':this.initializeLinkToUlearnMaps(objShellElement,objParentObject,strComponentType,strComponentColumn);break;}
$j('body script').remove();},getBrowserDetails:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',281,'getBrowserDetails:','function()',arguments);var objBrowserDetails={strBrowser:this.strBrowser,intVersion:this.intVersion,strOS:this.strOS};return objBrowserDetails;},initializeNormal:function(objShellElement,objParentObject,strComponentType,strComponentColumn)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',295,'initializeNormal:','function(objShellElement, objParentObject, strComponentType, strComponentColumn)',arguments);this.strBannerSelector='#shellBanner';this.strContentSelector='#shellContent';this.strColumnLeftSelector='#shellColumnLeft';this.strColumnRightSelector='#shellColumnRight';this.strColumnWholeSelector='#shellColumnWhole';this.strFooterSelector='#shellFooter';this.strColumnDividerSelector='#shellColumnDividerWidgets';this.strSortableColumnSelector='#shellColumnLeft';this.blnUserAuthenticated=false;this.blnUserIsSystemAdmin=false;this.blnUserIsEstablishmentAdmin=false;this.blnUserIsStaff=false;this.blnUserIsPupil=false;this.blnAccountIsRoaming=false;this.strUsername='';this.strScreenName='';this.strFullName='';this.blnAcceptedTermsAndConditions=false;this.blnHasLinkToMapsLicence=false;this.blnIsInfomapperClassicImport=false;this.blnHasCompletedDetailsUpdateForm=true;this.arrPromotionalResources=[];this.strVersionNumber='unknown version!';this.objLoadedComponentAssets={};this.objMenus={};this.resizefunctionArray=[];this.intColumnSteppingSequence=1;this.arrColumnWidths=[0,35,50,75,100];this.strWebsiteDomain=top.location.href;if(this.strWebsiteDomain[this.strWebsiteDomain.length-1]=='#')
{this.strWebsiteDomain=this.strWebsiteDomain.substr(this.strWebsiteDomain.length-1);}
this.strSessionTimeoutUrl='/';this.blnFullPageMode=false;this.strLayoutMode=(typeof(shell_layoutMode)!='undefined')?shell_layoutMode:'standard';this.blnRightColumnScrollingMode=false;this.intCurrentSearchBubbleDisplay=0;this.intMaxSearchBubbleDisplay=2;this.blnPleaseWaitLightboxActive=false;this.intAjaxId=0;this.objAjaxHandlers={};this.objRequiredJavascriptAssets={};this.objLoadedJavascriptAssetsCount={};this.objAjaxElementIds={};this.objActiveResourceExplorer=null;this.objGlobalPeriodicalExecutioners={};this.resizeShell();$j(window).bind('resize',{_this:this},function(event)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',389,'$j(window).bind(\'resize\', {_this: this},','function(event)',arguments);event.data._this.resizeShell();});this.createSortable();this.findChildComponents($j(this.strColumnRightSelector).get(0));this.findChildComponents($j(this.strColumnLeftSelector).get(0));this.findChildComponents($j(this.strColumnWholeSelector).get(0));var _this=this;$j().ajaxComplete(function(event,XMLHttpRequest,ajaxOptions)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',412,'$j().ajaxComplete(','function (event, XMLHttpRequest, ajaxOptions)',arguments);if(XMLHttpRequest.status==403)
{_this.handleSessionExpiry();}});this.objComponentURLToNiceNameMapping={};this.beginNewReleaseCheckPE();},initializeLinkToUlearnMaps:function(objShellElement,objParentObject,strComponentType,strComponentColumn)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',433,'initializeLinkToUlearnMaps:','function(objShellElement, objParentObject, strComponentType, strComponentColumn)',arguments);this.strLinkToMapHeaderSelector='#showLinkToMapHeader';this.strLinkToMapSearchBarSelector='#showLinkToMapSearch';this.strLinkToMapMappingComponentsContainerSelector='#showLinkToMapMapComponentsContainer';this.strLinkToMapEzmapsContainerSelector='#showLinkToMapEzmaps';this.strLinkToMapLayersContainerSelector='#showLinkToMapLayers';this.strLinkToMapLayersExpandedContentSelector='#expandedContents';this.strLinkToMapLayersCollapsedContentSelector='#collapsedContents';this.strLinkToMapDetailsSelector='#showLinkToMapDetails';this.strLinkToMapFooterSelector='#showLinkToMapFooter';this.blnLayerPanelCollapsed=false;this.blnFooterCollapsed=false;this.blnLinkToMapMode=true;this.resizefunctionArray=[];this.resizeShellLinkToUlearnMaps();$j(window).bind('resize',{_this:this},function(event)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',462,'$j(window).bind(\'resize\', {_this: this},','function(event)',arguments);event.data._this.resizeShellLinkToUlearnMaps();});this.objLinkTouLearnDetails={};this.findChildComponents($j(this.strLinkToMapEzmapsContainerSelector).get(0));},linkToUlearnSearch:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',480,'linkToUlearnSearch:','function()',arguments);var objSearchFieldElement=$j('#linkToMapSearchField');var objSearchResultsElement=$j('#linkToMapSearchResultsContainer');var strSearchCriteria=objSearchFieldElement.val();if(strSearchCriteria=="PLACE NAME OR POSTCODE"||isFieldBlank(strSearchCriteria))
{alert("Please enter a place name or postcode and try again!");return;}
Map.linkToUlearnSearch(strSearchCriteria,objSearchFieldElement.get(0),objSearchResultsElement.get(0));},toggleLinkToMapLayerList:function(blnCollapse)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',499,'toggleLinkToMapLayerList:','function(blnCollapse)',arguments);this.resizeShellLinkToUlearnMaps();if(blnCollapse)
{$j(this.strLinkToMapLayersExpandedContentSelector).css({display:'none'});$j(this.strLinkToMapLayersCollapsedContentSelector).css({display:''});var intWidthAvailableToMapping=0;intWidthAvailableToMapping=Math.ceil(this.intBrowserViewportWidth-40);if($j(this.strLinkToMapLayersContainerSelector).css('display')=='none')
{intWidthAvailableToMapping=Math.ceil(this.intBrowserViewportWidth-8);}
$j(this.strLinkToMapEzmapsContainerSelector).css({width:intWidthAvailableToMapping+'px'});$j(this.strLinkToMapLayersContainerSelector).css({marginLeft:(intWidthAvailableToMapping+5)+'px'});this.blnLayerPanelCollapsed=true;}
else
{$j(this.strLinkToMapLayersExpandedContentSelector).css({display:''});$j(this.strLinkToMapLayersCollapsedContentSelector).css({display:'none'});var intWidthAvailableToMapping=0;intWidthAvailableToMapping=Math.ceil(this.intBrowserViewportWidth/100*70);$j(this.strLinkToMapEzmapsContainerSelector).css({width:intWidthAvailableToMapping+'px'});$j(this.strLinkToMapLayersContainerSelector).css({marginLeft:(intWidthAvailableToMapping+5)+'px'});this.blnLayerPanelCollapsed=false;}},toggleLinkToMapFooter:function(blnCollapse)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',541,'toggleLinkToMapFooter:','function(blnCollapse)',arguments);if(blnCollapse)
{$j(this.strLinkToMapDetailsSelector).css({display:'none'});$j(this.strLinkToMapFooterSelector).css({display:'none'});$j('#collapseFooterLink_Expanded').css({display:'none'});$j('#expandFooterLink_Expanded').css({display:''});$j('#collapseFooterLink_Collapsed').css({display:'none'});$j('#expandFooterLink_Collapsed').css({display:''});this.blnFooterCollapsed=true;this.resizeShellLinkToUlearnMaps();}
else
{$j(this.strLinkToMapDetailsSelector).css({display:''});$j(this.strLinkToMapFooterSelector).css({display:''});$j('#expandFooterLink_Expanded').css({display:'none'});$j('#collapseFooterLink_Expanded').css({display:''});$j('#expandFooterLink_Collapsed').css({display:'none'});$j('#collapseFooterLink_Collapsed').css({display:''});this.blnFooterCollapsed=false;this.resizeShellLinkToUlearnMaps();}},generateLinkToUlearnLayerPanelContent:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',580,'generateLinkToUlearnLayerPanelContent:','function()',arguments);var strTargetElementId='linkToMapSelectLayerContainer';var objLayerDetails=LinkToUlearnLayerData;var objAdditionalInfo=LinkToUlearnAdditionalInfo;Map.generateLinkToUlearnLayerPanelContent(strTargetElementId,objLayerDetails,objAdditionalInfo);},handleSessionExpiry:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',595,'handleSessionExpiry:','function()',arguments);var msg='Due to a period of inactivity, your session has expired.';if(this.blnUserAuthenticated)
{msg+=' Please log in again.';}
alert(msg);window.location=this.strSessionTimeoutUrl;},setUsername:function(strUsername)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',612,'setUsername:','function(strUsername)',arguments);this.strUsername=strUsername;},getUsername:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',616,'getUsername:','function()',arguments);return this.strUsername;},setScreenName:function(strScreenName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',621,'setScreenName:','function(strScreenName)',arguments);this.strScreenName=strScreenName;},getScreenName:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',625,'getScreenName:','function()',arguments);return this.strScreenName;},setFullName:function(strFullName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',630,'setFullName:','function(strFullName)',arguments);this.strFullName=strFullName;},getFullName:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',634,'getFullName:','function()',arguments);return this.strFullName;},setFirstName:function(strFirstName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',639,'setFirstName:','function(strFirstName)',arguments);this.strFirstName=strFirstName;},getFirstName:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',643,'getFirstName:','function()',arguments);return this.strFirstName;},setLastName:function(strLastName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',648,'setLastName:','function(strLastName)',arguments);this.strLastName=strLastName;},getLastName:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',652,'getLastName:','function()',arguments);return this.strLastName;},setUserAthenticatedStatus:function(strUserAuthenticatedMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',657,'setUserAthenticatedStatus:','function(strUserAuthenticatedMode)',arguments);this.blnUserAuthenticated=(strUserAuthenticatedMode=="authenticated")?true:false;},getUserAthenticatedStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',661,'getUserAthenticatedStatus:','function()',arguments);return this.blnUserAuthenticated;},setUserSystemAdminStatus:function(strIsSystemAdmin)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',666,'setUserSystemAdminStatus:','function(strIsSystemAdmin)',arguments);this.blnUserIsSystemAdmin=(strIsSystemAdmin=="true")?true:false;},getUserSystemAdminStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',670,'getUserSystemAdminStatus:','function()',arguments);return this.blnUserIsSystemAdmin;},setUserEstablishmentAdminStatus:function(strIsEstablishmentAdmin)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',675,'setUserEstablishmentAdminStatus:','function(strIsEstablishmentAdmin)',arguments);this.blnUserIsEstablishmentAdmin=(strIsEstablishmentAdmin=="true")?true:false;},getUserEstablishmentAdminStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',679,'getUserEstablishmentAdminStatus:','function()',arguments);return this.blnUserIsEstablishmentAdmin;},setUserStaffStatus:function(strIsStaff)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',684,'setUserStaffStatus:','function(strIsStaff)',arguments);this.blnUserIsStaff=(strIsStaff=="true")?true:false;},getUserStaffStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',688,'getUserStaffStatus:','function()',arguments);return this.blnUserIsStaff;},setUserPupilStatus:function(strIsPupil)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',693,'setUserPupilStatus:','function(strIsPupil)',arguments);this.blnUserIsPupil=(strIsPupil=="true")?true:false;},getUserPupilStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',697,'getUserPupilStatus:','function()',arguments);return this.blnUserIsPupil;},setRoamingAccountStatus:function(strIsRoamingAccount)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',702,'setRoamingAccountStatus:','function(strIsRoamingAccount)',arguments);this.blnIsRoamingAccount=(strIsRoamingAccount=="true")?true:false;},getRoamingAccountStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',707,'getRoamingAccountStatus:','function()',arguments);return this.blnIsRoamingAccount;},setUserStudentTeacherStatus:function(strIsStudentTeacher)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',711,'setUserStudentTeacherStatus:','function(strIsStudentTeacher)',arguments);this.blnIsStudentTeacher=(strIsStudentTeacher=="true")?true:false;},getUserStudentTeacherStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',716,'getUserStudentTeacherStatus:','function()',arguments);return this.blnIsStudentTeacher;},setUsersIPAddress:function(strIPAddress)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',721,'setUsersIPAddress:','function(strIPAddress)',arguments);this.strUsersIPAddress=strIPAddress;},getUsersIPAddress:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',725,'getUsersIPAddress:','function()',arguments);return this.strUsersIPAddress;},setUserIsAtRegisteredIPAddress:function(blnUserIsAtRegisteredIPAddress)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',730,'setUserIsAtRegisteredIPAddress:','function(blnUserIsAtRegisteredIPAddress)',arguments);this.blnUserIsAtRegisteredIPAddress=blnUserIsAtRegisteredIPAddress;},getUserIsAtRegisteredIPAddress:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',734,'getUserIsAtRegisteredIPAddress:','function()',arguments);return this.blnUserIsAtRegisteredIPAddress;},setUsersEstablishmentDetails:function(strEstablishmentName,strIPAddressRange,strAdministratorName,strEstablishmentType)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',739,'setUsersEstablishmentDetails:','function(strEstablishmentName, strIPAddressRange, strAdministratorName, strEstablishmentType)',arguments);this.objUsersEstablishmentDetails={};this.objUsersEstablishmentDetails['strEstablishmentName']=strEstablishmentName;this.objUsersEstablishmentDetails['strIPAddressRange']=strIPAddressRange;this.objUsersEstablishmentDetails['strAdministratorName']=strAdministratorName;this.objUsersEstablishmentDetails['strEstablishmentType']=strEstablishmentType;},getUsersEstablishmentDetails:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',747,'getUsersEstablishmentDetails:','function()',arguments);return this.objUsersEstablishmentDetails;},setAcceptedTermsAndConditionsStatus:function(strAcceptedTermsAndConditions)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',752,'setAcceptedTermsAndConditionsStatus:','function(strAcceptedTermsAndConditions)',arguments);this.blnAcceptedTermsAndConditions=(strAcceptedTermsAndConditions=="true")?true:false;},getAcceptedTermsAndConditionsStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',756,'getAcceptedTermsAndConditionsStatus:','function()',arguments);return this.blnAcceptedTermsAndConditions;},setHasLinkToMapsLicence:function(strhasLinkToMapsLicence)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',761,'setHasLinkToMapsLicence:','function(strhasLinkToMapsLicence)',arguments);this.blnHasLinkToMapsLicence=(strhasLinkToMapsLicence=="true")?true:false;},getHasLinkToMapsLicence:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',765,'getHasLinkToMapsLicence:','function()',arguments);return this.blnHasLinkToMapsLicence;},setLayoutMode:function(strLayoutMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',770,'setLayoutMode:','function(strLayoutMode)',arguments);this.strLayoutMode=strLayoutMode;},getLayoutMode:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',774,'getLayoutMode:','function()',arguments);return this.strLayoutMode;},setInfomapperClassicImportStatus:function(strInfomapperClassicImportStatus)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',779,'setInfomapperClassicImportStatus:','function(strInfomapperClassicImportStatus)',arguments);this.blnIsInfomapperClassicImport=(strInfomapperClassicImportStatus=="true")?true:false;},getInfomapperClassicImportStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',783,'getInfomapperClassicImportStatus:','function()',arguments);return this.blnIsInfomapperClassicImport;},setIsShibbolethUser:function(strIsShibbolethUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',788,'setIsShibbolethUser:','function(strIsShibbolethUser)',arguments);this.blnIsShibbolethUser=(strIsShibbolethUser=="true")?true:false;},getIsShibbolethUser:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',792,'getIsShibbolethUser:','function()',arguments);return this.blnIsShibbolethUser;},setShibbolethLoginURL:function(strShibbolethLoginURL)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',797,'setShibbolethLoginURL:','function(strShibbolethLoginURL)',arguments);this.strShibbolethLoginURL=strShibbolethLoginURL;},getShibbolethLoginURL:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',801,'getShibbolethLoginURL:','function()',arguments);return this.strShibbolethLoginURL;},setHasCompletedDetailsUpdateForm:function(strHasCompletedDetailsUpdateForm)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',806,'setHasCompletedDetailsUpdateForm:','function(strHasCompletedDetailsUpdateForm)',arguments);this.blnHasCompletedDetailsUpdateForm=(strHasCompletedDetailsUpdateForm=="true")?true:false;},getHasCompletedDetailsUpdateForm:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',810,'getHasCompletedDetailsUpdateForm:','function()',arguments);return this.blnHasCompletedDetailsUpdateForm;},setPasswordResetRequiredStatus:function(strPasswordResetRequired)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',815,'setPasswordResetRequiredStatus:','function(strPasswordResetRequired)',arguments);this.blnPasswordResetRequired=(strPasswordResetRequired=="true")?true:false;},getPasswordResetRequiredStatus:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',819,'getPasswordResetRequiredStatus:','function()',arguments);return this.blnPasswordResetRequired;},setUserContextSensitiveHelpMode:function(strContextSensitiveHelpMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',824,'setUserContextSensitiveHelpMode:','function(strContextSensitiveHelpMode)',arguments);this.strContextSensitiveHelpMode=strContextSensitiveHelpMode;},getUserContextSensitiveHelpMode:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',828,'getUserContextSensitiveHelpMode:','function()',arguments);return this.strContextSensitiveHelpMode;},setIsPrintOnlyUser:function(strIsPrintOnlyUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',833,'setIsPrintOnlyUser:','function(strIsPrintOnlyUser)',arguments);this.blnIsPrintOnlyUser=(strIsPrintOnlyUser=='true')?true:false;},getIsPrintOnlyUser:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',837,'getIsPrintOnlyUser:','function()',arguments);return this.blnIsPrintOnlyUser;},setIsExpiredUser:function(strIsExpiredUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',842,'setIsExpiredUser:','function(strIsExpiredUser)',arguments);this.blnIsExpiredUser=(strIsExpiredUser=='true')?true:false;},getIsExpiredUser:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',846,'getIsExpiredUser:','function()',arguments);return this.blnIsExpiredUser;},setIsNoPreviousLicenceUser:function(strIsNoPreviousLicenceUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',851,'setIsNoPreviousLicenceUser:','function(strIsNoPreviousLicenceUser)',arguments);this.blnIsNoPreviousLicenceUser=(strIsNoPreviousLicenceUser=='true')?true:false;},getIsNoPreviousLicenceUser:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',855,'getIsNoPreviousLicenceUser:','function()',arguments);return this.blnIsNoPreviousLicenceUser;},setIsLicencedUser:function(strIsLicencedUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',860,'setIsLicencedUser:','function(strIsLicencedUser)',arguments);this.blnIsLicencedUser=(strIsLicencedUser=='true')?true:false;;},getIsLicencedUser:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',864,'getIsLicencedUser:','function()',arguments);return this.blnIsLicencedUser;},setIdentity:function(objIdentity)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',872,'setIdentity:','function(objIdentity)',arguments);this.objIdentity=objIdentity;},getIdentity:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',877,'getIdentity:','function()',arguments);return this.objIdentity;},setVersionNumber:function(strVersionNumber)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',882,'setVersionNumber:','function(strVersionNumber)',arguments);this.strVersionNumber=strVersionNumber;},setSystemVersionNumber:function(strSystemVersionNumber)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',887,'setSystemVersionNumber:','function(strSystemVersionNumber)',arguments);this.strSystemVersionNumber=strSystemVersionNumber;},setSystemVersionReleaseDate:function(strSystemVersionReleaseDate)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',892,'setSystemVersionReleaseDate:','function(strSystemVersionReleaseDate)',arguments);this.strSystemVersionReleaseDate=strSystemVersionReleaseDate;},setSystemVersionURLS:function(objSystemVersionURLs)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',897,'setSystemVersionURLS:','function(objSystemVersionURLs)',arguments);this.objSystemVersionURLs=objSystemVersionURLs;},getVersionNumber:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',902,'getVersionNumber:','function()',arguments);return this.strVersionNumber;},getSystemVersionNumber:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',907,'getSystemVersionNumber:','function()',arguments);return this.strSystemVersionNumber;},getSystemVersionReleaseDate:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',912,'getSystemVersionReleaseDate:','function()',arguments);return this.strSystemVersionReleaseDate;},setWebsiteDomain:function(strDomain)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',917,'setWebsiteDomain:','function(strDomain)',arguments);this.strWebsiteDomain=strDomain;},setWebsiteSecureDomain:function(strSecureDomain)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',922,'setWebsiteSecureDomain:','function(strSecureDomain)',arguments);this.strWebsiteSecureDomain=strSecureDomain;},setSessionTimeoutUrl:function(strUrl)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',927,'setSessionTimeoutUrl:','function(strUrl)',arguments);this.strSessionTimeoutUrl=strUrl;},setWebsiteSubdomains:function(objWebsiteSubdomains)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',932,'setWebsiteSubdomains:','function(objWebsiteSubdomains)',arguments);this.objWebsiteSubdomains=objWebsiteSubdomains;},getWebsiteDomain:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',937,'getWebsiteDomain:','function()',arguments);return this.strWebsiteDomain;},getWebsiteSecureDomain:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',942,'getWebsiteSecureDomain:','function()',arguments);return this.strWebsiteSecureDomain;},getWebsiteSubdomains:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',947,'getWebsiteSubdomains:','function()',arguments);return this.objWebsiteSubdomains;},setCurrentSession:function(strSessionId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',952,'setCurrentSession:','function(strSessionId)',arguments);this.strSessionId=strSessionId;},getCurrentSession:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',957,'getCurrentSession:','function()',arguments);return this.strSessionId;},setPromotionalResources:function(arrPromotionalResources)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',962,'setPromotionalResources:','function(arrPromotionalResources)',arguments);this.arrPromotionalResources=arrPromotionalResources;},getPromotionalResources:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',967,'getPromotionalResources:','function()',arguments);return this.arrPromotionalResources;},setComponentNiceNameMapping:function(strObjComponentURLToNiceNameMapping)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',973,'setComponentNiceNameMapping:','function(strObjComponentURLToNiceNameMapping)',arguments);var objComponentURLToNiceNameMapping=eval("("+strObjComponentURLToNiceNameMapping+")");this.objComponentURLToNiceNameMapping=objComponentURLToNiceNameMapping;},setLinkToUlearnDetails:function(objLinkTouLearnDetails)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',981,'setLinkToUlearnDetails:','function(objLinkTouLearnDetails)',arguments);this.objLinkTouLearnDetails=objLinkTouLearnDetails;},getLinkToUlearnDetails:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',986,'getLinkToUlearnDetails:','function()',arguments);return this.objLinkTouLearnDetails;},home:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',994,'home:','function()',arguments);if(this.objWholePageContainer)
{this.closePage();}
var arrComponents=Shell.generateComponentList('left');$j.each(arrComponents,function(intKey,objContainerComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1006,'$j.each(arrComponents,','function(intKey, objContainerComponent)',arguments);$j.each(objContainerComponent.objChildComponentObjects,function(strKey,objProperty)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1009,'$j.each(objContainerComponent.objChildComponentObjects,','function(strKey, objProperty)',arguments);$j.each(objProperty,function(intKey,objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1013,'$j.each(objProperty,','function(intKey, objComponent)',arguments);objContainerComponent.close('undefined',true);});});});this.resizeLeftColumnTo33Percent();Map.removeAllLayers();if(EzMapData.mapLayers.length>1)
{Map.setLayers(EzMapData.mapLayers[1],EzMapData.mapLayers[0],EzMapData.refPoint,EzMapData.srid,EzMapData.zoomLevel);}
else
{Map.setLayers(EzMapData.mapLayers[0],undefined,EzMapData.refPoint,EzMapData.srid,EzMapData.zoomLevel);}
if(!this.getUserAthenticatedStatus())
{var arrHomePageStateComponents=[{strComponentType:'login',strDefaultUrl:'showLogin',blnRightColumn:false,blnScrollingMode:false,objParams:{}},{strComponentType:'resourceExplorer',strDefaultUrl:'defaultState',blnRightColumn:false,blnScrollingMode:false,objParams:{}}];}
else
{var arrHomePageStateComponents=[{strComponentType:'resourceExplorer',strDefaultUrl:'defaultState',blnRightColumn:false,blnScrollingMode:false,objParams:{}}];}
var _this=this;$j.each(arrHomePageStateComponents.reverse(),function(intKey,objComponentParams)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1057,'$j.each(arrHomePageStateComponents.reverse(),','function(intKey, objComponentParams)',arguments);_this.openComponent(objComponentParams.strComponentType,objComponentParams.strDefaultUrl,objComponentParams.blnRightColumn,objComponentParams.blnScrollingMode,objComponentParams.objParams);});},resizeShell:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1065,'resizeShell:','function()',arguments);this.calculateBrowserViewportDimensions();var intBannerWidth=this.intBrowserViewportWidth-10;if(this.strBrowser=="Explorer"&&this.intVersion<=6)
{$j(this.strBannerSelector).css({width:(intBannerWidth+8)+'px'});}
else
{$j(this.strBannerSelector).css({width:intBannerWidth+'px'});}
var intContentHeight=this.intBrowserViewportHeight-$j(this.strBannerSelector).height();var objFooter=$j(this.strFooterSelector);if(objFooter.length>0)
{objFooter.css({width:intBannerWidth+'px'});intContentHeight-=objFooter.height();}
intContentHeight-=5;$j(this.strContentSelector).css({display:'block',width:intBannerWidth+'px',height:intContentHeight+'px'});$j(this.strColumnLeftSelector).css({height:intContentHeight+'px'});$j(this.strColumnRightSelector).css({height:intContentHeight+'px'});$j(this.strColumnWholeSelector).css({height:intContentHeight+'px',width:intBannerWidth+'px'});var objDividerWidgets=$j(this.strColumnDividerSelector);var intDividerHeight=intContentHeight-2;objDividerWidgets.css({height:intDividerHeight+'px',position:'absolute',top:'0px',left:'0px'});objDividerWidgets.find('#shellColumnDividerWidgetLeft').css({height:(intDividerHeight/2)+'px',top:'0px'});objDividerWidgets.find('#shellColumnDividerWidgetRight').css({height:(intDividerHeight/2)+'px',top:intDividerHeight/2+'px'});this.intContentAbsoluteWidth=intBannerWidth;this.intContentAbsoluteHeight=intContentHeight;this.resizeColumns();if(this.blnLightboxAlreadyActive)
{this.resizeLightboxWindow(this.objCurrentLightboxProperties['intLightboxWidth'],this.objCurrentLightboxProperties['intLightboxHeight']);}},resizeColumns:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1132,'resizeColumns:','function()',arguments);var objColumnLeft=$j(this.strColumnLeftSelector);var objColumnRight=$j(this.strColumnRightSelector);var objDividerWidgets=$j(this.strColumnDividerSelector);if((typeof(this.blnFullPageMode)!='undefined')&&this.blnFullPageMode===false)
{var minWidth=1008;var p=this.arrColumnWidths[this.intColumnSteppingSequence];var leftWidth=this.intContentAbsoluteWidth*p/100;leftWidth=Math.ceil(leftWidth);if(leftWidth==this.intContentAbsoluteWidth)
{leftWidth-=objDividerWidgets.outerWidth()+1;rightWidth=0;}
else
{var rightWidth=this.intContentAbsoluteWidth-leftWidth;if(rightWidth<0)
{rightWidth=0;}}
switch(this.strLayoutMode)
{case'':case'standard':objColumnLeft.css({position:'absolute',left:'',width:leftWidth+'px',display:(leftWidth==0)?'none':''});var intMargin=9;var intPos=leftWidth+intMargin;var intWidth=rightWidth-intMargin;if(intWidth<0)
{intWidth=0;}
objColumnRight.css({position:'absolute',left:intPos+'px',width:intWidth+'px'});var intDividerPos=leftWidth+1;objDividerWidgets.css({left:intDividerPos+'px'});rightWidth=intWidth;break;case'reverse':if(leftWidth==0)
{rightWidth-=8;}
objColumnRight.css({position:'absolute',left:'',width:rightWidth+'px',display:(rightWidth==0)?'none':''});var intMargin=9;var intPos=rightWidth+intMargin;var intWidth=leftWidth-intMargin;if(intWidth<0)
{intWidth=0;}
objColumnLeft.css({position:'absolute',left:intPos+'px',width:intWidth+'px'});var intDividerPos=rightWidth+1;objDividerWidgets.css({left:intDividerPos+'px'});leftWidth=intWidth;break;}
this.intColumnLeftAbsoluteWidth=leftWidth;this.intColumnRightAbsoluteWidth=rightWidth;this.intColumnWholeAbsoluteWidth=this.intContentAbsoluteWidth;this.callResizeFunctions();}},getContentAbsoluteHeight:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1279,'getContentAbsoluteHeight:','function()',arguments);return this.intContentAbsoluteHeight;},getColumnLeftAbsoluteWidth:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1284,'getColumnLeftAbsoluteWidth:','function()',arguments);return this.intColumnLeftAbsoluteWidth;},getColumnRightAbsoluteWidth:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1289,'getColumnRightAbsoluteWidth:','function()',arguments);return this.intColumnRightAbsoluteWidth;},resizeColumnsWidgetClicked:function(delta)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1296,'resizeColumnsWidgetClicked:','function(delta)',arguments);if(Shell.getIsLicencedUser()===false)
{Shell.showLicenceRequiredPopup('Resize the map area','resize_map');return;}
switch(this.strLayoutMode)
{case'':case'standard':break;case'reverse':delta=-delta;break;}
this.intColumnSteppingSequence+=delta;if(this.intColumnSteppingSequence<0)
{this.intColumnSteppingSequence=this.arrColumnWidths.length-1;}
else if(this.intColumnSteppingSequence>=this.arrColumnWidths.length)
{this.intColumnSteppingSequence=0;}
this.resizeColumns();if(typeof(Map)!="undefined")
{Map.resizeHorizontalToolBar();}
return false;},resizeLeftColumnTo50Percent:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1345,'resizeLeftColumnTo50Percent:','function()',arguments);this.intColumnSteppingSequence=2;this.resizeColumns();return false;},resizeLeftColumnTo33Percent:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1356,'resizeLeftColumnTo33Percent:','function()',arguments);this.intColumnSteppingSequence=1;this.resizeColumns();return false;},resizeLeftColumnTo0Percent:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1367,'resizeLeftColumnTo0Percent:','function()',arguments);this.intColumnSteppingSequence=0;this.resizeColumns();return false;},registerResizeFunction:function(func)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1377,'registerResizeFunction:','function(func)',arguments);this.resizefunctionArray.push(func);},unregisterResizeFunction:function(func)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1383,'unregisterResizeFunction:','function(func)',arguments);this.resizefunctionArray=this.resizefunctionArray.without(func);},callResizeFunctions:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1389,'callResizeFunctions:','function()',arguments);this.resizefunctionArray.each(function(func){func();});},getColumnsStepping:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1396,'getColumnsStepping:','function()',arguments);return this.intColumnSteppingSequence;},calculateBrowserViewportDimensions:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1403,'calculateBrowserViewportDimensions:','function()',arguments);intBrowserViewportWidth=0;intBrowserViewportHeight=0;if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))
{var intBrowserViewportWidth=document.documentElement.clientWidth;var intBrowserViewportHeight=document.documentElement.clientHeight;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight))
{var intBrowserViewportWidth=document.body.clientWidth;var intBrowserViewportHeight=document.body.clientHeight;}
this.intBrowserViewportWidth=intBrowserViewportWidth;this.intBrowserViewportHeight=intBrowserViewportHeight;},resizeShellLinkToUlearnMaps:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1431,'resizeShellLinkToUlearnMaps:','function()',arguments);this.calculateBrowserViewportDimensions();intElementSpacingTotal=0;var objLinkToMapHeader=$j(this.strLinkToMapHeaderSelector);var objLinkToMapSearchBar=$j(this.strLinkToMapSearchBarSelector);var objLinkToMapDetails=$j(this.strLinkToMapDetailsSelector);var objLinkToMapFooter=$j(this.strLinkToMapFooterSelector);var intHeaderHeight=0;var intSearchBarHeight=0;var intLinkDetailsHeight=0;var intFooterHeight=0;if(objLinkToMapHeader.length>0&&objLinkToMapHeader.css('display')!='none')
{intHeaderHeight=objLinkToMapHeader.height();intElementSpacingTotal+=5;}
if(objLinkToMapSearchBar.length>0&&objLinkToMapSearchBar.css('display')!='none')
{intSearchBarHeight=objLinkToMapSearchBar.height();intElementSpacingTotal+=5;}
if(objLinkToMapDetails.length>0&&objLinkToMapDetails.css('display')!='none'&&!this.blnFooterCollapsed)
{intLinkDetailsHeight=objLinkToMapDetails.height();intElementSpacingTotal+=5;}
if(objLinkToMapFooter.length>0&&objLinkToMapFooter.css('display')!='none'&&!this.blnFooterCollapsed)
{intFooterHeight=objLinkToMapFooter.height();intElementSpacingTotal+=5;}
if(this.blnFooterCollapsed)
{intElementSpacingTotal-=10;}
var intHeightAvailableToMappingContainer=0;intHeightAvailableToMappingContainer=this.intBrowserViewportHeight-intHeaderHeight-intSearchBarHeight-intLinkDetailsHeight-intFooterHeight-intElementSpacingTotal;if(intHeightAvailableToMappingContainer<0)
{intHeightAvailableToMappingContainer=0;}
$j(this.strLinkToMapMappingComponentsContainerSelector).css({height:intHeightAvailableToMappingContainer+'px'});var intHeightAvailableToEzmaps=0;intHeightAvailableToEzmaps=intHeightAvailableToMappingContainer-intSearchBarHeight-8;var intHeightAvailableToLayerPanel=intHeightAvailableToEzmaps;if(this.strBrowser=="Explorer"&&this.intVersion<=6)
{intHeightAvailableToLayerPanel+=2;}
else
{intHeightAvailableToLayerPanel-=10;}
if(intHeightAvailableToEzmaps<0)
{intHeightAvailableToEzmaps=0;}
if(intHeightAvailableToLayerPanel<0)
{intHeightAvailableToLayerPanel=0;}
$j(this.strLinkToMapEzmapsContainerSelector).css({height:intHeightAvailableToEzmaps+'px'});$j(this.strLinkToMapLayersContainerSelector).css({height:intHeightAvailableToLayerPanel+'px'});$j('#ezMaps').css({height:intHeightAvailableToEzmaps+'px'});var objLayerLegendElement=$j('#selectedLayerDetailsContainer');if(objLayerLegendElement.length>0)
{var objLinkToMapAvailableLayersContainer=$j('#linkToMapAvailableLayersContainer');var objLinkToMapSelectedLayerButtonsContainer=$j('#linkToMapSelectedLayerButtonsContainer');var intAvailableLayersHeight=0;var intSelectedLayerButtonsContainerHeight=0;if(objLinkToMapAvailableLayersContainer.length>0&&objLinkToMapAvailableLayersContainer.css('display')!='none')
{intAvailableLayersHeight=objLinkToMapAvailableLayersContainer.height();}
if(objLinkToMapSelectedLayerButtonsContainer.length>0&&objLinkToMapSelectedLayerButtonsContainer.css('display')!='none')
{intSelectedLayerButtonsContainerHeight=objLinkToMapSelectedLayerButtonsContainer.height();}
var intLayerLegendAvailableHeight=intHeightAvailableToLayerPanel-intAvailableLayersHeight-intSelectedLayerButtonsContainerHeight-50;if(intLayerLegendAvailableHeight<0)
{intLayerLegendAvailableHeight=0;}
objLayerLegendElement.css({height:intLayerLegendAvailableHeight+'px',overflowY:'auto'});}
var intWidthAvailableToMapping=0;if(this.blnLayerPanelCollapsed)
{intWidthAvailableToMapping=Math.ceil(this.intBrowserViewportWidth-40);}
else
{intWidthAvailableToMapping=Math.ceil(this.intBrowserViewportWidth/100*70);}
if($j(this.strLinkToMapLayersContainerSelector).css('display')=='none')
{intWidthAvailableToMapping=Math.ceil(this.intBrowserViewportWidth-8);}
if(intWidthAvailableToMapping<0)
{intWidthAvailableToMapping=0;}
$j(this.strLinkToMapEzmapsContainerSelector).css({width:intWidthAvailableToMapping+'px'});$j(this.strLinkToMapLayersContainerSelector).css({marginLeft:(intWidthAvailableToMapping+5)+'px'});},search:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1597,'search:','function()',arguments);this.blurSearchField();var strTearchText=$j('#search_text').val();var searchMediaType=$j('#search_media_type').val();if(strTearchText=="Enter your search criteria"||isFieldBlank(strTearchText))
{if(searchMediaType=='place')
{$j('#search_text').focus();return;}
else
{strTearchText='';}}
var objMapState=Map.getState(false);var strExtents=$j.toJSON(objMapState.ezMapState.extents);var strCenterPoint=$j.toJSON({x:objMapState.ezMapState.centerPoint.x,y:objMapState.ezMapState.centerPoint.y,srid:objMapState.ezMapState.centerPoint.srid});if(searchMediaType=='place')
{if(Shell.getIsLicencedUser()===false)
{var strUrl="setSearchCriteria/publishedResources/";var objParams={'resourceExplorerTextCriteria':strTearchText,'mediaTypeDisplay':'all','strExtents':strExtents,'strCenterPoint':strCenterPoint,'author':''};Shell.openComponent('resourceExplorer',strUrl,false,false,objParams);if(Shell.getUserAthenticatedStatus()===true)
{Shell.showPrintOnlySearchNotification();}}
var strUrl='setSearchCriteria/';var objParams={strSearchText:strTearchText,strExtents:strExtents,strCenterPoint:strCenterPoint};Shell.openComponent('placeExplorer',strUrl,false,false,objParams);}
else
{if(searchMediaType=='playlist')
{var strUrl="setSearchCriteria/playlists/";}
else
{var strUrl="setSearchCriteria/publishedResources/";}
var objParams={'resourceExplorerTextCriteria':strTearchText,'mediaTypeDisplay':searchMediaType,'strExtents':strExtents,'strCenterPoint':strCenterPoint,'author':''};Shell.openComponent('resourceExplorer',strUrl,false,false,objParams);}},focusSearchField:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1693,'focusSearchField:','function()',arguments);var objSearchField=$j('#search_text');objSearchField.select();if(this.intCurrentSearchBubbleDisplay<this.intMaxSearchBubbleDisplay)
{var objTagToElement=objSearchField.get(0);var strMessage="";strMessage+="<div style='width:300px;padding-top:0px;'>";strMessage+="<p><a href='#' onclick=\"Shell.suppressSearchBubble();return false;\">Don't show again</a></p>";switch(this.objIdentity.id)
{case'uLearn':strMessage+="<p style='font-size:110%;margin-top:10px;'>Please enter a Place name, Resource name, OSGB grid reference or Postcode to begin searching, additionally please choose the appropriate type of search from the select menu to the right before searching.</p>";break;case'ireland':strMessage+="<p style='font-size:110%;margin-top:10px;'>Please enter a Place name or Resource name to begin searching, additionally please choose the appropriate type of search from the select menu to the right before searching.</p>";break;case'nireland':strMessage+="<p style='font-size:110%;margin-top:10px;'>Please enter a Place name, Resource name or Postcode to begin searching, additionally please choose the appropriate type of search from the select menu to the right before searching.</p>";break;}
strMessage+="</div>";if(this.objIdentity.id!='ireland')
{Shell.openSpeechBubble(strMessage,objTagToElement,0,'left','bottom',0,0,999999);}
this.intCurrentSearchBubbleDisplay++;}},blurSearchField:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1738,'blurSearchField:','function()',arguments);var objSearchField=$j('#search_text');if(isFieldBlank(objSearchField.val()))
{objSearchField.val('Enter your search criteria');}
Shell.closeSpeechBubble();},suppressSearchBubble:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1750,'suppressSearchBubble:','function()',arguments);this.intCurrentSearchBubbleDisplay=this.intMaxSearchBubbleDisplay;Shell.closeSpeechBubble();},showMoreSearchOptions:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1757,'showMoreSearchOptions:','function()',arguments);var searchText=$j('#search_text').val();var resourceExplorer=objShell.getComponentFromType('resourceExplorer');if(typeof(resourceExplorer)!='undefined')
{resourceExplorer.openToggleSearchFilters(true);return true;}
var objMapState=Map.getState(false);var strExtents=$j.toJSON(objMapState.ezMapState.extents);var strCenterPoint=$j.toJSON({x:objMapState.ezMapState.centerPoint.x,y:objMapState.ezMapState.centerPoint.y,srid:objMapState.ezMapState.centerPoint.srid});var strUrl='setSearchCriteria/publishedResources/';var objParams={resourceExplorerTextCriteria:'',strExtents:strExtents,strCenterPoint:strCenterPoint,autoOpenMoreSearchOptions:true};Shell.openComponent('resourceExplorer',strUrl,false,false,objParams);},showPage:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1797,'showPage:','function()',arguments);this.blnFullPageMode=true;$j(this.strColumnLeftSelector).css({visibility:'hidden',display:'none'});$j(this.strColumnRightSelector).css({display:'none'});$j(this.strColumnWholeSelector).css({display:'block'});$j(this.strColumnDividerSelector).css({display:'none'});Map.hide();},openPage:function(strComponentType,strDefaultURL)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1810,'openPage:','function(strComponentType, strDefaultURL)',arguments);this.showPage();if(this.objWholePageContainer)
{var components=this.objWholePageContainer.getComponentsFromType(strComponentType);if(components.length>0)
{if(strDefaultURL)
{components[0].externalUpdate(strDefaultURL);}}
else
{this.objWholePageContainer.close();this.loadPageComponent(strComponentType,strDefaultURL,$j(this.strColumnWholeSelector).get(0));}}
else
{this.loadPageComponent(strComponentType,strDefaultURL,$j(this.strColumnWholeSelector).get(0));}},closePage:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1841,'closePage:','function()',arguments);$j(this.strColumnLeftSelector).css({visibility:'visible',display:'block'});$j(this.strColumnRightSelector).css({display:'block'});$j(this.strColumnWholeSelector).css({display:'none'});$j(this.strColumnDividerSelector).css({display:'block'});this.objWholePageContainer.close();this.objWholePageContainer=null;this.blnFullPageMode=false;Map.show();},openComponent:function(strComponentType,strDefaultURL,blnRightColumn,blnScrollingMode,objParams)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1867,'openComponent:','function(strComponentType, strDefaultURL, blnRightColumn, blnScrollingMode, objParams)',arguments);if(this.objWholePageContainer)
{this.closePage();}
if(this.getColumnsStepping()==0&&!blnRightColumn)
{this.resizeLeftColumnTo33Percent();}
if(blnRightColumn)
{Map.hideLayerList();}
if(blnRightColumn)
{this.setRightColumnMode('scrolling');}
var strColumn=blnRightColumn?'right':'left';if(strComponentType=='resourceExplorer')
{var arrExistingComponents=this.getComponentsFromType(strComponentType,strColumn,true);}
else
{var arrExistingComponents=this.getComponentsFromType(strComponentType,strColumn);}
if(arrExistingComponents.length>0)
{var objComponent=arrExistingComponents[0];if(!blnRightColumn)
{var objComponentParent=objComponent.returnComponentParent();this.moveContainerToTop(objComponentParent);if(objComponentParent.returnCollapsedState())
{objComponentParent.expand();}}
if(typeof(strDefaultURL)!='undefined')
{objComponent.externalUpdate(strDefaultURL,objParams);}}
else
{if(blnRightColumn)
{this.loadRightColumnComponent(strComponentType,strDefaultURL,objParams);}
else
{this.loadLeftColumnComponent(strComponentType,strDefaultURL,objParams);}}},setRightColumnMode:function(mode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1947,'setRightColumnMode:','function(mode)',arguments);switch(mode)
{case'scrolling':Map.hide();$j(this.strColumnRightSelector).css({overflowY:'scroll'});this.blnRightColumnScrollingMode=true;break;default:Map.show();$j(this.strColumnRightSelector).css({overflowY:'hidden'});this.scrollRightToTop();this.blnRightColumnScrollingMode=false;break;}},getRightColumnScrollingMode:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1982,'getRightColumnScrollingMode:','function()',arguments);return this.blnRightColumnScrollingMode;},addJavascriptAsset:function(intAjaxId,strPath)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',1987,'addJavascriptAsset:','function(intAjaxId, strPath)',arguments);if(typeof(this.objRequiredJavascriptAssets[intAjaxId])=='undefined')
{this.objRequiredJavascriptAssets[intAjaxId]=[strPath];}
else
{this.objRequiredJavascriptAssets[intAjaxId].push(strPath);}},loadPageComponent:function(strComponentType,strDefaultURL)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2001,'loadPageComponent:','function(strComponentType, strDefaultURL)',arguments);var strLoadAction='loadPageComponent';var _this=this;var funcAjaxHandler=function(intElementId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2007,'var funcAjaxHandler =','function(intElementId)',arguments);_this.instantiatePageComponent(intElementId);};var objTarget=$j(this.strColumnWholeSelector).get(0);this.loadComponent(strLoadAction,strComponentType,strDefaultURL,funcAjaxHandler,objTarget,'top');},loadLeftColumnComponent:function(strComponentType,strDefaultURL,objParams)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2019,'loadLeftColumnComponent:','function(strComponentType, strDefaultURL, objParams)',arguments);var strLoadAction='loadLeftComponent';var _this=this;var funcAjaxHandler=function(intElementId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2025,'var funcAjaxHandler =','function(intElementId)',arguments);_this.instantiateLeftColumnComponent(intElementId);};var objTarget=$j(this.strSortableColumnSelector);var arrSequence=$j.map(objTarget.sortable('toArray'),function(strValue,intKey)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2034,'var arrSequence = $j.map(objTarget.sortable(\'toArray\'),','function(strValue, intKey)',arguments);return strValue.replace(/[^\d]/g,'');});var objLastLockedComponent=null;$j.each(objTarget.sortable('toArray'),function(intKey,strContainerWrapperId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2042,'$j.each(objTarget.sortable(\'toArray\'),','function(intKey, strContainerWrapperId)',arguments);var intElementId=strContainerWrapperId.replace(/[^\d]/g,'');var objContainerElement=$j('#container'+intElementId);if(objContainerElement.length==0)
{return true;}
var objContainerComponentObject=_this.returnComponentInstanceFromId(objContainerElement.attr('id'));var blnIsContainerLocked=objContainerComponentObject.returnLockedState();if(!blnIsContainerLocked)
{return false;}
objLastLockedComponent=$j('#'+strContainerWrapperId);});var objInsertion=null;if(objLastLockedComponent!=null)
{strInsertion='after';objTarget=objLastLockedComponent.get(0);}
else
{strInsertion='top';objTarget=objTarget.get(0);}
if(strComponentType=='login'||strComponentType=='registration')
{strInsertion='Top';}
this.loadComponent(strLoadAction,strComponentType,strDefaultURL,funcAjaxHandler,objTarget,strInsertion,objParams);},loadRightColumnComponent:function(strComponentType,strDefaultURL,objParams)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2096,'loadRightColumnComponent:','function(strComponentType, strDefaultURL, objParams)',arguments);var strLoadAction='loadRightComponent';var _this=this;var funcAjaxHandler=function(intAjaxId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2102,'var funcAjaxHandler =','function(intAjaxId)',arguments);_this.instantiateRightColumnComponent(intAjaxId);};var objTarget=$j(this.strColumnRightSelector).get(0);this.loadComponent(strLoadAction,strComponentType,strDefaultURL,funcAjaxHandler,objTarget,'bottom',objParams);},loadComponent:function(strLoadAction,strComponentType,strDefaultURL,funcAjaxHandler,objTarget,strInsertionPosition,objPassedParams)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2114,'loadComponent:','function(strLoadAction, strComponentType, strDefaultURL, funcAjaxHandler, objTarget, strInsertionPosition, objPassedParams)',arguments);var strUrl=strLoadAction+'/'+strComponentType;if(typeof(strDefaultURL)=='undefined')
{strDefaultURL='';}
var intAjaxId=++this.intAjaxId;var objParams={strDefaultURL:strComponentType+'/[ID_PLACEHOLDER]/'+strDefaultURL,intAjaxId:intAjaxId};if(typeof(objPassedParams)=='object')
{for(var strKey in objPassedParams)
{var strValue=objPassedParams[strKey];objParams[strKey]=strValue;}}
this.objAjaxHandlers[intAjaxId]=funcAjaxHandler;var strComponentPlaceHolderHTML='';var strContainerWrapperId='containerWrapper_'+intAjaxId;strComponentPlaceHolderHTML+='<div id="'+strContainerWrapperId+'" class="containerWrapper" style="display:none;">';if(this.objComponentURLToNiceNameMapping[strComponentType])
{var strPlaceholderTitle='Loading '+this.objComponentURLToNiceNameMapping[strComponentType]+'...';}
else
{var strPlaceholderTitle='Loading component...';}
strComponentPlaceHolderHTML+='<!--Output Container component-->';strComponentPlaceHolderHTML+='<div class="containerPlaceholder container">';strComponentPlaceHolderHTML+='<div class="title_bar">';strComponentPlaceHolderHTML+='<div class="handle"><h2>'+strPlaceholderTitle+'</h2><div class="progressBar"><div class="progress"></div></div><span class="activity_widget activity_widget_visible" title="Working..."></span></div>';strComponentPlaceHolderHTML+='</div>';strComponentPlaceHolderHTML+='<div class="body" style="zoom:1;display:block;position:relative;">';strComponentPlaceHolderHTML+='<div class="background" style="height:100%;position:relative;">';strComponentPlaceHolderHTML+='<div class="containerContent" style="height:100%;width:100%;position:relative;">';strComponentPlaceHolderHTML+='<div style="text-align:center;height:130px;padding:10px;">';strComponentPlaceHolderHTML+='<p style="font-size:70%;margin-top:50px;color:gray;">Please wait...</p>';strComponentPlaceHolderHTML+='</div>';strComponentPlaceHolderHTML+='</div>';strComponentPlaceHolderHTML+='</div>';strComponentPlaceHolderHTML+='</div>';strComponentPlaceHolderHTML+='</div>';strComponentPlaceHolderHTML+='<!--Output Container component-->';strComponentPlaceHolderHTML+='</div>';switch(strInsertionPosition.toUpperCase())
{case'TOP':$j(objTarget).prepend(strComponentPlaceHolderHTML);break;case'BOTTOM':$j(objTarget).append(strComponentPlaceHolderHTML);break;case'AFTER':$j(objTarget).after(strComponentPlaceHolderHTML);break;case'BEFORE':$j(objTarget).before(strComponentPlaceHolderHTML);break;}
$j('#'+strContainerWrapperId).fadeIn(500);this.update(strUrl,objParams,null,'#containerWrapper_'+intAjaxId,true,false,false);},createComponent:function(intAjaxId,intElementId,strComponentName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2211,'createComponent:','function(intAjaxId, intElementId, strComponentName)',arguments);this.objAjaxElementIds[intAjaxId]=intElementId;this.objLoadedJavascriptAssetsCount[intAjaxId]=0;if(typeof(this.objRequiredJavascriptAssets[intAjaxId])=='undefined')
{this.objRequiredJavascriptAssets[intAjaxId]=[];this.checkAssetLoadProgress(intAjaxId);}
else
{var _this=this;$j.each(this.objRequiredJavascriptAssets[intAjaxId],function(intKey,strCurrentJavascriptPath)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2245,'$j.each(this.objRequiredJavascriptAssets[intAjaxId],','function(intKey, strCurrentJavascriptPath)',arguments);var blnAlreadyExists=_this.searchDOMForExistingAsset('javascript',strCurrentJavascriptPath);if(blnAlreadyExists)
{_this.updateAssetLoadProgress(intAjaxId,"javascript");}
else
{_this.includeJS(intAjaxId,strCurrentJavascriptPath,strComponentName);}});}},searchDOMForExistingAsset:function(strAssetType,strNewAssetPath)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2266,'searchDOMForExistingAsset:','function(strAssetType, strNewAssetPath)',arguments);var strElementType="script[type='text/javascript']";var strElementTypePathAttribute='src';var blnAlreadyExists=false;$j('head '+strElementType).each(function(intKey,strValue)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2277,'$j(\'head \' + strElementType).each(','function(intKey, strValue)',arguments);var strExistingPath=eval("strValue."+strElementTypePathAttribute);if(strExistingPath.indexOf(strNewAssetPath)!=-1)
{blnAlreadyExists=true;return false;}});return blnAlreadyExists;},includeJS:function(intAjaxId,strJSPath,strComponentName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2294,'includeJS:','function(intAjaxId, strJSPath, strComponentName)',arguments);var strScriptsSubdomain=this.objWebsiteSubdomains['javascript'];var strJSPath=strScriptsSubdomain+'/cache/'+Shell.getVersionNumber()+'/'+Shell.getSystemVersionNumber()+'/'+this.objIdentity.id+'/'+this.strCulture+'/localise'+strJSPath;var strComponentJavascriptClassName=this.convertComponentTypeToJavascriptClass(strComponentName);var objOnloadFunc=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2303,'var objOnloadFunc =','function()',arguments);Shell.checkJSLoaded(intAjaxId,strComponentJavascriptClassName);};var objHeadTag=document.getElementsByTagName('head')[0];var objJS=document.createElement('script');$j(objJS).attr('type','text/javascript');$j(objJS).attr('src',strJSPath);objHeadTag.appendChild(objJS);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer')
{objJS.onreadystatechange=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2318,'objJS.onreadystatechange =','function ()',arguments);if(objJS.readyState=='complete'||objJS.readyState=='loaded')
{objOnloadFunc();}};}
else
{$j(objJS).bind('load',{objOnloadFunc:objOnloadFunc},function(event)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2329,'$j(objJS).bind(\'load\', {objOnloadFunc: objOnloadFunc},','function(event)',arguments);event.data.objOnloadFunc();});}
return false;},checkJSLoaded:function(intAjaxId,strComponentJavascriptClassName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2338,'checkJSLoaded:','function(intAjaxId, strComponentJavascriptClassName)',arguments);if(typeof(strComponentJavascriptClassName)=='undefined')
{setTimeout("Shell.checkJSLoaded("+intAjaxId+", '"+strComponentJavascriptClassName+"')",500);}
else
{this.updateAssetLoadProgress(intAjaxId,'javascript');}},updateAssetLoadProgress:function(intAjaxId,strAssetType)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2352,'updateAssetLoadProgress:','function(intAjaxId, strAssetType)',arguments);this.objLoadedJavascriptAssetsCount[intAjaxId]++;this.checkAssetLoadProgress(intAjaxId);},checkAssetLoadProgress:function(intAjaxId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2363,'checkAssetLoadProgress:','function(intAjaxId)',arguments);if(this.objLoadedJavascriptAssetsCount[intAjaxId]==this.objRequiredJavascriptAssets[intAjaxId].length)
{this.instantiateLoadedComponent(intAjaxId);}},instantiateLoadedComponent:function(intAjaxId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2376,'instantiateLoadedComponent:','function(intAjaxId)',arguments);var elementId=this.objAjaxElementIds[intAjaxId];this.objAjaxHandlers[intAjaxId](elementId);var objComponentInstance=objComponentReferences[elementId];objComponentInstance.executeUpdateInitCode();objComponentInstance.enable();},instantiatePageComponent:function(intElementId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2390,'instantiatePageComponent:','function(intElementId)',arguments);var objContainerElement=$j('#'+intElementId).parents('.container:first').get(0);var objContainer=this.createComponentFromElement(objContainerElement);this.objWholePageContainer=objContainer;objContainer.beginUpdateInitCode();this.scrollToTop();},instantiateLeftColumnComponent:function(intElementId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2411,'instantiateLeftColumnComponent:','function(intElementId)',arguments);var objContainerElement=$j('#'+intElementId).parents('.container:first').get(0);var objContainer=this.createComponentFromElement(objContainerElement);objContainer.beginUpdateInitCode();this.createSortable();this.notifySortableStateChange();this.scrollToTop();},instantiateRightColumnComponent:function(intElementId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2439,'instantiateRightColumnComponent:','function(intElementId)',arguments);var objContainerElement=$j('#'+intElementId).parents('.container:first').get(0);var objContainer=this.createComponentFromElement(objContainerElement);objContainer.beginUpdateInitCode();this.scrollToTop();},createComponentFromElement:function(objNewComponentElement)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2461,'createComponentFromElement:','function(objNewComponentElement)',arguments);var strComponentType=this.getComponentType(objNewComponentElement);var strComponentColumn=this.getComponentColumn(objNewComponentElement);eval("var objComponent = new "+this.convertComponentTypeToJavascriptClass(strComponentType)+"(objNewComponentElement, this, '"+strComponentType+"', '"+strComponentColumn+"')");if(typeof(this.objChildComponentObjects[strComponentColumn])=='undefined')
{this.objChildComponentObjects[strComponentColumn]=[];}
this.objChildComponentObjects[strComponentColumn].push(objComponent);return objComponent;},moveContainerToTop:function(objComponentObject)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2487,'moveContainerToTop:','function(objComponentObject)',arguments);var arrSequence=$j.map($j(this.strSortableColumnSelector).sortable('toArray'),function(strValue,intKey)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2489,'var arrSequence = $j.map($j(this.strSortableColumnSelector).sortable(\'toArray\'),','function(strValue, intKey)',arguments);return strValue.replace(/[^\d]/g,'');});var objContainerWrapper=$j(objComponentObject.returnElementReference()).parents('.containerWrapper:first');$j(this.strSortableColumnSelector).prepend(objContainerWrapper);$j(this.strSortableColumnSelector).sortable('refresh');this.notifySortableStateChange();this.scrollToTop();},createSortable:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2508,'createSortable:','function()',arguments);var _this=this;$j(this.strSortableColumnSelector).sortable({containment:this.strSortableColumnSelector,items:'div.containerWrapper',handle:'div.handle',axis:'y',opacity:0.5,forcePlaceholderSize:true,placeholder:'shellColumnLeftPlaceholder',revert:true,update:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2522,'update:','function()',arguments);_this.notifySortableStateChange();}});},notifySortableStateChange:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2530,'notifySortableStateChange:','function()',arguments);var arrSequence=$j.map($j(this.strSortableColumnSelector).sortable('toArray'),function(strValue,intKey)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2532,'var arrSequence = $j.map($j(this.strSortableColumnSelector).sortable(\'toArray\'),','function(strValue, intKey)',arguments);return strValue.replace(/[^\d]/g,'');});var url='setOrder/'+arrSequence.join(',');this.notify(url);},scrollToComponent:function(objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2542,'scrollToComponent:','function(objComponent)',arguments);$j(this.strColumnLeftSelector).scrollTo(objComponent.returnElementReference());},scrollToTop:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2548,'scrollToTop:','function()',arguments);$j(this.strColumnLeftSelector).scrollTo(0);},scrollRightToTop:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2554,'scrollRightToTop:','function()',arguments);$j(this.strColumnRightSelector).scrollTo(0);},scrollToYPos:function(intYPos)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2560,'scrollToYPos:','function(intYPos)',arguments);$j(this.strColumnLeftSelector).scrollTo(intYPos);},menu:function(event,srcElement,menuId,anonymous)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2566,'menu:','function(event, srcElement, menuId, anonymous)',arguments);var _this=this;var menu=new UMenu(150,'shellMenu');var objBrowserDetails=objShell.getBrowserDetails();var blnAuthenticated=Shell.getUserAthenticatedStatus();var blnIsLicencedUser=Shell.getIsLicencedUser();if(menuId=='you')
{menu.addItem('<img src="/view/shared/assets/images/info_icon.png">',function(){ContextualHelp.openFullHelpWindow('dynamic','meMenu','Me Menu','',700,450)});if(anonymous)
{menu.addItem('Please login to access your resources',function(){Shell.openComponent('login','showLogin');});}
else
{var myResourcesSubmenu=new UMenu(150,'shellMenu');if(blnIsLicencedUser===false)
{myResourcesSubmenu.addItem('Private',function(){Shell.showLicenceRequiredPopup('View your personal resources','my_resources');});myResourcesSubmenu.addItem('Published',function(){Shell.showLicenceRequiredPopup('View your personal resources','my_resources');});}
else
{myResourcesSubmenu.addItem('Private',function(){Shell.processResourceExplorerMenuOption('showPersonal','myResources');});myResourcesSubmenu.addItem('Published',function(){Shell.processResourceExplorerMenuOption('showPersonalPublished','myResources');});}
if(Shell.getUserPupilStatus())
{if(blnIsLicencedUser===false)
{myResourcesSubmenu.addItem('Awaiting approval',function(){Shell.showLicenceRequiredPopup('Review resources awaiting approval','approve_resources.png');});myResourcesSubmenu.addItem('Approval rejected',function(){Shell.showLicenceRequiredPopup('Review resources awaiting approval','approve_resources.png');});}
else
{myResourcesSubmenu.addItem('Awaiting approval',function(){Shell.processResourceExplorerMenuOption('showPersonalAwaitingApproval','myResources');});myResourcesSubmenu.addItem('Approval rejected',function(){Shell.processResourceExplorerMenuOption('showPersonalApprovalRejected','myResources');});}}
menu.addSubmenu('My resources',myResourcesSubmenu);if(this.objIdentity.id=='ireland')
{var myProjectsSubmenu=new UMenu(150,'shellMenu');myProjectsSubmenu.addItem('Private',function(){Shell.openComponent("resourceExplorer","showPersonalProjects");});myProjectsSubmenu.addItem('Published',function(){Shell.openComponent("resourceExplorer","showPersonalProjectsPublished");});if(Shell.getUserPupilStatus())
{myProjectsSubmenu.addItem('Awaiting approval',function(){Shell.openComponent("resourceExplorer","showPersonalProjectsAwaitingApproval");});myProjectsSubmenu.addItem('Approval rejected',function(){Shell.openComponent("resourceExplorer","showPersonalProjectsApprovalRejected");});}
menu.addSubmenu('My playlists',myProjectsSubmenu);}
else
{var myPlaylistsSubmenu=new UMenu(150,'shellMenu');myPlaylistsSubmenu.addItem('Private',function(){Shell.processResourceExplorerMenuOption('showPlaylistsPersonal','myResources');});if(blnIsLicencedUser===false)
{myPlaylistsSubmenu.addItem('Published',function(){Shell.showLicenceRequiredPopup('Publish resources for the rest of the world to see','publish_resources');});}
else
{myPlaylistsSubmenu.addItem('Published',function(){Shell.processResourceExplorerMenuOption('showPlaylistsPersonalPublished','myResources');});}
menu.addSubmenu('My playlists',myPlaylistsSubmenu);}
var creationSubmenu=new UMenu(150,'shellMenu');if(blnIsLicencedUser===false)
{menu.addItem('Organise',function(){Shell.showLicenceRequiredPopup('Organise your resources into folders','organise_resources');});creationSubmenu.addItem('Upload',function(){Shell.showLicenceRequiredPopup('Upload and create resources','upload_and_create');});creationSubmenu.addItem('Folder',function(){Shell.showLicenceRequiredPopup('Upload and create resources','upload_and_create');});creationSubmenu.addItem('Web link',function(){Shell.showLicenceRequiredPopup('Upload and create resources','upload_and_create');});if(this.objIdentity.id=='ireland')
{creationSubmenu.addItem('Playlist',function(){Shell.showLicenceRequiredPopup('Upload and create resources','upload');});}
menu.addSubmenu('New',creationSubmenu);menu.addItem('Account',function(){Shell.openComponent("account","");});menu.addItem('Favourites',function(){Shell.showLicenceRequiredPopup('Save resources to your favourites','favourites');});menu.addItem('Annotate Map',function(){Shell.showLicenceRequiredPopup('Create, position and save annotations on the map','annotate_map');});}
else
{menu.addItem('Organise',function(){Shell.openPage("organiser");});creationSubmenu.addItem('Upload',function(){Shell.openComponent('resourceEditor','addFiles',true);});creationSubmenu.addItem('Folder',function(){Shell.openComponent('resourceEditor','beginAddResource/folder',true);});creationSubmenu.addItem('Web link',function(){Shell.openComponent('resourceEditor','beginAddResource/web link',true);});if(this.objIdentity.id=='ireland')
{creationSubmenu.addItem('Playlist',function(){Shell.openComponent("resourceEditor","beginAddResource/project",true);});}
menu.addSubmenu('New',creationSubmenu);menu.addItem('Account',function(){Shell.openComponent("account","");});menu.addItem('Favourites',function(){Shell.openPage("favouritesOrganiser");});menu.addItem('Annotate Map',function(){Shell.openComponent("annotateMap","showIcons/true");});}
var languageSubMenu=new UMenu(150,'shellMenu');languageSubMenu.addItem('English',function(){Shell.setCulture('en_GB');});if(this.objIdentity.id=='ireland')
{languageSubMenu.addItem('Gaelige',function(){Shell.setCulture('ga_IE');});}
else if(this.objIdentity.id=='nireland')
{languageSubMenu.addItem('Gaelige',function(){Shell.setCulture('ga_UK');});}
menu.addSubmenu('Language',languageSubMenu);}}
else if(menuId=='explore')
{menu.addItem('<img src="/view/shared/assets/images/info_icon.png">',function(){ContextualHelp.openFullHelpWindow('dynamic','exploreMenu','Explore Menu','',700,300)});menu.addItem('All resources',function(){Shell.showMoreSearchOptions();});menu.addItem('Tag explorer',function(){Shell.openComponent("tagExplorer","showMostPopularTags");});if(!anonymous)
{menu.addItem('Thematics',function(){Shell.processResourceExplorerMenuOption('showThematicLayers','publishedResources');});}}
else if(menuId=='school')
{menu.addItem('<img src="/view/shared/assets/images/info_icon.png">',function(){ContextualHelp.openFullHelpWindow('dynamic','schoolMenu','School Menu','',700,300)});if(anonymous)
{menu.addItem('Please login',function(){Shell.openComponent("login","showLogin");});}
else
{if(Shell.getUserEstablishmentAdminStatus())
{menu.addItem('Profile',function(){Shell.openComponent("resourceEditor","editSchoolProfile");});}
if(Shell.getUserStudentTeacherStatus()===false)
{menu.addItem('User accounts',function(){Shell.openComponent("userManagement","showUsers");});}
if(blnIsLicencedUser===false)
{var publishingSubmenu=new UMenu(150,'shellMenu');publishingSubmenu.addItem('Resources awaiting approval',function(){Shell.showLicenceRequiredPopup('Review resources awaiting approval','approve_resources');});menu.addSubmenu('Publishing',publishingSubmenu);}
else
{var publishingSubmenu=new UMenu(150,'shellMenu');publishingSubmenu.addItem('Resources awaiting approval',function(){Shell.openComponent("resourceGatekeeping","showPublishRequestsByUser");});menu.addSubmenu('Publishing',publishingSubmenu);}
if(Shell.getUserEstablishmentAdminStatus()&&blnIsLicencedUser===true)
{if(this.objIdentity.id!='ireland'&&this.objIdentity.id!='nireland')
{var linkToULearnSubmenu=new UMenu(150,'shellMenu');linkToULearnSubmenu.addItem('Here is our school',function(){Shell.openComponent("linkToUlearnEditor","showAutomaticSchoolOnMapLink",false,false);});if(this.getHasLinkToMapsLicence())
{linkToULearnSubmenu.addItem('Settings',function(){Shell.openComponent("linkToUlearn","showSettings");});linkToULearnSubmenu.addItem('Links',function(){Shell.openComponent("linkToUlearn","showLinks");});}
menu.addSubmenu('Link to '+this.objIdentity.name+'',linkToULearnSubmenu);}}}}
else if(menuId=='help')
{menu.addItem('<img src="/view/shared/assets/images/info_icon.png">',function(){ContextualHelp.openFullHelpWindow('dynamic','helpMenu','Help Menu','',700,450)});if(this.objIdentity.id=='ireland')
{menu.addItem('Contact us',function(){Shell.launchNewWindow("static/scoilnet/contact."+_this.strCulture+".php",true);});menu.addItem('About '+this.objIdentity.name,function(){Shell.launchNewWindow("static/scoilnet/about."+_this.strCulture+".php",true);});menu.addItem('Latest news',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/12574",true);});}
else if(this.objIdentity.id=='nireland')
{menu.addItem('Contact us',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/12561",true);});menu.addItem('About '+this.objIdentity.name,function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/16438",true);});menu.addItem('Latest news',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/106283",true);});}
else
{menu.addItem('Contact us',function(){Shell.launchNewWindow(_this.objSystemVersionURLs.contactUs);});menu.addItem('About '+this.objIdentity.name,function(){Shell.launchNewWindow(_this.objSystemVersionURLs.about);});}
var termsSubmenu=new UMenu(150,'shellMenu');if(this.objIdentity.id=='uLearn')
{termsSubmenu.addItem('uLearn terms',function(){Shell.launchNewWindow("static/ulearn/terms_and_conditions/terms.html",true);});termsSubmenu.addItem('Privacy policy',function(){Shell.launchNewWindow("static/ulearn/terms_and_conditions/privacy.html",true);});termsSubmenu.addItem('Data consent form',function(){Shell.launchNewWindow("static/ulearn/terms_and_conditions/ulearn_dataconsent.pdf",true);});if(anonymous)
{menu.addItem('Upgrade uLearn',function(){Shell.lightboxAlert("Please log in to uLearn and click on Me > Account to purchase a licence, allowing you to access uLearn's maps.<br /><br />If you have any difficulty please email us on ulearn.support@webbased.co.uk or call us on 01752 797134.",500,150);});}
else
{menu.addItem('Upgrade uLearn',function(){Shell.openComponent("account","");});}
menu.addItem('FAQs',function(){Shell.launchNewWindow(_this.objSystemVersionURLs.FAQs,true);});menu.addItem('User guides',function(){Shell.launchNewWindow(_this.objSystemVersionURLs.userGuides,true);});menu.addItem('Video guides',function(){Shell.launchNewWindow(_this.objSystemVersionURLs.videoGuides,true);});}
else if(this.objIdentity.id=='ireland')
{termsSubmenu.addItem('Scoilnet terms',function(){Shell.launchNewWindow("static/scoilnet/terms_and_conditions/terms."+_this.strCulture+".php",true);});termsSubmenu.addItem('Privacy policy',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/12575",true);});termsSubmenu.addItem('Data consent form',function(){Shell.launchNewWindow("static/scoilnet/terms_and_conditions/scoilnet_dataconsent.pdf",true);});menu.addItem('Quick start videos',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/12576",true);});menu.addItem('Reference Manual',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/12577",true);});menu.addItem('User guides',function(){Shell.launchNewWindow(_this.objSystemVersionURLs.userGuidesScoilnet,true);});}
else if(this.objIdentity.id=='nireland')
{termsSubmenu.addItem('NI Maps terms',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/13097",true);});termsSubmenu.addItem('Privacy policy',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/13098",true);});termsSubmenu.addItem('Data consent form',function(){Shell.launchNewWindow("http://ulearn.webbased.co.uk/channel/view_resource/id/13099",true);});menu.addItem('Quick start videos',function(){Shell.launchNewWindow('http://ulearn.webbased.co.uk/channel/view_resource/id/113242',true);});menu.addItem('Reference Manual',function(){Shell.launchNewWindow('http://ulearn.webbased.co.uk/channel/view_resource/id/13244',true);});}
menu.addSubmenu('Terms and Conditions',termsSubmenu);if((this.objIdentity.id=='uLearn')&&!(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6))
{menu.addItem('Show splash page',function(){SplashPage.showSplashPage();});}
var versionsSubmenu=new UMenu(150,'shellMenu');versionsSubmenu.addItem('Release notes',function(){Shell.launchNewWindow(_this.objSystemVersionURLs.releaseNotes,true);});menu.addSubmenu('Version '+_this.strVersionNumber,versionsSubmenu);}
else if(menuId=='admin')
{var addSubmenu=new UMenu(250,'shellMenu');addSubmenu.addItem('Add New User',function(){Shell.openComponent("wb_user_manager_editor",'showAddUser',true);});addSubmenu.addItem('Add New Establishment',function(){Shell.openComponent("wb_establishment_manager_editor",'showAddEstablishment',true);});menu.addSubmenu('Add New...',addSubmenu);menu.addItem('Manage Users',function(){Shell.openComponent("wb_user_manager","");});menu.addItem('Manage Establishments',function(){Shell.openComponent("wb_establishment_manager","");});menu.addItem('Manage Federations',function(){Shell.openComponent("wb_establishment_manager","showFederations");});menu.addItem('Manage Consortia',function(){Shell.openComponent("wb_establishment_manager","showConsortia");});menu.addItem('Manage Tags',function(){Shell.openComponent("wb_tag_manager","");});menu.addItem('Manage Spider Tool',function(){Shell.openComponent("wb_spider_manager","setSearchCriteria",true);});menu.addItem('Manage Maps',function(){Shell.openComponent("wb_map_management","");});}
else if(menuId=='saveViewToPlaylist')
{menu.addItem('New playlist',Shell.showSaveCurrentViewToPlaylist);var privatePlaylistsSubmenu=new UMenu(200,false,200);privatePlaylistsSubmenu.addItem('Loading, please wait...',function(){Shell.openComponent("resource_editor",'addViewToPlaylist');});var publishedPlaylistsSubmenu=new UMenu(200,false,200);publishedPlaylistsSubmenu.addItem('Loading, please wait...',function(){Shell.openComponent("resource_editor",'addViewToPlaylist');});menu.addSubmenu('My Private Playlists',privatePlaylistsSubmenu,null,300);menu.addSubmenu('My Published Playlists',publishedPlaylistsSubmenu,null,300);var objSettings={objOnSuccess:function(mixData)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2953,'objOnSuccess:','function(mixData)',arguments);Shell.updateSaveViewToPlaylistMenu(mixData,privatePlaylistsSubmenu,publishedPlaylistsSubmenu);}};this.ajaxRequest('/shell/'+this.intId+'/getAuthorisedPlaylists/',{},null,objSettings);}
else
{menu.addItem('[PLACEHOLDER]');}
menu.show(event,40,true);},processResourceExplorerMenuOption:function(strUrl,strTab)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2969,'processResourceExplorerMenuOption:','function(strUrl, strTab)',arguments);var arrExistingComponents=this.getComponentsFromType('resourceExplorer','left',true);if(arrExistingComponents.length>0)
{var objResourceExplorer=arrExistingComponents[0];if(objResourceExplorer.getPlaylistIsActive()===true)
{objResourceExplorer.setTab(strTab,false,function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',2981,'objResourceExplorer.setTab(strTab, false,','function()',arguments);objResourceExplorer.closePlaylist(false);objResourceExplorer.setTab(strTab,true);objResourceExplorer.update(strUrl,{},null,'#resourceExplorerTabContent_'+strTab,true,true);});}
else
{Shell.openComponent('resourceExplorer',strUrl);}}
else
{Shell.openComponent('resourceExplorer',strUrl);}},openUserDetailsBubble:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3000,'openUserDetailsBubble:','function()',arguments);var strMessage="";strMessage+="<div style='width:300px;padding-top:10px;'>";strMessage+="<table style='width:100%'>";if(Shell.getIsShibbolethUser()!==true)
{strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;'>Username</th><td>"+this.getUsername()+"</td></tr>";}
if(this.getScreenName()!="")
{strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;'>Screen Name</th><td>"+this.getScreenName()+"</td></tr>";}
strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;'>Full Name</th><td>"+this.getFullName()+"</td></tr>";var strRole='';if(this.getUserPupilStatus())
{strRole='Pupil';}
if(this.getUserStaffStatus())
{strRole='Staff';}
if(this.getUserEstablishmentAdminStatus())
{strRole='Establishment Administrator';}
if(this.getUserSystemAdminStatus())
{strRole='System Administrator';}
var objUsersEstablishmentDetails=this.getUsersEstablishmentDetails();var strEstablishmentName=objUsersEstablishmentDetails["strEstablishmentName"];var strRegisteredIPAddresses=objUsersEstablishmentDetails["strIPAddressRange"];var strEstablishmentType=objUsersEstablishmentDetails["strEstablishmentType"];strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;padding-right:10px;'>Account Type</th><td>"+strRole+"</td></tr>";strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;padding-right:10px;'>School Name</th><td>"+strEstablishmentName+"</td></tr>";if(strEstablishmentType!="")
{strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;padding-right:10px;'>School Type</th><td>"+strEstablishmentType+"</td></tr>";}
if(this.objIdentity.id!='nireland')
{if(this.getRoamingAccountStatus())
{strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;'>Roaming User</th><td>"+((this.getRoamingAccountStatus())?'Yes':'No')+"</td></tr>";}
strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;'>Current IP</th><td>"+this.getUsersIPAddress()+"</td></tr>";strMessage+="<tr><th nowrap style='font-size:110%;font-weight:bold;padding-right:10px;'>At Registered IP</th><td style='width:180px;'>"+((this.getUserIsAtRegisteredIPAddress())?'Yes':'No')+" (<a href='#' onclick='Shell.toggleRegisteredIPs();return false;'>View registered IPs</a>)</td></tr>";strMessage+="<tr id='registeredIPs' style='display:none;'><th nowrap style='font-size:110%;font-weight:bold;padding-right:10px;vertical-align:top;'>Registered IPs</th><td><textarea style='font-size:12px;width:170px;height:50px;'>"+strRegisteredIPAddresses+"</textarea></td></tr>";}
strMessage+="</table>";strMessage+="<hr style='height:1px;border:0px;color:black;background-color:black;'>";strMessage+="<p style=''><a href='#' onclick=\"Shell.closeSpeechBubble();Shell.openComponent('account', '');return false;\">Update my account details</a></p>";strMessage+="</div>";Shell.openSpeechBubble(strMessage,$j('#username_display_a').get(0),0,'left','bottom',100,0,999999);},toggleRegisteredIPs:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3079,'toggleRegisteredIPs:','function()',arguments);$j('#registeredIPs').toggle();},updateUsername:function(strNewValue)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3085,'updateUsername:','function(strNewValue)',arguments);if(typeof(this.blnToggleUsernameDisplayElement)=='undefined')
{this.blnToggleUsernameDisplayElement=true;}
if(this.blnToggleUsernameDisplayElement)
{this.blnToggleUsernameDisplayElement=false;var strShowElement='b';var strHideElement='a';}
else
{this.blnToggleUsernameDisplayElement=true;var strShowElement='a';var strHideElement='b';}
$j('#username_display_'+strShowElement+'_value').html(strNewValue);$j('#username_display_'+strHideElement).fadeOut(1000,function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3111,'$j(\'#username_display_\' + strHideElement).fadeOut(1000,','function()',arguments);$j('#username_display_'+strShowElement).fadeIn(1000);});},getCumulativeOffset:function(element)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3118,'getCumulativeOffset:','function(element)',arguments);var objElementOffset=$j(element).offset;var intOffsetY=objElementOffset.top;var intOffsetX=objElementOffset.left;if($j(element).parents('#shellColumnLeft:first').length>0)
{var intLeftColumnScrollYOffset=$j(this.strColumnLeftSelector).get(0).scrollTop;var intLeftColumnScrollXOffset=$j(this.strColumnLeftSelector).get(0).scrollLeft;intOffsetY-=intLeftColumnScrollYOffset;intOffsetX-=intLeftColumnScrollXOffset;}
var objOffset={0:intOffsetX,1:intOffsetY,left:intOffsetX,top:intOffsetY};return objOffset;},setActiveResourceExplorer:function(intResourceExplorerId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3150,'setActiveResourceExplorer:','function(intResourceExplorerId)',arguments);this.objActiveResourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);},getActiveResourceExplorer:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3156,'getActiveResourceExplorer:','function()',arguments);return this.objActiveResourceExplorer;},addGlobalPeriodicalExecutioner:function(strKey,objPE)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3163,'addGlobalPeriodicalExecutioner:','function(strKey, objPE)',arguments);this.removeGlobalPeriodicalExecutioner(strKey);this.objGlobalPeriodicalExecutioners[strKey]=objPE;},removeGlobalPeriodicalExecutioner:function(strKey)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3172,'removeGlobalPeriodicalExecutioner:','function(strKey)',arguments);var objPE=this.objGlobalPeriodicalExecutioners[strKey];if(typeof(objPE)!="undefined")
{objPE.stop();}},systemStatusChecks:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3184,'systemStatusChecks:','function()',arguments);this.systemStatusMessages=[];this.checkFlash();this.checkUserAtRegisteredIP();if(this.systemStatusMessages.length>0)
{var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3202,'var objCallbackFunction =','function()',arguments);_this.showSystemStatusMessages();};this.launchNewLightboxWindow(objCallbackFunction,800,350);}},addSystemStatusMessage:function(objMessage)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3212,'addSystemStatusMessage:','function(objMessage)',arguments);this.systemStatusMessages.push(objMessage);},showSystemStatusMessages:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3219,'showSystemStatusMessages:','function()',arguments);var strUrl='showSystemStatusMessages';var objParams={arrSystemStatusMessages:$j.toJSON(this.systemStatusMessages)};this.update(strUrl,objParams,null,'#lbContent');return Shell.generateStandardLightboxLoading();},checkFlash:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3242,'checkFlash:','function()',arguments);var requiredMajorVersion=8;var requiredMinorVersion=0;var requiredRevision=0;var hasReqestedVersion=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);if(!hasReqestedVersion)
{var objStatusMessage={strId:'noFlash',strMessage:''};this.addSystemStatusMessage(objStatusMessage);}},checkUserAtRegisteredIP:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3271,'checkUserAtRegisteredIP:','function()',arguments);var blnUserIsAuthenticated=this.getUserAthenticatedStatus();var blnUserIsAtRegisteredIP=this.getUserIsAtRegisteredIPAddress();if(blnUserIsAuthenticated&&!blnUserIsAtRegisteredIP&&!this.getRoamingAccountStatus()&&this.objIdentity.id!='ireland'&&this.objIdentity.id!='nireland'&&!this.getIsShibbolethUser())
{var objStatusMessage={strId:'unregisteredIP',strMessage:''};this.addSystemStatusMessage(objStatusMessage);}},beginNewReleaseCheckPE:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3291,'beginNewReleaseCheckPE:','function()',arguments);var _this=this;$j(document).everyTime('60s','newReleaseCheck',function(i)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3295,'$j(document).everyTime(\'60s\', \'newReleaseCheck\',','function(i)',arguments);var strUrl='checkForNewRelease';var objParams={strClientReleaseVer:_this.getVersionNumber(),strClientReleaseSystemVer:_this.getSystemVersionNumber(),strClientReleaseSystemReleaseDate:_this.getSystemVersionReleaseDate()};var objSettings={blnApplyPrefix:true,objOnSuccess:function(strResponseText)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3310,'objOnSuccess:','function(strResponseText)',arguments);_this.checkReleaseOnComplete(strResponseText);}};_this.ajaxRequest(strUrl,objParams,null,objSettings);});},checkReleaseOnComplete:function(strResponseText)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3321,'checkReleaseOnComplete:','function(strResponseText)',arguments);if(strResponseText=='')
{return;}
try
{var objResponse=$j.evalJSON(strResponseText);if(objResponse['newReleaseDetected']==true)
{this.cancelNewReleaseCheckPE();this.showNewReleaseNotification();}}
catch(strError)
{return;}},cancelNewReleaseCheckPE:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3346,'cancelNewReleaseCheckPE:','function()',arguments);$j(document).stopTime('newReleaseCheck');},showNewReleaseNotification:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3351,'showNewReleaseNotification:','function()',arguments);var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3357,'var objCallbackFunction =','function()',arguments);_this.showNewReleaseNotificationCallback();};this.launchNewLightboxWindow(objCallbackFunction,800,350);},acceptNewReleaseNotification:function(blnForceSessionReset)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3365,'acceptNewReleaseNotification:','function(blnForceSessionReset)',arguments);Shell.showCustomLightboxButtonActivity();if(blnForceSessionReset)
{var strUrl='forceNewReleaseSessionReset';var objParams={};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3379,'var objOnComplete =','function()',arguments);_this.acceptNewReleaseNotificationOnComplete();};this.notify(strUrl,objParams,objOnComplete);}
else
{window.setTimeout(function(){Shell.reloadPage();},0);}},acceptNewReleaseNotificationOnComplete:function(XMLHttpRequest)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3395,'acceptNewReleaseNotificationOnComplete:','function(XMLHttpRequest)',arguments);if(Shell.getIsShibbolethUser())
{var strShibbolethLoginRedirectURL=this.getShibbolethLoginURL();window.setTimeout(function(){Shell.redirect(strShibbolethLoginRedirectURL);},0);}
else
{window.setTimeout(function(){Shell.reloadPage();},0);}},showNewReleaseNotificationCallback:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3416,'showNewReleaseNotificationCallback:','function()',arguments);var strUrl='showNewReleaseNotification/';var objParams={strClientReleaseVer:this.getVersionNumber(),strClientReleaseSystemVer:this.getSystemVersionNumber(),strClientReleaseSystemReleaseDate:this.getSystemVersionReleaseDate()};this.update(strUrl,objParams,null,'#lbContent');return Shell.generateStandardLightboxLoading();},toggleReleaseNotes:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3438,'toggleReleaseNotes:','function()',arguments);$j('#releaseNotes').toggle();},showTermsAndConditions:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3444,'showTermsAndConditions:','function()',arguments);var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3450,'var objCallbackFunction =','function()',arguments);_this.showTermsAndConditionsCallback();};this.launchNewLightboxWindow(objCallbackFunction);},showTermsAndConditionsCallback:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3458,'showTermsAndConditionsCallback:','function()',arguments);var strUrl='showTermsAndConditions/';var objParams={};this.update(strUrl,objParams,null,'#lbContent');return Shell.generateStandardLightboxLoading();},acceptTermsAndConditions:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3478,'acceptTermsAndConditions:','function()',arguments);Shell.showCustomLightboxButtonActivity();var strUrl='acceptTermsAndConditions/';var objParams={};this.update(strUrl,objParams,null,'#acceptTermsPleaseWait');},showUserDetailsUpdateForm:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3495,'showUserDetailsUpdateForm:','function()',arguments);var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3501,'var objCallbackFunction =','function()',arguments);_this.showUserDetailsUpdateFormCallback();};this.launchNewLightboxWindow(objCallbackFunction,550,500);},showUserDetailsUpdateFormCallback:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3509,'showUserDetailsUpdateFormCallback:','function()',arguments);var strUrl='showUserDetailsUpdateForm/';var objParams={};this.update(strUrl,objParams,null,'#lbContent');return Shell.generateStandardLightboxLoading();},showShibbolethUserDetailsUpdateForm:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3529,'showShibbolethUserDetailsUpdateForm:','function()',arguments);var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3535,'var objCallbackFunction =','function()',arguments);_this.showShibbolethUserDetailsUpdateFormCallback();};this.launchNewLightboxWindow(objCallbackFunction,550,400);},showShibbolethUserDetailsUpdateFormCallback:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3543,'showShibbolethUserDetailsUpdateFormCallback:','function()',arguments);var strUrl='showShibbolethUserDetailsUpdateForm/';var objParams={};this.update(strUrl,objParams,null,'#lbContent');return Shell.generateStandardLightboxLoading();},saveUserDetailsUpdateForm:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3563,'saveUserDetailsUpdateForm:','function()',arguments);var _this=this;var arrMandatoryFields=[[$j('#firstName').get(0)],[$j('#lastName').get(0)],[$j('#email').get(0)],[$j('#emailConfirm').get(0)],[$j('#subjectInterests').get(0)]];if($j('#purchaseLicence').length>0&&$j('#purchaseLicence').attr('checked')===true)
{arrMandatoryFields.push([$j('#invoiceAttention').get(0)]);arrMandatoryFields.push([$j('#invoiceAddress').get(0)]);arrMandatoryFields.push([$j('#invoiceEmailAddress').get(0)]);}
var objEmptyFieldsCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3579,'var objEmptyFieldsCallbackFunction =','function()',arguments);_this.showNotifcationMessage("Some mandatory fields have not been filled in! Please complete any fields highlighted in red and try again.");};if(!checkEmptyFields(arrMandatoryFields,objEmptyFieldsCallbackFunction))
{return false;}
else
{unHighlightFields(arrMandatoryFields);}
if($j('#email').val()!=$j('#emailConfirm').val())
{alert('The email addresses do not match. Please try again.');return false;}
strSubscribeUpdates=($j('#subscribeUpdates').attr('checked'))?'true':'false';strPurchaseLicence=($j('#purchaseLicence').length>0&&$j('#purchaseLicence').attr('checked'))?'true':'false';Shell.showCustomLightboxButtonActivity();var strUrl='saveUserDetailsUpdateForm/';var objParams={strTitle:$j('#title').val(),strFirstName:$j('#firstName').val(),strLastName:$j('#lastName').val(),strPhoneNumber:$j('#telephone').val(),strEmailAddress:$j('#email').val(),strEmailAddressConfirmed:$j('#emailConfirm').val(),strSubjectResponsibilities:$j('#subjectResponsibilities').val(),strSubjectInterests:$j('#subjectInterests').val(),strSubscribeUpdates:strSubscribeUpdates,strPurchaseLicence:strPurchaseLicence,strInvoiceAttention:$j('#invoiceAttention').val(),strInvoiceAddress:$j('#invoiceAddress').val(),strInvoiceEmailAddress:$j('#invoiceEmailAddress').val(),strPurchaseOrderNumber:$j('#purchaseOrderNumber').val()};var objOnComplete=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3628,'var objOnComplete =','function()',arguments);objShell.executeUpdateInitCode();};this.update(strUrl,objParams,objOnComplete,'#lbContent');},saveShibbolethUserDetailsUpdateForm:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3636,'saveShibbolethUserDetailsUpdateForm:','function()',arguments);var _this=this;var arrMandatoryFields=[[$j('#title').get(0)],[$j('#firstName').get(0)],[$j('#lastName').get(0)],[$j('#screenName').get(0)],[$j('#email').get(0)],[$j('#emailConfirm').get(0)],[$j('#subjectInterests').get(0)]];if(this.objIdentity.id=='nireland')
{var strFirstName=$j('#firstName').val();var strLastName=$j('#lastName').val();var strScreenName=$j('#screenName').val();if(strScreenName.indexOf(strFirstName)!=-1)
{alert('Please do not include your first name in your screen name.');return false;}
if(strScreenName==strFirstName+' '+strLastName)
{alert('Screen name cannot be equal to your full name.');return false;}}
var strPurchaseLicence='';var strInvoiceAttention=$j('#invoiceAttention').val();var strInvoiceAddress=$j('#invoiceAddress').val();var strInvoiceEmailAddress=$j('#invoiceEmailAddress').val();var strPurchaseOrderNumber=$j('#purchaseOrderNumber').val();var strAdvisor=($j('#advisor').attr('checked'))?'true':'false';if(strAdvisor=='true')
{strPurchaseLicence='';strInvoiceAttention='';strInvoiceAddress='';strInvoiceEmailAddress='';strPurchaseOrderNumber='';}
else
{strPurchaseLicence=$j("input[name='selectedLicenceType']:checked").val();if($j('#invoiceAttention').length>0&&strPurchaseLicence!='30_day_free_trial')
{arrMandatoryFields.push([$j('#invoiceAttention').get(0)]);arrMandatoryFields.push([$j('#invoiceAddress').get(0)]);arrMandatoryFields.push([$j('#invoiceEmailAddress').get(0)]);}}
var objEmptyFieldsCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3693,'var objEmptyFieldsCallbackFunction =','function()',arguments);_this.showNotifcationMessage("Some mandatory fields have not been filled in! Please complete any fields highlighted in red and try again.");};if(!checkEmptyFields(arrMandatoryFields,objEmptyFieldsCallbackFunction))
{return false;}
else
{unHighlightFields(arrMandatoryFields);}
if($j('#email').val()!=$j('#emailConfirm').val())
{alert('The email addresses do not match. Please try again.');return false;}
Shell.showCustomLightboxButtonActivity();var strUrl='saveShibbolethUserDetailsUpdateForm/';var objParams={strTitle:$j('#title').val(),strFirstName:$j('#firstName').val(),strLastName:$j('#lastName').val(),strScreenName:$j('#screenName').val(),strPhoneNumber:$j('#telephone').val(),strEmailAddress:$j('#email').val(),strEmailAddressConfirmed:$j('#emailConfirm').val(),strSubjectResponsibilities:$j('#subjectResponsibilities').val(),strSubjectInterests:$j('#subjectInterests').val(),strAdvisor:strAdvisor,strPurchaseLicence:strPurchaseLicence,strInvoiceAttention:strInvoiceAttention,strInvoiceAddress:strInvoiceAddress,strInvoiceEmailAddress:strInvoiceEmailAddress,strPurchaseOrderNumber:strPurchaseOrderNumber};var objOnComplete=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3740,'var objOnComplete =','function()',arguments);objShell.executeUpdateInitCode();};this.update(strUrl,objParams,objOnComplete,'#lbContent');},showPasswordResetPrompt:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3748,'showPasswordResetPrompt:','function()',arguments);Shell.lightboxAlert('Please update your password.<br /><br />This message will appear each time you login until the password has been changed.',625,115,'Password Reset Required',function(){Shell.openComponent('account','showUsernamePasswordUpdate');});},showNotifcationMessage:function(strMessage)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3753,'showNotifcationMessage:','function(strMessage)',arguments);alert(strMessage);},showPromotionalResources:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3759,'showPromotionalResources:','function()',arguments);var _this=this;var objFirstPromotionalResource=this.arrPromotionalResources[0];var intFirstPromotionalResourceId=objFirstPromotionalResource.intId;var strTitle="Information about uLearn";var strText="We have created a Guided Tour of uLearn's maps and resources and some Video Guides showing how to use uLearn's tools.";if(this.objIdentity.id=='nireland')
{var arrButtons=[{id:'takeTour',strText:'Take the Guided Tour',intWidth:165,objCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3779,'objCallbackFunction:','function()',arguments);Shell.playPlaylist(intFirstPromotionalResourceId);}},{id:'seeVideos',strText:'See the Videos',intWidth:130,objCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3789,'objCallbackFunction:','function()',arguments);Shell.launchNewWindow('http://ulearn.webbased.co.uk/channel/view_resource/id/113242',true);}}];}
else
{var arrButtons=[{id:'takeTour',strText:'Take the Guided Tour',intWidth:165,objCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3804,'objCallbackFunction:','function()',arguments);Shell.playPlaylist(intFirstPromotionalResourceId);}},{id:'seeVideos',strText:'See the Videos',intWidth:130,objCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3814,'objCallbackFunction:','function()',arguments);Shell.launchNewWindow(_this.objSystemVersionURLs.videoGuides,true);}}];}
var objSettings={strOverrideTitle:strTitle,strText:strText,intWidth:500,intHeight:100,arrButtons:arrButtons,blnIncludeCancelButton:true,blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);},showPrintOnlyLoginNotification:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3837,'showPrintOnlyLoginNotification:','function()',arguments);var strTitle="Free Map Service";var strText="<p style=\"margin-top:10px;text-align:center;\">You currently only have access to the Free Map Service.</p>";strText+="<p style=\"margin-top:10px;text-align:center;\">Use the <img src=\"/view/components/shell/assets/images/system_messages/map_a.png\" style=\"vertical-align:middle;\" /> button to select a map and <img src=\"/view/components/shell/assets/images/system_messages/print.png\" style=\"vertical-align:middle;\" /> to print.</p>";strText+="<p style=\"margin-top:10px;text-align:center;\">To access uLearn's other tools and resources click:</p>";strText+="<p style=\"margin-top:10px;text-align:center;font-weight:bold;\">Me &gt; Account &gt; Purchase/Renew Licence</p>";var arrButtons=[{id:'close',strText:'Close',intWidth:130,objCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3852,'objCallbackFunction:','function()',arguments);Shell.closeLightboxWindow();}}];var objSettings={strOverrideTitle:strTitle,strText:strText,intWidth:525,intHeight:170,arrButtons:arrButtons,blnIncludeCancelButton:false,blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);},showPrintOnlySearchNotification:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3874,'showPrintOnlySearchNotification:','function()',arguments);if(this.blnDisablePrintOnlySearchNotification===true)
{return;}
var strTitle="Please Note";var strText="<p style=\"margin-top:10px;text-align:center;\">When printing maps the hotspots will not be displayed.</p>";var arrButtons=[{id:'ok',strText:'Ok',intWidth:135,objCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3892,'objCallbackFunction:','function()',arguments);Shell.closeLightboxWindow();}},{id:'dontshowagain',strText:"Don't show again",intWidth:135,objCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3901,'objCallbackFunction:','function()',arguments);Shell.disablePrintOnlySearchNotification();Shell.closeLightboxWindow();}}];var objSettings={strOverrideTitle:strTitle,strText:strText,intWidth:500,intHeight:75,arrButtons:arrButtons,blnIncludeCancelButton:false,blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);},disablePrintOnlySearchNotification:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3924,'disablePrintOnlySearchNotification:','function()',arguments);this.blnDisablePrintOnlySearchNotification=true;},showExpiredLicenceNotification:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3929,'showExpiredLicenceNotification:','function()',arguments);var strTitle="Your licence has expired";var strText="<p style=\"margin-top:10px;text-align:center;\">To purchase or upgrade your licence please go to:</p><p style=\"margin-top:10px;text-align:center;\">Me > Account > Purchase / renew licence.</p><p style=\"margin-top:10px;text-align:center;\">Alternatively, please contact the uLearn team on:</p><p style=\"margin-top:10px;text-align:center;\"> 01752 797134 / ulearn-support@webbased.co.uk</p>";var arrButtons=[{id:'ok',strText:'Ok',intWidth:135,objCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3941,'objCallbackFunction:','function()',arguments);Shell.closeLightboxWindow();}}];var objSettings={strOverrideTitle:strTitle,strText:strText,intWidth:500,intHeight:160,arrButtons:arrButtons,blnIncludeCancelButton:false,blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);},showSaveCurrentViewToPlaylistInit:function(intPlaylistId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3965,'showSaveCurrentViewToPlaylistInit:','function(intPlaylistId)',arguments);var intHeight=(this.getUserSystemAdminStatus()==true)?300:280;var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3973,'var objCallbackFunction =','function()',arguments);_this.showSaveCurrentViewToPlaylistAsLightbox(intPlaylistId);};this.launchNewLightboxWindow(objCallbackFunction,800,intHeight);},showSaveCurrentViewToPlaylistAsLightbox:function(intPlaylistId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3982,'showSaveCurrentViewToPlaylistAsLightbox:','function(intPlaylistId)',arguments);var strUrl='showSaveCurrentViewToPlaylistAsLightbox/';var objParams={intPlaylistId:intPlaylistId};var objOnComplete=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',3992,'var objOnComplete =','function()',arguments);objShell.executeUpdateInitCode();};this.update(strUrl,objParams,objOnComplete,'#lbContent');return Shell.generateStandardLightboxLoading();},saveCurrentViewToPlaylistAsLightbox:function(objParams)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4004,'saveCurrentViewToPlaylistAsLightbox:','function(objParams)',arguments);Shell.showCustomLightboxButtonActivity();var strUrl='saveCurrentViewToPlaylist/';var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4014,'var objOnComplete =','function()',arguments);_this.resizeLightboxWindow(800,150);};this.update(strUrl,objParams,objOnComplete,'#lbContent');},getComponentsStates:function(arrComponentTypes,blnIncludeLockedComponents,blnIncludeCollapsedComponents,blnSerialize)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4023,'getComponentsStates:','function(arrComponentTypes, blnIncludeLockedComponents, blnIncludeCollapsedComponents, blnSerialize)',arguments);var blnIncludeLockedComponents=(typeof(blnIncludeLockedComponents)!='undefined')?blnIncludeLockedComponents:true;var blnIncludeCollapsedComponents=(typeof(blnIncludeCollapsedComponents)!='undefined')?blnIncludeCollapsedComponents:true;var blnSerialize=(typeof(blnSerialize)!='undefined')?blnSerialize:true;var arrComponents=new Array();$j.each(arrComponentTypes,function(mixKey,strComponentType)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4032,'$j.each(arrComponentTypes,','function(mixKey, strComponentType)',arguments);arrComponents=arrComponents.concat(objShell.getComponentsFromType(strComponentType,'',true));});var arrComponentsStates=new Array();$j.each(arrComponents,function(mixKey,objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4041,'$j.each(arrComponents,','function(mixKey, objComponent)',arguments);var objContainer=objComponent['objParentObject'];var objChildComponentObjects=objContainer['objChildComponentObjects'];if(((objContainer['blnLocked']===true&&blnIncludeLockedComponents===true)||(objContainer['blnLocked']===false))&&((objContainer['blnCollapsed']===true&&blnIncludeCollapsedComponents===true)||(objContainer['blnCollapsed']===false)))
{arrComponentsStates.push({id:objComponent['intId'],strComponentType:objComponent['strComponentType'],blnCollapsed:objContainer['blnCollapsed'],blnHidden:objContainer['blnHidden'],blnLocked:objContainer['blnLocked']});}});if(blnSerialize)
{arrComponentsStates=$j.toJSON(arrComponentsStates);}
return arrComponentsStates;},launchNewLightboxWindow:function(objCallbackFunction,intWidth,intHeight)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4073,'launchNewLightboxWindow:','function(objCallbackFunction, intWidth, intHeight)',arguments);if(this.blnLightboxAlreadyActive)
{var objCachedLightboxParams={objCallbackFunction:objCallbackFunction,intWidth:intWidth,intHeight:intHeight};this.arrLightboxQueue.push(objCachedLightboxParams);return true;}
var intOverrideWidth=(typeof(intWidth)!='undefined')?intWidth:false;var intOverrideHeight=(typeof(intHeight)!='undefined')?intHeight:false;LightboxHelper.showCallback(function(){});if(!intOverrideWidth)
{var intHorizontalMarginsAroundLightbox=100;var intLightboxWidth=this.intBrowserViewportWidth-(intHorizontalMarginsAroundLightbox*2);var intLightboxLeft=intHorizontalMarginsAroundLightbox;}
else
{var intLightboxWidth=intOverrideWidth;var intLightboxLeft=Math.ceil((this.intBrowserViewportWidth-intOverrideWidth)/2);}
if(!intOverrideHeight)
{var intVerticalMarginsAroundLightbox=100;var intLightboxHeight=this.intBrowserViewportHeight-(intVerticalMarginsAroundLightbox*2);var intLightboxTop=intVerticalMarginsAroundLightbox;}
else
{var intLightboxHeight=intOverrideHeight;var intLightboxTop=Math.ceil((this.intBrowserViewportHeight-intOverrideHeight)/2);}
this.objCurrentLightboxProperties={};this.objCurrentLightboxProperties['intLightboxTop']=intLightboxTop;this.objCurrentLightboxProperties['intLightboxLeft']=intLightboxLeft;this.objCurrentLightboxProperties['intLightboxWidth']=intLightboxWidth;this.objCurrentLightboxProperties['intLightboxHeight']=intLightboxHeight;$j('#lightbox').css({top:(intLightboxTop+10)+'px',left:(intLightboxLeft+10)+'px',width:(intLightboxWidth-20)+'px',height:(intLightboxHeight-20)+'px',opacity:0.0,overflowY:'scroll'});$j('#lbContent').html('');this.createCustomLightboxWrapper();$j('#customLightboxWrapper').bgiframe({forceIE:true});this.showCustomLightboxButtonActivity();this.resizeLightboxWindow(intLightboxWidth,intLightboxHeight);this.blnLightboxAlreadyActive=true;objCallbackFunction();},resizeLightboxWindow:function(intWidth,intHeight,blnAnimate)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4168,'resizeLightboxWindow:','function(intWidth, intHeight, blnAnimate)',arguments);var intOverrideWidth=(typeof(intWidth)!='undefined')?intWidth:false;var intOverrideHeight=(typeof(intHeight)!='undefined')?intHeight:false;var blnAnimate=(typeof(blnAnimate)!='undefined')?blnAnimate:true;if(!intOverrideWidth)
{var intHorizontalMarginsAroundLightbox=100;var intLightboxWidth=this.intBrowserViewportWidth-(intHorizontalMarginsAroundLightbox*2);var intLightboxLeft=intHorizontalMarginsAroundLightbox;}
else
{var intLightboxWidth=intOverrideWidth;var intLightboxLeft=Math.ceil((this.intBrowserViewportWidth-intOverrideWidth)/2);}
if(!intOverrideHeight)
{var intVerticalMarginsAroundLightbox=100;var intLightboxHeight=this.intBrowserViewportHeight-(intVerticalMarginsAroundLightbox*2);var intLightboxTop=intVerticalMarginsAroundLightbox;}
else
{var intLightboxHeight=intOverrideHeight;var intLightboxTop=Math.ceil((this.intBrowserViewportHeight-intOverrideHeight)/2);}
this.objCurrentLightboxProperties={};this.objCurrentLightboxProperties['intLightboxTop']=intLightboxTop;this.objCurrentLightboxProperties['intLightboxLeft']=intLightboxLeft;this.objCurrentLightboxProperties['intLightboxWidth']=intLightboxWidth;this.objCurrentLightboxProperties['intLightboxHeight']=intLightboxHeight;if(blnAnimate)
{var objLightbox=$j('#lightbox');objLightbox.animate
({'top':intLightboxTop+'px','left':intLightboxLeft+'px','width':intLightboxWidth+'px','height':intLightboxHeight+'px','opacity':1.0},'slow','swing',function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4223,'','function()',arguments);$('lightbox').setStyle({opacity:1.0});});}
else
{$j('#lightbox').css({top:intLightboxTop+'px',left:intLightboxLeft+'px',width:intLightboxWidth+'px',height:intLightboxHeight+'px',opacity:1.0,zoom:1,overflowY:'scroll',display:'block'});}
this.resizeCustomLightboxWrapper();},createCustomLightboxWrapper:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4255,'createCustomLightboxWrapper:','function()',arguments);var objDimensions=this.calculatecustomLightboxWrapperDimensions();var objcustomLightboxWrapperElement=$j('#customLightboxWrapper');if(objcustomLightboxWrapperElement.length==0)
{overlayCustom=document.createElement('div');overlayCustom.id='customLightboxWrapper';bod.appendChild(overlayCustom);var strBackgound="<table id='customLightboxWrapperBackgroundTable' class='backgroundTable' style='height:"+objDimensions.intcustomLightboxWrapperHeight+"px' cellpadding='0' cellspacing='0'>";strBackgound+="<tr><td class='topLeftCell'><img id='lightboxCustomWrapperCornerTopLeftImage' class='topLeftImage' src='/view/shared/assets/images/corners/lightbox/lightbox_corner_top_left.png'/></td><td class='topCenterCell'></td><td class='topRightCell'><img id='lightboxCustomWrapperCornerTopRightImage' class='topRightImage' src='/view/shared/assets/images/corners/lightbox/lightbox_corner_top_right.png'/></td></tr>";strBackgound+="<tr><td class='middleLeftCell'></td><td id='customLightboxWrapperCenter' class='middleCenterCell' style='height:"+objDimensions.intcustomLightboxWrapperInnerHeight+"px'></td><td class='middleRightCell'></td></tr>";strBackgound+="<tr><td class='bottomLeftCell'><img id='lightboxCustomWrapperCornerBottomLeftImage' class='bottomLeftImage' src='/view/shared/assets/images/corners/lightbox/lightbox_corner_bottom_left.png'/></td><td class='bottomCenterCell'></td><td class='bottomRightCell'><img id='lightboxCustomWrapperCornerBottomRightImage' class='bottomRightImage' src='/view/shared/assets/images/corners/lightbox/lightbox_corner_bottom_right.png'/></td></tr>";strBackgound+="</table>";var strButtonsToolbar="";strButtonsToolbar+="<div id='customLightboxWrapperButtonsBackground' class='buttonsBackground' style='width:"+objDimensions.intcustomLightboxWrapperButtonsToolbarWidth+"px'></div>";strButtonsToolbar+="<table id='customLightboxWrapperButtonsTable' class='buttonsTable' style='width:"+objDimensions.intcustomLightboxWrapperButtonsToolbarWidth+"px' cellpadding='0' cellspacing='0'>";strButtonsToolbar+="<tr><td><div id='customLightboxWrapperButtonsTableTargetCell' style='position:relative;height:30px;border:0px solid red;'>";strButtonsToolbar+="<div id='customLightboxWrapperButtonsTableTargetCell_left' style='position:absolute;top:-8px;left;0px;width:100%;height:0px;border:0px solid green;overflow:visible;'></div>";strButtonsToolbar+="<div style='position:absolute;top:-8px;left;0px;width:100%;height:0px;border:0px solid red;overflow:visible;'><table style='width:100%;height:30px;' cellpadding='0' cellspacing='0'><tr><td align='center' style='width:100%;height:30px;border:0px solid red;text-align:center;'><div id='customLightboxWrapperButtonsTableTargetCell_center' style='border:0px solid green;position:relative;height:30px;width:100px;margin-left:auto;margin-right:auto;'></div></td></tr></table></div>";strButtonsToolbar+="<div id='customLightboxWrapperButtonsTableTargetCell_right' style='position:absolute;top:-8px;left;0px;width:100%;height:0px;border:0px solid orange;overflow:visible;'></div>";strButtonsToolbar+="</div></td></tr>";strButtonsToolbar+="</table>";strButtonsToolbar+="<div id='customLightboxWrapperButtonsForeground' class='buttonsForeground' style='width:"+objDimensions.intcustomLightboxWrapperButtonsToolbarWidth+"px;'></div>";strButtonsToolbar+="<div id='customLightboxWrapperButtonsForegroundText' class='buttonsForegroundText' style='width:"+objDimensions.intcustomLightboxWrapperButtonsToolbarWidth+"px;'>";strButtonsToolbar+="<img src='/view/shared/assets/images/activity_white.gif' style='position:absolute;top:8px;left:7px;width:16px;height:16px;' /><span style='position:absolute;top:8px;left:33px;width:100px;height:16px;color:white;font-size:70%;'>Please wait...</span>";strButtonsToolbar+="</div>";var strHTML=strBackgound+strButtonsToolbar;$j('#customLightboxWrapper').html(strHTML);var strPositioningMode=(this.strBrowser=="Explorer"&&this.intVersion<=6)?'absolute':'fixed';$j('#customLightboxWrapper').attr({style:'display:none;',position:strPositioningMode});if(this.strBrowser=="Explorer"&&this.intVersion<=6)
{}}
this.resizeCustomLightboxWrapper();},addCustomLightboxButton:function(objButtonProperties)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4340,'addCustomLightboxButton:','function(objButtonProperties)',arguments);var strTargetSelector=typeof(objButtonProperties.strTargetSelector)!='undefined'?objButtonProperties.strTargetSelector:'#customLightboxWrapperButtonsTableTargetCell_'+objButtonProperties.strAlign;this.hideCustomLightboxButtonActivity();this.removeCustomLightboxButton(objButtonProperties.strId);this.objCustomLightboxButtons[objButtonProperties.strId]=objButtonProperties;this.resizeCustomLightboxButtonsContainerCenter();var strCSSFloat='';switch(objButtonProperties.strAlign)
{case'left':strCSSFloat='float:left';break;case'right':strCSSFloat='float:right';break;case'center':strCSSFloat='float:left';break;}
var strButtonId='customLightBoxWrapperButton_'+objButtonProperties.strId;var strButtonHTML=this.getLightboxButtonHtml
({strId:strButtonId,intWidth:objButtonProperties.intWidth,strCSSFloat:strCSSFloat,strColour:objButtonProperties.strColour,strText:objButtonProperties.strText});$j(strTargetSelector).append(strButtonHTML);$j('#'+strButtonId).click(function(objEvent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4392,'$j(\'#\' + strButtonId).click(','function(objEvent)',arguments);Shell.executeCustomLightboxButtonOnclick(objEvent,objButtonProperties.strId);});if(this.strBrowser=='Explorer'&&this.intVersion<=6)
{this.makePngsTransparent(strButtonId+'_left_graphic',true);this.makePngsTransparent(strButtonId+'_middle_graphic',true);this.makePngsTransparent(strButtonId+'_right_graphic',true);}},getLightboxButtonHtml:function(objProperties)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4411,'getLightboxButtonHtml:','function(objProperties)',arguments);var strButtonBaseSrc='/view/components/shell/assets/images/buttons/shiney';var intMiddleSectionWidth=objProperties.intWidth-48-39;var strButtonHTML="";strButtonHTML+="<div id='"+objProperties.strId+"' style='display:block;position:relative;"+objProperties.strCSSFloat+";width:"+objProperties.intWidth+"px;height:45px;cursor:pointer;'>";strButtonHTML+="<div id='"+objProperties.strId+"_left' style='position:absolute;top:0px;left:0px;width:48px;height:45px;'><img id='"+objProperties.strId+"_left_graphic' src='"+strButtonBaseSrc+"/shiney_button_"+objProperties.strColour+"_edge_left.png' style='width:48px;height:45px;' /></div>";strButtonHTML+="<div id='"+objProperties.strId+"_middle' style='position:absolute;top:0px;left:48px;width:"+intMiddleSectionWidth+"px;height:45px;'><img id='"+objProperties.strId+"_middle_graphic' src='"+strButtonBaseSrc+"/shiney_button_"+objProperties.strColour+"_middle.png' style='width:"+intMiddleSectionWidth+"px;height:45px;' /></div>";strButtonHTML+="<div id='"+objProperties.strId+"_right' style='position:absolute;top:0px;right:0px;width:39px;height:45px;'><img id='"+objProperties.strId+"_right_graphic' src='"+strButtonBaseSrc+"/shiney_button_"+objProperties.strColour+"_edge_right.png' style='width:39px;height:45px;' /></div>";strButtonHTML+="<div style='color:white;font-size:70%;text-align:center;cursor:pointer;position:absolute;top:15px;left:0px;width:"+objProperties.intWidth+"px;height:45px;'>"+objProperties.strText+"</div>";strButtonHTML+="</div>";return strButtonHTML;},executeCustomLightboxButtonOnclick:function(event,strButtonId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4427,'executeCustomLightboxButtonOnclick:','function(event, strButtonId)',arguments);var objFunc=this.objCustomLightboxButtons[strButtonId]['objOnclick'];objFunc(event);},removeCustomLightboxButton:function(strButtonId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4434,'removeCustomLightboxButton:','function(strButtonId)',arguments);if(typeof(this.objCustomLightboxButtons[strButtonId])!='undefined'&&this.objCustomLightboxButtons[strButtonId]!=null)
{$j('#customLightBoxWrapperButton_'+strButtonId).remove();this.objCustomLightboxButtons[strButtonId]=null;}},removeAllCustomLightboxButtons:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4444,'removeAllCustomLightboxButtons:','function()',arguments);var _this=this;$j.each(this.objCustomLightboxButtons,function(strKey,objButton)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4449,'$j.each(this.objCustomLightboxButtons,','function(strKey, objButton)',arguments);_this.removeCustomLightboxButton(strKey);});},showCustomLightboxButtonActivity:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4456,'showCustomLightboxButtonActivity:','function()',arguments);this.removeAllCustomLightboxButtons();$j('#customLightboxWrapperButtonsForeground').css({display:'block',opacity:'0.5'});$j('#customLightboxWrapperButtonsForegroundText').css({display:'block'});},hideCustomLightboxButtonActivity:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4472,'hideCustomLightboxButtonActivity:','function()',arguments);$j('#customLightboxWrapperButtonsForeground').css({display:'none',opacity:'0.5'});$j('#customLightboxWrapperButtonsForegroundText').css({display:'none'});},resizeCustomLightboxButtonsContainerCenter:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4486,'resizeCustomLightboxButtonsContainerCenter:','function()',arguments);var intTotalCenterWidth=0;$j.each(this.objCustomLightboxButtons,function(strKey,objValue)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4492,'$j.each(this.objCustomLightboxButtons,','function(strKey, objValue)',arguments);if(objValue!=null)
{if(objValue.strAlign=='center')
{intTotalCenterWidth+=objValue.intWidth;}}});$j('#customLightboxWrapperButtonsTableTargetCell_center').css({width:intTotalCenterWidth+'px'});},resizeCustomLightboxWrapper:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4511,'resizeCustomLightboxWrapper:','function()',arguments);var objDimensions=this.calculatecustomLightboxWrapperDimensions();var strPositioningMode=(this.strBrowser=="Explorer"&&this.intVersion<=6)?'absolute':'fixed';$j('#customLightboxWrapper').css({display:'block',zIndex:'999999',position:strPositioningMode,top:objDimensions.intcustomLightboxWrapperTop+'px',left:objDimensions.intcustomLightboxWrapperLeft+'px',width:objDimensions.intcustomLightboxWrapperWidth+'px',height:objDimensions.intcustomLightboxWrapperHeight+'px'});$j('#customLightboxWrapperBackgroundTable').css({opacity:'0.2',width:objDimensions.intcustomLightboxWrapperWidth+'px',height:objDimensions.intcustomLightboxWrapperHeight+'px'});$j('#customLightboxWrapperCenter').css({height:objDimensions.intcustomLightboxWrapperInnerHeight+'px'});$j('#customLightboxWrapperButtonsBackground').css({opacity:'0.5',width:objDimensions.intcustomLightboxWrapperButtonsToolbarWidth+'px'});$j('#customLightboxWrapperButtonsForeground').css({width:objDimensions.intcustomLightboxWrapperButtonsToolbarWidth+'px'});$j('#customLightboxWrapperButtonsForegroundText').css({width:objDimensions.intcustomLightboxWrapperButtonsToolbarWidth+'px'});$j('#customLightboxWrapperButtonsTable').css({width:objDimensions.intcustomLightboxWrapperButtonsToolbarWidth+'px'});},calculatecustomLightboxWrapperDimensions:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4561,'calculatecustomLightboxWrapperDimensions:','function()',arguments);var intcustomLightboxWrapperTop=this.objCurrentLightboxProperties['intLightboxTop']-10;var intcustomLightboxWrapperLeft=this.objCurrentLightboxProperties['intLightboxLeft']-10;var intcustomLightboxWrapperWidth=this.objCurrentLightboxProperties['intLightboxWidth']+25;var intcustomLightboxWrapperHeight=this.objCurrentLightboxProperties['intLightboxHeight']+55;var intcustomLightboxWrapperInnerHeight=intcustomLightboxWrapperHeight-30;var intcustomLightboxWrapperButtonsToolbarWidth=intcustomLightboxWrapperWidth-19;if(this.strBrowser=="Explorer"&&this.intVersion<=6)
{intcustomLightboxWrapperWidth-=5;intcustomLightboxWrapperHeight-=5;intcustomLightboxWrapperInnerHeight-=5;intcustomLightboxWrapperButtonsToolbarWidth=intcustomLightboxWrapperWidth-19;}
var objDimensions={intcustomLightboxWrapperTop:intcustomLightboxWrapperTop,intcustomLightboxWrapperLeft:intcustomLightboxWrapperLeft,intcustomLightboxWrapperWidth:intcustomLightboxWrapperWidth,intcustomLightboxWrapperHeight:intcustomLightboxWrapperHeight,intcustomLightboxWrapperInnerHeight:intcustomLightboxWrapperInnerHeight,intcustomLightboxWrapperButtonsToolbarWidth:intcustomLightboxWrapperButtonsToolbarWidth};return objDimensions;},closeLightbox:function(blnAnimate)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4595,'closeLightbox:','function(blnAnimate)',arguments);var blnAnimate=(typeof(blnAnimate)!='undefined')?blnAnimate:true;if(this.checkLightboxQueue())
{return true;}
if(blnAnimate)
{var _this=this;$j('#lightbox').animate
({'opacity':0.0},'medium','swing',function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4617,'','function()',arguments);_this.blnLightboxAlreadyActive=false;LightboxHelper.close();$j('#customLightboxWrapper').hide();_this.removeAllCustomLightboxButtons();_this.checkLightboxQueue(true);});}
else
{this.blnLightboxAlreadyActive=false;LightboxHelper.close();$j('#customLightboxWrapper').hide();this.removeAllCustomLightboxButtons();}},checkLightboxQueue:function(blnOpenInNewLightbox)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4652,'checkLightboxQueue:','function(blnOpenInNewLightbox)',arguments);var blnOpenInNewLightbox=(typeof(blnOpenInNewLightbox)!='undefined')?blnOpenInNewLightbox:false;var intCountWaitingLightboxes=this.arrLightboxQueue.length;if(intCountWaitingLightboxes>0)
{var objNextLightboxParams=this.arrLightboxQueue.shift();if(blnOpenInNewLightbox)
{this.launchNewLightboxWindow(objNextLightboxParams.objCallbackFunction,objNextLightboxParams.intWidth,objNextLightboxParams.intHeight);}
else
{this.showCustomLightboxButtonActivity();$j('#lbContent').html(Shell.generateStandardLightboxLoading());this.resizeLightboxWindow(objNextLightboxParams.intWidth,objNextLightboxParams.intHeight);objNextLightboxParams.objCallbackFunction();}
return true;}
return false;},generateStandardLightboxLoading:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4693,'generateStandardLightboxLoading:','function()',arguments);var strHTML="";switch(this.objIdentity.name)
{case'uLearn':strHTML="<div style='position:absolute;top:-155px;left:-155px;width:300px;height:300px;'><img src='/view/components/shell/assets/images/system_messages/ulearn_watermark_logo.jpg'/></div>";break;case'Scoilnet Maps':strHTML="<div style='position:absolute;top:-155px;left:-155px;width:300px;height:300px;'><img src='/view/components/shell/assets/images/system_messages/scoilnet_watermark_logo.jpg'/></div>";break;default:strHTML="";break;}
return strHTML;},launchAndLogNewResourceWindow:function(resourceId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4718,'launchAndLogNewResourceWindow:','function(resourceId)',arguments);var strURL=this.getWebsiteDomain()+'/'+this.strUrlPrefix+'openIndirectResource/'+resourceId;Shell.launchNewWindow(strURL);},logResourceAccess:function(resourceId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4725,'logResourceAccess:','function(resourceId)',arguments);var url='logResourceAccess/'+resourceId;this.notify(url);},setCulture:function(strCulture)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4731,'setCulture:','function(strCulture)',arguments);var strUrl='setCulture/'+strCulture;this.notify(strUrl,{},function(){Shell.reloadPage();});},handlePromotionalConsortiaChange:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4738,'handlePromotionalConsortiaChange:','function()',arguments);var selectedConsortiaValue=$j("#promotionalResourceConsortia").val();if(selectedConsortiaValue=="All consortias")
{$j("#promotionalResourceFederation").val('All federations');$j("#promotionalResourceFederation").attr('disabled',true);}
else
{$j("#promotionalResourceFederation").val('All federations');$j("#promotionalResourceFederation").attr('disabled',false);var strUrlSuffix='retrieveFederationList';var objParams={intConsortiaId:selectedConsortiaValue};this.notify(strUrlSuffix,objParams,this.handlePromotionalConsortiaChangeOnComplete);}
$j("#promotionalResourceEstablishment").val('All establishments');$j("#promotionalResourceEstablishment").attr('disabled',true);this.removePromotionalEstablishmentAutoComplete();},handlePromotionalConsortiaChangeOnComplete:function(XMLHttpRequest)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4775,'handlePromotionalConsortiaChangeOnComplete:','function(XMLHttpRequest)',arguments);var objResponse=$j.evalJSON(XMLHttpRequest.responseText);var arrFederations=objResponse["arrFederations"];var strSelectMenu='<select id="promotionalResourceFederation" style="width:150px;" onchange="Shell.handlePromotionalFederationChange();">';strSelectMenu+='<option value="All federations">All federations</option>';$j.each(arrFederations,function(mixKey,objFederationDetails)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4787,'$j.each(arrFederations,','function(mixKey, objFederationDetails)',arguments);strSelectMenu+='<option value="'+objFederationDetails.id+'">'+objFederationDetails.default_attribute+'</option>';});strSelectMenu+='</select>';$j('#promotionalResourceFederationContainer').html(strSelectMenu);},handlePromotionalFederationChange:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4797,'handlePromotionalFederationChange:','function()',arguments);var selectedFederationValue=$j('#promotionalResourceFederation').val();if(selectedFederationValue=="All federations")
{$j('#promotionalResourceEstablishment').val('All establishments');$j('#promotionalResourceEstablishment').attr('disabled',true);this.removePromotionalEstablishmentAutoComplete();}
else
{$j('#promotionalResourceEstablishment').val('All establishments');$j('#promotionalResourceEstablishment').attr('disabled',false);this.setupPromotionalEstablishmentAutoComplete();}},setupPromotionalEstablishmentAutoComplete:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4823,'setupPromotionalEstablishmentAutoComplete:','function()',arguments);this.removePromotionalEstablishmentAutoComplete();var objAdditionalParams={'intFederationId':$j('#promotionalResourceFederation').val()};this.objPromotionalEstablishmentAutoCompleter=ComponentBase.setupAutoCompletion('establishments','promotionalResourceEstablishment','establishmentSuggestions',objAdditionalParams);},removePromotionalEstablishmentAutoComplete:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4836,'removePromotionalEstablishmentAutoComplete:','function()',arguments);if(typeof(this.objPromotionalEstablishmentAutoCompleter)!='undefined'&&this.objPromotionalEstablishmentAutoCompleter!=null)
{this.objPromotionalEstablishmentAutoCompleter.destroyAutocompleter();}},preSubmitRating:function(intResourceId,intAverageRating,intUserRating,strContainerId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4845,'preSubmitRating:','function(intResourceId, intAverageRating, intUserRating, strContainerId)',arguments);if((Shell.getUserAthenticatedStatus()===false||Shell.getIsLicencedUser()===false)&&this.blnDisableRatingCallback!==true)
{this.blnDisableRatingCallback=true;$j('#'+strContainerId+' input').rating('select',intAverageRating-1);this.blnDisableRatingCallback=false;Shell.showLicenceRequiredPopup('Rate Resources','rate_resources');return;}
if(this.blnDisableRatingCallback===true)
{return;}
var _this=this;var objSettings={blnAutoCloseLightbox:true,objOnCancelCallbackFunction:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4870,'objOnCancelCallbackFunction:','function()',arguments);if(intAverageRating>0)
{_this.blnDisableRatingCallback=true;$j('#'+strContainerId+' input').rating('select',intAverageRating-1);_this.blnDisableRatingCallback=false;}
else
{$j('#'+strContainerId+' input').rating('drain');}}};var objCallbackFunction=function(strComments)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4885,'var objCallbackFunction =','function(strComments)',arguments);objShell.submitRating(intResourceId,intUserRating,strComments,strContainerId);};var arrOptions=[{strType:'textarea',strName:'strComments',strLabel:'Comment',strDefault:''}];Shell.lightboxConfirmWithOptions('If you would like to add a comment with your rating, please do so here.',515,165,objSettings,objCallbackFunction,arrOptions);},submitRating:function(intResourceId,intRating,strComments,strContainerId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4903,'submitRating:','function(intResourceId, intRating, strComments, strContainerId)',arguments);var _this=this;var strURL='saveRateResource';var objParams={intResourceId:intResourceId,intRating:intRating,strComments:strComments};var objCallbackFunction=function(strResponse)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4916,'var objCallbackFunction =','function(strResponse)',arguments);var objRating=$j.evalJSON(strResponse.responseText);_this.blnDisableRatingCallback=true;$j('#'+strContainerId+' input').rating('select',objRating[0].average-1);_this.blnDisableRatingCallback=false;var intTotalReviews=objRating[0].total;if(intTotalReviews==1)
{var strReviews='1 review';}
else
{var strReviews=''+intTotalReviews+' reviews';}
$j('#'+strContainerId+'_count').html(strReviews);};var objSettings={blnApplyPrefix:true};this.ajaxRequest(strURL,objParams,objCallbackFunction,objSettings);},showLicenceRequiredPopup:function(strFunctionTitle,strFeature)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',4949,'showLicenceRequiredPopup:','function(strFunctionTitle, strFeature)',arguments);if(typeof(this.objIdentity)=='undefined')
{return false;}
if(this.objIdentity.id=='ireland')
{if(this.getUserAthenticatedStatus()===false)
{var strTitle='Please login';var strHTML='You must be logged in to access this feature.';Shell.lightboxAlert(strHTML,400,75,strTitle,function(){});}}
else
{var strExampleImagePath='/view/components/shell/assets/images/feature_examples/'+strFeature+'.png';if(this.getUserAthenticatedStatus()===true)
{var strTitle='Licence Upgrade';if(strFeature=='maps')
{var strHTML='<p>uLearn contains a wide range of mapping. To access additional mapping <a onclick="Shell.closeLightboxWindow();Shell.openComponent(\'account\', \'showPurchaseRenewLicence\');return false;" href="#">click here</a>.</p>';}
else
{var strHTML='<p>uLearn contains extra functionality and thousands of teacher-assured resources linked to every curriculum area. To upgrade to a full uLearn licence, <a onclick="Shell.closeLightboxWindow();Shell.openComponent(\'account\', \'showPurchaseRenewLicence\');return false;" href="#">click here</a>.</p>';}}
else
{var strTitle='Please login or register';var strHTML='<p>uLearn contains extra functionality and thousands of teacher-assured resources linked to every curriculum area. To access these features, please <a onclick="Shell.closeLightboxWindow();Shell.openComponent(\'login\', \'\');return false;" href="#">login</a> or <a onclick="Shell.closeLightboxWindow();Shell.openComponent(\'registration\', \'\');return false;" href="#">register</a>.</p>';}
if(strFeature!==null)
{strHTML+='<p style="font-weight:bold;margin-top:15px;">'+strFunctionTitle+'</p>'+'<img src="'+strExampleImagePath+'" alt="'+strFunctionTitle+'" />';}
Shell.lightboxAlert(strHTML,500,385,strTitle,function(){});}},processError:function(strMessage,strErrorURL,intLine)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5005,'processError:','function(strMessage, strErrorURL, intLine)',arguments);var objBrowserDetails=Shell.getBrowserDetails();objComponentUpdateCode={};var strURL='/jsError.php';var objParams={strMessage:strMessage,strURL:strErrorURL,intLine:intLine,objBrowserDetails:$j.toJSON(objBrowserDetails),objErrorFunction:$j.toJSON
({strFilePath:Profiler.objCurrentFunction.strFilePath,intLineNumber:Profiler.objCurrentFunction.intLineNumber,strFunctionName:Profiler.objCurrentFunction.strFunctionName,strFunctionDefinition:Profiler.objCurrentFunction.strFunctionDefinition,strArguments:Profiler.argumentsToString(Profiler.objCurrentFunction.arrArguments),strCallStack:Profiler.arrProfile.reverse().join("\n")})};var objCallbackFunction=function(objResponse)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5032,'var objCallbackFunction =','function(objResponse)',arguments);var intErrorId=objResponse.responseText;var objIdentity=Shell.getIdentity();if(!objIdentity)
{var strIdentityName='Unknown Identity';}
else
{var strIdentityName=objIdentity.name;}
alert(strIdentityName+' has encountered an error and may not function correctly until you refresh the page. uLearn support have been notified of the error. For reference please use the following code: E-'+intErrorId);};var objSettings={blnApplyPrefix:false};this.ajaxRequest(strURL,objParams,objCallbackFunction,objSettings);return true;},getCallStack:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5064,'getCallStack:','function()',arguments);var mode;try{(0)();}catch(e)
{mode=e.stack?'Firefox':window.opera?'Opera':'Other';}
var objCallStackFunction=null;switch(mode)
{case'Firefox':objCallStackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5077,'case \'Firefox\': objCallStackFunction =','function()',arguments);try{(0)();}catch(e)
{return e.stack.replace(/^.*?\n/,'').replace(/(?:\n@:0)?\s+$/m,'').replace(/^\(/gm,'{anonymous}(').split("\n");}};case'Opera':objCallStackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5085,'case \'Opera\': objCallStackFunction =','function()',arguments);try{(0)();}catch(e)
{var lines=e.message.split("\n"),ANON='{anonymous}',lineRE=/Line\s+(\d+).*?in\s+(http\S+)(?:.*?in\s+function\s+(\S+))?/i,i,j,len;for(i=4,j=0,len=lines.length;i<len;i+=2)
{if(lineRE.test(lines[i]))
{lines[j++]=(RegExp.$3?RegExp.$3+'()@'+RegExp.$2+RegExp.$1:ANON+RegExp.$2+':'+RegExp.$1)+' -- '+lines[i+1].replace(/^\s+/,'');}}
lines.splice(j,lines.length-j);return lines;}};default:objCallStackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5105,'default: objCallStackFunction =','function()',arguments);var curr=arguments.callee.caller,FUNC='function',ANON="{anonymous}",fnRE=/function\s*([\w\-$]+)?\s*\(/i,stack=[],j=0,fn,args,i;while(curr)
{fn=fnRE.test(curr.toString())?RegExp.$1||ANON:ANON;args=stack.slice.call(curr.arguments);i=args.length;while(i--)
{switch(typeof args[i])
{case'string':args[i]='"'+args[i].replace(/"/g,'\\"')+'"';break;case'function':args[i]=FUNC;break;}}
stack[j++]=fn+'('+args.join()+')';curr=curr.caller;}
return stack;};}
if(objCallStackFunction!==null)
{objCallStackFunction();}},setUnloadMode:function(blnUloadMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5138,'setUnloadMode:','function(blnUloadMode)',arguments);this.blnUloadMode=blnUloadMode;},shutDown:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5146,'shutDown:','function()',arguments);if(this.blnUloadMode)
{Shell.showOverlay();$j.each(this.objChildComponentObjects,function(strKey,objProperty)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5155,'$j.each(this.objChildComponentObjects,','function(strKey, objProperty)',arguments);$j.each(objProperty,function(mixKey,objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5159,'$j.each(objProperty,','function(mixKey, objComponent)',arguments);if(typeof(objComponent)!='undefined'&&objComponent!=null)
{objComponent.unLoadComponent();objComponent=null;}});});this.unLoad();}
Event.unloadCache();if(objShell)
{objShell=null;}}});Shell.openComponent=function(strComponentType,strDefaultURL,blnRightColumn,blnScrollingMode,objParams)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5190,'Shell.openComponent =','function(strComponentType, strDefaultURL, blnRightColumn, blnScrollingMode, objParams)',arguments);objShell.openComponent(strComponentType,strDefaultURL,blnRightColumn,blnScrollingMode,objParams);};Shell.getContentAbsoluteHeight=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5195,'Shell.getContentAbsoluteHeight =','function()',arguments);return objShell.getContentAbsoluteHeight();};Shell.getColumnRightAbsoluteWidth=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5199,'Shell.getColumnRightAbsoluteWidth =','function()',arguments);return objShell.getColumnRightAbsoluteWidth();};Shell.getColumnLeftAbsoluteWidth=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5203,'Shell.getColumnLeftAbsoluteWidth =','function()',arguments);return objShell.getColumnLeftAbsoluteWidth();};Shell.getRightColumnScrollingMode=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5207,'Shell.getRightColumnScrollingMode =','function()',arguments);return objShell.getRightColumnScrollingMode();};Shell.getBrowserDetails=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5211,'Shell.getBrowserDetails =','function()',arguments);return objShell.getBrowserDetails();};Shell.home=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5219,'Shell.home =','function()',arguments);objShell.home();};Shell.reloadPage=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5225,'Shell.reloadPage =','function()',arguments);window.location.reload();};Shell.redirect=function(strURL)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5231,'Shell.redirect =','function(strURL)',arguments);top.location=strURL;};Shell.launchNewWindow=function(strURL,bIgnoreProtocol,blnAddDomainPart,blnRequireLogin)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5237,'Shell.launchNewWindow =','function(strURL, bIgnoreProtocol, blnAddDomainPart, blnRequireLogin)',arguments);var blnRequireLogin=(typeof(blnRequireLogin)!='undefined')?blnRequireLogin:false;if(blnRequireLogin===true&&Shell.getUserAthenticatedStatus()===false)
{alert('Please login to use this feature.');return false;}
var objBrowserDetails=Shell.getBrowserDetails();if(blnAddDomainPart)
{var strDomain=Shell.getWebsiteDomain();strURL=strDomain+strURL;}
if(!bIgnoreProtocol)
{var blnStartsWithHTTP=strURL.startsWith('http://');if(!blnStartsWithHTTP)
{strURL='http://'+strURL;}}
if(objBrowserDetails.strBrowser=='Explorer')
{var intLeft=0;var intTop=0;var intWidth=window.screen.availWidth-intLeft;var intHeight=window.screen.availHeight-intTop;var objNewWin=window.open(strURL,null,"left="+intLeft+",top="+intTop+", width="+intWidth+", height="+intHeight+",location=no,toolbar=no,status=yes,resizable=yes,scrollbars=yes");}
else
{var objNewWin=window.open(strURL);}
if(objNewWin)
{if(objBrowserDetails.strBrowser=='Explorer')
{try
{objNewWin.resizeTo(intWidth,intHeight);}
catch(e)
{}}
if(window.focus)
{objNewWin.focus();}}
else
{var strMessage="It appears that your browser has blocked the new window from opening. Please allow popups for this website and try again.<br/><br/>Alternatively please click the link below to open the new page in this window (you will be navigated away from the uLearn website):<br/><br/><a href='"+strURL+"'>"+strURL+"</a>";Shell.lightboxAlert(strMessage,500,200);}
return false;};Shell.launchNewResourceWindow=function(resourceId,strResourceURL)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5312,'Shell.launchNewResourceWindow =','function(resourceId, strResourceURL)',arguments);var strResourceURL=(typeof(strResourceURL)!="undefined")?strResourceURL:'';if(strResourceURL!='')
{Shell.launchNewWindow(strResourceURL);objShell.logResourceAccess(resourceId);}
else
{objShell.launchAndLogNewResourceWindow(resourceId);}};Shell.lightboxPleaseWait=function(strMessage)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5332,'Shell.lightboxPleaseWait =','function(strMessage)',arguments);Shell.closeLightboxWindow(false);objShell.blnPleaseWaitLightboxActive=true;Shell.launchNewLightboxWindow(function(){},400,120);var strHeading='Attention';var strText=(typeof(strMessage)!='undefined')?strMessage:''+objShell.objIdentity.name+' is busy. Please be patient.';strText=strText.replace(/&lt;/g,'<');strText=strText.replace(/&gt;/g,'>');$j('#lbContent').html('<div class="background_'+objShell.objIdentity.name+'" style="padding:10px;">'+'<h2 style="text-align:center;font-weight:bold;margin-bottom:10px;">'+strHeading+'</h2>'+'<div><img src="/view/shared/assets/images/gears.png" style="float:left;margin-left:30px;"/><p style="float:left;margin-top:15px;margin-left:15px;">'+strText.replace(/\n/g,'<br />')+'</p></div>'+'</div>');};Shell.closeLightboxPleaseWait=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5356,'Shell.closeLightboxPleaseWait =','function()',arguments);if(objShell.blnPleaseWaitLightboxActive)
{Shell.closeLightboxWindow(false);objShell.blnPleaseWaitLightboxActive=false;}};Shell.lightboxAlert=function(strText,intWidth,intHeight,strHeading,objCallbackFunction)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5367,'Shell.lightboxAlert =','function(strText, intWidth, intHeight, strHeading, objCallbackFunction)',arguments);Shell.closeLightboxWindow(false);Shell.launchNewLightboxWindow(function(){},intWidth,intHeight);var objButtonProperties={strId:'cancel',strText:'Close',intWidth:125,strAlign:'center',strColour:'blue',objOnclick:function(event)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5383,'objOnclick:','function(event)',arguments);Shell.closeLightboxWindow();if(typeof(objCallbackFunction)!='undefined')
{objCallbackFunction();}
if(!event)var event=window.event;event.cancelBubble=true;if(event.stopPropagation)event.stopPropagation();}};Shell.addCustomLightboxButton(objButtonProperties);if(typeof(strHeading)=='undefined')
{strHeading='Attention';}
strText=strText.replace(/&lt;/g,'<');strText=strText.replace(/&gt;/g,'>');$j('#lbContent').html('<div class="background_'+objShell.objIdentity.name+'" style="padding:10px;">'+'<h2 style="text-align:center;font-weight:bold;margin-bottom:10px;">'+strHeading+'</h2>'+'<p style="text-align:center;">'+strText.replace(/\n/g,'<br />')+'</p>'+'</div>');};Shell.lightboxConfirm=function(strText,intWidth,intHeight,objCallbackFunction)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5417,'Shell.lightboxConfirm =','function(strText, intWidth, intHeight, objCallbackFunction)',arguments);Shell.launchNewLightboxWindow(function(){},intWidth,intHeight);var arrCallbackArguments=[];for(var i=Shell.lightboxConfirm.length;i<arguments.length;i++)
{arrCallbackArguments.push(arguments[i]);}
var objButtonProperties={strId:'confirm',strText:'Ok',intWidth:120,strAlign:'center',strColour:'blue',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5438,'objOnclick:','function()',arguments);Shell.closeLightboxWindow();objCallbackFunction.apply(Shell,arrCallbackArguments);}};Shell.addCustomLightboxButton(objButtonProperties);var objButtonProperties={strId:'cancel',strText:'Cancel',intWidth:100,strAlign:'center',strColour:'black',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5457,'objOnclick:','function()',arguments);Shell.closeLightboxWindow();}};Shell.addCustomLightboxButton(objButtonProperties);$j('#lbContent').html('<div class="background_'+objShell.objIdentity.name+'">'+'<h2 style="text-align:center;font-weight:bold;margin-top:10px;margin-bottom:10px;">Confirmation Needed</h2>'+'<p style="text-align:center;">'+strText.replace(/\n/g,'<br />')+'</p>'+'</div>');};Shell.lightboxConfirmWithOptions=function(strText,intWidth,intHeight,objSettings,objCallbackFunction,arrOptions)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5486,'Shell.lightboxConfirmWithOptions =','function(strText, intWidth, intHeight, objSettings, objCallbackFunction, arrOptions)',arguments);Shell.launchNewLightboxWindow(function(){},intWidth,intHeight);var arrCallbackArguments=[];for(var i=Shell.lightboxConfirmWithOptions.length;i<arguments.length;i++)
{arrCallbackArguments.push(arguments[i]);}
var blnAutoCloseLightbox=(typeof(objSettings.blnAutoCloseLightbox)!='undefined')?objSettings.blnAutoCloseLightbox:true;var objButtonProperties={strId:'confirm',strText:'Ok',intWidth:120,strAlign:'center',strColour:'blue',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5510,'objOnclick:','function()',arguments);Shell.lightboxConfirmWithOptionsConfirmed(objCallbackFunction,arrCallbackArguments,blnAutoCloseLightbox);}};Shell.addCustomLightboxButton(objButtonProperties);var objButtonProperties={strId:'cancel',strText:'Cancel',intWidth:100,strAlign:'center',strColour:'black',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5526,'objOnclick:','function()',arguments);Shell.closeLightboxWindow();if(typeof(objSettings.objOnCancelCallbackFunction)!='undefined')
{objSettings.objOnCancelCallbackFunction();}}};Shell.addCustomLightboxButton(objButtonProperties);var strHtml='<div class="background_'+objShell.objIdentity.name+'">'+'<h2 style="text-align:center;font-weight:bold;margin-top:10px;margin-bottom:10px;">Confirmation Needed</h2>'+'<p style="text-align:center;">'+strText.replace(/\n/g,'<br />')+'</p>'+'<br />'+'<form id="lbForm">'+'<div style="text-align:center;">'+'<table style="margin:0 auto;text-align:left;">'+'<tr>'+'<td style="width:125px;"></td>'+'<td></td>'+'</tr>';arrOptions.each(function(objOption)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5552,'arrOptions.each(','function(objOption)',arguments);switch(objOption['strType'])
{case'text':strHtml+='<tr>'+'<td style="vertical-align:top;padding-right:5px;">'+objOption['strLabel']+':</td>'+'<td style="text-align:left;padding-left:5px;"><input type="text" name="'+objOption['strName']+'" size="25" value="'+objOption['strDefault']+'" /></td>'+'</tr>';break;case'textarea':strHtml+='<tr>'+'<td style="vertical-align:top;padding-right:5px;">'+objOption['strLabel']+':</td>'+'<td style="text-align:left;padding-left:5px;"><textarea name="'+objOption['strName']+'" cols="20" rows="3">'+objOption['strDefault']+'</textarea></td>'+'</tr>';break;case'checkbox':strHtml+='<tr>'+'<td style="vertical-align:top;padding-right:5px;">'+objOption['strLabel']+':</td>'+'<td style="text-align:left;padding-left:5px;"><input type="checkbox" name="'+objOption['strName']+'" value="true" checked="'+objOption['strDefault'].toString()+'" /></td>'+'</tr>';break;case'hidden':strHtml+='<tr>'+'<td style="vertical-align:top;padding-right:5px;">'+objOption['strLabel']+':</td>'+'<td style="text-align:left;padding-left:5px;">'+objOption['strDefault']+'<input type="hidden" name="'+objOption['strName']+'" size="25" value="'+objOption['strDefault']+'" /></td>'+'</tr>';break;}});strHtml+='</table>'+'</div>'+'</form>'+'</div>';$j('#lbContent').html(strHtml);};Shell.lightboxConfirmWithOptionsConfirmed=function(objCallbackFunction,arrCallbackArguments,blnAutoCloseLightbox)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5602,'Shell.lightboxConfirmWithOptionsConfirmed =','function(objCallbackFunction, arrCallbackArguments, blnAutoCloseLightbox)',arguments);var arrOptions=$j('#lbForm').find('input,textarea');arrOptions.each(function(mixKey,objField)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5608,'arrOptions.each(','function(mixKey, objField)',arguments);switch(objField.tagName.toLowerCase())
{case'input':if(objField.type=='checkbox')
{var mixValue=$j(objField).attr('checked');}
else
{var mixValue=$j(objField).val();}
break;default:var mixValue=$j(objField).val();break;}
arrCallbackArguments.push(mixValue);});objCallbackFunction.apply(this,arrCallbackArguments);if(blnAutoCloseLightbox===true)
{Shell.closeLightboxWindow();}};Shell.lightboxConfirmWithButtons=function(objSettings,blnIsCallback)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5646,'Shell.lightboxConfirmWithButtons =','function(objSettings, blnIsCallback)',arguments);objSettings.strText=(typeof(objSettings.strText)!='undefined')?objSettings.strText:'Please confirm you wish to proceed.';objSettings.intWidth=(typeof(objSettings.intWidth)!='undefined')?objSettings.intWidth:500;objSettings.intHeight=(typeof(objSettings.intHeight)!='undefined')?objSettings.intHeight:400;objSettings.arrButtons=(typeof(objSettings.arrButtons)!='undefined')?objSettings.arrButtons:[];objSettings.arrCallbackArguments=(typeof(objSettings.arrCallbackArguments)!='undefined')?objSettings.arrCallbackArguments:[];objSettings.blnIncludeCancelButton=(typeof(objSettings.blnIncludeCancelButton)!='undefined')?objSettings.blnIncludeCancelButton:true;objSettings.blnAutoCloseOnButtonClick=(typeof(objSettings.blnAutoCloseOnButtonClick)!='undefined')?objSettings.blnAutoCloseOnButtonClick:true;objSettings.strTitle=(typeof(objSettings.strOverrideTitle)!='undefined')?objSettings.strOverrideTitle:'Confirmation Needed';var blnIsCallback=typeof(blnIsCallback)!='undefined'?blnIsCallback:false;if(blnIsCallback===false)
{var objCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5663,'var objCallbackFunction =','function()',arguments);Shell.lightboxConfirmWithButtons(objSettings,true);};Shell.launchNewLightboxWindow(objCallbackFunction,objSettings.intWidth,objSettings.intHeight);return;}
var arrCallbackArguments=objSettings.arrCallbackArguments;$j.each(objSettings.arrButtons,function(intKey,objButton)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5679,'$j.each(objSettings.arrButtons,','function(intKey, objButton)',arguments);var objButtonProperties={strId:objButton.id,strText:objButton.strText,intWidth:objButton.intWidth,strAlign:'center',strColour:'blue',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5688,'objOnclick:','function()',arguments);if(objSettings.blnAutoCloseOnButtonClick)
{Shell.closeLightboxWindow();}
objButton.objCallbackFunction.apply(this,objSettings.arrCallbackArguments);}};Shell.addCustomLightboxButton(objButtonProperties);});if(objSettings.blnIncludeCancelButton)
{var objButtonProperties={strId:'cancel',strText:'Cancel',intWidth:100,strAlign:'center',strColour:'black',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5714,'objOnclick:','function()',arguments);Shell.closeLightboxWindow();if(typeof(objSettings.objOnCancelCallbackFunction)!='undefined')
{objSettings.objOnCancelCallbackFunction();}}};Shell.addCustomLightboxButton(objButtonProperties);}
$j('#lbContent').html('<div class="background_'+objShell.objIdentity.name+'">'+'<h2 style="text-align:center;font-weight:bold;margin-top:10px;margin-bottom:10px;">'+objSettings.strTitle+'</h2>'+'<p style="text-align:center;">'+objSettings.strText.replace(/\n/g,'<br />')+'</p>'+'</div>');};Shell.updateLightboxConfirmWithButtons=function(objSettings)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5735,'Shell.updateLightboxConfirmWithButtons =','function(objSettings)',arguments);objSettings.strText=(typeof(objSettings.strText)!='undefined')?objSettings.strText:'Please confirm you wish to proceed.';objSettings.intWidth=(typeof(objSettings.intWidth)!='undefined')?objSettings.intWidth:500;objSettings.intHeight=(typeof(objSettings.intHeight)!='undefined')?objSettings.intHeight:400;objSettings.arrButtons=(typeof(objSettings.arrButtons)!='undefined')?objSettings.arrButtons:[];objSettings.arrCallbackArguments=(typeof(objSettings.arrCallbackArguments)!='undefined')?objSettings.arrCallbackArguments:[];objSettings.blnIncludeCancelButton=(typeof(objSettings.blnIncludeCancelButton)!='undefined')?objSettings.blnIncludeCancelButton:true;objSettings.blnAutoCloseOnButtonClick=(typeof(objSettings.blnAutoCloseOnButtonClick)!='undefined')?objSettings.blnAutoCloseOnButtonClick:true;objSettings.strTitle=(typeof(objSettings.strOverrideTitle)!='undefined')?objSettings.strOverrideTitle:'Confirmation Needed';Shell.removeAllCustomLightboxButtons();Shell.resizeLightboxWindow(objSettings.intWidth,objSettings.intHeight);$j.each(objSettings.arrButtons,function(intKey,objButton)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5754,'$j.each(objSettings.arrButtons,','function(intKey, objButton)',arguments);var objButtonProperties={strId:objButton.id,strText:objButton.strText,intWidth:objButton.intWidth,strAlign:'center',strColour:'blue',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5764,'objOnclick:','function()',arguments);if(objSettings.blnAutoCloseOnButtonClick)
{Shell.closeLightboxWindow();}
objButton.objCallbackFunction.apply(this,objSettings.arrCallbackArguments);}};Shell.addCustomLightboxButton(objButtonProperties);});if(objSettings.blnIncludeCancelButton)
{var objButtonProperties={strId:'cancel',strText:'Cancel',intWidth:100,strAlign:'center',strColour:'black',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5790,'objOnclick:','function()',arguments);Shell.closeLightboxWindow();}};Shell.addCustomLightboxButton(objButtonProperties);}
$j('#lbContent').html('<div class="background_'+objShell.objIdentity.name+'">'+'<h2 style="text-align:center;font-weight:bold;margin-top:10px;margin-bottom:10px;">'+objSettings.strTitle+'</h2>'+'<p style="text-align:center;">'+objSettings.strText.replace(/\n/g,'<br />')+'</p>'+'</div>');};Shell.launchNewLightboxWindow=function(objCallbackFunction,intWidth,intHeight)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5806,'Shell.launchNewLightboxWindow =','function(objCallbackFunction, intWidth, intHeight)',arguments);objShell.launchNewLightboxWindow(objCallbackFunction,intWidth,intHeight);};Shell.resizeLightboxWindow=function(intWidth,intHeight,blnAnimate)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5810,'Shell.resizeLightboxWindow =','function(intWidth, intHeight, blnAnimate)',arguments);objShell.resizeLightboxWindow(intWidth,intHeight,blnAnimate);};Shell.closeLightboxWindow=function(blnAnimate)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5815,'Shell.closeLightboxWindow =','function(blnAnimate)',arguments);objShell.closeLightbox(blnAnimate);};Shell.generateStandardLightboxLoading=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5820,'Shell.generateStandardLightboxLoading =','function()',arguments);return objShell.generateStandardLightboxLoading();};Shell.addCustomLightboxButton=function(objButtonProperties)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5825,'Shell.addCustomLightboxButton =','function(objButtonProperties)',arguments);return objShell.addCustomLightboxButton(objButtonProperties);};Shell.removeCustomLightboxButton=function(strButtonId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5829,'Shell.removeCustomLightboxButton =','function(strButtonId)',arguments);return objShell.removeCustomLightboxButton(strButtonId);};Shell.removeAllCustomLightboxButtons=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5833,'Shell.removeAllCustomLightboxButtons =','function()',arguments);return objShell.removeAllCustomLightboxButtons();};Shell.getLightboxButtonHtml=function(objProperties)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5837,'Shell.getLightboxButtonHtml =','function(objProperties)',arguments);return objShell.getLightboxButtonHtml(objProperties);};Shell.showCustomLightboxButtonActivity=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5841,'Shell.showCustomLightboxButtonActivity =','function()',arguments);return objShell.showCustomLightboxButtonActivity();};Shell.hideCustomLightboxButtonActivity=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5845,'Shell.hideCustomLightboxButtonActivity =','function()',arguments);return objShell.hideCustomLightboxButtonActivity();};Shell.executeCustomLightboxButtonOnclick=function(event,strButtonId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5849,'Shell.executeCustomLightboxButtonOnclick =','function(event, strButtonId)',arguments);return objShell.executeCustomLightboxButtonOnclick(event,strButtonId);};Shell.bookmarkHomepage=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5856,'Shell.bookmarkHomepage =','function()',arguments);var urlAddress="http://".objShell.objIdentity.host;if(typeof(window.external.AddFavorite)!="undefined")
{window.external.AddFavorite(urlAddress,objShell.objIdentity.name);}
else
{alert("Pages cannot be automatically bookmarked in non IE browsers. Please bookmark this page manually!");}};Shell.scrollToComponent=function(objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5872,'Shell.scrollToComponent =','function(objComponent)',arguments);objShell.scrollToComponent(objComponent);};Shell.scrollToTop=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5877,'Shell.scrollToTop =','function()',arguments);objShell.scrollToTop();};Shell.scrollToYPos=function(intYPos)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5882,'Shell.scrollToYPos =','function(intYPos)',arguments);objShell.scrollToYPos(intYPos);};Shell.easePage=function(intScrollYOffsetEnd)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5887,'Shell.easePage =','function(intScrollYOffsetEnd)',arguments);var intScrollYOffsetStart=$('shellColumnLeft').scrollTop;var actionObject=new EasingManager.ActionObject({onEnterFrame:objShell.scrollToYPos,keys:["scrollYOffset"]});var easingManager=new EasingManager({frameRate:50,timeToLive:2.0,actionObjects:[actionObject]});easingManager.addEasingVariable(new EasingManager.EasingVariable("scrollYOffset",{start:intScrollYOffsetStart,end:intScrollYOffsetEnd,easingType:"easeBoth"}));easingManager.start();};Shell.resizeLeftColumnTo50Percent=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5913,'Shell.resizeLeftColumnTo50Percent =','function()',arguments);return objShell.resizeLeftColumnTo50Percent();};Shell.resizeLeftColumnTo33Percent=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5918,'Shell.resizeLeftColumnTo33Percent =','function()',arguments);return objShell.resizeLeftColumnTo33Percent();};Shell.resizeLeftColumnTo0Percent=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5923,'Shell.resizeLeftColumnTo0Percent =','function()',arguments);return objShell.resizeLeftColumnTo0Percent();};Shell.getColumnsStepping=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5928,'Shell.getColumnsStepping =','function()',arguments);return objShell.getColumnsStepping();};Shell.registerResizeFunction=function(func)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5933,'Shell.registerResizeFunction =','function(func)',arguments);objShell.registerResizeFunction(func);};Shell.unregisterResizeFunction=function(func)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5938,'Shell.unregisterResizeFunction =','function(func)',arguments);objShell.unregisterResizeFunction(func);};Shell.openUserDetailsBubble=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5944,'Shell.openUserDetailsBubble =','function()',arguments);objShell.openUserDetailsBubble();};Shell.toggleRegisteredIPs=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5949,'Shell.toggleRegisteredIPs =','function()',arguments);objShell.toggleRegisteredIPs();};Shell.updateUsername=function(strNewValue)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5954,'Shell.updateUsername =','function(strNewValue)',arguments);objShell.updateUsername(strNewValue);};Shell.createSortable=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5959,'Shell.createSortable =','function()',arguments);objShell.createSortable();};Shell.search=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5964,'Shell.search =','function()',arguments);objShell.search();};Shell.searchOld=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5968,'Shell.searchOld =','function()',arguments);objShell.searchOld();};Shell.showMoreSearchOptions=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5973,'Shell.showMoreSearchOptions =','function()',arguments);objShell.showMoreSearchOptions();};Shell.openPage=function(strComponentType,strDefaultURL)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5978,'Shell.openPage =','function(strComponentType, strDefaultURL)',arguments);objShell.openPage(strComponentType,strDefaultURL);};Shell.closePage=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5983,'Shell.closePage =','function()',arguments);objShell.closePage();};Shell.setRightColumnMode=function(mode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5988,'Shell.setRightColumnMode =','function(mode)',arguments);objShell.setRightColumnMode(mode);};Shell.addJavascriptAsset=function(intAjaxId,strPath)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',5994,'Shell.addJavascriptAsset =','function(intAjaxId, strPath)',arguments);objShell.addJavascriptAsset(intAjaxId,strPath);};Shell.createComponent=function(intAjaxId,intElementId,strComponentName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6000,'Shell.createComponent =','function(intAjaxId, intElementId, strComponentName)',arguments);objShell.createComponent(intAjaxId,intElementId,strComponentName);};Shell.countChildComponents=function(strComponentColumn)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6005,'Shell.countChildComponents =','function(strComponentColumn)',arguments);if(typeof(strComponentColumn)=='undefined')
{strComponentColumn='';}
return objShell.countChildComponents(strComponentColumn);};Shell.generateComponentList=function(strComponentColumn)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6017,'Shell.generateComponentList =','function(strComponentColumn)',arguments);var arrComponents=objShell.getComponentsFromType("container",strComponentColumn,true);return arrComponents;};Shell.collapseAll=function(strComponentColumn)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6025,'Shell.collapseAll =','function(strComponentColumn)',arguments);var arrComponents=objShell.getComponentsFromType("container",strComponentColumn,true);$j.each(arrComponents,function(intKey,objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6030,'$j.each(arrComponents,','function(intKey, objComponent)',arguments);objComponent.collapse();});};Shell.collapseAllBut=function(strComponentColumn,intComponentInstanceId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6036,'Shell.collapseAllBut =','function(strComponentColumn, intComponentInstanceId)',arguments);var arrComponents=objShell.getComponentsFromType("container",strComponentColumn,true);$j.each(arrComponents,function(intKey,objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6041,'$j.each(arrComponents,','function(intKey, objComponent)',arguments);if(objComponent.intId!=intComponentInstanceId)
{objComponent.collapse();}
else
{if(objComponent.returnCollapsedState())
{objComponent.expand();}}});};Shell.bringToTop=function(objComponentInstanceObject)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6057,'Shell.bringToTop =','function(objComponentInstanceObject)',arguments);objShell.moveContainerToTop(objComponentInstanceObject);};Shell.setUsername=function(strUsername)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6064,'Shell.setUsername =','function(strUsername)',arguments);objShell.setUsername(strUsername);};Shell.getUsername=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6068,'Shell.getUsername =','function()',arguments);return objShell.getUsername();};Shell.setScreenName=function(strScreenName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6073,'Shell.setScreenName =','function(strScreenName)',arguments);objShell.setScreenName(strScreenName);};Shell.getScreenName=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6077,'Shell.getScreenName =','function()',arguments);return objShell.getScreenName();};Shell.setFullName=function(strFullName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6082,'Shell.setFullName =','function(strFullName)',arguments);objShell.setFullName(strFullName);};Shell.getFullName=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6086,'Shell.getFullName =','function()',arguments);return objShell.getFullName();};Shell.setFirstName=function(strFirstName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6091,'Shell.setFirstName =','function(strFirstName)',arguments);objShell.setFirstName(strFirstName);};Shell.getFirstName=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6095,'Shell.getFirstName =','function()',arguments);return objShell.getFirstName();};Shell.setLastName=function(strLastName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6100,'Shell.setLastName =','function(strLastName)',arguments);objShell.setLastName(strLastName);};Shell.getLastName=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6104,'Shell.getLastName =','function()',arguments);return objShell.getLastName();};Shell.setUserAthenticatedStatus=function(strUserAuthenticatedMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6110,'Shell.setUserAthenticatedStatus =','function(strUserAuthenticatedMode)',arguments);objShell.setUserAthenticatedStatus(strUserAuthenticatedMode);};Shell.getUserAthenticatedStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6114,'Shell.getUserAthenticatedStatus =','function()',arguments);return objShell.getUserAthenticatedStatus();};Shell.setUserSystemAdminStatus=function(strIsSystemAdmin)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6120,'Shell.setUserSystemAdminStatus =','function(strIsSystemAdmin)',arguments);objShell.setUserSystemAdminStatus(strIsSystemAdmin);};Shell.getUserSystemAdminStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6124,'Shell.getUserSystemAdminStatus =','function()',arguments);return objShell.getUserSystemAdminStatus();};Shell.setUserEstablishmentAdminStatus=function(strIsEstablishmentAdmin)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6130,'Shell.setUserEstablishmentAdminStatus =','function(strIsEstablishmentAdmin)',arguments);objShell.setUserEstablishmentAdminStatus(strIsEstablishmentAdmin);};Shell.getUserEstablishmentAdminStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6134,'Shell.getUserEstablishmentAdminStatus =','function()',arguments);return objShell.getUserEstablishmentAdminStatus();};Shell.setUserStaffStatus=function(strIsStaff)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6140,'Shell.setUserStaffStatus =','function(strIsStaff)',arguments);objShell.setUserStaffStatus(strIsStaff);};Shell.getUserStaffStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6144,'Shell.getUserStaffStatus =','function()',arguments);return objShell.getUserStaffStatus();};Shell.setUserPupilStatus=function(strIsPupil)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6150,'Shell.setUserPupilStatus =','function(strIsPupil)',arguments);objShell.setUserPupilStatus(strIsPupil);};Shell.getUserPupilStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6154,'Shell.getUserPupilStatus =','function()',arguments);return objShell.getUserPupilStatus();};Shell.setRoamingAccountStatus=function(strIsRoaming)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6160,'Shell.setRoamingAccountStatus =','function(strIsRoaming)',arguments);objShell.setRoamingAccountStatus(strIsRoaming);};Shell.getRoamingAccountStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6164,'Shell.getRoamingAccountStatus =','function()',arguments);return objShell.getRoamingAccountStatus();};Shell.setUserStudentTeacherStatus=function(strIsStudentTeacher)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6170,'Shell.setUserStudentTeacherStatus =','function(strIsStudentTeacher)',arguments);objShell.setUserStudentTeacherStatus(strIsStudentTeacher);};Shell.getUserStudentTeacherStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6174,'Shell.getUserStudentTeacherStatus =','function()',arguments);return objShell.getUserStudentTeacherStatus();};Shell.setUsersIPAddress=function(strIPAddress)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6179,'Shell.setUsersIPAddress =','function(strIPAddress)',arguments);objShell.setUsersIPAddress(strIPAddress);};Shell.getUsersIPAddress=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6183,'Shell.getUsersIPAddress =','function()',arguments);return objShell.getUsersIPAddress();};Shell.setUserIsAtRegisteredIPAddress=function(blnUserIsAtRegisteredIPAddress)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6188,'Shell.setUserIsAtRegisteredIPAddress =','function(blnUserIsAtRegisteredIPAddress)',arguments);objShell.setUserIsAtRegisteredIPAddress(blnUserIsAtRegisteredIPAddress);};Shell.getUserIsAtRegisteredIPAddress=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6192,'Shell.getUserIsAtRegisteredIPAddress =','function()',arguments);return objShell.getUserIsAtRegisteredIPAddress();};Shell.setUsersEstablishmentDetails=function(strEstablishmentName,strIPAddressRange,strAdministratorName,strEstablishmentType)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6197,'Shell.setUsersEstablishmentDetails =','function(strEstablishmentName, strIPAddressRange, strAdministratorName, strEstablishmentType)',arguments);objShell.setUsersEstablishmentDetails(strEstablishmentName,strIPAddressRange,strAdministratorName,strEstablishmentType);};Shell.getUsersEstablishmentDetails=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6201,'Shell.getUsersEstablishmentDetails =','function()',arguments);return objShell.getUsersEstablishmentDetails();};Shell.setAcceptedTermsAndConditionsStatus=function(strAcceptedTermsAndConditions)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6206,'Shell.setAcceptedTermsAndConditionsStatus =','function(strAcceptedTermsAndConditions)',arguments);objShell.setAcceptedTermsAndConditionsStatus(strAcceptedTermsAndConditions);};Shell.getAcceptedTermsAndConditionsStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6210,'Shell.getAcceptedTermsAndConditionsStatus =','function()',arguments);return objShell.getAcceptedTermsAndConditionsStatus();};Shell.setHasLinkToMapsLicence=function(strhasLinkToMapsLicence)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6215,'Shell.setHasLinkToMapsLicence =','function(strhasLinkToMapsLicence)',arguments);objShell.setHasLinkToMapsLicence(strhasLinkToMapsLicence);};Shell.getHasLinkToMapsLicence=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6219,'Shell.getHasLinkToMapsLicence =','function()',arguments);return objShell.getHasLinkToMapsLicence();};Shell.setLayoutMode=function(strLayoutMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6224,'Shell.setLayoutMode =','function(strLayoutMode)',arguments);objShell.setLayoutMode(strLayoutMode);};Shell.getLayoutMode=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6228,'Shell.getLayoutMode =','function()',arguments);return objShell.getLayoutMode();};Shell.setInfomapperClassicImportStatus=function(strInfomapperClassicImportStatus)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6233,'Shell.setInfomapperClassicImportStatus =','function(strInfomapperClassicImportStatus)',arguments);objShell.setInfomapperClassicImportStatus(strInfomapperClassicImportStatus);};Shell.getInfomapperClassicImportStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6237,'Shell.getInfomapperClassicImportStatus =','function()',arguments);return objShell.getInfomapperClassicImportStatus();};Shell.setIsShibbolethUser=function(strIsShibbolethUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6242,'Shell.setIsShibbolethUser =','function(strIsShibbolethUser)',arguments);objShell.setIsShibbolethUser(strIsShibbolethUser);};Shell.getIsShibbolethUser=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6246,'Shell.getIsShibbolethUser =','function()',arguments);return objShell.getIsShibbolethUser();};Shell.setIsPrintOnlyUser=function(strIsPrintOnlyUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6251,'Shell.setIsPrintOnlyUser =','function(strIsPrintOnlyUser)',arguments);objShell.setIsPrintOnlyUser(strIsPrintOnlyUser);};Shell.getIsPrintOnlyUser=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6255,'Shell.getIsPrintOnlyUser =','function()',arguments);return objShell.getIsPrintOnlyUser();};Shell.setIsExpiredUser=function(strIsExpiredUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6260,'Shell.setIsExpiredUser =','function(strIsExpiredUser)',arguments);objShell.setIsExpiredUser(strIsExpiredUser);};Shell.getIsExpiredUser=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6264,'Shell.getIsExpiredUser =','function()',arguments);return objShell.getIsExpiredUser();};Shell.setIsNoPreviousLicenceUser=function(strIsNoPreviousLicenceUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6269,'Shell.setIsNoPreviousLicenceUser =','function(strIsNoPreviousLicenceUser)',arguments);objShell.setIsNoPreviousLicenceUser(strIsNoPreviousLicenceUser);};Shell.getIsNoPreviousLicenceUser=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6273,'Shell.getIsNoPreviousLicenceUser =','function()',arguments);return objShell.getIsNoPreviousLicenceUser();};Shell.setIsLicencedUser=function(strIsLicencedUser)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6278,'Shell.setIsLicencedUser =','function(strIsLicencedUser)',arguments);objShell.setIsLicencedUser(strIsLicencedUser);};Shell.getIsLicencedUser=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6282,'Shell.getIsLicencedUser =','function()',arguments);return objShell.getIsLicencedUser();};Shell.setShibbolethLoginURL=function(strShibbolethLoginURL)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6287,'Shell.setShibbolethLoginURL =','function(strShibbolethLoginURL)',arguments);objShell.setShibbolethLoginURL(strShibbolethLoginURL);};Shell.getShibbolethLoginURL=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6291,'Shell.getShibbolethLoginURL =','function()',arguments);return objShell.getShibbolethLoginURL();};Shell.setHasCompletedDetailsUpdateForm=function(strHasCompletedDetailsUpdateForm)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6296,'Shell.setHasCompletedDetailsUpdateForm =','function(strHasCompletedDetailsUpdateForm)',arguments);objShell.setHasCompletedDetailsUpdateForm(strHasCompletedDetailsUpdateForm);};Shell.getHasCompletedDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6300,'Shell.getHasCompletedDetailsUpdateForm =','function()',arguments);return objShell.getHasCompletedDetailsUpdateForm();};Shell.setPasswordResetRequiredStatus=function(strPasswordResetRequired)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6305,'Shell.setPasswordResetRequiredStatus =','function(strPasswordResetRequired)',arguments);objShell.setPasswordResetRequiredStatus(strPasswordResetRequired);};Shell.getPasswordResetRequiredStatus=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6309,'Shell.getPasswordResetRequiredStatus =','function()',arguments);return objShell.getPasswordResetRequiredStatus();};Shell.setUserContextSensitiveHelpMode=function(strContextSensitiveHelpMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6315,'Shell.setUserContextSensitiveHelpMode =','function(strContextSensitiveHelpMode)',arguments);objShell.setUserContextSensitiveHelpMode(strContextSensitiveHelpMode);};Shell.getUserContextSensitiveHelpMode=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6319,'Shell.getUserContextSensitiveHelpMode =','function()',arguments);return objShell.getUserContextSensitiveHelpMode();};Shell.setIdentity=function(objIdentity){Profiler.profile('view/components/shell/assets/javascript/shell.js',6326,'Shell.setIdentity =','function(objIdentity)',arguments);objShell.setIdentity(objIdentity);};Shell.getIdentity=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6330,'Shell.getIdentity =','function()',arguments);return objShell.getIdentity();};Shell.setVersionNumber=function(strVersionNumber)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6335,'Shell.setVersionNumber =','function(strVersionNumber)',arguments);objShell.setVersionNumber(strVersionNumber);};Shell.setSystemVersionNumber=function(strSystemVersionNumber)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6339,'Shell.setSystemVersionNumber =','function(strSystemVersionNumber)',arguments);objShell.setSystemVersionNumber(strSystemVersionNumber);};Shell.setSystemVersionReleaseDate=function(strSystemVersionReleaseDate)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6343,'Shell.setSystemVersionReleaseDate =','function(strSystemVersionReleaseDate)',arguments);objShell.setSystemVersionReleaseDate(strSystemVersionReleaseDate);};Shell.setSystemVersionURLS=function(objSystemVersionURLs)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6347,'Shell.setSystemVersionURLS =','function(objSystemVersionURLs)',arguments);objShell.setSystemVersionURLS(objSystemVersionURLs);};Shell.getVersionNumber=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6351,'Shell.getVersionNumber =','function()',arguments);return objShell.getVersionNumber();};Shell.getSystemVersionNumber=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6355,'Shell.getSystemVersionNumber =','function()',arguments);return objShell.getSystemVersionNumber();};Shell.getSystemVersionReleaseDate=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6359,'Shell.getSystemVersionReleaseDate =','function()',arguments);return objShell.getSystemVersionReleaseDate();};Shell.getSystemVersionURLS=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6363,'Shell.getSystemVersionURLS =','function()',arguments);return objShell.getSystemVersionURLS();};Shell.setWebsiteDomain=function(strDomain)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6368,'Shell.setWebsiteDomain =','function(strDomain)',arguments);objShell.setWebsiteDomain(strDomain);};Shell.setWebsiteSecureDomain=function(strSecureDomain)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6372,'Shell.setWebsiteSecureDomain =','function(strSecureDomain)',arguments);objShell.setWebsiteSecureDomain(strSecureDomain);};Shell.setSessionTimeoutUrl=function(strUrl)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6376,'Shell.setSessionTimeoutUrl =','function(strUrl)',arguments);objShell.setSessionTimeoutUrl(strUrl);};Shell.setWebsiteSubdomains=function(objWebsiteSubdomains)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6380,'Shell.setWebsiteSubdomains =','function(objWebsiteSubdomains)',arguments);objShell.setWebsiteSubdomains(objWebsiteSubdomains);};Shell.getWebsiteDomain=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6384,'Shell.getWebsiteDomain =','function()',arguments);return objShell.getWebsiteDomain();};Shell.getWebsiteSecureDomain=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6388,'Shell.getWebsiteSecureDomain =','function()',arguments);return objShell.getWebsiteSecureDomain();};Shell.getWebsiteSubdomains=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6392,'Shell.getWebsiteSubdomains =','function()',arguments);return objShell.getWebsiteSubdomains();};Shell.setCurrentSession=function(strSessionId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6396,'Shell.setCurrentSession =','function(strSessionId)',arguments);objShell.setCurrentSession(strSessionId);};Shell.getCurrentSession=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6400,'Shell.getCurrentSession =','function()',arguments);try
{return objShell.getCurrentSession();}
catch(err)
{return'';}};Shell.setComponentNiceNameMapping=function(strObjComponentURLToNiceNameMapping)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6411,'Shell.setComponentNiceNameMapping =','function(strObjComponentURLToNiceNameMapping)',arguments);objShell.setComponentNiceNameMapping(strObjComponentURLToNiceNameMapping);};Shell.setLinkToUlearnDetails=function(objLinkTouLearnDetails)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6416,'Shell.setLinkToUlearnDetails =','function(objLinkTouLearnDetails)',arguments);objShell.setLinkToUlearnDetails(objLinkTouLearnDetails);};Shell.getLinkToUlearnDetails=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6420,'Shell.getLinkToUlearnDetails =','function()',arguments);return objShell.getLinkToUlearnDetails();};Shell.getCumulativeOffset=function(element)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6427,'Shell.getCumulativeOffset =','function(element)',arguments);return objShell.getCumulativeOffset(element);};Shell.openSpeechBubble=function(strMessage,objElement,intDuration,strAlignX,strAlignY,intXOffset,intYOffset,intZIndex)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6433,'Shell.openSpeechBubble =','function(strMessage, objElement, intDuration, strAlignX, strAlignY, intXOffset, intYOffset, intZIndex)',arguments);if(typeof(speechBubbleCloseTimeout)!='undefined')
{clearTimeout(speechBubbleCloseTimeout);}
if(typeof(objElement)=='undefined')
{alert('No element to base positioning on was found. Speech bubble will not be opened.');return false;}
var objElement=$j(objElement);var strMessage=(typeof(strMessage)!='undefined')?strMessage:'No message defined!';var intDuration=(typeof(intDuration)!='undefined')?intDuration:3;var strAlignX=(typeof(strAlignX)!='undefined')?strAlignX:'right';var strAlignY=(typeof(strAlignY)!='undefined')?strAlignY:'bottom';var intXOffset=(typeof(intXOffset)!='undefined')?intXOffset:0;var intYOffset=(typeof(intYOffset)!='undefined')?intYOffset:0;var intZIndex=(typeof(intZIndex)!='undefined')?intZIndex:21;var objPosition=objElement.offset();var objDimensions={width:objElement.outerWidth(),height:objElement.outerHeight()};switch(strAlignX)
{case'right':var intXPos=objPosition.left+objDimensions['width'];break;case'left':var intXPos=objPosition.left;break;}
switch(strAlignY)
{case'top':var intYPos=objPosition.top;break;case'bottom':var intYPos=objPosition.top+objDimensions['height'];break;}
intXPos+=intXOffset;intYPos+=intYOffset;var objSpeechBubble1=$j('#speech_bubble1');var objSpeechBubbleContent1=$j('#speech_bubble_content1');Shell.closeSpeechBubble();objSpeechBubbleContent1.html(strMessage);var objSpeechBubbleDimensions={width:objSpeechBubble1.width(),height:objSpeechBubble1.height()};var objWindowDimensions={width:$j(window).width(),height:$j(window).height()};if((intYPos+objSpeechBubbleDimensions.height)>objWindowDimensions.height)
{intYPos=intYPos-(intYPos+objSpeechBubbleDimensions.height-objWindowDimensions.height);}
objSpeechBubble1.css({top:intYPos+'px',left:intXPos+'px',zIndex:intZIndex});var objContainingElementDiv=objElement.parents('#shellColumnLeft:first');var strLayoutMode=Shell.getLayoutMode();if(objContainingElementDiv.length>0)
{objContainingElementDiv.unbind('scroll').bind('scroll',function(){Shell.closeSpeechBubble();});if(strLayoutMode=='reverse')
{objSpeechBubble1.css({minWidth:'400px'});var containerDimensions={width:objContainingElementDiv.width(),height:objContainingElementDiv.height()};var containerWidth=containerDimensions.width;var SpeechBubbleWidth=objSpeechBubbleDimensions.width;if(SpeechBubbleWidth>containerWidth)
{var objSpeechBubble2=$j('#speech_bubble2');var objSpeechBubbleContent2=$j('#speech_bubble_content2');objSpeechBubbleContent2.html(strMessage);if(Shell.getBrowserDetails.strBrowser=='Firefox')
{var newIntXPos=intXPos-SpeechBubbleWidth;}
else
{var newIntXPos=intXPos-(SpeechBubbleWidth+30);}
objSpeechBubble2.css({top:intYPos+'px',left:newIntXPos+'px',zIndex:intZIndex,width:'auto !important',width:'400px',maxWidth:'400px',margin:'0px',padding:'0px'});if(document.all&&!window.opera)
{objSpeechBubble2.show();}
else
{objSpeechBubble2.stop(true,true).fadeIn(200);}
objShell.speechBubbleDuration=intDuration;if(intDuration>0)
{speechBubbleCloseTimeout=setTimeout('Shell.closeSpeechBubble()',intDuration+'000');}
return objSpeechBubbleContent2;}}}
if(document.all&&!window.opera)
{objSpeechBubble1.show();}
else
{objSpeechBubble1.stop(true,true).fadeIn(200);}
objShell.speechBubbleDuration=intDuration;if(intDuration>0)
{speechBubbleCloseTimeout=setTimeout("Shell.closeSpeechBubble()",intDuration+"000");}
objSpeechBubble1.bgiframe();return objSpeechBubbleContent1;};Shell.clickSpeechBubble=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6639,'Shell.clickSpeechBubble =','function()',arguments);if(objShell.speechBubbleDuration>0)
{Shell.closeSpeechBubble();}};Shell.closeSpeechBubble=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6647,'Shell.closeSpeechBubble =','function()',arguments);if(document.all&&!window.opera)
{$j('#speech_bubble1').hide();$j('#speech_bubble2').hide();return;}
var objSpeechBubble1=$j('#speech_bubble1');if(objSpeechBubble1.css('display')!='none')
{objSpeechBubble1.stop(true,true).fadeOut(200);}
var objSpeechBubble2=$j('#speech_bubble2');if(objSpeechBubble2.css('display')!='none')
{objSpeechBubble2.stop(true,true).fadeOut(200);}};Shell.setActiveResourceExplorer=function(intResourceExplorerId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6677,'Shell.setActiveResourceExplorer =','function(intResourceExplorerId)',arguments);objShell.setActiveResourceExplorer(intResourceExplorerId);};Shell.getActiveResourceExplorer=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6682,'Shell.getActiveResourceExplorer =','function()',arguments);return objShell.getActiveResourceExplorer();};Shell.addGlobalPeriodicalExecutioner=function(strKey,objPE)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6689,'Shell.addGlobalPeriodicalExecutioner =','function(strKey, objPE)',arguments);objShell.addGlobalPeriodicalExecutioner(strKey,objPE);};Shell.removeGlobalPeriodicalExecutioner=function(strKey)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6694,'Shell.removeGlobalPeriodicalExecutioner =','function(strKey)',arguments);objShell.removeGlobalPeriodicalExecutioner(strKey);};Shell.showOverlay=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6701,'Shell.showOverlay =','function()',arguments);$j('#shellOverlay').show();};Shell.hideOverlay=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6706,'Shell.hideOverlay =','function()',arguments);$j('#shellOverlay').hide();};Shell.refreshResourceLists=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6711,'Shell.refreshResourceLists =','function()',arguments);if(typeof(ResourceExplorer)!='undefined')
{ResourceExplorer.refreshAll();}};Shell.showTermsAndConditions=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6720,'Shell.showTermsAndConditions =','function()',arguments);window.setTimeout(function(){Shell.showTermsAndConditionsDeferred();},0);};Shell.showTermsAndConditionsDeferred=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6724,'Shell.showTermsAndConditionsDeferred =','function()',arguments);objShell.showTermsAndConditions();};Shell.acceptTermsAndConditions=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6728,'Shell.acceptTermsAndConditions =','function()',arguments);objShell.acceptTermsAndConditions();};Shell.cancelTermsAndConditions=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6732,'Shell.cancelTermsAndConditions =','function()',arguments);var identity=Shell.getIdentity();var name=identity.name;alert("You must accept the terms and conditions before using "+name+".");};Shell.closeTermsAndConditions=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6738,'Shell.closeTermsAndConditions =','function()',arguments);objShell.closeLightbox();};Shell.showUserDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6743,'Shell.showUserDetailsUpdateForm =','function()',arguments);window.setTimeout(function(){Shell.showUserDetailsUpdateFormDeferred();},0);};Shell.showUserDetailsUpdateFormDeferred=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6747,'Shell.showUserDetailsUpdateFormDeferred =','function()',arguments);objShell.showUserDetailsUpdateForm();};Shell.showShibbolethUserDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6751,'Shell.showShibbolethUserDetailsUpdateForm =','function()',arguments);window.setTimeout(function(){Shell.showShibbolethUserDetailsUpdateFormDeferred();},0);};Shell.showShibbolethUserDetailsUpdateFormDeferred=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6755,'Shell.showShibbolethUserDetailsUpdateFormDeferred =','function()',arguments);objShell.showShibbolethUserDetailsUpdateForm();};Shell.saveUserDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6759,'Shell.saveUserDetailsUpdateForm =','function()',arguments);objShell.saveUserDetailsUpdateForm();};Shell.cancelUserDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6763,'Shell.cancelUserDetailsUpdateForm =','function()',arguments);var identity=Shell.getIdentity();var name=identity.name;alert("You must complete the form before using "+name+".");};Shell.closeUserDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6769,'Shell.closeUserDetailsUpdateForm =','function()',arguments);objShell.closeLightbox();};Shell.saveShibbolethUserDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6773,'Shell.saveShibbolethUserDetailsUpdateForm =','function()',arguments);objShell.saveShibbolethUserDetailsUpdateForm();};Shell.cancelShibbolethUserDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6777,'Shell.cancelShibbolethUserDetailsUpdateForm =','function()',arguments);var identity=Shell.getIdentity();var name=identity.name;alert("You must complete the form before using "+name+".");};Shell.closeShibbolethUserDetailsUpdateForm=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6783,'Shell.closeShibbolethUserDetailsUpdateForm =','function()',arguments);objShell.closeLightbox();};Shell.toggleUserDetailsFormLicencePurchase=function(srcElement)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6788,'Shell.toggleUserDetailsFormLicencePurchase =','function(srcElement)',arguments);$j('#purchaseLicenceDetails').toggle();if(srcElement.checked)
{$j('#lightbox').get(0).scrollTop=$j('#lightbox').get(0).scrollHeight;}
else
{}};Shell.showPasswordResetPrompt=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6803,'Shell.showPasswordResetPrompt =','function()',arguments);objShell.showPasswordResetPrompt();};Shell.systemStatusChecks=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6808,'Shell.systemStatusChecks =','function()',arguments);window.setTimeout(function(){Shell.systemStatusChecksDeferred();},0);};Shell.systemStatusChecksDeferred=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6812,'Shell.systemStatusChecksDeferred =','function()',arguments);objShell.systemStatusChecks();};Shell.closeSystemStatusMessages=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6816,'Shell.closeSystemStatusMessages =','function()',arguments);objShell.closeLightbox();};Shell.acceptNewReleaseNotification=function(blnForceSessionReset)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6820,'Shell.acceptNewReleaseNotification =','function(blnForceSessionReset)',arguments);objShell.acceptNewReleaseNotification(blnForceSessionReset);};Shell.toggleReleaseNotes=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6824,'Shell.toggleReleaseNotes =','function()',arguments);objShell.toggleReleaseNotes();};Shell.setInitialMessage=function(strMessage)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6828,'Shell.setInitialMessage =','function(strMessage)',arguments);Shell.lightboxAlert(strMessage,500,160);};Shell.linkToUlearnSearch=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6832,'Shell.linkToUlearnSearch =','function()',arguments);objShell.linkToUlearnSearch();};Shell.toggleLinkToMapLayerList=function(blnCollapse)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6836,'Shell.toggleLinkToMapLayerList =','function(blnCollapse)',arguments);objShell.toggleLinkToMapLayerList(blnCollapse);};Shell.toggleLinkToMapFooter=function(blnCollapse)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6840,'Shell.toggleLinkToMapFooter =','function(blnCollapse)',arguments);objShell.toggleLinkToMapFooter(blnCollapse);};Shell.generateLinkToUlearnLayerPanelContent=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6844,'Shell.generateLinkToUlearnLayerPanelContent =','function()',arguments);objShell.generateLinkToUlearnLayerPanelContent();};Shell.resizeShellLinkToUlearnMaps=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6848,'Shell.resizeShellLinkToUlearnMaps =','function()',arguments);objShell.resizeShellLinkToUlearnMaps();};Shell.resizeShell=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6852,'Shell.resizeShell =','function()',arguments);objShell.resizeShell();};Shell.focusSearchField=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6857,'Shell.focusSearchField =','function()',arguments);objShell.focusSearchField();};Shell.blurSearchField=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6861,'Shell.blurSearchField =','function()',arguments);objShell.blurSearchField();};Shell.suppressSearchBubble=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6865,'Shell.suppressSearchBubble =','function()',arguments);objShell.suppressSearchBubble();};Shell.updateSaveViewToPlaylistMenu=function(mixData,objPrivateMenu,objPublishedMenu)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6871,'Shell.updateSaveViewToPlaylistMenu =','function(mixData, objPrivateMenu, objPublishedMenu)',arguments);var arrPlaylists=$j.evalJSON(mixData);var blnIsLicencedUser=Shell.getIsLicencedUser();if(objPrivateMenu)
{objPrivateMenu.removeAllItems();if(arrPlaylists['total_private']>0)
{$j.each(arrPlaylists['private'],function(intPlaylistId,strPlaylistTitle)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6884,'$j.each(arrPlaylists[\'private\'],','function(intPlaylistId, strPlaylistTitle)',arguments);if(blnIsLicencedUser===false)
{objPrivateMenu.addItem(strPlaylistTitle,function(){Shell.showLicenceRequiredPopup('Create and edit multi-view playlists','multi_view_playlists');});}
else
{objPrivateMenu.addItem(strPlaylistTitle,function(){Shell.showSaveCurrentViewToPlaylist(intPlaylistId);});}});}
else
{objPrivateMenu.addItem('None available',null);}}
if(objPublishedMenu)
{objPublishedMenu.removeAllItems();if(arrPlaylists['total_published']>0)
{$j.each(arrPlaylists['published'],function(intPlaylistId,strPlaylistTitle)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6909,'$j.each(arrPlaylists[\'published\'],','function(intPlaylistId, strPlaylistTitle)',arguments);if(blnIsLicencedUser===false)
{objPublishedMenu.addItem(strPlaylistTitle,function(){Shell.showLicenceRequiredPopup('Create and edit multi-view playlists','multi_view_playlists');});}
else
{objPublishedMenu.addItem(strPlaylistTitle,function(){Shell.showSaveCurrentViewToPlaylist(intPlaylistId);});}});}
else
{objPublishedMenu.addItem('None available',null);}}};Shell.showSaveCurrentViewToPlaylist=function(intPlaylistId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6929,'Shell.showSaveCurrentViewToPlaylist =','function(intPlaylistId)',arguments);objShell.showSaveCurrentViewToPlaylistInit(intPlaylistId);};Shell.showSaveCurrentViewToPlaylistStageTwo=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6934,'Shell.showSaveCurrentViewToPlaylistStageTwo =','function()',arguments);if($j.trim($j('#playlistName').val())=='')
{alert('You must enter a name for the playlist');var objBrowserDetails=objShell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{}
else
{$j('#playlistName').focus();}
return false;}
if($j.trim($j('#playlistTags').val()).replace(/,/g,'')=='')
{alert('You must enter at least one tag to associate with the playlist');var objBrowserDetails=objShell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{}
else
{$j('#playlistTags').focus();}
return false;}
Shell.showCustomLightboxButtonActivity();objShell.executeUpdateInitCode();$j('#playlistDetails').hide();setTimeout('Shell.continueShowSaveCurrentViewToPlaylistStageTwo()',1500);};Shell.continueShowSaveCurrentViewToPlaylistStageTwo=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6980,'Shell.continueShowSaveCurrentViewToPlaylistStageTwo =','function()',arguments);$j('#viewDetails').show();var objButtonProperties={strId:'save',strText:'Save',intWidth:120,strAlign:'center',strColour:'blue',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',6994,'objOnclick:','function()',arguments);Shell.preSaveCurrentViewToPlaylist();return false;}};Shell.addCustomLightboxButton(objButtonProperties);var objButtonProperties={strId:'close',strText:'Cancel',intWidth:100,strAlign:'center',strColour:'black',objOnclick:function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7011,'objOnclick:','function()',arguments);Shell.closeLightboxWindow();return false;}};Shell.addCustomLightboxButton(objButtonProperties);Shell.resizeLightboxWindow(800,250);};Shell.preSaveCurrentViewToPlaylist=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7023,'Shell.preSaveCurrentViewToPlaylist =','function()',arguments);var objLayerList=Map.returnCurrentLayerList();var strLayerId=null;var blnDefaultAnnotationLayerExists=false;var intAnnotationObjects=0;$j.each(objLayerList,function(strCurrentLayerId,objLayer)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7031,'$j.each(objLayerList,','function(strCurrentLayerId, objLayer)',arguments);if(objLayer.blnScribble===true)
{strLayerId=strCurrentLayerId;intAnnotationObjects=objLayer.arrAnnotationObjects.length;blnDefaultAnnotationLayerExists=true;return false;}});if(blnDefaultAnnotationLayerExists===true)
{var objCallbackFunction=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7047,'var objCallbackFunction =','function()',arguments);Shell.saveCurrentViewToPlaylist(true);};if(intAnnotationObjects>0)
{Shell.saveCurrentViewToPlaylist(true);}
else
{Map.removeLayerFromList(strLayerId,true,objCallbackFunction);}}
else
{Shell.saveCurrentViewToPlaylist();}};Shell.saveCurrentViewToPlaylist=function(blnLayerAutoSaved)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7069,'Shell.saveCurrentViewToPlaylist =','function(blnLayerAutoSaved)',arguments);var objDetails=new Object();objDetails['strViewName']=$j('#viewName').val();objDetails['strViewDescription']=$j('#viewDescription').val();objDetails['blnNewPlaylist']=($j('#blnNewPlaylist').val()=='true')?true:false;objDetails['blnLayerAutoSaved']=(blnLayerAutoSaved===true)?true:false;if($j.trim(objDetails['strViewName'])=='')
{alert('You must enter a name for the view');var objBrowserDetails=objShell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{}
else
{$j('#viewName').focus();}
return false;}
if(objDetails['blnNewPlaylist']===true)
{objDetails['strPlaylistName']=$j('#playlistName').val();objDetails['strPlaylistDescription']=$j('#playlistDescription').val();objDetails['strPlaylistTags']=$j('#playlistTags').val();objDetails['blnIsPromotional']=($j('#promotionalResource').length>0&&$j('#promotionalResource').attr('checked'))?true:false;if(objDetails['blnIsPromotional'])
{objDetails['strPromotionalConsortia']=$j('#promotionalResourceConsortia').val();objDetails['strPromotionalFederation']=$j('#promotionalResourceFederation').val();objDetails['strPromotionalEstablishment']=$j('#promotionalResourceEstablishment').val();objDetails['strPromotionalStartDate']=$j('#promotionalResourceDateStart').val();objDetails['strPromotionalEndDate']=$j('#promotionalResourceDateEnd').val();}
if($j.trim(objDetails['strPlaylistName'])=='')
{alert('You must enter a name for the playlist');var objBrowserDetails=objShell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{}
else
{$j('#playlistName').focus();}
return false;}}
else
{objDetails['intPlaylistId']=$j('#playlistId').val();}
if(Shell.getIsLicencedUser()===true)
{objDetails['strMapState']=Map.getState(true,true);objDetails['strComponentsStates']=Shell.getComponentsStates(['resourceDetails'],$j('#viewSaveLockedComponents').attr('checked'),$j('#viewSaveCollapsedComponents').attr('checked'),true);}
else
{objDetails['strMapState']=Map.getState(true,false);objDetails['strComponentsStates']=$j.toJSON([]);}
var objParams={arrDetails:Object.toJSON(objDetails)};objShell.saveCurrentViewToPlaylistAsLightbox(objParams);};Shell.viewPlaylist=function(intPlaylistId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7156,'Shell.viewPlaylist =','function(intPlaylistId)',arguments);var url='openPlaylist/'+intPlaylistId;var objComponents=Shell.generateComponentList('left');if(objComponents.length>0)
{$j.each(objComponents[0].objChildComponentObjects.left,function(mixKey,objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7166,'$j.each(objComponents[0].objChildComponentObjects.left,','function(mixKey, objComponent)',arguments);if(objComponent.strComponentType=='resourceExplorer')
{objComponent.setTab('playlists',true);}});}
Shell.openComponent('resourceExplorer',url);Shell.closeLightboxWindow();};Shell.playPlaylist=function(intPlaylistId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7182,'Shell.playPlaylist =','function(intPlaylistId)',arguments);var url='playPlaylist/'+intPlaylistId;var objComponents=Shell.generateComponentList('left');if(objComponents.length>0)
{$j.each(objComponents[0].objChildComponentObjects.left,function(mixKey,objComponent)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7192,'$j.each(objComponents[0].objChildComponentObjects.left,','function(mixKey, objComponent)',arguments);if(objComponent.strComponentType=='resourceExplorer')
{objComponent.setTab('playlists',true);}});}
Shell.openComponent('resourceExplorer',url);Shell.closeLightboxWindow();};Shell.getComponentsStates=function(arrComponentTypes,blnIncludeLockedComponents,blnIncludeCollapsedComponents,blnSerialize)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7208,'Shell.getComponentsStates =','function(arrComponentTypes, blnIncludeLockedComponents, blnIncludeCollapsedComponents, blnSerialize)',arguments);return objShell.getComponentsStates(arrComponentTypes,blnIncludeLockedComponents,blnIncludeCollapsedComponents,blnSerialize);};Shell.makePngsTransparent=function(mixString,blnIsId,objOverridingContainerElement)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7213,'Shell.makePngsTransparent =','function(mixString, blnIsId, objOverridingContainerElement)',arguments);objShell.makePngsTransparent(mixString,blnIsId,objOverridingContainerElement);};Shell.setCulture=function(strCulture)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7218,'Shell.setCulture =','function(strCulture)',arguments);objShell.setCulture(strCulture);};Shell.togglePromotionalOptions=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7223,'Shell.togglePromotionalOptions =','function()',arguments);var blnPromotionalCheckboxChecked=$j("#promotionalResource").attr('checked');if(blnPromotionalCheckboxChecked)
{$j("#promotionalResourceOptionsContainer").css({opacity:1.0});}
else
{$j("#promotionalResourceOptionsContainer").css({opacity:0.5});}};Shell.handlePromotionalConsortiaChange=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7238,'Shell.handlePromotionalConsortiaChange =','function()',arguments);objShell.handlePromotionalConsortiaChange();};Shell.handlePromotionalFederationChange=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7243,'Shell.handlePromotionalFederationChange =','function()',arguments);objShell.handlePromotionalFederationChange();};Shell.setupPromotionalEstablishmentAutoComplete=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7248,'Shell.setupPromotionalEstablishmentAutoComplete =','function()',arguments);objShell.setupPromotionalEstablishmentAutoComplete();};Shell.setPromotionalResources=function(arrPromotionalResources)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7253,'Shell.setPromotionalResources =','function(arrPromotionalResources)',arguments);objShell.setPromotionalResources(arrPromotionalResources);};Shell.getPromotionalResources=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7257,'Shell.getPromotionalResources =','function()',arguments);return objShell.getPromotionalResources();};Shell.showPromotionalResources=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7261,'Shell.showPromotionalResources =','function()',arguments);objShell.showPromotionalResources();};Shell.setUnloadMode=function(blnUloadMode)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7265,'Shell.setUnloadMode =','function(blnUloadMode)',arguments);objShell.setUnloadMode(blnUloadMode);};Shell.showPrintOnlyLoginNotification=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7270,'Shell.showPrintOnlyLoginNotification =','function()',arguments);objShell.showPrintOnlyLoginNotification();};Shell.showPrintOnlySearchNotification=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7275,'Shell.showPrintOnlySearchNotification =','function()',arguments);objShell.showPrintOnlySearchNotification();};Shell.disablePrintOnlySearchNotification=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7280,'Shell.disablePrintOnlySearchNotification =','function()',arguments);objShell.disablePrintOnlySearchNotification();};Shell.showExpiredLicenceNotification=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7285,'Shell.showExpiredLicenceNotification =','function()',arguments);objShell.showExpiredLicenceNotification();};Shell.showLicenceRequiredPopup=function(strFunctionTitle,strFeature)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7290,'Shell.showLicenceRequiredPopup =','function(strFunctionTitle, strFeature)',arguments);objShell.showLicenceRequiredPopup(strFunctionTitle,strFeature);};Shell.processResourceExplorerMenuOption=function(strUrl,strTab)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7295,'Shell.processResourceExplorerMenuOption =','function(strUrl, strTab)',arguments);objShell.processResourceExplorerMenuOption(strUrl,strTab);};Shell.processError=function(strMessage,strURL,intLine)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7300,'Shell.processError =','function(strMessage, strURL, intLine)',arguments);return objShell.processError(strMessage,strURL,intLine);};Shell.getCallStack=function()
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7305,'Shell.getCallStack =','function()',arguments);return objShell.getCallStack();};Shell.checkJSLoaded=function(intAjaxId,strComponentJavascriptClassName)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7310,'Shell.checkJSLoaded =','function(intAjaxId, strComponentJavascriptClassName)',arguments);objShell.checkJSLoaded(intAjaxId,strComponentJavascriptClassName);}
Shell.disableComponentContainer=function(intComponentContainerElementId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7315,'Shell.disableComponentContainer =','function(intComponentContainerElementId)',arguments);var objContainer=$j('#container'+intComponentContainerElementId+'');var objContainerBodyElement=$j('#container'+intComponentContainerElementId+' .body');var objContainerOverlayElement=$j('#'+intComponentContainerElementId+'_defaultOverlay ');var intTop=parseInt(objContainerBodyElement.css('padding-top'));var intLeft=parseInt(objContainerBodyElement.css('padding-left'));var intWidth=parseInt(objContainerBodyElement.innerWidth());var intHeight=parseInt(objContainerBodyElement.innerHeight());objContainerOverlayElement.css({opacity:0.5,top:intTop+'px',left:intLeft+'px',width:intWidth+'px',height:intHeight+'px'});}
Shell.extractPQPElement=function(strElementId)
{Profiler.profile('view/components/shell/assets/javascript/shell.js',7331,'Shell.extractPQPElement =','function(strElementId)',arguments);$j('body #pqp-container').remove();$j('body').append($j('body #'+strElementId));$j('body #'+strElementId).attr('id','pqp-container');$j('body #pqp-container').show();}
var Login=Class.extend(ComponentBase,{initialize:function(objLoginElement,objParentObject,strComponentType,strComponentColumn)
{Profiler.profile('view/components/login/assets/javascript/login.js',18,'initialize:','function(objLoginElement, objParentObject, strComponentType, strComponentColumn)',arguments);this.parent(objLoginElement,objParentObject,strComponentType,strComponentColumn);},showLogin:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',26,'showLogin:','function()',arguments);var strUrl='showLogin/';this.update(strUrl);},focusLogin:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',37,'focusLogin:','function()',arguments);$j(this.returnElementReference()).find('.username_field').focus();},monitorLogin:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',44,'monitorLogin:','function()',arguments);var _this=this;$j(this.returnElementReference()).find('.password_field').bind('keypress',function(event)
{Profiler.profile('view/components/login/assets/javascript/login.js',49,'$j(this.returnElementReference()).find(\'.password_field\').bind(\'keypress\',','function(event)',arguments);if(event.keyCode=='13')
{Login.doLogin($j(_this.returnElementReference()).find('.password_field').get(0));}});},doLogin:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',60,'doLogin:','function()',arguments);var strUrl='doLogin/';var strDomain=Shell.getWebsiteDomain();var strSecureDomain=Shell.getWebsiteSecureDomain();var strCurrentSessionId=Shell.getCurrentSession();var strFullUrl=strSecureDomain+this.strUrlPrefix+strUrl+"?IM4SESSID="+strCurrentSessionId+"&identityHost="+strDomain;var objIdentity=Shell.getIdentity();switch(objIdentity.id)
{case'uLearn':$j('#loginButtonsContainer').css({height:'30px'});break;case'ireland':$j('#loginButtonsContainer').css({height:'30px'});break;}
$j('#loginButtonsContainer').hide();$j('#loginProgressContainer').show();var objIframeElement=this.createIframe();var strIframeId=$j(objIframeElement).attr('id');var objLoginForm=$j('#login_form');objLoginForm.attr({'target':strIframeId,'action':strFullUrl,'method':'POST'});this.disable('0.5');objLoginForm.trigger('submit');},createIframe:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',127,'createIframe:','function()',arguments);var iframeId='loginIframe'+this.intId;var objIframe=$j('#'+iframeId);if(objIframe.length==0)
{var html='<iframe id="'+iframeId+'" name="'+iframeId+'" frameborder="0" scrolling="no" style="display: none; height:30px; width:99%; border:0px solid red; margin:0px; padding:0px; overflow:hidden; clear:both;"/>';$j(this.returnElementReference()).append(html);objIframe=$j('#'+iframeId);}
return objIframe.get(0);},doLogout:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',147,'doLogout:','function()',arguments);var strUrl='doLogout/';this.update(strUrl);},doCancelLogout:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',158,'doCancelLogout:','function()',arguments);this.objParentObject.close();},showLoginSuccess:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',163,'showLoginSuccess:','function()',arguments);var strHTML='<div class="login_confirmation">'+'<p class="success_title">Success!</p>'+'<p>You have successfully logged in. Please wait while we refresh the page...</p>'+'</div>';$j(this.returnElementReference()).html(strHTML);Shell.setUnloadMode(false);Shell.reloadPage();},redirectToSuccess:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',178,'redirectToSuccess:','function()',arguments);var strUrl='showLoggedInSuccess/';this.update(strUrl);},redirectToError:function()
{Profiler.profile('view/components/login/assets/javascript/login.js',189,'redirectToError:','function()',arguments);var strDomain=Shell.getWebsiteDomain();var strCurrentSessionId=Shell.getCurrentSession();var strUrl='showLoginError/';var strFullUrl=strUrl+"?IM4SESSID="+strCurrentSessionId+"&identityHost="+strDomain;this.update(strUrl);}});Login.showLogin=function(srcElement)
{Profiler.profile('view/components/login/assets/javascript/login.js',208,'Login.showLogin =','function(srcElement)',arguments);var login=ComponentBase.getComponentInstance(srcElement);login.showLogin();}
Login.focusLogin=function(intComponentId)
{Profiler.profile('view/components/login/assets/javascript/login.js',214,'Login.focusLogin =','function(intComponentId)',arguments);var login=ComponentBase.getComponentInstanceFromId("login",intComponentId);login.focusLogin();}
Login.monitorLogin=function(intComponentId)
{Profiler.profile('view/components/login/assets/javascript/login.js',220,'Login.monitorLogin =','function(intComponentId)',arguments);var login=ComponentBase.getComponentInstanceFromId("login",intComponentId);login.monitorLogin();}
Login.doLogin=function(srcElement)
{Profiler.profile('view/components/login/assets/javascript/login.js',227,'Login.doLogin =','function(srcElement)',arguments);var login=ComponentBase.getComponentInstance(srcElement);login.doLogin();}
Login.doLogout=function(srcElement)
{Profiler.profile('view/components/login/assets/javascript/login.js',234,'Login.doLogout =','function(srcElement)',arguments);var login=ComponentBase.getComponentInstance(srcElement);login.doLogout();}
Login.doCancelLogout=function(srcElement)
{Profiler.profile('view/components/login/assets/javascript/login.js',241,'Login.doCancelLogout =','function(srcElement)',arguments);var login=ComponentBase.getComponentInstance(srcElement);login.doCancelLogout();}
Login.showLoginSuccess=function(intComponentId)
{Profiler.profile('view/components/login/assets/javascript/login.js',248,'Login.showLoginSuccess =','function(intComponentId)',arguments);var login=ComponentBase.getComponentInstanceFromId("login",intComponentId);login.showLoginSuccess();}
Login.redirectToSuccess=function(intComponentId)
{Profiler.profile('view/components/login/assets/javascript/login.js',255,'Login.redirectToSuccess =','function(intComponentId)',arguments);var login=ComponentBase.getComponentInstanceFromId("login",intComponentId);login.redirectToSuccess();}
Login.redirectToError=function(intComponentId)
{Profiler.profile('view/components/login/assets/javascript/login.js',262,'Login.redirectToError =','function(intComponentId)',arguments);var login=ComponentBase.getComponentInstanceFromId("login",intComponentId);login.redirectToError();}
var Map=Class.extend(ComponentBase,{initialize:function(element,objParentObject,strComponentType,strComponentColumn)
{Profiler.profile('view/components/map/assets/javascript/map.js',20,'initialize:','function(element, objParentObject, strComponentType, strComponentColumn)',arguments);this.parent(element,objParentObject,strComponentType,strComponentColumn);$j(this.returnElementReference()).parents('.containerContent:first').css({height:'100%'});this.blnVisible=true;this.objCurrentPageResultGeometries={};this.arrHighlightedStamps=[];this.queryResultGeometries=[];this.objLastTemporaryStampInstance=null;this.blnPopupInExpandedMode=false;this.objEMController={};this.arrEzMapMapLayers=[];this.intMouseMoveCounter=0;this.objGeocodeData={};this.intGeocodeResourceId=null;this.setDropTargetMode(false);this.blnAllowAPICalls=false;this.arrExternalGeometryStampDetails=[];this.objCurrentMapDetails={};this.objMapChangeCallbackCallbacks={};this.createMap();this.objParentObject.disableContainerElementsForMap();this.objLinkToUlearnSearchResultGeometries={};this.objLinkToUlearnLayerData={};this.blnLayerListReady=false;this.arrLayerListPreReadyRefreshQueue=[];this.blnLayerListVisible=false;this.blnLayerListActivity=false;this.blnLayerListDocked=true;this.strLayerListDockPosition='right';this.intLayerListDefaultWidth=275;this.intLayerListDefaultHeight=200;this.intLayerListCurrentWidth_DockedVertical=null;this.intLayerListCurrentHeight_DockedVertical=null;this.intLayerListCurrentWidth_DockedHorizontal=null;this.intLayerListCurrentHeight_DockedHorizontal=null;this.objCurrentLayersInList={};this.objCurrentLayerGeometries={};this.objTileGeometryCacheDetails={};this.arrDefaultAnnotationLayerEnabled=[];this.intOverridingDefaultAnnotationLayerId=null;this.strSelectedLayerId=null;this.strSelectedLayerName='';this.blnOverrideMode=false;this.objLayerViewDetailsToggleStatus={};this.objRegisteredMapMoveCallbackMethods={};this.blnEditingAnnotationLayer=false;this.blnAlreadyPromptedScribbleLayerLightbox=false;this.blnOutputResourcesInTransparentBox=false;this.objResourceDetailsTransparentBox={'objParentElement':{},'intResourceId':null,'strResourceType':null,'intHoverWidth':225,'intHoverHeight':50,'intHoverAreaCharacterLimit':30,'intHoverAreaWithMoreResourcesCharacterLimit':25,'intResourceDetailsDefaultWidth':385,'intResourceDetailsDefaultHeight':200,'intResourceDetailsWidth':0,'intResourceDetailsHeight':0,'intResourceDetailsMarginLeft':0,'intResourceDetailsMarginBottom':0,'blnAlreadyExpandedResourceDetails':false,'blnWidthResizedForContent':false,'blnHeightResizedForContent':false,'blnOutsideEzmaps':false};var objBrowserDetails=this.objParentObject.objParentObject.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{this.objResourceDetailsTransparentBox.intHoverAreaCharacterLimit=25;this.objResourceDetailsTransparentBox.intHoverAreaWithMoreResourcesCharacterLimit=20;this.objResourceDetailsTransparentBox.intResourceDetailsMinWidth=425;this.objResourceDetailsTransparentBox.intResourceDetailsDefaultWidth=425;}
this.blnMouseOverStamp=false;this.objMapMenuCategories={};this.objMapMenuMaps={};this.objMapMenuCarouselMaps={};this.objCarousels={};this.intSwitchToMapAttempts=0;this.objResourcePickerSelectedTopic={};this.intResourcePickerFullScreenResourcesPerPage=25;if(typeof(objComponentUpdateCode[this.intId])=='undefined')
{objComponentUpdateCode[this.intId]=[];}
var _this=this;objComponentUpdateCode[this.intId].push(function()
{Profiler.profile('view/components/map/assets/javascript/map.js',218,'objComponentUpdateCode[this.intId].push(','function()',arguments);if(typeof(parent.mapReady)!='undefined')
{parent.mapReady(_this);}});this.refreshLayerListAfterComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',231,'this.refreshLayerListAfterComplete =','function()',arguments);_this.refreshLayerList();};},setBlnOutputResourcesInTransparentBox:function(blnOutputResourcesInTransparentBox)
{Profiler.profile('view/components/map/assets/javascript/map.js',237,'setBlnOutputResourcesInTransparentBox:','function(blnOutputResourcesInTransparentBox)',arguments);this.blnOutputResourcesInTransparentBox=blnOutputResourcesInTransparentBox;},handleUserCachedMapDetailsUpdate:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',242,'handleUserCachedMapDetailsUpdate:','function()',arguments);var _this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',246,'var objOnComplete =','function()',arguments);_this.handleUserCachedMapDetailsUpdateOnComplete();};this.notify('regenerateUsersCachedMapMenuDetails',{},objOnComplete);},handleUserCachedMapDetailsUpdateOnComplete:function(XMLHttpRequest)
{Profiler.profile('view/components/map/assets/javascript/map.js',254,'handleUserCachedMapDetailsUpdateOnComplete:','function(XMLHttpRequest)',arguments);var objResponse=$j.evalJSON(XMLHttpRequest.responseText);if(objResponse['cachedMapDetailsChanged']===true)
{this.showCachedMapDetailsChangedNotifcation();}},showCachedMapDetailsChangedNotifcation:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',265,'showCachedMapDetailsChangedNotifcation:','function()',arguments);var strText='A change has been made to your maps licence that requires the page to be refreshed.';var arrButtons=[{id:'refresh',strText:'Refresh',intWidth:120,objCallbackFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',278,'objCallbackFunction:','function()',arguments);Shell.showCustomLightboxButtonActivity();window.setTimeout(function(){Shell.reloadPage();},0);}}];var objSettings={strText:strText,intWidth:500,intHeight:100,arrButtons:arrButtons,blnIncludeCancelButton:false,blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);},createMap:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',300,'createMap:','function()',arguments);this.createEzMapContent(EzMapData.mapCacheUrl,EzMapData.mapLayerServerUrl,EzMapData.sessionId,EzMapData.strMapCacheSymlinkName,EzMapData.srid,EzMapData.refPoint,EzMapData.zoomLevel,EzMapData.mapLayers,EzMapData.geometryLayers,EzMapData.mapStacks,EzMapData.mapDetails,EzMapData.blnUserAuthenticated,EzMapData.strMapMode,EzMapData.objClientSideControlOverrides,EzMapData.objExtentsLimit,EzMapData.strBehaviourMode,EzMapData.blnAllowAPICalls,EzMapData.strAllowedAPIRootDomain,EzMapData.blnEnableTileSubdomains,EzMapData.strBandwidthMode);},mapChangeCallback:function(mapChanges)
{Profiler.profile('view/components/map/assets/javascript/map.js',308,'mapChangeCallback:','function(mapChanges)',arguments);if($j('#mapMenuCategoriesCarousel').length>0)
{this.mapMenuCarouselUpdateMapMenuButtons();}
var objLinkTouLearnDetails=Shell.getLinkToUlearnDetails();var objMapChangeDetails={changes:$j.toJSON(mapChanges)};if(objLinkTouLearnDetails)
{objMapChangeDetails.objLinkTouLearnDetails=$j.toJSON(objLinkTouLearnDetails);};if(mapChanges[0].layerNum==1)
{var intNewMapId=mapChanges[0].mapId;if(EzMapData.mapDetails[intNewMapId])
{var objMapState=this.getState(false);var zoomLevel=objMapState.ezMapState.zoomLevel;if(zoomLevel>EzMapData.mapDetails[intNewMapId].map_view_upper_threshold)
{this.objEMController.setZoomLevel(EzMapData.mapDetails[intNewMapId].map_view_upper_threshold);}
else if(zoomLevel<EzMapData.mapDetails[intNewMapId].map_view_lower_threshold)
{this.objEMController.setZoomLevel(EzMapData.mapDetails[intNewMapId].map_view_lower_threshold);}}}
this.notify('recordMapChange',objMapChangeDetails);if(Shell.getUserAthenticatedStatus()===true)
{this.saveMapStateInCookie();}
this.updateGeometriesLayer();if(typeof(this.objCurrentMapDetails)=='undefined')
{this.objCurrentMapDetails={};}
var _this=this;$j.each(mapChanges,function(mixKey,objMapDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',376,'$j.each(mapChanges,','function(mixKey, objMapDetails)',arguments);if(objMapDetails.layerNum==1)
{_this.objCurrentMapDetails.objMapA={intMapId:objMapDetails.mapId,strMapName:'[map name]'}}
if(objMapDetails.layerNum==2)
{_this.objCurrentMapDetails.objMapB={intMapId:objMapDetails.mapId,strMapName:'[map name]'}}});$j.each(this.objMapChangeCallbackCallbacks,function(strKey,objCallbackFunc)
{Profiler.profile('view/components/map/assets/javascript/map.js',399,'$j.each(this.objMapChangeCallbackCallbacks,','function(strKey, objCallbackFunc)',arguments);objCallbackFunc();});},getCurrentMapDetails:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',405,'getCurrentMapDetails:','function()',arguments);return this.objCurrentMapDetails;},registerMapChangeCallbackCallback:function(strKey,objCallbackFunc)
{Profiler.profile('view/components/map/assets/javascript/map.js',410,'registerMapChangeCallbackCallback:','function(strKey, objCallbackFunc)',arguments);if(typeof(this.arrMapChangeCallbackCallbacks)=='undefined')
{this.arrMapChangeCallbackCallbacks={};}
this.objMapChangeCallbackCallbacks[strKey]=objCallbackFunc;},unregisterMapChangeCallbackCallback:function(strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',419,'unregisterMapChangeCallbackCallback:','function(strKey)',arguments);if(typeof(this.arrMapChangeCallbackCallbacks)=='undefined')
{this.arrMapChangeCallbackCallbacks={};}
this.objMapChangeCallbackCallbacks[strKey]=null;delete(this.objMapChangeCallbackCallbacks[strKey]);},startNoCacheMode:function(objNoCacheOptions)
{Profiler.profile('view/components/map/assets/javascript/map.js',431,'startNoCacheMode:','function(objNoCacheOptions)',arguments);this.objEMController.startNoCacheMode(objNoCacheOptions);},endNoCacheMode:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',437,'endNoCacheMode:','function()',arguments);this.objEMController.endNoCacheMode();},expiredMapCallback:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',444,'expiredMapCallback:','function()',arguments);var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',448,'var objCallbackFunction =','function()',arguments);_this.expiredMapCallbackLightboxContent();};Shell.launchNewLightboxWindow(objCallbackFunction,500,100);},expiredMapCallbackLightboxContent:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',456,'expiredMapCallbackLightboxContent:','function()',arguments);var strUrl='showExpiredMapSelected';var objParams={};this.update(strUrl,objParams,null,'#lbContent');return Shell.generateStandardLightboxLoading();},closeExpiredLicenceLightbox:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',478,'closeExpiredLicenceLightbox:','function()',arguments);Shell.closeLightboxWindow();},mapMoveCallback:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',486,'mapMoveCallback:','function()',arguments);if(this.blnVisible===false)
{return false;}
if(Shell.getUserAthenticatedStatus()===true)
{this.saveMapStateInCookie();}
$j.each(this.objRegisteredMapMoveCallbackMethods,function(mixKey,objFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',501,'$j.each(this.objRegisteredMapMoveCallbackMethods,','function(mixKey, objFunction)',arguments);objFunction();});},registerMapMoveCallback:function(objCallbackMethod,strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',507,'registerMapMoveCallback:','function(objCallbackMethod, strKey)',arguments);this.objRegisteredMapMoveCallbackMethods[strKey]=objCallbackMethod;},unregisterMapMoveCallback:function(strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',512,'unregisterMapMoveCallback:','function(strKey)',arguments);delete this.objRegisteredMapMoveCallbackMethods[strKey];},createEzMapContent:function(mapCacheUrl,mapLayerServerUrl,sessionId,strMapCacheSymlinkName,srid,refPoint,zoomLevel,mapLayers,geometryLayers,mapStacks,mapDetails,blnUserAuthenticated,strMapMode,objClientSideControlOverrides,objExtentsLimit,strBehaviourMode,blnAllowAPICalls,strAllowedAPIRootDomain,blnEnableTileSubdomains,strBandwidthMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',519,'createEzMapContent:','function(mapCacheUrl, mapLayerServerUrl, sessionId, strMapCacheSymlinkName, srid, refPoint, zoomLevel, mapLayers, geometryLayers, mapStacks, mapDetails, blnUserAuthenticated, strMapMode, objClientSideControlOverrides, objExtentsLimit, strBehaviourMode, blnAllowAPICalls, strAllowedAPIRootDomain, blnEnableTileSubdomains, strBandwidthMode)',arguments);this.strMapMode=strMapMode;switch(strMapMode)
{case'normal':this.initialiseEzMapContentNormal(mapCacheUrl,mapLayerServerUrl,sessionId,strMapCacheSymlinkName,srid,refPoint,zoomLevel,mapLayers,geometryLayers,mapStacks,mapDetails,blnUserAuthenticated,objClientSideControlOverrides,objExtentsLimit,strBehaviourMode,blnAllowAPICalls,strAllowedAPIRootDomain,blnEnableTileSubdomains,strBandwidthMode);break;case'linkToUlearn':this.initialiseEzMapContentLinkToUlearnMaps(mapCacheUrl,mapLayerServerUrl,sessionId,strMapCacheSymlinkName,srid,refPoint,zoomLevel,mapLayers,geometryLayers,mapStacks,mapDetails,blnUserAuthenticated,objClientSideControlOverrides,objExtentsLimit,strBehaviourMode,blnAllowAPICalls,strAllowedAPIRootDomain,blnEnableTileSubdomains,strBandwidthMode);break;}},initialiseEzMapContentNormal:function(mapCacheUrl,mapLayerServerUrl,sessionId,strMapCacheSymlinkName,srid,refPoint,zoomLevel,mapLayers,geometryLayers,mapStacks,mapDetails,blnUserAuthenticated,objClientSideControlOverrides,objExtentsLimit,strBehaviourMode,blnAllowAPICalls,strAllowedAPIRootDomain,blnEnableTileSubdomains,strBandwidthMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',538,'initialiseEzMapContentNormal:','function(mapCacheUrl, mapLayerServerUrl, sessionId, strMapCacheSymlinkName, srid, refPoint, zoomLevel, mapLayers, geometryLayers, mapStacks, mapDetails, blnUserAuthenticated, objClientSideControlOverrides, objExtentsLimit, strBehaviourMode, blnAllowAPICalls, strAllowedAPIRootDomain, blnEnableTileSubdomains, strBandwidthMode)',arguments);var _this=this;var objCachedMapState=$j.cookies.get('ulearnMapState');if(!(typeof JSON==='object'&&JSON!==null&&typeof JSON.parse==='function'))
{objCachedMapState=$j.evalJSON(objCachedMapState);}
if(blnUserAuthenticated&&objCachedMapState!==null)
{srid=(typeof(objCachedMapState.srid)=='number')?objCachedMapState.srid:srid;refPoint.x=(typeof(objCachedMapState.centerPointX)=='number')?objCachedMapState.centerPointX:refPoint.x;refPoint.y=(typeof(objCachedMapState.centerPointY)=='number')?objCachedMapState.centerPointY:refPoint.y;refPoint.srid=(typeof(objCachedMapState.srid)=='number')?objCachedMapState.srid:srid;zoomLevel=(typeof(objCachedMapState.zoomLevel)=='number')?objCachedMapState.zoomLevel:zoomLevel;mapLayers=[objCachedMapState.mapLayerB,objCachedMapState.mapLayerA];}
var rp=new Point(refPoint.x,refPoint.y,srid);var defObj={srid:srid,centerPoint:rp,zoomLevel:zoomLevel,mapCacheUrl:mapCacheUrl,sessionId:sessionId,strMapCacheSymlinkName:strMapCacheSymlinkName,mapLayerServerUrl:mapLayerServerUrl,mapStacks:mapStacks,mapDetails:mapDetails,mapChangeCallback:function(mapChanges)
{Profiler.profile('view/components/map/assets/javascript/map.js',579,'mapChangeCallback:','function(mapChanges)',arguments);_this.mapChangeCallback(mapChanges);},expiredMapCallback:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',583,'expiredMapCallback:','function()',arguments);_this.expiredMapCallback();},mapMoveCallback:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',587,'mapMoveCallback:','function()',arguments);_this.mapMoveCallback();},module:'ulearn',blnEnableTileSubdomains:blnEnableTileSubdomains,strBandwidthMode:strBandwidthMode};$j('#initialisingMapContainer').hide();this.objEMController=new ezMapsController('ezMaps',defObj);var mapChanges=[];$j.each(mapLayers,function(intKey,strMapId)
{Profiler.profile('view/components/map/assets/javascript/map.js',607,'$j.each(mapLayers,','function(intKey, strMapId)',arguments);var objLayer=_this.objEMController.makeNewLayer(strMapId);_this.arrEzMapMapLayers.push(objLayer);mapChanges.push({layerNum:mapLayers.length-intKey,mapId:strMapId});});if(typeof(objComponentUpdateCode[this.intId])=='undefined')
{objComponentUpdateCode[this.intId]=[];}
objComponentUpdateCode[this.intId].push(function()
{Profiler.profile('view/components/map/assets/javascript/map.js',625,'objComponentUpdateCode[this.intId].push(','function()',arguments);_this.mapChangeCallback(mapChanges);});this.geometriesLayer=this.objEMController.makeNewLayerServerLayer();this.objQueryWidget=this.objEMController.addWidget('mapClick');this.objQueryWidget.registerCallback(function(arrGeometryIds,objGeocodeData,blnResourceModeStampQuery){_this.queryMap(arrGeometryIds,objGeocodeData,blnResourceModeStampQuery);});this.objDropWidget=this.objEMController.addWidget('droppableGeocode');this.objDropWidget.registerCallback(function(objGeocodeData){_this.dragDropGeocodeResource(objGeocodeData);});this.objDropWidget.registerNamedCallback('repositionSymbol',function(objGeocodeData){_this.repositionGeometryCallback(objGeocodeData);});this.objEMController.addWidget('mouse');this.objEMController.addWidget('keyboard');this.objEMController.addWidget('watermark');this.objEMController.addWidget('zoomSlider');this.objProgressBar=this.objEMController.addWidget('progressBarWidget');this.objEMController.addWidget('referenceMap');this.objResetButton=this.objEMController.addWidget('resetButton');this.objEMController.addWidget('padlock');this.objLayerManagerWidget=this.objEMController.addWidget('layerManager');this.objMapPopup=this.objEMController.addWidget('popUp');this.objStampDisplay=this.objEMController.addWidget('stampDisplay');this.objAnnotationStampDisplay=this.objEMController.addWidget('stampDisplay');this.objPlaceStampDisplay=this.objEMController.addWidget('stampDisplay');this.objTagStampDisplay=this.objEMController.addWidget('stampDisplay');this.objMapMenuMapAWidget=this.objEMController.addWidget('layerMenu');if(blnIsLicencedUser===false)
{var objSlider=$j(this.objMapMenuMapAWidget.returnDivReference('slider'));objSlider.slider('disable');objSlider.unbind('click').bind('click',function(){Shell.showLicenceRequiredPopup('Fade between two different maps','fade_maps');});}
objComponentUpdateCode[this.intId].push(function()
{Profiler.profile('view/components/map/assets/javascript/map.js',681,'objComponentUpdateCode[this.intId].push(','function()',arguments);if(!_this.objMapMenuMapAWidget.blnDontLoadMenus)
{_this.loadCarousel(_this.strUrlPrefix+'getMapMenuCarousel/',{},function(XMLHttpRequest){_this.initialiseMapMenuCarousel(XMLHttpRequest);});}});if(mapLayers.length>1)
{this.objEMController.addWidget('mapModeButtons');if(blnIsLicencedUser===false)
{$j('div#ezMaps div.widgetMapModeButtons div.layerButton').unbind('click').bind('click',function(){Shell.showLicenceRequiredPopup('View maps in layer mode','map_layer_mode');});$j('div#ezMaps div.widgetMapModeButtons div.mirroredButton').unbind('click').bind('click',function(){Shell.showLicenceRequiredPopup('View maps in mirrored mode','map_mirrored_mode');});$j('div#ezMaps div.widgetMapModeButtons div.stitchedButton').unbind('click').bind('click',function(){Shell.showLicenceRequiredPopup('View maps in stitched mode','map_stitched_mode');});}}
if(blnUserAuthenticated)
{this.objScribbleWidget=this.objEMController.addWidget('scribble');this.objScribbleWidget.createButtons();this.objScribbleWidget.registerCallback(function(objGeocodeData){_this.dropTargetGeocodeResource(objGeocodeData);});this.objScribbleWidget.registerCallback(function(objGeocodeData){_this.displayDistance(objGeocodeData);});if(blnIsLicencedUser===false)
{$j('div#ezMaps div.widgetScribble div.polygonButton').unbind('click').bind('click',function(){Shell.showLicenceRequiredPopup('Use polygons to represent resource locations','map_polygons');});$j('div#ezMaps div.widgetScribble div.polylineButton').unbind('click').bind('click',function(){Shell.showLicenceRequiredPopup('Use lines to represent resource locations','map_lines');});$j('div#ezMaps div.widgetScribble div.hotspotButton').unbind('click').bind('click',function(){Shell.showLicenceRequiredPopup('Use hotspots to represent resource locations','map_hotspots');});$j('div#ezMaps div.widgetScribble div.measureButton').unbind('click').bind('click',function(){Shell.showLicenceRequiredPopup('Measure the distance between several points on the map','map_measure_points');});}}
this.createLayerListButton();this.objUndoButtonWidget=this.objEMController.addWidget('undo');this.createLayerList();$j('#ezMaps div.eventLayer').bind('mouseout',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',732,'$j(\'#ezMaps div.eventLayer\').bind(\'mouseout\',','function()',arguments);if(_this.blnMouseOverStamp!==true)
{}});if(blnUserAuthenticated&&objCachedMapState!==null)
{this.objMapMenuMapAWidget.setSliderValue(objCachedMapState.intMapLayerSliderValue);objCachedMapState.blnLayerListVisible?this.showLayerList():this.hideLayerList();}},initialiseEzMapContentLinkToUlearnMaps:function(mapCacheUrl,mapLayerServerUrl,sessionId,strMapCacheSymlinkName,srid,refPoint,zoomLevel,mapLayers,geometryLayers,mapStacks,mapDetails,blnUserAuthenticated,objClientSideControlOverrides,objExtentsLimit,strBehaviourMode,blnAllowAPICalls,strAllowedAPIRootDomain,blnEnableTileSubdomains,strBandwidthMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',752,'initialiseEzMapContentLinkToUlearnMaps:','function(mapCacheUrl, mapLayerServerUrl, sessionId, strMapCacheSymlinkName, srid, refPoint, zoomLevel, mapLayers, geometryLayers, mapStacks, mapDetails, blnUserAuthenticated, objClientSideControlOverrides, objExtentsLimit, strBehaviourMode, blnAllowAPICalls, strAllowedAPIRootDomain, blnEnableTileSubdomains, strBandwidthMode)',arguments);var _this=this;var objAvailableMapControls={};objAvailableMapControls["blnShowMapPickers"]=(typeof(objClientSideControlOverrides["blnShowMapPickers"])!="undefined")?objClientSideControlOverrides["blnShowMapPickers"]:true;objAvailableMapControls["blnShowMapModeButtons"]=(typeof(objClientSideControlOverrides["blnShowLayerButtons"])!="undefined")?objClientSideControlOverrides["blnShowLayerButtons"]:true;objAvailableMapControls["blnShowUndoButtons"]=(typeof(objClientSideControlOverrides["blnShowUndoButtons"])!="undefined")?objClientSideControlOverrides["blnShowUndoButtons"]:true;objAvailableMapControls["blnShowResetButton"]=(typeof(objClientSideControlOverrides["blnShowResetButton"])!="undefined")?objClientSideControlOverrides["blnShowResetButton"]:true;objAvailableMapControls["blnShowZoomButton"]=(typeof(objClientSideControlOverrides["blnShowZoomButton"])!="undefined")?objClientSideControlOverrides["blnShowZoomButton"]:true;objAvailableMapControls["blnAllowManualMapPanning"]=(typeof(objClientSideControlOverrides["blnAllowManualMapPanning"])!="undefined")?objClientSideControlOverrides["blnAllowManualMapPanning"]:true;objAvailableMapControls["blnShowOnlyMapSlider"]=(typeof(objClientSideControlOverrides["blnShowOnlyMapSlider"])!="undefined")?objClientSideControlOverrides["blnShowOnlyMapSlider"]:true;var rp=new Point(refPoint.x,refPoint.y,srid);var defObj={srid:srid,centerPoint:rp,zoomLevel:zoomLevel,mapCacheUrl:mapCacheUrl,sessionId:sessionId,strMapCacheSymlinkName:strMapCacheSymlinkName,mapLayerServerUrl:mapLayerServerUrl,mapStacks:mapStacks,mapDetails:mapDetails,mapChangeCallback:function(mapChanges)
{Profiler.profile('view/components/map/assets/javascript/map.js',780,'mapChangeCallback:','function(mapChanges)',arguments);_this.mapChangeCallback(mapChanges);},expiredMapCallback:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',784,'expiredMapCallback:','function()',arguments);_this.expiredMapCallback();},module:'ulearn',strBehaviourMode:strBehaviourMode,objExtentsLimit:objExtentsLimit,blnEnableTileSubdomains:blnEnableTileSubdomains,strBandwidthMode:strBandwidthMode};$j('#initialisingMapContainer').hide();this.objEMController=new ezMapsController('ezMaps',defObj);var mapChanges=[];$j.each(mapLayers,function(intKey,strMapId)
{Profiler.profile('view/components/map/assets/javascript/map.js',806,'$j.each(mapLayers,','function(intKey, strMapId)',arguments);var objLayer=_this.objEMController.makeNewLayer(strMapId);_this.arrEzMapMapLayers.push(objLayer);mapChanges.push({layerNum:mapLayers.length-intKey,mapId:strMapId});});if(typeof(objComponentUpdateCode[this.intId])=='undefined')
{objComponentUpdateCode[this.intId]=[];}
objComponentUpdateCode[this.intId].push(function()
{Profiler.profile('view/components/map/assets/javascript/map.js',824,'objComponentUpdateCode[this.intId].push(','function()',arguments);_this.mapChangeCallback(mapChanges);});this.geometriesLayer=this.objEMController.makeNewLayerServerLayer();var objQueryWidget=this.objEMController.addWidget('mapClick');objQueryWidget.registerCallback(function(arrGeometryIds,objGeocodeData,blnResourceModeStampQuery){_this.queryMap(arrGeometryIds,objGeocodeData,blnResourceModeStampQuery);});this.objDropWidget=this.objEMController.addWidget('droppableGeocode');this.objDropWidget.registerCallback(function(objGeocodeData){_this.dragDropGeocodeResource(objGeocodeData);});if(objAvailableMapControls['blnAllowManualMapPanning'])
{this.objEMController.addWidget('mouse');this.objEMController.addWidget('keyboard');}
if(objAvailableMapControls['blnShowZoomButton'])
{this.objEMController.addWidget('zoomSlider');}
this.objProgressBar=this.objEMController.addWidget('progressBarWidget');if(objAvailableMapControls['blnShowResetButton'])
{this.objEMController.addWidget('resetButton');}
this.objMapPopup=this.objEMController.addWidget('popUp');this.objStampDisplay=this.objEMController.addWidget('stampDisplay');this.objExternalStampDisplay=this.objEMController.addWidget('stampDisplay');if(objAvailableMapControls['blnShowMapPickers'])
{this.objMapMenuMapAWidget=this.objEMController.addWidget('layerMenu');if(objAvailableMapControls['blnShowOnlyMapSlider'])
{this.objMapMenuMapAWidget.hidePickers();}
this.objMapMenuMapAWidget.loadMapMenu(this.strUrlPrefix+'getMapMenu/');if(mapLayers.length>1)
{if(objAvailableMapControls['blnShowMapModeButtons'])
{this.objEMController.addWidget('mapModeButtons');}}}
if(objAvailableMapControls['blnShowUndoButtons'])
{this.objEMController.addWidget('undo');}
this.createLayerList();if(blnAllowAPICalls)
{this.blnAllowAPICalls=true;this.strOldDocumentDomainValue=document.domain;try
{if(strAllowedAPIRootDomain.indexOf(':')==-1)
{document.domain=strAllowedAPIRootDomain;}
else
{var arrRootDomainParts=strAllowedAPIRootDomain.split(':');strAllowedAPIRootDomain=arrRootDomainParts[0];document.domain=strAllowedAPIRootDomain;}}
catch(err)
{Shell.lightboxAlert('This link was defined to work with the API but an error has been encountered.\n\nThe root domain value of "'+strAllowedAPIRootDomain+'" is not valid for the current map root domain!\n\nAPI calls will not be available.',500,100);}}},createEzmapsLayerTransparencySlider:function(arrLayerObjects,objParentElement,objStyleObject)
{Profiler.profile('view/components/map/assets/javascript/map.js',947,'createEzmapsLayerTransparencySlider:','function(arrLayerObjects, objParentElement, objStyleObject)',arguments);var _this=this;var objStyleObject=(typeof(objStyleObject)!='undefined')?objStyleObject:{};var objSlideFunc=function(arrLayerObjects,fltOpacity)
{Profiler.profile('view/components/map/assets/javascript/map.js',953,'var objSlideFunc =','function(arrLayerObjects, fltOpacity)',arguments);$j.each(arrLayerObjects,function(intKey,objLayer)
{Profiler.profile('view/components/map/assets/javascript/map.js',955,'$j.each(arrLayerObjects,','function(intKey, objLayer)',arguments);var objLayerWrapper=$j(objLayer.layerDiv).parent();objLayerWrapper.css({opacity:fltOpacity});_this.updateAnnotationSymbolTransparency(fltOpacity);});};var objSlider=document.createElement('div');objSlider.setAttribute('id','ezmapsLayerTransparencySlider');$j(objParentElement).append(objSlider);if(Shell.getIsLicencedUser()===false)
{$j(objSlider).bind('click',function(){Shell.showLicenceRequiredPopup('Fade between two different maps','fade_maps');});}
else
{$j(objSlider).slider({animate:true,max:100,min:0,orientation:'horizontal',step:1,value:100,slide:function(event,ui)
{Profiler.profile('view/components/map/assets/javascript/map.js',989,'slide:','function(event, ui)',arguments);objSlideFunc(arrLayerObjects,ui.value/100);},change:function(event,ui)
{Profiler.profile('view/components/map/assets/javascript/map.js',993,'change:','function(event, ui)',arguments);objSlideFunc(arrLayerObjects,ui.value/100);}});}},createMapExplorerButton:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1003,'createMapExplorerButton:','function()',arguments);if(Shell.getUserAthenticatedStatus())
{var strText="Map Explorer";var strAlignment='right';var strOnClick="Shell.openComponent('mapPicker');return false;";this.objParentObject.createHandleButton(strText,strAlignment,strOnClick);}},createLayerListButton:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1024,'createLayerListButton:','function()',arguments);var strLayerListButtonHtml='<div id="layer_list_button" class="foo layer_list_button" title="Display Layer Legend"></div>';this.objEMController.createHorizontalToolbarElement(strLayerListButtonHtml);$j('#layer_list_button').bind('click',{_this:this},function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',1029,'$j(\'#layer_list_button\').bind(\'click\', {_this: this},','function(event)',arguments);event.data._this.toggleLayerList();});},createLayerList:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1038,'createLayerList:','function()',arguments);var strLayerListHtml='<div id="layer_list_container"></div>';this.objEMController.createHorizontalToolbarElement(strLayerListHtml);var strUrl='createLayerList/';var objParams={};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1055,'var objOnComplete =','function()',arguments);_this.createLayerListOnComplete();};this.update(strUrl,objParams,objOnComplete,'#layer_list_container');},createLayerListOnComplete:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1063,'createLayerListOnComplete:','function()',arguments);var _this=this;var objLayerListButton=$j('#layer_list_button');if(objLayerListButton.length>0)
{$j('#layer_list_button').show();}
if(this.strMapMode=='normal')
{Shell.registerResizeFunction(function(){_this.renderLayerList();});this.renderLayerList();}
$j('#layer_list_panel_content').html('<p style="font-size:70%;font-style:italic;">Populating initial layer list...</p>');var arrLayerObjects=[this.geometriesLayer];this.createEzmapsLayerTransparencySlider(arrLayerObjects,$j('#layers_transparency_slider_container').get(0));this.blnLayerListReady=true;if(this.arrLayerListPreReadyRefreshQueue.length>0)
{var objLayerList=this.arrLayerListPreReadyRefreshQueue[0]['objLayerList'];var blnMerge=this.arrLayerListPreReadyRefreshQueue[0]['blnMerge'];this.arrLayerListPreReadyRefreshQueue=[];this.refreshLayerList(objLayerList,blnMerge);}
else
{this.refreshLayerList();}},toggleLayerList:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1114,'toggleLayerList:','function()',arguments);var objLayerListButton=$j('#layer_list_button');if(this.blnLayerListVisible)
{this.hideLayerList();objLayerListButton.removeClass('layer_list_button_selected');objLayerListButton.addClass('layer_list_button');}
else
{this.showLayerList();objLayerListButton.removeClass('layer_list_button');objLayerListButton.addClass('layer_list_button_selected');}},showLayerList:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1140,'showLayerList:','function()',arguments);this.blnLayerListVisible=true;$j('#layer_list_panel').show();},hideLayerList:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1148,'hideLayerList:','function()',arguments);this.blnLayerListVisible=false;$j('#layer_list_panel').hide();},getLayerListVisibleStatus:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1156,'getLayerListVisibleStatus:','function()',arguments);return this.blnLayerListVisible;},dockLayerList:function(strDockPosition)
{Profiler.profile('view/components/map/assets/javascript/map.js',1163,'dockLayerList:','function(strDockPosition)',arguments);this.blnLayerListDocked=true;this.strLayerListDockPosition=strDockPosition;this.renderLayerList();},unDockLayerList:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1172,'unDockLayerList:','function()',arguments);this.blnLayerListDocked=false;this.renderLayerList();},getobjEMController:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1178,'getobjEMController:','function()',arguments);return this.objEMController;},getobjDropWidget:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1183,'getobjDropWidget:','function()',arguments);return this.objDropWidget;},getobjAnnotationStampDisplay:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1188,'getobjAnnotationStampDisplay:','function()',arguments);return this.objAnnotationStampDisplay;},getobjPlaceStampDisplay:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1193,'getobjPlaceStampDisplay:','function()',arguments);return this.objPlaceStampDisplay;},getobjTagStampDisplay:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1198,'getobjTagStampDisplay:','function()',arguments);return this.objTagStampDisplay;},renderLayerList:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1205,'renderLayerList:','function()',arguments);if(this.blnLayerListDocked)
{switch(this.strLayerListDockPosition)
{case'top':var intXOffset=30;var intYOffset=30;var intWidth=(Shell.getColumnRightAbsoluteWidth()-intXOffset)-10;var intHeight=(this.intLayerListCurrentHeight_DockedVertical!=null)?this.intLayerListCurrentHeight_DockedVertical:this.intLayerListDefaultHeight;this.enableResizeBar('top');this.intLayerListCurrentWidth_DockedVertical=intWidth;break;case'bottom':var intXOffset=30;var intYOffset=0;var intWidth=(Shell.getColumnRightAbsoluteWidth()-intXOffset)-10;var intHeight=(this.intLayerListCurrentHeight_DockedVertical!=null)?this.intLayerListCurrentHeight_DockedVertical:this.intLayerListDefaultHeight;var intNewYOffset=(Shell.getContentAbsoluteHeight()-intHeight);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{intNewYOffset-=10;}
intYOffset=intNewYOffset;this.enableResizeBar('top');this.intLayerListCurrentWidth_DockedVertical=intWidth;break;case'left':var intXOffset=30;var intYOffset=30;var intWidth=(this.intLayerListCurrentWidth_DockedHorizontal!=null)?this.intLayerListCurrentWidth_DockedHorizontal:this.intLayerListDefaultWidth;var intHeight=(Shell.getContentAbsoluteHeight()-intYOffset);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{intHeight-=10;}
this.enableResizeBar('right');this.intLayerListCurrentWidth_DockedHorizontal=intWidth;break;case'right':var intXOffset=0;var intYOffset=30;var intWidth=(this.intLayerListCurrentWidth_DockedHorizontal!=null)?this.intLayerListCurrentWidth_DockedHorizontal:this.intLayerListDefaultWidth;var intHeight=(Shell.getContentAbsoluteHeight()-intYOffset);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{intHeight-=10;}
this.enableResizeBar('left');this.intLayerListCurrentWidth_DockedHorizontal=intWidth;break;}
$j('#layer_list_panel').css({left:'',right:'',position:'absolute',width:intWidth+'px',height:intHeight+'px',top:intYOffset+'px'});switch(this.strLayerListDockPosition)
{case'top':case'bottom':case'left':$j('#layer_list_panel').css({left:intXOffset+'px'});break;case'right':$j('#layer_list_panel').css({right:intXOffset+'px'});break;}
var intContentHeight=intHeight-110;$j('#layer_list_panel_content').css({height:intContentHeight+'px'});this.resizeLayerListContent();}
else
{}},enableResizeBar:function(strBarToEnable)
{Profiler.profile('view/components/map/assets/javascript/map.js',1376,'enableResizeBar:','function(strBarToEnable)',arguments);var arrResizeBars=['top','bottom','left','right'];$j.each(arrResizeBars,function(intKey,strBar)
{Profiler.profile('view/components/map/assets/javascript/map.js',1380,'$j.each(arrResizeBars,','function(intKey, strBar)',arguments);if(strBarToEnable==strBar)
{$j('#layer_list_resize_bar_'+strBar).show();}
else
{$j('#layer_list_resize_bar_'+strBar).hide();}});},resizeLayerList:function(strResizeBar)
{Profiler.profile('view/components/map/assets/javascript/map.js',1395,'resizeLayerList:','function(strResizeBar)',arguments);var _this=this;switch(strResizeBar)
{case'left':this.objResizeLayerListMouseMoveFunction=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',1407,'this.objResizeLayerListMouseMoveFunction =','function(event)',arguments);var objLayerListPanel=$j('#layer_list_panel');var intLayerListWidth=objLayerListPanel.width();var intCurrentLayerListXPos=objLayerListPanel.offset().left;var intCurrentMouseXPos=event.pageX;var intExtra=10;var intNewWidth=((intCurrentLayerListXPos+intLayerListWidth)-intCurrentMouseXPos)+intExtra;objLayerListPanel.css({width:intNewWidth+'px'});_this.intLayerListCurrentWidth_DockedHorizontal=intNewWidth;_this.resizeLayerListContent();};break;case'right':this.objResizeLayerListMouseMoveFunction=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',1444,'this.objResizeLayerListMouseMoveFunction =','function(event)',arguments);var objLayerListPanel=$j('#layer_list_panel');var intCurrentLayerListXPos=objLayerListPanel.offset().left;var intCurrentMouseXPos=event.pageX;var intExtra=10;var intNewWidth=(intCurrentMouseXPos-intCurrentLayerListXPos)+intExtra;objLayerListPanel.css({width:intNewWidth+'px'});_this.intLayerListCurrentWidth_DockedHorizontal=intNewWidth;_this.resizeLayerListContent();};break;case'bottom':this.objResizeLayerListMouseMoveFunction=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',1479,'this.objResizeLayerListMouseMoveFunction =','function(event)',arguments);var objLayerListPanel=$j('#layer_list_panel');var intCurrentLayerListYPos=objLayerListPanel.offset().top;var intCurrentMouseYPos=event.pageY;var intExtra=10;var intNewHeight=(intCurrentMouseYPos-intCurrentLayerListYPos)+intExtra;objLayerListPanel.css({height:intNewHeight+'px'});var intContentHeight=intNewHeight-110;$j('#layer_list_panel_content').css({height:intContentHeight+'px'});_this.intLayerListCurrentHeight_DockedVertical=intNewHeight;};break;case'top':this.objResizeLayerListMouseMoveFunction=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',1516,'this.objResizeLayerListMouseMoveFunction =','function(event)',arguments);var objLayerListPanel=$j('#layer_list_panel');var intCurrentLayerListContainerYPos=$j('#layer_list_container').offset().top;var intCurrentMouseYPos=event.pageY;var intExtra=0;var intNewTop=intCurrentMouseYPos-intCurrentLayerListContainerYPos;var intNewHeight=(Shell.getContentAbsoluteHeight()-intNewTop)+intExtra;var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{intNewHeight-=10;}
objLayerListPanel.css({top:intNewTop+'px',height:intNewHeight+'px'});var intContentHeight=intNewHeight-110;$j('#layer_list_panel_content').css({height:intContentHeight+'px'});_this.intLayerListCurrentHeight_DockedVertical=intNewHeight;};break;}
this.objResizeLayerListMouseReleaseFunction=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',1558,'this.objResizeLayerListMouseReleaseFunction =','function(event)',arguments);$j(document).unbind('mousemove',_this.objResizeLayerListMouseMoveFunction);$j(document).unbind('mouseup',_this.objResizeLayerListMouseReleaseFunction);};$j(document).bind('mousemove',this.objResizeLayerListMouseMoveFunction);$j(document).bind('mouseup',this.objResizeLayerListMouseReleaseFunction);},showLayerListMenu:function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',1573,'showLayerListMenu:','function(event)',arguments);event=$j.event.fix(event||window.event);if(typeof(event)!='undefined')
{event.stopPropagation();}
var _this=this;var menu=new UMenu(200);var layersSubmenu=new UMenu(200);var visibilitySubmenu=new UMenu(200);visibilitySubmenu.addItem('Show all',function(){_this.showAllLayers('all');});visibilitySubmenu.addItem('Hide all',function(){_this.hideAllLayers('all');});visibilitySubmenu.addItem('Invert',function(){_this.showAllLayers('invert');});layersSubmenu.addSubmenu('Visibility',visibilitySubmenu);var expandSubmenu=new UMenu(200);expandSubmenu.addItem('All',function(){_this.expandAllLayers('all');});expandSubmenu.addItem('Visible',function(){_this.expandAllLayers('visible');});expandSubmenu.addItem('Hidden',function(){_this.expandAllLayers('hidden');});expandSubmenu.addItem('Invert',function(){_this.expandAllLayers('invert');});layersSubmenu.addSubmenu('Expand',expandSubmenu);var collapseSubmenu=new UMenu(200);collapseSubmenu.addItem('All',function(){_this.collapseAllLayers('all');});collapseSubmenu.addItem('Visible',function(){_this.collapseAllLayers('visible');});collapseSubmenu.addItem('Hidden',function(){_this.collapseAllLayers('hidden');});collapseSubmenu.addItem('Invert',function(){_this.collapseAllLayers('invert');});layersSubmenu.addSubmenu('Collapse',collapseSubmenu);var removeSubmenu=new UMenu(200);removeSubmenu.addItem('All',function(){_this.removeAllLayers('all');});removeSubmenu.addItem('Visible',function(){_this.removeAllLayers('visible');});removeSubmenu.addItem('Hidden',function(){_this.removeAllLayers('hidden');});layersSubmenu.addSubmenu('Remove',removeSubmenu);menu.addSubmenu('Layers',layersSubmenu);var dockSubmenu=new UMenu(200);if(this.strLayerListDockPosition!='right')
{dockSubmenu.addItem('Right',function(){_this.dockLayerList('right');});}
if(this.strLayerListDockPosition!='left')
{dockSubmenu.addItem('Left',function(){_this.dockLayerList('left');});}
if(this.strLayerListDockPosition!='top')
{dockSubmenu.addItem('Top',function(){_this.dockLayerList('top');});}
if(this.strLayerListDockPosition!='bottom')
{dockSubmenu.addItem('Bottom',function(){_this.dockLayerList('bottom');});}
menu.addSubmenu('Dock',dockSubmenu);menu.addItem('Hide',function(){_this.hideLayerList();});menu.show(event,40);},showLayerListTooltip:function(strTooltip)
{Profiler.profile('view/components/map/assets/javascript/map.js',1661,'showLayerListTooltip:','function(strTooltip)',arguments);if(this.blnLayerListActivity)
{return false;}
objLayerListTooltip=$j('#layer_list_status_bar_tooltips');objLayerListTooltip.html(strTooltip);objLayerListTooltip.show();},hideLayerListTooltip:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1681,'hideLayerListTooltip:','function()',arguments);if(this.blnLayerListActivity)
{return false;}
objLayerListTooltip=$j('#layer_list_status_bar_tooltips');objLayerListTooltip.html('');objLayerListTooltip.hide();},toggleLayerListActivity:function(blnActivity)
{Profiler.profile('view/components/map/assets/javascript/map.js',1701,'toggleLayerListActivity:','function(blnActivity)',arguments);this.blnLayerListActivity=blnActivity;try
{if(this.blnLayerListActivity)
{$j('#layer_list_status_bar_tooltips').hide();$j('#layer_list_status_bar_menu').hide();$j('#layer_list_status_bar_activity').show();}
else
{$j('#layer_list_status_bar_activity').hide();$j('#layer_list_status_bar_tooltips').hide();$j('#layer_list_status_bar_menu').show();}}
catch(err)
{}},refreshLayerList:function(objOverrideLayers,blnMerge,objMultiActionLayers,objCallbackFunction,blnUseExistingOverrideLayers,blnPlaylistMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',1734,'refreshLayerList:','function(objOverrideLayers, blnMerge, objMultiActionLayers, objCallbackFunction, blnUseExistingOverrideLayers, blnPlaylistMode)',arguments);this.clearGeometriesLayer();this.deleteAllAnnotationLayerGeometries();this.objCurrentLayersInList={};this.strSelectedLayerId=null;var objOverrideLayers=(typeof(objOverrideLayers)!='undefined')?objOverrideLayers:{};var blnMerge=(typeof(blnMerge)!='undefined')?blnMerge:false;var objMultiActionLayers=(typeof(objMultiActionLayers)!='undefined')?objMultiActionLayers:{};var blnUseExistingOverrideLayers=(typeof(blnUseExistingOverrideLayers)!='undefined')?blnUseExistingOverrideLayers:false;var blnPlaylistMode=(typeof(blnPlaylistMode)!='undefined')?blnPlaylistMode:false;var blnOverrideLayersExist=false;$j.each(objOverrideLayers,function(mixKey,mixValue)
{Profiler.profile('view/components/map/assets/javascript/map.js',1755,'$j.each(objOverrideLayers,','function(mixKey, mixValue)',arguments);blnOverrideLayersExist=true;return false;});if(blnOverrideLayersExist===true||blnUseExistingOverrideLayers)
{this.setOverrideMode(true);}
else
{this.setOverrideMode(false);}
var strUrl='getLayerList/';var objParams={objOverrideLayers:$j.toJSON(objOverrideLayers),blnMerge:blnMerge,objMultiActionLayers:$j.toJSON(objMultiActionLayers),blnUseExistingOverrideLayers:blnUseExistingOverrideLayers,blnPlaylistMode:blnPlaylistMode};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1786,'var objOnComplete =','function()',arguments);_this.refreshLayerListOnComplete(objCallbackFunction);};var objTarget=$j('#layer_list_panel_content');if(objTarget.length>0)
{this.update(strUrl,objParams,objOnComplete,'#layer_list_panel_content');}},refreshLayerListOnComplete:function(objCallbackFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',1799,'refreshLayerListOnComplete:','function(objCallbackFunction)',arguments);this.executeUpdateInitCode();this.toggleLayerListActivity(false);this.updateGeometriesLayer();if(typeof(objCallbackFunction)!='undefined')
{objCallbackFunction();}},registerLayerInList:function(strLayerId,strLayerName,strLayerType,strIsSelected,strIsVisible,strIsScribble,arrEnabledViews,arrAnnotationObjects,strIsScribbleCopy,intThemeId,strForceToBottom)
{Profiler.profile('view/components/map/assets/javascript/map.js',1819,'registerLayerInList:','function(strLayerId, strLayerName, strLayerType, strIsSelected, strIsVisible, strIsScribble, arrEnabledViews, arrAnnotationObjects, strIsScribbleCopy, intThemeId, strForceToBottom)',arguments);this.objCurrentLayersInList[strLayerId]={};this.objCurrentLayersInList[strLayerId]['strLayerId']=strLayerId;this.objCurrentLayersInList[strLayerId]['strLayerName']=strLayerName;this.objCurrentLayersInList[strLayerId]['strLayerType']=strLayerType;this.objCurrentLayersInList[strLayerId]['blnSelected']=(strIsSelected=='true')?true:false;this.objCurrentLayersInList[strLayerId]['blnVisible']=(strIsVisible=='true')?true:false;this.objCurrentLayersInList[strLayerId]['blnScribble']=(strIsScribble=='true')?true:false;this.objCurrentLayersInList[strLayerId]['blnScribbleCopy']=(strIsScribbleCopy=='true')?true:false;this.objCurrentLayersInList[strLayerId]['intThemeId']=intThemeId;this.objCurrentLayersInList[strLayerId]['blnForceToBottom']=(strForceToBottom=='true')?true:false;this.objCurrentLayersInList[strLayerId]['arrAnnotationObjects']=(typeof(arrAnnotationObjects)!='undefined'&&arrAnnotationObjects!=null)?arrAnnotationObjects:'[]';this.objCurrentLayersInList[strLayerId]['arrEnabledViews']=arrEnabledViews;if(this.objCurrentLayersInList[strLayerId]['blnScribble'])
{this.arrDefaultAnnotationLayerEnabled[strLayerId]=true;}
this.renderLayerListContent(strLayerId);},resizeLayerListContent:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',1863,'resizeLayerListContent:','function()',arguments);switch(this.strLayerListDockPosition)
{case'top':case'bottom':var intLayersTableWidth=this.intLayerListCurrentWidth_DockedVertical-25;break;case'left':case'right':var intLayersTableWidth=this.intLayerListCurrentWidth_DockedHorizontal-25;break;}
if(intLayersTableWidth<0)
{intLayersTableWidth=0;}
var objLayersTable=$j('#layers_table');if(objLayersTable.length>0)
{objLayersTable.css({width:intLayersTableWidth+'px'});}},renderLayerListContent:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',1897,'renderLayerListContent:','function(strLayerId)',arguments);this.resizeLayerListContent();var blnLayerVisible=this.objCurrentLayersInList[strLayerId]['blnVisible'];switch(blnLayerVisible)
{case true:this.addSpecifiedLayerToGeometriesLayer(strLayerId);this.setLayerListRowOpacity(strLayerId,'1.0');break;case false:this.clearSpecifiedLayerFromGeometriesLayer(strLayerId);this.setLayerListRowOpacity(strLayerId,'0.2');break;}
var blnLayerViewDetailsVisible=(typeof(this.objLayerViewDetailsToggleStatus[strLayerId])!='undefined')?this.objLayerViewDetailsToggleStatus[strLayerId]:false;switch(blnLayerViewDetailsVisible)
{case true:this.showLayerViewDetails(strLayerId);break;case false:this.hideLayerViewDetails(strLayerId);break;}},addLayerToList:function(strLayerId,strLayerMode,intThematicRulesetNodeId,blnExclusiveLayer,arrAdditionalLayerViews)
{Profiler.profile('view/components/map/assets/javascript/map.js',1953,'addLayerToList:','function(strLayerId, strLayerMode, intThematicRulesetNodeId, blnExclusiveLayer, arrAdditionalLayerViews)',arguments);var _this=this;this.toggleLayerListActivity(true);var strLayerMode=(typeof(strLayerMode)!='undefined')?strLayerMode:'normal';var intThematicRulesetNodeId=(typeof(intThematicRulesetNodeId)!='undefined')?intThematicRulesetNodeId:'';var blnExclusiveLayer=(typeof(blnExclusiveLayer)!='undefined')?blnExclusiveLayer:false;var arrAdditionalLayerViews=(typeof(arrAdditionalLayerViews)!='undefined')?arrAdditionalLayerViews:[];var arrEnabledLayerViews=[];if(strLayerMode!=null)
{var objPrimaryViewDetails={intLayerId:strLayerId,strLayerMode:strLayerMode,intThematicRulesetNodeId:intThematicRulesetNodeId};arrEnabledLayerViews.push(objPrimaryViewDetails);}
$j.each(arrAdditionalLayerViews,function(mixKey,objAdditionalViewDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',1986,'$j.each(arrAdditionalLayerViews,','function(mixKey, objAdditionalViewDetails)',arguments);arrEnabledLayerViews.push(objAdditionalViewDetails);});var objParams={arrEnabledLayerViews:$j.toJSON(arrEnabledLayerViews)};var strUrlSuffix='addLayerToList/'+strLayerId+'/'+((blnExclusiveLayer)?'true':'false');this.notify(strUrlSuffix,objParams,function(){_this.refreshLayerListAfterComplete();});return true;},addLayersToList:function(arrLayerDetails,blnClearExisting)
{Profiler.profile('view/components/map/assets/javascript/map.js',2012,'addLayersToList:','function(arrLayerDetails, blnClearExisting)',arguments);var blnClearExisting=(typeof(blnClearExisting)!='undefined')?blnClearExisting:false;var strUrlSuffix='addLayersToList/';var objParams={blnClearExisting:blnClearExisting,arrLayerDetails:$j.toJSON(arrLayerDetails)};this.notify(strUrlSuffix,objParams,this.refreshLayerListAfterComplete);return true;},addDynamicLayerToList:function(arrGeometries,objRadiusThemeDef)
{Profiler.profile('view/components/map/assets/javascript/map.js',2037,'addDynamicLayerToList:','function(arrGeometries, objRadiusThemeDef)',arguments);this.toggleLayerListActivity(true);var strUrlSuffix='addDynamicLayerToList/';var objParams={arrGeometries:$j.toJSON(arrGeometries),objRadiusThemeDef:$j.toJSON(objRadiusThemeDef)};this.notify(strUrlSuffix,objParams,this.refreshLayerListAfterComplete);return true;},enableDefaultAnnotationLayer:function(blnAlwaysUseDefault)
{Profiler.profile('view/components/map/assets/javascript/map.js',2064,'enableDefaultAnnotationLayer:','function(blnAlwaysUseDefault)',arguments);var blnAlwaysUseDefault=(typeof(blnAlwaysUseDefault)!='undefined')?blnAlwaysUseDefault:false;var _this=this;var intOverridingDefaultAnnotationLayerId=null;if(!blnAlwaysUseDefault&&this.intOverridingDefaultAnnotationLayerId!=null)
{intOverridingDefaultAnnotationLayerId=this.intOverridingDefaultAnnotationLayerId;}
if(intOverridingDefaultAnnotationLayerId==null)
{this.toggleLayerListActivity(true);var strUrlSuffix='addDefaultAnnotationLayerToList/';var objParams={intOverridingDefaultAnnotationLayerId:null,blnOverrideMode:this.blnOverrideMode};var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',2092,'var objOnComplete =','function()',arguments);_this.refreshLayerList({},false,{},function(){},_this.blnOverrideMode);};this.notify(strUrlSuffix,objParams,objOnComplete);return true;}
else if(typeof(this.arrDefaultAnnotationLayerEnabled[intOverridingDefaultAnnotationLayerId])=='undefined'||this.arrDefaultAnnotationLayerEnabled[intOverridingDefaultAnnotationLayerId]==null||this.arrDefaultAnnotationLayerEnabled[intOverridingDefaultAnnotationLayerId]===false)
{this.toggleLayerListActivity(true);this.arrDefaultAnnotationLayerEnabled[intOverridingDefaultAnnotationLayerId]=true;var strUrlSuffix='addDefaultAnnotationLayerToList/';var objParams={intOverridingDefaultAnnotationLayerId:intOverridingDefaultAnnotationLayerId};var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',2122,'var objOnComplete =','function()',arguments);_this.refreshLayerList({},false,{},function(){},_this.blnOverrideMode);};this.notify(strUrlSuffix,objParams,objOnComplete);return true;}
else
{var objAnnotationLayerListObject=this.findDefaultAnnotationLayer(intOverridingDefaultAnnotationLayerId);if(objAnnotationLayerListObject!=null)
{this.selectLayer(objAnnotationLayerListObject['strLayerId'],true);}}},setOverridingDefaultAnnotationLayerId:function(intOverridingDefaultAnnotationLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2145,'setOverridingDefaultAnnotationLayerId:','function(intOverridingDefaultAnnotationLayerId)',arguments);this.intOverridingDefaultAnnotationLayerId=intOverridingDefaultAnnotationLayerId;this.strSelectedLayerId=null;this.strSelectedLayerName=null;},findDefaultAnnotationLayer:function(intOverridingDefaultAnnotationLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2154,'findDefaultAnnotationLayer:','function(intOverridingDefaultAnnotationLayerId)',arguments);var objAnnotationLayerListObject=null;$j.each(this.objCurrentLayersInList,function(strKey,objLayerDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',2158,'$j.each(this.objCurrentLayersInList,','function(strKey, objLayerDetails)',arguments);if(strKey==intOverridingDefaultAnnotationLayerId)
{objAnnotationLayerListObject=objLayerDetails;return false;}});return objAnnotationLayerListObject;},removeLayerFromList:function(strLayerId,blnNoConfirmationMessage,objCallbackFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',2172,'removeLayerFromList:','function(strLayerId, blnNoConfirmationMessage, objCallbackFunction)',arguments);var _this=this;var layerState=this.objCurrentLayersInList[strLayerId];if(!layerState)
{return false;}
var strLayerName=layerState['strLayerName'];if(layerState['blnScribble']||layerState['blnScribbleCopy'])
{if(this.blnEditingAnnotationLayer)
{Shell.lightboxAlert("Please click 'Save and Close' at the bottom of the Annotate Map component before removing the layer '"+strLayerName+"' from the map!",500,100);return false;}}
if(blnNoConfirmationMessage!==true)
{Shell.lightboxConfirm("Are you sure you want to remove the layer '"+strLayerName+"' layer from the map?",500,100,function(){_this.removeLayerFromListConfirmed(strLayerId,blnNoConfirmationMessage,objCallbackFunction);});}
else
{this.removeLayerFromListConfirmed(strLayerId,blnNoConfirmationMessage,objCallbackFunction);}},removeLayerFromListConfirmed:function(strLayerId,blnNoConfirmationMessage,objCallbackFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',2206,'removeLayerFromListConfirmed:','function(strLayerId, blnNoConfirmationMessage, objCallbackFunction)',arguments);var _this=this;var layerState=this.objCurrentLayersInList[strLayerId];if(layerState['blnScribble']||layerState['blnScribbleCopy'])
{this.arrDefaultAnnotationLayerEnabled[strLayerId]=false;}
this.toggleLayerListActivity(true);var strUrlSuffix='removeLayerFromList/'+strLayerId;this.notify(strUrlSuffix,{},function(){_this.refreshLayerList({},false,{},objCallbackFunction);});this.clearSpecifiedLayerFromGeometriesLayer(strLayerId);return true;},registerDefaultSelectedLayer:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2236,'registerDefaultSelectedLayer:','function(strLayerId)',arguments);this.selectLayer(strLayerId,true);},selectLayer:function(strLayerId,blnSetDefault)
{Profiler.profile('view/components/map/assets/javascript/map.js',2243,'selectLayer:','function(strLayerId, blnSetDefault)',arguments);var _this=this;var blnSetDefault=(typeof(blnSetDefault)!='undefined')?blnSetDefault:false;var layerState=this.objCurrentLayersInList[strLayerId];var strLayerName=layerState['strLayerName'];var blnLayerVisible=layerState['blnVisible'];if(!blnSetDefault)
{if(!blnLayerVisible)
{Shell.lightboxAlert('Layer must be visible before selecting it as your annotation layer!',500,100);return false;}
Shell.lightboxConfirm("You have chosen to annotate the layer '"+strLayerName+"'.\n\nAny icons/text dragged on to the map will be saved to this layer.\n\nAre you sure?",500,150,function(){_this.selectLayerConfirmed(strLayerId,blnSetDefault);});}
else
{this.selectLayerConfirmed(strLayerId,blnSetDefault);}},selectLayerConfirmed:function(strLayerId,blnSetDefault)
{Profiler.profile('view/components/map/assets/javascript/map.js',2271,'selectLayerConfirmed:','function(strLayerId, blnSetDefault)',arguments);var layerState=this.objCurrentLayersInList[strLayerId];var strLayerName=layerState['strLayerName'];if(!blnSetDefault)
{var strUrlSuffix='selectLayer/'+strLayerId;this.notify(strUrlSuffix);Shell.openComponent('annotateMap','showIcons/');this.blnEditingAnnotationLayer=true;}
$j('#layer_list_panel_content .layer_select_icon').each(function(intKey,objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',2293,'$j(\'#layer_list_panel_content .layer_select_icon\').each(','function(intKey, objElement)',arguments);$j(objElement).css({opacity:'0.3'});});if($j('#layer_select_icon_'+strLayerId))
{$j('#layer_select_icon_'+strLayerId).css({opacity:'1.0'});}
this.strSelectedLayerId=strLayerId;this.strSelectedLayerName=strLayerName;if(typeof(AnnotateMap)!='undefined')
{AnnotateMap.showSelectedAnnotationLayerDetails();}
return true;},getAnnotationEditingStatus:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',2327,'getAnnotationEditingStatus:','function()',arguments);return this.blnEditingAnnotationLayer;},setAnnotationEditingStatus:function(blnEditingAnnotationLayer)
{Profiler.profile('view/components/map/assets/javascript/map.js',2332,'setAnnotationEditingStatus:','function(blnEditingAnnotationLayer)',arguments);this.blnEditingAnnotationLayer=blnEditingAnnotationLayer;},showLayer:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2339,'showLayer:','function(strLayerId)',arguments);this.setLayerListRowOpacity(strLayerId,'1.0');var strUrlSuffix='showLayer/'+strLayerId;this.notify(strUrlSuffix);this.addSpecifiedLayerToGeometriesLayer(strLayerId);this.objCurrentLayersInList[strLayerId]['blnVisible']=true;return true;},hideLayer:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2360,'hideLayer:','function(strLayerId)',arguments);this.setLayerListRowOpacity(strLayerId,'0.2');var strUrlSuffix='hideLayer/'+strLayerId;this.notify(strUrlSuffix);this.clearSpecifiedLayerFromGeometriesLayer(strLayerId);this.objCurrentLayersInList[strLayerId]['blnVisible']=false;return true;},toggleLayer:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2381,'toggleLayer:','function(strLayerId)',arguments);var blnShow=$j('#layer_show_'+strLayerId).attr('checked');if(blnShow)
{this.showLayer(strLayerId);}
else
{this.hideLayer(strLayerId);}},showLayerViewDetails:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2398,'showLayerViewDetails:','function(strLayerId)',arguments);var objElement=$j('#layer_views_icon_show_'+strLayerId);if(objElement.length>0)
{$j('#layer_view_details_'+strLayerId).show();$j('#layer_views_icon_show_'+strLayerId).hide();$j('#layer_views_icon_hide_'+strLayerId).css({'display':'block'});}
this.objLayerViewDetailsToggleStatus[strLayerId]=true;},hideLayerViewDetails:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2416,'hideLayerViewDetails:','function(strLayerId)',arguments);var objElement=$j('#layer_views_icon_show_'+strLayerId);if(objElement.length>0)
{$j('#layer_view_details_'+strLayerId).hide();$j('#layer_views_icon_hide_'+strLayerId).hide();$j('#layer_views_icon_show_'+strLayerId).css({'display':'block'});}
this.objLayerViewDetailsToggleStatus[strLayerId]=false;},toggleLayerViewDetails:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2434,'toggleLayerViewDetails:','function(strLayerId)',arguments);var blnHide=(typeof(this.objLayerViewDetailsToggleStatus[strLayerId])!='undefined')?this.objLayerViewDetailsToggleStatus[strLayerId]:false;if(blnHide)
{this.hideLayerViewDetails(strLayerId);}
else
{this.showLayerViewDetails(strLayerId);}},showAllLayers:function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',2451,'showAllLayers:','function(strMode)',arguments);var objMultiActionLayers={showAll:[],hideAll:[]};$j.each(this.objCurrentLayersInList,function(strLayerId,objLayerState)
{Profiler.profile('view/components/map/assets/javascript/map.js',2457,'$j.each(this.objCurrentLayersInList,','function(strLayerId, objLayerState)',arguments);var blnVisible=objLayerState['blnVisible'];switch(strMode)
{case'all':objMultiActionLayers['showAll'].push(strLayerId);break;case'invert':if(blnVisible)
{objMultiActionLayers['hideAll'].push(strLayerId);}
else
{objMultiActionLayers['showAll'].push(strLayerId);}
break;}});this.refreshLayerList({},false,objMultiActionLayers);},hideAllLayers:function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',2488,'hideAllLayers:','function(strMode)',arguments);var objMultiActionLayers={showAll:[],hideAll:[]};$j.each(this.objCurrentLayersInList,function(strLayerId,objLayerState)
{Profiler.profile('view/components/map/assets/javascript/map.js',2494,'$j.each(this.objCurrentLayersInList,','function(strLayerId, objLayerState)',arguments);var blnVisible=objLayerState['blnVisible'];switch(strMode)
{case'all':objMultiActionLayers['hideAll'].push(strLayerId);break;case'invert':if(blnVisible)
{objMultiActionLayers['hideAll'].push(strLayerId);}
else
{objMultiActionLayers['showAll'].push(strLayerId);}
break;}});this.refreshLayerList({},false,objMultiActionLayers);},removeAllLayers:function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',2525,'removeAllLayers:','function(strMode)',arguments);var objMultiActionLayers={removeAll:[]};$j.each(this.objCurrentLayersInList,function(strLayerId,objLayerState)
{Profiler.profile('view/components/map/assets/javascript/map.js',2531,'$j.each(this.objCurrentLayersInList,','function(strLayerId, objLayerState)',arguments);var blnVisible=objLayerState['blnVisible'];switch(strMode)
{case'all':objMultiActionLayers['removeAll'].push(strLayerId);break;case'visible':if(blnVisible)
{objMultiActionLayers['removeAll'].push(strLayerId);}
break;case'hidden':if(!blnVisible)
{objMultiActionLayers['removeAll'].push(strLayerId);}
break;}});this.arrDefaultAnnotationLayerEnabled=[];this.refreshLayerList({},false,objMultiActionLayers);},expandAllLayers:function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',2570,'expandAllLayers:','function(strMode)',arguments);var _this=this;$j.each(this.objCurrentLayersInList,function(strLayerId,objLayerState)
{Profiler.profile('view/components/map/assets/javascript/map.js',2575,'$j.each(this.objCurrentLayersInList,','function(strLayerId, objLayerState)',arguments);var blnVisible=objLayerState['blnVisible'];switch(strMode)
{case'all':_this.showLayerViewDetails(strLayerId);break;case'visible':if(blnVisible)
{_this.showLayerViewDetails(strLayerId);}
break;case'hidden':if(!blnVisible)
{_this.showLayerViewDetails(strLayerId);}
break;case'invert':_this.toggleLayerViewDetails(strLayerId);break;}});},collapseAllLayers:function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',2612,'collapseAllLayers:','function(strMode)',arguments);var _this=this;$j.each(this.objCurrentLayersInList,function(strLayerId,objLayerState)
{Profiler.profile('view/components/map/assets/javascript/map.js',2617,'$j.each(this.objCurrentLayersInList,','function(strLayerId, objLayerState)',arguments);var blnVisible=objLayerState['blnVisible'];switch(strMode)
{case'all':_this.hideLayerViewDetails(strLayerId);break;case'visible':if(blnVisible)
{_this.hideLayerViewDetails(strLayerId);}
break;case'hidden':if(!blnVisible)
{_this.hideLayerViewDetails(strLayerId);}
break;case'invert':_this.toggleLayerViewDetails(strLayerId);break;}});},changeLayerView:function(strLayerId,intThematicRulesetNodeId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2654,'changeLayerView:','function(strLayerId, intThematicRulesetNodeId)',arguments);if(intThematicRulesetNodeId=='null')
{this.addLayerToList(strLayerId,'normal');}
else
{this.addLayerToList(strLayerId,'thematic',intThematicRulesetNodeId);}},changeLayerViews:function(strLayerId,arrThematicRulesetNodeIds)
{Profiler.profile('view/components/map/assets/javascript/map.js',2668,'changeLayerViews:','function(strLayerId, arrThematicRulesetNodeIds)',arguments);var arrAdditionalLayerViews=[];$j.each(arrThematicRulesetNodeIds,function(intKey,intThematicRulesetNodeId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2673,'$j.each(arrThematicRulesetNodeIds,','function(intKey, intThematicRulesetNodeId)',arguments);var objViewDetails={intLayerId:strLayerId,strLayerMode:(intThematicRulesetNodeId=='null')?'normal':'thematic',intThematicRulesetNodeId:(intThematicRulesetNodeId=='null')?null:intThematicRulesetNodeId};arrAdditionalLayerViews.push(objViewDetails);});this.addLayerToList(strLayerId,null,null,false,arrAdditionalLayerViews);},setLayerListRowOpacity:function(strLayerId,strOpacity)
{Profiler.profile('view/components/map/assets/javascript/map.js',2689,'setLayerListRowOpacity:','function(strLayerId, strOpacity)',arguments);var strSelector='#layer_name_col_'+strLayerId+','+'#layer_views_col_'+strLayerId+','+'#layer_extents_col_'+strLayerId+','+'#layer_select_col_'+strLayerId+','+'#layer_savescribble_col_'+strLayerId+','+'#layer_view_details_'+strLayerId;$j(strSelector).css({opacity:strOpacity});var objElement=$j('#layer_view_details_'+strLayerId);if(objElement.length>0)
{var arrChildImageElements=$$("#layer_view_details_"+strLayerId+" img");$j('#layer_view_details_'+strLayerId+' img').each(function(intKey,objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',2710,'$j(\'#layer_view_details_\' + strLayerId + \' img\').each(','function(intKey, objElement)',arguments);$j(objElement).css({opacity:strOpacity});});}},removeAllStamps:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',2720,'removeAllStamps:','function()',arguments);this.objStampDisplay.removeAllPoints();this.objPlaceStampDisplay.removeAllPoints();this.objTagStampDisplay.removeAllPoints();},changeMap:function(intMapId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2729,'changeMap:','function(intMapId)',arguments);this.objLayerManagerWidget.switchLayerStackId(intMapId);},setLayers:function(strLayerAId,strLayerBId,refPoint,srid,zoomLevel)
{Profiler.profile('view/components/map/assets/javascript/map.js',2736,'setLayers:','function(strLayerAId, strLayerBId, refPoint, srid, zoomLevel)',arguments);this.objLayerManagerWidget.setLayerToStackId('A',strLayerAId);if(typeof(strLayerBId)!='undefined')
{this.objLayerManagerWidget.setLayerToStackId('B',strLayerBId);}
if(typeof(refPoint)!='undefined')
{var objPoint=new Point(refPoint.x,refPoint.y,srid);this.objEMController.jumpToPoint(objPoint,zoomLevel);}},zoomToExtents:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2756,'zoomToExtents:','function(strLayerId)',arguments);var layerState=this.objCurrentLayersInList[strLayerId];var blnLayerVisible=layerState['blnVisible'];if(!blnLayerVisible)
{Shell.lightboxAlert('Layer must be visible before jumping the map to its extents!',500,100);return false;}
var blnScribbleLayer=layerState['blnScribble'];var blnScribbleLayerCopy=layerState['blnScribbleCopy'];if(blnScribbleLayer||blnScribbleLayerCopy)
{var arrGeometries=[];$j.each(layerState['arrAnnotationObjects'],function(intKey,objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',2777,'$j.each(layerState[\'arrAnnotationObjects\'],','function(intKey, objElement)',arguments);var objGeocodeDetails=objElement['objGeocodeDetails'];var objPoint={x:objGeocodeDetails['x'],y:objGeocodeDetails['y'],srid:objGeocodeDetails['srid']};arrGeometries.push(objPoint);});this.objEMController.jumpToPoints(arrGeometries);return;}
var layerMode=layerState['strLayerMode'];var strLayerIdToSend=(layerMode=='thematic')?layerState['intThematicRulesetNodeId']:strLayerId;this.geometriesLayer.jumpToNodeExt(strLayerIdToSend);$j('#layer_extents_icon_'+strLayerId).hide();$j('#layer_extents_icon_disabled_'+strLayerId).css({display:'block',opacity:'0.5'});$j('#enableZoomExtentsButton_'+strLayerId).oneTime('5s','enableZoomExtentsButton',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',2813,'$j(\'#enableZoomExtentsButton_\' + strLayerId).oneTime(\'5s\', \'enableZoomExtentsButton\',','function()',arguments);$j('#layer_extents_icon_'+strLayerId).show();$j('#layer_extents_icon_disabled_'+strLayerId).css({display:'none',opacity:'0.5'});});return true;},clearGeometriesLayer:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',2830,'clearGeometriesLayer:','function()',arguments);this.geometriesLayer.clearNodes();},addSpecifiedLayerToGeometriesLayer:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2838,'addSpecifiedLayerToGeometriesLayer:','function(strLayerId)',arguments);var blnScribbleLayer=this.objCurrentLayersInList[strLayerId]['blnScribble'];var blnScribbleLayerCopy=this.objCurrentLayersInList[strLayerId]['blnScribbleCopy'];if(blnScribbleLayer||blnScribbleLayerCopy)
{this.showAnnotationLayerGeometries(strLayerId);return;}
var layerState=this.objCurrentLayersInList[strLayerId];var arrEnabledViews=layerState['arrEnabledViews'];if(arrEnabledViews.length==0)
{var layerMode=layerState['strLayerMode'];var defObj={mode:layerMode,transparency:100,blnForceToBottom:layerState['blnForceToBottom']};if(layerMode=='custom')
{defObj.type=layerState['strLayerType'];defObj.customState=layerState['objCustomState'];}
defObj.theme=(layerMode=='thematic')?'':layerState['intThemeId'];var strLayerIdToSend=(layerMode=='thematic')?layerState['intThematicRulesetNodeId']:strLayerId;this.geometriesLayer.addNode(strLayerIdToSend,defObj);}
else
{var _this=this;$j.each(arrEnabledViews,function(intKey,objViewDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',2912,'$j.each(arrEnabledViews,','function(intKey, objViewDetails)',arguments);var viewMode=objViewDetails['strLayerMode'];var defObj={mode:viewMode,transparency:100,blnForceToBottom:layerState['blnForceToBottom']};if(viewMode=='custom')
{defObj.type=layerState['strLayerType'];defObj.customState=layerState['objCustomState'];}
defObj.theme=(viewMode=='thematic')?'':layerState['intThemeId'];var strLayerIdToSend=(viewMode=='thematic')?objViewDetails['intThematicRulesetNodeId']:strLayerId;_this.geometriesLayer.addNode(strLayerIdToSend,defObj);});}
this.updateGeometriesLayer();},clearSpecifiedLayerFromGeometriesLayer:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',2943,'clearSpecifiedLayerFromGeometriesLayer:','function(strLayerId)',arguments);var blnScribbleLayer=this.objCurrentLayersInList[strLayerId]['blnScribble'];var blnScribbleLayerCopy=this.objCurrentLayersInList[strLayerId]['blnScribbleCopy'];if(blnScribbleLayer||blnScribbleLayerCopy)
{this.hideAnnotationLayerGeometries(strLayerId);return;}
var layerState=this.objCurrentLayersInList[strLayerId];var arrEnabledViews=layerState['arrEnabledViews'];if(arrEnabledViews.length==0)
{var strLayerIdToSend=(this.objCurrentLayersInList[strLayerId]['strLayerMode']=='thematic')?this.objCurrentLayersInList[strLayerId]['intThematicRulesetNodeId']:strLayerId;this.geometriesLayer.removeNode(strLayerIdToSend);}
else
{var _this=this;$j.each(arrEnabledViews,function(intKey,objViewDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',2979,'$j.each(arrEnabledViews,','function(intKey, objViewDetails)',arguments);var viewMode=objViewDetails['strLayerMode'];var strLayerIdToSend=(viewMode=='thematic')?objViewDetails['intThematicRulesetNodeId']:strLayerId;_this.geometriesLayer.removeNode(strLayerIdToSend);});}
this.updateGeometriesLayer();},updateGeometriesLayer:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',2995,'updateGeometriesLayer:','function()',arguments);if(typeof(this.geometriesLayer)!='undefined')
{this.geometriesLayer.updateLayerCache();}},showAnnotationLayerGeometries:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3005,'showAnnotationLayerGeometries:','function(strLayerId)',arguments);var _this=this;var arrAnnotationSymbolObjects=this.objCurrentLayersInList[strLayerId].arrAnnotationObjects;var blnScribbleLayer=this.objCurrentLayersInList[strLayerId]['blnScribble'];if(blnScribbleLayer&&arrAnnotationSymbolObjects.length>0&&!this.blnAlreadyPromptedScribbleLayerLightbox)
{this.showAnnotationLayerHasGeometriesLightboxInit();this.blnAlreadyPromptedScribbleLayerLightbox=true;}
$j.each(arrAnnotationSymbolObjects,function(intKey,objAnnotationDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3024,'$j.each(arrAnnotationSymbolObjects,','function(intKey, objAnnotationDetails)',arguments);var strType=objAnnotationDetails.strType;var objGeocodeDetails=objAnnotationDetails.objGeocodeDetails;var objSizeDetails=objAnnotationDetails.objSizeDetails;var objStampDetails=objAnnotationDetails.objStampDetails;switch(strType)
{case'symbol':var strFileName=objAnnotationDetails.strFileName;break;case'text':var strText=objAnnotationDetails.strText;break;}
if(!objStampDetails)
{switch(strType)
{case'symbol':var intSymbolSize=objSizeDetails.intWidth;var objNewAnnotationSymbol=document.createElement('div');$j(objNewAnnotationSymbol).addClass('annotateSymbolMove');$j(objNewAnnotationSymbol).css({overflow:'visible'});var strExistingAnnotationSymbolSrc=strFileName;var intRandomNumber1=Math.floor(Math.random()*100000);var intRandomNumber2=Math.floor(Math.random()*100000);var intRandomNumber=intRandomNumber1+intRandomNumber2;var strAnnotateSymbolHTML="";strAnnotateSymbolHTML+="<div class='resizeBorder' style='position:absolute;height:"+(intSymbolSize-10)+"px;width:"+(intSymbolSize-10)+"px;border:2px dotted black;padding:3px;z-index:145;display:none;'></div>";strAnnotateSymbolHTML+="<div class='resizeHandle' style='position:absolute;bottom:0px;right:0px;width:9px;height:9px;background:#000000;cursor:se-resize;z-index:147;display:none;'></div>";strAnnotateSymbolHTML+="<div class='closeButton' style='position:absolute;top:0px;left:0px;width:9px;height:9px;background:#000000;cursor:pointer;z-index:148;display:none;'><span style='color:white;font-size:10px;position:absolute;top:-3px;left:2px;width:8px;height:8px;'>x</span></div>";strAnnotateSymbolHTML+="<img id='"+intRandomNumber+"' src='"+strExistingAnnotationSymbolSrc+"' class='symbolImage' style='position:absolute;top:4px;left:4px;height:"+(intSymbolSize-10)+"px;width:"+(intSymbolSize-10)+"px;cursor:pointer;z-index:146;'/>";var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Firefox')
{strAnnotateSymbolHTML+="<input class='dummyFocusField' type='hidden' style='display:none;'/>";}
$j(objNewAnnotationSymbol).html(strAnnotateSymbolHTML);var objDefObj={size:new Point(intSymbolSize,intSymbolSize,'pixel')};var objStampElement=new Stamp.Dom(objNewAnnotationSymbol,objDefObj);_this.objAnnotationStampDisplay.addStamp(objStampElement,'annotateSymbolMove');var objStampInstance=_this.objAnnotationStampDisplay.addPoint(new Point(objGeocodeDetails['x'],objGeocodeDetails['y'],objGeocodeDetails['srid']),'annotateSymbolMove');var strStampId=objStampInstance.stampId;_this.makePngsTransparent(''+intRandomNumber,true);$j('#'+intRandomNumber).bind('click',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',3101,'$j(\'#\' + intRandomNumber).bind(\'click\',','function()',arguments);Map.queryAnnotationSymbol(strLayerId,strStampId);return false;});break;case'text':var intTextWidth=objSizeDetails.intWidth;var intTextHeight=objSizeDetails.intHeight;var objNewAnnotationText=document.createElement('div');$j(objNewAnnotationText).addClass('annotateTextMove');$j(objNewAnnotationText).css({overflow:'visible'});var strExistingAnnotationText=strText;var strAnnotateTextHTML="";strAnnotateTextHTML+="<div class='resizeBorder' style='position:absolute;height:"+(intTextHeight-10)+"px;width:"+(intTextWidth-10)+"px;border:2px dotted black;padding:3px;z-index:145;display:none;'></div>";strAnnotateTextHTML+="<div class='resizeHandle' style='position:absolute;bottom:0px;right:0px;width:9px;height:9px;background:#000000;cursor:se-resize;z-index:147;display:none;'></div>";strAnnotateTextHTML+="<div class='closeButton' style='position:absolute;top:0px;left:0px;width:9px;height:9px;background:#000000;cursor:pointer;z-index:148;display:none;'><span style='color:white;font-size:10px;position:absolute;top:-3px;left:2px;width:8px;height:8px;'>x</span></div>";strAnnotateTextHTML+="<div class='textContainer' style='width:"+(intTextWidth-25)+"px;height:"+(intTextHeight-25)+"px;position:relative;z-index:1000000;top:10px;left:10px;'>";strAnnotateTextHTML+="<div class='textTab' style='position:absolute;top:-24px;left:70px;width:50px;height:25px;border:1px solid grey;border-bottom:none;background:white;cursor:pointer;z-index:175;display:none;'>";strAnnotateTextHTML+="<span style='font-size:70%;color:black;position:absolute;top:5px;left:5px;'>Drag me</span>";strAnnotateTextHTML+="</div>";strAnnotateTextHTML+="<textarea class='textarea' style='width:100%;height:"+(intTextHeight-25)+"px;font-size:90%;z-index:174;'>"+strExistingAnnotationText+"</textarea>";strAnnotateTextHTML+="</div>";var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Firefox')
{strAnnotateTextHTML+="<input class='dummyFocusField' type='hidden' style='display:none;'/>";}
$j(objNewAnnotationText).html(strAnnotateTextHTML);var objDefObj={size:new Point(intTextWidth,intTextHeight,'pixel'),strStampType:'text'};var objStampElement=new Stamp.Dom(objNewAnnotationText,objDefObj);_this.objAnnotationStampDisplay.addStamp(objStampElement,'annotateTextMove');var objStampInstance=_this.objAnnotationStampDisplay.addPoint(new Point(objGeocodeDetails['x'],objGeocodeDetails['y'],objGeocodeDetails["srid"]),'annotateTextMove');break;}
var strStampId=objStampInstance.stampId;objAnnotationDetails.objStampDetails={objStampInstance:objStampInstance,strStampId:strStampId};_this.objCurrentLayersInList[strLayerId].arrAnnotationObjects[intKey]=objAnnotationDetails;}
else
{$j(objStampDetails.objStampInstance.returnElementReference()).show();}});},hideAnnotationLayerGeometries:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3176,'hideAnnotationLayerGeometries:','function(strLayerId)',arguments);var arrAnnotationSymbolObjects=this.objCurrentLayersInList[strLayerId].arrAnnotationObjects;$j.each(arrAnnotationSymbolObjects,function(intKey,objAnnotationDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3181,'$j.each(arrAnnotationSymbolObjects,','function(intKey, objAnnotationDetails)',arguments);var objStampDetails=objAnnotationDetails.objStampDetails;if(objStampDetails)
{$j(objStampDetails.objStampInstance.returnElementReference()).hide();}});},deleteAllAnnotationLayerGeometries:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',3192,'deleteAllAnnotationLayerGeometries:','function()',arguments);if(typeof(this.objAnnotationStampDisplay)!='undefined')
{this.objAnnotationStampDisplay.removeAllPoints();}},updateAnnotationSymbolTransparency:function(opacity)
{Profiler.profile('view/components/map/assets/javascript/map.js',3201,'updateAnnotationSymbolTransparency:','function(opacity)',arguments);var objLayers=this.objCurrentLayersInList;$j.each(objLayers,function(mixKey,objLayerDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3205,'$j.each(objLayers,','function(mixKey, objLayerDetails)',arguments);var arrAnnotationObjects=objLayerDetails.arrAnnotationObjects;if(arrAnnotationObjects.length>0)
{$j.each(arrAnnotationObjects,function(intKey,objAnnotationDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3211,'$j.each(arrAnnotationObjects,','function(intKey, objAnnotationDetails)',arguments);var objStampDetails=objAnnotationDetails.objStampDetails;if(objStampDetails)
{$j(objStampDetails.objStampInstance.returnElementReference()).css({opacity:opacity});}});}});},findLayerAnnotationObjectByStampId:function(intLayerId,strStampId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3227,'findLayerAnnotationObjectByStampId:','function(intLayerId, strStampId)',arguments);var arrLayerAnnotationObjects=this.objCurrentLayersInList[intLayerId].arrAnnotationObjects;var intMatchingAnnotationObjectKey=null;var objMatchingAnnotationObject=null;$j.each(arrLayerAnnotationObjects,function(intKey,objAnnotationObject)
{Profiler.profile('view/components/map/assets/javascript/map.js',3235,'$j.each(arrLayerAnnotationObjects,','function(intKey, objAnnotationObject)',arguments);var objStampDetails=objAnnotationObject.objStampDetails;if(strStampId==objStampDetails.strStampId)
{intMatchingAnnotationObjectKey=intKey;objMatchingAnnotationObject=objAnnotationObject;return false;}});return{intMatchingAnnotationObjectKey:intMatchingAnnotationObjectKey,objMatchingAnnotationObject:objMatchingAnnotationObject};},syncAnnotationGeometry:function(intLayerId,strStampId,objAnnotationObject)
{Profiler.profile('view/components/map/assets/javascript/map.js',3251,'syncAnnotationGeometry:','function(intLayerId, strStampId, objAnnotationObject)',arguments);var objAnnotationObjectDetails=this.findLayerAnnotationObjectByStampId(intLayerId,strStampId);if(objAnnotationObject==null)
{if(objAnnotationObjectDetails.objMatchingAnnotationObject!=null)
{this.objCurrentLayersInList[intLayerId].arrAnnotationObjects=$j.grep(this.objCurrentLayersInList[intLayerId].arrAnnotationObjects,function(objAnnotationObject,strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',3264,'this.objCurrentLayersInList[intLayerId].arrAnnotationObjects = $j.grep(this.objCurrentLayersInList[intLayerId].arrAnnotationObjects,','function(objAnnotationObject, strKey)',arguments);return(objAnnotationObject!=objAnnotationObjectDetails.objMatchingAnnotationObject);});}}
else
{var objUpdatedAnnotationObject={strType:objAnnotationObject.strType,objSizeDetails:objAnnotationObject.objSizeDetails,objGeocodeDetails:{x:objAnnotationObject.objGeocodeDetails.pointOnMap.x,y:objAnnotationObject.objGeocodeDetails.pointOnMap.y,srid:objAnnotationObject.objGeocodeDetails.pointOnMap.srid,mode:'hotspot'},intGeometryId:objAnnotationObject.intAnnotationGeometryId,objStampDetails:{objStampInstance:objAnnotationObject.objStampInstance,strStampId:strStampId}};switch(objUpdatedAnnotationObject.strType)
{case'symbol':objUpdatedAnnotationObject.strFileName=objAnnotationObject.strFileName;break;case'text':objUpdatedAnnotationObject.strText=objAnnotationObject.strText;break;}
if(objAnnotationObjectDetails.objMatchingAnnotationObject!=null)
{var strExistingKey=objAnnotationObjectDetails.intMatchingAnnotationObjectKey;this.objCurrentLayersInList[intLayerId].arrAnnotationObjects[strExistingKey]=objUpdatedAnnotationObject;}
else
{this.objCurrentLayersInList[intLayerId].arrAnnotationObjects.push(objUpdatedAnnotationObject);}}},getActiveLayer:function(blnSuppressWarning)
{Profiler.profile('view/components/map/assets/javascript/map.js',3327,'getActiveLayer:','function(blnSuppressWarning)',arguments);var blnSuppressWarning=(typeof(blnSuppressWarning)!='undefined')?blnSuppressWarning:true;if(this.strSelectedLayerId==null)
{if(!blnSuppressWarning)
{Shell.lightboxAlert('No layer is selected!',500,100);}
return false;}
return this.strSelectedLayerId;},getActiveLayerName:function(blnSuppressWarning)
{Profiler.profile('view/components/map/assets/javascript/map.js',3346,'getActiveLayerName:','function(blnSuppressWarning)',arguments);var blnSuppressWarning=(typeof(blnSuppressWarning)!='undefined')?blnSuppressWarning:true;if(this.strSelectedLayerId==null)
{if(!blnSuppressWarning)
{Shell.lightboxAlert('No layer is selected!',500,100);}
return false;}
return this.strSelectedLayerName;},getActiveLayersAnnotations:function(blnSuppressWarning)
{Profiler.profile('view/components/map/assets/javascript/map.js',3365,'getActiveLayersAnnotations:','function(blnSuppressWarning)',arguments);var blnSuppressWarning=(typeof(blnSuppressWarning)!='undefined')?blnSuppressWarning:true;if(this.strSelectedLayerId==null)
{if(!blnSuppressWarning)
{Shell.lightboxAlert('No layer is selected!',500,100);}
return false;}
return this.objCurrentLayersInList[this.strSelectedLayerId].arrAnnotationObjects;},setCommunityLayerMode:function(strMode,intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3382,'setCommunityLayerMode:','function(strMode, intResourceId)',arguments);this.toggleLayerListActivity(true);var url='setCommunityLayerMode/'+strMode+'/'+intResourceId;this.notify(url,{},this.refreshLayerListAfterComplete);},returnCurrentLayerList:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',3394,'returnCurrentLayerList:','function()',arguments);return this.objCurrentLayersInList;},overrideCurrentLayerList:function(objLayerList,blnMerge,blnPlaylistMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',3401,'overrideCurrentLayerList:','function(objLayerList, blnMerge, blnPlaylistMode)',arguments);if(!this.blnLayerListReady)
{this.arrLayerListPreReadyRefreshQueue.push({objLayerList:objLayerList,blnMerge:blnMerge});return;}
this.toggleLayerListActivity(true);this.refreshLayerList(objLayerList,blnMerge,{},function(){},false,blnPlaylistMode);},setOverrideMode:function(blnOverrideMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',3420,'setOverrideMode:','function(blnOverrideMode)',arguments);this.blnOverrideMode=blnOverrideMode;},clearLayer:function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3428,'clearLayer:','function(strLayerId)',arguments);if(confirm("This will delete all geometries from the selected layer.\n\n Are you sure?"))
{var strUrlSuffix='clearLayer/'+strLayerId;this.notify(strUrlSuffix,{},this.refreshLayerListAfterComplete);}},linkToUlearnSearch:function(strSearchCriteria,objSearchFieldElement,objSearchResultsElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',3442,'linkToUlearnSearch:','function(strSearchCriteria, objSearchFieldElement, objSearchResultsElement)',arguments);$j('#linkToUlearnSearchNoResults').hide();$j('#linkToUlearnSearchingPleaseWaitContainer').show();$j('#linkToMapSearchField').attr('disabled',true);$j('#linkToMapSearchButton').attr('disabled',true);var objMapState=Map.getState(false);var strExtents=$j.toJSON(objMapState.ezMapState.extents);var strCenterPoint=$j.toJSON({x:objMapState.ezMapState.centerPoint.x,y:objMapState.ezMapState.centerPoint.y,srid:objMapState.ezMapState.centerPoint.srid});this.objLinkToUlearnSearchResultGeometries={};var strUrl='linkToUlearnSearch/';var objParams={strSearchCriteria:strSearchCriteria,strExtents:strExtents,strCenterPoint:strCenterPoint};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',3476,'var objOnComplete =','function()',arguments);_this.linkToUlearnSearchOnComplete(objSearchResultsElement);};this.update(strUrl,objParams,objOnComplete,'#'+objSearchResultsElement.id);},linkToUlearnSearchOnComplete:function(objSearchResultsElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',3485,'linkToUlearnSearchOnComplete:','function(objSearchResultsElement)',arguments);$j('#linkToUlearnSearchingPleaseWaitContainer').hide();$j('#linkToMapSearchField').attr('disabled',false);$j('#linkToMapSearchButton').attr('disabled',false);this.executeUpdateInitCode();var arrLinkToUlearnSearchResultKeys=$j.map(this.objLinkToUlearnSearchResultGeometries,function(strValue,strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',3501,'var arrLinkToUlearnSearchResultKeys = $j.map(this.objLinkToUlearnSearchResultGeometries,','function(strValue, strKey)',arguments);return strKey;});var intTotalResultMatches=arrLinkToUlearnSearchResultKeys.length;if(intTotalResultMatches>1)
{$j(objSearchResultsElement).show();}
else if(intTotalResultMatches==1)
{var intFirstKey=arrLinkToUlearnSearchResultKeys[0];this.jumpToLinkToUlearnSearchResult(intFirstKey);}
else
{$j('#linkToUlearnSearchNoResults').show();}},toggleLayerLegendModeDescription:function(strLayerLegendMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',3529,'toggleLayerLegendModeDescription:','function(strLayerLegendMode)',arguments);switch(strLayerLegendMode)
{case'normal':$j('#normal_Description').toggle();break;case'thematic':$j('#thematic_Description').toggle();break;}},registerLinkToUlearnSearchResultGeometries:function(intResourceId,intGeometryId,objGeometries,strItemType)
{Profiler.profile('view/components/map/assets/javascript/map.js',3543,'registerLinkToUlearnSearchResultGeometries:','function(intResourceId, intGeometryId, objGeometries, strItemType)',arguments);if(strItemType=='resource')
{var intItemKey=intResourceId;}
else
{var intItemKey=intGeometryId;}
this.objLinkToUlearnSearchResultGeometries[intItemKey]={};this.objLinkToUlearnSearchResultGeometries[intItemKey]['strItemType']=strItemType;this.objLinkToUlearnSearchResultGeometries[intItemKey]['intResourceId']=intResourceId;this.objLinkToUlearnSearchResultGeometries[intItemKey]['intGeometryId']=intGeometryId;this.objLinkToUlearnSearchResultGeometries[intItemKey]['arrGeometriesFirstPoint']=objGeometries['arrFirstCoordPair'];this.objLinkToUlearnSearchResultGeometries[intItemKey]['arrGeometries']=objGeometries['arrAllCoordPairs'];},jumpToLinkToUlearnSearchResult:function(intResultId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3563,'jumpToLinkToUlearnSearchResult:','function(intResultId)',arguments);this.showSpecificLinkToUlearnGeometries(intResultId,true);$j('#linkToMapSearchResultsContainer').hide();},linkToUlearnResultRollover:function(objElement,blnOver)
{Profiler.profile('view/components/map/assets/javascript/map.js',3569,'linkToUlearnResultRollover:','function(objElement, blnOver)',arguments);if(blnOver)
{$j(objElement).css({backgroundColor:'#def3ff'});}
else
{$j(objElement).css({backgroundColor:'#ffffff'});}},registerLinkToUlearnLayerData:function(intLayerId,strLayerName,strLayerDescription,intThemeId,intThematicRulesetNodeId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3589,'registerLinkToUlearnLayerData:','function(intLayerId, strLayerName, strLayerDescription, intThemeId, intThematicRulesetNodeId)',arguments);this.objLinkToUlearnLayerData[intLayerId]={intLayerId:intLayerId,strLayerName:strLayerName,strLayerDescription:strLayerDescription,intThemeId:intThemeId,intThematicRulesetNodeId:intThematicRulesetNodeId};},registerLinkToUlearnLayerViewData:function(intViewId,intLayerId,intThematicRulesetId,strName)
{Profiler.profile('view/components/map/assets/javascript/map.js',3603,'registerLinkToUlearnLayerViewData:','function(intViewId, intLayerId, intThematicRulesetId, strName)',arguments);if(typeof(this.objLinkToUlearnLayerData[intLayerId]['arrViewDetails'])=='undefined')
{this.objLinkToUlearnLayerData[intLayerId]['arrViewDetails']=[];}
var objViewDetails={intViewId:intViewId,intLayerId:intLayerId,intThematicRulesetId:intThematicRulesetId,strName:strName,blnEnabled:false};this.objLinkToUlearnLayerData[intLayerId]['arrViewDetails'].push(objViewDetails);},updateViewsAvailableForLayer:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',3624,'updateViewsAvailableForLayer:','function()',arguments);switch(this.strLinkToMapLayerSelectMode)
{case'selectMenu':var intSelectedLayerNodeId=$j('#linkToMapSelectedLayer').val();var strSelectedLayerName=$j('#linkToMapSelectedLayer :selected').text();$j('#linkToMapSelectedViewContainer').html('');if(intSelectedLayerNodeId!='')
{var arrLayerViews=this.objLinkToUlearnLayerData[intSelectedLayerNodeId]['arrViewDetails'];switch(this.strLinkToMapViewSelectMode)
{case'selectMenu':var strNewViewSelectMenuHTML='';strNewViewSelectMenuHTML+='<select id="linkToMapSelectedView" name="linkToMapSelectedView">';$j.each(arrLayerViews,function(intKey,objViewDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3655,'$j.each(arrLayerViews,','function(intKey, objViewDetails)',arguments);var strSelected=(objViewDetails['blnEnabled'])?'selected="selected"':'';strNewViewSelectMenuHTML+='<option value="'+objViewDetails['intThematicRulesetId']+'" '+strSelected+'>'+objViewDetails['strName']+'</option>';});strNewViewSelectMenuHTML+='</select>';break;case'multiSelectMenu':var strNewViewSelectMenuHTML='';var multiSelectSize=(arrLayerViews.length<=5)?arrLayerViews.length:5;strNewViewSelectMenuHTML+='<select id="linkToMapSelectedView" name="linkToMapSelectedView" style="font-size:90%;width:150px;" multiple="multiple" size="'+multiSelectSize+'}">';$j.each(arrLayerViews,function(intKey,objViewDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3679,'$j.each(arrLayerViews,','function(intKey, objViewDetails)',arguments);var strSelected=(objViewDetails['blnEnabled'])?'selected="selected"':'';strNewViewSelectMenuHTML+='<option value="'+objViewDetails['intThematicRulesetId']+'" '+strSelected+'>'+objViewDetails['strName']+'</option>';});strNewViewSelectMenuHTML+='</select>';break;}}
else
{strNewViewSelectMenuHTML='<span style="font-style:italic">Please select a layer to see its views</span>';}
$j('#linkToMapSelectedViewContainer').html(strNewViewSelectMenuHTML);break;case'checkboxes':break;}},generateLinkToUlearnLayerPanelContent:function(strTargetElementId,objLayerDetails,objAdditionalInfo)
{Profiler.profile('view/components/map/assets/javascript/map.js',3713,'generateLinkToUlearnLayerPanelContent:','function(strTargetElementId, objLayerDetails, objAdditionalInfo)',arguments);var strUrl='generateLinkToUlearnLayerPanelContent/';var objParams={objLayerDetails:$j.toJSON(objLayerDetails),objAdditionalInfo:$j.toJSON(objAdditionalInfo)};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',3727,'var objOnComplete =','function()',arguments);_this.generateLinkToUlearnLayerPanelContentOnComplete();};this.update(strUrl,objParams,objOnComplete,'#'+strTargetElementId);},generateLinkToUlearnLayerPanelContentOnComplete:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',3736,'generateLinkToUlearnLayerPanelContentOnComplete:','function()',arguments);this.executeUpdateInitCode();},setLinkToMapActiveLayer:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',3744,'setLinkToMapActiveLayer:','function()',arguments);var arrSelectedLayerIds=[];switch(this.strLinkToMapLayerSelectMode)
{case'selectMenu':var intSelectedLayerNodeId=$j('#linkToMapSelectedLayer').val();if(intSelectedLayerNodeId!="")
{arrSelectedLayerIds.push(intSelectedLayerNodeId);}
break;case'checkboxes':$j('.linkToMapLayerSelectCheckbox').each(function(intKey,objCheckboxElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',3770,'$j(\'.linkToMapLayerSelectCheckbox\').each(','function(intKey, objCheckboxElement)',arguments);if(objCheckboxElement.checked)
{arrSelectedLayerIds.push(objCheckboxElement.value);}});break;}
if(arrSelectedLayerIds.length<=0)
{this.removeAllLayers('all');this.updateGeometriesLayer();$j('#selectedLayerDetailsContainer').hide();$j('#selectedLayerDetailsContainer').html('');}
else
{$j('#selectedLayerDetailsContainer').html('');$j('#selectedLayerDetailsContainer').show();var arrSelectedLayerDetails=this.getSelectedLayersDetails(arrSelectedLayerIds);switch(this.strLinkToMapLayerSelectMode)
{case'selectMenu':var objSelectedLayerDetails=arrSelectedLayerDetails[0];this.addLayerToList(objSelectedLayerDetails.intLayerId,null,null,true,objSelectedLayerDetails.arrEnabledLayerViews);this.generateSelectedLayerLegend(objSelectedLayerDetails);break;case'checkboxes':this.addLayersToList(arrSelectedLayerDetails,true);var _this=this;$j.each(arrSelectedLayerDetails,function(intKey,objSelectedLayerDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3828,'$j.each(arrSelectedLayerDetails,','function(intKey, objSelectedLayerDetails)',arguments);_this.generateSelectedLayerLegend(objSelectedLayerDetails);});break;}}
this.updateViewsAvailableForLayer();},generateSelectedLayerLegend:function(objSelectedLayerDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3840,'generateSelectedLayerLegend:','function(objSelectedLayerDetails)',arguments);var strUrl='generateLinkToUlearnLayerPanelMapLegend/';var arrEnabledViews=objSelectedLayerDetails['arrEnabledLayerViews'];var strTargetElementId='selectedLayerLegendContainer_'+objSelectedLayerDetails.intLayerId;var strElementHTML='<div><h2>'+objSelectedLayerDetails.strLayerName+'</h2><div id="'+strTargetElementId+'" class="selectedLayerLegendContainer" style="overflow-y:auto;overflow-x:hidden;border:0px solid black;"><p>Loading map legend...</p></div></div>';$j('#selectedLayerDetailsContainer').append(strElementHTML);var objLayerDetails={intLayerId:objSelectedLayerDetails.intLayerId,arrEnabledLayerViews:arrEnabledViews,intSelectedLayerId:objSelectedLayerDetails.intLayerId,intThemeId:objSelectedLayerDetails.intThemeId};if(typeof(objSelectedLayerDetails.blnThematicMode)!='undefined')
{objLayerDetails.blnThematicMode=objSelectedLayerDetails.blnThematicMode;}
if(typeof(objSelectedLayerDetails.intThematicRulesetNodeId)!='undefined')
{objLayerDetails.intThematicRulesetNodeId=objSelectedLayerDetails.intThematicRulesetNodeId;}
var objParams={objLayerDetails:$j.toJSON(objLayerDetails)};this.update(strUrl,objParams,null,'#'+strTargetElementId);},getSelectedLayersDetails:function(arrLayerIds)
{Profiler.profile('view/components/map/assets/javascript/map.js',3887,'getSelectedLayersDetails:','function(arrLayerIds)',arguments);var _this=this;var arrSelectedLayersDetails=[];$j.each(arrLayerIds,function(intKey,intSelectedLayerNodeId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3892,'$j.each(arrLayerIds,','function(intKey, intSelectedLayerNodeId)',arguments);var objLayerDisplayData=(typeof(_this.objLinkToUlearnLayerData[intSelectedLayerNodeId])!='undefined')?_this.objLinkToUlearnLayerData[intSelectedLayerNodeId]:{};var strSelectedLayerName=objLayerDisplayData.strLayerName;var arrSelectedViews=_this.getSelectedViewsForALayer(intSelectedLayerNodeId);var intThemeId=(typeof(objLayerDisplayData['intThemeId'])!='undefined')?objLayerDisplayData['intThemeId']:null;var objCurrentLayerDetails={intLayerId:intSelectedLayerNodeId,strLayerName:strSelectedLayerName,arrEnabledLayerViews:arrSelectedViews,intThemeId:intThemeId};arrSelectedLayersDetails.push(objCurrentLayerDetails);});return arrSelectedLayersDetails;},getSelectedViewsForALayer:function(intLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3919,'getSelectedViewsForALayer:','function(intLayerId)',arguments);var _this=this;var arrViewDetailsToReturn=[];if(typeof(this.objLinkToUlearnLayerData[intLayerId])=='undefined')
{return arrViewDetailsToReturn;}
if(typeof(this.objLinkToUlearnLayerData[intLayerId]['arrViewDetails'])!='undefined')
{$j.each(this.objLinkToUlearnLayerData[intLayerId]['arrViewDetails'],function(intKey,objViewDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',3931,'$j.each(this.objLinkToUlearnLayerData[intLayerId][\'arrViewDetails\'],','function(intKey, objViewDetails)',arguments);switch(_this.strLinkToMapLayerSelectMode)
{case'selectMenu':var arrSelectedViewIds=$j('#linkToMapSelectedView').val();break;case'checkboxes':var arrSelectedViewIds=$j('#linkToMapSelectedView_layer'+intLayerId).val();break;}
if(typeof(arrSelectedViewIds)=='string'||typeof(arrSelectedViewIds)=='number')
{arrSelectedViewIds=[arrSelectedViewIds];}
var blnThisViewEnabled=false;$j.each(arrSelectedViewIds,function(intKey2,intSelectedViewId)
{Profiler.profile('view/components/map/assets/javascript/map.js',3963,'$j.each(arrSelectedViewIds,','function(intKey2, intSelectedViewId)',arguments);if(parseInt(objViewDetails.intThematicRulesetId)==parseInt(intSelectedViewId)||(intSelectedViewId=='Default'&&objViewDetails.intThematicRulesetId==intSelectedViewId))
{var objViewObject={strName:objViewDetails.strName,intId:intSelectedViewId,intLayerId:intLayerId,strLayerMode:(objViewDetails.intThematicRulesetId=='null'||objViewDetails.intThematicRulesetId=='Default')?'normal':'thematic',intThematicRulesetNodeId:(objViewDetails.intThematicRulesetId=='null'||objViewDetails.intThematicRulesetId=='Default')?null:objViewDetails.intThematicRulesetId};arrViewDetailsToReturn.push(objViewObject);blnThisViewEnabled=true;}
if(blnThisViewEnabled)
{_this.objLinkToUlearnLayerData[intLayerId]['arrViewDetails'][intKey]['blnEnabled']=true;}
else
{_this.objLinkToUlearnLayerData[intLayerId]['arrViewDetails'][intKey]['blnEnabled']=false;}});});}
return arrViewDetailsToReturn;},clearLinkToMapActiveLayers:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4000,'clearLinkToMapActiveLayers:','function()',arguments);switch(this.strLinkToMapLayerSelectMode)
{case'selectMenu':$j('#linkToMapSelectedLayer').get(0).selectedIndex=0;break;case'checkboxes':$j('.linkToMapLayerSelectCheckbox').each(function(intKey,objCheckboxElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',4019,'$j(\'.linkToMapLayerSelectCheckbox\').each(','function(intKey, objCheckboxElement)',arguments);objCheckboxElement.checked=false;});break;}
this.updateViewsAvailableForLayer();this.setLinkToMapActiveLayer();},clearLinkToMapRadiusLayers:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4032,'clearLinkToMapRadiusLayers:','function()',arguments);var objMultiActionLayers={showAll:[],hideAll:[],removeAll:[]};$j.each(this.objCurrentLayersInList,function(strLayerId,objLayerState)
{Profiler.profile('view/components/map/assets/javascript/map.js',4038,'$j.each(this.objCurrentLayersInList,','function(strLayerId, objLayerState)',arguments);var strLayerName=objLayerState['strLayerName'];if(strLayerName.substring(0,7)=='Radius ')
{objMultiActionLayers['removeAll'].push(strLayerId);}});this.refreshLayerList({},false,objMultiActionLayers);},setLinkToMapLayerSelectMode:function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',4054,'setLinkToMapLayerSelectMode:','function(strMode)',arguments);this.strLinkToMapLayerSelectMode=strMode;},setLinkToMapViewSelectMode:function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',4059,'setLinkToMapViewSelectMode:','function(strMode)',arguments);this.strLinkToMapViewSelectMode=strMode;},registerExternalGeometries:function(objGeometryData,blnAutoZoom)
{Profiler.profile('view/components/map/assets/javascript/map.js',4174,'registerExternalGeometries:','function(objGeometryData, blnAutoZoom)',arguments);if(!this.blnAllowAPICalls)
{Shell.lightboxAlert('External API calls have not been enabled for this site.',500,100);return false;}
var _this=this;var blnAutoZoom=(typeof(blnAutoZoom)!='undefined')?blnAutoZoom:true;var objIconDefs=objGeometryData.objIconDefs;var objPopupDefs=objGeometryData.objPopupDefs;var objRadiusThemeDef=objGeometryData.objRadiusThemeDef;var arrGeometries=objGeometryData.arrGeometries;var arrGeometriesToZoomTo=[];var arrGeometriesNeedingRadius=[];$j.each(arrGeometries,function(intKey,objGeometryDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4200,'$j.each(arrGeometries,','function(intKey, objGeometryDetails)',arguments);if(typeof(objGeometryDetails)!='undefined')
{var objCurrentIconDef=objIconDefs[objGeometryDetails.iconDefId];var objCurrentPopupDef=objPopupDefs[objGeometryDetails.popupDefId];var intSymbolWidth=objCurrentIconDef.intIconWidth;var intSymbolHeight=objCurrentIconDef.intIconHeight;var strSymbolIconPath=objCurrentIconDef.strIconURL;var strPopupContent=objGeometryDetails.strPopupContent;strPopupContent=strPopupContent.gsub("\'","&#39;");strPopupContent=strPopupContent.gsub('"','\\"');var intPopupWidth=objCurrentPopupDef.intPopupWidth;var intPopupHeight=objCurrentPopupDef.intPopupHeight;var strPopupGeometry='{x: "'+objGeometryDetails.intX+'", y: "'+objGeometryDetails.intY+'", srid: "'+objGeometryDetails.intSrid+'"}';arrGeometriesToZoomTo.push({x:objGeometryDetails.intX,y:objGeometryDetails.intY,srid:objGeometryDetails.intSrid});if(objGeometryDetails.blnDisplayRadius)
{arrGeometriesNeedingRadius.push({x:objGeometryDetails.intX,y:objGeometryDetails.intY,srid:objGeometryDetails.intSrid,intRadius:objGeometryDetails.intRadius});}
var objSymbol=document.createElement('div');$j(objSymbol).hide();var strSymbolHTML="<div class='mapExternalGeometryStamp' style='background:url("+strSymbolIconPath+") no-repeat left top;width:"+intSymbolWidth+"px;height:"+intSymbolHeight+"px;cursor:pointer;' onclick='Map.queryMapExternal("+strPopupGeometry+", \""+strPopupContent+"\", "+intPopupWidth+", "+intPopupHeight+")'></div>";$j(objSymbol).html(strSymbolHTML);var objDefObj={size:new Point(intSymbolWidth,intSymbolHeight,'pixel')};var objStampElement=new Stamp.Dom(objSymbol,objDefObj);_this.objExternalStampDisplay.addStamp(objStampElement,'');var objStampInstance=_this.objExternalStampDisplay.addPoint(new Point(objGeometryDetails.intX,objGeometryDetails.intY,objGeometryDetails.intSrid),'');var strStampId=objStampInstance.stampId;_this.arrExternalGeometryStampDetails.push({strStampId:strStampId,strType:'symbol',objStampInstance:objStampInstance});var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{var objElement=$j(objStampInstance.returnElementReference()).find('div.mapExternalGeometryStamp').get(0);_this.makeBackgroundPngTransparent(objElement,true);}
var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer')
{$j(objStampInstance.returnElementReference()).show();}
else
{$j(objStampInstance.returnElementReference()).show();}}});if(arrGeometriesToZoomTo.length>0&&blnAutoZoom)
{this.showGeometries(arrGeometriesToZoomTo);}
if(arrGeometriesNeedingRadius.length>0)
{this.addDynamicLayerToList(arrGeometriesNeedingRadius,objRadiusThemeDef);}},clearExternalGeometries:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4313,'clearExternalGeometries:','function()',arguments);this.arrExternalGeometryStampDetails=[];this.objExternalStampDisplay.removeAllPoints();this.removeAllLayers('all');this.objMapPopup.hide();},registerPreTileUpdateFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4328,'registerPreTileUpdateFunction:','function()',arguments);var _this=this;var objPreTileUpdateFunction=function(arrTilesDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4332,'var objPreTileUpdateFunction =','function(arrTilesDetails)',arguments);_this.prepareTilesForGeometryRetrieval(arrTilesDetails);};var objPostTileUpdateFunction=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4337,'var objPostTileUpdateFunction =','function()',arguments);_this.retrieveGeometriesForTiles();};this.objEMController.mapStatus.mapOptions.preTileUpdateFunction=objPreTileUpdateFunction;this.objEMController.mapStatus.mapOptions.postTileUpdateFunction=objPostTileUpdateFunction;this.monitorMouseMoveForHoverDetailsFunction=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',4346,'this.monitorMouseMoveForHoverDetailsFunction =','function(event)',arguments);var objMouseScreenPoint=_this.objEMController.mapStatus.getPointFromEvent(event);$j('#ezMaps').stopTime('checkMouseOverResource').oneTime(250,'checkMouseOverResource',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4351,'$j(\'#ezMaps\').stopTime(\'checkMouseOverResource\').oneTime(250, \'checkMouseOverResource\',','function()',arguments);Map.checkMouseOverResource(event);});};$j('#ezMaps div.eventLayer:first').bind('mousemove',this.monitorMouseMoveForHoverDetailsFunction);},unregisterPreTileUpdateFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4360,'unregisterPreTileUpdateFunction:','function()',arguments);this.objEMController.mapStatus.mapOptions.preTileUpdateFunction=null;$j('#ezMaps div.eventLayer:first').unbind('mousemove',this.monitorMouseMoveForHoverDetailsFunction);},checkMouseOverResource:function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',4369,'checkMouseOverResource:','function(event)',arguments);$j('#ezMaps').stopTime('checkMouseOverResource');if(this.blnPopupInExpandedMode===true)
{return;}
var _this=this;var blnMouseIsOverResource=false;var intStampSize=20;var objMapDimensions=this.objEMController.mapStatus.mapOptions.defaultDimensions;var intSrid=this.objEMController.mapStatus.getSrid();var objMousePosition=this.objEMController.mapStatus.getRelativePointFromEvent(event);var objMousePoint=this.objEMController.mapStatus.getPointOnMap(objMousePosition,objMapDimensions,intSrid);var objMouseTopLeft=new Point(objMousePosition.x-(intStampSize/2),objMousePosition.y+(intStampSize/2));var objMouseTopLeft=this.objEMController.mapStatus.getPointOnMap(objMouseTopLeft,objMapDimensions,intSrid);var objMouseBottomRight=new Point(objMousePosition.x+(intStampSize/2),objMousePosition.y-(intStampSize/2));var objMouseBottomRight=this.objEMController.mapStatus.getPointOnMap(objMouseBottomRight,objMapDimensions,intSrid);var arrTiles=this.geometriesLayer.getEnclosingTileGridPositionsFromPoint(objMousePoint,objMouseTopLeft.x-objMousePoint.x);if(arrTiles.length==0)
{return false;}
$j.each(arrTiles,function(intKey,objTile)
{Profiler.profile('view/components/map/assets/javascript/map.js',4413,'$j.each(arrTiles,','function(intKey, objTile)',arguments);var strTileCoords=objTile.intX+'_'+objTile.intY;if(typeof(_this.objCurrentLayerGeometries[strTileCoords])=='undefined')
{return true;}
if(typeof(_this.objCurrentLayerGeometries[strTileCoords]['featured_resources'])!='undefined')
{$j.each(_this.objCurrentLayerGeometries[strTileCoords]['featured_resources'],function(intResourceId,objGeometry)
{Profiler.profile('view/components/map/assets/javascript/map.js',4426,'$j.each(_this.objCurrentLayerGeometries[strTileCoords][\'featured_resources\'],','function(intResourceId, objGeometry)',arguments);if(objGeometry.x>=objMouseTopLeft.x&&objGeometry.x<=objMouseBottomRight.x&&objGeometry.y<=objMouseTopLeft.y&&objGeometry.y>=objMouseBottomRight.y)
{_this.mouseOverResource(intResourceId,objGeometry,intSrid);blnMouseIsOverResource=true;return false;}});}
if(blnMouseIsOverResource===true)
{return false;}
if(typeof(_this.objCurrentLayerGeometries[strTileCoords]['topics'])!='undefined')
{$j.each(_this.objCurrentLayerGeometries[strTileCoords]['topics'],function(intResourceId,objGeometry)
{Profiler.profile('view/components/map/assets/javascript/map.js',4448,'$j.each(_this.objCurrentLayerGeometries[strTileCoords][\'topics\'],','function(intResourceId, objGeometry)',arguments);if(objGeometry.x>=objMouseTopLeft.x&&objGeometry.x<=objMouseBottomRight.x&&objGeometry.y<=objMouseTopLeft.y&&objGeometry.y>=objMouseBottomRight.y)
{_this.mouseOverResource(intResourceId,objGeometry,intSrid);blnMouseIsOverResource=true;return false;}});}
if(blnMouseIsOverResource===true)
{return false;}});if(blnMouseIsOverResource===false)
{this.objTagStampDisplay.removeAllPoints();}},mouseOverResource:function(intResourceId,objGeometry,intSrid)
{Profiler.profile('view/components/map/assets/javascript/map.js',4475,'mouseOverResource:','function(intResourceId, objGeometry, intSrid)',arguments);if(objGeometry==this.objHoverDetailsGeometry)
{return false;}
this.objHoverDetailsGeometry=objGeometry;if(objGeometry.arrOverridingTopicDetails!=null&&objGeometry.arrOverridingTopicDetails!='null')
{var objTopicDetails=objGeometry.arrOverridingTopicDetails;}
else
{var objTopicDetails=ResourceExplorer.getTopicDetails(objGeometry.intTopicId);}
var objSubdomains=Shell.getWebsiteSubdomains();if(objTopicDetails==null)
{objTopicDetails={strName:'Resource',strIconPath:objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_blue.png'};}
if(this.objHoverDetailsTemporaryStamp)
{this.objTagStampDisplay.removeAllPoints();this.objHoverDetailsTemporaryStamp=null;}
var objStamp={'strId':'tag_'+objGeometry.intTopicId+'_symbol_'+intResourceId,'strClass':'resourceExplorerTagStamp','strIconPath':objTopicDetails.strIconPath,'intIconSize':objGeometry.intIconSize,'objPoint':{'x':objGeometry.x,'y':objGeometry.y,'srid':intSrid},'objData':{'arrPopupGeometryIds':[{container_node_id:intResourceId,id:null}],'objPopupGeometry':{x:objGeometry.x,y:objGeometry.y,srid:intSrid},'intResourceId':intResourceId,'intGeometryId':null,'intTopicId':objGeometry.intTopicId,'strTopicName':objTopicDetails.strName,'strResourceTitle':objGeometry.strResourceName,'strResourceType':objGeometry.strResourceType,'intHiddenResources':objGeometry.intHiddenResources,'intHiddenTopics':objGeometry.intHiddenTopics,'blnTransparentBoxOutput':true,'blnTopicNameOnHoverDisabled':ResourceExplorer.getTopicNameOnHoverDisabled()}};var arrStampDetails=Map.setStampState(this.objTagStampDisplay,[objStamp]);this.objHoverDetailsTemporaryStamp=arrStampDetails[0];if(ResourceExplorer.getTopicNameOnHoverDisabled()!==true)
{var objParams={objPopupGeometry:objStamp.objData.objPopupGeometry,intResourceId:objStamp.objData.intResourceId,intTopicId:objStamp.objData.intTopicId,strTopicName:(objStamp.objData.strTopicName==null)?'Resource':objStamp.objData.strTopicName,strResourceTitle:objStamp.objData.strResourceTitle,strResourceType:objStamp.objData.strResourceType,intHiddenResources:objStamp.objData.intHiddenResources,intHiddenTopics:objStamp.objData.intHiddenTopics};var objStamp=$j('#'+objStamp.strId);if(objStamp.length>0)
{this.showStampDetails(objStamp.get(0),objParams);}}},prepareTilesForGeometryRetrieval:function(arrTiles)
{Profiler.profile('view/components/map/assets/javascript/map.js',4587,'prepareTilesForGeometryRetrieval:','function(arrTiles)',arguments);var _this=this;if(arrTiles.length==0)
{return;}
this.objProgressBar.blnLoading=true;$j.each(arrTiles,function(mixKey,objTileDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4604,'$j.each(arrTiles,','function(mixKey, objTileDetails)',arguments);var strTileCoords=objTileDetails.intX+'_'+objTileDetails.intY;if(typeof(_this.objTileGeometryCacheDetails[strTileCoords])=='undefined')
{_this.objTileGeometryCacheDetails[strTileCoords]={};_this.objTileGeometryCacheDetails[strTileCoords].blnForceUpdate=true;}
else
{var intCurrentTileSrid=_this.objTileGeometryCacheDetails[strTileCoords].intSrid;var intCurrentTileScale=_this.objTileGeometryCacheDetails[strTileCoords].intScale;if(intCurrentTileSrid!=objTileDetails.intSrid||intCurrentTileScale!=objTileDetails.intScale)
{_this.objTileGeometryCacheDetails[strTileCoords].blnForceUpdate=true;}}
_this.objTileGeometryCacheDetails[strTileCoords].intSrid=objTileDetails.intSrid;_this.objTileGeometryCacheDetails[strTileCoords].intScale=objTileDetails.intScale;_this.objTileGeometryCacheDetails[strTileCoords].intX=objTileDetails.intX;_this.objTileGeometryCacheDetails[strTileCoords].intY=objTileDetails.intY;_this.objTileGeometryCacheDetails[strTileCoords].arrTileExtents=objTileDetails.arrTileExtents;if(_this.objTileGeometryCacheDetails[strTileCoords].blnForceUpdate===true)
{_this.objCurrentLayerGeometries[strTileCoords]={};}});var objVisibleTiles={};$j.each(_this.objTileGeometryCacheDetails,function(strTileCoords,objCachedTileDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4643,'$j.each(_this.objTileGeometryCacheDetails,','function(strTileCoords, objCachedTileDetails)',arguments);var blnStillExists=false;$j.each(arrTiles,function(mixKey,objTileDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4647,'$j.each(arrTiles,','function(mixKey, objTileDetails)',arguments);if(objTileDetails.intSrid==objCachedTileDetails.intSrid&&objTileDetails.intScale==objCachedTileDetails.intScale&&objTileDetails.intX==objCachedTileDetails.intX&&objTileDetails.intY==objCachedTileDetails.intY)
{blnStillExists=true;return false;}});if(blnStillExists===true)
{objVisibleTiles[strTileCoords]=objCachedTileDetails;}});_this.objTileGeometryCacheDetails=objVisibleTiles;},retrieveGeometriesForTiles:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4666,'retrieveGeometriesForTiles:','function()',arguments);var blnPlaylistMode=this.objEMController.mapStatus.getPlaylistMode();if(blnPlaylistMode===false&&ResourceExplorer.getSelectedTopicsCount()==0)
{return;}
var _this=this;var arrTiles=[];$j.each(this.objTileGeometryCacheDetails,function(strTileCoords,objTileDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4682,'$j.each(this.objTileGeometryCacheDetails,','function(strTileCoords, objTileDetails)',arguments);if(_this.objTileGeometryCacheDetails[strTileCoords].blnForceUpdate===true)
{arrTiles.push(objTileDetails);_this.objTileGeometryCacheDetails[strTileCoords].blnForceUpdate=false;}});if(arrTiles.length==0)
{return;}
var objParams={arrTilesDetails:$j.toJSON(arrTiles)};if(blnPlaylistMode===true)
{var intViewId=this.objEMController.mapStatus.getPlaylistViewId();objParams.intViewId=intViewId;var strUrl='retrieveGeometriesInTilesForPlaylistView';}
else
{var strUrl='retrieveGeometriesInTiles';}
var objSettings={blnApplyPrefix:true,strResponseDataType:'json',objOnSuccess:function(XMLHttpRequest)
{Profiler.profile('view/components/map/assets/javascript/map.js',4724,'objOnSuccess:','function(XMLHttpRequest)',arguments);_this.registerLayerGeometries(XMLHttpRequest);}};this.ajaxRequest(strUrl,objParams,null,objSettings);},retrieveGeometriesForTile:function(objTileDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4733,'retrieveGeometriesForTile:','function(objTileDetails)',arguments);var strTileCoords=objTileDetails.intX+'_'+objTileDetails.intY;if(typeof(this.objTileGeometryCacheDetails[strTileCoords])!='undefined')
{var intCurrentTileSrid=this.objTileGeometryCacheDetails[strTileCoords].intSrid;var intCurrentTileScale=this.objTileGeometryCacheDetails[strTileCoords].intScale;if(intCurrentTileSrid==objTileDetails.intSrid&&intCurrentTileScale==objTileDetails.intScale&&this.objTileGeometryCacheDetails[strTileCoords].blnForceUpdate!==true)
{return;}}
else
{this.objTileGeometryCacheDetails[strTileCoords]={};}
this.objCurrentLayerGeometries[strTileCoords]={};this.objTileGeometryCacheDetails[strTileCoords].intSrid=objTileDetails.intSrid;this.objTileGeometryCacheDetails[strTileCoords].intScale=objTileDetails.intScale;this.objTileGeometryCacheDetails[strTileCoords].blnForceUpdate=false;var blnPlaylistMode=this.objEMController.mapStatus.getPlaylistMode();if(blnPlaylistMode===true)
{var intViewId=this.objEMController.mapStatus.getPlaylistViewId();objTileDetails.intViewId=intViewId;var strUrl='retrieveGeometriesInTileForPlaylistView';}
else
{var strUrl='retrieveGeometriesInTile';}
var _this=this;var objSettings={blnApplyPrefix:true,strResponseDataType:'json',objOnSuccess:function(XMLHttpRequest)
{Profiler.profile('view/components/map/assets/javascript/map.js',4786,'objOnSuccess:','function(XMLHttpRequest)',arguments);_this.registerLayerGeometries(XMLHttpRequest);}};this.ajaxRequest(strUrl,objTileDetails,null,objSettings);},registerLayerGeometries:function(arrGeometries)
{Profiler.profile('view/components/map/assets/javascript/map.js',4795,'registerLayerGeometries:','function(arrGeometries)',arguments);var _this=this;$j.each(arrGeometries,function(mixIndex,objGeometry)
{Profiler.profile('view/components/map/assets/javascript/map.js',4799,'$j.each(arrGeometries,','function(mixIndex, objGeometry)',arguments);if(typeof(objGeometry.intResourceId)=='undefined')
{return true;}
var strTileCoords=objGeometry.intTileX+'_'+objGeometry.intTileY;if(typeof(_this.objCurrentLayerGeometries[strTileCoords])=='undefined')
{_this.objCurrentLayerGeometries[strTileCoords]={};}
if(typeof(_this.objCurrentLayerGeometries[strTileCoords][objGeometry.strType])=='undefined')
{_this.objCurrentLayerGeometries[strTileCoords][objGeometry.strType]={};}
_this.objCurrentLayerGeometries[strTileCoords][objGeometry.strType][objGeometry.intResourceId]={intTopicId:objGeometry.intTopicId,strTopicName:objGeometry.strTopicName,strResourceName:objGeometry.strResourceName,strResourceType:objGeometry.strResourceType,intHiddenResources:objGeometry.intHiddenResources,intHiddenTopics:objGeometry.intHiddenTopics,intIconSize:(objGeometry.strType=='topics')?20:40,x:objGeometry.x,y:objGeometry.y,intSrid:objGeometry.intSrid,intScale:objGeometry.intScale,arrOverridingTopicDetails:objGeometry.arrOverridingTopicDetails};});ResourceExplorer.hideTopicActivity();},unregisterLayerGeometries:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4839,'unregisterLayerGeometries:','function()',arguments);this.objCurrentLayerGeometries={};},updateTileCache:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4844,'updateTileCache:','function()',arguments);var _this=this;this.unregisterLayerGeometries();$j.each(this.objTileGeometryCacheDetails,function(strTileCoords,objTileDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4852,'$j.each(this.objTileGeometryCacheDetails,','function(strTileCoords, objTileDetails)',arguments);_this.objTileGeometryCacheDetails[strTileCoords].blnForceUpdate=true;});},resetCurrentPageResultGeometries:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4860,'resetCurrentPageResultGeometries:','function()',arguments);var objFavouritesSetGeometries={};$j.each(this.objCurrentPageResultGeometries,$j.proxy(function(intItemKey,objItem)
{Profiler.profile('view/components/map/assets/javascript/map.js',4865,'$j.each(this.objCurrentPageResultGeometries, $j.proxy(','function(intItemKey, objItem)',arguments);if(objItem.blnFavouritesSetResource===true)
{objFavouritesSetGeometries[intItemKey]=objItem;}
else
{this.objStampDisplay.removePoint(objItem['objStampSymbolInstance']);}},this));this.objCurrentPageResultGeometries=objFavouritesSetGeometries;},resetFavouritesSetGeometries:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',4884,'resetFavouritesSetGeometries:','function()',arguments);var objResultsGeometries={};$j.each(this.objCurrentPageResultGeometries,$j.proxy(function(intItemKey,objItem)
{Profiler.profile('view/components/map/assets/javascript/map.js',4889,'$j.each(this.objCurrentPageResultGeometries, $j.proxy(','function(intItemKey, objItem)',arguments);if(objItem.blnResultResource===true)
{objResultsGeometries[intItemKey]=objItem;}
else
{this.objStampDisplay.removePoint(objItem['objStampSymbolInstance']);}},this));this.objCurrentPageResultGeometries=objResultsGeometries;},registerResultsGeometries:function(intResourceId,intGeometryId,objGeometries,strItemName,strItemType,arrGroupDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4909,'registerResultsGeometries:','function(intResourceId, intGeometryId, objGeometries, strItemName, strItemType, arrGroupDetails)',arguments);var arrGroupDetails=(typeof(arrGroupDetails)!='undefined')?arrGroupDetails:[];if(strItemType=='resource')
{var intItemKey=intResourceId;}
else
{var intItemKey=intGeometryId;}
if(typeof(this.objCurrentPageResultGeometries[intItemKey])!='undefined')
{this.objStampDisplay.removePoint(this.objCurrentPageResultGeometries[intItemKey]['objStampSymbolInstance']);var blnFavouritesSetResource=this.objCurrentPageResultGeometries[intItemKey]['blnFavouritesSetResource'];}
this.objCurrentPageResultGeometries[intItemKey]={};this.objCurrentPageResultGeometries[intItemKey]['strItemName']=strItemName;this.objCurrentPageResultGeometries[intItemKey]['strItemType']=strItemType;this.objCurrentPageResultGeometries[intItemKey]['intResourceId']=intResourceId;this.objCurrentPageResultGeometries[intItemKey]['intGeometryId']=intGeometryId;this.objCurrentPageResultGeometries[intItemKey]['arrGeometriesFirstPoint']=objGeometries['arrFirstCoordPair'];this.objCurrentPageResultGeometries[intItemKey]['arrGeometries']=objGeometries['arrAllCoordPairs'];this.objCurrentPageResultGeometries[intItemKey]['arrGroupDetails']=arrGroupDetails;this.objCurrentPageResultGeometries[intItemKey]['objStampSymbolInstance']=null;this.objCurrentPageResultGeometries[intItemKey]['blnResultResource']=true;this.objCurrentPageResultGeometries[intItemKey]['blnFavouritesSetResource']=blnFavouritesSetResource;var resourceExplorer=Shell.getActiveResourceExplorer();if(resourceExplorer!=null)
{if(resourceExplorer.getDisplayResultsOnMapMode())
{this.objCurrentPageResultGeometries[intItemKey]['objStampSymbolInstance']=this.createMapSymbolStamp(intResourceId,intGeometryId,objGeometries['arrFirstCoordPair'],strItemName,strItemType,intItemKey);}}},registerFavouritesSetGeometries:function(intResourceId,intGeometryId,objGeometries,strItemName,strItemType,arrGroupDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',4960,'registerFavouritesSetGeometries:','function(intResourceId, intGeometryId, objGeometries, strItemName, strItemType, arrGroupDetails)',arguments);var arrGroupDetails=(typeof(arrGroupDetails)!='undefined')?arrGroupDetails:[];if(strItemType=='resource')
{var intItemKey=intResourceId;}
else
{var intItemKey=intGeometryId;}
if(typeof(this.objCurrentPageResultGeometries[intItemKey])!='undefined')
{this.objStampDisplay.removePoint(this.objCurrentPageResultGeometries[intItemKey]['objStampSymbolInstance']);var blnResultResource=this.objCurrentPageResultGeometries[intItemKey]['blnResultResource'];}
this.objCurrentPageResultGeometries[intItemKey]={};this.objCurrentPageResultGeometries[intItemKey]['strItemName']=strItemName;this.objCurrentPageResultGeometries[intItemKey]['strItemType']=strItemType;this.objCurrentPageResultGeometries[intItemKey]['intResourceId']=intResourceId;this.objCurrentPageResultGeometries[intItemKey]['intGeometryId']=intGeometryId;this.objCurrentPageResultGeometries[intItemKey]['arrGeometriesFirstPoint']=objGeometries['arrFirstCoordPair'];this.objCurrentPageResultGeometries[intItemKey]['arrGeometries']=objGeometries['arrAllCoordPairs'];this.objCurrentPageResultGeometries[intItemKey]['arrGroupDetails']=arrGroupDetails;this.objCurrentPageResultGeometries[intItemKey]['objStampSymbolInstance']=null;this.objCurrentPageResultGeometries[intItemKey]['blnResultResource']=blnResultResource;this.objCurrentPageResultGeometries[intItemKey]['blnFavouritesSetResource']=true;this.objCurrentPageResultGeometries[intItemKey]['objStampSymbolInstance']=this.createMapSymbolStamp(intResourceId,intGeometryId,objGeometries['arrFirstCoordPair'],strItemName,strItemType,intItemKey);},createMapSymbolStamp:function(intResourceId,intGeometryId,arrGeometries,strItemName,strItemType,intItemKey,strFilename)
{Profiler.profile('view/components/map/assets/javascript/map.js',5004,'createMapSymbolStamp:','function(intResourceId, intGeometryId, arrGeometries, strItemName, strItemType, intItemKey, strFilename)',arguments);var objExistingMapSymbol=$j('#mapSymbol_'+intItemKey);if(objExistingMapSymbol.length>0)
{var strSymbolStampSrc=objExistingMapSymbol.attr('src');var strSymbolStampSrcOriginal=objExistingMapSymbol.attr('original_src');var strSymbolStampSrcOriginalActive=objExistingMapSymbol.attr('original_src').gsub('disabled/','');}
else
{var objSubdomains=Shell.getWebsiteSubdomains();var strSymbolStampSrc=objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_blue.png';var strSymbolStampSrcOriginal=strSymbolStampSrc;var strSymbolStampSrcOriginalActive=strSymbolStampSrc;}
var objLastCoordPair=arrGeometries.last();var objStamp={'strId':'mapSymbolStamp_'+intItemKey,'strClass':'resourceExplorerResourceStamp','strIconPath':strSymbolStampSrcOriginalActive,'objPoint':{'x':objLastCoordPair['x'],'y':objLastCoordPair['y'],'srid':objLastCoordPair['srid']},'objData':{'arrPopupGeometryIds':[{container_node_id:intResourceId,id:intGeometryId}],'objPopupGeometry':{x:objLastCoordPair['x'],y:objLastCoordPair['y'],srid:objLastCoordPair['srid']},'intResourceId':intResourceId,'intGeometryId':intGeometryId,'intTopicId':null,'strTopicName':'Resource','strResourceTitle':strItemName,'strResourceType':strItemType,'intHiddenResources':0,'intHiddenTopics':0,'blnTransparentBoxOutput':true,'blnTopicNameOnHoverDisabled':ResourceExplorer.getTopicNameOnHoverDisabled()}};var arrStampDetails=Map.setStampState(this.objStampDisplay,[objStamp]);objExistingMapSymbol=null;strSymbolStampSrc=null;strSymbolStampSrcOriginal=null;strSymbolStampSrcOriginalActive=null;intResourceId=null;strResourceTitle=null;strResourceType=null;objGeometries=null;objStamp=null;objTagStampDetails=null;return arrStampDetails[0].objStampInstance;},createCurrentPagesMapSymbolStamps:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5086,'createCurrentPagesMapSymbolStamps:','function()',arguments);var resourceExplorer=Shell.getActiveResourceExplorer();var blnDisplayResultsOnMap=(resourceExplorer!=null)?resourceExplorer.getDisplayResultsOnMapMode():false;switch(blnDisplayResultsOnMap)
{case true:var _this=this;$j.each(this.objCurrentPageResultGeometries,function(strKey,objGeometry)
{Profiler.profile('view/components/map/assets/javascript/map.js',5099,'$j.each(this.objCurrentPageResultGeometries,','function(strKey, objGeometry)',arguments);_this.createMapSymbolStamp(objGeometry['intResourceId'],objGeometry['intGeometryId'],objGeometry['arrGeometriesFirstPoint'],objGeometry['strItemName'],objGeometry['strItemType'],strKey);});break;case false:this.removeAllMapSymbolStamps();break;}},removeAllMapSymbolStamps:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5117,'removeAllMapSymbolStamps:','function()',arguments);this.objStampDisplay.removeAllPoints();this.objLastTemporaryStampInstance=null;},removeAllTemporaryMapSymbolStamps:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5125,'removeAllTemporaryMapSymbolStamps:','function()',arguments);if(this.objLastTemporaryStampInstance!=null)
{this.objStampDisplay.removePoint(this.objLastTemporaryStampInstance);this.objLastTemporaryStampInstance=null;}},getResourceIdForCalloutBox:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5134,'getResourceIdForCalloutBox:','function()',arguments);if(this.blnPopupInExpandedMode===true)
{return this.objResourceDetailsTransparentBox.intResourceId;}
else
{return null;}},showStampDetails:function(objStamp,objStampSettings,blnForceUpdate)
{Profiler.profile('view/components/map/assets/javascript/map.js',5146,'showStampDetails:','function(objStamp, objStampSettings, blnForceUpdate)',arguments);if(this.objQueryWidget.mouseAction==this.objQueryWidget.RDRAG)
{return;}
$j('#ezMaps').stopTime('checkMouseOverResource');var objBrowserDetails=Shell.getBrowserDetails();this.createHoverContainer();var objHoverElement=$j('#resource_hover_container');if(this.blnPopupInExpandedMode===true&&blnForceUpdate!==true)
{return;}
this.resetHoverContainer();objHoverElement.unbind('mouseout').bind('mouseout',{objMap:this,intResourceId:objStampSettings.intResourceId},function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',5175,'objHoverElement.unbind(\'mouseout\').bind(\'mouseout\', {objMap: this, intResourceId: objStampSettings.intResourceId},','function(event)',arguments);var objElement=$j(this);var objPosition=objElement.offset();var intWidth=parseInt(objElement.outerWidth());var intHeight=objElement.outerHeight();if(event.pageX-1<objPosition.left||event.pageX+1>objPosition.left+intWidth||event.pageY-1<objPosition.top||event.pageY+1>objPosition.top+intHeight)
{ResourceExplorer.unHighlightResource(event.data.intResourceId);Favourites.unHighlightResource(event.data.intResourceId);event.data.objMap.unHighlightStamp(event.data.intResourceId);Map.hideStampDetails();}
return false;});var objHoverAreaTopicTitle=$j('#resource_hover_content_topic_title');var objHoverAreaMoreResults=$j('#resource_hover_content_more_results');this.objResourceDetailsTransparentBox.intResourceId=objStampSettings.intResourceId;this.objResourceDetailsTransparentBox.strResourceType=objStampSettings.strResourceType;var objPreviousStamp=$j(document).data('objActiveStampElement');if(objPreviousStamp!=null)
{var objPreviousStampParent=$j(objPreviousStamp).parent();objPreviousStampParent.css('z-index',$j(document).data('objActiveStampElementZIndex'));}
$j(document).data('objActiveStampElement',objStamp);var objStampParent=$j(objStamp).parent().get(0);$j(objStampParent).css('z-index',1001);var objStampOffset=$j(objStamp).offset();var intStampRelativePositionLeft=parseInt($j(objStampParent).css('left'));var intStampRelativePositionBottom=parseInt($j(objStampParent).css('bottom'));var intStampAbsolutePositionLeft=parseInt(objStampOffset.left);if((intStampAbsolutePositionLeft+parseInt(objHoverElement.css('width')))>(parseInt($j(document).width())+parseInt($j(document).scrollLeft())))
{objHoverElement.css({'left':(intStampRelativePositionLeft-parseInt(objHoverElement.css('width'))+30)+'px','bottom':(intStampRelativePositionBottom-15)+'px'});objHoverAreaTopicTitle.css({'padding-left':'8px','padding-right':'40px'});objHoverAreaMoreResults.css({'right':'35px'});objHoverElement.attr('strOrientation','left');}
else
{objHoverElement.css({'left':intStampRelativePositionLeft+'px','bottom':(intStampRelativePositionBottom-15)+'px'});objHoverAreaTopicTitle.css({'padding-left':'40px','padding-right':'8px'});objHoverAreaMoreResults.css({'right':'0px'});objHoverElement.attr('strOrientation','right');}
if(objStampSettings.intHiddenResources>0)
{var intCharacterLimit=this.objResourceDetailsTransparentBox.intHoverAreaWithMoreResourcesCharacterLimit;}
else
{var intCharacterLimit=this.objResourceDetailsTransparentBox.intHoverAreaCharacterLimit;}
if(!objStampSettings.strTopicName)
{objStampSettings.strTopicName='Resource';}
if(objStampSettings.strTopicName.length>(intCharacterLimit-5))
{objStampSettings.strTopicName=objStampSettings.strTopicName.substring(0,intCharacterLimit-5)+'...';}
if(!objStampSettings.strResourceTitle)
{objStampSettings.strResourceTitle='Untitled';}
if(objStampSettings.strResourceTitle.length>intCharacterLimit)
{objStampSettings.strResourceTitle=objStampSettings.strResourceTitle.substring(0,intCharacterLimit)+'...';}
objHoverAreaTopicTitle.html('<p style="font-weight:bold;">'+objStampSettings.strTopicName+'</p><p style="margin-top:5px;font-weight:normal;font-size:10px;">'+objStampSettings.strResourceTitle+'</p>');if(objStampSettings.intHiddenResources>0)
{objHoverAreaMoreResults.show();if(objStampSettings.intHiddenResources>99999)
{var strHiddenResources='&gt; 99999';}
else
{var strHiddenResources='~ '+objStampSettings.intHiddenResources;}
objHoverAreaMoreResults.html('<p style="font-weight:bold;text-align:center;font-size:105%;margin-top:5px;">'+strHiddenResources+'</p><p style="text-align:center;font-size: 80%;margin-top:3px;">'+objStampSettings.intHiddenTopics+' '+(objStampSettings.intHiddenTopics==1?'topic':'topics')+'</p>');var _this=this;objHoverAreaMoreResults.unbind('click').bind('click',{objPopupGeometry:objStampSettings.objPopupGeometry},function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',5341,'objHoverAreaMoreResults.unbind(\'click\').bind(\'click\', {objPopupGeometry: objStampSettings.objPopupGeometry},','function(event)',arguments);var objSubdomains=Shell.getWebsiteSubdomains();$j(this).empty();$j(this).html('<img style="margin-top:12px;margin-left:17px;" src="'+objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_more_results_activity.gif" />');var intSrid=_this.objEMController.mapStatus.getSrid();_this.objResourcePickerResourcePoint={x:event.data.objPopupGeometry.x,y:event.data.objPopupGeometry.y,srid:intSrid};$j('#resourcePickerCarousel').remove();var objParams={intSrid:intSrid,intScale:_this.objEMController.mapStatus.mapOptions.scalesArray[_this.objEMController.mapStatus.getZoomAmount()],intResourceId:objStampSettings.intResourceId,intTopicId:objStampSettings.intTopicId};_this.loadCarousel(_this.strUrlPrefix+'getResourcePickerCarousel/',objParams,function(XMLHttpRequest)
{Profiler.profile('view/components/map/assets/javascript/map.js',5374,'_this.loadCarousel(_this.strUrlPrefix + \'getResourcePickerCarousel/\', objParams,','function(XMLHttpRequest)',arguments);_this.hideStampDetails();_this.initialiseResourcePickerCarousel(XMLHttpRequest);});});}
else
{objHoverAreaMoreResults.hide();}
if($j(objStamp).length>0)
{objHoverElement.show();}},createHoverContainer:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5395,'createHoverContainer:','function()',arguments);if($j('#resource_hover_container').length==0)
{var _this=this;var objHoverAreaContainer=document.createElement('div');$j(objHoverAreaContainer).attr('id','resource_hover_container');$j(objHoverAreaContainer).css({'position':'absolute','width':this.objResourceDetailsTransparentBox.intHoverWidth+'px','height':this.objResourceDetailsTransparentBox.intHoverHeight+'px','padding':'5px','color':'#FFFFFF','font-weight':'bold','display':'none','z-index':'1000'});var objHoverArea=document.createElement('div');$j(objHoverArea).attr('id','resource_hover_content');$j(objHoverArea).css({'position':'relative','top':'0px','left':'0px','height':'100%','margin-top':'-5px'});var objSubdomains=Shell.getWebsiteSubdomains();$j(objHoverArea).css({'background-image':'url('+objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_middle.png)','background-repeat':'repeat'});objHoverAreaContainer.appendChild(objHoverArea);var objHoverAreaImageTopLeft=document.createElement('img');$j(objHoverAreaImageTopLeft).attr('id','resource_hover_content_image_top_left');$j(objHoverAreaImageTopLeft).css({'position':'absolute','left':'-5px','top':'0px','width':'5px','height':'5px'});var objHoverAreaImageTopRight=document.createElement('img');$j(objHoverAreaImageTopRight).attr('id','resource_hover_content_image_top_right');$j(objHoverAreaImageTopRight).css({'position':'absolute','right':'-5px','top':'0px','width':'5px','height':'5px'});var objHoverAreaImageBottomLeft=document.createElement('img');$j(objHoverAreaImageBottomLeft).attr('id','resource_hover_content_image_bottom_left');$j(objHoverAreaImageBottomLeft).css({'position':'absolute','left':'-5px','bottom':'0px','width':'5px','height':'5px'});var objHoverAreaImageBottomRight=document.createElement('img');$j(objHoverAreaImageBottomRight).attr('id','resource_hover_content_image_bottom_right');$j(objHoverAreaImageBottomRight).css({'position':'absolute','right':'-5px','bottom':'0px','width':'5px','height':'5px'});var objHoverAreaImageLeftContainer=document.createElement('div');$j(objHoverAreaImageLeftContainer).attr('id','resource_hover_content_image_left_container');$j(objHoverAreaImageLeftContainer).css({'position':'absolute','left':'-5px','top':'5px','width':'5px','height':'100%','overflow':'hidden'});var objHoverAreaImageLeft=document.createElement('img');$j(objHoverAreaImageLeft).attr('id','resource_hover_content_image_left');$j(objHoverAreaImageLeft).css({'width':'5px','height':'100%','margin-top':'-10px'});var objHoverAreaImageRightContainer=document.createElement('div');$j(objHoverAreaImageRightContainer).attr('id','resource_hover_content_image_right_container');$j(objHoverAreaImageRightContainer).css({'position':'absolute','right':'-5px','top':'5px','width':'5px','height':'100%','overflow':'hidden'});var objHoverAreaImageRight=document.createElement('img');$j(objHoverAreaImageRight).attr('id','resource_hover_content_image_right');$j(objHoverAreaImageRight).css({'width':'5px','height':'100%','margin-top':'-10px'});objHoverAreaImageLeftContainer.appendChild(objHoverAreaImageLeft);objHoverAreaImageRightContainer.appendChild(objHoverAreaImageRight);$j(objHoverAreaImageTopLeft).attr('src',objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_edge_top_left.png');$j(objHoverAreaImageTopRight).attr('src',objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_edge_top_right.png');$j(objHoverAreaImageBottomLeft).attr('src',objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_edge_bottom_left.png');$j(objHoverAreaImageBottomRight).attr('src',objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_edge_bottom_right.png');$j(objHoverAreaImageLeft).attr('src',objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_middle.png');$j(objHoverAreaImageRight).attr('src',objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_middle.png');objHoverArea.appendChild(objHoverAreaImageTopLeft);objHoverArea.appendChild(objHoverAreaImageTopRight);objHoverArea.appendChild(objHoverAreaImageBottomLeft);objHoverArea.appendChild(objHoverAreaImageBottomRight);objHoverArea.appendChild(objHoverAreaImageLeftContainer);objHoverArea.appendChild(objHoverAreaImageRightContainer);var objHoverAreaTopicTitle=document.createElement('div');$j(objHoverAreaTopicTitle).attr('id','resource_hover_content_topic_title');$j(objHoverAreaTopicTitle).css({'position':'relative','padding-top':'8px','padding-bottom':'8px','padding-left':'40px','padding-right':'8px','font-size':'12px','width':'175px'});objHoverArea.appendChild(objHoverAreaTopicTitle);var objHoverAreaMoreResults=document.createElement('div');$j(objHoverAreaMoreResults).attr('id','resource_hover_content_more_results');$j(objHoverAreaMoreResults).css({'position':'absolute','font-size':'12px','width':'50px','height':'40px','top':'5px','right':'0px','background-image':'url('+objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_tag_hoverbackground_more_results.png)','cursor':'pointer'});objHoverArea.appendChild(objHoverAreaMoreResults);var objHoverAreaText=document.createElement('div');$j(objHoverAreaText).attr('id','resource_hover_content_text');$j(objHoverAreaText).css({'position':'relative','font-size':'12px','height':'100%','padding-top':'10px','padding-bottom':'40px','padding-left':'10px','padding-right':'10px','display':'none'});objHoverArea.appendChild(objHoverAreaText);$j('#ezMaps div.widgetsTop div.iconsDiv:first').append(objHoverAreaContainer);var objCloseImage=document.createElement('div');$j(objCloseImage).attr({'id':'resource_close_button'});$j(objCloseImage).css({'position':'absolute','width':'25px','height':'25px','top':'5px','right':'10px','margin-right':'-3px','background-image':'url('+objSubdomains.images+'/view/shared/assets/images/windows/close.png)','cursor':'pointer','display':'none'});objHoverArea.appendChild(objCloseImage);$j(objCloseImage).bind('click',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5626,'$j(objCloseImage).bind(\'click\',','function()',arguments);Map.closeResourceDetails();});var objFavouritesImage=document.createElement('div');$j(objFavouritesImage).attr({'id':'resource_favourites_button'});$j(objFavouritesImage).css({'position':'absolute','width':'25px','height':'25px','top':'5px','right':'60px','margin-right':'-3px','background-image':'url('+objSubdomains.images+'/view/shared/assets/images/favourites/not_favourite_25px.png)','cursor':'pointer','display':'none'});objHoverArea.appendChild(objFavouritesImage);var objDragImage=document.createElement('div');$j(objDragImage).attr({'id':'resource_hover_drag_handle','title':'Click (hold) and drag to move the box'});$j(objDragImage).css({'position':'absolute','width':'25px','height':'25px','top':'5px','right':'35px','margin-right':'-3px','background-image':'url('+objSubdomains.images+'/view/shared/assets/images/windows/move.png)','cursor':'pointer','display':'none'});objHoverArea.appendChild(objDragImage);$j(objHoverAreaContainer).draggable({distance:20,handle:'#resource_hover_drag_handle',containment:'window',stop:function(event,ui)
{Profiler.profile('view/components/map/assets/javascript/map.js',5681,'stop:','function(event, ui)',arguments);if(_this.objResourceDetailsTransparentBox.blnOutsideEzmaps===false)
{var objElement=$j(objHoverAreaContainer);var intTop=-parseInt(objElement.css('top'));var intHeight=parseInt(objElement.outerHeight());var intBottom=intTop-intHeight;objElement.css({'top':'auto','bottom':intBottom+'px','margin-bottom':'0px'});_this.objResourceDetailsTransparentBox.intResourceDetailsMarginBottom=0;_this.objResourceDetailsTransparentBox.blnAlreadyExpandedResourceDetails=false;}}});$j('#resource_hover_drag_handle').bind('mousedown',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5708,'$j(\'#resource_hover_drag_handle\').bind(\'mousedown\',','function()',arguments);$j('#ezMaps div').disableSelection();});$j('#resource_hover_drag_handle').bind('mouseup',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5713,'$j(\'#resource_hover_drag_handle\').bind(\'mouseup\',','function()',arguments);$j('#ezMaps div').enableSelection();});this.makeBackgroundPngTransparent('resource_hover_drag_handle',false,25,25);this.makeBackgroundPngTransparent('resource_close_button',false,25,25);this.makeBackgroundPngTransparent('resource_favourites_button',false,25,25);}},resetHoverContainer:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5725,'resetHoverContainer:','function()',arguments);var objHoverElement=$j('#resource_hover_container');objHoverElement.stop(true,true);var objHoverArea=$j('#resource_hover_content');var objHoverAreaTopicTitle=$j('#resource_hover_content_topic_title');var objHoverAreaMoreResults=$j('#resource_hover_content_more_results');var objHoverAreaText=$j('#resource_hover_content_text');objHoverElement.css({'width':this.objResourceDetailsTransparentBox.intHoverWidth+'px','height':this.objResourceDetailsTransparentBox.intHoverHeight+'px','top':'auto','margin-left':'0px','margin-bottom':'0px'});$j('#resource_hover_drag_handle').hide();$j('#resource_close_button').hide();$j('#resource_favourites_button').hide();objHoverAreaTopicTitle.show();objHoverAreaMoreResults.show();objHoverAreaText.hide();objHoverAreaText.html('Loading, please wait...');if(this.objResourceDetailsTransparentBox.blnOutsideEzmaps===true)
{objHoverElement.appendTo(this.objResourceDetailsTransparentBox.objParentElement);this.objResourceDetailsTransparentBox.blnOutsideEzmaps=false;}
this.blnPopupInExpandedMode=false;this.objResourceDetailsTransparentBox.blnWidthResizedForContent=false;this.objResourceDetailsTransparentBox.blnHeightResizedForContent=false;this.objResourceDetailsTransparentBox.blnAlreadyExpandedResourceDetails=false;},hideStampDetails:function(blnForceClose)
{Profiler.profile('view/components/map/assets/javascript/map.js',5783,'hideStampDetails:','function(blnForceClose)',arguments);if(this.objHoverDetailsTemporaryStamp)
{this.objTagStampDisplay.removeAllPoints();this.objHoverDetailsTemporaryStamp=null;}
this.objHoverDetailsGeometry=null;var objHoverElement=$j('#resource_hover_container');if((this.blnPopupInExpandedMode===false)||(blnForceClose===true))
{$j('#resource_hover_drag_handle').hide();$j('#resource_close_button').hide();$j('#resource_favourites_button').hide();objHoverElement.stop(true,true).hide();this.blnPopupInExpandedMode=false;}
if((this.blnOpenResourcePickerOnClose===true)&&(this.blnPopupInExpandedMode===false))
{$j('#resourcePickerCarousel').css({'margin-left':-($j('#resourcePickerCarousel').outerWidth()/2)});this.blnOpenResourcePickerOnClose=false;}},showAllCurrentPagesGeometries:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',5827,'showAllCurrentPagesGeometries:','function()',arguments);var arrCurrentPageResultGeometriesKeys=$j.map(this.objCurrentPageResultGeometries,function(strValue,strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',5829,'var arrCurrentPageResultGeometriesKeys = $j.map(this.objCurrentPageResultGeometries,','function(strValue, strKey)',arguments);return strKey;});if(arrCurrentPageResultGeometriesKeys.length>0)
{var arrAllResourcesGeometries=[];$j.each(this.objCurrentPageResultGeometries,function(strKey,objGeometry)
{Profiler.profile('view/components/map/assets/javascript/map.js',5840,'$j.each(this.objCurrentPageResultGeometries,','function(strKey, objGeometry)',arguments);var arrGeometries=objGeometry['arrGeometries'];arrAllResourcesGeometries.push(arrGeometries);});arrAllResourcesGeometries=arrAllResourcesGeometries.concat.apply([],arrAllResourcesGeometries);this.objEMController.jumpToPoints(arrAllResourcesGeometries);}},showGeometries:function(arrGeometries)
{Profiler.profile('view/components/map/assets/javascript/map.js',5857,'showGeometries:','function(arrGeometries)',arguments);this.objEMController.jumpToPoints(arrGeometries);},showPlace:function(arrGeometries)
{Profiler.profile('view/components/map/assets/javascript/map.js',5865,'showPlace:','function(arrGeometries)',arguments);var blnJumpSuccess=this.objEMController.jumpToPoints(arrGeometries);if(this.objEMController.isLocked()&&!blnJumpSuccess)
{blnJumpSuccess=true;}
return blnJumpSuccess;},showOSGridRef:function(objGeometries)
{Profiler.profile('view/components/map/assets/javascript/map.js',5882,'showOSGridRef:','function(objGeometries)',arguments);var arrBoundingBoxGeometries=objGeometries['arrAllCoordPairs'];this.showGeometries(arrBoundingBoxGeometries);},expandTransparentBoxForContent:function(objHoverElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',5891,'expandTransparentBoxForContent:','function(objHoverElement)',arguments);if(this.objResourceDetailsTransparentBox.blnOutsideEzmaps===true)
{objHoverElement.appendTo(this.objResourceDetailsTransparentBox.objParentElement);this.objResourceDetailsTransparentBox.blnOutsideEzmaps=false;}
var intExpandedBoxWidth=this.objResourceDetailsTransparentBox.intResourceDetailsDefaultWidth;var intExpandedBoxHeight=this.objResourceDetailsTransparentBox.intResourceDetailsDefaultHeight;var intExpandedBoxFullWidth=intExpandedBoxWidth+parseInt(objHoverElement.css('padding-left'))+parseInt(objHoverElement.css('padding-right'));var intExpandedBoxFullHeight=intExpandedBoxHeight+parseInt(objHoverElement.css('padding-top'))+parseInt(objHoverElement.css('padding-bottom'));var objMargins=this.getMarginsForExpandedTransparentBox(intExpandedBoxWidth,intExpandedBoxHeight);var intMarginLeft=objMargins.intMarginLeft;var intMarginBottom=objMargins.intMarginBottom;this.objResourceDetailsTransparentBox.intResourceDetailsWidth=intExpandedBoxWidth;this.objResourceDetailsTransparentBox.intResourceDetailsHeight=intExpandedBoxHeight;this.objResourceDetailsTransparentBox.intResourceDetailsMarginLeft=intMarginLeft;this.objResourceDetailsTransparentBox.intResourceDetailsMarginBottom=intMarginBottom;var strEasingMethod='easeOutElastic';var objHoverAreaTopicTitle=$j('#resource_hover_content_topic_title');var objHoverAreaMoreResults=$j('#resource_hover_content_more_results');var objHoverAreaText=$j('#resource_hover_content_text');$j('#resource_hover_drag_handle').show();$j('#resource_close_button').show();$j('#resource_favourites_button').show();objHoverAreaTopicTitle.hide();objHoverAreaMoreResults.hide();objHoverAreaText.show();this.blnPopupInExpandedMode=true;objHoverElement.animate
({'width':intExpandedBoxWidth+'px','height':intExpandedBoxHeight+'px','marginBottom':intMarginBottom+'px','marginLeft':intMarginLeft+'px'},1000,strEasingMethod,function(){});},resizeTransparentBoxWidthForContent:function(objContainer)
{Profiler.profile('view/components/map/assets/javascript/map.js',5959,'resizeTransparentBoxWidthForContent:','function(objContainer)',arguments);if(this.objResourceDetailsTransparentBox.blnWidthResizedForContent===true)
{return;}
else
{this.objResourceDetailsTransparentBox.blnWidthResizedForContent=true;}
var objHoverElement=$j('#resource_hover_container');if(objHoverElement.css('display')=='none')
{return;}
$j('#resourceBody').css('height','auto');if(objContainer.tagName.toLowerCase()=='iframe')
{var intContentWidth=$j(objContainer).contents().find('body').attr('scrollWidth');}
else
{if($j('#resource_details_image').length>0)
{resizeImageToFit('resource_details_image',this.objResourceDetailsTransparentBox.intResourceDetailsDefaultWidth-20,this.objResourceDetailsTransparentBox.intResourceDetailsDefaultWidth-20,true);}
var intContentWidth=$j(objContainer).attr('scrollWidth');}
var intMaxElementWidth=0;$j(objContainer).contents().find('div,table,img,object,embed').each(function(strIndex,objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',6004,'$j(objContainer).contents().find(\'div,table,img,object,embed\').each(','function(strIndex, objElement)',arguments);if($j(objElement).width()>intMaxElementWidth)
{intMaxElementWidth=$j(objElement).width();}});if(intMaxElementWidth>intContentWidth)
{intContentWidth=intMaxElementWidth;}
var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6018,'var objOnComplete =','function()',arguments);Map.resizeTransparentBoxHeightForContent(objContainer);};this.setTransparentBoxWidthForContent(objContainer,intContentWidth,objOnComplete);},resizeTransparentBoxHeightForContent:function(objContainer)
{Profiler.profile('view/components/map/assets/javascript/map.js',6026,'resizeTransparentBoxHeightForContent:','function(objContainer)',arguments);if(this.objResourceDetailsTransparentBox.blnHeightResizedForContent===true)
{return;}
else
{this.objResourceDetailsTransparentBox.blnHeightResizedForContent=true;}
$j('#resourceBody').css('height','auto');if(objContainer.tagName.toLowerCase()=='iframe')
{var intContentHeight=$j(objContainer).contents().find('body').attr('scrollHeight');}
else
{var intContentHeight=$j(objContainer).attr('scrollHeight');var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer")
{var intContentHeight=$j(objContainer).attr('scrollHeight');}}
var intMaxElementHeight=0;$j(objContainer).contents().find('div,table,img,object,embed').each(function(strIndex,objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',6063,'$j(objContainer).contents().find(\'div,table,img,object,embed\').each(','function(strIndex, objElement)',arguments);if($j(objElement).height()>intMaxElementHeight)
{intMaxElementHeight=$j(objElement).height();}});if(intMaxElementHeight>intContentHeight)
{intContentHeight=intMaxElementHeight;}
this.setTransparentBoxHeightForContent(objContainer,intContentHeight);},setTransparentBoxWidthForContent:function(objContainer,intWidth,objOnComplete)
{Profiler.profile('view/components/map/assets/javascript/map.js',6079,'setTransparentBoxWidthForContent:','function(objContainer, intWidth, objOnComplete)',arguments);var objHoverElement=$j('#resource_hover_container');if((intWidth+20)<this.objResourceDetailsTransparentBox.intResourceDetailsDefaultWidth)
{intWidth=this.objResourceDetailsTransparentBox.intResourceDetailsDefaultWidth-20;}
var intWidthAvailableForContent=this.objResourceDetailsTransparentBox.intResourceDetailsDefaultWidth-40-25;var screenDim=this.objEMController.mapStatus.getScreenDimensions();var intMapScreenWidth=screenDim.BRX-40;if(intWidth>intMapScreenWidth)
{if(this.objResourceDetailsTransparentBox.blnOutsideEzmaps!==true)
{var objDocumentOffset=objHoverElement.offset();this.objResourceDetailsTransparentBox.objParentElement=objHoverElement.parent().get(0);objHoverElement.appendTo('body');objHoverElement.css
({'left':parseInt(objDocumentOffset.left)+'px','top':parseInt(objDocumentOffset.top)+'px','margin-left':'0px','margin-bottom':'0px'});this.objResourceDetailsTransparentBox.blnOutsideEzmaps=true;}
var intNewWidth=parseInt($j(window).width())-20;var intNewMarginLeft=0;objHoverElement.animate
({'left':'10px','width':intNewWidth+'px'},'slow','swing',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6136,'','function()',arguments);$j(objContainer).css('width',(intNewWidth-20)+'px');if(typeof(objOnComplete)=='function')
{objOnComplete();}
else
{Map.showContainerInTransparentBox(objContainer);}});}
else
{if(intWidth>intWidthAvailableForContent)
{var objMargins=this.getMarginsForExpandedTransparentBox(intWidth+20,objHoverElement.height());var intNewWidth=intWidth+20;var intNewMarginLeft=parseInt(objMargins.intMarginLeft);objHoverElement.animate
({'width':intNewWidth+'px','margin-left':intNewMarginLeft+'px'},'slow','swing',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6171,'','function()',arguments);$j(objContainer).css('width',(intNewWidth-20)+'px');if(typeof(objOnComplete)=='function')
{objOnComplete();}
else
{Map.showContainerInTransparentBox(objContainer);}});}
else
{var intNewWidth=this.objResourceDetailsTransparentBox.intResourceDetailsWidth;var intNewMarginLeft=this.objResourceDetailsTransparentBox.intResourceDetailsMarginLeft;$j(objContainer).css('width',intWidthAvailableForContent+'px');if(typeof(objOnComplete)=='function')
{objOnComplete();}
else
{Map.showContainerInTransparentBox(objContainer);}}}
this.objResourceDetailsTransparentBox.intResourceDetailsWidth=intNewWidth;this.objResourceDetailsTransparentBox.intResourceDetailsMarginLeft=intNewMarginLeft;},setTransparentBoxHeightForContent:function(objContainer,intHeight,objOnComplete)
{Profiler.profile('view/components/map/assets/javascript/map.js',6213,'setTransparentBoxHeightForContent:','function(objContainer, intHeight, objOnComplete)',arguments);var objBrowserDetails=Shell.getBrowserDetails();var objHoverElement=$j('#resource_hover_container');var intHeightAvailableForContent=this.objResourceDetailsTransparentBox.intResourceDetailsDefaultHeight-175;var screenDim=this.objEMController.mapStatus.getScreenDimensions();var intMapScreenHeight=screenDim.TLY-40;if($j('#resource_details_image,#resource_details_video').length>0)
{var intContainerExtraHeight=125;}
else
{var intContainerExtraHeight=175;}
if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{intContainerExtraHeight+=10;}
if((intHeight+intContainerExtraHeight+20)>intMapScreenHeight)
{if(this.objResourceDetailsTransparentBox.blnOutsideEzmaps!==true)
{var objDocumentOffset=objHoverElement.offset();this.objResourceDetailsTransparentBox.objParentElement=objHoverElement.parent().get(0);objHoverElement.appendTo('body');objHoverElement.css
({'left':parseInt(objDocumentOffset.left)+'px','top':parseInt(objDocumentOffset.top)+'px','margin-left':'0px','margin-bottom':'0px'});this.objResourceDetailsTransparentBox.blnOutsideEzmaps=true;}
var intNewHeight=parseInt($j(window).height())-20;var intNewMarginBottom=0;intHeightAvailableForContent=intNewHeight-intContainerExtraHeight;var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{intHeightAvailableForContent=intHeightAvailableForContent-50;}
objHoverElement.animate
({'top':'10px','height':intNewHeight+'px'},'slow','swing',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6290,'','function()',arguments);$j(objContainer).css('height',intHeightAvailableForContent);if(typeof(objOnComplete)=='function')
{objOnComplete();}
else
{Map.showContainerInTransparentBox(objContainer);}});}
else
{if(intHeight>intHeightAvailableForContent)
{intHeightAvailableForContent=intHeight;var objMargins=this.getMarginsForExpandedTransparentBox(objHoverElement.width(),intHeight+intContainerExtraHeight);var intNewHeight=intHeight+intContainerExtraHeight;var intNewMarginBottom=objMargins.intMarginBottom;objHoverElement.animate
({'height':intNewHeight+'px','marginBottom':intNewMarginBottom+'px'},'slow','swing',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6327,'','function()',arguments);$j(objContainer).css('height',intHeightAvailableForContent);if(typeof(objOnComplete)=='function')
{objOnComplete();}
else
{Map.showContainerInTransparentBox(objContainer);}});}
else
{var intNewHeight=this.objResourceDetailsTransparentBox.intResourceDetailsHeight;var intNewMarginBottom=this.objResourceDetailsTransparentBox.intResourceDetailsMarginBottom;$j(objContainer).css('height',intHeightAvailableForContent+'px');if(typeof(objOnComplete)=='function')
{objOnComplete();}
else
{Map.showContainerInTransparentBox(objContainer);}}}
this.objResourceDetailsTransparentBox.intResourceDetailsHeight=intNewHeight;this.objResourceDetailsTransparentBox.intResourceDetailsMarginBottom=intNewMarginBottom;},showContainerInTransparentBox:function(objContainer)
{Profiler.profile('view/components/map/assets/javascript/map.js',6369,'showContainerInTransparentBox:','function(objContainer)',arguments);$j('#resource_details_page_container_loading').hide();$j(objContainer).hide();$j(objContainer).css
({'position':'relative','top':'0px','left':'0px'});$j(objContainer).fadeIn('normal');},getMarginsForExpandedTransparentBox:function(intExpandedBoxWidth,intExpandedBoxHeight)
{Profiler.profile('view/components/map/assets/javascript/map.js',6389,'getMarginsForExpandedTransparentBox:','function(intExpandedBoxWidth, intExpandedBoxHeight)',arguments);var objHoverElement=$j('#resource_hover_container');var objEzMaps=$j('#ezMaps .iconsDiv:first').parent();var objEzMapsDetails={intWidth:parseInt(objEzMaps.outerWidth()),intHeight:parseInt(objEzMaps.outerHeight()),intPaddingLeft:30,intPaddingRight:10,intPaddingTop:40,intPaddingBottom:0};var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{objEzMapsDetails.intPaddingTop=100;}
var intBoxWidth=objHoverElement.outerWidth();var intBoxHeight=objHoverElement.outerHeight();if(this.objResourceDetailsTransparentBox.blnOutsideEzmaps===true)
{var intBoxPosition={intLeft:parseInt(objHoverElement.css('left'))+parseInt(objHoverElement.css('margin-left')),intBottom:parseInt(objHoverElement.css('bottom'))};}
else
{var intBoxPosition={intLeft:parseInt(objHoverElement.css('left'))+parseInt(objHoverElement.parent().css('left'))+parseInt(objHoverElement.css('margin-left')),intBottom:parseInt(objHoverElement.css('bottom'))+parseInt(objHoverElement.parent().css('bottom'))};}
if((intBoxPosition.intBottom+intExpandedBoxHeight)<=(objEzMapsDetails.intHeight-objEzMapsDetails.intPaddingTop))
{var intMarginBottom=parseInt(objHoverElement.css('margin-bottom'));}
else
{var intMarginBottom=((objEzMapsDetails.intHeight-objEzMapsDetails.intPaddingTop)-(intBoxPosition.intBottom+intExpandedBoxHeight));}
if((intBoxPosition.intLeft+intExpandedBoxWidth)<=(objEzMapsDetails.intWidth-objEzMapsDetails.intPaddingRight))
{var intMarginLeft=parseInt(objHoverElement.css('margin-left'));}
else
{var intMarginLeft=((objEzMapsDetails.intWidth-objEzMapsDetails.intPaddingRight)-(intBoxPosition.intLeft+intExpandedBoxWidth))+parseInt(objHoverElement.css('margin-left'));}
return{'intMarginLeft':intMarginLeft,'intMarginBottom':intMarginBottom};},loadNextResourceDetailsInPopup:function(strItemType,intItemId,intItemGeometryId,intResourceNumber,blnThematicMode,intThematicRulesetNodeId)
{Profiler.profile('view/components/map/assets/javascript/map.js',6469,'loadNextResourceDetailsInPopup:','function(strItemType, intItemId, intItemGeometryId, intResourceNumber, blnThematicMode, intThematicRulesetNodeId)',arguments);var intResourceNumber=(typeof(intResourceNumber)=='undefined')?'0':intResourceNumber;var blnThematicMode=(typeof(blnThematicMode)=='undefined')?false:blnThematicMode;var intThematicRulesetNodeId=(typeof(intThematicRulesetNodeId)=='undefined')?null:intThematicRulesetNodeId;if(this.queryResultGeometries.length>1)
{var intTotalResourcesOverride=this.queryResultGeometries.length;var intItemId=this.queryResultGeometries[intResourceNumber]['container_node_id'];var intItemGeometryId=this.queryResultGeometries[intResourceNumber]['id'];var blnThematicMode=(this.queryResultGeometries[intResourceNumber]['mode']=='thematic')?true:false;var intThematicRulesetNodeId=this.queryResultGeometries[intResourceNumber]['node_id'];}
else
{var intTotalResourcesOverride=null;}
var strActiveResourceExplorerTab='';var objResourceExplorer=Shell.getActiveResourceExplorer();if(objResourceExplorer!=null)
{strActiveResourceExplorerTab=objResourceExplorer.getTab();}
var strDisplayMode=(this.blnPopupInExpandedMode)?'expanded':'reduced';var strUrl='getResourceDetails/'+strItemType+"/"+intItemId+"/"+intItemGeometryId+"/"+blnThematicMode+"/"+intThematicRulesetNodeId+"/"+intResourceNumber+"/"+strDisplayMode+"/"+intTotalResourcesOverride+'/'+this.objProgressBar.getCoordinateSystemMode()+'/'+strActiveResourceExplorerTab;if(this.blnOutputResourcesInTransparentBox===true)
{this.objResourceDetailsTransparentBox.intResourceId=intItemId;this.objResourceDetailsTransparentBox.blnWidthResizedForContent=false;this.objResourceDetailsTransparentBox.blnHeightResizedForContent=false;this.update(strUrl,{strOutputResourcesInTransparentBox:'true'},null,'#resource_hover_content_text');}
else
{this.update(strUrl,{strOutputResourcesInTransparentBox:'false'},null,'#popupContentContainerInner');}},showExistingGeocodingInfo:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6530,'showExistingGeocodingInfo:','function()',arguments);this.toggleElement('resourceBody',false);this.toggleElement('existingGeocodingInfo',true);this.toggleElement('initialButtons',false);this.toggleElement('resetPopupButton',true);this.toggleElement('jumpToExistingGeometryButton',true);this.toggleElement('geomEditButtons',true);},hideExistingGeocodingInfo:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6541,'hideExistingGeocodingInfo:','function()',arguments);this.toggleElement('existingGeocodingInfo',false);this.toggleElement('jumpToExistingGeometryButton',false);this.toggleElement('resourceBody',true);this.toggleElement('geomEditButtons',false);this.toggleElement('initialButtons',true);this.toggleElement('resetPopupButton',false);},showExpandedResourceDetails:function(intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',6552,'showExpandedResourceDetails:','function( intResourceId )',arguments);this.blnPopupInExpandedMode=true;this.objMapPopup.setSize(300,300);this.objMapPopup.moveMapForPopup();$j('#collapsedViewContainer').hide();$j('#expandedViewContainer').show();$j('#initialButtons').hide();$j('#resetPopupButton').show();var strUrlSuffix='incrementResourceViews/'+intResourceId;this.notify(strUrlSuffix);},hideExpandedResourceDetails:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6570,'hideExpandedResourceDetails:','function()',arguments);this.blnPopupInExpandedMode=false;$j('#expandedViewContainer').hide();$j('#collapsedViewContainer').show();this.objMapPopup.setSize(250,160);$j('#resetPopupButton').hide();$j('#initialButtons').show();},resetPopupView:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6584,'resetPopupView:','function()',arguments);this.blnPopupInExpandedMode=false;this.hideExistingGeocodingInfo();this.hideExpandedResourceDetails();this.toggleElement('resetPopupButton',false);this.toggleElement('initialButtons',true);},resetQueryResults:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6596,'resetQueryResults:','function()',arguments);this.queryResultGeometries=[];},closeResourceDetails:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6603,'closeResourceDetails:','function()',arguments);this.resetQueryResults();this.blnPopupInExpandedMode=false;this.objMapPopup.hide();this.hideStampDetails(true);},closeMapPopup:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',6618,'closeMapPopup:','function()',arguments);this.objMapPopup.hide();this.hideStampDetails(true);},queryMap:function(arrGeometryIds,objGeocodeData,blnResourceModeStampQuery,blnStampClick)
{Profiler.profile('view/components/map/assets/javascript/map.js',6629,'queryMap:','function(arrGeometryIds, objGeocodeData, blnResourceModeStampQuery, blnStampClick)',arguments);if(typeof(ResourceExplorer)!='undefined'&&blnResourceModeStampQuery)
{ResourceExplorer.highlightItems(arrGeometryIds,objGeocodeData,blnResourceModeStampQuery,blnStampClick);}
else
{this.showQueryResourceGeometries(arrGeometryIds,objGeocodeData,blnStampClick);}},queryMapExternal:function(objGeocodeData,strPopupContent,intPopupWidth,intPopupHeight)
{Profiler.profile('view/components/map/assets/javascript/map.js',6646,'queryMapExternal:','function(objGeocodeData, strPopupContent, intPopupWidth, intPopupHeight)',arguments);var strPopupContent=(typeof(strPopupContent)!='undefined')?strPopupContent:'No content for popup defined!';strPopupContent='<div style="height:'+(intPopupHeight-50)+'px;overflow-y:auto;margin-top:20px;">'+strPopupContent+'</div>';var intPopupWidth=(typeof(intPopupWidth)!='undefined')?intPopupWidth:null;var intPopupHeight=(typeof(intPopupHeight)!='undefined')?intPopupHeight:null;this.generateEzmapsPopup(objGeocodeData,function(){},intPopupWidth,intPopupHeight);$j('#popupContentContainerInner').html(strPopupContent);},queryAnnotationSymbol:function(intLayerId,strStampId)
{Profiler.profile('view/components/map/assets/javascript/map.js',6666,'queryAnnotationSymbol:','function(intLayerId, strStampId)',arguments);if(this.getAnnotationEditingStatus())
{return false;}
var objAnnotationObjectDetails=this.findLayerAnnotationObjectByStampId(intLayerId,strStampId);var objAnnotationObject=objAnnotationObjectDetails.objMatchingAnnotationObject;var objGeocodeDetails=objAnnotationObject.objGeocodeDetails;this.generateEzmapsPopup(objGeocodeDetails,function(){},null,100);var strSymbolDescription=this.getAnnotationSymbolDescription(objAnnotationObject.strFileName);var strImageSource='';if(objAnnotationObject.strFileName.indexOf('http://')==-1)
{strImageSource+=Shell.getWebsiteDomain();}
strImageSource+=objAnnotationObject.strFileName;var strHTML="";strHTML+="<h3 style='font-weight:bold;margin-bottom:50px;'>Map Annotation Details</h3>";strHTML+="<img src='"+strImageSource+"' style='position:absolute;top:25px;left:0px;width:24px;height:24px;' />";strHTML+="<p style='position:absolute;top:25px;left:30px;width:190px;height:50px;border:0px solid red;overflow-y:auto;'>"+strSymbolDescription+"</p>";$j('#popupContentContainerInner').html(strHTML);},showSpecificResourceGeometries:function(intResourceId,blnIncludePopup,blnStampClick)
{Profiler.profile('view/components/map/assets/javascript/map.js',6708,'showSpecificResourceGeometries:','function(intResourceId, blnIncludePopup, blnStampClick)',arguments);if(typeof(this.objCurrentPageResultGeometries[intResourceId])=='undefined')
{return false;}
var intThisResourceId=this.objCurrentPageResultGeometries[intResourceId]['intResourceId'];var intThisResourceGeometryId=this.objCurrentPageResultGeometries[intResourceId]['intGeometryId'];var arrThisResourcesGeometries=this.objCurrentPageResultGeometries[intResourceId]['arrGeometries'];var arrThisResourcesGeometriesFirstPoint=this.objCurrentPageResultGeometries[intResourceId]['arrGeometriesFirstPoint'];var strThisResourceName=this.objCurrentPageResultGeometries[intResourceId]['strItemName'];var strThisResourceType=this.objCurrentPageResultGeometries[intResourceId]['strItemType'];var objThisStampSymbolInstance=this.objCurrentPageResultGeometries[intResourceId]['objStampSymbolInstance'];var arrThisResourcesGroupDetails=this.objCurrentPageResultGeometries[intResourceId]['arrGroupDetails'];var blnGeometryIsWithinExtents=false;this.removeAllTemporaryMapSymbolStamps();this.resetQueryResults();var objLastCoordPair=arrThisResourcesGeometriesFirstPoint[arrThisResourcesGeometriesFirstPoint.length-1];this.objStampDisplay.removePoint(objThisStampSymbolInstance);this.objCurrentPageResultGeometries[intResourceId]['objStampSymbolInstance']=this.createMapSymbolStamp(intResourceId,intThisResourceGeometryId,arrThisResourcesGeometriesFirstPoint,strThisResourceName,strThisResourceType,intResourceId);var arrGroupGeometries=[];$j.each(arrThisResourcesGroupDetails,function(intKey,objGroupMember)
{Profiler.profile('view/components/map/assets/javascript/map.js',6744,'$j.each(arrThisResourcesGroupDetails,','function(intKey, objGroupMember)',arguments);arrGroupGeometries.push({container_node_id:objGroupMember.intNodeId,id:objGroupMember.intGeometryId,mode:'normal',node_id:objGroupMember.intNodeId});});if(arrGroupGeometries.length<=0)
{arrGroupGeometries.push({container_node_id:intThisResourceId,id:intThisResourceGeometryId,mode:'normal',node_id:intThisResourceId});}
if(!blnStampClick)
{var objPoint=new Point(objLastCoordPair['x'],objLastCoordPair['y'],objLastCoordPair['srid']);this.objEMController.jumpToPoints([objPoint]);}
this.showQueryResourceGeometries(arrGroupGeometries,objLastCoordPair,blnStampClick);},showSpecificLinkToUlearnGeometries:function(intResourceId,blnIncludePopup)
{Profiler.profile('view/components/map/assets/javascript/map.js',6767,'showSpecificLinkToUlearnGeometries:','function(intResourceId, blnIncludePopup)',arguments);if(typeof(this.objLinkToUlearnSearchResultGeometries[intResourceId])=='undefined')
{return false;}
var intThisResourceId=this.objLinkToUlearnSearchResultGeometries[intResourceId]['intResourceId'];var intThisResourceGeometryId=this.objLinkToUlearnSearchResultGeometries[intResourceId]['intGeometryId'];var arrThisResourcesGeometries=this.objLinkToUlearnSearchResultGeometries[intResourceId]['arrGeometries'];var arrThisResourcesGeometriesFirstPoint=this.objLinkToUlearnSearchResultGeometries[intResourceId]['arrGeometriesFirstPoint'];var strThisResourceType=this.objLinkToUlearnSearchResultGeometries[intResourceId]['strItemType'];var blnGeometryIsWithinExtents=false;var objLastCoordPair=arrThisResourcesGeometriesFirstPoint[arrThisResourcesGeometriesFirstPoint.length-1];if(blnIncludePopup)
{var intWidth=null;if(strThisResourceType=='geometry')
{intWidth=160;}
this.generateEzmapsPopup(objLastCoordPair,null,250,intWidth);this.loadNextResourceDetailsInPopup(strThisResourceType,intThisResourceId,intThisResourceGeometryId,'0',false,null);}
else
{if(Map.getAutoRepositionResourceQueryMode())
{this.objEMController.easeToPoint(objLastCoordPair);}}},showQueryResourceGeometries:function(arrGeometryIds,objGeocodeData,blnStampClick)
{Profiler.profile('view/components/map/assets/javascript/map.js',6817,'showQueryResourceGeometries:','function(arrGeometryIds, objGeocodeData, blnStampClick)',arguments);var _this=this;this.queryResultGeometries=arrGeometryIds;var arrGeometriesToRemove=[];$j.each(this.queryResultGeometries,function(strKey,objGeometry)
{Profiler.profile('view/components/map/assets/javascript/map.js',6827,'$j.each(this.queryResultGeometries,','function(strKey, objGeometry)',arguments);if(_this.objCurrentLayersInList[objGeometry.container_node_id])
{if(_this.objCurrentLayersInList[objGeometry.container_node_id].strLayerName.substring(0,7)=='Radius ')
{arrGeometriesToRemove.push(strKey);}}});var arrCleanedResultGeometries=[];$j.each(this.queryResultGeometries,function(strKey,objGeometry)
{Profiler.profile('view/components/map/assets/javascript/map.js',6843,'$j.each(this.queryResultGeometries,','function(strKey, objGeometry)',arguments);var blnToBeRemoved=false;$j.each(arrGeometriesToRemove,function(strKey2,strGeometryKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',6847,'$j.each(arrGeometriesToRemove,','function(strKey2, strGeometryKey)',arguments);if(strGeometryKey==strKey)
{blnToBeRemoved=true;return false;}});if(blnToBeRemoved===false)
{arrCleanedResultGeometries.push(objGeometry);}});this.queryResultGeometries=[].concat(arrCleanedResultGeometries);if(this.queryResultGeometries.length==0)
{return;}
var intFirstGeometryContainerId=this.queryResultGeometries[0]['container_node_id'];var intFirstGeometryId=this.queryResultGeometries[0]['id'];var blnFirstGeometryThematic=(this.queryResultGeometries[0]['mode']=='thematic')?true:false;var intFirstGeometryThematicRulesetNodeId=(this.queryResultGeometries[0]['mode']=='thematic')?this.queryResultGeometries[0]['node_id']:null;var strItemType=(intFirstGeometryId&&intFirstGeometryId!=null)?'geometry':'resource';this.objCurrentGeometryGeocodeData=objGeocodeData;if(this.blnOutputResourcesInTransparentBox===true)
{this.createHoverContainer();this.resetHoverContainer();var objHoverElement=$j('#resource_hover_container');if(blnStampClick!==true)
{var objScreenPoint=this.objEMController.mapStatus.getScreenPointFromWorld(objGeocodeData);objHoverElement.css({bottom:objScreenPoint.y+'px',left:objScreenPoint.x+'px',display:'block'});}
if(this.blnPopupInExpandedMode!==true)
{this.objResourceDetailsTransparentBox.blnWidthResizedForContent=false;this.objResourceDetailsTransparentBox.blnHeightResizedForContent=false;this.objResourceDetailsTransparentBox.blnAlreadyExpandedResourceDetails=false;this.expandTransparentBoxForContent(objHoverElement);}}
else
{this.generateEzmapsPopup(objGeocodeData,this.resetQueryResults.bind(this));}
this.loadNextResourceDetailsInPopup(strItemType,intFirstGeometryContainerId,intFirstGeometryId,'0',blnFirstGeometryThematic,intFirstGeometryThematicRulesetNodeId);},getAnnotationSymbolDescription:function(strSymbolFilename)
{Profiler.profile('view/components/map/assets/javascript/map.js',6927,'getAnnotationSymbolDescription:','function(strSymbolFilename)',arguments);var arrFilenameParts=strSymbolFilename.split('/');var strFilename=arrFilenameParts[arrFilenameParts.length-1];var strDescription='';if(strFilename.indexOf('flow_arrow')!=-1)
{strDescription+="A number of arrows in different colours, pointing in different directions for flows of data/people/vehicles etc...";}
if(strFilename.indexOf('_circle_')!=-1||strFilename.indexOf('_plain_')!=-1)
{strDescription+="Numbers 0-20, in red, blue and gold, plain and in circles etc...";}
var objSymbolMapping={};objSymbolMapping['bungalow_24px.png']='Bungalow';objSymbolMapping['church_24px.png']='Church';objSymbolMapping['flats_24px.png']='Flats';objSymbolMapping['house_24px.png']='House';objSymbolMapping['school_24px.png']='School';objSymbolMapping['terrace_24px.png']='Terrace';objSymbolMapping['bus_stop_24px.png']='Bus Stop';objSymbolMapping['bushes_24px.png']='Bushes';objSymbolMapping['camera_24px.png']='Camera';objSymbolMapping['crossing_24px.png']='Crossing';objSymbolMapping['phone_box_24px.png']='Phone Box';objSymbolMapping['post_box_24px.png']='Post Box';objSymbolMapping['road_sign_24px.png']='Road Sign';objSymbolMapping['traffic_lights_24px.png']='Traffic Lights';objSymbolMapping['trees_24px.png']='Trees';objSymbolMapping['beacon_24px.png']='Beacon';objSymbolMapping['boundary_post_24px.png']='Boundary Post';objSymbolMapping['boundary_stone_24px.png']='Boundary Stone';objSymbolMapping['building_24px.png']='Building';objSymbolMapping['bunkhouse_campingbarn_24px.png']='Bunk house / Camping bard / Other hostel';objSymbolMapping['bus_coach_station_24px.png']='Bus / Coach Station';objSymbolMapping['clubhouse_24px.png']='Club House';objSymbolMapping['disused_lighthouse_24px.png']='Disused Lighthouse';objSymbolMapping['electricity_transmission_line_24px.png']='Electricity Transmission Line';objSymbolMapping['footbridge_24px.png']='Footbridge';objSymbolMapping['glasshouse_24px.png']='Glasshouse';objSymbolMapping['gravel_pit_24px.png']='Gravel Pit';objSymbolMapping['important_building_24px.png']='Important Building';objSymbolMapping['landfill_site_24px.png']='Landfill Site';objSymbolMapping['lighthouse_24px.png']='Lighthouse';objSymbolMapping['mast_24px.png']='Mast';objSymbolMapping['milepost_24px.png']='Milepost';objSymbolMapping['milestone_24px.png']='Milestone';objSymbolMapping['monument_24px.png']='Monument';objSymbolMapping['other_pit_quarry_24px.png']='Other Pit or Quarry';objSymbolMapping['place_worship_24px.png']='Place of Worship';objSymbolMapping['place_worship_spire_24px.png']='Current or Former Place of Worship - With Spire';objSymbolMapping['place_worship_tower_24px.png']='Current or Former Place of Worship - With Tower';objSymbolMapping['sand_pit_24px.png']='Sand Pit';objSymbolMapping['slopes_24px.png']='Slopes';objSymbolMapping['triangulation_pillar_24px.png']='Triangulation Pillar';objSymbolMapping['wind_generator_24px.png']='Wind Generator';objSymbolMapping['wind_pump_24px.png']='Wind Pump';objSymbolMapping['windmill_24px.png']='Windmill';objSymbolMapping['youth_hostel_24px.png']='Youth Hostel';objSymbolMapping['building_historic_interest_24px.png']='Building of Historic Interest';objSymbolMapping['camp_site_24px.png']='Camp Site';objSymbolMapping['caravan_camp_site_24px.png']='Caravan / Camp Site';objSymbolMapping['caravan_site_24px.png']='Caravan Site';objSymbolMapping['castle_fort_24px.png']='Castle / Fort';objSymbolMapping['cathedral_abbey_24px.png']='Catherdral / Abbey';objSymbolMapping['country_park_24px.png']='Country Park';objSymbolMapping['cycle_trail_24px.png']='Cycle Trail';objSymbolMapping['english_heritage_24px.png']='English Heritage Site';objSymbolMapping['fishing_24px.png']='Fishing';objSymbolMapping['forestry_commission_24px.png']='Forestry Commission';objSymbolMapping['garden_24px.png']='Garden';objSymbolMapping['golf_course_24px.png']='Golf Course';objSymbolMapping['horse_riding_24px.png']='Horse Riding';objSymbolMapping['information_centre_24px.png']='Information Centre';objSymbolMapping['information_centre_reverse_24px.png']='Information Centre';objSymbolMapping['museum_24px.png']='Museum';objSymbolMapping['national_trust_24px.png']='National Trust';objSymbolMapping['nature_reserve_24px.png']='Nature Reserve';objSymbolMapping['other_tourist_feature_24px.png']='Other Tourist Feature';objSymbolMapping['park_and_ride_24px.png']='Park and Ride';objSymbolMapping['park_and_ride_reverse_24px.png']='Park and Ride';objSymbolMapping['parking_24px.png']='Parking';objSymbolMapping['picnic_site_24px.png']='Picnic Site';objSymbolMapping['preserved_railway_24px.png']='Preserved Railway';objSymbolMapping['public_convenience_24px.png']='Public Convenience';objSymbolMapping['public_house_24px.png']='Public House';objSymbolMapping['recreation_leisure_sport_24px.png']='Recreation / Leisure / Sport';objSymbolMapping['slipway_24px.png']='Slipway';objSymbolMapping['telephone_24px.png']='Telephone';objSymbolMapping['theme_pleasure_park_24px.png']='Theme park';objSymbolMapping['viewpoint_24px.png']='Viewpoint';objSymbolMapping['visitor_centre_24px.png']='Visitor Centre';objSymbolMapping['walks_trails_24px.png']='Walk / Trail';objSymbolMapping['water_activities_24px.png']='Water Activities';if(typeof(objSymbolMapping[strFilename])!='undefined')
{strDescription+=objSymbolMapping[strFilename];}
return strDescription;},dragDropGeocodeResource:function(objGeocodeData)
{Profiler.profile('view/components/map/assets/javascript/map.js',7041,'dragDropGeocodeResource:','function(objGeocodeData)',arguments);if(objGeocodeData===null)
{Shell.lightboxAlert("Only the owner of a resource is able to link it to a map location. This resource is published by another user.",475,100);return false;}
var _this=this;var strItemId=$j(objGeocodeData['activeElement']).attr('id');this.objGeocodeData=objGeocodeData;this.generateEzmapsPopup({x:objGeocodeData['pointOnMap']['x'],y:objGeocodeData['pointOnMap']['y'],srid:objGeocodeData['srid']},function(){_this.removeAllTemporaryMapSymbolStamps();});var intItemId=strItemId.split('_').pop();this.intGeocodeResourceId=intItemId;var strUrlSuffix='getDragDropDetails/'+intItemId;var strUrl=strUrlSuffix;this.update(strUrl,{},null,'#popupContentContainerInner');this.removeAllTemporaryMapSymbolStamps();var strExistingMapSymbol=$j('#mapSymbol_'+intItemId);var objSubdomains=Shell.getWebsiteSubdomains();if(strExistingMapSymbol.length==0)
{var strExistingMapSymbolSrc=objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_blue.png';}
else
{var strExistingMapSymbolSrc=strExistingMapSymbol.attr('original_src').gsub('disabled/','');}
var newMapSymbol=document.createElement('div');$j(newMapSymbol).html("<img src='"+strExistingMapSymbolSrc+"' original_src='"+strExistingMapSymbolSrc+"' id='mapSymbolStampTemp' onclick='Map.queryMap([{container_node_id:"+intItemId+", id:"+intItemId+"}]);return false;' style='cursor:pointer;' />");var objDefObj={size:new Point(40,40)};var objStampElement=new Stamp.Dom(newMapSymbol,objDefObj);this.objStampDisplay.addStamp(objStampElement,'mapSymbol');var objStampInstance=this.objStampDisplay.addPoint(new Point(objGeocodeData['pointOnMap']['x'],objGeocodeData['pointOnMap']['y'],objGeocodeData['srid']),'mapSymbol');this.objLastTemporaryStampInstance=objStampInstance;var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser!='Explorer')
{$j('#mapSymbolStampTemp').css({opacity:.5});}},createDraggableSchoolIcon:function(easting,northing,dropCallback)
{Profiler.profile('view/components/map/assets/javascript/map.js',7127,'createDraggableSchoolIcon:','function(easting, northing, dropCallback)',arguments);this.objDropWidget.registerNamedCallback('mapSymbolSchool',dropCallback);var newMapSymbol=document.createElement('div');$j(newMapSymbol).attr({'id':'mapSymbolSchool','class':'mapSymbolSchool'});var objSubdomains=Shell.getWebsiteSubdomains();$j(newMapSymbol).html('<img src="'+objSubdomains.images+'/view/components/map/assets/images/symbols/school_24px.png" original_src="'+objSubdomains.images+'/view/components/map/assets/images/symbols/school_24px.png" style="cursor:pointer;" />');var objDefObj={size:new Point(24,24,'pixel')};var objStampElement=new Stamp.Dom(newMapSymbol,objDefObj);this.objStampDisplay.addStamp(objStampElement,'mapSymbolSchool');var position=new Point(easting,northing,27700);var objStampInstance=this.objStampDisplay.addPoint(position,'mapSymbolSchool');objStampInstance.makeDraggable(this.objDropWidget);objStampInstance.blnLocked=true;this.objEMController.jumpToPoints([position]);this.objSchoolStampInstance=objStampInstance;return this.objSchoolStampInstance;},removeDraggableSchoolIcon:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7172,'removeDraggableSchoolIcon:','function()',arguments);this.objSchoolStampInstance.blnLocked=false;this.objStampDisplay.removePoint(this.objSchoolStampInstance);this.objSchoolStampInstance=null;},saveDragDropGeocodeResource:function(strResourceName)
{Profiler.profile('view/components/map/assets/javascript/map.js',7180,'saveDragDropGeocodeResource:','function(strResourceName)',arguments);var _this=this;this.toggleElement('buttonsContainer',false);this.toggleElement('savingMessageContainer',true);var strUrl='saveDragDropGeocodeResource/'+this.intGeocodeResourceId;var objParams={intResourceId:this.intGeocodeResourceId,objCoords:$j.toJSON([this.objGeocodeData['pointOnMap']]),srid:this.objGeocodeData['srid'],type:this.objGeocodeData['mode']};var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7199,'var objOnComplete =','function()',arguments);_this.removeAllTemporaryMapSymbolStamps();var arrGeometries=[{x:_this.objGeocodeData['pointOnMap']['x'],y:_this.objGeocodeData['pointOnMap']['y'],srid:_this.objGeocodeData['srid']}];var objGeometries={arrFirstCoordPair:arrGeometries,arrAllCoordPairs:arrGeometries};_this.registerResultsGeometries(_this.intGeocodeResourceId,null,objGeometries,strResourceName,'resource');var strExistingMapSymbol=$j('#mapSymbol_'+_this.intGeocodeResourceId);if(strExistingMapSymbol.length>0)
{var strExistingMapSymbolSrc=strExistingMapSymbol.attr('original_src').gsub('disabled/','');$j('#mapSymbol_'+_this.intGeocodeResourceId).attr('src',strExistingMapSymbolSrc);$j('#mapSymbol_'+_this.intGeocodeResourceId).attr('original_src',strExistingMapSymbolSrc);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{_this.makePngsTransparent('mapSymbol_'+_this.intGeocodeResourceId,true);}}
var objResource=$j('#resourceExplorerItem_'+_this.intGeocodeResourceId);objResource.bind('mouseover',function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',7229,'objResource.bind(\'mouseover\',','function(event)',arguments);ResourceExplorer.highlightResource(_this.intGeocodeResourceId);Map.highlightStamp(_this.intGeocodeResourceId);});objResource.bind('mouseout',function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',7235,'objResource.bind(\'mouseout\',','function(event)',arguments);ResourceExplorer.unHighlightResource(_this.intGeocodeResourceId);Favourites.unHighlightResource(_this.intGeocodeResourceId);Map.unHighlightStamp(_this.intGeocodeResourceId);});Map.updateGeometriesLayer();};this.update(strUrl,objParams,objOnComplete,'#savingMessageContainer');},cancelDragDropGeocodeResource:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7250,'cancelDragDropGeocodeResource:','function()',arguments);this.closeResourceDetails();},dropTargetGeocodeResource:function(objGeocodeData)
{Profiler.profile('view/components/map/assets/javascript/map.js',7258,'dropTargetGeocodeResource:','function(objGeocodeData)',arguments);var _this=this;if(typeof(objGeocodeData)=='undefined'||objGeocodeData['pointsOnMap']==null)
{return false;}
this.arrDropTargetResources=[];this.setDropTargetMode(true);this.objGeocodeData=objGeocodeData;var objLastCoordPair=objGeocodeData['pointsOnMap'][objGeocodeData['pointsOnMap'].length-1];this.generateEzmapsPopup({x:objLastCoordPair['x'],y:objLastCoordPair['y'],srid:objGeocodeData['srid']},function(){_this.popupCloseDropTargetGeocodeResource();});var strUrl='getDropTargetDetails/';var objParams={};var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7294,'var objOnComplete =','function()',arguments);_this.registerDropTarget();};this.update(strUrl,objParams,objOnComplete,'#popupContentContainerInner');},displayDistance:function(objGeocodeData)
{Profiler.profile('view/components/map/assets/javascript/map.js',7302,'displayDistance:','function(objGeocodeData)',arguments);var _this=this;if(objGeocodeData['pointsOnMap']==null)
{return false;}
this.objGeocodeData=objGeocodeData;var objLastCoordPair=objGeocodeData['pointsOnMap'][objGeocodeData['pointsOnMap'].length-1];this.generateEzmapsPopup({x:objLastCoordPair['x'],y:objLastCoordPair['y'],srid:objGeocodeData['srid']},function(){_this.measurePopupShutdown();});$j('#popupContentContainerInner').html(objGeocodeData.distance);},registerDropTarget:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7324,'registerDropTarget:','function()',arguments);var _this=this;$j('#dropTargetArea').droppable({accept:'.ezmapDraggables',greedy:true,hoverClass:'dropTargetAreaHover',tolerance:'pointer',drop:function(event,ui)
{Profiler.profile('view/components/map/assets/javascript/map.js',7335,'drop:','function(event, ui)',arguments);_this.handleDroppedResource(ui.draggable.get(0),this,event);}});},handleDroppedResource:function(objDroppedElement,objDropTargetElement,event)
{Profiler.profile('view/components/map/assets/javascript/map.js',7343,'handleDroppedResource:','function(objDroppedElement, objDropTargetElement, event)',arguments);this.toggleElement('updatingMessage',true);var strElementId=$j(objDroppedElement).attr('id');var strFilename=$j(objDroppedElement).attr('filename');var arrElementIdParts=strElementId.split('_');var intElementId=arrElementIdParts[1];if($j.inArray(intElementId,this.arrDropTargetResources)==-1)
{this.arrDropTargetResources.push(intElementId);}
this.displayDroppedResource(intElementId);},displayDroppedResource:function(intElementId)
{Profiler.profile('view/components/map/assets/javascript/map.js',7365,'displayDroppedResource:','function(intElementId)',arguments);var _this=this;var strUrl='getDropTargetResourceListDetails/';var objParams={strResourceIds:this.arrDropTargetResources.join(',')};var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7377,'var objOnComplete =','function()',arguments);_this.displayDroppedResourceComplete();};this.update(strUrl,objParams,objOnComplete,'#resourceListContainer');},displayDroppedResourceComplete:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7386,'displayDroppedResourceComplete:','function()',arguments);this.toggleElement('updatingMessage',false);},layerSelectDropTargetGeocodeResource:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7393,'layerSelectDropTargetGeocodeResource:','function()',arguments);if(this.arrDropTargetResources.length==0)
{Shell.lightboxAlert('Please drag at least one resource onto the target area!',500,100);return false;}
this.saveDropTargetGeocodeResource();},saveDropTargetGeocodeResource:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7410,'saveDropTargetGeocodeResource:','function()',arguments);$j('#dropTargetArea').droppable('destroy');this.toggleElement('buttonsContainer',false);this.toggleElement('savingMessageContainer',true);var strUrl='saveDropTargetGeocodeResource/';var objResourceIdsToNumericIndexMapping={};var objResourceExplorer=Shell.getActiveResourceExplorer();if(objResourceExplorer!=null)
{var arrCurrentPageResults=objResourceExplorer.getResults();$j.each(this.arrDropTargetResources,function(intKey,intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',7432,'$j.each(this.arrDropTargetResources,','function(intKey, intResourceId)',arguments);var intIndex=arrCurrentPageResults.indexOf(parseInt(intResourceId));objResourceIdsToNumericIndexMapping[intResourceId]=intIndex;});}
var objParams={strResourceIds:this.arrDropTargetResources.join(','),objResourceIdsToNumericIndexMapping:$j.toJSON(objResourceIdsToNumericIndexMapping),objCoords:$j.toJSON(this.objGeocodeData['pointsOnMap']),srid:this.objGeocodeData['srid'],type:this.objGeocodeData['mode'],blnSaveToLayer:'false',intActiveLayerId:this.getActiveLayer()};this.update(strUrl,objParams,null,'#savingMessageContainer');},saveDropTargetGeocodeResourceOnComplete:function(blnSaveToLayer,arrGroupDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',7454,'saveDropTargetGeocodeResourceOnComplete:','function(blnSaveToLayer, arrGroupDetails)',arguments);var _this=this;this.removeAllTemporaryMapSymbolStamps();if(!blnSaveToLayer)
{var objLastCoordPair=this.objGeocodeData['pointsOnMap'][this.objGeocodeData['pointsOnMap'].length-1];var arrAllCoordPairs=this.objGeocodeData['pointsOnMap'];var arrGeometriesFirstPoint=[{x:objLastCoordPair['x'],y:objLastCoordPair["y"],srid:this.objGeocodeData['srid']}];var objGeometries={arrFirstCoordPair:arrGeometriesFirstPoint,arrAllCoordPairs:arrAllCoordPairs};$j.each(this.arrDropTargetResources,function(intKey,intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',7471,'$j.each(this.arrDropTargetResources,','function(intKey, intResourceId)',arguments);_this.registerResultsGeometries(intResourceId,null,objGeometries,'','resource',arrGroupDetails);var objMapSymbol=$j('#mapSymbol_'+intResourceId);var strExistingMapSymbolSrc=objMapSymbol.attr('original_src').gsub('disabled/','');objMapSymbol.attr('src',strExistingMapSymbolSrc);objMapSymbol.attr('original_src',strExistingMapSymbolSrc);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{_this.makePngsTransparent('mapSymbol_'+intResourceId,true);}});}
Map.updateGeometriesLayer();},cancelDropTargetGeocodeResource:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7496,'cancelDropTargetGeocodeResource:','function()',arguments);$j('#dropTargetArea').droppable('destroy');this.setDropTargetMode(false);this.clearCurrentGeocodeGeometry();this.closeResourceDetails();},popupCloseDropTargetGeocodeResource:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7512,'popupCloseDropTargetGeocodeResource:','function()',arguments);$j('#dropTargetArea').droppable('destroy');this.setDropTargetMode(false);this.clearCurrentGeocodeGeometry();},measurePopupShutdown:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7524,'measurePopupShutdown:','function()',arguments);$j('#dropTargetArea').droppable('destroy');this.setDropTargetMode(false);this.clearCurrentGeocodeGeometry();},clearCurrentGeocodeGeometry:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7537,'clearCurrentGeocodeGeometry:','function()',arguments);this.objScribbleWidget.removeShape(this.objGeocodeData['id']);},handleMapSymbolEvents:function(event,srcElement,blnOwner)
{Profiler.profile('view/components/map/assets/javascript/map.js',7544,'handleMapSymbolEvents:','function(event, srcElement, blnOwner)',arguments);if(Shell.getIsLicencedUser()===false)
{Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');return false;}
var _this=this;event=$j.event.fix(event||window.event);var strElementId=$j(srcElement).attr('id');var arrElementIdParts=strElementId.split('_');var intElementId=arrElementIdParts[1];if(!blnOwner)
{this.showSpecificResourceGeometries(intElementId,true);return false;}
var objClonedElement=this.cloneDraggableElement(srcElement,intElementId,'mapSymbolClone','ezmapDraggables');var strClonedElementId=$j(objClonedElement).attr('id');var objOnStartFunc=(this.blnDropTargetModeActive)?function(){_this.objEMController.hideEventDiv();}:null;var objOnDragFunc=null;var objOnEndFunc=(this.blnDropTargetModeActive)?function(){_this.objEMController.showEventDiv();_this.removeClonedDraggableElement(strClonedElementId);}:function(){_this.removeClonedDraggableElement(strClonedElementId);};$j('#'+strClonedElementId).draggable({revert:'invalid',start:objOnStartFunc,drag:objOnDragFunc,stop:objOnEndFunc}).data('draggable')._mouseDown(event);this.objCachedMethod_Release=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',7598,'this.objCachedMethod_Release =','function(event)',arguments);_this.handleMapSymbolMouseReleaseEvent(event,strElementId,strClonedElementId);};this.initiateMouseMoveTracking(event);},handleResourceThumbnailEvents:function(event,srcElement,blnOwner,objClickFunc)
{Profiler.profile('view/components/map/assets/javascript/map.js',7607,'handleResourceThumbnailEvents:','function(event, srcElement, blnOwner, objClickFunc)',arguments);var _this=this;event=$j.event.fix(event||window.event);var strElementId=$j(srcElement).attr('id');var arrElementIdParts=strElementId.split('_');var intElementId=arrElementIdParts[1];if(blnOwner===true)
{var strClasses='ezmapDraggables resourceDraggables';}
else
{var strClasses='resourceDraggables';}
var objClonedElement=this.cloneDraggableElement(srcElement,intElementId,'resourceThumbnailClone',strClasses);var strClonedElementId=$j(objClonedElement).attr('id');var objOnStartFunc=(this.blnDropTargetModeActive)?function(){_this.objEMController.hideEventDiv();}:null;var objOnDragFunc=null;var objOnEndFunc=(this.blnDropTargetModeActive)?function(){_this.objEMController.showEventDiv();_this.removeClonedDraggableElement(strClonedElementId);}:function(){_this.removeClonedDraggableElement(strClonedElementId);};$j('#'+strClonedElementId).draggable({cursor:'crosshair',cursorAt:{top:-15,left:parseInt($j(srcElement).outerWidth()/2)-4},revert:'invalid',start:objOnStartFunc,drag:objOnDragFunc,stop:objOnEndFunc,zIndex:1002}).data('draggable')._mouseDown(event);$j(document.body).css('cursor','crosshair');this.objCachedMethod_Release=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',7663,'this.objCachedMethod_Release =','function(event)',arguments);$j(document.body).css('cursor','auto');_this.handleResourceThumbnailMouseReleaseEvent(event,strElementId,strClonedElementId,objClickFunc);};this.initiateMouseMoveTracking(event);},handleMapSymbolMouseReleaseEvent:function(event,strElementId,strClonedElementId)
{Profiler.profile('view/components/map/assets/javascript/map.js',7673,'handleMapSymbolMouseReleaseEvent:','function(event, strElementId, strClonedElementId)',arguments);var objElementOffset=$j('#'+strElementId).offset();this.removeClonedDraggableElement(strClonedElementId);var objMovement=this.killMouseMoveTracking(event);if(objMovement.x>15||objMovement.y>15)
{}
else
{var arrElementIdParts=strElementId.split('_');var intElementId=arrElementIdParts[1];this.showSpecificResourceGeometries(intElementId,true);}},handleResourceThumbnailMouseReleaseEvent:function(event,strElementId,strClonedElementId,objClickFunc)
{Profiler.profile('view/components/map/assets/javascript/map.js',7699,'handleResourceThumbnailMouseReleaseEvent:','function(event, strElementId, strClonedElementId, objClickFunc)',arguments);var objElement=$j('#'+strElementId);if(objElement.length==0)
{return;}
var objElementOffset=$j('#'+strElementId).offset();if(!objElementOffset.left||!objElementOffset.top)
{return;}
this.removeClonedDraggableElement(strClonedElementId);var objMovement=this.killMouseMoveTracking(event);if(objMovement.x>15||objMovement.y>15)
{}
else
{eval(objClickFunc);}},setDropTargetMode:function(blnDropTargetMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',7735,'setDropTargetMode:','function(blnDropTargetMode)',arguments);this.blnDropTargetModeActive=blnDropTargetMode;},getDropTargetMode:function(blnDropTargetMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',7740,'getDropTargetMode:','function(blnDropTargetMode)',arguments);return this.blnDropTargetModeActive;},hide:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7745,'hide:','function()',arguments);this.objParentObject.hide();this.blnVisible=false;},show:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7751,'show:','function()',arguments);this.objParentObject.show();this.blnVisible=true;},hideInterferingThings:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7759,'hideInterferingThings:','function()',arguments);$j('#ezMaps').find('.widgetsBottom .renderer').hide();this.objEMController.hideEventDiv();},showInterferingThings:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7767,'showInterferingThings:','function()',arguments);$j('#ezMaps').find('.widgetsBottom .renderer').show();this.objEMController.showEventDiv();},editGeometry:function(intResourceId,intGeometryId,strMode,geomType,symbolFilename,symbolSize)
{Profiler.profile('view/components/map/assets/javascript/map.js',7775,'editGeometry:','function(intResourceId, intGeometryId, strMode, geomType, symbolFilename, symbolSize)',arguments);var geomType=(typeof(geomType)!='undefined')?geomType:null;var symbolFilename=(typeof(symbolFilename)!='undefined')?symbolFilename:null;var symbolSize=(typeof(symbolSize)!='undefined')?symbolSize:40;var _this=this;var strText='What would you like to do with this hotspot/shape?';var arrButtons=[];var intLightBoxHeight=100;var objDeleteButton={id:'delete',strText:'Delete',intWidth:135,objCallbackFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7795,'objCallbackFunction:','function()',arguments);_this.showDeleteGeometryLightboxContent(intResourceId,intGeometryId,strMode);}};arrButtons.push(objDeleteButton);if(geomType=='Hotspot')
{var objMoveButton={id:'move',strText:'Move',intWidth:135,objCallbackFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7813,'objCallbackFunction:','function()',arguments);_this.showMoveGeometryLightboxContent(intResourceId,intGeometryId,strMode,geomType,symbolFilename,symbolSize);}};arrButtons.push(objMoveButton);}
var objSettings={strText:strText,intWidth:500,intHeight:intLightBoxHeight,arrButtons:arrButtons,blnIncludeCancelButton:true,blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);},showDeleteGeometryLightboxContent:function(intResourceId,intGeometryId,strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',7839,'showDeleteGeometryLightboxContent:','function(intResourceId, intGeometryId, strMode)',arguments);var intGeometryId=(typeof(intGeometryId)!='undefined')?intGeometryId:null;var strMode=(typeof(strMode)!='undefined')?strMode:'resource';var _this=this;switch(strMode)
{case'resource':var intThisResourceId=this.objCurrentPageResultGeometries[intResourceId]['intResourceId'];var arrThisResourcesGroupDetails=this.objCurrentPageResultGeometries[intResourceId]['arrGroupDetails'];var arrGroupNodeIds=[];$j.each(arrThisResourcesGroupDetails,function(intKey,objGroupMember)
{Profiler.profile('view/components/map/assets/javascript/map.js',7861,'$j.each(arrThisResourcesGroupDetails,','function(intKey, objGroupMember)',arguments);arrGroupNodeIds.push(objGroupMember.intNodeId);});var arrButtons=[];var intLightBoxHeight=100;var objDeleteButton={id:'delete',strText:'Confirm delete',intWidth:150,objCallbackFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7876,'objCallbackFunction:','function()',arguments);Shell.lightboxPleaseWait();_this.closeResourceDetails();var strUrlSuffix='clearLayer/'+intResourceId+'/null/'+strMode;var objCallbackFunction=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7887,'var objCallbackFunction =','function()',arguments);_this.refreshLayerListAfterComplete();var resourceExplorer=objShell.getComponentFromType('resourceExplorer');if(typeof(resourceExplorer)!='undefined')
{var blnClearPleaseWaitLightbox=true;resourceExplorer.refresh(blnClearPleaseWaitLightbox);}};_this.notify(strUrlSuffix,{},objCallbackFunction);}};arrButtons.push(objDeleteButton);if(arrThisResourcesGroupDetails.length>1)
{intLightBoxHeight+=30;var strText='This hotspot/shape has more than 1 resource associated with it. Do you wish to remove all the resources associated with this shape, or just the current one?';var objDeleteAllInGroupButton={id:'deleteAll',strText:'Confirm delete all',intWidth:145,objCallbackFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7918,'objCallbackFunction:','function()',arguments);Shell.lightboxPleaseWait();_this.closeResourceDetails();var strUrlSuffix='clearLayers/';var objParams={arrLayerIds:$j.toJSON(arrGroupNodeIds)};var objCallbackFunction=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7934,'var objCallbackFunction =','function()',arguments);_this.refreshLayerListAfterComplete();var resourceExplorer=objShell.getComponentFromType('resourceExplorer');if(typeof(resourceExplorer)!='undefined')
{var blnClearPleaseWaitLightbox=true;resourceExplorer.refresh(blnClearPleaseWaitLightbox);}};_this.notify(strUrlSuffix,objParams,objCallbackFunction);}};arrButtons.push(objDeleteAllInGroupButton);}
else
{var strText='Are you sure you wish to remove this hotspot/shape from the resource?';}
break;case'layer':var strText='Are you sure you wish to remove this hotspot/shape from the layer?';var arrButtons=[];var intLightBoxHeight=100;var objDeleteButton={id:'delete',strText:'Confirm delete',intWidth:150,objCallbackFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',7976,'objCallbackFunction:','function()',arguments);Shell.lightboxPleaseWait();_this.closeResourceDetails();var strUrlSuffix='clearLayer/'+intResourceId+'/'+intGeometryId+'/'+strMode;var objOnCompleteFunc=function(blnClearPleaseWaitLightbox)
{Profiler.profile('view/components/map/assets/javascript/map.js',7987,'var objOnCompleteFunc =','function(blnClearPleaseWaitLightbox)',arguments);if(blnClearPleaseWaitLightbox)
{Shell.closeLightboxPleaseWait();}};var blnClearPleaseWaitLightbox=true;_this.notify(strUrlSuffix,{},_this.refreshLayerList({},false,{},function(){objOnCompleteFunc(blnClearPleaseWaitLightbox);}));}};arrButtons.push(objDeleteButton);break;}
var objSettings={strText:strText,intWidth:500,intHeight:intLightBoxHeight,arrButtons:arrButtons,blnIncludeCancelButton:true,blnAutoCloseOnButtonClick:false};Shell.updateLightboxConfirmWithButtons(objSettings);},showMoveGeometryLightboxContent:function(intResourceId,intGeometryId,strMode,geomType,symbolFilename,symbolSize)
{Profiler.profile('view/components/map/assets/javascript/map.js',8021,'showMoveGeometryLightboxContent:','function(intResourceId, intGeometryId, strMode, geomType, symbolFilename, symbolSize)',arguments);var intGeometryId=(typeof(intGeometryId)!='undefined')?intGeometryId:null;var strMode=(typeof(strMode)!='undefined')?strMode:'resource';var geomType=(typeof(geomType)!='undefined')?geomType:'';var symbolFilename=(typeof(symbolFilename)!='undefined')?symbolFilename:'';var symbolSize=(typeof(symbolSize)!='undefined')?symbolSize:40;var _this=this;var objSubdomains=Shell.getWebsiteSubdomains();switch(strMode)
{case'resource':var strText='Are you sure you wish to re-position this hotspot/shape?<br/><br/>If you choose yes, simply drag the icon anywhere on the map and the selected point will be moved to the new location.';var arrButtons=[];var intLightBoxHeight=150;var objMoveButton={id:'move',strText:'Yes',intWidth:135,objCallbackFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8053,'objCallbackFunction:','function()',arguments);_this.closeResourceDetails();var objThisStampSymbolInstance=_this.objCurrentPageResultGeometries[intResourceId]['objStampSymbolInstance'];var objCurrentPosition=_this.objCurrentGeometryGeocodeData;var strIconPath='';_this.createDraggableRepositionIcon(objCurrentPosition.x,objCurrentPosition.y,objCurrentPosition.srid,_this.repositionGeometryCallback,strIconPath,symbolSize,objThisStampSymbolInstance);_this.intRepositionResourceId=intResourceId;_this.intRepositionGeometryId=intGeometryId;_this.intRepositionMode=strMode;}};arrButtons.push(objMoveButton);break;case'layer':var strText='Are you sure you wish to re-position this hotspot/shape within the layer?<br/><br/>If you choose yes, simply drag the icon anywhere on the map and the selected point will be moved to the new location.';var arrButtons=[];var intLightBoxHeight=150;var objMoveButton={id:'move',strText:'Yes',intWidth:135,objCallbackFunction:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8096,'objCallbackFunction:','function()',arguments);_this.closeResourceDetails();var objCurrentPosition=_this.objCurrentGeometryGeocodeData;var strIconPath=objSubdomains.images+'/view/components/map/assets/images/symbols/'+symbolFilename;_this.createDraggableRepositionIcon(objCurrentPosition.x,objCurrentPosition.y,objCurrentPosition.srid,_this.repositionGeometryCallback,strIconPath,symbolSize);_this.intRepositionResourceId=intResourceId;_this.intRepositionGeometryId=intGeometryId;_this.intRepositionMode=strMode;}};arrButtons.push(objMoveButton);break;}
var objSettings={strText:strText,intWidth:500,intHeight:intLightBoxHeight,arrButtons:arrButtons};Shell.updateLightboxConfirmWithButtons(objSettings);},repositionGeometryCallback:function(objGeocodeData)
{Profiler.profile('view/components/map/assets/javascript/map.js',8132,'repositionGeometryCallback:','function(objGeocodeData)',arguments);var _this=this;this.objGeocodeData=objGeocodeData;this.generateEzmapsPopup({x:objGeocodeData['pointOnMap']['x'],y:objGeocodeData['pointOnMap']['y'],srid:objGeocodeData['srid']},function(){_this.removeDraggableRepositionIcon();},250,120);var strHTML='<div><h3 style="font-weight:bold;margin-bottom:10px;">Confirmation</h3><p>Are you sure you wish to move the hotspot to this new location?</p></div><div id="popupFooterRow"><hr/><table cellspacing="0" cellpadding="0" style="width: 100%; position: absolute; bottom: 0px;"><tbody><tr id="buttonsContainer"><td id="buttonsLeft"><span id="save_geocoding_button" class="button"><img style="border: 0px none ; padding: 0px; width: 0px;"/><span class="buttonBackground activeButtonBackground"><span class="buttonCorner topLeft"><span class="buttonCorner bottomLeft"><span class="buttonCorner topRight"><span class="buttonCorner bottomRight"><a onclick="Map.saveRepositionGeometry(); return false" href="#"><span>&nbsp;<span class="buttonLabel">Save</span>&nbsp;</span></a></span></span></span></span></span><img style="border: 0px none ; padding: 0px; width: 0px;"/></span><span id="cancel_geocoding_button" class="button"><img style="border: 0px none ; padding: 0px; width: 0px;"/><span class="buttonBackground activeButtonBackground"><span class="buttonCorner topLeft"><span class="buttonCorner bottomLeft"><span class="buttonCorner topRight"><span class="buttonCorner bottomRight"><a onclick="Map.cancelRepositionGeometry(); return false" href="#"><span>&nbsp;<span class="buttonLabel">Cancel</span>&nbsp;</span></a></span></span></span></span></span><img style="border: 0px none ; padding: 0px; width: 0px;"/></span></td></tr></tbody></table></div>';$j('#popupContentContainerInner').html(strHTML);},createDraggableRepositionIcon:function(x,y,srid,dropCallback,strIconPath,intSize,objExistingSymbol)
{Profiler.profile('view/components/map/assets/javascript/map.js',8148,'createDraggableRepositionIcon:','function(x, y, srid, dropCallback, strIconPath, intSize, objExistingSymbol)',arguments);var objExistingSymbol=(typeof(objExistingSymbol)!='undefined')?objExistingSymbol:null;var intSize=(typeof(intSize)!='undefined')?intSize:40;var objStampInstance=null;if(objExistingSymbol!=null)
{var objExistingStampContentNode=$j(objExistingSymbol.returnElementReference()).find('div.resourceExplorerResourceStamp');var strStyle=objExistingStampContentNode.attr('style');var newRepositionSymbol=document.createElement('div');$j(newRepositionSymbol).attr({'id':'repositionSymbol','class':'repositionSymbol'});$j(newRepositionSymbol).html('<div class="resourceExplorerResourceStamp" style="'+strStyle+'"/>');var objDefObj={size:new Point(intSize,intSize,'pixel')};var objStampElement=new Stamp.Dom(newRepositionSymbol,objDefObj);this.objStampDisplay.addStamp(objStampElement,'repositionSymbol');var position=new Point(x,y,srid);var objStampInstance=this.objStampDisplay.addPoint(position,'repositionSymbol');}
else
{var newRepositionSymbol=document.createElement('div');$j(newRepositionSymbol).attr({'id':'repositionSymbol','class':'repositionSymbol'});$j(newRepositionSymbol).html("<img src='"+strIconPath+"' original_src='"+strIconPath+"' style='cursor:pointer;' />");var objDefObj={size:new Point(intSize,intSize,'pixel')};var objStampElement=new Stamp.Dom(newRepositionSymbol,objDefObj);this.objStampDisplay.addStamp(objStampElement,'repositionSymbol');var position=new Point(x,y,srid);var objStampInstance=this.objStampDisplay.addPoint(position,'repositionSymbol');}
objStampInstance.makeDraggable(this.objDropWidget);this.objRepositionStampInstance=objStampInstance;},removeDraggableRepositionIcon:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8213,'removeDraggableRepositionIcon:','function()',arguments);if(this.objRepositionStampInstance==null)
{return;}
this.objStampDisplay.removePoint(this.objRepositionStampInstance);this.objRepositionStampInstance=null;},saveRepositionGeometry:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8224,'saveRepositionGeometry:','function()',arguments);var _this=this;Shell.lightboxPleaseWait();var strUrlSuffix='repositionGeometry/'+this.intRepositionResourceId+'/'+this.intRepositionGeometryId+'/'+this.intRepositionMode;var objParams={intResourceId:this.intRepositionResourceId,intGeometryId:this.intRepositionGeometryId,objCoords:$j.toJSON([this.objGeocodeData['pointOnMap']]),srid:this.objGeocodeData['srid'],type:this.objGeocodeData['mode']};this.notify(strUrlSuffix,objParams,function(){_this.saveRepositionGeometryOnComplete();});this.closeResourceDetails();},saveRepositionGeometryOnComplete:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8249,'saveRepositionGeometryOnComplete:','function()',arguments);this.refreshLayerListAfterComplete();var resourceExplorer=objShell.getComponentFromType('resourceExplorer');if(typeof(resourceExplorer)!='undefined')
{var blnClearPleaseWaitLightbox=true;resourceExplorer.refresh(blnClearPleaseWaitLightbox);}},cancelRepositionGeometry:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8263,'cancelRepositionGeometry:','function()',arguments);this.closeResourceDetails();},generateEzmapsPopup:function(objPoint,objOnCloseFunc,intWidth,intHeight,strContent,blnCentered)
{Profiler.profile('view/components/map/assets/javascript/map.js',8271,'generateEzmapsPopup:','function(objPoint, objOnCloseFunc, intWidth, intHeight, strContent, blnCentered)',arguments);if(typeof(objPoint)=='undefined')
{Shell.lightboxAlert('No co-ords for positioning the popup were supplied. Popup will not be created.',500,100);return false;}
var intWidth=(typeof(intWidth)=='undefined'||intWidth==null)?250:intWidth;var intHeight=(typeof(intHeight)=='undefined'||intHeight==null)?160:intHeight;var strContent=(typeof(strContent)=='undefined'||strContent==null)?"<table id='popupContentContainer' cellpadding='0' cellspacing='0'><tr><td id='popupContentContainerInner'><p>Loading...</p></td></tr></table>":strContent;var objOnCloseFunc=(typeof(objOnCloseFunc)=='undefined')?null:objOnCloseFunc;var blnCentered=(typeof(blnCentered)!='undefined')?blnCentered:Map.getAutoRepositionResourceQueryMode();blnCentered=true;this.blnPopupInExpandedMode=false;var objPopupDef={};objPopupDef['width']=intWidth;objPopupDef['height']=intHeight;objPopupDef['onClose']=objOnCloseFunc;objPopupDef['centered']=blnCentered;objPopupDef['innerHtml']=strContent;objPopupDef['pointOnMap']=new Point(objPoint['x'],objPoint['y'],objPoint['srid']);this.objMapPopupLocationData=objPoint;this.objMapPopup.show(objPopupDef);return this.objMapPopup;},returnCurrentPopupLocationDetails:function(blnObjectOnly)
{Profiler.profile('view/components/map/assets/javascript/map.js',8311,'returnCurrentPopupLocationDetails:','function(blnObjectOnly)',arguments);var blnObjectOnly=(typeof(blnObjectOnly)!='undefined')?blnObjectOnly:false;if(blnObjectOnly)
{return this.objMapPopupLocationData;}
else
{var intSrid=this.objMapPopupLocationData['srid'];var intX=this.objMapPopupLocationData['x'];var intY=this.objMapPopupLocationData['y'];var intXRounded=Math.round(intX*100)/100;var intYRounded=Math.round(intY*100)/100;var strHTML='';switch(intSrid)
{case 4318:strHTML+='Longitude:'+intXRounded+'<br/>Latitude:'+intYRounded;break;case 27700:intXRounded=intXRounded/1000;intYRounded=intYRounded/1000;strHTML+='Easting:'+intXRounded+'km<br/>Northing:'+intYRounded+'km';break;}
return strHTML;}},printCurrentView:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8360,'printCurrentView:','function()',arguments);var stateObject=this.objEMController.mapStatus.getState();var screenExtents=this.objEMController.mapStatus.getScreenExt();var sessionId=this.objEMController.mapStatus.getSessionId();var centrePoint=this.objEMController.mapStatus.getCenterPointOnMap();var layout=this.objEMController.mapStatus.mapOptions.layout;var layers=this.objEMController.mapStatus.getLayers();var activeLayer=this.objEMController.mapStatus.getLayer(this.objEMController.mapStatus.getActiveLayer());var activeLayers={};var sender=this;$j.each(layers,function(intKey,objLayer)
{Profiler.profile('view/components/map/assets/javascript/map.js',8372,'$j.each(layers,','function(intKey, objLayer)',arguments);var mapId=objLayer.getMapId();activeLayers[mapId]={opacity:objLayer.opacity,activeLayer:(objLayer==activeLayer)?true:false};});var srid=this.objEMController.mapStatus.getSrid();var scale=this.objEMController.mapStatus.mapOptions.scalesArray[this.objEMController.mapStatus.getZoomAmount()];var groundScale=this.objEMController.mapStatus.getGroundScale();var nodeLayers=$j.toJSON(this.objEMController.mapStatus.getMapServerNodes());var geographicWidth=this.objEMController.mapStatus.getGeographicWidth(scale,this.objEMController.mapStatus.mapOptions.defaultDimensions,srid);var blnPlaylistMode=this.objEMController.mapStatus.getPlaylistMode();var intPlaylistViewId=this.objEMController.mapStatus.getPlaylistViewId();var scope=this;var encoded={brx:screenExtents.BRX,bry:screenExtents.BRY,tlx:screenExtents.TLX,tly:screenExtents.TLY,centreX:centrePoint.x,centreY:centrePoint.y,scale:scale,zoomLevel:stateObject.zoomLevel,layout:layout,activeLayers:activeLayers,sessionId:sessionId,srid:srid,geographicWidth:geographicWidth,nodeLayers:nodeLayers,groundScale:groundScale,blnPlaylistMode:blnPlaylistMode,intPlaylistViewId:intPlaylistViewId,toQueryString:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8421,'toQueryString :','function()',arguments);var encoded=this.brx+'/'+this.bry+'/'+this.tlx+'/'+this.tly+'/';encoded+=this.zoomLevel+'/'+$j.toJSON(this.activeLayers)+'/'+this.sessionId+'/'+this.srid+'/';encoded+=this.scale+'/'+this.geographicWidth+'/';encoded+=this.centreX+'/'+this.centreY+'/';encoded+=this.nodeLayers+'/'+this.layout+'/';encoded+=this.groundScale+'/';encoded+=blnPlaylistMode.toString()+'/'+(intPlaylistViewId==null?'null':intPlaylistViewId.toString());return encoded;}};window.open(this.strUrlPrefix+'getPrintMap/'+encoded.toQueryString(),'map_print');},toggleElement:function(strElementId,blnShow)
{Profiler.profile('view/components/map/assets/javascript/map.js',8441,'toggleElement:','function(strElementId, blnShow)',arguments);var strStyle=(blnShow)?'':'none';var objElement=$j('#'+strElementId);if(objElement.length>0)
{objElement.css({display:strStyle});}},getState:function(blnSerialize,blnIncludeMapStamps)
{Profiler.profile('view/components/map/assets/javascript/map.js',8455,'getState:','function(blnSerialize, blnIncludeMapStamps)',arguments);var blnSerialize=(typeof(blnSerialize)!='undefined')?blnSerialize:true;var blnIncludeMapStamps=(typeof(blnIncludeMapStamps)!='undefined')?blnIncludeMapStamps:false;var ezMapState=this.objEMController.getState(!blnSerialize);var layerState=this.returnCurrentLayerList();var blnLayerListVisible=this.getLayerListVisibleStatus();var clonedLayerState={};$j.each(layerState,function(strKey,objLayerDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',8469,'$j.each(layerState,','function(strKey, objLayerDetails)',arguments);clonedLayerState[strKey]=cloneObject(objLayerDetails,['arrAnnotationObjects']);});var mapState={ezMapState:ezMapState,layerState:clonedLayerState,intMapLayerSliderValue:this.objMapMenuMapAWidget.getSliderValue(),blnLayerListVisible:blnLayerListVisible};if(blnIncludeMapStamps)
{var arrResourceExplorerStamps=this.getStampState(this.objStampDisplay.points);var arrPlaceStamps=this.getStampState(this.objPlaceStampDisplay.points);var arrTagStamps=this.getStampState(this.objTagStampDisplay.points);var arrLayerStamps=this.getLayerStampState();mapState.resourceExplorerStamps=arrResourceExplorerStamps;mapState.placeStamps=arrPlaceStamps;mapState.tagStamps=arrTagStamps;mapState.layerStamps=arrLayerStamps;}
if(blnSerialize)
{mapState=$j.toJSON(mapState);}
return mapState;},getStampState:function(arrMapPoints)
{Profiler.profile('view/components/map/assets/javascript/map.js',8506,'getStampState:','function(arrMapPoints)',arguments);var arrStamps=[];$j.each(arrMapPoints,function(strIndex,objStamp)
{Profiler.profile('view/components/map/assets/javascript/map.js',8510,'$j.each(arrMapPoints,','function(strIndex, objStamp)',arguments);var objElement=$j($j(objStamp.returnElementReference()).html());var strStampId=objElement.attr('id');var strStampClass=objElement.attr('class');var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{var strFilter=objElement.css('filter');if(strFilter==null)
{var strStampIcon=null;}
else
{var regex=/src='(.*)'.*,/i;var arrMatches=regex.exec(strFilter);var strStampIcon=arrMatches[1];}}
else
{var strBackgroundImage=objElement.css('background-image');if(strBackgroundImage==null)
{var strStampIcon=null;}
else
{var regex=/\((.*)\)/;var arrMatches=regex.exec(strBackgroundImage);var strStampIcon=arrMatches[1];if(strStampIcon.substring(0,1)=='"')
{strStampIcon=strStampIcon.substring(1);}
if(strStampIcon.substring(strStampIcon.length-1)=='"')
{strStampIcon=strStampIcon.substring(0,strStampIcon.length-1);}}}
var objPoint={'x':objStamp.worldPoint.x,'y':objStamp.worldPoint.y,'srid':objStamp.worldPoint.srid};var objStampDetails={'strId':strStampId,'strClass':strStampClass,'strIconPath':strStampIcon,'objPoint':objPoint,'objData':objStamp.objStampData};arrStamps.push(objStampDetails);});return arrStamps;},getLayerStampState:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8585,'getLayerStampState:','function()',arguments);var arrStamps=[];var objSubdomains=Shell.getWebsiteSubdomains();$j.each(this.objCurrentLayerGeometries,function(strTileCoords,objGeometryTypes)
{Profiler.profile('view/components/map/assets/javascript/map.js',8591,'$j.each(this.objCurrentLayerGeometries,','function(strTileCoords, objGeometryTypes)',arguments);$j.each(objGeometryTypes,function(strGeometryType,objGeometries)
{Profiler.profile('view/components/map/assets/javascript/map.js',8593,'$j.each(objGeometryTypes,','function(strGeometryType, objGeometries)',arguments);$j.each(objGeometries,function(intResourceId,objGeometry)
{Profiler.profile('view/components/map/assets/javascript/map.js',8595,'$j.each(objGeometries,','function(intResourceId, objGeometry)',arguments);var objTopicDetails=ResourceExplorer.getTopicDetails(objGeometry.intTopicId);if(objTopicDetails==null)
{objTopicDetails={strName:'Resource',strIconPath:objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_blue.png'};}
var objStampData={'strId':'tag_'+objGeometry.intTopicId+'_symbol_'+intResourceId,'strClass':'resourceExplorerTagStamp','strIconPath':objTopicDetails.strIconPath,'intIconSize':objGeometry.intIconSize,'objPoint':{'x':objGeometry.x,'y':objGeometry.y,'srid':objGeometry.intSrid},'objData':{'arrPopupGeometryIds':[{container_node_id:intResourceId,id:null}],'objPopupGeometry':{x:objGeometry.x,y:objGeometry.y,srid:objGeometry.intSrid},'intResourceId':intResourceId,'intGeometryId':null,'intTopicId':objGeometry.intTopicId,'strTopicName':objTopicDetails.strName,'strResourceTitle':objGeometry.strResourceName,'strResourceType':objGeometry.strResourceType,'intHiddenResources':objGeometry.intHiddenResources,'intHiddenTopics':objGeometry.intHiddenTopics,'blnTransparentBoxOutput':true,'blnTopicNameOnHoverDisabled':false}};arrStamps.push(objStampData);});});});return arrStamps;},setState:function(state,blnPlaylistMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',8659,'setState:','function(state, blnPlaylistMode)',arguments);if(state=='undefined'||state==null||state=='null'||state=='')
{return;}
var blnPlaylistMode=(typeof(blnPlaylistMode)!='undefined')?blnPlaylistMode:false;var mapState=$j.evalJSON(state);this.unregisterLayerGeometries();this.closeResourceDetails();this.hideStampDetails(true);if(mapState.ezMapState&&mapState.ezMapState!=null&&mapState.ezMapState!='null')
{this.objEMController.setState(mapState.ezMapState);}
if(Object.isArray(mapState.layerState)&&mapState.layerState.length==0)
{this.overrideCurrentLayerList({},false,blnPlaylistMode);}
else
{if(mapState.layerState&&mapState.layerState!=null&&mapState.layerState!='null')
{this.overrideCurrentLayerList(mapState.layerState,false,blnPlaylistMode);}}
this.removeAllStamps();if(mapState.resourceExplorerStamps&&mapState.resourceExplorerStamps!=null&&mapState.resourceExplorerStamps!='null')
{this.setStampState(this.objStampDisplay,mapState.resourceExplorerStamps);}
if(mapState.placeStamps&&mapState.placeStamps!=null&&mapState.placeStamps!='null')
{this.setStampState(this.objPlaceStampDisplay,mapState.placeStamps);}
if(mapState.intMapLayerSliderValue||mapState.intMapLayerSliderValue===0)
{this.objMapMenuMapAWidget.setSliderValue(mapState.intMapLayerSliderValue);}
mapState.blnLayerListVisible?this.showLayerList():this.hideLayerList();},setStampState:function(objStampDisplay,arrStampState)
{Profiler.profile('view/components/map/assets/javascript/map.js',8730,'setStampState:','function(objStampDisplay, arrStampState)',arguments);if(!objStampDisplay)
{return;}
var intSymbolSize=40;var arrStampDetails=[];var _this=this;var objIdentity=Shell.getIdentity();$j.each(arrStampState,function(strIndex,objStamp)
{Profiler.profile('view/components/map/assets/javascript/map.js',8745,'$j.each(arrStampState,','function(strIndex, objStamp)',arguments);if($j('#'+objStamp.strId).length>0)
{return;}
var objTagSymbol=document.createElement('div');var objChildDiv=document.createElement('div');$j(objChildDiv).addClass(objStamp.strClass);$j(objChildDiv).attr('id',objStamp.strId);$j(objChildDiv).attr('style','background:url('+objStamp.strIconPath+') no-repeat left top;width:'+intSymbolSize+'px;height:'+intSymbolSize+'px;cursor:pointer;');objTagSymbol.appendChild(objChildDiv);var objDefObj={size:new Point(intSymbolSize,intSymbolSize,'pixel')};var objStampElement=new Stamp.Dom(objTagSymbol,objDefObj);objStampDisplay.addStamp(objStampElement,'');var objStampInstance=objStampDisplay.addPoint(new Point(objStamp.objPoint.x,objStamp.objPoint.y,objStamp.objPoint.srid),'',objStamp.objData);arrStampDetails.push({'strStampId':objStampInstance.stampId,'objStampInstance':objStampInstance});var objRealSymbolDiv=$j('#'+objStamp.strId);if(_this.blnOutputResourcesInTransparentBox===true)
{var objParams={objMap:_this,intResourceId:objStamp.objData.intResourceId,intTopicId:objStamp.objData.intTopicId,arrPopupGeometryIds:objStamp.objData.arrPopupGeometryIds,objPopupGeometry:objStamp.objData.objPopupGeometry,strTopicName:(objStamp.objData.strTopicName==null)?'Resource':objStamp.objData.strTopicName,strResourceTitle:objStamp.objData.strResourceTitle,strResourceType:objStamp.objData.strResourceType,intHiddenResources:objStamp.objData.intHiddenResources,intHiddenTopics:objStamp.objData.intHiddenTopics,zIndex:objRealSymbolDiv.css('z-index')};if(Shell.getIsLicencedUser()===false)
{objRealSymbolDiv.bind('click',objParams,function(){Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');});}
else
{objRealSymbolDiv.bind('click',objParams,function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',8804,'objRealSymbolDiv.bind(\'click\', objParams,','function(event)',arguments);clearTimeout(event.data.objMap.objTransparentBoxTimeout);Map.showStampDetails(this,event.data,true);if(event.data.intResourceId&&typeof(_this.objCurrentPageResultGeometries[event.data.intResourceId])!='undefined')
{Map.showSpecificResourceGeometries(event.data.intResourceId,true,true);}
else
{Map.queryMap(event.data.arrPopupGeometryIds,event.data.objPopupGeometry,true,true);}
event.data.objMap.blnPopupInExpandedMode=true;var objStampParent=$j(this).parent().get(0);$j(objStampParent).css('z-index',event.data.zIndex);});}
if(objStamp.objData.blnTopicNameOnHoverDisabled!==true)
{_this.activateStampHover(objRealSymbolDiv,objParams);}}
else
{if(Shell.getIsLicencedUser()===false)
{objRealSymbolDiv.bind('click',objParams,function(){Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');});}
else
{objRealSymbolDiv.bind('click',{intResourceId:objStamp.objData.intResourceId,arrPopupGeometryIds:objStamp.objData.arrPopupGeometryIds,objPopupGeometry:objStamp.objData.objPopupGeometry},function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',8841,'objRealSymbolDiv.bind(\'click\', {intResourceId: objStamp.objData.intResourceId, arrPopupGeometryIds: objStamp.objData.arrPopupGeometryIds, objPopupGeometry: objStamp.objData.objPopupGeometry},','function(event)',arguments);if(event.data.intResourceId&&typeof(_this.objCurrentPageResultGeometries[event.data.intResourceId])!='undefined')
{Map.showSpecificResourceGeometries(event.data.intResourceId,true,true);}
else
{Map.queryMap(event.data.arrPopupGeometryIds,event.data.objPopupGeometry,true,true);}});}}
_this.makeBackgroundPngTransparent(objStamp.strId);objTagSymbol=null;objChildDiv=null;objBrowserDetails=null;objDefObj=null;objStampElement=null;objStampInstance=null;objRealSymbolDiv=null;});intSymbolSize=null;return arrStampDetails;},saveMapStateInCookie:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',8873,'saveMapStateInCookie:','function()',arguments);var objEzMapState=this.objEMController.getState(true);var objFilteredMapState={centerPointX:parseInt(objEzMapState.centerPoint.x),centerPointY:parseInt(objEzMapState.centerPoint.y),srid:parseInt(objEzMapState.centerPoint.srid),zoomLevel:parseInt(objEzMapState.zoomLevel),mapLayerA:parseInt(objEzMapState.layerState[1].mapId),mapLayerB:typeof(objEzMapState.layerState[2])!='undefined'?parseInt(objEzMapState.layerState[2].mapId):parseInt(objEzMapState.layerState[1].mapId),blnLayerListVisible:this.getLayerListVisibleStatus(),intMapLayerSliderValue:this.objMapMenuMapAWidget.getSliderValue()};$j.cookies.set('ulearnMapState',$j.toJSON(objFilteredMapState));},activateStampHover:function(objStamp,objStampDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',8894,'activateStampHover:','function(objStamp, objStampDetails)',arguments);var objParams={objMap:this,objPopupGeometry:objStampDetails.objPopupGeometry,intResourceId:objStampDetails.intResourceId,intTopicId:objStampDetails.intTopicId,strTopicName:objStampDetails.strTopicName,strResourceTitle:objStampDetails.strResourceTitle,strResourceType:objStampDetails.strResourceType,intHiddenResources:objStampDetails.intHiddenResources,intHiddenTopics:objStampDetails.intHiddenTopics};objStamp.bind('mouseover',objParams,function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',8910,'objStamp.bind(\'mouseover\', objParams,','function(event)',arguments);if(event.data.objMap.blnPopupInExpandedMode!==true&&event.data.objMap.objQueryWidget.getBlnZoomBoxActive()!==true)
{event.data.objMap.blnMouseOverStamp=true;Map.showStampDetails(this,event.data);event.data.objMap.highlightStamp(event.data.intResourceId);ResourceExplorer.highlightResource(event.data.intResourceId,true);Favourites.highlightResource(event.data.intResourceId);}});objStamp.bind('mouseout',objParams,function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',8922,'objStamp.bind(\'mouseout\', objParams,','function(event)',arguments);if(event.data.objMap.objQueryWidget.getBlnZoomBoxActive()===true)
{return true;}
var objElement=$j('#resource_hover_container');if(objElement.length==0)
{return true;}
var objPosition=objElement.offset();var intWidth=parseInt(objElement.outerWidth());var intHeight=objElement.outerHeight();if(event.pageX-1<objPosition.left||event.pageX+1>objPosition.left+intWidth||event.pageY-1<objPosition.top||event.pageY+1>objPosition.top+intHeight||objElement.css('display')=='none')
{event.data.objMap.blnMouseOverStamp=false;ResourceExplorer.unHighlightResource(event.data.intResourceId);Favourites.unHighlightResource(event.data.intResourceId);event.data.objMap.unHighlightStamp(event.data.intResourceId);Map.hideStampDetails();}});},deactivateStampHover:function(objStamp)
{Profiler.profile('view/components/map/assets/javascript/map.js',8959,'deactivateStampHover:','function(objStamp)',arguments);objStamp.unbind('mouseover');objStamp.unbind('mouseout');},highlightStamp:function(intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',8965,'highlightStamp:','function(intResourceId)',arguments);this.unHighlightAllStamps();this.arrHighlightedStamps.push(intResourceId);$j('#mapSymbolStamp_'+intResourceId).parent().css({'z-index':'1001'});var objSubdomains=Shell.getWebsiteSubdomains();var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{$j('#mapSymbolStamp_'+intResourceId).css({filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+objSubdomains.images+"/view/components/resource_explorer/assets/images/tag_icons/ulearn_orange.png', sizingMethod='crop')"});}
else
{$j('#mapSymbolStamp_'+intResourceId).css({'background-image':'url('+objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_orange.png)'});}},unHighlightStamp:function(intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',8999,'unHighlightStamp:','function(intResourceId)',arguments);var arrHighlightedStamps=[];$j.each(this.arrHighlightedStamps,$j.proxy(function(intKey,intCurrentResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',9003,'$j.each(this.arrHighlightedStamps, $j.proxy(','function(intKey, intCurrentResourceId)',arguments);if(intCurrentResourceId!=intResourceId)
{arrHighlightedStamps.push(intCurrentResourceId);}},this));this.arrHighlightedStamps=arrHighlightedStamps;var objSubdomains=Shell.getWebsiteSubdomains();var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{$j('#mapSymbolStamp_'+intResourceId).css({filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+objSubdomains.images+"/view/components/resource_explorer/assets/images/tag_icons/ulearn_blue.png', sizingMethod='crop')"});}
else
{$j('#mapSymbolStamp_'+intResourceId).css({'background-image':'url('+objSubdomains.images+'/view/components/resource_explorer/assets/images/tag_icons/ulearn_blue.png)'});}
$j('#mapSymbolStamp_'+intResourceId).parent().css({'z-index':'0'});},unHighlightAllStamps:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9039,'unHighlightAllStamps:','function()',arguments);$j.each(this.arrHighlightedStamps,$j.proxy(function(intKey,intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',9041,'$j.each(this.arrHighlightedStamps, $j.proxy(','function(intKey, intResourceId)',arguments);this.unHighlightStamp(intResourceId);},this));},showAnnotationLayerHasGeometriesLightboxInit:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9050,'showAnnotationLayerHasGeometriesLightboxInit:','function()',arguments);var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9055,'var objCallbackFunction =','function()',arguments);_this.showAnnotationLayerHasGeometriesLightbox();};Shell.launchNewLightboxWindow(objCallbackFunction,500,175);},showAnnotationLayerHasGeometriesLightbox:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9063,'showAnnotationLayerHasGeometriesLightbox:','function()',arguments);var strUrl='getShowAnnotationLayerHasGeometriesDetails/';var objParams={};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9075,'var objOnComplete =','function()',arguments);_this.executeUpdateInitCode();};this.update(strUrl,objParams,objOnComplete,'#lbContent');return Shell.generateStandardLightboxLoading();},submitAnnotationLayerForClearing:function(blnNoLightbox)
{Profiler.profile('view/components/map/assets/javascript/map.js',9087,'submitAnnotationLayerForClearing:','function(blnNoLightbox)',arguments);if(blnNoLightbox!==true)
{Shell.showCustomLightboxButtonActivity();}
var strUrl='clearAnnotationLayer/';var objParams={};if(blnNoLightbox===true)
{this.blnAlreadyPromptedScribbleLayerLightbox=true;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9108,'var objOnComplete =','function()',arguments);Map.refreshLayerList();};}
else
{var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9117,'var objOnComplete =','function()',arguments);_this.submitAnnotationLayerForClearingOnComplete();};}
this.update(strUrl,objParams,objOnComplete,'#lbContent');},submitAnnotationLayerForClearingOnComplete:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9127,'submitAnnotationLayerForClearingOnComplete:','function()',arguments);this.executeUpdateInitCode();Shell.resizeLightboxWindow(500,90);this.refreshLayerList();},saveAnnotationLayerAsInit:function(intAnnotationLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',9140,'saveAnnotationLayerAsInit:','function(intAnnotationLayerId)',arguments);var _this=this;this.intAnnotationLayerId=intAnnotationLayerId;Shell.launchNewLightboxWindow(function(){_this.showSaveAnnotationLayerAsLightbox(intAnnotationLayerId);},500,275);},showSaveAnnotationLayerAsLightbox:function(intAnnotationLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',9152,'showSaveAnnotationLayerAsLightbox:','function(intAnnotationLayerId)',arguments);var strUrl='getConfirmSaveAnnotationLayerAsDetails/';var objParams={arrSelectedResourceIds:$j.toJSON([intAnnotationLayerId])};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9164,'var objOnComplete =','function()',arguments);_this.executeUpdateInitCode();};this.update(strUrl,objParams,objOnComplete,'#lbContent');return Shell.generateStandardLightboxLoading();},submitAnnotationLayerForSavingAs:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9177,'submitAnnotationLayerForSavingAs:','function()',arguments);var strNewName=$j('#annotateLayerNewName').val();var strNewDescription=$j('#annotateLayerNewDescription').val();var strNewTags=$j('#annotateLayerNewTags').val();if(isFieldBlank(strNewName)||isFieldBlank(strNewTags))
{alert('Please enter name and tags.');return false;}
Shell.showCustomLightboxButtonActivity();var strUrl='saveAnnotationLayerAs/';var objParams={arrSelectedResourceIds:$j.toJSON([this.intAnnotationLayerId]),strName:strNewName,strDescription:strNewDescription,strTags:strNewTags};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9206,'var objOnComplete =','function()',arguments);_this.submitAnnotationLayerForSavingAsOnComplete();};this.update(strUrl,objParams,objOnComplete,'#lbContent');},submitAnnotationLayerForSavingAsOnComplete:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9215,'submitAnnotationLayerForSavingAsOnComplete:','function()',arguments);Shell.resizeLightboxWindow(500,150);this.executeUpdateInitCode();this.refreshLayerList();},autoSubmitAnnotationLayerForSavingAs:function(strLayerId,strLayerName,objCallbackFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',9229,'autoSubmitAnnotationLayerForSavingAs:','function(strLayerId, strLayerName, objCallbackFunction)',arguments);var strNewName=strLayerName;var strNewDescription='';var strNewTags='';var strUrl='saveAnnotationLayerAs/';var objParams={arrSelectedResourceIds:$j.toJSON([strLayerId]),strName:strNewName,strDescription:strNewDescription,strTags:strNewTags,blnDontShowNewAnnotationLayer:true};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9250,'var objOnComplete =','function()',arguments);_this.autoSubmitAnnotationLayerForSavingAsOnComplete(objCallbackFunction);};this.notify(strUrl,objParams,objOnComplete);},autoSubmitAnnotationLayerForSavingAsOnComplete:function(objCallbackFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',9259,'autoSubmitAnnotationLayerForSavingAsOnComplete:','function(objCallbackFunction)',arguments);this.executeUpdateInitCode();this.refreshLayerList({},false,{},objCallbackFunction);},addThresholdRadiusLayer:function(intLayerId,intCategoryId)
{Profiler.profile('view/components/map/assets/javascript/map.js',9269,'addThresholdRadiusLayer:','function(intLayerId, intCategoryId)',arguments);var strUrl='addThresholdRadiusLayer';var objParams={intLayerId:intLayerId,intCategoryId:intCategoryId};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9282,'var objOnComplete =','function()',arguments);_this.refreshLayerList();_this.enableElement('layer_list_panel');_this.enableElement('expandedContents');};this.disableElement('layer_list_panel');this.disableElement('expandedContents');this.notify(strUrl,objParams,objOnComplete);},removeThresholdRadiusLayer:function(intLayerId,intCategoryId)
{Profiler.profile('view/components/map/assets/javascript/map.js',9297,'removeThresholdRadiusLayer:','function(intLayerId, intCategoryId)',arguments);this.hideLayer(intLayerId);},loadCarousel:function(strUrl,objParams,objCallbackFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',9303,'loadCarousel:','function(strUrl, objParams, objCallbackFunction)',arguments);$j.ajax({async:true,cache:false,data:objParams,type:'POST',url:strUrl,complete:objCallbackFunction});},registerCarousel:function(strType,strCarouselIdentifier,objCarousel)
{Profiler.profile('view/components/map/assets/javascript/map.js',9317,'registerCarousel:','function(strType, strCarouselIdentifier, objCarousel)',arguments);if(typeof(this.objCarousels[strType])=='undefined')
{this.objCarousels[strType]={};}
this.objCarousels[strType][strCarouselIdentifier]=objCarousel;},initialiseMapMenuCarousel:function(XMLHttpRequest)
{Profiler.profile('view/components/map/assets/javascript/map.js',9327,'initialiseMapMenuCarousel:','function(XMLHttpRequest)',arguments);var _this=this;var strHtml=XMLHttpRequest.responseText;var objBrowserDetails=Shell.getBrowserDetails();$j(document.body).append(strHtml);this.objMapMenuCategoriesCoverflow=new CoverflowHelper
({mixSelector:'#mapMenuCategories',intWidth:(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)?980:'auto',intHeight:190,intArrowBuffer:80,blnStartMinimised:false,intScrollAmount:4,blnSortable:false,blnUsePlaceHolders:false,blnSelectable:false,blnShowHoverGlow:true,objGenerateInnerItemHtmlOverrideFunction:function(objItem,strElementId)
{Profiler.profile('view/components/map/assets/javascript/map.js',9350,'objGenerateInnerItemHtmlOverrideFunction:','function(objItem, strElementId)',arguments);return'<div class="content">'+'<div class="thumbnail" style="background-image:url('+objItem.strThumbnailUrl+')"> </div>'+'<div class="details">'+'<div class="name">'+objItem.strName+'</div>'+'<div class="description">'+objItem.strDescription+'</div>'+'</div>'+'</div>';},objOnClickItemCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/components/map/assets/javascript/map.js',9360,'objOnClickItemCallback: $j.proxy(','function(objEvent, objItem)',arguments);this.openMapMenuCategory(objItem);},this)});this.objMapMenuMapsCoverflow=new CoverflowHelper
({mixSelector:'#mapMenuMaps',intWidth:(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)?980:'auto',intHeight:190,intArrowBuffer:80,blnStartMinimised:false,intScrollAmount:4,blnSortable:false,blnUsePlaceHolders:false,blnSelectable:false,blnShowHoverGlow:true,objGenerateInnerItemHtmlOverrideFunction:function(objItem,strElementId)
{Profiler.profile('view/components/map/assets/javascript/map.js',9379,'objGenerateInnerItemHtmlOverrideFunction:','function(objItem, strElementId)',arguments);return'<div class="content">'+'<div class="thumbnail" style="background-image:url('+objItem.strThumbnailUrl+')"> </div>'+'<div class="details">'+'<div class="name">'+objItem.strName+'</div>'+'<div class="description">'+objItem.strDescription+'</div>'+'</div>'+'</div>';},objOnClickItemCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/components/map/assets/javascript/map.js',9389,'objOnClickItemCallback: $j.proxy(','function(objEvent, objItem)',arguments);this.selectMapMenuMap(objItem);},this)});$j.each(this.objMapMenuCategories,$j.proxy(function(intKey,objCategory)
{Profiler.profile('view/components/map/assets/javascript/map.js',9396,'$j.each(this.objMapMenuCategories, $j.proxy(','function(intKey, objCategory)',arguments);this.objMapMenuCategoriesCoverflow.addItem(objCategory);},this));$j(this.objMapMenuMapAWidget.returnDivReference('imgA')).hide();$j(this.objMapMenuMapAWidget.returnDivReference('imgB')).hide();this.objMapMenuMapAWidget.blnDisableABIcons=true;var objMenuA=this.objMapMenuMapAWidget.returnDivReference('menuA');var objMenuB=this.objMapMenuMapAWidget.returnDivReference('menuB');var objSubdomains=Shell.getWebsiteSubdomains();$j(objMenuA).css({'width':'150px','height':'19px','margin':'2px','padding-top':'5px','background':'url('+objSubdomains.images+'/view/components/map/assets/images/map_picker/sprite_sheets/carousel_buttons/sprite_sheet_no_repeat.png) no-repeat 0px 0px','text-align':'center','font-size':'70%','color':'#ffffff','cursor':'pointer'});$j(objMenuB).css({'width':'150px','height':'19px','margin':'2px','padding-top':'5px','background':'url('+objSubdomains.images+'/view/components/map/assets/images/map_picker/sprite_sheets/carousel_buttons/sprite_sheet_no_repeat.png) no-repeat -150px 0px','text-align':'center','font-size':'70%','color':'#ffffff','cursor':'pointer'});if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{$j(objMenuA).css('height','29px');$j(objMenuB).css('height','29px');this.makeBackgroundPngTransparent(objMenuA,true);this.makeBackgroundPngTransparent(objMenuB,true);}
$j(objMenuA).bind('click',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9453,'$j(objMenuA).bind(\'click\',','function()',arguments);_this.showMapMenuCarousel('A');return false;});if(Shell.getIsLicencedUser()===false)
{$j(objMenuB).bind('click',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9463,'$j(objMenuB).bind(\'click\',','function()',arguments);Shell.showLicenceRequiredPopup('Compare two maps at the same time','compare_maps');return false;});}
else
{$j(objMenuB).bind('click',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9473,'$j(objMenuB).bind(\'click\',','function()',arguments);_this.showMapMenuCarousel('B');return false;});}
$j(objMenuA).bind('mouseover',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9483,'$j(objMenuA).bind(\'mouseover\',','function()',arguments);_this.showMapMenuHoverDetails('A');});$j(objMenuB).bind('mouseover',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9488,'$j(objMenuB).bind(\'mouseover\',','function()',arguments);_this.showMapMenuHoverDetails('B');});$j(objMenuA).bind('mouseout',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9493,'$j(objMenuA).bind(\'mouseout\',','function()',arguments);_this.hideMapMenuHoverDetails();});$j(objMenuB).bind('mouseout',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9498,'$j(objMenuB).bind(\'mouseout\',','function()',arguments);_this.hideMapMenuHoverDetails();});$j('#mapMenuCarousel').bind('mouseover',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9504,'$j(\'#mapMenuCarousel\').bind(\'mouseover\',','function()',arguments);_this.objMapMenuMapAWidget.blnMouseOverMenu=true;});$j('#mapMenuCarousel').bind('mouseout',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9509,'$j(\'#mapMenuCarousel\').bind(\'mouseout\',','function()',arguments);_this.objMapMenuMapAWidget.blnMouseOverMenu=false;});this.objMapMenuMapAWidget.objCachedFunctions.bodyClick=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9515,'this.objMapMenuMapAWidget.objCachedFunctions.bodyClick =','function()',arguments);if(_this.objMapMenuMapAWidget.blnMouseOverMenu!==true)
{_this.hideMapMenuCarousel();}};$j(document).find('body:first').bind('click',this.objMapMenuMapAWidget.objCachedFunctions.bodyClick);if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{var objIframe=document.createElement('iframe');$j(objIframe).attr({'frameborder':'0','tabindex':'-1','transparency':'true','src':'javascript:false;'});$j(objIframe).css({'position':'absolute','top':'0px','left':'0px','width':'100%','height':'100%','border':'none','filter':'Alpha(Opacity=\'0\')','display':'block','z-index':'-1'});$j('#mapMenuCarouselContainer').prepend(objIframe);}
this.mapMenuCarouselUpdateMapMenuButtons();},mapMenuCarouselUpdateMapMenuButtons:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9558,'mapMenuCarouselUpdateMapMenuButtons:','function()',arguments);if(!this.objMapMenuMapAWidget.layerIds)
{this.objMapMenuMapAWidget.updateLayerIds();}
var objLayerA=this.objEMController.mapStatus.getLayer(this.objMapMenuMapAWidget.layerIds['layer'][0]);var intMapAId=objLayerA.getMapId();var objMapADetails=this.objEMController.mapStatus.getMapDetails(intMapAId);$j(this.objMapMenuMapAWidget.returnDivReference('menuA')).html(objMapADetails['name']);var objLayerB=this.objEMController.mapStatus.getLayer(this.objMapMenuMapAWidget.layerIds['layer'][1]);if(typeof(objLayerB)!='undefined')
{if(globalNoMapB===true)
{var intMapBId=0;var objMapBDetails={name:'No map'};}
else
{var intMapBId=objLayerB.getMapId();var objMapBDetails=this.objEMController.mapStatus.getMapDetails(intMapBId);}
$j(this.objMapMenuMapAWidget.returnDivReference('menuB')).html(objMapBDetails['name']);}},showMapMenuHoverDetails:function(strMenu)
{Profiler.profile('view/components/map/assets/javascript/map.js',9592,'showMapMenuHoverDetails:','function(strMenu)',arguments);if(this.blnMapMenuCarouselOpen===true)
{return;}
$j('#mapMenuHoverDetails, #mapMenuHoverPointer').stop(true,true).hide();if(strMenu=='B'&&globalNoMapB===true)
{var intMapId=0;}
else
{if(strMenu=='A')
{var objLayer=this.objEMController.mapStatus.getLayer(this.objMapMenuMapAWidget.layerIds['layer'][0]);}
else
{var objLayer=this.objEMController.mapStatus.getLayer(this.objMapMenuMapAWidget.layerIds['layer'][1]);}
var intMapId=objLayer.getMapId();}
if(typeof(this.objMapMenuMaps[intMapId])=='undefined')
{return;}
$j('#mapMenuHoverDetailsGroup').html(this.objMapMenuMaps[intMapId].strLocalisedCategoryName);$j('#mapMenuHoverDetailsBranch').html(this.objMapMenuMaps[intMapId].strBranchName);$j('#mapMenuHoverDetailsMap').html(this.objMapMenuMaps[intMapId].strName);$j('#mapMenuHoverDetailsDescription').html(this.objMapMenuMaps[intMapId].strDescription);$j('#mapMenuHoverDetailsPreview').attr('src',this.objMapMenuMaps[intMapId].strThumbnailUrl);var objMenu=$j(this.objMapMenuMapAWidget.returnDivReference('menu'+strMenu));var intMenuWidth=parseInt(objMenu.outerWidth());var objPosition=objMenu.offset();var intPointerTop=objPosition.top+30;var intPointerLeft=objPosition.left+(intMenuWidth/2);$j('#mapMenuHoverPointer').css({'top':intPointerTop+'px','left':intPointerLeft+'px'});var intMenuHeight=$j(this.objMapMenuMapAWidget.returnDivReference('menu'+strMenu)).height();var objMenuPosition=$j(this.objMapMenuMapAWidget.returnDivReference('menu'+strMenu)).offset();$j('#mapMenuHoverDetails').css({'top':objPosition.top+50+'px','left':parseInt(objMenuPosition.left)+'px'});var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer')
{$j('#mapMenuHoverDetails, #mapMenuHoverPointer').show();}
else
{$j('#mapMenuHoverDetails, #mapMenuHoverPointer').fadeIn(500);}},hideMapMenuHoverDetails:function(blnInstant)
{Profiler.profile('view/components/map/assets/javascript/map.js',9673,'hideMapMenuHoverDetails:','function(blnInstant)',arguments);var blnInstant=(typeof(blnInstant)!='undefined')?blnInstant:false;var objBrowserDetails=Shell.getBrowserDetails();if(blnInstant===true||objBrowserDetails.strBrowser=='Explorer')
{$j('#mapMenuHoverDetails, #mapMenuHoverPointer').stop(true,true).hide();}
else
{$j('#mapMenuHoverDetails, #mapMenuHoverPointer').stop(true,true).fadeOut(500);}},showMapMenuCarousel:function(strMenu)
{Profiler.profile('view/components/map/assets/javascript/map.js',9689,'showMapMenuCarousel:','function(strMenu)',arguments);this.mapMenuCarouselReset();this.hideMapMenuHoverDetails(true);this.blnMapMenuCarouselOpen=true;this.strMapMenuCarouselLayer=strMenu;if(strMenu=='A')
{$j('#mapMenuCarouselLayer div').css({'background-position':'-1000px 0px'});}
else
{$j('#mapMenuCarouselLayer div').css({'background-position':'-1025px 0px'});}
var objLastCategory=this.objMapMenuCategoriesCoverflow.getItemDetailsFromPosition(this.objMapMenuCategoriesCoverflow.intItems-1);if(strMenu=='A'&&objLastCategory.strName=='No Map')
{this.objMapMenuCategoriesCoverflow.removeItem(this.objMapMenuCategoriesCoverflow.intItems-1);}
else if(strMenu=='B'&&objLastCategory.strName!='No Map')
{this.objMapMenuCategoriesCoverflow.addItem
({intId:0,strName:'No Map',strLocalisedName:'No Map',strDescription:'An empty layer.',strThumbnailUrl:'/view/shared/assets/images/blank.gif',blnEnabled:true,blnPlaceholder:false,blnVisible:false});}
if(this['blnMapMenu'+strMenu+'SelectedMap']===true)
{if(strMenu=='A')
{var objLayer=this.objEMController.mapStatus.getLayer(this.objMapMenuMapAWidget.layerIds['layer'][0]);}
else
{var objLayer=this.objEMController.mapStatus.getLayer(this.objMapMenuMapAWidget.layerIds['layer'][1]);}
var intMapId=objLayer.getMapId();$j('#mapMenuCategories').parent().hide();var intCategoryId=this.objMapMenuMaps[intMapId].intCategoryId;this.objMapMenuMapsCoverflow.removeAllItems();$j.each(this.objMapMenuMaps,$j.proxy(function(intKey,objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',9760,'$j.each(this.objMapMenuMaps, $j.proxy(','function(intKey, objMap)',arguments);if($j.inArray(intCategoryId,objMap.arrCategories)>-1)
{this.objMapMenuMapsCoverflow.addItem(objMap);}},this));$j('#mapMenuCarouselLayerCategory').html(' &gt; '+this.objMapMenuCategories[intCategoryId].strLocalisedName);$j('#mapMenuCarouselBackButton').css({'background-position':'-375px 0px','color':'#ffffff'});$j('#mapMenuMaps').parent().show();}
else
{$j('#mapMenuMaps').parent().hide();$j('#mapMenuCategories').parent().show();this.objMapMenuCategoriesCoverflow.scrollToStart(true);}
var objCarousel=$j('#mapMenuCarousel');var intCarouselWidth=objCarousel.width();var intCarouselPadding=parseInt(objCarousel.css('padding-left'))+parseInt(objCarousel.css('padding-right'));var intDefaultMarginLeft=-((intCarouselWidth+intCarouselPadding)/2);var objMenu=$j(this.objMapMenuMapAWidget.returnDivReference('menu'+strMenu));var intMenuWidth=parseInt(objMenu.outerWidth());var objPosition=objMenu.offset();var intPointerTop=objPosition.top+30;var intPointerLeft=objPosition.left+(intMenuWidth/2);$j('#mapMenuCarouselPointer').css({'top':intPointerTop+'px','left':intPointerLeft+'px','margin-top':'auto','display':'block'});objCarousel.css({'top':(objPosition.top+50)+'px','margin-top':'auto','margin-left':intDefaultMarginLeft+'px'});var objCarouselPosition=objCarousel.offset();var intPadding=parseInt($j('#mapMenuCarouselPointer').width())*2;if(intPointerLeft<(objCarouselPosition.left+intPadding))
{var intDifference=intPointerLeft-objCarouselPosition.left;objCarousel.css({'margin-left':(intDefaultMarginLeft+intDifference-intPadding)+'px'});}
else if(intPointerLeft>(objCarouselPosition.left+intCarouselWidth+intCarouselPadding-intPadding))
{var intDifference=intPointerLeft-(objCarouselPosition.left+intCarouselWidth);objCarousel.css({'margin-left':(intDefaultMarginLeft+intDifference+intPadding)+'px'});}},registerMapMenuCategory:function(objCategory)
{Profiler.profile('view/components/map/assets/javascript/map.js',9849,'registerMapMenuCategory:','function(objCategory)',arguments);objCategory.blnPlaceholder=false;objCategory.blnVisible=false;this.objMapMenuCategories[objCategory.intId]=objCategory;},registerMapMenuMap:function(objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',9858,'registerMapMenuMap:','function(objMap)',arguments);if(typeof(this.objMapMenuMaps[objMap.intId])=='undefined')
{objMap.blnPlaceholder=false;objMap.blnVisible=false;objMap.arrCategories=[objMap.intCategoryId];this.objMapMenuMaps[objMap.intId]=objMap;}
else
{this.objMapMenuMaps[objMap.intId].arrCategories.push(objMap.intCategoryId);}},openMapMenuCategory:function(objCategory)
{Profiler.profile('view/components/map/assets/javascript/map.js',9877,'openMapMenuCategory:','function(objCategory)',arguments);var strLayer=this.strMapMenuCarouselLayer;if(objCategory.blnEnabled===false)
{Shell.showLicenceRequiredPopup('Wide range of mapping','maps');return;}
if(objCategory.intId==0&&strLayer=='B')
{this.hideMapMenuCarousel();this.objEMController.mapStatus.setLayerToMapId(2,0,'No Map');globalNoMapB=true;this['blnMapMenu'+strLayer+'SelectedMap']=false;this.mapMenuCarouselUpdateMapMenuButtons();return;}
$j('#mapMenuCarouselLayerCategory').html(' &gt; '+objCategory.strLocalisedName);this.objMapMenuMapsCoverflow.removeAllItems();$j.each(this.objMapMenuMaps,$j.proxy(function(intKey,objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',9918,'$j.each(this.objMapMenuMaps, $j.proxy(','function(intKey, objMap)',arguments);if($j.inArray(objCategory.intId,objMap.arrCategories)>-1&&objMap.blnEnabled===true)
{this.objMapMenuMapsCoverflow.addItem(objMap);}},this));$j.each(this.objMapMenuMaps,$j.proxy(function(intKey,objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',9927,'$j.each(this.objMapMenuMaps, $j.proxy(','function(intKey, objMap)',arguments);if($j.inArray(objCategory.intId,objMap.arrCategories)>-1&&objMap.blnEnabled===false)
{this.objMapMenuMapsCoverflow.addItem(objMap);}},this));var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=7)
{$j('#mapMenuCategories').parent().hide();$j('#mapMenuMaps').parent().show();}
else
{$j('#mapMenuCategories').parent().fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',9945,'$j(\'#mapMenuCategories\').parent().fadeOut(500,','function()',arguments);$j('#mapMenuMaps').parent().fadeIn(500);});}
$j('#mapMenuCarouselBackButton').css({'background-position':'-375px 0px','color':'#ffffff'});},selectMapMenuMap:function(objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',9960,'selectMapMenuMap:','function(objMap)',arguments);var _this=this;var strLayer=this.strMapMenuCarouselLayer;if(objMap.blnEnabled!==true||objMap.blnUnlicenced===true)
{Shell.showLicenceRequiredPopup('Wide range of mapping','maps');}
else if(objMap.intId!=''&&objMap.intId!='expired'&&objMap.intId!='0')
{this.hideMapMenuCarousel();if(strLayer=='A')
{var strLayerId=this.objMapMenuMapAWidget.layerIds['layer'][0];}
else
{var strLayerId=this.objMapMenuMapAWidget.layerIds['layer'][1];}
this.objMapMenuMaps[objMap.intId].intCategoryId=objMap.intCategoryId;this.objMapMenuMaps[objMap.intId].strCategoryName=objMap.strCategoryName;this.objMapMenuMaps[objMap.intId].strLocalisedCategoryName=objMap.strLocalisedCategoryName;this.objMapMenuMaps[objMap.intId].strBranchName=objMap.strBranchName;this.objMapMenuMaps[objMap.intId].strLocalisedBranchName=objMap.strLocalisedBranchName;var blnMapIsWithinExtents=this.objEMController.mapStatus.mapIsWithinExtents(objMap.intId);this.objEMController.mapStatus.setLayerToMapId(strLayerId,objMap.intId,objMap.strBranchName,false);if(strLayer=='A'&&blnMapIsWithinExtents===false)
{Shell.lightboxConfirm('The map you have selected is outside your current view.\n\nDo you wish to move the maps to show the map area you have selected?',550,115,$j.proxy(function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10004,'Shell.lightboxConfirm(\'The map you have selected is outside your current view.\n\nDo you wish to move the maps to show the map area you have selected?\', 550, 115, $j.proxy(','function()',arguments);this.objEMController.mapStatus.jumpToExtIfNotOverMapArea();},this));}
this['blnMapMenu'+strLayer+'SelectedMap']=true;if(strLayer=='B')
{globalNoMapB=false;}
this.mapMenuCarouselUpdateMapMenuButtons();if(strLayer=='B')
{if(blnMapIsWithinExtents===false)
{Shell.lightboxConfirm('The map you have selected for map B is outside your current view.\n\nDo you wish to move the maps to show the map area you have selected?',550,115,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10029,'Shell.lightboxConfirm(\'The map you have selected for map B is outside your current view.\n\nDo you wish to move the maps to show the map area you have selected?\', 550, 115,','function()',arguments);var strStackId=_this.objEMController.mapStatus.layersArray[strLayerId].getStackId();_this.objEMController.mapStatus.jumpToExt(strStackId);});}}}},mapMenuCarouselHoverMap:function(objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',10040,'mapMenuCarouselHoverMap:','function(objElement)',arguments);var objExtendedElement=$j(objElement);this.strMapMenuCarouselHoveredMapId=objExtendedElement.attr('id');var objElementPosition=objExtendedElement.offset();if(this.blnMapMenuCarouselFullscreen===true)
{var objFullscreenPosition=$j('#mapMenuFullScreen').offset();var intTop=(objElementPosition.top-objFullscreenPosition.top-15);var intLeft=(objElementPosition.left-objFullscreenPosition.left-15);}
else
{var objUlPosition=objExtendedElement.parents('ul:first').offset();var objUlLeft=parseInt(objExtendedElement.parents('ul:first').css('left'));var objUlContainerPaddingTop=parseInt(objExtendedElement.parents('.jcarousel-container:first').css('padding-top'));var objUlContainerPaddingLeft=parseInt(objExtendedElement.parents('.jcarousel-container:first').css('padding-left'));var intTop=(objElementPosition.top-objUlPosition.top+objUlContainerPaddingTop-15);var intLeft=(objElementPosition.left-objUlPosition.left+objUlContainerPaddingLeft+objUlLeft-15);}
objExtendedElement.css({'background-position':'-160px 0px'});$j('#mapMenuCarouselMapGlow').css({'top':intTop+'px','left':intLeft+'px','display':'block'});},mapMenuCarouselUnHoverMap:function(objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',10088,'mapMenuCarouselUnHoverMap:','function(objElement)',arguments);$j(objElement).css({'background-position':'0px 0px'});if(objElement.id==this.strMapMenuCarouselHoveredMapId)
{$j('#mapMenuCarouselMapGlow').hide();}},mapMenuCarouselBack:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10102,'mapMenuCarouselBack:','function()',arguments);if($j('#mapMenuCategories').parent(':hidden').length>0)
{var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=7)
{$j('#mapMenuCarouselLayerCategory').html('');$j('#mapMenuMaps').parent().hide();$j('#mapMenuCategories').parent().show();$j('#mapMenuCarouselBackButton').css({'background-position':'-300px 0px','color':'#999999'});}
else
{$j('#mapMenuMaps').parent().fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10126,'$j(\'#mapMenuMaps\').parent().fadeOut(500,','function()',arguments);$j('#mapMenuCarouselLayerCategory').html('');$j('#mapMenuCategories').parent().fadeIn(500);$j('#mapMenuCarouselBackButton').css({'background-position':'-300px 0px','color':'#999999'});});}}},mapMenuCarouselReset:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10145,'mapMenuCarouselReset:','function()',arguments);$j('#mapMenuCarouselBackButton').show();$j('#mapMenuFullScreen').hide();$j('#mapMenuCarouselMinimiseButton').hide();$j('#mapMenuCarouselFullscreenButton').show();$j('#mapMenuCarouselContainer').css
({'width':'980px','height':'180px','margin-top':'30px','margin-left':'0px'});$j('#mapMenuCarouselLayerCategory').html('');this.blnMapMenuCarouselFullscreen=false;},hideMapMenuCarousel:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10175,'hideMapMenuCarousel:','function()',arguments);this.mapMenuCarouselReset();this.blnMapMenuCarouselOpen=false;$j('#mapMenuCarousel').css({'margin-top':'-2000px'});$j('#mapMenuCarouselPointer').css({'margin-top':'-2000px'});},switchToMap:function(intMapId)
{Profiler.profile('view/components/map/assets/javascript/map.js',10194,'switchToMap:','function(intMapId)',arguments);if(typeof(this.objMapMenuMaps[intMapId])=='undefined')
{if(this.intSwitchToMapAttempts>=5)
{return false;}
$j(document).oneTime('1s','switchToMap',$j.proxy(function(){this.switchToMap(intMapId)},this));this.intSwitchToMapAttempts++;return;}
$j(document).stopTime('switchToMap');this.intSwitchToMapAttempts=0;Map.selectMapMenuMap(this.objMapMenuMaps[intMapId]);},mapMenuCarouselFullscreen:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10220,'mapMenuCarouselFullscreen:','function()',arguments);var _this=this;var objCarousel=$j('#mapMenuCarousel');var objCarouselContainer=$j('#mapMenuCarouselContainer');var intPaddingTop=parseInt(objCarouselContainer.css('padding-top'));var intPaddingBottom=parseInt(objCarouselContainer.css('padding-bottom'));var intPaddingLeft=parseInt(objCarouselContainer.css('padding-left'));var intPaddingRight=parseInt(objCarouselContainer.css('padding-right'));var objPosition=objCarousel.offset();$j('#mapMenuCarouselLayerCategory').html('');if(this.blnMapMenuCarouselFullscreen===true)
{$j('#mapMenuFullScreen').fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10242,'$j(\'#mapMenuFullScreen\').fadeOut(500,','function()',arguments);$j('#mapMenuFullScreenContent').empty();objCarouselContainer.animate
({'marginTop':'30px','height':'180px'},250,'linear',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10256,'','function()',arguments);objCarouselContainer.animate
({'marginLeft':'0px','width':'980px'},250,'linear',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10266,'','function()',arguments);$j('#mapMenuCarouselPointer').css({'margin-top':'auto'});$j('#mapMenuCarouselMinimiseButton').hide();$j('#mapMenuCarouselFullscreenButton').show();$j('#mapMenuCategories').parent().fadeIn(500);$j('#mapMenuCarouselBackButton').show();}).css('overflow','visible');}).css('overflow','visible');});this.blnMapMenuCarouselFullscreen=false;}
else
{$j('#mapMenuCarouselBackButton').hide();var intCarouselWidth=parseInt($j(window).width())-intPaddingLeft-intPaddingRight-40;var intCarouselHeight=parseInt($j(window).height())-intPaddingTop-intPaddingBottom-60-40;$j('#mapMenuCarousel div.coverflow_container:visible').fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10303,'$j(\'#mapMenuCarousel div.coverflow_container:visible\').fadeOut(500,','function()',arguments);$j('#mapMenuCarouselPointer').css({'margin-top':'-2000px'});objCarouselContainer.animate
({'marginLeft':-(objPosition.left-20)+'px','width':intCarouselWidth+'px'},250,'linear',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10320,'','function()',arguments);objCarouselContainer.animate
({'marginTop':-(objPosition.top-20)+30+'px','height':intCarouselHeight+'px'},250,'linear',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10330,'','function()',arguments);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{$j('#mapMenuFullScreen').css('height',intCarouselHeight-50+'px');$j('#mapMenuFullScreenContent').css('height',intCarouselHeight-50+'px');}
$j('#mapMenuCarouselFullscreenButton').hide();$j('#mapMenuCarouselMinimiseButton').show();var strHtml='';$j.each(_this.objMapMenuCategories,function(intCategoryId,objCategory)
{Profiler.profile('view/components/map/assets/javascript/map.js',10349,'$j.each(_this.objMapMenuCategories,','function(intCategoryId, objCategory)',arguments);strHtml+='<h2 style="color:#ffffff;">'+objCategory.strLocalisedName+'</h2>';$j.each(_this.objMapMenuMaps,function(intMapId,objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',10354,'$j.each(_this.objMapMenuMaps,','function(intMapId, objMap)',arguments);if($j.inArray(objCategory.intId,objMap.arrCategories)>-1&&objMap.blnEnabled===true)
{var strClass=objMap.blnEnabled===false?'coverflow_list_item coverflow_list_item_disabled':'coverflow_list_item';var strOnMouseOver=objMap.blnEnabled===false?'return false;':'Map.mapMenuCarouselHoverMap(this);';var strOnMouseOut=objMap.blnEnabled===false?'return false;':'Map.mapMenuCarouselUnHoverMap(this);';strHtml+='<div style="float:left;width:160px;height:160px;margin-top:10px;margin-right:10px;">'+'<ul><li class="'+strClass+'" onmouseover="'+strOnMouseOver+'" onmouseout="'+strOnMouseOut+'" onclick="Map.selectMapMenuMap({intId: '+objMap.intId+', intCategoryId: '+objMap.intCategoryId+', strCategoryName: \''+objMap.strCategoryName+'\', strBranchName: \''+objMap.strBranchName+'\', strLocalisedCategoryName: \''+objMap.strLocalisedCategoryName+'\', blnEnabled: '+(objMap.blnEnabled?'true':'false')+', blnUnlicenced: '+(objMap.blnUnlicenced?'true':'false')+'});">';strHtml+=_this.objMapMenuMapsCoverflow.generateInnerItemHtml(objMap);strHtml+='</li></ul></div>';}});$j.each(_this.objMapMenuMaps,function(intMapId,objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',10369,'$j.each(_this.objMapMenuMaps,','function(intMapId, objMap)',arguments);if($j.inArray(objCategory.intId,objMap.arrCategories)>-1&&objMap.blnEnabled===false)
{var strClass=objMap.blnEnabled===false?'coverflow_list_item coverflow_list_item_disabled':'coverflow_list_item';var strOnMouseOver=objMap.blnEnabled===false?'return false;':'Map.mapMenuCarouselHoverMap(this);';var strOnMouseOut=objMap.blnEnabled===false?'return false;':'Map.mapMenuCarouselUnHoverMap(this);';strHtml+='<div style="float:left;width:160px;height:160px;margin-top:10px;margin-right:10px;">'+'<ul><li class="'+strClass+'" onmouseover="'+strOnMouseOver+'" onmouseout="'+strOnMouseOut+'" onclick="Map.selectMapMenuMap({intId: '+objMap.intId+', intCategoryId: '+objMap.intCategoryId+', strCategoryName: \''+objMap.strCategoryName+'\', strBranchName: \''+objMap.strBranchName+'\', strLocalisedCategoryName: \''+objMap.strLocalisedCategoryName+'\', blnEnabled: '+(objMap.blnEnabled?'true':'false')+', blnUnlicenced: '+(objMap.blnUnlicenced?'true':'false')+'});">';strHtml+=_this.objMapMenuMapsCoverflow.generateInnerItemHtml(objMap);strHtml+='</li></ul></div>';}});strHtml+='<div style="clear:both;margin-bottom:10px;"></div><hr style="clear:both;" />';});$j('#mapMenuFullScreenContent').html(strHtml);$j('#mapMenuFullScreen').fadeIn(500);if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{$j('#mapMenuFullScreenContent .thumbnail').each(function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10396,'$j(\'#mapMenuFullScreenContent .thumbnail\').each(','function()',arguments);objShell.makeBackgroundPngTransparent($j(this).get(0),true,136,69);});}}).css('overflow','visible');}).css('overflow','visible');});this.blnMapMenuCarouselFullscreen=true;}},initialiseResourcePickerCarousel:function(XMLHttpRequest)
{Profiler.profile('view/components/map/assets/javascript/map.js',10411,'initialiseResourcePickerCarousel:','function(XMLHttpRequest)',arguments);var _this=this;var strHtml=this.filterXmlResponse(XMLHttpRequest.responseText,false);var objBrowserDetails=Shell.getBrowserDetails();$j(document).find('body:first').append(strHtml);$j('#resourcePickerTopicsCarousel').jcarousel({scroll:4,isFixedSize:true,initCallback:function(objCarousel)
{Profiler.profile('view/components/map/assets/javascript/map.js',10426,'initCallback:','function(objCarousel)',arguments);_this.registerCarousel('resourcePicker','objTopicsCarousel',objCarousel);}});$j('#resourcePickerResourcesCarousel').jcarousel({scroll:4,isFixedSize:true,initCallback:function(objCarousel)
{Profiler.profile('view/components/map/assets/javascript/map.js',10437,'initCallback:','function(objCarousel)',arguments);_this.registerCarousel('resourcePicker','objResourcesCarousel',objCarousel);},itemVisibleOutCallback:{onAfterAnimation:function(objCarousel,item,i,state,evt){Profiler.profile('view/components/map/assets/javascript/map.js',10441,'itemVisibleOutCallback: {onAfterAnimation:','function(objCarousel, item, i, state, evt)',arguments);objCarousel.remove(i);}}});$j('#resourcePickerResourcesCarousel').parents('.jcarousel-skin-ulearn:first').hide();if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{var objIframe=document.createElement('iframe');$j(objIframe).attr({'frameborder':'0','tabindex':'-1','transparency':'true','src':'javascript:false;'});$j(objIframe).css({'position':'absolute','top':'0px','left':'0px','width':'100%','height':'100%','border':'none','filter':'Alpha(Opacity=\'0\')','display':'block','z-index':'-1'});$j('#resourcePickerCarouselContainer').prepend(objIframe);}
this.showResourcePickerCarousel();},resourcePickerCarouselReset:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10480,'resourcePickerCarouselReset:','function()',arguments);this.blnResourcePickerCarouselFullscreen=false;},showResourcePickerCarousel:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10486,'showResourcePickerCarousel:','function()',arguments);this.resourcePickerCarouselReset();this.blnResourcePickerCarouselOpen=true;var objCarousel=$j('#resourcePickerCarousel');var intCarouselWidth=objCarousel.outerWidth();var intCarouselHeight=objCarousel.outerHeight();var intDefaultMarginLeft=-(intCarouselWidth/2);var intDefaultMarginTop=-(intCarouselHeight/2);objCarousel.css({'top':'50%','margin-top':intDefaultMarginTop+'px','margin-left':intDefaultMarginLeft+'px'});},hideResourcePickerCarousel:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10512,'hideResourcePickerCarousel:','function()',arguments);$j('#resourcePickerCarousel').remove();},resourcePickerCarouselHoverResource:function(objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',10518,'resourcePickerCarouselHoverResource:','function(objElement)',arguments);var objExtendedElement=$j(objElement);this.strResourcePickerCarouselHoveredResourceId=objExtendedElement.attr('id');var objElementPosition=objExtendedElement.offset();if(this.blnResourcePickerCarouselFullscreen===true)
{var objFullscreenPosition=$j('#resourcePickerFullScreen').offset();var intTop=(objElementPosition.top-objFullscreenPosition.top-15);var intLeft=(objElementPosition.left-objFullscreenPosition.left-15);}
else
{var objUlPosition=objExtendedElement.parents('ul:first').offset();var objUlLeft=parseInt(objExtendedElement.parents('ul:first').css('left'));var objUlContainerPaddingTop=parseInt(objExtendedElement.parents('.jcarousel-container:first').css('padding-top'));var objUlContainerPaddingLeft=parseInt(objExtendedElement.parents('.jcarousel-container:first').css('padding-left'));var intTop=(objElementPosition.top-objUlPosition.top+objUlContainerPaddingTop-15);var intLeft=(objElementPosition.left-objUlPosition.left+objUlContainerPaddingLeft+objUlLeft-15);}
objExtendedElement.css({'background-position':'-160px 0'});$j('#resourcePickerCarouselResourceGlow').css({'top':intTop+'px','left':intLeft+'px','display':'block'});},resourcePickerCarouselUnHoverResource:function(objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',10566,'resourcePickerCarouselUnHoverResource:','function(objElement)',arguments);$j(objElement).css({'background-position':'0 0'});if(objElement.id==this.strResourcePickerCarouselHoveredResourceId)
{$j('#resourcePickerCarouselResourceGlow').hide();}},resourcePickerCarouselSelectTopic:function(intTopicId,strTopicName,intResources,strGridExtents,intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',10580,'resourcePickerCarouselSelectTopic:','function(intTopicId, strTopicName, intResources, strGridExtents, intResourceId)',arguments);var _this=this;this.objResourcePickerSelectedTopic={intTopicId:intTopicId,strTopicName:strTopicName,intResources:intResources,strGridExtents:strGridExtents,intResourceId:intResourceId};if(this.blnResourcePickerCarouselFullscreen===true)
{$j('#resourcePickerFullScreenTopics:visible').fadeOut(500);$j('#resourcePickerCarouselSelectedTopic').html(' &gt; '+strTopicName);this.loadNextResourcePickerFullScreenPage(strGridExtents,intTopicId,intResourceId,this.intResourcePickerFullScreenResourcesPerPage,1);$j('#resourcePickerCarouselBackButton').css({'background-position':'-75px 0','color':'#ffffff'});}
else
{var objCarousel=this.objCarousels.resourcePicker.objResourcesCarousel;objCarousel.size(intResources);$j('#resourcePickerTopicsCarousel').parents('.jcarousel-skin-ulearn:first').fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10620,'$j(\'#resourcePickerTopicsCarousel\').parents(\'.jcarousel-skin-ulearn:first\').fadeOut(500,','function()',arguments);$j('#resourcePickerResourcesCarousel').parents('.jcarousel-skin-ulearn:first').fadeIn(500);objCarousel.reset();$j('#resourcePickerCarouselSelectedTopic').html(' &gt; '+strTopicName);$j('#resourcePickerCarouselBackButton').css({'background-position':'-75px 0','color':'#ffffff'});var objParams={intSrid:_this.objEMController.mapStatus.getSrid(),intScale:_this.objEMController.mapStatus.mapOptions.scalesArray[_this.objEMController.mapStatus.getZoomAmount()],strGridExtents:strGridExtents,intTopicId:intTopicId,intResourceIdToExclude:intResourceId,intResourcesPerPage:5,intResourcePosition:1};$j.ajax({async:true,cache:false,data:objParams,type:'POST',url:_this.strUrlPrefix+'getResourcePickerTopicResources/',complete:function(XMLHttpRequest)
{Profiler.profile('view/components/map/assets/javascript/map.js',10657,'complete:','function(XMLHttpRequest)',arguments);_this.initialiseResourcePickerResourceCarousel(XMLHttpRequest,objParams);}});});}},initialiseResourcePickerResourceCarousel:function(XMLHttpRequest,objParams)
{Profiler.profile('view/components/map/assets/javascript/map.js',10666,'initialiseResourcePickerResourceCarousel:','function(XMLHttpRequest, objParams)',arguments);var _this=this;var objCarousel=this.objCarousels['resourcePicker']['objResourcesCarousel'];objCarousel.options.itemLoadCallback=function(objCarousel,strState)
{Profiler.profile('view/components/map/assets/javascript/map.js',10673,'objCarousel.options.itemLoadCallback =','function(objCarousel, strState)',arguments);_this.loadNextResourcePickerResource(objCarousel,strState,objParams);};this.addResourcePickerResources(XMLHttpRequest,objCarousel,1);},loadNextResourcePickerResource:function(objCarousel,strState,objParams)
{Profiler.profile('view/components/map/assets/javascript/map.js',10682,'loadNextResourcePickerResource:','function(objCarousel, strState, objParams)',arguments);var _this=this;if(strState=='next')
{var intResourcePosition=objCarousel.last-3;}
else if(strState=='prev')
{var intResourcePosition=objCarousel.first;}
else
{return;}
objParams.intResourcesPerPage=4;objParams.intResourcePosition=intResourcePosition;$j.ajax({async:true,cache:false,data:objParams,type:'POST',url:this.strUrlPrefix+'getResourcePickerTopicResources/',complete:function(XMLHttpRequest)
{Profiler.profile('view/components/map/assets/javascript/map.js',10712,'complete:','function(XMLHttpRequest)',arguments);_this.addResourcePickerResources(XMLHttpRequest,objCarousel,intResourcePosition);}});},loadNextResourcePickerFullScreenPage:function(strGridExtents,intTopicId,intResourceId,intResourcesPerPage,intPage)
{Profiler.profile('view/components/map/assets/javascript/map.js',10719,'loadNextResourcePickerFullScreenPage:','function(strGridExtents, intTopicId, intResourceId, intResourcesPerPage, intPage)',arguments);var _this=this;var objFullScreenResources=$j('#resourcePickerFullScreenResources');objFullScreenResources.empty();objFullScreenResources.show();var objSubdomains=Shell.getWebsiteSubdomains();objFullScreenResources.css({'background':'transparent url('+objSubdomains.images+'/view/shared/assets/images/activity_large.gif) no-repeat scroll center'});var objParams={intSrid:this.objEMController.mapStatus.getSrid(),intScale:this.objEMController.mapStatus.mapOptions.scalesArray[this.objEMController.mapStatus.getZoomAmount()],strGridExtents:strGridExtents,intTopicId:intTopicId,intResourceIdToExclude:intResourceId,intResourcesPerPage:intResourcesPerPage,intResourcePosition:intPage,blnFullScreen:true};var objOnComplete=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10752,'var objOnComplete =','function()',arguments);var objFullScreenResources=$j('#resourcePickerFullScreenResources');objFullScreenResources.css({'background':'none'});_this.resourcePickerFullScreenSetupPageButtons(strGridExtents,intTopicId,intResourceId,intResourcesPerPage);};this.update('getResourcePickerTopicResources',objParams,objOnComplete,'#resourcePickerFullScreenResources');},addResourcePickerResources:function(XMLHttpRequest,objCarousel,intResourcePosition)
{Profiler.profile('view/components/map/assets/javascript/map.js',10769,'addResourcePickerResources:','function(XMLHttpRequest, objCarousel, intResourcePosition)',arguments);var _this=this;var strHtml=this.filterXmlResponse(XMLHttpRequest.responseText,false);$j('#resourcePickerResourcesTemporaryHolder').append(strHtml);$j('#resourcePickerResourcesTemporaryHolder div.resourcePickerCarouselResource, #resourcePickerResourcesTemporaryHolder div.resourcePickerCarouselResourceDisabled').each(function(mixKey,objResource)
{Profiler.profile('view/components/map/assets/javascript/map.js',10779,'$j(\'#resourcePickerResourcesTemporaryHolder div.resourcePickerCarouselResource, #resourcePickerResourcesTemporaryHolder div.resourcePickerCarouselResourceDisabled\').each(','function(mixKey, objResource)',arguments);objCarousel.add(intResourcePosition,objResource);intResourcePosition++;_this.makePngsTransparent('',false,objResource);});this.executeUpdateInitCode();$j('#resourcePickerResourcesTemporaryHolder').empty();},resourcePickerCarouselSelectResource:function(intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',10795,'resourcePickerCarouselSelectResource:','function(intResourceId)',arguments);if(Shell.getIsLicencedUser()===false)
{Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');}
else
{$j('#resourcePickerCarousel').css({'margin-left':'-2000px'});this.blnOpenResourcePickerOnClose=true;var arrGroupGeometries=[{container_node_id:intResourceId,id:null,mode:'normal',node_id:intResourceId}];var objPoint={x:this.objResourcePickerResourcePoint.x,y:this.objResourcePickerResourcePoint.y,srid:this.objResourcePickerResourcePoint.srid};this.showQueryResourceGeometries(arrGroupGeometries,objPoint,false);}},resourcePickerCarouselBack:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10820,'resourcePickerCarouselBack:','function()',arguments);this.objResourcePickerSelectedTopic={};if(this.blnResourcePickerCarouselFullscreen===true)
{var objFullScreenTopics=$j('#resourcePickerFullScreenTopics:hidden');if(objFullScreenTopics.length>0)
{$j('#resourcePickerFullScreenResources').fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10831,'$j(\'#resourcePickerFullScreenResources\').fadeOut(500,','function()',arguments);$j('#resourcePickerCarouselSelectedTopic').html('');objFullScreenTopics.fadeIn(500);$j('#resourcePickerCarouselBackButton').css({'background-position':'0 0','color':'#999999'});});}}
else
{var objTopicsCarousel=$j('#resourcePickerTopicsCarousel').parents('.jcarousel-skin-ulearn:hidden');if(objTopicsCarousel.length>0)
{$j('#resourcePickerResourcesCarousel').parents('.jcarousel-skin-ulearn:visible').fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10854,'$j(\'#resourcePickerResourcesCarousel\').parents(\'.jcarousel-skin-ulearn:visible\').fadeOut(500,','function()',arguments);$j('#resourcePickerCarouselSelectedTopic').html('');objTopicsCarousel.fadeIn(500);$j('#resourcePickerCarouselBackButton').css({'background-position':'0 0','color':'#999999'});});}}},resourcePickerCarouselFullscreen:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10873,'resourcePickerCarouselFullscreen:','function()',arguments);var _this=this;var objCarousel=$j('#resourcePickerCarousel');var objCarouselContainer=$j('#resourcePickerCarouselContainer');var intPaddingTop=parseInt(objCarouselContainer.css('padding-top'));var intPaddingBottom=parseInt(objCarouselContainer.css('padding-bottom'));var intPaddingLeft=parseInt(objCarouselContainer.css('padding-left'));var intPaddingRight=parseInt(objCarouselContainer.css('padding-right'));var objPosition=objCarousel.offset();if(typeof(_this.objResourcePickerSelectedTopic.intTopicId)=='undefined')
{$j('#resourcePickerCarouselSelectedTopic').html('');}
if(this.blnResourcePickerCarouselFullscreen===true)
{this.blnResourcePickerCarouselFullscreen=false;$j('#resourcePickerFullScreen').fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10900,'$j(\'#resourcePickerFullScreen\').fadeOut(500,','function()',arguments);objCarouselContainer.animate
({'marginTop':'30px','height':'180px'},250,'linear',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10911,'','function()',arguments);objCarouselContainer.animate
({'marginLeft':'0px','width':'980px'},250,'linear',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10921,'','function()',arguments);$j('#resourcePickerCarouselMinimiseButton').hide();$j('#resourcePickerCarouselFullscreenButton').show();if(typeof(_this.objResourcePickerSelectedTopic.intTopicId)!='undefined')
{_this.resourcePickerCarouselSelectTopic(_this.objResourcePickerSelectedTopic.intTopicId,_this.objResourcePickerSelectedTopic.strTopicName,_this.objResourcePickerSelectedTopic.intResources,_this.objResourcePickerSelectedTopic.strGridExtents,_this.objResourcePickerSelectedTopic.intResourceId);}
else
{var objTopicsCarousel=$j('#resourcePickerTopicsCarousel').parents('.jcarousel-skin-ulearn:hidden');objTopicsCarousel.fadeIn(500);}}).css('overflow','visible');}).css('overflow','visible');});}
else
{this.blnResourcePickerCarouselFullscreen=true;$j('#resourcePickerFullScreenTopics').stop(true,true).hide();$j('#resourcePickerFullScreenResources').stop(true,true).hide();var intCarouselWidth=parseInt($j(window).width())-intPaddingLeft-intPaddingRight-40;var intCarouselHeight=parseInt($j(window).height())-intPaddingTop-intPaddingBottom-60-40;$j('#resourcePickerCarousel .jcarousel-skin-ulearn:visible').fadeOut(500,function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10959,'$j(\'#resourcePickerCarousel .jcarousel-skin-ulearn:visible\').fadeOut(500,','function()',arguments);objCarouselContainer.animate
({'marginLeft':-(objPosition.left-20)+'px','width':intCarouselWidth+'px'},250,'linear',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10970,'','function()',arguments);objCarouselContainer.animate
({'marginTop':-(objPosition.top-20)+30+'px','height':intCarouselHeight+'px'},250,'linear',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',10980,'','function()',arguments);var objBrowserDetails=Shell.getBrowserDetails();if(objBrowserDetails.strBrowser=="Explorer"&&objBrowserDetails.intVersion<=6)
{$j('#resourcePickerFullScreen').css('height',intCarouselHeight-50+'px');$j('#resourcePickerFullScreenContent').css('height',intCarouselHeight-50+'px');}
$j('#resourcePickerCarouselFullscreenButton').hide();$j('#resourcePickerCarouselMinimiseButton').show();$j('#resourcePickerFullScreen').fadeIn(500);if(typeof(_this.objResourcePickerSelectedTopic.intTopicId)!='undefined')
{_this.resourcePickerCarouselSelectTopic(_this.objResourcePickerSelectedTopic.intTopicId,_this.objResourcePickerSelectedTopic.strTopicName,_this.objResourcePickerSelectedTopic.intResources,_this.objResourcePickerSelectedTopic.strGridExtents,_this.objResourcePickerSelectedTopic.intResourceId);}
else
{$j('#resourcePickerFullScreenTopics').show();$j('#resourcePickerFullScreenResources').hide();}}).css('overflow','visible');}).css('overflow','visible');});}},resourcePickerFullScreenSetupPageButtons:function(strGridExtents,intTopicId,intResourceId,intResourcesPerPage)
{Profiler.profile('view/components/map/assets/javascript/map.js',11017,'resourcePickerFullScreenSetupPageButtons:','function(strGridExtents, intTopicId, intResourceId, intResourcesPerPage)',arguments);var _this=this;var intTotalPages=parseInt($j('#resourcePickerTotalPages').val());var intCurrentPage=parseInt($j('#resourcePickerCurrentPage').val());var objPreviousPageButton=$j('#resourcePickerFullScreenPreviousPageButton');var objNextPageButton=$j('#resourcePickerFullScreenNextPageButton');objPreviousPageButton.unbind();objNextPageButton.unbind();if(intCurrentPage>1)
{objPreviousPageButton.css({'background-position':'0 0','cursor':'pointer'});objPreviousPageButton.bind('mouseover',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11041,'objPreviousPageButton.bind(\'mouseover\',','function()',arguments);$j(this).css({'background-position':'-25px 0'});});objPreviousPageButton.bind('mouseout',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11049,'objPreviousPageButton.bind(\'mouseout\',','function()',arguments);$j(this).css({'background-position':'0 0'});});objPreviousPageButton.bind('click',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11057,'objPreviousPageButton.bind(\'click\',','function()',arguments);_this.loadNextResourcePickerFullScreenPage(strGridExtents,intTopicId,intResourceId,intResourcesPerPage,intCurrentPage-1);});}
else
{objPreviousPageButton.css({'background-position':'-75px 0','cursor':'default'});}
if(intCurrentPage<intTotalPages)
{objNextPageButton.css({'background-position':'0 0','cursor':'pointer'});objNextPageButton.bind('mouseover',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11079,'objNextPageButton.bind(\'mouseover\',','function()',arguments);$j(this).css({'background-position':'-25px 0'});});objNextPageButton.bind('mouseout',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11087,'objNextPageButton.bind(\'mouseout\',','function()',arguments);$j(this).css({'background-position':'0 0'});});objNextPageButton.bind('click',function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11095,'objNextPageButton.bind(\'click\',','function()',arguments);_this.loadNextResourcePickerFullScreenPage(strGridExtents,intTopicId,intResourceId,intResourcesPerPage,intCurrentPage+1);});}
else
{objNextPageButton.css({'background-position':'-75px 0','cursor':'default'});}},getPlaylistMode:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11110,'getPlaylistMode:','function()',arguments);return this.objEMController.mapStatus.getPlaylistMode();},setPlaylistMode:function(blnPlaylistMode,intViewId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11115,'setPlaylistMode:','function(blnPlaylistMode, intViewId)',arguments);var intViewId=(typeof(intViewId)!='undefined')?intViewId:null;this.objEMController.mapStatus.setPlaylistMode(blnPlaylistMode,intViewId);},printMap:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11122,'printMap:','function()',arguments);var objBrowserDetails=Shell.getBrowserDetails();var intWidth=parseInt($j('#shellColumnRight').innerWidth());var intHeight=parseInt($j('#shellColumnRight').innerHeight());var strEzmapsHtml=$j('#ezMaps').html();var objEzmaps=$j('<div>'+strEzmapsHtml+'</div>');objEzmaps.find('div.widgetsTop').find('div.horizontalToolbarDiv, div.verticalToolbarDiv, div.messageDiv, div.widgetStatus, div.widgetReferenceMap, div.widgetReferenceMapExpander').remove();objEzmaps.find('div.widgetsBottom div.static').find('div.queryWidget, div.zoomBoxWidget, div.droppableGeocodeWidget, div.widgetProgressBar, div.widgetNorthArrow').remove();objEzmaps.find('div.crossHair').remove();objEzmaps.find('div.eventLayer').remove();objEzmaps.find('div.renderer').remove();objEzmaps.find('#resource_hover_container').remove();objEzmaps.find('div.widgetPopup').remove();objEzmaps.find('div.layers img').each(function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11146,'objEzmaps.find(\'div.layers img\').each(','function()',arguments);var objElement=$j(this);if(objElement.attr('src').substr(objElement.attr('src').length-12)=='notOnMap.png')
{objElement.remove();return true;}});objEzmaps.find('div.widgetsTop').find('div.ezmapsIcon').each(function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11162,'objEzmaps.find(\'div.widgetsTop\').find(\'div.ezmapsIcon\').each(','function()',arguments);var objElement=$j(this);if(objElement.hasClass('annotateSymbolMove'))
{objElement.find('div, input').remove();}
else if(objElement.hasClass('annotateTextMove'))
{objElement.find('div.resizeBorder, div.resizeHandle, div.closeButton, input.dummyFocusField').remove();var objTextContainer=objElement.find('div.textContainer');var intElementWidth=parseInt(objTextContainer.get(0).style.width);var intElementHeight=parseInt(objTextContainer.get(0).style.height);objTextContainer.css
({'width':intElementWidth+'px','height':intElementHeight+'px'});objTextContainer.find('textarea:first').css
({'width':intElementWidth+'px','height':intElementHeight+'px'});}
else
{var objImageDiv=objElement.find('div:first');var strImageUrl=objImageDiv.css('background-image');if(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6)
{strImageUrl=strImageUrl.substr(5);strImageUrl=strImageUrl.substr(0,strImageUrl.length-2);}
else
{strImageUrl=strImageUrl.substr(4);strImageUrl=strImageUrl.substr(0,strImageUrl.length-1);}
objElement.html('<img src="'+strImageUrl+'" style="width:'+parseInt(this.style.width)+'px;height:'+parseInt(this.style.height)+'px;" />');}});var objForm=$j('<form target="_blank" method="post" action="'+this.strUrlPrefix+'showPrintMap'+'"><div><input type="hidden" name="intWidth" value="" /><input type="hidden" name="intHeight" value="" /><input type="hidden" name="strEzmapsHtml" value="" /><input type="hidden" name="strSrid" value="" /><input type="hidden" name="strCentreX" value="" /><input type="hidden" name="strCentreY" value="" /></div></form>');objForm.find('input[name="intWidth"]').val(intWidth);objForm.find('input[name="intHeight"]').val(intHeight);objForm.find('input[name="strEzmapsHtml"]').val(objEzmaps.html());var strSrid=this.objEMController.mapStatus.getSrid();var objCentrePoint=this.objEMController.mapStatus.getCenterPointOnMap();objForm.find('input[name="strSrid"]').val(strSrid);objForm.find('input[name="strCentreX"]').val(objCentrePoint.x);objForm.find('input[name="strCentreY"]').val(objCentrePoint.y);$j(document).find('body').append(objForm);objForm.get(0).submit();objForm.remove();},pointsAreWithinExtents:function(arrPoints,objExtents)
{Profiler.profile('view/components/map/assets/javascript/map.js',11238,'pointsAreWithinExtents:','function(arrPoints, objExtents)',arguments);return this.objEMController.mapStatus.pointsAreWithinExtents(arrPoints,objExtents);},pointsAreWithinMapExtents:function(arrPoints,intMapId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11243,'pointsAreWithinMapExtents:','function(arrPoints, intMapId)',arguments);return this.objEMController.mapStatus.pointsAreWithinMapExtents(arrPoints,intMapId);},jumpToPoints:function(arrPoints)
{Profiler.profile('view/components/map/assets/javascript/map.js',11248,'jumpToPoints:','function(arrPoints)',arguments);this.objEMController.jumpToPoints(arrPoints);},shutDown:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11257,'shutDown:','function()',arguments);},unLoad:function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11262,'unLoad:','function()',arguments);this.parent();}});Map.setBlnOutputResourcesInTransparentBox=function(blnOutputResourcesInTransparentBox)
{Profiler.profile('view/components/map/assets/javascript/map.js',11276,'Map.setBlnOutputResourcesInTransparentBox =','function(blnOutputResourcesInTransparentBox)',arguments);var map=objShell.getComponentFromType('map');map.setBlnOutputResourcesInTransparentBox(blnOutputResourcesInTransparentBox);};Map.showLayerList=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11282,'Map.showLayerList =','function()',arguments);var map=objShell.getComponentFromType('map');map.showLayerList();};Map.hideLayerList=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11287,'Map.hideLayerList =','function()',arguments);var map=objShell.getComponentFromType('map');map.hideLayerList();};Map.resizeLayerList=function(strResizeBar)
{Profiler.profile('view/components/map/assets/javascript/map.js',11292,'Map.resizeLayerList =','function(strResizeBar)',arguments);var map=objShell.getComponentFromType('map');map.resizeLayerList(strResizeBar);};Map.dockLayerList=function(strDockPosition)
{Profiler.profile('view/components/map/assets/javascript/map.js',11297,'Map.dockLayerList =','function(strDockPosition)',arguments);var map=objShell.getComponentFromType('map');map.dockLayerList(strDockPosition);};Map.unDockLayerList=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11302,'Map.unDockLayerList =','function()',arguments);var map=objShell.getComponentFromType('map');map.unDockLayerList();};Map.showLayerListMenu=function(event)
{Profiler.profile('view/components/map/assets/javascript/map.js',11307,'Map.showLayerListMenu =','function(event)',arguments);var map=objShell.getComponentFromType('map');map.showLayerListMenu(event);};Map.showLayerListTooltip=function(strTooltip)
{Profiler.profile('view/components/map/assets/javascript/map.js',11312,'Map.showLayerListTooltip =','function(strTooltip)',arguments);var map=objShell.getComponentFromType('map');map.showLayerListTooltip(strTooltip);};Map.hideLayerListTooltip=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11317,'Map.hideLayerListTooltip =','function()',arguments);var map=objShell.getComponentFromType('map');map.hideLayerListTooltip();};Map.refreshLayerList=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11325,'Map.refreshLayerList =','function()',arguments);var map=objShell.getComponentFromType('map');map.refreshLayerList();};Map.selectLayer=function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11330,'Map.selectLayer =','function(strLayerId)',arguments);var map=objShell.getComponentFromType('map');map.selectLayer(strLayerId);};Map.registerLayerInList=function(strLayerId,strLayerName,strLayerType,strIsSelected,strIsVisible,strIsScribble,arrEnabledViews,arrAnnotationObjects,strIsScribbleCopy,intThemeId,strForceToBottom)
{Profiler.profile('view/components/map/assets/javascript/map.js',11336,'Map.registerLayerInList =','function(strLayerId, strLayerName, strLayerType, strIsSelected, strIsVisible, strIsScribble, arrEnabledViews, arrAnnotationObjects, strIsScribbleCopy, intThemeId, strForceToBottom)',arguments);if(typeof(strLayerMode)!='undefined')
{strLayerMode=strLayerMode;}
else
{strLayerMode='normal';}
var map=objShell.getComponentFromType('map');map.registerLayerInList(strLayerId,strLayerName,strLayerType,strIsSelected,strIsVisible,strIsScribble,arrEnabledViews,arrAnnotationObjects,strIsScribbleCopy,intThemeId,strForceToBottom);};Map.addLayerToList=function(strLayerId,strLayerMode,intThematicRulesetNodeId,blnExclusiveLayer,arrAdditionalLayerViews)
{Profiler.profile('view/components/map/assets/javascript/map.js',11351,'Map.addLayerToList =','function(strLayerId, strLayerMode, intThematicRulesetNodeId, blnExclusiveLayer, arrAdditionalLayerViews)',arguments);var map=objShell.getComponentFromType('map');map.addLayerToList(strLayerId,strLayerMode,intThematicRulesetNodeId,blnExclusiveLayer,arrAdditionalLayerViews);};Map.addLayersToList=function(arrLayerDetails,blnClearExisting)
{Profiler.profile('view/components/map/assets/javascript/map.js',11356,'Map.addLayersToList =','function(arrLayerDetails, blnClearExisting)',arguments);var map=objShell.getComponentFromType('map');map.addLayersToList(arrLayerDetails,blnClearExisting);};Map.addOptionalLayerToList=function(strLayerId,strResourceType)
{Profiler.profile('view/components/map/assets/javascript/map.js',11361,'Map.addOptionalLayerToList =','function(strLayerId, strResourceType)',arguments);if(!confirm("You have opened a "+strResourceType+" resource.\n\nDo you want to add this "+strResourceType+" resource to your layer list?\n\nResources added to your layer list will remain on the map even after navigating away from them in the resource explorer."))
{return false;}
Map.addLayerToList(strLayerId);};Map.removeLayerFromList=function(strLayerId,blnNoConfirmationMessage,objCallbackFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',11370,'Map.removeLayerFromList =','function(strLayerId, blnNoConfirmationMessage, objCallbackFunction)',arguments);var map=objShell.getComponentFromType('map');map.removeLayerFromList(strLayerId,blnNoConfirmationMessage,objCallbackFunction);};Map.showAllLayers=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11375,'Map.showAllLayers =','function()',arguments);var map=objShell.getComponentFromType('map');map.showAllLayers();};Map.hideAllLayers=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11380,'Map.hideAllLayers =','function()',arguments);var map=objShell.getComponentFromType('map');map.hideAllLayers();};Map.removeAllLayers=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11385,'Map.removeAllLayers =','function()',arguments);var map=objShell.getComponentFromType('map');map.removeAllLayers();};Map.registerDefaultSelectedLayer=function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11390,'Map.registerDefaultSelectedLayer =','function(strLayerId)',arguments);var map=objShell.getComponentFromType('map');map.registerDefaultSelectedLayer(strLayerId);};Map.showLayer=function(resourceId){Profiler.profile('view/components/map/assets/javascript/map.js',11395,'Map.showLayer =','function(resourceId)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');resourceExplorer.showLayer(resourceId);};Map.hideLayer=function(resourceId){Profiler.profile('view/components/map/assets/javascript/map.js',11399,'Map.hideLayer =','function(resourceId)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');resourceExplorer.hideLayer(resourceId);};Map.toggleLayer=function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11403,'Map.toggleLayer =','function(strLayerId)',arguments);var map=objShell.getComponentFromType('map');map.toggleLayer(strLayerId);};Map.toggleLayerViewDetails=function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11408,'Map.toggleLayerViewDetails =','function(strLayerId)',arguments);var map=objShell.getComponentFromType('map');map.toggleLayerViewDetails(strLayerId);};Map.zoomToExtents=function(strLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11413,'Map.zoomToExtents =','function(strLayerId)',arguments);var map=objShell.getComponentFromType('map');map.zoomToExtents(strLayerId);};Map.changeLayerView=function(strLayerId,intThematicRulesetNodeId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11418,'Map.changeLayerView =','function(strLayerId, intThematicRulesetNodeId)',arguments);var map=objShell.getComponentFromType('map');map.changeLayerView(strLayerId,intThematicRulesetNodeId);};Map.changeLayerViews=function(strLayerId,arrThematicRulesetNodeIds)
{Profiler.profile('view/components/map/assets/javascript/map.js',11424,'Map.changeLayerViews =','function(strLayerId, arrThematicRulesetNodeIds)',arguments);var map=objShell.getComponentFromType('map');map.changeLayerViews(strLayerId,arrThematicRulesetNodeIds);};Map.changeMap=function(intMapId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11429,'Map.changeMap =','function(intMapId)',arguments);var map=objShell.getComponentFromType('map');map.changeMap(intMapId);};Map.updateGeometriesLayer=function(blnUpdateStamps)
{Profiler.profile('view/components/map/assets/javascript/map.js',11434,'Map.updateGeometriesLayer =','function(blnUpdateStamps)',arguments);var map=objShell.getComponentFromType('map');map.updateGeometriesLayer();if(typeof(blnUpdateStamps)!='undefined')
{if(blnUpdateStamps)
{map.createCurrentPagesMapSymbolStamps();}}};Map.clearLayer=function(resourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11448,'Map.clearLayer =','function(resourceId)',arguments);var map=objShell.getComponentFromType('map');map.clearLayer(resourceId);};Map.setCommunityLayerMode=function(strMode,intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11453,'Map.setCommunityLayerMode =','function(strMode, intResourceId)',arguments);var map=objShell.getComponentFromType('map');map.setCommunityLayerMode(strMode,intResourceId);};Map.returnCurrentLayerList=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11458,'Map.returnCurrentLayerList =','function()',arguments);var map=objShell.getComponentFromType('map');return map.returnCurrentLayerList();};Map.overrideCurrentLayerList=function(objLayerList,blnMerge)
{Profiler.profile('view/components/map/assets/javascript/map.js',11463,'Map.overrideCurrentLayerList =','function(objLayerList, blnMerge)',arguments);var objLayerList=(typeof(objLayerList)!='undefined')?objLayerList:{};var blnMerge=(typeof(blnMerge)!='undefined')?blnMerge:false;var map=objShell.getComponentFromType('map');map.overrideCurrentLayerList(objLayerList,blnMerge);};Map.revertLayerList=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11472,'Map.revertLayerList =','function()',arguments);var map=objShell.getComponentFromType('map');map.overrideCurrentLayerList({},false);};Map.setOverrideMode=function(blnOverrideMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',11477,'Map.setOverrideMode =','function(blnOverrideMode)',arguments);var map=objShell.getComponentFromType('map');map.setOverrideMode(blnOverrideMode);};Map.resetCurrentPageResultGeometries=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11485,'Map.resetCurrentPageResultGeometries =','function()',arguments);var map=objShell.getComponentFromType('map');map.resetCurrentPageResultGeometries();};Map.resetFavouritesSetGeometries=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11491,'Map.resetFavouritesSetGeometries =','function()',arguments);var map=objShell.getComponentFromType('map');map.resetFavouritesSetGeometries();};Map.registerResultsGeometries=function(intResourceId,intGeometryId,objGeometries,strItemName,strItemType,arrGroupDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',11497,'Map.registerResultsGeometries =','function(intResourceId, intGeometryId, objGeometries, strItemName, strItemType, arrGroupDetails)',arguments);var map=objShell.getComponentFromType('map');map.registerResultsGeometries(intResourceId,intGeometryId,objGeometries,strItemName,strItemType,arrGroupDetails);};Map.registerFavouritesSetGeometries=function(intResourceId,intGeometryId,objGeometries,strItemName,strItemType,arrGroupDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',11503,'Map.registerFavouritesSetGeometries =','function(intResourceId, intGeometryId, objGeometries, strItemName, strItemType, arrGroupDetails)',arguments);var map=objShell.getComponentFromType('map');map.registerFavouritesSetGeometries(intResourceId,intGeometryId,objGeometries,strItemName,strItemType,arrGroupDetails);};Map.showAllCurrentPagesGeometries=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11509,'Map.showAllCurrentPagesGeometries =','function()',arguments);var map=objShell.getComponentFromType('map');map.showAllCurrentPagesGeometries();};Map.showSpecificResourceGeometries=function(intResourceId,blnIncludePopup,blnStampClick)
{Profiler.profile('view/components/map/assets/javascript/map.js',11515,'Map.showSpecificResourceGeometries =','function(intResourceId, blnIncludePopup, blnStampClick)',arguments);var map=objShell.getComponentFromType('map');map.showSpecificResourceGeometries(intResourceId,blnIncludePopup,blnStampClick);};Map.showGeometries=function(arrGeometries)
{Profiler.profile('view/components/map/assets/javascript/map.js',11521,'Map.showGeometries =','function(arrGeometries)',arguments);var map=objShell.getComponentFromType('map');map.showGeometries(arrGeometries);};Map.showPlace=function(arrGeometries)
{Profiler.profile('view/components/map/assets/javascript/map.js',11527,'Map.showPlace =','function(arrGeometries)',arguments);var map=objShell.getComponentFromType('map');return map.showPlace(arrGeometries);};Map.showOSGridRef=function(objGeometries)
{Profiler.profile('view/components/map/assets/javascript/map.js',11533,'Map.showOSGridRef =','function(objGeometries)',arguments);var map=objShell.getComponentFromType('map');map.showOSGridRef(objGeometries);};Map.showQueryResourceGeometries=function(arrGeometryIds,objGeocodeData,blnStampClick)
{Profiler.profile('view/components/map/assets/javascript/map.js',11539,'Map.showQueryResourceGeometries =','function(arrGeometryIds, objGeocodeData, blnStampClick)',arguments);var map=objShell.getComponentFromType('map');map.showQueryResourceGeometries(arrGeometryIds,objGeocodeData,blnStampClick);};Map.loadNextResourceDetailsInPopup=function(strItemType,intItemId,intItemGeometryId,intResourceNumber)
{Profiler.profile('view/components/map/assets/javascript/map.js',11545,'Map.loadNextResourceDetailsInPopup =','function(strItemType, intItemId, intItemGeometryId, intResourceNumber)',arguments);var map=objShell.getComponentFromType('map');map.loadNextResourceDetailsInPopup(strItemType,intItemId,intItemGeometryId,intResourceNumber);};Map.showJoinedResourceHoverDetailsOnPopupLoad=function(intParentId,intResourceId,strResourceTitle)
{Profiler.profile('view/components/map/assets/javascript/map.js',11551,'Map.showJoinedResourceHoverDetailsOnPopupLoad =','function(intParentId, intResourceId, strResourceTitle)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');if(typeof(resourceExplorer)!='undefined')
{resourceExplorer.showJoinedResourceHoverDetails(intParentId,intResourceId,strResourceTitle);}};Map.showDetail=function(resourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11561,'Map.showDetail =','function(resourceId)',arguments);Shell.openComponent('resourceDetails','addResource/'+resourceId);};Map.showChildren=function(resourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11566,'Map.showChildren =','function(resourceId)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');resourceExplorer.showChildren(resourceId);};Map.showLayer=function(resourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11572,'Map.showLayer =','function(resourceId)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');resourceExplorer.showLayer(resourceId);};Map.showLink=function(resourceId,strResourceURL)
{Profiler.profile('view/components/map/assets/javascript/map.js',11578,'Map.showLink =','function(resourceId, strResourceURL)',arguments);Shell.launchNewResourceWindow(resourceId,strResourceURL);};Map.downloadFile=function(strFileURL)
{Profiler.profile('view/components/map/assets/javascript/map.js',11584,'Map.downloadFile =','function(strFileURL)',arguments);Shell.redirect(strFileURL);};Map.queryMap=function(arrGeometryIds,objGeocodeData,blnResourceModeStampQuery,blnStampClick)
{Profiler.profile('view/components/map/assets/javascript/map.js',11590,'Map.queryMap =','function(arrGeometryIds, objGeocodeData, blnResourceModeStampQuery, blnStampClick)',arguments);var map=objShell.getComponentFromType('map');map.queryMap(arrGeometryIds,objGeocodeData,blnResourceModeStampQuery,blnStampClick);};Map.queryMapExternal=function(objGeocodeData,strPopupContent,intPopupWidth,intPopupHeight)
{Profiler.profile('view/components/map/assets/javascript/map.js',11596,'Map.queryMapExternal =','function(objGeocodeData, strPopupContent, intPopupWidth, intPopupHeight)',arguments);var map=objShell.getComponentFromType('map');map.queryMapExternal(objGeocodeData,strPopupContent,intPopupWidth,intPopupHeight);};Map.queryAnnotationSymbol=function(intLayerId,strStampId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11602,'Map.queryAnnotationSymbol =','function(intLayerId, strStampId)',arguments);var map=objShell.getComponentFromType('map');map.queryAnnotationSymbol(intLayerId,strStampId);};Map.showExistingGeocodingInfo=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11609,'Map.showExistingGeocodingInfo =','function()',arguments);var map=objShell.getComponentFromType('map');map.showExistingGeocodingInfo();};Map.hideExistingGeocodingInfo=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11615,'Map.hideExistingGeocodingInfo =','function()',arguments);var map=objShell.getComponentFromType('map');map.hideExistingGeocodingInfo();};Map.showExpandedResourceDetails=function(intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11621,'Map.showExpandedResourceDetails =','function( intResourceId )',arguments);var map=objShell.getComponentFromType('map');map.showExpandedResourceDetails(intResourceId);};Map.resetPopupView=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11627,'Map.resetPopupView =','function()',arguments);var map=objShell.getComponentFromType('map');map.resetPopupView();};Map.closeResourceDetails=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11633,'Map.closeResourceDetails =','function()',arguments);var map=objShell.getComponentFromType('map');map.closeResourceDetails();};Map.handleMapSymbolEvents=function(event,srcElement,blnOwner)
{Profiler.profile('view/components/map/assets/javascript/map.js',11640,'Map.handleMapSymbolEvents =','function(event, srcElement, blnOwner)',arguments);var map=objShell.getComponentFromType('map');map.handleMapSymbolEvents(event,srcElement,blnOwner);};Map.handleResourceThumbnailEvents=function(event,srcElement,blnOwner,objClickFunc)
{Profiler.profile('view/components/map/assets/javascript/map.js',11646,'Map.handleResourceThumbnailEvents =','function(event, srcElement, blnOwner, objClickFunc)',arguments);var map=objShell.getComponentFromType('map');map.handleResourceThumbnailEvents(event,srcElement,blnOwner,objClickFunc);};Map.saveDragDropGeocodeResource=function(strResourceName)
{Profiler.profile('view/components/map/assets/javascript/map.js',11653,'Map.saveDragDropGeocodeResource =','function(strResourceName)',arguments);var map=objShell.getComponentFromType('map');map.saveDragDropGeocodeResource(strResourceName);};Map.cancelDragDropGeocodeResource=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11659,'Map.cancelDragDropGeocodeResource =','function()',arguments);var map=objShell.getComponentFromType('map');map.cancelDragDropGeocodeResource();};Map.saveRepositionGeometry=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11665,'Map.saveRepositionGeometry =','function()',arguments);var map=objShell.getComponentFromType('map');map.saveRepositionGeometry();};Map.cancelRepositionGeometry=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11671,'Map.cancelRepositionGeometry =','function()',arguments);var map=objShell.getComponentFromType('map');map.cancelRepositionGeometry();};Map.layerSelectDropTargetGeocodeResource=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11678,'Map.layerSelectDropTargetGeocodeResource =','function()',arguments);var map=objShell.getComponentFromType('map');map.layerSelectDropTargetGeocodeResource();};Map.saveDropTargetGeocodeResource=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11684,'Map.saveDropTargetGeocodeResource =','function()',arguments);var map=objShell.getComponentFromType('map');map.saveDropTargetGeocodeResource();};Map.saveDropTargetGeocodeResourceOnComplete=function(blnSaveToLayer,arrGroupDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',11689,'Map.saveDropTargetGeocodeResourceOnComplete =','function(blnSaveToLayer, arrGroupDetails)',arguments);var map=objShell.getComponentFromType('map');map.saveDropTargetGeocodeResourceOnComplete(blnSaveToLayer,arrGroupDetails);};Map.cancelDropTargetGeocodeResource=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11695,'Map.cancelDropTargetGeocodeResource =','function()',arguments);var map=objShell.getComponentFromType('map');map.cancelDropTargetGeocodeResource();};Map.getAutoRepositionMode=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11702,'Map.getAutoRepositionMode =','function()',arguments);var map=objShell.getComponentFromType('map');blnAutoReposition=true;if(map.blnDropTargetModeActive)
{blnAutoReposition=false;}
return blnAutoReposition;};Map.getAutoRepositionResourceQueryMode=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11721,'Map.getAutoRepositionResourceQueryMode =','function()',arguments);var map=objShell.getComponentFromType('map');blnAutoReposition=true;if(map.blnDropTargetModeActive)
{blnAutoReposition=false;}
return blnAutoReposition;};Map.getState=function(blnSerialize,blnIncludeMapStamps)
{Profiler.profile('view/components/map/assets/javascript/map.js',11742,'Map.getState =','function(blnSerialize, blnIncludeMapStamps)',arguments);var blnSerialize=(typeof(blnSerialize)!='undefined')?blnSerialize:true;var blnIncludeMapStamps=(typeof(blnIncludeMapStamps)!='undefined')?blnIncludeMapStamps:false;var map=objShell.getComponentFromType('map');return map.getState(blnSerialize,blnIncludeMapStamps);};Map.setState=function(state,blnPlaylistMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',11753,'Map.setState =','function(state, blnPlaylistMode)',arguments);var map=objShell.getComponentFromType('map');map.setState(state,blnPlaylistMode);};Map.setStampState=function(objStampDisplay,arrStampState)
{Profiler.profile('view/components/map/assets/javascript/map.js',11759,'Map.setStampState =','function(objStampDisplay, arrStampState)',arguments);var map=objShell.getComponentFromType('map');return map.setStampState(objStampDisplay,arrStampState);};Map.createMapExplorerButton=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11766,'Map.createMapExplorerButton =','function()',arguments);var map=objShell.getComponentFromType('map');map.createMapExplorerButton();};Map.setDropTargetMode=function(blnDropTargetMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',11772,'Map.setDropTargetMode =','function(blnDropTargetMode)',arguments);var map=objShell.getComponentFromType('map');map.setDropTargetMode(blnDropTargetMode);};Map.getDropTargetMode=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11777,'Map.getDropTargetMode =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getDropTargetMode();};Map.hideInterferingThings=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11783,'Map.hideInterferingThings =','function()',arguments);var map=objShell.getComponentFromType('map');map.hideInterferingThings();};Map.showInterferingThings=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11789,'Map.showInterferingThings =','function()',arguments);var map=objShell.getComponentFromType('map');map.showInterferingThings();};Map.editGeometry=function(intResourceId,intGeometryId,strMode,geomType,symbolFilename,symbolSize)
{Profiler.profile('view/components/map/assets/javascript/map.js',11795,'Map.editGeometry =','function(intResourceId, intGeometryId, strMode, geomType, symbolFilename, symbolSize)',arguments);var map=objShell.getComponentFromType('map');map.editGeometry(intResourceId,intGeometryId,strMode,geomType,symbolFilename,symbolSize);};Map.hide=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11801,'Map.hide =','function()',arguments);var map=objShell.getComponentFromType('map');if(map)
{map.hide();}};Map.show=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11811,'Map.show =','function()',arguments);var map=objShell.getComponentFromType('map');if(map)
{map.show();}};Map.createDraggableSchoolIcon=function(easting,northing,dropCallback)
{Profiler.profile('view/components/map/assets/javascript/map.js',11821,'Map.createDraggableSchoolIcon =','function(easting, northing, dropCallback)',arguments);var map=objShell.getComponentFromType('map');return map.createDraggableSchoolIcon(easting,northing,dropCallback);};Map.removeDraggableSchoolIcon=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11827,'Map.removeDraggableSchoolIcon =','function()',arguments);var map=objShell.getComponentFromType('map');map.removeDraggableSchoolIcon();};Map.printCurrentView=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11833,'Map.printCurrentView =','function()',arguments);var map=objShell.getComponentFromType('map');map.printCurrentView();};Map.expiredMapCallback=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11839,'Map.expiredMapCallback =','function()',arguments);var map=objShell.getComponentFromType('map');map.expiredMapCallback();};Map.closeExpiredLicenceLightbox=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11844,'Map.closeExpiredLicenceLightbox =','function()',arguments);var map=objShell.getComponentFromType('map');map.closeExpiredLicenceLightbox();};Map.toggleLayerLegendModeDescription=function(strLayerLegendMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',11850,'Map.toggleLayerLegendModeDescription =','function(strLayerLegendMode)',arguments);var map=objShell.getComponentFromType('map');map.toggleLayerLegendModeDescription(strLayerLegendMode);};Map.registerLinkToUlearnLayerData=function(intLayerId,strLayerName,strLayerDescription,intThemeId,intThematicRulesetNodeId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11855,'Map.registerLinkToUlearnLayerData =','function(intLayerId, strLayerName, strLayerDescription, intThemeId, intThematicRulesetNodeId)',arguments);var map=objShell.getComponentFromType('map');map.registerLinkToUlearnLayerData(intLayerId,strLayerName,strLayerDescription,intThemeId,intThematicRulesetNodeId);};Map.registerLinkToUlearnLayerViewData=function(intViewId,intLayerId,intThematicRulesetId,strName)
{Profiler.profile('view/components/map/assets/javascript/map.js',11860,'Map.registerLinkToUlearnLayerViewData =','function(intViewId, intLayerId, intThematicRulesetId, strName)',arguments);var map=objShell.getComponentFromType('map');map.registerLinkToUlearnLayerViewData(intViewId,intLayerId,intThematicRulesetId,strName);};Map.updateViewsAvailableForLayer=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11865,'Map.updateViewsAvailableForLayer =','function()',arguments);var map=objShell.getComponentFromType('map');map.updateViewsAvailableForLayer();};Map.generateLinkToUlearnLayerPanelContent=function(strTargetElementId,objLayerDetails,objAdditionalInfo)
{Profiler.profile('view/components/map/assets/javascript/map.js',11870,'Map.generateLinkToUlearnLayerPanelContent =','function(strTargetElementId, objLayerDetails, objAdditionalInfo)',arguments);var map=objShell.getComponentFromType('map');map.generateLinkToUlearnLayerPanelContent(strTargetElementId,objLayerDetails,objAdditionalInfo);};Map.setLinkToMapActiveLayer=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11875,'Map.setLinkToMapActiveLayer =','function()',arguments);var map=objShell.getComponentFromType('map');map.setLinkToMapActiveLayer();};Map.setLinkToMapLayerSelectMode=function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',11880,'Map.setLinkToMapLayerSelectMode =','function(strMode)',arguments);var map=objShell.getComponentFromType('map');map.setLinkToMapLayerSelectMode(strMode);};Map.setLinkToMapViewSelectMode=function(strMode)
{Profiler.profile('view/components/map/assets/javascript/map.js',11885,'Map.setLinkToMapViewSelectMode =','function(strMode)',arguments);var map=objShell.getComponentFromType('map');map.setLinkToMapViewSelectMode(strMode);};Map.clearLinkToMapActiveLayers=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11890,'Map.clearLinkToMapActiveLayers =','function()',arguments);var map=objShell.getComponentFromType('map');map.clearLinkToMapActiveLayers();};Map.clearLinkToMapRadiusLayers=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11895,'Map.clearLinkToMapRadiusLayers =','function()',arguments);var map=objShell.getComponentFromType('map');map.clearLinkToMapRadiusLayers();};Map.linkToUlearnSearch=function(strSearchCriteria,objSearchFieldElement,objSearchResultsElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',11900,'Map.linkToUlearnSearch =','function(strSearchCriteria, objSearchFieldElement, objSearchResultsElement)',arguments);var map=objShell.getComponentFromType('map');map.linkToUlearnSearch(strSearchCriteria,objSearchFieldElement,objSearchResultsElement);};Map.registerLinkToUlearnSearchResultGeometries=function(intResourceId,intGeometryId,objGeometries,strItemType)
{Profiler.profile('view/components/map/assets/javascript/map.js',11905,'Map.registerLinkToUlearnSearchResultGeometries =','function(intResourceId, intGeometryId, objGeometries, strItemType)',arguments);var map=objShell.getComponentFromType('map');map.registerLinkToUlearnSearchResultGeometries(intResourceId,intGeometryId,objGeometries,strItemType);};Map.linkToUlearnResultRollover=function(objElement,blnOver)
{Profiler.profile('view/components/map/assets/javascript/map.js',11910,'Map.linkToUlearnResultRollover =','function(objElement, blnOver)',arguments);var map=objShell.getComponentFromType('map');map.linkToUlearnResultRollover(objElement,blnOver);};Map.jumpToLinkToUlearnSearchResult=function(intResultId)
{Profiler.profile('view/components/map/assets/javascript/map.js',11915,'Map.jumpToLinkToUlearnSearchResult =','function(intResultId)',arguments);var map=objShell.getComponentFromType('map');map.jumpToLinkToUlearnSearchResult(intResultId);};Map.getobjEMController=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11920,'Map.getobjEMController =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getobjEMController();};Map.getobjDropWidget=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11925,'Map.getobjDropWidget =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getobjDropWidget();};Map.getobjAnnotationStampDisplay=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11930,'Map.getobjAnnotationStampDisplay =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getobjAnnotationStampDisplay();};Map.getobjPlaceStampDisplay=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11935,'Map.getobjPlaceStampDisplay =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getobjPlaceStampDisplay();};Map.getobjTagStampDisplay=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11940,'Map.getobjTagStampDisplay =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getobjTagStampDisplay();};Map.getInstance=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11946,'Map.getInstance =','function()',arguments);var map=objShell.getComponentFromType('map');return map;};Map.getActiveLayer=function(blnSuppressWarning)
{Profiler.profile('view/components/map/assets/javascript/map.js',11951,'Map.getActiveLayer =','function(blnSuppressWarning)',arguments);var map=objShell.getComponentFromType('map');return map.getActiveLayer(blnSuppressWarning);};Map.getActiveLayerName=function(blnSuppressWarning)
{Profiler.profile('view/components/map/assets/javascript/map.js',11956,'Map.getActiveLayerName =','function(blnSuppressWarning)',arguments);var map=objShell.getComponentFromType('map');return map.getActiveLayerName(blnSuppressWarning);};Map.getActiveLayersAnnotations=function(blnSuppressWarning)
{Profiler.profile('view/components/map/assets/javascript/map.js',11961,'Map.getActiveLayersAnnotations =','function(blnSuppressWarning)',arguments);var map=objShell.getComponentFromType('map');return map.getActiveLayersAnnotations(blnSuppressWarning);};Map.syncAnnotationGeometry=function(intLayerId,strStampId,objAnnotationObject)
{Profiler.profile('view/components/map/assets/javascript/map.js',11966,'Map.syncAnnotationGeometry =','function(intLayerId, strStampId, objAnnotationObject)',arguments);var map=objShell.getComponentFromType('map');return map.syncAnnotationGeometry(intLayerId,strStampId,objAnnotationObject);};Map.resizeHorizontalToolBar=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11971,'Map.resizeHorizontalToolBar =','function()',arguments);var map=objShell.getComponentFromType('map');map.objMapMenuMapAWidget.resizeHorizontalToolbar();map.objUndoButtonWidget.resizeHorizontalToolbar();};Map.generateEzmapsPopup=function(objPoint,objOnCloseFunc,intWidth,intHeight,strContent,blnCentered)
{Profiler.profile('view/components/map/assets/javascript/map.js',11977,'Map.generateEzmapsPopup =','function(objPoint, objOnCloseFunc, intWidth, intHeight, strContent, blnCentered)',arguments);var map=objShell.getComponentFromType('map');return map.generateEzmapsPopup(objPoint,objOnCloseFunc,intWidth,intHeight,strContent,blnCentered);};Map.registerMapMoveCallback=function(objCallbackMethod,strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',11982,'Map.registerMapMoveCallback =','function(objCallbackMethod, strKey)',arguments);var map=objShell.getComponentFromType('map');return map.registerMapMoveCallback(objCallbackMethod,strKey);};Map.unregisterMapMoveCallback=function(strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',11988,'Map.unregisterMapMoveCallback =','function(strKey)',arguments);var map=objShell.getComponentFromType('map');return map.unregisterMapMoveCallback(strKey);};Map.closeMapPopup=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11993,'Map.closeMapPopup =','function()',arguments);var map=objShell.getComponentFromType('map');map.closeMapPopup();};Map.returnCurrentPopupLocationDetails=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',11998,'Map.returnCurrentPopupLocationDetails =','function()',arguments);var map=objShell.getComponentFromType('map');return map.returnCurrentPopupLocationDetails();};Map.setAnnotationEditingStatus=function(blnAnnotationEditingStatus)
{Profiler.profile('view/components/map/assets/javascript/map.js',12003,'Map.setAnnotationEditingStatus =','function(blnAnnotationEditingStatus)',arguments);var map=objShell.getComponentFromType('map');map.setAnnotationEditingStatus(blnAnnotationEditingStatus);};Map.saveAnnotationLayerAsInit=function(intAnnotationLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12009,'Map.saveAnnotationLayerAsInit =','function(intAnnotationLayerId)',arguments);var map=objShell.getComponentFromType('map');map.saveAnnotationLayerAsInit(intAnnotationLayerId);};Map.submitAnnotationLayerForSavingAs=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12014,'Map.submitAnnotationLayerForSavingAs =','function()',arguments);var map=objShell.getComponentFromType('map');map.submitAnnotationLayerForSavingAs();};Map.autoSubmitAnnotationLayerForSavingAs=function(strLayerId,strLayerName,objCallbackFunction)
{Profiler.profile('view/components/map/assets/javascript/map.js',12020,'Map.autoSubmitAnnotationLayerForSavingAs =','function(strLayerId, strLayerName, objCallbackFunction)',arguments);var map=objShell.getComponentFromType('map');map.autoSubmitAnnotationLayerForSavingAs(strLayerId,strLayerName,objCallbackFunction);};Map.submitAnnotationLayerForClearing=function(blnNoLightbox)
{Profiler.profile('view/components/map/assets/javascript/map.js',12026,'Map.submitAnnotationLayerForClearing =','function(blnNoLightbox)',arguments);var map=objShell.getComponentFromType('map');map.submitAnnotationLayerForClearing(blnNoLightbox);};Map.enableDefaultAnnotationLayer=function(blnAlwaysUseDefault)
{Profiler.profile('view/components/map/assets/javascript/map.js',12032,'Map.enableDefaultAnnotationLayer =','function(blnAlwaysUseDefault)',arguments);var map=objShell.getComponentFromType('map');map.enableDefaultAnnotationLayer(blnAlwaysUseDefault);};Map.setOverridingDefaultAnnotationLayerId=function(intOverridingDefaultAnnotationLayerId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12038,'Map.setOverridingDefaultAnnotationLayerId =','function(intOverridingDefaultAnnotationLayerId)',arguments);var map=objShell.getComponentFromType('map');map.setOverridingDefaultAnnotationLayerId(intOverridingDefaultAnnotationLayerId);};Map.showStampDetails=function(srcElement,objStampSettings,blnForceUpdate)
{Profiler.profile('view/components/map/assets/javascript/map.js',12044,'Map.showStampDetails =','function(srcElement, objStampSettings, blnForceUpdate)',arguments);var map=objShell.getComponentFromType('map');map.showStampDetails(srcElement,objStampSettings,blnForceUpdate);};Map.hideStampDetails=function(strForceClose)
{Profiler.profile('view/components/map/assets/javascript/map.js',12050,'Map.hideStampDetails =','function(strForceClose)',arguments);var blnForceClose=(strForceClose=='true')?true:false;var map=objShell.getComponentFromType('map');map.hideStampDetails(blnForceClose);};Map.removeAllStamps=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12058,'Map.removeAllStamps =','function()',arguments);var map=objShell.getComponentFromType('map');map.removeAllStamps();};Map.resizePopupPageIframe=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12064,'Map.resizePopupPageIframe =','function()',arguments);var map=objShell.getComponentFromType('map');map.resizePopupPageIframe();};Map.resizeTransparentBoxWidthForContent=function(objContainer)
{Profiler.profile('view/components/map/assets/javascript/map.js',12070,'Map.resizeTransparentBoxWidthForContent =','function(objContainer)',arguments);var map=objShell.getComponentFromType('map');map.resizeTransparentBoxWidthForContent(objContainer);};Map.resizeTransparentBoxHeightForContent=function(objContainer)
{Profiler.profile('view/components/map/assets/javascript/map.js',12076,'Map.resizeTransparentBoxHeightForContent =','function(objContainer)',arguments);var map=objShell.getComponentFromType('map');map.resizeTransparentBoxHeightForContent(objContainer);};Map.showContainerInTransparentBox=function(objContainer)
{Profiler.profile('view/components/map/assets/javascript/map.js',12082,'Map.showContainerInTransparentBox =','function(objContainer)',arguments);var map=objShell.getComponentFromType('map');map.showContainerInTransparentBox(objContainer);};Map.activateStampHover=function(objStamp,objStampDetails)
{Profiler.profile('view/components/map/assets/javascript/map.js',12088,'Map.activateStampHover =','function(objStamp, objStampDetails)',arguments);var map=objShell.getComponentFromType('map');map.activateStampHover(objStamp,objStampDetails);};Map.deactivateStampHover=function(objStamp)
{Profiler.profile('view/components/map/assets/javascript/map.js',12094,'Map.deactivateStampHover =','function(objStamp)',arguments);var map=objShell.getComponentFromType('map');map.deactivateStampHover(objStamp);};Map.highlightStamp=function(intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12100,'Map.highlightStamp =','function(intResourceId)',arguments);var map=objShell.getComponentFromType('map');map.highlightStamp(intResourceId);};Map.unHighlightStamp=function(intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12106,'Map.unHighlightStamp =','function(intResourceId)',arguments);var map=objShell.getComponentFromType('map');map.unHighlightStamp(intResourceId);};Map.registerPreTileUpdateFunction=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12112,'Map.registerPreTileUpdateFunction =','function()',arguments);var map=objShell.getComponentFromType('map');map.registerPreTileUpdateFunction();};Map.unregisterPreTileUpdateFunction=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12118,'Map.unregisterPreTileUpdateFunction =','function()',arguments);var map=objShell.getComponentFromType('map');map.unregisterPreTileUpdateFunction();};Map.unregisterLayerGeometries=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12124,'Map.unregisterLayerGeometries =','function()',arguments);var map=objShell.getComponentFromType('map');map.unregisterLayerGeometries();};Map.checkMouseOverResource=function(intMouseX,intMouseY)
{Profiler.profile('view/components/map/assets/javascript/map.js',12130,'Map.checkMouseOverResource =','function(intMouseX, intMouseY)',arguments);var map=objShell.getComponentFromType('map');map.checkMouseOverResource(intMouseX,intMouseY);};Map.updateTileCache=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12136,'Map.updateTileCache =','function()',arguments);var map=objShell.getComponentFromType('map');map.updateTileCache();};Map.registerExternalGeometries=function(objGeometryData,blnAutoZoom)
{Profiler.profile('view/components/map/assets/javascript/map.js',12146,'Map.registerExternalGeometries =','function(objGeometryData, blnAutoZoom)',arguments);var map=objShell.getComponentFromType('map');map.registerExternalGeometries(objGeometryData,blnAutoZoom);};Map.clearExternalGeometries=function(objGeometryData)
{Profiler.profile('view/components/map/assets/javascript/map.js',12151,'Map.clearExternalGeometries =','function(objGeometryData)',arguments);var map=objShell.getComponentFromType('map');map.clearExternalGeometries();};Map.setLayers=function(strLayerAId,strLayerBId,refPoint,srid,zoomLevel)
{Profiler.profile('view/components/map/assets/javascript/map.js',12157,'Map.setLayers =','function(strLayerAId, strLayerBId, refPoint, srid, zoomLevel)',arguments);var map=objShell.getComponentFromType('map');map.setLayers(strLayerAId,strLayerBId,refPoint,srid,zoomLevel);};Map.addThresholdRadiusLayer=function(intLayerId,intCategoryId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12163,'Map.addThresholdRadiusLayer =','function(intLayerId, intCategoryId)',arguments);var map=objShell.getComponentFromType('map');map.addThresholdRadiusLayer(intLayerId,intCategoryId);};Map.removeThresholdRadiusLayer=function(intLayerId,intCategoryId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12169,'Map.removeThresholdRadiusLayer =','function(intLayerId, intCategoryId)',arguments);var map=objShell.getComponentFromType('map');map.removeThresholdRadiusLayer(intLayerId,intCategoryId);};Map.registerCarousel=function(strType,strCarouselIdentifier,objCarousel)
{Profiler.profile('view/components/map/assets/javascript/map.js',12179,'Map.registerCarousel =','function(strType, strCarouselIdentifier, objCarousel)',arguments);var map=objShell.getComponentFromType('map');map.registerCarousel(strType,strCarouselIdentifier,objCarousel);};Map.registerMapMenuCategory=function(objCategory)
{Profiler.profile('view/components/map/assets/javascript/map.js',12185,'Map.registerMapMenuCategory =','function(objCategory)',arguments);var map=objShell.getComponentFromType('map');map.registerMapMenuCategory(objCategory);};Map.registerMapMenuMap=function(objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',12191,'Map.registerMapMenuMap =','function(objMap)',arguments);var map=objShell.getComponentFromType('map');map.registerMapMenuMap(objMap);};Map.mapMenuCarouselRegisterMap=function(intMapId,intGroupId,strGroupName,strBranchName,strMapName,strMapDescription,strMapThumbnail,blnEnabled)
{Profiler.profile('view/components/map/assets/javascript/map.js',12197,'Map.mapMenuCarouselRegisterMap =','function(intMapId, intGroupId, strGroupName, strBranchName, strMapName, strMapDescription, strMapThumbnail, blnEnabled)',arguments);var map=objShell.getComponentFromType('map');map.mapMenuCarouselRegisterMap(intMapId,intGroupId,strGroupName,strBranchName,strMapName,strMapDescription,strMapThumbnail,blnEnabled);};Map.mapMenuCarouselHoverMap=function(objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',12203,'Map.mapMenuCarouselHoverMap =','function(objElement)',arguments);var map=objShell.getComponentFromType('map');map.mapMenuCarouselHoverMap(objElement);};Map.mapMenuCarouselUnHoverMap=function(objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',12209,'Map.mapMenuCarouselUnHoverMap =','function(objElement)',arguments);var map=objShell.getComponentFromType('map');map.mapMenuCarouselUnHoverMap(objElement);};Map.mapMenuCarouselSelectMap=function(intMapId,blnCategory,intGroupId,strGroupName,strBranchName,strMapName,blnEnabled,blnUnlicenced)
{Profiler.profile('view/components/map/assets/javascript/map.js',12215,'Map.mapMenuCarouselSelectMap =','function(intMapId, blnCategory, intGroupId, strGroupName, strBranchName, strMapName, blnEnabled, blnUnlicenced)',arguments);var map=objShell.getComponentFromType('map');map.mapMenuCarouselSelectMap(intMapId,blnCategory,intGroupId,strGroupName,strBranchName,strMapName,blnEnabled,blnUnlicenced);};Map.mapMenuCarouselBack=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12221,'Map.mapMenuCarouselBack =','function()',arguments);var map=objShell.getComponentFromType('map');map.mapMenuCarouselBack();};Map.mapMenuCarouselFullscreen=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12227,'Map.mapMenuCarouselFullscreen =','function()',arguments);var map=objShell.getComponentFromType('map');map.mapMenuCarouselFullscreen();};Map.hideMapMenuCarousel=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12233,'Map.hideMapMenuCarousel =','function()',arguments);var map=objShell.getComponentFromType('map');map.hideMapMenuCarousel();};Map.selectMapMenuMap=function(objMap)
{Profiler.profile('view/components/map/assets/javascript/map.js',12239,'Map.selectMapMenuMap =','function(objMap)',arguments);var map=objShell.getComponentFromType('map');map.selectMapMenuMap(objMap);};Map.switchToMap=function(intMapId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12245,'Map.switchToMap =','function(intMapId)',arguments);var map=objShell.getComponentFromType('map');map.switchToMap(intMapId);};Map.hideResourcePickerCarousel=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12251,'Map.hideResourcePickerCarousel =','function()',arguments);var map=objShell.getComponentFromType('map');map.hideResourcePickerCarousel();};Map.resourcePickerCarouselHoverResource=function(objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',12257,'Map.resourcePickerCarouselHoverResource =','function(objElement)',arguments);var map=objShell.getComponentFromType('map');map.resourcePickerCarouselHoverResource(objElement);};Map.resourcePickerCarouselUnHoverResource=function(objElement)
{Profiler.profile('view/components/map/assets/javascript/map.js',12263,'Map.resourcePickerCarouselUnHoverResource =','function(objElement)',arguments);var map=objShell.getComponentFromType('map');map.resourcePickerCarouselUnHoverResource(objElement);};Map.resourcePickerCarouselSelectTopic=function(intTopicId,strTopicName,intResources,strGridExtents,intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12269,'Map.resourcePickerCarouselSelectTopic =','function(intTopicId, strTopicName, intResources, strGridExtents, intResourceId)',arguments);var map=objShell.getComponentFromType('map');map.resourcePickerCarouselSelectTopic(intTopicId,strTopicName,intResources,strGridExtents,intResourceId);};Map.resourcePickerCarouselSelectResource=function(intResourceId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12275,'Map.resourcePickerCarouselSelectResource =','function(intResourceId)',arguments);var map=objShell.getComponentFromType('map');map.resourcePickerCarouselSelectResource(intResourceId);};Map.resourcePickerCarouselBack=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12281,'Map.resourcePickerCarouselBack =','function()',arguments);var map=objShell.getComponentFromType('map');map.resourcePickerCarouselBack();};Map.resourcePickerCarouselFullscreen=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12287,'Map.resourcePickerCarouselFullscreen =','function()',arguments);var map=objShell.getComponentFromType('map');map.resourcePickerCarouselFullscreen();};Map.getPlaylistMode=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12293,'Map.getPlaylistMode =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getPlaylistMode();}
Map.setPlaylistMode=function(blnPlaylistMode,intViewId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12299,'Map.setPlaylistMode =','function(blnPlaylistMode, intViewId)',arguments);var map=objShell.getComponentFromType('map');map.setPlaylistMode(blnPlaylistMode,intViewId);};Map.printMap=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12305,'Map.printMap =','function()',arguments);var map=objShell.getComponentFromType('map');map.printMap();}
Map.getCurrentMapDetails=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12311,'Map.getCurrentMapDetails =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getCurrentMapDetails();}
Map.registerMapChangeCallbackCallback=function(strKey,objCallbackFunc)
{Profiler.profile('view/components/map/assets/javascript/map.js',12317,'Map.registerMapChangeCallbackCallback =','function(strKey, objCallbackFunc)',arguments);var map=objShell.getComponentFromType('map');return map.registerMapChangeCallbackCallback(strKey,objCallbackFunc);}
Map.unregisterMapChangeCallbackCallback=function(strKey)
{Profiler.profile('view/components/map/assets/javascript/map.js',12322,'Map.unregisterMapChangeCallbackCallback =','function(strKey)',arguments);var map=objShell.getComponentFromType('map');return map.unregisterMapChangeCallbackCallback(strKey);}
Map.startNoCacheMode=function(objNoCacheOptions)
{Profiler.profile('view/components/map/assets/javascript/map.js',12327,'Map.startNoCacheMode =','function(objNoCacheOptions)',arguments);var map=objShell.getComponentFromType('map');map.startNoCacheMode(objNoCacheOptions);}
Map.endNoCacheMode=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12332,'Map.endNoCacheMode =','function()',arguments);var map=objShell.getComponentFromType('map');map.endNoCacheMode();}
Map.getResourceIdForCalloutBox=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12338,'Map.getResourceIdForCalloutBox =','function()',arguments);var map=objShell.getComponentFromType('map');return map.getResourceIdForCalloutBox();};Map.unHighlightAllStamps=function()
{Profiler.profile('view/components/map/assets/javascript/map.js',12344,'Map.unHighlightAllStamps =','function()',arguments);var map=objShell.getComponentFromType('map');return map.unHighlightAllStamps();};Map.pointsAreWithinExtents=function(arrPoints,objExtents)
{Profiler.profile('view/components/map/assets/javascript/map.js',12350,'Map.pointsAreWithinExtents =','function(arrPoints, objExtents)',arguments);var map=objShell.getComponentFromType('map');return map.pointsAreWithinExtents(arrPoints,objExtents);};Map.pointsAreWithinMapExtents=function(arrPoints,intMapId)
{Profiler.profile('view/components/map/assets/javascript/map.js',12356,'Map.pointsAreWithinMapExtents =','function(arrPoints, intMapId)',arguments);var map=objShell.getComponentFromType('map');return map.pointsAreWithinMapExtents(arrPoints,intMapId);};Map.jumpToPoints=function(arrPoints)
{Profiler.profile('view/components/map/assets/javascript/map.js',12362,'Map.jumpToPoints =','function(arrPoints)',arguments);var map=objShell.getComponentFromType('map');return map.jumpToPoints(arrPoints);};var ezMaps={Version:'0.0.0_pre0'}
if(typeof(blnUseJQuery)=='undefined')
{var blnUseJQuery=false;}
var Img=Class.create();Img.prototype={objLayerStatus:null,objParentTile:null,objOnLoadCallback:null,strUrl:null,intErrorCount:0,intMaxReloadAttempts:15,intZoomLevel:null,objGridPosition:null,blnZoomLevelUpdated:false,blnGridPositionUpdated:false,blnImageUpdated:false,intImageReloadTimerId:null,intImageReloadTimeout:1000,blnActive:true,initialize:function(objLayerStatus,objParentTile,objOnLoadCallback)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',5,'var Img=Class.create();Img.prototype={objLayerStatus:null,objParentTile:null,objOnLoadCallback:null,strUrl:null,intErrorCount:0,intMaxReloadAttempts:15,intZoomLevel:null,objGridPosition:null,blnZoomLevelUpdated:false,blnGridPositionUpdated:false,blnImageUpdated:false,intImageReloadTimerId:null,intImageReloadTimeout:1000,blnActive:true,initialize:','function(objLayerStatus,objParentTile,objOnLoadCallback)',arguments);this.objLayerStatus=objLayerStatus;this.objParentTile=objParentTile;this.objOnLoadCallback=objOnLoadCallback;},uninitialize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',6,'this.objLayerStatus=objLayerStatus;this.objParentTile=objParentTile;this.objOnLoadCallback=objOnLoadCallback;},uninitialize:','function()',arguments);this.clearImageReloadTimer();this.destroyCurrentImage();this.destroyLoadingImage();this.objLayerStatus=null;this.objParentTile=null;this.objOnLoadCallback=null;this.strUrl=null;this.intErrorCount=0;this.intZoomLevel=null;this.objGridPosition=null;this.blnZoomLevelUpdated=false;this.blnGridPositionUpdated=false;this.blnImageUpdated=false;this.intImageReloadTimerId=null;this.intImageReloadTimeout=1000;this.blnActive=true;},createLoadingImage:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',7,'this.clearImageReloadTimer();this.destroyCurrentImage();this.destroyLoadingImage();this.objLayerStatus=null;this.objParentTile=null;this.objOnLoadCallback=null;this.strUrl=null;this.intErrorCount=0;this.intZoomLevel=null;this.objGridPosition=null;this.blnZoomLevelUpdated=false;this.blnGridPositionUpdated=false;this.blnImageUpdated=false;this.intImageReloadTimerId=null;this.intImageReloadTimeout=1000;this.blnActive=true;},createLoadingImage:','function()',arguments);this.destroyLoadingImage();if(blnUseJQuery===true)
{var objImage=document.createElement('img');$j(objImage).attr({galleryImg:'no',className:'imageDiv'});$j(document).data('ezmaps_tile_'+this.objParentTile.tileID+'_loading_image',objImage);}
else
{var objImage=new Element('img');objImage.galleryImg='no';Element.addClassName(objImage,'imageDiv');this.objLoadingImage=objImage;}
this.addEventListeners();},destroyLoadingImage:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',12,'this.addEventListeners();},destroyLoadingImage:','function()',arguments);var objLoadingImage=this.returnLoadingImageReference();if(!objLoadingImage)
{return true;}
this.removeEventListeners();if(blnUseJQuery===true)
{$j(document).removeData('ezmaps_tile_'+this.objParentTile.tileID+'_loading_image');}
else
{this.objLoadingImage=null;}},createCurrentImage:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',18,'{this.objLoadingImage=null;}},createCurrentImage:','function()',arguments);this.removeEventListeners();var objLoadingImage=this.returnLoadingImageReference();this.objParentTile.returnContainerElement().appendChild(objLoadingImage);this.destroyCurrentImage();if(blnUseJQuery===true)
{$j(document).data('ezmaps_tile_'+this.objParentTile.tileID+'_current_image',objLoadingImage);}
else
{this.objCurrentImage=this.objLoadingImage;}
if(blnUseJQuery===true)
{$j(document).removeData('ezmaps_tile_'+this.objParentTile.tileID+'_loading_image');}
else
{this.objLoadingImage=null;}
this.createLoadingImage();},destroyCurrentImage:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',27,'this.createLoadingImage();},destroyCurrentImage:','function()',arguments);var objCurrentImage=this.returnCurrentImageReference();if(!objCurrentImage)
{return true;}
this.objParentTile.returnContainerElement().removeChild(objCurrentImage);if(blnUseJQuery===true)
{$j(document).removeData('ezmaps_tile_'+this.objParentTile.tileID+'_current_image');}
else
{this.objCurrentImage=null;}},returnCurrentImageReference:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',33,'{this.objCurrentImage=null;}},returnCurrentImageReference:','function()',arguments);if(blnUseJQuery===true)
{return $j(document).data('ezmaps_tile_'+this.objParentTile.tileID+'_current_image');}
else
{return this.objCurrentImage;}},returnLoadingImageReference:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',37,'{return this.objCurrentImage;}},returnLoadingImageReference:','function()',arguments);if(blnUseJQuery===true)
{return $j(document).data('ezmaps_tile_'+this.objParentTile.tileID+'_loading_image');}
else
{return this.objLoadingImage;}},addEventListeners:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',41,'{return this.objLoadingImage;}},addEventListeners:','function()',arguments);if(blnUseJQuery===true)
{var _this=this;$j(this.returnLoadingImageReference()).unbind('load').bind('load',{objImage:this},function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',43,'{var _this=this;$j(this.returnLoadingImageReference()).unbind(\'load\').bind(\'load\',{objImage:this},','function(event)',arguments);event.data.objImage.onLoad();});$j(this.returnLoadingImageReference()).unbind('error').bind('error',{objImage:this},function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',44,'event.data.objImage.onLoad();});$j(this.returnLoadingImageReference()).unbind(\'error\').bind(\'error\',{objImage:this},','function(event)',arguments);event.data.objImage.onError();});}
else
{this.returnLoadingImageReference().onload=this.onLoad.bindAsEventListener(this);this.returnLoadingImageReference().onerror=this.onError.bindAsEventListener(this);}},removeEventListeners:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',47,'{this.returnLoadingImageReference().onload=this.onLoad.bindAsEventListener(this);this.returnLoadingImageReference().onerror=this.onError.bindAsEventListener(this);}},removeEventListeners:','function()',arguments);if(blnUseJQuery===true)
{$j(this.returnLoadingImageReference()).unbind('load');$j(this.returnLoadingImageReference()).unbind('error');}
else
{this.returnLoadingImageReference().onload=null;this.returnLoadingImageReference().onerror=null;}},setActive:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',51,'{this.returnLoadingImageReference().onload=null;this.returnLoadingImageReference().onerror=null;}},setActive:','function()',arguments);this.blnActive=true;},setInactive:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',52,'this.blnActive=true;},setInactive:','function()',arguments);this.blnActive=false;this.clearImageReloadTimer();this.intErrorCount=0;},setZoomLevel:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',53,'this.blnActive=false;this.clearImageReloadTimer();this.intErrorCount=0;},setZoomLevel:','function()',arguments);var intZoomLevel=this.objLayerStatus.getZoomLevel();if(this.intZoomLevel!=intZoomLevel)
{this.intZoomLevel=intZoomLevel;this.blnZoomLevelUpdated=true;}},setGridPosition:function(objGridPosition)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',55,'{this.intZoomLevel=intZoomLevel;this.blnZoomLevelUpdated=true;}},setGridPosition:','function(objGridPosition)',arguments);if(this.objGridPosition==null||this.objGridPosition.x!=objGridPosition.x||this.objGridPosition.y!=objGridPosition.y||this.objGridPosition.srid!=objGridPosition.srid)
{this.objGridPosition=objGridPosition;this.blnGridPositionUpdated=true;}},setURL:function(strUrl)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',57,'{this.objGridPosition=objGridPosition;this.blnGridPositionUpdated=true;}},setURL:','function(strUrl)',arguments);if((strUrl.include('zoomedTooFar')||strUrl.include('unlicenced'))&&!Shell.getUserAthenticatedStatus())
{strUrl=this.objLayerStatus.getTileErrorUrl('mustLogIn');}
else if(strUrl.include('unlicenced'))
{strUrl=this.objLayerStatus.getTileErrorUrl('unlicenced');}
else if(strUrl.include('zoomedTooFar'))
{strUrl=this.objLayerStatus.getTileErrorUrl('zoomedTooFar');}
else if(strUrl.include('clearTile'))
{strUrl=this.objLayerStatus.getTileErrorUrl('clearTile');}
else if(strUrl.include('beyondExtentLimit'))
{strUrl=this.objLayerStatus.getTileErrorUrl('beyondExtentLimit');}
else
{var objPosition=this.getPosition();if(!objPosition.onMap)
{strUrl=this.objLayerStatus.getTileErrorUrl('notOnMap');}}
if(!strUrl.include('layerCacheOn')||this.blnZoomLevelUpdated===true||this.blnGridPositionUpdated===true)
{this.destroyCurrentImage();}
this.strUrl=strUrl;this.intErrorCount=0;this.setImageSource(strUrl);},setImageSource:function(strSrc)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',73,'this.strUrl=strUrl;this.intErrorCount=0;this.setImageSource(strUrl);},setImageSource:','function(strSrc)',arguments);if(this.objLayerStatus.getEnabledTileSubdomains()===true)
{strSrc=strSrc.replace('http://','http://maptile'+this.objParentTile.parentLayerObj.intCurrentSubDomainCount+'.');this.objParentTile.parentLayerObj.incrementSubDomainCount();}
this.createLoadingImage();this.returnLoadingImageReference().src=strSrc;},setImageReloadTimer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',76,'this.createLoadingImage();this.returnLoadingImageReference().src=strSrc;},setImageReloadTimer:','function()',arguments);if(this.intErrorCount>=this.intMaxReloadAttempts)
{this.clearImageReloadTimer();var strUrl=this.objLayerStatus.getTileErrorUrl('errorLoading');this.strUrl=strUrl;this.setImageSource(strUrl);return;}
var _this=this;var objFunction=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',79,'var _this=this;var objFunction=','function()',arguments);_this.reloadImage();};this.intImageReloadTimerId=setTimeout(objFunction,this.intImageReloadTimeout);},clearImageReloadTimer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',80,'_this.reloadImage();};this.intImageReloadTimerId=setTimeout(objFunction,this.intImageReloadTimeout);},clearImageReloadTimer:','function()',arguments);if(this.intImageReloadTimerId)
{clearTimeout(this.intImageReloadTimerId);}
this.intImageReloadTimerId=null;},onLoad:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',83,'this.intImageReloadTimerId=null;},onLoad:','function()',arguments);this.clearImageReloadTimer();if(this.blnActive!==true)
{return;}
this.createCurrentImage();this.blnImageUpdated=true;this.update();this.objOnLoadCallback();},onError:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',86,'this.createCurrentImage();this.blnImageUpdated=true;this.update();this.objOnLoadCallback();},onError:','function()',arguments);this.setImageReloadTimer();},reloadImage:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',87,'this.setImageReloadTimer();},reloadImage:','function()',arguments);this.setImageSource(this.strUrl+'?random='+this.intErrorCount);this.intErrorCount++;},setOpacity:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',88,'this.setImageSource(this.strUrl+\'?random=\'+this.intErrorCount);this.intErrorCount++;},setOpacity:','function()',arguments);if(this.strUrl==null||this.strUrl.include('layerCacheOn'))
{return;}
var fltOpacity=this.objLayerStatus.getOpacity();if(blnUseJQuery===true)
{$j(this.returnCurrentImageReference()).css({opacity:fltOpacity});}
else
{$(this.returnCurrentImageReference()).setStyle({opacity:fltOpacity});}},setSize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',94,'{$(this.returnCurrentImageReference()).setStyle({opacity:fltOpacity});}},setSize:','function()',arguments);var objSize=this.objLayerStatus.getTileSize(this.objGridPosition,this.intZoomLevel);if(blnUseJQuery===true)
{$j(this.returnCurrentImageReference()).css({width:objSize.x+'px',height:objSize.y+'px'});}
else
{$(this.returnCurrentImageReference()).setStyle({width:objSize.x+'px',height:objSize.y+'px'});}},getPosition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',98,'{$(this.returnCurrentImageReference()).setStyle({width:objSize.x+\'px\',height:objSize.y+\'px\'});}},getPosition:','function()',arguments);return this.objLayerStatus.getTilePoint(this.objGridPosition,this.intZoomLevel);},setPosition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',99,'return this.objLayerStatus.getTilePoint(this.objGridPosition,this.intZoomLevel);},setPosition:','function()',arguments);var objPosition=this.getPosition();if(blnUseJQuery===true)
{$j(this.returnCurrentImageReference()).css({left:objPosition.point.x+'px',bottom:objPosition.point.y+'px'});}
else
{$(this.returnCurrentImageReference()).setStyle({left:objPosition.point.x+'px',bottom:objPosition.point.y+'px'});}},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',103,'{$(this.returnCurrentImageReference()).setStyle({left:objPosition.point.x+\'px\',bottom:objPosition.point.y+\'px\'});}},update:','function()',arguments);if(!this.returnCurrentImageReference())
{return false;}
if(this.blnZoomLevelUpdated===true||this.blnGridPositionUpdated===true||this.blnImageUpdated===true)
{this.setPosition();this.setSize();this.blnZoomLevelUpdated=false;this.blnGridPositionUpdated=false;this.blnImageUpdated=false;}
this.setOpacity();},updateOpacityOnly:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',108,'this.setOpacity();},updateOpacityOnly:','function()',arguments);if(!this.returnCurrentImageReference())
{return false;}
this.setOpacity();}};var Layer=Class.create();Layer.prototype={templateLayerUrl:"[getMapCacheUrl]/cache/[mapId]/[strMapCacheSymlinkName]/[bandwidthMode]/[srid]/[getZoomLevel]/",templateNoCacheLayerUrl:"[getMapCacheUrl]/nocache/[mapId]/[strMapCacheSymlinkName]/[bandwidthMode]/[srid]/[getZoomLevel]/[intThresholdZoomLevelToggle]/[intUpperThresholdCompression]/[intLowerThresholdCompression]/",templateTileUrl:"[x]x[y]x.jpg",IEfilter:false,type:"layer",tileWidth:256,tileHeight:256,maxError:60,imageBufferAmount:2,tiles:null,layerDiv:null,layerWrapperDiv:null,unlicenced:"/images/unlicenced.png",zoomedTooFar:"/images/zoomedOut.png",clearTile:"/images/transparentPixel.gif",notOnMap:"/images/notOnMap.png",mustLogIn:"/images/mustLogIn.png",beyondExtentLimit:"/images/beyond_extent_limit.jpg",errorLoading:"/images/errorLoading.png",intMaxSubDomainCount:2,intCurrentSubDomainCount:1,initialize:function(mapStatus,stackId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',111,'this.setOpacity();}};var Layer=Class.create();Layer.prototype={templateLayerUrl:"[getMapCacheUrl]/cache/[mapId]/[strMapCacheSymlinkName]/[bandwidthMode]/[srid]/[getZoomLevel]/",templateNoCacheLayerUrl:"[getMapCacheUrl]/nocache/[mapId]/[strMapCacheSymlinkName]/[bandwidthMode]/[srid]/[getZoomLevel]/[intThresholdZoomLevelToggle]/[intUpperThresholdCompression]/[intLowerThresholdCompression]/",templateTileUrl:"[x]x[y]x.jpg",IEfilter:false,type:"layer",tileWidth:256,tileHeight:256,maxError:60,imageBufferAmount:2,tiles:null,layerDiv:null,layerWrapperDiv:null,unlicenced:"/images/unlicenced.png",zoomedTooFar:"/images/zoomedOut.png",clearTile:"/images/transparentPixel.gif",notOnMap:"/images/notOnMap.png",mustLogIn:"/images/mustLogIn.png",beyondExtentLimit:"/images/beyond_extent_limit.jpg",errorLoading:"/images/errorLoading.png",intMaxSubDomainCount:2,intCurrentSubDomainCount:1,initialize:','function(mapStatus,stackId)',arguments);this.layerStatus=new LayerStatus(mapStatus,stackId,this);this.tiles=new Array();},getIEFilter:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',112,'this.layerStatus=new LayerStatus(mapStatus,stackId,this);this.tiles=new Array();},getIEFilter:','function()',arguments);return this.IEfilter;},makeLayerDiv:function(containingDiv)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',113,'return this.IEfilter;},makeLayerDiv:','function(containingDiv)',arguments);var cDiv=Utility.makeElement(containingDiv);this.layerWrapperDiv=document.createElement("div");Element.addClassName(this.layerWrapperDiv,"layerWrapper");this.layerDiv=document.createElement("div");Element.addClassName(this.layerDiv,"layer");cDiv.appendChild(this.layerWrapperDiv);this.layerWrapperDiv.appendChild(this.layerDiv);return this.layerDiv;},getMapId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',114,'var cDiv=Utility.makeElement(containingDiv);this.layerWrapperDiv=document.createElement("div");Element.addClassName(this.layerWrapperDiv,"layerWrapper");this.layerDiv=document.createElement("div");Element.addClassName(this.layerDiv,"layer");cDiv.appendChild(this.layerWrapperDiv);this.layerWrapperDiv.appendChild(this.layerDiv);return this.layerDiv;},getMapId:','function()',arguments);return this.layerStatus.getStackId(this.stackId);},setStackId:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',115,'return this.layerStatus.getStackId(this.stackId);},setStackId:','function(id)',arguments);return this.layerStatus.setStackId(id);},setLayerDiv:function(layerDiv)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',116,'return this.layerStatus.setStackId(id);},setLayerDiv:','function(layerDiv)',arguments);var layerDiv=Utility.makeElement(layerDiv);layerDiv.makePositioned();this.layerDiv=layerDiv;},setWrapperDiv:function(wp)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',117,'var layerDiv=Utility.makeElement(layerDiv);layerDiv.makePositioned();this.layerDiv=layerDiv;},setWrapperDiv:','function(wp)',arguments);this.layerWrapperDiv=Utility.makeElement(wp);},setStyle:function(style)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',118,'this.layerWrapperDiv=Utility.makeElement(wp);},setStyle:','function(style)',arguments);this.layerWrapperDiv.setStyle(style);},getWrapperDimensions:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',119,'this.layerWrapperDiv.setStyle(style);},getWrapperDimensions:','function()',arguments);return this.layerWrapperDiv.getDimensions();},setOpacity:function(opacity)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',120,'return this.layerWrapperDiv.getDimensions();},setOpacity:','function(opacity)',arguments);this.layerStatus.setOpacity(opacity);},refreshOpacity:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',121,'this.layerStatus.setOpacity(opacity);},refreshOpacity:','function()',arguments);this.layerStatus.refreshOpacity();},jumpToExt:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',122,'this.layerStatus.refreshOpacity();},jumpToExt:','function()',arguments);this.layerStatus.jumpToExt();},shiftOpacity:function(offsetOpacity)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',123,'this.layerStatus.jumpToExt();},shiftOpacity:','function(offsetOpacity)',arguments);this.layerStatus.shiftOpacity(offsetOpacity);},wrapTiles:function(offsetX,offsetY)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',124,'this.layerStatus.shiftOpacity(offsetOpacity);},wrapTiles:','function(offsetX,offsetY)',arguments);if((offsetX==0&&offsetY==0)&&(!offsetX||!offsetY))
return false;var array=Utility.wrapArray(this.tiles,-offsetY);var l=array.length;for(var i=0;i<l;i++)
{array[i]=Utility.wrapArray(array[i],offsetX);}
this.tiles=array;},shrinkArray:function(tileArray,newLength)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',128,'this.tiles=array;},shrinkArray:','function(tileArray,newLength)',arguments);if(!tileArray)
return false;newLength=newLength||0;var numberToPush=tileArray.length-newLength;for(var i=0;i<numberToPush;i++)
{var tile=tileArray.pop();tile.nihilate();tile=null;}},resetTileSet:function(gridSize)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',131,'{var tile=tileArray.pop();tile.nihilate();tile=null;}},resetTileSet:','function(gridSize)',arguments);var numberToPush=this.tiles.length-gridSize.y;for(var i=0;i<numberToPush;i++)
{var row=this.tiles.pop();this.shrinkArray(row);}
for(var i=0;i<gridSize.y;i++)
{this.shrinkArray(this.tiles[i],gridSize.x);}},clearOldTiles:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',135,'{this.shrinkArray(this.tiles[i],gridSize.x);}},clearOldTiles:','function()',arguments);this.tiles.flatten().invoke("clearOldImages");},updateTilesSet:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',136,'this.tiles.flatten().invoke("clearOldImages");},updateTilesSet:','function()',arguments);var gridSize=this.layerStatus.getGridSize();this.resetTileSet(gridSize);this.wrapTiles(this.layerStatus.refTileOffset.x,this.layerStatus.refTileOffset.y);var startPointX=this.layerStatus.refTile.x;var startPointY=this.layerStatus.refTile.y;var layerUrl=this.layerStatus.createLayerUrl();var arrTiles=[];for(var i=0;i<gridSize.y;i++)
{var y=(gridSize.y-(i+1))+startPointY;for(var j=0;j<gridSize.x;j++)
{var x=j+startPointX;var objTile=this.retrieveTile(i,j);objTile.setGridPosition(new Point(x,y));arrTiles.push(objTile);}}
if(this.layerStatus.mapStatus.mapOptions.preTileUpdateFunction)
{var intSrid=this.layerStatus.getSrid();var intScale=this.layerStatus.getZoomLevel();var arrTilesDetails=[];for(var i=0;i<arrTiles.length;i++)
{var objTile=arrTiles[i];var objTileExtents=this.layerStatus.getTileExtents(objTile,intScale);var strImageUrl=objTile.getImageUrl(layerUrl);if((strImageUrl.indexOf('getTile')>-1)&&(strImageUrl.indexOf('layerCache')>-1))
{var objParams={intX:objTile.gridPosition.x,intY:objTile.gridPosition.y,intSrid:intSrid,intScale:intScale,arrTileExtents:Object.toJSON(objTileExtents)};arrTilesDetails.push(objParams);}}
this.layerStatus.mapStatus.mapOptions.preTileUpdateFunction(arrTilesDetails);}
for(var i=0;i<arrTiles.length;i++)
{var objTile=arrTiles[i];objTile.updateTile(layerUrl);}},retrieveTile:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',146,'{var objTile=arrTiles[i];objTile.updateTile(layerUrl);}},retrieveTile:','function(x,y)',arguments);this.tiles[x]=this.tiles[x]||[];if(this.tiles[x][y])
{return this.tiles[x][y];}
else
{this.tiles[x][y]=new Tile(this.layerStatus,this.layerDiv,this);return this.tiles[x][y];}},getEnclosingTileGridPositionsFromPoint:function(objPoint,fltBuffer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',150,'{this.tiles[x][y]=new Tile(this.layerStatus,this.layerDiv,this);return this.tiles[x][y];}},getEnclosingTileGridPositionsFromPoint:','function(objPoint,fltBuffer)',arguments);var fltBuffer=(typeof(fltBuffer)!='undefined')?fltBuffer:0;var arrTiles=[];var objGridSize=this.layerStatus.getGridSize();for(var intX=0;intX<objGridSize.y;intX++)
{for(var intY=0;intY<objGridSize.x;intY++)
{var objTile=this.retrieveTile(intX,intY);if(objTile.checkPointIsWithinTileExtents(objPoint,fltBuffer)===true)
{arrTiles.push({intX:objTile.gridPosition.x,intY:objTile.gridPosition.y});}}}
return arrTiles;},moveLayer:function(layerOffset)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',155,'return arrTiles;},moveLayer:','function(layerOffset)',arguments);this.layerDiv.style.bottom=-layerOffset.y+'px';this.layerDiv.style.left=layerOffset.x+'px';},getTilesProgress:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',156,'this.layerDiv.style.bottom=-layerOffset.y+\'px\';this.layerDiv.style.left=layerOffset.x+\'px\';},getTilesProgress:','function()',arguments);var gridSize=this.layerStatus.getGridSize();var results={};results.loaded=0;results.loading=0;var prog="";for(var i=0;i<gridSize.y;i++)
{if(this.tiles[i])
{for(var j=0;j<gridSize.x;j++)
{if(this.tiles[i][j])
{prog=this.tiles[i][j].getTileProgress();if(prog=="loaded")
{results.loaded++;}
else if(prog=="loading")
{results.loading++;}}}}}
return results;},incrementSubDomainCount:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',165,'return results;},incrementSubDomainCount:','function()',arguments);if(this.intCurrentSubDomainCount<this.intMaxSubDomainCount)
{this.intCurrentSubDomainCount++;}
else
{this.intCurrentSubDomainCount=1;}}};var LayerStatus=Class.create();LayerStatus.prototype={urlVariables:null,tileVariables:null,layerURL:null,tileUrl:null,tiles:null,layerDiv:null,opacity:null,layerWrapperDiv:null,mapStatus:null,stackId:null,refTile:null,refPoint:null,rotationOffset:null,refTileOffset:null,SRID:null,gridSize:null,layerOffset:null,initialize:function(mapStatus,stackId,layer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',169,'{this.intCurrentSubDomainCount=1;}}};var LayerStatus=Class.create();LayerStatus.prototype={urlVariables:null,tileVariables:null,layerURL:null,tileUrl:null,tiles:null,layerDiv:null,opacity:null,layerWrapperDiv:null,mapStatus:null,stackId:null,refTile:null,refPoint:null,rotationOffset:null,refTileOffset:null,SRID:null,gridSize:null,layerOffset:null,initialize:','function(mapStatus,stackId,layer)',arguments);this.mapStatus=mapStatus;this.layer=layer;this.urlVariables=$H();this.gridSize=new Point();this.setLayerOffset();this.setStackId(stackId||null);this.mapStatus.addLayer(this);this.setInitialValues();this.resetLayer();},getState:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',170,'this.mapStatus=mapStatus;this.layer=layer;this.urlVariables=$H();this.gridSize=new Point();this.setLayerOffset();this.setStackId(stackId||null);this.mapStatus.addLayer(this);this.setInitialValues();this.resetLayer();},getState:','function()',arguments);var state={};state.opacity=this.getOpacity();state.stackId=this.getStackId();state.mapId=this.getMapId();return state;},setState:function(state)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',171,'var state={};state.opacity=this.getOpacity();state.stackId=this.getStackId();state.mapId=this.getMapId();return state;},setState:','function(state)',arguments);this.setOpacity(state.opacity);this.setStackId(state.stackId);this.setMapId(state.mapId);return this;},setInitialValues:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',172,'this.setOpacity(state.opacity);this.setStackId(state.stackId);this.setMapId(state.mapId);return this;},setInitialValues:','function()',arguments);this.opacity=1;this.resetLayerMovement();this.setDefaultURLVariable();},setDefaultURLVariable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',173,'this.opacity=1;this.resetLayerMovement();this.setDefaultURLVariable();},setDefaultURLVariable:','function()',arguments);this.setURLVariable("[mapId]",[this,"getMapId"]);this.setURLVariable("[sessionId]",[this,"getSessionId"]);this.setURLVariable("[strMapCacheSymlinkName]",[this,"getMapCacheSymlinkName"]);this.setURLVariable("[getMapCacheUrl]",[this,"getMapCacheUrl"]);this.setURLVariable("[getLayerServerUrl]",[this,"getLayerServerUrl"]);this.setURLVariable("[srid]",[this,"getSrid"]);this.setURLVariable("[getZoomLevel]",[this,"getZoomLevel"]);this.setURLVariable("[getPlaylistMode]",[this,"getPlaylistMode"]);this.setURLVariable("[getPlaylistViewId]",[this,"getPlaylistViewId"]);this.setURLVariable("[module]",[this,"getModule"]);this.setURLVariable("[bandwidthMode]",[this,"getBandwidthMode"]);this.setURLVariable("[intThresholdZoomLevelToggle]",[this,"getThresholdZoomLevelToggle"]);this.setURLVariable("[intUpperThresholdCompression]",[this,"getUpperThresholdCompression"]);this.setURLVariable("[intLowerThresholdCompression]",[this,"getLowerThresholdCompression"]);},getTileErrorUrl:function(nameOfTile)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',174,'this.setURLVariable("[mapId]",[this,"getMapId"]);this.setURLVariable("[sessionId]",[this,"getSessionId"]);this.setURLVariable("[strMapCacheSymlinkName]",[this,"getMapCacheSymlinkName"]);this.setURLVariable("[getMapCacheUrl]",[this,"getMapCacheUrl"]);this.setURLVariable("[getLayerServerUrl]",[this,"getLayerServerUrl"]);this.setURLVariable("[srid]",[this,"getSrid"]);this.setURLVariable("[getZoomLevel]",[this,"getZoomLevel"]);this.setURLVariable("[getPlaylistMode]",[this,"getPlaylistMode"]);this.setURLVariable("[getPlaylistViewId]",[this,"getPlaylistViewId"]);this.setURLVariable("[module]",[this,"getModule"]);this.setURLVariable("[bandwidthMode]",[this,"getBandwidthMode"]);this.setURLVariable("[intThresholdZoomLevelToggle]",[this,"getThresholdZoomLevelToggle"]);this.setURLVariable("[intUpperThresholdCompression]",[this,"getUpperThresholdCompression"]);this.setURLVariable("[intLowerThresholdCompression]",[this,"getLowerThresholdCompression"]);},getTileErrorUrl:','function(nameOfTile)',arguments);return this.getMapCacheUrl()+this.layer[nameOfTile];},mustFilter:function(nameOfTile)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',175,'return this.getMapCacheUrl()+this.layer[nameOfTile];},mustFilter:','function(nameOfTile)',arguments);return(Utility.getIEversion()==6)&&this.layer.getIEFilter();},getImageBufferAmount:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',176,'return(Utility.getIEversion()==6)&&this.layer.getIEFilter();},getImageBufferAmount:','function()',arguments);return this.layer.imageBufferAmount;},getMapCacheUrl:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',177,'return this.layer.imageBufferAmount;},getMapCacheUrl:','function()',arguments);return this.mapStatus.getMapCacheUrl();},getLayerServerUrl:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',178,'return this.mapStatus.getMapCacheUrl();},getLayerServerUrl:','function()',arguments);return this.mapStatus.getLayerServerUrl();},getEnabledTileSubdomains:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',179,'return this.mapStatus.getLayerServerUrl();},getEnabledTileSubdomains:','function()',arguments);return this.mapStatus.mapOptions.blnEnableTileSubdomains;},getSessionId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',180,'return this.mapStatus.mapOptions.blnEnableTileSubdomains;},getSessionId:','function()',arguments);return this.mapStatus.getSessionId();},getMapCacheSymlinkName:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',181,'return this.mapStatus.getSessionId();},getMapCacheSymlinkName:','function()',arguments);return this.mapStatus.getMapCacheSymlinkName();},setURLVariable:function(pattern,value)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',182,'return this.mapStatus.getMapCacheSymlinkName();},setURLVariable:','function(pattern,value)',arguments);this.urlVariables[pattern]=value;},removeURLVariable:function(pattern)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',183,'this.urlVariables[pattern]=value;},removeURLVariable:','function(pattern)',arguments);this.urlVariables.remove(pattern);},getTemplateLayerUrl:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',184,'this.urlVariables.remove(pattern);},getTemplateLayerUrl:','function()',arguments);return this.layer.templateLayerUrl;},getNoCacheTemplateLayerUrl:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',185,'return this.layer.templateLayerUrl;},getNoCacheTemplateLayerUrl:','function()',arguments);return this.layer.templateNoCacheLayerUrl;},getTemplateTileUrl:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',186,'return this.layer.templateNoCacheLayerUrl;},getTemplateTileUrl:','function()',arguments);return this.layer.templateTileUrl;},getLayerType:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',187,'return this.layer.templateTileUrl;},getLayerType:','function()',arguments);return this.layer.type;},createLayerUrl:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',188,'return this.layer.type;},createLayerUrl:','function()',arguments);if(this.getOpacity()>0.1)
{var strTemplateURL=(this.mapStatus.getNoCacheMode())?this.getNoCacheTemplateLayerUrl():this.getTemplateLayerUrl();var strFinalURL=Utility.replaceURLVariables(strTemplateURL,this.urlVariables);return strFinalURL;}
else
{return"clearTile";}},getLayerNodes:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',192,'{return"clearTile";}},getLayerNodes:','function()',arguments);return this.layer.getNodeLayers();},getLayerTiles:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',193,'return this.layer.getNodeLayers();},getLayerTiles:','function()',arguments);return this.layer.tiles;},updateLayer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',194,'return this.layer.tiles;},updateLayer:','function()',arguments);this.updateDimensions();this.setMapStack();this.updateGridSize();this.setMapId();this.moveLayerOffset();this.moveLayer();this.layer.updateTilesSet();},clearOldTiles:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',195,'this.updateDimensions();this.setMapStack();this.updateGridSize();this.setMapId();this.moveLayerOffset();this.moveLayer();this.layer.updateTilesSet();},clearOldTiles:','function()',arguments);this.layer.clearOldTiles();},moveLayer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',196,'this.layer.clearOldTiles();},moveLayer:','function()',arguments);this.layer.moveLayer(this.getLayerOffset());},setLayerOffset:function(offsetOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',197,'this.layer.moveLayer(this.getLayerOffset());},setLayerOffset:','function(offsetOptions)',arguments);this.offsetOptions={"width":0,"height":0};Object.extend(this.offsetOptions,offsetOptions||{});},getLayerOffset:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',198,'this.offsetOptions={"width":0,"height":0};Object.extend(this.offsetOptions,offsetOptions||{});},getLayerOffset:','function()',arguments);var mapOffset=this.mapStatus.getLayerOffset();switch(typeof this.offsetOptions.width)
{case"object":var width=this.offsetOptions.width.getDimensions().width;break;case"string":var width=this.getDimensions().width;break;case"number":var width=this.offsetOptions.width;break;default:var width=0;}
switch(typeof this.offsetOptions.height)
{case"object":var height=this.offsetOptions.height.getDimensions().height;break;case"number":var height=this.offsetOptions.height;break;case"string":var height=this.getDimensions().height;break;default:var height=0;}
return new Point(mapOffset.x-width,mapOffset.y-height);},setStackId:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',203,'return new Point(mapOffset.x-width,mapOffset.y-height);},setStackId:','function(id)',arguments);this.stackId=this.mapStatus.getStackIdFromId(id);this.setMapStack();this.setMapId();},setMapStack:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',204,'this.stackId=this.mapStatus.getStackIdFromId(id);this.setMapStack();this.setMapId();},setMapStack:','function()',arguments);this.mapStack=this.mapStatus.getMapStack(this.stackId);},_getMapId:function(zoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',205,'this.mapStack=this.mapStatus.getMapStack(this.stackId);},_getMapId:','function(zoomLevel)',arguments);return this.mapStack.getMapId(zoomLevel,this.getCenterPointBuffer());;},getCenterPointBuffer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',206,'return this.mapStack.getMapId(zoomLevel,this.getCenterPointBuffer());;},getCenterPointBuffer:','function()',arguments);return this.mapStatus.getCenterPointBuffer();},setMapId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',207,'return this.mapStatus.getCenterPointBuffer();},setMapId:','function()',arguments);this.mapId=this._getMapId(this.getZoomAmount());switch(this.mapStatus.mapOptions.strBehaviourMode)
{case'':case'standard':switch(parseInt(this.mapId))
{case 52293:this.mapStatus.mapOptions.scalesArray=this.mapStatus.mapOptions.scalesArray_WorldAtlas;break;default:this.mapStatus.mapOptions.scalesArray=this.mapStatus.mapOptions.scalesArray_NonWorldAtlas;break;}
break;case'hereIsOurSchool_Embed':case'hereIsOurSchool_External':this.mapStatus.mapOptions.scalesArray=this.mapStatus.mapOptions.scalesArray_HereIsOurSchool;break;}
this.setMapDetails();this.setMaximumExtents();},setMapDetails:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',212,'this.setMapDetails();this.setMaximumExtents();},setMapDetails:','function()',arguments);this.mapDetails=this.mapStatus.getMapDetails(this.mapId);},getStackId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',213,'this.mapDetails=this.mapStatus.getMapDetails(this.mapId);},getStackId:','function()',arguments);return this.stackId;},getMapId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',214,'return this.stackId;},getMapId:','function()',arguments);return this.mapId;},getMapStackName:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',215,'return this.mapId;},getMapStackName:','function()',arguments);return this.mapStack.getName();},getMapStackMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',216,'return this.mapStack.getName();},getMapStackMode:','function()',arguments);return this.mapStack.getMode();},getSrid:function(zoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',217,'return this.mapStack.getMode();},getSrid:','function(zoomLevel)',arguments);if(typeof zoomLevel=="number")
{var mapId=this._getMapId(zoomLevel);return this.mapStatus.getMapDetails(mapId).srid;}
else
{return this.mapDetails.srid;}},getMapName:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',221,'{return this.mapDetails.srid;}},getMapName:','function()',arguments);return this.mapDetails.name;},jumpToExt:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',222,'return this.mapDetails.name;},jumpToExt:','function()',arguments);this.mapStatus.jumpToExt(this.getStackId());},shiftOpacity:function(offsetOpacity)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',223,'this.mapStatus.jumpToExt(this.getStackId());},shiftOpacity:','function(offsetOpacity)',arguments);var opacity=offsetOpacity+this.getOpacity();this.setOpacity(opacity);},setOpacity:function(opacity)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',224,'var opacity=offsetOpacity+this.getOpacity();this.setOpacity(opacity);},setOpacity:','function(opacity)',arguments);this.opacity=opacity;this.setLayersToBeUpdated();},refreshOpacity:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',225,'this.opacity=opacity;this.setLayersToBeUpdated();},refreshOpacity:','function()',arguments);this.opacity=this.opacity;this.setLayersToBeUpdated();},setLayersToBeUpdated:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',226,'this.opacity=this.opacity;this.setLayersToBeUpdated();},setLayersToBeUpdated:','function()',arguments);this.mapStatus.setLayersToBeUpdated();},getOpacity:function(opacity)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',227,'this.mapStatus.setLayersToBeUpdated();},getOpacity:','function(opacity)',arguments);return this.opacity;},getZoomLevel:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',228,'return this.opacity;},getZoomLevel:','function()',arguments);return this.mapStatus.getZoomLevel(this.getZoomAmount());},getZoomAmount:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',229,'return this.mapStatus.getZoomLevel(this.getZoomAmount());},getZoomAmount:','function()',arguments);return this.mapStatus.getZoomAmount();},getTileSize:function(tile,zoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',230,'return this.mapStatus.getZoomAmount();},getTileSize:','function(tile,zoomLevel)',arguments);var dim=this.mapStatus.getScreenDimensions();var tileDim=this.getTileDimensions();var srid=this.getSrid();var ext=this.mapStatus.getInitialScreenExtents(tileDim,dim,srid);var w=this.mapStatus.getGeographicWidth(zoomLevel,tileDim,srid);var tileExt=Geocode.getExtentsFromTileNumber(tile,w);var pointTL=Geocode.convertWorldToScreen({x:tileExt["TLX"],y:tileExt["TLY"]},ext,dim);var pointBR=Geocode.convertWorldToScreen({x:tileExt["BRX"],y:tileExt["BRY"]},ext,dim);var x=pointBR.x-pointTL.x;var y=pointTL.y-pointBR.y;return new Point(x,y);},getTileExtents:function(tile,zoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',231,'var dim=this.mapStatus.getScreenDimensions();var tileDim=this.getTileDimensions();var srid=this.getSrid();var ext=this.mapStatus.getInitialScreenExtents(tileDim,dim,srid);var w=this.mapStatus.getGeographicWidth(zoomLevel,tileDim,srid);var tileExt=Geocode.getExtentsFromTileNumber(tile,w);var pointTL=Geocode.convertWorldToScreen({x:tileExt["TLX"],y:tileExt["TLY"]},ext,dim);var pointBR=Geocode.convertWorldToScreen({x:tileExt["BRX"],y:tileExt["BRY"]},ext,dim);var x=pointBR.x-pointTL.x;var y=pointTL.y-pointBR.y;return new Point(x,y);},getTileExtents:','function(tile,zoomLevel)',arguments);var dim=this.mapStatus.getScreenDimensions();var tileDim=this.getTileDimensions();var srid=this.getSrid();var w=this.mapStatus.getGeographicWidth(zoomLevel,tileDim,srid);var tileExt=Geocode.getExtentsFromTileNumber({x:tile.tileVariables["[x]"],y:tile.tileVariables["[y]"]},w);return tileExt;},getMaximumExtentsCorners:function(objExtentsLimit,zoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',232,'var dim=this.mapStatus.getScreenDimensions();var tileDim=this.getTileDimensions();var srid=this.getSrid();var w=this.mapStatus.getGeographicWidth(zoomLevel,tileDim,srid);var tileExt=Geocode.getExtentsFromTileNumber({x:tile.tileVariables["[x]"],y:tile.tileVariables["[y]"]},w);return tileExt;},getMaximumExtentsCorners:','function(objExtentsLimit,zoomLevel)',arguments);var tileDim=this.getTileDimensions();var srid=this.getSrid();var w=this.mapStatus.getGeographicWidth(zoomLevel,tileDim,srid);var intHalfGeographicWidth=w/2;var objExtentCorners={TLX:objExtentsLimit["intMinX"],TLY:objExtentsLimit["intMinY"]-intHalfGeographicWidth,BRX:objExtentsLimit["intMaxX"],BRY:objExtentsLimit["intMaxY"]+intHalfGeographicWidth}
return objExtentCorners;},getTilePoint:function(tile,zoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',234,'return objExtentCorners;},getTilePoint:','function(tile,zoomLevel)',arguments);var tileDim=this.getTileDimensions();var dim=this.mapStatus.getScreenDimensions();var srid=this.getSrid();var ext=this.mapStatus.getInitialScreenExtents(tileDim,dim,srid);var w=this.mapStatus.getGeographicWidth(zoomLevel,tileDim,srid);var tileExt=Geocode.getExtentsFromTileNumber(tile,w);var mapPoint={x:tileExt["TLX"],y:tileExt["BRY"]};var point=Geocode.convertWorldToScreen(mapPoint,ext,dim);var onMap=this.areExtOnMap(tileExt);return{onMap:onMap,point:point}},setMaximumExtents:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',235,'var tileDim=this.getTileDimensions();var dim=this.mapStatus.getScreenDimensions();var srid=this.getSrid();var ext=this.mapStatus.getInitialScreenExtents(tileDim,dim,srid);var w=this.mapStatus.getGeographicWidth(zoomLevel,tileDim,srid);var tileExt=Geocode.getExtentsFromTileNumber(tile,w);var mapPoint={x:tileExt["TLX"],y:tileExt["BRY"]};var point=Geocode.convertWorldToScreen(mapPoint,ext,dim);var onMap=this.areExtOnMap(tileExt);return{onMap:onMap,point:point}},setMaximumExtents:','function()',arguments);this.maxExt=this.mapStatus.getMaximumExtents(this.getMapId());},areExtOnMap:function(tileExt)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',236,'this.maxExt=this.mapStatus.getMaximumExtents(this.getMapId());},areExtOnMap:','function(tileExt)',arguments);return tileExt.BRX>=this.maxExt.ext.TLX&&tileExt.TLX<=this.maxExt.ext.BRX&&tileExt.BRY<=this.maxExt.ext.TLY&&tileExt.TLY>=this.maxExt.ext.BRY;},isPointOnMap:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',237,'return tileExt.BRX>=this.maxExt.ext.TLX&&tileExt.TLX<=this.maxExt.ext.BRX&&tileExt.BRY<=this.maxExt.ext.TLY&&tileExt.TLY>=this.maxExt.ext.BRY;},isPointOnMap:','function(point)',arguments);return(point.x>=this.maxExt.ext.TLX&&point.x<=this.maxExt.ext.BRX)&&(point.y<=this.maxExt.ext.TLY&&point.y>=this.maxExt.ext.BRY);},getGridSize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',238,'return(point.x>=this.maxExt.ext.TLX&&point.x<=this.maxExt.ext.BRX)&&(point.y<=this.maxExt.ext.TLY&&point.y>=this.maxExt.ext.BRY);},getGridSize:','function()',arguments);return this.gridSize;},updateGridSize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',239,'return this.gridSize;},updateGridSize:','function()',arguments);var wrapperDim=this.getDimensions();var x=Math.ceil((wrapperDim.width)/this.layer.tileWidth)+1;var y=Math.ceil((wrapperDim.height)/this.layer.tileHeight)+1;this.gridSize=new Point(x,y);},getDimensions:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',240,'var wrapperDim=this.getDimensions();var x=Math.ceil((wrapperDim.width)/this.layer.tileWidth)+1;var y=Math.ceil((wrapperDim.height)/this.layer.tileHeight)+1;this.gridSize=new Point(x,y);},getDimensions:','function()',arguments);return this.dimensions||this.updateDimensions();},updateDimensions:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',241,'return this.dimensions||this.updateDimensions();},updateDimensions:','function()',arguments);return this.dimensions=this.layer.getWrapperDimensions();},getTileDimensions:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',242,'return this.dimensions=this.layer.getWrapperDimensions();},getTileDimensions:','function()',arguments);return new Point(this.layer.tileWidth,this.layer.tileHeight);},setLayout:function(layout)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',243,'return new Point(this.layer.tileWidth,this.layer.tileHeight);},setLayout:','function(layout)',arguments);this.layer.setStyle(layout.style);this.setLayerOffset(layout.offset)},getTileProgress:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',244,'this.layer.setStyle(layout.style);this.setLayerOffset(layout.offset)},getTileProgress:','function()',arguments);return this.layer.getTilesProgress();},resetLayer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',245,'return this.layer.getTilesProgress();},resetLayer:','function()',arguments);this.setRefTilefromRefPoint();this.resetLayerMovement();},getReferencePoint:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',246,'this.setRefTilefromRefPoint();this.resetLayerMovement();},getReferencePoint:','function()',arguments);return this.mapStatus.getReferencePoint(this.mapStatus.getSrid(this.stackId));},setRefTilefromRefPoint:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',247,'return this.mapStatus.getReferencePoint(this.mapStatus.getSrid(this.stackId));},setRefTilefromRefPoint:','function()',arguments);this.refTile=Geocode.getEnlosingTile(this.getReferencePoint(),this.getGeoWidth());},getGeoWidth:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',248,'this.refTile=Geocode.getEnlosingTile(this.getReferencePoint(),this.getGeoWidth());},getGeoWidth:','function()',arguments);return this.mapStatus.getGeographicWidth(this.getZoomLevel(),this.getTileDimensions(),this.mapStatus.getSrid(this.stackId));},getScreenExt:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',249,'return this.mapStatus.getGeographicWidth(this.getZoomLevel(),this.getTileDimensions(),this.mapStatus.getSrid(this.stackId));},getScreenExt:','function()',arguments);var layerDim=this.getDimensions();var relativeBLPoint=this.getRelativePoint(new Point(0,0));var tileDim=this.getTileDimensions();var srid=this.getSrid();var screenExt={TLX:0,TLY:layerDim.height,BRX:layerDim.width,BRY:0};var refPoint=this.mapStatus.getPointOnMap(relativeBLPoint,tileDim,srid);return this.mapStatus.getExtentsFromRef(tileDim,screenExt,refPoint,srid);},getRelativePoint:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',250,'var layerDim=this.getDimensions();var relativeBLPoint=this.getRelativePoint(new Point(0,0));var tileDim=this.getTileDimensions();var srid=this.getSrid();var screenExt={TLX:0,TLY:layerDim.height,BRX:layerDim.width,BRY:0};var refPoint=this.mapStatus.getPointOnMap(relativeBLPoint,tileDim,srid);return this.mapStatus.getExtentsFromRef(tileDim,screenExt,refPoint,srid);},getRelativePoint:','function(point)',arguments);var layerOffset=this.getLayerOffset();var x=point.x-layerOffset.x;var y=point.y+layerOffset.y;return new Point(x,y);},getTopRightTileExt:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',251,'var layerOffset=this.getLayerOffset();var x=point.x-layerOffset.x;var y=point.y+layerOffset.y;return new Point(x,y);},getTopRightTileExt:','function()',arguments);var gridSize=this.getGridSize();var yRef=this.refTile.y+gridSize.y-1;var xRef=this.refTile.x+gridSize.x-1;return Geocode.getExtentsFromTileNumber(new Point(xRef,yRef),this.getGeoWidth())},getBottomLeftTileExt:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',252,'var gridSize=this.getGridSize();var yRef=this.refTile.y+gridSize.y-1;var xRef=this.refTile.x+gridSize.x-1;return Geocode.getExtentsFromTileNumber(new Point(xRef,yRef),this.getGeoWidth())},getBottomLeftTileExt:','function()',arguments);return Geocode.getExtentsFromTileNumber(this.refTile,this.getGeoWidth())},resetLayerMovement:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',253,'return Geocode.getExtentsFromTileNumber(this.refTile,this.getGeoWidth())},resetLayerMovement:','function()',arguments);this.rotationOffset=new Point();this.refTileOffset=new Point();},getMaxError:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',254,'this.rotationOffset=new Point();this.refTileOffset=new Point();},getMaxError:','function()',arguments);return this.layer.maxError;},moveLayerOffset:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',255,'return this.layer.maxError;},moveLayerOffset:','function()',arguments);var topRightTileExt=this.getTopRightTileExt();var bottomLeftTileExt=this.getBottomLeftTileExt();var screenExt=this.getScreenExt();var tileGeoDim=Utility.extToGeoDim(topRightTileExt);var screenGeoDim=Utility.extToGeoDim(screenExt);var wrapAmount=new Point();if(screenExt.TLY>topRightTileExt.TLY)
{var diff=topRightTileExt.TLY-screenExt.TLY;wrapAmount.y=Math.floor(diff/tileGeoDim.y);}
else if(screenExt.BRY<bottomLeftTileExt.BRY)
{var diff=bottomLeftTileExt.BRY-screenExt.BRY;wrapAmount.y=Math.ceil(diff/tileGeoDim.y);}
if(screenExt.TLX<bottomLeftTileExt.TLX)
{var diff=bottomLeftTileExt.TLX-screenExt.TLX;wrapAmount.x=Math.ceil(diff/tileGeoDim.x);}
else if(screenExt.BRX>topRightTileExt.BRX)
{var diff=topRightTileExt.BRX-screenExt.BRX;wrapAmount.x=Math.floor(diff/tileGeoDim.x);}
this.refTileOffset=wrapAmount;this.refTile.x-=wrapAmount.x;this.refTile.y-=wrapAmount.y;},getModule:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',264,'this.refTileOffset=wrapAmount;this.refTile.x-=wrapAmount.x;this.refTile.y-=wrapAmount.y;},getModule:','function()',arguments);return this.mapStatus.mapOptions.module;},getBandwidthMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',265,'return this.mapStatus.mapOptions.module;},getBandwidthMode:','function()',arguments);return this.mapStatus.mapOptions.strBandwidthMode;},getThresholdZoomLevelToggle:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',266,'return this.mapStatus.mapOptions.strBandwidthMode;},getThresholdZoomLevelToggle:','function()',arguments);var objNoCacheOptions=this.mapStatus.getNoCacheModeOptions();return objNoCacheOptions['intThresholdZoomLevelToggle'];},getUpperThresholdCompression:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',267,'var objNoCacheOptions=this.mapStatus.getNoCacheModeOptions();return objNoCacheOptions[\'intThresholdZoomLevelToggle\'];},getUpperThresholdCompression:','function()',arguments);var objNoCacheOptions=this.mapStatus.getNoCacheModeOptions();return objNoCacheOptions['intUpperThresholdCompression'];},getLowerThresholdCompression:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',268,'var objNoCacheOptions=this.mapStatus.getNoCacheModeOptions();return objNoCacheOptions[\'intUpperThresholdCompression\'];},getLowerThresholdCompression:','function()',arguments);var objNoCacheOptions=this.mapStatus.getNoCacheModeOptions();return objNoCacheOptions['intLowerThresholdCompression'];},getPlaylistMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',269,'var objNoCacheOptions=this.mapStatus.getNoCacheModeOptions();return objNoCacheOptions[\'intLowerThresholdCompression\'];},getPlaylistMode:','function()',arguments);return this.mapStatus.getPlaylistMode().toString();},getPlaylistViewId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',270,'return this.mapStatus.getPlaylistMode().toString();},getPlaylistViewId:','function()',arguments);var intPlaylistViewId=this.mapStatus.getPlaylistViewId();if(intPlaylistViewId==null)
{return'null';}
else
{return intPlaylistViewId;}}}
var Tile=Class.create();Tile.prototype={layerURL:null,tileID:null,gridPosition:null,positionUpdated:false,opacity:1,tileVariables:null,layerStatus:null,parentDiv:null,imagesArray:null,imagePointer:0,progress:"loading",parentLayerObj:null,initialize:function(layerStatus,parentDiv,parentObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',275,'var Tile=Class.create();Tile.prototype={layerURL:null,tileID:null,gridPosition:null,positionUpdated:false,opacity:1,tileVariables:null,layerStatus:null,parentDiv:null,imagesArray:null,imagePointer:0,progress:"loading",parentLayerObj:null,initialize:','function(layerStatus,parentDiv,parentObj)',arguments);this.layerStatus=layerStatus;this.gridPosition=null;this.tileID=Utility.getRandomId(100,5);this.tileVariables=$H();this.imagesArray=new Array();this.loadImages();if(blnUseJQuery===true)
{$j(document).data('ezmaps_tile_'+this.tileID,parentDiv);}
else
{this.parentDiv=parentDiv;}
this.parentLayerObj=parentObj;},returnContainerElement:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',280,'this.parentLayerObj=parentObj;},returnContainerElement:','function()',arguments);if(blnUseJQuery===true)
{return $j(document).data('ezmaps_tile_'+this.tileID);}
else
{return this.parentDiv;}},getTileProgress:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',284,'{return this.parentDiv;}},getTileProgress:','function()',arguments);return this.progress;},nihilate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',285,'return this.progress;},nihilate:','function()',arguments);this.imagesArray.invoke("uninitialize");this.layerStatus=null;this.parentDiv=null;this.gridPosition=null;this.tileID=null;this.tileVariables=null;this.imagesArray=null;this.imagePointer=null;this.opacity=null;},setGridPosition:function(gridPosition)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',286,'this.imagesArray.invoke("uninitialize");this.layerStatus=null;this.parentDiv=null;this.gridPosition=null;this.tileID=null;this.tileVariables=null;this.imagesArray=null;this.imagePointer=null;this.opacity=null;},setGridPosition:','function(gridPosition)',arguments);if(this.gridPosition)
{if(this.gridPosition.x==gridPosition.x&&this.gridPosition.y==gridPosition.y)
{this.positionUpdated=false;}
else
{this.positionUpdated=true;}}
else
{this.positionUpdated=true;}
this.gridPosition=gridPosition;this.tileVariables["[x]"]=this.gridPosition.x;this.tileVariables["[y]"]=this.gridPosition.y;this.tileVariables["[getPlaylistMode]"]=[this.layerStatus,"getPlaylistMode"];this.tileVariables["[getPlaylistViewId]"]=[this.layerStatus,"getPlaylistViewId"];this.tileVariables["[module]"]=[this.layerStatus,"getModule"];this.tileVariables["[bandwidthMode]"]=[this.layerStatus,"getBandwidthMode"];this.tileVariables["[intThresholdZoomLevelToggle]"]=[this.layerStatus,"getThresholdZoomLevelToggle"];this.tileVariables["[intUpperThresholdCompression]"]=[this.layerStatus,"getUpperThresholdCompression"];this.tileVariables["[intLowerThresholdCompression]"]=[this.layerStatus,"getLowerThresholdCompression"];},setOpacity:function(op)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',294,'this.gridPosition=gridPosition;this.tileVariables["[x]"]=this.gridPosition.x;this.tileVariables["[y]"]=this.gridPosition.y;this.tileVariables["[getPlaylistMode]"]=[this.layerStatus,"getPlaylistMode"];this.tileVariables["[getPlaylistViewId]"]=[this.layerStatus,"getPlaylistViewId"];this.tileVariables["[module]"]=[this.layerStatus,"getModule"];this.tileVariables["[bandwidthMode]"]=[this.layerStatus,"getBandwidthMode"];this.tileVariables["[intThresholdZoomLevelToggle]"]=[this.layerStatus,"getThresholdZoomLevelToggle"];this.tileVariables["[intUpperThresholdCompression]"]=[this.layerStatus,"getUpperThresholdCompression"];this.tileVariables["[intLowerThresholdCompression]"]=[this.layerStatus,"getLowerThresholdCompression"];},setOpacity:','function(op)',arguments);if(this.opacity!=op)
{this.opacity=op;var len=this.imagesArray.length;}
this.imagesArray.invoke("setOpacity",this.opacity);},getImageUrl:function(strLayerUrl)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',297,'this.imagesArray.invoke("setOpacity",this.opacity);},getImageUrl:','function(strLayerUrl)',arguments);var s=Utility.replaceURLVariables(this.layerStatus.getTemplateTileUrl(),this.tileVariables);var strImageUrl=strLayerUrl+s;return strImageUrl;},updateTile:function(layerUrl,blnBeyondExtentsLimit)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',298,'var s=Utility.replaceURLVariables(this.layerStatus.getTemplateTileUrl(),this.tileVariables);var strImageUrl=strLayerUrl+s;return strImageUrl;},updateTile:','function(layerUrl,blnBeyondExtentsLimit)',arguments);this.updateImagesOpacityOnly();if(layerUrl==this.layerUrl&&this.positionUpdated===false)
{return;}
var blnBeyondExtentsLimit=(typeof(blnBeyondExtentsLimit)!="undefined")?blnBeyondExtentsLimit:false;this.layerUrl=layerUrl;var imageURL=this.getImageUrl(layerUrl);this.progress="loading";var blnBeyondExtentsLimit=false;if(this.layerStatus.mapStatus.mapOptions.blnLimitExtents)
{var intZoom=this.layerStatus.getZoomLevel();var objTileExtents=this.layerStatus.getTileExtents(this,intZoom);var objExtentsLimit=this.layerStatus.mapStatus.mapOptions.objExtentsLimit;var objExtentsLimitCorners=this.layerStatus.getMaximumExtentsCorners(objExtentsLimit,intZoom);if(!this.checkPointIsWithinExtents(objExtentsLimitCorners,{x:objTileExtents['TLX'],y:objTileExtents['TLY']})&&!this.checkPointIsWithinExtents(objExtentsLimitCorners,{x:objTileExtents['BRX'],y:objTileExtents['BRY']}))
{var blnBeyondExtentsLimit=true;}
else
{}}
if(blnBeyondExtentsLimit)
{}
this.loadImage(imageURL);this.updateImages();},checkPointIsWithinExtents:function(extents,point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',308,'this.loadImage(imageURL);this.updateImages();},checkPointIsWithinExtents:','function(extents,point)',arguments);blnIsInExtents=false;if(point.x>=extents["TLX"]&&point.x<=extents["BRX"]&&point.y<=extents["TLY"]&&point.y>=extents["BRY"])
{blnIsInExtents=true;}
return blnIsInExtents;},checkPointIsWithinTileExtents:function(objPoint,fltBuffer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',311,'return blnIsInExtents;},checkPointIsWithinTileExtents:','function(objPoint,fltBuffer)',arguments);var fltBuffer=(typeof(fltBuffer)!='undefined')?fltBuffer:0;var intZoom=this.layerStatus.getZoomLevel();var objTileExtents=this.layerStatus.getTileExtents(this,intZoom);if((objPoint.x>=objTileExtents['TLX']||objPoint.x+fltBuffer>=objTileExtents['TLX']||objPoint.x-fltBuffer>=objTileExtents['TLX'])&&(objPoint.x<=objTileExtents['BRX']||objPoint.x+fltBuffer<=objTileExtents['BRX']||objPoint.x-fltBuffer<=objTileExtents['BRX'])&&(objPoint.y<=objTileExtents['TLY']||objPoint.y+fltBuffer>=objTileExtents['TLY']||objPoint.y-fltBuffer>=objTileExtents['TLY'])&&(objPoint.y>=objTileExtents['BRY']||objPoint.y+fltBuffer>=objTileExtents['BRY']||objPoint.y-fltBuffer>=objTileExtents['BRY']))
{return true;}
else
{return false;}},updateImages:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',315,'{return false;}},updateImages:','function()',arguments);this.positionUpdated=false;this.imagesArray.invoke("update");},updateImagesOpacityOnly:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',316,'this.positionUpdated=false;this.imagesArray.invoke("update");},updateImagesOpacityOnly:','function()',arguments);this.imagesArray.invoke("updateOpacityOnly");},clearOldImages:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',317,'this.imagesArray.invoke("updateOpacityOnly");},clearOldImages:','function()',arguments);this.imagesArray.invoke("setInactive");},loadImage:function(imageURL)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',318,'this.imagesArray.invoke("setInactive");},loadImage:','function(imageURL)',arguments);var im=this.imagesArray[this.imagePointer];im.setActive();im.setZoomLevel();im.setGridPosition(this.gridPosition);im.setURL(imageURL);},loadImages:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',319,'var im=this.imagesArray[this.imagePointer];im.setActive();im.setZoomLevel();im.setGridPosition(this.gridPosition);im.setURL(imageURL);},loadImages:','function()',arguments);for(var i=0;i<this.layerStatus.getImageBufferAmount();i++)
{this.imagesArray[i]=new Img(this.layerStatus,this,this.onload.bind(this));}},onload:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',321,'{this.imagesArray[i]=new Img(this.layerStatus,this,this.onload.bind(this));}},onload:','function()',arguments);this.progress="loaded";this.imagePointer++;this.imagePointer=(this.imagePointer==this.imagesArray.length)?0:this.imagePointer;}};var MapEasingTool=Class.create();MapEasingTool.prototype={mapStatus:null,easingManager:null,initialize:function(mapStatus,options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',322,'this.progress="loaded";this.imagePointer++;this.imagePointer=(this.imagePointer==this.imagesArray.length)?0:this.imagePointer;}};var MapEasingTool=Class.create();MapEasingTool.prototype={mapStatus:null,easingManager:null,initialize:','function(mapStatus,options)',arguments);this.mapStatus=mapStatus;this.options={refreshRate:10,timeToRecenter:0.5};Object.extend(this.options,options||{});this.addEasingManager();},addEasingManager:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',323,'this.mapStatus=mapStatus;this.options={refreshRate:10,timeToRecenter:0.5};Object.extend(this.options,options||{});this.addEasingManager();},addEasingManager:','function()',arguments);var actionObject=new EasingManager.ActionObject({onEnterFrame:this.moveMap.bind(this),keys:["layerOffsetX","layerOffsetY"]});this.easingManager=new EasingManager({frameRate:this.options.refreshRate,timeToLive:this.options.timeToRecenter,actionObjects:[actionObject]});},clear:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',324,'var actionObject=new EasingManager.ActionObject({onEnterFrame:this.moveMap.bind(this),keys:["layerOffsetX","layerOffsetY"]});this.easingManager=new EasingManager({frameRate:this.options.refreshRate,timeToLive:this.options.timeToRecenter,actionObjects:[actionObject]});},clear:','function()',arguments);this.easingManager.clearEasingVariables();this.easingManager.stop();},easeToPoint:function(pointOnMap)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',325,'this.easingManager.clearEasingVariables();this.easingManager.stop();},easeToPoint:','function(pointOnMap)',arguments);var recenterPoint=(pointOnMap.srid=="Pixel")?pointOnMap:this.mapStatus.getScreenPointFromWorld(pointOnMap);var layerOffset=this.mapStatus.getLayerOffset();var layerOffsetNew=this.mapStatus.getLayerOffset(recenterPoint);this.clear();var totalLength=this.options.refreshRate*this.options.timeToRecenter-2;this.easingManager.addEasingVariable(new EasingManager.EasingVariable("layerOffsetX",{start:layerOffset.x,end:layerOffsetNew.x,totalLength:totalLength,easingType:"easeBoth"}));this.easingManager.addEasingVariable(new EasingManager.EasingVariable("layerOffsetY",{start:layerOffset.y,end:layerOffsetNew.y,totalLength:totalLength,easingType:"easeBoth"}));this.easingManager.start();},moveMap:function(layerOffsetX,layerOffsetY)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',326,'var recenterPoint=(pointOnMap.srid=="Pixel")?pointOnMap:this.mapStatus.getScreenPointFromWorld(pointOnMap);var layerOffset=this.mapStatus.getLayerOffset();var layerOffsetNew=this.mapStatus.getLayerOffset(recenterPoint);this.clear();var totalLength=this.options.refreshRate*this.options.timeToRecenter-2;this.easingManager.addEasingVariable(new EasingManager.EasingVariable("layerOffsetX",{start:layerOffset.x,end:layerOffsetNew.x,totalLength:totalLength,easingType:"easeBoth"}));this.easingManager.addEasingVariable(new EasingManager.EasingVariable("layerOffsetY",{start:layerOffset.y,end:layerOffsetNew.y,totalLength:totalLength,easingType:"easeBoth"}));this.easingManager.start();},moveMap:','function(layerOffsetX,layerOffsetY)',arguments);this.mapStatus.setLayerOffset(new Point(layerOffsetX,layerOffsetY));}}
var Easing=Class.create();if(!window.Easing){var Easing=new Object();}
Object.extend(Easing,{easeNone:function(t,b,c,d){return c*t/d+b;},easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeBoth:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}
return-c/2*((--t)*(t-2)-1)+b;},easeInStrong:function(t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutStrong:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeBothStrong:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b;}
return-c/2*((t-=2)*t*t*t-2)+b;},elasticIn:function(t,b,c,d,a,p){if(t==0){return b;}
if((t/=d)==1){return b+c;}
if(!p){p=d*.3;}
if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else{var s=p/(2*Math.PI)*Math.asin(c/a);}
return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasticOut:function(t,b,c,d,a,p){if(t==0){return b;}
if((t/=d)==1){return b+c;}
if(!p){p=d*.3;}
if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else{var s=p/(2*Math.PI)*Math.asin(c/a);}
return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},elasticBoth:function(t,b,c,d,a,p){if(t==0){return b;}
if((t/=d/2)==2){return b+c;}
if(!p){p=d*(.3*1.5);}
if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else{var s=p/(2*Math.PI)*Math.asin(c/a);}
if(t<1){return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}
return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},backIn:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
return c*(t/=d)*t*((s+1)*t-s)+b;},backOut:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backBoth:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;}
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},bounceIn:function(t,b,c,d){return c-YAHOO.util.Easing.bounceOut(d-t,0,c,d)+b;},bounceOut:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}
return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;},bounceBoth:function(t,b,c,d){if(t<d/2){return YAHOO.util.Easing.bounceIn(t*2,0,c,d)*.5+b;}
return YAHOO.util.Easing.bounceOut(t*2-d,0,c,d)*.5+c*.5+b;}});var EasingManager=Class.create();EasingManager.prototype={startTime:0,active:false,periodicalExecuter:null,actionArrays:null,initialize:function(options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',353,'return YAHOO.util.Easing.bounceOut(t*2-d,0,c,d)*.5+c*.5+b;}});var EasingManager=Class.create();EasingManager.prototype={startTime:0,active:false,periodicalExecuter:null,actionArrays:null,initialize:','function(options)',arguments);this.options={frameRate:100,timeToLive:1,actionObjects:[],easingVariables:[]};Object.extend(this.options,options||{});},addActionObject:function(actionObject)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',354,'this.options={frameRate:100,timeToLive:1,actionObjects:[],easingVariables:[]};Object.extend(this.options,options||{});},addActionObject:','function(actionObject)',arguments);this.options.actionObjects.push(actionObject);},addEasingVariable:function(easingVariable)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',355,'this.options.actionObjects.push(actionObject);},addEasingVariable:','function(easingVariable)',arguments);this.options.easingVariables.push(easingVariable);},removeActionObject:function(actionObject)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',356,'this.options.easingVariables.push(easingVariable);},removeActionObject:','function(actionObject)',arguments);this.options.actionObjects=this.options.actionObjects.without(actionObject);},removeEasingVariable:function(easingVariable)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',357,'this.options.actionObjects=this.options.actionObjects.without(actionObject);},removeEasingVariable:','function(easingVariable)',arguments);this.options.easingVariables=this.options.easingVariables.without(easingVariable);},clearEasingVariables:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',358,'this.options.easingVariables=this.options.easingVariables.without(easingVariable);},clearEasingVariables:','function()',arguments);this.options.easingVariables=new Array();},clearActionObjects:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',359,'this.options.easingVariables=new Array();},clearActionObjects:','function()',arguments);this.options.actionObjects=new Array();},clone:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',360,'this.options.actionObjects=new Array();},clone:','function()',arguments);return new EasingManager(this.options);},start:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',361,'return new EasingManager(this.options);},start:','function()',arguments);if(!this.active)
{this.startTime=new Date();this.active=true;this.periodicalExecuter=new PeriodicalExecuter(this.enterFrame.bind(this),1/this.options.frameRate);}},stop:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',363,'{this.startTime=new Date();this.active=true;this.periodicalExecuter=new PeriodicalExecuter(this.enterFrame.bind(this),1/this.options.frameRate);}},stop:','function()',arguments);if(this.active)
{this.active=false;this.periodicalExecuter.stop();this.periodicalExecuter=null;}},invokeActionfunction:function(funk)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',365,'{this.active=false;this.periodicalExecuter.stop();this.periodicalExecuter=null;}},invokeActionfunction:','function(funk)',arguments);var l=this.options.actionObjects.invoke(funk,this.actionValues);},compileActionArrays:function(frame)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',366,'var l=this.options.actionObjects.invoke(funk,this.actionValues);},compileActionArrays:','function(frame)',arguments);this.actionValues=$H();var l=this.options.easingVariables.size();for(var i=0;i<l;i++)
{var key=this.options.easingVariables[i].key;this.actionValues[key]=this.options.easingVariables[i].getEasedValue(frame)}
return this.actionValues;},compileActionLastArrays:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',369,'return this.actionValues;},compileActionLastArrays:','function()',arguments);this.actionValues=$H();var l=this.options.easingVariables.size();for(var i=0;i<l;i++)
{var key=this.options.easingVariables[i].key;this.actionValues[key]=this.options.easingVariables[i].getEndValue()}
return this.actionValues;},enterFrame:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',372,'return this.actionValues;},enterFrame:','function()',arguments);var seconds=(new Date()-this.startTime)/1000;if(seconds<=this.options.timeToLive)
{var frameNumber=this.getFrameNumer(seconds);this.compileActionArrays(frameNumber);this.invokeActionfunction("onEnterFrame");this.invokeActionfunction("onExitFrame");}
else
{this.compileActionLastArrays();this.invokeActionfunction("onEnterFrame");this.invokeActionfunction("onExitFrame");this.stop();}},getFrameNumer:function(seconds)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',376,'{this.compileActionLastArrays();this.invokeActionfunction("onEnterFrame");this.invokeActionfunction("onExitFrame");this.stop();}},getFrameNumer:','function(seconds)',arguments);return Math.round(seconds/(1/this.options.frameRate));}};var Stamp=Class.create();Stamp.prototype={parentObject:null,worldPoint:null,mapPoint:null,maxSize:2000,shapeId:null,initialize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',377,'return Math.round(seconds/(1/this.options.frameRate));}};var Stamp=Class.create();Stamp.prototype={parentObject:null,worldPoint:null,mapPoint:null,maxSize:2000,shapeId:null,initialize:','function()',arguments);this.stampId=Utility.getRandomId(100,5);},destroy:function(){},attach:function(parentObject)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',378,'this.stampId=Utility.getRandomId(100,5);},destroy:function(){},attach:','function(parentObject)',arguments);this.parentObject=parentObject;this._attach();this.update();return this;},clone:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',379,'this.parentObject=parentObject;this._attach();this.update();return this;},clone:','function()',arguments);if(blnUseJQuery===true)
{return $j.extend({},this);}
else
{return Object.clone(this);}},update:function(){},reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',383,'{return Object.clone(this);}},update:function(){},reposition:','function()',arguments);this.setSize();this.moveTo();},clip:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',384,'this.setSize();this.moveTo();},clip:','function()',arguments);if(typeof(this.parentObject)=='undefined'||this.parentObject==null||typeof(this.parentObject)!='object')
{return;}
if((typeof(this.parentObject.mapStatus)!='undefined')&&(this.parentObject.mapStatus!=null)&&(typeof(this.parentObject.mapStatus)=='object'))
{var box=this.parentObject.mapStatus.getScreenClippingArea().times(2);this._clip(box);}},_clip:function(box)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',388,'{var box=this.parentObject.mapStatus.getScreenClippingArea().times(2);this._clip(box);}},_clip:','function(box)',arguments);},setSize:function(size)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',389,'},setSize:','function(size)',arguments);this.size=size=size||this.size;if(size.srid&&size.srid=="Meters"&&this.parentObject)
{size=this.parentObject.convertMetersToPixels(size);this._setSize(size);}
else if((!size.srid)||(size.srid&&size.srid!="Meters"))
{this._setSize(size);}
if(size)
{this.mapStampSize=size;}},_setSize:function(size){},moveTo:function(worldPoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',395,'{this.mapStampSize=size;}},_setSize:function(size){},moveTo:','function(worldPoint)',arguments);this.worldPoint=worldPoint||this.worldPoint;if(typeof(this.parentObject)=='undefined'||this.parentObject==null||typeof(this.parentObject)!='object')
{return;}
if((typeof(this.parentObject.mapStatus)!='undefined')&&(this.parentObject.mapStatus!=null)&&(typeof(this.parentObject.mapStatus)=='object'))
{this.mapPoint=this.parentObject.mapStatus.getScreenPointFromWorld(this.worldPoint);this._moveTo(this.mapPoint);}},_moveTo:function(point){},hide:function(){},show:function(){}};var MapStack=Class.create();MapStack.prototype={mapDetails:null,initialize:function(mapDetails,mapStackOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',399,'{this.mapPoint=this.parentObject.mapStatus.getScreenPointFromWorld(this.worldPoint);this._moveTo(this.mapPoint);}},_moveTo:function(point){},hide:function(){},show:function(){}};var MapStack=Class.create();MapStack.prototype={mapDetails:null,initialize:','function(mapDetails,mapStackOptions)',arguments);this.arrMapRange=new Array();this.mapDetails=mapDetails;this.mapStackOptions={name:"---",mapIds:[],mapRanges:$H()};Object.extend(this.mapStackOptions,mapStackOptions||{});this.mapStackOptions.mapRanges.each(this.addRange.bind(this));},addRange:function(range)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',400,'this.arrMapRange=new Array();this.mapDetails=mapDetails;this.mapStackOptions={name:"---",mapIds:[],mapRanges:$H()};Object.extend(this.mapStackOptions,mapStackOptions||{});this.mapStackOptions.mapRanges.each(this.addRange.bind(this));},addRange:','function(range)',arguments);this.arrMapRange.push(new MapRange(range));},getName:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',401,'this.arrMapRange.push(new MapRange(range));},getName:','function()',arguments);return this.mapStackOptions.name;},compatible:function(mapStack)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',402,'return this.mapStackOptions.name;},compatible:','function(mapStack)',arguments);var mapSridsA=mapStack.getSridsInStack();var mapSridsB=this.getSridsInStack();for(var i=0;i<mapSridsA.size();i++)
{if(!mapSridsB.include(mapSridsA[i]))
{return false;}}
return mapSridsA.size()==mapSridsB.size();},getSridsInStack:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',406,'return mapSridsA.size()==mapSridsB.size();},getSridsInStack:','function()',arguments);var mapIds=this.getMapIds();var size=mapIds.size();var srids=new Array();for(var i=0;i<size;i++)
{var mapId=mapIds[i];srids.push(this.mapDetails[mapId].srid);}
return srids.uniq();},getMapIds:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',409,'return srids.uniq();},getMapIds:','function()',arguments);return this.arrMapRange.invoke("getMapId");},getMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',410,'return this.arrMapRange.invoke("getMapId");},getMode:','function()',arguments);return(this.arrMapRange.size()>1)?"manual":"single";},getMapId:function(level,point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',411,'return(this.arrMapRange.size()>1)?"manual":"single";},getMapId:','function(level,point)',arguments);var range=this.getMapRange(level);if(range&&this.checkPointIsOnMap(range.getMapId(),point))
{return range.getMapId();}
else
{var mapId=this.getOutOfRangeMapId(level,point);if(!mapId)
{this.getOutOfRangeMapId(level,point);}
return mapId;}},getOutOfRangeMapId:function(level,point,log)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',417,'return mapId;}},getOutOfRangeMapId:','function(level,point,log)',arguments);var mapIds=this.mapStackOptions.mapIds;var size=mapIds.size();var mapId=null;var onMapId=null;var startGap=99999;var gap=startGap;var onMapGap=startGap;var id;for(var i=0;i<size;i++)
{if(id=mapIds[i])
{var onMap=this.checkPointIsOnMap(id,point);var g=this.getGap(level,id);if((level>=this.mapDetails[id]["map_view_lower_threshold"]&&level<=this.mapDetails[id]["map_view_upper_threshold"])&&onMap)
{return id;}
if(g<gap)
{gap=g;mapId=id;}
if(g<onMapGap&&onMap)
{onMapGap=g;onMapId=id;}}}
if(onMapGap<startGap)
{return onMapId;}
else if(mapId)
{return mapId;}
else
{return mapIds.first();}},getGap:function(level,mapId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',431,'{return mapIds.first();}},getGap:','function(level,mapId)',arguments);var start=this.mapDetails[mapId]["map_view_lower_range"];var end=this.mapDetails[mapId]["map_view_upper_range"];return Math.min(Math.abs(level-start),Math.abs(level-end));},checkPointIsOnMap:function(mapId,point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',432,'var start=this.mapDetails[mapId]["map_view_lower_range"];var end=this.mapDetails[mapId]["map_view_upper_range"];return Math.min(Math.abs(level-start),Math.abs(level-end));},checkPointIsOnMap:','function(mapId,point)',arguments);var mapDetails=this.mapDetails[mapId*1];if(mapDetails&&mapDetails.srid)
{refPoint=point.convertToSrid(mapDetails.srid);}
return refPoint&&mapDetails&&refPoint.x>=mapDetails["map_extents_TLX"]&&refPoint.x<=mapDetails["map_extents_BRX"]&&refPoint.y<=mapDetails["map_extents_TLY"]&&refPoint.y>=mapDetails["map_extents_BRY"];},getMapRange:function(level)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',435,'return refPoint&&mapDetails&&refPoint.x>=mapDetails["map_extents_TLX"]&&refPoint.x<=mapDetails["map_extents_BRX"]&&refPoint.y<=mapDetails["map_extents_TLY"]&&refPoint.y>=mapDetails["map_extents_BRY"];},getMapRange:','function(level)',arguments);return this.arrMapRange.find(function(mapRange)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',436,'return this.arrMapRange.find(','function(mapRange)',arguments);return mapRange.include(level);});}}
function Proj(srs){this.srs=srs.toUpperCase();switch(this.srs)
{case"EPSG:4326":case"EPSG:4318":case"EPSG:4269":case"CRS:84":case"EPSG:4965":case new String("http://www.opengis.net/gml/srs/epsg.xml#4326").toUpperCase():this.Forward=identity;this.Inverse=identity;this.units="degrees";this.title="Lat/Long";break;case"EPSG:42101":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378137.0,6356752.314245,49.0,77.0,-95.0,0.0,0.0,-8000000));this.units="meters";this.title="Lambert Conformal Conic";break;case"EPSG:42304":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378137.0,6356752.314,49.0,77.0,-95.0,49.0,0.0,0));this.units="meters";this.title="Lambert Conformal Conic";break;case"EPSG:26986":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378137.0,6356752.314,42.68333333333333,41.71666666666667,-71.5,41.0,200000,750000));this.units="meters";this.title="Massachusetts Mainland (LCC)";break;case"EPSG:32761":case"EPSG:32661":this.Init=psinit;this.Forward=ll2ps;this.Inverse=ps2ll;this.Init(new Array(6378137.0,6356752.314245,0.0,-90.0,2000000,2000000));this.units="meters";this.title="Polar Stereographic";break;case"EPSG:27561":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378249.2,6356515.0,49.50,49.50,2.33722916655,49.50,600000.0,200000.0));this.units="meters";this.title="Lambert Conformal Conic";break;case"EPSG:27562":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378249.2,6356515.0,46.80,46.80,2.33722916655,46.8,600000.0,200000.0));this.units="meters";this.title="Lambert Conformal Conic";break;case"EPSG:27572":case"EPSG:27582":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378249.2,6356515.0,46.80,46.80,2.33722916655,46.8,600000.0,2200000.0));this.units="meters";this.title="Lambert Conformal Conic";break;case"EPSG:27563":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378249.2,6356515.0,44.10,44.10,2.33722916655,44.10,600000.0,200000.0));this.units="meters";this.title="Lambert Conformal Conic";break;case"EPSG:27700":this.title="OSGB 1936 / British National Grid";this.Init=tminit;this.Forward=ll2tm;this.Inverse=tm2ll;this.Init(new Array(6377563.396,6356256.90923729,0.9996012717,-2,49,400000,-100000));this.units="meters";break;case"EPSG:29900":this.title="Irish National Grid (deprecated)";this.Init=tminit;this.Forward=ll2tm;this.Inverse=tm2ll;this.Init(new Array(6377340.189,6356034.447938534,1.000035,-8,53.5,200000,250000));this.units="meters";break;case"EPSG:9804":this.Init=minit;this.Forward=ll2m;this.Inverse=m2ll;this.Init(new Array(wgs84[0],wgs84[1],0.0,0.0,0.0,0.0));this.units="meters";this.title="Mercator";break;case"EPSG:27564":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378249.2,6356515.0,42.17,42.17,2.33722916655,42.17,234.358,185861.369));this.units="meters";this.title="Lambert Conformal Conic";break;case"EPSG:2154":this.Init=lccinit;this.Forward=ll2lcc;this.Inverse=lcc2ll;this.Init(new Array(6378137.0,6356752.3141,44.00,49.00,3.00000000001,46.50,700000.0,6600000.0));this.units="meters";this.title="Lambert Conformal Conic";break;case"EPSG:4326":case"EPSG:4269":case"CRS:84":case"EPSG:4965":case new String("http://www.opengis.net/gml/srs/epsg.xml#4326").toUpperCase():this.Forward=identity;this.Inverse=identity;this.units="degrees";this.title="Lat/Long";break;case"EPSG:102758":this.title="NAD 1983 StatePlane Wyoming West FIPS 4904 US Survey Feet";this.Init=tminit;this.Forward=ll2tm
this.Inverse=tm2ll;this.Init(new Array(grs80[0],grs80[1],0.9999375,-110.0833333333333,40.5,800000,100000));this.units="usfeet";break;case"EPSG:32158":this.title="NAD 1983 StatePlane Wyoming West meters";this.Init=tminit;this.Forward=ll2tm
this.Inverse=tm2ll;this.Init(new Array(grs80[0],grs80[1],0.9999375,-110.0833333333333,40.5,800000,100000));this.units="meters";break;case"EPSG:28992":this.title="Amersfoort / RD New";this.Init=stint;this.Forward=ll2st;this.Inverse=st2ll;this.Init(new Array(6377397.155,5.38763888888889,52.15616055555555,155000,463000));this.units="meters";break;case"EPSG:26903":case"EPSG:26904":case"EPSG:26905":case"EPSG:26906":case"EPSG:26907":case"EPSG:26908":case"EPSG:26909":case"EPSG:26910":case"EPSG:26911":case"EPSG:26912":case"EPSG:26913":case"EPSG:26914":case"EPSG:26915":case"EPSG:26916":case"EPSG:26917":case"EPSG:26918":case"EPSG:26919":case"EPSG:26920":case"EPSG:26921":case"EPSG:26922":case"EPSG:26923":this.title="NAD83 / UTM zone "+srs.substr(8,2)+"N";this.Init=utminit;this.Forward=ll2tm;this.Inverse=tm2ll;this.Init(new Array(grs80[0],grs80[1],0.9996,srs.substr(8,2)));this.units="meters";break;case"EPSG:32601":case"EPSG:32602":case"EPSG:32603":case"EPSG:32604":case"EPSG:32605":case"EPSG:32606":case"EPSG:32607":case"EPSG:32608":case"EPSG:32609":case"EPSG:32610":case"EPSG:32611":case"EPSG:32612":case"EPSG:32613":case"EPSG:32614":case"EPSG:32615":case"EPSG:32616":case"EPSG:32617":case"EPSG:32618":case"EPSG:32619":case"EPSG:32620":case"EPSG:32621":case"EPSG:32622":case"EPSG:32623":case"EPSG:32624":case"EPSG:32625":case"EPSG:32626":case"EPSG:32627":case"EPSG:32628":case"EPSG:32629":case"EPSG:32630":case"EPSG:32631":case"EPSG:32632":case"EPSG:32633":case"EPSG:32634":case"EPSG:32635":case"EPSG:32636":case"EPSG:32637":case"EPSG:32638":case"EPSG:32639":case"EPSG:32640":case"EPSG:32641":case"EPSG:32642":case"EPSG:32643":case"EPSG:32644":case"EPSG:32645":case"EPSG:32646":case"EPSG:32647":case"EPSG:32648":case"EPSG:32649":case"EPSG:32650":case"EPSG:32651":case"EPSG:32652":case"EPSG:32653":case"EPSG:32654":case"EPSG:32655":case"EPSG:32656":case"EPSG:32657":case"EPSG:32658":case"EPSG:32659":case"EPSG:32660":this.title="WGS84 / UTM zone "+srs.substr(8,2)+"N";this.Init=utminit;this.Forward=ll2tm;this.Inverse=tm2ll;this.Init(new Array(wgs84[0],wgs84[1],0.9996,srs.substr(8,2)));this.units="meters";break;case"EPSG:32701":case"EPSG:32702":case"EPSG:32703":case"EPSG:32704":case"EPSG:32705":case"EPSG:32706":case"EPSG:32707":case"EPSG:32708":case"EPSG:32709":case"EPSG:32710":case"EPSG:32711":case"EPSG:32712":case"EPSG:32713":case"EPSG:32714":case"EPSG:32715":case"EPSG:32716":case"EPSG:32717":case"EPSG:32718":case"EPSG:32719":case"EPSG:32720":case"EPSG:32721":case"EPSG:32722":case"EPSG:32723":case"EPSG:32724":case"EPSG:32725":case"EPSG:32726":case"EPSG:32727":case"EPSG:32728":case"EPSG:32729":case"EPSG:32730":case"EPSG:32731":case"EPSG:32732":case"EPSG:32733":case"EPSG:32734":case"EPSG:32735":case"EPSG:32736":case"EPSG:32737":case"EPSG:32738":case"EPSG:32739":case"EPSG:32740":case"EPSG:32741":case"EPSG:32742":case"EPSG:32743":case"EPSG:32744":case"EPSG:32745":case"EPSG:32746":case"EPSG:32747":case"EPSG:32748":case"EPSG:32749":case"EPSG:32750":case"EPSG:32751":case"EPSG:32752":case"EPSG:32753":case"EPSG:32754":case"EPSG:32755":case"EPSG:32756":case"EPSG:32757":case"EPSG:32758":case"EPSG:32759":case"EPSG:32760":this.title="WGS84 / UTM zone "+srs.substr(8,2)+"S";this.Init=utminit;this.Forward=ll2tm;this.Inverse=tm2ll;this.Init(new Array(wgs84[0],wgs84[1],0.9996,"-"+srs.substr(8,2)));this.units="meters";break;case"EPSG:26591":this.title="Monte Mario (Rome) / Italy zone 1";this.Init=tminit;this.Forward=ll2tm
this.Inverse=tm2ll;this.Init(new Array(6378388.0,6356911.94612795,0.9996,9,0.0,1500000.0,0.0));this.units="meters";break;case"SCENE":this.Init=sceneInit;this.Forward=ll2scene;this.Inverse=scene2ll;this.GetXYCoords=identity;this.GetPLCoords=identity;break;case"PIXEL":this.Forward=ll2pixel;this.Inverse=pixel2ll;this.units="pixels";this.GetXYCoords=identity;this.GetPLCoords=identity;break;default:}
this.matchSrs=function(otherSrs){if(this.srs==otherSrs.toUpperCase())return true;return false;}}
function gmap_forward(coords){return config.objects.googleMapTools.getPixelsFromLatLong(coords);}
function gmap_inverse(coords){return config.objects.googleMapTools.getLatLongFromPixels(coords);}
function identity(coords){return coords;}
function ll2scene(coords){return null;}
function scene2ll(coords){var xpct=(coords[0]-this.ul[0])/(this.lr[0]-this.ul[0]);var ypct=(coords[1]-this.ul[1])/(this.lr[1]-this.ul[1]);var lon=bilinterp(xpct,ypct,this.cul[0],this.cur[0],this.cll[0],this.clr[0])
var lat=bilinterp(xpct,ypct,this.cul[1],this.cur[1],this.cll[1],this.clr[1])
return new Array(lon,lat);}
function sceneInit(param){this.cul=param[0];this.cur=param[1];this.cll=param[2];this.clr=param[3];}
function bilinterp(x,y,a,b,c,d){var top=x*(b-a)+a;var bot=x*(d-c)+c;return y*(bot-top)+top;}
function ll2pixel(coords){return null;}
function pixel2ll(coords){return null;}
var PI=Math.PI;var HALF_PI=PI*0.5;var TWO_PI=PI*2.0;var EPSLN=1.0e-10;var R2D=57.2957795131;var D2R=0.0174532925199;var R=6370997.0;function lccinit(param){this.r_major=param[0];this.r_minor=param[1];var lat1=param[2]*D2R;var lat2=param[3]*D2R;this.center_lon=param[4]*D2R;this.center_lat=param[5]*D2R;this.false_easting=param[6];this.false_northing=param[7];if(Math.abs(lat1+lat2)<EPSLN){return;}
var temp=this.r_minor/this.r_major;this.e=Math.sqrt(1.0-temp*temp);var sin1=Math.sin(lat1);var cos1=Math.cos(lat1);var ms1=msfnz(this.e,sin1,cos1);var ts1=tsfnz(this.e,lat1,sin1);var sin2=Math.sin(lat2);var cos2=Math.cos(lat2);var ms2=msfnz(this.e,sin2,cos2);var ts2=tsfnz(this.e,lat2,sin2);var ts0=tsfnz(this.e,this.center_lat,Math.sin(this.center_lat));if(Math.abs(lat1-lat2)>EPSLN){this.ns=Math.log(ms1/ms2)/Math.log(ts1/ts2);}else{this.ns=sin1;}
this.f0=ms1/(this.ns*Math.pow(ts1,this.ns));this.rh=this.r_major*this.f0*Math.pow(ts0,this.ns);}
function ll2lcc(coords){var lon=coords[0];var lat=coords[1];if(lat<=90.0&&lat>=-90.0&&lon<=180.0&&lon>=-180.0){lat*=D2R;lon*=D2R;}else{return null;}
var con=Math.abs(Math.abs(lat)-HALF_PI);var ts;if(con>EPSLN){ts=tsfnz(this.e,lat,Math.sin(lat));rh1=this.r_major*this.f0*Math.pow(ts,this.ns);}else{con=lat*this.ns;if(con<=0){return null;}
rh1=0;}
var theta=this.ns*adjust_lon(lon-this.center_lon);var x=rh1*Math.sin(theta)+this.false_easting;var y=this.rh-rh1*Math.cos(theta)+this.false_northing;return new Array(x,y);}
function lcc2ll(coords){var rh1,con,ts;var lat,lon;x=coords[0]-this.false_easting;y=this.rh-coords[1]+this.false_northing;if(this.ns>0){rh1=Math.sqrt(x*x+y*y);con=1.0;}else{rh1=-Math.sqrt(x*x+y*y);con=-1.0;}
var theta=0.0;if(rh1!=0){theta=Math.atan2((con*x),(con*y));}
if((rh1!=0)||(this.ns>0.0)){con=1.0/this.ns;ts=Math.pow((rh1/(this.r_major*this.f0)),con);lat=phi2z(this.e,ts);if(lat==-9999)return null;}else{lat=-HALF_PI;}
lon=adjust_lon(theta/this.ns+this.center_lon);return new Array(R2D*lon,R2D*lat);}
function psinit(param){this.r_major=param[0];this.r_minor=param[1];this.center_lon=param[2]*D2R;this.center_lat=param[3]*D2R;this.false_easting=param[4];this.false_northing=param[5];var temp=this.r_minor/this.r_major;this.e=1.0-temp*temp;this.e=Math.sqrt(this.e);var con=1.0+this.e;var com=1.0-this.e;this.e4=Math.sqrt(Math.pow(con,con)*Math.pow(com,com));this.fac=(this.center_lat<0)?-1.0:1.0;this.ind=0;if(Math.abs(Math.abs(this.center_lat)-HALF_PI)>EPSLN){this.ind=1;var con1=this.fac*this.center_lat;var sinphi=Math.sin(con1);this.mcs=msfnz(this.e,sinphi,Math.cos(con1));this.tcs=tsfnz(this.e,con1,sinphi);}}
function ll2ps(coords){var lon=coords[0];var lat=coords[1];var con1=this.fac*adjust_lon(lon-this.center_lon);var con2=this.fac*lat;var sinphi=Math.sin(con2);var ts=tsfnz(this.e,con2,sinphi);if(this.ind!=0){rh=this.r_major*this.mcs*ts/this.tcs;}else{rh=2.0*this.r_major*ts/this.e4;}
var x=this.fac*rh*Math.sin(con1)+this.false_easting;var y=-this.fac*rh*Math.cos(con1)+this.false_northing;;return new Array(x,y);}
function ps2ll(coords){x=(coords[0]-this.false_easting)*this.fac;y=(coords[1]-this.false_northing)*this.fac;var rh=Math.sqrt(x*x+y*y);if(this.ind!=0){ts=rh*this.tcs/(this.r_major*this.mcs);}else{ts=rh*this.e4/(this.r_major*2.0);}
var lat=this.fac*phi2z(this.e,ts);if(lat==-9999)return null;var lon=0;if(rh==0){lon=this.fac*this.center_lon;}else{lon=adjust_lon(this.fac*Math.atan2(x,-y)+this.center_lon);}
return new Array(R2D*lon,R2D*lat);}
function semi_minor(a,f){return a-(a*(1/f));}
var grs80=new Array(6378137.0,6356752.31414036);var wgs84=new Array(6378137.0,6356752.31424518);var wgs72=new Array(6378135.0,6356750.52001609);var intl=new Array(6378388.0,6356911.94612795);var usfeet=1200/3937;var feet=0.3048;function e0fn(x){return(1.0-0.25*x*(1.0+x/16.0*(3.0+1.25*x)));}
function e1fn(x){return(0.375*x*(1.0+0.25*x*(1.0+0.46875*x)));}
function e2fn(x){return(0.05859375*x*x*(1.0+0.75*x));}
function e3fn(x){return(x*x*x*(35.0/3072.0));}
function mlfn(e0,e1,e2,e3,phi){return(e0*phi-e1*Math.sin(2.0*phi)+e2*Math.sin(4.0*phi)-e3*Math.sin(6.0*phi));}
function tminit(param){this.r_maj=param[0];this.r_min=param[1];this.scale_fact=param[2];this.lon_center=param[3]*D2R;this.lat_origin=param[4]*D2R;this.false_easting=param[5];this.false_northing=param[6];var temp=this.r_min/this.r_maj;this.es=1.0-Math.pow(temp,2);this.e0=e0fn(this.es);this.e1=e1fn(this.es);this.e2=e2fn(this.es);this.e3=e3fn(this.es);this.ml0=this.r_maj*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat_origin);this.esp=this.es/(1.0-this.es);this.ind=(this.es<.00001)?1:0;}
function utminit(param){this.r_maj=param[0];this.r_min=param[1];this.scale_fact=param[2];var zone=param[3];this.lat_origin=0.0;this.lon_center=((6*Math.abs(zone))-183)*D2R;this.false_easting=500000.0;this.false_northing=(zone<0)?10000000.0:0.0;var temp=this.r_min/this.r_maj;this.es=1.0-Math.pow(temp,2);this.e0=e0fn(this.es);this.e1=e1fn(this.es);this.e2=e2fn(this.es);this.e3=e3fn(this.es);this.ml0=this.r_maj*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat_origin);this.esp=this.es/(1.0-this.es);this.ind=(this.es<.00001)?1:0;}
function ll2tm(coords){var lon=coords[0]*D2R;var lat=coords[1]*D2R;var delta_lon=adjust_lon(lon-this.lon_center);var con;var x,y;var sin_phi=Math.sin(lat);var cos_phi=Math.cos(lat);if(this.ind!=0){var b=cos_phi*Math.sin(delta_lon);if((Math.abs(Math.abs(b)-1.0))<.0000000001){return(93);}else{x=.5*this.r_maj*this.scale_fact*Math.log((1.0+b)/(1.0-b));con=Math.acos(cos_phi*Math.cos(delta_lon)/Math.sqrt(1.0-b*b));if(lat<0)
con=-con;y=this.r_maj*this.scale_fact*(con-this.lat_origin);}}else{var al=cos_phi*delta_lon;var als=Math.pow(al,2);var c=this.esp*Math.pow(cos_phi,2);var tq=Math.tan(lat);var t=Math.pow(tq,2);con=1.0-this.es*Math.pow(sin_phi,2);var n=this.r_maj/Math.sqrt(con);var ml=this.r_maj*mlfn(this.e0,this.e1,this.e2,this.e3,lat);x=this.scale_fact*n*al*(1.0+als/6.0*(1.0-t+c+als/20.0*(5.0-18.0*t+Math.pow(t,2)+72.0*c-58.0*this.esp)))+this.false_easting;y=this.scale_fact*(ml-this.ml0+n*tq*(als*(0.5+als/24.0*(5.0-t+9.0*c+4.0*Math.pow(c,2)+als/30.0*(61.0-58.0*t+Math.pow(t,2)+600.0*c-330.0*this.esp)))))+this.false_northing;switch(this.units){case"usfeet":x/=usfeet;y/=usfeet
break;case"feet":x=x/feet;y=y/feet;break;}}
return new Array(x,y);}
function tm2ll(coords){var x=coords[0];var y=coords[1];var con,phi;var delta_phi;var i;var max_iter=6;var lat,lon;if(this.ind!=0){var f=exp(x/(this.r_maj*this.scale_fact));var g=.5*(f-1/f);var temp=this.lat_origin+y/(this.r_maj*this.scale_fact);var h=cos(temp);con=sqrt((1.0-h*h)/(1.0+g*g));lat=asinz(con);if(temp<0)
lat=-lat;if((g==0)&&(h==0)){lon=this.lon_center;}else{lon=adjust_lon(atan2(g,h)+this.lon_center);}}else{x=x-this.false_easting;y=y-this.false_northing;con=(this.ml0+y/this.scale_fact)/this.r_maj;phi=con;for(i=0;;i++){delta_phi=((con+this.e1*Math.sin(2.0*phi)-this.e2*Math.sin(4.0*phi)+this.e3*Math.sin(6.0*phi))/this.e0)-phi;phi+=delta_phi;if(Math.abs(delta_phi)<=EPSLN)break;if(i>=max_iter){return(95);}}
if(Math.abs(phi)<HALF_PI){var sin_phi=Math.sin(phi);var cos_phi=Math.cos(phi);var tan_phi=Math.tan(phi);var c=this.esp*Math.pow(cos_phi,2);var cs=Math.pow(c,2);var t=Math.pow(tan_phi,2);var ts=Math.pow(t,2);con=1.0-this.es*Math.pow(sin_phi,2);var n=this.r_maj/Math.sqrt(con);var r=n*(1.0-this.es)/con;var d=x/(n*this.scale_fact);var ds=Math.pow(d,2);lat=phi-(n*tan_phi*ds/r)*(0.5-ds/24.0*(5.0+3.0*t+10.0*c-4.0*cs-9.0*this.esp-ds/30.0*(61.0+90.0*t+298.0*c+45.0*ts-252.0*this.esp-3.0*cs)));lon=adjust_lon(this.lon_center+(d*(1.0-ds/6.0*(1.0+2.0*t+c-ds/20.0*(5.0-2.0*c+28.0*t-3.0*cs+8.0*this.esp+24.0*ts)))/cos_phi));}else{lat=HALF_PI*sign(y);lon=this.lon_center;}}
return new Array(lon*R2D,lat*R2D);}
function msfnz(eccent,sinphi,cosphi){var con=eccent*sinphi;return cosphi/(Math.sqrt(1.0-con*con));}
function tsfnz(eccent,phi,sinphi){var con=eccent*sinphi;var com=.5*eccent;con=Math.pow(((1.0-con)/(1.0+con)),com);return(Math.tan(.5*(HALF_PI-phi))/con);}
function phi2z(eccent,ts){var eccnth=.5*eccent;var con,dphi;var phi=HALF_PI-2*Math.atan(ts);for(i=0;i<=15;i++){con=eccent*Math.sin(phi);dphi=HALF_PI-2*Math.atan(ts*(Math.pow(((1.0-con)/(1.0+con)),eccnth)))-phi;phi+=dphi;if(Math.abs(dphi)<=.0000000001)return phi;}
return-9999;}
function sign(x){if(x<0.0)return(-1);else return(1);}
function adjust_lon(x){x=(Math.abs(x)<PI)?x:(x-(sign(x)*TWO_PI));return(x);}
function stint(param){this.r_major=param[0];this.lon_center=param[1]*D2R;this.lat_center=param[2]*D2R;this.false_easting=param[3];this.false_northing=param[4];this.sin_p10=Math.sin(this.lat_center);this.cos_p10=Math.cos(this.lat_center);}
function ll2st(coords){var lon=coords[0];var lat=coords[1];var ksp;if(lat<=90.0&&lat>=-90.0&&lon<=180.0&&lon>=-180.0){lat*=D2R;lon*=D2R;}else{return null;}
var dlon=adjust_lon(lon-this.lon_center);var sinphi=Math.sin(lat);var cosphi=Math.cos(lat);var coslon=Math.cos(dlon);var g=this.sin_p10*sinphi+this.cos_p10*cosphi*coslon;if(Math.abs(g+1.0)<=EPSLN){return null;}else{ksp=2.0/(1.0+g);var x=this.false_easting+this.r_major*ksp*cosphi*Math.sin(dlon);var y=this.false_northing+this.r_major*ksp*(this.cos_p10*sinphi-this.sin_p10*cosphi*coslon);return new Array(x,y);}}
function st2ll(coords){var x=(coords[0]-this.false_easting);var y=(coords[1]-this.false_northing);var rh=Math.sqrt(x*x+y*y);var z=2.0*Math.atan(rh/(2.0*this.r_major));var sinz=Math.sin(z);var cosz=Math.cos(z);var lat;var lon=this.lon_center;if(Math.abs(rh)<=EPSLN){lat=this.lat_center;}else{lat=Math.asin(cosz*this.sin_p10+(y*sinz*this.cos_p10)/rh);var con=Math.abs(this.lat_center)-HALF_PI;if(Math.abs(con)<=EPSLN){if(this.lat_center>=0.0){lon=adjust_lon(lon_center+atan2(x,-y));}else{lon=adjust_lon(lon_center-atan2(-x,y));}}else{con=cosz-this.sin_p10*Math.sin(lat);if((Math.abs(con)<EPSLN)&&(Math.abs(x)<EPSLN)){}else{lon=adjust_lon(this.lon_center+Math.atan2((x*sinz*this.cos_p10),(con*rh)));}}}
return new Array(R2D*lon,R2D*lat);}
function minit(param)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',499,'minit','function minit(param)',arguments);this.r_major=param[0];this.r_minor=param[1];this.lon_center=param[2];this.lat_origin=param[3];this.false_northing=param[4];this.false_easting=param[5];this.temp=this.r_minor/this.r_major;this.es=1.0-Math.sqrt(this.temp);this.e=Math.sqrt(this.es);this.m1=Math.cos(this.lat_origin)/(Math.sqrt(1.0-this.es*Math.sin(this.lat_origin)*Math.sin(this.lat_origin)));}
function ll2m(coords)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',501,'ll2m','function ll2m(coords)',arguments);var lon=coords[0];var lat=coords[1];if(lat<=90.0&&lat>=-90.0&&lon<=180.0&&lon>=-180.0)
{lat*=D2R;lon*=D2R;}
else
{return null;}
if(Math.abs(Math.abs(lat)-HALF_PI)<=EPSLN)
{return null;}
else
{var sinphi=Math.sin(lat);var ts=tsfnz(this.e,lat,sinphi);var x=this.false_easting+this.r_major*this.m1*adjust_lon(lon-this.lon_center);var y=this.false_northing-this.r_major*this.m1*Math.log(ts);}
return new Array(x,y);}
function m2ll(coords)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',511,'m2ll','function m2ll(coords)',arguments);var x=coords[0];var y=coords[1];x-=this.false_easting;y-=this.false_northing
var ts=Math.exp(-y/(this.r_major*this.m1));var lat=phi2z(this.e,ts);if(lat==-9999){console.log("lat = -9999");return null;}
var lon=adjust_lon(this.lon_center+x/(this.r_major*this.m1));return new Array(R2D*lon,R2D*lat);}
function LatLongToOSGrid(p){if(p.lat&&p.lon){var lat=p.lat.toRad(),lon=p.lon.toRad();}
var a=6377563.396,b=6356256.910;var F0=0.9996012717;var lat0=(49).toRad(),lon0=(-2).toRad();var N0=-100000,E0=400000;var e2=1-(b*b)/(a*a);var n=(a-b)/(a+b),n2=n*n,n3=n*n*n;var cosLat=Math.cos(lat),sinLat=Math.sin(lat);var nu=a*F0/Math.sqrt(1-e2*sinLat*sinLat);var rho=a*F0*(1-e2)/Math.pow(1-e2*sinLat*sinLat,1.5);var eta2=nu/rho-1;var Ma=(1+n+(5/4)*n2+(5/4)*n3)*(lat-lat0);var Mb=(3*n+3*n*n+(21/8)*n3)*Math.sin(lat-lat0)*Math.cos(lat+lat0);var Mc=((15/8)*n2+(15/8)*n3)*Math.sin(2*(lat-lat0))*Math.cos(2*(lat+lat0));var Md=(35/24)*n3*Math.sin(3*(lat-lat0))*Math.cos(3*(lat+lat0));var M=b*F0*(Ma-Mb+Mc-Md);var cos3lat=cosLat*cosLat*cosLat;var cos5lat=cos3lat*cosLat*cosLat;var tan2lat=Math.tan(lat)*Math.tan(lat);var tan4lat=tan2lat*tan2lat;var I=M+N0;var II=(nu/2)*sinLat*cosLat;var III=(nu/24)*sinLat*cos3lat*(5-tan2lat+9*eta2);var IIIA=(nu/720)*sinLat*cos5lat*(61-58*tan2lat+tan4lat);var IV=nu*cosLat;var V=(nu/6)*cos3lat*(nu/rho-tan2lat);var VI=(nu/120)*cos5lat*(5-18*tan2lat+tan4lat+14*eta2-58*tan2lat*eta2);var dLon=lon-lon0;var dLon2=dLon*dLon,dLon3=dLon2*dLon,dLon4=dLon3*dLon,dLon5=dLon4*dLon,dLon6=dLon5*dLon;var N=I+II*dLon2+III*dLon4+IIIA*dLon6;var E=E0+IV*dLon+V*dLon3+VI*dLon5;return gridrefNumToLet(E,N,8);}
function OSGridToLatLong(gridRef){var gr=gridrefLetToNum(gridRef);var E=gr[0],N=gr[1];var a=6377563.396,b=6356256.910;var F0=0.9996012717;var lat0=49*Math.PI/180,lon0=-2*Math.PI/180;var N0=-100000,E0=400000;var e2=1-(b*b)/(a*a);var n=(a-b)/(a+b),n2=n*n,n3=n*n*n;var lat=lat0,M=0;do{lat=(N-N0-M)/(a*F0)+lat;var Ma=(1+n+(5/4)*n2+(5/4)*n3)*(lat-lat0);var Mb=(3*n+3*n*n+(21/8)*n3)*Math.sin(lat-lat0)*Math.cos(lat+lat0);var Mc=((15/8)*n2+(15/8)*n3)*Math.sin(2*(lat-lat0))*Math.cos(2*(lat+lat0));var Md=(35/24)*n3*Math.sin(3*(lat-lat0))*Math.cos(3*(lat+lat0));M=b*F0*(Ma-Mb+Mc-Md);}while(N-N0-M>=0.00001);var cosLat=Math.cos(lat),sinLat=Math.sin(lat);var nu=a*F0/Math.sqrt(1-e2*sinLat*sinLat);var rho=a*F0*(1-e2)/Math.pow(1-e2*sinLat*sinLat,1.5);var eta2=nu/rho-1;var tanLat=Math.tan(lat);var tan2lat=tanLat*tanLat,tan4lat=tan2lat*tan2lat,tan6lat=tan4lat*tan2lat;var secLat=1/cosLat;var nu3=nu*nu*nu,nu5=nu3*nu*nu,nu7=nu5*nu*nu;var VII=tanLat/(2*rho*nu);var VIII=tanLat/(24*rho*nu3)*(5+3*tan2lat+eta2-9*tan2lat*eta2);var IX=tanLat/(720*rho*nu5)*(61+90*tan2lat+45*tan4lat);var X=secLat/nu;var XI=secLat/(6*nu3)*(nu/rho+2*tan2lat);var XII=secLat/(120*nu5)*(5+28*tan2lat+24*tan4lat);var XIIA=secLat/(5040*nu7)*(61+662*tan2lat+1320*tan4lat+720*tan6lat);var dE=(E-E0),dE2=dE*dE,dE3=dE2*dE,dE4=dE2*dE2,dE5=dE3*dE2,dE6=dE4*dE2,dE7=dE5*dE2;lat=lat-VII*dE2+VIII*dE4-IX*dE6;var lon=lon0+X*dE-XI*dE3+XII*dE5-XIIA*dE7;return new LatLon(lat.toDeg(),lon.toDeg());}
function gridrefLetToNum(gridref){var l1=gridref.toUpperCase().charCodeAt(0)-'A'.charCodeAt(0);var l2=gridref.toUpperCase().charCodeAt(1)-'A'.charCodeAt(0);if(l1>7)l1--;if(l2>7)l2--;var e=((l1-2)%5)*5+(l2%5);var n=(19-Math.floor(l1/5)*5)-Math.floor(l2/5);gridref=gridref.slice(2).replace(/ /g,'');e+=gridref.slice(0,gridref.length/2);n+=gridref.slice(gridref.length/2);switch(gridref.length){case 6:e+='50';n+='50';break;case 8:e+='5';n+='5';break;}
return[e,n];}
function gridrefNumToLet(e,n,digits){var e100k=Math.floor(e/100000),n100k=Math.floor(n/100000);if(e100k<0||e100k>6||n100k<0||n100k>12)return'';var l1=(19-n100k)-(19-n100k)%5+Math.floor((e100k+10)/5);var l2=(19-n100k)*5%25+e100k%5;if(l1>7)l1++;if(l2>7)l2++;var letPair=String.fromCharCode(l1+'A'.charCodeAt(0),l2+'A'.charCodeAt(0));e=Math.floor((e%100000)/Math.pow(10,5-digits/2));n=Math.floor((n%100000)/Math.pow(10,5-digits/2));var gridRef=letPair+' '+e.padLZ(digits/2)+' '+n.padLZ(digits/2);return gridRef;}
Number.prototype.padLZ=function(width){var num=this.toString(),len=num.length;for(var i=0;i<width-len;i++)num='0'+num;return num;}
var e={WGS84:{a:6378137,b:6356752.3142,f:1/298.257223563},Airy1830:{a:6377563.396,b:6356256.910,f:1/299.3249646}};var h={WGS84toOSGB36:{tx:-446.448,ty:125.157,tz:-542.060,rx:-0.1502,ry:-0.2470,rz:-0.8421,s:20.4894},OSGB36toWGS84:{tx:446.448,ty:-125.157,tz:542.060,rx:0.1502,ry:0.2470,rz:0.8421,s:-20.4894}};function convertOSGB36toWGS84(p1){var p2=convert(p1,e.Airy1830,h.OSGB36toWGS84,e.WGS84);return p2;}
function convertWGS84toOSGB36(p1){var p2=convert(p1,e.WGS84,h.WGS84toOSGB36,e.Airy1830);return p2;}
function convert(p,e1,t,e2){p1=new LatLon(p.lat,p.lon,p.height);p1.lat=p.lat.toRad();p1.lon=p.lon.toRad();var a=e1.a,b=e1.b;var sinPhi=Math.sin(p1.lat),cosPhi=Math.cos(p1.lat);var sinLambda=Math.sin(p1.lon),cosLambda=Math.cos(p1.lon);var H=p1.height;var eSq=(a*a-b*b)/(a*a);var nu=a/Math.sqrt(1-eSq*sinPhi*sinPhi);var x1=(nu+H)*cosPhi*cosLambda;var y1=(nu+H)*cosPhi*sinLambda;var z1=((1-eSq)*nu+H)*sinPhi;var tx=t.tx,ty=t.ty,tz=t.tz;var rx=t.rx/3600*Math.PI/180;var ry=t.ry/3600*Math.PI/180;var rz=t.rz/3600*Math.PI/180;var s1=t.s/1e6+1;var x2=tx+x1*s1-y1*rz+z1*ry;var y2=ty+x1*rz+y1*s1-z1*rx;var z2=tz-x1*ry+y1*rx+z1*s1;a=e2.a,b=e2.b;var precision=4/a;eSq=(a*a-b*b)/(a*a);var p=Math.sqrt(x2*x2+y2*y2);var phi=Math.atan2(z2,p*(1-eSq)),phiP=2*Math.PI;while(Math.abs(phi-phiP)>precision){nu=a/Math.sqrt(1-eSq*Math.sin(phi)*Math.sin(phi));phiP=phi;phi=Math.atan2(z2+eSq*nu*Math.sin(phi),p);}
var lambda=Math.atan2(y2,x2);H=p/Math.cos(phi)-nu;return new LatLon(phi.toDeg(),lambda.toDeg(),H);}
function LatLon(lat,lon,height){if(arguments.length<3)height=0;this.lat=lat;this.lon=lon;this.height=height;}
String.prototype.parseDeg=function(){if(!isNaN(this))return Number(this);var degLL=this.replace(/^-/,'').replace(/[NSEW]/i,'');var dms=degLL.split(/[^0-9.]+/);for(var i in dms)if(dms[i]=='')dms.splice(i,1);switch(dms.length){case 3:var deg=dms[0]/1+dms[1]/60+dms[2]/3600;break;case 2:var deg=dms[0]/1+dms[1]/60;break;case 1:if(/[NS]/i.test(this))degLL='0'+degLL;var deg=dms[0].slice(0,3)/1+dms[0].slice(3,5)/60+dms[0].slice(5)/3600;break;default:return NaN;}
if(/^-/.test(this)||/[WS]/i.test(this))deg=-deg;return deg;}
Number.prototype.toRad=function(){return this*Math.PI/180;}
Number.prototype.toDeg=function(){return this*180/Math.PI;}
Number.prototype.toDMS=function(dp){if(arguments.length<1)dp=0;var d=Math.abs(this);var deg=Math.floor(d);var min=Math.floor((d-deg)*60);var sec=((d-deg-min/60)*3600).toFixed(dp);if(sec==60){sec=(0).toFixed(dp);min++;}
if(min==60){min=0;deg++;}
if(deg==360)deg=0;if(deg<100)deg='0'+deg;if(deg<10)deg='0'+deg;if(min<10)min='0'+min;if(sec<10)sec='0'+sec;return deg+'\u00B0'+min+'\u2032'+sec+'\u2033';}
Number.prototype.toDMS2=function(dp){if(arguments.length<1)dp=0;var d=Math.abs(this);var seconds=(d*3600).toFixed(dp);var deg=Math.floor(seconds/3600);var min=Math.floor(seconds/60)%60;var sec=(seconds%60).toFixed(dp);if(deg<100)deg='0'+deg;if(deg<10)deg='0'+deg;if(min<10)min='0'+min;if(sec<10)sec='0'+sec;return deg+'\u00B0'+min+'\u2032'+sec+'\u2033';}
Number.prototype.toLat=function(dp){return this.toDMS(dp).slice(1)+(this<0?'S':'N');}
Number.prototype.toLon=function(dp){return this.toDMS(dp)+(this>0?'E':'W');}
LatLon.prototype.toString=function(){return this.lat.toLat()+', '+this.lon.toLon();}
if(!window.Geocode){var Geocode=new Object();}
Object.extend(Geocode,{refTileSize:256,convertWorldToScreen:function(point,mapExtents,screenExt)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',539,'Object.extend(Geocode,{refTileSize:256,convertWorldToScreen:','function(point,mapExtents,screenExt)',arguments);var screenExtents=new Point();var x=Math.floor(screenExt.TLX+((screenExt.BRX-screenExt.TLX)/(mapExtents.BRX-mapExtents.TLX))*(point.x-mapExtents.TLX));var y=Math.floor(screenExt.TLY+((screenExt.BRY-screenExt.TLY)/(mapExtents.BRY-mapExtents.TLY))*(point.y-mapExtents.TLY));return new Point(x,y,"Pixel");},convertScreenToWorld:function(point,mapExtents,screenExt)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',540,'var screenExtents=new Point();var x=Math.floor(screenExt.TLX+((screenExt.BRX-screenExt.TLX)/(mapExtents.BRX-mapExtents.TLX))*(point.x-mapExtents.TLX));var y=Math.floor(screenExt.TLY+((screenExt.BRY-screenExt.TLY)/(mapExtents.BRY-mapExtents.TLY))*(point.y-mapExtents.TLY));return new Point(x,y,"Pixel");},convertScreenToWorld:','function(point,mapExtents,screenExt)',arguments);var mapPoint=new Point();mapPoint.x=mapExtents.TLX+((mapExtents.BRX-mapExtents.TLX)/(screenExt.BRX-screenExt.TLX))*(point.x-screenExt.TLX);mapPoint.y=mapExtents.TLY+((mapExtents.BRY-mapExtents.TLY)/(screenExt.BRY-screenExt.TLY))*(point.y-screenExt.TLY);return mapPoint;},getExtentsFromTile:function(refPoint,geographicWidth,tileDimensions,screenDimensions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',541,'var mapPoint=new Point();mapPoint.x=mapExtents.TLX+((mapExtents.BRX-mapExtents.TLX)/(screenExt.BRX-screenExt.TLX))*(point.x-screenExt.TLX);mapPoint.y=mapExtents.TLY+((mapExtents.BRY-mapExtents.TLY)/(screenExt.BRY-screenExt.TLY))*(point.y-screenExt.TLY);return mapPoint;},getExtentsFromTile:','function(refPoint,geographicWidth,tileDimensions,screenDimensions)',arguments);var tile=this.getEnlosingTile(refPoint,geographicWidth);var tileExt=this.getExtentsFromTileNumber(refPoint,geographicWidth);var groundRatio=this.getGroundRatioFromExtents(tileExt,tileDimensions);var mapExt=this.getBottomLeftExtentsFromGroundRatio(groundRatio,refPoint,screenDimensions);return mapExt;},getGroundRatioFromExtents:function(mapExtents,screenDimensions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',542,'var tile=this.getEnlosingTile(refPoint,geographicWidth);var tileExt=this.getExtentsFromTileNumber(refPoint,geographicWidth);var groundRatio=this.getGroundRatioFromExtents(tileExt,tileDimensions);var mapExt=this.getBottomLeftExtentsFromGroundRatio(groundRatio,refPoint,screenDimensions);return mapExt;},getGroundRatioFromExtents:','function(mapExtents,screenDimensions)',arguments);var distance=mapExtents.BRX-mapExtents.TLX;var groundRatio=distance/screenDimensions.x;return groundRatio;},getExtentsFromGroundRatioRefPointRatio:function(groundRatio,refPoint,refPointRatio,screenDimensions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',543,'var distance=mapExtents.BRX-mapExtents.TLX;var groundRatio=distance/screenDimensions.x;return groundRatio;},getExtentsFromGroundRatioRefPointRatio:','function(groundRatio,refPoint,refPointRatio,screenDimensions)',arguments);var x=screenDimensions.BRX-screenDimensions.TLX;var y=screenDimensions.TLY-screenDimensions.BRY;var aspectRatio=y/x;var distance=groundRatio*x;var objMapExtent={};var refRatioTLX=refPointRatio.x;var refRatioBRX=1-refPointRatio.x;var refRatioTLY=1-refPointRatio.y;var refRatioBRY=refPointRatio.y;objMapExtent.TLX=refPoint.x-(distance*refRatioTLX);objMapExtent.TLY=refPoint.y+(distance*aspectRatio*refRatioTLY);objMapExtent.BRX=refPoint.x+(distance*refRatioBRX);objMapExtent.BRY=refPoint.y-(distance*aspectRatio*refRatioBRY);return objMapExtent;},getCenteredExtentsFromGroundRatio:function(groundRatio,refPoint,screenDimensions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',544,'var x=screenDimensions.BRX-screenDimensions.TLX;var y=screenDimensions.TLY-screenDimensions.BRY;var aspectRatio=y/x;var distance=groundRatio*x;var objMapExtent={};var refRatioTLX=refPointRatio.x;var refRatioBRX=1-refPointRatio.x;var refRatioTLY=1-refPointRatio.y;var refRatioBRY=refPointRatio.y;objMapExtent.TLX=refPoint.x-(distance*refRatioTLX);objMapExtent.TLY=refPoint.y+(distance*aspectRatio*refRatioTLY);objMapExtent.BRX=refPoint.x+(distance*refRatioBRX);objMapExtent.BRY=refPoint.y-(distance*aspectRatio*refRatioBRY);return objMapExtent;},getCenteredExtentsFromGroundRatio:','function(groundRatio,refPoint,screenDimensions)',arguments);return this.getExtentsFromGroundRatioRefPointRatio(groundRatio,refPoint,new Point(0.5,0.5),screenDimensions);},getBottomLeftExtentsFromGroundRatio:function(groundRatio,refPoint,screenDimensions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',545,'return this.getExtentsFromGroundRatioRefPointRatio(groundRatio,refPoint,new Point(0.5,0.5),screenDimensions);},getBottomLeftExtentsFromGroundRatio:','function(groundRatio,refPoint,screenDimensions)',arguments);return this.getExtentsFromGroundRatioRefPointRatio(groundRatio,refPoint,new Point(0,0),screenDimensions);;},getDistanceInMetres:function(srid,point1,point2)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',546,'return this.getExtentsFromGroundRatioRefPointRatio(groundRatio,refPoint,new Point(0,0),screenDimensions);;},getDistanceInMetres:','function(srid,point1,point2)',arguments);switch(srid)
{default:case 27700:case 29900:var lengthX=Math.abs(point1.x-point2.x);var lengthY=Math.abs(point1.y-point2.y);var distance=Math.sqrt(lengthX*lengthX+lengthY*lengthY);break;case 4326:case 4318:var a=6378137,b=6356752.3142,f=1/298.257223563;var L=Utility.degToRad(point2.y-point1.y);var U1=Math.atan((1-f)*Math.tan(Utility.degToRad(point1.x)));var U2=Math.atan((1-f)*Math.tan(Utility.degToRad(point2.x)));var sinU1=Math.sin(U1),cosU1=Math.cos(U1);var sinU2=Math.sin(U2),cosU2=Math.cos(U2);var lambda=L,lambdaP=2*Math.PI;var iterLimit=20;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0)
{var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0)return 0;var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var sinAlpha=cosU1*cosU2*sinLambda/sinSigma;var cosSqAlpha=1-sinAlpha*sinAlpha;var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;if(isNaN(cos2SigmaM))cos2SigmaM=0;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*sinAlpha*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));}
if(iterLimit==0)return NaN
var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-
B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var distance=b*A*(sigma-deltaSigma);break;}
return distance;},calcDistBetweenPoints:function(srid,arrayPoints)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',553,'return distance;},calcDistBetweenPoints:','function(srid,arrayPoints)',arguments);var l=arrayPoints.length
var distance=0;if(arrayPoints.length>1)
{var point1,point2;for(var i=0;i<l;i++)
{point2=arrayPoints[i];if(point1&&point2)
{distance+=this.getDistanceInMetres(srid,point1,point2);}
point1=point2;point1=point2;}}
return distance;},getGeographicWidth:function(srid,scale,tileDim)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',560,'return distance;},getGeographicWidth:','function(srid,scale,tileDim)',arguments);var tileRatio=tileDim.x/this.refTileSize;switch(srid)
{case 4318:var divider=163840000/(45*tileRatio);var width=scale/divider;break;default:case 27700:case 29900:var divider=16/tileRatio;var width=scale/divider;break;}
return width;},getExtentsFromTileNumber:function(tile,geographicWidth)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',563,'return width;},getExtentsFromTileNumber:','function(tile,geographicWidth)',arguments);var ext=$H();ext["TLX"]=(tile.x-0.5)*geographicWidth;ext["TLY"]=(tile.y+0.5)*geographicWidth;ext["BRX"]=ext["TLX"]+geographicWidth;ext["BRY"]=ext["TLY"]-geographicWidth;return ext;},getEnlosingTile:function(point,geographicWidth)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',564,'var ext=$H();ext["TLX"]=(tile.x-0.5)*geographicWidth;ext["TLY"]=(tile.y+0.5)*geographicWidth;ext["BRX"]=ext["TLX"]+geographicWidth;ext["BRY"]=ext["TLY"]-geographicWidth;return ext;},getEnlosingTile:','function(point,geographicWidth)',arguments);var tileNoX=Math.floor((point.x/geographicWidth)+0.5);var tileNoY=Math.floor((point.y/geographicWidth)+0.5);return new Point(tileNoX,tileNoY);}});var Point=Class.create();Point.prototype={x:0,y:0,srid:0,units:{29900:["Eastings","Northings","m","Ireland"],27700:["Eastings","Northings","m","UK"],4318:["Latitude"," Longitude","&#176;","World"]},initialize:function(x,y,srid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',565,'var tileNoX=Math.floor((point.x/geographicWidth)+0.5);var tileNoY=Math.floor((point.y/geographicWidth)+0.5);return new Point(tileNoX,tileNoY);}});var Point=Class.create();Point.prototype={x:0,y:0,srid:0,units:{29900:["Eastings","Northings","m","Ireland"],27700:["Eastings","Northings","m","UK"],4318:["Latitude"," Longitude","&#176;","World"]},initialize:','function(x,y,srid)',arguments);this.set(x||0,y||0);this.setSrid(srid||"Pixel")},set:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',566,'this.set(x||0,y||0);this.setSrid(srid||"Pixel")},set:','function(x,y)',arguments);this.x=x*1;this.y=y*1;},clone:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',567,'this.x=x*1;this.y=y*1;},clone:','function()',arguments);return new Point(this.x,this.y,this.srid);},round:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',568,'return new Point(this.x,this.y,this.srid);},round:','function()',arguments);this.x=Math.round(this.x);this.y=Math.round(this.y);return this;},setSrid:function(srid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',569,'this.x=Math.round(this.x);this.y=Math.round(this.y);return this;},setSrid:','function(srid)',arguments);this.srid=srid;return this;},convertToSrid:function(srid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',570,'this.srid=srid;return this;},convertToSrid:','function(srid)',arguments);if(srid!=this.srid)
{var p=new Proj("EPSG:"+this.srid);var p2=new Proj("EPSG:"+srid);var result=p2.Forward(p.Inverse([this.x,this.y]));return new Point(result[0],result[1],srid)}
else
{return this;}},get4318:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',574,'{return this;}},get4318:','function()',arguments);return this.convertToSrid(4318);p.y=Math.min(p.y,90);p.y=Math.max(p.y,-90);p.x=Math.min(p.x,180);p.x=Math.max(p.x,-180);return p;},get27700:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',575,'return this.convertToSrid(4318);p.y=Math.min(p.y,90);p.y=Math.max(p.y,-90);p.x=Math.min(p.x,180);p.x=Math.max(p.x,-180);return p;},get27700:','function()',arguments);return this.convertToSrid(27700);},get29900:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',576,'return this.convertToSrid(27700);},get29900:','function()',arguments);return this.convertToSrid(29900);},add:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',577,'return this.convertToSrid(29900);},add:','function(point)',arguments);return new Point(this.x+point.x,this.y+point.y);},equals:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',578,'return new Point(this.x+point.x,this.y+point.y);},equals:','function(point)',arguments);return(this.x==point.x)&&(this.y==point.y);},diff:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',579,'return(this.x==point.x)&&(this.y==point.y);},diff:','function(point)',arguments);return new Point(this.x-point.x,this.y-point.y)},distance:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',580,'return new Point(this.x-point.x,this.y-point.y)},distance:','function(point)',arguments);var p=point.convertToSrid(this.srid);return Geocode.getDistanceInMetres(this.srid,this,p);},getMagnitude:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',581,'var p=point.convertToSrid(this.srid);return Geocode.getDistanceInMetres(this.srid,this,p);},getMagnitude:','function()',arguments);return Math.sqrt(this.x*this.x+this.y*this.y)},subtract:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',582,'return Math.sqrt(this.x*this.x+this.y*this.y)},subtract:','function(point)',arguments);return new Point(this.x-point.x,this.y-point.y);},times:function(number)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',583,'return new Point(this.x-point.x,this.y-point.y);},times:','function(number)',arguments);return new Point(this.x*number,this.y*number);},dot:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',584,'return new Point(this.x*number,this.y*number);},dot:','function(point)',arguments);return(this.x*point.x)+(this.y*point.y);},abs:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',585,'return(this.x*point.x)+(this.y*point.y);},abs:','function()',arguments);return new Point(Math.abs(this.x),Math.abs(this.y));},projectionOf:function(a)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',586,'return new Point(Math.abs(this.x),Math.abs(this.y));},projectionOf:','function(a)',arguments);return this.times(a.dot(this)/this.dot(this));},getUnits:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',587,'return this.times(a.dot(this)/this.dot(this));},getUnits:','function()',arguments);return this.units[this.srid]||["North","South","pixels","Screen"];}};function MakePoint(p)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',588,'MakePoint','function MakePoint(p)',arguments);return new Point(p.x,p.y,p.srid||null);}
var JSONRequestObject=Class.create();JSONRequestObject.prototype={callbackFunctions:null,timeoutFunctions:null,docHead:null,timeOutCalls:null,timeOutLength:null,initialize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',590,'var JSONRequestObject=Class.create();JSONRequestObject.prototype={callbackFunctions:null,timeoutFunctions:null,docHead:null,timeOutCalls:null,timeOutLength:null,initialize:','function()',arguments);this.callbackFunctions=$H();this.timeoutFunctions=$H();this.docHead=$$("head")[0];this.timeOutCalls=[];this.timeOutLength=60;},registerCallbackFunction:function(cbf,cbfId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',591,'this.callbackFunctions=$H();this.timeoutFunctions=$H();this.docHead=$$("head")[0];this.timeOutCalls=[];this.timeOutLength=60;},registerCallbackFunction:','function(cbf,cbfId)',arguments);this.callbackFunctions[cbfId]=cbf;},deregisterCallbackFunction:function(cbfId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',592,'this.callbackFunctions[cbfId]=cbf;},deregisterCallbackFunction:','function(cbfId)',arguments);this.callbackFunctions.remove(cbfId)},registerTimeoutFunction:function(cbf,cbfId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',593,'this.callbackFunctions.remove(cbfId)},registerTimeoutFunction:','function(cbf,cbfId)',arguments);this.timeoutFunctions[cbfId]=cbf;},deregisterTimeoutFunction:function(cbfId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',594,'this.timeoutFunctions[cbfId]=cbf;},deregisterTimeoutFunction:','function(cbfId)',arguments);this.timeoutFunctions.remove(cbfId)},get:function(url,callbackFunction,defObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',595,'this.timeoutFunctions.remove(cbfId)},get:','function(url,callbackFunction,defObj)',arguments);defObj=defObj||{};var id=this.makeId(defObj.id);var urlString=this.makeURLString(defObj.parameters,id);if(defObj.boundTo)
{callbackFunction=callbackFunction.bind(defObj.boundTo);if(defObj.onTimeout)
{defObj.onTimeout=defObj.onTimeout.bind(defObj.boundTo);}}
this.registerCallbackFunction(callbackFunction,id);if(defObj.onTimeout)
this.registerTimeoutFunction(defObj.onTimeout,id);this.makeScriptTag(url+urlString,id);var timeOut=(defObj.timeout)?defObj.timeout:this.timeOutLength;var me=this;this.timeOutCalls[id]=new PeriodicalExecuter(function(peObject){me.requestTimeout(peObject,id);},timeOut);return id;},makeURLString:function(parameters,id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',600,'this.registerTimeoutFunction(defObj.onTimeout,id);this.makeScriptTag(url+urlString,id);var timeOut=(defObj.timeout)?defObj.timeout:this.timeOutLength;var me=this;this.timeOutCalls[id]=new PeriodicalExecuter(function(peObject){me.requestTimeout(peObject,id);},timeOut);return id;},makeURLString:','function(parameters,id)',arguments);var urlString="?callbackId="+id+"&";if(parameters)
{urlString+=parameters.toQueryString();}
return urlString;},makeId:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',603,'return urlString;},makeId:','function(id)',arguments);if(id)
{var id=id;}
else
{var randomId=Utility.getRandomId(100,10);var id="callbackId"+randomId;}
return id;},requestSuccess:function(jsonObject,id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',608,'return id;},requestSuccess:','function(jsonObject,id)',arguments);if(this.callbackFunctions[id])
{this.callbackFunctions[id](jsonObject,id);this.removeRequest(id);}},requestTimeout:function(peObject,id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',610,'{this.callbackFunctions[id](jsonObject,id);this.removeRequest(id);}},requestTimeout:','function(peObject,id)',arguments);if(this.timeoutFunctions[id])
{this.timeoutFunctions[id](id);this.deregisterTimeoutFunction(id);}
this.removeRequest(id);},removeRequest:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',613,'this.removeRequest(id);},removeRequest:','function(id)',arguments);this.deregisterCallbackFunction(id);this.timeOutCalls[id].stop();this.removeScriptTag(id);},makeScriptTag:function(url,id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',614,'this.deregisterCallbackFunction(id);this.timeOutCalls[id].stop();this.removeScriptTag(id);},makeScriptTag:','function(url,id)',arguments);var scriptTag=document.createElement("script");scriptTag.setAttribute("src",url);scriptTag.setAttribute("type","text/javascript");scriptTag.setAttribute("charset","utf-8");scriptTag.setAttribute("id",id);this.docHead.appendChild(scriptTag);},removeScriptTag:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',615,'var scriptTag=document.createElement("script");scriptTag.setAttribute("src",url);scriptTag.setAttribute("type","text/javascript");scriptTag.setAttribute("charset","utf-8");scriptTag.setAttribute("id",id);this.docHead.appendChild(scriptTag);},removeScriptTag:','function(id)',arguments);if($(id))
{this.docHead.removeChild($(id));}}};if(!window.JSONRequest){var JSONRequest=new JSONRequestObject();}
var Poly=Class.create();Poly.prototype={points:null,type:"polygon",initialize:function(points,type)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',618,'var Poly=Class.create();Poly.prototype={points:null,type:"polygon",initialize:','function(points,type)',arguments);this.points=points||new Array();this.type=type||this.type;},push:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',619,'this.points=points||new Array();this.type=type||this.type;},push:','function(point)',arguments);this.points.push(point);},set:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',620,'this.points.push(point);},set:','function(points)',arguments);this.points=points;},getStartPoint:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',621,'this.points=points;},getStartPoint:','function()',arguments);if(this.type=="polygon")
{return this.points.last();}
else
{return this.points.first();}},clipMaxX:function(xmax)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',625,'{return this.points.first();}},clipMaxX:','function(xmax)',arguments);var A,B,pts,n;var n=this.points.size();if(n==0)return;pts=new Array();B=this.getStartPoint();for(var i=0;i<n;i++)
{A=B;B=this.points[i];sIns=A.x<=xmax;pIns=B.x<=xmax;if(sIns!=pIns)
pts.push(new Point(xmax,A.y+(B.y-A.y)*(xmax-A.x)/(B.x-A.x)));if(pIns)
pts.push(B);}
this.points=pts;},clipMinX:function(xmin)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',630,'this.points=pts;},clipMinX:','function(xmin)',arguments);var A,B,pts,n;var n=this.points.size();if(n==0)return;pts=new Array();B=this.getStartPoint();for(var i=0;i<n;i++)
{A=B;B=this.points[i];sIns=A.x>=xmin;pIns=B.x>=xmin;if(sIns!=pIns)
pts.push(new Point(xmin,A.y+(B.y-A.y)*(xmin-A.x)/(B.x-A.x)));if(pIns)
pts.push(B);}
this.points=pts;},clipMaxY:function(ymax)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',635,'this.points=pts;},clipMaxY:','function(ymax)',arguments);var A,B,pts,n;var n=this.points.size();if(n==0)return;pts=new Array();B=this.getStartPoint();for(var i=0;i<n;i++)
{A=B;B=this.points[i];sIns=A.y<=ymax;pIns=B.y<=ymax;if(sIns!=pIns)
pts.push(new Point(A.x+(B.x-A.x)*(ymax-A.y)/(B.y-A.y),ymax));if(pIns)
pts.push(B);}
this.points=pts;},clipMinY:function(ymin)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',640,'this.points=pts;},clipMinY:','function(ymin)',arguments);var A,B,pts,n;var n=this.points.size();if(n==0)return;pts=new Array();B=this.getStartPoint();for(var i=0;i<n;i++)
{A=B;B=this.points[i];sIns=A.y>=ymin;pIns=B.y>=ymin;if(sIns!=pIns)
pts.push(new Point(A.x+(B.x-A.x)*(ymin-A.y)/(B.y-A.y),ymin));if(pIns)
pts.push(B);}
this.points=pts;}}
var Line=Class.create();Line.prototype={point1:null,point2:null,initialize:function(point1,point2)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',646,'var Line=Class.create();Line.prototype={point1:null,point2:null,initialize:','function(point1,point2)',arguments);this.point1=point1||new Point();this.point2=point2||new Point();},distance:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',647,'this.point1=point1||new Point();this.point2=point2||new Point();},distance:','function()',arguments);return point1.distance(point2);}};var Box=Class.create();Box.prototype={tlPoint:null,brPoint:null,initialize:function(tlPoint,brPoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',648,'return point1.distance(point2);}};var Box=Class.create();Box.prototype={tlPoint:null,brPoint:null,initialize:','function(tlPoint,brPoint)',arguments);this.tlPoint=tlPoint||new Point();this.brPoint=brPoint||new Point();},getSize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',649,'this.tlPoint=tlPoint||new Point();this.brPoint=brPoint||new Point();},getSize:','function()',arguments);return this.tlPoint.subtract(this.brPoint).abs();},times:function(amount)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',650,'return this.tlPoint.subtract(this.brPoint).abs();},times:','function(amount)',arguments);var width=this.brPoint.x-this.tlPoint.x;var height=this.brPoint.y-this.tlPoint.y;this.brPoint.x+=amount*width;this.brPoint.y+=amount*height;this.tlPoint.x-=amount*width;this.tlPoint.y-=amount*height;return this;},getArea:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',651,'var width=this.brPoint.x-this.tlPoint.x;var height=this.brPoint.y-this.tlPoint.y;this.brPoint.x+=amount*width;this.brPoint.y+=amount*height;this.tlPoint.x-=amount*width;this.tlPoint.y-=amount*height;return this;},getArea:','function()',arguments);var size=this.getSize();return size.x*size.y;},findClippingRegionCode:function(p,r)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',652,'var size=this.getSize();return size.x*size.y;},findClippingRegionCode:','function(p,r)',arguments);r=r||0;var code=0;if(p.y-r>=this.brPoint.y)
{code|=1;}
else if(p.y+r<=this.tlPoint.y)
{code|=2;}
if(p.x-r>=this.brPoint.x)
{code|=4;}
else if(p.x+r<=this.tlPoint.x)
{code|=8;}
return code;},clipPoly:function(poly)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',661,'return code;},clipPoly:','function(poly)',arguments);poly.clipMaxX(this.brPoint.x);poly.clipMinX(this.tlPoint.x);poly.clipMaxY(this.brPoint.y);poly.clipMinY(this.tlPoint.y);return poly;},clipPoint:function(point,r)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',662,'poly.clipMaxX(this.brPoint.x);poly.clipMinX(this.tlPoint.x);poly.clipMaxY(this.brPoint.y);poly.clipMinY(this.tlPoint.y);return poly;},clipPoint:','function(point,r)',arguments);code=this.findClippingRegionCode(point,r);return code==0;},clipPoints:function(points,r)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',663,'code=this.findClippingRegionCode(point,r);return code==0;},clipPoints:','function(points,r)',arguments);var n,pt,code;var outArray=new Array();n=points.size();for(var i=0;i<n;i++)
{pt=points[i];code=this.findClippingRegionCode(pt,r);if(code==0)
{outArray.push(pt);}}
return outArray},clipLine:function(line)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',667,'return outArray},clipLine:','function(line)',arguments);var code1,code2,codeout;var accept=0,done=0;var pt1=Object.clone(line.point1);var pt2=Object.clone(line.point2);var code1=this.findClippingRegionCode(pt1);var code2=this.findClippingRegionCode(pt2);do
{if(!(code1|code2))
{var accept=done=1;}
else if(code1&code2)
{done=1;}
else
{var x,y;codeout=code1?code1:code2;if(codeout&1)
{x=pt1.x+(pt2.x-pt1.x)*(this.brPoint.y-pt1.y)/(pt2.y-pt1.y);y=this.brPoint.y-1;}
else if(codeout&2)
{x=pt1.x+(pt2.x-pt1.x)*(this.tlPoint.y-pt1.y)/(pt2.y-pt1.y);y=this.tlPoint.y+1;}
else if(codeout&4)
{y=pt1.y+(pt2.y-pt1.y)*(this.brPoint.y-pt1.x)/(pt2.x-pt1.x);x=this.brPoint.x-1;}
else
{y=pt1.y+(pt2.y-pt1.y)*(this.tlPoint.x-pt1.x)/(pt2.x-pt1.x);x=this.tlPoint.x+1;}
if(codeout==code1)
{pt1.x=x;pt1.y=y;code1=this.findClippingRegionCode(pt1);}
else
{pt2.x=x;pt2.y=y;code2=this.findClippingRegionCode(pt2);}}}
while(done==0);if(accept)
{return new Line(pt1,pt2);}
else
{return false}}}
if(!window.Utility){var Utility=new Object();}
Object.extend(Utility,{getInternetExplorerVersion:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',691,'Object.extend(Utility,{getInternetExplorerVersion:','function()',arguments);var rv=-1;if(navigator.appName=='Microsoft Internet Explorer')
{var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");if(re.exec(ua)!=null)
rv=parseFloat(RegExp.$1);}
return rv;},getIEversion:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',695,'return rv;},getIEversion:','function()',arguments);if(typeof this.IEVersion!="number")
{this.IEVersion=Utility.getInternetExplorerVersion();}
return this.IEVersion;},arrayOrObject:function(thing)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',698,'return this.IEVersion;},arrayOrObject:','function(thing)',arguments);if(!thing.constructor)
return typeof(thing);if(thing.constructor.toString().indexOf("Array")!=-1)
return"array";else if(thing.constructor.toString().indexOf("Object")!=-1)
return"object";else if(thing.constructor.toString().indexOf("HTML")!=-1)
return"html";else
return typeof(thing);},typeOf:function(thing)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',704,'return typeof(thing);},typeOf:','function(thing)',arguments);var t=typeof(thing);if(t==null)
{return"null";}
else if(t=="object")
{return this.arrayOrObject(thing);}
else
{return t;}},makeElement:function(thing)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',710,'{return t;}},makeElement:','function(thing)',arguments);var type=this.typeOf(thing);if(type=="object"||type=="html")
{return thing;}
else if(type=="string")
{if($(thing))
return $(thing);}
else
return null;},wrapArray:function(array,offset)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',717,'return null;},wrapArray:','function(array,offset)',arguments);var width=array.length;var tempArray=new Array(width);var destPointer=0;for(var i=0;i<width;i++)
{destPointer=this.wrapNumber(i,width,offset);tempArray[destPointer]=array[i];}
return tempArray;},wrapNumber:function(point,rowLength,offset)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',720,'return tempArray;},wrapNumber:','function(point,rowLength,offset)',arguments);return(((point+offset)%rowLength)+rowLength)%rowLength;},getRandomId:function(multiply,amount)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',721,'return(((point+offset)%rowLength)+rowLength)%rowLength;},getRandomId:','function(multiply,amount)',arguments);var id=new Date().getTime();this.getRandomNumbers(multiply,amount).each(function(num){id+="_"+num});return id;},getRandomNumbers:function(multiply,amount)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',722,'var id=new Date().getTime();this.getRandomNumbers(multiply,amount).each(function(num){id+="_"+num});return id;},getRandomNumbers:','function(multiply,amount)',arguments);numbers=[];amount.times(function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',723,'numbers=[];amount.times(','function()',arguments);var r=Math.floor(Math.random()*multiply);numbers.push(r);});return numbers;},replaceURLVariables:function(templateURL,urlVariables)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',724,'var r=Math.floor(Math.random()*multiply);numbers.push(r);});return numbers;},replaceURLVariables:','function(templateURL,urlVariables)',arguments);urlVariables.each(function(urlVar){if(typeof(urlVar.value.size)=="function")
{var methodArry=urlVar.value;var value=Try.these(function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',726,'{var methodArry=urlVar.value;var value=Try.these(','function()',arguments);if(methodArry.length==2)
{return methodArry[0][methodArry[1]]();}
else if(methodArry.length==3)
{return methodArry[0][methodArry[1]](methodArry[2]);}})
templateURL=templateURL.replace(urlVar.key,value);}
else
{templateURL=templateURL.replace(urlVar.key,urlVar.value);}});return templateURL},extToGeoDim:function(ext)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',733,'{templateURL=templateURL.replace(urlVar.key,urlVar.value);}});return templateURL},extToGeoDim:','function(ext)',arguments);return new Point(ext.BRX-ext.TLX,ext.TLY-ext.BRY);},setMyAttribute:function(attObject,attName,attValue)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',734,'return new Point(ext.BRX-ext.TLX,ext.TLY-ext.BRY);},setMyAttribute:','function(attObject,attName,attValue)',arguments);var myAtt=document.createAttribute(attName);myAtt.value=attValue;attObject.setAttributeNode(myAtt)},makeDivWithCss:function(pDiv,css,id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',735,'var myAtt=document.createAttribute(attName);myAtt.value=attValue;attObject.setAttributeNode(myAtt)},makeDivWithCss:','function(pDiv,css,id)',arguments);if(typeof(id)=='undefined')
{var newDiv=new Element("div",{'class':css});}
else
{var newDiv=new Element("div",{'id':id,'class':css});}
pDiv.insert(newDiv);return newDiv;},makeDivWithId:function(pDiv,id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',740,'pDiv.insert(newDiv);return newDiv;},makeDivWithId:','function(pDiv,id)',arguments);var newDiv=new Element("div",{'id':id});pDiv.insert(newDiv);return newDiv;},createVerticalTrack:function(parentDiv,height)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',741,'var newDiv=new Element("div",{\'id\':id});pDiv.insert(newDiv);return newDiv;},createVerticalTrack:','function(parentDiv,height)',arguments);var trackObject={};trackObject.trackDiv=this.makeDivWithCss(parentDiv,"verticalTrack");;trackObject.trackDiv.setStyle({height:height+"px"});this.makeDivWithCss(trackObject.trackDiv,"topCap");var middle=this.makeDivWithCss(trackObject.trackDiv,"middle");middle.setStyle({height:height-6+"px"});var rightCap=this.makeDivWithCss(trackObject.trackDiv,"bottomCap");rightCap.setStyle({top:height-3+"px"});var notches=this.makeDivWithCss(trackObject.trackDiv,"notches");notches.setStyle({height:height+"px"});trackObject.handleDiv=this.makeDivWithCss(trackObject.trackDiv,"handle");return trackObject;},createHorizontalTrack:function(parentDiv,width)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',742,'var trackObject={};trackObject.trackDiv=this.makeDivWithCss(parentDiv,"verticalTrack");;trackObject.trackDiv.setStyle({height:height+"px"});this.makeDivWithCss(trackObject.trackDiv,"topCap");var middle=this.makeDivWithCss(trackObject.trackDiv,"middle");middle.setStyle({height:height-6+"px"});var rightCap=this.makeDivWithCss(trackObject.trackDiv,"bottomCap");rightCap.setStyle({top:height-3+"px"});var notches=this.makeDivWithCss(trackObject.trackDiv,"notches");notches.setStyle({height:height+"px"});trackObject.handleDiv=this.makeDivWithCss(trackObject.trackDiv,"handle");return trackObject;},createHorizontalTrack:','function(parentDiv,width)',arguments);var trackObject={};trackObject.trackDiv=new Element("div");parentDiv.appendChild(trackObject.trackDiv);trackObject.trackDiv.setStyle({width:width+"px"});Element.addClassName(trackObject.trackDiv,"horizontalTrack");var leftCap=new Element("div");trackObject.trackDiv.appendChild(leftCap);Element.addClassName(leftCap,"leftCap");var middle=new Element("div");trackObject.trackDiv.appendChild(middle);middle.setStyle({width:width-6+"px"});Element.addClassName(middle,"middle");var rightCap=new Element("div");trackObject.trackDiv.appendChild(rightCap);rightCap.setStyle({left:width-3+"px"});Element.addClassName(rightCap,"rightCap");var notches=new Element("div");trackObject.trackDiv.appendChild(notches);notches.setStyle({width:width+"px"});Element.addClassName(notches,"notches");trackObject.handleDiv=new Element("div");trackObject.trackDiv.appendChild(trackObject.handleDiv);Element.addClassName(trackObject.handleDiv,"handle");return trackObject;},makeRenderer:function(element)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',743,'var trackObject={};trackObject.trackDiv=new Element("div");parentDiv.appendChild(trackObject.trackDiv);trackObject.trackDiv.setStyle({width:width+"px"});Element.addClassName(trackObject.trackDiv,"horizontalTrack");var leftCap=new Element("div");trackObject.trackDiv.appendChild(leftCap);Element.addClassName(leftCap,"leftCap");var middle=new Element("div");trackObject.trackDiv.appendChild(middle);middle.setStyle({width:width-6+"px"});Element.addClassName(middle,"middle");var rightCap=new Element("div");trackObject.trackDiv.appendChild(rightCap);rightCap.setStyle({left:width-3+"px"});Element.addClassName(rightCap,"rightCap");var notches=new Element("div");trackObject.trackDiv.appendChild(notches);notches.setStyle({width:width+"px"});Element.addClassName(notches,"notches");trackObject.handleDiv=new Element("div");trackObject.trackDiv.appendChild(trackObject.handleDiv);Element.addClassName(trackObject.handleDiv,"handle");return trackObject;},makeRenderer:','function(element)',arguments);if(Graphic.rendererSupported("VML"))
{return renderer=new Graphic.VMLRenderer(element);}
else if(Graphic.rendererSupported("SVG"))
{return renderer=new Graphic.SVGRenderer(element);}
else if(Graphic.rendererSupported("Canvas"))
{return renderer=new Graphic.CanvasRenderer(element);}},degToRad:function(deg)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',749,'{return renderer=new Graphic.CanvasRenderer(element);}},degToRad:','function(deg)',arguments);return deg*Math.PI/180;},radToDeg:function(rad)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',750,'return deg*Math.PI/180;},radToDeg:','function(rad)',arguments);return rad/Math.PI*180;},computeAngle:function(x1,y1,x2,y2,radian){var dx=x2-x1;var dy=y1-y2;if(radian)
var angle=dx!=0?Math.atan(dy/dx):-Math.PI/2;else
var angle=dx!=0?this.radToDeg(Math.atan(dy/dx)):90;if(dx<0&&dy<0)
angle=angle-(radian?Math.PI:180);if(dx<0&&dy>0)
angle=(radian?Math.PI:180)+angle;return angle},disableSelection:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',755,'angle=(radian?Math.PI:180)+angle;return angle},disableSelection:','function()',arguments);document.body.ondrag=function(){return false;};document.body.onselectstart=function(){return false;};},enableSelection:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',756,'document.body.ondrag=function(){return false;};document.body.onselectstart=function(){return false;};},enableSelection:','function()',arguments);document.body.ondrag=null;document.body.onselectstart=null;},getWindowScroll:function(w)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',757,'document.body.ondrag=null;document.body.onselectstart=null;},getWindowScroll:','function(w)',arguments);var T,L,W,H;with(w.document){if(w.document.documentElement&&documentElement.scrollTop){T=documentElement.scrollTop;L=documentElement.scrollLeft;}else if(w.document.body){T=body.scrollTop;L=body.scrollLeft;}
if(w.innerWidth){W=w.innerWidth;H=w.innerHeight;}else if(w.document.documentElement&&documentElement.clientWidth){W=documentElement.clientWidth;H=documentElement.clientHeight;}else{W=body.offsetWidth;H=body.offsetHeight}}
return{top:T,left:L,width:W,height:H};},linehitTest:function(pt0,pt1,ptMouse,width)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',760,'return{top:T,left:L,width:W,height:H};},linehitTest:','function(pt0,pt1,ptMouse,width)',arguments);if(!(ptMouse.x+width>=Math.min(pt0.x,pt1.x)&&ptMouse.x-width<=Math.max(pt0.x,pt1.x)&&ptMouse.y+width>=Math.min(pt0.y,pt1.y)&&ptMouse.y-width<=Math.max(pt0.y,pt1.y)))
return false;var tt0=pt0.subtract(pt1);var tt1=pt0.subtract(ptMouse);var tt2=tt0.projectionOf(tt1);var vNormal=tt1.subtract(tt2);var dist=vNormal.getMagnitude();width=(width<1)?1:width;var withinDist=(dist>=-width&&dist<=width);var distFromEnd0=Math.abs(pt0.distance(ptMouse));var distFromEnd1=Math.abs(pt1.distance(ptMouse));var notTooCloseToEnds=(distFromEnd1>=width&&distFromEnd0>=width);return withinDist&&notTooCloseToEnds;},arrayInsert:function(array,i,v)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',762,'return false;var tt0=pt0.subtract(pt1);var tt1=pt0.subtract(ptMouse);var tt2=tt0.projectionOf(tt1);var vNormal=tt1.subtract(tt2);var dist=vNormal.getMagnitude();width=(width<1)?1:width;var withinDist=(dist>=-width&&dist<=width);var distFromEnd0=Math.abs(pt0.distance(ptMouse));var distFromEnd1=Math.abs(pt1.distance(ptMouse));var notTooCloseToEnds=(distFromEnd1>=width&&distFromEnd0>=width);return withinDist&&notTooCloseToEnds;},arrayInsert:','function(array,i,v)',arguments);var offset=0;if(i>=array.size())
{array[i]=v;return array;}
else
{return array.inject([],function(array,value,index)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',766,'{return array.inject([],','function(array,value,index)',arguments);if(index==i)
{array[i]=v;offset++;}
array[index+offset]=value;return array;});};}});var MapRange=Class.create();MapRange.prototype={initialize:function(rangeOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',769,'array[index+offset]=value;return array;});};}});var MapRange=Class.create();MapRange.prototype={initialize:','function(rangeOptions)',arguments);this.rangeOptions={mapId:0,start:0,end:3};Object.extend(this.rangeOptions,rangeOptions||{});},include:function(n)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',770,'this.rangeOptions={mapId:0,start:0,end:3};Object.extend(this.rangeOptions,rangeOptions||{});},include:','function(n)',arguments);return(n>=this.rangeOptions.start&&n<=this.rangeOptions.end);},getGap:function(n)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',771,'return(n>=this.rangeOptions.start&&n<=this.rangeOptions.end);},getGap:','function(n)',arguments);return Math.min(Math.abs(n-this.rangeOptions.start),Math.abs(n-this.rangeOptions.end));},getMapId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',772,'return Math.min(Math.abs(n-this.rangeOptions.start),Math.abs(n-this.rangeOptions.end));},getMapId:','function()',arguments);return this.rangeOptions.mapId;}}
var Widgets=Class.create();Widgets.prototype={widgetsDiv:null,widgets:$H(),activeWidgets:null,mapStatus:null,inactiveOffset:null,renderer:null,dim:null,refPoint:null,initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',774,'var Widgets=Class.create();Widgets.prototype={widgetsDiv:null,widgets:$H(),activeWidgets:null,mapStatus:null,inactiveOffset:null,renderer:null,dim:null,refPoint:null,initialize:','function(widgetsDiv,mapStatus)',arguments);this.mapStatus=mapStatus;this.widgetsDiv=widgetsDiv;this.activeWidgets=new Array();this.inactiveOffset=new Point(-1,-1);this.makeInactiveDivs();this.renderer=Utility.makeRenderer(this.widgetsDiv.below.renderer);this.dim=Object.clone(this.mapStatus.getScreenDimensions());this.layerOffset=this.mapStatus.getLayerOffset().clone();},makeInactiveDivs:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',775,'this.mapStatus=mapStatus;this.widgetsDiv=widgetsDiv;this.activeWidgets=new Array();this.inactiveOffset=new Point(-1,-1);this.makeInactiveDivs();this.renderer=Utility.makeRenderer(this.widgetsDiv.below.renderer);this.dim=Object.clone(this.mapStatus.getScreenDimensions());this.layerOffset=this.mapStatus.getLayerOffset().clone();},makeInactiveDivs:','function()',arguments);this.widgetsDiv.below.relativeDiv=Utility.makeDivWithCss(this.widgetsDiv.below,"relative");this.widgetsDiv.below.staticDiv=Utility.makeDivWithCss(this.widgetsDiv.below,"static");this.widgetsDiv.below.renderer=Utility.makeDivWithCss(this.widgetsDiv.below,"renderer");this.widgetsDiv.above.iconsDiv=Utility.makeDivWithCss(this.widgetsDiv.above,"iconsDiv");this.widgetsDiv.above.widgetPopup=Utility.makeDivWithCss(this.widgetsDiv.above,"widgetPopup");this.widgetsDiv.above.horizontalToolbarWrapperDiv=Utility.makeDivWithCss(this.widgetsDiv.above,"horizontalToolbarDiv");this.widgetsDiv.above.horizontalToolbarDiv=Utility.makeDivWithCss(this.widgetsDiv.above.horizontalToolbarWrapperDiv,"widgetArea");this.widgetsDiv.above.verticalToolbarDiv=Utility.makeDivWithCss(this.widgetsDiv.above,"verticalToolbarDiv");},moveWidgets:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',776,'this.widgetsDiv.below.relativeDiv=Utility.makeDivWithCss(this.widgetsDiv.below,"relative");this.widgetsDiv.below.staticDiv=Utility.makeDivWithCss(this.widgetsDiv.below,"static");this.widgetsDiv.below.renderer=Utility.makeDivWithCss(this.widgetsDiv.below,"renderer");this.widgetsDiv.above.iconsDiv=Utility.makeDivWithCss(this.widgetsDiv.above,"iconsDiv");this.widgetsDiv.above.widgetPopup=Utility.makeDivWithCss(this.widgetsDiv.above,"widgetPopup");this.widgetsDiv.above.horizontalToolbarWrapperDiv=Utility.makeDivWithCss(this.widgetsDiv.above,"horizontalToolbarDiv");this.widgetsDiv.above.horizontalToolbarDiv=Utility.makeDivWithCss(this.widgetsDiv.above.horizontalToolbarWrapperDiv,"widgetArea");this.widgetsDiv.above.verticalToolbarDiv=Utility.makeDivWithCss(this.widgetsDiv.above,"verticalToolbarDiv");},moveWidgets:','function()',arguments);var offset=this.mapStatus.getLayerOffset();this.moveRenderer(offset);this.widgetsDiv.above.widgetPopup.style.bottom=-offset.y+'px';this.widgetsDiv.above.widgetPopup.style.left=offset.x+'px';this.widgetsDiv.below.relativeDiv.style.bottom=-offset.y+'px';this.widgetsDiv.below.relativeDiv.style.left=offset.x+'px';this.widgetsDiv.above.iconsDiv.style.bottom=-offset.y+'px';this.widgetsDiv.above.iconsDiv.style.left=offset.x+'px';},rendereOffset:null,eventsStatus:true,moveRenderer:function(offset)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',777,'var offset=this.mapStatus.getLayerOffset();this.moveRenderer(offset);this.widgetsDiv.above.widgetPopup.style.bottom=-offset.y+\'px\';this.widgetsDiv.above.widgetPopup.style.left=offset.x+\'px\';this.widgetsDiv.below.relativeDiv.style.bottom=-offset.y+\'px\';this.widgetsDiv.below.relativeDiv.style.left=offset.x+\'px\';this.widgetsDiv.above.iconsDiv.style.bottom=-offset.y+\'px\';this.widgetsDiv.above.iconsDiv.style.left=offset.x+\'px\';},rendereOffset:null,eventsStatus:true,moveRenderer:','function(offset)',arguments);var eventsStatus=this.mapStatus.getEventsStatus();var change=(eventsStatus!=this.eventsStatus);if(eventsStatus&&change)
{this.renderer.pan(-offset.x,-offset.y);this.widgetsDiv.below.renderer.show();}
else if(!eventsStatus&&change)
{this.widgetsDiv.below.renderer.hide();}
else if(eventsStatus&&!change)
{this.renderer.pan(-offset.x,-offset.y);}
this.eventsStatus=eventsStatus},repositionWidgets:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',784,'this.eventsStatus=eventsStatus},repositionWidgets:','function()',arguments);var offset=this.mapStatus.getLayerOffset();var dim=Object.clone(this.mapStatus.getScreenDimensions());var moved=this.layerOffset.subtract(offset).abs();var height=Math.abs(dim.TLY-dim.BRY);var width=Math.abs(dim.BRX-dim.TLX);if((this.zoomLevel!=this.mapStatus.getZoomAmount())||(this.dim.TLY!=dim.TLY||this.dim.BRX!=dim.BRX)||(!this.refPoint||!this.refPoint.equals(this.mapStatus.getMapRefPoint())))
{this.dim=dim;this.activeWidgets.invoke("reposition");this.renderer.updateSize();this.zoomLevel=this.mapStatus.getZoomAmount();this.layerOffset=offset.clone();this.refPoint=this.mapStatus.getMapRefPoint().clone();}
else if(moved.x>=width||moved.y>=height)
{this.activeWidgets.invoke("refresh");this.layerOffset=offset.clone();}},updateRealTimeWidgets:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',788,'{this.activeWidgets.invoke("refresh");this.layerOffset=offset.clone();}},updateRealTimeWidgets:','function()',arguments);this.moveWidgets();this.repositionWidgets();this.activeWidgets.invoke("realTimeUpdate");},updateWidgets:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',789,'this.moveWidgets();this.repositionWidgets();this.activeWidgets.invoke("realTimeUpdate");},updateWidgets:','function()',arguments);this.activeWidgets.invoke("update");},registerWidget:function(key,widgetClass)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',790,'this.activeWidgets.invoke("update");},registerWidget:','function(key,widgetClass)',arguments);this.widgets[key]=widgetClass;},unregisterWidget:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',791,'this.widgets[key]=widgetClass;},unregisterWidget:','function()',arguments);for(var i=0;i<arguments.length;i++)
{this.widgets.remove(arguments[i]);}},removeWidget:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',793,'{this.widgets.remove(arguments[i]);}},removeWidget:','function()',arguments);for(var i=0;i<arguments.length;i++)
{this.activeWidgets=this.activeWidgets.without(arguments[i]);}},addWidget:function(key)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',795,'{this.activeWidgets=this.activeWidgets.without(arguments[i]);}},addWidget:','function(key)',arguments);if(typeof(this.widgets[key])=="function")
{var obj=new this.widgets[key](this.widgetsDiv,this.mapStatus,this.renderer)
this.activeWidgets.push(obj);return obj;}
else
{return false;}},createHorizontalToolbarElement:function(html,def)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',800,'{return false;}},createHorizontalToolbarElement:','function(html,def)',arguments);this.widgetsDiv.above.horizontalToolbarDiv.insert(html,def);}};var EventHandler=Class.create();EventHandler.prototype={domObjects:null,eventListeners:null,eventDiv:null,eventListenerfunction:null,mapPos:null,timeBetweenUpdates:500,timeOfLastEvent:null,DOMEvents:['click','dblclick','mousedown','mouseup','mouseover','mousemove','mouseout','keypress','keydown','keyup','scroll','contextmenu','DOMMouseScroll','mousewheel'],initialize:function(eventDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',801,'this.widgetsDiv.above.horizontalToolbarDiv.insert(html,def);}};var EventHandler=Class.create();EventHandler.prototype={domObjects:null,eventListeners:null,eventDiv:null,eventListenerfunction:null,mapPos:null,timeBetweenUpdates:500,timeOfLastEvent:null,DOMEvents:[\'click\',\'dblclick\',\'mousedown\',\'mouseup\',\'mouseover\',\'mousemove\',\'mouseout\',\'keypress\',\'keydown\',\'keyup\',\'scroll\',\'contextmenu\',\'DOMMouseScroll\',\'mousewheel\'],initialize:','function(eventDiv,mapStatus)',arguments);this.mapStatus=mapStatus;this.domObjects=[];this.eventListeners=$H();this.newEventListeners=new Array();if(eventDiv)this.setEventDiv(eventDiv);this.setCursor("default");this.timeOfLastEvent=$H();this.addListenersToDiv();},setEventDiv:function(eventDiv)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',802,'this.mapStatus=mapStatus;this.domObjects=[];this.eventListeners=$H();this.newEventListeners=new Array();if(eventDiv)this.setEventDiv(eventDiv);this.setCursor("default");this.timeOfLastEvent=$H();this.addListenersToDiv();},setEventDiv:','function(eventDiv)',arguments);this.eventDiv=Utility.makeElement(eventDiv);this.eventDiv.makePositioned();},addListenersToDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',803,'this.eventDiv=Utility.makeElement(eventDiv);this.eventDiv.makePositioned();},addListenersToDiv:','function()',arguments);this.eventListenerfunction=this.eventListenerfunction.bindAsEventListener(this);this.DOMEvents.each(function(eventType){Event.observe(this.eventDiv,eventType,this.eventListenerfunction);}.bind(this));},getEventHandlerFunction:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',804,'this.eventListenerfunction=this.eventListenerfunction.bindAsEventListener(this);this.DOMEvents.each(function(eventType){Event.observe(this.eventDiv,eventType,this.eventListenerfunction);}.bind(this));},getEventHandlerFunction:','function()',arguments);return this.eventListenerfunction.bind(this);},eventListenerfunction:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',805,'return this.eventListenerfunction.bind(this);},eventListenerfunction:','function(event)',arguments);if(this.mapStatus.getEventsStatus()||event.type=='mouseup')
{this.updatePositionOnPage();var point=this.mapStatus.getPointFromEvent(event);var relativePoint=this.mapStatus.getRelativePoint(point);var type=(event.type=='DOMMouseScroll'||event.type=='mousewheel')?"scroll":event.type;var invertedRelativePoint=this.mapStatus.invertYaxis(relativePoint);var l=this.newEventListeners.size();for(var i=0;i<l;i++)
{if(this.newEventListeners[i][type](event,point,relativePoint,invertedRelativePoint))
{Event.stop(event);return;}}
this.timeOfLastEvent[event.type]=new Date();}},getMapPositionOnPage:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',810,'this.timeOfLastEvent[event.type]=new Date();}},getMapPositionOnPage:','function()',arguments);this.updatePositionOnPage();return this.mapPos;},updatePositionOnPage:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',811,'this.updatePositionOnPage();return this.mapPos;},updatePositionOnPage:','function()',arguments);if(!this.mapPos||!this.updatePositionOnPageTimer||(new Date()-this.updatePositionOnPageTimer)>this.timeBetweenUpdates)
{this.updatePositionOnPageTimer=new Date();var cm=Position.cumulativeOffset(this.eventDiv);this.mapPos=new Point(cm[0],cm[1]);}},addAListener:function(object)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',813,'{this.updatePositionOnPageTimer=new Date();var cm=Position.cumulativeOffset(this.eventDiv);this.mapPos=new Point(cm[0],cm[1]);}},addAListener:','function(object)',arguments);this.newEventListeners.push(object);this.sortListeners();},sortListeners:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',814,'this.newEventListeners.push(object);this.sortListeners();},sortListeners:','function()',arguments);this.newEventListeners=this.newEventListeners.sortBy(function(listener){return listener.eventPriority;});},addListener:function(type,returnFunction,refObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',815,'this.newEventListeners=this.newEventListeners.sortBy(function(listener){return listener.eventPriority;});},addListener:','function(type,returnFunction,refObj)',arguments);var observeFunction=returnFunction.bindAsEventListener(refObj);if(!this.eventListeners[type])
{this.eventListeners[type]=[];}
this.eventListeners[type].push(observeFunction);Event.observe(this.eventDiv,type,observeFunction);return observeFunction;},removeListener:function(type,returnFunctioned)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',818,'this.eventListeners[type].push(observeFunction);Event.observe(this.eventDiv,type,observeFunction);return observeFunction;},removeListener:','function(type,returnFunctioned)',arguments);Event.stopObserving(this.eventDiv,type,returnFunctioned);this.eventListeners[type]=this.eventListeners[type].without(returnFunctioned);},clearListeners:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',819,'Event.stopObserving(this.eventDiv,type,returnFunctioned);this.eventListeners[type]=this.eventListeners[type].without(returnFunctioned);},clearListeners:','function()',arguments);this.eventListeners.each
(function(ls)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',821,'(','function(ls)',arguments);ls.value.each(val)
{this.removeListener(ls.key,val);}});},setCursor:function(style)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',823,'{this.removeListener(ls.key,val);}});},setCursor:','function(style)',arguments);},getCursor:function(style)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',824,'},getCursor:','function(style)',arguments);}}
EzMapsEvent={click:function(){},dblclick:function(){},mousedown:function(){},mouseup:function(){},mouseover:function(){},mousemove:function(){},mouseout:function(){},keypress:function(){},keydown:function(){},keyup:function(){},load:function(){},unload:function(){},abort:function(){},error:function(){},resize:function(){},scroll:function(){},select:function(){},change:function(){},submit:function(){},reset:function(){},focus:function(){},blur:function(){},contextmenu:function(){}};var ezMapsController=Class.create();ezMapsController.prototype={containerDivs:null,mapStatus:null,widgets:null,mapOptions:null,initialize:function(mapDiv,mapOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',826,'EzMapsEvent={click:function(){},dblclick:function(){},mousedown:function(){},mouseup:function(){},mouseover:function(){},mousemove:function(){},mouseout:function(){},keypress:function(){},keydown:function(){},keyup:function(){},load:function(){},unload:function(){},abort:function(){},error:function(){},resize:function(){},scroll:function(){},select:function(){},change:function(){},submit:function(){},reset:function(){},focus:function(){},blur:function(){},contextmenu:function(){}};var ezMapsController=Class.create();ezMapsController.prototype={containerDivs:null,mapStatus:null,widgets:null,mapOptions:null,initialize:','function(mapDiv,mapOptions)',arguments);this.makeContainerDivs(mapDiv);this.mapOptions={containerDivs:this.containerDivs};Object.extend(this.mapOptions,mapOptions||{});this.mapStatus=new MapStatus(this.mapOptions);},toggleLock:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',827,'this.makeContainerDivs(mapDiv);this.mapOptions={containerDivs:this.containerDivs};Object.extend(this.mapOptions,mapOptions||{});this.mapStatus=new MapStatus(this.mapOptions);},toggleLock:','function()',arguments);this.mapStatus.toggleLock();},isLocked:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',828,'this.mapStatus.toggleLock();},isLocked:','function()',arguments);return this.mapStatus.isLocked();},getState:function(blnReturnAsObject)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',829,'return this.mapStatus.isLocked();},getState:','function(blnReturnAsObject)',arguments);var blnReturnAsObject=(typeof(blnReturnAsObject)!="undefined")?blnReturnAsObject:false;var state=(blnReturnAsObject)?this.mapStatus.getState():Object.toJSON(this.mapStatus.getState());return state;},setState:function(strJson)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',830,'var blnReturnAsObject=(typeof(blnReturnAsObject)!="undefined")?blnReturnAsObject:false;var state=(blnReturnAsObject)?this.mapStatus.getState():Object.toJSON(this.mapStatus.getState());return state;},setState:','function(strJson)',arguments);return this.mapStatus.setState(strJson.evalJSON());},startNoCacheMode:function(objNoCacheOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',831,'return this.mapStatus.setState(strJson.evalJSON());},startNoCacheMode:','function(objNoCacheOptions)',arguments);this.mapStatus.startNoCacheMode(objNoCacheOptions);},endNoCacheMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',832,'this.mapStatus.startNoCacheMode(objNoCacheOptions);},endNoCacheMode:','function()',arguments);this.mapStatus.endNoCacheMode();},makeContainerDivs:function(mapDiv)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',833,'this.mapStatus.endNoCacheMode();},makeContainerDivs:','function(mapDiv)',arguments);this.containerDivs=$H();this.containerDivs.mapDiv=$(mapDiv);this.containerDivs.mapDiv.makePositioned();this.containerDivs.widgetsContainers={};this.makeLayersContainer();this.containerDivs.widgetsContainers.below=this.makeWidgetsContainer("widgetsBottom");this.makeEventDiv();this.containerDivs.widgetsContainers.above=this.makeWidgetsContainer("widgetsTop");},makeLayersContainer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',834,'this.containerDivs=$H();this.containerDivs.mapDiv=$(mapDiv);this.containerDivs.mapDiv.makePositioned();this.containerDivs.widgetsContainers={};this.makeLayersContainer();this.containerDivs.widgetsContainers.below=this.makeWidgetsContainer("widgetsBottom");this.makeEventDiv();this.containerDivs.widgetsContainers.above=this.makeWidgetsContainer("widgetsTop");},makeLayersContainer:','function()',arguments);this.layersContainer=new Element("div");this.containerDivs.mapDiv.appendChild(this.layersContainer);Element.addClassName(this.layersContainer,"layers");},makeEventDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',835,'this.layersContainer=new Element("div");this.containerDivs.mapDiv.appendChild(this.layersContainer);Element.addClassName(this.layersContainer,"layers");},makeEventDiv:','function()',arguments);this.containerDivs.eventContainer=new Element("div");Element.addClassName(this.containerDivs.eventContainer,"eventLayer");this.containerDivs.mapDiv.appendChild(this.containerDivs.eventContainer);},makeWidgetsContainer:function(css)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',836,'this.containerDivs.eventContainer=new Element("div");Element.addClassName(this.containerDivs.eventContainer,"eventLayer");this.containerDivs.mapDiv.appendChild(this.containerDivs.eventContainer);},makeWidgetsContainer:','function(css)',arguments);widgetsContainer=new Element("div");this.containerDivs.mapDiv.appendChild(widgetsContainer);Element.addClassName(widgetsContainer,css);return widgetsContainer;},setMapStackObjects:function(mapStackObjects)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',837,'widgetsContainer=new Element("div");this.containerDivs.mapDiv.appendChild(widgetsContainer);Element.addClassName(widgetsContainer,css);return widgetsContainer;},setMapStackObjects:','function(mapStackObjects)',arguments);this.mapStatus.setMapStackObjects(mapStackObjects);},showEventDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',838,'this.mapStatus.setMapStackObjects(mapStackObjects);},showEventDiv:','function()',arguments);this.containerDivs.eventContainer.show();},hideEventDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',839,'this.containerDivs.eventContainer.show();},hideEventDiv:','function()',arguments);this.containerDivs.eventContainer.hide();},setZoomLevel:function(newLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',840,'this.containerDivs.eventContainer.hide();},setZoomLevel:','function(newLevel)',arguments);this.mapStatus.setZoomCenter(newLevel)},jumpToPoint:function(pointOnMap,newZoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',841,'this.mapStatus.setZoomCenter(newLevel)},jumpToPoint:','function(pointOnMap,newZoomLevel)',arguments);this.mapStatus.jumpToPoint(pointOnMap,newZoomLevel)},showMessage:function(innerHTML,options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',842,'this.mapStatus.jumpToPoint(pointOnMap,newZoomLevel)},showMessage:','function(innerHTML,options)',arguments);this.mapStatus.showMessage(innerHTML,options);},easeToPoint:function(pointOnMap)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',843,'this.mapStatus.showMessage(innerHTML,options);},easeToPoint:','function(pointOnMap)',arguments);this.mapStatus.easeToPoint(pointOnMap);},moveMap:function(layerOffsetX,layerOffsetY)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',844,'this.mapStatus.easeToPoint(pointOnMap);},moveMap:','function(layerOffsetX,layerOffsetY)',arguments);this.mapStatus.setLayerOffset(new Point(layerOffsetX,layerOffsetY));},jumpToPoints:function(points,dontSetZoomLevel,blnWithinRanges)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',845,'this.mapStatus.setLayerOffset(new Point(layerOffsetX,layerOffsetY));},jumpToPoints:','function(points,dontSetZoomLevel,blnWithinRanges)',arguments);return this.mapStatus.jumpToPoints(points,dontSetZoomLevel,blnWithinRanges)},incrementZoomLevel:function(amount)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',846,'return this.mapStatus.jumpToPoints(points,dontSetZoomLevel,blnWithinRanges)},incrementZoomLevel:','function(amount)',arguments);this.mapStatus.incrementZoomLevel(amount)},addWidget:function(key)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',847,'this.mapStatus.incrementZoomLevel(amount)},addWidget:','function(key)',arguments);return this.mapStatus.widgets.addWidget(key);},createHorizontalToolbarElement:function(html,def)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',848,'return this.mapStatus.widgets.addWidget(key);},createHorizontalToolbarElement:','function(html,def)',arguments);return this.mapStatus.widgets.createHorizontalToolbarElement(html,def);},makeNewLayer:function(mapStackId,layerDiv)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',849,'return this.mapStatus.widgets.createHorizontalToolbarElement(html,def);},makeNewLayer:','function(mapStackId,layerDiv)',arguments);return this.makeGenericLayer(Layer,mapStackId,layerDiv);},makeNewLayerServerLayer:function(layerId,layerDiv)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',850,'return this.makeGenericLayer(Layer,mapStackId,layerDiv);},makeNewLayerServerLayer:','function(layerId,layerDiv)',arguments);return this.makeGenericLayer(MSLayer,layerId,layerDiv);},makeGenericLayer:function(objectType,mapStackId,layerDiv)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',851,'return this.makeGenericLayer(MSLayer,layerId,layerDiv);},makeGenericLayer:','function(objectType,mapStackId,layerDiv)',arguments);var layer=new objectType(this.mapStatus,mapStackId);if(layerDiv)
{layer.setLayerDiv(layerDiv);}
else
{layer.makeLayerDiv(this.layersContainer);}
return layer;}};var MapStatus=Class.create();MapStatus.prototype={initialize:function(mapOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',856,'return layer;}};var MapStatus=Class.create();MapStatus.prototype={initialize:','function(mapOptions)',arguments);this.intInstanceId=Math.random();this.mapOptions={default27700:{TLY:1.3e+06,TLX:-200000,BRY:-100000,BRX:700000},default29900:{TLY:470000,TLX:0,BRY:0,BRX:380000},default4318:{TLY:90,TLX:-180,BRY:-90,BRX:180},refreshRate:0.75,layout:"layer",layouts:{layer:{"msLayer":{style:{width:"100%",left:"0px"}},"layerLeft":{style:{width:"100%",left:"0px"}},"layerRight":{style:{width:"100%",left:"0px"}}},mirrored:{"msLayer":{style:{width:"50%",left:"0px"}},"layerLeft":{style:{width:"50%",left:"0px"}},"layerRight":{style:{width:"50%",left:"50%"}}},stitched:{"msLayer":{style:{width:"100%",left:"0px"}},"layerLeft":{style:{width:"50%",left:"0%"}},"layerRight":{style:{width:"50%",left:"50%"},offset:{"width":"self"}}}},mapStacks:$H(window["defaultMapStack"]),freezeMap:false,zoomLevel:10,centerPoint:new Point(248269.97756328125,53219.06066015625,27700),sessionId:"guest",strMapCacheSymlinkName:"guest",mapCacheUrl:"http://mapcache.ulearn.infomapper.com",mapLayerServerUrl:"http://layerserver.ulearn.infomapper.com",scalesArray_NonWorldAtlas:new Array(1250,2500,5000,10000,20000,40000,80000,160000,320000,640000,1280000,2560000,5120000,10240000,20480000,40960000,81920000,163840000,327680000),scalesArray_WorldAtlas:new Array(5120000,5120000,5120000,5120000,5120000,5120000,5120000,5120000,5120000,5120000,5120000,5120000,5120000,10240000,20480000,40960000,81920000,163840000,327680000),scalesArray_HereIsOurSchool:new Array(1250,2500,5000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000,10000),scalesArray:new Array(),layerOffset:new Point(),upDated:false,zoomPoint:null,locked:false,eventsToggle:true,defaultDimensions:new Point(256,256),mapDetails:$H(window["defaultMapDetails"]),strBehaviourMode:'standard',blnLimitExtents:false,objExtentsLimit:{},blnDisallowZooming:false,blnEnableTileSubdomains:false,strBandwidthMode:'standard',blnPlaylistMode:false,intPlaylistViewId:null,blnNoCacheMode:false,objNoCacheOptions:{}};this.mapOptions.scalesArray=this.mapOptions.scalesArray_NonWorldAtlas;Object.extend(this.mapOptions,mapOptions||{});this.initialCenterPoint=this.mapOptions.centerPoint.clone();this.centerPoint=this.mapOptions.centerPoint.clone();this.upDated=false;this.layersArray=new Array();this.setMapStacks(this.mapOptions.mapStacks);this.widgets=new Widgets(this.mapOptions.containerDivs.widgetsContainers,this);this.eventHandler=new EventHandler(this.mapOptions.containerDivs.eventContainer,this);this.mapEasingTool=new MapEasingTool(this);this.ezMessage=new EzMessage(this.mapOptions.containerDivs.widgetsContainers,this);this.setZoomLevel(this.getZoomAmount());this.jumpToPoint(this.centerPoint);this.startUpdateTimer();switch(this.mapOptions.strBehaviourMode)
{case'':case'standard':break;case'hereIsOurSchool_Embed':this.mapOptions.blnLimitExtents=true;this.mapOptions.scalesArray=this.mapOptions.scalesArray_HereIsOurSchool;break;case'hereIsOurSchool_External':this.mapOptions.blnLimitExtents=true;this.mapOptions.scalesArray=this.mapOptions.scalesArray_HereIsOurSchool;break;}},setEventsOn:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',858,'{case\'\':case\'standard\':break;case\'hereIsOurSchool_Embed\':this.mapOptions.blnLimitExtents=true;this.mapOptions.scalesArray=this.mapOptions.scalesArray_HereIsOurSchool;break;case\'hereIsOurSchool_External\':this.mapOptions.blnLimitExtents=true;this.mapOptions.scalesArray=this.mapOptions.scalesArray_HereIsOurSchool;break;}},setEventsOn:','function()',arguments);this.mapOptions.eventsToggle=true;},setEventsOff:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',859,'this.mapOptions.eventsToggle=true;},setEventsOff:','function()',arguments);this.mapOptions.eventsToggle=false;},getEventsStatus:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',860,'this.mapOptions.eventsToggle=false;},getEventsStatus:','function()',arguments);return this.mapOptions.eventsToggle;},toggleLock:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',861,'return this.mapOptions.eventsToggle;},toggleLock:','function()',arguments);this.mapOptions.locked=!this.mapOptions.locked;},isLocked:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',862,'this.mapOptions.locked=!this.mapOptions.locked;},isLocked:','function()',arguments);return this.mapOptions.locked;},getMapOptions:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',863,'return this.mapOptions.locked;},getMapOptions:','function()',arguments);return{"mapCacheUrl":this.mapOptions.mapCacheUrl,"mapDetails":this.mapOptions.mapDetails,"mapStacks":this.mapOptions.mapStacks,"sessionId":this.mapOptions.sessionId,"strMapCacheSymlinkName":this.mapOptions.strMapCacheSymlinkName};},getState:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',864,'return{"mapCacheUrl":this.mapOptions.mapCacheUrl,"mapDetails":this.mapOptions.mapDetails,"mapStacks":this.mapOptions.mapStacks,"sessionId":this.mapOptions.sessionId,"strMapCacheSymlinkName":this.mapOptions.strMapCacheSymlinkName};},getState:','function()',arguments);var stateObject={};stateObject.centerPoint=this.getCenterPointOnMap();stateObject.extents=this.getScreenExt();stateObject.layerState=this.layersArray.invoke("getState");stateObject.zoomLevel=this.getZoomAmount();stateObject.layout=this.mapOptions.layout;arrTiles=this.layersArray[1].getLayerTiles();var arrTiles=$A(arrTiles);var arrStreamlinedTiles=[];arrTiles.each(function(arrTileRow)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',865,'var stateObject={};stateObject.centerPoint=this.getCenterPointOnMap();stateObject.extents=this.getScreenExt();stateObject.layerState=this.layersArray.invoke("getState");stateObject.zoomLevel=this.getZoomAmount();stateObject.layout=this.mapOptions.layout;arrTiles=this.layersArray[1].getLayerTiles();var arrTiles=$A(arrTiles);var arrStreamlinedTiles=[];arrTiles.each(','function(arrTileRow)',arguments);$A(arrTileRow).each(function(objTile)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',866,'$A(arrTileRow).each(','function(objTile)',arguments);arrStreamlinedTiles.push({intXNum:objTile.tileVariables['[x]'],intYNum:objTile.tileVariables['[y]']});}.bind(this));}.bind(this));stateObject.tiles=arrStreamlinedTiles;return stateObject;},setState:function(stateObject)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',867,'arrStreamlinedTiles.push({intXNum:objTile.tileVariables[\'[x]\'],intYNum:objTile.tileVariables[\'[y]\']});}.bind(this));}.bind(this));stateObject.tiles=arrStreamlinedTiles;return stateObject;},setState:','function(stateObject)',arguments);if(typeof stateObject.layerState=="object")
{var mapChanges=[];var l=this.layersArray.size();for(var i=0;i<l;i++)
{if(stateObject.layerState[i])
{var layerStatus=this.layersArray[i];var oldId=layerStatus.getStackId()||layerStatus.getMapId();this.layersArray[i].setState(stateObject.layerState[i]);var newId=layerStatus.getStackId()||layerStatus.getMapId();if(layerStatus.getLayerType()=='layer'&&oldId!=newId)
{mapChanges.push({layerNum:i,mapId:this.sanitiseMapId(newId)});}}}
if(mapChanges.length>0&&this.mapOptions.mapChangeCallback)
{this.mapOptions.mapChangeCallback(mapChanges);}}
if(typeof stateObject.centerPoint=="object"&&typeof stateObject.zoomLevel=="number")
{var point=MakePoint(stateObject.centerPoint);var cp=this.getCenterPoint();this.mapOptions.zoomPoint=null;this.moveToRelativePoint(point,stateObject.zoomLevel,this.getClickRatio(cp));}
if(typeof stateObject.layout=="string")
this.setViewMode(stateObject.layout);},sanitiseMapId:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',878,'this.setViewMode(stateObject.layout);},sanitiseMapId:','function(id)',arguments);return(id+"").split("_").last();},startUpdateTimer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',879,'return(id+"").split("_").last();},startUpdateTimer:','function()',arguments);this.stopUpdateTimer();if(blnUseJQuery===true)
{$j(document).everyTime(this.mapOptions.refreshRate*1000,'ezMapsUpdateTimer'+this.intInstanceId,jQuery.proxy(this.onEnterframe,this));}
else
{this.startUpdateObject=new PeriodicalExecuter(this.onEnterframe.bind(this),this.mapOptions.refreshRate);}},stopUpdateTimer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',883,'{this.startUpdateObject=new PeriodicalExecuter(this.onEnterframe.bind(this),this.mapOptions.refreshRate);}},stopUpdateTimer:','function()',arguments);if(blnUseJQuery===true)
{$j(document).stopTime('ezMapsUpdateTimer'+this.intInstanceId);}
else
{if(this.startUpdateObject)
{this.startUpdateObject.stop();}}},onEnterframe:function(pe)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',888,'{this.startUpdateObject.stop();}}},onEnterframe:','function(pe)',arguments);if(!this.getEventsStatus())
{return;}
if(blnUseJQuery===true)
{if($j('#ezMaps').innerWidth()==0)
{return;}}
else
{if($('ezMaps').getWidth()==0)
{return;}}
this.widgets.updateWidgets();if(this.upDated)
{this.updateLayersAndWidgets();}
this.updateScreenDimensions();},updateLayersAndWidgets:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',899,'this.updateScreenDimensions();},updateLayersAndWidgets:','function()',arguments);this.upDated=false;this.updateCenterPointBuffer();this.updateLayers();this.widgets.updateRealTimeWidgets();},updateCenterPointBuffer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',900,'this.upDated=false;this.updateCenterPointBuffer();this.updateLayers();this.widgets.updateRealTimeWidgets();},updateCenterPointBuffer:','function()',arguments);this.centerPoint=this.getCenterPointOnMap();},getCenterPointBuffer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',901,'this.centerPoint=this.getCenterPointOnMap();},getCenterPointBuffer:','function()',arguments);return this.centerPoint;},moveLayers:function(x,y,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',902,'return this.centerPoint;},moveLayers:','function(x,y,event)',arguments);if(!this.mapOptions.freezeMap)
{if(this.mapOptions.blnLimitExtents)
{var point=this.getPointFromEvent(event);var relativePoint=this.getRelativePoint(point);var pointOnMap=this.getPointOnTopLayer(relativePoint);var intMetersFromBoundaryToCheck=10;if((pointOnMap.x-intMetersFromBoundaryToCheck)<=this.mapOptions.objExtentsLimit.intMinX)
{return false;}
if((pointOnMap.x+intMetersFromBoundaryToCheck)>=this.mapOptions.objExtentsLimit.intMaxX)
{return false;}
if((pointOnMap.y-intMetersFromBoundaryToCheck)<=this.mapOptions.objExtentsLimit.intMinY)
{return false;}
if((pointOnMap.y+intMetersFromBoundaryToCheck)>=this.mapOptions.objExtentsLimit.intMaxY)
{return false;}}
this.mapOptions.layerOffset.x+=x;this.mapOptions.layerOffset.y+=y;this.layersArray.invoke("moveLayer");this.widgets.moveWidgets();this.setLayersToBeUpdated();}
return true;},freezeMaps:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',914,'return true;},freezeMaps:','function()',arguments);this.mapOptions.freezeMap=true;},unfreezeMaps:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',915,'this.mapOptions.freezeMap=true;},unfreezeMaps:','function()',arguments);this.mapOptions.freezeMap=false;},resetLayers:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',916,'this.mapOptions.freezeMap=false;},resetLayers:','function()',arguments);this.layersArray.invoke('resetLayer');this.setLayersToBeUpdated();},addLayer:function(layer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',917,'this.layersArray.invoke(\'resetLayer\');this.setLayersToBeUpdated();},addLayer:','function(layer)',arguments);return this.layersArray.unshift(layer);},removeLayer:function(layer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',918,'return this.layersArray.unshift(layer);},removeLayer:','function(layer)',arguments);this.layersArray=this.layersArray.without(layer);},updateLayers:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',919,'this.layersArray=this.layersArray.without(layer);},updateLayers:','function()',arguments);this.layersArray.invoke('updateLayer');if(this.mapOptions.mapMoveCallback)
{this.mapOptions.mapMoveCallback();}},incrementZoomLevelToPointOnScreen:function(point,amount)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',921,'{this.mapOptions.mapMoveCallback();}},incrementZoomLevelToPointOnScreen:','function(point,amount)',arguments);var newZoomLevel=this.getZoomAmount()+amount;var activeLayer=this.layersArray[this.getActiveLayer()];var mapDetails=this.getMapDetails(activeLayer.getMapId());if(this.mapOptions.module!='ytn')
{if((typeof(mapDetails['map_view_lower_range'])!='undefined')&&(newZoomLevel<mapDetails['map_view_lower_range']))
{newZoomLevel=mapDetails['map_view_lower_range'];}
if((typeof(mapDetails['map_view_upper_range'])!='undefined')&&(newZoomLevel>mapDetails['map_view_upper_range']))
{newZoomLevel=mapDetails['map_view_upper_range'];}}
var RefPoint=this.getRelativePoint(point);this.mapOptions.zoomPoint=RefPoint;this.setZoomLevelToPoint(RefPoint,newZoomLevel);},incrementZoomLevel:function(amount)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',927,'var RefPoint=this.getRelativePoint(point);this.mapOptions.zoomPoint=RefPoint;this.setZoomLevelToPoint(RefPoint,newZoomLevel);},incrementZoomLevel:','function(amount)',arguments);var newZoomLevel=this.getZoomAmount()+amount;var activeLayer=this.layersArray[this.getActiveLayer()];var mapDetails=this.getMapDetails(activeLayer.getMapId());if(this.mapOptions.module!='ytn')
{if((typeof(mapDetails['map_view_lower_range'])!='undefined')&&(newZoomLevel<mapDetails['map_view_lower_range']))
{newZoomLevel=mapDetails['map_view_lower_range'];}
if((typeof(mapDetails['map_view_upper_range'])!='undefined')&&(newZoomLevel>mapDetails['map_view_upper_range']))
{newZoomLevel=mapDetails['map_view_upper_range'];}}
this.setZoomCenter(newZoomLevel);},setZoomLevelToPoint:function(point,newZoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',933,'this.setZoomCenter(newZoomLevel);},setZoomLevelToPoint:','function(point,newZoomLevel)',arguments);newZoomLevel=Math.min(newZoomLevel,this.mapOptions.scalesArray.length-1);newZoomLevel=Math.max(newZoomLevel,0);var pointRatio=this.getClickRatio(point);var pointOnTopLayer=this.getPointOnMap(point,this.mapOptions.defaultDimensions,this.getSrid());this.moveToRelativePoint(pointOnTopLayer,newZoomLevel,pointRatio);},getClickRatio:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',934,'newZoomLevel=Math.min(newZoomLevel,this.mapOptions.scalesArray.length-1);newZoomLevel=Math.max(newZoomLevel,0);var pointRatio=this.getClickRatio(point);var pointOnTopLayer=this.getPointOnMap(point,this.mapOptions.defaultDimensions,this.getSrid());this.moveToRelativePoint(pointOnTopLayer,newZoomLevel,pointRatio);},getClickRatio:','function(point)',arguments);var pointRatio=new Point();var screenDim=this.getScreenDimensions();pointRatio.x=(point.x-screenDim.TLX)/(screenDim.BRX-screenDim.TLX);pointRatio.y=(point.y-screenDim.BRY)/(screenDim.TLY-screenDim.BRY);return pointRatio;},moveToRelativePoint:function(pointOnTopLayer,newZoomLevel,onscreenRatio)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',935,'var pointRatio=new Point();var screenDim=this.getScreenDimensions();pointRatio.x=(point.x-screenDim.TLX)/(screenDim.BRX-screenDim.TLX);pointRatio.y=(point.y-screenDim.BRY)/(screenDim.TLY-screenDim.BRY);return pointRatio;},moveToRelativePoint:','function(pointOnTopLayer,newZoomLevel,onscreenRatio)',arguments);newZoomLevel=Math.min(newZoomLevel,this.mapOptions.scalesArray.length-1);var srid=this.getSrid(null,newZoomLevel);var point=pointOnTopLayer["get"+srid]();var screenDim=this.getScreenDimensions();var totalMapWidth=this.getGeographicWidth(this.getZoomLevel(newZoomLevel),this.mapOptions.defaultDimensions,srid);var tile=Geocode.getEnlosingTile(point,totalMapWidth);var tileExt=Geocode.getExtentsFromTileNumber(tile,totalMapWidth);var groundRatio=Geocode.getGroundRatioFromExtents(tileExt,this.mapOptions.defaultDimensions);var newExt=Geocode.getExtentsFromGroundRatioRefPointRatio(groundRatio,point,onscreenRatio,screenDim);if(newZoomLevel!=this.getZoomAmount()||!this.refPoint||srid!=pointOnTopLayer.srid)
{this.setZoomLevel(newZoomLevel);var rp=new Point(newExt.TLX,newExt.BRY,srid);this.setReferencePoint(rp);this.resetLayers();}
else if(newZoomLevel==this.getZoomAmount())
{this.easeToPoint(pointOnTopLayer);}},setMapStacks:function(mapStacks)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',939,'{this.easeToPoint(pointOnTopLayer);}},setMapStacks:','function(mapStacks)',arguments);this.mapStackObjects=$H();$H(mapStacks).each(function(pair)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',940,'this.mapStackObjects=$H();$H(mapStacks).each(','function(pair)',arguments);this.addMapStack(pair.key,pair.value);}.bind(this));},setMapStackObjects:function(mapStackObjects)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',941,'this.addMapStack(pair.key,pair.value);}.bind(this));},setMapStackObjects:','function(mapStackObjects)',arguments);this.mapStackObjects=mapStackObjects;},addMapStack:function(stackId,stack)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',942,'this.mapStackObjects=mapStackObjects;},addMapStack:','function(stackId,stack)',arguments);if(!this.mapStackObjects[stackId])
{this.mapStackObjects[stackId]=new MapStack(this.mapOptions.mapDetails,stack);}},getStackIds:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',944,'{this.mapStackObjects[stackId]=new MapStack(this.mapOptions.mapDetails,stack);}},getStackIds:','function()',arguments);return this.mapStackObjects.keys();},getMapIds:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',945,'return this.mapStackObjects.keys();},getMapIds:','function()',arguments);return $H(this.mapOptions.mapDetails).keys();},getMapDetails:function(mapId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',946,'return $H(this.mapOptions.mapDetails).keys();},getMapDetails:','function(mapId)',arguments);return this.mapOptions.mapDetails[mapId];},getAllMapDetails:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',947,'return this.mapOptions.mapDetails[mapId];},getAllMapDetails:','function()',arguments);return this.mapOptions.mapDetails;},getMaximumExtents:function(mapId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',948,'return this.mapOptions.mapDetails;},getMaximumExtents:','function(mapId)',arguments);var mapDetails=this.getMapDetails(mapId);if(!mapDetails)
{return{ext:this.mapOptions["default"+this.getSrid()],srid:this.getSrid()};}
else if(!(mapDetails.map_extents_TLX&&mapDetails.map_extents_BRX&&mapDetails.map_extents_BRY&&mapDetails.map_extents_TLY))
{return{ext:this.mapOptions["default"+mapDetails.srid],srid:mapDetails.srid};}
else
{return{ext:{BRX:mapDetails.map_extents_BRX,TLX:mapDetails.map_extents_TLX,BRY:mapDetails.map_extents_BRY,TLY:mapDetails.map_extents_TLY},srid:mapDetails.srid};}},setZoomLevel:function(newZoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',954,'{return{ext:{BRX:mapDetails.map_extents_BRX,TLX:mapDetails.map_extents_TLX,BRY:mapDetails.map_extents_BRY,TLY:mapDetails.map_extents_TLY},srid:mapDetails.srid};}},setZoomLevel:','function(newZoomLevel)',arguments);if(typeof(newZoomLevel)!="number"||newZoomLevel>=this.mapOptions.scalesArray.length||newZoomLevel<0)
{return false;}
else
{this.mapOptions.previousZoomLevel=this.mapOptions.zoomLevel;nextZoomLevel=newZoomLevel+1;while(nextZoomLevel<this.mapOptions.scalesArray.length&&this.mapOptions.scalesArray[newZoomLevel]==this.mapOptions.scalesArray[nextZoomLevel]){newZoomLevel++;nextZoomLevel++;}
this.mapOptions.zoomLevel=newZoomLevel;return true;}},getCurrentStackIds:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',959,'this.mapOptions.zoomLevel=newZoomLevel;return true;}},getCurrentStackIds:','function()',arguments);return this.layersArray.invoke('getStackId').without(null);},getCurrentMapIds:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',960,'return this.layersArray.invoke(\'getStackId\').without(null);},getCurrentMapIds:','function()',arguments);var layerIds=this.getGroupedLayerIds()["layer"];var mapIds=new Array();var l=layerIds.size();for(var i=0;i<l;i++)
{mapIds.push(this.layersArray[layerIds[i]].getMapId()*1);};return mapIds.uniq();},getActiveLayerObj:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',962,'{mapIds.push(this.layersArray[layerIds[i]].getMapId()*1);};return mapIds.uniq();},getActiveLayerObj:','function(event)',arguments);var actionLayer=this.getActiveLayer(event);return this.layersArray[actionLayer];},getActiveLayer:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',963,'var actionLayer=this.getActiveLayer(event);return this.layersArray[actionLayer];},getActiveLayer:','function(event)',arguments);var layerIds=this.getGroupedLayerIds()["layer"];if(!layerIds)
{return null;}
var actionLayer=layerIds.first();if((this.mapOptions.layout=="layer"||!event))
{var op=this.getLayerOpacity(actionLayer);if(op<0.5)
{actionLayer=layerIds.last();}}
else if(event)
{var point=this.getPointFromEvent(event);var screenExt=this.getScreenDimensions();if(point.x>screenExt.BRX/2)
{actionLayer=layerIds.last();}}
return actionLayer;},setLayerToMapId:function(layerId,id,stackName,blnJumpToExtents)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',972,'return actionLayer;},setLayerToMapId:','function(layerId,id,stackName,blnJumpToExtents)',arguments);var blnJumpToExtents=typeof(blnJumpToExtents)!='undefined'?blnJumpToExtents:true;if(layerId=="2"&&id=="0")
{var stackId=this.makeStack(id,stackName);this.switchStackId("2","0",blnJumpToExtents);}
else
{var stackId=this.makeStack(id,stackName);this.switchStackId(layerId,stackId,blnJumpToExtents);}},makeStack:function(id,stackName)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',976,'{var stackId=this.makeStack(id,stackName);this.switchStackId(layerId,stackId,blnJumpToExtents);}},makeStack:','function(id,stackName)',arguments);var stackId=(stackName||"map")+"_"+id;if(id!="0")var mapDetails=this.getMapDetails(id);var stack={name:stackName,mapIds:[id],mapRanges:new Array()};if(id=="0")
{stack.mapRanges.push({mapId:id,start:0,end:0});}
else
{stack.mapRanges.push({mapId:id,start:mapDetails["map_view_lower_threshold"]||0,end:mapDetails["map_view_upper_threshold"]||19});}
this.addMapStack(stackId,stack);return stackId;},switchLayerStackId:function(id,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',981,'this.addMapStack(stackId,stack);return stackId;},switchLayerStackId:','function(id,event)',arguments);var stackId=this.getStackIdFromId(id);var actionLayer=this.getActiveLayer(event);this.switchStackId(actionLayer,stackId);},switchStackId:function(actionLayer,id,blnJumpToExtents)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',982,'var stackId=this.getStackIdFromId(id);var actionLayer=this.getActiveLayer(event);this.switchStackId(actionLayer,stackId);},switchStackId:','function(actionLayer,id,blnJumpToExtents)',arguments);var blnJumpToExtents=typeof(blnJumpToExtents)!='undefined'?blnJumpToExtents:true;if(id=="0")
{var layerStatus=this.layersArray[actionLayer];var oldId=layerStatus.getStackId()||layerStatus.getMapId();layerStatus.opacity="0";layerStatus.setOpacity(layerStatus.opacity);}
else
{var stackId=this.getStackIdFromId(id);if(this.areStackSridCompatible(this.layersArray[actionLayer].getStackId(),stackId))
{var layerStatus=this.layersArray[actionLayer];var oldId=layerStatus.getStackId()||layerStatus.getMapId();this.layersArray[actionLayer].setStackId(stackId);this.setLayersToBeUpdated();var newId=layerStatus.getStackId()||layerStatus.getMapId();if(((layerStatus.getLayerType()=='layer')&&(oldId!=newId)))
{if(this.mapOptions.mapChangeCallback)
{this.mapOptions.mapChangeCallback([{layerNum:actionLayer,mapId:this.sanitiseMapId(newId)}]);}}}
else
{this.pushLayerStackId(stackId,blnJumpToExtents);}
if(blnJumpToExtents===true)
{this.jumpToExtIfNotOverMapArea();}}},pushLayerStackId:function(id,blnJumpToExtents)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',993,'{this.jumpToExtIfNotOverMapArea();}}},pushLayerStackId:','function(id,blnJumpToExtents)',arguments);var blnJumpToExtents=typeof(blnJumpToExtents)!='undefined'?blnJumpToExtents:true;var stackId=this.getStackIdFromId(id);var srid=this.getSrid(stackId);var sridOld=this.getSrid();var stackIds=this.getCurrentStackIds();var centerPoint=this.getCenterPoint();var centerOnLayer=this.getPointOnMap(centerPoint,this.mapOptions.defaultDimensions,this.getSrid());var mapChanges=[];stackIds.unshift(stackId);var l=this.layersArray.size();for(var i=0;i<l;i++)
{if(this.layersArray[i].getLayerType()!="msLayer")
{var layerStatus=this.layersArray[i];var oldId=layerStatus.getStackId()||layerStatus.getMapId();var stackLayerId=stackIds.shift();stackLayerId=(this.areStackSridCompatible(stackId,stackLayerId))?stackLayerId:stackId;this.layersArray[i].setStackId(stackLayerId);var newId=layerStatus.getStackId()||layerStatus.getMapId();if(oldId!=newId)
{mapChanges.push({layerNum:i,mapId:this.sanitiseMapId(newId)});}}};if(mapChanges.length>0&&this.mapOptions.mapChangeCallback)
{this.mapOptions.mapChangeCallback(mapChanges);}
if(srid!=sridOld)
{var pointRatio=this.getClickRatio(centerPoint);this.mapOptions.zoomPoint=null;this.moveToRelativePoint(centerOnLayer,this.getZoomAmount(),pointRatio);}
if(blnJumpToExtents===true)
{this.jumpToExtIfNotOverMapArea();}
this.setLayersToBeUpdated();},getStackIdFromId:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1003,'this.setLayersToBeUpdated();},getStackIdFromId:','function(id)',arguments);var stackIds=this.getStackIds();var mapIds=this.getMapIds();if(stackIds.indexOf(id*1)!=-1||stackIds.indexOf(id+"")!=-1)
{return id;}
else if(mapIds.indexOf(id+"")!=-1||mapIds.indexOf(id*1)!=-1)
{return this.makeStack(id,"Map");}
else if(typeof id=="string"&&(mapIds.indexOf(id.split("_").last()*1)!=-1||mapIds.indexOf(id.split("_").last()+"")!=-1))
{var idbits=id.split("_");return this.makeStack(idbits.last(),idbits.first());}
return null;},areStackSridCompatible:function(stackA,stackB)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1010,'return null;},areStackSridCompatible:','function(stackA,stackB)',arguments);return this.mapStackObjects[stackA].compatible(this.mapStackObjects[stackB]);},mapIsWithinExtents:function(intMapId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1011,'return this.mapStackObjects[stackA].compatible(this.mapStackObjects[stackB]);},mapIsWithinExtents:','function(intMapId)',arguments);var objMapExtents=this.getMaximumExtents(intMapId);var intSrid=this.getSrid();var objTileDimensions=this.mapOptions.defaultDimensions;var objScreenExtents=this.getScreenExt(objTileDimensions,intSrid);var blnOnMap=objScreenExtents.BRX>objMapExtents.ext.TLX&&objScreenExtents.TLX<objMapExtents.ext.BRX&&objScreenExtents.BRY<objMapExtents.ext.TLY&&objScreenExtents.TLY>objMapExtents.ext.BRY;return blnOnMap;},jumpToExtIfNotOverMapArea:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1012,'var objMapExtents=this.getMaximumExtents(intMapId);var intSrid=this.getSrid();var objTileDimensions=this.mapOptions.defaultDimensions;var objScreenExtents=this.getScreenExt(objTileDimensions,intSrid);var blnOnMap=objScreenExtents.BRX>objMapExtents.ext.TLX&&objScreenExtents.TLX<objMapExtents.ext.BRX&&objScreenExtents.BRY<objMapExtents.ext.TLY&&objScreenExtents.TLY>objMapExtents.ext.BRY;return blnOnMap;},jumpToExtIfNotOverMapArea:','function(event)',arguments);var actionLayer=this.getActiveLayer(event);var intMapId=this.layersArray[actionLayer].getMapId();if(this.mapIsWithinExtents(intMapId)===false)
{this.jumpToExt(this.layersArray[actionLayer].getStackId());}},jumpToExtOfActiveLayer:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1014,'{this.jumpToExt(this.layersArray[actionLayer].getStackId());}},jumpToExtOfActiveLayer:','function(event)',arguments);switch(this.mapOptions.strBehaviourMode)
{case'':case'standard':if(typeof(this.mapOptions.blnDisallowZooming)!="undefined"&&this.mapOptions.blnDisallowZooming!=true)
{var actionLayer=this.getActiveLayer(event);var stackId=this.layersArray[actionLayer].getStackId();this.jumpToExt(stackId);}
else if(typeof(this.initialCenterPoint)!="undefined")
{this.easeToPoint(this.initialCenterPoint);}
break;case'hereIsOurSchool_Embed':this.easeToPoint(this.initialCenterPoint);break;case'hereIsOurSchool_External':this.easeToPoint(this.initialCenterPoint);break;}},jumpToExt:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1020,'break;case\'hereIsOurSchool_Embed\':this.easeToPoint(this.initialCenterPoint);break;case\'hereIsOurSchool_External\':this.easeToPoint(this.initialCenterPoint);break;}},jumpToExt:','function(id)',arguments);var stackId=this.getStackIdFromId(id);var mapId=this.getMapId(stackId);var maxExt=this.getMaximumExtents(mapId);var ext=maxExt.ext;var srid=maxExt.srid;var pointTL=new Point(ext.TLX,ext.TLY,srid);var pointBR=new Point(ext.BRX,ext.BRY,srid);this.jumpToPoints([pointTL,pointBR]);},easeToPoint:function(pointOnMap)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1021,'var stackId=this.getStackIdFromId(id);var mapId=this.getMapId(stackId);var maxExt=this.getMaximumExtents(mapId);var ext=maxExt.ext;var srid=maxExt.srid;var pointTL=new Point(ext.TLX,ext.TLY,srid);var pointBR=new Point(ext.BRX,ext.BRY,srid);this.jumpToPoints([pointTL,pointBR]);},easeToPoint:','function(pointOnMap)',arguments);pointOnMap=(pointOnMap.srid=="Pixel")?pointOnMap:this.getScreenPointFromWorld(pointOnMap);this.mapEasingTool.easeToPoint(pointOnMap);},clearEasing:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1022,'pointOnMap=(pointOnMap.srid=="Pixel")?pointOnMap:this.getScreenPointFromWorld(pointOnMap);this.mapEasingTool.easeToPoint(pointOnMap);},clearEasing:','function()',arguments);this.mapEasingTool.clear();},jumpToPoint:function(point,zl)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1023,'this.mapEasingTool.clear();},jumpToPoint:','function(point,zl)',arguments);zl=(typeof zl=="number")?zl:this.getZoomAmount();var cp=this.getCenterPoint();var clickRatio=this.getClickRatio(cp);this.mapOptions.zoomPoint=null;this.moveToRelativePoint(point,zl,clickRatio);},jumpToPoints:function(points,dontSetZoomLevel,blnWithinRanges)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1024,'zl=(typeof zl=="number")?zl:this.getZoomAmount();var cp=this.getCenterPoint();var clickRatio=this.getClickRatio(cp);this.mapOptions.zoomPoint=null;this.moveToRelativePoint(point,zl,clickRatio);},jumpToPoints:','function(points,dontSetZoomLevel,blnWithinRanges)',arguments);if(this.isLocked())
{return}
var blnWithinRanges=(typeof(blnWithinRanges)!='undefined')?blnWithinRanges:false;var newPoints=new Array();var srid=this.getSrid();var activeLayer=this.layersArray[this.getActiveLayer()];for(var i=0;i<points.length;i++)
{var point=MakePoint(points[i])["get"+srid]();if(activeLayer.isPointOnMap(point))
{newPoints.push(MakePoint(points[i])["get"+srid]());}}
points=newPoints.findAll(function(p)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1030,'points=newPoints.findAll(','function(p)',arguments);return p.x||p.y;})
if(!points.last())
{return false;}
var sortedPointsX=points.sortBy(function(p){return p.x;})
var sortedPointsY=points.sortBy(function(p){return p.y;})
var tileDim=this.mapOptions.defaultDimensions;var screenDim=this.getScreenDimensions();var screenExt=this.getScreenExt(tileDim,srid);var width=sortedPointsX.last().x-sortedPointsX.first().x;var height=sortedPointsY.last().y-sortedPointsY.first().y;var ratioX=width/(screenExt.BRX-screenExt.TLX);var ratioY=height/(screenExt.TLY-screenExt.BRY);var x=(sortedPointsX.last().x-sortedPointsX.first().x)/2+sortedPointsX.first().x;var y=(sortedPointsY.last().y-sortedPointsY.first().y)/2+sortedPointsY.first().y;var newPoint=new Point(x,y,srid);var ratio=Math.max(ratioX,ratioY);var groundScale=this.getZoomLevel()*ratio;var zl=this.mapOptions.scalesArray.find(function(level){return level>=groundScale;})||this.mapOptions.scalesArray.last();if(!dontSetZoomLevel)
{var newZoomLevel=this.mapOptions.scalesArray.indexOf(zl);var activeLayer=this.layersArray[this.getActiveLayer()];var mapDetails=this.getMapDetails(activeLayer.getMapId());if(this.mapOptions.module!='ytn')
{if(blnWithinRanges===true)
{if((typeof(mapDetails['map_view_lower_range'])!='undefined')&&(newZoomLevel<mapDetails['map_view_lower_range']))
{newZoomLevel=mapDetails['map_view_lower_range'];}
if((typeof(mapDetails['map_view_upper_range'])!='undefined')&&(newZoomLevel>mapDetails['map_view_upper_range']))
{newZoomLevel=mapDetails['map_view_upper_range'];}}
else
{if((typeof(mapDetails['map_view_lower_threshold'])!='undefined')&&(newZoomLevel<mapDetails['map_view_lower_threshold']))
{newZoomLevel=mapDetails['map_view_lower_threshold'];}
if((typeof(mapDetails['map_view_upper_threshold'])!='undefined')&&(newZoomLevel>mapDetails['map_view_upper_threshold']))
{newZoomLevel=mapDetails['map_view_upper_threshold'];}}}}
else
{var newZoomLevel=this.getZoomAmount();}
if((typeof(newZoomLevel)=='undefined')&&(this.mapOptions.module!='ytn'))
{newZoomLevel=12;}
var cp=this.getCenterPoint();var clickRatio=this.getClickRatio(cp);this.mapOptions.zoomPoint=null;this.moveToRelativePoint(newPoint,newZoomLevel,clickRatio);newPoints.clear();newPoints=null;return true;},setZoomCenter:function(newZoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1052,'var cp=this.getCenterPoint();var clickRatio=this.getClickRatio(cp);this.mapOptions.zoomPoint=null;this.moveToRelativePoint(newPoint,newZoomLevel,clickRatio);newPoints.clear();newPoints=null;return true;},setZoomCenter:','function(newZoomLevel)',arguments);var centerPoint=this.getCenterPoint();this.mapOptions.zoomPoint=centerPoint;this.setZoomLevelToPoint(centerPoint,newZoomLevel);},getMapRefPoint:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1053,'var centerPoint=this.getCenterPoint();this.mapOptions.zoomPoint=centerPoint;this.setZoomLevelToPoint(centerPoint,newZoomLevel);},getMapRefPoint:','function()',arguments);return this.refPoint;},getPointOnTopLayer:function(refPoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1054,'return this.refPoint;},getPointOnTopLayer:','function(refPoint)',arguments);return this.getPointOnMap(refPoint,this.mapOptions.defaultDimensions,this.getSrid());},getViewMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1055,'return this.getPointOnMap(refPoint,this.mapOptions.defaultDimensions,this.getSrid());},getViewMode:','function()',arguments);return this.mapOptions.layout;},setViewMode:function(mode)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1056,'return this.mapOptions.layout;},setViewMode:','function(mode)',arguments);var layerIds=this.getGroupedLayerIds();var layers=layerIds["layer"];var msLayers=layerIds["msLayer"];var msLayer=this.mapOptions.layouts[mode]["msLayer"];var layerLeft=this.mapOptions.layouts[mode]["layerLeft"];var layerRight=this.mapOptions.layouts[mode]["layerRight"];for(var i=0;i<msLayers.size();i++)
{this.setLayerLayout(msLayers[i],msLayer);}
this.setLayerLayout(layers.first(),layerLeft);for(var i=1;i<layers.size();i++)
{this.setLayerLayout(layers[i],layerRight);}
if(mode=='stitched'||mode=='mirrored')
{for(var i=0;i<this.widgets.activeWidgets.length;i++)
{var objWidget=this.widgets.activeWidgets[i];if(blnUseJQuery===true&&typeof(objWidget.disableSlider)!='undefined')
{objWidget.setSliderValue(0);objWidget.disableSlider();}
else if(objWidget.slider)
{objWidget.setSliderValue(0);objWidget.disableSlider();}}}
else
{for(var i=0;i<this.widgets.activeWidgets.length;i++)
{var objWidget=this.widgets.activeWidgets[i];if(blnUseJQuery===true&&typeof(objWidget.enableSlider)!='undefined')
{objWidget.enableSlider();}
else if(objWidget.slider)
{objWidget.enableSlider();}}}
this.mapOptions.layout=mode;},getGeographicWidth:function(zoomLevel,tileDim,srid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1073,'this.mapOptions.layout=mode;},getGeographicWidth:','function(zoomLevel,tileDim,srid)',arguments);return Geocode.getGeographicWidth(srid,zoomLevel,tileDim);},setLayersToBeUpdated:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1074,'return Geocode.getGeographicWidth(srid,zoomLevel,tileDim);},setLayersToBeUpdated:','function()',arguments);this.upDated=true;},getLayerOpacity:function(layerId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1075,'this.upDated=true;},getLayerOpacity:','function(layerId)',arguments);return this.layersArray[layerId].opacity;},setLayerOpacity:function(layerId,op)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1076,'return this.layersArray[layerId].opacity;},setLayerOpacity:','function(layerId,op)',arguments);if(this.layersArray[layerId])
{var newOpacity=Math.round(op*100)/100;this.layersArray[layerId].setOpacity(newOpacity);}},setAllLayersOpacity:function(op)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1078,'{var newOpacity=Math.round(op*100)/100;this.layersArray[layerId].setOpacity(newOpacity);}},setAllLayersOpacity:','function(op)',arguments);this.layersArray.invoke('setOpacity',op);},refreshAllLayersOpacity:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1079,'this.layersArray.invoke(\'setOpacity\',op);},refreshAllLayersOpacity:','function()',arguments);this.layersArray.invoke('refreshOpacity');},setLayerLayout:function(layerId,style)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1080,'this.layersArray.invoke(\'refreshOpacity\');},setLayerLayout:','function(layerId,style)',arguments);this.layersArray[layerId].setLayout(style);},setLayerOffset:function(newOffset)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1081,'this.layersArray[layerId].setLayout(style);},setLayerOffset:','function(newOffset)',arguments);this.mapOptions.layerOffset=newOffset.round();this.layersArray.invoke("moveLayer");this.updateCenterPointBuffer();this.widgets.moveWidgets();this.setLayersToBeUpdated();},getLayerOffset:function(recenterPoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1082,'this.mapOptions.layerOffset=newOffset.round();this.layersArray.invoke("moveLayer");this.updateCenterPointBuffer();this.widgets.moveWidgets();this.setLayersToBeUpdated();},getLayerOffset:','function(recenterPoint)',arguments);if(recenterPoint)
{recenterPoint=(recenterPoint.srid=="Pixel")?recenterPoint:this.getScreenPointFromWorld(recenterPoint);var centerPoint=this.getCenterPoint();var diffX=centerPoint.x-recenterPoint.x;var diffY=recenterPoint.y-centerPoint.y;return new Point(this.mapOptions.layerOffset.x+diffX,this.mapOptions.layerOffset.y+diffY);}
else
{return this.mapOptions.layerOffset.clone();}},getTileProgress:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1086,'{return this.mapOptions.layerOffset.clone();}},getTileProgress:','function()',arguments);var l=this.layersArray.length;var nodes=new Array();var prog={};var results={};results.loaded=0;results.loading=0;for(var i=0;i<l;i++)
{prog=this.layersArray[i].getTileProgress();results.loaded+=prog.loaded;results.loading+=prog.loading;}
return results;},getTileProgressForSpecificLayer:function(intLayerNum)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1089,'return results;},getTileProgressForSpecificLayer:','function(intLayerNum)',arguments);var nodes=new Array();var prog={};var results={};results.loaded=0;results.loading=0;prog=this.layersArray[intLayerNum].getTileProgress();results.loaded=prog.loaded;results.loading=prog.loading;return results;},getIndexOfLayer:function(layer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1090,'var nodes=new Array();var prog={};var results={};results.loaded=0;results.loading=0;prog=this.layersArray[intLayerNum].getTileProgress();results.loaded=prog.loaded;results.loading=prog.loading;return results;},getIndexOfLayer:','function(layer)',arguments);return this.layersArray.indexOf(layer);},getGroupedLayerIds:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1091,'return this.layersArray.indexOf(layer);},getGroupedLayerIds:','function()',arguments);var l=this.layersArray.length;var groups=$H();var layers=new Array();for(var i=0;i<l;i++)
{var type=this.layersArray[i].getLayerType();var group=groups[type]||(groups[type]=new Array());group.push(i);}
return groups;},getRasterLayerAId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1094,'return groups;},getRasterLayerAId:','function()',arguments);return this.getGroupedLayerIds()["layer"].first();},getRasterLayerBId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1095,'return this.getGroupedLayerIds()["layer"].first();},getRasterLayerBId:','function()',arguments);return this.getGroupedLayerIds()["layer"].last();},getLayers:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1096,'return this.getGroupedLayerIds()["layer"].last();},getLayers:','function()',arguments);return this.layersArray;},getLayer:function(layerId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1097,'return this.layersArray;},getLayer:','function(layerId)',arguments);return this.layersArray[layerId];},getNumberOfLayers:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1098,'return this.layersArray[layerId];},getNumberOfLayers:','function()',arguments);return this.layersArray.length;},getMapServerNodes:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1099,'return this.layersArray.length;},getMapServerNodes:','function()',arguments);var l=this.layersArray.length;var nodes=new Array();for(var i=0;i<l;i++)
{if(this.layersArray[i].getLayerType()=="msLayer")
{rt=this.layersArray[i].getLayerNodes();nodes=nodes.concat(rt);}}
return nodes;},getBottomLeftPoint:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1103,'return nodes;},getBottomLeftPoint:','function()',arguments);var screenDim=this.getScreenDimensions();var point={};point.x=screenDim.TLX;point.y=screenDim.BRY;screenDim=null;return this.getRelativePoint(point);},getCenterPoint:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1104,'var screenDim=this.getScreenDimensions();var point={};point.x=screenDim.TLX;point.y=screenDim.BRY;screenDim=null;return this.getRelativePoint(point);},getCenterPoint:','function()',arguments);var screenDim=this.getScreenDimensions();var point={};point.x=((screenDim.BRX-screenDim.TLX)/2+screenDim.TLX);point.y=((screenDim.TLY-screenDim.BRY)/2+screenDim.BRY);screenDim=null;return this.getRelativePoint(point);},getRelativePoint:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1105,'var screenDim=this.getScreenDimensions();var point={};point.x=((screenDim.BRX-screenDim.TLX)/2+screenDim.TLX);point.y=((screenDim.TLY-screenDim.BRY)/2+screenDim.BRY);screenDim=null;return this.getRelativePoint(point);},getRelativePoint:','function(point)',arguments);var x=point.x-this.mapOptions.layerOffset.x;var y=point.y+this.mapOptions.layerOffset.y;return new Point(x,y);},invertYaxis:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1106,'var x=point.x-this.mapOptions.layerOffset.x;var y=point.y+this.mapOptions.layerOffset.y;return new Point(x,y);},invertYaxis:','function(point)',arguments);nPoint=point.clone();var screenDim=this.getScreenDimensions();nPoint.y=screenDim.TLY-screenDim.BRY-nPoint.y;return nPoint;},getPointFromEvent:function(event,modeSafe)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1107,'nPoint=point.clone();var screenDim=this.getScreenDimensions();nPoint.y=screenDim.TLY-screenDim.BRY-nPoint.y;return nPoint;},getPointFromEvent:','function(event,modeSafe)',arguments);var mapPos=mapPos||this.eventHandler.getMapPositionOnPage();if(blnUseJQuery===true&&event.pageX&&event.pageY)
{var x=event.pageX-mapPos.x;var y=event.pageY-mapPos.y;}
else
{var x=Event.pointerX(event)-mapPos.x;var y=Event.pointerY(event)-mapPos.y;}
if(modeSafe&&this.mapOptions.layout=="mirrored")
{var widthHeight=this.getScreenWidthHeight();x=(x>(widthHeight.width/2))?x-(widthHeight.width/2):x;}
return this.invertYaxis(new Point(x,y));},getRelativePointFromEvent:function(event,modeSafe)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1114,'return this.invertYaxis(new Point(x,y));},getRelativePointFromEvent:','function(event,modeSafe)',arguments);return this.getRelativePoint(this.getPointFromEvent(event,modeSafe));},getExtentsFromRef:function(tileDim,screenDim,refPoint,srid,level)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1115,'return this.getRelativePoint(this.getPointFromEvent(event,modeSafe));},getExtentsFromRef:','function(tileDim,screenDim,refPoint,srid,level)',arguments);level=(typeof(zl)=="number")?zl:this.getZoomLevel();var srid=(typeof(srid)=="number")?srid:this.getSrid();var totalMapWidth=this.getGeographicWidth(level,tileDim,srid);var ext=Geocode.getExtentsFromTile(refPoint,totalMapWidth,tileDim,screenDim);return ext;},getInitialScreenExtents:function(tileDim,screenDim,srid,zl)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1116,'level=(typeof(zl)=="number")?zl:this.getZoomLevel();var srid=(typeof(srid)=="number")?srid:this.getSrid();var totalMapWidth=this.getGeographicWidth(level,tileDim,srid);var ext=Geocode.getExtentsFromTile(refPoint,totalMapWidth,tileDim,screenDim);return ext;},getInitialScreenExtents:','function(tileDim,screenDim,srid,zl)',arguments);var srid=(typeof(srid)=="number")?srid:this.getSrid();return this.getExtentsFromRef(tileDim,screenDim,this.getReferencePoint(srid),srid,zl);},getScreenExt:function(tileDim,srid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1117,'var srid=(typeof(srid)=="number")?srid:this.getSrid();return this.getExtentsFromRef(tileDim,screenDim,this.getReferencePoint(srid),srid,zl);},getScreenExt:','function(tileDim,srid)',arguments);tileDim=tileDim||this.mapOptions.defaultDimensions;srid=srid||this.getSrid();var screenDim=this.getScreenDimensions();var bottomPoint=new Point(screenDim.TLX,screenDim.BRY);var relativeBLPoint=this.getRelativePoint(bottomPoint);var refPoint=this.getPointOnMap(relativeBLPoint,tileDim,srid);return this.getExtentsFromRef(tileDim,screenDim,refPoint,srid);},getReferencePoint:function(srid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1118,'tileDim=tileDim||this.mapOptions.defaultDimensions;srid=srid||this.getSrid();var screenDim=this.getScreenDimensions();var bottomPoint=new Point(screenDim.TLX,screenDim.BRY);var relativeBLPoint=this.getRelativePoint(bottomPoint);var refPoint=this.getPointOnMap(relativeBLPoint,tileDim,srid);return this.getExtentsFromRef(tileDim,screenDim,refPoint,srid);},getReferencePoint:','function(srid)',arguments);var srid=(srid==null)?this.getSrid():srid;return this.refPoint["get"+srid]();},setReferencePoint:function(rp)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1119,'var srid=(srid==null)?this.getSrid():srid;return this.refPoint["get"+srid]();},setReferencePoint:','function(rp)',arguments);this.refPoint=rp["get"+this.getSrid()]();this.updateCenterPointBuffer();if(!rp.equals(this.refPoint))
{this.layersArray.invoke("clearOldTiles");}},getGroundScale:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1121,'{this.layersArray.invoke("clearOldTiles");}},getGroundScale:','function()',arguments);var srid=this.getSrid();var tileDim=this.mapOptions.defaultDimensions;var ext=this.getScreenExt(tileDim,srid);var screenDim=this.getScreenWidthHeight();var pointLeft=new Point(ext.TLY,ext.TLX,srid);var pointRight=new Point(ext.BRY,ext.BRX,srid);var distance=pointLeft.distance(pointRight);return Math.sqrt((screenDim.width*screenDim.width)+(screenDim.height*screenDim.height))/distance;},getPointOnMap:function(point,tileSize,srid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1122,'var srid=this.getSrid();var tileDim=this.mapOptions.defaultDimensions;var ext=this.getScreenExt(tileDim,srid);var screenDim=this.getScreenWidthHeight();var pointLeft=new Point(ext.TLY,ext.TLX,srid);var pointRight=new Point(ext.BRY,ext.BRX,srid);var distance=pointLeft.distance(pointRight);return Math.sqrt((screenDim.width*screenDim.width)+(screenDim.height*screenDim.height))/distance;},getPointOnMap:','function(point,tileSize,srid)',arguments);var dim=this.getScreenDimensions();var ext=this.getInitialScreenExtents(tileSize,dim,srid);var worldPoint=Geocode.convertScreenToWorld(point,ext,dim).setSrid(srid);return worldPoint;},getCenterPointOnMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1123,'var dim=this.getScreenDimensions();var ext=this.getInitialScreenExtents(tileSize,dim,srid);var worldPoint=Geocode.convertScreenToWorld(point,ext,dim).setSrid(srid);return worldPoint;},getCenterPointOnMap:','function()',arguments);return this.getPointOnMap(this.getCenterPoint(),this.mapOptions.defaultDimensions,this.getSrid());},getTopLayer:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1124,'return this.getPointOnMap(this.getCenterPoint(),this.mapOptions.defaultDimensions,this.getSrid());},getTopLayer:','function(point)',arguments);return this.getLayer(0);},getScreenPointFromWorld:function(point,modeSafe)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1125,'return this.getLayer(0);},getScreenPointFromWorld:','function(point,modeSafe)',arguments);if(point.srid!=this.getSrid())
{var point=MakePoint(point)["get"+this.getSrid()]();}
var dim=this.getScreenDimensions();var tileDim=this.mapOptions.defaultDimensions;var ext=this.getInitialScreenExtents(tileDim,dim);return Geocode.convertWorldToScreen(point,ext,dim);},getMapPositionOnPage:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1128,'var dim=this.getScreenDimensions();var tileDim=this.mapOptions.defaultDimensions;var ext=this.getInitialScreenExtents(tileDim,dim);return Geocode.convertWorldToScreen(point,ext,dim);},getMapPositionOnPage:','function()',arguments);if(window['Position']&&window['Position']['cumulativeOffset']&&this.mapOptions.containerDivs.mapDiv)
{var cm=Position.cumulativeOffset(this.mapOptions.containerDivs.mapDiv);return new Point(cm[0],cm[1]);}},getZoomLevel:function(level)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1130,'{var cm=Position.cumulativeOffset(this.mapOptions.containerDivs.mapDiv);return new Point(cm[0],cm[1]);}},getZoomLevel:','function(level)',arguments);level=(typeof(level)=="number")?level:this.getZoomAmount();return this.mapOptions.scalesArray[level];},getZoomAmount:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1131,'level=(typeof(level)=="number")?level:this.getZoomAmount();return this.mapOptions.scalesArray[level];},getZoomAmount:','function()',arguments);return this.mapOptions.zoomLevel;},getMaxZoomLevel:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1132,'return this.mapOptions.zoomLevel;},getMaxZoomLevel:','function()',arguments);return this.mapOptions.scalesArray.size()-1;},setSessionId:function(sessionId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1133,'return this.mapOptions.scalesArray.size()-1;},setSessionId:','function(sessionId)',arguments);return this.mapOptions.sessionId=sessionId;},getSessionId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1134,'return this.mapOptions.sessionId=sessionId;},getSessionId:','function()',arguments);return this.mapOptions.sessionId;},setMapCacheSymlinkName:function(strMapCacheSymlinkName)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1135,'return this.mapOptions.sessionId;},setMapCacheSymlinkName:','function(strMapCacheSymlinkName)',arguments);return this.mapOptions.strMapCacheSymlinkName=strMapCacheSymlinkName;},getMapCacheSymlinkName:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1136,'return this.mapOptions.strMapCacheSymlinkName=strMapCacheSymlinkName;},getMapCacheSymlinkName:','function()',arguments);return this.mapOptions.strMapCacheSymlinkName;},getLayerServerUrl:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1137,'return this.mapOptions.strMapCacheSymlinkName;},getLayerServerUrl:','function()',arguments);return this.mapOptions.mapLayerServerUrl;},getMapCacheUrl:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1138,'return this.mapOptions.mapLayerServerUrl;},getMapCacheUrl:','function()',arguments);return this.mapOptions.mapCacheUrl;},getSrid:function(id,zoomLevel)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1139,'return this.mapOptions.mapCacheUrl;},getSrid:','function(id,zoomLevel)',arguments);var stackId=this.getStackIdFromId(id);zoomLevel=(typeof(zoomLevel)=="number")?zoomLevel:this.getZoomAmount();if(typeof(stackId)=="undefined"||stackId==null)
{var activeLayer=this.getActiveLayer();if(activeLayer==null)
{srid=this.getCenterPointBuffer().srid;}
else
{srid=this.layersArray[activeLayer].getSrid(zoomLevel);}}
else
{var mapId=this.getMapId(stackId);var details=this.getMapDetails(mapId);var srid=details.srid;}
return srid},getMapId:function(id,level)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1147,'return srid},getMapId:','function(id,level)',arguments);var stackId=this.getStackIdFromId(id);var centerPoint=this.getCenterPointBuffer();return this.mapStackObjects[stackId].getMapId(level||this.getZoomAmount(),centerPoint);},getMapStack:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1148,'var stackId=this.getStackIdFromId(id);var centerPoint=this.getCenterPointBuffer();return this.mapStackObjects[stackId].getMapId(level||this.getZoomAmount(),centerPoint);},getMapStack:','function(id)',arguments);var stackId=this.getStackIdFromId(id);if(typeof stackId!="string"&&typeof stackId!="number")
{var actionLayer=this.getActiveLayer();var stackId=this.layersArray[actionLayer].getStackId();}
if(this.mapStackObjects[stackId])
{var actionLayer=this.getActiveLayer();return this.mapStackObjects[stackId];}},getMapStackObjects:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1152,'{var actionLayer=this.getActiveLayer();return this.mapStackObjects[stackId];}},getMapStackObjects:','function()',arguments);return this.mapStackObjects;},getScreenClippingArea:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1153,'return this.mapStackObjects;},getScreenClippingArea:','function()',arguments);var dim=this.getScreenDimensions();var lo=this.mapOptions.layerOffset;var tlPoint=new Point(dim.TLX-lo.x,dim.BRY-lo.y);var brPoint=new Point(dim.BRX-lo.x,dim.TLY-lo.y);return new Box(tlPoint,brPoint);},getScreenWidthHeight:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1154,'var dim=this.getScreenDimensions();var lo=this.mapOptions.layerOffset;var tlPoint=new Point(dim.TLX-lo.x,dim.BRY-lo.y);var brPoint=new Point(dim.BRX-lo.x,dim.TLY-lo.y);return new Box(tlPoint,brPoint);},getScreenWidthHeight:','function()',arguments);return this.mapOptions.screenDimensions;},updateScreenDimensions:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1155,'return this.mapOptions.screenDimensions;},updateScreenDimensions:','function()',arguments);var dim=this.mapOptions.containerDivs.mapDiv.getDimensions();if(!this.screenDimExt||this.screenDimExt.BRX!=dim.width||this.screenDimExt.TLY!=dim.height)
{this.mapOptions.screenDimensions=dim;this.screenDimExt={TLX:0,TLY:dim.height,BRX:dim.width,BRY:0};this.setLayersToBeUpdated();}},showMessage:function(innerHTML,options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1157,'{this.mapOptions.screenDimensions=dim;this.screenDimExt={TLX:0,TLY:dim.height,BRX:dim.width,BRY:0};this.setLayersToBeUpdated();}},showMessage:','function(innerHTML,options)',arguments);this.ezMessage.setPopupOptions(options);this.ezMessage.show(innerHTML);},getScreenDimensions:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1158,'this.ezMessage.setPopupOptions(options);this.ezMessage.show(innerHTML);},getScreenDimensions:','function()',arguments);if(!this.screenDimExt)
{this.updateScreenDimensions();}
return this.screenDimExt;},pointIsWithinExtents:function(objPoint,objExtents,intSrid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1161,'return this.screenDimExt;},pointIsWithinExtents:','function(objPoint,objExtents,intSrid)',arguments);if(typeof(intSrid)=='undefined')
{var intSrid=this.getSrid();}
if(typeof(objExtents)=='undefined')
{var objTileDimensions=this.mapOptions.defaultDimensions;var objExtents=this.getScreenExt(objTileDimensions,intSrid);}
if(typeof(objPoint.srid)=='undefined')
{objPoint.srid=intSrid;}
var objFixedPoint=new Point(objPoint.x,objPoint.y,objPoint.srid);if(''+objFixedPoint.srid!=''+intSrid)
{var objRelativePoint=objFixedPoint.convertToSrid(intSrid);}
else
{var objRelativePoint=objFixedPoint;}
var blnInExtents=!(objRelativePoint.x<objExtents.TLX||objRelativePoint.x>objExtents.BRX||objRelativePoint.y<objExtents.BRY||objRelativePoint.y>objExtents.TLY);return blnInExtents;},pointsAreWithinExtents:function(arrPoints,objExtents,intSrid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1172,'var blnInExtents=!(objRelativePoint.x<objExtents.TLX||objRelativePoint.x>objExtents.BRX||objRelativePoint.y<objExtents.BRY||objRelativePoint.y>objExtents.TLY);return blnInExtents;},pointsAreWithinExtents:','function(arrPoints,objExtents,intSrid)',arguments);if(typeof(intSrid)=='undefined')
{var intSrid=this.getSrid();}
if(typeof(objExtents)=='undefined')
{var objTileDimensions=this.mapOptions.defaultDimensions;var objExtents=this.getScreenExt(objTileDimensions,intSrid);}
for(var intI=0,intTotalPoints=arrPoints.length;intI<intTotalPoints;intI++)
{if(this.pointIsWithinExtents(arrPoints[intI],objExtents,intSrid)===false)
{return false;}}
return true;},pointsAreWithinMapExtents:function(arrPoints,intMapId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1180,'return true;},pointsAreWithinMapExtents:','function(arrPoints,intMapId)',arguments);if(typeof(intMapId)=='undefined')
{var objActiveLayer=this.layersArray[this.getActiveLayer()];var intMapId=objActiveLayer.getMapId();}
var intSrid=this.getSrid(intMapId);var objExtents=this.getMaximumExtents(intMapId);return this.pointsAreWithinExtents(arrPoints,objExtents.ext,intSrid);},setPlaylistMode:function(blnPlaylistMode,intViewId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1183,'var intSrid=this.getSrid(intMapId);var objExtents=this.getMaximumExtents(intMapId);return this.pointsAreWithinExtents(arrPoints,objExtents.ext,intSrid);},setPlaylistMode:','function(blnPlaylistMode,intViewId)',arguments);this.mapOptions.blnPlaylistMode=blnPlaylistMode;this.mapOptions.intPlaylistViewId=intViewId;},getPlaylistMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1184,'this.mapOptions.blnPlaylistMode=blnPlaylistMode;this.mapOptions.intPlaylistViewId=intViewId;},getPlaylistMode:','function()',arguments);return this.mapOptions.blnPlaylistMode;},getPlaylistViewId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1185,'return this.mapOptions.blnPlaylistMode;},getPlaylistViewId:','function()',arguments);if(this.mapOptions.blnPlaylistMode===true)
{return this.mapOptions.intPlaylistViewId;}
else
{return null;}},startNoCacheMode:function(objNoCacheOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1189,'{return null;}},startNoCacheMode:','function(objNoCacheOptions)',arguments);this.mapOptions.blnNoCacheMode=true;this.mapOptions.objNoCacheOptions=objNoCacheOptions;this.getLayers().invoke('updateLayer');},endNoCacheMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1190,'this.mapOptions.blnNoCacheMode=true;this.mapOptions.objNoCacheOptions=objNoCacheOptions;this.getLayers().invoke(\'updateLayer\');},endNoCacheMode:','function()',arguments);this.mapOptions.blnNoCacheMode=false;this.getLayers().invoke('updateLayer');},getNoCacheMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1191,'this.mapOptions.blnNoCacheMode=false;this.getLayers().invoke(\'updateLayer\');},getNoCacheMode:','function()',arguments);return this.mapOptions.blnNoCacheMode;},getNoCacheModeOptions:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1192,'return this.mapOptions.blnNoCacheMode;},getNoCacheModeOptions:','function()',arguments);return this.mapOptions.objNoCacheOptions;}}
var EzPopup=Class.create();EzPopup.prototype={options:null,popUpSides:$H({t:{side:"straight",height:19},l:{side:"straight",width:19},r:{side:"straight",width:23},b:{side:"straight",height:23},tr:{side:"corner",height:19,width:23},tl:{side:"corner",height:23,width:19},br:{side:"corner",height:19,width:23},bl:{side:"corner",height:23,width:19},bp:{side:"corner",height:40,width:40}}),minHeight:100,minWidth:130,makeSideDivs:null,initialize:function(parentDiv,options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1194,'var EzPopup=Class.create();EzPopup.prototype={options:null,popUpSides:$H({t:{side:"straight",height:19},l:{side:"straight",width:19},r:{side:"straight",width:23},b:{side:"straight",height:23},tr:{side:"corner",height:19,width:23},tl:{side:"corner",height:23,width:19},br:{side:"corner",height:19,width:23},bl:{side:"corner",height:23,width:19},bp:{side:"corner",height:40,width:40}}),minHeight:100,minWidth:130,makeSideDivs:null,initialize:','function(parentDiv,options)',arguments);this.parentDiv=parentDiv;this.popUpSidesDivs=$H();this.options={onClose:null,width:this.minWidth,buffer:10,height:this.minHeight,innerHtml:"",position:new Point()};Object.extend(this.options,options||{});this.makePopUpDiv();this.setPosition();},makePopUpDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1195,'this.parentDiv=parentDiv;this.popUpSidesDivs=$H();this.options={onClose:null,width:this.minWidth,buffer:10,height:this.minHeight,innerHtml:"",position:new Point()};Object.extend(this.options,options||{});this.makePopUpDiv();this.setPosition();},makePopUpDiv:','function()',arguments);this.popUpDiv=Utility.makeDivWithCss(this.parentDiv,"popUp");this.popUpDiv.hide();this.makeSideDivs();this.makeContentsDiv();this.makeCloseDiv();this.resize();},makeSideDivs:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1196,'this.popUpDiv=Utility.makeDivWithCss(this.parentDiv,"popUp");this.popUpDiv.hide();this.makeSideDivs();this.makeContentsDiv();this.makeCloseDiv();this.resize();},makeSideDivs:','function()',arguments);this.backgroundDiv=Utility.makeDivWithCss(this.popUpDiv,"popUpBg");this.popUpSides.each(function(pair)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1197,'this.backgroundDiv=Utility.makeDivWithCss(this.popUpDiv,"popUpBg");this.popUpSides.each(','function(pair)',arguments);var side=Utility.makeDivWithCss(this.backgroundDiv,pair.key+" "+pair.value.side);var width=(typeof(pair.value.width)=="number")?pair.value.width:this.getDivDimension(pair.key);var height=(typeof(pair.value.height)=="number")?pair.value.height:this.getDivDimension(pair.key);side.setStyle({width:width+"px",height:height+"px"});this.popUpSidesDivs[pair.key]=side;}.bind(this));},makeCloseDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1198,'var side=Utility.makeDivWithCss(this.backgroundDiv,pair.key+" "+pair.value.side);var width=(typeof(pair.value.width)=="number")?pair.value.width:this.getDivDimension(pair.key);var height=(typeof(pair.value.height)=="number")?pair.value.height:this.getDivDimension(pair.key);side.setStyle({width:width+"px",height:height+"px"});this.popUpSidesDivs[pair.key]=side;}.bind(this));},makeCloseDiv:','function()',arguments);var mouseClose=this.hide.bindAsEventListener(this,this);this.closeDiv=Utility.makeDivWithCss(this.popUpDiv,"close");Event.observe(this.closeDiv,"click",mouseClose);},makeContentsDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1199,'var mouseClose=this.hide.bindAsEventListener(this,this);this.closeDiv=Utility.makeDivWithCss(this.popUpDiv,"close");Event.observe(this.closeDiv,"click",mouseClose);},makeContentsDiv:','function()',arguments);this.contentsDiv=Utility.makeDivWithCss(this.popUpDiv,"contents");this.setInnerHtml(this.options.innerHTML);},hidePointDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1200,'this.contentsDiv=Utility.makeDivWithCss(this.popUpDiv,"contents");this.setInnerHtml(this.options.innerHTML);},hidePointDiv:','function()',arguments);this.popUpSidesDivs["bp"].hide();},showPointDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1201,'this.popUpSidesDivs["bp"].hide();},showPointDiv:','function()',arguments);this.popUpSidesDivs["bp"].show();},setInnerHtml:function(innerHtml)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1202,'this.popUpSidesDivs["bp"].show();},setInnerHtml:','function(innerHtml)',arguments);this.options.innerHTML=innerHtml;this.contentsDiv.innerHTML=innerHtml;},getInnerHtml:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1203,'this.options.innerHTML=innerHtml;this.contentsDiv.innerHTML=innerHtml;},getInnerHtml:','function()',arguments);return this.options.innerHTM;},setBottomPointClass:function(strClassName)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1204,'return this.options.innerHTM;},setBottomPointClass:','function(strClassName)',arguments);this.popUpSidesDivs.bp.removeClassName('bp');this.popUpSidesDivs.bp.removeClassName('bp_bottom_left');this.popUpSidesDivs.bp.removeClassName('bp_bottom_right');this.popUpSidesDivs.bp.removeClassName('bp_top_left');this.popUpSidesDivs.bp.removeClassName('bp_top_right');this.popUpSidesDivs.bp.addClassName(strClassName);},setSize:function(w,h)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1205,'this.popUpSidesDivs.bp.removeClassName(\'bp\');this.popUpSidesDivs.bp.removeClassName(\'bp_bottom_left\');this.popUpSidesDivs.bp.removeClassName(\'bp_bottom_right\');this.popUpSidesDivs.bp.removeClassName(\'bp_top_left\');this.popUpSidesDivs.bp.removeClassName(\'bp_top_right\');this.popUpSidesDivs.bp.addClassName(strClassName);},setSize:','function(w,h)',arguments);this.options.height=Math.max(this.minHeight,h);this.options.width=Math.max(this.minWidth,w);this.resize();},getPopupExt:function(offset)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1206,'this.options.height=Math.max(this.minHeight,h);this.options.width=Math.max(this.minWidth,w);this.resize();},getPopupExt:','function(offset)',arguments);var posObj={};posObj.top=this.options.position.y+this.options.height+this.popUpSides.b.height+this.options.buffer-offset.y;posObj.bottom=this.options.position.y-offset.y-this.options.buffer;posObj.left=this.options.position.x-this.popUpSides.bl.width+offset.x-this.options.buffer;posObj.right=this.options.position.x+this.options.width+offset.x+this.options.buffer;return posObj;},getFullWidth:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1207,'var posObj={};posObj.top=this.options.position.y+this.options.height+this.popUpSides.b.height+this.options.buffer-offset.y;posObj.bottom=this.options.position.y-offset.y-this.options.buffer;posObj.left=this.options.position.x-this.popUpSides.bl.width+offset.x-this.options.buffer;posObj.right=this.options.position.x+this.options.width+offset.x+this.options.buffer;return posObj;},getFullWidth:','function()',arguments);return this.options.width+this.popUpSides.l.width+this.popUpSides.r.width+this.options.buffer;},getFullHeight:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1208,'return this.options.width+this.popUpSides.l.width+this.popUpSides.r.width+this.options.buffer;},getFullHeight:','function()',arguments);return this.options.height+this.popUpSides.t.height+this.popUpSides.b.height+this.popUpSides.bp.height+this.options.buffer;},getHeight:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1209,'return this.options.height+this.popUpSides.t.height+this.popUpSides.b.height+this.popUpSides.bp.height+this.options.buffer;},getHeight:','function()',arguments);return this.options.height+this.popUpSides.b.height;},resize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1210,'return this.options.height+this.popUpSides.b.height;},resize:','function()',arguments);this.popUpSides.each(function(pair)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1211,'this.popUpSides.each(','function(pair)',arguments);var side=this.popUpSidesDivs[pair.key];var width=(typeof(pair.value.width)=="number")?pair.value.width:this.getDivDimension(pair.key);var height=(typeof(pair.value.height)=="number")?pair.value.height:this.getDivDimension(pair.key);side.setStyle({width:width+"px",height:height+"px"});}.bind(this));var cw=this.getDivDimension("contentsWidth");var ch=this.getDivDimension("contentsHeight");this.contentsDiv.setStyle({width:cw+"px",height:ch+"px"});this.popUpDiv.setStyle({width:this.options.width+"px",height:this.options.height+"px"});},getDivDimension:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1212,'var side=this.popUpSidesDivs[pair.key];var width=(typeof(pair.value.width)=="number")?pair.value.width:this.getDivDimension(pair.key);var height=(typeof(pair.value.height)=="number")?pair.value.height:this.getDivDimension(pair.key);side.setStyle({width:width+"px",height:height+"px"});}.bind(this));var cw=this.getDivDimension("contentsWidth");var ch=this.getDivDimension("contentsHeight");this.contentsDiv.setStyle({width:cw+"px",height:ch+"px"});this.popUpDiv.setStyle({width:this.options.width+"px",height:this.options.height+"px"});},getDivDimension:','function(id)',arguments);switch(id)
{case"l":return this.options.height-(this.popUpSides.tl.height*2);break;case"r":return this.options.height-(this.popUpSides.tr.height*2);break;case"b":return this.options.width-(this.popUpSides.br.width+this.popUpSides.bl.width);break;case"t":return this.options.width-(this.popUpSides.tr.width+this.popUpSides.tl.width);break;case"contentsWidth":return this.options.width-this.popUpSides.tr.width;break;case"contentsHeight":return this.options.height-this.popUpSides.tl.height;break;}},setPosition:function(pointPx,strPosition)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1214,'{case"l":return this.options.height-(this.popUpSides.tl.height*2);break;case"r":return this.options.height-(this.popUpSides.tr.height*2);break;case"b":return this.options.width-(this.popUpSides.br.width+this.popUpSides.bl.width);break;case"t":return this.options.width-(this.popUpSides.tr.width+this.popUpSides.tl.width);break;case"contentsWidth":return this.options.width-this.popUpSides.tr.width;break;case"contentsHeight":return this.options.height-this.popUpSides.tl.height;break;}},setPosition:','function(pointPx,strPosition)',arguments);strPosition=(typeof(strPosition)=='undefined')?'top_right':strPosition;this.options.position=pointPx||this.options.position;switch(strPosition)
{case'top_right':this.popUpDiv.style.bottom=this.options.position.y+this.popUpSides.b.height+'px';this.popUpDiv.style.left=this.options.position.x-this.popUpSides.bl.width+'px';break;case'top_left':this.popUpDiv.style.bottom=this.options.position.y+this.popUpSides.b.height+'px';this.popUpDiv.style.left=this.options.position.x-this.options.width+this.popUpSides.bl.width+'px';break;case'bottom_right':this.popUpDiv.style.bottom=this.options.position.y-this.options.height-this.popUpSides.b.height+'px';this.popUpDiv.style.left=this.options.position.x-this.popUpSides.bl.width+'px';break;case'bottom_left':this.popUpDiv.style.bottom=this.options.position.y-this.options.height-this.popUpSides.b.height+'px';this.popUpDiv.style.left=this.options.position.x-this.options.width+this.popUpSides.bl.width+'px';break;}},setCloseFunction:function(closeFunction)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1216,'{case\'top_right\':this.popUpDiv.style.bottom=this.options.position.y+this.popUpSides.b.height+\'px\';this.popUpDiv.style.left=this.options.position.x-this.popUpSides.bl.width+\'px\';break;case\'top_left\':this.popUpDiv.style.bottom=this.options.position.y+this.popUpSides.b.height+\'px\';this.popUpDiv.style.left=this.options.position.x-this.options.width+this.popUpSides.bl.width+\'px\';break;case\'bottom_right\':this.popUpDiv.style.bottom=this.options.position.y-this.options.height-this.popUpSides.b.height+\'px\';this.popUpDiv.style.left=this.options.position.x-this.popUpSides.bl.width+\'px\';break;case\'bottom_left\':this.popUpDiv.style.bottom=this.options.position.y-this.options.height-this.popUpSides.b.height+\'px\';this.popUpDiv.style.left=this.options.position.x-this.options.width+this.popUpSides.bl.width+\'px\';break;}},setCloseFunction:','function(closeFunction)',arguments);this.options.onClose=closeFunction;},show:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1217,'this.options.onClose=closeFunction;},show:','function()',arguments);this.popUpDiv.show();},hide:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1218,'this.popUpDiv.show();},hide:','function()',arguments);this.popUpDiv.hide();if(this.options.onClose)
{this.options.onClose();}}}
var EzMessage=Class.create();EzMessage.prototype={ezPopup:null,initialize:function(widgetsDiv,mapStatus,popUpOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1221,'var EzMessage=Class.create();EzMessage.prototype={ezPopup:null,initialize:','function(widgetsDiv,mapStatus,popUpOptions)',arguments);this.mapStatus=mapStatus;this.widgetsDiv=widgetsDiv;this.setPopupOptions();this.makeCenteredDiv();this.makeMessage();},setPopupOptions:function(popUpOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1222,'this.mapStatus=mapStatus;this.widgetsDiv=widgetsDiv;this.setPopupOptions();this.makeCenteredDiv();this.makeMessage();},setPopupOptions:','function(popUpOptions)',arguments);this.popUpOptions={width:350,height:200}
Object.extend(this.popUpOptions,popUpOptions||{});this.popUpOptions.position=new Point(0,-this.popUpOptions.height);},makeCenteredDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1224,'Object.extend(this.popUpOptions,popUpOptions||{});this.popUpOptions.position=new Point(0,-this.popUpOptions.height);},makeCenteredDiv:','function()',arguments);this.messageDiv=Utility.makeDivWithCss(this.widgetsDiv.above,"messageDiv");},makeMessage:function(options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1225,'this.messageDiv=Utility.makeDivWithCss(this.widgetsDiv.above,"messageDiv");},makeMessage:','function(options)',arguments);this.ezPopup=new EzPopup(this.messageDiv,this.popUpOptions);this.ezPopup.hidePointDiv();},show:function(innerHtml)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1226,'this.ezPopup=new EzPopup(this.messageDiv,this.popUpOptions);this.ezPopup.hidePointDiv();},show:','function(innerHtml)',arguments);this.ezPopup.setInnerHtml(innerHtml);this.ezPopup.setSize(this.popUpOptions.width,this.popUpOptions.height);this.ezPopup.setPosition(this.popUpOptions.position);this.ezPopup.show();},hide:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1227,'this.ezPopup.setInnerHtml(innerHtml);this.ezPopup.setSize(this.popUpOptions.width,this.popUpOptions.height);this.ezPopup.setPosition(this.popUpOptions.position);this.ezPopup.show();},hide:','function()',arguments);this.ezPopup.hide();}}
Matrix=Class.create();Object.extend(Matrix,{multiply:function(left,right){var matrices;if(left instanceof Array)
matrices=left;else
matrices=[left,right];var matrix=matrices[0];for(var i=1;i<matrices.length;++i){var left=matrix;var right=matrices[i];matrix=new Matrix();matrix.xx=left.xx*right.xx+left.xy*right.yx;matrix.xy=left.xx*right.xy+left.xy*right.yy;matrix.yx=left.yx*right.xx+left.yy*right.yx;matrix.yy=left.yx*right.xy+left.yy*right.yy;matrix.dx=left.xx*right.dx+left.xy*right.dy+left.dx;matrix.dy=left.yx*right.dx+left.yy*right.dy+left.dy;}
return matrix;},translate:function(x,y){return new Matrix({dx:x,dy:y});},rotate:function(angle){var c=Math.cos(Utility.degToRad(angle));var s=Math.sin(Utility.degToRad(angle));return new Matrix({xx:c,xy:s,yx:-s,yy:c});},scale:function(sx,sy){sy=sy||sx;return new Matrix({xx:sx,yy:sy});},skewX:function(angle){return new Matrix({xy:Math.tan(Utility.degToRad(angle))});},skewY:function(angle){return new Matrix({yx:Math.tan(-Utility.degToRad(angle))});},rotateAt:function(angle,x,y){return Matrix.multiply([Matrix.translate(x,y),Matrix.rotate(angle),Matrix.translate(-x,-y)])},scaleAt:function(sx,sy,x,y){return Matrix.multiply([Matrix.translate(x,y),Matrix.scale(sx,sy),Matrix.translate(-x,-y)])},invert:function(matrix){var m=matrix;var D=m.xx*m.yy-m.xy*m.yx;return new Matrix({xx:m.yy/D,xy:-m.xy/D,yx:-m.yx/D,yy:m.xx/D,dx:(m.yx*m.dy-m.yy*m.dx)/D,dy:(m.xy*m.dx-m.xx*m.dy)/D});}})
Object.extend(Matrix.prototype,{initialize:function(values){Object.extend(Object.extend(this,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0}),values||{});return this;},multiplyRight:function(matrix){var matrix=Matrix.multiply(this,matrix);this._affectValues(matrix);return this;},multiplyLeft:function(matrix){var matrix=Matrix.multiply(matrix,this);this._affectValues(matrix);return this;},multiplyPoint:function(x,y){return{x:this.xx*x+this.xy*y+this.dx,y:this.yx*x+this.yy*y+this.dy};},multiplyBounds:function(bounds){var pt1=this.multiplyPoint(bounds.x,bounds.y);var pt2=this.multiplyPoint(bounds.x+bounds.w,bounds.y);var pt3=this.multiplyPoint(bounds.x,bounds.y+bounds.h);var pt4=this.multiplyPoint(bounds.x+bounds.w,bounds.y+bounds.h);var xmin=Math.min(Math.min(pt1.x,pt2.x),Math.min(pt3.x,pt4.x));var ymin=Math.min(Math.min(pt1.y,pt2.y),Math.min(pt3.y,pt4.y));var xmax=Math.max(Math.max(pt1.x,pt2.x),Math.max(pt3.x,pt4.x));var ymax=Math.max(Math.max(pt1.y,pt2.y),Math.max(pt3.y,pt4.y));return{x:xmin,y:ymin,w:xmax-xmin,h:ymax-ymin};},values:function(){return $A([this.xx,this.yx,this.xy,this.yy,this.dx,this.dy]);},setValues:function(array){this.xx=parseFloat(array[0]);this.yx=parseFloat(array[1]);this.xy=parseFloat(array[2]);this.yy=parseFloat(array[3]);this.dx=parseFloat(array[4]);this.dy=parseFloat(array[5]);return this;},hashValues:function(){return $H({xx:this.xx,xy:this.xy,yx:this.yx,yy:this.yy,dx:this.dx,dy:this.dy});},toString:function(){return Object.inspect(this.hashValues());},toJSON:function(){return this.hashValues().toJSON();},_affectValues:function(matrix){Object.extend(this,matrix);return this;}});EventNotifier={observers:new Array(),addObserver:function(observer,sender){sender=sender||null;this.removeObserver(observer);this.observers.push({observer:observer,sender:sender});},removeObserver:function(observer){this.observers=this.observers.reject(function(o){return o.observer==observer});},send:function(sender,eventName,options){options=options||null;this.observers.each(function(o){if((o.sender==null||o.sender==sender)&&o.observer[eventName])
o.observer[eventName](sender,options);});}}
Graphic=Class.create();Object.extend(Graphic,{functionMustBeOverriden:{name:'functionMustBeOverriden',message:'This function is an abstract function and must be overriden'},setWebKitVersion:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1235,'Graphic=Class.create();Object.extend(Graphic,{functionMustBeOverriden:{name:\'functionMustBeOverriden\',message:\'This function is an abstract function and must be overriden\'},setWebKitVersion:','function()',arguments);if(Prototype.Browser.WebKit)
{var array=navigator.userAgent.match(new RegExp(/AppleWebKit\/([\d\.\+]*)/));Prototype.Browser.WebKitVersion=parseFloat(array[1]);}},rendererSupported:function(name){switch(name){case"VML":return Prototype.Browser.IE;case"SVG":this.setWebKitVersion();return!(Prototype.Browser.IE||Prototype.Browser.WebKitVersion<420);case"Canvas":try{return document.createElement("canvas").getContext("2d")!=null;}
catch(e){return false;}
default:throw"Renderer "+name+" not supported"
return null;}}});MSLayer=Class.extend(Layer,{templateLayerUrl:"[getLayerServerUrl]/"+"getTile/"+"[layerCacheMode]/"+"[sessionId]/"+"[nodeLayers]/"+"[srid]/"+"[getZoomLevel]/"+"[width]/"+"[height]/",templateNoCacheLayerUrl:"[getLayerServerUrl]/"+"getTile/"+"[layerCacheMode]/"+"[sessionId]/"+"[nodeLayers]/"+"[srid]/"+"[getZoomLevel]/"+"[width]/"+"[height]/",templateTileUrl:"[x]/[y]/false/[module]/[getPlaylistMode]/[getPlaylistViewId]",type:"msLayer",IEfilter:true,tileWidth:500,tileHeight:500,maxError:1,imageBufferAmount:1,layerNodes:null,layerCacheMode:null,layerCacheId:null,unlicenced:"/images/transparentPixel.gif",zoomedTooFar:"/images/transparentPixel.gif",clearTile:"/images/transparentPixel.gif",notOnMap:"/images/transparentPixel.gif",initialize:function(mapStatus,layerIds)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1240,'return null;}}});MSLayer=Class.extend(Layer,{templateLayerUrl:"[getLayerServerUrl]/"+"getTile/"+"[layerCacheMode]/"+"[sessionId]/"+"[nodeLayers]/"+"[srid]/"+"[getZoomLevel]/"+"[width]/"+"[height]/",templateNoCacheLayerUrl:"[getLayerServerUrl]/"+"getTile/"+"[layerCacheMode]/"+"[sessionId]/"+"[nodeLayers]/"+"[srid]/"+"[getZoomLevel]/"+"[width]/"+"[height]/",templateTileUrl:"[x]/[y]/false/[module]/[getPlaylistMode]/[getPlaylistViewId]",type:"msLayer",IEfilter:true,tileWidth:500,tileHeight:500,maxError:1,imageBufferAmount:1,layerNodes:null,layerCacheMode:null,layerCacheId:null,unlicenced:"/images/transparentPixel.gif",zoomedTooFar:"/images/transparentPixel.gif",clearTile:"/images/transparentPixel.gif",notOnMap:"/images/transparentPixel.gif",initialize:','function(mapStatus,layerIds)',arguments);this.mapStatus=mapStatus;this.layerNodes=$H();this.addNodes(layerIds);this.layerStatus=new LayerStatus(mapStatus,null,this);this.tiles=new Array();this.initializeURLVariables();this.layerCacheMode=false;this.layerCacheId=Math.round(Math.random()*1000);},initializeURLVariables:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1241,'this.mapStatus=mapStatus;this.layerNodes=$H();this.addNodes(layerIds);this.layerStatus=new LayerStatus(mapStatus,null,this);this.tiles=new Array();this.initializeURLVariables();this.layerCacheMode=false;this.layerCacheId=Math.round(Math.random()*1000);},initializeURLVariables:','function()',arguments);this.layerStatus.removeURLVariable("[mapId]");this.layerStatus.setURLVariable("[nodeLayers]",[this,"getNodeLayersJSON"]);this.layerStatus.setURLVariable("[layerCacheMode]",[this,"getlayerCacheId"]);this.layerStatus.setURLVariable("[height]",this.tileWidth);this.layerStatus.setURLVariable("[width]",this.tileHeight);},getNodeQuereyObject:function(nodeIds)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1242,'this.layerStatus.removeURLVariable("[mapId]");this.layerStatus.setURLVariable("[nodeLayers]",[this,"getNodeLayersJSON"]);this.layerStatus.setURLVariable("[layerCacheMode]",[this,"getlayerCacheId"]);this.layerStatus.setURLVariable("[height]",this.tileWidth);this.layerStatus.setURLVariable("[width]",this.tileHeight);},getNodeQuereyObject:','function(nodeIds)',arguments);var queryObject=$H();queryObject["requestType"]="getExtents";queryObject["intSrid"]=this.layerStatus.getSrid();queryObject["sessionId"]=this.layerStatus.getSessionId();queryObject["nodeLayers"]=this.getNodes(nodeIds).toJSON();return queryObject;},jumpToNodeExt:function(nodeId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1243,'var queryObject=$H();queryObject["requestType"]="getExtents";queryObject["intSrid"]=this.layerStatus.getSrid();queryObject["sessionId"]=this.layerStatus.getSessionId();queryObject["nodeLayers"]=this.getNodes(nodeIds).toJSON();return queryObject;},jumpToNodeExt:','function(nodeId)',arguments);this.actOnQuery(this.getNodeQuereyObject([nodeId]));},jumpToNodesExt:function(nodeIds)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1244,'this.actOnQuery(this.getNodeQuereyObject([nodeId]));},jumpToNodesExt:','function(nodeIds)',arguments);this.actOnQuery(this.getNodeQuereyObject(nodeIds));},jumpToExt:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1245,'this.actOnQuery(this.getNodeQuereyObject(nodeIds));},jumpToExt:','function()',arguments);var nodes=this.getNodes();this.actOnQuery(this.getNodeQuereyObject(nodes));},actOnQuery:function(queryObject)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1246,'var nodes=this.getNodes();this.actOnQuery(this.getNodeQuereyObject(nodes));},actOnQuery:','function(queryObject)',arguments);var url=this.layerStatus.getLayerServerUrl();var func=this.jumpToPoints;JSONRequest.get(url,func,{parameters:queryObject,boundTo:this});},jumpToPoints:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1247,'var url=this.layerStatus.getLayerServerUrl();var func=this.jumpToPoints;JSONRequest.get(url,func,{parameters:queryObject,boundTo:this});},jumpToPoints:','function(points)',arguments);this.mapStatus.jumpToPoints(points.flatten());},addNodes:function(ids)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1248,'this.mapStatus.jumpToPoints(points.flatten());},addNodes:','function(ids)',arguments);var type=Utility.typeOf(ids);if(type=="array")
{ids.each(this.addNode.bind(this));}
else if(type=="number")
{this.addNode(ids);}},addNode:function(id,defObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1252,'{this.addNode(ids);}},addNode:','function(id,defObj)',arguments);this.layerNodes[id]={id:id,mode:defObj.mode||"normal",transparency:defObj.transparency||100,theme:defObj.theme||0};Object.extend(this.layerNodes[id],defObj||{});},removeNode:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1253,'this.layerNodes[id]={id:id,mode:defObj.mode||"normal",transparency:defObj.transparency||100,theme:defObj.theme||0};Object.extend(this.layerNodes[id],defObj||{});},removeNode:','function(id)',arguments);this.layerNodes.remove(id);},clearNodes:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1254,'this.layerNodes.remove(id);},clearNodes:','function()',arguments);this.layerNodes=$H();},setNodeKey:function(id,key,value)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1255,'this.layerNodes=$H();},setNodeKey:','function(id,key,value)',arguments);if(this.layerNodes[id]&&this.layerNodes[id][key])
{this.layerNodes[id][key]=value;}},getNodes:function(ids)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1257,'{this.layerNodes[id][key]=value;}},getNodes:','function(ids)',arguments);var nodes=new Array();ids=ids||this.layerNodes.keys();ids.each(function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1258,'var nodes=new Array();ids=ids||this.layerNodes.keys();ids.each(','function(id)',arguments);nodes.push(this.layerNodes[id]);}.bind(this))
return nodes;},getNode:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1260,'return nodes;},getNode:','function(id)',arguments);return this.layerNodes[id];},getNodeLayers:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1261,'return this.layerNodes[id];},getNodeLayers:','function()',arguments);var arrNodes=[];$H(this.layerNodes).each(function(pair)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1262,'var arrNodes=[];$H(this.layerNodes).each(','function(pair)',arguments);if(pair.length==1)
{objLayer=pair[0];}
else
{objLayer=pair[1];}
if(objLayer.blnForceToBottom===true)
{arrNodes.unshift(objLayer);}
else
{arrNodes.push(objLayer);}});return arrNodes;},getNodeLayersJSON:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1270,'{arrNodes.push(objLayer);}});return arrNodes;},getNodeLayersJSON:','function()',arguments);return this.getNodeLayers().toJSON();},toggleLayerCacheMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1271,'return this.getNodeLayers().toJSON();},toggleLayerCacheMode:','function()',arguments);this.layerCacheMode=!this.layerCacheMode;},updateLayerCache:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1272,'this.layerCacheMode=!this.layerCacheMode;},updateLayerCache:','function()',arguments);this.layerCacheId=Math.round(Math.random()*1000);this.layerStatus.setLayersToBeUpdated();},getlayerCacheId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1273,'this.layerCacheId=Math.round(Math.random()*1000);this.layerStatus.setLayersToBeUpdated();},getlayerCacheId:','function()',arguments);if(this.layerCacheMode)
{return"layerCacheOff"+Math.round(Math.random()*1000);}
else
{return"layerCacheOn"+this.layerCacheId;}}});EasingManager.EasingVariable=Class.create();EasingManager.EasingVariable.prototype={key:"",value:0,initialize:function(key,options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1277,'{return"layerCacheOn"+this.layerCacheId;}}});EasingManager.EasingVariable=Class.create();EasingManager.EasingVariable.prototype={key:"",value:0,initialize:','function(key,options)',arguments);this.options={start:0,end:0,active:true,totalLength:100,easingType:"easeNone",amplitude:null,period:null,overshoot:null};Object.extend(this.options,options||{});this.value=this.options.start;this.key=key;},getEasedValue:function(frame)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1278,'this.options={start:0,end:0,active:true,totalLength:100,easingType:"easeNone",amplitude:null,period:null,overshoot:null};Object.extend(this.options,options||{});this.value=this.options.start;this.key=key;},getEasedValue:','function(frame)',arguments);if(this.options.active&&frame<=this.options.totalLength)
{var easingOptions=this.getEasingOptions(frame);return this.value=Easing[this.options.easingType].apply(Easing,easingOptions);}
else
{return this.value;}},getEndValue:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1282,'{return this.value;}},getEndValue:','function()',arguments);return this.options.end;},getEasingOptions:function(frame)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1283,'return this.options.end;},getEasingOptions:','function(frame)',arguments);var easingOptions=new Array();easingOptions[0]=frame;easingOptions[1]=this.options.start;easingOptions[2]=this.options.end-this.options.start;easingOptions[3]=this.options.totalLength;if(this.options.easingType.include('elastic'))
{easingOptions.push(this.options.amplitude);easingOptions.push(this.options.period);}
else if(this.options.easingType.include('back'))
{easingOptions.push(this.options.overshoot);}
return easingOptions;}}
EasingManager.ActionObject=Class.create();EasingManager.ActionObject.prototype={id:null,initialize:function(options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1289,'EasingManager.ActionObject=Class.create();EasingManager.ActionObject.prototype={id:null,initialize:','function(options)',arguments);this.options={onEnterFrame:null,onExitFrame:null,keys:[],interval:0};Object.extend(this.options,options||{});this.id=Utility.getRandomId(99,2);},onEnterFrame:function(actionValues)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1290,'this.options={onEnterFrame:null,onExitFrame:null,keys:[],interval:0};Object.extend(this.options,options||{});this.id=Utility.getRandomId(99,2);},onEnterFrame:','function(actionValues)',arguments);this.callMethod("onEnterFrame",actionValues);},onExitFrame:function(actionValues)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1291,'this.callMethod("onEnterFrame",actionValues);},onExitFrame:','function(actionValues)',arguments);this.callMethod("onExitFrame",actionValues);},callMethod:function(funk,actionValues)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1292,'this.callMethod("onExitFrame",actionValues);},callMethod:','function(funk,actionValues)',arguments);var keys=this.options.keys;var method=this.options[funk];if(method)
{var l=keys.size();var arrayToInvoke=new Array();for(var i=0;i<l;i++)
{arrayToInvoke.push(actionValues[keys[i]]);}
method.apply(method,arrayToInvoke);}}}
Stamp.Dom=Class.extend(Stamp,{node:null,size:null,opacity:null,defaultSize:new Point(20,20),defaultOpacity:1,type:"icon",node:null,id:null,mouseDrag:0,mouseMoveTolerance:5,passThroughEvents:['mouseup','mousemove','scroll','contextmenu','DOMMouseScroll','mousewheel'],initialize:function(node,defObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1297,'Stamp.Dom=Class.extend(Stamp,{node:null,size:null,opacity:null,defaultSize:new Point(20,20),defaultOpacity:1,type:"icon",node:null,id:null,mouseDrag:0,mouseMoveTolerance:5,passThroughEvents:[\'mouseup\',\'mousemove\',\'scroll\',\'contextmenu\',\'DOMMouseScroll\',\'mousewheel\'],initialize:','function(node,defObj)',arguments);this.parent();var objClonedNode=node.cloneNode(true);if(blnUseJQuery===true)
{$j(document).data('stampElement'+this.stampId,objClonedNode);}
else
{this.node=$(objClonedNode);}
defObj=defObj||{};this.size=defObj.size||this.defaultSize;this.opacity=defObj.opacity||this.defaultOpacity;this.callback=defObj.callback;this.objResizeCallbackFunction=null;this.objCloseCallbackFunction=null;this.blnLocked=false;this.strStampType=defObj.strStampType||'symbol';},returnElementReference:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1302,'defObj=defObj||{};this.size=defObj.size||this.defaultSize;this.opacity=defObj.opacity||this.defaultOpacity;this.callback=defObj.callback;this.objResizeCallbackFunction=null;this.objCloseCallbackFunction=null;this.blnLocked=false;this.strStampType=defObj.strStampType||\'symbol\';},returnElementReference:','function()',arguments);return $j(document).data('stampElement'+this.stampId);},clone:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1303,'return $j(document).data(\'stampElement\'+this.stampId);},clone:','function()',arguments);if(blnUseJQuery===true)
{return $j.extend({},this);}
else
{return Object.clone(this);}},destroy:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1307,'{return Object.clone(this);}},destroy:','function()',arguments);if(blnUseJQuery===true)
{var objNode=this.returnElementReference();}
else
{var objNode=this.node;}
if(!objNode)
{return true;}
if(this.blnLocked===true)
{return false;}
if(objNode.parentNode)
{this.unregisterPassEventsToMap();this.unregisterEvents();this.parentObject=null;this.mouseMoveCached=null;this.mouseDownCached=null;this.mouseUpCached=null;this.mouseClickCached=null;objNode.onclick=null;objNode.parentNode.removeChild(objNode);}
this.node=null;this.nodeCached=null;return true;},_attach:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1318,'this.node=null;this.nodeCached=null;return true;},_attach:','function()',arguments);if(blnUseJQuery===true)
{var objNode=$j(this.returnElementReference());$j(this.parentObject.stampsDiv).append(objNode.get(0));objNode.addClass('ezmapsIcon');objNode.attr('stampId',this.stampId);}
else
{this.parentObject.stampsDiv.appendChild(this.node);this.node.addClassName('ezmapsIcon');this.node.stampId=this.stampId;switch(this.strStampType)
{case'symbol':this.objSymbolImage=$(this.node).down('img.symbolImage');break;case'text':this.objTextHandle=$(this.node).down('div.textTab');this.objTextContainer=$(this.node).down('div.textContainer');this.objTextarea=$(this.node).down('textarea.textarea');break;}}
this.passEventsToMap();this.registerEvents();},passEventsToMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1324,'this.passEventsToMap();this.registerEvents();},passEventsToMap:','function()',arguments);this.eventHandlerFunction=this.parentObject.mapStatus.eventHandler.getEventHandlerFunction();if(blnUseJQuery===true)
{var _this=this;$j.each(this.passThroughEvents,function(intKey,strEventType)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1326,'{var _this=this;$j.each(this.passThroughEvents,','function(intKey,strEventType)',arguments);$j(_this.returnElementReference()).bind(strEventType,_this.eventHandlerFunction);});}
else
{this.passThroughEvents.each(function(eventType)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1329,'{this.passThroughEvents.each(','function(eventType)',arguments);Event.observe(this.node,eventType,this.eventHandlerFunction);}.bindAsEventListener(this));}},unregisterPassEventsToMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1330,'Event.observe(this.node,eventType,this.eventHandlerFunction);}.bindAsEventListener(this));}},unregisterPassEventsToMap:','function()',arguments);if(blnUseJQuery===true)
{var _this=this;$j.each(this.passThroughEvents,function(intKey,strEventType)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1332,'{var _this=this;$j.each(this.passThroughEvents,','function(intKey,strEventType)',arguments);$j(_this.returnElementReference()).unbind(strEventType,_this.eventHandlerFunction);});}
else
{this.passThroughEvents.each(function(eventType)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1335,'{this.passThroughEvents.each(','function(eventType)',arguments);Event.stopObserving(this.node,eventType,this.eventHandlerFunction);}.bindAsEventListener(this));}},registerEvents:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1336,'Event.stopObserving(this.node,eventType,this.eventHandlerFunction);}.bindAsEventListener(this));}},registerEvents:','function()',arguments);var _this=this;this.mouseMoveCached=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1337,'var _this=this;this.mouseMoveCached=','function()',arguments);_this.mouseMove();}
this.mouseDownCached=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1339,'this.mouseDownCached=','function()',arguments);_this.mouseDown();}
this.mouseUpCached=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1341,'this.mouseUpCached=','function()',arguments);_this.mouseUp();}
this.mouseClickCached=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1343,'this.mouseClickCached=','function()',arguments);_this.mouseClick();}
if(blnUseJQuery===true)
{var objNode=$j(this.returnElementReference());objNode.bind('mousemove',this.mouseMoveCached);objNode.bind('mousedown',this.mouseDownCached);objNode.bind('mouseup',this.mouseUpCached);objNode.bind('click',this.mouseClickCached);}
else
{this.nodeCached=this.node;Event.observe(this.nodeCached,"mousemove",this.mouseMoveCached);Event.observe(this.nodeCached,"mousedown",this.mouseDownCached);Event.observe(this.nodeCached,"mouseup",this.mouseUpCached);Event.observe(this.nodeCached,"click",this.mouseClickCached);}},unregisterEvents:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1348,'{this.nodeCached=this.node;Event.observe(this.nodeCached,"mousemove",this.mouseMoveCached);Event.observe(this.nodeCached,"mousedown",this.mouseDownCached);Event.observe(this.nodeCached,"mouseup",this.mouseUpCached);Event.observe(this.nodeCached,"click",this.mouseClickCached);}},unregisterEvents:','function()',arguments);if(blnUseJQuery===true)
{var objNode=$j(this.returnElementReference());objNode.unbind('mousemove',this.mouseMoveCached);objNode.unbind('mousedown',this.mouseDownCached);objNode.unbind('mouseup',this.mouseUpCached);objNode.unbind('click',this.mouseClickCached);}
else
{Event.stopObserving(this.nodeCached,"mousemove",this.mouseMoveCached);Event.stopObserving(this.nodeCached,"mousedown",this.mouseDownCached);Event.stopObserving(this.nodeCached,"mouseup",this.mouseUpCached);Event.stopObserving(this.nodeCached,"click",this.mouseClickCached);}},mouseMove:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1352,'{Event.stopObserving(this.nodeCached,"mousemove",this.mouseMoveCached);Event.stopObserving(this.nodeCached,"mousedown",this.mouseDownCached);Event.stopObserving(this.nodeCached,"mouseup",this.mouseUpCached);Event.stopObserving(this.nodeCached,"click",this.mouseClickCached);}},mouseMove:','function()',arguments);this.mouseDrag++;},mouseDown:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1353,'this.mouseDrag++;},mouseDown:','function()',arguments);this.mouseDrag=0;this.mouseIsDown=true;},mouseUp:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1354,'this.mouseDrag=0;this.mouseIsDown=true;},mouseUp:','function()',arguments);this.mouseIsDown=false;},mouseClick:function(returnObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1355,'this.mouseIsDown=false;},mouseClick:','function(returnObj)',arguments);if(this.mouseDrag<this.mouseMoveTolerance&&this.callback)
{this.callback(returnObj,'click',this.stampId);}
this.mouseIsDown=false;},setCallback:function(cbFunction)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1358,'this.mouseIsDown=false;},setCallback:','function(cbFunction)',arguments);this.callback=cbFunction;},setResizeCallback:function(cbFunction)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1359,'this.callback=cbFunction;},setResizeCallback:','function(cbFunction)',arguments);this.resizeCallback=cbFunction;},makeDraggable:function(objDrop,callback)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1360,'this.resizeCallback=cbFunction;},makeDraggable:','function(objDrop,callback)',arguments);var _this=this;this.blnIsDraggable=true;if(blnUseJQuery===true)
{var objNode=$j(this.returnElementReference());objNode.addClass('ezmapDraggables');switch(this.strStampType)
{case'symbol':var objHandle=objNode.find('img.symbolImage');break;case'text':var objHandle=objNode.find('div.textTab');objHandle.show();break;}
objNode.draggable({revert:false,handle:objHandle});}
else
{this.node.addClassName('ezmapDraggables');switch(this.strStampType)
{case'symbol':var objHandle=this.objSymbolImage;break;case'text':var objHandle=this.objTextHandle;this.objTextHandle.setStyle({display:''});break;}
this.objDraggable=new Draggable(this.node,{revert:false,handle:objHandle});}
objDrop.registerCallback(function(returnObj){_this.onPointMove(returnObj)});if(callback)
{this.setCallback(callback);}},makeUnDraggable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1370,'{this.setCallback(callback);}},makeUnDraggable:','function()',arguments);if(this.blnIsDraggable)
{if(blnUseJQuery===true)
{var objNode=$j(this.returnElementReference());objNode.draggable('destroy');switch(this.strStampType)
{case'symbol':break;case'text':objNode.find('div.textTab').hide();break;}}
else
{this.objDraggable.destroy();switch(this.strStampType)
{case'symbol':break;case'text':this.objTextHandle.setStyle({display:'none'});break;}}}
this.blnIsDraggable=false;},onPointMove:function(returnObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1378,'this.blnIsDraggable=false;},onPointMove:','function(returnObj)',arguments);if(returnObj.activeElement.stampId==this.stampId)
{this.moveTo(returnObj.pointOnMap);if(this.callback)
{this.callback(returnObj,'move',this.stampId);}}},makeResizable:function(callback)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1381,'{this.callback(returnObj,\'move\',this.stampId);}}},makeResizable:','function(callback)',arguments);this.blnIsResizable=true;var _this=this;this.cachedHandleDown=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1382,'this.blnIsResizable=true;var _this=this;this.cachedHandleDown=','function()',arguments);_this.setupResizeObservers();}
if(blnUseJQuery===true)
{var objNode=$j(this.returnElementReference());objNode.find('div.resizeBorder').show();objNode.find('div.resizeHandle').show();objNode.find('div.resizeHandle').bind('mousedown',this.cachedHandleDown);}
else
{this.objResizeBorder=$(this.node).down('div.resizeBorder');this.objResizeHandle=$(this.node).down('div.resizeHandle');this.objDummyFocusField=$(this.node).down('.dummyFocusField');this.objResizeBorder.setStyle({display:''});this.objResizeHandle.setStyle({display:''});Event.observe(this.objResizeHandle,"mousedown",this.cachedHandleDown);}
this.objResizeCallbackFunction=callback;},makeUnResizable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1388,'this.objResizeCallbackFunction=callback;},makeUnResizable:','function()',arguments);if(this.blnIsResizable)
{if(blnUseJQuery===true)
{var objNode=$j(this.returnElementReference());objNode.find('div.resizeBorder').hide();objNode.find('div.resizeHandle').hide();objNode.find('div.resizeHandle').unbind('mousedown',this.cachedHandleDown);}
else
{this.objResizeBorder.setStyle({display:'none'});this.objResizeHandle.setStyle({display:'none'});Event.stopObserving(this.objResizeHandle,"mousedown",this.cachedHandleDown);}}
this.blnIsResizable=false;},setupResizeObservers:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1394,'this.blnIsResizable=false;},setupResizeObservers:','function()',arguments);var _this=this;this.resizeElementMouseReleaseFunction();switch(this.strStampType)
{case'symbol':this.cachedMove=function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1396,'{case\'symbol\':this.cachedMove=','function(event)',arguments);_this.resizeElementMouseMoveFunction(event);}
break;case'text':this.cachedMove=function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1398,'break;case\'text\':this.cachedMove=','function(event)',arguments);_this.resizeTextElementMouseMoveFunction(event);}
break;}
this.cachedRelease=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1401,'this.cachedRelease=','function()',arguments);_this.resizeElementMouseReleaseFunction();}
if(blnUseJQuery===true)
{$j(document).bind('mousemove',this.cachedMove);$j(document).bind('mouseup',this.cachedRelease);}
else
{Event.observe(document,"mousemove",this.cachedMove);Event.observe(document,"mouseup",this.cachedRelease);}},resizeElementMouseMoveFunction:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1406,'{Event.observe(document,"mousemove",this.cachedMove);Event.observe(document,"mouseup",this.cachedRelease);}},resizeElementMouseMoveFunction:','function(event)',arguments);if(this.mouseIsDown)
{if(blnUseJQuery===true)
{var objNode=$j(this.returnElementReference());var intWidth=parseInt(objNode.width());var intHeight=parseInt(objNode.height());var intCurrentXPos=objNode.offset().left;var intCurrentYPos=objNode.offset().top;var intCurrentMouseXPos=event.pageX;var intCurrentMouseYPos=event.pageY;var intCurrentCSSBottom=parseInt(objNode.css('bottom'));}
else
{var objDimensions=this.node.getDimensions();var intWidth=objDimensions["width"];var intHeight=objDimensions["height"];var intCurrentXPos=this.node.viewportOffset().left;var intCurrentYPos=this.node.viewportOffset().top;var intCurrentMouseXPos=Event.pointerX(event);var intCurrentMouseYPos=Event.pointerY(event);var intCurrentCSSBottom=parseInt(this.node.style.bottom);}
var intNewWidth=Math.abs(intCurrentMouseXPos-intCurrentXPos);var intNewHeight=Math.abs(intCurrentMouseYPos-intCurrentYPos);var intHeightChange=intNewHeight-intHeight;var intNewCSSBottom=intCurrentCSSBottom-intHeightChange;intNewBorderWidth=intNewWidth-10;intNewBorderHeight=intNewHeight-10;intNewImageWidth=intNewBorderWidth;intNewImageHeight=intNewBorderHeight;this.size.x=intNewWidth;this.size.y=intNewHeight;if(blnUseJQuery===true)
{objNode.css({width:intNewWidth+'px',height:intNewHeight+'px',bottom:intNewCSSBottom+'px'});objNode.find('div.resizeBorder').css({height:intNewBorderHeight+'px',width:intNewBorderWidth+'px'});objNode.find('img.symbolImage').css({width:intNewImageWidth+'px',height:intNewImageHeight+'px'});}
else
{this.node.setStyle({width:intNewWidth+"px",height:intNewHeight+"px",bottom:intNewCSSBottom+"px"});this.objResizeBorder.setStyle({height:intNewBorderHeight+"px",width:intNewBorderWidth+"px"});this.objSymbolImage.setStyle({width:intNewImageWidth+"px",height:intNewImageHeight+"px"});}}
else
{this.resizeElementMouseReleaseFunction();}},resizeTextElementMouseMoveFunction:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1417,'{this.resizeElementMouseReleaseFunction();}},resizeTextElementMouseMoveFunction:','function(event)',arguments);if(this.mouseIsDown)
{if(blnUseJQuery===true)
{event=$j.event.fix(event||window.event);var objNode=$j(this.returnElementReference());var intWidth=parseInt(objNode.width());var intHeight=parseInt(objNode.height());var intCurrentXPos=objNode.offset().left;var intCurrentYPos=objNode.offset().top;var intCurrentMouseXPos=event.pageX;var intCurrentMouseYPos=event.pageY;var intCurrentCSSBottom=parseInt(objNode.css('bottom'));}
else
{var objDimensions=this.node.getDimensions();var intWidth=objDimensions["width"];var intHeight=objDimensions["height"];var intCurrentXPos=this.node.viewportOffset().left;var intCurrentYPos=this.node.viewportOffset().top;var intCurrentMouseXPos=Event.pointerX(event);var intCurrentMouseYPos=Event.pointerY(event);var intCurrentCSSBottom=parseInt(this.node.style.bottom);}
var intNewWidth=Math.abs(intCurrentMouseXPos-intCurrentXPos);var intNewHeight=Math.abs(intCurrentMouseYPos-intCurrentYPos);var intHeightChange=intNewHeight-intHeight;var intNewCSSBottom=intCurrentCSSBottom-intHeightChange;intNewBorderWidth=intNewWidth-10;intNewBorderHeight=intNewHeight-10;intNewTextContainerWidth=intNewBorderWidth-15;intNewTextContainerHeight=intNewBorderHeight-15;this.size.x=intNewWidth;this.size.y=intNewHeight;if(blnUseJQuery===true)
{objNode.css({width:intNewWidth+'px',height:intNewHeight+'px',bottom:intNewCSSBottom+'px'});objNode.find('div.resizeBorder').css({height:intNewBorderHeight+'px',width:intNewBorderWidth+'px'});objNode.find('div.textContainer').css({width:intNewTextContainerWidth+'px',height:intNewTextContainerHeight+'px'});objNode.find('textarea.textarea').css({width:'100%',height:intNewTextContainerHeight+'px'});}
else
{this.node.setStyle({width:intNewWidth+"px",height:intNewHeight+"px",bottom:intNewCSSBottom+"px"});this.objResizeBorder.setStyle({height:intNewBorderHeight+"px",width:intNewBorderWidth+"px"});this.objTextContainer.setStyle({width:intNewTextContainerWidth+"px",height:intNewTextContainerHeight+"px"});this.objTextarea.setStyle({width:"100%",height:intNewTextContainerHeight+"px"});}}
else
{this.resizeElementMouseReleaseFunction();}},resizeElementMouseReleaseFunction:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1428,'{this.resizeElementMouseReleaseFunction();}},resizeElementMouseReleaseFunction:','function()',arguments);if(blnUseJQuery===true)
{$j(document).unbind('mousemove',this.cachedMove);$j(document).unbind('mouseup',this.cachedRelease);var objDummyFocusField=$j(this.returnElementReference()).find('.dummyFocusField');if(objDummyFocusField.length>0)
{objDummyFocusField.focus();}}
else
{Event.stopObserving(document,"mousemove",this.cachedMove);Event.stopObserving(document,"mouseup",this.cachedRelease);if(this.objDummyFocusField!=null)
{this.objDummyFocusField.focus();}}
this.mouseIsDown=false;var objSizeDetails={intWidth:this.size.x,intHeight:this.size.y};this.objResizeCallbackFunction(this.stampId,objSizeDetails);},makeClosable:function(callback)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1435,'this.mouseIsDown=false;var objSizeDetails={intWidth:this.size.x,intHeight:this.size.y};this.objResizeCallbackFunction(this.stampId,objSizeDetails);},makeClosable:','function(callback)',arguments);this.blnIsClosable=true;var _this=this;this.objCachedCloseCallbackFunction=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1436,'this.blnIsClosable=true;var _this=this;this.objCachedCloseCallbackFunction=','function()',arguments);callback(_this.stampId);}
if(blnUseJQuery===true)
{var objCloseButton=$j(this.returnElementReference()).find('div.closeButton');objCloseButton.show();objCloseButton.bind('click',this.objCachedCloseCallbackFunction);}
else
{this.objCloseButton=$(this.node).down('div.closeButton');this.objCloseButton.setStyle({display:''});Event.observe(this.objCloseButton,'click',this.objCachedCloseCallbackFunction);}},makeUnClosable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1441,'{this.objCloseButton=$(this.node).down(\'div.closeButton\');this.objCloseButton.setStyle({display:\'\'});Event.observe(this.objCloseButton,\'click\',this.objCachedCloseCallbackFunction);}},makeUnClosable:','function()',arguments);if(this.blnIsClosable)
{if(blnUseJQuery===true)
{var objCloseButton=$j(this.returnElementReference()).find('div.closeButton');objCloseButton.hide();objCloseButton.unbind('click',this.objCachedCloseCallbackFunction);}
else
{this.objCloseButton.setStyle({display:'none'});Event.stopObserving(this.objCloseButton,"click",this.objCachedCloseCallbackFunction);}}
this.blnIsClosable=false;},makeTextEditable:function(callback)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1447,'this.blnIsClosable=false;},makeTextEditable:','function(callback)',arguments);this.blnIsEditable=true;var _this=this;this.objCachedTextBlurCallbackFunction=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1448,'this.blnIsEditable=true;var _this=this;this.objCachedTextBlurCallbackFunction=','function()',arguments);callback(_this.stampId);}
if(blnUseJQuery===true)
{$j(this.returnElementReference()).find('textarea.textarea').bind('blur',this.objCachedTextBlurCallbackFunction);}
else
{Event.observe(this.objTextarea,"blur",this.objCachedTextBlurCallbackFunction);}},makeTextUnEditable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1453,'{Event.observe(this.objTextarea,"blur",this.objCachedTextBlurCallbackFunction);}},makeTextUnEditable:','function()',arguments);if(this.blnIsEditable)
{if(blnUseJQuery===true)
{$j(this.returnElementReference()).find('textarea.textarea').unbind('blur',this.objCachedTextBlurCallbackFunction);}
else
{Event.stopObserving(this.objTextarea,"blur",this.objCachedTextBlurCallbackFunction);}}
this.blnIsEditable=false;},getId:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1459,'this.blnIsEditable=false;},getId:','function(id)',arguments);return this.stampId;},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1460,'return this.stampId;},update:','function()',arguments);this.setSize();this.setOpacity();},_setSize:function(size)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1461,'this.setSize();this.setOpacity();},_setSize:','function(size)',arguments);if(blnUseJQuery===true)
{$j(this.returnElementReference()).css({width:this.size.x+'px',height:this.size.y+'px'});}
else
{this.node.setStyle({width:this.size.x+"px",height:this.size.y+"px"});}},setOpacity:function(opacity)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1465,'{this.node.setStyle({width:this.size.x+"px",height:this.size.y+"px"});}},setOpacity:','function(opacity)',arguments);this.opacity=(typeof(opacity)=='number')?opacity:this.opacity;if(blnUseJQuery===true)
{if($j.browser.msie)
{this.returnElementReference().style.opacity=this.opacity;}
else
{$j(this.returnElementReference()).css({opacity:this.opacity});}}
else
{this.node.setStyle({opacity:this.opacity});}},_moveTo:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1472,'{this.node.setStyle({opacity:this.opacity});}},_moveTo:','function(point)',arguments);if(blnUseJQuery===true)
{$j(this.returnElementReference()).css({top:null,bottom:point.y-(this.size.y/2)+'px',left:point.x-(this.size.x/2)+'px'});}
else
{this.node.style.bottom=point.y-(this.size.y/2)+'px';this.node.style.left=point.x-(this.size.x/2)+'px';this.node.style.top=null;}},hide:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1476,'{this.node.style.bottom=point.y-(this.size.y/2)+\'px\';this.node.style.left=point.x-(this.size.x/2)+\'px\';this.node.style.top=null;}},hide:','function()',arguments);if(blnUseJQuery===true)
{$j(this.returnElementReference()).hide();}
else
{this.node.hide();}},show:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1480,'{this.node.hide();}},show:','function()',arguments);if(blnUseJQuery===true)
{$j(this.returnElementReference()).show();}
else
{this.node.show();}}});Stamp.Shape=Class.extend(Stamp,{size:null,defaultSize:new Point(20,20,"meters"),defaultStroke:{r:27,g:127,b:147,a:95,w:5},defaultFill:{r:27,g:127,b:147,a:95,w:5},type:"shape",shape:null,stroke:null,fill:null,polyPoints:null,initialize:function(shapeType,defObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1484,'{this.node.show();}}});Stamp.Shape=Class.extend(Stamp,{size:null,defaultSize:new Point(20,20,"meters"),defaultStroke:{r:27,g:127,b:147,a:95,w:5},defaultFill:{r:27,g:127,b:147,a:95,w:5},type:"shape",shape:null,stroke:null,fill:null,polyPoints:null,initialize:','function(shapeType,defObj)',arguments);this.parent();this.shapeType=shapeType.capitalize();defObj=defObj||{};this.size=defObj.size||this.defaultSize;this.fill=defObj.fill||this.defaultFill;this.stroke=defObj.stroke||this.defaultStroke;this.polyPoints=defObj.polyPoints||this.polyPoints;},clone:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1485,'this.parent();this.shapeType=shapeType.capitalize();defObj=defObj||{};this.size=defObj.size||this.defaultSize;this.fill=defObj.fill||this.defaultFill;this.stroke=defObj.stroke||this.defaultStroke;this.polyPoints=defObj.polyPoints||this.polyPoints;},clone:','function()',arguments);return new Stamp.Shape(this.shapeType,this);},destroy:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1486,'return new Stamp.Shape(this.shapeType,this);},destroy:','function()',arguments);this.shape.destroy();this.shape=null;},_attach:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1487,'this.shape.destroy();this.shape=null;},_attach:','function()',arguments);this.renderer=this.parentObject.renderer;this.makeShape();},makeShape:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1488,'this.renderer=this.parentObject.renderer;this.makeShape();},makeShape:','function()',arguments);this.shape=new Graphic[this.shapeType](this.renderer);this.renderer.add(this.shape);},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1489,'this.shape=new Graphic[this.shapeType](this.renderer);this.renderer.add(this.shape);},update:','function()',arguments);this.setPolyPoints();this.setFill();this.setStroke();this.setSize();},setPolyPoints:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1490,'this.setPolyPoints();this.setFill();this.setStroke();this.setSize();},setPolyPoints:','function(points)',arguments);this.polyPoints=points||this.polyPoints;if(this.shape&&this.shapeType.include("Poly")&&this.polyPoints)
this.shape.setPoints(this.polyPoints);},setFill:function(fill)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1492,'this.shape.setPoints(this.polyPoints);},setFill:','function(fill)',arguments);this.fill=fill||this.fill;if(this.shape)
this.shape.setFill(this.fill);},setStroke:function(stroke)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1494,'this.shape.setFill(this.fill);},setStroke:','function(stroke)',arguments);this.stroke=stroke||this.stroke;if(this.shape)
this.shape.setStroke(this.stroke);},_setSize:function(size)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1496,'this.shape.setStroke(this.stroke);},_setSize:','function(size)',arguments);switch(this.shapeType)
{case"Circle":this.shape.setRadius(Math.min(size.x,this.maxSize));break;case"Polyline":case"Polygon":case"Rectangle":this.shape.setSize(size.x,size.y);break;}},_moveTo:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1498,'{case"Circle":this.shape.setRadius(Math.min(size.x,this.maxSize));break;case"Polyline":case"Polygon":case"Rectangle":this.shape.setSize(size.x,size.y);break;}},_moveTo:','function(point)',arguments);point=this.parentObject.mapStatus.invertYaxis(point);switch(this.shapeType)
{case"Circle":this.shape.setCenter(point.x,point.y);break;case"Polyline":case"Polygon":case"Rectangle":var x=(Math.min(this.mapStampSize.x,this.maxSize))/2;var y=(Math.min(this.mapStampSize.y,this.maxSize))/2;this.shape.setLocation(point.x-x,point.y-y);break;}},_clip:function(box)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1500,'{case"Circle":this.shape.setCenter(point.x,point.y);break;case"Polyline":case"Polygon":case"Rectangle":var x=(Math.min(this.mapStampSize.x,this.maxSize))/2;var y=(Math.min(this.mapStampSize.y,this.maxSize))/2;this.shape.setLocation(point.x-x,point.y-y);break;}},_clip:','function(box)',arguments);if(this.mapPoint&&this.mapStampSize&&box.clipPoint(this.mapPoint,Math.min(this.mapStampSize,this.maxSize)))
{this.show();}
else
{this.hide();}},hide:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1504,'{this.hide();}},hide:','function()',arguments);if(this.shape)
this.shape.hide();},show:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1506,'this.shape.hide();},show:','function()',arguments);if(this.shape)
this.shape.show();}});var Widget=Class.create();Widget=Class.extend({include:EzMapsEvent,eventPriority:5,widgetsDiv:null,mapStatus:null,widgetDiv:null,callbackFunctions:null,renderer:null,iconsDiv:null,initialize:function(widgetsContainers,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1508,'this.shape.show();}});var Widget=Class.create();Widget=Class.extend({include:EzMapsEvent,eventPriority:5,widgetsDiv:null,mapStatus:null,widgetDiv:null,callbackFunctions:null,renderer:null,iconsDiv:null,initialize:','function(widgetsContainers,mapStatus,renderer)',arguments);this.mapStatus=mapStatus;this.widgetsDiv=widgetsContainers.above;this.widgetsInactiveDiv=widgetsContainers.below;this.horizontalToolbarDiv=widgetsContainers.above.horizontalToolbarDiv;this.verticalToolbarDiv=widgetsContainers.above.verticalToolbarDiv;this.stampsDiv=widgetsContainers.above.iconsDiv;this.renderer=renderer;this.mapStatus.eventHandler.addAListener(this);this.callbackFunctions=new Array();this.namedCallbackFunctions=$H();},update:function(){},reposition:function(){},refresh:function(){},realTimeUpdate:function(){},hideRealTime:function(){},showRealTime:function(){},registerCallback:function(callback)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1509,'this.mapStatus=mapStatus;this.widgetsDiv=widgetsContainers.above;this.widgetsInactiveDiv=widgetsContainers.below;this.horizontalToolbarDiv=widgetsContainers.above.horizontalToolbarDiv;this.verticalToolbarDiv=widgetsContainers.above.verticalToolbarDiv;this.stampsDiv=widgetsContainers.above.iconsDiv;this.renderer=renderer;this.mapStatus.eventHandler.addAListener(this);this.callbackFunctions=new Array();this.namedCallbackFunctions=$H();},update:function(){},reposition:function(){},refresh:function(){},realTimeUpdate:function(){},hideRealTime:function(){},showRealTime:function(){},registerCallback:','function(callback)',arguments);if(this.callbackFunctions.indexOf(callback)==-1)
{this.callbackFunctions.push(callback);}},registerNamedCallback:function(strName,callback)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1511,'{this.callbackFunctions.push(callback);}},registerNamedCallback:','function(strName,callback)',arguments);this.namedCallbackFunctions[strName]=callback;},unregisterCallback:function(callback)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1512,'this.namedCallbackFunctions[strName]=callback;},unregisterCallback:','function(callback)',arguments);this.callbackFunctions=this.callbackFunctions.without(callback);}});var LayerMenuWidget=Class.extend(Widget,{nameLength:100,dropDown:null,mapImg:null,menuBHidden:false,blnDisableABIcons:false,tags:["menuA","imgA","slider","imgB","menuB"],sliderWidth:45,sliderClipRange:0.05,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1513,'this.callbackFunctions=this.callbackFunctions.without(callback);}});var LayerMenuWidget=Class.extend(Widget,{nameLength:100,dropDown:null,mapImg:null,menuBHidden:false,blnDisableABIcons:false,tags:["menuA","imgA","slider","imgB","menuB"],sliderWidth:45,sliderClipRange:0.05,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);globalNoMapB=false;this.blnDontLoadMenus=false;this.blnMouseOverMenu=false;this.parent(widgetsDiv,mapStatus,renderer);this.makeDivs();this.makeSlider();if(blnUseJQuery===true)
{this.objCachedFunctions={};var _this=this;this.objCachedFunctions.windowResize=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1515,'{this.objCachedFunctions={};var _this=this;this.objCachedFunctions.windowResize=','function()',arguments);_this.resizeHorizontalToolbar();};$j(window).bind('resize',this.objCachedFunctions.windowResize);$j(this.returnDivReference('menuA')).css({'float':'left'});$j(this.returnDivReference('menuB')).css({'float':'left'});var objPadlockDiv=$j('#ezMaps').find('.widgetPadlock:first');var objResetExtentsDiv=$j('#ezMaps').find('.resetButtonWidget:first');if(objPadlockDiv.length>0||objResetExtentsDiv.length>0)
{$j('#widgetLayerMenu').css({'margin-left':'30px'});}}
else
{this.divs["menuA"].setStyle({'float':'left'});this.divs["menuB"].setStyle({'float':'left'});this.eventListenerFunctions={};this.eventListenerFunctions.A={};this.eventListenerFunctions.B={};Event.observe(window,'resize',this.resizeHorizontalToolbar.bindAsEventListener(this));var padlockDiv=$('ezMaps').down('.widgetPadlock');var resetExtentsDiv=$('ezMaps').down('.resetButtonWidget');if(typeof(padlockDiv)=="undefined"&&typeof(resetExtentsDiv)=="undefined")
{$('widgetLayerMenu').setStyle({marginLeft:'30px'});}}
this.menuProperties={};},returnDivReference:function(strClass)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1521,'this.menuProperties={};},returnDivReference:','function(strClass)',arguments);var cache=$j('#widgetLayerMenu').data(strClass);return cache;},hidePickers:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1522,'var cache=$j(\'#widgetLayerMenu\').data(strClass);return cache;},hidePickers:','function()',arguments);if(blnUseJQuery===true)
{$j(this.returnDivReference('menuA')).hide();$j(this.returnDivReference('menuB')).hide();}
else
{this.divs["menuA"].setStyle({display:'none'});this.divs["menuB"].setStyle({display:'none'});}
this.blnDontLoadMenus=true;},loadMapMenu:function(strUrl)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1527,'this.blnDontLoadMenus=true;},loadMapMenu:','function(strUrl)',arguments);if(!this.blnDontLoadMenus)
{if(blnUseJQuery===true)
{var _this=this;var objOnComplete=function(XMLHttpRequest)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1530,'{var _this=this;var objOnComplete=','function(XMLHttpRequest)',arguments);_this.onComplete(XMLHttpRequest);};$j.ajax({async:true,cache:false,type:'POST',url:strUrl,complete:function(XMLHttpRequest)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1531,'_this.onComplete(XMLHttpRequest);};$j.ajax({async:true,cache:false,type:\'POST\',url:strUrl,complete:','function(XMLHttpRequest)',arguments);objOnComplete(XMLHttpRequest);}});}
else
{var objOptions={onComplete:this.onComplete.bind(this)};new Ajax.Request(strUrl,objOptions);}}},onComplete:function(XMLHttpRequest)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1534,'{var objOptions={onComplete:this.onComplete.bind(this)};new Ajax.Request(strUrl,objOptions);}}},onComplete:','function(XMLHttpRequest)',arguments);var _this=this;var strHtml=XMLHttpRequest.responseText;if(blnUseJQuery===true)
{var objMenuA=this.returnDivReference('menuA');var objMenuB=this.returnDivReference('menuB');$j(objMenuA).html(strHtml);$j(objMenuB).html(strHtml);this.objCachedFunctions.bodyClick=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1536,'{var objMenuA=this.returnDivReference(\'menuA\');var objMenuB=this.returnDivReference(\'menuB\');$j(objMenuA).html(strHtml);$j(objMenuB).html(strHtml);this.objCachedFunctions.bodyClick=','function()',arguments);if(_this.blnMouseOverMenu!==true)
{$j(objMenuA).find('li#topMenu').removeClass('sfhover sfhover_left_top sfhover_right_top');$j(objMenuB).find('li#topMenu').removeClass('sfhover sfhover_left_top sfhover_right_top');$j(objMenuA).find('ul:not([id="map_menu_list"])').each(function(intKey,objElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1538,'{$j(objMenuA).find(\'li#topMenu\').removeClass(\'sfhover sfhover_left_top sfhover_right_top\');$j(objMenuB).find(\'li#topMenu\').removeClass(\'sfhover sfhover_left_top sfhover_right_top\');$j(objMenuA).find(\'ul:not([id="map_menu_list"])\').each(','function(intKey,objElement)',arguments);$j(objElement).hide();});$j(objMenuB).find('ul:not([id="map_menu_list"])').each(function(intKey,objElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1539,'$j(objElement).hide();});$j(objMenuB).find(\'ul:not([id="map_menu_list"])\').each(','function(intKey,objElement)',arguments);$j(objElement).hide();});}};$j(document).find('body:first').bind('click',this.objCachedFunctions.bodyClick);this.listenForMapChangeClicks(objMenuA);this.listenForMapChangeClicks(objMenuB);this.setHoverEvents(objMenuA);this.setHoverEvents(objMenuB);}
else
{this.divs.menuA.update(strHtml);this.divs.menuB.update(strHtml);this.fixHover(this.divs.menuA,'A','sfhover_right');var intHorizontalToolbarDivWidth=$(this.horizontalToolbarDiv).getWidth();if(intHorizontalToolbarDivWidth<750)
{this.fixHover(this.divs.menuB,'B','sfhover_left');}
else
{this.fixHover(this.divs.menuB,'B','sfhover_right');}
this.listenForMapChangeClicks(this.divs.menuA);this.listenForMapChangeClicks(this.divs.menuB);}
this.updateMapNames();},makeSlider:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1547,'this.updateMapNames();},makeSlider:','function()',arguments);if(blnUseJQuery===true)
{var _this=this;var objSlider=$j(this.returnDivReference('slider'));objSlider.slider({animate:true,max:100,min:0,orientation:'horizontal',step:1,value:0,slide:function(event,ui)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1549,'{var _this=this;var objSlider=$j(this.returnDivReference(\'slider\'));objSlider.slider({animate:true,max:100,min:0,orientation:\'horizontal\',step:1,value:0,slide:','function(event,ui)',arguments);_this.setOpacity(ui.value/100);},change:function(event,ui)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1550,'_this.setOpacity(ui.value/100);},change:','function(event,ui)',arguments);_this.setOpacity(ui.value/100);}});objSlider.css({'margin-top':'6px','margin-left':'10px','margin-right':'10px'});objSlider.removeClass('ui-corner-all');}
else
{this.sliderObject=Utility.createHorizontalTrack(this.divs.slider,this.sliderWidth);this.slider=new Control.Slider(this.sliderObject.handleDiv,this.sliderObject.trackDiv,{sliderValue:0,onChange:function(v){this.setOpacity(v)}.bind(this),onSlide:function(v){this.setOpacity(v)}.bind(this)});this.intSliderValue=0;}
this.updateLayerIds();this.setOpacity(0);},enableSlider:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1554,'this.updateLayerIds();this.setOpacity(0);},enableSlider:','function()',arguments);if(blnUseJQuery===true)
{var objSlider=$j(this.returnDivReference('slider'));objSlider.slider('enable');}
else
{this.slider.setEnabled();this.divs.slider.setOpacity(1);}},disableSlider:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1558,'{this.slider.setEnabled();this.divs.slider.setOpacity(1);}},disableSlider:','function()',arguments);if(blnUseJQuery===true)
{var objSlider=$j(this.returnDivReference('slider'));objSlider.slider('disable');}
else
{this.slider.setDisabled();this.divs.slider.setOpacity(0.5);}},getSliderValue:function(intValue)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1562,'{this.slider.setDisabled();this.divs.slider.setOpacity(0.5);}},getSliderValue:','function(intValue)',arguments);if(blnUseJQuery===true)
{return($j(this.returnDivReference('slider')).slider('value')/100);}
else
{return this.intSliderValue;}},setSliderValue:function(intValue)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1566,'{return this.intSliderValue;}},setSliderValue:','function(intValue)',arguments);if(blnUseJQuery===true)
{$j(this.returnDivReference('slider')).slider('value',intValue*100);}
else
{this.slider.setValue(intValue);this.intSliderValue=intValue;}},setOpacity:function(level)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1570,'{this.slider.setValue(intValue);this.intSliderValue=intValue;}},setOpacity:','function(level)',arguments);var op=1-level;this.mapStatus.setLayerOpacity(this.mapStatus.getRasterLayerAId(),op);if(!globalNoMapB)
{this.mapStatus.setLayerOpacity(this.mapStatus.getRasterLayerBId(),1);}},listenForMapChangeClicks:function(objMenu)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1572,'{this.mapStatus.setLayerOpacity(this.mapStatus.getRasterLayerBId(),1);}},listenForMapChangeClicks:','function(objMenu)',arguments);if(blnUseJQuery===true)
{var _this=this;$j(objMenu).find('ul.topLevel').find('a').each(function(intKey,objElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1574,'{var _this=this;$j(objMenu).find(\'ul.topLevel\').find(\'a\').each(','function(intKey,objElement)',arguments);$j(objElement).bind('click',function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1575,'$j(objElement).bind(\'click\',','function(event)',arguments);_this.mapChange(event,objMenu);});});}
else
{var aNodes=objMenu.select('a');for(var i=1;i<aNodes.length;i++)
{var aNode=aNodes[i];Event.observe(aNode,"click",this.mapChange.bindAsEventListener(this,objMenu));}}},displayHideUndoWidget:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1579,'{var aNode=aNodes[i];Event.observe(aNode,"click",this.mapChange.bindAsEventListener(this,objMenu));}}},displayHideUndoWidget:','function()',arguments);var intHorizontalToolbarDivWidth=$(this.horizontalToolbarDiv).getWidth();var layerMenuDiv=$('ezMaps').down('.widgetLayerMenu');var menusWidth=0;if(layerMenuDiv!=null)
{menusWidth=layerMenuDiv.getWidth();}
var undoDiv=$('ezMaps').down('.widgetUndo');if(typeof(undoDiv)!="undefined")
{var undoWidth=undoDiv.getWidth();var totalWidth=(menusWidth+undoWidth)+30;if(totalWidth<intHorizontalToolbarDivWidth){undoDiv.show();}
else{undoDiv.hide();}}},mapChange:function(event,topElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1584,'else{undoDiv.hide();}}},mapChange:','function(event,topElement)',arguments);if(blnUseJQuery===true)
{this.blnMouseOverMenu=false;$j(document).find('body:first').trigger('click');var objElement=$j(event.target);var intStackId=objElement.attr('stackid')||'';var intMapId=objElement.attr('mapid')||'';var strGroup=(objElement.attr('group')||'').slice(0,this.nameLength);var strBranch=objElement.attr('branchname');if(intStackId!='')
{this.setLayerToStackId(intStackId,topElement);}
else if((intMapId!=''&&intMapId!='expired'&&intMapId!='0')&&strGroup!='')
{var objMapDetails=this.mapStatus.getMapDetails(intMapId);var strMap=objMapDetails['name'];if(strBranch&&strBranch!=strMap&&strBranch!=strGroup)
{strGroup+=" > "+strBranch.slice(0,this.nameLength);}
else if(!branchName&&group!=objElement.html())
{strGroup+=" > "+objElement.html().slice(0,this.nameLength);}
this.setLayerToMapId(intMapId,strGroup,topElement);}
else if(intMapId=='0')
{var strMap='No Map';strGroup=strMap;this.setLayerToBlank(intMapId,strGroup,topElement);}
else if(intMapId=='expired')
{if(typeof(this.mapStatus.mapOptions.expiredMapCallback)!='undefined')
{this.mapStatus.mapOptions.expiredMapCallback();}
else
{alert('Licence to view this map has expired!');}}}
else
{globalMenuOver=false;var element=Event.element(event);var stackid=element.readAttribute("stackid")||"";var mapId=element.readAttribute("mapid")||"";var group=(element.readAttribute("group")||"").slice(0,this.nameLength);var branchName=element.readAttribute("branchname");if(stackid!="")
{this.setLayerToStackId(stackid,topElement);}
else if((mapId!=""&&mapId!="expired"&&mapId!="0")&&group!="")
{var mapDetails=this.mapStatus.getMapDetails(mapId);var mapName=mapDetails["name"];if(branchName&&branchName!=mapName&&branchName!=group)
{group+=" > "+branchName.slice(0,this.nameLength);}
else if(!branchName&&group!=element.innerHTML)
{group+=" > "+element.innerHTML.slice(0,this.nameLength);}
this.setLayerToMapId(mapId,group,topElement);}
else if(mapId=="0")
{var mapName="No Map";group=mapName;this.setLayerToBlank(mapId,group,topElement);}
else if(mapId=="expired")
{if(typeof(this.mapStatus.mapOptions.expiredMapCallback)!="undefined")
{this.mapStatus.mapOptions.expiredMapCallback();}
else
{alert("Licence to view this map has expired!");}}
this.hideHoveredItems();}},hideHover:function(topElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1617,'this.hideHoveredItems();}},hideHover:','function(topElement)',arguments);return;topElement.select("ul.topLevel").first().style.top=-999+"px";if(Prototype.Browser.IE)
{var lists=topElement.select("LI");lists.invoke("removeClassName","sfhover");lists.invoke("removeClassName","sfhover_left_top");lists.invoke("removeClassName","sfhover_left");lists.invoke("removeClassName","sfhover_right_top");lists.invoke("removeClassName","sfhover_right");}
new PeriodicalExecuter(function(pe){pe.stop();topElement.select("ul.topLevel").first().style.top=null}.bind(this),0.5);},hideHoveredItems:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1620,'new PeriodicalExecuter(function(pe){pe.stop();topElement.select("ul.topLevel").first().style.top=null}.bind(this),0.5);},hideHoveredItems:','function()',arguments);var arrMenuItems=$A($$('.menuA')[0].getElementsByTagName('li'));arrMenuItems.each(function(objElement,mixIndex)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1621,'var arrMenuItems=$A($$(\'.menuA\')[0].getElementsByTagName(\'li\'));arrMenuItems.each(','function(objElement,mixIndex)',arguments);$(objElement).removeClassName('sfhover');$(objElement).removeClassName('sfhover_left_top');$(objElement).removeClassName('sfhover_left');$(objElement).removeClassName('sfhover_right_top');$(objElement).removeClassName('sfhover_right');}.bind(this));var arrMenuItems=$A($$('.menuB')[0].getElementsByTagName('li'));arrMenuItems.each(function(objElement,mixIndex)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1622,'$(objElement).removeClassName(\'sfhover\');$(objElement).removeClassName(\'sfhover_left_top\');$(objElement).removeClassName(\'sfhover_left\');$(objElement).removeClassName(\'sfhover_right_top\');$(objElement).removeClassName(\'sfhover_right\');}.bind(this));var arrMenuItems=$A($$(\'.menuB\')[0].getElementsByTagName(\'li\'));arrMenuItems.each(','function(objElement,mixIndex)',arguments);$(objElement).removeClassName('sfhover');$(objElement).removeClassName('sfhover_left_top');$(objElement).removeClassName('sfhover_left');$(objElement).removeClassName('sfhover_right_top');$(objElement).removeClassName('sfhover_right');}.bind(this));},removeHoverObservers:function(element,strMenu,strClassName)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1623,'$(objElement).removeClassName(\'sfhover\');$(objElement).removeClassName(\'sfhover_left_top\');$(objElement).removeClassName(\'sfhover_left\');$(objElement).removeClassName(\'sfhover_right_top\');$(objElement).removeClassName(\'sfhover_right\');}.bind(this));},removeHoverObservers:','function(element,strMenu,strClassName)',arguments);globalMenuOver=false;var strClassName=(typeof(strClassName)!='undefined')?strClassName:'sfhover_right';if(typeof(this.eventListenerFunctions[strMenu][strClassName])=='undefined')
{return;}
Event.stopObserving(document.body,'click',this.eventListenerFunctions[strMenu][strClassName].body,true);for(var i=0;i<this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOver.length;i++)
{var objObserveElement=this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOver[i][0];var objObserveFunction=this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOver[i][1];Event.stopObserving(objObserveElement,'mouseover',objObserveFunction);}
for(var i=0;i<this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOut.length;i++)
{var objObserveElement=this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOut[i][0];var objObserveFunction=this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOut[i][1];Event.stopObserving(objObserveElement,'mouseout',objObserveFunction);}
for(var i=0;i<this.eventListenerFunctions[strMenu][strClassName].topMenuClick.length;i++)
{var objObserveElement=this.eventListenerFunctions[strMenu][strClassName].topMenuClick[i][0];var objObserveFunction=this.eventListenerFunctions[strMenu][strClassName].topMenuClick[i][1];Event.stopObserving(objObserveElement,'click',objObserveFunction);}
for(var i=0;i<this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOut.length;i++)
{var objObserveElement=this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOut[i][0];var objObserveFunction=this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOut[i][1];Event.stopObserving(objObserveElement,'mouseout',objObserveFunction);}
for(var i=0;i<this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOver.length;i++)
{var objObserveElement=this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOver[i][0];var objObserveFunction=this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOver[i][1];Event.stopObserving(objObserveElement,'mouseover',objObserveFunction);}
delete this.eventListenerFunctions[strMenu][strClassName];},fixHover:function(element,strMenu,strClassName)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1636,'delete this.eventListenerFunctions[strMenu][strClassName];},fixHover:','function(element,strMenu,strClassName)',arguments);globalMenuOver=true;var strClassName=(typeof(strClassName)!='undefined')?strClassName:'sfhover_right';this.eventListenerFunctions[strMenu][strClassName]={};var objFunction=function(event,element)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1637,'globalMenuOver=true;var strClassName=(typeof(strClassName)!=\'undefined\')?strClassName:\'sfhover_right\';this.eventListenerFunctions[strMenu][strClassName]={};var objFunction=','function(event,element)',arguments);if(globalMenuOver==false)
{var lists=this.widgetDiv.select("LI");for(var i=0;i<lists.length;i++)
{var li=lists[i];if(li.id=="topMenu")
{li.visibleStatus=true;li.removeClassName('sfhover');li.removeClassName(strClassName+'_top');li.removeClassName(strClassName);}}}};this.eventListenerFunctions[strMenu][strClassName].body=objFunction.bindAsEventListener(this);Event.observe(document.body,'click',this.eventListenerFunctions[strMenu][strClassName].body,true);this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOver=[];this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOut=[];this.eventListenerFunctions[strMenu][strClassName].topMenuClick=[];this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOut=[];this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOver=[];var lists=element.select("LI");for(var i=0;i<lists.length;i++)
{var li=lists[i];if(li.id=="topMenu")
{var objFunction=function(event,li)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1643,'{var objFunction=','function(event,li)',arguments);globalMenuOver=true;};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOver.push([li,objListenerFunction]);Event.observe(li,"mouseover",objListenerFunction);var objFunction=function(event,li)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1644,'globalMenuOver=true;};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOver.push([li,objListenerFunction]);Event.observe(li,"mouseover",objListenerFunction);var objFunction=','function(event,li)',arguments);globalMenuOver=false;};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOut.push([li,objListenerFunction]);Event.observe(li,"mouseout",objListenerFunction);var objFunction=function(event,li)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1645,'globalMenuOver=false;};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].topMenuMouseOut.push([li,objListenerFunction]);Event.observe(li,"mouseout",objListenerFunction);var objFunction=','function(event,li)',arguments);this.visibleStatus=(typeof(this.visibleStatus)!='undefined')?!this.visibleStatus:false;if(!this.visibleStatus)
{this.addClassName(strClassName+'_top');this.addClassName('sfhover');}
else
{this.removeClassName('sfhover');this.removeClassName(strClassName+'_top');}
this.style.color="#ff0000";};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].topMenuClick.push([li,objListenerFunction]);Event.observe(li,"click",objListenerFunction);}
else
{var objFunction=function(event,li)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1652,'{var objFunction=','function(event,li)',arguments);this.removeClassName('sfhover');this.removeClassName(strClassName);globalMenuOver=false;};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOut.push([li,objListenerFunction]);Event.observe(li,"mouseout",objListenerFunction);var objFunction=function(event,li)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1653,'this.removeClassName(\'sfhover\');this.removeClassName(strClassName);globalMenuOver=false;};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOut.push([li,objListenerFunction]);Event.observe(li,"mouseout",objListenerFunction);var objFunction=','function(event,li)',arguments);this.addClassName(strClassName);this.addClassName('sfhover');globalMenuOver=true;};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOver.push([li,objListenerFunction]);Event.observe(li,"mouseover",objListenerFunction);}}},setHoverEvents:function(objMenu)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1654,'this.addClassName(strClassName);this.addClassName(\'sfhover\');globalMenuOver=true;};var objListenerFunction=objFunction.bindAsEventListener(li);this.eventListenerFunctions[strMenu][strClassName].subMenuMouseOver.push([li,objListenerFunction]);Event.observe(li,"mouseover",objListenerFunction);}}},setHoverEvents:','function(objMenu)',arguments);var _this=this;objMenu=$j(objMenu);var objPosition=objMenu.position();var intWidthAvailable=$j('#widgetLayerMenu').parent().width();if((objPosition.left+300)>intWidthAvailable)
{var strClass='sfhover_left';}
else
{var strClass='sfhover_right';}
objMenu.find('li').each(function(intKey,objElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1659,'objMenu.find(\'li\').each(','function(intKey,objElement)',arguments);if(objElement.id=='topMenu')
{$j(objElement).bind('click',function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1661,'{$j(objElement).bind(\'click\',','function()',arguments);var objMenuContainer=objMenu.find('ul.topLevel');var objCurrentElement=$j(this);if(objMenuContainer.css('display')=='none')
{objCurrentElement.addClass('sfhover '+strClass+'_top');objMenuContainer.show();}
else
{objCurrentElement.removeClass('sfhover '+strClass+'_top');objMenuContainer.hide();}});$j(objElement).bind('mouseover',function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1665,'{objCurrentElement.removeClass(\'sfhover \'+strClass+\'_top\');objMenuContainer.hide();}});$j(objElement).bind(\'mouseover\',','function()',arguments);_this.blnMouseOverMenu=true;});$j(objElement).bind('mouseout',function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1666,'_this.blnMouseOverMenu=true;});$j(objElement).bind(\'mouseout\',','function()',arguments);_this.blnMouseOverMenu=false;});}
else
{$j(objElement).bind('mouseover',function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1669,'{$j(objElement).bind(\'mouseover\',','function()',arguments);_this.blnMouseOverMenu=true;var objCurrentElement=$j(this);objCurrentElement.addClass('sfhover '+strClass);objCurrentElement.find('ul:first').show();});$j(objElement).bind('mouseout',function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1670,'_this.blnMouseOverMenu=true;var objCurrentElement=$j(this);objCurrentElement.addClass(\'sfhover \'+strClass);objCurrentElement.find(\'ul:first\').show();});$j(objElement).bind(\'mouseout\',','function()',arguments);var objCurrentElement=$j(this);objCurrentElement.removeClass('sfhover '+strClass);objCurrentElement.find('ul:first').hide();_this.blnMouseOverMenu=false;});}});},unsetHoverEvents:function(objMenu)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1671,'var objCurrentElement=$j(this);objCurrentElement.removeClass(\'sfhover \'+strClass);objCurrentElement.find(\'ul:first\').hide();_this.blnMouseOverMenu=false;});}});},unsetHoverEvents:','function(objMenu)',arguments);objMenu=$j(objMenu);objMenu.find('li').each(function(intKey,objElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1672,'objMenu=$j(objMenu);objMenu.find(\'li\').each(','function(intKey,objElement)',arguments);$j(objElement).unbind();});},makeDivs:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1673,'$j(objElement).unbind();});},makeDivs:','function()',arguments);this.divs={};if(blnUseJQuery===true)
{var objWidget=document.createElement('div');$j(objWidget).attr({'id':'widgetLayerMenu','class':'widgetLayerMenu'});$j('#ezMaps .horizontalToolbarDiv:first').find('.widgetArea:first').append(objWidget);$j.each(this.tags,function(intKey,strClass)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1675,'{var objWidget=document.createElement(\'div\');$j(objWidget).attr({\'id\':\'widgetLayerMenu\',\'class\':\'widgetLayerMenu\'});$j(\'#ezMaps .horizontalToolbarDiv:first\').find(\'.widgetArea:first\').append(objWidget);$j.each(this.tags,','function(intKey,strClass)',arguments);var objDiv=document.createElement('div');$j(objDiv).attr({'class':strClass});$j(objWidget).append(objDiv);$j(objWidget).data(strClass,objDiv);});}
else
{this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"widgetLayerMenu","widgetLayerMenu");this.tags.each(function(css)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1678,'{this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"widgetLayerMenu","widgetLayerMenu");this.tags.each(','function(css)',arguments);this.divs[css]=Utility.makeDivWithCss(this.widgetDiv,css);}.bind(this));}},resizeHorizontalToolbar:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1679,'this.divs[css]=Utility.makeDivWithCss(this.widgetDiv,css);}.bind(this));}},resizeHorizontalToolbar:','function()',arguments);if(blnUseJQuery===true)
{var objWidgetDiv=$j('#widgetLayerMenu');var intWidthAvailable=objWidgetDiv.parent().width();if(intWidthAvailable<320)
{objWidgetDiv.hide();}
else
{objWidgetDiv.show();}
if(intWidthAvailable>475)
{objWidgetDiv.css({'width':'auto','min-width':'70%','display':'block'});if(!this.menuBHidden)
{if(!this.blnDisableABIcons)
{$j(this.returnDivReference('imgA')).show();$j(this.returnDivReference('imgB')).show();}
$j(this.returnDivReference('menuB')).show();$j(this.returnDivReference('slider')).show();}}
else
{$j(this.returnDivReference('imgB')).hide();$j(this.returnDivReference('menuB')).hide();$j(this.returnDivReference('slider')).hide();objWidgetDiv.css({'width':'250px'});}}
else
{var intHorizontalToolbarDivWidth=$(this.horizontalToolbarDiv).getWidth();if(intHorizontalToolbarDivWidth<320)
{this.widgetDiv.setStyle({display:'none'});}
else
{this.widgetDiv.setStyle({display:'block'});}
if(intHorizontalToolbarDivWidth>475)
{this.widgetDiv.setStyle({width:'auto',minWidth:'70%',display:'block'});if(!this.menuBHidden)
{if(!this.blnDisableABIcons)
{this.divs["imgA"].setStyle({display:'block'});this.divs["imgB"].setStyle({display:'block'});}
this.divs["menuB"].setStyle({display:'block'});this.divs["slider"].setStyle({display:'block'});}}
if(intHorizontalToolbarDivWidth<475)
{this.divs["menuB"].setStyle({display:'none'});this.divs["imgB"].setStyle({display:'none'});this.divs["slider"].setStyle({display:'none'});this.widgetDiv.setStyle({width:'250px'});}
this.removeHoverObservers(this.divs.menuB,'B','sfhover_right');this.removeHoverObservers(this.divs.menuB,'B','sfhover_left');if(intHorizontalToolbarDivWidth<750)
{this.fixHover(this.divs.menuB,'B','sfhover_left');}
else
{this.fixHover(this.divs.menuB,'B','sfhover_right');}}},updateLayerIds:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1707,'{this.fixHover(this.divs.menuB,\'B\',\'sfhover_right\');}}},updateLayerIds:','function()',arguments);this.layerIds=this.mapStatus.getGroupedLayerIds();},getLayerId:function(topElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1708,'this.layerIds=this.mapStatus.getGroupedLayerIds();},getLayerId:','function(topElement)',arguments);if(!this.layerIds)
{this.updateLayerIds();}
if(blnUseJQuery===true)
{if($j(topElement).hasClass('menuA'))
{return this.layerIds['layer'][0];}
else
{return this.layerIds['layer'][this.layerIds['layer'].length-1];}}
else
{if(topElement.hasClassName('menuA'))
{return this.layerIds['layer'].first();}
else
{return this.layerIds['layer'].last();}}},setLayerToBlank:function(id,group,topElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1720,'{return this.layerIds[\'layer\'].last();}}},setLayerToBlank:','function(id,group,topElement)',arguments);this.mapStatus.setLayerToMapId(2,id,group);globalNoMapB=true;if(blnUseJQuery===true)
{$j(topElement).find('a.top:first').html('No map');$j(topElement).attr('mapId',0);}
else
{var topDivs=topElement.select('a.top');topDivs.first().update('No map');topElement.mapId=0;}},setLayerToMapId:function(id,group,topElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1724,'{var topDivs=topElement.select(\'a.top\');topDivs.first().update(\'No map\');topElement.mapId=0;}},setLayerToMapId:','function(id,group,topElement)',arguments);if(blnUseJQuery===true)
{if($j(topElement).attr('class')=='menuB')
{globalNoMapB=false;}}
else
{var strClassName=topElement.readAttribute('class');if(strClassName=='menuB')
{globalNoMapB=false;}}
this.displayHideUndoWidget();this.mapStatus.setLayerToMapId(this.getLayerId(topElement),id,group);},setLayerToStackId:function(stackId,topElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1731,'this.displayHideUndoWidget();this.mapStatus.setLayerToMapId(this.getLayerId(topElement),id,group);},setLayerToStackId:','function(stackId,topElement)',arguments);this.mapStatus.switchStackId(this.getLayerId(topElement),stackId);},updateMapNames:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1732,'this.mapStatus.switchStackId(this.getLayerId(topElement),stackId);},updateMapNames:','function()',arguments);if(blnUseJQuery===true)
{this.layerStackChange(this.returnDivReference('menuA'));this.layerStackChange(this.returnDivReference('menuB'));}
else
{this.layerStackChange(this.divs.menuA);this.layerStackChange(this.divs.menuB);}},layerStackChange:function(topElement)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1736,'{this.layerStackChange(this.divs.menuA);this.layerStackChange(this.divs.menuB);}},layerStackChange:','function(topElement)',arguments);var layer=this.mapStatus.getLayer(this.getLayerId(topElement));var mapId=layer.getMapId();var mapMode=layer.getMapStackMode();if(blnUseJQuery===true)
{var topDivs=$j(topElement).find('a.top:first');}
else
{var topDivs=topElement.select('a.top');}
if(topDivs.length>0&&(mapId!=topElement.mapId||mapMode!=topElement.mapMode)&&!globalNoMapB)
{var mapDetails=this.mapStatus.getMapDetails(mapId);var stackName=layer.getMapStackName();var mapName=mapDetails['name'].slice(0,this.nameLength);if(stackName=='Map')
{stackName=this.getStackNameFromMapId(mapId);}
topElement.mapId=mapId;topElement.mapMode=mapMode;if(blnUseJQuery===true)
{topDivs.html(stackName+' > '+mapName);}
else
{topDivs.first().update(stackName+' > '+mapName);}}},getStackNameFromMapId:function(mapId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1747,'{topDivs.first().update(stackName+\' > \'+mapName);}}},getStackNameFromMapId:','function(mapId)',arguments);if(blnUseJQuery===true)
{var objMenu=$j(this.returnDivReference('menuA'));var objCurrentElement=objMenu.find('a[mapId="'+mapId+'"][branchname]:first');var strChain='';var emergencyCount=0;while(objCurrentElement.length>0&&objCurrentElement.attr('group')&&emergencyCount<10)
{objCurrentElement=objCurrentElement.parents('ul:first').parents('li:first').find('a.nest:first');var strGroup=objCurrentElement.html()?objCurrentElement.html():objCurrentElement.attr('group');strChain=' > '+strGroup+strChain;if(objCurrentElement.parents('ul:first').hasClass('topLevel'))
{break;}
emergencyCount++;}}
else
{var topElement=$(this.divs.menuA);var currentElement=topElement.select('a[mapId="'+mapId+'"][branchname]').first();var strChain='';var emergencyCount=0;while(currentElement!=undefined&&currentElement.readAttribute('group')&&currentElement.descendantOf(topElement)&&emergencyCount<10)
{currentElement=currentElement.up('ul').up('li').down('a.nest');var groupName=currentElement.innerHTML?currentElement.innerHTML:currentElement.readAttribute('group');strChain=' > '+groupName+strChain;if(currentElement.up('ul').hasClassName('topLevel'))
break;emergencyCount++;}}
return strChain.substr(3);},updatebuttons:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1757,'return strChain.substr(3);},updatebuttons:','function()',arguments);if(this.layerIds['layer'].length==this.numLayers&&this.viewMode==this.mapStatus.getViewMode())
{return;}
this.numLayers=this.layerIds['layer'].length;this.viewMode=this.mapStatus.getViewMode();if(this.numLayers<=1)
{this.menuBHidden=true;if(blnUseJQuery===true)
{$j(this.returnDivReference('menuB')).hide();$j(this.returnDivReference('slider')).hide();$j(this.returnDivReference('imgA')).hide();$j(this.returnDivReference('imgB')).hide();}
else
{this.divs.menuB.hide();this.divs.slider.hide();this.divs.imgA.hide();this.divs.imgB.hide();}}
else
{if(blnUseJQuery===true)
{$j(this.returnDivReference('menuB')).show();$j(this.returnDivReference('slider')).show();if(!this.blnDisableABIcons)
{$j(this.returnDivReference('imgA')).show();$j(this.returnDivReference('imgB')).show();}}
else
{this.divs.menuB.show();this.divs.slider.show();if(!this.blnDisableABIcons)
{this.divs.imgA.show();this.divs.imgB.show();}}}},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1771,'{this.divs.imgA.show();this.divs.imgB.show();}}}},update:','function()',arguments);this.updateLayerIds();this.updateMapNames();this.updatebuttons();},reposition:function(a)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1772,'this.updateLayerIds();this.updateMapNames();this.updatebuttons();},reposition:','function(a)',arguments);this.updateMapNames();}});Widgets.prototype.widgets['layerMenu']=LayerMenuWidget;var TransparencyLayersSliderWidget=Class.extend(Widget,{widgetDiv:null,slidersArray:null,sliderDivArray:null,sliding:null,sliderslider:null,numberOfLayers:null,width:63,initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1773,'this.updateMapNames();}});Widgets.prototype.widgets[\'layerMenu\']=LayerMenuWidget;var TransparencyLayersSliderWidget=Class.extend(Widget,{widgetDiv:null,slidersArray:null,sliderDivArray:null,sliding:null,sliderslider:null,numberOfLayers:null,width:63,initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.sliderDivArray=new Array();this.slidersArray=new Array();this.updateNumberOfLayer();this.createZoomSliderWidgetDiv();this.createSliders();this.makeSliders();this.sliderRange=17;this.sliding=false;},updateNumberOfLayer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1774,'this.parent(widgetsDiv,mapStatus);this.sliderDivArray=new Array();this.slidersArray=new Array();this.updateNumberOfLayer();this.createZoomSliderWidgetDiv();this.createSliders();this.makeSliders();this.sliderRange=17;this.sliding=false;},updateNumberOfLayer:','function()',arguments);this.numberOfLayers=this.mapStatus.getNumberOfLayers();},createSliders:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1775,'this.numberOfLayers=this.mapStatus.getNumberOfLayers();},createSliders:','function()',arguments);var l=this.numberOfLayers-1;for(var i=0;i<l;i++)
{var sliderObject=Utility.createHorizontalTrack(this.widgetDiv,this.width);sliderObject.trackDiv.setStyle({marginTop:35*i+"px"});this.sliderDivArray.push(sliderObject);}},createZoomSliderWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1777,'{var sliderObject=Utility.createHorizontalTrack(this.widgetDiv,this.width);sliderObject.trackDiv.setStyle({marginTop:35*i+"px"});this.sliderDivArray.push(sliderObject);}},createZoomSliderWidgetDiv:','function()',arguments);this.widgetDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetTransparencyLayersSlider");},makeSliders:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1778,'this.widgetDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetTransparencyLayersSlider");},makeSliders:','function()',arguments);var l=this.sliderDivArray.length;for(var i=0;i<l;i++)
{var sliderDiv=this.sliderDivArray[i];var slider=new Control.Slider(sliderDiv.handleDiv,sliderDiv.trackDiv,{sliderValue:this.mapStatus.getZoomAmount(),onSlide:this.setZoomLevel,layerId:i,mapStatus:this.mapStatus,refObj:this});slider.layerId=i;this.slidersArray.push(slider);}},setZoomLevel:function(level)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1780,'{var sliderDiv=this.sliderDivArray[i];var slider=new Control.Slider(sliderDiv.handleDiv,sliderDiv.trackDiv,{sliderValue:this.mapStatus.getZoomAmount(),onSlide:this.setZoomLevel,layerId:i,mapStatus:this.mapStatus,refObj:this});slider.layerId=i;this.slidersArray.push(slider);}},setZoomLevel:','function(level)',arguments);this.mapStatus.setLayerOpacity(this.layerId,level);},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1781,'this.mapStatus.setLayerOpacity(this.layerId,level);},update:','function()',arguments);if(this.mapStatus.getNumberOfLayers()>1)
{this.widgetDiv.show();if(!this.sliding)
{var l=this.sliderDivArray.length;var layerOp=0;for(var i=0;i<l;i++)
{layerOp=this.mapStatus.getLayerOpacity(i);if(layerOp!=this.slidersArray[i].value)
{this.slidersArray[i].setValue(layerOp);}}
layerOp=null;l=null;}}
else
{this.widgetDiv.hide();}}});Widgets.prototype.widgets["transparencyLayersSlider"]=TransparencyLayersSliderWidget;var StampDisplayWidget=Class.extend(Widget,{stamps:null,points:null,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1789,'{this.widgetDiv.hide();}}});Widgets.prototype.widgets["transparencyLayersSlider"]=TransparencyLayersSliderWidget;var StampDisplayWidget=Class.extend(Widget,{stamps:null,points:null,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.stamps=$H();this.points=new Array();},addStamp:function(stamp,stampName)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1790,'this.parent(widgetsDiv,mapStatus,renderer);this.stamps=$H();this.points=new Array();},addStamp:','function(stamp,stampName)',arguments);this.stamps[stampName]=stamp;},addPoints:function(points,stampName)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1791,'this.stamps[stampName]=stamp;},addPoints:','function(points,stampName)',arguments);var l=points.size();for(var i=0;i<l;i++)
{this.addPoint(points[i],stampName);};return this.points;},addPoint:function(point,stampName,objStampData)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1793,'{this.addPoint(points[i],stampName);};return this.points;},addPoint:','function(point,stampName,objStampData)',arguments);var objStampData=(typeof(objStampData)!='undefined')?objStampData:{};var stamp=this.stamps[stampName].clone();stamp.attach(this);var stampPoint={point:point,stamp:stamp};stamp.moveTo(point);stamp.objStampData=objStampData;this.points.push(stamp);return stamp;},removeAllPoints:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1794,'var objStampData=(typeof(objStampData)!=\'undefined\')?objStampData:{};var stamp=this.stamps[stampName].clone();stamp.attach(this);var stampPoint={point:point,stamp:stamp};stamp.moveTo(point);stamp.objStampData=objStampData;this.points.push(stamp);return stamp;},removeAllPoints:','function()',arguments);if(blnUseJQuery===true)
{var _this=this;var arrDestroyedPoints=[];$j.each(this.points,function(intKey,objStamp)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1796,'{var _this=this;var arrDestroyedPoints=[];$j.each(this.points,','function(intKey,objStamp)',arguments);var blnDestroyed=objStamp.destroy();if(blnDestroyed===true)
{arrDestroyedPoints.push(intKey);}});$j.each(arrDestroyedPoints,function(intIndex,intStampKeyToRemove)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1798,'{arrDestroyedPoints.push(intKey);}});$j.each(arrDestroyedPoints,','function(intIndex,intStampKeyToRemove)',arguments);_this.points=$j.grep(_this.points,function(objStamp,intKey)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1799,'_this.points=$j.grep(_this.points,','function(objStamp,intKey)',arguments);return intKey!=intStampKeyToRemove;});});this.points=[].concat(this.points);}
else
{this.points.invoke('destroy');this.points.clear();}},removePoint:function(stamp)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1802,'{this.points.invoke(\'destroy\');this.points.clear();}},removePoint:','function(stamp)',arguments);this.points=this.points.without(stamp);stamp.destroy();delete stamp;},convertMetersToPixels:function(p)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1803,'this.points=this.points.without(stamp);stamp.destroy();delete stamp;},convertMetersToPixels:','function(p)',arguments);var groundScale=this.mapStatus.getGroundScale();return new Point(groundScale*p.x,groundScale*p.x,"Pixel");},refresh:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1804,'var groundScale=this.mapStatus.getGroundScale();return new Point(groundScale*p.x,groundScale*p.x,"Pixel");},refresh:','function()',arguments);this.points.invoke('clip');},reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1805,'this.points.invoke(\'clip\');},reposition:','function()',arguments);this.points.invoke('clip');this.points.invoke('reposition');}});Widgets.prototype.widgets["stampDisplay"]=StampDisplayWidget;var TransparencySliderWidget=Class.extend(Widget,{sliderObject:null,slider:null,width:38,clipRange:0.05,visible:false,initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1806,'this.points.invoke(\'clip\');this.points.invoke(\'reposition\');}});Widgets.prototype.widgets["stampDisplay"]=StampDisplayWidget;var TransparencySliderWidget=Class.extend(Widget,{sliderObject:null,slider:null,width:38,clipRange:0.05,visible:false,initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.createZoomSliderWidgetDiv();this.createSliderObject();this.makeSlider();},createZoomSliderWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1807,'this.parent(widgetsDiv,mapStatus);this.createZoomSliderWidgetDiv();this.createSliderObject();this.makeSlider();},createZoomSliderWidgetDiv:','function()',arguments);this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"widgetTransparencySlider");},createSliderObject:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1808,'this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"widgetTransparencySlider");},createSliderObject:','function()',arguments);this.sliderObject=Utility.createHorizontalTrack(this.widgetDiv,this.width);},mouseClick:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1809,'this.sliderObject=Utility.createHorizontalTrack(this.widgetDiv,this.width);},mouseClick:','function(event)',arguments);var element=Event.element(event);var opacity=this.mapStatus.getLayerOpacity(this.mapStatus.getRasterLayerAId());if(element.hasClassName("mapAButton"))
{opacity+=0.1;}
else if(element.hasClassName("mapBButton"))
{opacity-=0.1;;}
this.slider.setValue(1-opacity);},makeSlider:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1814,'this.slider.setValue(1-opacity);},makeSlider:','function()',arguments);this.slider=new Control.Slider(this.sliderObject.handleDiv,this.sliderObject.trackDiv,{sliderValue:0,onChange:function(v){this.setOpacity(v)}.bind(this),onSlide:function(v){this.setOpacity(v)}.bind(this)});this.setOpacity(0);},setOpacity:function(level)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1815,'this.slider=new Control.Slider(this.sliderObject.handleDiv,this.sliderObject.trackDiv,{sliderValue:0,onChange:function(v){this.setOpacity(v)}.bind(this),onSlide:function(v){this.setOpacity(v)}.bind(this)});this.setOpacity(0);},setOpacity:','function(level)',arguments);var op=1-level;this.mapStatus.setLayerOpacity(this.mapStatus.getRasterLayerAId(),op);if(this.mapStatus.getViewMode()=="layer"&&op>1-this.clipRange)
{this.mapStatus.setLayerOpacity(this.mapStatus.getRasterLayerBId(),0);}
else
{this.mapStatus.setLayerOpacity(this.mapStatus.getRasterLayerBId(),1);}},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1819,'{this.mapStatus.setLayerOpacity(this.mapStatus.getRasterLayerBId(),1);}},update:','function()',arguments);var layout=this.mapStatus.getViewMode();if(layout=="layer")
{if(!this.visible)
{this.slider.setValue(0);}
this.visible=true;this.widgetDiv.show();}
else if(layout!="layer")
{this.visible=false;this.widgetDiv.hide();}}});Widgets.prototype.widgets["transparencySlider"]=TransparencySliderWidget;var ResetButtonWidget=Class.extend(Widget,{initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1825,'{this.visible=false;this.widgetDiv.hide();}}});Widgets.prototype.widgets["transparencySlider"]=TransparencySliderWidget;var ResetButtonWidget=Class.extend(Widget,{initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.createWidgetDiv();},createWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1826,'this.parent(widgetsDiv,mapStatus,renderer);this.createWidgetDiv();},createWidgetDiv:','function()',arguments);this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"resetButtonWidget","resetButtonWidget");this.widgetDiv.writeAttribute({title:'View Full Map Extents'});Event.observe(this.widgetDiv,"click",this.reset.bindAsEventListener(this));},reset:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1827,'this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"resetButtonWidget","resetButtonWidget");this.widgetDiv.writeAttribute({title:\'View Full Map Extents\'});Event.observe(this.widgetDiv,"click",this.reset.bindAsEventListener(this));},reset:','function()',arguments);this.mapStatus.jumpToExtOfActiveLayer();}});Widgets.prototype.widgets["resetButton"]=ResetButtonWidget;var ZoomDisplayWidget=Class.extend(Widget,{zoomLevel:0,zoomDisplayDiv:null,viewDestination:null,viewIn:2.5,viewOut:0.4,view:0.2,state:null,displayDim:null,size:80,refreshRate:0.1,timeToSeeTheCircle:0.8,speed:1.2,shape:null,loop:null,startTime:null,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1828,'this.mapStatus.jumpToExtOfActiveLayer();}});Widgets.prototype.widgets["resetButton"]=ResetButtonWidget;var ZoomDisplayWidget=Class.extend(Widget,{zoomLevel:0,zoomDisplayDiv:null,viewDestination:null,viewIn:2.5,viewOut:0.4,view:0.2,state:null,displayDim:null,size:80,refreshRate:0.1,timeToSeeTheCircle:0.8,speed:1.2,shape:null,loop:null,startTime:null,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.makeZoomDisplayDiv();this.zoomLevel=this.mapStatus.getZoomAmount();},makeZoomDisplayDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1829,'this.parent(widgetsDiv,mapStatus,renderer);this.makeZoomDisplayDiv();this.zoomLevel=this.mapStatus.getZoomAmount();},makeZoomDisplayDiv:','function()',arguments);this.zoomDisplayDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.relativeDiv,"zoomDisplayWidget");this.addShapes();this.hideDisplay();},addShapes:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1830,'this.zoomDisplayDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.relativeDiv,"zoomDisplayWidget");this.addShapes();this.hideDisplay();},addShapes:','function()',arguments);this.displayDim=this.zoomDisplayDiv.getDimensions();this.drawCircle();},drawCircle:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1831,'this.displayDim=this.zoomDisplayDiv.getDimensions();this.drawCircle();},drawCircle:','function()',arguments);var size=this.size;this.shape=new Graphic.Circle(this.renderer);this.shape.setStroke({r:27,g:127,b:147,a:95,w:5});this.renderer.add(this.shape);},showDisplay:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1832,'var size=this.size;this.shape=new Graphic.Circle(this.renderer);this.shape.setStroke({r:27,g:127,b:147,a:95,w:5});this.renderer.add(this.shape);},showDisplay:','function()',arguments);if(this.mapStatus.zoomPoint)
{this.startTimer();this.shape.show();}},hideDisplay:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1834,'{this.startTimer();this.shape.show();}},hideDisplay:','function()',arguments);this.state=null;this.stopLoopTimer();this.shape.hide();},stopLoopTimer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1835,'this.state=null;this.stopLoopTimer();this.shape.hide();},stopLoopTimer:','function()',arguments);if(this.loop)
{this.loop.stop();this.loop=null;}},startTimer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1837,'{this.loop.stop();this.loop=null;}},startTimer:','function()',arguments);this.stopLoopTimer();this.startTime=new Date();this.loop=new PeriodicalExecuter(this.moveToState.bind(this),this.refreshRate);},setLocation:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1838,'this.stopLoopTimer();this.startTime=new Date();this.loop=new PeriodicalExecuter(this.moveToState.bind(this),this.refreshRate);},setLocation:','function()',arguments);if(this.mapStatus.zoomPoint)
{var size=this.size*this.view;var pt=this.mapStatus.invertYaxis(this.mapStatus.zoomPoint);this.shape.setBounds(pt.x-(size/2),pt.y-(size/2),size,size);}},moveToState:function(pe)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1840,'{var size=this.size*this.view;var pt=this.mapStatus.invertYaxis(this.mapStatus.zoomPoint);this.shape.setBounds(pt.x-(size/2),pt.y-(size/2),size,size);}},moveToState:','function(pe)',arguments);if(!this.state)
{this.hideDisplay();return;}
var elapsedTime=((new Date()).getTime()-this.startTime.getTime())/1000;var direction=this.state-this.start;var val=Easing.easeBoth(elapsedTime,this.start,direction,this.timeToSeeTheCircle)
if(elapsedTime<this.timeToSeeTheCircle)
{this.view=val;this.setLocation();}
else
{this.hideDisplay();}},realTimeUpdate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1847,'{this.hideDisplay();}},realTimeUpdate:','function()',arguments);if(this.zoomLevel>this.mapStatus.getZoomAmount())
{if(this.state!=this.viewIn)
{this.view=this.viewOut;this.state=this.viewIn;this.start=this.viewOut;this.setLocation();this.showDisplay();}
this.zoomLevel=this.mapStatus.getZoomAmount();}
else if(this.zoomLevel<this.mapStatus.getZoomAmount())
{if(this.state!=this.viewOut)
{this.view=this.viewIn;this.start=this.viewIn;this.state=this.viewOut;this.setLocation();this.showDisplay();}
this.zoomLevel=this.mapStatus.getZoomAmount();}}});Widgets.prototype.widgets["zoomDisplay"]=ZoomDisplayWidget;var ZoomSliderWidget=Class.extend(Widget,{verticalTrack:null,slider:null,sliding:false,sliderslider:null,height:164,sliderRange:18,initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1855,'this.zoomLevel=this.mapStatus.getZoomAmount();}}});Widgets.prototype.widgets["zoomDisplay"]=ZoomDisplayWidget;var ZoomSliderWidget=Class.extend(Widget,{verticalTrack:null,slider:null,sliding:false,sliderslider:null,height:164,sliderRange:18,initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.createZoomSliderWidgetDiv();this.createButtons();},createZoomSliderWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1856,'this.parent(widgetsDiv,mapStatus);this.createZoomSliderWidgetDiv();this.createButtons();},createZoomSliderWidgetDiv:','function()',arguments);this.widgetDiv=Utility.makeDivWithCss(this.verticalToolbarDiv,"widgetZoomSlider");},createVerticalTrack:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1857,'this.widgetDiv=Utility.makeDivWithCss(this.verticalToolbarDiv,"widgetZoomSlider");},createVerticalTrack:','function()',arguments);this.verticalTrack=Utility.createVerticalTrack(this.widgetDiv,this.height);},createButtons:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1858,'this.verticalTrack=Utility.createVerticalTrack(this.widgetDiv,this.height);},createButtons:','function()',arguments);if(typeof(this.mapStatus.mapOptions.blnDisallowZooming)!="undefined"&&this.mapStatus.mapOptions.blnDisallowZooming!=true)
{var inDiv=Utility.makeDivWithCss(this.widgetDiv,"zoomInButton");var outDiv=Utility.makeDivWithCss(this.widgetDiv,"zoomOutButton");inDiv.writeAttribute({title:"Zoom In"});outDiv.writeAttribute({title:"Zoom Out"});var mouseClick=this.mouseClick.bindAsEventListener(this);Event.observe(inDiv,"click",mouseClick);Event.observe(outDiv,"click",mouseClick);if(Prototype.Browser.IE)
{var mouseDoubleClick=this.mouseDoubleClick.bindAsEventListener(this);Event.observe(inDiv,"dblclick",mouseDoubleClick);Event.observe(outDiv,"dblclick",mouseDoubleClick);}}},mouseClick:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1861,'{var mouseDoubleClick=this.mouseDoubleClick.bindAsEventListener(this);Event.observe(inDiv,"dblclick",mouseDoubleClick);Event.observe(outDiv,"dblclick",mouseDoubleClick);}}},mouseClick:','function(event)',arguments);var element=Event.element(event);if(element.hasClassName("zoomInButton"))
{this.mapStatus.incrementZoomLevel(-1);}
else if(element.hasClassName("zoomOutButton"))
{this.mapStatus.incrementZoomLevel(+1);}},mouseDoubleClick:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1865,'{this.mapStatus.incrementZoomLevel(+1);}},mouseDoubleClick:','function(event)',arguments);var element=Event.element(event);if(element.hasClassName("zoomInButton"))
{this.mapStatus.incrementZoomLevel(-1);}
else if(element.hasClassName("zoomOutButton"))
{this.mapStatus.incrementZoomLevel(+1);}},makeSlider:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1869,'{this.mapStatus.incrementZoomLevel(+1);}},makeSlider:','function()',arguments);var range=this.sliderRange;this.slider=new Control.Slider(this.verticalTrack.handleDiv,this.verticalTrack.trackDiv,{axis:"vertical",values:$A($R(0,18)),range:$R(0,18),sliderValue:this.mapStatus.getZoomAmount(),onChange:function(v){this.setZoomLevel(v)}.bind(this),onSlide:function(v){this.sliding=true;}.bind(this)});},setZoomLevel:function(level)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1870,'var range=this.sliderRange;this.slider=new Control.Slider(this.verticalTrack.handleDiv,this.verticalTrack.trackDiv,{axis:"vertical",values:$A($R(0,18)),range:$R(0,18),sliderValue:this.mapStatus.getZoomAmount(),onChange:function(v){this.setZoomLevel(v)}.bind(this),onSlide:function(v){this.sliding=true;}.bind(this)});},setZoomLevel:','function(level)',arguments);if(level!=this.mapStatus.getZoomAmount())
{this.mapStatus.setZoomCenter(level);this.sliding=false;}}});Widgets.prototype.widgets["zoomSlider"]=ZoomSliderWidget;var PopUpWidget=Class.extend(Widget,{widgetDiv:null,zoomLevel:null,layerOffset:null,buffer:10,pointMap:null,pointPx:null,onClose:null,ezPopup:null,popUpOptions:null,margin:30,initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1872,'{this.mapStatus.setZoomCenter(level);this.sliding=false;}}});Widgets.prototype.widgets["zoomSlider"]=ZoomSliderWidget;var PopUpWidget=Class.extend(Widget,{widgetDiv:null,zoomLevel:null,layerOffset:null,buffer:10,pointMap:null,pointPx:null,onClose:null,ezPopup:null,popUpOptions:null,margin:30,initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.zoomLevel=new Point();this.layerOffset=new Point();this.ezPopup=new EzPopup(this.widgetsDiv.widgetPopup);this.setDefaultPopupOptions();},setSize:function(w,h)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1873,'this.parent(widgetsDiv,mapStatus);this.zoomLevel=new Point();this.layerOffset=new Point();this.ezPopup=new EzPopup(this.widgetsDiv.widgetPopup);this.setDefaultPopupOptions();},setSize:','function(w,h)',arguments);this.popUpOptions.width=w;this.popUpOptions.height=h;this.ezPopup.setSize(w,h);},setCloseFunction:function(closeFunction)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1874,'this.popUpOptions.width=w;this.popUpOptions.height=h;this.ezPopup.setSize(w,h);},setCloseFunction:','function(closeFunction)',arguments);this.popUpOptions.onClose=closeFunction;this.ezPopup.setCloseFunction(closeFunction);},setInnerHtml:function(innerHtml)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1875,'this.popUpOptions.onClose=closeFunction;this.ezPopup.setCloseFunction(closeFunction);},setInnerHtml:','function(innerHtml)',arguments);this.popUpOptions.innerHtml=innerHtml;this.ezPopup.setInnerHtml(innerHtml);},show:function(defObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1876,'this.popUpOptions.innerHtml=innerHtml;this.ezPopup.setInnerHtml(innerHtml);},show:','function(defObj)',arguments);this.updatePopup(defObj);var objRoomForPopup=this.isEnoughRoomForPopup();if(objRoomForPopup.blnRoomAvailable===true)
{switch(objRoomForPopup.strPosition)
{case'top_right':this.ezPopup.setBottomPointClass('bp_bottom_left');break;case'top_left':this.ezPopup.setBottomPointClass('bp_bottom_right');break;case'bottom_right':this.ezPopup.setBottomPointClass('bp_top_left');break;case'bottom_left':this.ezPopup.setBottomPointClass('bp_top_right');break;}
this.setPosition(this.popUpOptions.pointOnMap,objRoomForPopup.strPosition);}
else
{this.ezPopup.setBottomPointClass('bp_bottom_left');this.setPosition(this.popUpOptions.pointOnMap);this.moveMapForPopup();}
this.ezPopup.show();},isEnoughRoomForPopup:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1883,'this.ezPopup.show();},isEnoughRoomForPopup:','function()',arguments);var point=(this.popUpOptions.pointOnMap.srid=="Pixel")?this.popUpOptions.pointOnMap:this.mapStatus.getScreenPointFromWorld(this.popUpOptions.pointOnMap);var layerOffset=this.mapStatus.getLayerOffset();var screenDim=this.mapStatus.getScreenDimensions();var intPopupWidth=this.ezPopup.getFullWidth();var intPopupHeight=this.ezPopup.getFullHeight();var intTLX=screenDim.TLX-layerOffset.x;var intTLY=screenDim.TLY+layerOffset.y;var intBRX=screenDim.BRX-layerOffset.x;var intBRY=screenDim.BRY+layerOffset.y;if(point.x>=intTLX&&point.x<=intBRX&&point.y>=intBRY&&point.y<=intTLY)
{if(((point.x+intPopupWidth)<=intBRX)&&((point.y+intPopupHeight)<=intTLY))
{return{blnRoomAvailable:true,strPosition:'top_right'};}
else if(((point.x-intPopupWidth)>=intTLX)&&((point.y+intPopupHeight)<=intTLY))
{return{blnRoomAvailable:true,strPosition:'top_left'};}
else if(((point.x+intPopupWidth)<=intBRX)&&((point.y-intPopupHeight)>=intBRY))
{return{blnRoomAvailable:true,strPosition:'bottom_right'};}
else if(((point.x-intPopupWidth)>=intTLX)&&((point.y-intPopupHeight)>=intBRY))
{return{blnRoomAvailable:true,strPosition:'bottom_left'};}
else
{return{blnRoomAvailable:false,strPosition:null};}}
else
{return{blnRoomAvailable:false,strPosition:null};}},hide:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1896,'{return{blnRoomAvailable:false,strPosition:null};}},hide:','function()',arguments);this.ezPopup.setBottomPointClass('bp_bottom_left');this.ezPopup.hide();},setDefaultPopupOptions:function(popUpOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1897,'this.ezPopup.setBottomPointClass(\'bp_bottom_left\');this.ezPopup.hide();},setDefaultPopupOptions:','function(popUpOptions)',arguments);this.popUpOptions={onClose:null,centered:true,width:this.minWidth,height:this.minHeight,innerHtml:"",pointOnMap:new Point()}
Object.extend(this.popUpOptions,popUpOptions||{});},updatePopup:function(popUpOptions)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1899,'Object.extend(this.popUpOptions,popUpOptions||{});},updatePopup:','function(popUpOptions)',arguments);Object.extend(this.popUpOptions,popUpOptions||{});this.setSize(this.popUpOptions.width,this.popUpOptions.height);this.setCloseFunction(this.popUpOptions.onClose);this.setInnerHtml(this.popUpOptions.innerHtml);},offsetCenterForPopup:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1900,'Object.extend(this.popUpOptions,popUpOptions||{});this.setSize(this.popUpOptions.width,this.popUpOptions.height);this.setCloseFunction(this.popUpOptions.onClose);this.setInnerHtml(this.popUpOptions.innerHtml);},offsetCenterForPopup:','function(point)',arguments);point=(point)?point:this.mapStatus.getCenterPoint();var layerOffset=this.mapStatus.getLayerOffset(point);var popupExt=this.ezPopup.getPopupExt(layerOffset);var screenDim=this.mapStatus.getScreenDimensions();popupExt["left"]-=this.margin;popupExt["top"]+=this.margin;if(screenDim.BRX<popupExt["right"])
{point.x-=screenDim.BRX-popupExt["right"];}
else if(screenDim.TLX>popupExt["left"])
{point.x-=screenDim.TLX-popupExt["left"];}
if(screenDim.TLY<popupExt["top"])
{point.y+=popupExt["top"]-screenDim.TLY;}
else if(screenDim.BRY>popupExt["bottom"])
{point.y+=popupExt["bottom"]-screenDim.BRY;}
return point;},moveMapForPopup:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1909,'return point;},moveMapForPopup:','function()',arguments);if(this.mapStatus.isLocked())
{return;}
var point=(this.popUpOptions.pointOnMap.srid=="Pixel")?this.popUpOptions.pointOnMap:this.mapStatus.getScreenPointFromWorld(this.popUpOptions.pointOnMap);var moveToPoint=(this.popUpOptions.centered)?point:null;if(moveToPoint!=null)
{this.mapStatus.easeToPoint(this.offsetCenterForPopup(moveToPoint));}},setPosition:function(pointOnMap,strPosition)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1913,'{this.mapStatus.easeToPoint(this.offsetCenterForPopup(moveToPoint));}},setPosition:','function(pointOnMap,strPosition)',arguments);strPosition=(typeof(strPosition)=='undefined')?'top_right':strPosition;var point=(pointOnMap.srid=="Pixel")?pointOnMap:this.mapStatus.getScreenPointFromWorld(pointOnMap);this.ezPopup.setPosition(point,strPosition);this.popUpOptions.pointOnMap=pointOnMap;},_reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1914,'strPosition=(typeof(strPosition)==\'undefined\')?\'top_right\':strPosition;var point=(pointOnMap.srid=="Pixel")?pointOnMap:this.mapStatus.getScreenPointFromWorld(pointOnMap);this.ezPopup.setPosition(point,strPosition);this.popUpOptions.pointOnMap=pointOnMap;},_reposition:','function()',arguments);if(this.popUpOptions.pointOnMap)
{this.setPosition(this.popUpOptions.pointOnMap);}},realTimeUpdate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1916,'{this.setPosition(this.popUpOptions.pointOnMap);}},realTimeUpdate:','function()',arguments);var offset=this.mapStatus.getLayerOffset();if(!this.layerOffset.equals(offset))
{this.widgetsDiv.widgetPopup.style.bottom=-offset.y+'px';this.widgetsDiv.widgetPopup.style.left=offset.x+'px';this.layerOffset=Object.clone(offset);}
if(this.zoomLevel!=this.mapStatus.getZoomAmount())
{this._reposition();this.zoomLevel=this.mapStatus.getZoomAmount();};}});Widgets.prototype.widgets["popUp"]=PopUpWidget;var WatermarkWidget=Class.extend(Widget,{loadedWatermarks:null,currentMapIds:null,watermarkServer:null,containerDivs:null,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1920,'{this._reposition();this.zoomLevel=this.mapStatus.getZoomAmount();};}});Widgets.prototype.widgets["popUp"]=PopUpWidget;var WatermarkWidget=Class.extend(Widget,{loadedWatermarks:null,currentMapIds:null,watermarkServer:null,containerDivs:null,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.createWatermarkDiv();this.createWatermarkContainerDivs();this.currentMapIds=$H();this.loadedWatermarks=$A();this.watermarkServer=mapStatus.getMapCacheUrl();},createWatermarkDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1921,'this.parent(widgetsDiv,mapStatus,renderer);this.createWatermarkDiv();this.createWatermarkContainerDivs();this.currentMapIds=$H();this.loadedWatermarks=$A();this.watermarkServer=mapStatus.getMapCacheUrl();},createWatermarkDiv:','function()',arguments);this.widgetDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetWatermark");},createWatermarkContainerDivs:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1922,'this.widgetDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetWatermark");},createWatermarkContainerDivs:','function()',arguments);this.containerDivs=$H();this.containerDivs["top_right"]=Utility.makeDivWithCss(this.widgetDiv,"top_right");this.containerDivs["bottom_right"]=Utility.makeDivWithCss(this.widgetDiv,"bottom_right");this.containerDivs["top_left"]=Utility.makeDivWithCss(this.widgetDiv,"top_left");this.containerDivs["bottom_left"]=Utility.makeDivWithCss(this.widgetDiv,"bottom_left");},makeWatermarkImgs:function(waterMarks)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1923,'this.containerDivs=$H();this.containerDivs["top_right"]=Utility.makeDivWithCss(this.widgetDiv,"top_right");this.containerDivs["bottom_right"]=Utility.makeDivWithCss(this.widgetDiv,"bottom_right");this.containerDivs["top_left"]=Utility.makeDivWithCss(this.widgetDiv,"top_left");this.containerDivs["bottom_left"]=Utility.makeDivWithCss(this.widgetDiv,"bottom_left");},makeWatermarkImgs:','function(waterMarks)',arguments);var imgs=new Array();$H(waterMarks).each(function(pair)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1924,'var imgs=new Array();$H(waterMarks).each(','function(pair)',arguments);var watermark=pair.value;if(!this.loadedWatermarks.include(watermark.watermarkNodeId))
{this.loadedWatermarks.push(watermark.watermarkNodeId);var img=new Element("img");img.galleryImg="no";img.onload=function(){this.toggle()};watermark.fileName=watermark.fileName.replace(/&amp;/g,"&");img.src=this.watermarkServer+"/images/"+watermark.filePath+watermark.fileName;img.nodeId=watermark.watermarkNodeId;img.addClassName(((watermark.watermarkVertical)?"vertical":"horizontal"));img.setStyle({opacity:watermark.transparency/100});img.toggle();this.containerDivs[watermark.watermarkPosition].appendChild(img);imgs.push(img);}}.bind(this));return imgs;},removeWatermarkImgs:function(imgs)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1926,'{this.loadedWatermarks.push(watermark.watermarkNodeId);var img=new Element("img");img.galleryImg="no";img.onload=function(){this.toggle()};watermark.fileName=watermark.fileName.replace(/&amp;/g,"&");img.src=this.watermarkServer+"/images/"+watermark.filePath+watermark.fileName;img.nodeId=watermark.watermarkNodeId;img.addClassName(((watermark.watermarkVertical)?"vertical":"horizontal"));img.setStyle({opacity:watermark.transparency/100});img.toggle();this.containerDivs[watermark.watermarkPosition].appendChild(img);imgs.push(img);}}.bind(this));return imgs;},removeWatermarkImgs:','function(imgs)',arguments);imgs.each(function(img)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1927,'imgs.each(','function(img)',arguments);img.onload=null;this.loadedWatermarks=this.loadedWatermarks.without(img.nodeId);img.parentNode.removeChild(img);}.bind(this));},updateWatermarks:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1928,'img.onload=null;this.loadedWatermarks=this.loadedWatermarks.without(img.nodeId);img.parentNode.removeChild(img);}.bind(this));},updateWatermarks:','function()',arguments);this.currentMapIds.each(function(pair)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1929,'this.currentMapIds.each(','function(pair)',arguments);if(!pair.value.imgs)
{pair.value.imgs=this.makeWatermarkImgs(pair.value.mapDetails.watermarks);}}.bind(this));},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1931,'{pair.value.imgs=this.makeWatermarkImgs(pair.value.mapDetails.watermarks);}}.bind(this));},update:','function()',arguments);var mapIds=this.mapStatus.getCurrentMapIds();var keys=this.currentMapIds.keys();if(mapIds.sort().toString()!=keys.sort().toString())
{for(var i=0;i<mapIds.size();i++)
{var mapDetails=this.mapStatus.getMapDetails(mapIds[i]);if(!this.currentMapIds[mapIds[i]]&&mapDetails)
{this.currentMapIds[mapIds[i]]={mapDetails:mapDetails};}}
for(var i=0;i<keys.size();i++)
{if(mapIds.indexOf(keys[i]*1)==-1)
{this.removeWatermarkImgs(this.currentMapIds[keys[i]].imgs);this.currentMapIds.remove(keys[i]);}}
this.updateWatermarks();}}});Widgets.prototype.widgets["watermark"]=WatermarkWidget;var MapModeButtonsWidget=Class.extend(Widget,{sliderObject:null,slider:null,sliding:null,width:99,layouts:null,menuDivs:null,mode:null,initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1939,'this.updateWatermarks();}}});Widgets.prototype.widgets["watermark"]=WatermarkWidget;var MapModeButtonsWidget=Class.extend(Widget,{sliderObject:null,slider:null,sliding:null,width:99,layouts:null,menuDivs:null,mode:null,initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.createMapViewWidgetDiv();this.createButtons();},createMapViewWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1940,'this.parent(widgetsDiv,mapStatus);this.createMapViewWidgetDiv();this.createButtons();},createMapViewWidgetDiv:','function()',arguments);if(blnUseJQuery===true)
{var objDiv=$j(document.createElement('div'));objDiv.attr({'class':'widgetMapModeButtons'});$j(this.verticalToolbarDiv).append(objDiv);this.widgetDivSelector='div#ezMaps div.widgetMapModeButtons';}
else
{this.widgetDiv=Utility.makeDivWithCss(this.verticalToolbarDiv,'widgetMapModeButtons');}},createButtons:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1944,'{this.widgetDiv=Utility.makeDivWithCss(this.verticalToolbarDiv,\'widgetMapModeButtons\');}},createButtons:','function()',arguments);if(blnUseJQuery===true)
{var _this=this;this.menuDivs=[];$j.each(this.mapStatus.mapOptions.layouts,function(strMode,objSettings)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1946,'{var _this=this;this.menuDivs=[];$j.each(this.mapStatus.mapOptions.layouts,','function(strMode,objSettings)',arguments);var objDiv=$j(document.createElement('div'));objDiv.attr
({'class':strMode+'Button','viewMode':strMode,'title':strMode.capitalize()});objDiv.bind('click',function(event){_this.mouseClick(event);});$j(_this.widgetDivSelector).append(objDiv);_this.menuDivs.push(_this.widgetDivSelector+' div.'+strMode+'Button');});}
else
{var mouseClick=this.mouseClick.bindAsEventListener(this);this.menuDivs=new Array();$H(this.mapStatus.mapOptions.layouts).each
(function(pair)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1951,'(','function(pair)',arguments);var div=Utility.makeDivWithCss(this.widgetDiv,pair.key+'Button');div.viewMode=pair.key;Event.observe(div,'click',mouseClick);div.writeAttribute({title:(pair.key+"").capitalize()});this.menuDivs.push(div);}.bind(this));}},mouseClick:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1952,'var div=Utility.makeDivWithCss(this.widgetDiv,pair.key+\'Button\');div.viewMode=pair.key;Event.observe(div,\'click\',mouseClick);div.writeAttribute({title:(pair.key+"").capitalize()});this.menuDivs.push(div);}.bind(this));}},mouseClick:','function(event)',arguments);if(blnUseJQuery===true)
{var button=$j(event.target).attr('viewMode');}
else
{var button=Event.element(event).viewMode;}
this.mapStatus.setViewMode(button);this.mapStatus.refreshAllLayersOpacity();this.updateMode();},updateMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1957,'this.mapStatus.setViewMode(button);this.mapStatus.refreshAllLayersOpacity();this.updateMode();},updateMode:','function()',arguments);var strMode=this.mapStatus.getViewMode();if(this.mode!=strMode)
{this.mode=strMode;if(blnUseJQuery===true)
{$j.each(this.menuDivs,function(intKey,strButtonSelector)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1960,'{$j.each(this.menuDivs,','function(intKey,strButtonSelector)',arguments);var objButton=$j(strButtonSelector);var strViewMode=objButton.attr('viewMode');if(strViewMode!=strMode)
{objButton.removeClass(strViewMode+'ButtonActive');}
else
{objButton.addClass(strViewMode+'ButtonActive');}});}
else
{var size=this.menuDivs.size();for(var i=0;i<size;i++)
{var button=this.menuDivs[i];var vMode=button.viewMode;if(vMode!=strMode)
{button.removeClassName(button.viewMode+'ButtonActive');}
else
{button.addClassName(button.viewMode+'ButtonActive');}}}}},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1970,'{button.addClassName(button.viewMode+\'ButtonActive\');}}}}},update:','function()',arguments);this.updateMode();if(this.numLayer==this.mapStatus.getNumberOfLayers())
{return;}
this.numLayer=this.mapStatus.getNumberOfLayers();if(blnUseJQuery===true)
{if(this.mapStatus.getNumberOfLayers()<3)
{$j(this.widgetDivSelector).hide();}
else
{$j(this.widgetDivSelector).show();}}
else
{if(this.mapStatus.getNumberOfLayers()<3)
{this.widgetDiv.hide();}
else
{this.widgetDiv.show();}}}});Widgets.prototype.widgets['mapModeButtons']=MapModeButtonsWidget;var KeyboardWidget=Class.extend(Widget,{initialStepSize:0,increaseSpeed:1,singleStepSize:50,stepSize:null,mouseAction:null,MOUSEOVER:false,MOUSEOUT:true,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1982,'{this.widgetDiv.show();}}}});Widgets.prototype.widgets[\'mapModeButtons\']=MapModeButtonsWidget;var KeyboardWidget=Class.extend(Widget,{initialStepSize:0,increaseSpeed:1,singleStepSize:50,stepSize:null,mouseAction:null,MOUSEOVER:false,MOUSEOUT:true,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.stepSize=this.initialStepSize;this.mouseAction=true;this.addEventHandler();},addEventHandler:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1983,'this.parent(widgetsDiv,mapStatus,renderer);this.stepSize=this.initialStepSize;this.mouseAction=true;this.addEventHandler();},addEventHandler:','function()',arguments);var keyPressFunction=this.keyPress.bindAsEventListener(this);Event.observe(document,"keypress",keyPressFunction);var keyUpFunction=this.keyUp.bindAsEventListener(this);Event.observe(document,"keyup",keyUpFunction);},mouseout:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1984,'var keyPressFunction=this.keyPress.bindAsEventListener(this);Event.observe(document,"keypress",keyPressFunction);var keyUpFunction=this.keyUp.bindAsEventListener(this);Event.observe(document,"keyup",keyUpFunction);},mouseout:','function(event)',arguments);this.mouseAction=this.MOUSEOUT;},mouseover:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1985,'this.mouseAction=this.MOUSEOUT;},mouseover:','function(event)',arguments);this.mouseAction=this.MOUSEOVER;},keyUp:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1986,'this.mouseAction=this.MOUSEOVER;},keyUp:','function(event)',arguments);if(this.mouseAction)return;if(this.stepSize<(this.increaseSpeed))
{this.stepSize=this.singleStepSize;var code=this.getCodeFromEvent(event);this.keyMoveSwitch(code);}
this.stepSize=this.initialStepSize;},keyPress:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1989,'this.stepSize=this.initialStepSize;},keyPress:','function(event)',arguments);if(this.mouseAction)return;var code=this.getCodeFromEvent(event);this.stepSize+=this.increaseSpeed;this.keyMoveSwitch(code);Event.stop(event);},getCodeFromEvent:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1990,'if(this.mouseAction)return;var code=this.getCodeFromEvent(event);this.stepSize+=this.increaseSpeed;this.keyMoveSwitch(code);Event.stop(event);},getCodeFromEvent:','function(event)',arguments);if(event.keyCode)return event.keyCode;else if(event.which)return event.which;},keyMoveSwitch:function(code)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1991,'if(event.keyCode)return event.keyCode;else if(event.which)return event.which;},keyMoveSwitch:','function(code)',arguments);switch(code)
{case Event.KEY_UP:case 56:case 104:this.pan(0,1);break;case Event.KEY_DOWN:case 50:case 98:this.pan(0,-1);break;case Event.KEY_LEFT:case 52:case 100:this.pan(1,0);break;case Event.KEY_RIGHT:case 54:case 102:this.pan(-1,0);break;case 33:case 57:case 105:this.pan(-1,1);break;case 55:case 36:case 103:this.pan(1,1);break;case 51:case 34:case 99:this.pan(-1,-1);break;case 49:case 35:case 97:this.pan(1,-1);break;case 43:case 53:case 107:case 187:if(typeof(this.mapStatus.mapOptions.blnDisallowZooming)!="undefined"&&this.mapStatus.mapOptions.blnDisallowZooming!=true)
{this.mapStatus.incrementZoomLevel(-1);}
break;case 45:case 109:case 189:if(typeof(this.mapStatus.mapOptions.blnDisallowZooming)!="undefined"&&this.mapStatus.mapOptions.blnDisallowZooming!=true)
{this.mapStatus.incrementZoomLevel(1);}
break;}},pan:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1997,'break;}},pan:','function(x,y)',arguments);var move_x=this.stepSize*x;var move_y=this.stepSize*y;this.mapStatus.moveLayers(move_x,move_y);}});Widgets.prototype.widgets["keyboard"]=KeyboardWidget;var ScribbleWidget=Class.extend(Widget,{toolManager:null,zoomLevel:null,buttons:["polygon","polyline","hotspot","measure"],buttonsToCallbackMap:$H({polygon:0,polyline:0,hotspot:0,measure:1}),buttonDivs:null,mode:null,tools:null,cursorImage:null,infoDiv:null,infoId:null,moved:false,layout:null,eventPriority:3,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1998,'var move_x=this.stepSize*x;var move_y=this.stepSize*y;this.mapStatus.moveLayers(move_x,move_y);}});Widgets.prototype.widgets["keyboard"]=KeyboardWidget;var ScribbleWidget=Class.extend(Widget,{toolManager:null,zoomLevel:null,buttons:["polygon","polyline","hotspot","measure"],buttonsToCallbackMap:$H({polygon:0,polyline:0,hotspot:0,measure:1}),buttonDivs:null,mode:null,tools:null,cursorImage:null,infoDiv:null,infoId:null,moved:false,layout:null,eventPriority:3,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.createWidgetDiv();this.createInfoDiv();this.createToolManager();this.tools=$H();this.layout=this.mapStatus.layout;},createWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',1999,'this.parent(widgetsDiv,mapStatus,renderer);this.createWidgetDiv();this.createInfoDiv();this.createToolManager();this.tools=$H();this.layout=this.mapStatus.layout;},createWidgetDiv:','function()',arguments);if(blnUseJQuery===true)
{var objDiv=$j(document.createElement('div'));objDiv.attr({'class':'widgetScribble'});$j(this.verticalToolbarDiv).append(objDiv);this.widgetDivSelector='div#ezMaps div.widgetScribble';}
else
{this.widgetDiv=Utility.makeDivWithCss(this.verticalToolbarDiv,'widgetScribble');}},createInfoDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2003,'{this.widgetDiv=Utility.makeDivWithCss(this.verticalToolbarDiv,\'widgetScribble\');}},createInfoDiv:','function()',arguments);this.infoDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.renderer,"widgetScribbleInfoDiv");this.infoDiv.hide();},createButtons:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2004,'this.infoDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.renderer,"widgetScribbleInfoDiv");this.infoDiv.hide();},createButtons:','function()',arguments);if(blnUseJQuery===true)
{var _this=this;this.buttonDivs=[];$j.each(this.buttons,function(intKey,strButton)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2006,'{var _this=this;this.buttonDivs=[];$j.each(this.buttons,','function(intKey,strButton)',arguments);var strTitle=(strButton=='polyline')?'line':strButton;var objDiv=$j(document.createElement('div'));objDiv.attr
({'active':false,'class':strButton+'Button','toolId':strButton,'title':strTitle});objDiv.bind('click',function(event){_this.mouseClick(event);});$j(_this.widgetDivSelector).append(objDiv);_this.buttonDivs.push(_this.widgetDivSelector+' div.'+strButton+'Button');});}
else
{var mouseClick=this.mouseClick.bindAsEventListener(this);this.buttonDivs=new Array();this.buttons.each
(function(button)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2011,'(','function(button)',arguments);var div=Utility.makeDivWithCss(this.widgetDiv,button+"Button");div.active=false;div.toolId=button;var dist=(button=="polyline")?"line":button;div.writeAttribute({title:dist.capitalize()});Event.observe(div,"click",mouseClick);this.buttonDivs.push(div);}.bind(this));}},displayPoints:function(toolType,points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2012,'var div=Utility.makeDivWithCss(this.widgetDiv,button+"Button");div.active=false;div.toolId=button;var dist=(button=="polyline")?"line":button;div.writeAttribute({title:dist.capitalize()});Event.observe(div,"click",mouseClick);this.buttonDivs.push(div);}.bind(this));}},displayPoints:','function(toolType,points)',arguments);var toolId=this.newTool(toolType);this.tools[toolId].loadPoints(points);this.tools[toolId].setDisplayMode();return toolId;},editPoints:function(toolType,points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2013,'var toolId=this.newTool(toolType);this.tools[toolId].loadPoints(points);this.tools[toolId].setDisplayMode();return toolId;},editPoints:','function(toolType,points)',arguments);var toolId=this.newTool(toolType);this.tools[toolId].loadPoints(points);this.tools[toolId].setEditMode();return toolId;},setDisplayMode:function(toolId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2014,'var toolId=this.newTool(toolType);this.tools[toolId].loadPoints(points);this.tools[toolId].setEditMode();return toolId;},setDisplayMode:','function(toolId)',arguments);this.tools[toolId].setDisplayMode();},setEditMode:function(toolId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2015,'this.tools[toolId].setDisplayMode();},setEditMode:','function(toolId)',arguments);this.tools[toolId].setEditMode();},loadPoints:function(toolId,points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2016,'this.tools[toolId].setEditMode();},loadPoints:','function(toolId,points)',arguments);this.toolManager.loadPoints(points);},setStroke:function(toolId,stroke)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2017,'this.toolManager.loadPoints(points);},setStroke:','function(toolId,stroke)',arguments);this.tools[toolId].setStroke(stroke);},setFill:function(toolId,fill)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2018,'this.tools[toolId].setStroke(stroke);},setFill:','function(toolId,fill)',arguments);this.tools[toolId].setFill(fill);},moveShapeToFront:function(toolId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2019,'this.tools[toolId].setFill(fill);},moveShapeToFront:','function(toolId)',arguments);this.tools[toolId].moveToFront();},mousemove:function(event,point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2020,'this.tools[toolId].moveToFront();},mousemove:','function(event,point)',arguments);if(this.infoId!=null)
{this.infoDiv.style.bottom=point.y-10+'px';this.infoDiv.style.left=point.x+30+'px';this.moved=true;}},mouseClick:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2022,'{this.infoDiv.style.bottom=point.y-10+\'px\';this.infoDiv.style.left=point.x+30+\'px\';this.moved=true;}},mouseClick:','function(event)',arguments);if(blnUseJQuery===true)
{var strToolId=$j(event.target).attr('toolId');this.newTool(strToolId);this.updateMode();}
else
{var e=Event.element(event);this.newTool(e.toolId);this.updateMode();}},saveShape:function(informationObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2026,'{var e=Event.element(event);this.newTool(e.toolId);this.updateMode();}},saveShape:','function(informationObj)',arguments);informationObj.srid=this.mapStatus.getSrid();this.callCallbackFunctions(informationObj,"saveShape");},callCallbackFunctions:function(informationObj,tag)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2027,'informationObj.srid=this.mapStatus.getSrid();this.callCallbackFunctions(informationObj,"saveShape");},callCallbackFunctions:','function(informationObj,tag)',arguments);var points=informationObj.pointsOnMap;var distances=new Array()
var totalDist=0;for(var i in points)
{if(i-i=="0")
{var point1key=(i*1)+0;var point2key=(i*1)+1;if(informationObj.pointsOnMap[point2key])
{rawDist=Geocode.getDistanceInMetres(informationObj.srid,informationObj.pointsOnMap[point1key],informationObj.pointsOnMap[point2key]);rawDistkm=(rawDist*1)/1000;distkm=rawDistkm.toFixed(2);distances.push("<span style='font-size:100%;font-weight:bold;margin-bottom:10px;'>Path "+point2key+"</span>: "+distkm+" km");totalDist+=Geocode.getDistanceInMetres(informationObj.srid,informationObj.pointsOnMap[point1key],informationObj.pointsOnMap[point2key]);}}}
var distStr=distances.join("<br />");rawTotalDistkm=(totalDist*1)/1000;totalDistkm=rawTotalDistkm.toFixed(2);distStr=distStr+"<br /><br /><span style='font-size:100%;font-weight:bold;margin-bottom:10px;'>Total</span>: "+totalDistkm+" km";var keysAr=$A(this.buttonsToCallbackMap.keys());var keyIsSet=keysAr.indexOf(informationObj.mode);if(keyIsSet!=-1)
{switch(informationObj.mode)
{case"measure":informationObj.distance="<div id='measuretool'><h3 style='font-size:120%;font-weight:bold;margin-bottom:10px;'>Distance Measured</h3>"+distStr+"</div>";break;default:break;}
if(this.callbackFunctions[this.buttonsToCallbackMap[informationObj.mode]])
this.callbackFunctions[this.buttonsToCallbackMap[informationObj.mode]](informationObj,tag);}
else
{for(var i=0;i<this.callbackFunctions.length;i++)
{this.callbackFunctions[i](informationObj,tag);}}},shapeUpdated:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2040,'{this.callbackFunctions[i](informationObj,tag);}}},shapeUpdated:','function(id)',arguments);this.infoId=id;this.callCallbackFunctions(id,"shapeUpdated");},hideLength:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2041,'this.infoId=id;this.callCallbackFunctions(id,"shapeUpdated");},hideLength:','function(id)',arguments);if(this.infoId==id)
{this.infoId=null;}},callbackFunction:function(data,informationObj)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2043,'{this.infoId=null;}},callbackFunction:','function(data,informationObj)',arguments);switch(data)
{case"save":this.saveShape(informationObj);break;case"shapeUpdated":this.shapeUpdated(informationObj);break;case"hideLength":this.hideLength(informationObj);break;case"closeTool":this.removeShape(informationObj);break;}},getShapePoints:function(toolId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2045,'{case"save":this.saveShape(informationObj);break;case"shapeUpdated":this.shapeUpdated(informationObj);break;case"hideLength":this.hideLength(informationObj);break;case"closeTool":this.removeShape(informationObj);break;}},getShapePoints:','function(toolId)',arguments);if(this.tools[toolId])
{return this.tools[toolId].getPoints();}
else
{return false;}},removeAllShapes:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2049,'{return false;}},removeAllShapes:','function()',arguments);var keys=this.tools.keys().each(function(id){this.removeShape(id)}.bind(this));},removeShape:function(toolId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2050,'var keys=this.tools.keys().each(function(id){this.removeShape(id)}.bind(this));},removeShape:','function(toolId)',arguments);if(this.tools[toolId])
{this.tools[toolId].nihilate();this.toolManager.removeTool(this.tools[toolId]);}},createToolManager:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2052,'{this.tools[toolId].nihilate();this.toolManager.removeTool(this.tools[toolId]);}},createToolManager:','function()',arguments);this.toolManager=new Graphic.EzmapsScribbleToolManager(this.renderer,this.mapStatus);},newTool:function(shapeType)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2053,'this.toolManager=new Graphic.EzmapsScribbleToolManager(this.renderer,this.mapStatus);},newTool:','function(shapeType)',arguments);var toolId=Utility.getRandomId(100,5);var tooloptions={id:toolId,callbackFunction:this.callbackFunction.bind(this),shapeType:shapeType}
this.tools[toolId]=new Graphic.EzmapsScribbleTool(this.mapStatus,tooloptions);this.toolManager.setTool(this.tools[toolId]);return toolId;},reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2055,'this.tools[toolId]=new Graphic.EzmapsScribbleTool(this.mapStatus,tooloptions);this.toolManager.setTool(this.tools[toolId]);return toolId;},reposition:','function()',arguments);if(this.toolManager)
this.toolManager.reposition();},refresh:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2057,'this.toolManager.reposition();},refresh:','function()',arguments);if(this.toolManager)
this.toolManager.refresh();},getActiveToolMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2059,'this.toolManager.refresh();},getActiveToolMode:','function()',arguments);if(this.toolManager)
return this.toolManager.getActiveToolMode();},updateMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2061,'return this.toolManager.getActiveToolMode();},updateMode:','function()',arguments);var strMode=this.getActiveToolMode();if(this.mode!=strMode)
{this.mode=strMode;if(blnUseJQuery===true)
{$j.each(this.buttonDivs,function(intKey,strButtonSelector)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2064,'{$j.each(this.buttonDivs,','function(intKey,strButtonSelector)',arguments);var objButton=$j(strButtonSelector);var strViewMode=objButton.attr('toolId');if(strViewMode!=strMode)
{objButton.removeClass(strViewMode+'ButtonActive');}
else
{objButton.addClass(strViewMode+'ButtonActive');}});}
else
{if(this.buttonDivs)
{var size=this.buttonDivs.size();for(var i=0;i<size;i++)
{var button=this.buttonDivs[i];var vMode=button.toolId;if(vMode!=strMode)
{button.removeClassName(vMode+"ButtonActive");}
else
{button.addClassName(vMode+"ButtonActive");}}}}}},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2075,'{button.addClassName(vMode+"ButtonActive");}}}}}},update:','function()',arguments);this.updateMode();if(this.infoId!=null&&this.moved)
{var dist=this.tools[this.infoId].getTotalDistance();if(dist>1000)
{var innerHtml=(dist/1000).toFixed(2)+" km";}
else
{var innerHtml=dist+" m";}
this.infoDiv.innerHTML=innerHtml;this.moved=false;if(!this.infoDiv.visible())
{this.infoDiv.show();}}
else if(this.infoDiv.visible()&&this.infoId==null)
{this.infoDiv.hide();}
if(this.layout!=this.mapStatus.getViewMode())
{this.layout=this.mapStatus.getViewMode();this.removeAllShapes();}}});Widgets.prototype.widgets["scribble"]=ScribbleWidget;var ReferenceMapWidget=Class.extend(Widget,{referenceMapDiv:null,refreshRate:3.2,controller:null,stackId:null,zoomOutAmount:6,stepPercent:0.2,hasLoadedMapRanges:false,mapRanges:[{mapIds:[961945,961973,"961945","961973"]},{mapId:52293,srids:[27700,29900,4318],range:$R(0,99)}],compassRef:$H({"north":[0,1],"south":[0,-1],"east":[1,0],"west":[-1,0]}),initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2086,'{this.layout=this.mapStatus.getViewMode();this.removeAllShapes();}}});Widgets.prototype.widgets["scribble"]=ScribbleWidget;var ReferenceMapWidget=Class.extend(Widget,{referenceMapDiv:null,refreshRate:3.2,controller:null,stackId:null,zoomOutAmount:6,stepPercent:0.2,hasLoadedMapRanges:false,mapRanges:[{mapIds:[961945,961973,"961945","961973"]},{mapId:52293,srids:[27700,29900,4318],range:$R(0,99)}],compassRef:$H({"north":[0,1],"south":[0,-1],"east":[1,0],"west":[-1,0]}),initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.makeReferenceMapDiv();this.makeMap();this.makeExpanderButton();this.makeCompass();},updateMapRangesForIdentity:function(objIdentity)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2087,'this.parent(widgetsDiv,mapStatus);this.makeReferenceMapDiv();this.makeMap();this.makeExpanderButton();this.makeCompass();},updateMapRangesForIdentity:','function(objIdentity)',arguments);var objIdentity=objIdentity==null?Shell.getIdentity():objIdentity;if(!Shell.getUserAthenticatedStatus())
this.zoomOutAmount=16;if(typeof(objIdentity)=='undefined')
return;if(objIdentity.id=='ireland'&&!Shell.getUserAthenticatedStatus())
{this.mapRanges=[{mapIds:[961945,961973,"961945","961973"]},{mapId:52293,srids:[27700,29900,4318],range:$R(0,99)}];}
else
{this.mapRanges=[{mapIds:[961945,961973,"961945","961973"]},{mapId:52383,srids:[27700,29900],range:$R(0,14)},{mapId:52293,srids:[27700,29900,4318],range:$R(0,99)}];}
this.hasLoadedMapRanges=true;},makeReferenceMapDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2094,'this.hasLoadedMapRanges=true;},makeReferenceMapDiv:','function()',arguments);this.referenceMapDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetReferenceMap");},makeExpanderButton:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2095,'this.referenceMapDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetReferenceMap");},makeExpanderButton:','function()',arguments);this.expanderDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetReferenceMapExpander");Event.observe(this.expanderDiv,"click",function(){new Effect.toggle(this.referenceMapDiv,'blind');this.expanderDiv.toggleClassName('widgetReferenceMapExpanderExpand');}.bindAsEventListener(this));},makeCompass:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2096,'this.expanderDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetReferenceMapExpander");Event.observe(this.expanderDiv,"click",function(){new Effect.toggle(this.referenceMapDiv,\'blind\');this.expanderDiv.toggleClassName(\'widgetReferenceMapExpanderExpand\');}.bindAsEventListener(this));},makeCompass:','function()',arguments);this.compassRef.each(function(pair)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2097,'this.compassRef.each(','function(pair)',arguments);var div=Utility.makeDivWithCss(this.referenceMapDiv,pair.key);div.key=pair.key;var span=Utility.makeDivWithId(this.referenceMapDiv,div.key+'Label').update(div.key.substring(0,1).toUpperCase());$(span).addClassName('label');span.key=div.key;Event.observe(div,"click",this.compassClick.bindAsEventListener(this));Event.observe(span,"click",this.compassClick.bindAsEventListener(this));}.bind(this));},compassClick:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2098,'var div=Utility.makeDivWithCss(this.referenceMapDiv,pair.key);div.key=pair.key;var span=Utility.makeDivWithId(this.referenceMapDiv,div.key+\'Label\').update(div.key.substring(0,1).toUpperCase());$(span).addClassName(\'label\');span.key=div.key;Event.observe(div,"click",this.compassClick.bindAsEventListener(this));Event.observe(span,"click",this.compassClick.bindAsEventListener(this));}.bind(this));},compassClick:','function(event)',arguments);var element=Event.element(event);var direction=this.compassRef[element.key];var width=this.screenExt.BRX-this.screenExt.TLX;var height=this.screenExt.TLY-this.screenExt.BRY;var currentLayoutMode=this.mapStatus.getViewMode();if(currentLayoutMode=='mirrored'||currentLayoutMode=='stitched')
{width=width*2;}
var centerX=(direction[0]*width*this.stepPercent)+(width/2)+this.screenExt.TLX;var centerY=(direction[1]*height*this.stepPercent)+(height/2)+this.screenExt.BRY;this.mapStatus.jumpToPoint(new Point(centerX,centerY,this.layer.getSrid()));},makeMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2101,'var centerX=(direction[0]*width*this.stepPercent)+(width/2)+this.screenExt.TLX;var centerY=(direction[1]*height*this.stepPercent)+(height/2)+this.screenExt.BRY;this.mapStatus.jumpToPoint(new Point(centerX,centerY,this.layer.getSrid()));},makeMap:','function()',arguments);this.mapDiv=Utility.makeDivWithCss(this.referenceMapDiv,"mapDiv");var options=this.mapStatus.getMapOptions();options.refreshRate=this.refreshRate;this.controller=new ezMapsController(this.mapDiv,options);this.controller.setMapStackObjects(this.mapStatus.getMapStackObjects());this.layerManager=this.controller.addWidget('layerManager');this.focusSquare=this.controller.addWidget('focusSquare');this.focusSquare.registerCallback(this.recenter.bind(this));this.layer=this.mapStatus.getLayer(this.mapStatus.getRasterLayerAId());this.stackId=this.layer.getStackId();this.referencelayer=this.controller.makeNewLayer(this.getMapId());},recenter:function(informationObj,tag)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2102,'this.mapDiv=Utility.makeDivWithCss(this.referenceMapDiv,"mapDiv");var options=this.mapStatus.getMapOptions();options.refreshRate=this.refreshRate;this.controller=new ezMapsController(this.mapDiv,options);this.controller.setMapStackObjects(this.mapStatus.getMapStackObjects());this.layerManager=this.controller.addWidget(\'layerManager\');this.focusSquare=this.controller.addWidget(\'focusSquare\');this.focusSquare.registerCallback(this.recenter.bind(this));this.layer=this.mapStatus.getLayer(this.mapStatus.getRasterLayerAId());this.stackId=this.layer.getStackId();this.referencelayer=this.controller.makeNewLayer(this.getMapId());},recenter:','function(informationObj,tag)',arguments);if(tag=="recenter")
{this.mapStatus.jumpToPoint(informationObj);}},getZoomAmount:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2104,'{this.mapStatus.jumpToPoint(informationObj);}},getZoomAmount:','function()',arguments);return this.layer.getZoomAmount()+this.zoomOutAmount;},getCenterPoint:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2105,'return this.layer.getZoomAmount()+this.zoomOutAmount;},getCenterPoint:','function()',arguments);return this.layer.getCenterPointBuffer();},updateScreenExt:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2106,'return this.layer.getCenterPointBuffer();},updateScreenExt:','function()',arguments);this.screenExt=this.layer.getScreenExt();this.focusSquare.setFocus(this.screenExt,this.layer.getSrid());},realTimeUpdate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2107,'this.screenExt=this.layer.getScreenExt();this.focusSquare.setFocus(this.screenExt,this.layer.getSrid());},realTimeUpdate:','function()',arguments);this.updateScreenExt();},getMapId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2108,'this.updateScreenExt();},getMapId:','function()',arguments);this.layer=this.mapStatus.getActiveLayerObj();var size=this.mapRanges.size();var srid=this.layer.getSrid();var zoomAmount=this.getZoomAmount();for(var i=0;i<size;i++)
{var mr=this.mapRanges[i];if(mr.mapIds&&mr.mapIds.indexOf(this.layer.getMapId())!=-1)
{return this.layer.getMapId();}
else if(!mr.mapIds&&mr.srids.indexOf(srid)!=-1&&mr.range.include(zoomAmount))
{return mr.mapId;}}},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2113,'{return mr.mapId;}}},update:','function()',arguments);if(!this.referenceMapDiv.visible())
{return;}
var objCentrePoint=this.getCenterPoint();if(isNaN(objCentrePoint.x)||isNaN(objCentrePoint.y)||isNaN(objCentrePoint.srid))
{return;}
if(typeof(this.centerPoint)=='undefined'||this.centerPoint.x!=objCentrePoint.x||this.centerPoint.y!=objCentrePoint.y||this.centerPoint.srid!=objCentrePoint.srid||this.zoomAmount!=this.getZoomAmount()||this.stackId!=this.layer.getStackId())
{if(!this.hasLoadedMapRanges)
this.updateMapRangesForIdentity();this.stackId=this.layer.getStackId();this.layerManager.switchLayerStackId(this.getMapId());this.centerPoint=this.getCenterPoint();this.zoomAmount=this.getZoomAmount();this.controller.jumpToPoint(this.getCenterPoint(),this.getZoomAmount());}
else
{this.focusSquare.reset();}}});Widgets.prototype.widgets["referenceMap"]=ReferenceMapWidget;var LayerManagerWidget=Class.extend(Widget,{zoomAmount:null,nameLength:25,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2122,'{this.focusSquare.reset();}}});Widgets.prototype.widgets["referenceMap"]=ReferenceMapWidget;var LayerManagerWidget=Class.extend(Widget,{zoomAmount:null,nameLength:25,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.makeDroppable();},makeDroppable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2123,'this.parent(widgetsDiv,mapStatus,renderer);this.makeDroppable();},makeDroppable:','function()',arguments);if(blnUseJQuery===true)
{var _this=this;var objEventDiv=$j(this.mapStatus.eventHandler.eventDiv);if(objEventDiv.hasClass('ui-droppable'))
{var strPreviousAccept=objEventDiv.data('strDroppableSelector');var objFunctionOver=objEventDiv.droppable('option','over');var objFunctionDrop=objEventDiv.droppable('option','drop');var objNewFunctionOver=function(event,ui)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2126,'{var strPreviousAccept=objEventDiv.data(\'strDroppableSelector\');var objFunctionOver=objEventDiv.droppable(\'option\',\'over\');var objFunctionDrop=objEventDiv.droppable(\'option\',\'drop\');var objNewFunctionOver=','function(event,ui)',arguments);if(ui.draggable.is(strPreviousAccept))
{objFunctionOver(event,ui);}
else
{}};var objNewFunctionDrop=function(event,ui)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2130,'{}};var objNewFunctionDrop=','function(event,ui)',arguments);if(ui.draggable.is(strPreviousAccept))
{objFunctionDrop(event,ui);}
else
{_this.onDrop(ui.draggable.get(0),this,event);}};objEventDiv.droppable('option','accept',strPreviousAccept+',.ezmapMapStack');objEventDiv.droppable('option','over',objNewFunctionOver);objEventDiv.droppable('option','drop',objNewFunctionDrop);objEventDiv.data('strDroppableSelector',strPreviousAccept+',.ezmapMapStack');}
else
{$j(this.mapStatus.eventHandler.eventDiv).droppable({accept:'.ezmapMapStack',greedy:false,tolerance:'pointer',drop:function(event,ui)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2136,'{$j(this.mapStatus.eventHandler.eventDiv).droppable({accept:\'.ezmapMapStack\',greedy:false,tolerance:\'pointer\',drop:','function(event,ui)',arguments);_this.onDrop(ui.draggable.get(0),this,event);}});}}
else
{Droppables.add(this.mapStatus.eventHandler.eventDiv,{accept:'ezmapMapStack',onDrop:this.onDrop.bind(this),greedy:false});}},removeDroppable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2139,'{Droppables.add(this.mapStatus.eventHandler.eventDiv,{accept:\'ezmapMapStack\',onDrop:this.onDrop.bind(this),greedy:false});}},removeDroppable:','function()',arguments);if(blnUseJQuery===true)
{$j(this.mapStatus.eventHandler.eventDiv).droppable('destroy');}
else
{Droppables.remove(this.mapStatus.eventHandler.eventDiv);}},onDrop:function(elementIDropping,elementDroppedOn,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2143,'{Droppables.remove(this.mapStatus.eventHandler.eventDiv);}},onDrop:','function(elementIDropping,elementDroppedOn,event)',arguments);if(blnUseJQuery===true)
{var stackId=$j(elementIDropping).attr('stackId');var action=$j(elementIDropping).attr('action');}
else
{var stackId=elementIDropping.readAttribute('stackId');var action=elementIDropping.readAttribute('action');}
if(action=='push')
{this.pushLayerStackId(stackId);}
else
{this.switchLayerStackId(stackId,event);}},setLayerToStackId:function(stackAorB,stackId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2151,'{this.switchLayerStackId(stackId,event);}},setLayerToStackId:','function(stackAorB,stackId)',arguments);var layerId=this.mapStatus['getRasterLayer'+stackAorB+'Id']();this.mapStatus.switchStackId(layerId,stackId);},pushLayerStackId:function(stackId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2152,'var layerId=this.mapStatus[\'getRasterLayer\'+stackAorB+\'Id\']();this.mapStatus.switchStackId(layerId,stackId);},pushLayerStackId:','function(stackId)',arguments);this.mapStatus.pushLayerStackId(stackId);},switchLayerStackId:function(stackId,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2153,'this.mapStatus.pushLayerStackId(stackId);},switchLayerStackId:','function(stackId,event)',arguments);this.mapStatus.switchLayerStackId(stackId,event);}});Widgets.prototype.widgets['layerManager']=LayerManagerWidget;var DroppableGeocodeWidget=Class.extend(Widget,{droppableDiv:null,activeElement:null,mousePoint:null,visible:false,setVisible:false,blnValidElement:false,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2154,'this.mapStatus.switchLayerStackId(stackId,event);}});Widgets.prototype.widgets[\'layerManager\']=LayerManagerWidget;var DroppableGeocodeWidget=Class.extend(Widget,{droppableDiv:null,activeElement:null,mousePoint:null,visible:false,setVisible:false,blnValidElement:false,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.intId=Utility.getRandomId(100,5);this.makeDroppableDiv();this.makeDroppable();},returnElementReference:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2155,'this.parent(widgetsDiv,mapStatus,renderer);this.intId=Utility.getRandomId(100,5);this.makeDroppableDiv();this.makeDroppable();},returnElementReference:','function()',arguments);return document.getElementById('droppableDiv'+this.intId);},makeDroppableDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2156,'return document.getElementById(\'droppableDiv\'+this.intId);},makeDroppableDiv:','function()',arguments);if(blnUseJQuery===true)
{var objElement=document.createElement('div');$j(objElement).attr({'id':'droppableDiv'+this.intId,'class':'droppableGeocodeWidget'});this.widgetsInactiveDiv.staticDiv.appendChild(objElement);}
else
{this.droppableDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"droppableGeocodeWidget");}
this.hideLines();},updateLines:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2161,'this.hideLines();},updateLines:','function()',arguments);if(!this.visible)
{return;}
var pt=this.mapStatus.invertYaxis(this.mousePoint);var offset=this.mapStatus.getLayerOffset();pt.x+=offset.x;pt.y+=offset.y;if(blnUseJQuery===true)
{$j(this.returnElementReference()).css({top:pt.y+'px',left:pt.x+'px'});}
else
{this.droppableDiv.style.top=pt.y+"px";this.droppableDiv.style.left=pt.x+"px";}},makeDroppable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2167,'{this.droppableDiv.style.top=pt.y+"px";this.droppableDiv.style.left=pt.x+"px";}},makeDroppable:','function()',arguments);if(blnUseJQuery===true)
{var _this=this;$j(this.mapStatus.eventHandler.eventDiv).droppable({accept:'.ezmapDraggables, .favouritesDraggables, .resourceDraggables',greedy:false,tolerance:'pointer',over:function(event,ui)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2169,'{var _this=this;$j(this.mapStatus.eventHandler.eventDiv).droppable({accept:\'.ezmapDraggables, .favouritesDraggables, .resourceDraggables\',greedy:false,tolerance:\'pointer\',over:','function(event,ui)',arguments);_this.onHover(ui.draggable.get(0));},drop:function(event,ui)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2170,'_this.onHover(ui.draggable.get(0));},drop:','function(event,ui)',arguments);_this.onDrop(ui.draggable.get(0),this,event);}});$j(this.mapStatus.eventHandler.eventDiv).data('strDroppableSelector','.ezmapDraggables, .favouritesDraggables, .resourceDraggables');this.onMouseMoveCached=function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2171,'_this.onDrop(ui.draggable.get(0),this,event);}});$j(this.mapStatus.eventHandler.eventDiv).data(\'strDroppableSelector\',\'.ezmapDraggables, .favouritesDraggables, .resourceDraggables\');this.onMouseMoveCached=','function(event)',arguments);_this.onMouseMove(event);};this.hideLinesCached=function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2172,'_this.onMouseMove(event);};this.hideLinesCached=','function()',arguments);_this.hideLines();};$j(document).bind('mousemove',this.onMouseMoveCached);$j(document).bind('mouseup',this.hideLinesCached);}
else
{Droppables.add(this.mapStatus.eventHandler.eventDiv,{accept:'ezmapDraggables',onHover:this.onHover.bind(this),onDrop:this.onDrop.bind(this),greedy:false});Event.observe(document,"mousemove",this.onMouseMove.bind(this));Event.observe(document,"mouseup",this.hideLines.bind(this));}},removeDroppable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2175,'{Droppables.add(this.mapStatus.eventHandler.eventDiv,{accept:\'ezmapDraggables\',onHover:this.onHover.bind(this),onDrop:this.onDrop.bind(this),greedy:false});Event.observe(document,"mousemove",this.onMouseMove.bind(this));Event.observe(document,"mouseup",this.hideLines.bind(this));}},removeDroppable:','function()',arguments);if(blnUseJQuery===true)
{$j(this.mapStatus.eventHandler.eventDiv).droppable('destroy');$j(document).unbind('mousemove',this.onMouseMoveCached);$j(document).unbind('mouseup',this.hideLinesCached);}
else
{Droppables.remove(this.mapStatus.eventHandler.eventDiv);}},onHover:function(element)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2179,'{Droppables.remove(this.mapStatus.eventHandler.eventDiv);}},onHover:','function(element)',arguments);this.activeElement=element;if(blnUseJQuery===true)
{if($j(element).hasClass('ezmapDraggables')===true)
{this.blnValidElement=true;}
else
{this.blnValidElement=false;}}
else
{if($(element).hasClassName('ezmapDraggables')===true)
{this.blnValidElement=true;}
else
{this.blnValidElement=false;}}
if(!this.visible)
{this.setVisible=true;}},onMouseMove:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2191,'{this.setVisible=true;}},onMouseMove:','function(event)',arguments);if(this.activeElement)
{if(this.setVisible)
{this.showLines();this.setVisible=false;}
this.mousePoint=this.mapStatus.getRelativePointFromEvent(event);this.updateLines();}},onDrop:function(elementIDropping,elementDroppedOn,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2195,'this.mousePoint=this.mapStatus.getRelativePointFromEvent(event);this.updateLines();}},onDrop:','function(elementIDropping,elementDroppedOn,event)',arguments);if(blnUseJQuery===true&&$j(document).data('blnOverHighPriorityDroppable')===true)
{return false;}
var _this=this;if(this.blnValidElement===false)
{var returnObject=null;}
else
{var returnObject={};returnObject.activeElement=elementIDropping;returnObject.pointInPixels=this.mapStatus.getRelativePointFromEvent(event);returnObject.pointOnMap=this.mapStatus.getPointOnTopLayer(returnObject.pointInPixels);returnObject.srid=this.mapStatus.getSrid();returnObject.mode='hotspot';}
if(blnUseJQuery===true)
{var elementClassNames=$j(elementIDropping).attr('class');}
else
{var elementClassNames=$(elementIDropping).readAttribute("class");}
var arrElementClassNames=elementClassNames.split(' ');var blnNamed=false;if(blnUseJQuery===true)
{$j.each(arrElementClassNames,function(intKey,element)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2207,'{$j.each(arrElementClassNames,','function(intKey,element)',arguments);if(typeof(_this.namedCallbackFunctions[element])!='undefined')
{blnNamed=true;_this.namedCallbackFunctions[element](returnObject);}});}
else
{$A(arrElementClassNames).each(function(element,key)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2211,'{$A(arrElementClassNames).each(','function(element,key)',arguments);if(typeof(this.namedCallbackFunctions[element])!='undefined')
{blnNamed=true;this.namedCallbackFunctions[element](returnObject);}}.bind(this));}
if(!blnNamed)
{for(var i=0;i<this.callbackFunctions.length;i++)
{this.callbackFunctions[i](returnObject);}}
this.hideLines();},showLines:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2217,'this.hideLines();},showLines:','function()',arguments);if(blnUseJQuery===true)
{if(this.blnValidElement===true)
{$j(this.returnElementReference()).removeClass('invalidDroppableGeocodeWidget');}
else
{$j(document.body).css('cursor','none');$j(this.returnElementReference()).addClass('invalidDroppableGeocodeWidget');}
$j(this.returnElementReference()).show();}
else
{if(this.blnValidElement===true)
{this.droppableDiv.removeClassName('invalidDroppableGeocodeWidget');}
else
{this.droppableDiv.addClassName('invalidDroppableGeocodeWidget');}
this.droppableDiv.show();}
this.visible=true;},hideLines:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2230,'this.visible=true;},hideLines:','function()',arguments);if(blnUseJQuery===true)
{$j(this.returnElementReference()).hide();$j(document.body).css('cursor','auto');}
else
{this.droppableDiv.hide();}
this.activeElement=null;this.visible=false;}});Widgets.prototype.widgets['droppableGeocode']=DroppableGeocodeWidget;var undoWidget=Class.extend(Widget,{skipStatePush:false,buttons:["undo","redo"],initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2235,'this.activeElement=null;this.visible=false;}});Widgets.prototype.widgets[\'droppableGeocode\']=DroppableGeocodeWidget;var undoWidget=Class.extend(Widget,{skipStatePush:false,buttons:["undo","redo"],initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.divs={};this.undoStack=new Array();this.redoStack=new Array();this.current=this.mapStatus.getState();this.createWidgetDiv();Event.observe(window,'resize',this.resizeHorizontalToolbar.bindAsEventListener(this));this.createButtons();this.updateView();},returnDivReference:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2236,'this.parent(widgetsDiv,mapStatus,renderer);this.divs={};this.undoStack=new Array();this.redoStack=new Array();this.current=this.mapStatus.getState();this.createWidgetDiv();Event.observe(window,\'resize\',this.resizeHorizontalToolbar.bindAsEventListener(this));this.createButtons();this.updateView();},returnDivReference:','function()',arguments);return document.getElementById('widgetUndo');},createWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2237,'return document.getElementById(\'widgetUndo\');},createWidgetDiv:','function()',arguments);if(blnUseJQuery===true)
{var objWidget=document.createElement('div');$j(objWidget).attr({'id':'widgetUndo','class':'widgetUndo'});$j('#ezMaps .horizontalToolbarDiv:first').find('.widgetArea:first').append(objWidget);this.widgetDiv=$(objWidget);}
else
{this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"widgetUndo");}
this.resizeHorizontalToolbar();},resizeHorizontalToolbar:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2242,'this.resizeHorizontalToolbar();},resizeHorizontalToolbar:','function()',arguments);if(blnUseJQuery===true)
{var objWidgetDiv=$j('#widgetLayerMenu');var intWidthAvailable=objWidgetDiv.parent().width();var objLayerListButton=$j('#layer_list_button');if(objLayerListButton.length>0)
{if(intWidthAvailable<500)
{objLayerListButton.hide();}
else
{objLayerListButton.show();}
if(intWidthAvailable<590)
{$j(this.returnDivReference()).hide();}
else
{$j(this.returnDivReference()).show();}}}
else
{var intHorizontalToolbarDivWidth=$(this.horizontalToolbarDiv).getWidth();var layerMenuDiv=this.horizontalToolbarDiv.down('.widgetLayerMenu');var menusWidth=0;if(layerMenuDiv!=null)
{menusWidth=layerMenuDiv.getWidth()+70;}
var objLayerListButton=$('layer_list_button');if(objLayerListButton!=null)
{if(intHorizontalToolbarDivWidth<=460)
{if(intHorizontalToolbarDivWidth<menusWidth)
{$('layer_list_button').setStyle({display:'none'});}
else
{$('layer_list_button').setStyle({display:'block'});}}
else
{if(intHorizontalToolbarDivWidth<500)
{$('layer_list_button').setStyle({display:'none'});}
else
{$('layer_list_button').setStyle({display:'block'});}}
if(intHorizontalToolbarDivWidth<590)
{this.widgetDiv.setStyle({display:'none'});}
else
{this.widgetDiv.setStyle({display:'block'});$('layer_list_button').setStyle({display:'block'});}}}},createButtons:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2270,'{this.widgetDiv.setStyle({display:\'block\'});$(\'layer_list_button\').setStyle({display:\'block\'});}}}},createButtons:','function()',arguments);var mouseClick=this.mouseClick.bindAsEventListener(this);this.buttons.each(function(button)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2271,'var mouseClick=this.mouseClick.bindAsEventListener(this);this.buttons.each(','function(button)',arguments);this.divs[button]=Utility.makeDivWithCss(this.widgetDiv,button+"Button");this.divs[button].writeAttribute({title:button.capitalize()});Event.observe(this.divs[button],"click",mouseClick);}.bind(this));},mouseClick:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2272,'this.divs[button]=Utility.makeDivWithCss(this.widgetDiv,button+"Button");this.divs[button].writeAttribute({title:button.capitalize()});Event.observe(this.divs[button],"click",mouseClick);}.bind(this));},mouseClick:','function(event)',arguments);var e=Event.element(event);if(e.hasClassName("undoButton"))
{this.undo();}
else
{this.redo();}},loadStack:function(stack)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2276,'{this.redo();}},loadStack:','function(stack)',arguments);this.undoStack=stack;},undo:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2277,'this.undoStack=stack;},undo:','function()',arguments);if(!this.undoStack.last())
{return;}
var state=this.undoStack.pop();this.redoStack.push(this.current);this.skipStatePush=true;this.setState(state);this.current=state;this.updateView();},redo:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2280,'var state=this.undoStack.pop();this.redoStack.push(this.current);this.skipStatePush=true;this.setState(state);this.current=state;this.updateView();},redo:','function()',arguments);if(!this.redoStack.last())
return;var state=this.redoStack.pop();this.undoStack.push(this.current);this.skipStatePush=true;this.setState(state);this.current=state;this.updateView();},updateView:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2282,'return;var state=this.redoStack.pop();this.undoStack.push(this.current);this.skipStatePush=true;this.setState(state);this.current=state;this.updateView();},updateView:','function()',arguments);if(this.redoStack.size()<1)
{this.divs.redo.addClassName('redoButtonNone');}
else
{this.divs.redo.removeClassName('redoButtonNone');}
if(this.undoStack.size()<1)
{this.divs.undo.addClassName('undoButtonNone');}
else
{this.divs.undo.removeClassName('undoButtonNone');}},setState:function(state)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2290,'{this.divs.undo.removeClassName(\'undoButtonNone\');}},setState:','function(state)',arguments);this.mapStatus.setState(state);},pushState:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2291,'this.mapStatus.setState(state);},pushState:','function()',arguments);var state=this.mapStatus.getState();this.undoStack.push(this.current);this.current=state;},updateState:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2292,'var state=this.mapStatus.getState();this.undoStack.push(this.current);this.current=state;},updateState:','function()',arguments);if(this.skipStatePush)
{this.skipStatePush=false;return;}
this.redoStack=new Array();this.pushState();},refresh:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2295,'this.redoStack=new Array();this.pushState();},refresh:','function()',arguments);this.updateState();this.updateView();},reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2296,'this.updateState();this.updateView();},reposition:','function()',arguments);this.updateState();this.updateView();}});Widgets.prototype.widgets["undo"]=undoWidget;var ProgressBarWidget=Class.extend(Widget,{progressBarDiv:null,progress:null,mouseState:0,mouseGive:2,goundScale:0,footToMeter:3.2808399,scaleWidth:70,statusText:"",blnUpdateStatusText:true,blnLoading:false,bufferPoints:null,initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2297,'this.updateState();this.updateView();}});Widgets.prototype.widgets["undo"]=undoWidget;var ProgressBarWidget=Class.extend(Widget,{progressBarDiv:null,progress:null,mouseState:0,mouseGive:2,goundScale:0,footToMeter:3.2808399,scaleWidth:70,statusText:"",blnUpdateStatusText:true,blnLoading:false,bufferPoints:null,initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.makeProgressBar();this.makeStatusBar();this.makeScaleBar();this.makeNorthArrow();},makeProgressBar:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2298,'this.parent(widgetsDiv,mapStatus);this.makeProgressBar();this.makeStatusBar();this.makeScaleBar();this.makeNorthArrow();},makeProgressBar:','function()',arguments);this.progressBarDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetProgressBar");},makeStatusBar:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2299,'this.progressBarDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetProgressBar");},makeStatusBar:','function()',arguments);this.statusDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetStatus");Utility.makeDivWithCss(this.statusDiv,"background");this.statusTextDiv=Utility.makeDivWithCss(this.statusDiv,"text");this.statusTextDivWorld=Utility.makeDivWithCss(this.statusDiv,"text");this.statusTextDivUK=Utility.makeDivWithCss(this.statusDiv,"text");this.statusTextDivIreland=Utility.makeDivWithCss(this.statusDiv,"text");this.arrCoordinateSystemModes=$A([{strName:'Auto',objElement:this.statusTextDiv},{strName:'World',objElement:this.statusTextDivWorld},{strName:'UK',objElement:this.statusTextDivUK},{strName:'Ireland',objElement:this.statusTextDivIreland}]);this.setCoordinateSystemDisplay(0);this.strSelectedCoordinateDisplay='Auto';this.strCurrentAutomaticCoordinateDisplay=null;this.statusTextCycleLink=Utility.makeDivWithCss(this.statusDiv,"cycleStatusText");var strHTML='<a id="cycleStatusTextLink" href="#" />';this.statusTextCycleLink.innerHTML=strHTML;Event.observe($('cycleStatusTextLink'),"click",this.cycleCoordinateSystemDisplay.bind(this));},makeScaleBar:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2300,'this.statusDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetStatus");Utility.makeDivWithCss(this.statusDiv,"background");this.statusTextDiv=Utility.makeDivWithCss(this.statusDiv,"text");this.statusTextDivWorld=Utility.makeDivWithCss(this.statusDiv,"text");this.statusTextDivUK=Utility.makeDivWithCss(this.statusDiv,"text");this.statusTextDivIreland=Utility.makeDivWithCss(this.statusDiv,"text");this.arrCoordinateSystemModes=$A([{strName:\'Auto\',objElement:this.statusTextDiv},{strName:\'World\',objElement:this.statusTextDivWorld},{strName:\'UK\',objElement:this.statusTextDivUK},{strName:\'Ireland\',objElement:this.statusTextDivIreland}]);this.setCoordinateSystemDisplay(0);this.strSelectedCoordinateDisplay=\'Auto\';this.strCurrentAutomaticCoordinateDisplay=null;this.statusTextCycleLink=Utility.makeDivWithCss(this.statusDiv,"cycleStatusText");var strHTML=\'<a id="cycleStatusTextLink" href="#" />\';this.statusTextCycleLink.innerHTML=strHTML;Event.observe($(\'cycleStatusTextLink\'),"click",this.cycleCoordinateSystemDisplay.bind(this));},makeScaleBar:','function()',arguments);this.scaleBarDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetScaleBar");this.scaleBarMeterDiv=Utility.makeDivWithCss(this.scaleBarDiv,"meter");this.scaleBarFootDiv=Utility.makeDivWithCss(this.scaleBarDiv,"foot");this.updateScale();},makeNorthArrow:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2301,'this.scaleBarDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetScaleBar");this.scaleBarMeterDiv=Utility.makeDivWithCss(this.scaleBarDiv,"meter");this.scaleBarFootDiv=Utility.makeDivWithCss(this.scaleBarDiv,"foot");this.updateScale();},makeNorthArrow:','function()',arguments);this.northArrowrDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetNorthArrow");},setCoordinateSystemDisplay:function(intCurrentlyVisibleCoordinateSystem)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2302,'this.northArrowrDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetNorthArrow");},setCoordinateSystemDisplay:','function(intCurrentlyVisibleCoordinateSystem)',arguments);this.intCurrentlyVisibleCoordinateSystem=intCurrentlyVisibleCoordinateSystem;this.arrCoordinateSystemModes.each(function(objMode,intKey)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2303,'this.intCurrentlyVisibleCoordinateSystem=intCurrentlyVisibleCoordinateSystem;this.arrCoordinateSystemModes.each(','function(objMode,intKey)',arguments);$(objMode.objElement).setStyle({display:'none'});}.bind(this));$(this.arrCoordinateSystemModes[this.intCurrentlyVisibleCoordinateSystem].objElement).setStyle({display:''});this.strSelectedCoordinateDisplay=this.arrCoordinateSystemModes[this.intCurrentlyVisibleCoordinateSystem].strName;},cycleCoordinateSystemDisplay:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2304,'$(objMode.objElement).setStyle({display:\'none\'});}.bind(this));$(this.arrCoordinateSystemModes[this.intCurrentlyVisibleCoordinateSystem].objElement).setStyle({display:\'\'});this.strSelectedCoordinateDisplay=this.arrCoordinateSystemModes[this.intCurrentlyVisibleCoordinateSystem].strName;},cycleCoordinateSystemDisplay:','function()',arguments);var intNewVisibleCoordinateSystem=this.intCurrentlyVisibleCoordinateSystem+1;if(intNewVisibleCoordinateSystem>(this.arrCoordinateSystemModes.length-1))
{intNewVisibleCoordinateSystem=0;}
this.setCoordinateSystemDisplay(intNewVisibleCoordinateSystem);},getCoordinateSystemMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2307,'this.setCoordinateSystemDisplay(intNewVisibleCoordinateSystem);},getCoordinateSystemMode:','function()',arguments);if(this.strSelectedCoordinateDisplay=='Auto')
{if(this.strCurrentAutomaticCoordinateDisplay==null)
{var strCoordinateSystemMode='World';}
else
{var strCoordinateSystemMode=this.strCurrentAutomaticCoordinateDisplay;}}
else
{var strCoordinateSystemMode=this.strSelectedCoordinateDisplay;}
return strCoordinateSystemMode;},updateStatusText:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2315,'return strCoordinateSystemMode;},updateStatusText:','function()',arguments);if(!this.bufferPoints)
{return;}
var pointOnMap=this.mapStatus.getPointOnTopLayer(this.bufferPoints.relativePoint);if(isNaN(pointOnMap.x)||isNaN(pointOnMap.y))
{return;}
var units=pointOnMap.getUnits();var unit=units[2];var unitName=units[3];var breakStr=" <span> | | </span> ";if(this.strSelectedCoordinateDisplay=='Auto')
{this.strCurrentAutomaticCoordinateDisplay=unitName;}
if(unitName=='Ireland')
{var xNorm=this.normaliseNumber(pointOnMap.x,unit,false);var yNorm=this.normaliseNumber(pointOnMap.y,unit,false);}
else
{var xNorm=this.normaliseNumber(pointOnMap.x,unit);var yNorm=this.normaliseNumber(pointOnMap.y,unit);}
this.mouseState++;var str=units[3]+breakStr;switch(units[0])
{case'Latitude':str+=units[0]+": "+yNorm.n+yNorm.unit+breakStr;str+=units[1]+": "+xNorm.n+xNorm.unit;break;case'Eastings':str+=units[0]+": "+xNorm.n+xNorm.unit+breakStr;str+=units[1]+": "+yNorm.n+yNorm.unit;break;}
if(unitName=='UK')
{var p=new Proj("EPSG:27700");var result=p.Inverse([pointOnMap.x,pointOnMap.y]);var lat=result[0];var lon=result[1];var OSGBGridRef=LatLongToOSGrid({lat:lon,lon:lat});if(OSGBGridRef!="")
{str+=breakStr+'OSGB grid ref: '+OSGBGridRef;}}
if(this.distance)
{str+=breakStr+"Distance: "+this.distance.n+this.distance.unit;}
if(this.statusText!=str)
{this.statusText=str;this.statusTextDiv.innerHTML=str;}
this.updateStatusTextWorld();this.updateStatusTextUK();this.updateStatusTextIreland();this.bufferPoints=null;},updateStatusTextWorld:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2335,'this.updateStatusTextWorld();this.updateStatusTextUK();this.updateStatusTextIreland();this.bufferPoints=null;},updateStatusTextWorld:','function()',arguments);var pointOnMap=this.mapStatus.getPointOnTopLayer(this.bufferPoints.relativePoint);var units=pointOnMap.getUnits();var unit=units[2];var unitName=units[3];var breakStr=" <span> | | </span> ";var str='World'+breakStr;switch(unitName)
{case'World':var xNorm=this.normaliseNumber(pointOnMap.x,unit);var yNorm=this.normaliseNumber(pointOnMap.y,unit);str+=units[0]+": "+yNorm.n+yNorm.unit+breakStr;str+=units[1]+": "+xNorm.n+xNorm.unit;break;case'UK':var p=new Proj("EPSG:27700");var result=p.Inverse([pointOnMap.x,pointOnMap.y]);var x=result[0];var y=result[1];var xNorm=this.normaliseNumber(x,'&#176;');var yNorm=this.normaliseNumber(y,'&#176;');str+="Latitude: "+yNorm.n+yNorm.unit+breakStr;str+="Longitude: "+xNorm.n+xNorm.unit;break;case'Ireland':var p=new Proj("EPSG:29900");var result=p.Inverse([pointOnMap.x,pointOnMap.y]);var x=result[0];var y=result[1];var xNorm=this.normaliseNumber(x,'&#176;');var yNorm=this.normaliseNumber(y,'&#176;');str+="Latitude: "+yNorm.n+yNorm.unit+breakStr;str+="Longitude: "+xNorm.n+xNorm.unit;break;}
if(this.distance)
{str+=breakStr+"Distance: "+this.distance.n+this.distance.unit;}
this.statusTextDivWorld.innerHTML=str;},updateStatusTextUK:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2340,'this.statusTextDivWorld.innerHTML=str;},updateStatusTextUK:','function()',arguments);var pointOnMap=this.mapStatus.getPointOnTopLayer(this.bufferPoints.relativePoint);var units=pointOnMap.getUnits();var unit=units[2];var unitName=units[3];var breakStr=" <span> | | </span> ";var str='UK'+breakStr;switch(unitName)
{case'World':var p=new Proj("EPSG:27700");var result=p.Forward([pointOnMap.x,pointOnMap.y]);var x=result[0];var y=result[1];var xNorm=this.normaliseNumber(x,'m');var yNorm=this.normaliseNumber(y,'m');str+="Easting: "+xNorm.n+xNorm.unit+breakStr;str+="Northing: "+yNorm.n+yNorm.unit;var OSGBGridRef=LatLongToOSGrid({lat:pointOnMap.y,lon:pointOnMap.x});break;case'UK':var xNorm=this.normaliseNumber(pointOnMap.x,unit);var yNorm=this.normaliseNumber(pointOnMap.y,unit);str+=units[0]+": "+xNorm.n+xNorm.unit+breakStr;str+=units[1]+": "+yNorm.n+yNorm.unit;var p=new Proj("EPSG:27700");var result=p.Inverse([pointOnMap.x,pointOnMap.y]);var lat=result[0];var lon=result[1];var OSGBGridRef=LatLongToOSGrid({lat:lon,lon:lat});break;case'Ireland':var p=new Proj("EPSG:29900");var result=p.Inverse([pointOnMap.x,pointOnMap.y]);var lat=result[0];var lon=result[1];var p=new Proj("EPSG:27700");var result=p.Forward([lat,lon]);var x=result[0];var y=result[1];var xNorm=this.normaliseNumber(x,'m');var yNorm=this.normaliseNumber(y,'m');str+="Easting: "+xNorm.n+xNorm.unit+breakStr;str+="Northing: "+yNorm.n+yNorm.unit;var OSGBGridRef=LatLongToOSGrid({lat:lat,lon:lon});break;}
if(OSGBGridRef!="")
{str+=breakStr+'OSGB grid ref: '+OSGBGridRef;}
if(this.distance)
{str+=breakStr+"Distance: "+this.distance.n+this.distance.unit;}
this.statusTextDivUK.innerHTML=str;},updateStatusTextIreland:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2347,'this.statusTextDivUK.innerHTML=str;},updateStatusTextIreland:','function()',arguments);var pointOnMap=this.mapStatus.getPointOnTopLayer(this.bufferPoints.relativePoint);var units=pointOnMap.getUnits();var unit=units[2];var unitName=units[3];var breakStr=" <span> | | </span> ";var str='Ireland'+breakStr;switch(unitName)
{case'World':var p=new Proj("EPSG:29900");var result=p.Forward([pointOnMap.x,pointOnMap.y]);var x=result[0];var y=result[1];var xNorm=this.normaliseNumber(x,'m',false);var yNorm=this.normaliseNumber(y,'m',false);str+="Easting: "+xNorm.n+xNorm.unit+breakStr;str+="Northing: "+yNorm.n+yNorm.unit;break;case'UK':var p=new Proj("EPSG:27700");var result=p.Inverse([pointOnMap.x,pointOnMap.y]);var lat=result[0];var lon=result[1];var p=new Proj("EPSG:29900");var result=p.Forward([lat,lon]);var x=result[0];var y=result[1];var xNorm=this.normaliseNumber(x,'m',false);var yNorm=this.normaliseNumber(y,'m',false);str+="Easting: "+xNorm.n+xNorm.unit+breakStr;str+="Northing: "+yNorm.n+yNorm.unit;break;case'Ireland':var xNorm=this.normaliseNumber(pointOnMap.x,unit,false);var yNorm=this.normaliseNumber(pointOnMap.y,unit,false);str+=units[0]+": "+xNorm.n+xNorm.unit+breakStr;str+=units[1]+": "+yNorm.n+yNorm.unit;break;}
if(this.distance)
{str+=breakStr+"Distance: "+this.distance.n+this.distance.unit;}
this.statusTextDivIreland.innerHTML=str;},updateScale:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2352,'this.statusTextDivIreland.innerHTML=str;},updateScale:','function()',arguments);this.pixelPerMeter=this.mapStatus.getGroundScale();this.pixelPerFoor=this.pixelPerMeter/this.footToMeter;if(isNaN(this.pixelPerMeter))
return;var meters=Math.ceil(1/this.pixelPerMeter*this.scaleWidth);var feet=Math.ceil(1/this.pixelPerFoor*this.scaleWidth);if(meters>1000)
{meters=Math.round(meters/1000)*1000;}
if(feet>5280)
{feet=Math.round(feet/5280)*5280;}
var meterWidth=meters*this.pixelPerMeter;var feetWidth=feet*this.pixelPerFoor;this.scaleBarMeterDiv.style.width=meterWidth-1+"px";this.scaleBarFootDiv.style.width=feetWidth-1+"px";var meterNorm=this.normaliseNumber(meters,"m");this.scaleBarMeterDiv.update(meterNorm.n+meterNorm.unit);var feetNorm=this.normaliseNumber(feet,"ft");this.scaleBarFootDiv.update(feetNorm.n+feetNorm.unit);},normaliseNumber:function(number,unit,blnAutoConvertUnits)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2358,'var meterWidth=meters*this.pixelPerMeter;var feetWidth=feet*this.pixelPerFoor;this.scaleBarMeterDiv.style.width=meterWidth-1+"px";this.scaleBarFootDiv.style.width=feetWidth-1+"px";var meterNorm=this.normaliseNumber(meters,"m");this.scaleBarMeterDiv.update(meterNorm.n+meterNorm.unit);var feetNorm=this.normaliseNumber(feet,"ft");this.scaleBarFootDiv.update(feetNorm.n+feetNorm.unit);},normaliseNumber:','function(number,unit,blnAutoConvertUnits)',arguments);blnAutoConvertUnits=(blnAutoConvertUnits===false)?false:true;if(unit=="m"&&((number>1000)||(number<-1000))&&blnAutoConvertUnits===true)
{unit="km";number=(number/1000).toFixed(2);}
else if(unit=="ft"&&((number>5280)||(number<-5280))&&blnAutoConvertUnits===true)
{unit="Miles";number=(number/5280).toFixed(2);}
else
{number=(number*1).toFixed(1);}
if(!(number%1))
{number=(number*1).toFixed(0)}
return{n:number,unit:unit}},mousemove:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2367,'return{n:number,unit:unit}},mousemove:','function(event,point,relativePoint)',arguments);this.bufferPoints={event:event,point:point,relativePoint:relativePoint};this.blnUpdateStatusText=true;},click:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2368,'this.bufferPoints={event:event,point:point,relativePoint:relativePoint};this.blnUpdateStatusText=true;},click:','function(event,point,relativePoint)',arguments);if(this.mouseState<this.mouseGive)
{var pointOnMap=this.mapStatus.getPointOnTopLayer(relativePoint);if(this.clickBuffer)
{this.distance=this.normaliseNumber(this.clickBuffer.distance(pointOnMap),"m");}
this.clickBuffer=pointOnMap;}
this.mousemove(event,point,relativePoint);},mousedown:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2373,'this.mousemove(event,point,relativePoint);},mousedown:','function()',arguments);this.mouseState=0;},updateProgressBar:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2374,'this.mouseState=0;},updateProgressBar:','function()',arguments);var loadedTiles=this.mapStatus.getTileProgress();if(this.blnLoading===true&&parseInt(loadedTiles.loading)==0)
{this.blnLoading=false;this.progressBarDiv.hide();if(this.mapStatus.mapOptions.postTileUpdateFunction)
{this.mapStatus.mapOptions.postTileUpdateFunction();}}
else if(parseInt(loadedTiles.loading)>0)
{this.blnLoading=true;var percent=(loadedTiles.loaded/(loadedTiles.loading+loadedTiles.loaded))*100;this.progressBarDiv.style.width=(100-percent)+'%';this.progressBarDiv.show();}},reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2379,'{this.blnLoading=true;var percent=(loadedTiles.loaded/(loadedTiles.loading+loadedTiles.loaded))*100;this.progressBarDiv.style.width=(100-percent)+\'%\';this.progressBarDiv.show();}},reposition:','function()',arguments);this.update();},refresh:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2380,'this.update();},refresh:','function()',arguments);this.update();},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2381,'this.update();},update:','function()',arguments);this.updateProgressBar();if(this.blnUpdateStatusText===true)
{this.updateScale();this.updateStatusText();}}});Widgets.prototype.widgets["progressBarWidget"]=ProgressBarWidget;var EditShapeWidget=Class.extend(Widget,{toolManager:null,scribbleWidgetDiv:null,zoomLevel:null,tools:null,cursorImage:null,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2383,'{this.updateScale();this.updateStatusText();}}});Widgets.prototype.widgets["progressBarWidget"]=ProgressBarWidget;var EditShapeWidget=Class.extend(Widget,{toolManager:null,scribbleWidgetDiv:null,zoomLevel:null,tools:null,cursorImage:null,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.createToolManager();this.tools=$H();},createscribbleWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2384,'this.parent(widgetsDiv,mapStatus,renderer);this.createToolManager();this.tools=$H();},createscribbleWidgetDiv:','function()',arguments);this.scribbleWidgetDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetScribble");this.widgetDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetScribble");},editPoints:function(toolType,points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2385,'this.scribbleWidgetDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"widgetScribble");this.widgetDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetScribble");},editPoints:','function(toolType,points)',arguments);var toolId=this.newTool(toolType);this.tools[toolId].loadPoints(points);this.tools[toolId].setEditMode();return toolId;},getShapePoints:function(toolId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2386,'var toolId=this.newTool(toolType);this.tools[toolId].loadPoints(points);this.tools[toolId].setEditMode();return toolId;},getShapePoints:','function(toolId)',arguments);if(this.tools[toolId])
{return this.tools[toolId].getPoints();}
else
{return false;}},removeShape:function(toolId)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2390,'{return false;}},removeShape:','function(toolId)',arguments);if(this.tools[toolId])
{return this.tools[toolId].nihilate();}},createToolManager:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2392,'{return this.tools[toolId].nihilate();}},createToolManager:','function()',arguments);this.toolManager=new Graphic.EzmapsScribbleToolManager(this.renderer,this.mapStatus);},saveShape:function(geom,mode,id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2393,'this.toolManager=new Graphic.EzmapsScribbleToolManager(this.renderer,this.mapStatus);},saveShape:','function(geom,mode,id)',arguments);var returnObject={};returnObject.srid=this.mapStatus.getSrid();returnObject.mode=mode;returnObject.pointsOnMap=geom;returnObject.id=id;for(var i=0;i<this.callbackFunctions.length;i++)
{this.callbackFunctions[i](returnObject);}},newTool:function(toolType)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2395,'{this.callbackFunctions[i](returnObject);}},newTool:','function(toolType)',arguments);var toolId=Utility.getRandomId(100,5);this.tools[toolId]=new Graphic.EzmapsScribbleTool(this.mapStatus,toolType,this.saveShape.bind(this),toolId);this.toolManager.setTool(this.tools[toolId]);this.mapStatus.eventHandler.setCursor("url("+this.cursorImage.src+"), default");return toolId;},reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2396,'var toolId=Utility.getRandomId(100,5);this.tools[toolId]=new Graphic.EzmapsScribbleTool(this.mapStatus,toolType,this.saveShape.bind(this),toolId);this.toolManager.setTool(this.tools[toolId]);this.mapStatus.eventHandler.setCursor("url("+this.cursorImage.src+"), default");return toolId;},reposition:','function()',arguments);if(this.toolManager)
this.toolManager.reposition();},refresh:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2398,'this.toolManager.reposition();},refresh:','function()',arguments);if(this.toolManager)
this.toolManager.refresh();}});Widgets.prototype.widgets["editShape"]=EditShapeWidget;var mapClickWidget=Class.extend(Widget,{querySize:10,wtlPoint:null,wbrPoint:null,layerCacheId:0,request:0,mouseAction:null,timeBetweenClicks:0.3,centerPoints:null,pointsBeenClicked:null,centerMap:true,zoomBox:null,zoomBoxStart:null,minZoomSize:10,NONE:0,RCLICK:1,LCLICK:2,LDRAG:3,RDRAG:4,blnZoomBoxActive:false,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2400,'this.toolManager.refresh();}});Widgets.prototype.widgets["editShape"]=EditShapeWidget;var mapClickWidget=Class.extend(Widget,{querySize:10,wtlPoint:null,wbrPoint:null,layerCacheId:0,request:0,mouseAction:null,timeBetweenClicks:0.3,centerPoints:null,pointsBeenClicked:null,centerMap:true,zoomBox:null,zoomBoxStart:null,minZoomSize:10,NONE:0,RCLICK:1,LCLICK:2,LDRAG:3,RDRAG:4,blnZoomBoxActive:false,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.makeQueryDiv();this.makeZoomBox();Event.observe(document,"mouseup",this.mouseup.bindAsEventListener(this));Event.observe(document,"keypress",this.mouseup.bindAsEventListener(this));this.pointsBeenClicked={point:null,id:null};this.startTime=new Date();},makeQueryDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2401,'this.parent(widgetsDiv,mapStatus,renderer);this.makeQueryDiv();this.makeZoomBox();Event.observe(document,"mouseup",this.mouseup.bindAsEventListener(this));Event.observe(document,"keypress",this.mouseup.bindAsEventListener(this));this.pointsBeenClicked={point:null,id:null};this.startTime=new Date();},makeQueryDiv:','function()',arguments);this.widgetDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"queryWidget");this.crossHair=Utility.makeDivWithCss(this.widgetDiv,"crossHair");},makeZoomBox:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2402,'this.widgetDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"queryWidget");this.crossHair=Utility.makeDivWithCss(this.widgetDiv,"crossHair");},makeZoomBox:','function()',arguments);this.zoomBoxDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"zoomBoxWidget");},getQueryObject:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2403,'this.zoomBoxDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.staticDiv,"zoomBoxWidget");},getQueryObject:','function()',arguments);var queryObject=$H();queryObject["requestType"]="query";queryObject["sessionId"]=this.mapStatus.getSessionId();queryObject["intSrid"]=this.mapStatus.getSrid();queryObject["nodeLayers"]=this.mapStatus.getMapServerNodes().toJSON();queryObject["intScale"]=this.mapStatus.getZoomLevel();queryObject["refA"]=Object.toJSON(this.wtlPoint);queryObject["refB"]=Object.toJSON(this.wbrPoint);return queryObject;},getlayerCacheId:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2404,'var queryObject=$H();queryObject["requestType"]="query";queryObject["sessionId"]=this.mapStatus.getSessionId();queryObject["intSrid"]=this.mapStatus.getSrid();queryObject["nodeLayers"]=this.mapStatus.getMapServerNodes().toJSON();queryObject["intScale"]=this.mapStatus.getZoomLevel();queryObject["refA"]=Object.toJSON(this.wtlPoint);queryObject["refB"]=Object.toJSON(this.wbrPoint);return queryObject;},getlayerCacheId:','function()',arguments);if(this.layerCacheMode)
{return"layerCacheOff"+Math.round(Math.random()*1000);}
else
{return"layerCacheOn"+this.layerCacheId;}},result:function(obj,id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2408,'{return"layerCacheOn"+this.layerCacheId;}},result:','function(obj,id)',arguments);if(obj.length>0)
{var point=this.pointsBeenClicked.point;for(var i=0;i<this.callbackFunctions.length;i++)
{this.callbackFunctions[i](obj,point);}}},stopQuery:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2411,'{this.callbackFunctions[i](obj,point);}}},stopQuery:','function()',arguments);if(this.pointsBeenClicked.id)
{JSONRequest.removeRequest(this.pointsBeenClicked.id);}
if(this.queryLayersPe)
this.queryLayersPe.stop();},queryLayers:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2415,'this.queryLayersPe.stop();},queryLayers:','function()',arguments);this.stopQuery();var queryObject=this.getQueryObject();var url=this.mapStatus.getLayerServerUrl();var id=JSONRequest.get(url,this.result,{parameters:queryObject,onTimeout:this.timeOut,boundTo:this});this.pointsBeenClicked.point=this.wPoint;this.pointsBeenClicked.id=id;},mousemove:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2416,'this.stopQuery();var queryObject=this.getQueryObject();var url=this.mapStatus.getLayerServerUrl();var id=JSONRequest.get(url,this.result,{parameters:queryObject,onTimeout:this.timeOut,boundTo:this});this.pointsBeenClicked.point=this.wPoint;this.pointsBeenClicked.id=id;},mousemove:','function(event,point,relativePoint)',arguments);if(this.mapStatus.isLocked())
{this.mouseAction=this.NONE;}
if(this.mouseAction==this.RDRAG)
{var maxX=Math.max(point.x,this.zoomBoxStart.x);var maxY=Math.max(point.y,this.zoomBoxStart.y);var minX=Math.min(point.x,this.zoomBoxStart.x);var minY=Math.min(point.y,this.zoomBoxStart.y);this.zoomBoxDiv.setStyle
({height:maxY-minY+'px',width:maxX-minX+'px',left:minX+"px",bottom:minY+"px",display:"block"});return true;}
if(this.mouseAction==this.RCLICK)
{this.zoomBoxStart=point;this.mouseAction=this.RDRAG;this.zoomrRelativePoint=relativePoint;return true;}
else if(this.mouseAction==this.LCLICK)
{this.mouseAction=this.LDRAG;}},mousedown:function(e)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2425,'{this.mouseAction=this.LDRAG;}},mousedown:','function(e)',arguments);this.stopEasingMap();this.stopRecenter();this.offset=this.mapStatus.getLayerOffset();if(Event.isLeftClick(e))
{this.mouseAction=this.LCLICK;}
else
{this.mouseAction=this.RCLICK;this.blnZoomBoxActive=true;return true;}},setWorldPoints:function(relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2429,'{this.mouseAction=this.RCLICK;this.blnZoomBoxActive=true;return true;}},setWorldPoints:','function(relativePoint)',arguments);var tlPoint=new Point();var brPoint=new Point();tlPoint.x=relativePoint.x-this.querySize;tlPoint.y=relativePoint.y+this.querySize;brPoint.x=relativePoint.x+this.querySize;brPoint.y=relativePoint.y-this.querySize;this.wPoint=this.mapStatus.getPointOnTopLayer(relativePoint);this.wtlPoint=this.mapStatus.getPointOnTopLayer(tlPoint);this.wbrPoint=this.mapStatus.getPointOnTopLayer(brPoint);},mouseup:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2430,'var tlPoint=new Point();var brPoint=new Point();tlPoint.x=relativePoint.x-this.querySize;tlPoint.y=relativePoint.y+this.querySize;brPoint.x=relativePoint.x+this.querySize;brPoint.y=relativePoint.y-this.querySize;this.wPoint=this.mapStatus.getPointOnTopLayer(relativePoint);this.wtlPoint=this.mapStatus.getPointOnTopLayer(tlPoint);this.wbrPoint=this.mapStatus.getPointOnTopLayer(brPoint);},mouseup:','function(event,point,relativePoint)',arguments);this.zoomBoxDiv.setStyle
({display:"none"});this.blnZoomBoxActive=false;if(point&&relativePoint&&!Event.isLeftClick(event)&&this.mouseAction==this.RDRAG)
{var sizeX=Math.abs(point.x-this.zoomBoxStart.x);var sizeY=Math.abs(point.y-this.zoomBoxStart.y);if(sizeX>this.minZoomSize&&sizeY>this.minZoomSize)
{var wpEnd=this.mapStatus.getPointOnTopLayer(relativePoint);var wpStart=this.mapStatus.getPointOnTopLayer(this.zoomrRelativePoint);this.mapStatus.jumpToPoints([wpEnd,wpStart],false,true);}
this.mouseAction=this.NONE;}
else if(point&&relativePoint&&Event.isLeftClick(event)&&this.mouseAction==this.LCLICK)
{this.stopQuery();}
else if(relativePoint&&this.mouseAction==this.RCLICK)
{this.setWorldPoints(relativePoint);this.recenter();this.mouseAction=this.NONE;}},zoomMap:function(point,direction)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2439,'{this.setWorldPoints(relativePoint);this.recenter();this.mouseAction=this.NONE;}},zoomMap:','function(point,direction)',arguments);this.mapStatus.incrementZoomLevelToPointOnScreen(point,direction);},stopEasingMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2440,'this.mapStatus.incrementZoomLevelToPointOnScreen(point,direction);},stopEasingMap:','function()',arguments);this.mapStatus.clearEasing();},startEasingMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2441,'this.mapStatus.clearEasing();},startEasingMap:','function()',arguments);this.mapStatus.easeToPoint(this.wPoint);this.stopRecenter();},recenter:function(pe,a)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2442,'this.mapStatus.easeToPoint(this.wPoint);this.stopRecenter();},recenter:','function(pe,a)',arguments);if(this.centerMap)
{this.stopRecenter();this.easingMapPe=new PeriodicalExecuter(this.startEasingMap.bind(this),this.timeBetweenClicks);}},stopRecenter:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2444,'{this.stopRecenter();this.easingMapPe=new PeriodicalExecuter(this.startEasingMap.bind(this),this.timeBetweenClicks);}},stopRecenter:','function()',arguments);if(this.easingMapPe)
{this.easingMapPe.stop();this.easingMapPe=null;}},contextmenu:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2446,'{this.easingMapPe.stop();this.easingMapPe=null;}},contextmenu:','function(event,point,relativePoint)',arguments);Event.stop(event);if(this.startTime)
{var elapsedTime=((new Date()).getTime()-this.startTime.getTime())/1000;if(this.timeBetweenClicks>elapsedTime)
{this.zoomMap(point,1);this.stopEasingMap();return false;}}
this.startTime=new Date();},dblclick:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2450,'this.startTime=new Date();},dblclick:','function(event,point,relativePoint)',arguments);this.stopQuery();this.zoomMap(point,-1);},click:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2451,'this.stopQuery();this.zoomMap(point,-1);},click:','function(event,point,relativePoint)',arguments);var offset=this.mapStatus.getLayerOffset();if(relativePoint&&this.mouseAction==this.LCLICK&&(this.offset.x==offset.x&&this.offset.y==offset.y))
{this.stopQuery();this.queryLayersPe=new PeriodicalExecuter(this.queryLayers.bind(this),this.timeBetweenClicks);this.setWorldPoints(relativePoint);}},getBlnZoomBoxActive:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2453,'{this.stopQuery();this.queryLayersPe=new PeriodicalExecuter(this.queryLayers.bind(this),this.timeBetweenClicks);this.setWorldPoints(relativePoint);}},getBlnZoomBoxActive:','function()',arguments);return this.blnZoomBoxActive;}});Widgets.prototype.widgets["mapClick"]=mapClickWidget;var focusSquareWidget=Class.extend(Widget,{mouseMode:0,downPoint:null,UP:3,DOWN:1,DRAG:2,RESET:0,recenterT:0.51,frameRate:20,scrollSpeed:4,slide:null,updated:false,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2454,'return this.blnZoomBoxActive;}});Widgets.prototype.widgets["mapClick"]=mapClickWidget;var focusSquareWidget=Class.extend(Widget,{mouseMode:0,downPoint:null,UP:3,DOWN:1,DRAG:2,RESET:0,recenterT:0.51,frameRate:20,scrollSpeed:4,slide:null,updated:false,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.makeZoomBoxes();Event.observe(document,"mouseup",this.mouseUp.bindAsEventListener(this));},makeZoomBoxes:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2455,'this.parent(widgetsDiv,mapStatus,renderer);this.makeZoomBoxes();Event.observe(document,"mouseup",this.mouseUp.bindAsEventListener(this));},makeZoomBoxes:','function()',arguments);this.zoomBoxRelativeDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.relativeDiv,"focusSquareWidget");},mouseUp:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2456,'this.zoomBoxRelativeDiv=Utility.makeDivWithCss(this.widgetsInactiveDiv.relativeDiv,"focusSquareWidget");},mouseUp:','function()',arguments);if(this.mouseMode==this.DOWN)
{var x=(this.maxX-this.minX)/2+this.minX;var y=(this.maxY-this.minY)/2+this.minY;var center=this.mapStatus.getPointOnTopLayer(new Point(x,y));this.mapStatus.jumpToPoint(center);this.callback(center,"recenter");this.mouseMode=this.UP;this.timer=new Date();this.stopPE();}},reset:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2458,'{var x=(this.maxX-this.minX)/2+this.minX;var y=(this.maxY-this.minY)/2+this.minY;var center=this.mapStatus.getPointOnTopLayer(new Point(x,y));this.mapStatus.jumpToPoint(center);this.callback(center,"recenter");this.mouseMode=this.UP;this.timer=new Date();this.stopPE();}},reset:','function()',arguments);if(this.mouseMode==this.UP)
{this.mouseMode=this.RESET;}},callback:function(informationObj,tag)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2460,'{this.mouseMode=this.RESET;}},callback:','function(informationObj,tag)',arguments);for(var i=0;i<this.callbackFunctions.length;i++)
{this.callbackFunctions[i](informationObj,tag);}},mousedown:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2462,'{this.callbackFunctions[i](informationObj,tag);}},mousedown:','function(event,point,relativePoint)',arguments);this.downPoint=point;this.mouseMode=this.DOWN;},stopPE:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2463,'this.downPoint=point;this.mouseMode=this.DOWN;},stopPE:','function()',arguments);if(this.periodicalExecuter)
{this.periodicalExecuter.stop();}},startPE:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2465,'{this.periodicalExecuter.stop();}},startPE:','function()',arguments);this.stopPE();this.periodicalExecuter=new PeriodicalExecuter(this.moveMap.bind(this),1/this.frameRate);},moveMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2466,'this.stopPE();this.periodicalExecuter=new PeriodicalExecuter(this.moveMap.bind(this),1/this.frameRate);},moveMap:','function()',arguments);var moveX=0;var moveY=0;if(this.slide.up<0)
{moveY+=this.scrollSpeed;}
else if(this.slide.down<0)
{moveY-=this.scrollSpeed;;}
if(this.slide.left<0)
{moveX+=this.scrollSpeed;;}
else if(this.slide.right<0)
{moveX-=this.scrollSpeed;}
this.mapStatus.moveLayers(moveX,moveY);this.maxX-=moveX;this.maxY+=moveY;this.minX-=moveX;this.minY+=moveY;this.drawBox();},mousemove:function(event,point,relativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2475,'this.mapStatus.moveLayers(moveX,moveY);this.maxX-=moveX;this.maxY+=moveY;this.minX-=moveX;this.minY+=moveY;this.drawBox();},mousemove:','function(event,point,relativePoint)',arguments);if(this.mouseMode==this.DOWN)
{var difX=this.downPoint.x-point.x;var difY=this.downPoint.y-point.y;var layerOffset=this.mapStatus.getLayerOffset();var screenDim=this.mapStatus.getScreenWidthHeight();this.slide={};this.slide.right=screenDim.width-this.maxX-layerOffset.x;this.slide.left=this.minX+layerOffset.x;this.slide.down=this.minY-layerOffset.y;this.slide.up=screenDim.height-this.maxY+layerOffset.y;var widthdiff=screenDim.width-(this.maxX-this.minX);var heightDiff=screenDim.height-(this.maxY-this.minY);if((widthdiff>0)&&(heightDiff>0)&&!(this.slide.right>0&&this.slide.left>0&&this.slide.down>0&&this.slide.up>0))
{this.startPE();}
else
{this.stopPE();}
this.downPoint=point;this.maxX-=difX;this.maxY-=difY;this.minX-=difX;this.minY-=difY;this.drawBox();}},contextmenu:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2481,'this.downPoint=point;this.maxX-=difX;this.maxY-=difY;this.minX-=difX;this.minY-=difY;this.drawBox();}},contextmenu:','function()',arguments);return true;},setFocus:function(ext,srid)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2482,'return true;},setFocus:','function(ext,srid)',arguments);this.ext=ext;this.srid=srid;this.updated=false;this.updateFocus();},drawBox:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2483,'this.ext=ext;this.srid=srid;this.updated=false;this.updateFocus();},drawBox:','function()',arguments);this.zoomBoxRelativeDiv.setStyle({height:this.maxY-this.minY+'px',width:this.maxX-this.minX+'px',left:this.minX+"px",bottom:this.minY+"px",display:"block"});},updateFocus:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2484,'this.zoomBoxRelativeDiv.setStyle({height:this.maxY-this.minY+\'px\',width:this.maxX-this.minX+\'px\',left:this.minX+"px",bottom:this.minY+"px",display:"block"});},updateFocus:','function()',arguments);var elapsedTime=(new Date()-this.timer)/1000;if(!this.updated&&this.ext&&this.srid&&((this.mouseMode==this.RESET)||((this.mouseMode==this.UP)&&(elapsedTime>this.recenterT))))
{var tlp=this.mapStatus.getScreenPointFromWorld(new Point(this.ext.TLX,this.ext.TLY,this.srid));var brp=this.mapStatus.getScreenPointFromWorld(new Point(this.ext.BRX,this.ext.BRY,this.srid));this.maxX=Math.max(tlp.x,brp.x);this.maxY=Math.max(tlp.y,brp.y);this.minX=Math.min(tlp.x,brp.x);this.minY=Math.min(tlp.y,brp.y);this.drawBox();this.updated=true;}},realTimeUpdate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2486,'{var tlp=this.mapStatus.getScreenPointFromWorld(new Point(this.ext.TLX,this.ext.TLY,this.srid));var brp=this.mapStatus.getScreenPointFromWorld(new Point(this.ext.BRX,this.ext.BRY,this.srid));this.maxX=Math.max(tlp.x,brp.x);this.maxY=Math.max(tlp.y,brp.y);this.minX=Math.min(tlp.x,brp.x);this.minY=Math.min(tlp.y,brp.y);this.drawBox();this.updated=true;}},realTimeUpdate:','function()',arguments);this.updateFocus();}});Widgets.prototype.widgets["focusSquare"]=focusSquareWidget;var PadlockWidget=Class.extend(Widget,{locked:false,initialize:function(widgetsDiv,mapStatus,renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2487,'this.updateFocus();}});Widgets.prototype.widgets["focusSquare"]=focusSquareWidget;var PadlockWidget=Class.extend(Widget,{locked:false,initialize:','function(widgetsDiv,mapStatus,renderer)',arguments);this.parent(widgetsDiv,mapStatus,renderer);this.createWidgetDiv();this.observe();},createWidgetDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2488,'this.parent(widgetsDiv,mapStatus,renderer);this.createWidgetDiv();this.observe();},createWidgetDiv:','function()',arguments);this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"widgetPadlock","widgetPadlock");},observe:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2489,'this.widgetDiv=Utility.makeDivWithCss(this.horizontalToolbarDiv,"widgetPadlock","widgetPadlock");},observe:','function()',arguments);Event.observe(this.widgetDiv,"click",this.toggleLock.bindAsEventListener(this));},toggleLock:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2490,'Event.observe(this.widgetDiv,"click",this.toggleLock.bindAsEventListener(this));},toggleLock:','function()',arguments);this.mapStatus.toggleLock();this.widgetDiv.toggleClassName("widgetPadlockLocked");this.locked=!this.locked;},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2491,'this.mapStatus.toggleLock();this.widgetDiv.toggleClassName("widgetPadlockLocked");this.locked=!this.locked;},update:','function()',arguments);if(this.mapStatus.isLocked()!=this.locked)
{this.toggleLock();}}});Widgets.prototype.widgets["padlock"]=PadlockWidget;var MouseWidget=Class.extend(Widget,{mousePosition:null,mouseAction:null,IDLEMODE:0,MOUSEDOWN:1,PANMODE:2,moveEvent:null,curserOld:null,timeBetweenUpdates:100,initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2493,'{this.toggleLock();}}});Widgets.prototype.widgets["padlock"]=PadlockWidget;var MouseWidget=Class.extend(Widget,{mousePosition:null,mouseAction:null,IDLEMODE:0,MOUSEDOWN:1,PANMODE:2,moveEvent:null,curserOld:null,timeBetweenUpdates:100,initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.mousePosition=new Point();this.mouseAction=0;this.mapStatus=mapStatus;this.makeDraggable();this.timer=new Date();},makeDraggable:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2494,'this.parent(widgetsDiv,mapStatus);this.mousePosition=new Point();this.mouseAction=0;this.mapStatus=mapStatus;this.makeDraggable();this.timer=new Date();},makeDraggable:','function()',arguments);var mouseUpFunction=this.mouseUp.bindAsEventListener(this,this);Event.observe(document,"mouseup",mouseUpFunction);var mouseMoveFunction=this.mouseMove.bindAsEventListener(this,this);Event.observe(document,"mousemove",mouseMoveFunction);},mousedown:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2495,'var mouseUpFunction=this.mouseUp.bindAsEventListener(this,this);Event.observe(document,"mouseup",mouseUpFunction);var mouseMoveFunction=this.mouseMove.bindAsEventListener(this,this);Event.observe(document,"mousemove",mouseMoveFunction);},mousedown:','function(event)',arguments);if(Event.isLeftClick(event))
{this.mouseAction=this.MOUSEDOWN;this.mousePosition=this.mapStatus.getPointFromEvent(event);}
else
{this.mouseAction=this.IDLEMODE;}
Event.stop(event);},mouseUp:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2500,'Event.stop(event);},mouseUp:','function(event)',arguments);if(this.mouseAction==this.IDLEMODE||this.mouseAction==this.PANMODE)
{if(this.curserOld)
{this.mapStatus.eventHandler.setCursor(this.curserOld)
this.curserOld=null;}}
this.mapStatus.setEventsOn();this.mouseAction=this.IDLEMODE;Event.stop(event);},mouseMove:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2505,'this.mapStatus.setEventsOn();this.mouseAction=this.IDLEMODE;Event.stop(event);},mouseMove:','function(event)',arguments);if(this.mapStatus.isLocked())
{this.mouseAction=this.NONE;}
this.moveEvent=Object.clone(event);if(this.mouseAction==this.MOUSEDOWN)
{if(!this.curserOld)
{this.curserOld=this.mapStatus.eventHandler.getCursor()}
this.mapStatus.eventHandler.setCursor("pointer");this.mouseAction=this.PANMODE;this.mapStatus.setEventsOff();Event.stop(event);}
else if(this.mouseAction==this.PANMODE)
{var point=this.mapStatus.getPointFromEvent(event);var moved_x=point.x-this.mousePosition.x;var moved_y=this.mousePosition.y-point.y;this.mousePosition=point;var blnOkToContinueMoving=this.mapStatus.moveLayers(moved_x,moved_y,event);if(!blnOkToContinueMoving)
{this.mouseUp(event);}
Event.stop(event);}},scroll:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2515,'Event.stop(event);}},scroll:','function(event)',arguments);if(typeof(this.mapStatus.mapOptions.blnDisallowZooming)!="undefined"&&this.mapStatus.mapOptions.blnDisallowZooming!=true)
{var delta=0;if(event.wheelDelta)
{delta=event.wheelDelta/120;if(window.opera)delta=-delta;}
else if(event.detail)
{delta=-event.detail/3;}
var point=this.mapStatus.getPointFromEvent(this.moveEvent);this.mapStatus.incrementZoomLevelToPointOnScreen(point,Math.floor(-delta));Event.stop(event);return true}}});Widgets.prototype.widgets["mouse"]=MouseWidget;var CompassWidget=Class.extend(Widget,{compassImage:null,compassMap:null,initialStepSize:30,singleStepSize:70,direction:null,increaseSpeed:1,stepSize:null,mouseAction:null,MOUSEDOWN:true,MOUSEUP:false,buttonDivs:null,buttons:["northWest","north","northEast","west","east","southWest","south","southEast","resetExtents"],titles:["Pan North West","Pan North","Pan North East","Pan west","Pan East","Pan South West","Pan South","Pan South East","Show the whole map"],directions:[{x:1,y:1},{x:0,y:1},{x:-1,y:1},{x:1,y:0},{x:-1,y:0},{x:1,y:-1},{x:0,y:-1},{x:-1,y:-1},"resetExtents"],initialize:function(widgetsDiv,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2521,'var point=this.mapStatus.getPointFromEvent(this.moveEvent);this.mapStatus.incrementZoomLevelToPointOnScreen(point,Math.floor(-delta));Event.stop(event);return true}}});Widgets.prototype.widgets["mouse"]=MouseWidget;var CompassWidget=Class.extend(Widget,{compassImage:null,compassMap:null,initialStepSize:30,singleStepSize:70,direction:null,increaseSpeed:1,stepSize:null,mouseAction:null,MOUSEDOWN:true,MOUSEUP:false,buttonDivs:null,buttons:["northWest","north","northEast","west","east","southWest","south","southEast","resetExtents"],titles:["Pan North West","Pan North","Pan North East","Pan west","Pan East","Pan South West","Pan South","Pan South East","Show the whole map"],directions:[{x:1,y:1},{x:0,y:1},{x:-1,y:1},{x:1,y:0},{x:-1,y:0},{x:1,y:-1},{x:0,y:-1},{x:-1,y:-1},"resetExtents"],initialize:','function(widgetsDiv,mapStatus)',arguments);this.parent(widgetsDiv,mapStatus);this.stepSize=this.initialStepSize;this.mouseAction=false;this.direction={x:0,y:0};this.buttonDivs=new Array();this.createCompassDiv();this.createButtons();this.addImageMap();},createCompassDiv:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2522,'this.parent(widgetsDiv,mapStatus);this.stepSize=this.initialStepSize;this.mouseAction=false;this.direction={x:0,y:0};this.buttonDivs=new Array();this.createCompassDiv();this.createButtons();this.addImageMap();},createCompassDiv:','function()',arguments);this.widgetDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetCompass");},createButtons:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2523,'this.widgetDiv=Utility.makeDivWithCss(this.widgetsDiv,"widgetCompass");},createButtons:','function()',arguments);for(var i=0;i<this.buttons.size();i++)
{this.buttonDivs[i]=Utility.makeDivWithCss(this.widgetDiv,this.buttons[i]);this.buttonDivs[i].writeAttribute({title:this.titles[i]});}},addImageMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2525,'{this.buttonDivs[i]=Utility.makeDivWithCss(this.widgetDiv,this.buttons[i]);this.buttonDivs[i].writeAttribute({title:this.titles[i]});}},addImageMap:','function()',arguments);var mouseUpFunction=this.mouseUp.bindAsEventListener(this);var mouseOutFunction=this.mouseOut.bindAsEventListener(this);for(var i=0;i<this.buttonDivs.size();i++)
{var mouseDownFunction=this.mouseDown.bindAsEventListener(this,this.directions[i]);Event.observe(this.buttonDivs[i],"mousedown",mouseDownFunction);Event.observe(this.buttonDivs[i],"mouseup",mouseUpFunction);Event.observe(this.buttonDivs[i],"mouseout",mouseOutFunction);}},mouseDown:function(event,direction)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2527,'{var mouseDownFunction=this.mouseDown.bindAsEventListener(this,this.directions[i]);Event.observe(this.buttonDivs[i],"mousedown",mouseDownFunction);Event.observe(this.buttonDivs[i],"mouseup",mouseUpFunction);Event.observe(this.buttonDivs[i],"mouseout",mouseOutFunction);}},mouseDown:','function(event,direction)',arguments);if(direction=="resetExtents")
{this.mapStatus.jumpToExtOfActiveLayer();}
else
{this.direction=direction;this.mouseAction=this.MOUSEDOWN;this.moveMap();}},mouseOut:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2531,'{this.direction=direction;this.mouseAction=this.MOUSEDOWN;this.moveMap();}},mouseOut:','function(event)',arguments);this.mouseAction=this.MOUSEUP;this.stepSize=this.initialStepSize;},mouseUp:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2532,'this.mouseAction=this.MOUSEUP;this.stepSize=this.initialStepSize;},mouseUp:','function(event)',arguments);if(this.stepSize<this.singleStepSize&&this.mouseAction==this.MOUSEDOWN)
{var move_x=this.stepSize*this.direction.x;var move_y=this.stepSize*this.direction.y;this.mapStatus.moveLayers(move_x,move_y);}
this.mouseAction=this.MOUSEUP;this.stepSize=this.initialStepSize;},moveMap:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2535,'this.mouseAction=this.MOUSEUP;this.stepSize=this.initialStepSize;},moveMap:','function()',arguments);var move_x=this.stepSize*this.direction.x;var move_y=this.stepSize*this.direction.y;this.mapStatus.moveLayers(move_x,move_y);this.stepSize+=this.increaseSpeed;},update:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2536,'var move_x=this.stepSize*this.direction.x;var move_y=this.stepSize*this.direction.y;this.mapStatus.moveLayers(move_x,move_y);this.stepSize+=this.increaseSpeed;},update:','function()',arguments);if(this.mouseAction)
{this.moveMap();}}});Widgets.prototype.widgets["compass"]=CompassWidget;Graphic.AbstractToolManager=Class.create();Graphic.AbstractToolManager.prototype={renderer:null,element:null,toolsArray:null,offset:null,dimension:null,initialize:function(renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2538,'{this.moveMap();}}});Widgets.prototype.widgets["compass"]=CompassWidget;Graphic.AbstractToolManager=Class.create();Graphic.AbstractToolManager.prototype={renderer:null,element:null,toolsArray:null,offset:null,dimension:null,initialize:','function(renderer)',arguments);this.renderer=renderer;this.element=renderer.element.parentNode;this.toolsArray=new Array();this.offset=Position.cumulativeOffset(this.element);this.dimension=$(this.element).getDimensions();this.setEventMappings();this.addListeners();},nihilate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2539,'this.renderer=renderer;this.element=renderer.element.parentNode;this.toolsArray=new Array();this.offset=Position.cumulativeOffset(this.element);this.dimension=$(this.element).getDimensions();this.setEventMappings();this.addListeners();},nihilate:','function()',arguments);this.toolsArray.each(function(tool){tool.unactivate()});this.toolsArray.clear();this.eventMappings.clear();this.removeListeners();this.destroy();},destroy:function(){},setEventMappings:function(){},addListeners:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2540,'this.toolsArray.each(function(tool){tool.unactivate()});this.toolsArray.clear();this.eventMappings.clear();this.removeListeners();this.destroy();},destroy:function(){},setEventMappings:function(){},addListeners:','function()',arguments);this.eventMappings.each(function(eventMap)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2541,'this.eventMappings.each(','function(eventMap)',arguments);eventMap.push(eventMap[2].bindAsEventListener(this))
Event.observe($(eventMap[0]),eventMap[1],eventMap[3]);}.bind(this));},removeListeners:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2543,'Event.observe($(eventMap[0]),eventMap[1],eventMap[3]);}.bind(this));},removeListeners:','function()',arguments);this.eventMappings.each(function(eventMap){Event.stopObserving($(eventMap[0]),eventMap[1],eventMap[3]);});this.eventMappings.clear();},setRenderer:function(renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2544,'this.eventMappings.each(function(eventMap){Event.stopObserving($(eventMap[0]),eventMap[1],eventMap[3]);});this.eventMappings.clear();},setRenderer:','function(renderer)',arguments);this.renderer=renderer;this.setTool(this.toolsArray.last());},setTool:function(tool)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2545,'this.renderer=renderer;this.setTool(this.toolsArray.last());},setTool:','function(tool)',arguments);if(this.toolsArray.last()&&this.toolsArray.last().unactivate)
{this.toolsArray.last().unactivate(this);}
this.toolsArray.push(tool);this.toolsArray.last().activate(this);},removeTool:function(tool)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2548,'this.toolsArray.push(tool);this.toolsArray.last().activate(this);},removeTool:','function(tool)',arguments);tool.unactivate(this);this.toolsArray=this.toolsArray.without(tool);},getTool:function(){return this.toolsArray.last();},getTools:function(){return this.toolsArray;},unsetTool:function(tool)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2549,'tool.unactivate(this);this.toolsArray=this.toolsArray.without(tool);},getTool:function(){return this.toolsArray.last();},getTools:function(){return this.toolsArray;},unsetTool:','function(tool)',arguments);this.toolsArray=this.toolsArray.without(tool);},_getX:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2550,'this.toolsArray=this.toolsArray.without(tool);},_getX:','function(event)',arguments);this.dimension=$(this.element).getDimensions();var scroll=Utility.getWindowScroll(window);var x=Event.pointerX(event)-this.offset[0]-scroll.left;if(x<0)
x=0;if(x>this.dimension.width)
x=this.dimension.width;return x;},_getY:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2553,'x=this.dimension.width;return x;},_getY:','function(event)',arguments);this.dimension=$(this.element).getDimensions();var scroll=Utility.getWindowScroll(window);var y=Event.pointerY(event)-this.offset[1]-scroll.top;if(y<0)
y=0;if(y>this.dimension.height)
y=this.dimension.height;return y;}}
Graphic.Shape=Class.create();Object.extend(Graphic.Shape.prototype,{initialize:function(renderer,nodeName){this.attributes={};this.renderer=renderer;this.nodeName=nodeName;this.element=renderer.createShape(this);if(this.element)
this.element.shape=this;this.setMatrix(new Matrix());this.setStroke(null);this.setFill(null);return this;},destroy:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2558,'this.element.shape=this;this.setMatrix(new Matrix());this.setStroke(null);this.setFill(null);return this;},destroy:','function()',arguments);this.nihilate();this.renderer.remove(this);},nihilate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2559,'this.nihilate();this.renderer.remove(this);},nihilate:','function()',arguments);},getType:function(){return this.nodeName;},setID:function(id){this._setAttribute("id",id,true);return this;},getID:function(){return this.attributes.id;},setClassName:function(className){this._setAttribute("class",className,true);return this;},getClassName:function(){return this.attributes["class"];},show:function(){this.renderer.show(this);return this;},hide:function(){this.renderer.hide(this);return this;},setFill:function(attributes){if(!attributes||attributes.fill=="none"){this._setAttribute("fill","none");this._setAttribute("fill-opacity",0);}
else if(typeof attributes.r!="undefined"){this._setAttribute("fill","rgb("+parseInt(attributes.r)+","+parseInt(attributes.g)+","+parseInt(attributes.b)+")");this._setAttribute("fill-opacity",(attributes.a||255)/255.0);}
return this;},getFill:function(){return this.attributes.fill;},getFillOpacity:function(){return this.attributes["fill-opacity"];},setStroke:function(attributes){if(!attributes||attributes.stroke=="none"){this._setAttribute("stroke","none");this._setAttribute("stroke-opacity",0);this._setAttribute("stroke-width",0);}
else if(typeof attributes.r!="undefined"){this._setAttribute("stroke","rgb("+parseInt(attributes.r)+","+parseInt(attributes.g)+","+parseInt(attributes.b)+")");this._setAttribute("stroke-opacity",(attributes.a||255)/255.0);this._setAttribute("stroke-width",(attributes.w||1));}
return this;},setStrokeWidth:function(w){this._setAttribute("stroke-width",(w||1));return this;},setStrokeOpacity:function(a){this._setAttribute("stroke-opacity",(a||255)/255.0);return this;},setStrokeColor:function(r,g,b){this._setAttribute("stroke","rgb("+parseInt(r)+","+parseInt(g)+","+parseInt(b)+")");return this;},getStroke:function(){return this.attributes.stroke;},getStrokeOpacity:function(){return this.attributes["stroke-opacity"];},getStrokeWidth:function(){return this.attributes["stroke-width"];},setAntialiasing:function(on){if(on)
this._setAttribute("shape-rendering","auto");else
this._setAttribute("shape-rendering","crispEdges");return this;},getAntialiasing:function(){return this.attributes["shape-rendering"]=="auto";},setBounds:function(x,y,w,h){this.setLocation(x,y);this.setSize(w,h);return this;},getBounds:function(){return Object.extend(this.getSize(),this.getLocation());},withinBounds:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2566,'this._setAttribute("shape-rendering","crispEdges");return this;},getAntialiasing:function(){return this.attributes["shape-rendering"]=="auto";},setBounds:function(x,y,w,h){this.setLocation(x,y);this.setSize(w,h);return this;},getBounds:function(){return Object.extend(this.getSize(),this.getLocation());},withinBounds:','function(x,y)',arguments);var bounds=this.getBounds();return x>bounds.x&&x<bounds.x+bounds.w&&y<bounds.y+bounds.h&&y>bounds.y;},moveToFront:function(){if(this.renderer)
this.renderer.moveToFront(this);return this;},rotate:function(angle,rx,ry){var bounds=this.getBounds();if(typeof rx=="undefined")
rx=bounds.x+(bounds.w/2);if(typeof ry=="undefined")
ry=bounds.y+(bounds.h/2);this.postTransform(Matrix.translate(rx,ry));this.postTransform(Matrix.rotate(angle));this.postTransform(Matrix.translate(-rx,-ry));return this;},translate:function(tx,ty){return this.postTransform(Matrix.translate(tx,ty));},scale:function(sx,sy,cx,cy){if(cx)
this.postTransform(Matrix.translate(cx,cy));this.postTransform(Matrix.scale(sx,sy));if(cx)
this.postTransform(Matrix.translate(-cx,-cy));return this},postTransform:function(matrix){this.matrix.multiplyRight(matrix)
this.inverseMatrix.multiplyLeft(Matrix.invert(matrix));this.childTransForm(matrix);this._updateTransform();return this;},childTransForm:function(matrix)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2573,'this.inverseMatrix.multiplyLeft(Matrix.invert(matrix));this.childTransForm(matrix);this._updateTransform();return this;},childTransForm:','function(matrix)',arguments);},preTransform:function(matrix){this.matrix.multiplyLeft(matrix)
this.inverseMatrix.multiplyRight(Matrix.invert(matrix));this.childPreTransForm(matrix);this._updateTransform();return this;},childPreTransForm:function(matrix)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2575,'this.inverseMatrix.multiplyRight(Matrix.invert(matrix));this.childPreTransForm(matrix);this._updateTransform();return this;},childPreTransForm:','function(matrix)',arguments);},setMatrix:function(matrix,inverse){this.matrix=new Matrix(matrix);this.inverseMatrix=inverse||Matrix.invert(this.matrix);this._updateTransform();return this;},getMatrix:function(){return this.matrix;},getInverseMatrix:function(){return this.inverseMatrix;},getRendererObject:function(){return this.element;},getSize:function(){throw Graphic.functionMustBeOverriden;},setSize:function(width,height){throw Graphic.functionMustBeOverriden;},getLocation:function(){throw Graphic.functionMustBeOverriden;},setLocation:function(x,y){throw Graphic.functionMustBeOverriden;},addComment:function(commentText){var commentNode=this.renderer.addComment(this,commentText);return this;},getDistanceBetweenWorldPoints:function(worldPoints)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2576,'},setMatrix:function(matrix,inverse){this.matrix=new Matrix(matrix);this.inverseMatrix=inverse||Matrix.invert(this.matrix);this._updateTransform();return this;},getMatrix:function(){return this.matrix;},getInverseMatrix:function(){return this.inverseMatrix;},getRendererObject:function(){return this.element;},getSize:function(){throw Graphic.functionMustBeOverriden;},setSize:function(width,height){throw Graphic.functionMustBeOverriden;},getLocation:function(){throw Graphic.functionMustBeOverriden;},setLocation:function(x,y){throw Graphic.functionMustBeOverriden;},addComment:function(commentText){var commentNode=this.renderer.addComment(this,commentText);return this;},getDistanceBetweenWorldPoints:','function(worldPoints)',arguments);var srid,point1,point2,l;l=worldPoints.size();var totalDistance=0;for(var i=1;i<l;i++)
{srid=worldPoints[i-1].srid;if(srid!=worldPoints[i].srid)
{point1=worldPoints[i-1]["get"+srid]();point2=worldPoints[i]["get"+srid]();}
else
{point1=worldPoints[i-1];point2=worldPoints[i];}
totalDistance+=Geocode.getDistanceInMetres(srid,point1,point2);}
return totalDistance.toFixed(1);},getScreenPointFromWorld:function(worldPoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2583,'return totalDistance.toFixed(1);},getScreenPointFromWorld:','function(worldPoint)',arguments);var point=this.mapStatus.getScreenPointFromWorld(worldPoint);point=this.mapStatus.invertYaxis(point);return point;},getWorldPointFromScreen:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2584,'var point=this.mapStatus.getScreenPointFromWorld(worldPoint);point=this.mapStatus.invertYaxis(point);return point;},getWorldPointFromScreen:','function(point)',arguments);var offset=this.mapStatus.getLayerOffset();var x=point.x+offset.x;var y=point.y+offset.y;var screenPoint=this.mapStatus.invertYaxis(new Point(x,y));var relativePoint=this.mapStatus.getRelativePoint(screenPoint);return this.mapStatus.getPointOnTopLayer(relativePoint);},_setAttributes:function(attributes)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2585,'var offset=this.mapStatus.getLayerOffset();var x=point.x+offset.x;var y=point.y+offset.y;var screenPoint=this.mapStatus.invertYaxis(new Point(x,y));var relativePoint=this.mapStatus.getRelativePoint(screenPoint);return this.mapStatus.getPointOnTopLayer(relativePoint);},_setAttributes:','function(attributes)',arguments);this.attributes=Object.extend(this.attributes,attributes||{});this.renderer.updateAttributes(this,attributes);return this;},_setAttribute:function(name,value){var hash={}
hash[name]=value;this._setAttributes(hash);return this;},_updateTransform:function(){this._setAttributes({matrix:this.matrix.values().join(","),invmatrix:this.inverseMatrix.values().join(",")});this.renderer.updateTransform(this);}})
Graphic.AbstractRender=Class.create();Graphic.AbstractRender.prototype={initialize:function(element){var dimension=$(element).getDimensions();this.parentDiv=element;this.viewing={tx:0,ty:0,sx:1,sy:1,cx:dimension.width/2,cy:dimension.height/2};this._setViewMatrix();this.bounds={x:0,y:0,w:dimension.width,h:dimension.height};return this;},pan:function(x,y){this.viewing.tx=x;this.viewing.ty=y;this._setViewMatrix();this._setViewing();return this;},zoom:function(sx,sy,cx,cy){this.viewing.sx=sx;this.viewing.sy=sy;this.viewing.cx=cx||this.bounds.w/2;this.viewing.cy=cy||this.bounds.h/2;this._setViewMatrix();this._setViewing();return this;},getViewing:function(){return this.viewing;},setViewing:function(viewing){this.viewing=Object.extend(this.viewing,viewing);this._setViewMatrix();this._setViewing();return this;},_setViewMatrix:function(){this.viewingMatrix=Matrix.translate(this.viewing.tx,this.viewing.ty).multiplyLeft(Matrix.scaleAt(1/this.viewing.sx,1/this.viewing.sy,this.viewing.cx,this.viewing.cy));},setSize:function(width,height){this.bounds.w=width;this.bounds.h=height;return this;},updateSize:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2588,'Graphic.AbstractRender=Class.create();Graphic.AbstractRender.prototype={initialize:function(element){var dimension=$(element).getDimensions();this.parentDiv=element;this.viewing={tx:0,ty:0,sx:1,sy:1,cx:dimension.width/2,cy:dimension.height/2};this._setViewMatrix();this.bounds={x:0,y:0,w:dimension.width,h:dimension.height};return this;},pan:function(x,y){this.viewing.tx=x;this.viewing.ty=y;this._setViewMatrix();this._setViewing();return this;},zoom:function(sx,sy,cx,cy){this.viewing.sx=sx;this.viewing.sy=sy;this.viewing.cx=cx||this.bounds.w/2;this.viewing.cy=cy||this.bounds.h/2;this._setViewMatrix();this._setViewing();return this;},getViewing:function(){return this.viewing;},setViewing:function(viewing){this.viewing=Object.extend(this.viewing,viewing);this._setViewMatrix();this._setViewing();return this;},_setViewMatrix:function(){this.viewingMatrix=Matrix.translate(this.viewing.tx,this.viewing.ty).multiplyLeft(Matrix.scaleAt(1/this.viewing.sx,1/this.viewing.sy,this.viewing.cx,this.viewing.cy));},setSize:function(width,height){this.bounds.w=width;this.bounds.h=height;return this;},updateSize:','function()',arguments);var dimension=$(this.parentDiv).getDimensions();if(this.bounds.w!=dimension.width||this.bounds.h!=dimension.height)
{this.setSize(dimension.width,dimension.height);}},getSize:function(){return{width:this.bounds.w,height:this.bounds.h};},destroy:function(){console.log("Graphic.AbstractRender:destroy")},createShape:function(type){console.log("Graphic.AbstractRender:createShape")},add:function(shape,parent){console.log("Graphic.AbstractRender:add")},remove:function(shape,parent){console.log("Graphic.AbstractRender:remove")},get:function(id){console.log("Graphic.AbstractRender:get")},shapes:function(id){console.log("Graphic.AbstractRender:shapes")},clear:function(){console.log("Graphic.AbstractRender:clear")},updateAttributes:function(shape,attributes){console.log("Graphic.AbstractRender:update")},updateTransform:function(shape){console.log("Graphic.AbstractRender:updateTransform")},nbShapes:function(){console.log("Graphic.AbstractRender:nbShapes")},show:function(shape){console.log("Graphic.AbstractRender:show")},hide:function(shape){console.log("Graphic.AbstractRender:hide")},moveToFront:function(shape){console.log("Graphic.AbstractRender:moveToFront")},moveToBack:function(shape){console.log("Graphic.AbstractRender:moveToBack")},draw:function(){console.log("Graphic.AbstractRender:draw")},position:function(){console.log("Graphic.AbstractRender:position")},pick:function(event){console.log("Graphic.AbstractRender:pick")},addComment:function(shape,text){},addText:function(shape,text){console.log("Graphic.AbstractRender:addText")},_setViewing:function(){console.log("Graphic.AbstractRender:_setViewing")}}
Graphic.Tool=Class.create();Graphic.Tool.prototype={activate:function(manager){},unactivate:function(manager){},clear:function(manager){},initDrag:function(x,y,event){},drag:function(x,y,dx,dy,ddx,ddy,event){},endDrag:function(x,y,event){},mouseMove:function(x,y,event){},click:function(x,y,event){},rightClick:function(x,y,event){},rightMouseDown:function(x,y,event){},doubleClick:function(x,y,event){},keyUp:function(keyCode,event){},keyDown:function(keyCode,event){},mouseOver:function(x,y,event){},mouseOut:function(event){}}
Graphic.EzmapsScribbleToolManager=Class.extend(Graphic.AbstractToolManager,{include:EzMapsEvent,eventPriority:4,callBackSaveFunction:null,cancelClickL:false,initialize:function(renderer,mapStatus,callBackSaveFunction)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2592,'Graphic.EzmapsScribbleToolManager=Class.extend(Graphic.AbstractToolManager,{include:EzMapsEvent,eventPriority:4,callBackSaveFunction:null,cancelClickL:false,initialize:','function(renderer,mapStatus,callBackSaveFunction)',arguments);this.mapStatus=mapStatus;this.parent(renderer);this.mapStatus.eventHandler.addAListener(this);},setEventMappings:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2593,'this.mapStatus=mapStatus;this.parent(renderer);this.mapStatus.eventHandler.addAListener(this);},setEventMappings:','function()',arguments);this.eventMappings=$A([[document,"keyup",this.keyup],[document,"keydown",this.keydown]]);},destroy:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2594,'this.eventMappings=$A([[document,"keyup",this.keyup],[document,"keydown",this.keydown]]);},destroy:','function()',arguments);this.mapStatus.activateClick();},getActiveToolMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2595,'this.mapStatus.activateClick();},getActiveToolMode:','function()',arguments);if(this.toolsArray.last())
{return this.toolsArray.last().getToolMode();}
else
{return null;}},dblclick:function(event,point,relativePoint,invertedRelativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2599,'{return null;}},dblclick:','function(event,point,relativePoint,invertedRelativePoint)',arguments);if(this.toolsArray.last()==null)
return;this.offset=Position.page(this.element);var result=false;for(var i=0;i<this.toolsArray.size();i++)
{result=result||this.toolsArray[i].doubleClick(invertedRelativePoint);}
return result;},click:function(event,point,relativePoint,invertedRelativePoint){return false;},contextmenu:function(event,point,relativePoint,invertedRelativePoint){if(this.toolsArray.last()==null)
return;this.offset=Position.page(this.element);var result=false;for(var i=0;i<this.toolsArray.size();i++)
{result=result||this.toolsArray[i].rightClick(invertedRelativePoint,event);}
return result},mousedown:function(event,point,relativePoint,invertedRelativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2606,'return result},mousedown:','function(event,point,relativePoint,invertedRelativePoint)',arguments);if(this.toolsArray.last()==null)
return;var drawing=false;if(!Event.isLeftClick(event))
{for(var i=0;i<this.toolsArray.size();i++)
{drawing=drawing||this.toolsArray[i].rightMouseDown(invertedRelativePoint,event);}
return drawing;}
this.mapOffset=this.mapStatus.getLayerOffset();this.offset=Position.page(this.element);this.xi=invertedRelativePoint.x;this.yi=invertedRelativePoint.y;this.xlast=this.xi;this.ylast=this.yi;for(var i=0;i<this.toolsArray.size();i++)
{drawing=drawing||this.toolsArray[i].initDrag(this.xi,this.yi,event);}
this.isDragging=true;Utility.disableSelection();this.cancleClick=this.cancleClick||drawing;return drawing;},mousemove:function(event,point,relativePoint,invertedRelativePoint){if(this.toolsArray.last()==null)
return;var x=invertedRelativePoint.x;var y=invertedRelativePoint.y;var result=false;if(this.isDragging){var dx=x-this.xi;var dy=y-this.yi;var ddx=x-this.xlast;var ddy=y-this.ylast;var org=this.renderer.viewingMatrix.multiplyPoint(0,0);var pt=this.renderer.viewingMatrix.multiplyPoint(ddx,ddy);ddx=pt.x-org.x;ddy=pt.y-org.y;var pt=this.renderer.viewingMatrix.multiplyPoint(dx,dy);dx=pt.x-org.x;dy=pt.y-org.y;this.xlast=x;this.ylast=y;for(var i=0;i<this.toolsArray.size();i++)
{result=result||this.toolsArray[i].drag(x,y,dx,dy,ddx,ddy,event);}}
else
{for(var i=0;i<this.toolsArray.size();i++)
{result=result||this.toolsArray[i].mouseMove(x,y,event);}}
return result&&this.isDragging;},mouseup:function(event,point,relativePoint,invertedRelativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2620,'return result&&this.isDragging;},mouseup:','function(event,point,relativePoint,invertedRelativePoint)',arguments);if(this.toolsArray.last()==null)
{return;}
if(!this.isDragging)
{return false;}
var x=invertedRelativePoint.x;var y=invertedRelativePoint.y;this.isDragging=false;var result=false;for(var i=0;i<this.toolsArray.size();i++)
{result=result||this.toolsArray[i].endDrag(x,y,event);}
this.cancleClick=this.cancleClick||result;Utility.enableSelection();},keyup:function(event,point,relativePoint,invertedRelativePoint){if(this.toolsArray.last()==null)
return;var keyCode=event.keyCode||event.which
if(this.toolsArray.last().keyUp(keyCode,event))
Event.stop(event);},keydown:function(event,point,relativePoint,invertedRelativePoint){if(this.toolsArray.last()==null)
return;var keyCode=event.keyCode||event.which
if(this.toolsArray.last().keyDown(keyCode,event))
Event.stop(event);},mouseover:function(event,point,relativePoint,invertedRelativePoint){if(this.toolsArray.last()==null)
return;var x=invertedRelativePoint.x;var y=invertedRelativePoint.y;for(var i=0;i<this.toolsArray.size();i++)
{this.toolsArray[i].mouseOver(x,y,event);}},mouseout:function(event,point,relativePoint,invertedRelativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2635,'{this.toolsArray[i].mouseOver(x,y,event);}},mouseout:','function(event,point,relativePoint,invertedRelativePoint)',arguments);if(this.toolsArray.last()==null)
return;for(var i=0;i<this.toolsArray.size();i++)
{this.toolsArray[i].mouseOut(event);}},scrollX:function(){var page=Position.page(this.element);var offset=Position.cumulativeOffset(this.element);return offset[0]-page[0];},scrollY:function(){var page=Position.page(this.element);var offset=Position.cumulativeOffset(this.element);return offset[1]-page[1];},getMousePoint:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2638,'{this.toolsArray[i].mouseOut(event);}},scrollX:function(){var page=Position.page(this.element);var offset=Position.cumulativeOffset(this.element);return offset[0]-page[0];},scrollY:function(){var page=Position.page(this.element);var offset=Position.cumulativeOffset(this.element);return offset[1]-page[1];},getMousePoint:','function(event)',arguments);return this.mapStatus.getRelativePointFromEvent(event);},refresh:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2639,'return this.mapStatus.getRelativePointFromEvent(event);},refresh:','function()',arguments);if(this.toolsArray.last()==null)
return;for(var i=0;i<this.toolsArray.size();i++)
{this.toolsArray[i].refresh();}},reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2642,'{this.toolsArray[i].refresh();}},reposition:','function()',arguments);if(this.toolsArray.last()==null)
return;for(var i=0;i<this.toolsArray.size();i++)
{this.toolsArray[i].reposition();}},_getX:function(event,point,relativePoint,invertedRelativePoint){var x=0;if(this.mapStatus)
{x=this.getMousePoint(event).x;}
else
{this.dimension=$(this.element).getDimensions();var scroll=Utility.getWindowScroll(window);x=Event.pointerX(event)-this.offset[0]-scroll.left;if(x<0)
x=0;if(x>this.dimension.width)
x=this.dimension.width;}
return x;},_getY:function(event,point,relativePoint,invertedRelativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2651,'return x;},_getY:','function(event,point,relativePoint,invertedRelativePoint)',arguments);var y=0;this.dimension=$(this.element).getDimensions();if(this.mapStatus)
{y=this.dimension.height-this.getMousePoint(event).y;}
else
{var scroll=Utility.getWindowScroll(window);var y=Event.pointerY(event)-this.offset[1]-scroll.top;if(y<0)
y=0;if(y>this.dimension.height)
y=this.dimension.height;}
return y;}});Graphic.ToolManager=Class.extend(Graphic.AbstractToolManager,{initialize:function(renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2658,'return y;}});Graphic.ToolManager=Class.extend(Graphic.AbstractToolManager,{initialize:','function(renderer)',arguments);this.parent(renderer);},setEventMappings:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2659,'this.parent(renderer);},setEventMappings:','function()',arguments);this.eventMappings=$A([[this.element,"mousedown",this.mouseDown],[this.element,"click",this.click],[this.element,"dblclick",this.doubleClick],[document,"mousemove",this.mouseMove],[document,"mouseup",this.mouseUp],[document,"keyup",this.keyUp],[document,"keydown",this.keyDown],[this.element,"mouseover",this.mouseOver],[this.element,"mouseout",this.mouseOut]]);},doubleClick:function(event){if(this.toolsArray==null)
return;this.offset=Position.page(this.element);var x=this._getX(event);var y=this._getY(event);this.toolsArray.doubleClick(x,y,event);Event.stop(event);},click:function(event){if(this.toolsArray==null)
return;this.offset=Position.page(this.element);var x=this._getX(event);var y=this._getY(event);this.toolsArray.click(x,y,event);Event.stop(event);},mouseDown:function(event){if(this.toolsArray==null)
return;if(!Event.isLeftClick(event))
return;this.offset=Position.page(this.element);this.xi=this._getX(event);this.yi=this._getY(event);this.xlast=this.xi;this.ylast=this.yi;this.toolsArray.initDrag(this.xi,this.yi,event);this.isDragging=true;Utility.disableSelection();Event.stop(event);},mouseMove:function(event){if(this.toolsArray==null)
return;var x=this._getX(event);var y=this._getY(event);if(this.isDragging){var dx=x-this.xi;var dy=y-this.yi;var ddx=x-this.xlast;var ddy=y-this.ylast;var org=this.renderer.viewingMatrix.multiplyPoint(0,0);var pt=this.renderer.viewingMatrix.multiplyPoint(ddx,ddy);ddx=pt.x-org.x;ddy=pt.y-org.y;var pt=this.renderer.viewingMatrix.multiplyPoint(dx,dy);dx=pt.x-org.x;dy=pt.y-org.y;this.xlast=x;this.ylast=y;this.toolsArray.drag(x,y,dx,dy,ddx,ddy,event);}
else
if(this.toolsArray.mouseMove)
this.toolsArray.mouseMove(x,y,event);Event.stop(event);},mouseUp:function(event){if(this.toolsArray==null)
return;if(!this.isDragging)
return false;var x=this._getX(event);var y=this._getY(event);this.isDragging=false;this.toolsArray.endDrag(x,y,event);Utility.enableSelection();Event.stop(event);},keyUp:function(event){if(this.toolsArray==null)
return;var keyCode=event.keyCode||event.which
if(this.toolsArray.keyUp(keyCode,event))
Event.stop(event);},keyDown:function(event){if(this.toolsArray==null)
return;var keyCode=event.keyCode||event.which
if(this.toolsArray.keyDown(keyCode,event))
Event.stop(event);},mouseOver:function(event){if(this.toolsArray==null)
return;var x=this._getX(event);var y=this._getY(event);this.toolsArray.mouseOver(x,y,event);Event.stop(event);},mouseOut:function(event){if(this.toolsArray==null)
return;this.toolsArray.mouseOut(event);Event.stop(event);},scrollX:function(){var page=Position.page(this.element);var offset=Position.cumulativeOffset(this.element);return offset[0]-page[0];},scrollY:function(){var page=Position.page(this.element);var offset=Position.cumulativeOffset(this.element);return offset[1]-page[1];}});Graphic.ezmapsGroupOfCircles=Class.extend(Graphic.Shape,{circles:null,worldPoints:null,renderer:null,fill:{r:27,g:127,b:200,a:100},stroke:{r:243,g:107,b:0,w:2},circleSize:13,initialize:function(renderer,mapStatus)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2678,'return;this.toolsArray.mouseOut(event);Event.stop(event);},scrollX:function(){var page=Position.page(this.element);var offset=Position.cumulativeOffset(this.element);return offset[0]-page[0];},scrollY:function(){var page=Position.page(this.element);var offset=Position.cumulativeOffset(this.element);return offset[1]-page[1];}});Graphic.ezmapsGroupOfCircles=Class.extend(Graphic.Shape,{circles:null,worldPoints:null,renderer:null,fill:{r:27,g:127,b:200,a:100},stroke:{r:243,g:107,b:0,w:2},circleSize:13,initialize:','function(renderer,mapStatus)',arguments);this.circles=new Array();this.children=this.circles;this.worldPoints=new Array();this.mapStatus=mapStatus;this.parent(renderer,"g");return this;},nihilate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2679,'this.circles=new Array();this.children=this.circles;this.worldPoints=new Array();this.mapStatus=mapStatus;this.parent(renderer,"g");return this;},nihilate:','function()',arguments);this.circles.each(function(e){e.destroy();});this.worldPoints=null;this.circles=null;this.mapStatus=null;},setStroke:function(stroke)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2680,'this.circles.each(function(e){e.destroy();});this.worldPoints=null;this.circles=null;this.mapStatus=null;},setStroke:','function(stroke)',arguments);this.stroke=stroke||this.stroke;this.circles.each(function(e)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2681,'this.stroke=stroke||this.stroke;this.circles.each(','function(e)',arguments);e.setStroke(this.stroke);});},setfill:function(fill)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2682,'e.setStroke(this.stroke);});},setfill:','function(fill)',arguments);this.fill=fill||this.fill;this.circles.each(function(e)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2683,'this.fill=fill||this.fill;this.circles.each(','function(e)',arguments);e.setfill(fill);});},moveToFront:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2684,'e.setfill(fill);});},moveToFront:','function()',arguments);this.circles.each(function(e)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2685,'this.circles.each(','function(e)',arguments);e.moveToFront();});},makeCircle:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2686,'e.moveToFront();});},makeCircle:','function()',arguments);var circle=new Graphic.Circle(this.renderer);circle.setStroke(this.stroke);circle.setFill(this.fill);circle.setBounds(0,0,this.circleSize,this.circleSize);this.renderer.add(circle,this);circle.originalMatrix=circle.matrix;return circle;},insetCircle:function(index,point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2687,'var circle=new Graphic.Circle(this.renderer);circle.setStroke(this.stroke);circle.setFill(this.fill);circle.setBounds(0,0,this.circleSize,this.circleSize);this.renderer.add(circle,this);circle.originalMatrix=circle.matrix;return circle;},insetCircle:','function(index,point)',arguments);this.worldPoints=Utility.arrayInsert(this.worldPoints,index,this.getWorldPointFromScreen(point));var circle=this.makeCircle();this.circles=Utility.arrayInsert(this.circles,index,circle);this.positionCircle(circle,point);this._clipCircles();},addCirclesFromWorldPoints:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2688,'this.worldPoints=Utility.arrayInsert(this.worldPoints,index,this.getWorldPointFromScreen(point));var circle=this.makeCircle();this.circles=Utility.arrayInsert(this.circles,index,circle);this.positionCircle(circle,point);this._clipCircles();},addCirclesFromWorldPoints:','function(points)',arguments);this.worldPoints=this.worldPoints.concat(points);this.repositionCirclesFromWorldPoints();},addCircle:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2689,'this.worldPoints=this.worldPoints.concat(points);this.repositionCirclesFromWorldPoints();},addCircle:','function(point)',arguments);var circle=this.makeCircle();this.circles.push(circle);this.positionCircle(circle,point);this.worldPoints.push(this.getWorldPointFromScreen(point));this._clipCircles();},setCircle:function(x,y,index)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2690,'var circle=this.makeCircle();this.circles.push(circle);this.positionCircle(circle,point);this.worldPoints.push(this.getWorldPointFromScreen(point));this._clipCircles();},setCircle:','function(x,y,index)',arguments);var point=new Point(x,y);if(index<this.circles.size())
{this.positionCircle(this.circles[index],point);this.worldPoints[index]=this.getWorldPointFromScreen(point);}
this._clipCircles();},positionCircle:function(circle,point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2693,'this._clipCircles();},positionCircle:','function(circle,point)',arguments);var x=point.x-this.circleSize/2;var y=point.y-this.circleSize/2;circle.setLocation(x,y);},getCircleFromPoint:function(point,without)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2694,'var x=point.x-this.circleSize/2;var y=point.y-this.circleSize/2;circle.setLocation(x,y);},getCircleFromPoint:','function(point,without)',arguments);if(without!=null)
{var cs=this.circles.without(this.circles[without]);}
else
{var cs=this.circles;}
var l=cs.length;var pointer=null;for(var i=0;i<l;i++)
{var p=cs[i].getLocation();p.x+=this.circleSize/2;p.y+=this.circleSize/2;var distance=p.distance(point);pointer=(distance<this.circleSize*1.1)?i:pointer;}
return pointer;},setCircles:function(pointsArray)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2701,'return pointer;},setCircles:','function(pointsArray)',arguments);var l=pointsArray.length;for(var i=0;i<l;i++)
{if(this.circles[i])
{this.positionCircle(this.circles[i],pointsArray[i]);}
else
{this.circles[i]=this.makeCircle();this.positionCircle(this.circles[i],pointsArray[i]);}}
this._clipCircles();},repositionCirclesFromWorldPoints:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2707,'this._clipCircles();},repositionCirclesFromWorldPoints:','function()',arguments);var newArrayOfPoints=new Array();var l=this.worldPoints.length;for(var i=0;i<l;i++)
{newArrayOfPoints.push(this.getScreenPointFromWorld(this.worldPoints[i]));}
this.setCircles(newArrayOfPoints);this._clipCircles();},removeCircle:function(index)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2710,'this.setCircles(newArrayOfPoints);this._clipCircles();},removeCircle:','function(index)',arguments);if(this.worldPoints.size()<=0)
return;if(typeof(index)=="number")
{this.remove(this.circles[index]);}
else
{this.remove(this.circles.last());}},remove:function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2715,'{this.remove(this.circles.last());}},remove:','function(shape)',arguments);var index=this.circles.indexOf(shape);if(index!=-1){this.circles=this.circles.without(shape);this.worldPoints=this.worldPoints.without(this.worldPoints[index]);this.renderer.remove(shape);shape.parent=null;}},get:function(index){return(index>=0&&index<this.circles.length?this.circles[index]:null);},getNbELements:function(){return this.circles.length;},getSize:function(){if(this.getNbELements()==0)
return{w:0,h:0};var first=this.circles.first()
var bounds=(first.getBounds());var xmin=bounds.x;var ymin=bounds.y;var xmax=bounds.x+bounds.w;var ymax=bounds.y+bounds.h;this.circles.each(function(shape){var bounds=(shape.getBounds());xmin=Math.min(xmin,bounds.x);xmax=Math.max(xmax,bounds.x+bounds.w);ymin=Math.min(ymin,bounds.y);ymax=Math.max(ymax,bounds.y+bounds.h);});return{w:xmax-xmin,h:ymax-ymin};},getLocation:function(){if(this.getNbELements()==0)
return{x:0,y:0};var first=this.circles.first()
var bounds=(first.getBounds());var xmin=bounds.x;var ymin=bounds.y;this.circles.each(function(shape){var bounds=(shape.getBounds());xmin=Math.min(xmin,bounds.x);ymin=Math.min(ymin,bounds.y);});return{x:xmin,y:ymin};},childPostTransform:function(matrix)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2720,'var bounds=(first.getBounds());var xmin=bounds.x;var ymin=bounds.y;this.circles.each(function(shape){var bounds=(shape.getBounds());xmin=Math.min(xmin,bounds.x);ymin=Math.min(ymin,bounds.y);});return{x:xmin,y:ymin};},childPostTransform:','function(matrix)',arguments);this.circles.each(function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2721,'this.circles.each(','function(shape)',arguments);shape.postTransform(matrix);});return this;},childPreTransform:function(matrix)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2722,'shape.postTransform(matrix);});return this;},childPreTransform:','function(matrix)',arguments);this.circles.each(function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2723,'this.circles.each(','function(shape)',arguments);shape.preTransform(matrix);});return this;},show:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2724,'shape.preTransform(matrix);});return this;},show:','function()',arguments);this.circles.each(function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2725,'this.circles.each(','function(shape)',arguments);shape.show();});return this;},hide:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2726,'shape.show();});return this;},hide:','function()',arguments);this.circles.each(function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2727,'this.circles.each(','function(shape)',arguments);shape.hide();});return this;},_clipCircles:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2728,'shape.hide();});return this;},_clipCircles:','function()',arguments);var box=this.mapStatus.getScreenClippingArea().times(2);var l=this.circles.size();for(var i=0;i<l;i++)
{var p=this.circles[i].getLocation();if(!box.clipPoint(p,this.circleSize))
{this.renderer.remove(this.circles[i]);}
else
{this.renderer.add(this.circles[i]);}}},find:function(shapeId){return this.circles.find(function(s){return s.getID()==shapeId});},findAll:function(shapeType){return this.circles.findAll(function(s){return s.getType()==shapeType});}})
Graphic.Polyline=Class.extend(Graphic.Shape,{initialize:function(renderer,type){this.parent(renderer,type||"polyline");Object.extend(this.attributes,{x:0,y:0,w:0,h:0});this.points=new Array();return this;},addPoints:function(points){points.each(function(p){this.points.push(p)}.bind(this));this._updatePath();return this;},setPoints:function(points){this.points.clear();this.addPoints(points)
return this;},setPoint:function(x,y,index){if(index<this.points.length){this.points[index].x=x;this.points[index].y=y;this._updatePath();}
return this;},addPoint:function(x,y){dbg('addPoint');this.points.push([x,y]);this._updatePath();return this;},removePoint:function(id)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2736,'return this;},addPoint:function(x,y){dbg(\'addPoint\');this.points.push([x,y]);this._updatePath();return this;},removePoint:','function(id)',arguments);var point=(id!=null)?this.points[id]:this.points.pop();this.points=this.points.without(point);this._updatePath();return this;},getPoints:function(){return this.points;},getPoint:function(index){return{x:this.points[index].x,y:this.points[index][1]};},getNbPoints:function(){return this.points.length;},setSize:function(width,height){var x0=this.x;var y0=this.y;var fx=width/this.w;var fy=height/this.h;this.points.each(function(p){p.x=(p.x-this.x)*fx+this.x;p.y=(p.y-this.y)*fy+this.y;}.bind(this));this._updatePath();return this;},getSize:function(){return{w:this.w,h:this.h}},setLocation:function(x,y){var dx=x-this.x;var dy=y-this.y;this.points.each(function(p){p.x+=dx;p.y+=dy;});this._updatePath();return this;},getLocation:function(){return{x:this.x,y:this.y}},_updateBounds:function(){var xmin=0,ymin=0,xmax=0,ymax=0;if(this.points.length>0){var xmin=parseFloat(this.points[0].x),ymin=parseFloat(this.points[0].y),xmax=parseFloat(this.points[0].x),ymax=parseFloat(this.points[0].y);xmin=parseFloat(xmin);this.points.each(function(p){p.x=parseFloat(p.x);p.y=parseFloat(p.y);if(p.x<xmin)xmin=p.x;if(p.x>xmax)xmax=p.x;if(p.y<ymin)ymin=p.y;if(p.y>ymax)ymax=p.y;});this.x=xmin;this.y=ymin;this.w=xmax-xmin;this.h=ymax-ymin;}
else{this.x=0;this.y=0;this.w=0;this.h=0;};},_updatePath:function(){var path="";this.points.each(function(p){path+=p.x+" "+p.y+","});path=path.slice(0,path.length-1);this._updateBounds();this._setAttribute("points",path);}})
Graphic.Polygon=Class.create();Object.extend(Graphic.Polygon.prototype,Graphic.Polyline.prototype);Graphic.Polygon.prototype._polylineInitialize=Graphic.Polyline.prototype.initialize;Object.extend(Graphic.Polygon.prototype,{initialize:function(renderer){this._polylineInitialize(renderer,"polygon");return this;}})
Graphic.Text=Class.create();Object.extend(Graphic.Text.prototype,Graphic.Shape.prototype);Graphic.Text.prototype._parentInitialize=Graphic.Shape.prototype.initialize;Object.extend(Graphic.Text.prototype,{initialize:function(renderer){this._parentInitialize(renderer,"text");Object.extend(this.attributes,{x:0,y:0,'font-size':'10','font-family':'Veranda','font-weight':'normal'});return this;},getSize:function(){return{fontSize:this.attributes['font-size'],fontWeight:this.attributes['font-weight']};},setSize:function(fontSize,fontWeight){this._setAttributes({'font-size':fontSize,'font-weight':fontWeight});return this;},getLocation:function(){return{x:this.attributes.x,y:this.attributes.y}},setLocation:function(x,y){this._setAttributes({x:x,y:y});return this;},getFont:function(){return{fontSize:this.attributes['font-size'],fontFamily:this.attributes['font-family'],fontWeight:this.attributes['font-weight']};},setFont:function(size,family,weight){if(size){this._setAttribute('font-size',size);}
if(family){this._setAttribute('font-family',family);}
if(weight){this._setAttribute('font-weight',weight);}
return this;},setTextValue:function(textValue){this.renderer.addText(this,textValue);return this;}})
Graphic.Line=Class.create();Object.extend(Graphic.Line.prototype,Graphic.Shape.prototype);Graphic.Line.prototype._parentInitialize=Graphic.Shape.prototype.initialize;Object.extend(Graphic.Line.prototype,{initialize:function(renderer){this._parentInitialize(renderer,"line");return this;},getSize:function(){return{w:Math.abs(this.attributes.x1-this.attributes.x2),h:Math.abs(this.attributes.y1-this.attributes.y2)}},setSize:function(width,height){this._setAttributes({width:width,height:height});},getLocation:function(){return{x:Math.min(this.attributes.x1,this.attributes.x2),y:Math.min(this.attributes.y1,this.attributes.y2)}},setLocation:function(x,y){this._setAttributes({x:x,y:y});},setPoints:function(x1,y1,x2,y2){this._setAttributes({x1:x1,y1:y1,x2:x2,y2:y2})
return this;},getPoint:function(index){if(index==0)
return{x:this.attributes.x1,y:this.attributes.y1}
else
return{x:this.attributes.x2,y:this.attributes.y2}}})
Graphic.Ellipse=Class.create();Object.extend(Graphic.Ellipse.prototype,Graphic.Shape.prototype);Graphic.Ellipse.prototype._shapeInitialize=Graphic.Shape.prototype.initialize;Object.extend(Graphic.Ellipse.prototype,{initialize:function(renderer){this._shapeInitialize(renderer,"ellipse");Object.extend(this.attributes,{cx:0,cy:0,rx:0,ry:0})
return this;},getSize:function(){return{w:2*this.attributes.rx,h:2*this.attributes.ry}},setSize:function(width,height){var location=this.getLocation();this._setAttributes({rx:width/2,ry:height/2});this.setLocation(location.x,location.y);return this;},getLocation:function(){return{x:this.attributes.cx-this.attributes.rx,y:this.attributes.cy-this.attributes.ry}},setLocation:function(x,y){this._setAttributes({cx:x+this.attributes.rx,cy:y+this.attributes.ry});return this;}})
Graphic.Rectangle=Class.create();Object.extend(Graphic.Rectangle.prototype,Graphic.Shape.prototype);Graphic.Rectangle.prototype._shapeInitialize=Graphic.Shape.prototype.initialize;Object.extend(Graphic.Rectangle.prototype,{initialize:function(renderer){this._shapeInitialize(renderer,"rect");Object.extend(this.attributes,{x:0,y:0,w:0,h:0,rx:0,ry:0});return this;},getSize:function(){return{w:this.attributes.width,h:this.attributes.height}},setSize:function(width,height){this._setAttributes({width:width,height:height});return this;},getLocation:function(){return{x:this.attributes.x,y:this.attributes.y}},setLocation:function(x,y){this._setAttributes({x:x,y:y});return this;},setRoundCorner:function(rx,ry){rx=Math.max(0,rx);ry=Math.max(0,ry);if(!ry)
ry=rx;this._setAttributes({rx:rx,ry:ry});return this;},getRoundCorner:function(rx,ry){return{rx:this.attributes.rx,ry:this.attributes.ry}}})
Graphic.Circle=Class.create();Object.extend(Graphic.Circle.prototype,Graphic.Shape.prototype);Graphic.Circle.prototype._parentInitialize=Graphic.Shape.prototype.initialize;Object.extend(Graphic.Circle.prototype,{initialize:function(renderer){this._parentInitialize(renderer,"circle");Object.extend(this.attributes,{cx:0,cy:0,r:0})
return this;},getSize:function(){return{w:2*this.attributes.r,h:2*this.attributes.r}},setSize:function(width,height){var location=this.getLocation();this._setAttributes({r:Math.max(width,height)/2});this.setLocation(location.x,location.y);return this;},getLocation:function(){return new Point(this.attributes.cx-this.attributes.r,this.attributes.cy-this.attributes.r)},setLocation:function(x,y){this._setAttributes({cx:x+this.attributes.r,cy:y+this.attributes.r});return this;},setCenter:function(cx,cy){this._setAttributes({cx:cx,cy:cy});return this;},getCenter:function(){return{cx:this.attributes.cx,cy:this.attributes.cy};},setRadius:function(r){this._setAttributes({r:r});return this;},getRadius:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2754,'return this;},getSize:function(){return{w:2*this.attributes.r,h:2*this.attributes.r}},setSize:function(width,height){var location=this.getLocation();this._setAttributes({r:Math.max(width,height)/2});this.setLocation(location.x,location.y);return this;},getLocation:function(){return new Point(this.attributes.cx-this.attributes.r,this.attributes.cy-this.attributes.r)},setLocation:function(x,y){this._setAttributes({cx:x+this.attributes.r,cy:y+this.attributes.r});return this;},setCenter:function(cx,cy){this._setAttributes({cx:cx,cy:cy});return this;},getCenter:function(){return{cx:this.attributes.cx,cy:this.attributes.cy};},setRadius:function(r){this._setAttributes({r:r});return this;},getRadius:','function()',arguments);return this.attributes.r;}})
Graphic.ezmapsPolyline=Class.extend(Graphic.Shape,{points:null,worldPoints:null,mapStatus:null,initialize:function(renderer,nodeName,mapStatus){this.parent(renderer,nodeName||"polyline");Object.extend(this.attributes,{x:0,y:0,w:0,h:0});this.points=new Array();this.worldPoints=new Array();this.mapStatus=mapStatus;return this;},nihilate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2756,'Graphic.ezmapsPolyline=Class.extend(Graphic.Shape,{points:null,worldPoints:null,mapStatus:null,initialize:function(renderer,nodeName,mapStatus){this.parent(renderer,nodeName||"polyline");Object.extend(this.attributes,{x:0,y:0,w:0,h:0});this.points=new Array();this.worldPoints=new Array();this.mapStatus=mapStatus;return this;},nihilate:','function()',arguments);this.clearPoints();this.worldPoints=null;this.points=null;this.mapStatus=null;},addPoints:function(points){points.each(this.addPoint.bind(this));this._updatePath();return this;},setPoints:function(points){this.clearPoints();this.addPoints(points)
return this;},clearPoints:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2758,'return this;},clearPoints:','function()',arguments);this.points.clear();this.worldPoints.clear();},setPoint:function(x,y,index)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2759,'this.points.clear();this.worldPoints.clear();},setPoint:','function(x,y,index)',arguments);if(index<this.points.length&&index!=-1)
{this.updatePoint(x,y,this.points[index]);this._updatePath();}
return this;},updatePoint:function(x,y,point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2762,'return this;},updatePoint:','function(x,y,point)',arguments);point.x=x;point.y=y;var index=this.points.indexOf(point);if(index!=-1)
{this.worldPoints[index]=this.getWorldPointFromScreen(point);}},addPointsFromWorldPoints:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2764,'{this.worldPoints[index]=this.getWorldPointFromScreen(point);}},addPointsFromWorldPoints:','function(points)',arguments);this.worldPoints=this.worldPoints.concat(points);this.repositionPointsFromWorldPoints();},repositionPointsFromWorldPoints:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2765,'this.worldPoints=this.worldPoints.concat(points);this.repositionPointsFromWorldPoints();},repositionPointsFromWorldPoints:','function()',arguments);var newArrayOfPoints=new Array();var l=this.worldPoints.length;for(var i=0;i<l;i++)
{newArrayOfPoints.push(this.getScreenPointFromWorld(this.worldPoints[i]));}
this.points=newArrayOfPoints;this._updatePath();},addPoint:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2768,'this.points=newArrayOfPoints;this._updatePath();},addPoint:','function(point)',arguments);this.points.push(point);this.worldPoints.push(this.getWorldPointFromScreen(point));this._updatePath();return point;},insetPoint:function(index,point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2769,'this.points.push(point);this.worldPoints.push(this.getWorldPointFromScreen(point));this._updatePath();return point;},insetPoint:','function(index,point)',arguments);this.points=Utility.arrayInsert(this.points,index,point);this.worldPoints=Utility.arrayInsert(this.worldPoints,index,this.getWorldPointFromScreen(point));this._updatePath();return point;},removePoint:function(index)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2770,'this.points=Utility.arrayInsert(this.points,index,point);this.worldPoints=Utility.arrayInsert(this.worldPoints,index,this.getWorldPointFromScreen(point));this._updatePath();return point;},removePoint:','function(index)',arguments);if(this.worldPoints.size()<=1)
return;if(typeof(index)=="number")
{var point=this.points[index];var wp=this.worldPoints[index];}
else
{var point=this.points.last();var wp=this.worldPoints.last();}
this.points=this.points.without(point);this.worldPoints=this.worldPoints.without(wp);this._updatePath();return this;},getPoly:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2776,'this.points=this.points.without(point);this.worldPoints=this.worldPoints.without(wp);this._updatePath();return this;},getPoly:','function(x,y)',arguments);var point=new Point(x,y);var l=this.points.size();if(l==0)
{return;}
var pointer=null;if(l>1)
{for(var i=1;i<l;i++)
{var p=Utility.linehitTest(this.points[i-1],this.points[i],point,this.getStrokeWidth()+1);if(p)pointer={id:i};}}
if(this.nodeName=="polygon")
{var p=Utility.linehitTest(this.points.last(),this.points.first(),point,this.getStrokeWidth()+1);if(p)pointer={id:i};}
return pointer;},getPoints:function(){return this.points;},getPoint:function(index){return this.points[index];},getNbPoints:function(){return this.points.length;},setSize:function(width,height){var x0=this.x;var y0=this.y;var fx=width/this.w;var fy=height/this.h;this.points.each(function(p)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2784,'return pointer;},getPoints:function(){return this.points;},getPoint:function(index){return this.points[index];},getNbPoints:function(){return this.points.length;},setSize:function(width,height){var x0=this.x;var y0=this.y;var fx=width/this.w;var fy=height/this.h;this.points.each(','function(p)',arguments);var x=(p.x-this.x)*fx+this.x;var y=(p.y-this.y)*fy+this.y;this.updatePoint(x,y,p);}.bind(this));this._updatePath();return this;},getSize:function(){return{w:this.w,h:this.h}},setLocation:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2785,'var x=(p.x-this.x)*fx+this.x;var y=(p.y-this.y)*fy+this.y;this.updatePoint(x,y,p);}.bind(this));this._updatePath();return this;},getSize:function(){return{w:this.w,h:this.h}},setLocation:','function(x,y)',arguments);var dx=x-this.x;var dy=y-this.y;this.points.each(function(p){var x=p.x+dx;var y=p.y+dy;this.updatePoint(x,y,p);});this._updatePath();return this;},getLocation:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2786,'var dx=x-this.x;var dy=y-this.y;this.points.each(function(p){var x=p.x+dx;var y=p.y+dy;this.updatePoint(x,y,p);});this._updatePath();return this;},getLocation:','function()',arguments);return{x:this.x,y:this.y}},_updateBounds:function(){var xmin=0,ymin=0,xmax=0,ymax=0;if(this.points.length>0){var xmin=parseFloat(this.points[0].x),ymin=parseFloat(this.points[0].y),xmax=parseFloat(this.points[0].x),ymax=parseFloat(this.points[0].y);xmin=parseFloat(xmin);this.points.each(function(p){p.x=parseFloat(p.x);p.y=parseFloat(p.y);if(p.x<xmin)xmin=p.x;if(p.x>xmax)xmax=p.x;if(p.y<ymin)ymin=p.y;if(p.y>ymax)ymax=p.y;});this.x=xmin;this.y=ymin;this.w=xmax-xmin;this.h=ymax-ymin;}
else{this.x=0;this.y=0;this.w=0;this.h=0;};},_clip:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2788,'else{this.x=0;this.y=0;this.w=0;this.h=0;};},_clip:','function(points)',arguments);var box=this.mapStatus.getScreenClippingArea().times(2);var poly=new Poly(points,this.nodeName);box.clipPoly(poly);return poly.points;},getTotalDistance:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2789,'var box=this.mapStatus.getScreenClippingArea().times(2);var poly=new Poly(points,this.nodeName);box.clipPoly(poly);return poly.points;},getTotalDistance:','function(points)',arguments);return this.getDistanceBetweenWorldPoints(this.worldPoints);},_updatePath:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2790,'return this.getDistanceBetweenWorldPoints(this.worldPoints);},_updatePath:','function()',arguments);var clippedPoints=this._clip(this.points);var path="";clippedPoints.each(function(p){path+=p.x+" "+p.y+","});path=path.slice(0,path.length-1);this._updateBounds();this._setAttribute("points",path);}})
Graphic.Group=Class.create();Object.extend(Graphic.Group.prototype,Graphic.Shape.prototype);Graphic.Group.prototype._parentInitialize=Graphic.Shape.prototype.initialize;Graphic.Group.prototype._parentPostTransform=Graphic.Shape.prototype.postTransform;Graphic.Group.prototype._parentPreTransform=Graphic.Shape.prototype.preTransform;Object.extend(Graphic.Group.prototype,{initialize:function(renderer){this._parentInitialize(renderer,"g");this.children=new Array();return this;},destroy:function(){this.children.each(function(e){e.destroy();});this.children.clear();this.renderer.remove(this);},add:function(shape){var hasShape=this.children.find(function(s){return s==shape});if(!hasShape){this.children.push(shape);shape.parent=this;shape.originalMatrix=shape.matrix;this.renderer.add(shape,this);}},remove:function(shape){var hasShape=this.children.find(function(s){return s==shape});if(hasShape){this.children=this.children.reject(function(s){return s==shape});this.renderer.remove(shape);shape.parent=null;}},get:function(index){return(index>=0&&index<this.children.length?this.children[index]:null);},getNbELements:function(){return this.children.length;},getSize:function(){if(this.getNbELements()==0)
return{w:0,h:0};var first=this.children.first()
var bounds=(first.getBounds());var xmin=bounds.x;var ymin=bounds.y;var xmax=bounds.x+bounds.w;var ymax=bounds.y+bounds.h;this.children.each(function(shape){var bounds=(shape.getBounds());xmin=Math.min(xmin,bounds.x);xmax=Math.max(xmax,bounds.x+bounds.w);ymin=Math.min(ymin,bounds.y);ymax=Math.max(ymax,bounds.y+bounds.h);});return{w:xmax-xmin,h:ymax-ymin};},getLocation:function(){if(this.getNbELements()==0)
return{x:0,y:0};var first=this.children.first()
var bounds=(first.getBounds());var xmin=bounds.x;var ymin=bounds.y;this.children.each(function(shape){var bounds=(shape.getBounds());xmin=Math.min(xmin,bounds.x);ymin=Math.min(ymin,bounds.y);});return{x:xmin,y:ymin};},postTransform:function(matrix){this._parentPostTransform(matrix);this.children.each(function(shape){shape.postTransform(matrix);});return this;},preTransform:function(matrix){this._parentPreTransform(matrix);this.children.each(function(shape){shape.preTransform(matrix);});return this;},find:function(shapeId){return this.children.find(function(s){return s.getID()==shapeId});},findAll:function(shapeType){return this.children.findAll(function(s){return s.getType()==shapeType});}})
Graphic.VMLRenderer=Class.create();Object.extend(Graphic.VMLRenderer,{init:false,createNode:function(nodeName){return document.createElement(nodeName);},initBrowser:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2797,'Graphic.VMLRenderer=Class.create();Object.extend(Graphic.VMLRenderer,{init:false,createNode:function(nodeName){return document.createElement(nodeName);},initBrowser:','function()',arguments);if(!Graphic.VMLRenderer.init&&document.readyState=="complete"){if(!document.namespaces["v"]){document.namespaces.add("v","urn:schemas-microsoft-com:vml");}
var ss=document.createStyleSheet();ss.cssText="v\\:* {behavior:url(#default#VML);display:inline; position:absolute}";Graphic.VMLRenderer.init=true;}}})
Object.extend(Graphic.VMLRenderer.prototype,Graphic.AbstractRender.prototype);Graphic.VMLRenderer.prototype._parentInitialize=Graphic.AbstractRender.prototype.initialize;Graphic.VMLRenderer.prototype._parentSetSize=Graphic.AbstractRender.prototype.setSize;Object.extend(Graphic.VMLRenderer.prototype,{initialize:function(element){Graphic.VMLRenderer.initBrowser();this._parentInitialize(element);this.element=Graphic.VMLRenderer.createNode("v:group");this.element.style.height=this.bounds.h+"px";this.element.style.width=this.bounds.w+"px";this._setViewing();this.element.graphicNode=this;$(element).appendChild(this.element);},destroy:function(){$A(this.element.childNodes).each(function(node){if(node.shape){node.shape.destroy();}else{node.parentNode.removeChild(node);}})
this.element.parentNode.removeChild(this.element);},setSize:function(width,height){this._parentSetSize(width,height);this.element.style.height=this.bounds.h+"px";this.element.style.width=this.bounds.w+"px";this.zoom(this.viewing.sx,this.viewing.sy)},createShape:function(shape){var node=null;switch(shape.nodeName){case"rect":node=Graphic.VMLRenderer.createNode("v:roundrect");node.arcsize=0;break;case"ellipse":case"circle":node=Graphic.VMLRenderer.createNode("v:oval");break;case"polygon":case"polyline":node=Graphic.VMLRenderer.createNode("v:shape");node.style.height=this.bounds.h+"px";node.style.width=this.bounds.w+"px";node.coordsize=this.bounds.w+", "+this.bounds.h;node.coordorigin="0, 0";break;case"line":node=Graphic.VMLRenderer.createNode("v:line");break;case"g":node=Graphic.VMLRenderer.createNode("v:group");node.stroked="false";node.filled="false";node.style.height=this.bounds.w+"px";node.style.width=this.bounds.h+"px";node.coordsize=this.bounds.w+", "+this.bounds.h;node.coordorigin="0, 0";break;default:break;}
if(!node)
return null;if(shape.nodeName!="g"&&shape.nodeName!="image"){var fill=Graphic.VMLRenderer.createNode("v:fill");fill.on="false";node.appendChild(fill);node.fill=fill;var stroke=Graphic.VMLRenderer.createNode("v:stroke");stroke.on="false";node.appendChild(stroke);node.stroke=stroke;var skew=Graphic.VMLRenderer.createNode("v:skew");skew.on="true";node.appendChild(skew);node.skew=skew;}
return node;},add:function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2804,'return node;},add:','function(shape)',arguments);if(shape.getRendererObject().parentNode==null)
{return;}
if(shape.parent){shape.parent.getRendererObject().appendChild(shape.getRendererObject());this.updateAttributes(shape,shape.attributes);}
else{if(shape&&shape.getRendererObject())
this.element.appendChild(shape.getRendererObject());}},remove:function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2809,'this.element.appendChild(shape.getRendererObject());}},remove:','function(shape)',arguments);if(shape.parent)
{shape.parent.getRendererObject().removeChild(shape.getRendererObject());}
else if(shape.getRendererObject().parentNode!=null)
{this.element.removeChild(shape.getRendererObject());}},get:function(id){var element=$(id)
return element&&element.shape?element.shape:null;},shapes:function(){return $A(this.element.childNodes).collect(function(element){return element.shape});},clear:function(){$A(this.element.childNodes).each(function(element){element.shape.destroy();})},updateAttributes:function(shape,attributes){var element=shape.element;if(!element)
return;$H(attributes).keys().each(function(key)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2815,'return;$H(attributes).keys().each(','function(key)',arguments);switch(key){case"width":case"height":element.style[key]=attributes[key]+"px";break;case"cx":case"cy":case"rx":case"ry":case"r":if(element.nodeName!="roundrect"){var rx=typeof shape.attributes.rx!="undefined"?shape.attributes.rx:shape.attributes.r;var ry=typeof shape.attributes.ry!="undefined"?shape.attributes.ry:shape.attributes.r;element.style.left=(shape.attributes.cx-rx).toFixed();element.style.top=(shape.attributes.cy-ry).toFixed();element.style.width=(rx*2).toFixed();element.style.height=(ry*2).toFixed();}
break;case"x":element.style["left"]=attributes[key]+"px";break;case"y":element.style["top"]=attributes[key]+"px";break;case"fill":if(element.fill){element.fill.color=attributes[key].parseColor();element.fill.on="true";}
break;case"fill-opacity":if(element.fill){if(attributes[key]=="none"){element.fill.on="false";}
else{element.fill.opacity=attributes[key];element.fill.on="true";}}
break;case"stroke":if(element.stroke){if(attributes[key]=="none"){element.stroke.on="false";}
else{element.stroke.color=attributes[key].parseColor();element.stroke.on="true";}}
break;case"stroke-opacity":if(element.stroke){element.stroke.opacity=attributes[key];element.stroke.on="true";}
break;case"stroke-width":if(element.stroke){element.stroke.weight=attributes[key]+"px";element.stroke.on="true";}
break;case"points":var p=shape.getPoints();var attr=[];if(p.length>0)
{attr.push("m");var pnt=this.getPoint(p[0]);attr.push(pnt.x.toFixed());attr.push(pnt.y.toFixed());if(p.length>1)
{attr.push("l");for(var i=1;i<p.length;++i)
{var pnt=this.getPoint(p[i]);attr.push(pnt.x.toFixed());attr.push(pnt.y.toFixed());}}}
if(shape.getType()=="polygon")
attr.push("x");else
attr.push("e");element.path=attr.join(" ");break;case"x1":element.from=shape.attributes.x1.toFixed()+" "+shape.attributes.y1.toFixed();element.to=shape.attributes.x2.toFixed()+" "+shape.attributes.y2.toFixed();break
case"id":element.id=attributes[key]
break;case"class":element.id=attributes[key]
break;case"href":element.firstChild.src=attributes[key]
break;default:break;}}.bind(this));},getPoint:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2834,'break;default:break;}}.bind(this));},getPoint:','function(point)',arguments);if(point.length==2)
{return new Point(point[0],point[1]);}
else
{return point;}},updateTransform:function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2838,'{return point;}},updateTransform:','function(shape)',arguments);if(!shape.element)
return;var matrix=shape.getMatrix();if(shape instanceof Graphic.Group&&shape.children){shape.children.each(function(s){var m=s.getMatrix()
this._updateSkew(s,Matrix.multiply(matrix,m))}.bind(this))}
else if(shape instanceof Graphic.Image){}
else{this._updateSkew(shape,matrix);}},_updateSkew:function(shape,matrix){if(!shape.element.skew)
return;var bounds=shape.getBounds();shape.element.skew.on="false";shape.element.skew.matrix=matrix.xx.toFixed(8)+" "+matrix.xy.toFixed(8)+" "+matrix.yx.toFixed(8)+" "+matrix.yy.toFixed(8)+" 0 0";pt={x:matrix.dx,y:matrix.dy}
shape.element.skew.offset=Math.floor(pt.x).toFixed()+"px "+Math.floor(pt.y).toFixed()+"px";shape.element.skew.origin=((bounds.w!=0?-bounds.x/bounds.w:1)-0.5).toFixed(8)+" "+((bounds.h!=0?-bounds.y/bounds.h:1)-0.5).toFixed(8);shape.element.skew.on="true";},nbShapes:function(){return this.element.childNodes.length;},moveToFront:function(node){if(this.nbShapes()>0){this.element.appendChild(node.element);}},moveToBack:function(node){if(this.nbShapes()>0){this.element.insertBefore(node.element,this.element.firstChild);}},show:function(shape){shape.element.style.display="block";},hide:function(shape){shape.element.style.display="none";},draw:function(){},pick:function(event){var element=Event.element(event);return element==this.element.parent?null:element.shape;},position:function(){if(this.offset==null)
this.offset=Position.cumulativeOffset(this.element.parentNode);return this.offset;},addComment:function(shape,text){shape.element.appendChild(document.createComment(text));},addText:function(shape,text){},_setViewing:function(){var bounds=this.viewingMatrix.multiplyBounds(this.bounds);this.element.coordsize=bounds.w+", "+bounds.h;this.element.coordorigin=bounds.x+", "+bounds.y;}});Graphic.SVGRenderer=Class.create();Object.extend(Graphic.SVGRenderer,{xmlns:{svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink"},createNode:function(nodeName){return document.createElementNS(Graphic.SVGRenderer.xmlns.svg,nodeName);}})
Object.extend(Graphic.SVGRenderer.prototype,Graphic.AbstractRender.prototype);Graphic.SVGRenderer.prototype._parentInitialize=Graphic.AbstractRender.prototype.initialize;Graphic.SVGRenderer.prototype._parentSetSize=Graphic.AbstractRender.prototype.setSize;Object.extend(Graphic.SVGRenderer.prototype,{initialize:function(element){this._parentInitialize(element);this.element=Graphic.SVGRenderer.createNode("svg");this.element.setAttribute("width",this.bounds.w);this.element.setAttribute("height",this.bounds.h);this.element.setAttribute("preserveAspectRatio","none");this._setViewing();this.element.shape=this;$(element).appendChild(this.element);},destroy:function(){$A(this.element.childNodes).each(function(node){if(node.shape){node.shape.destroy();}else{node.parentNode.removeChild(node);}})
this.element.parentNode.removeChild(this.element);},setSize:function(width,height){this._parentSetSize(width,height);this.element.setAttribute("width",this.bounds.w);this.element.setAttribute("height",this.bounds.h);this.zoom(this.viewing.sx,this.viewing.sy)},createShape:function(shape){return Graphic.SVGRenderer.createNode(shape.nodeName);},add:function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2848,'this.element.parentNode.removeChild(this.element);},setSize:function(width,height){this._parentSetSize(width,height);this.element.setAttribute("width",this.bounds.w);this.element.setAttribute("height",this.bounds.h);this.zoom(this.viewing.sx,this.viewing.sy)},createShape:function(shape){return Graphic.SVGRenderer.createNode(shape.nodeName);},add:','function(shape)',arguments);if(shape.getRendererObject().parentNode)
{return;}
if(shape.parent)
shape.parent.getRendererObject().appendChild(shape.getRendererObject());else
this.element.appendChild(shape.getRendererObject());},remove:function(shape){if(shape.parent)
{shape.parent.getRendererObject().removeChild(shape.getRendererObject());}
else if(shape.getRendererObject().parentNode)
{shape.getRendererObject().parentNode.removeChild(shape.getRendererObject());}},get:function(id){var element=$(id)
return element&&element.shape?element.shape:null;},shapes:function(){return $A(this.element.childNodes).collect(function(element){return element.shape});},clear:function(){$A(this.element.childNodes).each(function(element){element.shape.destroy();})},updateAttributes:function(shape,attributes){$H(attributes).keys().each(function(key){if(key=="href")
shape.element.setAttributeNS(Graphic.SVGRenderer.xmlns.xlink,"href",attributes[key]);else
shape.element.setAttribute(key,attributes[key])});},updateTransform:function(shape){if(shape.nodeName!="g")
shape.element.setAttribute("transform","matrix("+shape.getMatrix().values().join(",")+")");},nbShapes:function(){return this.element.childNodes.length;},moveToFront:function(node){if(this.nbShapes()>0){this.element.appendChild(node.element);}},moveToBack:function(node){if(this.nbShapes()>0){this.element.insertBefore(node.element,this.element.firstChild);}},show:function(shape){shape.element.style.display="block";},hide:function(shape){shape.element.style.display="none";},draw:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2860,'shape.element.setAttribute("transform","matrix("+shape.getMatrix().values().join(",")+")");},nbShapes:function(){return this.element.childNodes.length;},moveToFront:function(node){if(this.nbShapes()>0){this.element.appendChild(node.element);}},moveToBack:function(node){if(this.nbShapes()>0){this.element.insertBefore(node.element,this.element.firstChild);}},show:function(shape){shape.element.style.display="block";},hide:function(shape){shape.element.style.display="none";},draw:','function()',arguments);},pick:function(event){var element=Event.element(event);return element==this.element?null:element.shape;},position:function(){if(this.offset==null)
this.offset=Position.cumulativeOffset(this.element.parentNode);return this.offset;},addComment:function(shape,text){shape.element.appendChild(document.createComment(text));},addText:function(shape,text){shape.element.appendChild(document.createTextNode(text));},_setViewing:function(){var bounds=this.viewingMatrix.multiplyBounds(this.bounds);this.element.setAttribute("viewBox",bounds.x+" "+bounds.y+" "+bounds.w+" "+bounds.h);}});Graphic.CanvasRenderer=Class.create();Object.extend(Graphic.CanvasRenderer.prototype,Graphic.AbstractRender.prototype);Graphic.CanvasRenderer.prototype._parentInitialize=Graphic.AbstractRender.prototype.initialize;Graphic.CanvasRenderer.prototype._parentSetSize=Graphic.AbstractRender.prototype.setSize;Object.extend(Graphic.CanvasRenderer.prototype,{initialize:function(element){this._parentInitialize(element);this.element=document.createElement("canvas");this.element.setAttribute("width",this.bounds.w);this.element.setAttribute("height",this.bounds.h);this.element.shape=this;$(element).appendChild(this.element);this.context=this.element.getContext("2d");this.nodes=new Array();this.offset=Position.cumulativeOffset(this.element.parentNode);},destroy:function(){this.nodes.clear();this.element.parentNode.removeChild(this.element);},setSize:function(width,height){this._parentSetSize(width,height);this.element.setAttribute("width",this.bounds.w);this.element.setAttribute("height",this.bounds.h);this.zoom(this.viewing.sx,this.viewing.sy)},add:function(shape,parent){if(parent!=null)
{this.nodes.push(shape);this.show(shape);}
if(shape.element)
{this.nodes.push(shape);this.show(shape);}},shapes:function(){return this.nodes;},updateAttributes:function(shape,attributes){},updateTransform:function(shape){},createShape:function(shape){var canvasShape=null;switch(shape.nodeName){case"rect":canvasShape=new CanvasRect(shape);break;case"ellipse":canvasShape=new CanvasEllipse(shape);break;case"circle":canvasShape=new CanvasCircle(shape);break;case"polygon":canvasShape=new CanvasPolygon(shape,true);break;case"polyline":canvasShape=new CanvasPolygon(shape,false);break;case"line":canvasShape=new CanvasLine(shape);break;case"image":canvasShape=new CanvasImage(shape);break;default:break;}
return canvasShape;},draw:function(){var context=this.context;context.clearRect(this.bounds.x,this.bounds.y,this.bounds.w,this.bounds.h);context.save();context.translate(-this.viewing.tx,-this.viewing.ty);context.translate(this.viewing.cx,this.viewing.cy);context.scale(this.viewing.sx,this.viewing.sy);context.translate(-this.viewing.cx,-this.viewing.cy);this.nodes.each(function(n)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2866,'return canvasShape;},draw:function(){var context=this.context;context.clearRect(this.bounds.x,this.bounds.y,this.bounds.w,this.bounds.h);context.save();context.translate(-this.viewing.tx,-this.viewing.ty);context.translate(this.viewing.cx,this.viewing.cy);context.scale(this.viewing.sx,this.viewing.sy);context.translate(-this.viewing.cx,-this.viewing.cy);this.nodes.each(','function(n)',arguments);if(n.element&&(n.visible&&(!n.parent||(n.parent.visible))))
{n.element.draw(this)};}.bind(this));},show:function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2868,'{n.element.draw(this)};}.bind(this));},show:','function(shape)',arguments);shape.visible=true;},hide:function(shape)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2869,'shape.visible=true;},hide:','function(shape)',arguments);shape.visible=false;},pick:function(event){var pt=this.viewingMatrix.multiplyPoint(Event.pointerX(event)-this.offset[0],Event.pointerY(event)-this.offset[1]);var element=null;for(var i=this.nodes.length-1;i>=0;i--){if(this.nodes[i].element.pick(pt.x,pt.y))
break;}
return(i<0?null:this.nodes[i]);},moveToFront:function(shape){var node=this.nodes.find(function(s){if(s==shape)return true});this.nodes=this.nodes.without(node);this.nodes.push(node);},moveToBack:function(node){var node=this.nodes.find(function(s){if(s==shape)return true});this.nodes=this.nodes.without(node);this.nodes.unshift(node);},_setViewing:function(){this.draw();},fill:function(attributes){if(attributes.fill&&attributes.fill!="none"){this.context.fillStyle=attributes.fill;this.context.globalAlpha=attributes["fill-opacity"];this.context.fill();}},stroke:function(attributes){this.context.strokeStyle=attributes.stroke;this.context.lineWidth=attributes["stroke-width"]
this.context.globalAlpha=attributes["stroke-opacity"];this.context.stroke();},moveTo:function(matrix,x,y){var p=matrix.multiplyPoint(x,y);this.context.moveTo(p.x,p.y);},lineTo:function(matrix,x,y){var p=matrix.multiplyPoint(x,y);this.context.lineTo(p.x,p.y);},bezierCurveTo:function(matrix,cp1x,cp1y,cp2x,cp2y,x,y){var cp1=matrix.multiplyPoint(cp1x,cp1y);var cp2=matrix.multiplyPoint(cp2x,cp2y);var p=matrix.multiplyPoint(x,y);this.context.bezierCurveTo(cp1.x,cp1.y,cp2.x,cp2.y,p.x,p.y);}});CanvasRect=Class.create();CanvasRect.prototype={initialize:function(shape){this.shape=shape;},draw:function(renderer){var context=renderer.context;var matrix=this.shape.getMatrix();context.save();with(this.shape){context.beginPath();renderer.moveTo(matrix,attributes.x,attributes.y);renderer.lineTo(matrix,attributes.x+attributes.width,attributes.y);renderer.lineTo(matrix,attributes.x+attributes.width,attributes.y+attributes.height);renderer.lineTo(matrix,attributes.x,attributes.y+attributes.height);context.closePath();renderer.fill(attributes);renderer.stroke(attributes);}
context.restore();},pick:function(x,y){var pt=this.shape.getInverseMatrix().multiplyPoint(x,y);var a=this.shape.attributes;return a.x<=pt.x&&pt.x<=a.x+a.width&&a.y<=pt.y&&pt.y<=a.y+a.height;}}
CanvasEllipse=Class.create();CanvasEllipse.prototype={initialize:function(shape){this.shape=shape;},draw:function(renderer){var context=renderer.context;var matrix=this.shape.getMatrix();context.save();with(this.shape){var KAPPA=4*((Math.sqrt(2)-1)/3);var rx=attributes.rx;var ry=attributes.ry;var cx=attributes.cx;var cy=attributes.cy;context.beginPath();renderer.moveTo(matrix,cx,cy-ry);renderer.bezierCurveTo(matrix,cx+(KAPPA*rx),cy-ry,cx+rx,cy-(KAPPA*ry),cx+rx,cy);renderer.bezierCurveTo(matrix,cx+rx,cy+(KAPPA*ry),cx+(KAPPA*rx),cy+ry,cx,cy+ry);renderer.bezierCurveTo(matrix,cx-(KAPPA*rx),cy+ry,cx-rx,cy+(KAPPA*ry),cx-rx,cy);renderer.bezierCurveTo(matrix,cx-rx,cy-(KAPPA*ry),cx-(KAPPA*rx),cy-ry,cx,cy-ry);context.closePath();renderer.fill(attributes);renderer.stroke(attributes);}
context.restore();},pick:function(x,y){return false;}}
CanvasCircle=Class.create();CanvasCircle.prototype={initialize:function(shape){this.shape=shape;},draw:function(renderer){var context=renderer.context;var matrix=this.shape.getMatrix();context.save();with(this.shape){context.beginPath();var c=matrix.multiplyPoint(attributes.cx,attributes.cy);context.arc(c.x,c.y,attributes.r,0,Math.PI*2,1)
context.closePath();renderer.fill(attributes);renderer.stroke(attributes);}
context.restore();},pick:function(x,y){return false;}}
CanvasPolygon=Class.create();CanvasPolygon.prototype={initialize:function(shape,closed){this.shape=shape;this.closed=closed;},draw:function(renderer)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2880,'CanvasPolygon=Class.create();CanvasPolygon.prototype={initialize:function(shape,closed){this.shape=shape;this.closed=closed;},draw:','function(renderer)',arguments);if(this.shape.getPoints().length==0)
return;var context=renderer.context;var matrix=this.shape.getMatrix();context.save();with(this.shape){context.beginPath();var first=getPoints()[0];renderer.moveTo(matrix,first.x,first.y);getPoints().each(function(point){renderer.lineTo(matrix,point.x,point.y);});if(this.closed)
context.closePath();renderer.fill(attributes);renderer.stroke(attributes);}
context.restore();},pick:function(x,y){return false;}}
CanvasLine=Class.create();CanvasLine.prototype={initialize:function(shape){this.shape=shape;},draw:function(renderer){var context=renderer.context;var matrix=this.shape.getMatrix();context.save();with(this.shape){if(attributes.x1&&attributes.x2&&attributes.x3&&attributes.x4)
{context.beginPath();renderer.moveTo(matrix,attributes.x1,attributes.y1);renderer.lineTo(matrix,attributes.x2,attributes.y2);renderer.stroke(attributes);}}
context.restore();},pick:function(x,y){return false;}}
CanvasImage=Class.create();CanvasImage.prototype={initialize:function(shape){this.shape=shape;this.loaded=false;},draw:function(renderer){var context=renderer.context;var matrix=this.shape.getMatrix();context.save();with(this.shape){if(image){var p=matrix.multiplyPoint(attributes.x,attributes.y);if(!this.loaded)
Event.observe(image,"load",function(){context.drawImage(image,p.x,p.y);this.loaded=true;}.bind(this));else
context.drawImage(image,p.x,p.y);}}
context.restore();},pick:function(x,y){return false;}}
Graphic.DrawingTool=Class.create();Object.extend(Graphic.DrawingTool.prototype,Graphic.Tool.prototype);Object.extend(Graphic.DrawingTool.prototype,{initialize:function(){this.renderer=null;this.shape=null;},activate:function(manager){this.renderer=manager.renderer;},unactivate:function(manager){this.renderer=null;},initDrag:function(x,y,event){this.polyline=new Graphic.Polyline(this.renderer);this.polyline.setStroke(this._randomStroke());this.polyline.addPoint(x,y);this.renderer.add(this.polyline)
this.renderer.draw();},drag:function(x,y,dx,dy,ddx,ddy,event){if(this.polyline){this.polyline.addPoint(x,y);this.renderer.draw();}},endDrag:function(x,y,event){if(this.polyline){this.polyline=null;}},mouseMove:function(x,y,event){},_randomStroke:function(){var r=Math.floor(255*Math.random());var g=Math.floor(255*Math.random());var b=Math.floor(255*Math.random());var a=128+Math.floor(128*Math.random());var w=5+Math.floor(5*Math.random());return{r:r,g:g,b:b,a:a,w:w}}});Graphic.SelectTool=Class.create();Object.extend(Graphic.SelectTool.prototype,Graphic.Tool.prototype);Object.extend(Graphic.SelectTool.prototype,{initialize:function(){this.renderer=null;this.shape=null;},activate:function(manager){this.renderer=manager.renderer;},unactivate:function(manager){this.renderer=null;},initDrag:function(x,y,event){this.shape=this.renderer.pick(event);if(this.shape&&this.shape.notSelectable)
this.shape=null;if(this.shape){this.shape.moveToFront();this.x=x;this.y=y;this.renderer.draw();}},drag:function(x,y,dx,dy,ddx,ddy,event){if(this.shape){this.shape.preTransform(Matrix.translate(ddx,ddy));this.renderer.draw();}},endDrag:function(x,y,event){if(this.shape){EventNotifier.send(this,"shapeHasBeenMoved",{shape:this.shape,dx:x-this.x,dy:y-this.y});this.shape=null;}},mouseMove:function(x,y,event){}});Graphic.RectangleTool=Class.create();Object.extend(Graphic.RectangleTool.prototype,Graphic.Tool.prototype);Object.extend(Graphic.RectangleTool.prototype,{initialize:function(){this.renderer=null;this.rect=null;this.stroke={r:127,g:156,b:215,a:255,w:3}
this.fill={r:200,g:230,b:255,a:128}},activate:function(manager){this.renderer=manager.renderer;},unactivate:function(manager){this.renderer=null;},initDrag:function(x,y,event){this.rect=new Graphic.Rectangle(this.renderer);this.rect.setStroke(this.stroke);this.rect.setFill(this.fill);this.rect.setBounds(x,y,1,1);this.x=x;this.y=y;this.renderer.add(this.rect)
this.renderer.draw();},drag:function(x,y,dx,dy,ddx,ddy,event){if(this.rect){var d=Math.max(Math.abs(dx),Math.abs(dy))
if(event.shiftKey){dx=dx<0?-d:d;dy=dy<0?-d:d;}
this.rect.setBounds(dx<0?this.x+dx:this.x,dy<0?this.y+dy:this.y,Math.abs(dx),Math.abs(dy));this.renderer.draw();}},endDrag:function(x,y,event){if(this.rect){this.rect=null;}},getStroke:function(){return this.stroke;},setStroke:function(stroke){this.stroke=stroke;},getFill:function(){return this.fill;},setFill:function(fill){this.fill=fill;}});Graphic.HighlightTool=Class.create();Object.extend(Graphic.HighlightTool.prototype,Graphic.Tool.prototype);Object.extend(Graphic.HighlightTool.prototype,{initialize:function(groupId){this.renderer=null;this.shape=null;this.groupId=groupId;},activate:function(manager){this.renderer=manager.renderer;},unactivate:function(manager){this.renderer=null;},click:function(x,y,event){this.shape=this.renderer.pick(event);if(this.shape){if(!this.groupId||$A($(this.groupId).childNodes).indexOf(this.shape.element)!=-1){EventNotifier.send(this,"shapeHasBeenClicked",{shape:this.shape,x:Event.pointerX(event),y:Event.pointerY(event)});}}},doubleClick:function(x,y,event){this.shape=this.renderer.pick(event);if(this.shape){if(!this.groupId||$A($(this.groupId).childNodes).indexOf(this.shape.element)!=-1){EventNotifier.send(this,"shapeHasBeenDoubleClicked",{shape:this.shape,x:Event.pointerX(event),y:Event.pointerY(event)});}}},mouseOver:function(x,y,event){this.shape=this.renderer.pick(event);if(this.shape){if(!this.groupId||$A($(this.groupId).childNodes).indexOf(this.shape.element)!=-1){switch(this.shape.element.nodeName){case'line':case'polyline':case'shape':case'text':var originalItemColor=this.shape.getStroke();break;default:var originalItemColor=this.shape.getFill();}
if(originalItemColor.indexOf("rgb")==0){originalItemColor=originalItemColor.substring(4,originalItemColor.length-1);originalItemColor=originalItemColor.split(',');originalItemColor={r:originalItemColor[0],g:originalItemColor[1],b:originalItemColor[2]};originalItemColor.a=(this.shape.getFillOpacity()*255);originalItemColor.w=(this.shape.getStrokeWidth());Graphic.HighlightTool.highlightColor.w=this.shape.getStrokeWidth();}
this.shape.originalItemColor=originalItemColor;switch(this.shape.element.nodeName){case'line':case'polyline':case'shape':case'text':this.shape.setStroke(Graphic.HighlightTool.highlightColor);break;default:this.shape.setFill(Graphic.HighlightTool.highlightColor);}
this.renderer.moveToBack(this.shape)
this.renderer.draw();EventNotifier.send(this,"shapeHasBeenHighlighted",{shape:this.shape,x:Event.pointerX(event),y:Event.pointerY(event)});}}},mouseOut:function(event){this.shape=this.renderer.pick(event);if(this.shape){if(!this.groupId||$A($(this.groupId).childNodes).indexOf(this.shape.element)!=-1){switch(this.shape.element.nodeName){case'line':case'polyline':case'shape':case'text':this.shape.setStroke(this.shape.originalItemColor);break;default:this.shape.setFill(this.shape.originalItemColor);}
this.renderer.draw();EventNotifier.send(this,"shapeHasBeenUnHighlighted",{shape:this.shape});}}}});Graphic.HighlightTool.highlightColor={r:204,g:227,b:255,a:0};Graphic.PolylineTool=Class.create();Object.extend(Graphic.PolylineTool.prototype,Graphic.Tool.prototype);Object.extend(Graphic.PolylineTool.prototype,{initialize:function(){this.renderer=null;this.polyline=null;this.stroke={r:127,g:156,b:215,a:255,w:3}
this.fill={r:200,g:230,b:255,a:128}
this.usePolygon=false;},activate:function(manager){this.renderer=manager.renderer;},unactivate:function(manager){this.renderer=null;},setUsePolygon:function(on){this.usePolygon=on;},initDrag:function(x,y,event){if(this.polyline==null)
{this.polyline=this.usePolygon?new Graphic.Polygon(this.renderer):new Graphic.Polyline(this.renderer);this.polyline.setStroke(this.stroke);if(this.usePolygon)
this.polyline.setFill(this.fill);this.polyline.addPoint(x,y);this.renderer.add(this.polyline);}
this.polyline.addPoint(x,y);this.renderer.draw();Utility.disableSelection();},drag:function(x,y,dx,dy,ddx,ddy,event){this.mouseMove(x,y,event);},endDrag:function(x,y,event){},mouseMove:function(x,y,event){if(this.polyline){this.polyline.setPoint(x,y,this.polyline.getNbPoints()-1);this.renderer.draw();}},doubleClick:function(x,y,event){this.polyline=null;Utility.enableSelection();},getStroke:function(){return this.stroke;},setStroke:function(stroke){this.stroke=stroke;},getFill:function(){return this.fill;},setFill:function(fill){this.fill=fill;},translate:function(tx,ty)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2908,'this.polyline.addPoint(x,y);this.renderer.draw();Utility.disableSelection();},drag:function(x,y,dx,dy,ddx,ddy,event){this.mouseMove(x,y,event);},endDrag:function(x,y,event){},mouseMove:function(x,y,event){if(this.polyline){this.polyline.setPoint(x,y,this.polyline.getNbPoints()-1);this.renderer.draw();}},doubleClick:function(x,y,event){this.polyline=null;Utility.enableSelection();},getStroke:function(){return this.stroke;},setStroke:function(stroke){this.stroke=stroke;},getFill:function(){return this.fill;},setFill:function(fill){this.fill=fill;},translate:','function(tx,ty)',arguments);return this.polyline.translate(tx,ty);}});Graphic.EzmapsScribbleTool=Class.extend(Graphic.Tool,{renderer:null,polylineArray:null,state:0,readyforNewPoint:true,usePolygon:false,mapStatus:null,pointers:null,groupCirclesArray:null,pointer:null,oldPointer:null,tempPoint:null,mouseOverMap:false,bufferMousePoint:null,singlePoint:false,id:null,options:null,rightClickRefPoint:null,initialize:function(mapStatus,options)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2909,'return this.polyline.translate(tx,ty);}});Graphic.EzmapsScribbleTool=Class.extend(Graphic.Tool,{renderer:null,polylineArray:null,state:0,readyforNewPoint:true,usePolygon:false,mapStatus:null,pointers:null,groupCirclesArray:null,pointer:null,oldPointer:null,tempPoint:null,mouseOverMap:false,bufferMousePoint:null,singlePoint:false,id:null,options:null,rightClickRefPoint:null,initialize:','function(mapStatus,options)',arguments);this.polylineArray=new Array();this.groupCirclesArray=new Array();this.pointers=new Array();this.mapStatus=mapStatus;this.options={callbackFunction:null,id:null,fill:{r:243,g:107,b:0,a:128},stroke:{r:27,g:127,b:200,a:180,w:4},shapeType:"polygon"};Object.extend(this.options,options||{});switch(this.options.shapeType)
{case"hotspot":this.singlePoint=true;break;case"polygon":this.usePolygon=true;break;}
this.bufferMousePoint=new Point();},getToolMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2912,'this.bufferMousePoint=new Point();},getToolMode:','function()',arguments);return this.options.shapeType;},nihilate:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2913,'return this.options.shapeType;},nihilate:','function()',arguments);this.reset();},reset:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2914,'this.reset();},reset:','function()',arguments);this.polylineArray.invoke("destroy");this.groupCirclesArray.invoke("destroy");this.polylineArray=new Array();this.groupCirclesArray=new Array();this.tempPoint=null;this.pointer=null;this.state=0;this.mapStatus.eventHandler.setCursor("default");},activate:function(manager)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2915,'this.polylineArray.invoke("destroy");this.groupCirclesArray.invoke("destroy");this.polylineArray=new Array();this.groupCirclesArray=new Array();this.tempPoint=null;this.pointer=null;this.state=0;this.mapStatus.eventHandler.setCursor("default");},activate:','function(manager)',arguments);this.renderer=manager.renderer;},unactivate:function(manager)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2916,'this.renderer=manager.renderer;},unactivate:','function(manager)',arguments);this.endDrawingPoly();},setUsePolygon:function(on)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2917,'this.endDrawingPoly();},setUsePolygon:','function(on)',arguments);this.usePolygon=on;},rightMouseDown:function(point,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2918,'this.usePolygon=on;},rightMouseDown:','function(point,event)',arguments);this.rightClickRefPoint=this.getCircleFromPoint(point.x,point.y);if(this.rightClickRefPoint)
return true;return false;},rightClick:function(point,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2920,'return true;return false;},rightClick:','function(point,event)',arguments);var pointref=this.getCircleFromPoint(point.x,point.y);if(pointref&&this.rightClickRefPoint)
{this.deletePoint(pointref);this.rightClickRefPoint=null;return true;}
return false;},loadNonEditPoints:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2923,'return false;},loadNonEditPoints:','function(points)',arguments);if(!this.polylineArray.last())
{this.addNewPolyLine();this.state=(this.state)?this.state:1;}
var l=points.size();this.polylineArray.last().addPointsFromWorldPoints(points);},loadPoints:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2926,'var l=points.size();this.polylineArray.last().addPointsFromWorldPoints(points);},loadPoints:','function(points)',arguments);if(!this.polylineArray.last())
{this.addNewPolyLine();this.state=(this.state)?this.state:1;}
var l=points.size();this.polylineArray.last().addPointsFromWorldPoints(points);this.groupCirclesArray.last().addCirclesFromWorldPoints(points);},setEditMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2929,'var l=points.size();this.polylineArray.last().addPointsFromWorldPoints(points);this.groupCirclesArray.last().addCirclesFromWorldPoints(points);},setEditMode:','function()',arguments);this.pointer=null;this.state=2;this.mapStatus.eventHandler.setCursor("default");if(this.groupCirclesArray.last())
{this.showCircles(this.groupCirclesArray.last());}},setDisplayMode:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2931,'{this.showCircles(this.groupCirclesArray.last());}},setDisplayMode:','function()',arguments);this.pointer=null;this.state=3;this.mapStatus.eventHandler.setCursor("default");if(this.groupCirclesArray.last())
{this.hideCircles(this.groupCirclesArray.last());}},resetPointer:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2933,'{this.hideCircles(this.groupCirclesArray.last());}},resetPointer:','function()',arguments);if(this.state==1)
{var indexOfPolyline=this.polylineArray.size()-1;var indexOfPoint=this.polylineArray.last().getNbPoints()-1;this.pointer={group:indexOfPolyline,point:indexOfPoint};}
else
{this.oldPointer=this.pointer;this.pointer=null;}
this.shapeUpdated(this.state==1);},addNewPoint:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2938,'this.shapeUpdated(this.state==1);},addNewPoint:','function(x,y)',arguments);return this.polylineArray.last().addPoint(new Point(x,y));},pickPoly:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2939,'return this.polylineArray.last().addPoint(new Point(x,y));},pickPoly:','function(x,y)',arguments);var l=this.polylineArray.size();var polyResults=new Array();var polyPointer=null;for(var i=0;i<l;i++)
{var polly=this.polylineArray[i].getPoly(x,y);if(polly)
{polyPointer=polly;polyPointer.group=i;}}
return polyPointer;},getCircleFromPoint:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2943,'return polyPointer;},getCircleFromPoint:','function(x,y)',arguments);var l=this.groupCirclesArray.length;var pointer=null;var withoutPoint=null;for(var i=0;i<l;i++)
{if(this.pointer&&this.pointer.group==i)
{withoutPoint=this.pointer.point;}
else
{withoutPoint=null;}
var p=this.groupCirclesArray[i].getCircleFromPoint(new Point(x,y),withoutPoint);if(p!=null)
{pointer={group:i,point:p};}}
return pointer;},addNewCircle:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2951,'return pointer;},addNewCircle:','function(x,y)',arguments);this.groupCirclesArray.last().addCircle(new Point(x,y));},addGroupOfCircles:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2952,'this.groupCirclesArray.last().addCircle(new Point(x,y));},addGroupOfCircles:','function()',arguments);var groupCircles=new Graphic.ezmapsGroupOfCircles(this.renderer,this.mapStatus);renderer.add(groupCircles);this.groupCirclesArray.push(groupCircles);},addNewPolyLine:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2953,'var groupCircles=new Graphic.ezmapsGroupOfCircles(this.renderer,this.mapStatus);renderer.add(groupCircles);this.groupCirclesArray.push(groupCircles);},addNewPolyLine:','function()',arguments);var polyLine=this.usePolygon?new Graphic.ezmapsPolyline(this.renderer,"polygon",this.mapStatus):new Graphic.ezmapsPolyline(this.renderer,"polyline",this.mapStatus);polyLine.setStroke(this.options.stroke);if(this.usePolygon)
polyLine.setFill(this.options.fill);this.renderer.add(polyLine);this.polylineArray.push(polyLine);this.addGroupOfCircles();},deleteTempPoint:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2955,'polyLine.setFill(this.options.fill);this.renderer.add(polyLine);this.polylineArray.push(polyLine);this.addGroupOfCircles();},deleteTempPoint:','function()',arguments);if(this.tempPoint)
{this.removePoint();this.renderer.draw();this.tempPoint=null;}},removePoint:function(refPoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2957,'{this.removePoint();this.renderer.draw();this.tempPoint=null;}},removePoint:','function(refPoint)',arguments);if(refPoint)
{this.polylineArray[refPoint.group].removePoint(refPoint.point);}
else
{if(this.polylineArray.last())
{this.polylineArray.last().removePoint();}}},removeCircle:function(refPoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2962,'{this.polylineArray.last().removePoint();}}},removeCircle:','function(refPoint)',arguments);if(refPoint)
{this.groupCirclesArray[refPoint.group].removeCircle(refPoint.point);}
else
{if(this.groupCirclesArray.last())
{this.groupCirclesArray.last().removeCircle();}}},addTempPoint:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2967,'{this.groupCirclesArray.last().removeCircle();}}},addTempPoint:','function(x,y)',arguments);if(!this.tempPoint)
{this.tempPoint=this.addNewPoint(x,y);this.renderer.draw();}},drag:function(x,y,dx,dy,ddx,ddy,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2969,'{this.tempPoint=this.addNewPoint(x,y);this.renderer.draw();}},drag:','function(x,y,dx,dy,ddx,ddy,event)',arguments);this.deleteTempPoint();return this.mouseMove(x,y,event);},doubleClick:function(point)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2970,'this.deleteTempPoint();return this.mouseMove(x,y,event);},doubleClick:','function(point)',arguments);if(this.groupCirclesArray.first())
{if(this.groupCirclesArray.first().circles)
{var l=this.groupCirclesArray.first().circles.length;if(l>1){var xcenter=this.groupCirclesArray.first().circles[0].attributes.cx;var ycenter=this.groupCirclesArray.first().circles[0].attributes.cy;var radius=this.groupCirclesArray.first().circles[0].attributes.r;var xpos_min=xcenter-(radius/2);var ypos_min=ycenter-(radius/2);var xpos_max=xpos_min+radius;var ypos_max=ypos_min+radius;if(point.x>xpos_min&&point.x<xpos_max){if(point.y>ypos_min&&point.y<ypos_max){this.addNewPoint(point.x,point.y);}}}}}
var result=this.endDrawingPoly();return result;},initDrag:function(x,y,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2974,'var result=this.endDrawingPoly();return result;},initDrag:','function(x,y,event)',arguments);if(this.state>2)
{return}
this.pointer=this.getCircleFromPoint(x,y);var polyToAdd=this.pickPoly(x,y);this.bufferMousePoint.set(x,y);if(this.pointer)
{this.deleteTempPoint();}
else if(polyToAdd)
{this.polylineArray[polyToAdd.group].insetPoint(polyToAdd.id,new Point(x,y));this.groupCirclesArray[polyToAdd.group].insetCircle(polyToAdd.id,new Point(x,y));this.pointer={group:polyToAdd.group,point:polyToAdd.id};this.deleteTempPoint();}
else if(this.state==0)
{this.addNewPolyLine();this.addNewPoint(x,y);this.state=1;this.addTempPoint(x,y);}
else if(this.state<2)
{this.addTempPoint(x,y);}
this.shapeUpdated(this.pointer!=null&&this.state>0);return(this.pointer||polyToAdd)!=null;},click:function(event,point,relativePoint,invertedRelativePoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2985,'this.shapeUpdated(this.pointer!=null&&this.state>0);return(this.pointer||polyToAdd)!=null;},click:','function(event,point,relativePoint,invertedRelativePoint)',arguments);this.endDrag();},endDrag:function(x,y,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2986,'this.endDrag();},endDrag:','function(x,y,event)',arguments);this.bufferMousePoint.set(x,y);var result=false;if(this.state>0&&this.tempPoint)
{this.addNewCircle(x,y);this.renderer.draw();this.tempPoint=null;if(this.singlePoint)
this.endDrawingPoly();result=true;}
if(this.state>0)
{this.resetPointer();}
return result;},mouseMove:function(x,y,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2992,'return result;},mouseMove:','function(x,y,event)',arguments);if(this.state>2){return}
this.bufferMousePoint.set(x,y);this.toggleCircles(x,y);if(this.pointer)
{this.polylineArray[this.pointer.group].setPoint(x,y,this.pointer.point);this.groupCirclesArray[this.pointer.group].setCircle(x,y,this.pointer.point);this.renderer.draw();return true;}
return false;},toggleCircles:function(x,y)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',2996,'return false;},toggleCircles:','function(x,y)',arguments);var l=this.groupCirclesArray.size();for(var i=0;i<l;i++)
{if(this.singlePoint||(this.mouseOverMap&&(this.groupCirclesArray[i].withinBounds(x,y)||(this.pointer&&this.pointer.group==i))))
{this.showCircles(this.groupCirclesArray[i]);}
else
{this.hideCircles(this.groupCirclesArray[i]);}}},moveToFront:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3001,'{this.hideCircles(this.groupCirclesArray[i]);}}},moveToFront:','function()',arguments);this.polylineArray.last().moveToFront();this.groupCirclesArray.last().moveToFront();},showCircles:function(groupCircles)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3002,'this.polylineArray.last().moveToFront();this.groupCirclesArray.last().moveToFront();},showCircles:','function(groupCircles)',arguments);groupCircles.show();},hideCircles:function(groupCircles)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3003,'groupCircles.show();},hideCircles:','function(groupCircles)',arguments);groupCircles.hide();},endDrawingPoly:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3004,'groupCircles.hide();},endDrawingPoly:','function()',arguments);if(this.state<2)
{this.pointer=null;this.removePoint();this.state=2;this.saveShape();this.mapStatus.eventHandler.setCursor("default");}
else if(this.state>1&&this.oldPointer!=null)
{this.pointer=null;this.saveShape();}
else
{return false;}
return true;},saveShape:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3011,'return true;},saveShape:','function()',arguments);var returnObject={};returnObject.pointsOnMap=this.getPoints();returnObject.mode=this.options.shapeType;returnObject.id=this.options.id;this.shapeUpdated(false);this.options.callbackFunction("save",returnObject);},shapeUpdated:function(blShow)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3012,'var returnObject={};returnObject.pointsOnMap=this.getPoints();returnObject.mode=this.options.shapeType;returnObject.id=this.options.id;this.shapeUpdated(false);this.options.callbackFunction("save",returnObject);},shapeUpdated:','function(blShow)',arguments);if(blShow&&this.options.shapeType=="polyline")
{this.options.callbackFunction("shapeUpdated",this.options.id);}
else
{this.options.callbackFunction("hideLength",this.options.id);}},getTotalDistance:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3016,'{this.options.callbackFunction("hideLength",this.options.id);}},getTotalDistance:','function()',arguments);if(this.polylineArray.last())
{return this.polylineArray.last().getTotalDistance();}},deletePoint:function(refPoint)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3018,'{return this.polylineArray.last().getTotalDistance();}},deletePoint:','function(refPoint)',arguments);if(!refPoint)
{this.deleteTempPoint();}
this.removePoint(refPoint);this.removeCircle(refPoint);this.resetPointer();this.shapeUpdated(true);if(!this.pointer)
{this.shapeUpdated(false);}
this.mouseMove(this.bufferMousePoint.x,this.bufferMousePoint.y);},keyDown:function(keyCode,event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3023,'this.mouseMove(this.bufferMousePoint.x,this.bufferMousePoint.y);},keyDown:','function(keyCode,event)',arguments);if(this.mouseOverMap)
{switch(keyCode)
{case Event.KEY_RETURN:this.endDrawingPoly();break;case Event.KEY_BACKSPACE:this.deletePoint();break;case Event.KEY_ESC:this.shapeUpdated(false);this.options.callbackFunction("closeTool",this.options.id);break;}}
return this.mouseOverMap;},mouseOver:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3027,'return this.mouseOverMap;},mouseOver:','function(event)',arguments);this.mouseOverMap=true;},mouseOut:function(event)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3028,'this.mouseOverMap=true;},mouseOut:','function(event)',arguments);this.mouseOverMap=false;this.toggleCircles(this.bufferMousePoint.x,this.bufferMousePoint.y);},refresh:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3029,'this.mouseOverMap=false;this.toggleCircles(this.bufferMousePoint.x,this.bufferMousePoint.y);},refresh:','function()',arguments);var pl=this.polylineArray.size();var cl=this.polylineArray.size();var l=Math.max(pl,cl);for(var i=0;i<l;i++)
{if(this.polylineArray[i])
{this.polylineArray[i]._updatePath();}
if(this.groupCirclesArray[i])
{this.groupCirclesArray[i]._clipCircles();}}},reposition:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3034,'{this.groupCirclesArray[i]._clipCircles();}}},reposition:','function()',arguments);var pl=this.polylineArray.size();var cl=this.polylineArray.size();var l=Math.max(pl,cl);for(var i=0;i<l;i++)
{if(this.polylineArray[i])
{this.polylineArray[i].repositionPointsFromWorldPoints();}
if(this.groupCirclesArray[i])
{this.groupCirclesArray[i].repositionCirclesFromWorldPoints();}}},getPoints:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3039,'{this.groupCirclesArray[i].repositionCirclesFromWorldPoints();}}},getPoints:','function()',arguments);if(this.polylineArray.last())
{return this.polylineArray.last().worldPoints;}},setPoints:function(points)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3041,'{return this.polylineArray.last().worldPoints;}},setPoints:','function(points)',arguments);if(this.polylineArray.last())
{return this.polylineArray.last().setPoints(points);}},getStroke:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3043,'{return this.polylineArray.last().setPoints(points);}},getStroke:','function()',arguments);return this.options.stroke;},setStroke:function(stroke)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3044,'return this.options.stroke;},setStroke:','function(stroke)',arguments);if(this.polylineArray.last())
{return this.polylineArray.last().setStroke(stroke);}
this.options.stroke=stroke;},getFill:function()
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3047,'this.options.stroke=stroke;},getFill:','function()',arguments);return this.options.fill;},setFill:function(fill)
{Profiler.profile('ezmaps/dist/min_ezmaps.js',3048,'return this.options.fill;},setFill:','function(fill)',arguments);if(this.polylineArray.last())
{return this.polylineArray.last().setFill(fill);}
this.options.fill=fill;}});Graphic.CircleTool=Class.create();Object.extend(Graphic.CircleTool.prototype,Graphic.Tool.prototype);Object.extend(Graphic.CircleTool.prototype,{initialize:function(){this.renderer=null;this.circle=null;this.stroke={r:127,g:156,b:215,a:255,w:3}
this.fill={r:200,g:230,b:255,a:128}},activate:function(manager){this.renderer=manager.renderer;},unactivate:function(manager){this.renderer=null;},initDrag:function(x,y,event){this.circle=new Graphic.Circle(this.renderer);this.circle.setID(new Date().getTime())
this.circle.setStroke(this.stroke);this.circle.setFill(this.fill);this.circle.setBounds(x,y,1,1);this.x=x;this.y=y;this.renderer.add(this.circle)
this.renderer.draw();},drag:function(x,y,dx,dy,ddx,ddy,event){if(this.circle){var d=Math.max(Math.abs(dx),Math.abs(dy))
if(event.shiftKey){this.circle.setCenter(this.x,this.y);this.circle.setRadius(d);}
else
this.circle.setBounds(dx<0?this.x-d:this.x,dy<0?this.y-d:this.y,d,d);this.renderer.draw();}},endDrag:function(x,y,event){if(this.circle){this.circle=null;}},getStroke:function(){return this.stroke;},setStroke:function(stroke){this.stroke=stroke;},getFill:function(){return this.fill;},setFill:function(fill){this.fill=fill;}});Graphic.LineTool=Class.create();Object.extend(Graphic.LineTool.prototype,Graphic.Tool.prototype);Object.extend(Graphic.LineTool.prototype,{initialize:function(){this.renderer=null;this.line=null;this.stroke={r:127,g:156,b:215,a:255,w:3}},activate:function(manager){this.renderer=manager.renderer;},unactivate:function(manager){this.renderer=null;},initDrag:function(x,y,event){this.line=new Graphic.Line(this.renderer);this.line.setStroke(this.stroke);this.line.setPoints(x,y,x,y);this.renderer.add(this.line)
this.renderer.draw();},drag:function(x,y,dx,dy,ddx,ddy,event){if(this.line){var pt=this.line.getPoint(0);this.line.setPoints(pt.x,pt.y,x,y);this.renderer.draw();}},endDrag:function(x,y,event){if(this.line){this.line=null;}},getStroke:function(){return this.stroke;},setStroke:function(stroke){this.stroke=stroke;}});Graphic.Image=Class.create();Object.extend(Graphic.Image.prototype,Graphic.Rectangle.prototype);Graphic.Image.prototype._shapeInitialize=Graphic.Shape.prototype.initialize;Object.extend(Graphic.Image.prototype,{initialize:function(renderer,image){this._shapeInitialize(renderer,"image");Object.extend(this.attributes,{x:0,y:0,width:0,height:0});return this;},setSource:function(url,autoSize){if(autoSize){this.image=new Image();this.image.src=url;Event.observe(this.image,"load",function(){this.setSize(this.image.width,this.image.height);this._setAttribute('href',url);}.bind(this));}
else
this._setAttribute('href',url);return this;}});var ResourceExplorer=Class.extend(ComponentBase,{initialize:function(element,objParentObject,strComponentType,strComponentColumn)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',26,'initialize:','function(element, objParentObject, strComponentType, strComponentColumn)',arguments);this.parent(element,objParentObject,strComponentType,strComponentColumn);if(typeof(objComponentUpdateCode[this.intId])=="undefined")
{objComponentUpdateCode[this.intId]=[];}
var _this=this;objComponentUpdateCode[this.intId].push(function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',41,'objComponentUpdateCode[this.intId].push(','function()',arguments);_this.objStampDisplay=Map.getobjTagStampDisplay();var objMapMoveCallbackFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',47,'var objMapMoveCallbackFunc =','function()',arguments);if(_this.strTab=='publishedResources')
{_this.handleMapMoveResourceRetrieval();}
if(_this.strTab=='tags')
{_this.handleMapMoveTagRetrieval();}};Map.registerMapMoveCallback(objMapMoveCallbackFunc,'resourceExplorerResults');});this.blnAlreadyLoadedTagsTabContent=false;this.blnDisplayResultsOnMap=true;this.objParentObject.registerNewMenuItem('Refresh Map',function(){_this.refresh();});var f=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',75,'var f =','function()',arguments);var blnDisplayResultsOnMap=_this.getDisplayResultsOnMapMode();if(blnDisplayResultsOnMap)
{var objDisplayResultsOnMapItem={'strItemText':'Hide Results From Map','objOnClickFunc':function(){_this.toggleMapShowGeoms(false);}};}
else
{var objDisplayResultsOnMapItem={'strItemText':'Show Results On Map','objOnClickFunc':function(){_this.toggleMapShowGeoms(true);}};}
return objDisplayResultsOnMapItem;};this.objParentObject.registerNewMenuItem('Foobar',function(){_this.refresh();},f);this.objParentObject.addCustomCSSClass('container_resource_explorer');this.arrCurrentPageResults=[];this.intMapMoveTagBufferTime=1.5;this.intMapMoveResourceBufferTime=3;this.objMapMoveTimeout=null;this.intTopicSelectionBufferTime=1.5;this.objTopicSelectionTimeout=null;this.intResultsPerPageTimeout=1;this.objResultsPerPageTimeout=null;this.objPreviousResourceSearchExtents={TLY:0,TLX:0,BRY:0,BRX:0};this.objPreviousTagSearchExtents={TLY:0,TLX:0,BRY:0,BRX:0};this.objRegisteredTopics={};this.objTopicStampDetails={};this.arrTopicsResults=[];this.blnTopicNameOnHoverDisabled=false;},createDraggables:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',130,'createDraggables:','function()',arguments);var _this=this;$j('#itemSummaries').sortable({containment:'#itemSummaries',items:'div.draggables',axis:'y',opacity:0.5,forcePlaceholderSize:true,placeholder:'resourceExplorerDraggablePlaceholder',revert:true,update:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',143,'update:','function()',arguments);_this.savePlaylistOrder();}});},destroyDraggables:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',150,'destroyDraggables:','function()',arguments);$j('#itemSummaries').sortable('destroy');},savePlaylistOrder:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',155,'savePlaylistOrder:','function()',arguments);var arrSequence=$j.map($j('#itemSummaries').sortable('toArray'),function(strValue,intKey)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',157,'var arrSequence = $j.map($j(\'#itemSummaries\').sortable(\'toArray\'),','function(strValue, intKey)',arguments);return strValue.replace(/[^\d]/g,'');});var strUrl='setPlaylistOrder/'+arrSequence.join(',');this.notify(strUrl);},movePlaylistViewToPosition:function(intPlaylistViewId,strPosition,blnOnTheFly)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',167,'movePlaylistViewToPosition:','function(intPlaylistViewId, strPosition, blnOnTheFly)',arguments);if(blnOnTheFly===true)
{var arrSequence=$j.map($j('#itemSummaries').sortable('toArray'),function(strValue,intKey)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',173,'var arrSequence = $j.map($j(\'#itemSummaries\').sortable(\'toArray\'),','function(strValue, intKey)',arguments);return parseInt(strValue.replace(/[^\d]/g,''));});var intViewCurrentPosition=$j.inArray(intPlaylistViewId,arrSequence);if(intViewCurrentPosition==-1)
{return false;}
switch(strPosition)
{case'top':$j('#itemSummaries').prepend($j('#playlist_view_item_'+intPlaylistViewId));break;case'bottom':$j('#itemSummaries').append($j('#playlist_view_item_'+intPlaylistViewId));break;case'up':if(intViewCurrentPosition==0)
{return false;}
$j('#playlist_view_item_'+arrSequence[intViewCurrentPosition-1]).before($j('#playlist_view_item_'+intPlaylistViewId));break;case'down':if((intViewCurrentPosition+1)==arrSequence.length)
{return false;}
$j('#playlist_view_item_'+arrSequence[intViewCurrentPosition+1]).after($j('#playlist_view_item_'+intPlaylistViewId));break;}
$j('#itemSummaries').sortable('refresh');this.savePlaylistOrder();}
else
{var strUrl='setPlaylistViewPosition/'+intPlaylistViewId+'/'+strPosition;var objParams={};var objOnCompleteFunc=function(){};this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab);}},editPlaylistView:function(intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',246,'editPlaylistView:','function(intPlaylistViewId)',arguments);$j('#playlist_view_item_'+intPlaylistViewId+'_name_span').hide();$j('#playlist_view_item_'+intPlaylistViewId+'_editor_name').val($j('#playlist_view_item_'+intPlaylistViewId+'_name_value').val());$j('#playlist_view_item_'+intPlaylistViewId+'_editor_description').val($j('#playlist_view_item_'+intPlaylistViewId+'_description_value').val());$j('#playlist_view_item_'+intPlaylistViewId+'_editor').show();},savePlaylistViewText:function(intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',259,'savePlaylistViewText:','function(intPlaylistViewId)',arguments);var strName=$j('#playlist_view_item_'+intPlaylistViewId+'_editor_name').val();var strDescription=$j('#playlist_view_item_'+intPlaylistViewId+'_editor_description').val();$j('#playlist_view_item_'+intPlaylistViewId+'_name_value').val(strName);$j('#playlist_view_item_'+intPlaylistViewId+'_description_value').val(strDescription);$j('#playlist_view_item_'+intPlaylistViewId+'_name_span').html(strName);this.cancelEditPlaylistView(intPlaylistViewId);var strUrl='savePlaylistView';var objParams={intPlaylistViewId:intPlaylistViewId,strName:strName,strDescription:strDescription};this.notify(strUrl,objParams);},savePlaylistViewAll:function(intPlaylistViewId,blnIncludeLockedComponents,blnIncludeCollapsedComponents)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',286,'savePlaylistViewAll:','function(intPlaylistViewId, blnIncludeLockedComponents, blnIncludeCollapsedComponents)',arguments);var strName=$j('#playlist_view_item_'+intPlaylistViewId+'_editor_name').val();var strDescription=$j('#playlist_view_item_'+intPlaylistViewId+'_editor_description').val();$j('#playlist_view_item_'+intPlaylistViewId+'_name_value').val(strName);$j('#playlist_view_item_'+intPlaylistViewId+'_description_value').val(strDescription);$j('#playlist_view_item_'+intPlaylistViewId+'_name_span').html(strName);var strMapState=Map.getState(true,true);var strComponentsStates=Shell.getComponentsStates(['resourceDetails'],blnIncludeLockedComponents,blnIncludeCollapsedComponents,true);this.cancelEditPlaylistView(intPlaylistViewId);var strUrl='savePlaylistView';var objParams={intPlaylistViewId:intPlaylistViewId,strName:strName,strDescription:strDescription,strMapState:strMapState,strComponentsStates:strComponentsStates};this.notify(strUrl,objParams);},cancelEditPlaylistView:function(intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',321,'cancelEditPlaylistView:','function(intPlaylistViewId)',arguments);$j('#playlist_view_item_'+intPlaylistViewId+'_editor').hide();$j('#playlist_view_item_'+intPlaylistViewId+'_name_span').show();},removePlaylistView:function(intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',330,'removePlaylistView:','function(intPlaylistViewId)',arguments);var strUrl='removePlaylistView/'+intPlaylistViewId;var objParams={};var objOnCompleteFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',334,'var objOnCompleteFunc =','function()',arguments);};this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab);},closePlaylist:function(blnSetSearchCriteria)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',342,'closePlaylist:','function(blnSetSearchCriteria)',arguments);var blnSetSearchCriteria=typeof(blnSetSearchCriteria)!='undefined'?blnSetSearchCriteria:true;var _this=this;Map.setPlaylistMode(false);Map.unregisterPreTileUpdateFunction();var objColumnLeft=$j('#shellColumnLeft');var objColumnRight=$j('#shellColumnRight');var objColumnWhole=$j('#shellColumnWhole');var arrLeftComponents=objShell.findChildComponents(objColumnLeft,true);var arrRightComponents=objShell.findChildComponents(objColumnRight,true);var arrWholeComponents=objShell.findChildComponents(objColumnWhole,true);var arrOpenComponents=[].concat(arrLeftComponents,arrRightComponents,arrWholeComponents);$j.each(arrOpenComponents,function(intKey,objOpenComponent)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',367,'$j.each(arrOpenComponents,','function(intKey, objOpenComponent)',arguments);var objContainer=_this.returnComponentInstanceFromElement(objOpenComponent);var objChildComponentObjects=objContainer['objChildComponentObjects'];$j.each(['left','right','whole'],function(intKey2,strColumn)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',372,'$j.each([\'left\', \'right\', \'whole\'],','function(intKey2, strColumn)',arguments);if(objChildComponentObjects[strColumn])
{$j.each(objChildComponentObjects[strColumn],function(intKey,objComponent)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',376,'$j.each(objChildComponentObjects[strColumn],','function(intKey, objComponent)',arguments);switch(objComponent['strComponentType'])
{case'map':break;case'resourceExplorer':if(objContainer.returnLockedState()===true)
{objContainer.lock('undefined',false);}
break;default:objContainer.close('undefined',true);}});}});});Map.removeAllLayers();Map.hideLayerList();Map.removeAllStamps();if(blnSetSearchCriteria===true)
{this.setSearchCriteria('',true);}},resizeShell:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',420,'resizeShell:','function()',arguments);},showChildren:function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',425,'showChildren:','function(resourceId)',arguments);var strUrl='showChildren/'+resourceId;var objParams={};var objOnCompleteFunc=function(){};this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab);},showProject:function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',438,'showProject:','function(resourceId)',arguments);var strUrl='showProject/'+resourceId;var objParams={};var objOnCompleteFunc=function(){};this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab,true);},openPlaylist:function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',450,'openPlaylist:','function(resourceId)',arguments);if(this.strTab!='myResources'&&this.strTab!='playlists')
{this.setTab('playlists');}
var strUrl='openPlaylist/'+resourceId;var objParams={};var objOnCompleteFunc=function(){};this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab,true);},playPlaylist:function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',468,'playPlaylist:','function(resourceId)',arguments);if(this.strTab!='myResources'&&this.strTab!='playlists')
{this.setTab('playlists');}
var strUrl='playPlaylist/'+resourceId;var objParams={};var objOnCompleteFunc=function(){};this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab,true);},duplicateResource:function(intResourceId,strDuplicatedResourceName)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',486,'duplicateResource:','function(intResourceId, strDuplicatedResourceName)',arguments);Shell.showCustomLightboxButtonActivity();var strUrl='duplicateResource/';var objParams={intResourceId:intResourceId,strDuplicatedResourceName:strDuplicatedResourceName};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',502,'var objOnComplete =','function()',arguments);_this.executeUpdateInitCode();};this.update(strUrl,objParams,objOnComplete,'#lbContent');},showLayer:function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',511,'showLayer:','function(resourceId)',arguments);var strUrl='showLayer/'+resourceId;var objParams={};var objOnCompleteFunc=function(){};this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab);},refresh:function(blnClearPleaseWaitLightbox)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',523,'refresh:','function(blnClearPleaseWaitLightbox)',arguments);var blnClearPleaseWaitLightbox=(typeof(blnClearPleaseWaitLightbox)!='undefined')?blnClearPleaseWaitLightbox:false;var strUrl='refresh';var objParams={};if(blnClearPleaseWaitLightbox)
{var objOnCompleteFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',534,'var objOnCompleteFunc =','function()',arguments);Shell.closeLightboxPleaseWait();};}
else
{var objOnCompleteFunc=function(){};}
this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab,true);},handleMapMoveResourceRetrieval:function(blnForceRetrieve)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',549,'handleMapMoveResourceRetrieval:','function(blnForceRetrieve)',arguments);var objForm=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' form:first');if(objForm.length==0)
{return false;}
var objTextCriteria=objForm.find('.keywordSearch:first');if(objTextCriteria.length==0)
{return false;}
var objMapState=Map.getState(false);var objExtents=objMapState.ezMapState.extents;if(isNaN(objExtents.TLX)||isNaN(objExtents.TLY)||isNaN(objExtents.BRX)||isNaN(objExtents.BRY))
{return false;}
var intPreviousTLX=parseInt(this.objPreviousResourceSearchExtents.TLX);var intPreviousTLY=parseInt(this.objPreviousResourceSearchExtents.TLY);var intPreviousBRX=parseInt(this.objPreviousResourceSearchExtents.BRX);var intPreviousBRY=parseInt(this.objPreviousResourceSearchExtents.BRY);var intCurrentTLX=parseInt(objExtents.TLX);var intCurrentTLY=parseInt(objExtents.TLY);var intCurrentBRX=parseInt(objExtents.BRX);var intCurrentBRY=parseInt(objExtents.BRY);if((intPreviousTLX==intCurrentTLX&&intPreviousTLY==intCurrentTLY&&intPreviousBRY==intCurrentBRY)&&!blnForceRetrieve)
{return false;}
var intDelay=this.intMapMoveResourceBufferTime*1000;var _this=this;var objTimoutCallbackFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',620,'var objTimoutCallbackFunc =','function()',arguments);_this.setSearchCriteria();};if(this.objMapMoveTimeout!=null)
{clearTimeout(this.objMapMoveTimeout);}
if(objTextCriteria.val()=='')
{this.objMapMoveTimeout=setTimeout(objTimoutCallbackFunc,intDelay);}
this.objPreviousResourceSearchExtents=objExtents;},calculatePreUpdateHandlerForUpdate:function(strURL)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',653,'calculatePreUpdateHandlerForUpdate:','function(strURL)',arguments);var _this=this;var objPreUpdateFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',657,'var objPreUpdateFunc =','function()',arguments);if(strURL.indexOf('setSearchCriteria/publishedResources')!=-1)
{_this.switchTab('publishedResources',false);}
if(strURL.indexOf('setSearchCriteria/playlists')!=-1)
{_this.switchTab('playlists',false);}
if(strURL.indexOf('showPersonal')!=-1)
{_this.switchTab('myResources',false);}
if(strURL.indexOf('showPlaylists')!=-1)
{_this.switchTab('playlists',false);}
if(strURL.indexOf('showThematicLayers')!=-1)
{_this.switchTab('publishedResources',false);}};return objPreUpdateFunc;},calculateTargetForUpdate:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',691,'calculateTargetForUpdate:','function()',arguments);return'#resourceExplorerTabContent_'+this.strTab;},setSearchCriteriaOnComplete:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',696,'setSearchCriteriaOnComplete:','function()',arguments);},getResourceSearchCriteria:function(strOverrideTextCriteria,blnAutoOpenSearchOptions)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',701,'getResourceSearchCriteria:','function(strOverrideTextCriteria, blnAutoOpenSearchOptions)',arguments);var objResourceCriteria={};var objForm=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' form:first');if(objForm)
{if(typeof(strOverrideTextCriteria)!='undefined'&&strOverrideTextCriteria!=null)
{objForm.find('.keywordSearch:first').val(strOverrideTextCriteria);}
$j.each(objForm.serializeArray(),function(intKey,objField)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',717,'$j.each(objForm.serializeArray(),','function(intKey, objField)',arguments);objResourceCriteria[objField.name]=objField.value;});objResourceCriteria.blnIncludeTopics=(objForm.find('.includeTopics:first').attr('checked')===true)?'true':'false';objResourceCriteria.autoOpenMoreSearchOptions=(blnAutoOpenSearchOptions===true)?'true':'false';}
return objResourceCriteria;},getMapSearchCriteria:function(blnReturnObject)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',730,'getMapSearchCriteria:','function(blnReturnObject)',arguments);var blnReturnObject=(typeof(blnReturnObject)!='undefined')?blnReturnObject:false;var objMapState=Map.getState(false);var strExtents=$j.toJSON(objMapState.ezMapState.extents);var strCenterPoint=$j.toJSON({x:objMapState.ezMapState.centerPoint.x,y:objMapState.ezMapState.centerPoint.y,srid:objMapState.ezMapState.centerPoint.srid});var strTiles=$j.toJSON(objMapState.ezMapState.tiles);var intZoomLevel=objMapState.ezMapState.zoomLevel;this.objPreviousResourceSearchExtents=objMapState.ezMapState.extents;return{strExtents:strExtents,strCenterPoint:strCenterPoint,strTiles:strTiles,intZoomLevel:intZoomLevel};},getPlaylistIsActive:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',755,'getPlaylistIsActive:','function()',arguments);var objEditingPlaylist=$j('#playlistEditModeElement');var objPlayingPlaylist=$j('#playlistPlayModeElement');if(objEditingPlaylist.length>0||objPlayingPlaylist.length>0)
{return true;}
else
{return false;}},setTab:function(strTab,blnOverridePlaylistPrompt,objOverridePlaylistPromptCallback)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',770,'setTab:','function(strTab, blnOverridePlaylistPrompt, objOverridePlaylistPromptCallback)',arguments);var objPlaylistPromptCallback=(typeof(objOverridePlaylistPromptCallback)!='undefined'&&objOverridePlaylistPromptCallback!==null)?objOverridePlaylistPromptCallback:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',772,'var objPlaylistPromptCallback = (typeof(objOverridePlaylistPromptCallback) != \'undefined\' && objOverridePlaylistPromptCallback !== null) ? objOverridePlaylistPromptCallback :','function()',arguments);_this.closePlaylist();_this.switchTab(strTab,true,true);};var _this=this;if(blnOverridePlaylistPrompt!==true)
{if((strTab!='playlists')&&(this.getPlaylistIsActive()===true))
{var strText='We have noticed that you are playing/editing a playlist resource and have selected a new tab. What would you like to do?';var arrButtons=[{id:'returnToList',strText:'Close Playlist and Switch Tabs',intWidth:245,objCallbackFunction:objPlaylistPromptCallback}];var objSettings={strText:strText,intWidth:500,intHeight:100,arrButtons:arrButtons};Shell.lightboxConfirmWithButtons(objSettings);return false;}}
if(Shell.getIsLicencedUser()===false&&strTab=='myResources')
{Shell.showLicenceRequiredPopup('View your personal resources','my_resources');return false;}
else if(Shell.getUserAthenticatedStatus()===false&&strTab=='playlists')
{Shell.showLicenceRequiredPopup('Create and edit multi-view playlists','multi_view_playlists');return false;}
$j('.resourceExplorerTab').each(function(intKey,objElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',829,'$j(\'.resourceExplorerTab\').each(','function(intKey, objElement)',arguments);$j(objElement).removeClass('selected');});$j('#resourceExplorerTab_'+strTab).addClass('selected');$j('.resourceExplorerTabContent').each(function(intKey,objElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',837,'$j(\'.resourceExplorerTabContent\').each(','function(intKey, objElement)',arguments);$j(objElement).hide();});$j('#resourceExplorerTabContent_'+strTab).show();var strPreviousTab=this.strTab;this.strTab=strTab;if(this.strTab=='tags')
{Map.registerPreTileUpdateFunction();this.blnInitialTopicStampsRequested=false;this.objRegisteredTopics={};this.objTopicStampDetails={};Map.updateTileCache();}
else if(typeof(strPreviousTab)=='undefined'||strPreviousTab=='tags')
{$j('#resourcePickerCarousel').remove();Map.unregisterPreTileUpdateFunction();Map.updateGeometriesLayer();this.blnInitialTopicStampsRequested=false;this.objRegisteredTopics={};this.objTopicStampDetails={};}
Shell.closeSpeechBubble();},getTab:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',873,'getTab:','function()',arguments);return this.strTab;},switchTab:function(strTab,blnAutoRetrieve,blnOverridePlaylistPrompt,blnAutoOpenSearchOptions,objOverridePlaylistPromptCallback)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',880,'switchTab:','function(strTab, blnAutoRetrieve, blnOverridePlaylistPrompt, blnAutoOpenSearchOptions, objOverridePlaylistPromptCallback)',arguments);var blnAutoRetrieve=(typeof(blnAutoRetrieve)!='undefined')?blnAutoRetrieve:true;var blnOverridePlaylistPrompt=(typeof(blnOverridePlaylistPrompt)!='undefined')?blnOverridePlaylistPrompt:false;var blnAutoOpenSearchOptions=(typeof(blnAutoOpenSearchOptions)!='undefined')?blnAutoOpenSearchOptions:false;var objOverridePlaylistPromptCallback=(typeof(objOverridePlaylistPromptCallback)!='undefined')?objOverridePlaylistPromptCallback:null;var blnSwitched=this.setTab(strTab,blnOverridePlaylistPrompt,objOverridePlaylistPromptCallback);if(blnSwitched===false)
{return false;}
clearTimeout(this.objMapMoveTimeout);Map.closeMapPopup();switch(strTab)
{case'tags':this.removeStampsForAllTopics();this.arrTagSearchQueue=[];ResourceExplorer.resetCurrentPageResultGeometries();if(blnAutoRetrieve)
{this.setSearchCriteria(null,true);}
break;case'playlists':this.removeStampsForAllTopics();Map.unregisterLayerGeometries();this.arrTagSearchQueue=[];if(blnAutoRetrieve)
{this.setSearchCriteria(null,true,blnAutoOpenSearchOptions);}
break;case'myResources':case'publishedResources':this.removeStampsForAllTopics();Map.unregisterLayerGeometries();this.arrTagSearchQueue=[];if(blnAutoRetrieve)
{this.setSearchCriteria(null,true,blnAutoOpenSearchOptions);}
break;}},getPlaylistViews:function(resourceId){var strUrl='showPlaylistView/'+resourceId;var objParams={};var objOnCompleteFunc=function(){};this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab);},showUserResources:function(intUserId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',980,'showUserResources:','function(intUserId)',arguments);var objParams={resourceExplorerTextCriteria:'',author:intUserId,cutoff:'',publishStatus:'published',mediaTypeDisplay:'all',order:'created'};var _this=this;var objOnCompleteFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',994,'var objOnCompleteFunc =','function()',arguments);_this.setSearchCriteriaOnComplete();};var strUrl='setSearchCriteria/'+this.strTab+'/';this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab,true);},setSearchCriteria:function(strOverrideTextCriteria,blnForcedTabChange,blnAutoOpenSearchOptions)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1008,'setSearchCriteria:','function(strOverrideTextCriteria, blnForcedTabChange, blnAutoOpenSearchOptions)',arguments);var strOverrideTextCriteria=(typeof(strOverrideTextCriteria)!='undefined')?strOverrideTextCriteria:null;var blnForcedTabChange=(typeof(blnForcedTabChange)!='undefined')?blnForcedTabChange:false;var blnAutoOpenSearchOptions=(typeof(blnAutoOpenSearchOptions)!='undefined')?blnAutoOpenSearchOptions:false;var objIdentity=Shell.getIdentity();var objBrowserDetails=Shell.getBrowserDetails();clearTimeout(this.objMapMoveTimeout);var objResourceCriteria=this.getResourceSearchCriteria(strOverrideTextCriteria,blnAutoOpenSearchOptions);var objMapCriteria=this.getMapSearchCriteria();var intNumberTiles=$j.evalJSON(objMapCriteria.strTiles).length;if(intNumberTiles<=0)
{setTimeout("ResourceExplorer.setSearchCriteria("+this.intId+", '"+strOverrideTextCriteria+"', "+blnForcedTabChange.toString()+")",1000);return;}
var objParams=$j.extend(objResourceCriteria,objMapCriteria);var _this=this;var objOnCompleteFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1045,'var objOnCompleteFunc =','function()',arguments);_this.setSearchCriteriaOnComplete();};if(this.strTab!='tags')
{if(blnForcedTabChange===true)
{switch(this.strTab)
{case'publishedResources':objParams.author='';objParams.mediaTypeDisplay='all';break;case'myResources':objParams.author='me';objParams.mediaTypeDisplay='all';objParams.order='created';break;case'playlists':if(objIdentity.id=='uLearn'&&!(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6))
{objParams.mediaTypeDisplay='favouriteSet';}
else
{objParams.mediaTypeDisplay='playlist';}
break;}}
else
{if(objResourceCriteria.mediaTypeDisplay=='playlist')
{this.setTab('playlists',true);}
else if(objResourceCriteria.author=='')
{this.setTab('publishedResources',true);}
else
{this.setTab('myResources',true);}}}
var strUrl='setSearchCriteria/'+this.strTab+'/';this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab,true);},openToggleSearchFilters:function(blnSwitchToPublishedResources)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1113,'openToggleSearchFilters:','function(blnSwitchToPublishedResources)',arguments);if(blnSwitchToPublishedResources===true&&this.strTab!='publishedResources')
{this.switchTab('publishedResources',true,false,true);return;}
var openSearchFilterLink=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' .openSearchFiltersLink:first');var closeSearchFilterLink=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' .closeSearchFiltersLink:first');var searchFilters=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' .searchFilters:first');openSearchFilterLink.hide();closeSearchFilterLink.show();searchFilters.show();return;},closeToggleSearchFilters:function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1133,'closeToggleSearchFilters:','function(srcElement)',arguments);var openSearchFilterLink=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' .openSearchFiltersLink:first');var closeSearchFilterLink=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' .closeSearchFiltersLink:first');var searchFilters=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' .searchFilters:first');closeSearchFilterLink.hide();openSearchFilterLink.show();searchFilters.hide();},openAndPreloadSearchFilters:function(strSearchCriteria)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1145,'openAndPreloadSearchFilters:','function(strSearchCriteria)',arguments);var searchField=$j(this.returnElementReference()).find('#resourceExplorerTabContent_'+this.strTab+' input.keywordSearch:first');searchField.val(strSearchCriteria);this.openToggleSearchFilters();},togglePublishedStatusFilters:function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1154,'togglePublishedStatusFilters:','function(srcElement)',arguments);var component=ComponentBase.getComponentElement(srcElement);var publishedSearchFiltersContainer=$j(component).find('.publishStatusFilters');var publishedSearchFiltersSelect=publishedSearchFiltersContainer.find('select').get(0);publishedSearchFiltersContainer.toggle();publishedSearchFiltersSelect.selectedIndex=0;return;},setPage:function(intPage,intLastPage)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1168,'setPage:','function(intPage, intLastPage)',arguments);if(typeof(intLastPage)!='undefined'&&intPage>intLastPage)
{intPage=intLastPage;}
if(intPage<1)
{intPage=1;}
var strUrl='setPage/'+intPage;var arrThumbnails=$$('.thumbnail img');arrThumbnails.each(function(objElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1198,'arrThumbnails.each(','function(objElement)',arguments);objElement.src=null;});var objParams={};var objOnCompleteFunc=function(){};var objOverrideTargetElement=$();this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab,true);this.objParentObject.scrollTo();},setResultsPerPage:function(intResultsPerPage)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1215,'setResultsPerPage:','function(intResultsPerPage)',arguments);clearTimeout(this.objResultsPerPageTimeout);var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1221,'var objCallbackFunction =','function()',arguments);var strUrl='setResultsPerPage/'+intResultsPerPage;var objParams={};var objOnCompleteFunc=function(){};var objOverrideTargetElement=$();_this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+_this.strTab,true);_this.objParentObject.scrollTo();};this.objResultsPerPageTimeout=setTimeout(objCallbackFunction,this.intResultsPerPageTimeout*1000);},setResultsViewMode:function(strResultsViewMode)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1240,'setResultsViewMode:','function(strResultsViewMode)',arguments);var strUrl='setResultsViewMode/'+strResultsViewMode;var arrThumbnails=$$('.thumbnail img');arrThumbnails.each(function(objElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1246,'arrThumbnails.each(','function(objElement)',arguments);objElement.src=null;});var objParams={};var objOnCompleteFunc=function(){};var objOverrideTargetElement=$();this.update(strUrl,objParams,objOnCompleteFunc,'#resourceExplorerTabContent_'+this.strTab,true);this.objParentObject.scrollTo();},showMenu:function(event,resourceId,openMode,tags,isOwner,strScope,isAuthenticated,intCreatorId,strCreatorName,strNodeType,strFileType,strDownloadFileURL,strLinkURL,isScribble,isScribbleCopy,isFavourite,isEstAdmin,isStaff,isPupil,viewCount,blnIsPrepublished,blnIsPublished,intPreviousCreatorId,strPreviousCreatorName,isTrusted,canUnpublish,defaultLayerMode,defaultLayerViewId,blnIsFeatured)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1264,'showMenu:','function(event, resourceId, openMode, tags, isOwner, strScope, isAuthenticated, intCreatorId, strCreatorName, strNodeType, strFileType, strDownloadFileURL, strLinkURL, isScribble, isScribbleCopy, isFavourite, isEstAdmin, isStaff, isPupil, viewCount, blnIsPrepublished, blnIsPublished, intPreviousCreatorId, strPreviousCreatorName, isTrusted, canUnpublish, defaultLayerMode, defaultLayerViewId, blnIsFeatured)',arguments);var _this=this;var objIdentity=Shell.getIdentity();var menu=new UMenu(200);var blnLicencedUser=Shell.getIsLicencedUser();var objResource={intResourceId:resourceId,strNodeType:strNodeType,strFileType:strFileType,strDownloadFileURL:strDownloadFileURL,blnIsOwner:isOwner};switch(strNodeType)
{case'file':switch(strFileType)
{case'audio':case'image':case'video':menu.addItem('Open',function(){Resources.openResource(objResource);});break;default:menu.addItem('Preview document/file',function(){Resources.openResource(objResource);});if(blnLicencedUser===false)
{menu.addItem('Download document/file',function(){Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');});}
else
{menu.addItem('Download document/file',function(){ResourceExplorer.downloadFile(strDownloadFileURL);});}}
break;case'favourite_set':case'folder':case'layer':case'page':menu.addItem('Open',function(){Resources.openResource(objResource);});break;case'playlist':case'project':menu.addItem('Play',function(){Resources.openResource(objResource);});break;case'web link':menu.addItem('Open link in new window',function(){Resources.openResource(objResource);});break;}
if(openMode=='layer'||openMode=='thematicLayer')
{var layerMenu=new UMenu(200);if(blnLicencedUser===false)
{layerMenu.addItem('Enable layer',function(){Shell.showLicenceRequiredPopup('Enable map layers','enable_layers');});}
else
{layerMenu.addItem('Enable layer',Map.addLayerToList.bind(Map,resourceId,defaultLayerMode,defaultLayerViewId));}
if(openMode=='thematicLayer'&&isAuthenticated)
{if(blnLicencedUser===false)
{layerMenu.addItem('Edit/Explore views',function(){Shell.showLicenceRequiredPopup('Configure map layers','configure_layers');});}
else
{layerMenu.addItem('Edit/Explore views',Shell.openComponent.bind(Shell,"thematics","showViews/"+resourceId));}}
else
{}
if(isOwner&&(isScribble||isScribbleCopy))
{if(blnLicencedUser===false)
{layerMenu.addItem('Annotate layer',function(){Shell.showLicenceRequiredPopup('Create, position and save annotations on the map','annotate_map');});}
else
{var objFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1373,'var objFunc =','function()',arguments);Map.setOverridingDefaultAnnotationLayerId(resourceId);Shell.openComponent('annotateMap','showIcons/');};layerMenu.addItem('Annotate layer',objFunc.bind(this));}}
if(isOwner&&isScribble)
{if(blnLicencedUser===false)
{layerMenu.addItem('Clear annotation layer',function(){Shell.showLicenceRequiredPopup('Create, position and save annotations on the map','annotate_map');});layerMenu.addItem('Save as...',function(){Shell.showLicenceRequiredPopup('Create, position and save annotations on the map','annotate_map');});}
else
{layerMenu.addItem('Clear annotation layer',Map.clearLayer.bind(Map,resourceId));layerMenu.addItem('Save as...',Map.saveAnnotationLayerAsInit.bind(this,resourceId));}}
if(isOwner&&isScribbleCopy)
{if(blnLicencedUser===false)
{layerMenu.addItem('Clear annotation layer',function(){Shell.showLicenceRequiredPopup('Create, position and save annotations on the map','annotate_map');});}
else
{layerMenu.addItem('Clear annotation layer',Map.clearLayer.bind(Map,resourceId));}}
menu.addSubmenu('Layer',layerMenu);}
if(isOwner)
{if(!blnIsPrepublished&&!blnIsPublished)
{menu.addItem('Edit',function(){Resources.editResource(objResource);});if(openMode=='project')
{if(objIdentity.id=='ireland')
{menu.addItem('Sequence / Link to map',Shell.openComponent.bind(Shell,'projectMutator','reorderProject/'+resourceId));menu.addItem('Manage resources',Shell.openPage.bind(Shell,'projectOrganiser','addResources/'+resourceId));}}
if(!isScribble)
{if(blnLicencedUser===false)
{menu.addItem('Delete',function(){Shell.showLicenceRequiredPopup('Upload and create resources','upload_and_create');});}
else if(strNodeType=='folder')
{menu.addItem('Delete',function(){Shell.lightboxConfirm('You are about to delete a folder. All resources within this folder will also be deleted. Do you wish to continue?',500,100,function(){Resources.deleteResources([resourceId]);});});}
else
{menu.addItem('Delete',function(){Resources.deleteResources([resourceId]);});}}
if(!isScribble)
{if(blnLicencedUser===false)
{menu.addItem('Publish',function(){Shell.showLicenceRequiredPopup('Publish resources for the rest of the world to see','publish_resources');});}
else
{menu.addItem('Publish',function(){Resources.publishResources([resourceId]);});}}}
else if(blnIsPublished&&isTrusted&&Shell.getUserPupilStatus())
{menu.addItem('Edit',function(){Resources.editResource(objResource);});if(openMode=='project')
{if(objIdentity.id=='ireland')
{menu.addItem('Sequence / Link to map',Shell.openComponent.bind(Shell,'projectMutator','reorderProject/'+resourceId));menu.addItem('Manage resources',Shell.openPage.bind(Shell,'projectOrganiser','addResources/'+resourceId));}}}
else if(blnIsPublished&&(Shell.getUserEstablishmentAdminStatus()||Shell.getUserStaffStatus()))
{menu.addItem('Edit',function(){Resources.editResource(objResource);});if(openMode=='project')
{if(objIdentity.id=='ireland')
{menu.addItem('Sequence / Link to map',Shell.openComponent.bind(Shell,'projectMutator','reorderProject/'+resourceId));menu.addItem('Manage resources',Shell.openPage.bind(Shell,'projectOrganiser','addResources/'+resourceId));}}}
if(openMode=='playlist'&&Shell.getUserSystemAdminStatus()===true)
{if(blnLicencedUser===false)
{menu.addItem('Duplicate Resource',function(){Shell.showLicenceRequiredPopup('Upload and create resources','upload_and_create');});}
else
{menu.addItem('Duplicate Resource',ResourceExplorer.showDuplicateResource.bind(ResourceExplorer,this.intId,resourceId));}}}
else if(isAuthenticated)
{if(openMode!='layer'&&openMode!='thematicLayer'&&openMode!='folder')
{}}
if((Shell.getUserEstablishmentAdminStatus()||Shell.getUserStaffStatus())&&blnIsPublished&&canUnpublish)
{if(blnLicencedUser===false)
{menu.addItem('Unpublish',function(){Shell.showLicenceRequiredPopup('Publish resources for the rest of the world to see','publish_resources');});}
else
{menu.addItem('Unpublish',function(){Resources.unpublishResources([resourceId]);});}}
if(Shell.getUserSystemAdminStatus())
{var objMarkAsFeaturedCallbackfunction=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1554,'var objMarkAsFeaturedCallbackfunction =','function()',arguments);_this.showMarkAsFeatured(resourceId);};if(blnIsFeatured===true)
{menu.addItem('Edit featured status',function(){Shell.launchNewLightboxWindow(objMarkAsFeaturedCallbackfunction,500,420);});}
else
{menu.addItem('Mark as featured',function(){Shell.launchNewLightboxWindow(objMarkAsFeaturedCallbackfunction,500,420);});}}
var tagMenu=new UMenu(200,false,200);if(tags.length>0)
{for(var i=0;i<tags.length;i++)
{tagMenu.addItem(tags[i].capitalize(),this.setSearchCriteria.bind(this,tags[i]));}
tagMenu.addSpacer();}
else
{tagMenu.addItem('No tags',function(){});tagMenu.addSpacer();}
var objAddTagsCallbackfunction=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1591,'var objAddTagsCallbackfunction =','function()',arguments);_this.showAddTags(resourceId);};if(blnLicencedUser===false)
{tagMenu.addItem('Add tags',function(){Shell.showLicenceRequiredPopup('Tag resources so they can be easily found','tag_resources');});}
else
{tagMenu.addItem('Add tags',function(){Shell.launchNewLightboxWindow(objAddTagsCallbackfunction,650,135);});}
menu.addSubmenu('Tags',tagMenu);if(isAuthenticated)
{if(blnIsPublished&&strNodeType!='establishment')
{var favouritesMenu=new UMenu(200,false);if(blnLicencedUser===false)
{if(Favourites.objFavouritesSetHelper.blnVisible===true)
{favouritesMenu.addItem('Add to open Favourite Set',function(){Shell.showLicenceRequiredPopup('Favourites','favourites');});favouritesMenu.addSpacer();}
favouritesMenu.addItem('Add to new Favourite Set',function(){Shell.showLicenceRequiredPopup('Favourites','favourites');});favouritesMenu.addItem('Add to private Favourite Set',function(){Shell.showLicenceRequiredPopup('Favourites','favourites');});favouritesMenu.addItem('Add to published Favourite Set',function(){Shell.showLicenceRequiredPopup('Favourites','favourites');});}
else
{if(Favourites.objFavouritesSetHelper.blnVisible===true)
{favouritesMenu.addItem('Add to open Favourite Set',function(){Favourites.addResourceToExistingFavouritesSet(Favourites.objFavouritesSetHelper.getActiveSetId(),resourceId);},this);favouritesMenu.addSpacer();}
var objFavouritesSets=Favourites.getAllFavouritesSets();var objPopupNotificationTargetElement=$j(event.currentTarget).parent().find('img.favourite:first');favouritesMenu.addItem('Add to new Favourite Set',function(){Favourites.addResourceToNewFavouritesSet(resourceId);});var privateFavouritesSetsSubmenu=new UMenu(200,false,200);var publishedFavouritesSetsSubmenu=new UMenu(200,false,200);$j.each(objFavouritesSets,function(intKey,objFavouritesSet)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1652,'$j.each(objFavouritesSets,','function(intKey, objFavouritesSet)',arguments);if(objFavouritesSet.blnPublished===true)
{if(Favourites.objFavouritesSetHelper.blnVisible===true&&parseInt(objFavouritesSet.intId)!=parseInt(Favourites.objFavouritesSetHelper.getActiveSetId()))
{publishedFavouritesSetsSubmenu.addItem(objFavouritesSet.strName,function(){Favourites.addResourceToExistingFavouritesSet(objFavouritesSet.intId,resourceId,false,objPopupNotificationTargetElement);});}
else
{publishedFavouritesSetsSubmenu.addItem(objFavouritesSet.strName,function(){Favourites.addResourceToExistingFavouritesSet(objFavouritesSet.intId,resourceId);});}}
else
{if(Favourites.objFavouritesSetHelper.blnVisible===true&&parseInt(objFavouritesSet.intId)!=parseInt(Favourites.objFavouritesSetHelper.getActiveSetId()))
{privateFavouritesSetsSubmenu.addItem(objFavouritesSet.strName,function(){Favourites.addResourceToExistingFavouritesSet(objFavouritesSet.intId,resourceId,false,objPopupNotificationTargetElement);});}
else
{privateFavouritesSetsSubmenu.addItem(objFavouritesSet.strName,function(){Favourites.addResourceToExistingFavouritesSet(objFavouritesSet.intId,resourceId);});}}});favouritesMenu.addSubmenu('Add to private Favourite Set',privateFavouritesSetsSubmenu,null,300);favouritesMenu.addSubmenu('Add to published Favourite Set',publishedFavouritesSetsSubmenu,null,300);var arrInFavSets=Favourites.getFavouriteSetsForResource(resourceId);if(arrInFavSets.length>0)
{favouritesMenu.addSpacer();var inFavSetsMenu=new UMenu(200,false,200);$j.each(arrInFavSets,function(intKey,objFavouriteSet)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1695,'$j.each(arrInFavSets,','function(intKey, objFavouriteSet)',arguments);var objResource={intResourceId:objFavouriteSet.intId,strNodeType:'favourite_set',strFileType:'',blnIsOwner:true};inFavSetsMenu.addItem(objFavouriteSet.strName,function(){Resources.openResource(objResource);});});favouritesMenu.addSubmenu('Already in these Favourite Sets',inFavSetsMenu,null,300);}}
menu.addSubmenu('Favourites',favouritesMenu);}}
if(objIdentity.id=='ireland')
{if(blnLicencedUser===false)
{menu.addItem('Link to this resource',function(){Shell.showLicenceRequiredPopup('Create links to resources to share with others','link_to_resource');});}
else
{var _this=this;event=$j.event.fix(event||window.event);var objCallback=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1733,'var objCallback =','function()',arguments);_this.showLinkToResource(event.target,resourceId);};menu.addItem('Link to this resource',objCallback);}}
menu.addSpacer();menu.addItem('From: '+strCreatorName,this.showUserResources.bind(this,intCreatorId));if(strCreatorName!=strPreviousCreatorName)
{menu.addItem('Original owner: '+strPreviousCreatorName,this.showUserResources.bind(this,intPreviousCreatorId));}
menu.show(event,40);},showLinkToResource:function(srcElement,resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1760,'showLinkToResource:','function(srcElement, resourceId)',arguments);var objIdentity=Shell.getIdentity();Shell.openSpeechBubble('<p style="clear: both">Copy and paste this link into your own webpage/newsletter to provide a direct link to the selected resource</p><p><input style="width: 98%" type="text" value="http://'+objIdentity.host+'/'+resourceId+'" onClick="this.select()"></p>',srcElement,0);},showFavourites:function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1766,'showFavourites:','function(resourceId)',arguments);if(confirm('Would you like to view on the map profiles that have added this resource to their favourites?'))
{Map.setCommunityLayerMode('favourites',resourceId);}},showAccessors:function(resourceId,viewCount)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1774,'showAccessors:','function(resourceId, viewCount)',arguments);if(viewCount==0)
{alert('No users with profiles have accessed the selected resource.');return;}
if(confirm('Would you like to view on the map profiles that have accessed this resource?'))
{Map.setCommunityLayerMode('accessors',resourceId);}},highlightItems:function(arrGeometryIds,objGeocodeData,blnStampQuery,blnStampClick)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1791,'highlightItems:','function(arrGeometryIds, objGeocodeData, blnStampQuery, blnStampClick)',arguments);var _this=this;$j('.resource_explorer_item').each(function(intKey,objElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1796,'$j(\'.resource_explorer_item\').each(','function(intKey, objElement)',arguments);$j(objElement).removeClass('item_highlight');});var blnAlreadyJumpedToFirstMatch=false;var intFirstItemId=null;$j.each(arrGeometryIds,function(geometryKey,geometryElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1809,'$j.each(arrGeometryIds,','function(geometryKey, geometryElement)',arguments);var objResourceObject=geometryElement;var intGeometryId=geometryElement.id;var intGeometryContainerId=geometryElement.container_node_id;$j('.resource_explorer_item').each(function(itemKey,itemElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1816,'$j(\'.resource_explorer_item\').each(','function(itemKey, itemElement)',arguments);var strItemId=$j(itemElement).attr('id');var arrItemIdParts=strItemId.split('_');var intItemId=arrItemIdParts[1];if(intGeometryId==intItemId||intGeometryContainerId==intItemId)
{$j(itemElement).addClass('item_highlight');if(!blnAlreadyJumpedToFirstMatch)
{$j(_this.returnElementReference()).parents('.containerWrapper:first').parent().scrollTo
($j(itemElement),{duration:500,easing:'easeOutElastic',axis:'y',offset:-8});blnAlreadyJumpedToFirstMatch=true;}}});});if(blnStampQuery&&intFirstItemId!=null)
{Map.showSpecificResourceGeometries(intFirstItemId,true,blnStampClick);}
else
{Map.showQueryResourceGeometries(arrGeometryIds,objGeocodeData,blnStampClick);}},highlightResource:function(intResourceId,blnScrollToResource)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1858,'highlightResource:','function(intResourceId, blnScrollToResource)',arguments);if(this.strTab=='tags')
{return;}
var objSymbol=$j('#mapSymbol_'+intResourceId);if(objSymbol.length>0)
{if(blnScrollToResource===true)
{$j(objShell.strColumnLeftSelector).scrollTo(objSymbol,{offset:{top:-8,left:0}});}
objSymbol.attr({'src':'/view/components/resource_explorer/assets/images/tag_icons/ulearn_orange.png'});}
$j('#resourceExplorerItem_'+intResourceId).css({'background-color':'#FDE6D7'});},unHighlightResource:function(intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1887,'unHighlightResource:','function(intResourceId)',arguments);if(this.strTab=='tags')
{return;}
$j('#mapSymbol_'+intResourceId).attr({'src':'/view/components/resource_explorer/assets/images/tag_icons/ulearn_blue.png'});$j('#resourceExplorerItem_'+intResourceId).css({'background-color':'transparent'});},unHighlightAllResources:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1905,'unHighlightAllResources:','function()',arguments);if(this.strTab=='tags')
{return;}
$j('#resourceExplorerTabContent_publishedResources, #resourceExplorerTabContent_myResources').find('img.mapSymbol[src="/view/components/resource_explorer/assets/images/tag_icons/ulearn_orange.png"]').attr
({'src':'/view/components/resource_explorer/assets/images/tag_icons/ulearn_blue.png'});$j('#resourceExplorerTabContent_publishedResources, #resourceExplorerTabContent_myResources').find('div.resource_explorer_item').css
({'background-color':'transparent'});},showJoinedResourceHoverDetails:function(intParentId,intResourceId,strResourceTitle)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1925,'showJoinedResourceHoverDetails:','function(intParentId, intResourceId, strResourceTitle)',arguments);var objElement=$j('#imageReelItem_'+intParentId+'_'+intResourceId);if(objElement.length==0)
{return true;}
$j('.imageReelItem').each(function(intKey,objElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1935,'$j(\'.imageReelItem\').each(','function(intKey, objElement)',arguments);$j(objElement).removeClass('selected');});objElement.addClass('selected');var strHTML="<a href=\"#\" onclick=\"ResourceExplorer.showDetail("+intResourceId+");return false;\" title=\""+strResourceTitle+" - click to open\">"+strResourceTitle+"</a>";$j('#nestedItemMouseoverDetails_'+intParentId).html(strHTML);},toggleMapShowGeoms:function(blnShowGeoms)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1949,'toggleMapShowGeoms:','function(blnShowGeoms)',arguments);this.setDisplayResultsOnMapMode(blnShowGeoms);switch(blnShowGeoms)
{case true:strMapShowGeomsMode='currentPage';break;case false:strMapShowGeomsMode='none';break;}
var strUrl='setMapShowGeomsMode/'+strMapShowGeomsMode;var objParams={};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1978,'var objOnComplete =','function()',arguments);_this.toggleMapShowGeomsComplete();};this.notify(strUrl,objParams,objOnComplete);},toggleMapShowGeomsComplete:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1987,'toggleMapShowGeomsComplete:','function()',arguments);ResourceExplorer.refresh(this.intId);ResourceExplorer.updateMap(true);},setDisplayResultsOnMapMode:function(blnDisplayResultsOnMap)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',1996,'setDisplayResultsOnMapMode:','function(blnDisplayResultsOnMap)',arguments);this.blnDisplayResultsOnMap=blnDisplayResultsOnMap;},getDisplayResultsOnMapMode:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2003,'getDisplayResultsOnMapMode:','function()',arguments);return this.blnDisplayResultsOnMap;},setContainerTitle:function(strTitle)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2010,'setContainerTitle:','function(strTitle)',arguments);this.objParentObject.setTitle(strTitle);},showBody:function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2016,'showBody:','function(resourceId)',arguments);var bodyId='resourceExplorerBody:'+this.intId+':'+resourceId;var body=$(bodyId);html=body.innerHTML;var iframeId='resourceExplorerBodyIframe:'+this.intId+':'+resourceId;var iframe=$(iframeId);iframe.style.visibility='hidden';var iframeDoc=this.getIframeDocument(iframe);var updater=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2035,'var updater =','function()',arguments);iframeDoc.body.innerHTML=html;this.updateIframeHeight.bind(this,resourceId).defer();}.bind(this);updater.defer();},updateIframeHeight:function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2047,'updateIframeHeight:','function(resourceId)',arguments);var iframeId='resourceExplorerBodyIframe:'+this.intId+':'+resourceId;var iframe=$(iframeId);var iframeDoc=this.getIframeDocument(iframe);var height=null;if(iframe.contentDocument){var ffFudge=24;height=iframeDoc.body.offsetHeight+ffFudge;}else if(iframe.contentWindow){height=iframeDoc.body.scrollHeight;}
if(height){iframe.style.height=height+'px';}
iframe.style.visibility='visible';},getIframeDocument:function(iframe)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2067,'getIframeDocument:','function(iframe)',arguments);if(iframe.contentDocument)
return iframe.contentDocument;else if(iframe.contentWindow)
return iframe.contentWindow.document;throw'Unable to obtain IFRAME document';},showProjectLightbox:function(strPromptType)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2079,'showProjectLightbox:','function(strPromptType)',arguments);if(strPromptType=='')
{return;}
this.blnProjectLightBoxExpanded=false;var _this=this;var objCallbackFunction=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2091,'var objCallbackFunction =','function()',arguments);_this.showProjectPrompt(strPromptType);};Shell.launchNewLightboxWindow(objCallbackFunction,500,150);},closeProjectLightbox:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2099,'closeProjectLightbox:','function()',arguments);if($j('#suppressProjectAlerts')&&$j('#suppressProjectAlerts').attr('checked'))
{var strUrl='suppressProjectAlerts';this.notify(strUrl);}
Shell.closeLightboxWindow();},showProjectPrompt:function(strPromptType)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2112,'showProjectPrompt:','function(strPromptType)',arguments);switch(strPromptType)
{case'showProjectLoginPrompt':var strUrl='showProjectLoginPrompt';break;case'showProjectPurchaseMapsLicencePrompt':var strUrl='showProjectPurchaseMapsLicencePrompt';break;}
var objParams={};var objOnComplete=function(){};this.update(strUrl,objParams,objOnComplete,'#lbContent');return Shell.generateStandardLightboxLoading();},toggleProjectMapSubstititionDetails:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2140,'toggleProjectMapSubstititionDetails:','function()',arguments);$j('#substitutedProjectMapDetails').toggle();if(typeof(this.blnProjectLightBoxExpanded)=="undefined")
{this.blnProjectLightBoxExpanded=false;}
if(this.blnProjectLightBoxExpanded)
{this.blnProjectLightBoxExpanded=false;Shell.resizeLightboxWindow(500,150);}
else
{this.blnProjectLightBoxExpanded=true;Shell.resizeLightboxWindow(500,175);}},extendFreeTrialProject:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2162,'extendFreeTrialProject:','function()',arguments);var strUrl=this.strUrlPrefix+'extendFreeTrialProject';var objParams={};var objOptions={parameters:objParams,evalScripts:true,onComplete:Shell.resizeLightboxWindow.bind(Shell,500,100)};new Ajax.Updater('lbContent',strUrl,objOptions);},showPlaylistLightbox:function(strPromptType)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2184,'showPlaylistLightbox:','function(strPromptType)',arguments);if(strPromptType=='')
{return;}
this.blnPlaylistLightBoxExpanded=false;var _this=this;Shell.launchNewLightboxWindow(function(){_this.showPlaylistPrompt(strPromptType);},500,150);},closePlaylistLightbox:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2199,'closePlaylistLightbox:','function()',arguments);if($j('#suppressPlaylistAlerts')&&$j('#suppressPlaylistAlerts').attr('checked'))
{var strUrl='suppressPlaylistAlerts';this.notify(strUrl);}
Shell.closeLightboxWindow();},showPlaylistPrompt:function(strPromptType)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2212,'showPlaylistPrompt:','function(strPromptType)',arguments);switch(strPromptType)
{case'showPlaylistLoginPrompt':var strUrl='showPlaylistLoginPrompt';break;case'showPlaylistPurchaseMapsLicencePrompt':var strUrl='showPlaylistPurchaseMapsLicencePrompt';break;}
var objParams={};this.update(strUrl,objParams,null,'#lbContent');return Shell.generateStandardLightboxLoading();},togglePlaylistMapSubstititionDetails:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2242,'togglePlaylistMapSubstititionDetails:','function()',arguments);$j('#substitutedPlaylistMapDetails').toggle();if(typeof(this.blnPlaylistLightBoxExpanded)=="undefined")
{this.blnPlaylistLightBoxExpanded=false;}
if(this.blnPlaylistLightBoxExpanded)
{this.blnPlaylistLightBoxExpanded=false;Shell.resizeLightboxWindow(500,150);}
else
{this.blnPlaylistLightBoxExpanded=true;Shell.resizeLightboxWindow(500,175);}},extendFreeTrialPlaylist:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2264,'extendFreeTrialPlaylist:','function()',arguments);Shell.showCustomLightboxButtonActivity();var strUrl=this.strUrlPrefix+'extendFreeTrialPlaylist';var objParams={};var objOptions={parameters:objParams,evalScripts:true,onComplete:Shell.resizeLightboxWindow.bind(Shell,500,100)};new Ajax.Updater('lbContent',strUrl,objOptions);},registerResults:function(intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2290,'registerResults:','function(intResourceId)',arguments);this.arrCurrentPageResults.push(parseInt(intResourceId));},resetResults:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2295,'resetResults:','function()',arguments);this.arrCurrentPageResults=[];},getResults:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2300,'getResults:','function()',arguments);return this.arrCurrentPageResults;},checkAllCheckboxes:function(srcCheckbox)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2306,'checkAllCheckboxes:','function(srcCheckbox)',arguments);var blnCheck=srcCheckbox.checked;$j('.selectedResourceCheckbox').attr('checked',blnCheck);$j('.selectAllCheckbox').attr('checked',blnCheck);},notifyServerOfTopicStateChange:function(intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2314,'notifyServerOfTopicStateChange:','function(intTopicId)',arguments);var strUrl='registerTopicStateChange';var objParams={intTopicId:intTopicId,strName:this.objRegisteredTopics[intTopicId].strName,strIconPath:this.objRegisteredTopics[intTopicId].strIconPath,blnVisible:this.objRegisteredTopics[intTopicId].blnVisible,blnExpanded:this.objRegisteredTopics[intTopicId].blnExpanded};this.notify(strUrl,objParams);},notifyServerOfTopicsStateChanges:function(arrTopics)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2331,'notifyServerOfTopicsStateChanges:','function(arrTopics)',arguments);var strUrl='registerTopicsStateChanges';var objParams={arrTopics:$j.toJSON(arrTopics)};this.notify(strUrl,objParams);},registerTopic:function(intTopicId,intParentTopicId,strTopicName,strTopicIconPath,blnActive,blnVisible,blnExpanded,blnHasChildren,blnBypassChildrenRetrieved)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2344,'registerTopic:','function(intTopicId, intParentTopicId, strTopicName, strTopicIconPath, blnActive, blnVisible, blnExpanded, blnHasChildren, blnBypassChildrenRetrieved)',arguments);if(intTopicId==null)
{return;}
blnBypassChildrenRetrieved=(typeof(blnBypassChildrenRetrieved)=='undefined')?false:blnBypassChildrenRetrieved;if(blnExpanded===true)
{var blnChildrenRetrieved=true;}
else
{var blnChildrenRetrieved=false;}
var objTopic={intId:intTopicId,intParentId:intParentTopicId,strName:strTopicName,strIconPath:strTopicIconPath,blnActive:blnActive,blnVisible:blnVisible,blnExpanded:blnExpanded,blnHasChildren:blnHasChildren,blnChildrenRetrieved:blnChildrenRetrieved};this.objRegisteredTopics[intTopicId]=objTopic;if(blnBypassChildrenRetrieved!==true)
{if(isFieldNumeric(intParentTopicId)&&intParentTopicId!=0)
{this.setChildrenRetrievedForTopic(intParentTopicId);}}},getTopicDetails:function(intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2387,'getTopicDetails:','function(intTopicId)',arguments);if(typeof(this.objRegisteredTopics[intTopicId])!='undefined'&&this.objRegisteredTopics[intTopicId]!=null)
{return this.objRegisteredTopics[intTopicId];}
else
{return null;}},getSelectedTopicsCount:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2399,'getSelectedTopicsCount:','function()',arguments);var intCount=0;$j.each(this.objRegisteredTopics,function(intTopicId,objTopicDetails)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2403,'$j.each(this.objRegisteredTopics,','function(intTopicId, objTopicDetails)',arguments);if(objTopicDetails.blnVisible===true)
{intCount++;}});return intCount;},setChildrenRetrievedForTopic:function(intParentTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2414,'setChildrenRetrievedForTopic:','function(intParentTopicId)',arguments);if(typeof(this.objRegisteredTopics[intParentTopicId])=='undefined')
{return;}
this.objRegisteredTopics[intParentTopicId].blnChildrenRetrieved=true;if(isFieldNumeric(this.objRegisteredTopics[intParentTopicId].intParentId)&&this.objRegisteredTopics[intParentTopicId].intParentId!=0)
{this.setChildrenRetrievedForTopic(this.objRegisteredTopics[intParentTopicId].intParentId);}},unregisterTopics:function(arrAvailableTopics)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2429,'unregisterTopics:','function(arrAvailableTopics)',arguments);var arrTopicsToUnregister=[];var _this=this;$j.each(this.objRegisteredTopics,function(mixKey,objTopic)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2436,'$j.each(this.objRegisteredTopics,','function(mixKey, objTopic)',arguments);var blnIsAvailable=false;$j.each(arrAvailableTopics,function(mixIndex,intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2441,'$j.each(arrAvailableTopics,','function(mixIndex, intTopicId)',arguments);if(intTopicId==objTopic.intId)
{blnIsAvailable=true;return false;}});if(blnIsAvailable===false)
{arrTopicsToUnregister.push(objTopic.intId);}});$j.each(arrTopicsToUnregister,function(mixIndex,intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2458,'$j.each(arrTopicsToUnregister,','function(mixIndex, intTopicId)',arguments);if(_this.objRegisteredTopics[intTopicId])
{_this.removeStampsForTopic(intTopicId);delete _this.objRegisteredTopics[intTopicId];}});},getChildTopics:function(intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2471,'getChildTopics:','function(intTopicId)',arguments);var arrTopics=[];var _this=this;$j.each(this.objRegisteredTopics,function(mixKey,objTopic)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2477,'$j.each(this.objRegisteredTopics,','function(mixKey, objTopic)',arguments);if(objTopic.intParentId==intTopicId)
{arrTopics.push(objTopic);arrChildTopics=_this.getChildTopics(objTopic.intId);if(arrChildTopics.length>0)
{arrTopics=arrTopics.concat(arrChildTopics);}}});return arrTopics;},toggleTopicSelection:function(objElement,intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2496,'toggleTopicSelection:','function(objElement, intTopicId)',arguments);clearTimeout(this.objTopicSelectionTimeout);var objTagCheckBox=$j(objElement);var blnVisible=objTagCheckBox.attr('checked');if(typeof(this.objRegisteredTopics[intTopicId])=='undefined'||this.objRegisteredTopics[intTopicId]==null)
{return false;}
var arrTopicsToLoad=[this.objRegisteredTopics[intTopicId]];var _this=this;if(blnVisible===true)
{_this.objRegisteredTopics[intTopicId].blnVisible=true;if(this.objRegisteredTopics[intTopicId].blnHasChildren===true&&this.objRegisteredTopics[intTopicId].blnExpanded!==true)
{this.expandTopic(intTopicId);}}
else
{_this.objRegisteredTopics[intTopicId].blnVisible=false;_this.removeStampsForTopic(intTopicId);}
this.notifyServerOfTopicsStateChanges(arrTopicsToLoad);Map.unregisterLayerGeometries();var objTimeoutFunction=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2541,'var objTimeoutFunction =','function()',arguments);ResourceExplorer.showTopicActivity();Map.updateTileCache();Map.updateGeometriesLayer();};this.objTopicSelectionTimeout=setTimeout(objTimeoutFunction,(this.intTopicSelectionBufferTime*1000));},showTopicActivity:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2556,'showTopicActivity:','function()',arguments);$j.each(this.objRegisteredTopics,function(intTopicId,objTopic)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2559,'$j.each(this.objRegisteredTopics,','function(intTopicId, objTopic)',arguments);if(objTopic.blnVisible===true)
{$j('#tag_'+objTopic.intId+'_activity').show();}});},hideTopicActivity:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2568,'hideTopicActivity:','function()',arguments);$j.each(this.objRegisteredTopics,function(intTopicId,objTopic)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2571,'$j.each(this.objRegisteredTopics,','function(intTopicId, objTopic)',arguments);$j('#tag_'+objTopic.intId+'_activity').hide();});},expandTopic:function(intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2650,'expandTopic:','function(intTopicId)',arguments);if(typeof(this.objRegisteredTopics[intTopicId])=='undefined'||this.objRegisteredTopics[intTopicId]==null)
{return false;}
$j('#tagContainer_'+intTopicId+'_children').toggle();$j('#tagContainer_'+intTopicId+'_children_expand').toggle();$j('#tagContainer_'+intTopicId+'_children_collapse').toggle();if($j('#tagContainer_'+intTopicId+'_children').css('display')=='none')
{this.objRegisteredTopics[intTopicId].blnExpanded=false;}
else
{this.objRegisteredTopics[intTopicId].blnExpanded=true;}
if((this.objRegisteredTopics[intTopicId].blnChildrenRetrieved===false)&&(this.objRegisteredTopics[intTopicId].blnExpanded===true))
{var objParams={intTopicId:intTopicId,blnVisible:this.objRegisteredTopics[intTopicId].blnVisible};var _this=this;var objOnComplete=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2686,'var objOnComplete =','function()',arguments);if(typeof(_this.objRegisteredTopics[intTopicId])!='undefined'&&_this.objRegisteredTopics[intTopicId]!=null)
{_this.objRegisteredTopics[intTopicId].blnChildrenRetrieved=true;}};this.update('getChildTopicsForMenu',objParams,objOnComplete,'#tagContainer_'+intTopicId+'_children');}
this.notifyServerOfTopicStateChange(intTopicId);},fetchStampsForTopics:function(arrTopics)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2701,'fetchStampsForTopics:','function(arrTopics)',arguments);if(arrTopics.length==0)
{return false;}
var strTopics=$j.toJSON(arrTopics);var objMapState=Map.getState(false);var strExtents=$j.toJSON(objMapState.ezMapState.extents);var strCenterPoint=$j.toJSON({x:objMapState.ezMapState.centerPoint.x,y:objMapState.ezMapState.centerPoint.y,srid:objMapState.ezMapState.centerPoint.srid});var strTiles=$j.toJSON(objMapState.ezMapState.tiles);var intZoomLevel=objMapState.ezMapState.zoomLevel;$j.each(arrTopics,function(mixKey,objTopic)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2716,'$j.each(arrTopics,','function(mixKey, objTopic)',arguments);$j('#tag_'+objTopic.intId+'_activity').show();});var objParams={strTopics:strTopics,strExtents:strExtents,strCenterPoint:strCenterPoint,strTiles:strTiles,intZoomLevel:intZoomLevel};var _this=this;var objSettings={blnApplyPrefix:true,strResponseDataType:'json',objOnSuccess:function(arrTopicsResults)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2737,'objOnSuccess:','function(arrTopicsResults)',arguments);_this.renderStampsForTopics(arrTopicsResults);}};this.ajaxRequest('searchExtentsForTopicsResults',objParams,null,objSettings);},initialFetchStampsForAllTopics:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2746,'initialFetchStampsForAllTopics:','function()',arguments);if(this.blnInitialTopicStampsRequested===true)
{this.renderStampsForTopics(this.arrTopicsResults);return;}
this.blnInitialTopicStampsRequested=true;},fetchStampsForAllTopics:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2759,'fetchStampsForAllTopics:','function()',arguments);var arrTopicsToLoad=[];$j.each(this.objRegisteredTopics,function(mixKey,objTopic)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2763,'$j.each(this.objRegisteredTopics,','function(mixKey, objTopic)',arguments);if(objTopic.blnVisible===true)
{arrTopicsToLoad.push(objTopic);}});this.fetchStampsForTopics(arrTopicsToLoad);},renderStampsForTopics:function(arrTopicsResults)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2774,'renderStampsForTopics:','function(arrTopicsResults)',arguments);if(this.strTab!='tags')
{return false;}
this.arrTopicsResults=arrTopicsResults;$j.each(this.objRegisteredTopics,function(intIndex,objTopic)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2786,'$j.each(this.objRegisteredTopics,','function(intIndex, objTopic)',arguments);$j('#tag_'+objTopic.intId+'_activity').hide();});if(arrTopicsResults==null)
{this.removeStampsForAllTopics();return;}
var _this=this;var arrRemainingResourceStamps=this.removeTopicStampsNotInResults(arrTopicsResults);var arrAddedResourceStamps=[];$j.each(arrTopicsResults,function(mixIndex,objTopicResults)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2806,'$j.each(arrTopicsResults,','function(mixIndex, objTopicResults)',arguments);var intTopicId=objTopicResults.arrTagDetails.intTagId;var intParentTopicId=objTopicResults.arrTagDetails.intParentTagId;var strTopicName=objTopicResults.arrTagDetails.strTagName;var strTopicIconPath=objTopicResults.arrTagDetails.strIconPath;var blnHasChildren=objTopicResults.arrTagDetails.blnHasChildren;if(typeof(_this.objRegisteredTopics[intTopicId])=='undefined'||_this.objRegisteredTopics[intTopicId]==null)
{_this.registerTopic(intTopicId,intParentTopicId,strTopicName,strTopicIconPath,false,true,false,blnHasChildren,true);}
if(_this.objRegisteredTopics[intTopicId].blnVisible!==true)
{return false;}
if($j.isArray(_this.objTopicStampDetails[intTopicId])===false)
{_this.objTopicStampDetails[intTopicId]=[];}
$j.each(objTopicResults.arrResourceResults,function(intKey,objResourceDetails)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2832,'$j.each(objTopicResults.arrResourceResults,','function(intKey, objResourceDetails)',arguments);var intResourceId=objResourceDetails.intResourceId;var strResourceTitle=objResourceDetails.strResourceTitle;var strResourceType=objResourceDetails.strType;var objGeometries=objResourceDetails.geometries.evalJSON();if($j.inArray(intResourceId,arrRemainingResourceStamps)>-1||$j.inArray(intResourceId,arrAddedResourceStamps)>-1)
{var objStamp=$j('#tag_'+intTopicId+'_symbol_'+intResourceId);Map.deactivateStampHover(objStamp);if(_this.blnTopicNameOnHoverDisabled===false)
{Map.activateStampHover(objStamp,strTopicName,strResourceTitle,strResourceType);}
return;}
arrAddedResourceStamps.push(intResourceId);var objStamp={'strId':'tag_'+intTopicId+'_symbol_'+intResourceId,'strClass':'resourceExplorerTagStamp','strIconPath':strTopicIconPath,'objPoint':{'x':objGeometries['arrFirstCoordPair'][0]['x'],'y':objGeometries['arrFirstCoordPair'][0]['y'],'srid':objGeometries['arrFirstCoordPair'][0]['srid']},'objData':{'arrPopupGeometryIds':[{container_node_id:intResourceId,id:null}],'objPopupGeometry':{x:objGeometries.arrFirstCoordPair[0].x,y:objGeometries.arrFirstCoordPair[0].y,srid:objGeometries.arrFirstCoordPair[0].srid},'intResourceId':intResourceId,'intGeometryId':null,'intTopicId':intTopicId,'strTopicName':strTopicName,'strResourceTitle':strResourceTitle,'strResourceType':strResourceType,'intHiddenResources':0,'intHiddenTopics':0,'blnTransparentBoxOutput':true,'blnTopicNameOnHoverDisabled':_this.blnTopicNameOnHoverDisabled}};var arrStampDetails=Map.setStampState(_this.objStampDisplay,[objStamp]);var objTopicStampDetails={'strStampId':arrStampDetails[0].strStampId,'strType':'symbol','objStampInstance':arrStampDetails[0].objStampInstance,'objGeometries':objGeometries,'objResourceDetails':objResourceDetails};_this.objTopicStampDetails[intTopicId].push(objTopicStampDetails);intResourceId=null;strResourceTitle=null;strResourceType=null;objGeometries=null;objStamp=null;arrStampDetails=null;objTopicStampDetails=null;});objTopicResults=null;intTopicId=null;strTopicIconPath=null;});},removeStampsForTopic:function(intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2927,'removeStampsForTopic:','function(intTopicId)',arguments);if($j.isArray(this.objTopicStampDetails[intTopicId]))
{var _this=this;$j.each(this.objTopicStampDetails[intTopicId],function(intKey,objStampDetails)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2934,'$j.each(this.objTopicStampDetails[intTopicId],','function(intKey, objStampDetails)',arguments);if(objStampDetails==null)
{return true;}
$j('div:first',objStampDetails.objStampInstance.node).unbind();_this.objStampDisplay.removePoint(objStampDetails.objStampInstance);_this.objTopicStampDetails[intTopicId][intKey]=null;});this.objTopicStampDetails[intTopicId]=[];}},removeStampsForAllTopics:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2954,'removeStampsForAllTopics:','function()',arguments);var _this=this;$j.each(this.objTopicStampDetails,function(intTopicId,mixValue)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2958,'$j.each(this.objTopicStampDetails,','function(intTopicId, mixValue)',arguments);_this.removeStampsForTopic(intTopicId);});},removeTopicStampsNotInResults:function(arrTopicsResults)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2964,'removeTopicStampsNotInResults:','function(arrTopicsResults)',arguments);var _this=this;var arrResourcesInResults=[];var arrRemainingResourceStamps=[];if(arrTopicsResults==null||$j(arrTopicsResults).length==0)
{this.removeStampsForAllTopics();return;}
$j.each(arrTopicsResults,function(mixIndex,objTopicResults)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2978,'$j.each(arrTopicsResults,','function(mixIndex, objTopicResults)',arguments);$j.each(objTopicResults.arrResourceResults,function(intKey,objResourceDetails)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2980,'$j.each(objTopicResults.arrResourceResults,','function(intKey, objResourceDetails)',arguments);arrResourcesInResults.push(objResourceDetails.intResourceId);});});$j.each(this.objTopicStampDetails,function(intTopicId,arrTopicStamps)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2987,'$j.each(this.objTopicStampDetails,','function(intTopicId, arrTopicStamps)',arguments);if($j.isArray(arrTopicStamps))
{$j.each(arrTopicStamps,function(intKey,objStampDetails)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',2991,'$j.each(arrTopicStamps,','function(intKey, objStampDetails)',arguments);if(!objStampDetails)
{return;}
if($j.inArray(objStampDetails.objResourceDetails.intResourceId,arrResourcesInResults)==-1)
{$j('div:first',objStampDetails.objStampInstance.node).unbind();_this.objStampDisplay.removePoint(objStampDetails.objStampInstance);_this.objTopicStampDetails[intTopicId][intKey]=null;}
else
{arrRemainingResourceStamps.push(objStampDetails.objResourceDetails.intResourceId);}});}});return arrRemainingResourceStamps;},setTopicNameOnHoverDisabled:function(blnTopicNameOnHoverDisabled)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3019,'setTopicNameOnHoverDisabled:','function(blnTopicNameOnHoverDisabled)',arguments);this.blnTopicNameOnHoverDisabled=blnTopicNameOnHoverDisabled;},getTopicNameOnHoverDisabled:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3024,'getTopicNameOnHoverDisabled:','function()',arguments);return this.blnTopicNameOnHoverDisabled;},handleMapMoveTagRetrieval:function(blnForceRetrieve)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3030,'handleMapMoveTagRetrieval:','function(blnForceRetrieve)',arguments);var _this=this;var blnForceRetrieve=(typeof(blnForceRetrieve)!='undefined')?blnForceRetrieve:false;var objMapState=Map.getState(false);var objExtents=objMapState.ezMapState.extents;if(isNaN(objExtents.TLX)||isNaN(objExtents.TLY)||isNaN(objExtents.BRX)||isNaN(objExtents.BRY))
{return false;}
var intPreviousTLX=parseInt(this.objPreviousTagSearchExtents.TLX);var intPreviousTLY=parseInt(this.objPreviousTagSearchExtents.TLY);var intPreviousBRX=parseInt(this.objPreviousTagSearchExtents.BRX);var intPreviousBRY=parseInt(this.objPreviousTagSearchExtents.BRY);var intCurrentTLX=parseInt(objExtents.TLX);var intCurrentTLY=parseInt(objExtents.TLY);var intCurrentBRX=parseInt(objExtents.BRX);var intCurrentBRY=parseInt(objExtents.BRY);if((intPreviousTLX==intCurrentTLX&&intPreviousTLY==intCurrentTLY&&intPreviousBRY==intCurrentBRY)&&!blnForceRetrieve)
{return false;}
this.objPreviousTagSearchExtents=objExtents;var intDelay=this.intMapMoveTagBufferTime*1000;var objTimeoutCallbackFunc=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3091,'var objTimeoutCallbackFunc =','function()',arguments);_this.setSearchCriteria();_this.showTopicActivity();};if(this.objMapMoveTimeout!=null)
{clearTimeout(this.objMapMoveTimeout);}
this.objMapMoveTimeout=setTimeout(objTimeoutCallbackFunc,intDelay);},showMarkAsFeatured:function(intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3111,'showMarkAsFeatured:','function(intResourceId)',arguments);var strUrl='getMarkAsFeatured/';var objParams={intResourceId:intResourceId};var objOnComplete=null;this.update(strUrl,objParams,objOnComplete,'#lbContent');return Shell.generateStandardLightboxLoading();},markAsFeatured:function(intResourceId,blnFeatured,arrZoomScales)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3130,'markAsFeatured:','function(intResourceId, blnFeatured, arrZoomScales)',arguments);Shell.showCustomLightboxButtonActivity();var strUrl='setMarkAsFeatured/';var objParams={intResourceId:intResourceId,blnFeatured:blnFeatured,strZoomScales:$j.toJSON(arrZoomScales)};var objOnComplete=null;this.update(strUrl,objParams,objOnComplete,'#lbContent');return Shell.generateStandardLightboxLoading();},showAddTags:function(intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3154,'showAddTags:','function(intResourceId)',arguments);var strUrl='showAddTags/';var objParams={intResourceId:intResourceId};var objOnComplete=null;this.update(strUrl,objParams,objOnComplete,'#lbContent');return Shell.generateStandardLightboxLoading();},saveAddTags:function(intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3173,'saveAddTags:','function(intResourceId)',arguments);Shell.showCustomLightboxButtonActivity();var strUrl='saveAddTags/';var objParams={intResourceId:intResourceId,strTags:$j('#resourceExplorerAddTags').val()};var objOnComplete=null;this.update(strUrl,objParams,objOnComplete,'#lbContent');return Shell.generateStandardLightboxLoading();},setSetsTabMode:function(strMode)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3196,'setSetsTabMode:','function(strMode)',arguments);switch(strMode)
{case'favourite_sets_private':Shell.openComponent('resourceExplorer','showFavouriteSetsPersonal');break;case'favourite_sets_my_published':Shell.openComponent('resourceExplorer','showFavouriteSetsPersonalPublished');break;case'favourite_sets_all_published':Shell.openComponent('resourceExplorer','showFavouriteSetsAllPublished');break;case'playlists_private':Shell.openComponent('resourceExplorer','showPlaylistsPersonal');break;case'playlists_my_published':Shell.openComponent('resourceExplorer','showPlaylistsPersonalPublished');break;case'playlists_all_published':Shell.openComponent('resourceExplorer','showPlaylistsAllPublished');break;}},close:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3222,'close:','function()',arguments);$j('#resourcePickerCarousel').remove();Map.unregisterPreTileUpdateFunction();Map.unregisterLayerGeometries();Shell.closeSpeechBubble();this.blnOverridePlaylistPrompt=true;this.objParentObject.close();},shutDown:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3236,'shutDown:','function()',arguments);switch(this.strTab)
{case'tags':$j('#resourcePickerCarousel').remove();this.removeStampsForAllTopics();var strUrl='clearCurrentPageResults/';this.notify(strUrl,{},Map.updateGeometriesLayer);break;case'publishedResources':case'myResources':ResourceExplorer.resetCurrentPageResultGeometries();var strUrl='clearCurrentPageResults/';this.notify(strUrl,{},Map.updateGeometriesLayer);break;case'playlists':if(typeof(this.blnOverridePlaylistPrompt)=='undefined'||this.blnOverridePlaylistPrompt==false)
{var objEditingPlaylist=$j('#playlistEditModeElement');var objPlayingPlaylist=$j('#playlistPlayModeElement');if(objEditingPlaylist.length>0||objPlayingPlaylist.length>0)
{this.closePlaylist();this.switchTab('playlists');return false;}}
break;}
Map.unregisterMapMoveCallback('resourceExplorerResults');Map.unregisterPreTileUpdateFunction();Map.unregisterLayerGeometries();clearTimeout(this.objMapMoveTimeout);this.parent();Map.closeMapPopup();Shell.closeSpeechBubble();},unLoad:function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3320,'unLoad:','function()',arguments);this.parent();}});ResourceExplorer.refresh=function(resourceExplorerId,blnClearPleaseWaitLightbox)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3330,'ResourceExplorer.refresh =','function(resourceExplorerId, blnClearPleaseWaitLightbox)',arguments);if(typeof(resourceExplorerId)!='undefined'&&resourceExplorerId!==null)
{var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);}
else
{var resourceExplorer=objShell.getComponentFromType('resourceExplorer','',true);if(typeof(resourceExplorer)=='undefined')
{return false;}}
resourceExplorer.refresh(blnClearPleaseWaitLightbox);};ResourceExplorer.setStyle=function(srcElement,style)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3349,'ResourceExplorer.setStyle =','function(srcElement, style)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.setStyle(style);};ResourceExplorer.setPage=function(srcElement,intPage,intLastPage)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3355,'ResourceExplorer.setPage =','function(srcElement, intPage, intLastPage)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.setPage(intPage,intLastPage);};ResourceExplorer.setResultsPerPage=function(srcElement,intResultsPerPage)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3361,'ResourceExplorer.setResultsPerPage =','function(srcElement, intResultsPerPage)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.setResultsPerPage(intResultsPerPage);};ResourceExplorer.setResultsViewMode=function(srcElement,strResultsViewMode)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3367,'ResourceExplorer.setResultsViewMode =','function(srcElement, strResultsViewMode)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.setResultsViewMode(strResultsViewMode);};ResourceExplorer.showDetail=function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3373,'ResourceExplorer.showDetail =','function(resourceId)',arguments);Shell.openComponent('resourceDetails','addResource/'+resourceId);};ResourceExplorer.showProject=function(srcElement,resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3378,'ResourceExplorer.showProject =','function(srcElement, resourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.showProject(resourceId);};ResourceExplorer.showProjectLightbox=function(resourceExplorerId,strPromptType)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3384,'ResourceExplorer.showProjectLightbox =','function(resourceExplorerId, strPromptType)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.showProjectLightbox(strPromptType);};ResourceExplorer.closeProjectLightbox=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3390,'ResourceExplorer.closeProjectLightbox =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.closeProjectLightbox();};ResourceExplorer.toggleProjectMapSubstititionDetails=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3396,'ResourceExplorer.toggleProjectMapSubstititionDetails =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.toggleProjectMapSubstititionDetails();};ResourceExplorer.showPlaylistLightbox=function(resourceExplorerId,strPromptType)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3402,'ResourceExplorer.showPlaylistLightbox =','function(resourceExplorerId, strPromptType)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.showPlaylistLightbox(strPromptType);};ResourceExplorer.extendFreeTrialProject=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3408,'ResourceExplorer.extendFreeTrialProject =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.extendFreeTrialProject();};ResourceExplorer.closePlaylistLightbox=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3414,'ResourceExplorer.closePlaylistLightbox =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.closePlaylistLightbox();};ResourceExplorer.togglePlaylistMapSubstititionDetails=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3420,'ResourceExplorer.togglePlaylistMapSubstititionDetails =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.togglePlaylistMapSubstititionDetails();};ResourceExplorer.extendFreeTrialPlaylist=function(resourceExplorerId){Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3426,'ResourceExplorer.extendFreeTrialPlaylist =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.extendFreeTrialPlaylist();};ResourceExplorer.showChildren=function(srcElement,resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3431,'ResourceExplorer.showChildren =','function(srcElement, resourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.showChildren(resourceId);};ResourceExplorer.showChildrenExternal=function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3437,'ResourceExplorer.showChildrenExternal =','function(resourceId)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');resourceExplorer.showChildren(resourceId);};ResourceExplorer.showLayer=function(srcElement,resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3443,'ResourceExplorer.showLayer =','function(srcElement, resourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.showLayer(resourceId);};ResourceExplorer.showLayerExternal=function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3449,'ResourceExplorer.showLayerExternal =','function(resourceId)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');resourceExplorer.showLayer(resourceId);};ResourceExplorer.showLink=function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3455,'ResourceExplorer.showLink =','function(resourceId)',arguments);Shell.launchNewResourceWindow(resourceId);};ResourceExplorer.downloadFile=function(strFileURL)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3461,'ResourceExplorer.downloadFile =','function(strFileURL)',arguments);Shell.redirect(strFileURL);};ResourceExplorer.openToggleSearchFilters=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3467,'ResourceExplorer.openToggleSearchFilters =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.openToggleSearchFilters();};ResourceExplorer.closeToggleSearchFilters=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3473,'ResourceExplorer.closeToggleSearchFilters =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.closeToggleSearchFilters();};ResourceExplorer.openAndPreloadSearchFilters=function(resourceExplorerId,strSearchCriteria)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3479,'ResourceExplorer.openAndPreloadSearchFilters =','function(resourceExplorerId, strSearchCriteria)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.openAndPreloadSearchFilters(strSearchCriteria);};ResourceExplorer.togglePublishedStatusFilters=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3485,'ResourceExplorer.togglePublishedStatusFilters =','function(srcElement)',arguments);var component=ComponentBase.getComponentElement(srcElement);var publishedSearchFiltersContainer=$j(component).find('.publishStatusFilters');var publishedSearchFiltersSelect=publishedSearchFiltersContainer.find('select').get(0);publishedSearchFiltersContainer.toggle();publishedSearchFiltersSelect.selectedIndex=0;return;};ResourceExplorer.showMenu=function(event)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3499,'ResourceExplorer.showMenu =','function(event)',arguments);event=event||window.event;Event.stop(event);var srcElement=Event.element(event);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.showMenu.apply(resourceExplorer,arguments);};ResourceExplorer.setSearchCriteria=function(srcElement,strOverrideTextCriteria,blnForcedTabChange)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3514,'ResourceExplorer.setSearchCriteria =','function(srcElement, strOverrideTextCriteria, blnForcedTabChange)',arguments);if(typeof(srcElement)=='number')
{var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',srcElement);}
else
{var resourceExplorer=ComponentBase.getComponentInstance(srcElement);}
resourceExplorer.setSearchCriteria(strOverrideTextCriteria,blnForcedTabChange);};ResourceExplorer.showMapControls=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3528,'ResourceExplorer.showMapControls =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.showMapControls();};ResourceExplorer.hideMapControls=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3534,'ResourceExplorer.hideMapControls =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.hideMapControls();};ResourceExplorer.registerActiveResourceExplorer=function(intResourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3541,'ResourceExplorer.registerActiveResourceExplorer =','function(intResourceExplorerId)',arguments);Shell.setActiveResourceExplorer(intResourceExplorerId);};ResourceExplorer.updateMap=function(blnUpdateStamps)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3548,'ResourceExplorer.updateMap =','function(blnUpdateStamps)',arguments);if(typeof(Map)!='undefined')
{if(typeof(blnUpdateStamps)=='undefined')
{blnUpdateStamps=false;}
Map.updateGeometriesLayer(blnUpdateStamps);}};ResourceExplorer.showAllCurrentPagesGeometries=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3561,'ResourceExplorer.showAllCurrentPagesGeometries =','function()',arguments);if(typeof(Map)!='undefined')
{if(Map.getAutoRepositionMode())
{Map.showAllCurrentPagesGeometries();}}};ResourceExplorer.resetCurrentPageResultGeometries=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3573,'ResourceExplorer.resetCurrentPageResultGeometries =','function()',arguments);if(typeof(Map)!='undefined')
{Map.resetCurrentPageResultGeometries();}};ResourceExplorer.registerResultsGeometries=function(intResourceId,intGeometryId,objGeometries,strItemName,strItemType,arrGroupDetails,intResourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3581,'ResourceExplorer.registerResultsGeometries =','function(intResourceId, intGeometryId, objGeometries, strItemName, strItemType, arrGroupDetails, intResourceExplorerId)',arguments);ResourceExplorer.registerActiveResourceExplorer(intResourceExplorerId);if(typeof(Map)!='undefined')
{Map.registerResultsGeometries(intResourceId,intGeometryId,objGeometries,strItemName,strItemType,arrGroupDetails);}};ResourceExplorer.registerResults=function(intResourceId,intResourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3591,'ResourceExplorer.registerResults =','function(intResourceId, intResourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.registerResults(intResourceId);};ResourceExplorer.resetResults=function(intResourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3597,'ResourceExplorer.resetResults =','function(intResourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.resetResults();};ResourceExplorer.toggleMapShowGeoms=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3603,'ResourceExplorer.toggleMapShowGeoms =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.toggleMapShowGeoms();};ResourceExplorer.toggleMapMoveToGeoms=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3609,'ResourceExplorer.toggleMapMoveToGeoms =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.toggleMapMoveToGeoms();};ResourceExplorer.toggleMapMoveToGeomsResourceQuery=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3615,'ResourceExplorer.toggleMapMoveToGeomsResourceQuery =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.toggleMapMoveToGeomsResourceQuery();};ResourceExplorer.highlightItems=function(arrGeometryIds,objGeocodeData,blnStampQuery,blnStampClick)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3621,'ResourceExplorer.highlightItems =','function(arrGeometryIds, objGeocodeData, blnStampQuery, blnStampClick)',arguments);var arrResourceExplorers=objShell.getComponentsFromType('resourceExplorer','left',true);$j.each(arrResourceExplorers,function(intKey,objResourceExplorer)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3627,'$j.each(arrResourceExplorers,','function(intKey, objResourceExplorer)',arguments);objResourceExplorer.highlightItems(arrGeometryIds,objGeocodeData,blnStampQuery,blnStampClick);});if(arrResourceExplorers.length==0)
{Map.showQueryResourceGeometries(arrGeometryIds,objGeocodeData,blnStampClick);}};ResourceExplorer.highlightResource=function(intResourceId,blnScrollToResource)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3639,'ResourceExplorer.highlightResource =','function(intResourceId, blnScrollToResource)',arguments);var blnScrollToResource=(typeof(blnScrollToResource)!='undefined')?blnScrollToResource:false;var arrResourceExplorers=objShell.getComponentsFromType('resourceExplorer','left',true);$j.each(arrResourceExplorers,function(intKey,objResourceExplorer)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3645,'$j.each(arrResourceExplorers,','function(intKey, objResourceExplorer)',arguments);objResourceExplorer.highlightResource(intResourceId,blnScrollToResource);});};ResourceExplorer.unHighlightResource=function(intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3651,'ResourceExplorer.unHighlightResource =','function(intResourceId)',arguments);var arrResourceExplorers=objShell.getComponentsFromType('resourceExplorer','left',true);$j.each(arrResourceExplorers,function(intKey,objResourceExplorer)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3655,'$j.each(arrResourceExplorers,','function(intKey, objResourceExplorer)',arguments);objResourceExplorer.unHighlightResource(intResourceId);});};ResourceExplorer.unHighlightAllResources=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3661,'ResourceExplorer.unHighlightAllResources =','function()',arguments);var arrResourceExplorers=objShell.getComponentsFromType('resourceExplorer','left',true);$j.each(arrResourceExplorers,function(intKey,objResourceExplorer)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3665,'$j.each(arrResourceExplorers,','function(intKey, objResourceExplorer)',arguments);objResourceExplorer.unHighlightAllResources();});};ResourceExplorer.refreshAll=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3671,'ResourceExplorer.refreshAll =','function()',arguments);window.setTimeout(function(){ResourceExplorer.refreshAllDeferred();},0);};ResourceExplorer.refreshAllDeferred=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3676,'ResourceExplorer.refreshAllDeferred =','function()',arguments);var arrResourceExplorers=objShell.getComponentsFromType('resourceExplorer','left',true);$j.each(arrResourceExplorers,function(intKey,objResourceExplorer)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3680,'$j.each(arrResourceExplorers,','function(intKey, objResourceExplorer)',arguments);objResourceExplorer.refresh();});};ResourceExplorer.deleteSelectedResourcesInit=function(srcElement,arrResources)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3688,'ResourceExplorer.deleteSelectedResourcesInit =','function(srcElement, arrResources)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.deleteSelectedResourcesInit(arrResources);};ResourceExplorer.submitResourcesForDeleting=function(componentId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3694,'ResourceExplorer.submitResourcesForDeleting =','function(componentId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',componentId);resourceExplorer.submitResourcesForDeleting();};ResourceExplorer.showJoinedResourceHoverDetails=function(srcElement,intParentId,intResourceId,strResourceTitle)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3702,'ResourceExplorer.showJoinedResourceHoverDetails =','function(srcElement, intParentId, intResourceId, strResourceTitle)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.showJoinedResourceHoverDetails(intParentId,intResourceId,strResourceTitle);};ResourceExplorer.showJoinedResourceHoverDetailsOnPopupLoad=function(intParentId,intResourceId,strResourceTitle)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3708,'ResourceExplorer.showJoinedResourceHoverDetailsOnPopupLoad =','function(intParentId, intResourceId, strResourceTitle)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');resourceExplorer.showJoinedResourceHoverDetails(intParentId,intResourceId,strResourceTitle);};ResourceExplorer.setContainerTitle=function(resourceExplorerId,strContainerTitle)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3714,'ResourceExplorer.setContainerTitle =','function(resourceExplorerId, strContainerTitle)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.setContainerTitle(strContainerTitle);};ResourceExplorer.setDisplayResultsOnMapMode=function(resourceExplorerId,strDisplayMode)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3720,'ResourceExplorer.setDisplayResultsOnMapMode =','function(resourceExplorerId, strDisplayMode)',arguments);var blnDisplayResultsOnMap=(strDisplayMode=='currentPage')?true:false;var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.setDisplayResultsOnMapMode(blnDisplayResultsOnMap);};ResourceExplorer.getDisplayResultsOnMapMode=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3728,'ResourceExplorer.getDisplayResultsOnMapMode =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);return resourceExplorer.getDisplayResultsOnMapMode();};ResourceExplorer.showAccessors=function(srcElement,resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3734,'ResourceExplorer.showAccessors =','function(srcElement, resourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.showAccessors(resourceId);};ResourceExplorer.showBody=function(resourceExplorerId,resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3740,'ResourceExplorer.showBody =','function(resourceExplorerId, resourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.showBody(resourceId);};ResourceExplorer.checkAllCheckboxes=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3746,'ResourceExplorer.checkAllCheckboxes =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.checkAllCheckboxes(srcElement);};ResourceExplorer.registerTag=function(resourceExplorerId,intTagId,strTagName,strTagIconPath,blnIsSystem,blnVisible)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3754,'ResourceExplorer.registerTag =','function(resourceExplorerId, intTagId, strTagName, strTagIconPath, blnIsSystem, blnVisible)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.registerTag(intTagId,strTagName,strTagIconPath,blnIsSystem,blnVisible);};ResourceExplorer.toggleTagVisibility=function(srcElement,intTagId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3760,'ResourceExplorer.toggleTagVisibility =','function(srcElement, intTagId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.toggleTagVisibility(intTagId);};ResourceExplorer.setTab=function(resourceExplorerId,strTab,blnOverridePlaylistPrompt)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3766,'ResourceExplorer.setTab =','function(resourceExplorerId, strTab, blnOverridePlaylistPrompt)',arguments);var blnOverridePlaylistPrompt=(typeof(blnOverridePlaylistPrompt)!='undefined')?blnOverridePlaylistPrompt:false;var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.setTab(strTab,blnOverridePlaylistPrompt);};ResourceExplorer.getTab=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3774,'ResourceExplorer.getTab =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);return resourceExplorer.getTab();};ResourceExplorer.switchTab=function(srcElement,strTab,blnAutoRetrieve,blnOverridePlaylistPrompt)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3780,'ResourceExplorer.switchTab =','function(srcElement, strTab, blnAutoRetrieve, blnOverridePlaylistPrompt)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.switchTab(strTab,blnAutoRetrieve,blnOverridePlaylistPrompt);};ResourceExplorer.switchTabAuto=function(resourceExplorerId,strTab)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3786,'ResourceExplorer.switchTabAuto =','function(resourceExplorerId, strTab)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.switchTab(strTab);};ResourceExplorer.handleMapMoveResourceRetrieval=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3792,'ResourceExplorer.handleMapMoveResourceRetrieval =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.handleMapMoveResourceRetrieval();};ResourceExplorer.handleMapMoveTagRetrieval=function(resourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3798,'ResourceExplorer.handleMapMoveTagRetrieval =','function(resourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceExplorerId);resourceExplorer.handleMapMoveTagRetrieval();};ResourceExplorer.isDefined=function(variable)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3804,'ResourceExplorer.isDefined =','function(variable)',arguments);return(typeof(variable)=='undefined')?false:true;};ResourceExplorer.isDefinedObject=function(object,variable)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3809,'ResourceExplorer.isDefinedObject =','function(object,variable)',arguments);return(typeof((object)[variable])=='undefined')?false:true;};ResourceExplorer.openPlaylist=function(srcElement,resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3814,'ResourceExplorer.openPlaylist =','function(srcElement, resourceId)',arguments);if(typeof(srcElement)=='number'||typeof(srcElement)=='string')
{var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',srcElement);}
else
{var resourceExplorer=ComponentBase.getComponentInstance(srcElement);}
resourceExplorer.openPlaylist(resourceId);};ResourceExplorer.confirmPlayPlaylist=function(srcElement,intPlaylistId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3828,'ResourceExplorer.confirmPlayPlaylist =','function(srcElement, intPlaylistId)',arguments);var strText='Playing a playlist will result in all open components being closed.\n\nAre you sure you want to continue?';Shell.lightboxConfirm(strText,500,115,ResourceExplorer.playPlaylist,srcElement,intPlaylistId);};ResourceExplorer.playPlaylist=function(srcElement,intPlaylistId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3835,'ResourceExplorer.playPlaylist =','function(srcElement, intPlaylistId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.playPlaylist(intPlaylistId);};ResourceExplorer.showDuplicateResource=function(intResourceExplorerId,intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3841,'ResourceExplorer.showDuplicateResource =','function(intResourceExplorerId, intResourceId)',arguments);var strHtml='Please enter a name for the duplicated resource:';var objSettings={blnAutoCloseLightbox:false};var arrOptions=[{strType:'text',strName:'strName',strLabel:'Duplicate Name',strDefault:'New Playlist'}];Shell.lightboxConfirmWithOptions(strHtml,400,125,objSettings,ResourceExplorer.duplicateResource,arrOptions,intResourceExplorerId,intResourceId);};ResourceExplorer.duplicateResource=function(intResourceExplorerId,intResourceId,strDuplicatedResourceName)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3863,'ResourceExplorer.duplicateResource =','function(intResourceExplorerId, intResourceId, strDuplicatedResourceName)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.duplicateResource(intResourceId,strDuplicatedResourceName);};ResourceExplorer.managePlaylistViews=function(srcElement,resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3869,'ResourceExplorer.managePlaylistViews =','function(srcElement, resourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.getPlaylistViews(resourceId);};ResourceExplorer.setPlaylistComponentsStates=function(strComponentsStates)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3875,'ResourceExplorer.setPlaylistComponentsStates =','function(strComponentsStates)',arguments);var objColumnLeft=$j('#shellColumnLeft');var objColumnRight=$j('#shellColumnRight');var objColumnWhole=$j('#shellColumnWhole');var arrLeftComponents=objShell.findChildComponents(objColumnLeft,true);var arrRightComponents=objShell.findChildComponents(objColumnRight,true);var arrWholeComponents=objShell.findChildComponents(objColumnWhole,true);var arrOpenComponents=[].concat(arrLeftComponents,arrRightComponents,arrWholeComponents);$j.each(arrOpenComponents,function(intKey,objOpenComponent)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3890,'$j.each(arrOpenComponents,','function(intKey, objOpenComponent)',arguments);var objContainer=objShell.returnComponentInstanceFromElement(objOpenComponent);var objChildComponentObjects=objContainer['objChildComponentObjects'];$j.each(['left','right','whole'],function(intKey2,strColumn)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3895,'$j.each([\'left\', \'right\', \'whole\'],','function(intKey2, strColumn)',arguments);if(objChildComponentObjects[strColumn])
{objChildComponentObjects[strColumn].each(function(objComponent)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3899,'objChildComponentObjects[strColumn].each(','function(objComponent)',arguments);switch(objComponent['strComponentType'])
{case'map':break;case'resourceExplorer':if(objContainer.returnLockedState()===false)
{objContainer.lock('undefined',true);}
break;default:objContainer.close('undefined',true);}});}});});if(strComponentsStates=='undefined'||strComponentsStates==null||strComponentsStates=='')
{return;}
var objComponentsStates=$j.evalJSON(strComponentsStates);if(objComponentsStates==null)
{return;}
$j.each(objComponentsStates.reverse(),function(intKey,objComponent)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3942,'$j.each(objComponentsStates.reverse(),','function(intKey, objComponent)',arguments);var objParams={blnForceNewContainer:true,blnCollapsed:objComponent['blnCollapsed'],blnHidden:objComponent['blnHidden'],blnLocked:objComponent['blnLocked']};var objCallbackFunction=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3953,'var objCallbackFunction =','function()',arguments);Shell.openComponent(objComponent['strComponentType'],'addResources/'+objComponent['state']['resource_ids'],false,false,objParams);};window.setTimeout(objCallbackFunction,0);});};ResourceExplorer.movePlaylistViewToPosition=function(srcElement,intPlaylistViewId,strPosition,blnOntheFly)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3964,'ResourceExplorer.movePlaylistViewToPosition =','function(srcElement, intPlaylistViewId, strPosition, blnOntheFly)',arguments);var arrValidPositions=['top','bottom','up','down'];if($j.inArray(strPosition,arrValidPositions)==-1)
{return false;}
var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.movePlaylistViewToPosition(intPlaylistViewId,strPosition,blnOntheFly);};ResourceExplorer.showPlaylistView=function(intViewId,strMapState,strComponentsStates)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',3979,'ResourceExplorer.showPlaylistView =','function(intViewId, strMapState, strComponentsStates)',arguments);Map.setPlaylistMode(true,intViewId);Map.registerPreTileUpdateFunction();if(strMapState!='')
{Map.setState(strMapState,true);}
Map.updateTileCache();if(strComponentsStates!='')
{ResourceExplorer.setPlaylistComponentsStates(strComponentsStates);}};ResourceExplorer.editPlaylistView=function(srcElement,intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4003,'ResourceExplorer.editPlaylistView =','function(srcElement, intPlaylistViewId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.editPlaylistView(intPlaylistViewId);};ResourceExplorer.savePlaylistViewText=function(srcElement,intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4009,'ResourceExplorer.savePlaylistViewText =','function(srcElement, intPlaylistViewId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.savePlaylistViewText(intPlaylistViewId);};ResourceExplorer.confirmSavePlaylistViewAll=function(srcElement,intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4015,'ResourceExplorer.confirmSavePlaylistViewAll =','function(srcElement, intPlaylistViewId)',arguments);var strText="Are you sure you want to update this view's name and description as well as appyling the current map and component view?";var arrOptions=[{strType:'checkbox',strName:'viewSaveLocked',strLabel:'Save Locked Components',strDefault:true},{strType:'checkbox',strName:'viewSaveCollapsed',strLabel:'Save Collapsed Components',strDefault:true}];Shell.lightboxConfirmWithOptions(strText,500,150,{},ResourceExplorer.savePlaylistViewAll,arrOptions,srcElement,intPlaylistViewId);};ResourceExplorer.savePlaylistViewAll=function(srcElement,intPlaylistViewId,blnIncludeLockedComponents,blnIncludeCollapsedComponents)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4037,'ResourceExplorer.savePlaylistViewAll =','function(srcElement, intPlaylistViewId, blnIncludeLockedComponents, blnIncludeCollapsedComponents)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.savePlaylistViewAll(intPlaylistViewId,blnIncludeLockedComponents,blnIncludeCollapsedComponents);};ResourceExplorer.cancelEditPlaylistView=function(srcElement,intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4043,'ResourceExplorer.cancelEditPlaylistView =','function(srcElement, intPlaylistViewId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.cancelEditPlaylistView(intPlaylistViewId);};ResourceExplorer.removePlaylistView=function(srcElement,intPlaylistViewId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4049,'ResourceExplorer.removePlaylistView =','function(srcElement, intPlaylistViewId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.removePlaylistView(intPlaylistViewId);};ResourceExplorer.closePlaylist=function(srcElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4055,'ResourceExplorer.closePlaylist =','function(srcElement)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.closePlaylist();};ResourceExplorer.createDraggables=function(resourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4061,'ResourceExplorer.createDraggables =','function(resourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',resourceId);resourceExplorer.createDraggables();};ResourceExplorer.makePngTransparent=function(intResourceExplorerId,strId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4067,'ResourceExplorer.makePngTransparent =','function(intResourceExplorerId, strId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.makePngsTransparent(strId,true);};ResourceExplorer.makePngsTransparent=function(intResourceExplorerId,strClassName)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4073,'ResourceExplorer.makePngsTransparent =','function(intResourceExplorerId, strClassName)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.makePngsTransparent(strClassName);};ResourceExplorer.makeBackgroundPngTransparent=function(intResourceExplorerId,strId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4079,'ResourceExplorer.makeBackgroundPngTransparent =','function(intResourceExplorerId, strId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.makeBackgroundPngTransparent(strId);};ResourceExplorer.registerTopic=function(intResourceExplorerId,intTopicId,intParentTopicId,strTopicName,strTopicIconPath,strActive,strVisible,strExpanded,strHasChildren)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4085,'ResourceExplorer.registerTopic =','function(intResourceExplorerId, intTopicId, intParentTopicId, strTopicName, strTopicIconPath, strActive, strVisible, strExpanded, strHasChildren)',arguments);blnActive=(strActive=='true')?true:false;blnVisible=(strVisible=='true')?true:false;blnExpanded=(strExpanded=='true')?true:false;blnHasChildren=(strHasChildren=='true')?true:false;var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.registerTopic(intTopicId,intParentTopicId,strTopicName,strTopicIconPath,blnActive,blnVisible,blnExpanded,blnHasChildren);};ResourceExplorer.unregisterTopics=function(intResourceExplorerId,strTopics)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4096,'ResourceExplorer.unregisterTopics =','function(intResourceExplorerId, strTopics)',arguments);var arrTopics=$j.evalJSON(strTopics);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.unregisterTopics(arrTopics);};ResourceExplorer.initialFetchStampsForAllTopics=function(intResourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4105,'ResourceExplorer.initialFetchStampsForAllTopics =','function(intResourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.initialFetchStampsForAllTopics();};ResourceExplorer.fetchStampsForAllTopics=function(intResourceExplorerId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4111,'ResourceExplorer.fetchStampsForAllTopics =','function(intResourceExplorerId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.fetchStampsForAllTopics();};ResourceExplorer.toggleTopicSelection=function(srcElement,intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4117,'ResourceExplorer.toggleTopicSelection =','function(srcElement, intTopicId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.toggleTopicSelection(srcElement,intTopicId);};ResourceExplorer.showTopicActivity=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4123,'ResourceExplorer.showTopicActivity =','function()',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer','',true);if(typeof(resourceExplorer)!='undefined')
{return resourceExplorer.showTopicActivity();}};ResourceExplorer.hideTopicActivity=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4133,'ResourceExplorer.hideTopicActivity =','function()',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer','',true);if(typeof(resourceExplorer)!='undefined')
{return resourceExplorer.hideTopicActivity();}};ResourceExplorer.expandTopic=function(srcElement,intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4143,'ResourceExplorer.expandTopic =','function(srcElement, intTopicId)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.expandTopic(intTopicId);};ResourceExplorer.setTopicNameOnHoverDisabled=function(strTopicNameOnHoverDisabled)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4149,'ResourceExplorer.setTopicNameOnHoverDisabled =','function(strTopicNameOnHoverDisabled)',arguments);var blnTopicNameOnHoverDisabled=(strTopicNameOnHoverDisabled=='true')?true:false;var resourceExplorer=objShell.getComponentFromType('resourceExplorer');if(typeof(resourceExplorer)!='undefined')
{resourceExplorer.setTopicNameOnHoverDisabled(blnTopicNameOnHoverDisabled);}};ResourceExplorer.getTopicNameOnHoverDisabled=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4161,'ResourceExplorer.getTopicNameOnHoverDisabled =','function()',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer');if(typeof(resourceExplorer)!='undefined')
{return resourceExplorer.getTopicNameOnHoverDisabled();}};ResourceExplorer.getTopicDetails=function(intTopicId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4171,'ResourceExplorer.getTopicDetails =','function(intTopicId)',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer','',true);if(typeof(resourceExplorer)!='undefined')
{return resourceExplorer.getTopicDetails(intTopicId);}};ResourceExplorer.getSelectedTopicsCount=function()
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4181,'ResourceExplorer.getSelectedTopicsCount =','function()',arguments);var resourceExplorer=objShell.getComponentFromType('resourceExplorer','',true);if(typeof(resourceExplorer)!='undefined')
{return resourceExplorer.getSelectedTopicsCount();}
else
{return 0;}};ResourceExplorer.markAsFeatured=function(intResourceExplorerId,intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4195,'ResourceExplorer.markAsFeatured =','function(intResourceExplorerId, intResourceId)',arguments);var arrZoomScales=[];$j('#showMarkAsFeatured input[type="checkbox"][name="enabledZoomScales"]:checked').each(function(mixKey,objElement)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4200,'$j(\'#showMarkAsFeatured input[type="checkbox"][name="enabledZoomScales"]:checked\').each(','function(mixKey, objElement)',arguments);arrZoomScales.push($j(objElement).val());});var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.markAsFeatured(intResourceId,true,arrZoomScales);};ResourceExplorer.removeFeatured=function(intResourceExplorerId,intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4209,'ResourceExplorer.removeFeatured =','function(intResourceExplorerId, intResourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.markAsFeatured(intResourceId,false,[]);};ResourceExplorer.showAddTags=function(intResourceExplorerId,intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4215,'ResourceExplorer.showAddTags =','function(intResourceExplorerId, intResourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.showAddTags(intResourceId);};ResourceExplorer.saveAddTags=function(intResourceExplorerId,intResourceId)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4221,'ResourceExplorer.saveAddTags =','function(intResourceExplorerId, intResourceId)',arguments);var resourceExplorer=ComponentBase.getComponentInstanceFromId('resourceExplorer',intResourceExplorerId);resourceExplorer.saveAddTags(intResourceId);};ResourceExplorer.setSetsTabMode=function(srcElement,strMode)
{Profiler.profile('view/components/resource_explorer/assets/javascript/resource_explorer.js',4227,'ResourceExplorer.setSetsTabMode =','function(srcElement, strMode)',arguments);var resourceExplorer=ComponentBase.getComponentInstance(srcElement);resourceExplorer.setSetsTabMode(strMode);};var HelperBase=Base.extend({init:function(objCustomSettings)
{Profiler.profile('view/shared/assets/javascript/helpers/helper_base.js',13,'init:','function(objCustomSettings)',arguments);var objCustomSettings=typeof(objCustomSettings)!='undefined'?objCustomSettings:{};this.objBaseSettings={strIdPrefix:'Helper'};$j.extend(this.objBaseSettings,objCustomSettings);this.generateId();},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/helper_base.js',32,'shutdown:','function()',arguments);},generateId:function()
{Profiler.profile('view/shared/assets/javascript/helpers/helper_base.js',38,'generateId:','function()',arguments);var intId=Math.floor(Math.random()*100+1);var objDate=new Date();var intTime=objDate.getMilliseconds()*1000;this.strId=this.objBaseSettings.strIdPrefix+intId+intTime;},getId:function()
{Profiler.profile('view/shared/assets/javascript/helpers/helper_base.js',50,'getId:','function()',arguments);return this.strId;},setElementSelector:function(mixSelector)
{Profiler.profile('view/shared/assets/javascript/helpers/helper_base.js',56,'setElementSelector:','function(mixSelector)',arguments);if(typeof(mixSelector)=='string')
{var strSelector=mixSelector;}
else
{var strElementId=$j(mixSelector).attr('id');if(strElementId=='')
{$j(mixSelector).attr('id',this.strId);var strSelector='#'+this.strId;}
else
{var strSelector='#'+strElementId;}}
this.strSelector=strSelector;},getDomElement:function(blnReturnExtended)
{Profiler.profile('view/shared/assets/javascript/helpers/helper_base.js',89,'getDomElement:','function(blnReturnExtended)',arguments);var blnReturnExtended=typeof(blnReturnExtended)!='undefined'?blnReturnExtended:false;var objElement=$j(this.strSelector);if(blnReturnExtended===true)
{return objElement;}
else
{return objElement.get(0);}}});var ResourcesHelper=HelperBase.extend({init:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',13,'init:','function()',arguments);this._super
({strIdPrefix:'ResourcesHelper'});},openResource:function(objPassedResource,strMode)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',23,'openResource:','function(objPassedResource, strMode)',arguments);var objResource={intResourceId:null,strNodeType:null,strFileType:null,strDownloadFileURL:null,blnIsOwner:false};$j.extend(objResource,objPassedResource);var strMode=typeof(strMode)!='undefined'?strMode:'normal';var blnIsLicencedUser=Shell.getIsLicencedUser();switch(objResource.strNodeType)
{case'file':case'page':if(blnIsLicencedUser===false)
{Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');}
else
{switch(objResource.strFileType)
{case'audio':case'image':case'video':if(strMode=='favouritesOrganiser')
{Shell.launchNewWindow('/view/components/resource_details/loading_simple.php?intResourceId='+objResource.intResourceId+'&b=1&c=1',true,true);}
else
{Shell.openComponent('resourceDetails','addResource/'+objResource.intResourceId);}
break;default:if(objResource.strNodeType=='file'&&(strMode=='favouritesOrganiser'||strMode=='favouriteSet'))
{Shell.redirect(objResource.strDownloadFileURL);}
else
{Shell.launchNewWindow('/view/components/resource_details/loading_simple.php?intResourceId='+objResource.intResourceId+'&b=1&c=1',true,true);}}}
break;case'favourite_set':if(blnIsLicencedUser===false)
{Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');}
else
{Favourites.showFavouritesSet(objResource.intResourceId);}
break;case'folder':if(blnIsLicencedUser===false)
{Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');}
else
{Shell.openComponent('resourceExplorer','showChildren/'+objResource.intResourceId);}
break;case'layer':if(blnIsLicencedUser===false)
{Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');}
else
{Shell.openComponent('resourceExplorer','showLayer/'+objResource.intResourceId);}
break;case'playlist':if(blnIsLicencedUser===false&&objResource.blnIsOwner===false)
{Shell.showLicenceRequiredPopup('Play published playlists','play_playlists');}
else
{Shell.openComponent('resourceExplorer','playPlaylist/'+objResource.intResourceId);}
break;case'project':if(blnIsLicencedUser===false&&objResource.blnIsOwner===false)
{Shell.showLicenceRequiredPopup('Play published playlists','play_playlists');}
else
{Shell.openComponent('resourceExplorer','showProject/'+objResource.intResourceId);}
break;case'web link':if(blnIsLicencedUser===false)
{Shell.showLicenceRequiredPopup('View thousands of resources','view_resources');}
else
{Shell.launchNewResourceWindow(objResource.intResourceId);}
break;}},editResource:function(objPassedResource)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',150,'editResource:','function(objPassedResource)',arguments);var objResource={intResourceId:null,strNodeType:null,strFileType:null,blnIsOwner:false};$j.extend(objResource,objPassedResource);var blnIsLicencedUser=Shell.getIsLicencedUser();switch(objResource.strNodeType)
{case'favourite_set':if(blnIsLicencedUser===false)
{Shell.showLicenceRequiredPopup('Upload and create resources','upload_and_create');}
else
{Favourites.editFavouritesSet(objResource.intResourceId);}
break;default:if(blnIsLicencedUser===false)
{Shell.showLicenceRequiredPopup('Upload and create resources','upload_and_create');}
else
{Shell.openComponent('resourceEditor','editResource/'+objResource.intResourceId,true);}}},publishResources:function(arrSelectedResourceIds)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',193,'publishResources:','function(arrSelectedResourceIds)',arguments);var arrSelectedResourceIds=(typeof(arrSelectedResourceIds)!='undefined')?arrSelectedResourceIds:[];if(arrSelectedResourceIds.length<=0)
{$j('.selectedResourceCheckbox').each(function(intKey,objCheckboxElement)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',200,'$j(\'.selectedResourceCheckbox\').each(','function(intKey, objCheckboxElement)',arguments);if(objCheckboxElement.checked)
{arrSelectedResourceIds.push(objCheckboxElement.value);}});}
if(arrSelectedResourceIds.length<=0)
{alert('Please select some resources to publish first!');return false;}
this.arrSelectedResourceIds=arrSelectedResourceIds;var intLightBoxHeight=(arrSelectedResourceIds.length>1)?318:240;var objCallbackFunction=$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',227,'var objCallbackFunction = $j.proxy(','function()',arguments);this.showPublishResourcesConfirmation();},this);Shell.launchNewLightboxWindow(objCallbackFunction,500,intLightBoxHeight);},showPublishResourcesConfirmation:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',236,'showPublishResourcesConfirmation:','function()',arguments);$j.ajax
({async:true,cache:false,data:{arrSelectedResourceIds:$j.toJSON(this.arrSelectedResourceIds)},type:'POST',url:'/resourcesHelper/0/showPublishResourcesConfirmation',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',249,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);$j('#lbContent').html(strResponseText);},this)});},showTutorSelection:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',265,'showTutorSelection:','function()',arguments);if(!Shell.getUserPupilStatus())
{this.submitResourcesForPublishing();return;}
Shell.showCustomLightboxButtonActivity();$j.ajax
({async:true,cache:false,data:{},type:'POST',url:'/resourcesHelper/0/showTutorSelection',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',285,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);$j('#lbContent').html(strResponseText);},this)});},submitResourcesForPublishing:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',300,'submitResourcesForPublishing:','function()',arguments);var objConfirmPublishResourcesTutorSelect=$j('#confirmPublishResourcesTutorSelect');var intTutorId=(objConfirmPublishResourcesTutorSelect.length>0)?objConfirmPublishResourcesTutorSelect.val():null;var objConfirmPublishResourcesFirstName=$j('#firstName');if(objConfirmPublishResourcesFirstName.length>0)
{var strFirstName=(objConfirmPublishResourcesFirstName.length>0)?objConfirmPublishResourcesFirstName.val():null;if(strFirstName==''||strFirstName==null)
{alert('Please enter your first name.');return;}}
else
{var strFirstName='';}
var objConfirmPublishResourcesLastName=$j('#lastName');if(objConfirmPublishResourcesLastName.length>0)
{var strLastName=(objConfirmPublishResourcesLastName.length>0)?objConfirmPublishResourcesLastName.val():null;if(strLastName==''||strLastName==null)
{alert('Please enter your last name.');return;}}
else
{var strLastName='';}
Shell.showCustomLightboxButtonActivity();$j.ajax
({async:true,cache:false,data:{arrSelectedResourceIds:$j.toJSON(this.arrSelectedResourceIds),intTutorId:intTutorId,strFirstName:strFirstName,strLastName:strLastName},type:'POST',url:'/resourcesHelper/0/publishResources',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',357,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);Shell.resizeLightboxWindow(500,315);$j('#lbContent').html(strResponseText);},this)});},unpublishResources:function(arrSelectedResourceIds)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',375,'unpublishResources:','function(arrSelectedResourceIds)',arguments);var arrSelectedResourceIds=(typeof(arrSelectedResourceIds)!='undefined')?arrSelectedResourceIds:[];if(arrSelectedResourceIds.length<=0)
{$j('.selectedResourceCheckbox').each(function(intKey,objCheckboxElement)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',382,'$j(\'.selectedResourceCheckbox\').each(','function(intKey, objCheckboxElement)',arguments);if(objCheckboxElement.checked)
{arrSelectedResourceIds.push(objCheckboxElement.value);}});}
if(arrSelectedResourceIds.length<=0)
{alert("Please select some resources to unpublish first!");return false;}
this.arrSelectedResourceIds=arrSelectedResourceIds;var intLightBoxHeight=(arrSelectedResourceIds.length>1)?238:175;var objCallbackFunction=$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',409,'var objCallbackFunction = $j.proxy(','function()',arguments);this.showUnpublishResourcesConfirmation();},this);Shell.launchNewLightboxWindow(objCallbackFunction,500,intLightBoxHeight);},showUnpublishResourcesConfirmation:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',418,'showUnpublishResourcesConfirmation:','function()',arguments);$j.ajax
({async:true,cache:false,data:{arrSelectedResourceIds:$j.toJSON(this.arrSelectedResourceIds)},type:'POST',url:'/resourcesHelper/0/showUnpublishResourcesConfirmation',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',431,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);$j('#lbContent').html(strResponseText);},this)});Shell.generateStandardLightboxLoading();},submitResourcesForUnpublishing:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',449,'submitResourcesForUnpublishing:','function()',arguments);Shell.showCustomLightboxButtonActivity();$j.ajax
({async:true,cache:false,data:{arrSelectedResourceIds:$j.toJSON(this.arrSelectedResourceIds)},type:'POST',url:'/resourcesHelper/0/unpublishResources',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',465,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);Shell.resizeLightboxWindow(500,175);$j('#lbContent').html(strResponseText);},this)});},deleteResources:function(arrSelectedResourceIds)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',483,'deleteResources:','function(arrSelectedResourceIds)',arguments);var arrSelectedResourceIds=(typeof(arrSelectedResourceIds)!='undefined')?arrSelectedResourceIds:[];if(arrSelectedResourceIds.length<=0)
{$j('.selectedResourceCheckbox').each(function(intKey,objCheckboxElement)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',490,'$j(\'.selectedResourceCheckbox\').each(','function(intKey, objCheckboxElement)',arguments);if(objCheckboxElement.checked)
{arrSelectedResourceIds.push(objCheckboxElement.value);}});}
if(arrSelectedResourceIds.length<=0)
{alert('Please select some resources to delete first!');return false;}
this.arrSelectedResourceIds=arrSelectedResourceIds;var intLightBoxHeight=(arrSelectedResourceIds.length>1)?238:175;var objCallbackFunction=$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',517,'var objCallbackFunction = $j.proxy(','function()',arguments);this.showDeleteResourcesConfirmation();},this);Shell.launchNewLightboxWindow(objCallbackFunction,500,intLightBoxHeight);},showDeleteResourcesConfirmation:function(arrSelectedResourceIds)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',526,'showDeleteResourcesConfirmation:','function(arrSelectedResourceIds)',arguments);$j.ajax
({async:true,cache:false,data:{arrSelectedResourceIds:$j.toJSON(this.arrSelectedResourceIds)},type:'POST',url:'/resourcesHelper/0/showDeleteResourcesConfirmation',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',539,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);$j('#lbContent').html(strResponseText);},this)});},submitResourcesForDeleting:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',554,'submitResourcesForDeleting:','function()',arguments);Shell.showCustomLightboxButtonActivity();$j.ajax
({async:true,cache:false,data:{arrSelectedResourceIds:$j.toJSON(this.arrSelectedResourceIds)},type:'POST',url:'/resourcesHelper/0/deleteResources',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',570,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);Shell.resizeLightboxWindow(500,85);$j('#lbContent').html(strResponseText);},this)});},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resources_helper.js',588,'shutdown:','function()',arguments);this._super();}});var ResourcePopupHelper=HelperBase.extend({init:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',13,'init:','function()',arguments);this._super
({strIdPrefix:'ResourcePopupHelper'});this.setElementSelector('#'+this.strId);this.intCurrentResourceId=null;this.intShowTimeout=null;this.blnEnabled=true;$j(document).find('body:first').append('<div id="'+this.strId+'" class="resource_popup"></div>');$j('body:first').bind('mousedown',$j.proxy(this.onBodyClick,this));},generateHtml:function(objResource,objButtons)
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',37,'generateHtml:','function(objResource, objButtons)',arguments);try
{objResource.strName=$j.evalJSON(objResource.strName);objResource.strDescription=$j.evalJSON(objResource.strDescription);}
catch(err)
{}
var strRatingHtml='';for(var intStar=1;intStar<=5;intStar++)
{if(intStar==objResource.intRating)
{strRatingHtml+='<input name="'+this.strId+'_rating" type="radio" class="star" disabled="disabled" checked="checked" />';}
else
{strRatingHtml+='<input name="'+this.strId+'_rating" type="radio" class="star" disabled="disabled" />';}}
var strHtml='<table class="details">'+'<tr>'+'<td class="thumbnail" colspan="3"><img src="'+objResource.strHoverThumbnailUrl.replace(/&amp;/gi,'&')+'" /></td>'+'</tr>'+'<tr>'+'<td class="name" colspan="3">'+objResource.strName+'</td>'+'</tr>';if(objResource.strDescription!=''&&objResource.strDescription!==null)
{objResource.strDescription=objResource.strDescription.replace(/\n/g,'<br />');strHtml+='<tr>'+'<td class="description" colspan="3"><div class="description">'+objResource.strDescription+'</div></td>'+'</tr>';}
strHtml+='<tr>'+'<td class="rating"><div style="margin: 0 auto;">'+strRatingHtml+'</div></td>'+'<td class="views">Views: '+objResource.intViews+'</td>'+'<td class="favourites">Favourites: '+objResource.intFavourites+'</td>'+'</tr>';if(typeof(objButtons)!='undefined')
{strHtml+='<tr>'+'<td colspan="3" style="padding-top:5px;">';$j.each(objButtons,function(intKey,objButton)
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',97,'$j.each(objButtons,','function(intKey, objButton)',arguments);strHtml+=Shell.getLightboxButtonHtml(objButton);});strHtml+='</td>'+'</tr>';}
strHtml+='</table>'+'<div style="height:10px;"></div>';return strHtml;},show:function(objEvent,objResourceDetails,objButtons,strPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',113,'show:','function(objEvent, objResourceDetails, objButtons, strPosition)',arguments);if(this.blnEnabled===false)
{return;}
var objResource={intId:0,strName:'Resource',strDescription:'',strHoverThumbnailUrl:'',intRating:0,intViews:0,intFavourites:0,blnIsFavourite:false};$j.extend(objResource,objResourceDetails);if(objResource.intId==this.intCurrentResourceId)
{return;}
var strPosition=typeof(strPosition)!='undefined'?strPosition:'right';this.hide(true);var objCallbackFunction=$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',148,'var objCallbackFunction = $j.proxy(','function()',arguments);this.doShow(objEvent,objResource,objButtons,strPosition);},this);this.intShowTimeout=setTimeout(objCallbackFunction,1000);this.intCurrentResourceId=objResource.intId;},doShow:function(objEvent,objResource,objButtons,strPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',159,'doShow:','function(objEvent, objResource, objButtons, strPosition)',arguments);var _this=this;var objImage=document.createElement('img');$j(objImage).bind('load',function()
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',166,'$j(objImage).bind(\'load\',','function()',arguments);if(_this.blnEnabled===true)
{var objPopup=_this.getDomElement(true);objPopup.html(_this.generateHtml(objResource,objButtons));resizeImageToFit(_this.strId+' td.thumbnail img:first',325,250,true);var objElement=$j(objEvent.currentTarget);var objElementOffset=objElement.offset();var intHoverWidth=parseInt(objPopup.outerWidth());var intHoverHeight=parseInt(objPopup.outerHeight());var intWindowHeight=parseInt($j(window).height());var intWindowWidth=parseInt($j(window).width());var intElementWidth=objElement.outerWidth();var intElementHeight=objElement.outerHeight();var blnPositionSet=false;if(strPosition=='below')
{var intTop=objElementOffset.top+intElementHeight+35;var intLeft=intHoverWidth>=intElementWidth?objElementOffset.left-((intHoverWidth-intElementWidth)/2):objElementOffset.left+((intElementWidth-intHoverWidth)/2);if(intLeft+intHoverWidth>intWindowWidth-15)
{intLeft=intWindowWidth-intHoverWidth-15;}
if(intLeft<15)
{intLeft=15;}
if(intTop+intHoverHeight>intWindowHeight-15)
{intTop=objElementOffset.top-intHoverHeight-15;}
if((intTop<=objElementOffset.top&&intTop+intHoverHeight>=objElementOffset.top)||(intTop<=objElementOffset.top+intElementHeight&&intTop+intHoverHeight>=objElementOffset.top+intElementHeight))
{intTop=objElementOffset.top-intHoverHeight-15;}
if(objEvent.pageX>=intLeft&&objEvent.pageX<=intLeft+intHoverWidth&&objEvent.pageY>=intTop&&objEvent.pageY<=intTop+intHoverHeight)
{intTop=objElementOffset.top-intHoverHeight-15;}
if(intTop<15)
{strPosition='right';}}
if(strPosition=='right')
{var intTop=objElementOffset.top;var intLeft=objElementOffset.left+intElementWidth+35;if(intTop+intHoverHeight>intWindowHeight-15)
{intTop=intWindowHeight-intHoverHeight-15;}
if(intLeft+intHoverWidth>intWindowWidth-15)
{intLeft=intWindowWidth-intHoverWidth-15;}
if((intLeft<=objElementOffset.left&&intLeft+intHoverWidth>=objElementOffset.left)||(intLeft<=objElementOffset.left+intElementWidth&&intLeft+intHoverWidth>=objElementOffset.left+intElementWidth))
{intLeft=objElementOffset.left-intHoverWidth-35;}
if(objEvent.pageX>=intLeft&&objEvent.pageX<=intLeft+intHoverWidth&&objEvent.pageY>=intTop&&objEvent.pageY<=intTop+intHoverHeight)
{intLeft=objElementOffset.left-intHoverWidth-35;}}
objPopup.hide();objPopup.css({top:intTop+'px',left:intLeft+'px'});objPopup.stop(true,true).fadeIn();objPopup.find('input.star').rating();}
$j(this).remove();});objImage.src=objResource.strHoverThumbnailUrl.replace(/&amp;/gi,'&');},hide:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',306,'hide:','function(blnInstant)',arguments);if(this.intShowTimeout)
{clearTimeout(this.intShowTimeout);}
if(this.intCurrentResourceId===null)
{blnInstant=true;}
var objPopup=this.getDomElement(true);if(blnInstant===true)
{objPopup.stop(true,true).css
({top:'-2000px',left:'-2000px'}).show();}
else
{objPopup.stop(true,true).fadeOut(400,function()
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',332,'objPopup.stop(true, true).fadeOut(400,','function()',arguments);$j(this).css
({top:'-2000px',left:'-2000px'}).show();});}
this.intCurrentResourceId=null;},enable:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',346,'enable:','function()',arguments);this.blnEnabled=true;},disable:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',352,'disable:','function()',arguments);this.blnEnabled=false;},onBodyClick:function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',358,'onBodyClick:','function(objEvent)',arguments);var objPopup=this.getDomElement(true);var objPopupOffset=objPopup.offset();var intPopupWidth=objPopup.outerWidth();var intPopupHeight=objPopup.outerHeight();if(objEvent.pageX<objPopupOffset.left||objEvent.pageX>objPopupOffset.left+intPopupWidth||objEvent.pageY<objPopupOffset.top||objEvent.pageY>objPopupOffset.top+intPopupHeight)
{this.hide(true);}},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/resource_popup_helper.js',374,'shutdown:','function()',arguments);var objPopup=this.getDomElement(true);objPopup.remove();this._super();}});var FavouritesHelper=HelperBase.extend({init:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',13,'init:','function()',arguments);this._super
({strIdPrefix:'FavouritesSetsManagerHelper'});this.objFavouritesSetsHelper=new FavouritesSetsHelper(this);this.objFavouritesSetHelper=new FavouritesSetHelper(this);this.blnMinimised=true;this.getAllFavouritesSets();},getAllFavouritesSets:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',35,'getAllFavouritesSets:','function()',arguments);return this.objFavouritesSetsHelper.load(true);},showAllFavouritesSets:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',41,'showAllFavouritesSets:','function()',arguments);if(this.objFavouritesSetsHelper.blnVisible===false&&this.objFavouritesSetHelper.blnVisible===false)
{this.objFavouritesSetsHelper.minimise(true);this.objFavouritesSetHelper.minimise(true);this.blnMinimised=true}
this.objFavouritesSetsHelper.load(false,true);},refreshFavouritesSets:function(arrDeletedResources)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',55,'refreshFavouritesSets:','function(arrDeletedResources)',arguments);this.objFavouritesSetsHelper.refresh();},removeFavouritesSet:function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',62,'removeFavouritesSet:','function(intFavouritesSetId)',arguments);this.objFavouritesSetsHelper.removeFavouritesSet(intFavouritesSetId);ResourceExplorer.refresh();},showFavouritesSet:function(intFavouritesSetId,objCallbackFunction)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',71,'showFavouritesSet:','function(intFavouritesSetId, objCallbackFunction)',arguments);if(this.objFavouritesSetsHelper.blnVisible===false&&this.objFavouritesSetHelper.blnVisible===false)
{this.objFavouritesSetsHelper.minimise(true);this.objFavouritesSetHelper.minimise(true);this.blnMinimised=true}
this.objFavouritesSetHelper.load(intFavouritesSetId,true,objCallbackFunction);},addResourceToNewFavouritesSet:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',85,'addResourceToNewFavouritesSet:','function(intResourceId)',arguments);var objCallbackFunction=$j.proxy(function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',88,'var objCallbackFunction = $j.proxy(','function(intFavouritesSetId)',arguments);this.addResourceToExistingFavouritesSet(intFavouritesSetId,intResourceId);},this);this.objFavouritesSetsHelper.createNewFavouritesSet(objCallbackFunction);},addResourceToExistingFavouritesSet:function(intFavouritesSetId,intResourceId,blnShowFavouritesSet,objPopupNotificationTargetElement)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',99,'addResourceToExistingFavouritesSet:','function(intFavouritesSetId, intResourceId, blnShowFavouritesSet, objPopupNotificationTargetElement)',arguments);var blnShowFavouritesSet=typeof(blnShowFavouritesSet)!='undefined'?blnShowFavouritesSet:true;if(blnShowFavouritesSet===true)
{var objCallbackFunction=$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',106,'var objCallbackFunction = $j.proxy(','function()',arguments);this.objFavouritesSetHelper.addResource(intResourceId);},this);this.showFavouritesSet(intFavouritesSetId,objCallbackFunction);}
else
{if(typeof(objPopupNotificationTargetElement)!='undefined'&&this.objFavouritesSetHelper.blnVisible===true&&parseInt(intFavouritesSetId)!=parseInt(this.objFavouritesSetHelper.getActiveSetId()))
{var objCallbackFunction=function(strFavouritesSetName)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',122,'var objCallbackFunction =','function(strFavouritesSetName)',arguments);var objElementWidth=$j(objPopupNotificationTargetElement).outerWidth();var objElementHeight=$j(objPopupNotificationTargetElement).outerHeight();var objElementOffset=$j(objPopupNotificationTargetElement).offset();$j('<div style="display:none;">Resource saved to '+strFavouritesSetName+'</div>').css({position:'absolute',top:objElementOffset.top+'px',left:(objElementOffset.left+objElementWidth+15)+'px',width:'300px',padding:'5px',backgroundImage:'url(/view/components/map/assets/images/map_picker/carousel_container_front_middle.png)',color:'#ffffff',textAlign:'center',fontWeight:'bold',zIndex:5000}).appendTo('body:first').fadeIn(400,function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',140,'}).appendTo(\'body:first\').fadeIn(400,','function()',arguments);$j(this).oneTime('2s','hide_notification',function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',142,'$j(this).oneTime(\'2s\', \'hide_notification\',','function()',arguments);$j(this).fadeOut(400,function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',144,'$j(this).fadeOut(400,','function()',arguments);$j(this).remove();});});});};}
else
{var objCallbackFunction=null;}
this.objFavouritesSetHelper.addResource(intResourceId,intFavouritesSetId,objCallbackFunction);}},editFavouritesSet:function(intFavouritesSetId,blnSaveResourcesOnSetUpdate,blnPublishOnSetUpdate)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',163,'editFavouritesSet:','function(intFavouritesSetId, blnSaveResourcesOnSetUpdate, blnPublishOnSetUpdate)',arguments);this.objFavouritesSetsHelper.editFavouritesSet(intFavouritesSetId,blnSaveResourcesOnSetUpdate,blnPublishOnSetUpdate);},saveFavouritesSet:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',169,'saveFavouritesSet:','function()',arguments);this.objFavouritesSetsHelper.saveFavouritesSet();},highlightResource:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',175,'highlightResource:','function(intResourceId)',arguments);this.objFavouritesSetHelper.highlightResource(intResourceId);},unHighlightResource:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',181,'unHighlightResource:','function(intResourceId)',arguments);this.objFavouritesSetHelper.unHighlightResource(intResourceId);},removeResourceFromAllFavouritesSets:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',188,'removeResourceFromAllFavouritesSets:','function(intResourceId)',arguments);$j.each(this.objFavouritesSetsHelper.objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',191,'$j.each(this.objFavouritesSetsHelper.objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);if(objFavouritesSet.arrResources===null)
{return true;}
$j.each(objFavouritesSet.arrResources,$j.proxy(function(intResourceKey,intCurrentResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',200,'$j.each(objFavouritesSet.arrResources, $j.proxy(','function(intResourceKey, intCurrentResourceId)',arguments);if(parseInt(intCurrentResourceId)==parseInt(intResourceId))
{if(this.objFavouritesSetHelper.getActiveSetId()==objFavouritesSet.intId)
{this.objFavouritesSetHelper.objCoverflow.removeItemById(intResourceId);}
this.objFavouritesSetHelper.objCachedFavouritesSets[objFavouritesSet.intId]=null;}},this));},this));this.toggleHeartIcons(intResourceId,false);},getFavouriteSetsForResource:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',222,'getFavouriteSetsForResource:','function(intResourceId)',arguments);var arrFavouritesSets=[];$j.each(this.objFavouritesSetsHelper.objFavouritesSets,$j.proxy(function(intFavouritesSetId,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',227,'$j.each(this.objFavouritesSetsHelper.objFavouritesSets, $j.proxy(','function(intFavouritesSetId, objFavouritesSet)',arguments);if(objFavouritesSet.arrResources===null)
{return true;}
$j.each(objFavouritesSet.arrResources,$j.proxy(function(intKey,intCurrentResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',236,'$j.each(objFavouritesSet.arrResources, $j.proxy(','function(intKey, intCurrentResourceId)',arguments);if(parseInt(intCurrentResourceId)==parseInt(intResourceId))
{arrFavouritesSets.push({intId:objFavouritesSet.intId,strName:objFavouritesSet.strName});return false;}},this));},this));return arrFavouritesSets;},showFavouritesMenu:function(objEvent,intResourceId,strNodeType,blnIsPublished,blnIsFavourite)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',253,'showFavouritesMenu:','function(objEvent, intResourceId, strNodeType, blnIsPublished, blnIsFavourite)',arguments);objEvent=$j.event.fix(objEvent||window.event);var blnLicencedUser=Shell.getIsLicencedUser();var arrResourceTypesToExclude=['establishment','favourite_set'];var objPopupNotificationTargetElement=objEvent.currentTarget||objEvent.target;var blnAcceptableResourceType=$j.inArray(strNodeType,arrResourceTypesToExclude)==-1?true:false;if(blnAcceptableResourceType===true)
{var favouritesMenu=new UMenu(200);if(blnLicencedUser===false)
{if(this.objFavouritesSetHelper.blnVisible===true)
{favouritesMenu.addItem('Add to open Favourite Set',function(){Shell.showLicenceRequiredPopup('Favourites','favourites');});favouritesMenu.addSpacer();}
favouritesMenu.addItem('Add to new Favourite Set',function(){Shell.showLicenceRequiredPopup('Favourites','favourites');});favouritesMenu.addItem('Add to private Favourite Set',function(){Shell.showLicenceRequiredPopup('Favourites','favourites');});favouritesMenu.addItem('Add to published Favourite Set',function(){Shell.showLicenceRequiredPopup('Favourites','favourites');});}
else
{if(this.objFavouritesSetHelper.blnVisible===true)
{favouritesMenu.addItem('Add to open Favourite Set',$j.proxy(function(){this.addResourceToExistingFavouritesSet(this.objFavouritesSetHelper.getActiveSetId(),intResourceId);},this));favouritesMenu.addSpacer();}
var objFavouritesSets=Favourites.getAllFavouritesSets();favouritesMenu.addItem('Add to new Favourite Set',function(){Favourites.addResourceToNewFavouritesSet(intResourceId);});var privateFavouritesSetsSubmenu=new UMenu(200,false,200);var publishedFavouritesSetsSubmenu=new UMenu(200,false,200);$j.each(objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',305,'$j.each(objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);if(objFavouritesSet.blnPublished===true)
{if(this.objFavouritesSetHelper.blnVisible===true&&parseInt(objFavouritesSet.intId)!=parseInt(this.objFavouritesSetHelper.getActiveSetId()))
{publishedFavouritesSetsSubmenu.addItem(objFavouritesSet.strName,function(){Favourites.addResourceToExistingFavouritesSet(objFavouritesSet.intId,intResourceId,false,objPopupNotificationTargetElement);});}
else
{publishedFavouritesSetsSubmenu.addItem(objFavouritesSet.strName,function(){Favourites.addResourceToExistingFavouritesSet(objFavouritesSet.intId,intResourceId);});}}
else
{if(this.objFavouritesSetHelper.blnVisible===true&&parseInt(objFavouritesSet.intId)!=parseInt(this.objFavouritesSetHelper.getActiveSetId()))
{privateFavouritesSetsSubmenu.addItem(objFavouritesSet.strName,function(){Favourites.addResourceToExistingFavouritesSet(objFavouritesSet.intId,intResourceId,false,objPopupNotificationTargetElement);});}
else
{privateFavouritesSetsSubmenu.addItem(objFavouritesSet.strName,function(){Favourites.addResourceToExistingFavouritesSet(objFavouritesSet.intId,intResourceId);});}}},this));favouritesMenu.addSubmenu('Add to private Favourite Set',privateFavouritesSetsSubmenu,null,300);favouritesMenu.addSubmenu('Add to published Favourite Set',publishedFavouritesSetsSubmenu,null,300);var arrInFavSets=this.getFavouriteSetsForResource(intResourceId);if(arrInFavSets.length>0)
{favouritesMenu.addSpacer();var inFavSetsMenu=new UMenu(200,false,200);for(var i=0;i<arrInFavSets.length;i++)
{if(typeof(arrInFavSets[i])!='undefined')
{var objResource={intResourceId:arrInFavSets[i].intId,strNodeType:'favourite_set',strFileType:'',blnIsOwner:true};inFavSetsMenu.addItem(arrInFavSets[i].strName,function(){Resources.openResource(objResource);});}}
favouritesMenu.addSubmenu('Already in these Favourite Sets',inFavSetsMenu,null,300);}}
favouritesMenu.show(objEvent,40);}
else
{alert('This resource type can not be added to a favourites set.');}},getIsFavourite:function(intResourceId,arrFavouritesSetsToExclude)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',380,'getIsFavourite:','function(intResourceId, arrFavouritesSetsToExclude)',arguments);var blnIsFavourite=false;$j.each(this.objFavouritesSetsHelper.objFavouritesSets,$j.proxy(function(intFavouritesSetId,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',385,'$j.each(this.objFavouritesSetsHelper.objFavouritesSets, $j.proxy(','function(intFavouritesSetId, objFavouritesSet)',arguments);if($j.inArray(objFavouritesSet.intId,arrFavouritesSetsToExclude)>-1)
{return true;}
if(objFavouritesSet.arrResources===null)
{return true;}
$j.each(objFavouritesSet.arrResources,$j.proxy(function(intKey,intCurrentResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',400,'$j.each(objFavouritesSet.arrResources, $j.proxy(','function(intKey, intCurrentResourceId)',arguments);if(parseInt(intCurrentResourceId)==parseInt(intResourceId))
{blnIsFavourite=true;return false;}},this));if(blnIsFavourite===true)
{return false;}},this));return blnIsFavourite;},setFavouriteSetPublishedStatus:function(intFavouritesSetId,blnPublished)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',425,'setFavouriteSetPublishedStatus:','function(intFavouritesSetId, blnPublished)',arguments);$j.each(this.objFavouritesSetsHelper.objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',428,'$j.each(this.objFavouritesSetsHelper.objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);if(parseInt(objFavouritesSet.intId)==parseInt(intFavouritesSetId))
{this.objFavouritesSetsHelper.objFavouritesSets[intKey].blnPublished=blnPublished;return false;}},this));if(typeof(this.objFavouritesSetHelper.objCachedFavouritesSets[intFavouritesSetId])!='undefined'&&this.objFavouritesSetHelper.objCachedFavouritesSets[intFavouritesSetId]!==null)
{this.objFavouritesSetHelper.objCachedFavouritesSets[intFavouritesSetId].blnPublished=blnPublished;if(parseInt(this.objFavouritesSetHelper.getActiveSetId())==parseInt(intFavouritesSetId))
{this.objFavouritesSetHelper.setupButtons();}}},toggleHeartIcons:function(intResourceId,blnIsFavourite)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',452,'toggleHeartIcons:','function(intResourceId, blnIsFavourite)',arguments);var strSmallImageSource=blnIsFavourite===true?'/view/shared/assets/images/favourites/is_favourite.png':'/view/shared/assets/images/favourites/not_favourite.png';var strBigImageSource=blnIsFavourite===true?'/view/shared/assets/images/favourites/is_favourite_25px.png':'/view/shared/assets/images/favourites/not_favourite_25px.png';$j('#resourceExplorerItem_'+intResourceId+' div.menu img.favourite').attr('src',strSmallImageSource);if(parseInt(Map.getResourceIdForCalloutBox())==parseInt(intResourceId))
{$j('#resource_favourites_button').css
({backgroundImage:'url('+strBigImageSource+')'});}},isMinimised:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',472,'isMinimised:','function()',arguments);return this.blnMinimised;},setMinimised:function(blnMinimised)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',478,'setMinimised:','function(blnMinimised)',arguments);this.blnMinimised=blnMinimised;},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',484,'shutdown:','function()',arguments);this._super();},addResourceToDefaultFavouritesSet:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',494,'addResourceToDefaultFavouritesSet:','function(intResourceId)',arguments);$j.ajax
({async:true,cache:false,data:{intResourceId:intResourceId},dataType:'json',type:'POST',url:'/favouritesSetsHelper/0/addResourceToDefaultFavouritesSet'});this.toggleHeartIcons(intResourceId,true);},removeResourceFromDefaultFavouritesSet:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_helper.js',513,'removeResourceFromDefaultFavouritesSet:','function(intResourceId)',arguments);$j.ajax
({async:true,cache:false,data:{intResourceId:intResourceId},dataType:'json',type:'POST',url:'/favouritesSetsHelper/0/removeResourceFromDefaultFavouritesSet'});this.toggleHeartIcons(intResourceId,false);}});var FavouritesSetsHelper=HelperBase.extend({init:function(objFavouritesHelper)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',13,'init:','function(objFavouritesHelper)',arguments);this._super
({strIdPrefix:'FavouritesSetsHelper'});this.blnLoaded=false;this.blnVisible=false;this.blnMinimised=true;this.objFavouritesSets={};this.blnSaveResourcesOnSetUpdate=false;this.blnPublishOnSetUpdate=false;this.intMaximumFavouritesSets=1000;this.strHoveredItemId=null;this.objFavouritesHelper=objFavouritesHelper;$j(document.body).append('<div id="'+this.strId+'" class="favourites_sets"></div>');this.setElementSelector('#'+this.strId);var objFavourites=this.getDomElement(true);this.onWindowResize();objFavourites.append('<div class="favourites_sets_border"></div>');objFavourites.append('<div class="title">All Favourite Sets</div><div class="component_buttons"><div class="help_button" title="Toggle help text"></div></div><div class="window_buttons"><div class="minimise_button" title="Minimise"></div><div class="maximise_button" title="Maximise"></div><div class="close_button" title="Close"></div></div>');objFavourites.append('<div id="'+this.strId+'_help" class="help">When you click on the red heart symbol for a resource it is added to a Favourite set.<br />Favourite Sets are useful to gather resources from the library that you want to use in a particular lesson.<br /><div class="close_help_button" style="padding-top:10px;"></div><div class="more_help_button"></div></div>');$j('#'+this.strId+'_help div.close_help_button').html(Shell.getLightboxButtonHtml
({strId:'favourites_sets_close_help',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'Close help'}));$j('#'+this.strId+'_help div.more_help_button').html(Shell.getLightboxButtonHtml
({strId:'favourites_sets_more_help',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'More help'}));objFavourites.append('<div id="'+this.strId+'_coverflow"></div>');this.setupEvents();this.objCoverflow=new CoverflowHelper
({mixSelector:'#'+this.strId+'_coverflow',intWidth:'auto',intHeight:115,blnStartMinimised:true,intScrollAmount:4,blnSortable:false,blnUsePlaceHolders:true,blnSelectable:false,blnShowHoverGlow:false,objOnClickItemCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',93,'objOnClickItemCallback: $j.proxy(','function(objEvent, objItem)',arguments);ResourcePopup.hide(true);this.objFavouritesHelper.showFavouritesSet(objItem.intId);},this),objOnMouseOverItemCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',98,'objOnMouseOverItemCallback: $j.proxy(','function(objEvent, objItem)',arguments);objFavourites.stopTime('onMouseOutTimeout').everyTime('500ms','onMouseOutTimeout',$j.proxy(this.onMouseOutTimeout,this));this.strHoveredItemId=objEvent.currentTarget.id;this.showOptionsButtons(objEvent,objItem);ResourcePopup.show(objEvent,objItem,{},'below');},this),objOnMouseOutItemCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',107,'objOnMouseOutItemCallback: $j.proxy(','function(objEvent, objItem)',arguments);var objElement=$j(objEvent.currentTarget);var objElementOffset=objElement.offset();var intElementWidth=objElement.outerWidth();var intElementHeight=objElement.outerHeight();intElementHeight+=$j('#'+this.strId+'_options_buttons').outerHeight();if(objEvent.pageX<objElementOffset.left||objEvent.pageX>objElementOffset.left+intElementWidth||objEvent.pageY<objElementOffset.top||objEvent.pageY>objElementOffset.top+intElementHeight)
{objFavourites.stopTime('onMouseOutTimeout');this.hideOptionsButtons();ResourcePopup.hide();}},this),objOnSortCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',128,'objOnSortCallback: $j.proxy(','function(objEvent, objItem)',arguments);this.onSort();},this)});},load:function(blnLoadOnly,blnCloseFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',136,'load:','function(blnLoadOnly, blnCloseFavouritesSet)',arguments);if(this.blnLoaded===true)
{if(blnLoadOnly===true)
{return this.objFavouritesSets;}
else
{this.objCoverflow.removeAllItems();if(blnCloseFavouritesSet===true)
{this.objFavouritesHelper.objFavouritesSetHelper.hide();}
this.show();this.objCoverflow.addItems(this.objFavouritesSets);if(this.objCoverflow.getItemCount()==0)
{$j('#'+this.strId+'_coverflow').parent().hide();$j('#'+this.strId+'_help').show();}
return this.objFavouritesSets;}}
$j.ajax
({async:false,cache:false,data:{},dataType:'json',type:'POST',url:'/favouritesSetsHelper/0/getAllFavouritesSets',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',182,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var objItems=$j.evalJSON(XMLHttpRequest.responseText);this.blnLoaded=true;this.objFavouritesSets=objItems;this.objCoverflow.removeAllItems();if(blnLoadOnly!==true)
{if(blnCloseFavouritesSet===true)
{this.objFavouritesHelper.objFavouritesSetHelper.hide();}
this.show();}
this.objCoverflow.addItems(objItems);if(this.objCoverflow.getItemCount()==0)
{$j('#'+this.strId+'_coverflow').parent().hide();$j('#'+this.strId+'_help').show();}
$j('#shellFavouritesSetsCount').html(this.objCoverflow.getItemCount());},this)});return this.objFavouritesSets;},refresh:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',227,'refresh:','function()',arguments);this.blnLoaded=false;if(this.blnVisible===true)
{this.load();}},setupEvents:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',240,'setupEvents:','function()',arguments);$j(window).resize($j.proxy(this.onWindowResize,this));var objFavourites=this.getDomElement(true);objFavourites.find('div.help_button').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',249,'objFavourites.find(\'div.help_button\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);$j('#'+this.strId+'_coverflow').parent().toggle();$j('#'+this.strId+'_help').toggle();$j('#'+this.strId+' div.options_buttons').toggle();},this));objFavourites.find('div.window_buttons div.minimise_button').unbind('click').bind('click',$j.proxy(this.minimise,this));objFavourites.find('div.window_buttons div.maximise_button').unbind('click').bind('click',$j.proxy(this.maximise,this));objFavourites.find('div.window_buttons div.close_button').unbind('click').bind('click',$j.proxy(this.hide,this));objFavourites.find('div.more_help_button').unbind('click').bind('click',$j.proxy(function(){Shell.launchNewWindow('http://ulearn.webbased.co.uk/resources/view/id/116139',true);},this));objFavourites.find('div.close_help_button').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',262,'objFavourites.find(\'div.close_help_button\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);$j('#'+this.strId+'_coverflow').parent().toggle();$j('#'+this.strId+'_help').toggle();$j('#'+this.strId+' div.options_buttons').toggle();},this));},minimise:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',271,'minimise:','function(blnInstant)',arguments);var objFavourites=this.getDomElement(true);var objTitle=objFavourites.find('div.title');var objOptionsButtons=objFavourites.find('div.options_buttons');var objCoverflow=this.objCoverflow.getDomElement(true);objTitle.hide();objOptionsButtons.hide();objCoverflow.parent().css
({height:'115px'});objCoverflow.css
({height:'115px'});objCoverflow.find('ul.coverflow_list,li.coverflow_list_item,li.coverflow_list_item_placeholder').css
({height:'115px'});if(blnInstant===true)
{objFavourites.css
({height:'120px'});}
else
{objFavourites.animate({height:'120px'},200);}
this.objCoverflow.minimise();this.blnMinimised=true;this.objFavouritesHelper.setMinimised(true);objFavourites.find('div.window_buttons div.minimise_button').hide();objFavourites.find('div.window_buttons div.maximise_button').show();objFavourites.find('div.favourites_sets_border').hide();},maximise:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',343,'maximise:','function(blnInstant)',arguments);var objFavourites=this.getDomElement(true);var objTitle=objFavourites.find('div.title');var objOptionsButtons=objFavourites.find('div.options_buttons');var objCoverflow=this.objCoverflow.getDomElement(true);objFavourites.find('div.favourites_sets_border').show();this.objCoverflow.maximise();if(blnInstant===true)
{objFavourites.css
({height:'300px'});}
else
{objFavourites.animate({height:'300px'},200);}
objCoverflow.parent().css
({height:'160px'});objCoverflow.css
({height:'160px'});objCoverflow.find('ul.coverflow_list,li.coverflow_list_item,li.coverflow_list_item_placeholder').css
({height:'160px'});objTitle.show();objOptionsButtons.show();this.blnMinimised=false;this.objFavouritesHelper.setMinimised(false);objFavourites.find('div.window_buttons div.maximise_button').hide();objFavourites.find('div.window_buttons div.minimise_button').show();},toggleMinimised:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',415,'toggleMinimised:','function(blnInstant)',arguments);if(this.blnMinimised===true)
{this.maximise(blnInstant);}
else
{this.minimise(blnInstant);}},createNewFavouritesSet:function(objCallbackFunction)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',428,'createNewFavouritesSet:','function(objCallbackFunction)',arguments);if(this.objCoverflow.getItemCount()>=this.intMaximumFavouritesSets)
{Shell.lightboxAlert('A maximum of '+this.intMaximumFavouritesSets+' Favourite Sets can be created per account.',500,75);return false;}
$j.ajax
({async:true,cache:false,data:{},dataType:'text',type:'POST',url:'/favouritesSetsHelper/0/createNewFavouritesSet',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',447,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);if(typeof(objCallbackFunction)!='undefined')
{this.blnLoaded=false;if(this.blnVisible===true)
{this.load();}
else
{this.load(true);}
$j('#'+this.strId+'_coverflow').parent().show();$j('#'+this.strId+'_help').hide();var intFavouritesSetId=XMLHttpRequest.responseText;if(typeof(objCallbackFunction)!='undefined')
{objCallbackFunction(intFavouritesSetId);}}},this)});},openFavouritesSet:function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',484,'openFavouritesSet:','function(intFavouritesSetId)',arguments);if(typeof(intFavouritesSetId)!='undefined')
{this.objFavouritesHelper.showFavouritesSet(intFavouritesSetId);}
else
{var arrSelectedFavouritesSets=this.objCoverflow.getSelectedItems();if(arrSelectedFavouritesSets.length==0)
{alert('You need to select a favourites set!');}
else if(arrSelectedFavouritesSets.length>1)
{alert('You can only open one favourites set at a time!');}
else
{this.objFavouritesHelper.showFavouritesSet(arrSelectedFavouritesSets[0]);}}},editFavouritesSet:function(intFavouritesSetId,blnSaveResourcesOnSetUpdate,blnPublishOnSetUpdate)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',514,'editFavouritesSet:','function(intFavouritesSetId, blnSaveResourcesOnSetUpdate, blnPublishOnSetUpdate)',arguments);if(typeof(intFavouritesSetId)=='undefined')
{var arrSelectedFavouritesSets=this.objCoverflow.getSelectedItems();if(arrSelectedFavouritesSets.length==0)
{alert('You need to select a favourites set!');return;}
else if(arrSelectedFavouritesSets.length>1)
{alert('You can only edit one favourites set at a time!');return;}
else
{var intFavouritesSetId=arrSelectedFavouritesSets[0];}}
this.blnSaveResourcesOnSetUpdate=typeof(blnSaveResourcesOnSetUpdate)!='undefined'?blnSaveResourcesOnSetUpdate:false;this.blnPublishOnSetUpdate=typeof(blnPublishOnSetUpdate)!='undefined'?blnPublishOnSetUpdate:false;var objCallbackFunction=$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',543,'var objCallbackFunction = $j.proxy(','function()',arguments);this.showEditFavouritesSet(intFavouritesSetId);},this);Shell.launchNewLightboxWindow(objCallbackFunction,515,415);},showEditFavouritesSet:function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',552,'showEditFavouritesSet:','function(intFavouritesSetId)',arguments);$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:intFavouritesSetId},type:'POST',url:'/favouritesSetsHelper/0/showEditFavouritesSet',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',565,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);$j('#lbContent').html(strResponseText);},this)});},saveFavouritesSet:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',580,'saveFavouritesSet:','function()',arguments);Shell.showCustomLightboxButtonActivity();var intFavouritesSetId=$j('#favourites_helper_lightbox input[name="id"]').val();var strName=$j('#favourites_helper_lightbox input[name="name"]').val();var strDescription=$j('#favourites_helper_lightbox textarea[name="description"]').val();var strTags=$j('#favourites_helper_lightbox textarea[name="additional_tags"]').val();$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:intFavouritesSetId,strName:strName,strDescription:strDescription,strTags:strTags,blnSaveResources:this.blnSaveResourcesOnSetUpdate},type:'POST',url:'/favouritesSetsHelper/0/saveFavouritesSet',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',605,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;Shell.resizeLightboxWindow(515,100,true);strResponseText=objShell.filterXmlResponse(strResponseText);$j('#lbContent').html(strResponseText);if($j('#favourites_helper_lightbox input[name="blnSuccessful"]').val()=='true')
{if(this.blnPublishOnSetUpdate===true)
{Resources.publishResources([intFavouritesSetId]);}
$j.each(this.objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',629,'$j.each(this.objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);if(objFavouritesSet.intId==intFavouritesSetId)
{this.objFavouritesSets[intKey].strName=strName;this.objFavouritesSets[intKey].strDescription=strDescription;return false;}},this));if(typeof(this.objFavouritesHelper.objFavouritesSetHelper.objCachedFavouritesSets[intFavouritesSetId])!='undefined'&&this.objFavouritesHelper.objFavouritesSetHelper.objCachedFavouritesSets[intFavouritesSetId]!==null)
{this.objFavouritesHelper.objFavouritesSetHelper.objCachedFavouritesSets[intFavouritesSetId].strName=strName;this.objFavouritesHelper.objFavouritesSetHelper.objCachedFavouritesSets[intFavouritesSetId].strDescription=strDescription;if(this.objFavouritesHelper.objFavouritesSetHelper.getActiveSetId()==intFavouritesSetId)
{$j('#'+this.objFavouritesHelper.objFavouritesSetHelper.strId+' div.title:first').html(strName);}}
if(this.blnSaveResourcesOnSetUpdate===true)
{this.blnLoaded=false;}
if(this.blnVisible===true)
{this.load();}
else
{this.load(true);}
this.objCoverflow.orderByName();if(this.blnSaveResourcesOnSetUpdate===true)
{ResourceExplorer.refresh();}}},this)});},publishFavouritesSet:function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',686,'publishFavouritesSet:','function(intFavouritesSetId)',arguments);if(typeof(intFavouritesSetId)=='undefined')
{var arrSelectedFavouritesSets=this.objCoverflow.getSelectedItems();if(arrSelectedFavouritesSets.length==0)
{alert('You need to select a favourites set!');return;}
else if(arrSelectedFavouritesSets.length>1)
{alert('You can only publish one favourites set at a time!');return;}
else
{var intFavouritesSetId=arrSelectedFavouritesSets[0];}}
this.editFavouritesSet(intFavouritesSetId,true,true);},unpublishFavouritesSet:function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',715,'unpublishFavouritesSet:','function(intFavouritesSetId)',arguments);if(typeof(intFavouritesSetId)=='undefined')
{var arrSelectedFavouritesSets=this.objCoverflow.getSelectedItems();if(arrSelectedFavouritesSets.length==0)
{alert('You need to select a favourites set!');return;}
else if(arrSelectedFavouritesSets.length>1)
{alert('You can only unpublish one favourites set at a time!');return;}
else
{var intFavouritesSetId=arrSelectedFavouritesSets[0];}}
Resources.unpublishResources([intFavouritesSetId]);},deleteFavouritesSet:function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',744,'deleteFavouritesSet:','function(intFavouritesSetId)',arguments);if(typeof(intFavouritesSetId)=='undefined')
{var arrSelectedFavouritesSets=this.objCoverflow.getSelectedItems();if(arrSelectedFavouritesSets.length==0)
{alert('You need to select a favourites set!');return;}
else if(arrSelectedFavouritesSets.length>1)
{Resources.deleteResources(arrSelectedFavouritesSets);}
else
{Resources.deleteResources([arrSelectedFavouritesSets[0]]);}}
else
{Resources.deleteResources([intFavouritesSetId]);}},removeFavouritesSet:function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',775,'removeFavouritesSet:','function(intFavouritesSetId)',arguments);var objFavouritesSets={};var intPosition=0;$j.each(this.objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',781,'$j.each(this.objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);if(objFavouritesSet.intId==intFavouritesSetId)
{this.objCoverflow.removeItemById(intFavouritesSetId);}
else
{objFavouritesSets[intPosition]=objFavouritesSet;intPosition++;}},this));this.objFavouritesSets=objFavouritesSets;if(this.blnVisible===true)
{this.load();}
else
{this.load(true);}
$j('#shellFavouritesSetsCount').html(this.objCoverflow.getItemCount());},isResourceInFavouritesSet:function(intFavouritesSetId,intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',817,'isResourceInFavouritesSet:','function(intFavouritesSetId, intResourceId)',arguments);var blnInFavouritesSet=false;$j.each(this.objFavouritesSets,function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',821,'$j.each(this.objFavouritesSets,','function(intKey, objFavouritesSet)',arguments);if(parseInt(objFavouritesSet.intId)==parseInt(intFavouritesSetId))
{$j.each(objFavouritesSet.arrResources,function(intResourceKey,intCurrentResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',825,'$j.each(objFavouritesSet.arrResources,','function(intResourceKey, intCurrentResourceId)',arguments);if(parseInt(intCurrentResourceId)==parseInt(intResourceId))
{blnInFavouritesSet=true;return false;}});return false;}});return blnInFavouritesSet;},getResourceCountForFavouritesSet:function(intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',843,'getResourceCountForFavouritesSet:','function(intFavouritesSetId)',arguments);var intResourceCount=0;$j.each(this.objFavouritesSets,function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',847,'$j.each(this.objFavouritesSets,','function(intKey, objFavouritesSet)',arguments);if(parseInt(objFavouritesSet.intId)==parseInt(intFavouritesSetId))
{intResourceCount=objFavouritesSet.arrResources.length;return false;}});return intResourceCount;},onMouseOutTimeout:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',862,'onMouseOutTimeout:','function()',arguments);var objElement=$j('#'+this.strHoveredItemId);var objElementOffset=objElement.offset();var intElementWidth=objElement.outerWidth();var intElementHeight=objElement.outerHeight();intElementHeight+=$j('#'+this.strId+'_options_buttons').outerHeight();if(objMousePosition.x<objElementOffset.left||objMousePosition.x>objElementOffset.left+intElementWidth||objMousePosition.y<objElementOffset.top||objMousePosition.y>objElementOffset.top+intElementHeight)
{var objFavourites=this.getDomElement(true);objFavourites.stopTime('onMouseOutTimeout');this.hideOptionsButtons();ResourcePopup.hide();}},onSort:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',887,'onSort:','function()',arguments);var arrOrderedItemIds=this.objCoverflow.getOrderedItemIds();var objOrderedFavouritesSets={};var intFavouritesSetNumber=0;$j.each(arrOrderedItemIds,$j.proxy(function(intKey,intFavouritesSetId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',894,'$j.each(arrOrderedItemIds, $j.proxy(','function(intKey, intFavouritesSetId)',arguments);$j.each(this.objFavouritesSets,function(intFavouritesSetKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',896,'$j.each(this.objFavouritesSets,','function(intFavouritesSetKey, objFavouritesSet)',arguments);if(intFavouritesSetId==objFavouritesSet.intId)
{objOrderedFavouritesSets[intFavouritesSetNumber]=objFavouritesSet;intFavouritesSetNumber++;}});},this));this.objFavouritesSets=objOrderedFavouritesSets;},onWindowResize:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',912,'onWindowResize:','function()',arguments);var objFavourites=this.getDomElement(true);objFavourites.css('width',parseInt($j(window).width()-10)+'px');},show:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',922,'show:','function()',arguments);if(this.blnMinimised!==this.objFavouritesHelper.isMinimised())
{if(this.objFavouritesHelper.isMinimised()===true)
{this.minimise(true);}
else
{this.maximise(true);}}
var objFavourites=this.getDomElement(true);objFavourites.show();this.blnVisible=true;},hide:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',948,'hide:','function()',arguments);var objFavourites=this.getDomElement(true);this.hideOptionsButtons();objFavourites.hide();this.objCoverflow.deselectItems();this.objCoverflow.unRenderAllItems();$j('#'+this.strId+'_coverflow').parent().show();$j('#'+this.strId+'_help').hide();this.blnVisible=false;},showOptionsButtons:function(objEvent,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',974,'showOptionsButtons:','function(objEvent, objFavouritesSet)',arguments);var objFavourites=this.getDomElement(true);var objButtonsBar=$j('#'+this.strId+'_options_buttons');if(objButtonsBar.length==0)
{objButtonsBar=$j('<div id="'+this.strId+'_options_buttons" class="favourites_sets_options_buttons"></div>');objButtonsBar.append('<div class="edit" style="margin-left:38px;" title="Edit"></div><div class="delete" title="Delete"></div><div class="publish" title="Publish"></div>');$j('body:first').append(objButtonsBar);objButtonsBar.bind('mouseover',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',994,'objButtonsBar.bind(\'mouseover\', $j.proxy(','function()',arguments);objFavourites.stopTime('onMouseOutTimeout').everyTime('500ms','onMouseOutTimeout',$j.proxy(this.onMouseOutTimeout,this));this.objCoverflow.highlightItem('#'+this.strHoveredItemId);},this));objButtonsBar.bind('mouseout',$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',1003,'objButtonsBar.bind(\'mouseout\', $j.proxy(','function(objEvent)',arguments);var objElement=$j(objEvent.currentTarget);var objElementOffset=objElement.offset();var intElementWidth=objElement.outerWidth();var intElementHeight=objElement.outerHeight();intElementHeight+=this.objCoverflow.intItemHeight-16;objElementOffset.top=objElementOffset.top-this.objCoverflow.intItemHeight;if(objEvent.pageX<objElementOffset.left||objEvent.pageX>objElementOffset.left+intElementWidth||objEvent.pageY<objElementOffset.top||objEvent.pageY>objElementOffset.top+intElementHeight)
{objFavourites.stopTime('onMouseOutTimeout');this.objCoverflow.unhighlightItem('#'+this.strHoveredItemId);this.hideOptionsButtons();ResourcePopup.hide();}},this));}
objButtonsBar.find('div.delete').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',1029,'objButtonsBar.find(\'div.delete\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);this.objCoverflow.unhighlightItem('#'+this.strHoveredItemId);this.hideOptionsButtons();ResourcePopup.hide(true);this.deleteFavouritesSet(objFavouritesSet.intId);},this));objButtonsBar.find('div.open').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',1037,'objButtonsBar.find(\'div.open\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);this.objCoverflow.unhighlightItem('#'+this.strHoveredItemId);this.hideOptionsButtons();ResourcePopup.hide(true);this.openFavouritesSet(objFavouritesSet.intId);},this));objButtonsBar.find('div.edit').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',1045,'objButtonsBar.find(\'div.edit\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);this.objCoverflow.unhighlightItem('#'+this.strHoveredItemId);this.hideOptionsButtons();ResourcePopup.hide(true);this.editFavouritesSet(objFavouritesSet.intId);},this));if(objFavouritesSet.blnPublished===true)
{objButtonsBar.find('div.publish').css
({backgroundPosition:'-192px 0px'}).attr('title','Unpublish');objButtonsBar.find('div.publish').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',1061,'objButtonsBar.find(\'div.publish\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);this.objCoverflow.unhighlightItem('#'+this.strHoveredItemId);this.hideOptionsButtons();ResourcePopup.hide(true);this.unpublishFavouritesSet(objFavouritesSet.intId);},this));}
else
{objButtonsBar.find('div.publish').css
({backgroundPosition:'-120px 0px'}).attr('title','Publish');objButtonsBar.find('div.publish').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',1076,'objButtonsBar.find(\'div.publish\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);this.objCoverflow.unhighlightItem('#'+this.strHoveredItemId);this.hideOptionsButtons();ResourcePopup.hide(true);this.publishFavouritesSet(objFavouritesSet.intId);},this));}
var objElement=$j(objEvent.currentTarget);var objElementOffset=objElement.offset();if(this.blnMinimised===true)
{var intTop=104;var intPaddingTop=5;}
else
{var intTop=(objElementOffset.top+objElement.height()-16);var intPaddingTop=5;}
var intLeft=objElementOffset.left;objButtonsBar.css
({top:intTop+'px',left:intLeft+'px',paddingTop:intPaddingTop+'px'});objButtonsBar.show();},hideOptionsButtons:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',1114,'hideOptionsButtons:','function()',arguments);var objButtonsBar=$j('#'+this.strId+'_options_buttons');objButtonsBar.hide();},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_sets_helper.js',1123,'shutdown:','function()',arguments);this._super();}});var FavouritesSetHelper=HelperBase.extend({init:function(objFavouritesHelper)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',13,'init:','function(objFavouritesHelper)',arguments);this._super
({strIdPrefix:'FavouritesSetHelper'});this.blnVisible=false;this.blnEditable=true;this.blnMinimised=true;this.intActiveSetId=null;this.strHoveredItemId=null;this.objCachedFavouritesSets={};this.intMaximumResourcesPerSet=50;this.objFavouritesHelper=objFavouritesHelper;$j(document.body).append('<div id="'+this.strId+'" class="favourites_set"></div>');this.setElementSelector('#'+this.strId);var objFavourites=this.getDomElement(true);this.onWindowResize();objFavourites.append('<div class="favourites_set_border"></div>');objFavourites.append('<div class="title"></div><div class="component_buttons"><div class="help_button" title="Toggle help text"></div><div class="back_button" title="Click here to see your list of Favourite Sets"></div></div><div class="window_buttons"><div class="minimise_button" title="Minimise"></div><div class="maximise_button" title="Maximise"></div><div class="close_button" title="Close"></div></div>');objFavourites.append('<div id="'+this.strId+'_help" class="help">When you click on the red heart symbol for a resource it is added to a Favourite set.<br />Favourite Sets are useful to gather resources from the library that you want to use in a particular lesson.<br /><div class="close_help_button" style="padding-top:10px;"></div><div class="more_help_button"></div></div>');$j('#'+this.strId+'_help div.close_help_button').html(Shell.getLightboxButtonHtml
({strId:'favourites_set_close_help',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'Close help'}));$j('#'+this.strId+'_help div.more_help_button').html(Shell.getLightboxButtonHtml
({strId:'favourites_set_more_help',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'More help'}));objFavourites.append('<div id="'+this.strId+'_coverflow"></div>');objFavourites.append('<div class="options_buttons"><div class="clear_all_button"></div><div class="publish_button"></div><div class="save_button"></div></div>');$j('#'+this.strId+' div.options_buttons div.clear_all_button').html(Shell.getLightboxButtonHtml
({strId:'favourites_set_clear_all',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'Clear all'}));$j('#'+this.strId+' div.options_buttons div.revert_button').html(Shell.getLightboxButtonHtml
({strId:'favourites_set_revert',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'Revert'}));$j('#'+this.strId+' div.options_buttons div.save_button').html(Shell.getLightboxButtonHtml
({strId:'favourites_set_save',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'Save'}));$j('#'+this.strId+' div.options_buttons div.publish_button').html(Shell.getLightboxButtonHtml
({strId:'favourites_sets_publish',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'Publish'}));this.setupEvents();var objBrowserDetails=objShell.getBrowserDetails();this.objCoverflow=new CoverflowHelper
({mixSelector:'#'+this.strId+'_coverflow',intWidth:'auto',intHeight:115,blnStartMinimised:true,intScrollAmount:4,blnSortable:(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=7)?true:true,blnUsePlaceHolders:true,blnSelectable:false,blnShowHoverGlow:false,objOnClickItemCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',139,'objOnClickItemCallback: $j.proxy(','function(objEvent, objItem)',arguments);this.openResource(objItem.intId);},this),objOnDragItemStartCallback:$j.proxy(function(objEvent,objUi)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',143,'objOnDragItemStartCallback: $j.proxy(','function(objEvent, objUi)',arguments);ResourcePopup.disable();ResourcePopup.hide(true);},this),objOnDragItemStopCallback:$j.proxy(function(objEvent,objUi)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',148,'objOnDragItemStopCallback: $j.proxy(','function(objEvent, objUi)',arguments);ResourcePopup.enable();},this),objOnDragItemUpdateCallback:$j.proxy(function(objEvent,objUi)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',152,'objOnDragItemUpdateCallback: $j.proxy(','function(objEvent, objUi)',arguments);this.updateOrderOfResources();},this),objOnMouseOverItemCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',156,'objOnMouseOverItemCallback: $j.proxy(','function(objEvent, objItem)',arguments);objFavourites.stopTime('onMouseOutTimeout').everyTime('500ms','onMouseOutTimeout',$j.proxy(this.onMouseOutTimeout,this));ResourceExplorer.highlightResource(objItem.intId,true);Map.highlightStamp(objItem.intId);ResourcePopup.show(objEvent,objItem,{},'below');this.strHoveredItemId=objEvent.currentTarget.id;this.showOptionsButtons(objEvent,objItem);},this),objOnMouseOutItemCallback:$j.proxy(function(objEvent,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',167,'objOnMouseOutItemCallback: $j.proxy(','function(objEvent, objItem)',arguments);var objElement=$j(objEvent.currentTarget);var objElementOffset=objElement.offset();var intElementWidth=objElement.outerWidth();var intElementHeight=objElement.outerHeight();intElementHeight+=$j('#'+this.strId+'_options_buttons').outerHeight();if(objEvent.pageX<objElementOffset.left||objEvent.pageX>objElementOffset.left+intElementWidth||objEvent.pageY<objElementOffset.top||objEvent.pageY>objElementOffset.top+intElementHeight)
{objFavourites.stopTime('onMouseOutTimeout');ResourceExplorer.unHighlightResource(objItem.intId);Map.unHighlightStamp(objItem.intId);this.hideOptionsButtons();ResourcePopup.hide();}},this),objOnSort:$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',191,'objOnSort: $j.proxy(','function()',arguments);this.updateOrderOfResources();},this)});},load:function(intId,blnCloseFavouritesSets,objCallbackFunction)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',198,'load:','function(intId, blnCloseFavouritesSets, objCallbackFunction)',arguments);if(this.intActiveSetId==intId)
{if(blnCloseFavouritesSets===true)
{this.objFavouritesHelper.objFavouritesSetsHelper.hide();}
this.show();this.setupResources();this.setupButtons();this.objCoverflow.refreshItems();if(typeof(objCallbackFunction)!='undefined')
{objCallbackFunction();}
return;}
this.intActiveSetId=intId;this.objCoverflow.removeAllItems();Map.resetFavouritesSetGeometries();if(typeof(this.objCachedFavouritesSets[intId])!='undefined'&&this.objCachedFavouritesSets[intId]!==null)
{$j('#'+this.strId+' div.title:first').html(this.objCachedFavouritesSets[intId].strName);if(blnCloseFavouritesSets===true)
{this.objFavouritesHelper.objFavouritesSetsHelper.hide();}
this.setEditableMode(this.objCachedFavouritesSets[intId].blnOwned);this.objCoverflow.addItems(this.objCachedFavouritesSets[intId].arrResources);this.show();this.setupResources();this.setupButtons();if(typeof(objCallbackFunction)!='undefined')
{objCallbackFunction();}
return;}
$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:intId},dataType:'json',type:'POST',url:'/favouritesSetsHelper/0/getFavouritesSet',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',288,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var objFavouritesSet=$j.evalJSON(XMLHttpRequest.responseText);this.objCachedFavouritesSets[objFavouritesSet.intId]=objFavouritesSet;$j('#'+this.strId+' div.title:first').html(objFavouritesSet.strName);if(blnCloseFavouritesSets===true)
{this.objFavouritesHelper.objFavouritesSetsHelper.hide();}
this.setEditableMode(objFavouritesSet.blnOwned);this.objCoverflow.addItems(objFavouritesSet.arrResources);this.show();this.setupResources();this.setupButtons();if(typeof(objCallbackFunction)!='undefined')
{objCallbackFunction();}},this)});},setupEvents:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',330,'setupEvents:','function()',arguments);$j(window).resize($j.proxy(this.onWindowResize,this));var objFavourites=this.getDomElement(true);objFavourites.unbind('mouseover').bind('mouseover',function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',339,'objFavourites.unbind(\'mouseover\').bind(\'mouseover\',','function()',arguments);$j(document).data('blnOverHighPriorityDroppable',true);});objFavourites.unbind('mouseout').bind('mouseout',function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',344,'objFavourites.unbind(\'mouseout\').bind(\'mouseout\',','function()',arguments);$j(document).data('blnOverHighPriorityDroppable',false);});objFavourites.find('div.help_button').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',350,'objFavourites.find(\'div.help_button\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);$j('#'+this.strId+'_coverflow').parent().toggle();$j('#'+this.strId+'_help').toggle();if($j('#'+this.strId+'_help:visible').length>0||this.blnMinimised===true)
{$j('#'+this.strId+' div.options_buttons').hide();}
else
{$j('#'+this.strId+' div.options_buttons').show();}},this));objFavourites.find('div.window_buttons div.minimise_button').unbind('click').bind('click',$j.proxy(this.minimise,this));objFavourites.find('div.window_buttons div.maximise_button').unbind('click').bind('click',$j.proxy(this.maximise,this));objFavourites.find('div.window_buttons div.close_button').unbind('click').bind('click',$j.proxy(this.hide,this));objFavourites.find('div.more_help_button').unbind('click').bind('click',$j.proxy(function(){Shell.launchNewWindow('http://ulearn.webbased.co.uk/resources/view/id/116139',true);},this));objFavourites.find('div.close_help_button').unbind('click').bind('click',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',371,'objFavourites.find(\'div.close_help_button\').unbind(\'click\').bind(\'click\', $j.proxy(','function()',arguments);$j('#'+this.strId+'_coverflow').parent().toggle();$j('#'+this.strId+'_help').toggle();if($j('#'+this.strId+'_help:visible').length>0||this.blnMinimised===true)
{$j('#'+this.strId+' div.options_buttons').hide();}
else
{$j('#'+this.strId+' div.options_buttons').show();}},this));objFavourites.find('div.options_buttons div.open_button').unbind('click').bind('click',$j.proxy(function(){this.openResource();},this));if(this.blnEditable===true)
{objFavourites.droppable
({accept:'.resourceDraggables',greedy:true,tolerance:'pointer',drop:$j.proxy(this.receiveResource,this)});objFavourites.find('div.back_button').bind('click',$j.proxy(function(){this.objFavouritesHelper.showAllFavouritesSets();},this));objFavourites.find('div.options_buttons div.clear_all_button').bind('click',$j.proxy(function(){this.removeAllResources();},this));objFavourites.find('div.options_buttons div.revert_button').bind('click',$j.proxy(function(){this.revert();},this));objFavourites.find('div.options_buttons div.remove_button').bind('click',$j.proxy(function(){this.removeSelectedResources();},this));objFavourites.find('div.options_buttons div.save_button').bind('click',$j.proxy(function(){this.save();},this));objFavourites.find('div.options_buttons div.publish_button').bind('click',$j.proxy(function(){this.publish();},this));}
else
{objFavourites.droppable('destroy');objFavourites.find('div.back_button').unbind('click');objFavourites.find('div.options_buttons div.clear_all_button').unbind('click');objFavourites.find('div.options_buttons div.revert_button').unbind('click');objFavourites.find('div.options_buttons div.remove_button').unbind('click');objFavourites.find('div.options_buttons div.save_button').unbind('click');objFavourites.find('div.options_buttons div.publish_button').unbind('click');}},setupResources:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',424,'setupResources:','function()',arguments);if(typeof(this.objCachedFavouritesSets[this.intActiveSetId])=='undefined'||this.objCachedFavouritesSets[this.intActiveSetId]===null)
{return;}
var arrPoints=[];if(this.objCachedFavouritesSets[this.intActiveSetId].arrResources===null)
{return;}
$j.each(this.objCachedFavouritesSets[this.intActiveSetId].arrResources,$j.proxy(function(intKey,objResource)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',440,'$j.each(this.objCachedFavouritesSets[this.intActiveSetId].arrResources, $j.proxy(','function(intKey, objResource)',arguments);$j(this.objCoverflow.getItemElementFromId(objResource.intId)).addClass('favouritesDraggables');if(objResource.blnOwned===true)
{$j(this.objCoverflow.getItemElementFromId(objResource.intId)).addClass('ezmapDraggables');}
if(objResource.arrGeometryInfo.blnHasGeometries===true)
{if(objResource.arrGeometryInfo.strGeometries!='')
{var objGeometries=$j.evalJSON(objResource.arrGeometryInfo.strGeometries);}
else
{var objGeometries={};}
arrPoints.push(objGeometries['arrFirstCoordPair'][objGeometries['arrFirstCoordPair'].length-1]);if(objResource.arrGeometryInfo.strNodeGroupDetails!='')
{var objNodeGroupDetails=$j.evalJSON(objResource.arrGeometryInfo.strNodeGroupDetails);}
else
{var objNodeGroupDetails={};}
Map.registerFavouritesSetGeometries(objResource.intId,objResource.arrGeometryInfo.intFirstGeometryId,objGeometries,objResource.strName,'resource',objNodeGroupDetails);}},this));if(Map.pointsAreWithinMapExtents(arrPoints)===false)
{if(Map.pointsAreWithinMapExtents(arrPoints,this.objCachedFavouritesSets[this.intActiveSetId].intEdina150000)===true)
{if(this.blnAlwaysSwitchToUKMap===true)
{Map.switchToMap(this.objCachedFavouritesSets[this.intActiveSetId].intEdina150000);Map.jumpToPoints(arrPoints);return;}
else if(this.blnAlwaysIgnoreSwitchToUKMap===true)
{return;}
var strTitle='Outside Map Area';var strText='Some of the resources in this favourite set are not visible on this map.\n\nWould you like to switch to UK view to see them all?\n\n<input id="'+this.strId+'_remember_choice" type="checkbox" /> Remember choice';var arrButtons=[{id:'switchToUKMap',strText:'Ok',intWidth:165,objCallbackFunction:$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',506,'objCallbackFunction: $j.proxy(','function()',arguments);if($j('#'+this.strId+'_remember_choice:checked').length>0)
{this.blnAlwaysSwitchToUKMap=true;}
Shell.closeLightboxWindow();Map.switchToMap(this.objCachedFavouritesSets[this.intActiveSetId].intEdina150000);Map.jumpToPoints(arrPoints);},this)}];var objSettings={strOverrideTitle:strTitle,strText:strText,intWidth:585,intHeight:150,arrButtons:arrButtons,blnIncludeCancelButton:true,objOnCancelCallbackFunction:$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',529,'objOnCancelCallbackFunction: $j.proxy(','function()',arguments);if($j('#'+this.strId+'_remember_choice:checked').length>0)
{this.blnAlwaysIgnoreSwitchToUKMap=true;}},this),blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);}
else
{if(this.blnAlwaysSwitchToWorldMap===true)
{Map.switchToMap(this.objCachedFavouritesSets[this.intActiveSetId].intWorldMap);Map.jumpToPoints(arrPoints);return;}
else if(this.blnAlwaysIgnoreSwitchToWorldMap===true)
{return;}
var strTitle='Outside Map Area';var strText='Some of the resources in this favourite set are not visible on this map.\n\nWould you like to switch to world view to see them all?\n\n<input id="'+this.strId+'_remember_choice" type="checkbox" /> Remember choice';var arrButtons=[{id:'switchToWorldMap',strText:'Ok',intWidth:165,objCallbackFunction:$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',565,'objCallbackFunction: $j.proxy(','function()',arguments);if($j('#'+this.strId+'_remember_choice:checked').length>0)
{this.blnAlwaysSwitchToWorldMap=true;}
Shell.closeLightboxWindow();Map.switchToMap(this.objCachedFavouritesSets[this.intActiveSetId].intWorldMap);Map.jumpToPoints(arrPoints);},this)}];var objSettings={strOverrideTitle:strTitle,strText:strText,intWidth:585,intHeight:150,arrButtons:arrButtons,blnIncludeCancelButton:true,objOnCancelCallbackFunction:$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',588,'objOnCancelCallbackFunction: $j.proxy(','function()',arguments);if($j('#'+this.strId+'_remember_choice:checked').length>0)
{this.blnAlwaysIgnoreSwitchToWorldMap=true;}},this),blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);}}
else if(Map.pointsAreWithinExtents(arrPoints)===false)
{if(this.blnAlwaysJumpToExtents===true)
{Map.jumpToPoints(arrPoints);return;}
else if(this.blnAlwaysIgnoreJumpToExtents===true)
{return;}
var strTitle='Outside Extents';var strText='The resources in this favourite set are not all visible in your current map view.\n\nWould you like to zoom out to see all resources?\n\n<input id="'+this.strId+'_remember_choice" type="checkbox" /> Remember choice';var arrButtons=[{id:'jumpToExtents',strText:'Ok',intWidth:165,objCallbackFunction:$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',625,'objCallbackFunction: $j.proxy(','function()',arguments);if($j('#'+this.strId+'_remember_choice:checked').length>0)
{this.blnAlwaysJumpToExtents=true;}
Shell.closeLightboxWindow();Map.jumpToPoints(arrPoints);},this)}];var objSettings={strOverrideTitle:strTitle,strText:strText,intWidth:585,intHeight:150,arrButtons:arrButtons,blnIncludeCancelButton:true,objOnCancelCallbackFunction:$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',647,'objOnCancelCallbackFunction: $j.proxy(','function()',arguments);if($j('#'+this.strId+'_remember_choice:checked').length>0)
{this.blnAlwaysIgnoreJumpToExtents=true;}},this),blnAutoCloseOnButtonClick:false};Shell.lightboxConfirmWithButtons(objSettings);}},setupButtons:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',663,'setupButtons:','function()',arguments);var objPublishButton=$j('#'+this.strId+' div.options_buttons div.publish_button');if(typeof(this.objCachedFavouritesSets[this.intActiveSetId])!='undefined'&&this.objCachedFavouritesSets[this.intActiveSetId].blnPublished===true)
{objPublishButton.html(Shell.getLightboxButtonHtml
({strId:'favourites_sets_publish',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'Unpublish'}));objPublishButton.unbind('click').bind('click',$j.proxy(function(){this.unpublish();},this));}
else
{objPublishButton.html(Shell.getLightboxButtonHtml
({strId:'favourites_sets_publish',intWidth:100,strCSSFloat:'float:right',strColour:'blue',strText:'Publish'}));objPublishButton.unbind('click').bind('click',$j.proxy(function(){this.publish();},this));}},minimise:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',696,'minimise:','function(blnInstant)',arguments);var objFavourites=this.getDomElement(true);var objTitle=objFavourites.find('div.title');var objOptionsButtons=objFavourites.find('div.options_buttons');var objCoverflow=this.objCoverflow.getDomElement(true);objTitle.hide();objOptionsButtons.hide();objCoverflow.parent().css
({height:'115px'});objCoverflow.css
({height:'115px'});objCoverflow.find('ul.coverflow_list,li.coverflow_list_item,li.coverflow_list_item_placeholder').css
({height:'115px'});if(blnInstant===true)
{objFavourites.css
({height:'120px'});}
else
{objFavourites.animate({height:'120px'},200);}
this.objCoverflow.minimise();this.blnMinimised=true;this.objFavouritesHelper.setMinimised(true);objFavourites.find('div.window_buttons div.minimise_button').hide();objFavourites.find('div.window_buttons div.maximise_button').show();objFavourites.find('div.favourites_sets_border').hide();},maximise:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',768,'maximise:','function(blnInstant)',arguments);var objFavourites=this.getDomElement(true);var objTitle=objFavourites.find('div.title');var objOptionsButtons=objFavourites.find('div.options_buttons');var objCoverflow=this.objCoverflow.getDomElement(true);objFavourites.find('div.favourites_sets_border').show();this.objCoverflow.maximise();if(blnInstant===true)
{objFavourites.css
({height:'300px'});}
else
{objFavourites.animate({height:'300px'},200);}
objCoverflow.parent().css
({height:'160px'});objCoverflow.css
({height:'160px'});objCoverflow.find('ul.coverflow_list,li.coverflow_list_item,li.coverflow_list_item_placeholder').css
({height:'160px'});objTitle.show();if($j('#'+this.strId+'_help:visible').length>0)
{objOptionsButtons.hide();}
else
{objOptionsButtons.show();}
this.blnMinimised=false;this.objFavouritesHelper.setMinimised(false);objFavourites.find('div.window_buttons div.maximise_button').hide();objFavourites.find('div.window_buttons div.minimise_button').show();},toggleMinimised:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',847,'toggleMinimised:','function(blnInstant)',arguments);if(this.blnMinimised===true)
{this.maximise(blnInstant);}
else
{this.minimise(blnInstant);}},getActiveSetId:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',860,'getActiveSetId:','function()',arguments);return this.intActiveSetId;},addResource:function(intResourceId,intFavouritesSetId,objCallbackFunction)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',866,'addResource:','function(intResourceId, intFavouritesSetId, objCallbackFunction)',arguments);if(typeof(intFavouritesSetId)!='undefined'&&intFavouritesSetId!=this.intActiveSetId)
{var blnAddToCurrentFavouriteSet=false;}
else
{var blnAddToCurrentFavouriteSet=true;intFavouritesSetId=this.intActiveSetId;}
if(blnAddToCurrentFavouriteSet===true)
{var intPosition=$j.inArray(parseInt(intResourceId),this.objCoverflow.getOrderedItemIds());if(intPosition>-1)
{this.objCoverflow.scrollToPosition(intPosition);return false;}
var intCurrentResourceCount=this.objCoverflow.getItemCount();}
else
{if(this.objFavouritesHelper.objFavouritesSetsHelper.isResourceInFavouritesSet(intFavouritesSetId,intResourceId)===true)
{return false;}
var intCurrentResourceCount=this.objFavouritesHelper.objFavouritesSetsHelper.getResourceCountForFavouritesSet(intFavouritesSetId);}
if(intCurrentResourceCount>=this.intMaximumResourcesPerSet)
{Shell.lightboxAlert('A maximum of '+this.intMaximumResourcesPerSet+' Favourites can be saved in each \'Favourites Set\'.\n\nPlease delete one of the existing Favourites from this Set, or Save this Set and start a new one.',750,110);return false;}
$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:intFavouritesSetId,intResourceId:intResourceId},dataType:'json',type:'POST',url:'/favouritesSetsHelper/0/addResourceToFavouritesSet',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',929,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var objItem=$j.evalJSON(XMLHttpRequest.responseText);var strFavouritesSetName='';$j.each(this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',936,'$j.each(this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);if(parseInt(objFavouritesSet.intId)==parseInt(intFavouritesSetId))
{this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets[intKey].arrResources.push(intResourceId);strFavouritesSetName=objFavouritesSet.strName;return false;}},this));if(blnAddToCurrentFavouriteSet===true)
{this.objCoverflow.addItem(objItem);this.objCachedFavouritesSets[intFavouritesSetId].arrResources.push(objItem);this.objCoverflow.scrollToEnd();this.setupResources();}
else
{if(typeof(this.objCachedFavouritesSets[intFavouritesSetId])!='undefined'&&this.objCachedFavouritesSets[intFavouritesSetId]!==null)
{this.objCachedFavouritesSets[intFavouritesSetId].arrResources.push(objItem);}}
this.objFavouritesHelper.toggleHeartIcons(objItem.intId,true);if(objCallbackFunction)
{objCallbackFunction(strFavouritesSetName);}},this)});},setupResource:function(objResource)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',982,'setupResource:','function(objResource)',arguments);this.objCoverflow.addItem(objResource);},openResource:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',988,'openResource:','function(intResourceId)',arguments);if(typeof(intResourceId)=='undefined')
{var arrSelectedResources=this.objCoverflow.getSelectedItems();if(arrSelectedResources.length==0)
{alert('You need to select a resource!');}
else if(arrSelectedResources.length>1)
{alert('You can only open one resource at a time!');}
else
{intResourceId=arrSelectedResources[0];}}
var blnHasGeometries=false;$j.each(this.objCachedFavouritesSets[this.intActiveSetId].arrResources,$j.proxy(function(intKey,objResource)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1015,'$j.each(this.objCachedFavouritesSets[this.intActiveSetId].arrResources, $j.proxy(','function(intKey, objResource)',arguments);if(objResource.intId==intResourceId)
{if(objResource.arrGeometryInfo.blnHasGeometries===true&&!(objResource.strNodeType=='file'&&objResource.strFileType=='document'))
{this.minimise(true);Map.showSpecificResourceGeometries(objResource.intId,true);}
else
{if(objResource.strNodeType!='web link'&&objResource.strNodeType!='page'&&!(objResource.strNodeType=='file'&&objResource.strFileType=='document'))
{this.minimise(true);}
Resources.openResource
({intResourceId:objResource.intId,strNodeType:objResource.strNodeType,strFileType:objResource.strFileType,strDownloadFileURL:objResource.strDownloadFileUrl,blnIsOwner:objResource.blnOwned},'favouriteSet');}
return false;}},this));},showMoveResource:function(objEvent,intResourceId,blnCopy)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1052,'showMoveResource:','function(objEvent, intResourceId, blnCopy)',arguments);var blnCopy=typeof(blnCopy)!='undefined'?blnCopy:false;var objMenu=new UMenu(200);$j.each(this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1058,'$j.each(this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);objMenu.addItem(objFavouritesSet.strName,$j.proxy(function(){this.moveResource(intResourceId,objFavouritesSet.intId);},this));},this));objMenu.show(objEvent,40);},moveResource:function(intResourceId,intFavouritesSetId,blnCopy)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1067,'moveResource:','function(intResourceId, intFavouritesSetId, blnCopy)',arguments);var blnCopy=typeof(blnCopy)!='undefined'?blnCopy:false;if(blnCopy!==true)
{this.removeSelectedResources([intResourceId]);}
this.addResource(intResourceId,intFavouritesSetId);},useResourceAsSetThumbnail:function(objEvent,intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1082,'useResourceAsSetThumbnail:','function(objEvent, intResourceId)',arguments);$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:this.intActiveSetId,intResourceId:intResourceId},dataType:'text',type:'POST',url:'/favouritesSetsHelper/0/useResourceAsSetThumbnail',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1097,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strOutcome=XMLHttpRequest.responseText;if(strOutcome=='success')
{this.objFavouritesHelper.objFavouritesSetsHelper.blnLoaded=false;ResourceExplorer.refresh();alert('The thumbnail for the favourite set has been updated.');}},this)});},removeSelectedResources:function(arrResources)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1118,'removeSelectedResources:','function(arrResources)',arguments);var arrSelectedResources=typeof(arrResources)!='undefined'?arrResources:this.objCoverflow.getSelectedItems();if(arrSelectedResources.length>0)
{$j.each(arrSelectedResources,$j.proxy(function(intKey,intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1127,'$j.each(arrSelectedResources, $j.proxy(','function(intKey, intResourceId)',arguments);if(this.objFavouritesHelper.getIsFavourite(intResourceId,[this.intActiveSetId])===false)
{this.objFavouritesHelper.toggleHeartIcons(intResourceId,false);}},this));var arrOrderedResources=this.objCoverflow.getOrderedItemDetails();$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:this.intActiveSetId,arrSelectedResources:$j.toJSON(arrSelectedResources)},dataType:'text',type:'POST',url:'/favouritesSetsHelper/0/removeResourcesFromFavouritesSet',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1152,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strOutcome=XMLHttpRequest.responseText;if(strOutcome=='success')
{var intRemoved=0;$j.each(arrSelectedResources,$j.proxy(function(intKey,intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1162,'$j.each(arrSelectedResources, $j.proxy(','function(intKey, intResourceId)',arguments);if((this.objCoverflow.strElementId+'_'+intResourceId)==this.strHoveredItemId)
{ResourceExplorer.unHighlightResource(intResourceId);Map.unHighlightStamp(intResourceId);this.hideOptionsButtons();ResourcePopup.hide(true);var objFavourites=this.getDomElement(true);objFavourites.stopTime('onMouseOutTimeout');return false;}},this));this.objCachedFavouritesSets[this.intActiveSetId].arrResources=[];$j.each(arrOrderedResources,$j.proxy(function(intPosition,objResource)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1185,'$j.each(arrOrderedResources, $j.proxy(','function(intPosition, objResource)',arguments);if($j.inArray(objResource.intId,arrSelectedResources)>-1)
{this.objCoverflow.removeItem(intPosition-intRemoved);intRemoved++;}
else
{this.objCachedFavouritesSets[this.intActiveSetId].arrResources.push(objResource);}},this));$j.each(this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1200,'$j.each(this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);if(parseInt(objFavouritesSet.intId)==parseInt(this.intActiveSetId))
{this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets[intKey].arrResources=[];$j.each(this.objCachedFavouritesSets[this.intActiveSetId].arrResources,$j.proxy(function(intResourceKey,objResource)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1206,'$j.each(this.objCachedFavouritesSets[this.intActiveSetId].arrResources, $j.proxy(','function(intResourceKey, objResource)',arguments);this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets[intKey].arrResources.push(objResource.intId);},this));return false;}},this));}},this)});}},removeAllResources:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1221,'removeAllResources:','function()',arguments);$j.each(this.objCachedFavouritesSets[this.intActiveSetId].arrResources,$j.proxy(function(intKey,objResource)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1224,'$j.each(this.objCachedFavouritesSets[this.intActiveSetId].arrResources, $j.proxy(','function(intKey, objResource)',arguments);if(this.objFavouritesHelper.getIsFavourite(objResource.intId,[this.intActiveSetId])===false)
{this.objFavouritesHelper.toggleHeartIcons(objResource.intId,false);}},this));this.objCachedFavouritesSets[this.intActiveSetId].arrResources=[];$j.each(this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets,$j.proxy(function(intKey,objFavouritesSet)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1237,'$j.each(this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets, $j.proxy(','function(intKey, objFavouritesSet)',arguments);if(parseInt(objFavouritesSet.intId)==parseInt(this.intActiveSetId))
{this.objFavouritesHelper.objFavouritesSetsHelper.objFavouritesSets[intKey].arrResources=[];return false;}},this));$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:this.intActiveSetId},dataType:'text',type:'POST',url:'/favouritesSetsHelper/0/removeAllResourcesFromFavouritesSet',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1259,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strOutcome=XMLHttpRequest.responseText;if(strOutcome=='success')
{ResourceExplorer.unHighlightAllResources();Map.unHighlightAllStamps();this.hideOptionsButtons();ResourcePopup.hide(true);var objFavourites=this.getDomElement(true);objFavourites.stopTime('onMouseOutTimeout');this.objCoverflow.removeAllItems();}},this)});},updateOrderOfResources:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1288,'updateOrderOfResources:','function()',arguments);var arrOrderedResources=this.objCoverflow.getOrderedItemDetails();this.objFavouritesHelper.objFavouritesSetsHelper.blnLoaded=false;this.objCachedFavouritesSets[this.intActiveSetId].arrResources=arrOrderedResources;var arrOrderedResourcesIds=[];$j.each(arrOrderedResources,function(intKey,objResource)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1303,'$j.each(arrOrderedResources,','function(intKey, objResource)',arguments);arrOrderedResourcesIds.push(objResource.intId);});$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:this.intActiveSetId,arrOrderedResources:$j.toJSON(arrOrderedResourcesIds)},dataType:'text',type:'POST',url:'/favouritesSetsHelper/0/updateOrderOfResources'});},receiveResource:function(objEvent,objUi)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1325,'receiveResource:','function(objEvent, objUi)',arguments);var intResourceId=parseInt(objUi.draggable.attr('id').split('_').pop());this.addResource(intResourceId);},highlightResource:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1335,'highlightResource:','function(intResourceId)',arguments);var objElement=this.objCoverflow.getItemElementFromId(intResourceId);if(objElement!==null)
{this.objCoverflow.scrollToItem(intResourceId);this.objCoverflow.highlightItem(objElement);}},unHighlightResource:function(intResourceId)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1347,'unHighlightResource:','function(intResourceId)',arguments);var objElement=this.objCoverflow.getItemElementFromId(intResourceId);if(objElement!==null)
{this.objCoverflow.unhighlightItem(objElement);}},save:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1358,'save:','function()',arguments);this.objFavouritesHelper.objFavouritesSetsHelper.editFavouritesSet(this.intActiveSetId,true);},publish:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1364,'publish:','function()',arguments);this.objFavouritesHelper.objFavouritesSetsHelper.publishFavouritesSet(this.intActiveSetId);},unpublish:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1370,'unpublish:','function()',arguments);Resources.unpublishResources([this.intActiveSetId]);},revert:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1376,'revert:','function()',arguments);$j.ajax
({async:true,cache:false,data:{intFavouritesSetId:this.intActiveSetId},dataType:'text',type:'POST',url:'/favouritesSetsHelper/0/revertFavouritesSet',complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1390,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var objFavouritesSet=$j.evalJSON(XMLHttpRequest.responseText);this.objCachedFavouritesSets[objFavouritesSet.intId]=objFavouritesSet;this.intActiveSetId=null;this.load(objFavouritesSet.intId,true,function(){});},this)});},onMouseOutTimeout:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1408,'onMouseOutTimeout:','function()',arguments);var objElement=$j('#'+this.strHoveredItemId);var objFavourites=this.getDomElement(true);if(objElement.length==0)
{objFavourites.stopTime('onMouseOutTimeout');ResourceExplorer.unHighlightAllResources();Map.unHighlightAllStamps();this.hideOptionsButtons();ResourcePopup.hide();return;}
var objElementOffset=objElement.offset();var intElementWidth=objElement.outerWidth();var intElementHeight=objElement.outerHeight();intElementHeight+=$j('#'+this.strId+'_options_buttons').outerHeight();if(objMousePosition.x<objElementOffset.left||objMousePosition.x>objElementOffset.left+intElementWidth||objMousePosition.y<objElementOffset.top||objMousePosition.y>objElementOffset.top+intElementHeight)
{objFavourites.stopTime('onMouseOutTimeout');var objItem=this.objCoverflow.getItemDetailsFromElement(objElement);if(objItem!==null)
{ResourceExplorer.unHighlightResource(objItem.intId);Map.unHighlightStamp(objItem.intId);}
this.hideOptionsButtons();ResourcePopup.hide();}},onWindowResize:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1459,'onWindowResize:','function()',arguments);var objFavourites=this.getDomElement(true);objFavourites.css('width',parseInt($j(window).width()-10)+'px');},show:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1469,'show:','function()',arguments);if(this.blnMinimised!==this.objFavouritesHelper.isMinimised())
{if(this.objFavouritesHelper.isMinimised()===true)
{this.minimise(true);}
else
{this.maximise(true);}}
var objFavourites=this.getDomElement(true);objFavourites.show();this.blnVisible=true;},hide:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1495,'hide:','function()',arguments);var objFavourites=this.getDomElement(true);this.hideOptionsButtons();objFavourites.hide();this.objCoverflow.deselectItems();this.objCoverflow.unRenderAllItems();this.blnVisible=false;$j('#'+this.strId+'_coverflow').parent().show();$j('#'+this.strId+'_help').hide();Map.resetFavouritesSetGeometries();},setEditableMode:function(blnEditable)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1525,'setEditableMode:','function(blnEditable)',arguments);if(this.blnEditable==blnEditable)
{return;}
this.blnEditable=blnEditable;this.toggleButtons();this.setupEvents();},getMaximumResourcesPerSet:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1543,'getMaximumResourcesPerSet:','function()',arguments);return this.intMaximumResourcesPerSet;},toggleButtons:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1549,'toggleButtons:','function()',arguments);var objFavourites=this.getDomElement(true);var objButtonsBar=$j('#'+this.strId+'_options_buttons');if(this.blnEditable===true)
{objFavourites.find('div.back_button').show();objFavourites.find('div.options_buttons div.clear_all_button').show();objFavourites.find('div.options_buttons div.save_button').show();objFavourites.find('div.options_buttons div.publish_button').show();objButtonsBar.find('div.open').css('margin-left','50px');objButtonsBar.find('div.remove').show();}
else
{objFavourites.find('div.back_button').hide();objFavourites.find('div.options_buttons div.clear_all_button').hide();objFavourites.find('div.options_buttons div.save_button').hide();objFavourites.find('div.options_buttons div.publish_button').hide();objButtonsBar.find('div.open').css('margin-left','68px');objButtonsBar.find('div.remove').hide();}},showOptionsButtons:function(objOriginalEvent,objResource)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1578,'showOptionsButtons:','function(objOriginalEvent, objResource)',arguments);var objFavourites=this.getDomElement(true);var objButtonsBar=$j('#'+this.strId+'_options_buttons');if(objButtonsBar.length==0)
{objButtonsBar=$j('<div id="'+this.strId+'_options_buttons" class="favourites_set_options_buttons"></div>');objButtonsBar.append('<div class="move" style="margin-left:38px;" title="Move to another favourite set"></div><div class="set_thumbnail" title="Use as set thumbnail"></div><div class="remove" title="Remove"></div>');$j('body:first').append(objButtonsBar);}
objButtonsBar.unbind('mouseover').bind('mouseover',{strItemId:this.strHoveredItemId},$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1607,'objButtonsBar.unbind(\'mouseover\').bind(\'mouseover\', {strItemId: this.strHoveredItemId}, $j.proxy(','function(objEvent)',arguments);objFavourites.stopTime('onMouseOutTimeout').everyTime('500ms','onMouseOutTimeout',$j.proxy(this.onMouseOutTimeout,this));this.objCoverflow.highlightItem('#'+objEvent.data.strItemId);},this));objButtonsBar.unbind('mouseout').bind('mouseout',{objResource:objResource,strItemId:this.strHoveredItemId},$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1616,'objButtonsBar.unbind(\'mouseout\').bind(\'mouseout\', {objResource: objResource, strItemId: this.strHoveredItemId}, $j.proxy(','function(objEvent)',arguments);var objElement=$j(objEvent.currentTarget);var objElementOffset=objElement.offset();var intElementWidth=objElement.outerWidth();var intElementHeight=objElement.outerHeight();intElementHeight+=this.objCoverflow.intItemHeight-16;objElementOffset.top=objElementOffset.top-this.objCoverflow.intItemHeight;if(objEvent.pageX<objElementOffset.left||objEvent.pageX>objElementOffset.left+intElementWidth||objEvent.pageY<objElementOffset.top||objEvent.pageY>objElementOffset.top+intElementHeight)
{objFavourites.stopTime('onMouseOutTimeout');this.objCoverflow.unhighlightItem('#'+objEvent.data.strItemId);ResourceExplorer.unHighlightResource(objEvent.data.objResource.intId);Map.unHighlightStamp(objEvent.data.objResource.intId);this.hideOptionsButtons();ResourcePopup.hide();}},this));objButtonsBar.find('div.remove').unbind('click').bind('click',{objResource:objResource,strItemId:this.strHoveredItemId},$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1645,'objButtonsBar.find(\'div.remove\').unbind(\'click\').bind(\'click\', {objResource: objResource, strItemId: this.strHoveredItemId}, $j.proxy(','function(objEvent)',arguments);this.objCoverflow.unhighlightItem('#'+objEvent.data.strItemId);ResourceExplorer.unHighlightResource(objEvent.data.objResource.intId);Map.unHighlightStamp(objEvent.data.objResource.intId);this.hideOptionsButtons();ResourcePopup.hide(true);this.removeSelectedResources([objEvent.data.objResource.intId]);},this));objButtonsBar.find('div.move').unbind('click').bind('click',{objResource:objResource,strItemId:this.strHoveredItemId},$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1659,'objButtonsBar.find(\'div.move\').unbind(\'click\').bind(\'click\', {objResource: objResource, strItemId: this.strHoveredItemId}, $j.proxy(','function(objEvent)',arguments);this.objCoverflow.unhighlightItem('#'+objEvent.data.strItemId);ResourceExplorer.unHighlightResource(objEvent.data.objResource.intId);Map.unHighlightStamp(objEvent.data.objResource.intId);this.hideOptionsButtons();ResourcePopup.hide(true);this.showMoveResource(objEvent,objResource.intId);},this));objButtonsBar.find('div.set_thumbnail').unbind('click').bind('click',{objResource:objResource,strItemId:this.strHoveredItemId},$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1673,'objButtonsBar.find(\'div.set_thumbnail\').unbind(\'click\').bind(\'click\', {objResource: objResource, strItemId: this.strHoveredItemId}, $j.proxy(','function(objEvent)',arguments);this.objCoverflow.unhighlightItem('#'+objEvent.data.strItemId);ResourceExplorer.unHighlightResource(objEvent.data.objResource.intId);Map.unHighlightStamp(objEvent.data.objResource.intId);this.hideOptionsButtons();ResourcePopup.hide(true);this.useResourceAsSetThumbnail(objEvent,objResource.intId);},this));objButtonsBar.find('div.open').unbind('click').bind('click',{objResource:objResource,strItemId:this.strHoveredItemId},$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1687,'objButtonsBar.find(\'div.open\').unbind(\'click\').bind(\'click\', {objResource: objResource, strItemId: this.strHoveredItemId}, $j.proxy(','function(objEvent)',arguments);this.objCoverflow.unhighlightItem('#'+objEvent.data.strItemId);ResourceExplorer.unHighlightResource(objEvent.data.objResource.intId);Map.unHighlightStamp(objEvent.data.objResource.intId);this.hideOptionsButtons();ResourcePopup.hide(true);this.openResource(objResource.intId);},this));objButtonsBar.find('div.left').unbind('click').bind('click',{objResource:objResource,strItemId:this.strHoveredItemId},$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1701,'objButtonsBar.find(\'div.left\').unbind(\'click\').bind(\'click\', {objResource: objResource, strItemId: this.strHoveredItemId}, $j.proxy(','function(objEvent)',arguments);this.objCoverflow.unhighlightItem('#'+objEvent.data.strItemId);ResourceExplorer.unHighlightResource(objEvent.data.objResource.intId);Map.unHighlightStamp(objEvent.data.objResource.intId);this.hideOptionsButtons();ResourcePopup.hide(true);this.objCoverflow.moveItem(objResource.intId,'left');},this));objButtonsBar.find('div.right').unbind('click').bind('click',{objResource:objResource,strItemId:this.strHoveredItemId},$j.proxy(function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1715,'objButtonsBar.find(\'div.right\').unbind(\'click\').bind(\'click\', {objResource: objResource, strItemId: this.strHoveredItemId}, $j.proxy(','function(objEvent)',arguments);this.objCoverflow.unhighlightItem('#'+objEvent.data.strItemId);ResourceExplorer.unHighlightResource(objEvent.data.objResource.intId);Map.unHighlightStamp(objEvent.data.objResource.intId);this.hideOptionsButtons();ResourcePopup.hide(true);this.objCoverflow.moveItem(objResource.intId,'right');},this));var objElement=$j(objOriginalEvent.currentTarget);var objElementOffset=objElement.offset();if(this.blnMinimised===true)
{var intTop=104;var intPaddingTop=5;}
else
{var intTop=(objElementOffset.top+objElement.height()-16);var intPaddingTop=5;}
var intLeft=objElementOffset.left;objButtonsBar.css
({top:intTop+'px',left:intLeft+'px',paddingTop:intPaddingTop+'px'});objButtonsBar.show();},hideOptionsButtons:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1758,'hideOptionsButtons:','function()',arguments);var objButtonsBar=$j('#'+this.strId+'_options_buttons');objButtonsBar.hide();},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/favourites_set_helper.js',1767,'shutdown:','function()',arguments);this._super();}});var CoverflowHelper=HelperBase.extend({init:function(objCustomSettings)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',13,'init:','function(objCustomSettings)',arguments);var objCustomSettings=typeof(objCustomSettings)!='undefined'?objCustomSettings:{};this.objSettings={mixSelector:'',intWidth:900,intHeight:160,intArrowBuffer:140,blnStartMinimised:false,intScrollAmount:1,intScrollSpeed:500,blnAnimatedScroll:true,blnInfiniteScroll:false,blnSelectable:false,blnSortable:false,blnUsePlaceHolders:false,blnShowHoverGlow:true,strPlaceholderUrl:null,objGenerateItemHtmlOverrideFunction:null,objGenerateInnerItemHtmlOverrideFunction:null,objOnCreateCallback:null,objOnClickItemCallback:null,objOnDoubleClickItemCallback:null,objOnDragItemStartCallback:null,objOnDragItemStopCallback:null,objOnDragItemUpdateCallback:null,objOnReceiveItemCallback:null,objOnMouseOverItemCallback:null,objOnMouseOutItemCallback:null,objOnSortCallback:null};$j.extend(this.objSettings,objCustomSettings);this._super
({strIdPrefix:'CoverflowHelper'});this.setElementSelector(this.objSettings.mixSelector);this.objItems={};this.intItems=0;this.intPlaceholderItems=0;this.intPlaceholderId=0;this.intItemWidth=0;this.intItemHeight=0;this.intMaximumVisibleItems=0;this.intCurrentMarginLeft=0;this.blnArrowNextEnabled=true;this.blnArrowPreviousEnabled=true;this.arrItemOrdering=[];this.arrSelectedItems=[];this.blnMinimised=this.objSettings.blnStartMinimised;this.create();this.addPlaceholderItems();},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',84,'shutdown:','function()',arguments);this.destroy();this._super();},create:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',94,'create:','function()',arguments);var objCoverflow=this.getDomElement(true);var strElementId=objCoverflow.attr('id');if(strElementId=='')
{strElementId=this.strId;objCoverflow.attr('id',strElementId);this.setElementSelector('#'+strElementId);}
this.strElementId=strElementId;objCoverflow.addClass('coverflow');objCoverflow.wrap('<div class="coverflow_container"></div>');objCoverflow.parent().append('<div class="arrow_previous"></div><div class="arrow_next"></div>');objCoverflow.parent().append('<div class="glow"></div>');objCoverflow.append('<ul class="coverflow_list"><li class="coverflow_list_item"></li></ul>');var objCoverflowList=objCoverflow.find('ul.coverflow_list:first');this.intItemWidth=parseInt(objCoverflowList.find('li').css('width'))+parseInt(objCoverflowList.find('li').css('padding-left'))+parseInt(objCoverflowList.find('li').css('padding-right'))+parseInt(objCoverflowList.find('li').css('margin-left'))+parseInt(objCoverflowList.find('li').css('margin-right'));this.intItemHeight=parseInt(objCoverflowList.find('li').css('height'));objCoverflowList.empty();objCoverflow.css
({height:this.intItemHeight+'px'});objCoverflow.parent().css
({height:this.objSettings.intHeight+'px'});this.updateCoverflowWidth();this.updateListWidth();this.setupCoverflowEvents();},destroy:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',164,'destroy:','function()',arguments);var objCoverflow=this.getDomElement(true);objCoverflow.remove();},generateItemHtml:function(objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',174,'generateItemHtml:','function(objItem)',arguments);if(this.objSettings.objGenerateItemHtmlOverrideFunction)
{return this.objSettings.objGenerateItemHtmlOverrideFunction(objItem,this.strElementId);}
if(this.blnMinimised===true)
{if(objItem.blnPlaceholder===true)
{var strItemStyle='style="background-position:-1600px 0px;"';}
else if(objItem.blnEnabled===false)
{var strItemStyle='style="background-position:-960px 0px;"';}
else
{var strItemStyle='style="background-position:-320px 0px;"';}}
else
{var strItemStyle='';}
if(objItem.blnPlaceholder===true)
{var strHtml='<li id="'+this.strElementId+'_'+objItem.intId+'" class="coverflow_list_item_placeholder" '+strItemStyle+'></li>';}
else if(objItem.blnEnabled===false)
{var strHtml='<li id="'+this.strElementId+'_'+objItem.intId+'" class="coverflow_list_item coverflow_list_item_disabled" '+strItemStyle+'></li>';}
else
{var strHtml='<li id="'+this.strElementId+'_'+objItem.intId+'" class="coverflow_list_item" '+strItemStyle+'></li>';}
return strHtml;},generateInnerItemHtml:function(objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',217,'generateInnerItemHtml:','function(objItem)',arguments);if(this.objSettings.objGenerateInnerItemHtmlOverrideFunction)
{return this.objSettings.objGenerateInnerItemHtmlOverrideFunction(objItem,this.strElementId);}
if(this.blnMinimised===true)
{var strItemContentStyle='style="height:100px;"';}
else
{var strItemContentStyle='';}
if(objItem.blnPlaceholder===true)
{var strHtml='';}
else
{var strRatingHtml='';for(var intStar=1;intStar<=5;intStar++)
{if(intStar==objItem.intRating)
{strRatingHtml+='<input name="'+this.strElementId+'_'+objItem.intId+'_rating" type="radio" class="star" disabled="disabled" checked="checked" />';}
else
{strRatingHtml+='<input name="'+this.strElementId+'_'+objItem.intId+'_rating" type="radio" class="star" disabled="disabled" />';}}
var strHtml='<div class="content" '+strItemContentStyle+'>'+'<div class="thumbnail" style="background-image:url('+objItem.strThumbnailUrl+')"> </div>'+'<div class="details">'+'<div class="name">'+objItem.strName+'</div>'+'<div class="rating">'+strRatingHtml+'</div>'+'</div>'+'</div>';}
return strHtml;},updateCoverflowWidth:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',266,'updateCoverflowWidth:','function()',arguments);var objCoverflow=this.getDomElement(true);if(this.objSettings.intWidth=='auto')
{var intWidthAvailable=objCoverflow.parent().parent().innerWidth()-this.objSettings.intArrowBuffer;}
else
{var intWidthAvailable=this.objSettings.intWidth-this.objSettings.intArrowBuffer;}
this.intMaximumVisibleItems=Math.floor(intWidthAvailable/this.intItemWidth);var intCoverflowWidth=this.intMaximumVisibleItems*this.intItemWidth;var intExtraPadding=Math.floor((intWidthAvailable-intCoverflowWidth)/2);objCoverflow.css
({width:intCoverflowWidth,marginRight:((this.objSettings.intArrowBuffer/2)+intExtraPadding)+'px'});objCoverflow.parent().css
({width:(intCoverflowWidth+(this.objSettings.intArrowBuffer/2)+intExtraPadding)+'px',paddingLeft:((this.objSettings.intArrowBuffer/2)+intExtraPadding)+'px'});this.updateArrowNext();this.updateArrowPrevious();},updateListWidth:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',312,'updateListWidth:','function()',arguments);var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list:first');objCoverflowList.css
({width:(this.intItems*this.intItemWidth)+'px'});this.updateArrowNext();this.updateArrowPrevious();},updateArrowNext:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',331,'updateArrowNext:','function()',arguments);var objCoverflow=this.getDomElement(true);if(this.objSettings.blnInfiniteScroll===false&&this.intCurrentMarginLeft<=-(this.intItemWidth*(this.intItems-this.intMaximumVisibleItems)))
{this.blnArrowNextEnabled=false;objCoverflow.parent().find('div.arrow_next').css
({backgroundPosition:'-1995px 0px',cursor:'default'});}
else
{this.blnArrowNextEnabled=true;objCoverflow.parent().find('div.arrow_next').css
({backgroundPosition:'-1920px 0px',cursor:'pointer'});}},updateArrowPrevious:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',359,'updateArrowPrevious:','function()',arguments);var objCoverflow=this.getDomElement(true);if(this.objSettings.blnInfiniteScroll===false&&this.intCurrentMarginLeft>=0)
{this.blnArrowPreviousEnabled=false;objCoverflow.parent().find('div.arrow_previous').css
({backgroundPosition:'-1995px -45px',cursor:'default'});}
else
{this.blnArrowPreviousEnabled=true;objCoverflow.parent().find('div.arrow_previous').css
({backgroundPosition:'-1920px -45px',cursor:'pointer'});}},setupCoverflowEvents:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',388,'setupCoverflowEvents:','function()',arguments);var objCoverflow=this.getDomElement(true);var objCoverflowWrapper=objCoverflow.parent();$j(window).resize($j.proxy(this.onWindowResize,this));objCoverflowWrapper.parent().bind('click',$j.proxy(function(){this.deselectItems();},this));objCoverflowWrapper.find('div.arrow_next').bind('click',$j.proxy(this.next,this));objCoverflowWrapper.find('div.arrow_previous').bind('click',$j.proxy(this.previous,this));objCoverflowWrapper.find('div.arrow_next').bind('mouseover',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',410,'objCoverflowWrapper.find(\'div.arrow_next\').bind(\'mouseover\', $j.proxy(','function()',arguments);if(this.blnArrowNextEnabled===false)
{return false;}
objCoverflowWrapper.find('div.arrow_next').css
({backgroundPosition:'-1945px 0px'});},this));objCoverflowWrapper.find('div.arrow_next').bind('mouseout',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',425,'objCoverflowWrapper.find(\'div.arrow_next\').bind(\'mouseout\', $j.proxy(','function()',arguments);if(this.blnArrowNextEnabled===false)
{return false;}
objCoverflowWrapper.find('div.arrow_next').css
({backgroundPosition:'-1920px 0px'});},this));objCoverflowWrapper.find('div.arrow_previous').bind('mouseover',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',440,'objCoverflowWrapper.find(\'div.arrow_previous\').bind(\'mouseover\', $j.proxy(','function()',arguments);if(this.blnArrowPreviousEnabled===false)
{return false;}
objCoverflowWrapper.find('div.arrow_previous').css
({backgroundPosition:'-1945px -45px'});},this));objCoverflowWrapper.find('div.arrow_previous').bind('mouseout',$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',455,'objCoverflowWrapper.find(\'div.arrow_previous\').bind(\'mouseout\', $j.proxy(','function()',arguments);if(this.blnArrowPreviousEnabled===false)
{return false;}
objCoverflowWrapper.find('div.arrow_previous').css
({backgroundPosition:'-1920px -45px'});},this));var objCoverflowList=objCoverflow.find('ul.coverflow_list');if(this.objSettings.blnSortable===true)
{objCoverflowList.sortable
({appendTo:'body',cursor:'crosshair',cursorAt:{top:-15,left:76},helper:'clone',items:'.coverflow_list_item',opacity:0.2,scroll:false,tolerance:'pointer',zIndex:1001,start:this.objSettings.objOnDragItemStartCallback,stop:this.objSettings.objOnDragItemStopCallback,update:this.objSettings.objOnDragItemUpdateCallback});objCoverflowList.disableSelection();}},setupItemEvents:function(objElement)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',501,'setupItemEvents:','function(objElement)',arguments);var objElement=$j(objElement);objElement.unbind();if(this.objSettings.blnSelectable===true)
{objElement.bind('click',$j.proxy(this.selectItem,this));}
else if(this.objSettings.objOnClickItemCallback)
{objElement.bind('click',$j.proxy(this.onClickItem,this));}
if(this.objSettings.objOnDoubleClickItemCallback)
{objElement.bind('dblclick',$j.proxy(this.onDoubleClickItem,this));}
objElement.bind('mouseover',$j.proxy(this.onMouseOverItem,this));objElement.bind('mouseout',$j.proxy(this.onMouseOutItem,this));},getItemDetailsFromElement:function(objElement)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',531,'getItemDetailsFromElement:','function(objElement)',arguments);var objExtendedElement=$j(objElement);if(objExtendedElement.length==0)
{return null;}
var strElementId=objExtendedElement.attr('id');var arrIdParts=strElementId.split('_');var intItemId=arrIdParts[arrIdParts.length-1];return this.objItems[intItemId];},getItemDetailsFromPosition:function(intPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',550,'getItemDetailsFromPosition:','function(intPosition)',arguments);return this.objItems[this.arrItemOrdering[intPosition]];},addItems:function(mixItems)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',556,'addItems:','function(mixItems)',arguments);var _this=this;if(typeof(mixItems)!='undefined')
{if($j.isArray(mixItems)||$j.isPlainObject(mixItems))
{var strCoverflowHtml='';$j.each(mixItems,function(mixKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',569,'$j.each(mixItems,','function(mixKey, objItem)',arguments);objItem.blnPlaceholder=false;objItem.blnVisible=false;_this.addItem(objItem);});}
else if($j(mixItems).length>0)
{$j(mixItems).find('li').each(function(intKey)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',584,'$j(mixItems).find(\'li\').each(','function(intKey)',arguments);var objElement=$j(this);var objItem={intId:objElement.attr('id'),strName:objElement.find('div[class="name"]').html(),strDescription:objElement.find('div[class="description"]').html(),strThumbnailUrl:objElement.find('div[class="thumbnail"]').attr('src'),blnPlaceholder:false,blnVisible:false};_this.addItem(objItem);});}}
else
{var objCoverflow=this.getDomElement(true);var objUnorderedList=objCoverflow.find('ul:first');if(objUnorderedList.length>0)
{objUnorderedList.find('li').each(function(intKey)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',615,'objUnorderedList.find(\'li\').each(','function(intKey)',arguments);var objElement=$j(this);var objItem={intId:objElement.attr('id'),strName:objElement.find('div[class="name"]').html(),strDescription:objElement.find('div[class="description"]').html(),strThumbnailUrl:objElement.find('div[class="thumbnail"]').attr('src'),blnPlaceholder:false,blnVisible:false};_this.addItem(objItem);});}}},addItem:function(objItem,intPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',640,'addItem:','function(objItem, intPosition)',arguments);var objItem=$j.extend({blnPlaceholder:false,blnEnabled:true},objItem);if(typeof(this.objItems[objItem.intId])!='undefined'&&this.objItems[objItem.intId]!==null)
{return true;}
this.objItems[objItem.intId]=objItem;this.intItems++;var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');var strHtml=this.generateItemHtml(objItem);if(typeof(intPosition)=='undefined')
{if(this.objSettings.blnUsePlaceHolders===true&&objItem.blnPlaceholder!==true)
{var objPlaceholder=objCoverflowList.find('li.coverflow_list_item_placeholder:first');if(objPlaceholder.length>0)
{objPlaceholder.before(strHtml);var objPlaceholderDetails=this.getItemDetailsFromElement(objPlaceholder);objPlaceholder.remove();this.objItems[objPlaceholderDetails.intId]=null;this.intItems--;this.intPlaceholderItems--;}
else
{objCoverflowList.append(strHtml);}}
else
{objCoverflowList.append(strHtml);}}
else
{objCoverflowList.find('li:eq('+intPosition+')').before(strHtml);if(this.objSettings.blnUsePlaceHolders===true&&objItem.blnPlaceholder!==true)
{var objPlaceholder=objCoverflowList.find('li.coverflow_list_item_placeholder:first');if(objPlaceholder.length>0)
{var objPlaceholderDetails=this.getItemDetailsFromElement(objPlaceholder);objPlaceholder.remove();this.objItems[objPlaceholderDetails.intId]=null;this.intItems--;this.intPlaceholderItems--;}}}
this.arrItemOrdering=this.getOrderedItemIds();this.updateListWidth();this.refreshItems();return true;},addPlaceholderItems:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',750,'addPlaceholderItems:','function()',arguments);if(this.objSettings.blnUsePlaceHolders===true)
{for(var intI=this.intItems+1;intI<=this.intMaximumVisibleItems;intI++)
{var objItem={intId:'placeholder'+this.intPlaceholderId,strName:'',strDescription:'',strThumbnailUrl:'',blnPlaceholder:true};this.addItem(objItem);this.intPlaceholderItems++;this.intPlaceholderId++;}
this.refreshItems();}},removeItem:function(intPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',778,'removeItem:','function(intPosition)',arguments);var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');var objItemElement=objCoverflowList.find('li:eq('+intPosition+')');var objItem=this.getItemDetailsFromElement(objItemElement);objItemElement.remove();this.objItems[objItem.intId]=null;this.intItems--;this.arrItemOrdering=this.getOrderedItemIds();this.updateListWidth();this.addPlaceholderItems();this.refreshItems();return true;},removeItemById:function(intItemId)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',818,'removeItemById:','function(intItemId)',arguments);var intPosition=$j.inArray(intItemId,this.arrItemOrdering);if(intPosition==-1)
{return false;}
return this.removeItem(intPosition);},removeAllItems:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',834,'removeAllItems:','function()',arguments);var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');objCoverflowList.empty();objCoverflowList.css
({marginLeft:'0px'});this.objItems={};this.intItems=0;this.intPlaceholderItems=0;this.arrItemOrdering=[];this.intCurrentMarginLeft=0;this.updateListWidth();this.addPlaceholderItems();},moveItem:function(intItemId,mixPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',868,'moveItem:','function(intItemId, mixPosition)',arguments);var objElement=this.getItemElementFromId(intItemId);if(objElement===null)
{return false;}
if(typeof(mixPosition)!='undefined')
{if(mixPosition=='left'||mixPosition=='right')
{var intCurrentPosition=$j.inArray(parseInt(intItemId),this.arrItemOrdering);if(intCurrentPosition==-1)
{return false;}
if((mixPosition=='left'&&intCurrentPosition==0)||(mixPosition=='right'&&intCurrentPosition==this.intItems-1))
{return false;}
if(mixPosition=='left')
{var objElementAtPosition=this.getItemElementFromId(this.arrItemOrdering[intCurrentPosition-1]);$j(objElementAtPosition).before(objElement);}
else if(mixPosition=='right')
{if(intCurrentPosition>=(this.intItems-this.intPlaceholderItems-2))
{var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');if(this.intPlaceholderItems>0)
{objCoverflowList.find('li.coverflow_list_item_placeholder:first').before(objElement);}
else
{objCoverflowList.append(objElement);}}
else
{var objElementAtPosition=this.getItemElementFromId(this.arrItemOrdering[intCurrentPosition+2]);$j(objElementAtPosition).before(objElement);}}}
else
{var objElementAtPosition=this.getItemElementFromId(this.arrItemOrdering[mixPosition]);$j(objElementAtPosition).before(objElement);}}
else
{var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');objCoverflowList.append(objElement);}
this.arrItemOrdering=this.getOrderedItemIds();return true;},renderItem:function(objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',961,'renderItem:','function(objItem)',arguments);var strHtml=this.generateInnerItemHtml(objItem);var objElement=$j('#'+this.strElementId+'_'+objItem.intId);objElement.html(strHtml);objElement.find('input.star').rating();if(objItem.blnPlaceholder!==true)
{this.setupItemEvents(objElement);}
this.objItems[objItem.intId].blnVisible=true;objShell.makeBackgroundPngTransparent($j('#'+this.strElementId+'_'+objItem.intId+' .thumbnail').get(0),true,136,69);},unRenderItem:function(objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',989,'unRenderItem:','function(objItem)',arguments);var objElement=$j('#'+this.strElementId+'_'+objItem.intId);objElement.empty();this.objItems[objItem.intId].blnVisible=false;},unRenderAllItems:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1000,'unRenderAllItems:','function()',arguments);$j.each(this.objItems,$j.proxy(function(intItemId,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1002,'$j.each(this.objItems, $j.proxy(','function(intItemId, objItem)',arguments);if(objItem===null||objItem.blnPlaceholder===true)
{return true;}
this.unRenderItem(objItem);},this));},refreshItems:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1017,'refreshItems:','function()',arguments);var intVisibleStartItemNumber=Math.abs(this.intCurrentMarginLeft/this.intItemWidth);var intVisibleEndItemNumber=intVisibleStartItemNumber+(this.intMaximumVisibleItems-1);$j.each(this.arrItemOrdering,$j.proxy(function(intPosition,intItemId)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1026,'$j.each(this.arrItemOrdering, $j.proxy(','function(intPosition, intItemId)',arguments);var objItem=this.objItems[intItemId];if(intPosition>=intVisibleStartItemNumber&&intPosition<=intVisibleEndItemNumber)
{if(objItem.blnVisible!==true)
{this.renderItem(objItem);}}
else
{if(objItem.blnVisible!==false)
{this.unRenderItem(objItem);}}},this));},getItemCount:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1052,'getItemCount:','function()',arguments);return this.intItems-this.intPlaceholderItems;},getItemElementFromId:function(intId)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1058,'getItemElementFromId:','function(intId)',arguments);var objElement=$j('#'+this.strElementId+'_'+intId);if(objElement.length>0)
{return objElement.get(0);}
else
{return null;}},getOrderedItemDetails:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1073,'getOrderedItemDetails:','function()',arguments);var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');var _this=this;var arrItemOrdering=[];objCoverflowList.find('li.coverflow_list_item').each(function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1085,'objCoverflowList.find(\'li.coverflow_list_item\').each(','function()',arguments);var objItem=_this.getItemDetailsFromElement(this);arrItemOrdering.push(objItem);});return arrItemOrdering;},getOrderedItemIds:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1096,'getOrderedItemIds:','function()',arguments);var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');var _this=this;var arrItemOrdering=[];objCoverflowList.find('li.coverflow_list_item').each(function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1108,'objCoverflowList.find(\'li.coverflow_list_item\').each(','function()',arguments);var objItem=_this.getItemDetailsFromElement(this);arrItemOrdering.push(parseInt(objItem.intId));});return arrItemOrdering;},enableItem:function(intPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1120,'enableItem:','function(intPosition)',arguments);},disableItem:function(intPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1127,'disableItem:','function(intPosition)',arguments);},selectItem:function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1133,'selectItem:','function(objEvent)',arguments);var objItem=this.getItemDetailsFromElement(objEvent.currentTarget);if(!objEvent.shiftKey&&!objEvent.ctrlKey)
{this.deselectItems();}
if(objItem.blnEnabled===false||objItem.blnPlaceholder===true)
{return;}
var intIndex=$j.inArray(objItem.intId,this.arrSelectedItems);if(objEvent.shiftKey&&this.arrSelectedItems.length>0)
{var intCurrentItemIndex=$j.inArray(objItem.intId,this.arrItemOrdering);var intPreviousItemIndex=$j.inArray(this.intLastSelectedItemId,this.arrItemOrdering);var arrItemsToRetain=[];if(intCurrentItemIndex>intPreviousItemIndex)
{for(var intI=intPreviousItemIndex;intI<=intCurrentItemIndex;intI++)
{var intCurrentItemId=this.arrItemOrdering[intI];this.highlightItem('#'+this.strElementId+'_'+intCurrentItemId);arrItemsToRetain.push(intCurrentItemId);}}
else if(intCurrentItemIndex<intPreviousItemIndex)
{for(var intI=intCurrentItemIndex;intI<=intPreviousItemIndex;intI++)
{var intCurrentItemId=this.arrItemOrdering[intI];this.highlightItem('#'+this.strElementId+'_'+intCurrentItemId);arrItemsToRetain.push(intCurrentItemId);}}
else
{this.highlightItem(objEvent.currentTarget);arrItemsToRetain.push(objItem.intId);}
this.deselectItems(arrItemsToRetain);}
else if(objEvent.ctrlKey&&intIndex>-1)
{this.unhighlightItem(objEvent.currentTarget);this.arrSelectedItems.splice(intIndex,1);}
else
{this.highlightItem(objEvent.currentTarget);this.arrSelectedItems.push(objItem.intId);this.intLastSelectedItemId=objItem.intId;}
return false;},deselectItems:function(arrItemIdsToRetain)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1228,'deselectItems:','function(arrItemIdsToRetain)',arguments);var arrItemIdsToRetain=typeof(arrItemIdsToRetain)!='undefined'?arrItemIdsToRetain:[];$j.each(this.arrSelectedItems,$j.proxy(function(intKey,intItemId)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1232,'$j.each(this.arrSelectedItems, $j.proxy(','function(intKey, intItemId)',arguments);if($j.inArray(intItemId,arrItemIdsToRetain)>-1)
{return true;}
this.unhighlightItem('#'+this.strElementId+'_'+intItemId,true);},this));if(typeof(arrItemIdsToRetain)!='undefined')
{this.arrSelectedItems=arrItemIdsToRetain;}
else
{this.arrSelectedItems=[];}},getSelectedItems:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1255,'getSelectedItems:','function()',arguments);return this.arrSelectedItems;},getSelectedItemsCount:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1261,'getSelectedItemsCount:','function()',arguments);return this.arrSelectedItems.length;},getUnselectedItems:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1267,'getUnselectedItems:','function()',arguments);var arrUnselectedItems=[];$j.each(this.arrItemOrdering,function(intKey,intItemId)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1271,'$j.each(this.arrItemOrdering,','function(intKey, intItemId)',arguments);if($j.inArray(intItemId,this.arrSelectedItems)==-1)
{arrUnselectedItems.push(intItemId);}});return arrUnselectedItems;},getUnselectedItemsCount:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1283,'getUnselectedItemsCount:','function()',arguments);return this.intItems-this.arrSelectedItems.length-this.intPlaceholderItems;},highlightItem:function(objElement)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1289,'highlightItem:','function(objElement)',arguments);$j(objElement).css
({backgroundPosition:this.blnMinimised?'-480px 0px':'-160px 0px'});if(this.objSettings.blnShowHoverGlow===true)
{var objCoverflow=this.getDomElement(true);var objCoverflowContainer=objCoverflow.parent();var objOffset=$j(objElement).position();objCoverflowContainer.find('div.glow').css
({top:(objOffset.top+parseInt(objCoverflowContainer.css('padding-top'))-15)+'px',left:(objOffset.left+parseInt(objCoverflowContainer.css('padding-left'))-7)+'px',display:'block'});}},unhighlightItem:function(objElement,blnForce)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1319,'unhighlightItem:','function(objElement, blnForce)',arguments);var objItem=this.getItemDetailsFromElement(objElement);if(objItem===null)
{return false;}
if(blnForce!==true&&$j.inArray(objItem.intId,this.arrSelectedItems)>-1)
{return false;}
if(this.objSettings.blnShowHoverGlow===true)
{var objCoverflow=this.getDomElement(true);objCoverflow.parent().find('div.glow').hide();}
$j(objElement).css
({backgroundPosition:this.blnMinimised?'-320px 0px':'0px 0px'});},highlightAllItems:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1352,'highlightAllItems:','function()',arguments);$j.each(this.objItems,$j.proxy(function(intKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1354,'$j.each(this.objItems, $j.proxy(','function(intKey, objItem)',arguments);if(objItem===null||objItem.blnEnabled===false||objItem.blnPlaceholder===true)
{return true;}
this.highlightItem('#'+this.strElementId+'_'+objItem.intId);},this));},unhighlightAllItems:function(arrIgnoreItems)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1368,'unhighlightAllItems:','function(arrIgnoreItems)',arguments);var arrIgnoreItems=typeof(arrIgnoreItems)!='undefined'?arrIgnoreItems:[];$j.each(this.objItems,$j.proxy(function(intKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1372,'$j.each(this.objItems, $j.proxy(','function(intKey, objItem)',arguments);if(objItem===null||objItem.blnEnabled===false||objItem.blnPlaceholder===true||$j.inArray(objItem.intId,arrIgnoreItems)>-1)
{return true;}
this.unhighlightItem('#'+this.strElementId+'_'+objItem.intId,true);},this));},next:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1386,'next:','function()',arguments);var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');if(this.objSettings.blnShowHoverGlow===true)
{objCoverflow.parent().find('div.glow').hide();}
if((this.blnArrowNextEnabled===false)||(this.objSettings.blnInfiniteScroll===false&&this.intCurrentMarginLeft<=-(this.intItemWidth*(this.intItems-this.intMaximumVisibleItems))))
{this.blnArrowNextEnabled=false;return;}
var objCallbackFunction=function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1410,'var objCallbackFunction =','function()',arguments);this.intCurrentMarginLeft=parseInt(objCoverflowList.css('margin-left'));this.updateArrowNext();this.updateArrowPrevious();this.refreshItems();};var intMarginLeft=this.intCurrentMarginLeft-this.intItemWidth*this.objSettings.intScrollAmount;if(intMarginLeft<-(this.intItemWidth*(this.intItems-this.intMaximumVisibleItems)))
{intMarginLeft=-(this.intItemWidth*(this.intItems-this.intMaximumVisibleItems));}
if(this.objSettings.blnAnimatedScroll===true)
{objCoverflowList.animate
({marginLeft:intMarginLeft+'px'},this.objSettings.intScrollSpeed,'linear',$j.proxy(objCallbackFunction,this));}
else
{objCoverflowList.css
({marginLeft:intMarginLeft+'px'});$j.proxy(objCallbackFunction,this)();}},previous:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1457,'previous:','function()',arguments);var objCoverflow=this.getDomElement(true);var objCoverflowList=objCoverflow.find('ul.coverflow_list');if(this.objSettings.blnShowHoverGlow===true)
{objCoverflow.parent().find('div.glow').hide();}
if((this.blnArrowPreviousEnabled===false)||(this.objSettings.blnInfiniteScroll===false&&this.intCurrentMarginLeft>=0))
{this.blnArrowPreviousEnabled=false;return;}
var objCallbackFunction=function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1481,'var objCallbackFunction =','function()',arguments);this.intCurrentMarginLeft=parseInt(objCoverflowList.css('margin-left'));this.updateArrowNext();this.updateArrowPrevious();this.refreshItems();};var intMarginLeft=this.intCurrentMarginLeft+this.intItemWidth*this.objSettings.intScrollAmount;if(intMarginLeft>0)
{intMarginLeft=0;}
if(this.objSettings.blnAnimatedScroll===true)
{objCoverflowList.animate
({marginLeft:intMarginLeft+'px'},this.objSettings.intScrollSpeed,'linear',$j.proxy(objCallbackFunction,this));}
else
{objCoverflowList.css
({marginLeft:intMarginLeft+'px'});$j.proxy(objCallbackFunction,this)();}},scrollToItem:function(intItemId)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1528,'scrollToItem:','function(intItemId)',arguments);var intPosition=$j.inArray(parseInt(intItemId),this.arrItemOrdering);if(intPosition==-1)
{return false;}
this.scrollToPosition(intPosition);},scrollToPosition:function(intPosition,blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1545,'scrollToPosition:','function(intPosition, blnInstant)',arguments);if(this.intItems<=this.intMaximumVisibleItems)
{return true;}
var objCoverflow=this.getDomElement(true);if(this.objSettings.blnShowHoverGlow===true)
{objCoverflow.parent().find('div.glow').hide();}
var objCoverflowList=objCoverflow.find('ul.coverflow_list');var intRelativeCentrePosition=Math.ceil(this.intMaximumVisibleItems/2);var intMarginLeft=-(this.intItemWidth*intPosition);intMarginLeft+=(this.intItemWidth*(intRelativeCentrePosition-1));if(intMarginLeft>0)
{intMarginLeft=0;}
else if(intMarginLeft<-(this.intItemWidth*(this.intItems-this.intMaximumVisibleItems)))
{intMarginLeft=-(this.intItemWidth*(this.intItems-this.intMaximumVisibleItems));}
var objCallbackFunction=function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1587,'var objCallbackFunction =','function()',arguments);this.intCurrentMarginLeft=parseInt(objCoverflowList.css('margin-left'));this.updateArrowNext();this.updateArrowPrevious();this.refreshItems();};if(this.objSettings.blnAnimatedScroll===true&&blnInstant!==true)
{objCoverflowList.animate
({marginLeft:intMarginLeft+'px'},this.objSettings.intScrollSpeed,'linear',$j.proxy(objCallbackFunction,this));}
else
{objCoverflowList.css
({marginLeft:intMarginLeft+'px'});$j.proxy(objCallbackFunction,this)();}},scrollToStart:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1625,'scrollToStart:','function(blnInstant)',arguments);this.scrollToPosition(0,blnInstant);},scrollToEnd:function(blnInstant)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1631,'scrollToEnd:','function(blnInstant)',arguments);this.scrollToPosition(this.intItems-1,blnInstant);},enableSorting:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1637,'enableSorting:','function()',arguments);},disableSorting:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1643,'disableSorting:','function()',arguments);},orderByName:function(blnReverse)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1649,'orderByName:','function(blnReverse)',arguments);var blnReverse=typeof(blnReverse)!='undefined'?blnReverse:false;var arrNames=[];$j.each(this.objItems,function(intKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1656,'$j.each(this.objItems,','function(intKey, objItem)',arguments);if(objItem===null||objItem.blnPlaceholder===true)
{return true;}
if($j.inArray(objItem.strName,arrNames)==-1)
{arrNames.push(objItem.strName.toLowerCase());}});arrNames.sort();if(blnReverse===true)
{arrNames.reverse();}
var objOrderedItems={};$j.each(arrNames,$j.proxy(function(intKey,strName)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1682,'$j.each(arrNames, $j.proxy(','function(intKey, strName)',arguments);$j.each(this.objItems,$j.proxy(function(intItemKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1685,'$j.each(this.objItems, $j.proxy(','function(intItemKey, objItem)',arguments);if(objItem===null)
{return true;}
if(objItem.strName.toLowerCase()==strName.toLowerCase())
{objOrderedItems[objItem.intId]=objItem;this.moveItem(objItem.intId);}},this));},this));$j.each(this.objItems,$j.proxy(function(intItemKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1705,'$j.each(this.objItems, $j.proxy(','function(intItemKey, objItem)',arguments);if(objItem===null)
{return true;}
if(objItem.blnPlaceholder===true)
{this.moveItem(objItem.intId);}},this));this.objItems=objOrderedItems;this.refreshItems();if(this.objSettings.objOnSortCallback)
{this.objSettings.objOnSortCallback();}},minimise:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1732,'minimise:','function()',arguments);this.blnMinimised=true;$j.each(this.objItems,$j.proxy(function(intKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1737,'$j.each(this.objItems, $j.proxy(','function(intKey, objItem)',arguments);if(objItem===null)
{return true;}
$j('#'+this.strElementId+'_'+objItem.intId).css
({backgroundPosition:objItem.blnPlaceholder?'-1600px 0px':objItem.blnEnabled===false?'-960px 0px':'-320px 0px'});$j('#'+this.strElementId+'_'+objItem.intId).find('div.content').css
({height:'100px'});},this));},maximise:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1760,'maximise:','function()',arguments);this.blnMinimised=false;$j.each(this.objItems,$j.proxy(function(intKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1765,'$j.each(this.objItems, $j.proxy(','function(intKey, objItem)',arguments);if(objItem===null)
{return true;}
$j('#'+this.strElementId+'_'+objItem.intId).css
({backgroundPosition:objItem.blnPlaceholder?'-1280px 0px':objItem.blnEnabled===false?'-640px 0px':'0px 0px'});$j('#'+this.strElementId+'_'+objItem.intId).find('div.content').css
({height:'160px'});},this));},lock:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1788,'lock:','function()',arguments);},unlock:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1794,'unlock:','function()',arguments);},show:function(objPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1800,'show:','function(objPosition)',arguments);var objCoverflow=this.getDomElement(true);objCoverflow.show();},hide:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1809,'hide:','function()',arguments);var objCoverflow=this.getDomElement(true);objCoverflow.hide();},onWindowResize:function()
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1818,'onWindowResize:','function()',arguments);this.updateCoverflowWidth();this.refreshItems();},onClickItem:function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1827,'onClickItem:','function(objEvent)',arguments);if(this.objSettings.objOnClickItemCallback)
{var objItem=this.getItemDetailsFromElement(objEvent.currentTarget);if(objItem===null)
{return false;}
this.objSettings.objOnClickItemCallback(objEvent,objItem);}},onDoubleClickItem:function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1844,'onDoubleClickItem:','function(objEvent)',arguments);if(this.objSettings.objOnDoubleClickItemCallback)
{var objItem=this.getItemDetailsFromElement(objEvent.currentTarget);if(objItem===null)
{return false;}
this.objSettings.objOnDoubleClickItemCallback(objEvent,objItem);}},onMouseOverItem:function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1862,'onMouseOverItem:','function(objEvent)',arguments);var objItem=this.getItemDetailsFromElement(objEvent.currentTarget);if(objItem===null)
{return false;}
this.unhighlightAllItems([objItem.intId]);if(objItem.blnEnabled===true&&objItem.blnPlaceholder===false)
{this.highlightItem(objEvent.currentTarget);}
if(this.objSettings.objOnMouseOverItemCallback)
{this.objSettings.objOnMouseOverItemCallback(objEvent,objItem);}},onMouseOutItem:function(objEvent)
{Profiler.profile('view/shared/assets/javascript/helpers/coverflow_helper.js',1889,'onMouseOutItem:','function(objEvent)',arguments);var objElement=$j(objEvent.currentTarget);var objElementOffset=objElement.offset();var intElementWidth=this.intItemWidth;var intElementHeight=this.intItemHeight;if(objEvent.pageX<objElementOffset.left||objEvent.pageX>objElementOffset.left+intElementWidth||objEvent.pageY<objElementOffset.top||objEvent.pageY>objElementOffset.top+intElementHeight)
{var objItem=this.getItemDetailsFromElement(objEvent.currentTarget);if(objItem===null)
{return false;}
if($j.inArray(objItem.intId,this.arrSelectedItems)==-1&&objItem.blnEnabled===true&&objItem.blnPlaceholder===false)
{this.unhighlightItem(objEvent.currentTarget);}
if(this.objSettings.objOnMouseOutItemCallback)
{this.objSettings.objOnMouseOutItemCallback(objEvent,objItem);}}}});var ContextualHelpHelper=HelperBase.extend({init:function()
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',13,'init:','function()',arguments);return;this._super
({strIdPrefix:'ContextualHelpHelper'});this.objContextualHelpItems={shell:{objOptions:{blnRunOnce:true,intTimesRun:0},arrItems:[{strSelectorPath:'#search input#search_text',strHelpText:'Search',strMode:'static',strURL:'',strHelpTextFull:'A search will automatically provide information about Places. The uLearn library includes over 30,000 other cross-curricular resources. If you would like to see these resources, select an option from the right-hand box, e.g. &quot;All resources&quot; or &quot;Playlists&quot;.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'#search span#search_button',strHelpText:'Search',strMode:'static',strURL:'',strHelpTextFull:'A search will automatically provide information about Places. The uLearn library includes over 30,000 other cross-curricular resources. If you would like to see these resources, select an option from the right-hand box, e.g. &quot;All resources&quot; or &quot;Playlists&quot;.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'#contentCell div#moreSearchOptions',strHelpText:'More search options',strMode:'static',strURL:'',strHelpTextFull:'As well as places, you can search for video, images and other resource types, and change how they are displayed. Click on More Search Options to refine your search.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'#contentCell div#favouriteSets',strHelpText:'Favourite sets',strMode:'static',strURL:'',strHelpTextFull:"When you click on the red heart symbol for a resource it is added to a Favourite set.<br /><br />Favourite Sets are useful to gather resources from the library that you want to use in a particular lesson.",intLightboxWidth:575,intLightboxHeight:150},{strSelectorPath:'#contentCell div#saveViewToPlaylist',strHelpText:'Save current view to playlist',strMode:'static',strURL:'',strHelpTextFull:'Click the &quot;Save current view to playlist&quot; button to take a snapshot of the map and any resources that are visible on the map. A series of these snapshot views is called a Playlist. You can save your view either to a new or to an existing published or private playlist you own.  Playlists are very useful for taking learners directly to the maps and resources you want them to use.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'#contentCell div#print',strHelpText:'Print map',strMode:'static',strURL:'',strHelpTextFull:'Here you can print your current map view, including any resources visible on the map, and any annotations you have added. You can also enter notes, which will print along with your map view.',intLightboxWidth:550,intLightboxHeight:200}]},login:{objOptions:{blnRunOnce:false,intTimesRun:0},arrItems:[{strSelectorPath:'#loginButtonsContainer span#forgotten_password_button',strHelpText:'Forgotten your password',strMode:'static',strURL:'',strHelpTextFull:'If you have forgotten your password, click here. If you need a reminder of your user name, call or email our friendly support team on 01752 797134 / <a href=&quot;mailto:ulearn.support@webbased.co.uk&quot;>ulearn.support@webbased.co.uk</a> who will be more than happy to help.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'#loginButtonsContainer span#register_button',strHelpText:'Register',strMode:'static',strURL:'',strHelpTextFull:'Because uLearn has been built exclusively for the education sector, and contains a wide range of licensed mapping, you will need to register. Once your registration has been approved, you can log in. If you have opted for a 30 day trial of uLearn, you can upgrade to a full licence to retain access to the Resource Library at any time by clicking Me > Account > Purchase/Renew Licence, or alternatively continue with the Free Map Print service.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'#loginButtonsContainer span#findoutmore_button',strHelpText:'About uLearn',strMode:'static',strURL:'',strHelpTextFull:'<a href=&quot;http://ulearn.webbased.co.uk/channel/index/id/1529&quot; target=&quot;_blank&quot;>Click here</a> for extensive information about the maps and resources within uLearn and how they can enrich learning.',intLightboxWidth:550,intLightboxHeight:200}]},resourceExplorer:{objOptions:{blnRunOnce:false,intTimesRun:0},arrItems:[{strSelectorPath:'.container_resource_explorer table.handle_table',strHelpText:'Resource Explorer',strMode:'static',strURL:'',strHelpTextFull:'Use the Tabs below to find resources instantly. Hover over each Tab for more Help information.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.container_resource_explorer a.lock_widget',strHelpText:'Padlock',strMode:'static',strURL:'',strHelpTextFull:'Click the lock if you want to keep the resources you are currently viewing.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.container_resource_explorer a.menu_widget',strHelpText:'Menu',strMode:'static',strURL:'',strHelpTextFull:'Click the menu button to open a list of options for easily managing all open components. For example, if you have a lot of different components open, you can quickly collapse them all at once, or scroll directly to a specific component.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.container_resource_explorer a.collapse_widget',strHelpText:'Collapse/expand',strMode:'static',strURL:'',strHelpTextFull:'Click the collapse/expand button to show/hide the content within a component. Use this to save space when working with multiple components at the same time!',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.container_resource_explorer a.close_widget',strHelpText:'Close',strMode:'static',strURL:'',strHelpTextFull:'Click the close button to close a component and remove it from the screen.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'a#resourceExplorerTab_tags',strHelpText:'Topics',strMode:'static',strURL:'',strHelpTextFull:'uLearn Topics automatically turn on learning resources all over the map. Zoom in on an area and additional resources will appear. If you are logged in, you can click &quot;Save current view to playlist&quot; so you can come back to the same map and resources later.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'a#resourceExplorerTab_publishedResources',strHelpText:'Published',strMode:'static',strURL:'',strHelpTextFull:'Here you can find all the resources created or uploaded by other users. Use the [More search options] link to refine your search',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'a#resourceExplorerTab_myResources',strHelpText:'My resources',strMode:'static',strURL:'',strHelpTextFull:'Any resources you have uploaded or created will be listed here. You can select whether you see your published or private resources.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'a#resourceExplorerTab_playlists',strHelpText:'Sets',strMode:'static',strURL:'',strHelpTextFull:'This tab allows access to all the Favourite Sets and Playlists in uLearn. Choose from the drop-down menu to change between published and private Favourite Sets and Playlists. <br/><br/>Favourite Sets are the perfect way to organise your teaching resources into logical groups and share them with your class. Just click on the &quot;heart&quot; symbol next to a resource to start a new Favourite Set. Favourite Sets can include resources that are linked to the map (e.g. pictures and video) and resources that are better not linked to maps (e.g. Lists of Learning Outcomes or Assessment Activities). <br/><br/>Playlists are very useful for taking learners directly to a particular map, and  zoomed in to a particular location, as well as displaying the map-linked resources you want the pupils to use. To see Playlists created by other people, click the Playlists &quot;All Published&quot; option in the Sets tab.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.searchWithin span.openSearchFiltersLink',strHelpText:'More search options',strMode:'static',strURL:'',strHelpTextFull:'As well as places, you can search for video, images and other resource types, and change how they are displayed. Click on More Search Options to refine your search.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.details div.views',strHelpText:'Views',strMode:'static',strURL:'',strHelpTextFull:'This shows the number of people who have looked at the resource.',intLightboxWidth:550,intLightboxHeight:200}]},map:{objOptions:{blnRunOnce:true,intTimesRun:0},arrItems:[{strSelectorPath:'.widgetPadlock',strHelpText:'Padlock',strMode:'static',strURL:'',strHelpTextFull:'A Lock icon is provided for when you want to keep a resource or map view available while you do other things. This goes red when the map or resource view is locked. To unlock, simply click it again.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'#resetButtonWidget',strHelpText:'Zoom right out',strMode:'static',strURL:'',strHelpTextFull:'Click this button to see the full map view.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetUndo .undoButton',strHelpText:'Undo map move',strMode:'static',strURL:'',strHelpTextFull:'Clicking this button will take you back to the previous location viewed on the map.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetUndo .redoButton',strHelpText:'Redo map move',strMode:'static',strURL:'',strHelpTextFull:'Clicking this button will take you back to the most recent location viewed on the map.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetArea #layer_list_button',strHelpText:'Layer list',strMode:'static',strURL:'',strHelpTextFull:'Clicking this button will toggle the layer list panel on/off. The layer list panel contains a list of &quot;Layer&quot; and &quot;Thematic Layer&quot; resources that are currently being displayed on the map, along with corresponding legends.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetZoomSlider .zoomInButton',strHelpText:'Zoom in',strMode:'static',strURL:'',strHelpTextFull:'Clicking this button zooms you in to the middle of the map a step at a time. The most popular way to zoom in is to click and drag your right hand mouse button. You will zoom in to the red rectangle you draw.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetZoomSlider .zoomOutButton',strHelpText:'Zoom out',strMode:'static',strURL:'',strHelpTextFull:'Click this button to zoom out a step at a time, alternatively click on the &quot;Zoom right out&quot; button at the top left hand side of the map to zoom all the way out.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetMapModeButtons .layerButton',strHelpText:'Layer mode',strMode:'static',strURL:'',strHelpTextFull:'uLearn defaults to the Layer option, allowing you to use the slider to fade between maps. Select an OS map on the left and an aerial on the right, and you can drag the fader across to see one changing into the other.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetMapModeButtons .mirroredButton',strHelpText:'Mirror mode',strMode:'static',strURL:'',strHelpTextFull:'Mirror allows you to see the same place on two different maps. For example, set map A to City > UK 1:50.000 and map B to Aerial 2m.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetMapModeButtons .stitchedButton',strHelpText:'Stitch mode',strMode:'static',strURL:'',strHelpTextFull:'Stitch allows you to choose two different types of map (e.g. OS & Aerial) so that when you move, one map turns into the other.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetScribble .polygonButton',strHelpText:'Draw polygon',strMode:'static',strURL:'',strHelpTextFull:'You can link multiple resources to a hotspot, a line, or a polygon. Select the polygon symbol from the left hand side of the map, and then click on a location on the map. Continue clicking to create further points and double-click or press &quot;Enter&quot; to finish. (When you hover over the polygon, you can alter its shape by dragging the brown circles.) Drag your desired resources into the callout box. Click &quot;Next&quot; then &quot;Save&quot;. N.B. You can only link your own resources, not resources belonging to other users.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetScribble .polylineButton',strHelpText:'Draw line',strMode:'static',strURL:'',strHelpTextFull:'You can link multiple resources to a hotspot, a line, or a polygon. Select the line symbol from the left hand side of the map pane, and then click on the map. Continue clicking to create further points and double-click or press &quot;Enter&quot; to finish. When you hover over the line you can alter its route by dragging the brown circles. Drag your desired resources into the callout box. Click &quot;Next&quot; then &quot;Save&quot;. N.B. You can only link your own resources, not resources belonging to other users.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetScribble .hotspotButton',strHelpText:'Draw hotspot',strMode:'static',strURL:'',strHelpTextFull:'You can link multiple resources to a hotspot, a line, or a polygon. Select the hotspot symbol from the left hand side of the map pane, and then click on the map. Drag your desired resources into the callout box. Click &quot;Next&quot; then &quot;Save&quot;. N.B. You can only link your own resources, not resources belonging to other users.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.widgetScribble .measureButton',strHelpText:'Measure',strMode:'static',strURL:'',strHelpTextFull:'You can use the ruler tool to measure distance. Zoom in to the area you want to measure and click the ruler icon on the left hand side of the map. Click on the map where you want to place your first point, then move and click the mouse again until you have selected the line you want to measure. Double click or press &quot;Enter&quot; to finish and a callout box will appear, displaying your measurement. To measure area (rather than length), draw a polygon and hover over the shape you have drawn.',intLightboxWidth:550,intLightboxHeight:200}]},favouriteSets:{objOptions:{blnRunOnce:true,intTimesRun:0},arrItems:[{strSelectorPath:'#favourites_set_revert',strHelpText:'Revert to saved state',strMode:'static',strURL:'',strHelpTextFull:'If you have made changes to a favourites set and wish to undo them and return to the previously saved state, simply click on the revert button.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'#favourites_set_clear_all',strHelpText:'Clear all resources',strMode:'static',strURL:'',strHelpTextFull:'Clicking the clear all button from within a favourites set will remove all added resources and leave an empty favourites set.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.favourites_sets .window_buttons .minimise_button',strHelpText:'Minimise',strMode:'static',strURL:'',strHelpTextFull:'The minimise button will restore the favourites set to the compacted state.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.favourites_sets .window_buttons .maximise_button',strHelpText:'Maximise',strMode:'static',strURL:'',strHelpTextFull:'Clicking on the maximise button in a favourites set will maximise the available area, revealing extra buttons to help manage your favourites set.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.favourites_set .window_buttons .minimise_button',strHelpText:'Minimise',strMode:'static',strURL:'',strHelpTextFull:'The minimise button will restore the favourites set to the compacted state.',intLightboxWidth:550,intLightboxHeight:200},{strSelectorPath:'.favourites_set .window_buttons .maximise_button',strHelpText:'Maximise',strMode:'static',strURL:'',strHelpTextFull:'Clicking on the maximise button in a favourites set will maximise the available area, revealing extra buttons to help manage your favourites set.',intLightboxWidth:550,intLightboxHeight:200}]}};$j(window).load($j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',593,'$j(window).load($j.proxy(','function()',arguments);this.registerContextHelpers('shell');},this));},registerContextHelpers:function(strComponent)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',601,'registerContextHelpers:','function(strComponent)',arguments);return;if(Shell.getUserContextSensitiveHelpMode()!="enabled")
{return false;}
var _this=this;if(typeof(this.objContextualHelpItems[strComponent])=='undefined')
{return false;}
if(this.objContextualHelpItems[strComponent]['objOptions']['intTimesRun']==0)
{this.preProcessContextHelpers(strComponent);}
if(this.objContextualHelpItems[strComponent]['objOptions']['blnRunOnce']&&this.objContextualHelpItems[strComponent]['objOptions']['intTimesRun']>0)
{return false;}
$j.each(this.objContextualHelpItems[strComponent]['arrItems'],function(intKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',636,'$j.each(this.objContextualHelpItems[strComponent][\'arrItems\'],','function(intKey, objItem)',arguments);var strElementSelectorPath=objItem['strSelectorPath'];var intWidth=objItem['intCalculatedWidth'];var strElementHTML=objItem['strCalculatedHTML'];$j(strElementSelectorPath).one('mouseover',function()
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',647,'$j(strElementSelectorPath).one(\'mouseover\',','function()',arguments);_this.createContextHelper(_this,strElementSelectorPath,intWidth,strElementHTML);});});this.objContextualHelpItems[strComponent]['objOptions']['intTimesRun']++;},createContextHelper:function(context,strElementSelectorPath,intWidth,strElementHTML)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',660,'createContextHelper:','function(context, strElementSelectorPath, intWidth, strElementHTML)',arguments);return;$j(strElementSelectorPath).bt
(strElementHTML,{showTip:function(box){$j(box).fadeIn(250);},hideTip:function(box,callback){$j(box).animate({opacity:0},250,callback);},hoverIntentOpts:{interval:500,timeout:2000},width:intWidth,height:25,padding:5,cornerRadius:2,spikeLength:7,fill:'rgba(249, 249, 208, 1)',closeWhenOthersOpen:true,offsetParent:$j('body'),preShow:function(box,position)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',689,'preShow:','function(box, position)',arguments);context.addDropShadow($j(box),intWidth,position);}});$j(strElementSelectorPath).trigger('mouseover');},preProcessContextHelpers:function(strComponent)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',703,'preProcessContextHelpers:','function(strComponent)',arguments);return;var _this=this;$j.each(this.objContextualHelpItems[strComponent]['arrItems'],function(itemKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',711,'$j.each(this.objContextualHelpItems[strComponent][\'arrItems\'],','function(itemKey, objItem)',arguments);var strElementSelectorPath=objItem.strSelectorPath;var strElementMode=objItem.strMode;var strElementURL=objItem.strURL;var strElementHelpText=objItem.strHelpText;var strElementHelpTextFull=objItem.strHelpTextFull;var intLightboxWidth=objItem.intLightboxWidth;var intLightboxHeight=objItem.intLightboxHeight;var intWidth=(strElementHelpText.length*5)+75;strElementHelpText+=" <span style='font-size:11px;color:blue;'>(<a href=\"#\" onclick=\"ContextualHelp.openFullHelpWindow('"+strElementMode+"','"+strElementURL+"','"+strElementHelpText+"','"+strElementHelpTextFull+"',"+intLightboxWidth+","+intLightboxHeight+");return false;\">more</a>)</span>";var strElementHTML='';strElementHTML+='<div style="position:relative;vertical-align:top;width:'+intWidth+'px;height:15px;">';strElementHTML+='<img src="/view/shared/assets/images/info_icon.png" style="position:absolute;top:0px;left:0px;width:16px;height:16px;" />';strElementHTML+='<span style="position:absolute;top:1px;left:20px;width:'+intWidth+'px;height:15px;font-size:12px;">'+strElementHelpText+'</span>';strElementHTML+='</div>';_this.objContextualHelpItems[strComponent]['arrItems'][itemKey]['intCalculatedWidth']=intWidth;_this.objContextualHelpItems[strComponent]['arrItems'][itemKey]['strCalculatedHTML']=strElementHTML;});},removeContextHelpers:function()
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',744,'removeContextHelpers:','function()',arguments);return;var _this=this;$j.each(this.objContextualHelpItems,function(componentKey,objComponent)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',749,'$j.each(this.objContextualHelpItems,','function(componentKey, objComponent)',arguments);$j.each(objComponent['arrItems'],function(itemKey,objItem)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',751,'$j.each(objComponent[\'arrItems\'],','function(itemKey, objItem)',arguments);var strElementSelectorPath=objItem.strSelectorPath;$j(strElementSelectorPath).unbind('mouseover');});_this.objContextualHelpItems[componentKey]['objOptions']['intTimesRun']=0;});},addDropShadow:function(element,intWidth,strPosition)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',765,'addDropShadow:','function(element, intWidth, strPosition)',arguments);return;element.css({width:intWidth+'px',height:'50px'});var strHookElementPositionOffset=(strPosition=='right')?7:0;var strShadowHookElementHTML="<div class='shadowHook' style='position:absolute;top:0px;left:"+strHookElementPositionOffset+"px;width:"+(intWidth+10)+"px;height:25px;background-color:white;'></div>";element.append(strShadowHookElementHTML);$j('.dropShadow').remove();element.find('.shadowHook').dropShadow();},openFullHelpWindow:function(strMode,strURL,strTitle,strText,intWidth,intHeight)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',790,'openFullHelpWindow:','function(strMode, strURL, strTitle, strText, intWidth, intHeight)',arguments);return;var intWidth=(typeof(intWidth)!='undefined')?intWidth:550;var intHeight=(typeof(intHeight)!='undefined')?intHeight:200;switch(strMode)
{case'static':strText='<div style="text-align:left;">'+strText+'</div>';Shell.lightboxAlert(strText,intWidth,intHeight,'Help - '+strTitle,function(){});break;case'dynamic':var objCallbackFunction=$j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',809,'var objCallbackFunction = $j.proxy(','function()',arguments);this.showDynamicHelp(strURL);},this);Shell.launchNewLightboxWindow(objCallbackFunction,intWidth,intHeight);break;}},showDynamicHelp:function(strURL)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',821,'showDynamicHelp:','function(strURL)',arguments);return;$j.ajax
({async:true,cache:false,data:{},type:'POST',url:'/contextualHelpHelper/0/showDynamicHelp/'+strURL,complete:$j.proxy(function(XMLHttpRequest)
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',834,'complete: $j.proxy(','function(XMLHttpRequest)',arguments);var strResponseText=XMLHttpRequest.responseText;strResponseText=objShell.filterXmlResponse(strResponseText);$j('#lbContent').html(strResponseText);},this)});},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/contextual_help_helper.js',849,'shutdown:','function()',arguments);return;this._super();}});var SplashPageHelper=HelperBase.extend({init:function()
{Profiler.profile('view/shared/assets/javascript/helpers/splash_page_helper.js',13,'init:','function()',arguments);this._super
({strIdPrefix:'SplashPageHelper'});$j(window).load($j.proxy(function()
{Profiler.profile('view/shared/assets/javascript/helpers/splash_page_helper.js',22,'$j(window).load($j.proxy(','function()',arguments);var blnAuthenticated=Shell.getUserAthenticatedStatus();var objIdentity=Shell.getIdentity();var objBrowserDetails=objShell.getBrowserDetails();if(!blnAuthenticated&&(objIdentity.name=='uLearn')&&!(objBrowserDetails.strBrowser=='Explorer'&&objBrowserDetails.intVersion<=6))
{this.showSplashPage();}},this));this.splashPageVisible=false;},showSplashPage:function()
{Profiler.profile('view/shared/assets/javascript/helpers/splash_page_helper.js',44,'showSplashPage:','function()',arguments);if(this.splashPageVisible)
{return;}
var strSplashPageURL=Shell.getWebsiteDomain()+'/static/ulearn/splash_page/index.html';var intHeight=Shell.getContentAbsoluteHeight();var intWidth=Shell.getColumnRightAbsoluteWidth();var strSplashPageHTML="<div style='width:"+intWidth+"px;height:"+intHeight+"px' id='splashPageContainer'>";strSplashPageHTML+="<iframe style='border:0px;width:"+intWidth+"px;height:"+intHeight+"px;' frameborder='0' id='splashPageIframe' src='"+strSplashPageURL+"'></iframe>";strSplashPageHTML+="</div>";$j('#shellColumnRight').prepend(strSplashPageHTML);Shell.registerResizeFunction($j.proxy(function(){this.resizeSplashPage();},this));$j('#shellColumnRight .containerWrapper .container').css({visibility:'hidden'});this.splashPageVisible=true;},closeSplashPage:function()
{Profiler.profile('view/shared/assets/javascript/helpers/splash_page_helper.js',75,'closeSplashPage:','function()',arguments);$j('#splashPageContainer').remove();$j('#shellColumnRight .containerWrapper .container').css({visibility:'visible'});this.splashPageVisible=false;},resizeSplashPage:function()
{Profiler.profile('view/shared/assets/javascript/helpers/splash_page_helper.js',85,'resizeSplashPage:','function()',arguments);var intHeight=Shell.getContentAbsoluteHeight();var intWidth=Shell.getColumnRightAbsoluteWidth();$j('#splashPageContainer').css({width:intWidth+'px',height:intHeight+'px'});$j('#splashPageIframe').css({width:intWidth+'px',height:intHeight+'px'});},shutdown:function()
{Profiler.profile('view/shared/assets/javascript/helpers/splash_page_helper.js',96,'shutdown:','function()',arguments);this._super();}});
