
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - behaviour.js - */
// http://v2.shotview.com/portal_javascripts/behaviour.js?original=1
var Behaviour={list:new Array,register: function(sheet){Behaviour.list.push(sheet)},start: function(){Behaviour.addLoadEvent(function(){Behaviour.apply()})},apply: function(){for(h=0;sheet=Behaviour.list[h];h++){for(selector in sheet){list=document.getElementsBySelector(selector);if(!list){continue}
for(i=0;element=list[i];i++){sheet[selector](element)}}}
Behaviour.list=[]},addLoadEvent: function(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func} else{window.onload=function(){oldonload();func()}}}}
Behaviour.start();
function getAllChildren(e){return e.all?e.all:e.getElementsByTagName('*')}
document.getElementsBySelector=function(selector){if(!document.getElementsByTagName){return new Array()}
var tokens=selector.split(' ');var currentContext=new Array(document);for(var i=0;i<tokens.length;i++){token=tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');if(token.indexOf('#')>-1){var bits=token.split('#');var tagName=bits[0];var id=bits[1];var element=document.getElementById(id);if(tagName&&element.nodeName.toLowerCase()!=tagName){return new Array()}
currentContext=new Array(element);continue}
if(token.indexOf('.')>-1){var bits=token.split('.');var tagName=bits[0];var className=bits[1];if(!tagName){tagName='*'}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(tagName=='*'){elements=getAllChildren(currentContext[h])} else{elements=currentContext[h].getElementsByTagName(tagName)}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j]}}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(found[k].className&&found[k].className.match(new RegExp('\\b'+className+'\\b'))){currentContext[currentContextIndex++]=found[k]}}
continue}
if(token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var tagName=RegExp.$1;var attrName=RegExp.$2;var attrOperator=RegExp.$3;var attrValue=RegExp.$4;if(!tagName){tagName='*'}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(tagName=='*'){elements=getAllChildren(currentContext[h])} else{elements=currentContext[h].getElementsByTagName(tagName)}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j]}}
currentContext=new Array;var currentContextIndex=0;var checkFunction;switch(attrOperator){case '=':checkFunction=function(e){return(e.getAttribute(attrName)==attrValue)};break;case '~':checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b')))};break;case '|':checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?')))};break;case '^':checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)==0)};break;case '$':checkFunction=function(e){return(e.getAttribute(attrName).lastIndexOf(attrValue)==e.getAttribute(attrName).length-attrValue.length)};break;case '*':checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)>-1)};break;default:checkFunction=function(e){return e.getAttribute(attrName)}}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(checkFunction(found[k])){currentContext[currentContextIndex++]=found[k]}}
continue}
if(!currentContext[0]){return}
tagName=token;var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements=currentContext[h].getElementsByTagName(tagName);for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j]}}
currentContext=found}
return currentContext}


/* - dojo.js - */
// http://v2.shotview.com/portal_javascripts/dojo.js?original=1
function dj_undef(name,obj){if(!obj){obj=dj_global}
return(typeof obj[name]=="undefined")}
var dj_global=this;dojo={};dojo.provide=function(packname){var syms=packname.split(/\./);if(syms[syms.length-1]=="*"){syms.pop()}
return dojo.evalObjPath(syms.join("."),true)}
dojo.evalObjPath=function(objpath,create){if(typeof objpath!="string"){return dj_global}
if(objpath.indexOf('.')==-1){if((dj_undef(objpath,dj_global))&&(create)){dj_global[objpath]={}}
return dj_global[objpath]}
var syms=objpath.split(/\./);var obj=dj_global;for(var i=0;i<syms.length;++i){if(!create){obj=obj[syms[i]];if((typeof obj=='undefined')||(!obj)){return obj}}else{if(dj_undef(syms[i],obj)){obj[syms[i]]={}}
obj=obj[syms[i]]}}
return obj};dojo.lang={};dojo.lang.hitch=function(obj,method){var methodName=method;if(typeof method=="string") method=obj[method];return function(){try{method.apply(obj,arguments)} catch(e){alert(methodName+" is not available "+e)}}}
dojo.fx={};dojo.fx.html={};dojo.fx.html.fade=function(element,duration,callback,from,to){var x=new fx.Opacity(element,{duration:duration,onComplete:callback});dojo.style.setOpacity(element,from);x.custom(from,to);return x}
dojo.fx.html.fadeOut=function(element,duration,callback){return this.fade(element,duration,callback,dojo.style.getOpacity(element),0)}
dojo.fx.html.fadeIn=function(element,duration,callback){return this.fade(element,duration,callback,dojo.style.getOpacity(element),1)}
dojo.style={};dojo.style.getOpacity=function(node){if(window.ActiveXObject){var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100} else{var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1}
return opac>=0.999999?1.0:Number(opac)}
dojo.style.setOpacity=function(node,opacity,dontFixOpacity){if(document.all){if(node.nodeName.toLowerCase()=="tr"){var tds=node.getElementsByTagName("td");for(var x=0;x<tds.length;x++){tds[x].style.filter="Alpha(Opacity="+opacity*100+")"}}
if(opacity==1){node.style.filter=""} else{node.style.filter="Alpha(Opacity="+opacity*100+")"}}else{node.style.opacity=opacity;node.style.MozOpacity=opacity;node.style.KhtmlOpacity=opacity}}


