/*  Prototype JavaScript framework, version 1.5.0_rc0
*  (c) 2005 Sam Stephenson <sam@conio.net>
*
*  Prototype is freely distributable under the terms of an MIT-style license.
*  For details, see the Prototype web site: http://prototype.conio.net/
*
/*--------------------------------------------------------------------------*/
var Prototype = {Version: '1.5.0_rc0',
ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
emptyFunction: function() {},
K: function(x) {return x}
}
var Class = {create: function() {return function() {this.initialize.apply(this, arguments);}
}
}
var Abstract = new Object();Object.extend = function(destination, source) {for (var property in source) {destination[property] = source[property];}
return destination;}
Object.inspect = function(object) {try {if (object == undefined) return 'undefined';if (object == null) return 'null';return object.inspect ? object.inspect() : object.toString();} catch (e) {if (e instanceof RangeError) return '...';throw e;}
}
Function.prototype.bind = function() {var __method = this, args = $A(arguments), object = args.shift();return function() {return __method.apply(object, args.concat($A(arguments)));}
}
Function.prototype.bindAsEventListener = function(object) {var __method = this;return function(event) {return __method.call(object, event || window.event);}
}
Object.extend(Number.prototype, {toColorPart: function() {var digits = this.toString(16);if (this < 16) return '0' + digits;return digits;},
succ: function() {return this + 1;},
times: function(iterator) {$R(0, this, true).each(iterator);return this;}
});var Try = {these: function() {var returnValue;for (var i = 0; i < arguments.length; i++) {var lambda = arguments[i];try {returnValue = lambda();break;} catch (e) {}
}
return returnValue;}
}
/*--------------------------------------------------------------------------*/
var PeriodicalExecuter = Class.create();PeriodicalExecuter.prototype = {initialize: function(callback, frequency) {this.callback = callback;this.frequency = frequency;this.currentlyExecuting = false;this.registerCallback();},
registerCallback: function() {setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);},
onTimerEvent: function() {if (!this.currentlyExecuting) {try {this.currentlyExecuting = true;this.callback();} finally {this.currentlyExecuting = false;}
}
}
}
Object.extend(String.prototype, {gsub: function(pattern, replacement) {var result = '', source = this, match;replacement = arguments.callee.prepareReplacement(replacement);while (source.length > 0) {if (match = source.match(pattern)) {result += source.slice(0, match.index);result += (replacement(match) || '').toString();source  = source.slice(match.index + match[0].length);} else {result += source, source = '';}
}
return result;},
sub: function(pattern, replacement, count) {replacement = this.gsub.prepareReplacement(replacement);count = count === undefined ? 1 : count;return this.gsub(pattern, function(match) {if (--count < 0) return match[0];return replacement(match);});},
scan: function(pattern, iterator) {this.gsub(pattern, iterator);return this;},
truncate: function(length, truncation) {length = length || 30;truncation = truncation === undefined ? '...' : truncation;return this.length > length ?
this.slice(0, length - truncation.length) + truncation : this;},
strip: function() {return this.replace(/^\s+/, '').replace(/\s+$/, '');},
stripTags: function() {return this.replace(/<\/?[^>]+>/gi, '');},
stripScripts: function() {return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');},
extractScripts: function() {var matchAll = new RegExp(Prototype.ScriptFragment, 'img');var matchOne = new RegExp(Prototype.ScriptFragment, 'im');return (this.match(matchAll) || []).map(function(scriptTag) {return (scriptTag.match(matchOne) || ['', ''])[1];});},
evalScripts: function() {return this.extractScripts().map(function(script) { return eval(script) });},
escapeHTML: function() {var div = document.createElement('div');var text = document.createTextNode(this);div.appendChild(text);return div.innerHTML;},
unescapeHTML: function() {var div = document.createElement('div');div.innerHTML = this.stripTags();return div.childNodes[0] ? div.childNodes[0].nodeValue : '';},
toQueryParams: function() {var pairs = this.match(/^\??(.*)$/)[1].split('&');return pairs.inject({}, function(params, pairString) {var pair = pairString.split('=');params[pair[0]] = pair[1];return params;});},
toArray: function() {return this.split('');},
camelize: function() {var oStringList = this.split('-');if (oStringList.length == 1) return oStringList[0];var camelizedString = this.indexOf('-') == 0
? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
: oStringList[0];for (var i = 1, len = oStringList.length; i < len; i++) {var s = oStringList[i];camelizedString += s.charAt(0).toUpperCase() + s.substring(1);}
return camelizedString;},
inspect: function() {return "'" + this.replace(/\\/g, '\\\\').replace(/'/g, '\\\'') + "'";}
});String.prototype.gsub.prepareReplacement = function(replacement) {if (typeof replacement == 'function') return replacement;var template = new Template(replacement);return function(match) { return template.evaluate(match) };}
String.prototype.parseQuery = String.prototype.toQueryParams;var Template = Class.create();Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype = {initialize: function(template, pattern) {this.template = template.toString();this.pattern  = pattern || Template.Pattern;},
evaluate: function(object) {return this.template.gsub(this.pattern, function(match) {var before = match[1];if (before == '\\') return match[2];return before + (object[match[3]] || '').toString();});}
}
var $break    = new Object();var $continue = new Object();var Enumerable = {each: function(iterator) {var index = 0;try {this._each(function(value) {try {iterator(value, index++);} catch (e) {if (e != $continue) throw e;}
});} catch (e) {if (e != $break) throw e;}
},
all: function(iterator) {var result = true;this.each(function(value, index) {result = result && !!(iterator || Prototype.K)(value, index);if (!result) throw $break;});return result;},
any: function(iterator) {var result = true;this.each(function(value, index) {if (result = !!(iterator || Prototype.K)(value, index))
throw $break;});return result;},
collect: function(iterator) {var results = [];this.each(function(value, index) {results.push(iterator(value, index));});return results;},
detect: function (iterator) {var result;this.each(function(value, index) {if (iterator(value, index)) {result = value;throw $break;}
});return result;},
findAll: function(iterator) {var results = [];this.each(function(value, index) {if (iterator(value, index))
results.push(value);});return results;},
grep: function(pattern, iterator) {var results = [];this.each(function(value, index) {var stringValue = value.toString();if (stringValue.match(pattern))
results.push((iterator || Prototype.K)(value, index));})
return results;},
include: function(object) {var found = false;this.each(function(value) {if (value == object) {found = true;throw $break;}
});return found;},
inject: function(memo, iterator) {this.each(function(value, index) {memo = iterator(memo, value, index);});return memo;},
invoke: function(method) {var args = $A(arguments).slice(1);return this.collect(function(value) {return value[method].apply(value, args);});},
max: function(iterator) {var result;this.each(function(value, index) {value = (iterator || Prototype.K)(value, index);if (result == undefined || value >= result)
result = value;});return result;},
min: function(iterator) {var result;this.each(function(value, index) {value = (iterator || Prototype.K)(value, index);if (result == undefined || value < result)
result = value;});return result;},
partition: function(iterator) {var trues = [], falses = [];this.each(function(value, index) {((iterator || Prototype.K)(value, index) ?
trues : falses).push(value);});return [trues, falses];},
pluck: function(property) {var results = [];this.each(function(value, index) {results.push(value[property]);});return results;},
reject: function(iterator) {var results = [];this.each(function(value, index) {if (!iterator(value, index))
results.push(value);});return results;},
sortBy: function(iterator) {return this.collect(function(value, index) {return {value: value, criteria: iterator(value, index)};}).sort(function(left, right) {var a = left.criteria, b = right.criteria;return a < b ? -1 : a > b ? 1 : 0;}).pluck('value');},
toArray: function() {return this.collect(Prototype.K);},
zip: function() {var iterator = Prototype.K, args = $A(arguments);if (typeof args.last() == 'function')
iterator = args.pop();var collections = [this].concat(args).map($A);return this.map(function(value, index) {return iterator(collections.pluck(index));});},
inspect: function() {return '#<Enumerable:' + this.toArray().inspect() + '>';}
}
Object.extend(Enumerable, {map:     Enumerable.collect,
find:    Enumerable.detect,
select:  Enumerable.findAll,
member:  Enumerable.include,
entries: Enumerable.toArray
});var $A = Array.from = function(iterable) {if (!iterable) return [];if (iterable.toArray) {return iterable.toArray();} else {var results = [];for (var i = 0; i < iterable.length; i++)
results.push(iterable[i]);return results;}
}
Object.extend(Array.prototype, Enumerable);if (!Array.prototype._reverse)
Array.prototype._reverse = Array.prototype.reverse;Object.extend(Array.prototype, {_each: function(iterator) {for (var i = 0; i < this.length; i++)
iterator(this[i]);},
clear: function() {this.length = 0;return this;},
first: function() {return this[0];},
last: function() {return this[this.length - 1];},
compact: function() {return this.select(function(value) {return value != undefined || value != null;});},
flatten: function() {return this.inject([], function(array, value) {return array.concat(value && value.constructor == Array ?
value.flatten() : [value]);});},
without: function() {var values = $A(arguments);return this.select(function(value) {return !values.include(value);});},
indexOf: function(object) {for (var i = 0; i < this.length; i++)
if (this[i] == object) return i;return -1;},
reverse: function(inline) {return (inline !== false ? this : this.toArray())._reverse();},
inspect: function() {return '[' + this.map(Object.inspect).join(', ') + ']';}
});var Hash = {_each: function(iterator) {for (var key in this) {var value = this[key];if (typeof value == 'function') continue;var pair = [key, value];pair.key = key;pair.value = value;iterator(pair);}
},
keys: function() {return this.pluck('key');},
values: function() {return this.pluck('value');},
merge: function(hash) {return $H(hash).inject($H(this), function(mergedHash, pair) {mergedHash[pair.key] = pair.value;return mergedHash;});},
toQueryString: function() {return this.map(function(pair) {return pair.map(encodeURIComponent).join('=');}).join('&');},
inspect: function() {return '#<Hash:{' + this.map(function(pair) {return pair.map(Object.inspect).join(': ');}).join(', ') + '}>';}
}
function $H(object) {var hash = Object.extend({}, object || {});Object.extend(hash, Enumerable);Object.extend(hash, Hash);return hash;}
ObjectRange = Class.create();Object.extend(ObjectRange.prototype, Enumerable);Object.extend(ObjectRange.prototype, {initialize: function(start, end, exclusive) {this.start = start;this.end = end;this.exclusive = exclusive;},
_each: function(iterator) {var value = this.start;do {iterator(value);value = value.succ();} while (this.include(value));},
include: function(value) {if (value < this.start)
return false;if (this.exclusive)
return value < this.end;return value <= this.end;}
});var $R = function(start, end, exclusive) {return new ObjectRange(start, end, exclusive);}
var Ajax = {getTransport: function() {return Try.these(
function() {return new XMLHttpRequest()},
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
function() {return new ActiveXObject('Microsoft.XMLHTTP')}
) || false;},
activeRequestCount: 0
}
Ajax.Responders = {responders: [],
_each: function(iterator) {this.responders._each(iterator);},
register: function(responderToAdd) {if (!this.include(responderToAdd))
this.responders.push(responderToAdd);},
unregister: function(responderToRemove) {this.responders = this.responders.without(responderToRemove);},
dispatch: function(callback, request, transport, json) {this.each(function(responder) {if (responder[callback] && typeof responder[callback] == 'function') {try {responder[callback].apply(responder, [request, transport, json]);} catch (e) {}
}
});}
};Object.extend(Ajax.Responders, Enumerable);Ajax.Responders.register({onCreate: function() {Ajax.activeRequestCount++;},
onComplete: function() {Ajax.activeRequestCount--;}
});Ajax.Base = function() {};Ajax.Base.prototype = {setOptions: function(options) {this.options = {method:       'post',
asynchronous: true,
contentType:  'application/x-www-form-urlencoded',
parameters:   ''
}
Object.extend(this.options, options || {});},
responseIsSuccess: function() {return this.transport.status == undefined
|| this.transport.status == 0
|| (this.transport.status >= 200 && this.transport.status < 300);},
responseIsFailure: function() {return !this.responseIsSuccess();}
}
Ajax.Request = Class.create();Ajax.Request.Events =
['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];Ajax.Request.prototype = Object.extend(new Ajax.Base(), {initialize: function(url, options) {this.transport = Ajax.getTransport();this.setOptions(options);this.request(url);},
request: function(url) {var parameters = this.options.parameters || '';if (parameters.length > 0) parameters += '&_=';try {this.url = url;if (this.options.method == 'get' && parameters.length > 0)
this.url += (this.url.match(/\?/) ? '&' : '?') + parameters;Ajax.Responders.dispatch('onCreate', this, this.transport);this.transport.open(this.options.method, this.url,
this.options.asynchronous);if (this.options.asynchronous) {this.transport.onreadystatechange = this.onStateChange.bind(this);setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10);}
this.setRequestHeaders();var body = this.options.postBody ? this.options.postBody : parameters;this.transport.send(this.options.method == 'post' ? body : null);} catch (e) {this.dispatchException(e);}
},
setRequestHeaders: function() {var requestHeaders =
['X-Requested-With', 'XMLHttpRequest',
'X-Prototype-Version', Prototype.Version,
'Accept', 'text/javascript, text/html, application/xml, text/xml, */*'];if (this.options.method == 'post') {requestHeaders.push('Content-type', this.options.contentType);/* Force "Connection: close" for Mozilla browsers to work around
* a bug where XMLHttpReqeuest sends an incorrect Content-length
* header. See Mozilla Bugzilla #246651.
*/
if (this.transport.overrideMimeType)
requestHeaders.push('Connection', 'close');}
if (this.options.requestHeaders)
requestHeaders.push.apply(requestHeaders, this.options.requestHeaders);for (var i = 0; i < requestHeaders.length; i += 2)
this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]);},
onStateChange: function() {var readyState = this.transport.readyState;if (readyState != 1)
this.respondToReadyState(this.transport.readyState);},
header: function(name) {try {return this.transport.getResponseHeader(name);} catch (e) {}
},
evalJSON: function() {try {return eval('(' + this.header('X-JSON') + ')');} catch (e) {}
},
evalResponse: function() {try {return eval(this.transport.responseText);} catch (e) {this.dispatchException(e);}
},
respondToReadyState: function(readyState) {var event = Ajax.Request.Events[readyState];var transport = this.transport, json = this.evalJSON();if (event == 'Complete') {try {(this.options['on' + this.transport.status]
|| this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')]
|| Prototype.emptyFunction)(transport, json);} catch (e) {this.dispatchException(e);}
if ((this.header('Content-type') || '').match(/^text\/javascript/i))
this.evalResponse();}
try {(this.options['on' + event] || Prototype.emptyFunction)(transport, json);Ajax.Responders.dispatch('on' + event, this, transport, json);} catch (e) {this.dispatchException(e);}
/* Avoid memory leak in MSIE: clean up the oncomplete event handler */
if (event == 'Complete')
this.transport.onreadystatechange = Prototype.emptyFunction;},
dispatchException: function(exception) {(this.options.onException || Prototype.emptyFunction)(this, exception);Ajax.Responders.dispatch('onException', this, exception);}
});Ajax.Updater = Class.create();Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {initialize: function(container, url, options) {this.containers = {success: container.success ? $(container.success) : $(container),
failure: container.failure ? $(container.failure) :
(container.success ? null : $(container))
}
this.transport = Ajax.getTransport();this.setOptions(options);var onComplete = this.options.onComplete || Prototype.emptyFunction;this.options.onComplete = (function(transport, object) {this.updateContent();onComplete(transport, object);}).bind(this);this.request(url);},
updateContent: function() {var receiver = this.responseIsSuccess() ?
this.containers.success : this.containers.failure;var response = this.transport.responseText;if (!this.options.evalScripts)
response = response.stripScripts();if (receiver) {if (this.options.insertion) {new this.options.insertion(receiver, response);} else {Element.update(receiver, response);}
}
if (this.responseIsSuccess()) {if (this.onComplete)
setTimeout(this.onComplete.bind(this), 10);}
}
});Ajax.PeriodicalUpdater = Class.create();Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {initialize: function(container, url, options) {this.setOptions(options);this.onComplete = this.options.onComplete;this.frequency = (this.options.frequency || 2);this.decay = (this.options.decay || 1);this.updater = {};this.container = container;this.url = url;this.start();},
start: function() {this.options.onComplete = this.updateComplete.bind(this);this.onTimerEvent();},
stop: function() {this.updater.onComplete = undefined;clearTimeout(this.timer);(this.onComplete || Prototype.emptyFunction).apply(this, arguments);},
updateComplete: function(request) {if (this.options.decay) {this.decay = (request.responseText == this.lastText ?
this.decay * this.options.decay : 1);this.lastText = request.responseText;}
this.timer = setTimeout(this.onTimerEvent.bind(this),
this.decay * this.frequency * 1000);},
onTimerEvent: function() {this.updater = new Ajax.Updater(this.container, this.url, this.options);}
});function $() {var results = [], element;for (var i = 0; i < arguments.length; i++) {element = arguments[i];if (typeof element == 'string')
element = document.getElementById(element);results.push(Element.extend(element));}
return results.length < 2 ? results[0] : results;}
document.getElementsByClassName = function(className, parentElement) {var children = ($(parentElement) || document.body).getElementsByTagName('*');return $A(children).inject([], function(elements, child) {if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
elements.push(Element.extend(child));return elements;});}
/*--------------------------------------------------------------------------*/
if (!window.Element)
var Element = new Object();Element.extend = function(element) {if (!element) return;if (_nativeExtensions) return element;if (!element._extended && element.tagName && element != window) {var methods = Element.Methods, cache = Element.extend.cache;for (property in methods) {var value = methods[property];if (typeof value == 'function')
element[property] = cache.findOrStore(value);}
}
element._extended = true;return element;}
Element.extend.cache = {findOrStore: function(value) {return this[value] = this[value] || function() {return value.apply(null, [this].concat($A(arguments)));}
}
}
Element.Methods = {visible: function(element) {return $(element).style.display != 'none';},
toggle: function() {for (var i = 0; i < arguments.length; i++) {var element = $(arguments[i]);Element[Element.visible(element) ? 'hide' : 'show'](element);}
},
hide: function() {for (var i = 0; i < arguments.length; i++) {var element = $(arguments[i]);element.style.display = 'none';}
},
show: function() {for (var i = 0; i < arguments.length; i++) {var element = $(arguments[i]);element.style.display = '';}
},
remove: function(element) {element = $(element);element.parentNode.removeChild(element);},
update: function(element, html) {$(element).innerHTML = html.stripScripts();setTimeout(function() {html.evalScripts()}, 10);},
replace: function(element, html) {element = $(element);if (element.outerHTML) {element.outerHTML = html.stripScripts();} else {var range = element.ownerDocument.createRange();range.selectNodeContents(element);element.parentNode.replaceChild(
range.createContextualFragment(html.stripScripts()), element);}
setTimeout(function() {html.evalScripts()}, 10);},
getHeight: function(element) {element = $(element);return element.offsetHeight;},
classNames: function(element) {return new Element.ClassNames(element);},
hasClassName: function(element, className) {if (!(element = $(element))) return;return Element.classNames(element).include(className);},
addClassName: function(element, className) {if (!(element = $(element))) return;return Element.classNames(element).add(className);},
removeClassName: function(element, className) {if (!(element = $(element))) return;return Element.classNames(element).remove(className);},
cleanWhitespace: function(element) {element = $(element);for (var i = 0; i < element.childNodes.length; i++) {var node = element.childNodes[i];if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
Element.remove(node);}
},
empty: function(element) {return $(element).innerHTML.match(/^\s*$/);},
childOf: function(element, ancestor) {element = $(element), ancestor = $(ancestor);while (element = element.parentNode)
if (element == ancestor) return true;return false;},
scrollTo: function(element) {element = $(element);var x = element.x ? element.x : element.offsetLeft,
y = element.y ? element.y : element.offsetTop;window.scrollTo(x, y);},
getStyle: function(element, style) {element = $(element);var value = element.style[style.camelize()];if (!value) {if (document.defaultView && document.defaultView.getComputedStyle) {var css = document.defaultView.getComputedStyle(element, null);value = css ? css.getPropertyValue(style) : null;} else if (element.currentStyle) {value = element.currentStyle[style.camelize()];}
}
if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
if (Element.getStyle(element, 'position') == 'static') value = 'auto';return value == 'auto' ? null : value;},
setStyle: function(element, style) {element = $(element);for (var name in style)
element.style[name.camelize()] = style[name];},
getDimensions: function(element) {element = $(element);if (Element.getStyle(element, 'display') != 'none')
return {width: element.offsetWidth, height: element.offsetHeight};var els = element.style;var originalVisibility = els.visibility;var originalPosition = els.position;els.visibility = 'hidden';els.position = 'absolute';els.display = '';var originalWidth = element.clientWidth;var originalHeight = element.clientHeight;els.display = 'none';els.position = originalPosition;els.visibility = originalVisibility;return {width: originalWidth, height: originalHeight};},
makePositioned: function(element) {element = $(element);var pos = Element.getStyle(element, 'position');if (pos == 'static' || !pos) {element._madePositioned = true;element.style.position = 'relative';if (window.opera) {element.style.top = 0;element.style.left = 0;}
}
},
undoPositioned: function(element) {element = $(element);if (element._madePositioned) {element._madePositioned = undefined;element.style.position =
element.style.top =
element.style.left =
element.style.bottom =
element.style.right = '';}
},
makeClipping: function(element) {element = $(element);if (element._overflow) return;element._overflow = element.style.overflow;if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
element.style.overflow = 'hidden';},
undoClipping: function(element) {element = $(element);if (element._overflow) return;element.style.overflow = element._overflow;element._overflow = undefined;}
}
Object.extend(Element, Element.Methods);var _nativeExtensions = false;if(!HTMLElement && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) {var HTMLElement = {}
HTMLElement.prototype = document.createElement('div').__proto__;}
Element.addMethods = function(methods) {Object.extend(Element.Methods, methods || {});if(typeof HTMLElement != 'undefined') {var methods = Element.Methods, cache = Element.extend.cache;for (property in methods) {var value = methods[property];if (typeof value == 'function')
HTMLElement.prototype[property] = cache.findOrStore(value);}
_nativeExtensions = true;}
}
Element.addMethods();var Toggle = new Object();Toggle.display = Element.toggle;/*--------------------------------------------------------------------------*/
Abstract.Insertion = function(adjacency) {this.adjacency = adjacency;}
Abstract.Insertion.prototype = {initialize: function(element, content) {this.element = $(element);this.content = content.stripScripts();if (this.adjacency && this.element.insertAdjacentHTML) {try {this.element.insertAdjacentHTML(this.adjacency, this.content);} catch (e) {var tagName = this.element.tagName.toLowerCase();if (tagName == 'tbody' || tagName == 'tr') {this.insertContent(this.contentFromAnonymousTable());} else {throw e;}
}
} else {this.range = this.element.ownerDocument.createRange();if (this.initializeRange) this.initializeRange();this.insertContent([this.range.createContextualFragment(this.content)]);}
setTimeout(function() {content.evalScripts()}, 10);},
contentFromAnonymousTable: function() {var div = document.createElement('div');div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';return $A(div.childNodes[0].childNodes[0].childNodes);}
}
var Insertion = new Object();Insertion.Before = Class.create();Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {initializeRange: function() {this.range.setStartBefore(this.element);},
insertContent: function(fragments) {fragments.each((function(fragment) {this.element.parentNode.insertBefore(fragment, this.element);}).bind(this));}
});Insertion.Top = Class.create();Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {initializeRange: function() {this.range.selectNodeContents(this.element);this.range.collapse(true);},
insertContent: function(fragments) {fragments.reverse(false).each((function(fragment) {this.element.insertBefore(fragment, this.element.firstChild);}).bind(this));}
});Insertion.Bottom = Class.create();Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {initializeRange: function() {this.range.selectNodeContents(this.element);this.range.collapse(this.element);},
insertContent: function(fragments) {fragments.each((function(fragment) {this.element.appendChild(fragment);}).bind(this));}
});Insertion.After = Class.create();Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {initializeRange: function() {this.range.setStartAfter(this.element);},
insertContent: function(fragments) {fragments.each((function(fragment) {this.element.parentNode.insertBefore(fragment,
this.element.nextSibling);}).bind(this));}
});/*--------------------------------------------------------------------------*/
Element.ClassNames = Class.create();Element.ClassNames.prototype = {initialize: function(element) {this.element = $(element);},
_each: function(iterator) {this.element.className.split(/\s+/).select(function(name) {return name.length > 0;})._each(iterator);},
set: function(className) {this.element.className = className;},
add: function(classNameToAdd) {if (this.include(classNameToAdd)) return;this.set(this.toArray().concat(classNameToAdd).join(' '));},
remove: function(classNameToRemove) {if (!this.include(classNameToRemove)) return;this.set(this.select(function(className) {return className != classNameToRemove;}).join(' '));},
toString: function() {return this.toArray().join(' ');}
}
Object.extend(Element.ClassNames.prototype, Enumerable);var Selector = Class.create();Selector.prototype = {initialize: function(expression) {this.params = {classNames: []};this.expression = expression.toString().strip();this.parseExpression();this.compileMatcher();},
parseExpression: function() {function abort(message) { throw 'Parse error in selector: ' + message; }
if (this.expression == '')  abort('empty expression');var params = this.params, expr = this.expression, match, modifier, clause, rest;while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) {params.attributes = params.attributes || [];params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''});expr = match[1];}
if (expr == '*') return this.params.wildcard = true;while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) {modifier = match[1], clause = match[2], rest = match[3];switch (modifier) {case '#':       params.id = clause; break;case '.':       params.classNames.push(clause); break;case '':
case undefined: params.tagName = clause.toUpperCase(); break;default:        abort(expr.inspect());}
expr = rest;}
if (expr.length > 0) abort(expr.inspect());},
buildMatchExpression: function() {var params = this.params, conditions = [], clause;if (params.wildcard)
conditions.push('true');if (clause = params.id)
conditions.push('element.id == ' + clause.inspect());if (clause = params.tagName)
conditions.push('element.tagName.toUpperCase() == ' + clause.inspect());if ((clause = params.classNames).length > 0)
for (var i = 0; i < clause.length; i++)
conditions.push('Element.hasClassName(element, ' + clause[i].inspect() + ')');if (clause = params.attributes) {clause.each(function(attribute) {var value = 'element.getAttribute(' + attribute.name.inspect() + ')';var splitValueBy = function(delimiter) {return value + ' && ' + value + '.split(' + delimiter.inspect() + ')';}
switch (attribute.operator) {case '=':       conditions.push(value + ' == ' + attribute.value.inspect()); break;case '~=':      conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break;case '|=':      conditions.push(
splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect()
); break;case '!=':      conditions.push(value + ' != ' + attribute.value.inspect()); break;case '':
case undefined: conditions.push(value + ' != null'); break;default:        throw 'Unknown operator ' + attribute.operator + ' in selector';}
});}
return conditions.join(' && ');},
compileMatcher: function() {this.match = new Function('element', 'if (!element.tagName) return false; \
return ' + this.buildMatchExpression());},
findElements: function(scope) {var element;if (element = $(this.params.id))
if (this.match(element))
if (!scope || Element.childOf(element, scope))
return [element];scope = (scope || document).getElementsByTagName(this.params.tagName || '*');var results = [];for (var i = 0; i < scope.length; i++)
if (this.match(element = scope[i]))
results.push(Element.extend(element));return results;},
toString: function() {return this.expression;}
}
function $$() {return $A(arguments).map(function(expression) {return expression.strip().split(/\s+/).inject([null], function(results, expr) {var selector = new Selector(expr);return results.map(selector.findElements.bind(selector)).flatten();});}).flatten();}
var Field = {clear: function() {for (var i = 0; i < arguments.length; i++)
$(arguments[i]).value = '';},
focus: function(element) {$(element).focus();},
present: function() {for (var i = 0; i < arguments.length; i++)
if ($(arguments[i]).value == '') return false;return true;},
select: function(element) {$(element).select();},
activate: function(element) {element = $(element);element.focus();if (element.select)
element.select();}
}
/*--------------------------------------------------------------------------*/
var Form = {serialize: function(form) {var elements = Form.getElements($(form));var queryComponents = new Array();for (var i = 0; i < elements.length; i++) {var queryComponent = Form.Element.serialize(elements[i]);if (queryComponent)
queryComponents.push(queryComponent);}
return queryComponents.join('&');},
getElements: function(form) {form = $(form);var elements = new Array();for (var tagName in Form.Element.Serializers) {var tagElements = form.getElementsByTagName(tagName);for (var j = 0; j < tagElements.length; j++)
elements.push(tagElements[j]);}
return elements;},
getInputs: function(form, typeName, name) {form = $(form);var inputs = form.getElementsByTagName('input');if (!typeName && !name)
return inputs;var matchingInputs = new Array();for (var i = 0; i < inputs.length; i++) {var input = inputs[i];if ((typeName && input.type != typeName) ||
(name && input.name != name))
continue;matchingInputs.push(input);}
return matchingInputs;},
disable: function(form) {var elements = Form.getElements(form);for (var i = 0; i < elements.length; i++) {var element = elements[i];element.blur();element.disabled = 'true';}
},
enable: function(form) {var elements = Form.getElements(form);for (var i = 0; i < elements.length; i++) {var element = elements[i];element.disabled = '';}
},
findFirstElement: function(form) {return Form.getElements(form).find(function(element) {return element.type != 'hidden' && !element.disabled &&
['input', 'select', 'textarea'].include(element.tagName.toLowerCase());});},
focusFirstElement: function(form) {Field.activate(Form.findFirstElement(form));},
reset: function(form) {$(form).reset();}
}
Form.Element = {serialize: function(element) {element = $(element);var method = element.tagName.toLowerCase();var parameter = Form.Element.Serializers[method](element);if (parameter) {var key = encodeURIComponent(parameter[0]);if (key.length == 0) return;if (parameter[1].constructor != Array)
parameter[1] = [parameter[1]];return parameter[1].map(function(value) {return key + '=' + encodeURIComponent(value);}).join('&');}
},
getValue: function(element) {element = $(element);var method = element.tagName.toLowerCase();var parameter = Form.Element.Serializers[method](element);if (parameter)
return parameter[1];}
}
Form.Element.Serializers = {input: function(element) {switch (element.type.toLowerCase()) {case 'submit':
case 'hidden':
case 'password':
case 'text':
return Form.Element.Serializers.textarea(element);case 'checkbox':
case 'radio':
return Form.Element.Serializers.inputSelector(element);}
return false;},
inputSelector: function(element) {if (element.checked)
return [element.name, element.value];},
textarea: function(element) {return [element.name, element.value];},
select: function(element) {return Form.Element.Serializers[element.type == 'select-one' ?
'selectOne' : 'selectMany'](element);},
selectOne: function(element) {var value = '', opt, index = element.selectedIndex;if (index >= 0) {opt = element.options[index];value = opt.value || opt.text;}
return [element.name, value];},
selectMany: function(element) {var value = [];for (var i = 0; i < element.length; i++) {var opt = element.options[i];if (opt.selected)
value.push(opt.value || opt.text);}
return [element.name, value];}
}
/*--------------------------------------------------------------------------*/
var $F = Form.Element.getValue;/*--------------------------------------------------------------------------*/
Abstract.TimedObserver = function() {}
Abstract.TimedObserver.prototype = {initialize: function(element, frequency, callback) {this.frequency = frequency;this.element   = $(element);this.callback  = callback;this.lastValue = this.getValue();this.registerCallback();},
registerCallback: function() {setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);},
onTimerEvent: function() {var value = this.getValue();if (this.lastValue != value) {this.callback(this.element, value);this.lastValue = value;}
}
}
Form.Element.Observer = Class.create();Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {getValue: function() {return Form.Element.getValue(this.element);}
});Form.Observer = Class.create();Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {getValue: function() {return Form.serialize(this.element);}
});/*--------------------------------------------------------------------------*/
Abstract.EventObserver = function() {}
Abstract.EventObserver.prototype = {initialize: function(element, callback) {this.element  = $(element);this.callback = callback;this.lastValue = this.getValue();if (this.element.tagName.toLowerCase() == 'form')
this.registerFormCallbacks();else
this.registerCallback(this.element);},
onElementEvent: function() {var value = this.getValue();if (this.lastValue != value) {this.callback(this.element, value);this.lastValue = value;}
},
registerFormCallbacks: function() {var elements = Form.getElements(this.element);for (var i = 0; i < elements.length; i++)
this.registerCallback(elements[i]);},
registerCallback: function(element) {if (element.type) {switch (element.type.toLowerCase()) {case 'checkbox':
case 'radio':
Event.observe(element, 'click', this.onElementEvent.bind(this));break;case 'password':
case 'text':
case 'textarea':
case 'select-one':
case 'select-multiple':
Event.observe(element, 'change', this.onElementEvent.bind(this));break;}
}
}
}
Form.Element.EventObserver = Class.create();Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {getValue: function() {return Form.Element.getValue(this.element);}
});Form.EventObserver = Class.create();Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {getValue: function() {return Form.serialize(this.element);}
});if (!window.Event) {var Event = new Object();}
Object.extend(Event, {KEY_BACKSPACE: 8,
KEY_TAB:       9,
KEY_RETURN:   13,
KEY_ESC:      27,
KEY_LEFT:     37,
KEY_UP:       38,
KEY_RIGHT:    39,
KEY_DOWN:     40,
KEY_DELETE:   46,
element: function(event) {return event.target || event.srcElement;},
isLeftClick: function(event) {return (((event.which) && (event.which == 1)) ||
((event.button) && (event.button == 1)));},
pointerX: function(event) {return event.pageX || (event.clientX +
(document.documentElement.scrollLeft || document.body.scrollLeft));},
pointerY: function(event) {return event.pageY || (event.clientY +
(document.documentElement.scrollTop || document.body.scrollTop));},
stop: function(event) {if (event.preventDefault) {event.preventDefault();event.stopPropagation();} else {event.returnValue = false;event.cancelBubble = true;}
},
findElement: function(event, tagName) {var element = Event.element(event);while (element.parentNode && (!element.tagName ||
(element.tagName.toUpperCase() != tagName.toUpperCase())))
element = element.parentNode;return element;},
observers: false,
_observeAndCache: function(element, name, observer, useCapture) {if (!this.observers) this.observers = [];if (element.addEventListener) {this.observers.push([element, name, observer, useCapture]);element.addEventListener(name, observer, useCapture);} else if (element.attachEvent) {this.observers.push([element, name, observer, useCapture]);element.attachEvent('on' + name, observer);}
},
unloadCache: function() {if (!Event.observers) return;for (var i = 0; i < Event.observers.length; i++) {Event.stopObserving.apply(this, Event.observers[i]);Event.observers[i][0] = null;}
Event.observers = false;},
observe: function(element, name, observer, useCapture) {var element = $(element);useCapture = useCapture || false;if (name == 'keypress' &&
(navigator.appVersion.match(/Konqueror|Safari|KHTML/)
|| element.attachEvent))
name = 'keydown';this._observeAndCache(element, name, observer, useCapture);},
stopObserving: function(element, name, observer, useCapture) {var element = $(element);useCapture = useCapture || false;if (name == 'keypress' &&
(navigator.appVersion.match(/Konqueror|Safari|KHTML/)
|| element.detachEvent))
name = 'keydown';if (element.removeEventListener) {element.removeEventListener(name, observer, useCapture);} else if (element.detachEvent) {element.detachEvent('on' + name, observer);}
}
});/* prevent memory leaks in IE */
if (navigator.appVersion.match(/\bMSIE\b/))
Event.observe(window, 'unload', Event.unloadCache, false);var Position = {includeScrollOffsets: false,
prepare: function() {this.deltaX =  window.pageXOffset
|| document.documentElement.scrollLeft
|| document.body.scrollLeft
|| 0;this.deltaY =  window.pageYOffset
|| document.documentElement.scrollTop
|| document.body.scrollTop
|| 0;},
realOffset: function(element) {var valueT = 0, valueL = 0;do {valueT += element.scrollTop  || 0;valueL += element.scrollLeft || 0;element = element.parentNode;} while (element);return [valueL, valueT];},
cumulativeOffset: function(element) {var valueT = 0, valueL = 0;do {valueT += element.offsetTop  || 0;valueL += element.offsetLeft || 0;element = element.offsetParent;} while (element);return [valueL, valueT];},
positionedOffset: function(element) {var valueT = 0, valueL = 0;do {valueT += element.offsetTop  || 0;valueL += element.offsetLeft || 0;element = element.offsetParent;if (element) {p = Element.getStyle(element, 'position');if (p == 'relative' || p == 'absolute') break;}
} while (element);return [valueL, valueT];},
offsetParent: function(element) {if (element.offsetParent) return element.offsetParent;if (element == document.body) return element;while ((element = element.parentNode) && element != document.body)
if (Element.getStyle(element, 'position') != 'static')
return element;return document.body;},
within: function(element, x, y) {if (this.includeScrollOffsets)
return this.withinIncludingScrolloffsets(element, x, y);this.xcomp = x;this.ycomp = y;this.offset = this.cumulativeOffset(element);return (y >= this.offset[1] &&
y <  this.offset[1] + element.offsetHeight &&
x >= this.offset[0] &&
x <  this.offset[0] + element.offsetWidth);},
withinIncludingScrolloffsets: function(element, x, y) {var offsetcache = this.realOffset(element);this.xcomp = x + offsetcache[0] - this.deltaX;this.ycomp = y + offsetcache[1] - this.deltaY;this.offset = this.cumulativeOffset(element);return (this.ycomp >= this.offset[1] &&
this.ycomp <  this.offset[1] + element.offsetHeight &&
this.xcomp >= this.offset[0] &&
this.xcomp <  this.offset[0] + element.offsetWidth);},
overlap: function(mode, element) {if (!mode) return 0;if (mode == 'vertical')
return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
element.offsetHeight;if (mode == 'horizontal')
return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
element.offsetWidth;},
clone: function(source, target) {source = $(source);target = $(target);target.style.position = 'absolute';var offsets = this.cumulativeOffset(source);target.style.top    = offsets[1] + 'px';target.style.left   = offsets[0] + 'px';target.style.width  = source.offsetWidth + 'px';target.style.height = source.offsetHeight + 'px';},
page: function(forElement) {var valueT = 0, valueL = 0;var element = forElement;do {valueT += element.offsetTop  || 0;valueL += element.offsetLeft || 0;if (element.offsetParent==document.body)
if (Element.getStyle(element,'position')=='absolute') break;} while (element = element.offsetParent);element = forElement;do {valueT -= element.scrollTop  || 0;valueL -= element.scrollLeft || 0;} while (element = element.parentNode);return [valueL, valueT];},
clone: function(source, target) {var options = Object.extend({setLeft:    true,
setTop:     true,
setWidth:   true,
setHeight:  true,
offsetTop:  0,
offsetLeft: 0
}, arguments[2] || {})
source = $(source);var p = Position.page(source);target = $(target);var delta = [0, 0];var parent = null;if (Element.getStyle(target,'position') == 'absolute') {parent = Position.offsetParent(target);delta = Position.page(parent);}
if (parent == document.body) {delta[0] -= document.body.offsetLeft;delta[1] -= document.body.offsetTop;}
if(options.setLeft)   target.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';if(options.setTop)    target.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';if(options.setWidth)  target.style.width = source.offsetWidth + 'px';if(options.setHeight) target.style.height = source.offsetHeight + 'px';},
absolutize: function(element) {element = $(element);if (element.style.position == 'absolute') return;Position.prepare();var offsets = Position.positionedOffset(element);var top     = offsets[1];var left    = offsets[0];var width   = element.clientWidth;var height  = element.clientHeight;element._originalLeft   = left - parseFloat(element.style.left  || 0);element._originalTop    = top  - parseFloat(element.style.top || 0);element._originalWidth  = element.style.width;element._originalHeight = element.style.height;element.style.position = 'absolute';element.style.top    = top + 'px';;element.style.left   = left + 'px';;element.style.width  = width + 'px';;element.style.height = height + 'px';;},
relativize: function(element) {element = $(element);if (element.style.position == 'relative') return;Position.prepare();element.style.position = 'relative';var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);element.style.top    = top + 'px';element.style.left   = left + 'px';element.style.height = element._originalHeight;element.style.width  = element._originalWidth;}
}
if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {Position.cumulativeOffset = function(element) {var valueT = 0, valueL = 0;do {valueT += element.offsetTop  || 0;valueL += element.offsetLeft || 0;if (element.offsetParent == document.body)
if (Element.getStyle(element, 'position') == 'absolute') break;element = element.offsetParent;} while (element);return [valueL, valueT];}
}