/* - swfobject.js - */
// http://v2.shotview.com/portal_javascripts/swfobject.js?original=1
if(typeof deconcept=="undefined"){var deconcept=new Object()}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return}
this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1)}
if(id){this.setAttribute("id",id)}
if(w){this.setAttribute("width",w)}
if(h){this.setAttribute("height",h)}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")))}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(c){this.addParam("bgcolor",c)}
var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a)}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f},getAttribute:function(_10){return this.attributes[_10]},addParam:function(_11,_12){this.params[_11]=_12},getParams:function(){return this.params},addVariable:function(_13,_14){this.variables[_13]=_14},getVariable:function(_15){return this.variables[_15]},getVariables:function(){return this.variables},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key])}
return _16},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn")}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" "}
var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\""}_19+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX")}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />"}
var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />"}_19+="</object>"}
return _19},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}
return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always"}
catch(e){if(_23.major==6){return _23}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}}
return _23};deconcept.PlayerVersion=function(_27){this.major=_27[0]!=null?parseInt(_27[0]):0;this.minor=_27[1]!=null?parseInt(_27[1]):0;this.rev=_27[2]!=null?parseInt(_27[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false}
if(this.major>fv.major){return true}
if(this.minor<fv.minor){return false}
if(this.minor>fv.minor){return true}
if(this.rev<fv.rev){return false}return true};deconcept.util={getRequestParameter:function(_29){var q=document.location.search||document.location.hash;if(q){var _2b=q.substring(1).split("&");for(var i=0;i<_2b.length;i++){if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){return _2b[i].substring((_2b[i].indexOf("=")+1))}}}
return ""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return}
var _2d=document.getElementsByTagName("OBJECT");for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){}}}}};deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload=="function"){var _30=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();_30()}}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs}};if(typeof window.onbeforeunload=="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload()}}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload}
if(Array.prototype.push==null){Array.prototype.push=function(_31){this[this.length]=_31;return this.length}}
var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

/* - prototype.lite.js - */
// http://v2.shotview.com/portal_javascripts/prototype.lite.js?original=1
var Prototype={Version:'1.4.0',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(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}}}}
function $(){var elements=new Array();for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string')
element=document.getElementById(element);if(arguments.length==1)
return element;elements.push(element)}
return elements}
Object.extend(String.prototype,{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(eval)},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('\\', '\\\\').replace("'",'\\\'')+"'"}});String.prototype.parseQuery=String.prototype.toQueryParams;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(value>=(result||value))
result=value});return result},min: function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(value<=(result||value))
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){iterator(value=collections.pluck(index));return value})},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);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.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()},shift: function(){var result=this[0];for(var i=0;i<this.length-1;i++)
this[i]=this[i+1];this.length--;return result},inspect: function(){return '['+this.map(Object.inspect).join(', ')+']'}});var Hash={_each: function(iterator){for(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 ActiveXObject('Msxml2.XMLHTTP')},
function(){return new ActiveXObject('Microsoft.XMLHTTP')},
function(){return new XMLHttpRequest()})||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,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];if(this.options.method=='post'){requestHeaders.push('Content-type','application/x-www-form-urlencoded');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)}
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)}});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(child);return elements})}
if(!window.Element){var Element=new Object()}
Object.extend(Element,{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)},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*$/)},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(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}});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){if(this.element.tagName.toLowerCase()=='tbody'){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 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(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;if(!value&&!('value' in opt))
value=opt.text}
return [element.name,value]},selectMany: function(element){var value=new Array();for(var i=0;i<element.length;i++){var opt=element.options[i];if(opt.selected){var optValue=opt.value;if(!optValue&&!('value' in opt))
optValue=opt.text;value.push(optValue)}}
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)}}});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]}}

/* - moo.fx.js - */
// http://v2.shotview.com/portal_javascripts/moo.fx.js?original=1
var fx=new Object();fx.Base=function(){};fx.Base.prototype={setOptions: function(options){this.options={duration:500,onComplete:'',transition:fx.sinoidal}
Object.extend(this.options,options||{})},go: function(){this.startTime=(new Date).getTime();this.timer=setInterval(this.step.bind(this),13)},step: function(){var time=(new Date).getTime();if(time>=this.options.duration+this.startTime){this.now=this.to;clearInterval(this.timer);this.timer=null;if(typeof this.options.onComplete=="function") if(this.options.onComplete) setTimeout(this.options.onComplete.bind(this),10)}
else{var Tpos=(time-this.startTime)/(this.options.duration);this.now=this.options.transition(Tpos) *(this.to-this.from)+this.from}
this.increase()},custom: function(from,to){if(this.timer!=null) return;this.from=from;this.to=to;this.go()},hide: function(){this.now=0;this.increase()},clearTimer: function(){clearInterval(this.timer);this.timer=null}}
fx.Layout=Class.create();fx.Layout.prototype=Object.extend(new fx.Base(),{initialize: function(el,options){this.el=$(el);this.el.style.overflow="hidden";this.el.iniWidth=this.el.offsetWidth;this.el.iniHeight=this.el.offsetHeight;this.setOptions(options)}});fx.Height=Class.create();Object.extend(Object.extend(fx.Height.prototype,fx.Layout.prototype),{increase: function(){this.el.style.height=this.now+"px"},toggle: function(){if(this.el.offsetHeight>0) this.custom(this.el.offsetHeight,0);else this.custom(0,this.el.scrollHeight)}});fx.Width=Class.create();Object.extend(Object.extend(fx.Width.prototype,fx.Layout.prototype),{increase: function(){this.el.style.width=this.now+"px"},toggle: function(){if(this.el.offsetWidth>0) this.custom(this.el.offsetWidth,0);else this.custom(0,this.el.iniWidth)}});fx.Opacity=Class.create();fx.Opacity.prototype=Object.extend(new fx.Base(),{initialize: function(el,options){this.el=$(el);this.now=1;this.increase();this.setOptions(options)},increase: function(){if(this.now==1&&(/Firefox/.test(navigator.userAgent))) this.now=0.9999;this.setOpacity(this.now)},setOpacity: function(opacity){dojo.style.setOpacity(this.el,opacity)},toggle: function(){if(this.now>0) this.custom(1,0);else this.custom(0,1)}});fx.sinoidal=function(pos){return((-Math.cos(pos*Math.PI)/2)+0.5)}
fx.linear=function(pos){return pos}
fx.cubic=function(pos){return Math.pow(pos,3)}
fx.circ=function(pos){return Math.sqrt(pos)}

/* - Spreader.js - */
// http://v2.shotview.com/portal_javascripts/Spreader.js?original=1
function Spreader(){this.t=[]}
_p=Spreader.prototype;_p.add=function(l){if(!this.contains(l)){this.t.push(l)}}
_p.contains=function(l){with(this){for(var i=0;i<t.length;i++){if(t===l){return true}}
return false}}
_p.remove=function(l){with(this){for(var i=0;i<t.length;i++){if(t===l){t.splice(i,1)}}}}
_p.exec=function(method,args){try{if(!args){args=[]}
with(this){for(var i=0;i<t.length;i++){if(t[i][method]){t[i][method].apply(t[i],args)}}}} catch(e){alert('Error occured while spreading: '+method);alert(e);throw e}}
_p.apply=function(s,m,a){switch(a.length){case 1:s[m](a[0]);break;case 2:s[m](a[0],a[1]);break;case 3:s[m](a[0],a[1],a[2]);break;case 4:s[m](a[0],a[1],a[2],a[3]);break;case 5:s[m](a[0],a[1],a[2],a[3],a[4]);break;case 6:s[m](a[0],a[1],a[2],a[3],a[4],a[5]);break;case 7:s[m](a[0],a[1],a[2],a[3],a[4],a[5],a[6]);break;case 8:s[m](a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);break;default:alert("More arguments that 8 are not possible for broadcasting "+m+", sorry")}}
_p.isEmpty=function(){return this.t.length==0}
_p.set=function(field,value){var split=field.split(".");with(this){for(var i=0;i<t.length;i++){var obj=t[i];for(var j=0;j<split.length-1;j++){obj=obj[split[j]]}
if(typeof obj.setField=="function"){obj.setField(split[j],value)} else{obj[split[j]]=value}}}}


/* - ResizeEvent.js - */
// http://v2.shotview.com/portal_javascripts/ResizeEvent.js?original=1
var formerHeight=-1;var formerWidth=-1;var _s=dojo.provide("at.arminformatik.ui").ResizeEvent=function(){};_s.listeners=[];_s.source=null;_s.initSource=function(){var body=document.getElementsByTagName("body")[0];var parent=document.createElement("div");var source=this.source=window.sizeChecker=document.createElement("div");with(source.style){position="absolute";height=width="0px";top=left="100%"}
parent.appendChild(source);body.appendChild(parent);var that=this;window.onresize=function(){that.onResize()}
Interval.set(this,"sizeChecker",[],80)}
_s.addEventListener=function(event,obj){if(event=="onResize"){this.listeners.push(obj);if(!this.source){this.initSource()}
obj.onResize(formerHeight,formerWidth)}}
_s.sourceInit=function(){if(!this.source){this.initSource()}
this.getHeight=this.defaultHeight;this.getWidth=this.defaultWidth}
_s.sourceHeightInit=function(){this.sourceInit();return this.getHeight()}
_s.sourceWidthInit=function(){this.sourceInit();return this.getWidth()}
_s.defaultHeight=function(){return this.source.offsetTop}
_s.defaultWidth=function(){return this.source.offsetLeft}
_s.ieBodyHeight=function(){return document.body.clientHeight}
_s.ieDEHeight=function(){}
_s.ieBodyWidth=function(){return document.body.clientWidth}
_s.ieDEHeight=function(){}
_s.getHeight=(document.all&&!document.opera)?_s.ieBodyHeight:_s.sourceHeightInit;_s.getWidth=(document.all&&!document.opera)?_s.ieBodyWidth:_s.sourceWidthInit;_s.onResize=function(height,width){var l=this.listeners;var i=l.length;while(--i-(-1)){l[i].onResize()}}
_s.sizeChecker=function(){var width=this.getWidth();var height=this.getHeight();if(formerHeight!=height||formerWidth!=width){formerHeight=height;formerWidth=width;this.onResize()}}


/* - HideOnResize.js - */
// http://v2.shotview.com/portal_javascripts/HideOnResize.js?original=1
var _s=dojo.provide("at.arminformatik.ui").HideOnResize=function(){};_s.interval=null;_s.inited=false;_s.hides=new Array();_s.init=function(){at.arminformatik.ui.ResizeEvent.addEventListener("onResize",this)};_s.showBehaviour=function(el){el.style.visibility="visible"};_s.hideBehaviour=function(el){if(!this.inited){this.init()}
this.hides.push(el)};_s.onResize=function(){this.fadeOut();if(this.interval){Interval.clear(this.interval)}
this.interval=Interval.set(this,"fadeIn",[],250)};_s.fadeOut=function(){for(var i=0;i<this.hides.length;i++){this.hides[i].style.visibility="hidden"}};_s.fadeIn=function(){for(var i=0;i<this.hides.length;i++){this.hides[i].style.visibility="visible"}
Interval.clear(this.interval)};

/* - RollOutHide.js - */
// http://v2.shotview.com/portal_javascripts/RollOutHide.js?original=1
var _s=dojo.provide("at.arminformatik.ui").RollOutHide=function(){};var _p=_s.prototype;_s.behaviour=function(element){if(document.all&&!(document.opera)){var subContainer=document.createElement('div');while(element.childNodes.length>0){var child=element.childNodes[0];element.removeChild(child);subContainer.appendChild(child)}
element.appendChild(subContainer)}
element.onmouseout=function(){if(this.animation){this.animation.clearTimer();this.animation.duration=500;this.animation.custom(dojo.style.getOpacity(this),0)} else{if(document.all&&!document.opera){subContainer.style.display="none"} else{this.animation=dojo.fx.html.fadeOut(this,500)}}}
element.onmouseover=function(){if(this.animation){this.animation.clearTimer();this.animation.duration=100;this.animation.custom(dojo.style.getOpacity(this),1)} else{if(document.all&&!document.opera){subContainer.style.display="block"} else{this.animation=dojo.fx.html.fadeIn(this,150)}}}}

/* - HeightRelated.js - */
// http://v2.shotview.com/portal_javascripts/HeightRelated.js?original=1
var _s=dojo.provide("at.arminformatik.ui").HeightRelated=function(_1,_2){this.spreader=new Spreader();this.totalPercent=_1;this.totalSubtraction=_2;at.arminformatik.ui.ResizeEvent.addEventListener("onResize",this)};_p=_s.prototype;_p.behaviour=function(_3){this.spreader.add(_3)};_p.onResize=function(){this.spreader.set("style.height",((at.arminformatik.ui.ResizeEvent.getHeight()*this.totalPercent)-this.totalSubtraction)+"px")};

/* - Interval.js - */
// http://v2.shotview.com/portal_javascripts/Interval.js?original=1
var _s=Interval=function(){}
_s.set=function(scope,method,args,time,amount){if(amount==null||amount>0){if(!args){args=[]}
if(!this.content){this.content=[];this.count=0}
var id=this.count++;var obj={};obj.id=window.setInterval("Interval.execute("+id+");",time);obj.scope=scope;obj.method=method;obj.args=args;obj.amount=amount;obj.finished=false;this.content[id]=obj;return id}}
_s.clear=function(id){if(this.content[id]){this.content[id].finished=true}}
_s.execute=function(id){var exec=this.content[id];if(exec!=null){if(exec.finished){window.clearInterval(exec.id);delete this.content[id]} else{exec.amount--;if(exec.amount!=null&&exec.amount==0){this.clear(id)}
exec.scope[exec.method].apply(exec.scope,exec.args)}}}