var AjaxVote = Class.create();AjaxVote.prototype = {initialize: function(url, prefix, length, image_on, image_off) {this.url = url;this.prefix = prefix;this.rating_text = prefix+"_text";this.length = length;this.image_on = image_on;this.image_off = image_off;this.image_bar = new Array();this.cancel_mouseout = new Array();},
setSource: function(dest,url) {var s = url;var d = $(dest);var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);if ((s.match(/.png/i) != null) && itsAllGood) {d.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+s+"', sizingMethod='scale')";d.style.height = "13px";d.style.width = "13px";d.src = '/modules/themes/rtv-v3/images/pixel.gif';return;}
d.src = s;},
over: function(post, image, orig) {if (this.image_bar[post]==null) {this.image_bar[post] = orig;}
this.cancel_mouseout[post] = true;if (this.image_bar[post]==0) {var i;for (i=1;i<=this.length;i++) {if (i<=image) {this.setSource(this.prefix+post+i, this.image_on);} else {this.setSource(this.prefix+post+i, this.image_off);}
}
}
},
out: function(post) {this.cancel_mouseout[post] = false;setTimeout( (function() { this.render(post); }).bind(this), 500);},
click: function(post, clicked) {if (this.image_bar[post] == clicked) {clicked = 0;}
this.cancel_mouseout[post] = false;this.image_bar[post] = clicked;this.render(post);var pars = '&id='+post+'&data='+clicked;var myAjax = new Ajax.Request(this.url, {method: 'post', parameters: pars, onComplete: this.response.bind(this)});},
render: function(post) {var i;if (this.cancel_mouseout[post]) {return;}
for (i=1;i<=this.length;i++) {if (i<=this.image_bar[post]) {this.setSource(this.prefix+post+i, this.image_on);} else {this.setSource(this.prefix+post+i, this.image_off);}
}
this.cancel_mouseout[post] = true;},
response: function(req) {$(this.rating_text).innerHTML = req.responseText;}
}