/* - FullSizeImage.js - */
// http://v2.shotview.com/portal_javascripts/FullSizeImage.js?original=1
var _s=dojo.provide("at.arminformatik.ui").FullSizeImage=function(totalPercent,totalSubstraction,imageListManager){with(this){element=loader=fX=null;formerHeight=0;state=-1;newImage=null;imageInformations=null;image=null}
this.totalPercent=totalPercent?totalPercent:1;this.totalSubtraction=totalSubstraction?totalSubstraction:0;this.imageListManager=imageListManager;this.titles=new Spreader();this.photographers=new Spreader();this.descriptions=new Spreader();this.sizes=new Spreader();this.listeners=new Spreader();this.actionListeners=new Spreader();this.sameHeights=[];this.sameWidths=[];this.firstLoaded=false;this.notBigEnought=document.createElement('div');LocationManager.getInstance().addListener(this)}
_s.TRANS_GIF="transparent.gif";_s.SIZE_CHECK=1000;var _p=_s.prototype;_p.titleBehaviour=function(element){this.titles.add(element);this.updateFields(this.image)}
_p.descriptionBehaviour=function(element){this.descriptions.add(element);this.updateFields(this.image)}
_p.sizesBehaviour=function(element){this.sizes.add(element);this.updateFields(this.image)}
_p.photographerBehaviour=function(element){this.photographers.add(element);this.updateFields(this.image)}
_p.imageBehaviour=function(element){var scope=this;if(!this.element){this.element=element;this.state=-1;element.removeAttribute("height");at.arminformatik.ui.ResizeEvent.addEventListener("onResize",this);element.onclick=function(){scope.actionListeners.exec("onAction",[scope,scope.imageInformations])}}
this.updateSize()}
_p.notBigEnoughtBehaviour=function(element){this.notBigEnought=element}
_p.loaderBehaviour=function(element){this.loader=element;this.sameHeightBehaviour(element)}
_p.sameHeightBehaviour=function(element){this.sameHeights.push(element)}
_p.sameWidthBehaviour=function(element){this.sameWidths.push(element)}
_p.addActionListener=function(element){this.actionListeners.add(element)}
_p.onResize=function(height,width){this.updateSize();this.formerHeight=height}
_p.onStoreChange=function(changedFields){var lm=LocationManager.getInstance();var image;var imageparent;if(changedFields.i){image=changedFields.i;if(changedFields.c){imageparent=changedFields.c} else{imageparent=lm.getValue("c")}} else if(changedFields.c){image=lm.getValue("i");imageparent=changedFields.c} else{return}
try{var list=this.imageListManager.getImageLists()[imageparent];var imag=list.getImageById(image);this.setImage(imag)} catch(e){}}
_p.addListener=function(listener){this.listeners.add(listener);if(this.imageInformations){listener.onImageChange(this.imageInformations,this)}}
_p.updateSize=function(){var element=this.element;if(element){element.style.display="none";var realHeight=at.arminformatik.ui.ResizeEvent.getHeight();var realWidth=at.arminformatik.ui.ResizeEvent.getWidth();if(realWidth<500){this.notBigEnought.style.display="block"} else{this.notBigEnought.style.display="none";element.style.display="";if(realHeight<1){realHeight=1} else{if(realHeight>this.totalSubtraction){realHeight=realHeight*this.totalPercent-this.totalSubtraction} else{realHeight=1}}
this.realHeight=realHeight;if(this.firstLoaded){this.element.style.height=realHeight+"px"}
if(this.loader){this.loader.style.height=realHeight+"px"}
for(var i=0;i<this.sameHeights.length;i++){var sH=this.sameHeights[i];sH.style.height=realHeight+"px"}
for(var j=0;j<this.sameWidths.length;j++){var sH=this.sameWidths[j];sH.style.width=element.offsetWidth+"px"}
this.updateImageUrl()}}}
_p.updateImageUrl=function(){if(this.state==0){if(this.element.src==null||this.element.src==""){fineRez()} else{if(this.sizeCheckInterval){Interval.clear(this.sizeCheckInterval)}
this.sizeCheckInterval=Interval.set(this,"fineRez",[],at.arminformatik.ui.FullSizeImage.SIZE_CHECK,1)}}}
_p.checkImageLoaded=function(){if(this.element.height>10){this.firstLoaded=true;this.updateSize();Interval.clear(this.imageLoadInterval)}};_p.startImageLoadCheck=function(){if(!this.imageLoadInterval){this.imageLoadInterval=Interval.set(this,"checkImageLoaded",[],40)}};_p.fineRez=function(){var imgUrl=this.getImageUrl();if(this.element.src!=imgUrl){this.element.src=imgUrl;this.startImageLoadCheck()}};_p.getImageUrl=function(){return this.image+"getCustomSize?newHeight="+this.realHeight}
_p.setImage=function(informations){if(!informations||informations==this.imageInformations||informations==this.newImage){return}
if(this.listeners){this.listeners.exec("onImageChange",[informations,this])}
switch(this.state){case-1:this.state=0;this.fixImage(informations);this.startImageLoadCheck();return;case 4:this.fX.clearTimer();case 0:case 5:case 1:case 2:case 3:this.clearImage();this.newImage=informations;return}}
_p.fixImage=function(informations){this.image=informations.src;this.imageInformations=informations;if(informations.list){LocationManager.getInstance().store({i:informations.id,c:informations.list.id})}
this.updateImageUrl();this.updateFields(informations.title,informations.photographer,informations.description,informations.sizes)}
_p.clearImage=function(informations){this.state=2;dojo.style.setOpacity(this.element,0);this.activateCheck()}
_p.updateFields=function(title,photographer,description,sizes){this.titles.set("innerHTML",title);this.photographers.set("innerHTML",photographer);this.descriptions.set("innerHTML",description);this.sizes.set("innerHTML",sizes)}
_p.aniFadeOut=function(){var that=this;this.state=1;if(this.fX&&this.fX.clearTimer){this.fX.clearTimer()};this.fX=dojo.fx.html.fadeOut(this.element,250, function(){that.state=2;that.activateCheck()})}
_p.activateCheck=function(){this.checkIntervalId=Interval.set(this,"aniCheckLoadState",[],40)}
_p.deactivateCheck=function(){Interval.clear(this.checkIntervalId)}
_p.aniCheckLoadState=function(){with(this){switch(state){case 2:if(element.height<10){image=newImage.src;element.src=getImageUrl();state=3} else{if(element.getAttribute("src")!=at.arminformatik.ui.FullSizeImage.TRANS_GIF||element.getAttribute("src")!=newImage.src){element.removeAttribute("src");element.setAttribute("src",at.arminformatik.ui.FullSizeImage.TRANS_GIF);element.style.height="";element.style.width=""}}
return;case 3:if(element.height>10){this.deactivateCheck();aniResizeLoader()}
return}}}
_p.aniResizeLoader=function(){this.updateSize();if(this.loader){this.state=4;this.fX=new fx.Width(this.loader,{duration:250,onComplete:dojo.lang.hitch(this,"fadeIn")});this.fX.custom(this.loader.offsetWidth,this.element.offsetWidth)} else{this.fadeIn()}}
_p.fadeIn=function(){this.fX=dojo.fx.html.fadeIn(this.element,250,dojo.lang.hitch(this,this.endAnimation));this.state=5;this.fixImage(this.newImage)}
_p.endAnimation=function(){if(this.fX&&this.fX.clearTimer){this.fX.clearTimer()};this.state=0;this.fX=null;this.updateSize()}


/* - ImageData.js - */
// http://v2.shotview.com/portal_javascripts/ImageData.js?original=1
var _s=dojo.provide("at.arminformatik.ui").ImageData=function(id,src,title,photographer,description,sizes,list){this.src=src;this.id=id;this.title=title?title:"";this.photographer=photographer?photographer:"";this.description=description?description:"";this.description=this.description.split("\n").join("<br/>");this.sizes=sizes?sizes:"";this.list=list;this.next=null;this.previous=null}
var _p=_s.prototype;

/* - ImageList.js - */
// http://v2.shotview.com/portal_javascripts/ImageList.js?original=1
var _s=dojo.provide("at.arminformatik.ui").ImageList=function(name,id){this.images=[];this.listeners=new Spreader();this.name=name;this.length=0;this.id=id;this.imageIndex={};this.first=null;this.last=null}
var _p=_s.prototype;_p.addImage=function(image){this.length++;this.images.push(image);this.imageIndex[image.id]=image;this.listeners.exec("onNewImage",[image,this]);if(!this.first){this.first=image;this.last=image} else{this.last.next=image;image.previous=this.last;this.last=image}}
_p.getImage=function(no){return this.images[no]};_p.getImageById=function(id){return this.imageIndex[id]};_p.getName=function(){return this.name}
_p.getId=function(){return this.id}
_p.addListener=function(listener){this.listeners.add(listener)}
_p.removeListener=function(listener){this.listeners.remove(listener)}


/* - ImageListDisplay.js - */
// http://v2.shotview.com/portal_javascripts/ImageListDisplay.js?original=1
var _s=dojo.provide("at.arminformatik.ui").ImageListDisplay=function(imageDisplay,imageListClassName,listImageFormat){this.imageLists=[];this.cached={};this.imageIndex={};this.displayedList=null;this.cachingImage=null;this.imageDisplay=imageDisplay;this.imageListClassName=imageListClassName;this.listImageFormat=listImageFormat;var lm=LocationManager.getInstance();this.initImage=lm.getValue("i");this.initInPortfolio=lm.getValue("c");imageDisplay.addActionListener(this)}
var _p=_s.prototype;_p.setMainContainer=function(element){if(!this.element){this.element=element}}
_p.onAddImageList=function(imageList,multiListManager,selected){this.cache(imageList);imageList.addListener(this);if(selected){this.display(imageList)}}
_p.onListSelect=function(imageList,multiListManager){this.display(imageList);var image=imageList.getImage(0);if(image){this.imageDisplay.setImage(image)}}
_p.onNewImage=function(image,imageList){if((this.initImage==null&&this.imageDisplay.state==-1)||(image.id==this.initImage&&imageList.id==this.initInPortfolio)){this.imageDisplay.setImage(image)}
this.updateCache()}
_p.onAction=function(imageDisplay,imageInformations){if(imageInformations.next){imageDisplay.setImage(imageInformations.next)}}
_p.cache=function(imageList){if(!this.imageIndex[imageList.getId()]){var name=imageList.getId();this.imageIndex[name]=this.imageLists.push(imageList)-1;this.cached[name]=[];this.updateCache()}}
_p.updateCache=function(){if(!this.cachingImage){this.startCache()} else{this.checkCache()}}
_p.startCache=function(){if(this.displayedList){if(this.activateCache(this.displayedList)){return}}
for(var i=0;i<this.imageLists.length;i++){var list=this.imageLists[i];if(list!=this.displayedList){if(this.activateCache(this.imageLists[i])){return}}}}
_p.activateCache=function(imageList){var cachePos=this.getCachePosition(imageList);if(cachePos!=null){var img=imageList.getImage(cachePos);this.cached[imageList.getId()].push(img.title);this.doCache(img,imageList);return true} else{return false}}
_p.addImage=function(elem,image,list){var img=document.createElement("img");img.setAttribute("src",image.src+this.listImageFormat);img.setAttribute("title",image.title);img.image=image;if(elem.childNodes.length==0){img.className="firstImage"}
img.onImageChange=function(img,imageDisplay){if(img.src==this.image.src){this.onclick=null;if(this.className.indexOf("firstImage")==0){this.className="firstImage selected"} else{this.className="selected"}} else{if(!this.onclick){this.onclick=function(){imageDisplay.setImage(image)}}
if(this.className.indexOf("firstImage")==0){this.className="firstImage unselected"} else{this.className="unselected"}}}
this.imageDisplay.addListener(img);elem.appendChild(img);return img}
_p.getCachePosition=function(imageList){var cacheLength=this.cached[imageList.getId()].length;if(cacheLength<imageList.length){return cacheLength} else{return null}}
_p.doCache=function(image,imageList){var elem=this.getListElement(imageList);this.cachingImage=this.addImage(elem,image,list);this.checkCache()}
_p.checkCache=function(){if(this.cachingImage){var img=this.cachingImage;if(img.height>10){this.cachingImage=null;this.startCache()} else{Interval.set(this,"checkCache",[],40,1)}}}
_p.getHiddenHolder=function(){if(!this.hiddenHolder){this.hiddenHolder=document.createElement('div');this.hiddenHolder.id="imageListHidden";document.body.appendChild(this.hiddenHolder);with(this.hiddenHolder.style){position="absolute";left="-4000px";top="-4000px"}}
return this.hiddenHolder}
_p.getElementHolder=function(){if(!this.element){this.element=document.createElement('div');this.element.id="imageList";document.body.appendChild(this.element)}
return this.element}
_p.getListElement=function(imageList){var id="-imageList-"+imageList.getId();var elem=document.getElementById(id);if(!elem){elem=document.createElement("div");elem.id=id;elem.className=this.imageListClassName;this.getHiddenHolder().appendChild(elem)}
return elem}
_p.display=function(imageList){this.cache(imageList);if(this.displayedList){this.hide(this.displayedList)}
this.displayedList=imageList;var elem=this.getListElement(imageList);this.getHiddenHolder().removeChild(elem);this.getElementHolder().appendChild(elem);var img=imageList.getImage[0];if(img){this.imageDisplay.setImage(img)}}
_p.hide=function(imageList){var elem=this.getListElement(imageList);this.getElementHolder().removeChild(elem);this.getHiddenHolder().appendChild(elem)}


/* - ImageRetriever.js - */
// http://v2.shotview.com/portal_javascripts/ImageRetriever.js?original=1
var _s=dojo.provide("at.arminformatik.ui").ImageRetriever=function(manager){this.manager=manager}
var _p=_s.prototype;_p.retrievePortfolio=function(element){var l=element.childNodes.length;for(var i=0;i<l;i++){var elem=element.childNodes[i];switch(elem.nodeName.toLowerCase()){case "a":this.addTitle(elem)
break;case "ul":this.useData(elem);break}}}
_p.useData=function(element){var l=element.childNodes.length;for(var i=0;i<l;i++){var elem=element.childNodes[i];if(elem.nodeName.toLowerCase()=="a"&&elem.parentNode.nodeName.toLowerCase()=="li"){this.addData(elem)} else{this.useData(elem)}}}
_p.addTitle=function(element){var name=element.innerHTML;this.currentList=new at.arminformatik.ui.ImageList(name,element.id);this.manager.addImageList(this.currentList)}
_p.addData=function(element){var title=element.getAttribute("title");if(this.currentList){this.currentList.addImage(new at.arminformatik.ui.ImageData(element.id,element.getAttribute("href"),element.innerHTML,"",element.getAttribute("alt"),title,this.currentList))}}