/*
* (c) Copyright 2006, Klika, all rights reserved.
*
* This code is the property of Klika d.o.o. The code
* may not be included in, invoked from, or otherwise
* used in any software, service, device, or process
* which is sold, exchanged for profit, or for which
* a license, subscription, or royalty fee is charged.
*
* Permission is granted to use this code for personal,
* educational, research, or commercial purposes, provided
* this notice is included, and provided this code is not
* used as described in the above paragraph.
*
* This code may not be modified without express
* permission of Klika. You may not delete, disable, or in
* any manner alter distinctive brand features rendered
* by the code. The use of this code in derivative work is
* permitted, provided that the code and this notice are
* included in full, and provided that the code is used in
* accordance with these terms.
*
* Email: info at triptracker.net
* Web:   http://slideshow.triptracker.net
*/
var MESSAGES = {"format.date":                     "MM/dd/yyyy",
"format.time":                     "h:mm a",
"photoviewer.toolbar.first":       "Go to Start (Home)",
"photoviewer.toolbar.prev":        "Previous Photo (Left arrow)",
"photoviewer.toolbar.slideShow":   "Start/Pause Slide Show (Space)",
"photoviewer.toolbar.next":        "Next Photo (Right arrow)",
"photoviewer.toolbar.last":        "Go to End (End)",
"photoviewer.toolbar.email":       "Email Photo",
"photoviewer.toolbar.permalink":   "Link to Photo",
"photoviewer.toolbar.close":       "Close (Esc)",
"photoviewer.email.subject.photo": "Photo",
"gallery.nophotos":                "No photos",
"gallery.thumbs.start":            "Start",
"gallery.thumbs.end":              "End",
"gallery.toolbar.first":           "First Photo",
"gallery.toolbar.prev":            "Previous Photo",
"gallery.toolbar.view":            "View Photo",
"gallery.toolbar.next":            "Next Photo",
"gallery.toolbar.last":            "Last Photo",
"gallery.view.full":               "Maximize Window",
"gallery.view.photo":              "Show Photo Only",
"gallery.view.text":               "Show Description Only",
"gallery.view.close":              "Close Window"
};var agent=navigator.userAgent.toLowerCase();var IE=(agent.indexOf("msie")!=-1&&agent.indexOf("opera")==-1);var IE7=(agent.indexOf("msie 7")!=-1);var OPERA=(agent.indexOf("opera")!=-1);var SAFARI=(agent.indexOf("safari")!=-1);var FIREFOX=(agent.indexOf("gecko")!=-1);var STRICT_MODE=(document.compatMode=="CSS1Compat");var _DOMAIN=undefined;var GALLERY_W=650;var GALLERY_H=530;if(USE_GOOGLE_MAPS==undefined){var USE_GOOGLE_MAPS=true;}
var USE_OLD_MAPS=!USE_GOOGLE_MAPS;var TESTING=false;var log=getLogger();if(document.location.href.indexOf("#jslog")!=-1)
log.enable();function Logger(){this.enable=loggerEnable;this.clear=loggerClear;this.log=loggerLog;this.debug=loggerDebug;this.info=loggerInfo;this.error=loggerError;var console=undefined;try{console=document.createElement("textarea");console.style.display="none";console.style.position="absolute";console.style.right="2px";console.style.bottom="2px";console.style.width="23em";console.style.height="40em";console.style.fontFamily="monospace";console.style.fontSize="9px";console.style.color="#000000";setOpacity(console,0.7);console.border="1px solid #808080";console.ondblclick=clearLogger;}catch(e){}
this.console=console;this.enabled=false;this.logTimeStart=getTimeMillis();}
function getLogger(){var log=undefined;var win=window;while(log==undefined){try{log=win.document.log;}catch(e){break;}
if(win==win.parent)
break;win=win.parent;}
if(log==undefined){log=new Logger();document.log=log;}
return log;}
function clearLogger(){getLogger().clear();}
function loggerEnable(){if(this.enabled||this.console==undefined)
return;if(window.document.body!=undefined){window.document.body.appendChild(this.console);this.console.style.display="";this.enabled=true;}}
function loggerDebug(msg){this.log("DEBUG",msg);}
function loggerInfo(msg){this.log("INFO",msg);}
function loggerError(msg,e){this.log("ERROR",msg,e);}
function loggerLog(level,msg,e){if(!this.enabled||this.console==undefined)
return;var millis=(getTimeMillis()-this.logTimeStart)+"";while(millis.length<6)
millis+=" ";var m=millis+" ";if(msg!=undefined)
m+=msg+" ";if(e!=undefined)
m+=e.name+": "+e.message;this.console.value+=m+"\n";}
function loggerClear(){if(!this.enabled||this.console==undefined)
return;this.console.value="";}
function getTimeMillis(){var t=new Date();return Date.UTC(t.getFullYear(),t.getMonth(),t.getDay(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());}
function getEvent(event){return(event!=undefined?event:window.event);}
function preventDefault(event){if(event.preventDefault){event.preventDefault();event.stopPropagation();}else{event.returnValue=false;event.cancelBubble=true;}}
function getEventTarget(event){if(event==undefined)
return undefined;if(event.srcElement!=undefined)
return event.srcElement;else
return event.target;}
function getResponse(url,async,getXML,callback,data){var req=undefined;try{req=new ActiveXObject("Msxml2.XMLHTTP");}catch(e1){try{req=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){req=new XMLHttpRequest();}}
if(req==undefined){log.error("Failed to initialize XML/HTTP");return undefined;}
req.open("GET",url,async);if(!async){req.send(undefined);if(req.readyState!=4){log.error("Request failed: "+req.readyState);return undefined;}
if(!getXML)
return req.responseText;else
return req.responseXML;}else{pollResponse(req,callback,data);req.send(undefined);return undefined;}}
function pollResponse(req,callback,data){if(req.readyState!=4)
window.setTimeout(function(){pollResponse(req,callback,data);},100);else
callback(req,data);}
function getElementsByTagName(node,tag){if(node==undefined)
return undefined;if(IE){return node.getElementsByTagName(tag);}
if(tag.indexOf(":")!=-1){tag=tag.split(":")[1];}
return node.getElementsByTagNameNS("*",tag);}
function getFirstElementsValue(node,tag){if(node==undefined)
return undefined;var nodes=getElementsByTagName(node,tag);if(nodes.length===0)
return undefined;else
return getElementValue(nodes[0]);}
function findDOMElement(id){var el=undefined;var win=window;while(el==undefined){try{el=win.document.getElementById(id);}catch(e){break;}
if(win===win.parent){break;}
win=win.parent;}
return el;}
function getElementValue(node){var i;var val="";for(i=0;i<node.childNodes.length;i++){if(node.childNodes[i].nodeValue!==null)
val+=node.childNodes[i].nodeValue;}
return val;}
function trim(str){if(str==undefined)
return undefined;return str.replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/,'$1');}
function trimToLen(str,len){if(str==undefined){return undefined;}
if(str.length>len){str=str.substring(0,len)+"...";}
return str;}
function getRootWindow(){var win=window;while(win!=undefined){try{if(win===win.parent){break;}else if(win.parent!=undefined&&win.parent.document.location.href.indexOf("/selenium-server/")!=-1){break;}
win=win.parent;}catch(e){win.permissionDenied=true;break;}}
return win;}
function getURLParams(){var i,params=[];var url=window.location.search;if(url==undefined||url.length===0)
return undefined;url=url.substring(1);var namevals=url.replace(/\+/g," ").split("&");for(i=0;i<namevals.length;i++){var name,val;var pos=namevals[i].indexOf("=");if(pos!=-1){name=namevals[i].substring(0,pos);val=unescape(namevals[i].substring(pos+1));}else{name=namevals[i];val=undefined;}
params[name]=val;}
return params;}
function joinLists(list1,list2){var i;var size=0;var result=[];if(list1!=undefined&&list1.length>0){for(i=0;i<list1.length;i++)
result[i]=list1[i];size=list1.length;}
if(list2!=undefined&&list2.length>0){for(i=0;i<list2.length;i++)
result[i+size]=list2[i];}
return result;}
function setCookie(name,value,expire){var expiry=(expire==undefined)?"":("; expires="+expire.toGMTString());document.cookie=name+"="+value+expiry;}
function getCookie(name){if(document.cookie==undefined||document.cookie.length===0)
return undefined;var search=name+"=";var index=document.cookie.indexOf(search);if(index!=-1){index+=search.length;var end=document.cookie.indexOf(";",index);if(end==-1)
end=document.cookie.length;return unescape(document.cookie.substring(index,end));}}
function removeCookie(name){var today=new Date();var expires=new Date();expires.setTime(today.getTime()-1);setCookie(name,"",expires);}
function getMessage(id){if(MESSAGES[id]==undefined){return"("+id+")";}else{return MESSAGES[id];}}
function localizeNodeAttribs(node){var i;if(node==undefined)
return;if(node.alt!=undefined&&node.alt.indexOf("#")===0){node.alt=getMessage(node.alt.substring(1));}
if(node.title!=undefined&&node.title.indexOf("#")===0){node.title=getMessage(node.title.substring(1));}
if(node.childNodes!=undefined){for(i=0;i<node.childNodes.length;i++){localizeNodeAttribs(node.childNodes[i]);}}}
function padNumber(n,pad){n=n+"";while(n.length<pad){n="0"+n;}
return n;}
function isArray(obj){if(obj instanceof Array)
return true;else
return false;}
function simpleDateFormatter(date,pattern){var d=pattern;d=d.replace(/yyyy/g,date.getFullYear());d=d.replace(/yy/g,padNumber(date.getFullYear()%100,2));d=d.replace(/MM/g,padNumber(date.getMonth()+1,2));d=d.replace(/M/g,date.getMonth()+1);d=d.replace(/dd/g,padNumber(date.getDate(),2));d=d.replace(/d/g,date.getDate());d=d.replace(/HH/g,padNumber(date.getHours(),2));d=d.replace(/H/g,date.getHours());d=d.replace(/hh/g,padNumber(date.getHours()%12,2));d=d.replace(/h/g,date.getHours()%12);d=d.replace(/mm/g,padNumber(date.getMinutes(),2));d=d.replace(/m/g,date.getMinutes());d=d.replace(/ss/g,padNumber(date.getSeconds(),2));d=d.replace(/s/g,date.getSeconds());var am=(date.getHours()<12?"AM":"PM");d=d.replace(/a/g,am);return d;}
function formatDateTime(date){if(date==undefined)
return undefined;return formatDate(date)+" "+formatTime(date);}
function formatDate(date){var datePattern=getMessage("format.date");return simpleDateFormatter(date,datePattern);}
function formatTime(date){var timePattern=getMessage("format.time");return simpleDateFormatter(date,timePattern);}
function parseISOTime(strTime){if(strTime==undefined)
return undefined;var isoRE=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(\.\d{3})?([Z+-])?(\d\d)?:?(\d\d)?$/;if(!isoRE.test(strTime)){return undefined;}else{return new Date(RegExp.$1,RegExp.$2-1,RegExp.$3,RegExp.$4,RegExp.$5,RegExp.$6);}}
function setOpacity(elt,opacity){if(IE){elt.style.filter="alpha(opacity="+parseInt(opacity*100)+")";}
elt.style.KhtmlOpacity=opacity;elt.style.opacity=opacity;}
function validCoordinates(lat,lon){if(Math.abs(lat)>90||Math.abs(lon)>180){return false;}
if(lat===0.0&&lon===0.0){return false;}
return true;}
function isHosted(){var host=document.location.host;if(host==undefined)
host="";return((host.indexOf("triptracker.net")==-1||host.indexOf("slideshow.triptracker.net")!=-1)&&host.indexOf("rtvslo.si")==-1&&!checkDomain());}
function checkDomain(){try{if(_DOMAIN==undefined)
return false;var protocol=document.location.protocol;if(protocol==undefined)
protocol="http:";var host=document.location.host;if(host==undefined)
host="";host=host.toLowerCase();if(protocol.toLowerCase().indexOf("file")===0){return true;}
var pos=host.lastIndexOf(":");if(pos!=-1){host=host.substring(0,pos);}
if(host.indexOf("www.")===0){host=host.substring(4);}
if(host===""||host=="localhost"||host=="127.0.0.1")
return true;var domain=_DOMAIN.toLowerCase();pos=domain.indexOf("://");if(pos!=-1){domain=domain.substring(pos+3);}
pos=domain.indexOf("/");if(pos!=-1){domain=domain.substring(0,pos);}
if(domain.indexOf("www.")===0){domain=domain.substring(4);}
if(host==domain){return true;}else if(new RegExp(domain).test(host)){return true;}
return false;}catch(e){return true;}}
function getWindowSize(win){var availW=win.innerWidth;if(availW==undefined||availW===0||isNaN(availW))
availW=win.document.documentElement.clientWidth;if(availW==undefined||availW===0||isNaN(availW))
availW=win.document.body.clientWidth;var availH=win.innerHeight;if(availH==undefined||availH===0||isNaN(availH))
availH=win.document.documentElement.clientHeight;if(availH==undefined||availH===0||isNaN(availH))
availH=win.document.body.clientHeight;return{w:availW,h:availH};}
function getDocumentSize(win){var winSize=getWindowSize(win);var scrollPos=getScrollPos(win);var w=winSize.w+scrollPos.left;var h=winSize.h+scrollPos.top;w=Math.max(w,win.document.body.offsetWidth);h=Math.max(h,win.document.body.offsetHeight);w=Math.max(w,win.document.body.scrollWidth);h=Math.max(h,win.document.body.scrollHeight);return{w:w,h:h};}
function getScrollPos(win){var scrollTop=win.pageYOffset;if(scrollTop==undefined||scrollTop===0)
scrollTop=win.document.documentElement.scrollTop;if(scrollTop==undefined||scrollTop===0)
scrollTop=win.document.body.scrollTop;var scrollLeft=win.pageXOffset;if(scrollLeft==undefined||scrollLeft===0)
scrollLeft=win.document.documentElement.scrollLeft;if(scrollLeft==undefined||scrollLeft===0)
scrollLeft=win.document.body.scrollLeft;return{top:scrollTop,left:scrollLeft};}
var CLEAR_EVENTS=["onclick","ondblclick","onkeydown","onkeypress","onmousedown","onmouseup","onmousemove","onmouseover","onmouseout","onmousewheeldown","oncontextmenu"];function clearEvents(){var i,j;var count=0;if(document.all==undefined)
return;for(i=0;i<document.all.length;i++){for(j=0;j<CLEAR_EVENTS.length;j++){var event=document.all[i][CLEAR_EVENTS[j]];if(event!=undefined){document.all[i][CLEAR_EVENTS[j]]=null;count++;}}}}
if(window.attachEvent)
window.attachEvent("onunload",clearEvents);function getGallery(){var gallery=undefined;var win=window;while(gallery==undefined){try{gallery=win.document.gallery;}catch(e){break;}
var tmpWin=win;win=win.parent;if(tmpWin===win){break;}}
return gallery;}
function getMap(){if(this.map!=undefined)
return this.map;try{if(document.map!=undefined)
return document.map;}catch(e){}
try{if(window.parent.document.map!=undefined)
return window.parent.document.map;}catch(e){}
return undefined;}
function viewerCloseCallback(photoIndex){var i,j,n=0;var gallery=getGallery();for(i=0;i<gallery.sets.length;i++){for(j=0;j<gallery.sets[i].photos.length;j++){var p=gallery.sets[i].photos[j];if(p==undefined||p.orig==undefined||p.orig.src==undefined)
continue;if(n==photoIndex){gallery.setIndex=i;gallery.photoIndex=j;gallery.renderPhotos();gallery.win.focus();return;}
n++;}}}
var VIEWER_INDEX=0;var SLIDE_DURATION=4000;var SLIDE_OFFSET=50;var SLIDE_PHOTOS=true;var FADE_BORDER=false;var FADE_STEPS=10;var MOVE_STEP=1;var PRELOAD_TIMEOUT=60000;var BORDER_WIDTH=5;var FONT_SIZE=10;var LINE_HEIGHT="0.7em";var OFFSET_LEFT=0;var OFFSET_TOP=0;var REST_URL="/rest/";var P_IMG_ROOT="http://static.triptracker.net/jsmap/images/photoviewer";var TOOLBAR_IMG="toolbar.png";var TOOLBAR_IMG_RUNNING="toolbar2.png";var TOOLBAR_IMG_BACK="toolbar-back";var TOOLBAR_IMG_MASK="toolbar-mask.png";var TOOLBAR_IMG_LOADING="loading-anim.gif";var TOOLBAR_W=440;var TOOLBAR_H=75;var TOOLBAR_IMG_W=420;var TOOLBAR_IMG_H=44;var TOOLBAR_LINK="http://slideshow.triptracker.net";var TOOLBAR_OPACITY=0.7;var TOOLBAR_FONT_COLOR="#c0c0c0";var TOOLBAR_FONT_STYLE="tahoma, verdana, arial, helvetica, sans-serif";var VIEWER_ID_PREFIX="PhotoViewer";var VIEWER_ID_BACK=VIEWER_ID_PREFIX+"Back";var VIEWER_ID_TOOLBAR=VIEWER_ID_PREFIX+"Toolbar";var VIEWER_ID_TOOLBAR_MAP=VIEWER_ID_PREFIX+"ToolbarMap";var VIEWER_ID_TOOLBAR_IMG=VIEWER_ID_PREFIX+"ToolbarImg";var VIEWER_ID_LOADING=VIEWER_ID_PREFIX+"Loading";var VIEWER_ID_TIME=VIEWER_ID_PREFIX+"Time";var VIEWER_ID_TITLE=VIEWER_ID_PREFIX+"Title";var VIEWER_ID_BYLINE=VIEWER_ID_PREFIX+"Byline";var VIEWER_ID_PHOTO=VIEWER_ID_PREFIX+"Photo";var TITLE_MAX_LENGTH=140;function PhotoViewer(win,handleKeys){this.setImageRoot=setImageRoot;this.add=addPhoto;this.show=showPhoto;this.close=closePhoto;this.isShown=isPhotoShown;this.setBackground=setPhotoBackground;this.setShowToolbar=setShowToolbar;this.setToolbarImage=setToolbarImage;this.setShowCallback=setShowCallback;this.setCloseCallback=setCloseCallback;this.setEndCallback=setEndCallback;this.setLoading=setPhotoLoading;this.addBackShade=addBackShade;this.addToolbar=addToolbar;this.addCaptions=addCaptions;this.next=nextPhoto;this.prev=prevPhoto;this.first=firstPhoto;this.last=lastPhoto;this.slideShow=slideShow;this.slideShowStop=slideShowStop;this.startSlideShow=startSlideShow;this.handleKey=viewerHandleKey;this.checkStartFragmentIdentifier=checkStartFragmentIdentifier;this.checkStopFragmentIdentifier=checkStopFragmentIdentifier;this.setStartFragmentIdentifier=setStartFragmentIdentifier;this.setStopFragmentIdentifier=setStopFragmentIdentifier;this.email=emailPhoto;this.favorite=favoritePhoto;this.permalink=linkPhoto;this.setBackgroundColor=setBackgroundColor;this.setBorderWidth=setBorderWidth;this.setSlideDuration=setSlideDuration;this.disablePanning=disablePanning;this.enablePanning=enablePanning;this.disableFading=disableFading;this.enableFading=enableFading;this.disableShade=disableShade;this.enableShade=enableShade;this.setShadeColor=setShadeColor;this.setShadeOpacity=setShadeOpacity;this.setFontSize=setFontSize;this.setFont=setFont;this.enableAutoPlay=enableAutoPlay;this.disableAutoPlay=disableAutoPlay;this.enableEmailLink=enableEmailLink;this.disableEmailLink=disableEmailLink;this.enablePhotoLink=enablePhotoLink;this.disablePhotoLink=disablePhotoLink;this.setOnClickEvent=setOnClickEvent;this.enableLoop=enableLoop;this.disableLoop=disableLoop;this.enableToolbarAnimator=enableToolbarAnimator;this.disableToolbarAnimator=disableToolbarAnimator;this.enableToolbar=enableToolbar;this.disableToolbar=disableToolbar;this.hideOverlappingElements=hideOverlappingElements;this.showOverlappingElements=showOverlappingElements;this.id=VIEWER_ID_PREFIX+VIEWER_INDEX;VIEWER_INDEX++;this.photos=[];this.index=0;this.win=(win!=undefined?win:window);this.shown=false;this.showToolbar=true;this.backgroundColor="#000000";this.shadeColor="#000000";this.shadeOpacity=0.7;this.borderColor="#000000";this.shadeColor="#000000";this.shadeOpacity=0.7;this.borderWidth=BORDER_WIDTH;this.backgroundShade=true;this.fadePhotos=true;this.autoPlay=false;this.enableEmailLink=true;this.enablePhotoLink=true;this.slideDuration=SLIDE_DURATION;this.panPhotos=SLIDE_PHOTOS;this.fontSize=FONT_SIZE;this.font=undefined;if(handleKeys==undefined||handleKeys){if(this.win.addEventListener){this.win.addEventListener("keydown",viewerHandleKey,false);}else{this.win.document.attachEvent("onkeydown",viewerHandleKey);}}
this.win.document.viewer=this;if(OPERA)
this.disableFading();}
function PhotoImg(id,src,w,h,time,title,byline){this.id=id;this.src=src;this.w=parseInt(w);this.h=parseInt(h);this.time=time;this.title=title;this.byline=byline;}
function getViewer(){var viewer=undefined;var win=window;while(viewer==undefined){try{viewer=win.document.viewer;}catch(e){break;}
if(win===win.parent){break;}
win=win.parent;}
return viewer;}
function setImageRoot(root){P_IMG_ROOT=root;}
function addPhoto(photo,title,time,byline){var type=typeof photo;if(typeof photo=="string"){photo=new PhotoImg(undefined,photo,undefined,undefined,time,title,byline);}
this.photos.push(photo);}
function setPhotoBackground(color,border,doShade){if(color!=undefined)
this.backgroundColor=color;if(border!=undefined)
this.borderColor=border;if(doShade!=undefined)
this.backgroundShade=doShade;}
function setPhotoLoading(isLoading){this.isLoading=isLoading;var elt=this.win.document.getElementById(VIEWER_ID_LOADING);if(elt==undefined)
return;elt.style.display=isLoading?"":"none";}
function setBackgroundColor(color){this.backgroundColor=color;this.borderColor=color;}
function setBorderWidth(width){this.borderWidth=width;}
function setSlideDuration(duration){this.slideDuration=duration;}
function disableShade(){this.backgroundShade=false;}
function enableShade(){this.backgroundShade=true;}
function setShadeColor(color){this.shadeColor=color;}
function setShadeOpacity(opacity){this.shadeOpacity=opacity;}
function disableFading(){this.fadePhotos=false;}
function enableFading(){this.fadePhotos=true;}
function disablePanning(){this.panPhotos=false;}
function enablePanning(){this.panPhotos=true;}
function setFontSize(size){this.fontSize=size;}
function setFont(font){this.font=font;}
function enableAutoPlay(){this.autoPlay=true;}
function disableAutoPlay(){this.autoPlay=false;}
function enableEmailLink(){this.enableEmailLink=true;}
function disableEmailLink(){this.enableEmailLink=false;}
function enablePhotoLink(){this.enablePhotoLink=true;}
function disablePhotoLink(){this.enablePhotoLink=false;}
function setOnClickEvent(newfunc){this.customOnClickEvent=newfunc;}
function enableLoop(){this.loop=true;}
function disableLoop(){this.loop=false;}
function enableToolbar(){this.showToolbar=true;}
function disableToolbar(){this.showToolbar=false;}
function enableToolbarAnimator(){this.toolbarAnimator=new ToolbarAnimator(this);}
function disableToolbarAnimator(){if(this.toolbarAnimator!=undefined){this.toolbarAnimator.reset();this.toolbarAnimator=undefined;}}
function showPhoto(index,cropWidth,opacity){if(this.photos.length===0){return true;}
if(getRootWindow().permissionDenied&&this.badgeMode==undefined&&!getRootWindow().livemode){this.setStartFragmentIdentifier(index);return true;}
if(index!=undefined)
this.index=index;if(this.index<0||this.index>=this.photos.length){log.error("Invalid photo index");return true;}
var doc=this.win.document;var firstShow=false;if(!this.shown){firstShow=true;doc.viewer=this;try{this.hideOverlappingElements();}catch(e){}}
var zIndex=16384;var winSize=getWindowSize(this.win);var availW=winSize.w-20;var availH=winSize.h-20;var scrollPos=getScrollPos(this.win);var scrollLeft=scrollPos.left;var scrollTop=scrollPos.top;this.addBackShade(zIndex);if(this.showToolbar){this.addToolbar(availW,zIndex);this.addCaptions();}
var photo=this.photos[this.index];if(isNaN(photo.w)||isNaN(photo.h)){if(photo.preloadImage!=undefined){if(isNaN(photo.w)&&photo.preloadImage.width>0)
photo.w=photo.preloadImage.width;if(isNaN(photo.h)&&photo.preloadImage.height>0)
photo.h=photo.preloadImage.height;}else{this.index--;this.next();return false;}}
this.shown=true;var offset=20;var pw=-1;var ph=-1;if(parseInt(photo.w)>availW||parseInt(photo.h)>availH){if(parseInt(photo.w)/availW>parseInt(photo.h)/availH){pw=availW-offset;ph=parseInt(pw*photo.h/photo.w);}else{ph=availH-offset;pw=parseInt(ph*photo.w/photo.h);}}else{pw=parseInt(photo.w);ph=parseInt(photo.h);}
if(pw<=0||ph<=0){if(!this.showToolbar)
throw"Missing photo dimension";}
if(cropWidth==undefined)
cropWidth=0;var photoDiv=doc.createElement("div");photoDiv.id=VIEWER_ID_PHOTO;photoDiv.style.visibility="hidden";photoDiv.style.position="absolute";photoDiv.style.zIndex=zIndex;photoDiv.style.overflow="hidden";photoDiv.style.border=this.borderWidth+"px solid "+this.borderColor;photoDiv.style.textAlign="center";photoDiv.style.backgroundColor=this.backgroundColor;var photoElt=doc.createElement("img");photoElt.style.visibility="hidden";photoElt.style.position="relative";photoElt.style.backgroundColor=this.backgroundColor;photoElt.style.border="none";photoElt.style.cursor="pointer";photoElt.style.zIndex=(parseInt(photoDiv.style.zIndex)+1)+"";photoElt.onclick=onClickEvent;if(opacity!=undefined&&this.fadePhotos){var fadeElt=(FADE_BORDER?photoDiv:photoElt);setOpacity(fadeElt,opacity);}
var left=parseInt((availW-pw)/2)+OFFSET_LEFT;photoDiv.style.left=(left+scrollLeft+cropWidth/2)+"px";var top=parseInt((availH-ph)/2)+OFFSET_TOP;photoDiv.style.top=(top+scrollTop)+"px";photoElt.style.visibility="hidden";photoDiv.style.width=(pw-cropWidth)+"px";photoDiv.style.height=ph+"px";photoElt.style.width=pw+"px";photoElt.style.height=ph+"px";photoElt.src=photo.src;photoDiv.style.visibility="visible";photoElt.style.visibility="visible";photoDiv.appendChild(photoElt);doc.body.appendChild(photoDiv);if(this.photoDiv!=undefined){try{doc.body.removeChild(this.photoDiv);}catch(e){}}
this.photoDiv=photoDiv;this.photoImg=photoElt;this.setLoading(false);if(this.showCallback!=undefined)
this.showCallback(this.index);if(firstShow&&this.autoPlay){this.slideShow(true);}
return false;}
function isPhotoShown(){return this.shown;}
function closeViewer(){getViewer().close();}
function onPhotoLoad(event){var viewer=getViewer();if(viewer!=undefined){if(flickrHack(viewer,viewer.index)){viewer.setLoading(false);viewer.index--;viewer.next();return;}
viewer.show();}}
function closePhoto(){banners('show');var win=this.win;if(win==undefined)
win=window;var doc=win.document;var elt=this.photoDiv;if(elt!=undefined)
doc.body.removeChild(elt);elt=doc.getElementById(VIEWER_ID_BACK);if(elt!=undefined)
doc.body.removeChild(elt);elt=doc.getElementById(VIEWER_ID_TOOLBAR);if(elt!=undefined)
doc.body.removeChild(elt);this.shown=false;this.slideShowRunning=false;this.slideShowPaused=false;try{this.showOverlappingElements();}catch(e){log.error(e);}
if(this.toolbarAnimator!=undefined){this.toolbarAnimator.reset();}
if(this.closeCallback!=undefined)
this.closeCallback(this.index);}
function nextPhoto(n){if(this.isLoading)
return;if(n==undefined)
n=1;var oldIndex=this.index;if(this.index+n>=this.photos.length){if(this.loop&&n!=this.photos.length){this.index=0;}else{this.index=this.photos.length-1;}}else if(this.index+n<0){if(n<-1)
this.index=0;else if(this.loop)
this.index=this.photos.length-1;else
return;}else{this.index+=n;}
if(this.index==oldIndex)
return;this.slideShowStop();var img=new Image();this.photos[this.index].preloadImage=img;this.setLoading(true);img.onload=onPhotoLoad;img.onerror=onPhotoLoad;if(this.photos[this.index].src!=undefined){img.src=this.photos[this.index].src;}else{onPhotoLoad();}}
function prevPhoto(n){if(n==undefined)
n=1;this.next(-n);}
function firstPhoto(){this.prev(this.photos.length);}
function lastPhoto(){this.next(this.photos.length);}
function startSlideShow(){getViewer().slideShow(true);}
var slideTimeout;var slidePreloadImageLoaded=false;var slidePreloadTime=undefined;function slideShow(start){if(this.toolbarAnimator!=undefined)
this.toolbarAnimator.slideshowAction();var nextIndex=this.index+1;if(nextIndex>=this.photos.length){if(this.loop)
nextIndex=0;else if(!this.slideShowPaused&&!this.slideShowRunning){this.setToolbarImage(P_IMG_ROOT+"/"+TOOLBAR_IMG);return;}}
var doc=this.win.document;var viewer=this;var photoElt=this.photoImg;if(photoElt==undefined)
return;var photoDiv=this.photoDiv;var fadeElt=(FADE_BORDER?photoDiv:photoElt);if(start!=undefined&&start===true){if(this.slideShowPaused){this.slideShowPaused=false;this.setToolbarImage(P_IMG_ROOT+"/"+TOOLBAR_IMG_RUNNING);return;}else if(this.slideShowRunning){this.slideShowPaused=true;this.setToolbarImage(P_IMG_ROOT+"/"+TOOLBAR_IMG);return;}else{this.slideShowRunning=true;this.slideShowPaused=false;this.slideFirstPhoto=true;this.setToolbarImage(P_IMG_ROOT+"/"+TOOLBAR_IMG_RUNNING);}
if(this.isLoading||this.index>this.photos.length-1){return;}}else if(this.slideShowPaused){window.setTimeout(function(){viewer.slideShow(false);},200);return;}else if(!this.slideShowRunning){this.setToolbarImage(P_IMG_ROOT+"/"+TOOLBAR_IMG);return;}
var left=0;if(photoElt.leftOffset!=undefined){left=parseFloat(photoElt.leftOffset);}
if(left===0){if(nextIndex<this.photos.length){slidePreloadImageLoaded=false;var slidePreloadImage=new Image();this.photos[nextIndex].preloadImage=slidePreloadImage;slidePreloadTime=getTimeMillis();slidePreloadImage.onload=onSlideLoad;slidePreloadImage.onerror=onSlideLoad;slidePreloadImage.src=this.photos[nextIndex].src;}}
if(left>-SLIDE_OFFSET){left-=MOVE_STEP;if(-left<=FADE_STEPS){if(fadeElt.style.opacity!=undefined&&parseFloat(fadeElt.style.opacity)<1){if(this.fadePhotos&&this.photos[this.index].src!=undefined)
setOpacity(fadeElt,-left/FADE_STEPS);}}else if(left+SLIDE_OFFSET<FADE_STEPS){if(nextIndex<this.photos.length&&!slidePreloadImageLoaded){if(slidePreloadTime!=undefined&&getTimeMillis()-slidePreloadTime>PRELOAD_TIMEOUT)
slidePreloadImageLoaded=true;left++;this.setLoading(true);}else{if(nextIndex<this.photos.length&&this.fadePhotos&&this.photos[this.index].src!=undefined)
setOpacity(fadeElt,(left+SLIDE_OFFSET)/FADE_STEPS);}}
photoElt.leftOffset=left;if(this.panPhotos&&!this.slideFirstPhoto){photoElt.style.left=left+"px";}}else{if(nextIndex>=this.photos.length){this.slideShowRunning=false;this.slideShowPaused=false;this.setToolbarImage(P_IMG_ROOT+"/"+TOOLBAR_IMG);if(this.toolbarAnimator!=undefined)
this.toolbarAnimator.reset();if(this.endCallback!=undefined)
this.endCallback();return;}
this.index=nextIndex;this.slideFirstPhoto=false;this.show(undefined,(this.panPhotos?SLIDE_OFFSET:0),0);fadeElt=(FADE_BORDER?this.photoDiv:this.photoImg);if(this.fadePhotos)
setOpacity(fadeElt,0);this.photoImg.leftOffset=0;if(this.panPhotos)
this.photoImg.style.left="0px";}
var pause=this.slideDuration/SLIDE_OFFSET;if(this.slideFirstPhoto){pause/=2;}
slideTimeout=window.setTimeout(function(){viewer.slideShow(false);},pause);}
function onSlideLoad(event){var viewer=getViewer();if(viewer!=undefined){if(flickrHack(viewer,viewer.index+1)){var slidePreloadImage=viewer.photos[viewer.index+1].preloadImage;slidePreloadImage.src=viewer.photos[viewer.index+1].src;slidePreloadTime=getTimeMillis();return;}
slidePreloadImageLoaded=true;viewer.setLoading(false);}}
function slideShowStop(){this.slideShowRunning=false;this.slideShowPaused=false;var doc=this.win.document;var photoElt=this.photoImg;if(photoElt!=undefined){if(this.fadePhotos){var fadeElt=(FADE_BORDER?this.photoDiv:photoElt);setOpacity(fadeElt,1);}
photoElt.style.left="0px";}}
function banners(action)
{var con3 = document.getElementById("banbox44");if (con3) {if(action=="hide") {con3.className = "bnodisplay";}
if(action=="show") {con3.className = "";}
}
}
function addBackShade(zIndex){var doc=this.win.document;if(doc.getElementById(VIEWER_ID_BACK)!=undefined){return;}
var photoBack=doc.createElement("div");photoBack.id=VIEWER_ID_BACK;photoBack.style.top="0px";photoBack.style.left="0px";photoBack.style.bottom="0px";photoBack.style.right="0px";photoBack.style.margin="0";photoBack.style.padding="0";photoBack.style.border="none";photoBack.style.cursor="pointer";if(IE&&!(IE7&&STRICT_MODE)){photoBack.style.position="absolute";var docSize=getDocumentSize(this.win);photoBack.style.width=(docSize.w-21)+"px";photoBack.style.height=(docSize.h-4)+"px";}else{photoBack.style.position="fixed";photoBack.style.width="100%";photoBack.style.height="100%";}
banners('hide');photoBack.style.zIndex=zIndex-1;photoBack.style.backgroundColor=this.shadeColor;if(this.backgroundShade)
setOpacity(photoBack,this.shadeOpacity);else
setOpacity(photoBack,0.0);photoBack.onclick=onClickEvent;doc.body.appendChild(photoBack);}
function addToolbar(availW,zIndex){var doc=this.win.document;var i;if(doc.getElementById(VIEWER_ID_TOOLBAR)!=undefined)
return;var photoToolbar=doc.createElement("div");photoToolbar.id=VIEWER_ID_TOOLBAR;var bottom=10;if(IE&&!(IE7&&STRICT_MODE)){photoToolbar.style.position="absolute";if(IE7){var top=getWindowSize(this.win).h+getScrollPos(this.win).top;photoToolbar.style.top=(top-TOOLBAR_H-10)+"px";}else{photoToolbar.style.bottom=bottom+"px";}}else{photoToolbar.style.position="fixed";photoToolbar.style.bottom=bottom+"px";}
photoToolbar.style.left=(availW-TOOLBAR_W+10)/2+"px";photoToolbar.style.width=TOOLBAR_W+"px";photoToolbar.style.height=TOOLBAR_H+"px";photoToolbar.style.textAlign="center";setOpacity(photoToolbar,TOOLBAR_OPACITY);photoToolbar.style.zIndex=zIndex+1;var imgBack=TOOLBAR_IMG_BACK;if(!isHosted()){imgBack+="-nologo";}
if(IE&&!IE7){imgBack+="-indexed";}
imgBack+=".png";photoToolbar.style.backgroundImage="url('"+P_IMG_ROOT+"/"+imgBack+"')";photoToolbar.style.backgroundPosition="50% 0%";photoToolbar.style.backgroundRepeat="no-repeat";photoToolbar.style.lineHeight=LINE_HEIGHT;var toolbarMask=undefined;if(!this.enableEmailLink){toolbarMask=doc.createElement("img");toolbarMask.style.position="absolute";toolbarMask.style.width=44;toolbarMask.style.height=44;toolbarMask.style.left="289px";toolbarMask.style.top="0px";toolbarMask.src=P_IMG_ROOT+"/"+TOOLBAR_IMG_MASK;photoToolbar.appendChild(toolbarMask);}
if(!this.enablePhotoLink){toolbarMask=doc.createElement("img");toolbarMask.style.position="absolute";toolbarMask.style.width=44;toolbarMask.style.height=44;toolbarMask.style.left="339px";toolbarMask.style.top="0px";toolbarMask.src=P_IMG_ROOT+"/"+TOOLBAR_IMG_MASK;photoToolbar.appendChild(toolbarMask);}
var imgMap=doc.createElement("map");imgMap.name=VIEWER_ID_TOOLBAR_MAP;imgMap.id=VIEWER_ID_TOOLBAR_MAP;var areas=[];areas.push(["getViewer().first()","17",getMessage("photoviewer.toolbar.first")]);areas.push(["getViewer().prev()","68",getMessage("photoviewer.toolbar.prev")]);areas.push(["getViewer().slideShow(true)","122",getMessage("photoviewer.toolbar.slideShow")]);areas.push(["getViewer().next()","175",getMessage("photoviewer.toolbar.next")]);areas.push(["getViewer().last()","227",getMessage("photoviewer.toolbar.last")]);if(this.enableEmailLink)
areas.push(["getViewer().email()","300",getMessage("photoviewer.toolbar.email")]);if(this.enablePhotoLink)
areas.push(["getViewer().permalink()","350",getMessage("photoviewer.toolbar.permalink")]);areas.push(["getViewer().close()","402",getMessage("photoviewer.toolbar.close")]);for(i=0;i<areas.length;i++){var area=doc.createElement("area");area.href="javascript:void(0)";area.alt=areas[i][2];area.title=area.alt;area.shape="circle";area.coords=areas[i][1]+", 21, 22";area.onclick=buildAreaMapClosure(areas[i][0]);imgMap.appendChild(area);}
var img=doc.createElement("img");img.id=VIEWER_ID_TOOLBAR_IMG;img.src=P_IMG_ROOT+"/"+TOOLBAR_IMG;img.width=TOOLBAR_IMG_W;img.height=TOOLBAR_IMG_H;img.style.border="none";img.style.background="none";if(STRICT_MODE){img.style.margin="4px 0px 0px 0px";}else{img.style.margin="4px";}
img.useMap="#"+VIEWER_ID_TOOLBAR_MAP;photoToolbar.appendChild(imgMap);photoToolbar.appendChild(img);if(isHosted()){var ttLink=doc.createElement("a");ttLink.style.position="absolute";ttLink.style.bottom="0px";ttLink.style.right="0px";ttLink.style.width="25px";ttLink.style.height="25px";ttLink.style.background="none";ttLink.alt="TripTracker.net";ttLink.title=ttLink.alt;ttLink.cursor=ttLink.alt;ttLink.href=TOOLBAR_LINK;ttLink.target="_new";ttLink.alt="TripTracker Slideshow";ttLink.title=ttLink.alt;photoToolbar.appendChild(ttLink);}
var loadingIcon=doc.createElement("img");loadingIcon.id=VIEWER_ID_LOADING;loadingIcon.width=16;loadingIcon.height=16;loadingIcon.style.display="none";loadingIcon.style.position="absolute";loadingIcon.style.left=(273-8)+"px";loadingIcon.style.top=(24-8)+"px";loadingIcon.src=P_IMG_ROOT+"/"+TOOLBAR_IMG_LOADING;loadingIcon.style.border="none";loadingIcon.style.background="none";photoToolbar.appendChild(loadingIcon);photoToolbar.appendChild(doc.createElement("br"));var photoTime=doc.createElement("span");photoTime.id=VIEWER_ID_TIME;photoTime.position="relative";photoTime.style.color=TOOLBAR_FONT_COLOR;photoTime.style.fontFamily=TOOLBAR_FONT_STYLE;photoTime.style.fontSize=this.fontSize+"px";if(STRICT_MODE){photoTime.style.lineHeight=this.fontSize+"px";}
if(this.font!=undefined){photoTime.style.font=this.font;}
photoTime.style.cssFloat="none";photoTime.style.textAlign="right";photoTime.style.padding="0px 10px";photoTime.appendChild(doc.createTextNode(" "));photoToolbar.appendChild(photoTime);var photoTitle=doc.createElement("span");photoTitle.id=VIEWER_ID_TITLE;photoTitle.position="relative";photoTitle.style.color=TOOLBAR_FONT_COLOR;photoTitle.style.fontFamily=TOOLBAR_FONT_STYLE;photoTitle.style.fontSize=this.fontSize+"px";if(STRICT_MODE){photoTitle.style.lineHeight=this.fontSize+"px";}
if(this.font!=undefined){photoTitle.style.font=this.font;}
photoTitle.style.cssFloat="none";photoTitle.style.textAlign="left";photoTitle.style.paddingRight="20px";photoTitle.appendChild(doc.createTextNode(" "));photoToolbar.appendChild(photoTitle);doc.body.appendChild(photoToolbar);var photoByline=doc.createElement("div");photoByline.appendChild(doc.createTextNode(""));photoByline.style.color=TOOLBAR_FONT_COLOR;photoByline.style.fontFamily=TOOLBAR_FONT_STYLE;photoByline.style.fontSize=this.fontSize+"px";if(this.font!=undefined){photoByline.style.font=this.font;}
photoByline.id=VIEWER_ID_BYLINE;photoByline.style.position="absolute";photoByline.style.right="5px";photoByline.style.bottom="5px";photoByline.style.zIndex=zIndex+1;photoByline.appendChild(doc.createTextNode(" "));doc.body.appendChild(photoByline);}
function buildAreaMapClosure(func){return function(event){eval(func);blurElement(event);return false;};}
function blurElement(event){var target=getEventTarget(getEvent(event));if(target!=undefined)
target.blur();}
function setToolbarImage(img){var doc=this.win.document;var elt=doc.getElementById(VIEWER_ID_TOOLBAR_IMG);if(elt!=undefined)
elt.src=img;}
function setShowToolbar(doShow){this.showToolbar=doShow;}
function addCaptions(){var photo=this.photos[this.index];var doc=this.win.document;var photoTime=doc.getElementById(VIEWER_ID_TIME);var photoTitle=doc.getElementById(VIEWER_ID_TITLE);var photoByline=doc.getElementById(VIEWER_ID_BYLINE);var time=(this.index+1)+"/"+this.photos.length;if(photo.time!=undefined){time+=" ["+photo.time+"]";}
photoTime.firstChild.nodeValue=time;var title=(photo.title!=undefined?photo.title:"");photoTitle.title="";photoTitle.alt="";if(title.length>TITLE_MAX_LENGTH){photoTitle.title=title;photoTitle.alt=title;title=title.substring(0,TITLE_MAX_LENGTH)+" ...";}
if(title.indexOf("\n")!==0){title=title.replace("\n","<br />");photoTitle.innerHTML=title;}else{photoTitle.nodeValue=title;}
if(photo.byline!=undefined&&photo.byline.length>0){photoByline.firstChild.nodeValue=photo.byline;}else{photoByline.firstChild.nodeValue="";}}
function setCloseCallback(callback){this.closeCallback=callback;}
function setShowCallback(callback){this.showCallback=callback;}
function setEndCallback(callback){this.endCallback=callback;}
function emailPhoto(){var photo=this.photos[this.index];var doc=this.win.document;var title=(photo.title!=undefined?photo.title:getMessage("photoviewer.email.subject.photo"));var mailtoLink="mailto:?subject="+title+"&body="+
getPhotoURL(photo.src);doc.location.href=mailtoLink;}
function getPhotoURL(url){var loc=document.location;if(/\w+:\/\/.+/.test(url)){return url;}else if(url.indexOf("/")===0){return loc.protocol+"//"+loc.host+url;}else{var path=loc.pathname;var pos=path.lastIndexOf("/");if(pos!=-1){path=path.substring(0,pos);}
return loc.protocol+"//"+loc.host+path+"/"+url;}}
function linkPhoto(){var photo=this.photos[this.index];window.open(photo.src);}
function favoritePhoto(){var photo=this.photos[this.index];var doc=this.win.document;var restURL=REST_URL+"markfeatured?id"+photo.id;try{var res=getResponse(restURL,false,true);}catch(e){return;}}
function hideOverlappingElements(node){if(node==undefined){node=this.win.document.body;this.hideOverlappingElements(node);return;}
if(node.style!=undefined&&node.style.visibility!="hidden"){var nodeName=node.nodeName.toLowerCase();if((node.className!=undefined&&node.className.indexOf("SlideshowDoHide")!=-1)||(IE&&(nodeName=="select"||nodeName=="object"||nodeName=="embed"))){node.style.visibility="hidden";if(this.hiddenElements==undefined)
this.hiddenElements=[];this.hiddenElements.push(node);}}
if(node.childNodes!=undefined){var i;for(i=0;i<node.childNodes.length;i++){this.hideOverlappingElements(node.childNodes[i]);}}}
function showOverlappingElements(){var i;if(this.hiddenElements!=undefined){for(i=0;i<this.hiddenElements.length;i++){this.hiddenElements[i].style.visibility="visible";}
this.hiddenElements=[];}}
function viewerHandleKey(event){if(!getViewer)
return true;var viewer=getViewer();if(viewer==undefined||!viewer.shown)
return true;event=getEvent(event);if(event.ctrlKey||event.altKey)
return true;var keyCode=event.keyCode;switch(keyCode){case 37:case 38:viewer.prev();break;case 39:case 40:viewer.next();break;case 33:viewer.prev(10);break;case 34:viewer.next(10);break;case 36:viewer.first();break;case 35:viewer.last();break;case 32:case 13:viewer.slideShow(true);break;case 27:viewer.close();break;default:return true;}
preventDefault(event);return false;}
function flickrHack(viewer,index){if(viewer.photos[index]!=undefined){var preloadPhoto=viewer.photos[index].preloadImage;if(preloadPhoto!=undefined&&preloadPhoto.width==500&&preloadPhoto.height==375){var flickrRE=/.+static\.flickr\.com.+_b\.jpg/;if(flickrRE.test(preloadPhoto.src)){viewer.photos[index].src=viewer.photos[index].src.replace(/_b\.jpg/,"_o.jpg");return true;}}}
return false;}
function findPhotosTT(viewer,node){var i;if(node.nodeName.toLowerCase()=="a"){var onclick=node.getAttribute("onclick");if(onclick==undefined){onclick=node.onclick;}
if(onclick!=undefined&&new String(onclick).indexOf("popupImg")!=-1){var popupRE=/.*popupImg\((.+?),(.+?),(.+?)\).*/;if(popupRE.test(onclick)){var url,w,h;if(node.photoUrl!=undefined){url=node.photoUrl;w=node.photoW;h=node.photoH;}else{url=RegExp.$1;if(url.charAt(0)=="'"&&url.charAt(url.length-1)=="'")
url=url.substring(1,url.length-1);w=parseInt(RegExp.$2);h=parseInt(RegExp.$3);}
var photo=new PhotoImg(undefined,url,w,h);var found=false;for(i=0;i<viewer.photos.length;i++){if(viewer.photos[i].src==photo.src){found=true;break;}}
if(!found)
viewer.add(photo);}}}
if(node.childNodes!=undefined){for(i=0;i<node.childNodes.length;i++){findPhotosTT(viewer,node.childNodes[i]);}}}
var defaultViewer=undefined;function popupImg(url,w,h,backColor,showToolbar){var i;if(defaultViewer==undefined)
defaultViewer=new PhotoViewer();else{defaultViewer.photos=[];defaultViewer.index=0;}
if(backColor!=undefined)
defaultViewer.setBackground(backColor,backColor,false);if(showToolbar==undefined||showToolbar){findPhotosTT(defaultViewer,window.document.body);for(i=0;i<defaultViewer.photos.length;i++){if(defaultViewer.photos[i].src==url){defaultViewer.show(i);}}}
if(defaultViewer.photos===undefined||defaultViewer.photos.length===0){defaultViewer.setShowToolbar(false);defaultViewer.add(new PhotoImg(undefined,url,w,h));defaultViewer.show();}
return false;}
function onClickEvent()
{var v=getViewer();if(v.toolbarAnimator!=undefined)
v.toolbarAnimator.reset();if(v.customOnClickEvent!=undefined)
v.customOnClickEvent();else
closeViewer();}
function setupFragmentIdentifierModePhotoViewer(iframeLocation,iframename,viewerJSONArray)
{var viewer=new PhotoViewer();viewer.origRootLocation=document.location.href;viewer.origIFrameLocation=iframeLocation;viewer.iframename=iframename;viewer.setCloseCallback(viewer.setStopFragmentIdentifier);for(var i=0;i<viewerJSONArray.length;i++){viewer.add(viewerJSONArray[i].url,viewerJSONArray[i].title,viewerJSONArray[i].date,viewerJSONArray[i].byline);}
window.frames[viewer.iframename].location=viewer.origIFrameLocation+"#"+viewer.origRootLocation;viewer.checkStartFragmentIdentifier();}
function checkStartFragmentIdentifier(){var href=document.location.href;if(href.indexOf("#startphoto=")==-1){window.setTimeout(checkStartFragmentIdentifier,500);}else{var startPhoto=parseInt(href.substring(href.lastIndexOf("=")+1));var viewer=getViewer();if(viewer.origRootLocation.indexOf("#")==-1)
viewer.origRootLocation+="#";if(FIREFOX){window.history.back();}else{document.location.href=viewer.origRootLocation;}
viewer.show(startPhoto);}}
function setStopFragmentIdentifier(index){window.frames[getViewer().iframename].location=this.origIFrameLocation+"#stopphoto="+index;checkStartFragmentIdentifier();}
function setStartFragmentIdentifier(index){var rootWin=getRootWindow();if(this.origIFrameLocation==undefined)
this.origIFrameLocation=rootWin.location.href.substring(0,rootWin.location.href.indexOf("#"));if(this.origRootLocation==undefined)
this.origRootLocation=rootWin.location.href.substring(rootWin.location.href.indexOf("#")+1);this.checkStopFragmentIdentifier();var frIdentifier="#startphoto="+index;rootWin.parent.location=this.origRootLocation+frIdentifier;}
function checkStopFragmentIdentifier(){var href=getRootWindow().location.href;if(href.indexOf("#stopphoto")==-1){window.setTimeout(checkStopFragmentIdentifier,500);}else{var viewer=getViewer();var index=href.substring(href.lastIndexOf("=")+1);if(viewer.origIFrameLocation.indexOf("#")==-1)
viewer.origIFrameLocation+="#";if(FIREFOX){window.history.back();}else{getRootWindow().location.href=viewer.origIFrameLocation;}
viewerCloseCallback(index);}}
function ToolbarAnimator(viewer){this.viewer=viewer;}
ToolbarAnimator.prototype.initialize=function(){var _this=this;var backDiv=findDOMElement(VIEWER_ID_BACK);var frontDiv=findDOMElement(VIEWER_ID_PHOTO);var toolbar=findDOMElement(VIEWER_ID_TOOLBAR);if(backDiv!=undefined&&frontDiv!=undefined&&toolbar!=undefined){var func=function(){_this.mouseAction();};backDiv.onmousemove=func;frontDiv.onmousemove=func;toolbar.onmousemove=func;toolbar.onclick=func;this.initialized=true;}};ToolbarAnimator.prototype.reset=function(){this.stop();var backDiv=findDOMElement(VIEWER_ID_BACK);var frontDiv=findDOMElement(VIEWER_ID_PHOTO);var toolbar=findDOMElement(VIEWER_ID_TOOLBAR);if(backDiv!=undefined&&frontDiv!=undefined&&toolbar!=undefined){backDiv.onmousemove=null;frontDiv.onmousemove=null;toolbar.onmousemove=null;toolbar.onclick=null;}
this.initialized=false;};ToolbarAnimator.prototype.stop=function(){var _this=this;if(this.hiderID!=undefined){window.clearTimeout(this.hiderID);this.hiderID=undefined;}
if(this.hidden){this.showToolbar();}};ToolbarAnimator.prototype.mouseAction=function(){this.stop();};ToolbarAnimator.prototype.slideshowAction=function(){var _this=this;if(this.viewer.slideShowRunning&&!this.viewer.slideShowPaused&&this.hiderID==undefined){if(!this.initialized){this.initialize();}
this.hiderID=window.setTimeout(function(){_this.hideToolbar();},5000);}else if(this.viewer.slideShowPaused){this.reset();}};ToolbarAnimator.prototype.hideToolbar=function(){var _this=this;var toolbar=findDOMElement(VIEWER_ID_TOOLBAR);if(toolbar==undefined){return;}
var opacity=toolbar.style.KhtmlOpacity;if(opacity==undefined){opacity=toolbar.style.opacity;}
if(opacity===0){toolbar.style.display="none";return;}
opacity=opacity-0.05;setOpacity(toolbar,opacity>0?opacity:0);this.hidden=true;this.hiderID=window.setTimeout(function(){_this.hideToolbar();},100);};ToolbarAnimator.prototype.showToolbar=function(){var toolbar=findDOMElement(VIEWER_ID_TOOLBAR);if(toolbar!=undefined){toolbar.style.display="block";setOpacity(toolbar,TOOLBAR_OPACITY);}
this.hidden=false;};