/* - MultipleImageListManager.js - */
// http://v2.shotview.com/portal_javascripts/MultipleImageListManager.js?original=1
var _s=dojo.provide("at.arminformatik.ui").MultipleImageListManager=function(){this.imageLists={};this.currentSelected=null;this.listeners=new Spreader();LocationManager.getInstance().addListener(this)}
var _p=_s.prototype;_p.onStoreChange=function(changedFields){if(changedFields.c){this.selectImageList(changedFields.c)}}
_p.addListener=function(listener){this.listeners.add(listener);if(this.currentSelected){var list=this.imageLists[this.currentSelected]
if(list){this.listeners.exec("onListSelect",[list,this])}}}
_p.removeListener=function(listener){this.listeners.remove(listener)}
_p.getImageLists=function(){return this.imageLists}
_p.addImageList=function(imageList){this.imageLists[imageList.getId()]=imageList;if(!this.currentSelected){this.selectImageList(imageList.getId())}
this.listeners.exec("onAddImageList",[imageList,this,(this.currentSelected==imageList.getId())])}
_p.selectImageList=function(listName){if(this.currentSelected!=listName){this.currentSelected=listName;var list=this.imageLists[this.currentSelected];if(list){this.listeners.exec("onListSelect",[list,this])}}}


/* - ImageListButton.js - */
// http://v2.shotview.com/portal_javascripts/ImageListButton.js?original=1
var _s=dojo.provide("at.arminformatik.ui").ImageListButton=function(imageListManager){this.imageListManager=imageListManager}
var _p=_s.prototype;_p.setLink=function(element){element.removeAttribute("href");element.imageListManager=this.imageListManager;element.imageSrc=element.innerHTML;element.onmousedown=function(){this.imageListManager.selectImageList(this.getAttribute("rel"));return true};element.onAddImageList=function(list,imageManager,selected){if(selected){this.onListSelect(list)}};element.onListSelect=function(list){if(list.getName()==this.innerHTML){this.parentNode.className="selected"} else{if(this.parentNode.className=="selected"){this.parentNode.className="plain"}}};this.imageListManager.addListener(element)}


/* - Scrollbar.js - */
// http://v2.shotview.com/portal_javascripts/Scrollbar.js?original=1
var _s=dojo.provide("at.arminformatik.ui").Scrollbar=function(){Interval.set(this,"checkContent",[],50);Interval.set(this,"checkMousePosition",[],10);at.arminformatik.ui.ResizeEvent.addEventListener("onResize",this);with(document.body){onstopdrag=ondrag=onstartdrag=function(){return false}}
this.mouseX=0;this.mouseY=0;this.elementX=-1;this.elementY=-1;this.percentage=2;this.formerTime=new Date().getTime();this.isDragging=false}
var _p=_s.prototype;_p.onResize=function(){this.checkContent()}
_p.checkContent=function(){if(this.element&&this.element.firstChild&&this.bar&&this.background&&this.sideIdentifier){var backgroundWidth;with(this.background){if(style.display=="none"){style.display="block";backgroundWidth=offsetWidth;style.display="none"} else{backgroundWidth=offsetWidth}}
this.backgroundWidth=backgroundWidth;var contentWidth=this.element.firstChild.offsetWidth;var perc=(backgroundWidth/contentWidth);this.percentage=perc;if(perc>1){this.hideBar()} else{this.showBar(perc)}}}
_p.checkMousePosition=function(){with(this){if(!isDragging){var time=new Date().getTime();formerTime=time;if(percentage<=1&&mouseY>elementY&&mouseY<elementY+60){var perc=0.1;var size=this.backgroundWidth*perc;var diff=mouseX-elementX;var factor=2;var maxspeed=200;if(diff>0&&diff<size){var speedperc=1/size*(size-diff);movePosition(((maxspeed*speedperc)-(maxspeed*speedperc)/factor*(1-speedperc))/12.5);return}
diff=(elementX+background.offsetWidth)-mouseX;if(diff>0&&diff<size){var speedperc=1/size*(size-diff);movePosition(-((maxspeed*speedperc)-(maxspeed*speedperc)/factor*(1-speedperc))/12.5);return}}}}}
_p.updatePosition=function(){with(this){checkPosition();var pos=(-100/background.offsetWidth*(percentage*element.firstChild.offsetLeft));if(pos<0){pos=0}
sideIdentifier.style.width=bar.style.left=Math.round(pos+0.1)+"%"}}
_p.showBar=function(size){with(this.background.style){if(display=="none") display="block"}
this.bar.style.width=Math.round(size*100)+"%";this.updatePosition()}
_p.checkPosition=function(){if(this.element&&this.background){var elem=this.element.firstChild;var backWidth=this.background.offsetWidth;var elemWidth=elem.offsetWidth;var min=backWidth-elemWidth;var max=0;var pos=elem.offsetLeft;if(pos<min){elem.style.left=min+"px"} else if(pos>max){elem.style.left=max+"px"}}}
_p.hideBar=function(){this.background.style.display="none"}
_p.setMousePosition=function(x,y){this.mouseX=x;this.mouseY=y;var elem=this.element;var parent=elem.offsetParent;var targetX=elem.offsetLeft;var targetY=elem.offsetTop;while(parent){targetX+=parent.offsetLeft;targetY+=parent.offsetTop;parent=parent.offsetParent}
this.elementX=targetX;this.elementY=targetY}
_p.setElement=function(elem){this.element=elem;var scope=this;elem.parentNode.onmouseout=function(e){this.onmousemove(e)}
elem.parentNode.onmouseover=function(e){this.onmousemove(e)}
elem.parentNode.onmousemove=function(e){scope.setMousePosition(e?e.clientX:event.clientX,e?e.clientY:event.clientY)}}
_p.leftClick=function(){with(this){setPosition(getCurrentPosition()+background.offsetWidth)}}
_p.rightClick=function(){with(this){setPosition(getCurrentPosition()-background.offsetWidth)}}
_p.setPosition=function(target){with(this){var min=background.offsetWidth-element.firstChild.offsetWidth;if(target>0){target=0} else if(target<min){target=Math.round(min)}
element.firstChild.style.left=Math.round(target)+"px";checkContent()}}
_p.setBar=function(elem){this.bar=elem;with(elem){style.display="block";onstopdrag=ondrag=onstartdrag=function(){return false}}
var scope=this;elem.onmousemovePattern=function(e){var ev=e?e:event;var posX=ev.clientX;var from=scope.startDragPos;var amount=posX-scope.startDragMousePosX;var target=Math.round(from-(amount/scope.percentage));scope.setPosition(target)};elem.onmouseover=function(e){if(!document.all){document.getElementById('visual-portal-wrapper').className="disableUserSelect"}};elem.onmouseout=function(e){if(!scope.isDragging&&!document.all){document.getElementById('visual-portal-wrapper').className=""}};elem.onmousedown=function(e){if(!scope.isDragging){scope.setMousePosition(e);scope.startDragPos=scope.getCurrentPosition();scope.startDragMousePosX=e?e.clientX:event.clientX;scope.isDragging=true;document.onmouseout=function(e){if(!e) e=event;if(!e.relatedTarget&&!e.toElement){scope.bar.onmouseup(e)}}
document.body.onmouseup=this.onmouseup;document.body.onmousemove=this.onmousemovePattern}};elem.ondrag=function(){return false};elem.onselectstart=function(){return false};elem.onmouseup=function(e){scope.isDragging=false;scope.setMousePosition(e?e.clientX:event.clientX,e?e.clientY:event.clientY);document.body.onmouseup=null;document.body.onmousemove=null;document.onmouseout=null};elem.onclick=function(){scope.background.barClicked=true}}
_p.getCurrentPosition=function(){return this.element.firstChild.offsetLeft}
_p.setSideIdentifier=function(elem){this.sideIdentifier=elem;var scope=this;elem.onclick=function(){scope.background.leftClick=true}}
_p.movePosition=function(amount){this.checkPosition();this.setPosition(this.getCurrentPosition()+amount)}
_p.setBackground=function(elem){this.background=elem;var scope=this;this.background.onclick=function(){if(this.leftClick){this.leftClick=false;scope.leftClick()} else if(this.barClicked){this.barClicked=false} else{scope.rightClick()}}
this.background.style.display="none"}


/* - VerticalScrollbar.js - */
// http://v2.shotview.com/portal_javascripts/VerticalScrollbar.js?original=1
var _s=dojo.provide("at.arminformatik.ui").VerticalScrollbar=function(){Interval.set(this,"checkContent",[],50);Interval.set(this,"checkMousePosition",[],10);at.arminformatik.ui.ResizeEvent.addEventListener("onResize",this);with(document.body){onstopdrag=ondrag=onstartdrag=function(){return false}}
this.mouseX=0;this.mouseY=0;this.elementX=-1;this.elementY=-1;this.percentage=2;this.formerTime=new Date().getTime();this.isDragging=false}
var _p=_s.prototype;_p.onResize=function(){this.checkContent()}
_p.checkContent=function(){if(this.element&&this.element.firstChild&&this.bar&&this.background&&this.sideIdentifier){var backgroundHeight;with(this.background){if(style.display=="none"){style.display="block";backgroundHeight=offsetHeight;style.display="none"} else{backgroundHeight=offsetHeight}}
this.backgroundHeight=backgroundHeight;var contentHeight=this.element.firstChild.offsetHeight;var perc=(backgroundHeight/contentHeight);this.percentage=perc;if(perc>1){this.hideBar()} else{this.showBar(perc)}}}
_p.checkMousePosition=function(){with(this){if(!isDragging){var time=new Date().getTime();formerTime=time;var size=240;if(percentage<=1&&mouseX>elementX&&mouseX<elementX+120){var perc=0.4;var size=this.backgroundHeight*perc;var diff=mouseY-elementY;var factor=2;var maxspeed=200;if(diff>0&&diff<size){var speedperc=1/size*(size-diff);movePosition(((maxspeed*speedperc)-(maxspeed*speedperc)/factor*(1-speedperc))/12.5);return}
diff=(elementY+background.offsetHeight)-mouseY;if(diff>0&&diff<size){var speedperc=1/size*(size-diff);movePosition(-((maxspeed*speedperc)-(maxspeed*speedperc)/factor*(1-speedperc))/12.5);return}}}}}
_p.updatePosition=function(){with(this){checkPosition();var pos=(-100/background.offsetHeight*(percentage*element.firstChild.offsetTop));if(pos<0){pos=0}
try{sideIdentifier.style.height=bar.style.top=Math.round(pos+0.1)+"%"} catch(e){}}}
_p.showBar=function(size){with(this.background.style){if(display=="none") display="block"}
this.bar.style.height=Math.round(size*100)+"%";this.updatePosition()}
_p.checkPosition=function(){if(this.element&&this.background){var elem=this.element.firstChild;var backHeight=this.background.offsetHeight;var elemHeight=elem.offsetHeight;var min=backHeight-elemHeight;var max=0;var pos=elem.offsetTop;if(pos<min){elem.style.top=min+"px"} else if(pos>max){elem.style.top=max+"px"}}}
_p.hideBar=function(){this.background.style.display="none"}
_p.setMousePosition=function(x,y){this.mouseX=x;this.mouseY=y;var elem=this.element;var parent=elem.offsetParent;var targetX=elem.offsetLeft;var targetY=elem.offsetTop;while(parent){targetX+=parent.offsetLeft;targetY+=parent.offsetTop;parent=parent.offsetParent}
this.elementX=targetX;this.elementY=targetY}
_p.setElement=function(elem){this.element=elem;var scope=this;elem.parentNode.onmouseout=function(e){this.onmousemove(e)}
elem.parentNode.onmouseover=function(e){this.onmousemove(e)}
elem.parentNode.onmousemove=function(e){scope.setMousePosition(e?e.clientX:event.clientX,e?e.clientY:event.clientY)}}
_p.topClick=function(){with(this){setPosition(getCurrentPosition()+background.offsetHeight)}}
_p.bottomClick=function(){with(this){setPosition(getCurrentPosition()-background.offsetHeight)}}
_p.setPosition=function(target){with(this){var min=background.offsetHeight-element.firstChild.offsetHeight;if(target>0){target=0} else if(target<min){target=Math.round(min)}
element.firstChild.style.top=Math.round(target)+"px";checkContent()}}
_p.setBar=function(elem){this.bar=elem;with(elem){style.display="block";onstopdrag=ondrag=onstartdrag=function(){return false}}
var scope=this;elem.onmousemovePattern=function(e){var ev=e?e:event;var posY=ev.clientY;var from=scope.startDragPos;var amount=posY-scope.startDragMousePosY;var target=Math.round(from-(amount/scope.percentage));scope.setPosition(target)};elem.onmouseover=function(e){if(!document.all){document.getElementById('visual-portal-wrapper').className="disableUserSelect"}};elem.onmouseout=function(e){if(!scope.isDragging&&!document.all){document.getElementById('visual-portal-wrapper').className=""}};elem.onmousedown=function(e){if(!scope.isDragging){scope.setMousePosition(e);scope.startDragPos=scope.getCurrentPosition();scope.startDragMousePosY=e?e.clientY:event.clientY;scope.isDragging=true;document.onmouseout=function(e){if(!e) e=event;if(!e.relatedTarget&&!e.toElement){scope.bar.onmouseup(e)}}
document.body.onmouseup=this.onmouseup;document.body.onmousemove=this.onmousemovePattern}};elem.ondrag=function(){return false};elem.onselectstart=function(){return false};elem.onmouseup=function(e){scope.isDragging=false;scope.setMousePosition(e?e.clientX:event.clientX,e?e.clientY:event.clientY);document.body.onmouseup=null;document.body.onmousemove=null;document.onmouseout=null};elem.onclick=function(){scope.background.barClicked=true}}
_p.getCurrentPosition=function(){return this.element.firstChild.offsetTop}
_p.setSideIdentifier=function(elem){this.sideIdentifier=elem;var scope=this;elem.onclick=function(){scope.background.topClick=true}}
_p.movePosition=function(amount){this.setPosition(this.getCurrentPosition()+amount)}
_p.setBackground=function(elem){this.background=elem;var scope=this;this.background.onclick=function(){if(this.topClick){this.topClick=false;scope.topClick()} else if(this.barClicked){this.barClicked=false} else{scope.bottomClick()}}
this.background.style.display="none"}


/* - EventList.js - */
// http://v2.shotview.com/portal_javascripts/EventList.js?original=1
var _s=dojo.provide("at.arminformatik.ui").EventList=function(){this.element}
_s.setMainContainer=function(element){this.element=element}
_s.hideElementDelayed=function(elem,scopedElem){this.hideElem=elem;this.hideScopedElem=scopedElem
this.interval=Interval.set(this,"hideImmediatly",[],400,1)}
_s.hideImmediatly=function(){this.stopHide();var elem=this.hideElem;var scopedElem=this.hideScopedElem;if(elem&&elem.parentNode){elem.parentNode.removeChild(elem)}
if(scopedElem){dojo.style.setOpacity(scopedElem,0)}}
_s.stopHide=function(){if(this.interval){this.interval=null;Interval.clear(this.interval)}}
_s.buttonBehaviour=function(element){var scope=this;element.style.display="block";var elem=document.createElement('img');elem.src=element.getAttribute("href")+"image_eventList";if(element.className=="image"){element.onmouseover=function(){if(!elem.parentNode){at.arminformatik.ui.EventList.hideImmediatly();this.onmouseout();scope.element.appendChild(elem);dojo.fx.html.fadeIn(scope.element,250)} else{at.arminformatik.ui.EventList.stopHide()}}}
element.onmouseout=function(){if(elem.parentNode){at.arminformatik.ui.EventList.hideElementDelayed(elem,scope.element)}}}


/* - IFrameLocationHandler.js - */
// http://v2.shotview.com/portal_javascripts/IFrameLocationHandler.js?original=1
_s=IFrameLocationHandler=function(callBack,iframeid){this.callBack=callBack;this.windowlocator=new UrlKeeper();var frame=this.frame=document.createElement("iframe");frame.setAttribute("id",iframeid);frame.setAttribute("name",iframeid);frame.setAttribute("src","mockpage?hash="+this.windowlocator.getHashValue());frame.style.display="none";document.body.appendChild(frame);this.iframeid=iframeid;this.locator=new UrlKeeper("?hash=");this.locator.getLocation=function(){var frm=frame;var loc="";if(typeof frm.getLocation=="function"){loc=frm.getLocation()} else{loc=frm.getAttribute("src")}
return loc}
Interval.set(this,"checkForChange",[],200,1)}
_p=_s.prototype;_p.store=function(value){if(this.locator&&this.locator.createLocation){var url=this.locator.createLocation(value);this.frame.setAttribute("src",url)}}
_p.getHashValue=function(){return this.locator.getHashValue()}
_p.checkForChange=function(formerHash){var hash=this.getHashValue();if(hash!=formerHash){this.callBack.onValueChange(hash);window.location.href=this.windowlocator.createLocation(hash)}
Interval.set(this,"checkForChange",[hash],200,1)}


/* - LocationManager.js - */
// http://v2.shotview.com/portal_javascripts/LocationManager.js?original=1
_s=LocationManager=function(){this.persisted={};this.listeners=new Spreader();this.inited=false}
_s.getInstance=function(){if(!this.instance){this.instance=new LocationManager()}
return this.instance}
_p=_s.prototype;_p.getLocationHandler=function(){if(!this.locationHandler){if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){this.locationHandler=new IFrameLocationHandler(this,"locationIFrame")} else{this.locationHandler=new UrlLocationHandler(this)}}
return this.locationHandler}
_p.addListener=function(listener){this.listeners.add(listener)}
_p.doStore=function(id,value){if(id!=null&&(!this.persisted[id]||this.persisted[id]!=value)){if(value!=null){this.persisted[id]=value} else{delete this.persisted[id]}
return true}
return false}
_p.store=function(idMap){var changed=false;for(var i in idMap){if(this.doStore(i,idMap[i])){changed=true}}
if(changed){var temp=this.getMergedValues();this.getLocationHandler().store(temp);return true}
return false}
_p.checkForUpdate=function(){this.parseMergedValues(this.getLocationHandler().getHashValue())}
_p.onValueChange=function(value){this.parseMergedValues(value)}
_p.getValue=function(id){if(!this.inited){this.parseMergedValues(this.getLocationHandler().getHashValue())}
return this.persisted[id]}
_p.getMergedValues=function(){var result="";for(var i in this.persisted){if(result!="")
result+=","
result+=i+":"+this.persisted[i]}
return result}
_p.parseMergedValues=function(str){this.inited=true;if(str){var splitStr=str.split(",");for(var i=0;i<splitStr.length;i++){var pair=splitStr[i];var j=pair.indexOf(":");var key=pair.substring(0,j);var value=pair.substr(j+1);var changedFields={};var added=false;if(key&&key!=""&&value!=null){if(this.doStore(key,value)){changedFields[key]=value;added=true}}
if(added){this.listeners.exec("onStoreChange",[changedFields])}}}}


/* - UrlKeeper.js - */
// http://v2.shotview.com/portal_javascripts/UrlKeeper.js?original=1
_s=UrlKeeper=function(dividingCharacter){this.dividingCharacter=dividingCharacter?dividingCharacter:"#"}
_p=_s.prototype;_p.getLocation=function(){return window.location.href}
_p.getHashValue=function(){var url=this.getLocation();if(url.indexOf(this.dividingCharacter)>-1){var url_elements=url.split(this.dividingCharacter);return url_elements[url_elements.length-1]}
return null}
_p.getHref=function(){var url=this.getLocation();var url_elements=url.split(this.dividingCharacter);return url_elements[0]}
_p.createLocation=function(value){var href=this.getHref();return href+this.dividingCharacter+value}


/* - UrlLocationHandler.js - */
// http://v2.shotview.com/portal_javascripts/UrlLocationHandler.js?original=1
_s=UrlLocationHandler=function(callBack){this.callBack=callBack;this.keeper=new UrlKeeper();this.checkForChange()}
_p=_s.prototype;_p.getHashValue=function(){return this.keeper.getHashValue()}
_p.store=function(value){window.location.href=this.keeper.createLocation(value)}
_p.checkForChange=function(formerHash){var hash=this.keeper.getHashValue();if(hash!=formerHash){this.callBack.onValueChange(hash)}
Interval.set(this,"checkForChange",[hash],200,1)}
