if(typeof classBehaviour=="undefined"){function ClassBehaviour(){this.handlers=[]}classBehaviour=new ClassBehaviour}function Blink(){this.name="blink";this.nodes=[];this.start=function(a){if(a.className.indexOf("blinkon")<0)a.className+=" blinkon";this.nodes[this.nodes.length]=[a,null,1024];this.loop(this.nodes.length-1)};this.loop=function(a){blinkObject=this.nodes[a][0];blinkObject.className=blinkObject.className.indexOf("blinkoff")>-1?blinkObject.className.replace("blinkoff","blinkon"):blinkObject.className.replace("blinkon","blinkoff");this.nodes[a][1]=setTimeout("classBehaviour.blink.loop("+a+")",this.nodes[a][2])}}classBehaviour.blink=new Blink;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.blink;function AnimatedClassName(){this.name="animatedClassName";this.index=0;this.interval=null;this.start=function(a){a.id=a.id?a.id:this.name+this.index++;animationDelay=parseInt(classBehaviour.utilities.getClassParameter(a,"delay","500"));onlyOnFocus=classBehaviour.utilities.getClassParameter(a,"focus","no")=="yes";if(onlyOnFocus){a.className+=" interaction_no";a.onmouseover=this.play;a.onmouseout=this.stop;a.onfocus=this.play;a.onblur=this.stop}else this.interval=setInterval('classBehaviour.animatedClassName.loop("'+a.id+'")',animationDelay)};this.play=function(b){var a=typeof this.nodeName=="undefined"?b:this;a.className=a.className.replace("interaction_no","interaction_yes");classBehaviour.animatedClassName.loop(a.id)};this.stop=function(b){var a=typeof this.nodeName=="undefined"?b:this;a.className=a.className.replace("interaction_yes","interaction_no")};this.loop=function(a){animNode=document.getElementById(a);animationStep=parseInt(classBehaviour.utilities.getClassParameter(animNode,"step","0"));animationLoop=parseInt(classBehaviour.utilities.getClassParameter(animNode,"loop","4"));animationRepeat=parseInt(classBehaviour.utilities.getClassParameter(animNode,"repeat","0"));nextAnimationStep=animationStep<animationLoop?animationStep+1:animationRepeat;animNode.className=animNode.className.replace("step_"+animationStep+" ","step_"+nextAnimationStep+" ");interaction=classBehaviour.utilities.getClassParameter(animNode,"interaction",null);animationDelay=parseInt(classBehaviour.utilities.getClassParameter(animNode,"delay","500"));if(interaction=="yes")setTimeout('classBehaviour.animatedClassName.loop("'+a+'")',animationDelay);else interaction=="no"&&classBehaviour.utilities.setClassParameter(animNode,"step","0")}}classBehaviour.animatedClassName=new AnimatedClassName;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.animatedClassName;function ClassMouseHover(){this.name="classMouseHover";this.start=function(a){a.onmouseover=this.addHover;a.onmouseout=this.remHover};this.hasNoStateClass=function(a){return a.className.indexOf("link")<0&&a.className.indexOf("hover")<0&&a.className.indexOf("active")<0};this.addHover=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.classMouseHover;a.className=c.hasNoStateClass(a)?"hover "+a.className:a.className.replace("link","hover");allImages=a.getElementsByTagName("IMG");if(allImages.length>0)allImages[0].src=allImages[0].src.replace("_link","_hover")};this.remHover=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.classMouseHover;a.className=c.hasNoStateClass(a)?"link "+a.className:a.className.replace("hover","link");allImages=a.getElementsByTagName("IMG");if(allImages.length>0)allImages[0].src=allImages[0].src.replace("_hover","_link")};this.addActive=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.classMouseHover;a.className=a.className.replace("link","active");a.className=a.className.replace("hover","active");if(c.hasNoStateClass(a))a.className="active "+a.className}}classBehaviour.classMouseHover=new ClassMouseHover;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.classMouseHover;function PseudoHover(){this.name="pseudoHover";this.index=0;this.timeout=null;this.start=function(b){allItems=b.getElementsByTagName("LI");for(var a=0;a<allItems.length;a++)if(allItems[a].nodeName=="LI"){allItems[a].className+=allItems[a].className.indexOf("link")<0?" link":"";allItems[a].onmouseover=this.hoverOver;allItems[a].onmouseout=this.hoverOff}};this.hoverOver=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.pseudoHover;clearTimeout(b.timeout);panelNode=a.getElementsByTagName("UL");if(panelNode.length>0){panelNode[0].id=panelNode[0].id?panelNode[0].id:b.name+b.index++;classBehaviour.fader.reveal(panelNode[0].id,panelNode[0].offsetWidth,panelNode[0].offsetHeight,100,25)}a.className=a.className.replace("link","hover")};this.hoverOff=function(d){var b=typeof this.nodeName=="undefined"?d:this,c=classBehaviour.pseudoHover;clearTimeout(c.timeout);panelNode=b.getElementsByTagName("UL");if(panelNode.length>0)c.timeout=setTimeout('classBehaviour.fader.vanish("'+panelNode[0].id+'")',250);peersAndChildPanels=b.parentNode.getElementsByTagName("UL");for(var a=0;a<peersAndChildPanels.length;a++)peersAndChildPanels[a].id&&peersAndChildPanels[a]!=panelNode[0]&&peersAndChildPanels[a].parentNode.parentNode!=panelNode[0]&&classBehaviour.fader.vanish(peersAndChildPanels[a].id);b.className=b.className.replace("hover","link")}}classBehaviour.pseudoHover=new PseudoHover;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.pseudoHover;function SrcMouseHover(){this.name="srcMouseHover";this.cache=[];this.start=function(a){this.cacheImages(a);a.onmouseover=this.addHover;a.onmouseout=this.remHover};this.cacheImages=function(c){var a=typeof this.nodeName=="undefined"?c:this;if(!a.src)a=a.getElementsByTagName("IMG")[0];var b=this.cache.length;this.cache[b]=new Image;this.cache[b].src=a.src.replace("_link","_hover");this.cache[b+1]=new Image;this.cache[b+1].src=a.src.replace("_link","_active")};this.addActive=function(b){var a=typeof this.nodeName=="undefined"?b:this;if(a.nodeName!="IMG")a=a.getElementsByTagName("IMG")[0];a.src=a.src.replace("_link","_active");a.src=a.src.replace("_hover","_active")};this.addHover=function(b){var a=typeof this.nodeName=="undefined"?b:this;if(!a.src)a=a.getElementsByTagName("IMG")[0];a.src=a.src.replace("_link","_hover")};this.remHover=function(b){var a=typeof this.nodeName=="undefined"?b:this;if(!a.src)a=a.getElementsByTagName("IMG")[0];a.src=a.src.replace("_hover","_link")}}classBehaviour.srcMouseHover=new SrcMouseHover;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.srcMouseHover;function FadeMouseHover(){this.name="fadeMouseHover";this.index=0;this.timeOut=null;this.start=function(a){this.setUpFader(a)};this.setUpFader=function(b){var a=typeof this.nodeName=="undefined"?b:this;a.id=a.id?a.id:this.name+this.index++;a.className=a.className.replace(this.name,"");clonedNode=a.cloneNode(true);clonedNode.style.position="absolute";clonedNode.className=clonedNode.className.replace(this.name,"hover");if(clonedNode.src)clonedNode.src=clonedNode.src.replace("_link.","_hover.");clonedNode.id=clonedNode.id?clonedNode.id:this.name+this.index++;a.parentNode.insertBefore(clonedNode,a);newNode=classBehaviour.utilities.previousNode(a);classBehaviour.fader.setFade(newNode,0);newNode.onmouseover=this.addHover;newNode.onmouseout=this.remHover};this.addHover=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.fadeMouseHover;if(classBehaviour.fader.getFade(a)%100==0)classBehaviour.fader.fadeIn(a.id,20,50,"");else c.timeOut=setTimeout('classBehaviour.fadeMouseHover.addHover(document.getElementById("'+a.id+'"))',50)};this.remHover=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.fadeMouseHover;if(classBehaviour.fader.getFade(a)%100==0)classBehaviour.fader.fadeOut(a.id,20,50,"");else c.timeOut=setTimeout('classBehaviour.fadeMouseHover.remHover(document.getElementById("'+a.id+'"))',100)}}classBehaviour.fadeMouseHover=new FadeMouseHover;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.fadeMouseHover;document.writeln("<style>.hideThisNode{overflow:hidden; visibility:hidden; height:1px;}</style>");function HideThisNode(){this.name="hideThisNode";this.start=function(a){a.style.overflow="hidden";a.style.visibility="hidden";a.style.height="1px";a.className=a.className.replace("showThisNode","hideThisNode")}}classBehaviour.hideThisNode=new HideThisNode;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.hideThisNode;document.writeln("<style>.ShowThisNode{overflow:visible; visibility:visible; height:auto;}</style>");function ShowThisNode(){this.name="showThisNode";this.start=function(a){a.style.overflow="visible";a.style.visibility="visible";a.style.height="auto";a.className=a.className.replace("hideThisNode","showThisNode")}}classBehaviour.showThisNode=new ShowThisNode;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.showThisNode;document.writeln("<style>.toggleNextNode{cursor:pointer;}</style>");function ToggleNextNode(){this.name="toggleNextNode";this.step=20;this.delay=10;this.index=0;this.start=function(a){a.onclick=this.toggle;a.id=a.id?a.id:this.name+this.index++;autoDelay=classBehaviour.utilities.getClassParameter(a,"auto",null);if(autoDelay){this.index++;a.id=a.id?a.id:this.name+this.index;setTimeout('classBehaviour.toggleNextNode.toggle(document.getElementById("'+a.id+'"))',autoDelay)}};this.shrink=function(b,a,c){var d=classBehaviour.toggleNextNode;b.className=b.className.replace("active","link");b.parentNode.className=b.parentNode.className.replace("active","link");if(a.offsetHeight>d.step){heightBefore=a.style.height;a.style.overflow="hidden";a.style.visibility="visible";a.style.height=a.offsetHeight-d.step+"px";heightAfter=a.style.height;c=heightBefore==heightAfter?classBehaviour.hideThisNode.start(a):false}else classBehaviour.hideThisNode.start(a);return c};this.grow=function(b,a,d){var e=classBehaviour.toggleNextNode;b.className=b.className.replace("link","active").replace("hover","active");b.parentNode.className=b.parentNode.className.replace("link","active").replace("hover","active");totalHeight=0;contents=a.childNodes;for(var c=0;c<contents.length;c++)totalHeight+=contents[c].offsetHeight?contents[c].offsetHeight:0;if(a.offsetHeight<totalHeight-e.step){heightBefore=a.style.height;a.style.overflow="hidden";a.style.visibility="visible";a.style.height=a.offsetHeight+e.step+"px";heightAfter=a.style.height;d=heightBefore==heightAfter?classBehaviour.showThisNode.start(a):(d=false)}else classBehaviour.showThisNode.start(a);return d};this.findContainer=function(a,b){if(b)for(var c=0;c<parseInt(b);c++)a=a.parentNode;targetObject=classBehaviour.utilities.nextNode(a);return targetObject};this.toggle=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.toggleNextNode;targetLabel=b;targetContainerId=classBehaviour.utilities.getClassParameter(targetLabel,"id",null);targetRecursion=classBehaviour.utilities.getClassParameter(targetLabel,"parent",null);targetContainer=targetContainerId?document.getElementById(targetContainerId):a.findContainer(targetLabel,targetRecursion);if(targetContainer.className.indexOf("hideThisNode")<0&&targetContainer.className.indexOf("showThisNode")<0)targetContainer.className+=" showThisNode";targetGrows=targetContainer.className.indexOf("hideThisNode")>-1;a.update(targetLabel.id,targetGrows);return false};this.update=function(d,b){var a=classBehaviour.toggleNextNode;finished=true;targetLabel=document.getElementById(d);targetContainerId=classBehaviour.utilities.getClassParameter(targetLabel,"id",null);targetFamily=classBehaviour.utilities.getClassParameter(targetLabel,"family",null);targetRecursion=classBehaviour.utilities.getClassParameter(targetLabel,"parent",null);targetContainer=targetContainerId?document.getElementById(targetContainerId):a.findContainer(targetLabel,targetRecursion);allNodes=classBehaviour.utilities.getElementsByClassName(a.name);for(var c=0;c<allNodes.length;c++){peerLabel=allNodes[c];peerContainerId=classBehaviour.utilities.getClassParameter(peerLabel,"id",null);peerFamily=classBehaviour.utilities.getClassParameter(peerLabel,"family",null);peerRecursion=classBehaviour.utilities.getClassParameter(peerLabel,"parent",null);peerContainer=peerContainerId?document.getElementById(peerContainerId):a.findContainer(peerLabel,peerRecursion);if(peerFamily==targetFamily&&peerFamily!=null&&peerContainer.className.indexOf("hideThisNode")<0&&peerContainer!=targetContainer)finished=this.shrink(peerLabel,peerContainer,finished);else if(peerLabel.id==targetLabel.id&&!b)finished=this.shrink(targetLabel,targetContainer,finished);else if(peerLabel.id==targetLabel.id&&b)finished=this.grow(targetLabel,targetContainer,finished)}if(!finished)setTimeout("classBehaviour.toggleNextNode.update('"+d+"',"+b+")",a.delay);else document.body.className.indexOf("resizeIframe")>-1&&classBehaviour.resizeIframe.delay()}}classBehaviour.toggleNextNode=new ToggleNextNode;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.toggleNextNode;function TabbedContent(){this.name="tabbedContent";this.start=function(b){allLists=b.getElementsByTagName("ul");allTabs=allLists[0].getElementsByTagName("a");openedTab=null;for(var a=0;a<allTabs.length;a++){tabId=allTabs[a].href.split("#")[1];allTabs[a].onclick=this.open;if(allTabs[a].className.indexOf("closedTab")<0&&allTabs[a].className.indexOf("openedTab")<0)allTabs[a].className+=" closedTab";document.getElementById(tabId).style.display="none";if(document.location.href.indexOf(allTabs[a].href)>-1)openedTab=allTabs[a];if(allTabs[a].className.indexOf("openedTab")>-1)openedTab=allTabs[a]}pager=allLists[allLists.length-1].className.indexOf("contentPager")>-1?allLists[allLists.length-1]:null;if(pager!=null){pager.getElementsByTagName("button")[0].onclick=this.previous;pager.getElementsByTagName("button")[1].onclick=this.next}openedTab!=null&&this.open(openedTab,true)};this.next=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.tabbedContent;pagerInfo=a.parentNode.parentNode.getElementsByTagName("span")[0].firstChild.nodeValue;currentPage=parseInt(pagerInfo.split("/")[0]);totalPages=parseInt(pagerInfo.split("/")[1]);nextPage=currentPage<totalPages?currentPage+1:1;tabStrip=a.parentNode.parentNode.parentNode.getElementsByTagName("ul")[0];targetTab=tabStrip.getElementsByTagName("a")[nextPage-1];c.open(targetTab)};this.previous=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.tabbedContent;pagerInfo=a.parentNode.parentNode.getElementsByTagName("span")[0].firstChild.nodeValue;currentPage=parseInt(pagerInfo.split("/")[0]);totalPages=parseInt(pagerInfo.split("/")[1]);previousPage=currentPage>1?currentPage-1:totalPages;tabStrip=a.parentNode.parentNode.parentNode.getElementsByTagName("ul")[0];targetTab=tabStrip.getElementsByTagName("a")[previousPage-1];c.open(targetTab)};this.open=function(g,e){for(var a=typeof this.nodeName=="undefined"?g:this,h=classBehaviour.tabbedContent,d=a.parentNode.parentNode.getElementsByTagName("a"),b=null,f=0,c=0;c<d.length;c++){if(d[c].className.indexOf("openedTab")>-1)b=d[c];if(d[c]==a)f=c}if(b!=a||e){if(b){b.className=b.className.replace("openedTab","closedTab");tabImages=b.getElementsByTagName("img");if(tabImages.length>0)tabImages[0].src=tabImages[0].src.replace("_active","_link");prevContentId=b.href.split("#")[1]}else prevContentId=null;a.className=a.className.replace("closedTab","openedTab");tabImages=a.getElementsByTagName("img");if(tabImages.length>0)tabImages[0].src=tabImages[0].src.replace("_link","_active").replace("_hover","_active");nextContentId=a.href.split("#")[1];tabHeight=classBehaviour.utilities.getClassParameter(a.parentNode.parentNode.parentNode,"off","0");isAnimated=e?"no":classBehaviour.utilities.getClassParameter(a,"animated","yes");if(isAnimated=="yes"){if(b)document.getElementById(prevContentId).style.position="absolute";if(b)document.getElementById(prevContentId).style.top=tabHeight+"px";document.getElementById(nextContentId).style.position="relative";if(b)document.getElementById(nextContentId).style.top="0px";classBehaviour.fader.crossFade(nextContentId,prevContentId,0,10,50,null)}else{if(b)document.getElementById(prevContentId).style.display="none";document.getElementById(nextContentId).style.display="block"}pager=a.parentNode.parentNode.parentNode.getElementsByTagName("ul")[a.parentNode.parentNode.parentNode.getElementsByTagName("ul").length-1];pager.getElementsByTagName("span")[0].firstChild.nodeValue=f+1+"/"+d.length}a.blur();return false}}classBehaviour.tabbedContent=new TabbedContent;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.tabbedContent;document.all&&(navigator.userAgent.indexOf("MSIE 6.0")>-1||navigator.userAgent.indexOf("MSIE 5")>-1)&&navigator.userAgent.indexOf("Opera")<0&&document.writeln("<style>img.pngAlpha {visibility:hidden;}</style>");function PngAlpha(){this.name="pngAlpha";this.start=function(a){this.process(a);a.onload=this.process};this.process=function(b){var a=typeof this.nodeName=="undefined"?b:this;if(typeof a.style.filter!="undefined"&&(navigator.userAgent.indexOf("MSIE 6.0")>-1||navigator.userAgent.indexOf("MSIE 5")>-1)&&navigator.userAgent.indexOf("Opera")<0&&a.src.indexOf(".png")>-1){a.style.width=a.width+"px";a.style.height=a.height+"px";a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.src+"', sizingMethod='crop')";a.src=a.src.replace(".png",".gif");a.style.visibility="visible"}}}classBehaviour.pngAlpha=new PngAlpha;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.pngAlpha;function OpenLayerPopUp(){this.name="openLayerPopUp";this.popUpClass="layerPopUp";this.step=10;this.begin=0;this.end=50;this.index=0;this.start=function(a){targetPopUp=null;a.onclick=this.load;a.id=a.id?a.id:this.name+"Link"+this.index++;classBehaviour.utilities.getClassParameter(a,"auto","no")=="yes"&&setTimeout('classBehaviour.openLayerPopUp.load(document.getElementById("'+a.id+'"))',250)};this.fadeIn=function(c,a){scroll(0,0);var b=classBehaviour.openLayerPopUp;node=document.getElementById(c);nodes=node.getElementsByTagName("div");nodeShadow=nodes[0];nodeContent=nodes[1];if(a<b.end){node.style.visibility="visible";nodeContent.style.visibility="hidden";nodeShadow.style.display="block";if(typeof nodeShadow.style.MozOpacity!="undefined")nodeShadow.style.MozOpacity=a/100;if(typeof nodeShadow.style.filter!="undefined")nodeShadow.style.filter="alpha(opacity="+a+")";if(typeof nodeShadow.style.opacity!="undefined")nodeShadow.style.opacity=a/100;node.style.display="block";setTimeout("classBehaviour.openLayerPopUp.fadeIn('"+c+"',"+(a+b.step)+")",10)}else nodeContent.style.visibility="visible"};this.fadeOut=function(c,a){var b=classBehaviour.openLayerPopUp;node=document.getElementById(c);nodes=node.getElementsByTagName("div");nodeShadow=nodes[0];nodeContent=nodes[1];if(a>b.begin){nodeContent.style.visibility="hidden";if(typeof nodeShadow.style.MozOpacity!="undefined")nodeShadow.style.MozOpacity=a/100;if(typeof nodeShadow.style.filter!="undefined")nodeShadow.style.filter="alpha(opacity="+a+")";if(typeof nodeShadow.style.opacity!="undefined")nodeShadow.style.opacity=a/100;setTimeout("classBehaviour.openLayerPopUp.fadeOut('"+c+"',"+(a-b.step)+")",10)}else{node.style.display="none";nodeShadow.style.display="none"}};this.load=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.openLayerPopUp;popUpHref=a.href?a.href:"";popUpId=popUpHref.indexOf("#")>-1?popUpHref.split("#")[1]:classBehaviour.utilities.getClassParameter(a,"id","popUpWithScrollBar");popUpObj=document.getElementById(popUpId);if(popUpObj)b.show(a,popUpId);else classBehaviour.ajax.addRequest(popUpHref,b.insert,b.wait,null,a);return false};this.wait=function(b,a){var c=classBehaviour.openLayerPopUp;a.parentNode.style.backgroundPosition=100-b*100+"% 0px"};this.insert=function(d,b,a){var c=classBehaviour.openLayerPopUp;c.instance+=1;popUpId=classBehaviour.utilities.getClassParameter(b,"id",c.name+c.instance);popUpWidth=classBehaviour.utilities.getClassParameter(b,"width","470");popUpHeight=classBehaviour.utilities.getClassParameter(b,"height","300");newNode=document.createElement("div");document.body.appendChild(newNode);allDivs=document.getElementsByTagName("div");lastDiv=allDivs[allDivs.length-1];a=a.indexOf("<body>")>-1?a.split("<body>")[1].split("</body>")[0]:a.replace('<?xml version="1.0"?>',"");a=a.replace(/{id}/gi,popUpId);a=a.replace(/{title}/gi,b.title);a=a.replace(/{url}/gi,b.href.split("?url=")[1]);a=a.replace(/{width}/gi,popUpWidth);a=a.replace(/{height}/gi,popUpHeight);lastDiv.innerHTML=a;classBehaviour.parser.parseNode(lastDiv);c.show(b,popUpId)};this.center=function(a){if(a){a.style.display="block";popupContent=a.getElementsByTagName("DIV")[2];popupHeight=popupContent.offsetHeight;screenHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight;popupContent.style.marginTop=screenHeight>popupHeight?Math.round((screenHeight-popupHeight)/2)+"px":"30px"}};this.show=function(a,c){var b=classBehaviour.openLayerPopUp,e=false;if(a){b.step=parseInt(classBehaviour.utilities.getClassParameter(a,"step",10));b.begin=parseInt(classBehaviour.utilities.getClassParameter(a,"begin",0));b.end=parseInt(classBehaviour.utilities.getClassParameter(a,"end",50))}popUpObj=document.getElementById(c);popUpObj.style.visibility="hidden";this.center(popUpObj);popUpTitles=popUpObj.getElementsByTagName("h1");if(a)if(a.title&&popUpTitles.length>0)popUpTitles[0].innerHTML=a.title;popUpIframes=popUpObj.getElementsByTagName("iframe");if(popUpIframes.length>0&&a.href.indexOf("?url=")>-1)if(popUpIframes[0].src!=a.href.split("?url=")[1])popUpIframes[0].src=a.href.split("?url=")[1];popUpClosers=popUpObj.getElementsByTagName("a");if(popUpClosers.length>0)popUpClosers[0].onclick=b.hide;if(navigator.appVersion.indexOf("MSIE 6")>-1||navigator.appVersion.indexOf("MSIE 5")>-1){if(popUpObj.className.indexOf("fullHeightPopUp")<0){document.documentElement.scrollLeft=0;document.documentElement.scrollTop=0;document.body.parentNode.style.overflow="hidden";popUpObj.getElementsByTagName("DIV")[2].style.marginTop=Math.round(document.documentElement.scrollTop+(screenHeight-popupHeight)/2)+"px"}popUpObj.getElementsByTagName("DIV")[0].style.height=document.body.offsetHeight+"px";allSelects=document.getElementsByTagName("select");for(var d=0;d<allSelects.length;d++)allSelects[d].style.visibility="hidden"}if(b.opened!=null){document.getElementById(b.opened).style.display="none";document.getElementById(c).style.display="block";document.getElementById(c).style.visibility="visible"}else setTimeout('classBehaviour.openLayerPopUp.fadeIn("'+c+'", '+b.begin+")",1e3);b.opened=c;return e};this.hide=function(d){var c=typeof this.nodeName=="undefined"?d:this,a=classBehaviour.openLayerPopUp;popUp=c;while(popUp.className.indexOf(a.popUpClass)<0)popUp=popUp.parentNode;a.fadeOut(popUp.id,a.end);if(navigator.appVersion.indexOf("MSIE 6")>-1||navigator.appVersion.indexOf("MSIE 5")>-1){if(popUp.className.indexOf("fullHeightPopUp")<0)document.body.parentNode.style.overflow="";allSelects=document.getElementsByTagName("select");for(var b=0;b<allSelects.length;b++)allSelects[b].style.visibility="visible"}popUpIframes=popUp.getElementsByTagName("iframe");if(popUpIframes.length>0)popUpIframes[0].src="";a.opened=null;return false}}classBehaviour.openLayerPopUp=new OpenLayerPopUp;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.openLayerPopUp;function ReplaceLayerPopUp(){this.name="replaceLayerPopUp";this.start=function(a){a.onclick=this.clicked};this.wait=function(){};this.insert=function(c,a,b){rootNode=classBehaviour.utilities.rootNode(a,null,null,"layerPopUp");popUpText=b.split("<!-- cut here -->")[1];rootNode.innerHTML=popUpText;classBehaviour.parser.parseNode(rootNode);classBehaviour.openLayerPopUp.center(rootNode);popUpClosers=rootNode.getElementsByTagName("a");if(popUpClosers.length>0)popUpClosers[0].onclick=classBehaviour.openLayerPopUp.hide};this.clicked=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.replaceLayerPopUp;importUrl=a.href;classBehaviour.ajax.addRequest(importUrl,b.insert,b.wait,null,a);return false}}classBehaviour.replaceLayerPopUp=new ReplaceLayerPopUp;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.replaceLayerPopUp;function LayerPopUp(){this.name="layerPopUp";this.start=function(a){a.className.indexOf("doNotMove")<0&&this.process(a)};this.process=function(a){removedChild=a.parentNode.removeChild(a);removedChild.className+=" doNotMove";document.body.appendChild(removedChild)}}classBehaviour.layerPopUp=new LayerPopUp;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.layerPopUp;function CloseLayerPopUp(){this.name="closeLayerPopUp";this.start=function(a){a.onclick=this.closePopUp};this.closePopUp=function(c){var b=typeof this.nodeName=="undefined"?c:this;if(parent!=self){allPopUps=parent.classBehaviour.utilities.getElementsByClassName("layerPopUp");for(var a=0;a<allPopUps.length;a++)parent.classBehaviour.openLayerPopUp.hide(allPopUps[a])}else{rootNode=classBehaviour.utilities.rootNode(b,null,null,"layerPopUp");classBehaviour.openLayerPopUp.hide(rootNode)}}}classBehaviour.closeLayerPopUp=new CloseLayerPopUp;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.closeLayerPopUp;function ZebraTable(){this.name="zebraTable";this.start=function(a){this.process(a)};this.process=function(f){var c,b,e;c=f.getElementsByTagName("TR");for(var a=0;a<c.length;a++){c[a].className=c[a].className.replace("odd","");c[a].className=c[a].className.replace("even","");c[a].className+=a%2==0?" odd":" even";if(c[a].className.indexOf("row_")<0)c[a].className+=" row_"+a;b=c[a].childNodes;e=0;for(var d=0;d<b.length;d++)if(b[d].nodeName.indexOf("text")<0){b[d].className=b[d].className.replace("odd","");b[d].className=b[d].className.replace("even","");b[d].className+=e%2==0?" odd":" even";if(b[d].className.indexOf("col_")<0)b[d].className+=" col_"+e;e+=1}}}}classBehaviour.zebraTable=new ZebraTable;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.zebraTable;function SortByColumn(){this.name="sortByColumn";this.column=0;this.start=function(a){a.onclick=this.sort;if(a.className.indexOf("sorted")<0)a.className+=" unSorted"};this.forward=function(c,d){var a=classBehaviour.sortByColumn,b=new RegExp("<(.|\x0a)+?>","gi");strA=c.childNodes[a.column].childNodes.length==0?" ":c.childNodes[a.column].innerHTML.replace("---","0,00").replace(b,"");strB=d.childNodes[a.column].childNodes.length==0?" ":d.childNodes[a.column].innerHTML.replace("---","0,00").replace(b,"");intA=parseInt(strA.replace(",",""));intB=parseInt(strB.replace(",",""));return strA==strB||navigator.appVersion.indexOf("MSIE 5.0")>-1?0:isNaN(intA)||isNaN(intB)?strA<strB?1:-1:intB-intA};this.reverse=function(c,d){var a=classBehaviour.sortByColumn,b=new RegExp("<(.|\x0a)+?>","gi");strA=c.childNodes[a.column].childNodes.length==0?" ":c.childNodes[a.column].innerHTML.replace("---","0,00").replace(b,"");strB=d.childNodes[a.column].childNodes.length==0?" ":d.childNodes[a.column].innerHTML.replace("---","0,00").replace(b,"");intA=parseInt(strA.replace(",",""));intB=parseInt(strB.replace(",",""));return strA==strB||navigator.appVersion.indexOf("MSIE 5.0")>-1?0:isNaN(intA)||isNaN(intB)?strA>strB?1:-1:intA-intB};this.sort=function(i){var f=typeof this.nodeName=="undefined"?i:this,g=classBehaviour.sortByColumn;sortDirection="sortedForward";for(var b=f.parentNode.childNodes,a=0;a<b.length;a++)if(b[a].nodeName=="TD"||b[a].nodeName=="TH")if(b[a]==f){g.column=a;sortDirection=b[a].className.indexOf("sortedForward")>-1?"sortedReverse":"sortedForward";b[a].className=b[a].className.replace("sortedReverse",sortDirection);b[a].className=b[a].className.replace("sortedForward",sortDirection);b[a].className=b[a].className.replace("unSorted",sortDirection)}else{b[a].className=b[a].className.replace("sortedReverse","unSorted");b[a].className=b[a].className.replace("sortedForward","unSorted")}for(var h=f.parentNode.parentNode.parentNode,e=h.getElementsByTagName("TBODY")[0],d=e.childNodes,c=[],a=0;a<d.length;a++)if(d[a].nodeName.indexOf("TR")>-1)c[c.length]=d[a];c=sortDirection=="sortedForward"?c.sort(g.forward):c.sort(g.reverse);for(var a=0;a<d.length;a++)d[a].nodeName.indexOf("TR")>-1&&e.removeChild(d[a]);for(var a=0;a<c.length;a++)e.appendChild(c[a]);classBehaviour.zebraTable.process(h)}}classBehaviour.sortByColumn=new SortByColumn;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.sortByColumn;function OpenAsPrintable(){this.name="openAsPrintable";this.start=function(a){a.onclick=this.process};this.process=function(a){var b=typeof this.nodeName=="undefined"?a:this;if(document.getElementById("tgtPopTitle")){document.getElementById("tgtPopTitle").innerHTML=document.getElementById("content").getElementsByTagName("h1")[0].innerHTML;document.getElementById("tgtPopText").innerHTML=document.getElementById("content").innerHTML.indexOf("</h1>")>-1?document.getElementById("content").innerHTML.split("</h1>")[1]:document.getElementById("content").innerHTML.split("</H1>")[1];classBehaviour.openLayerPopUp.show(document.getElementById("popup0"));setTimeout("window.print();",2048)}else window.print();return false}}classBehaviour.openAsPrintable=new OpenAsPrintable;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.openAsPrintable;function CloseThisWindow(){this.name="closeThisWindow";this.start=function(a){a.onclick=this.process};this.process=function(a){var b=typeof this.nodeName=="undefined"?a:this;window.close()}}classBehaviour.closeThisWindow=new CloseThisWindow;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.closeThisWindow;function GoToPrevious(){this.name="goToPrevious";this.start=function(a){a.onclick=this.process};this.process=function(a){var b=typeof this.nodeName=="undefined"?a:this;window.history.go(-1)}}classBehaviour.goToPrevious=new GoToPrevious;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.goToPrevious;function FixedPosition(){this.name="fixedPosition";this.nodes=[];this.start=function(a){this.nodes[this.nodes.length]=a;if(document.all)window.onscroll=this.process;else a.style.position="fixed"};this.process=function(){for(var b=classBehaviour.fixedPosition,a=0;a<b.nodes.length;a++){b.nodes[a].style.marginTop=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px";b.nodes[a].style.marginLeft=(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)+"px"}}}classBehaviour.fixedPosition=new FixedPosition;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.fixedPosition;function OpenAsPopUp(){this.name="openAsPopUp";this.window=null;this.start=function(a){a.onclick=this.process};this.process=function(n){var a=typeof this.nodeName=="undefined"?n:this,b=classBehaviour.openAsPopUp,i="width="+classBehaviour.utilities.getClassParameter(a,"width","630"),f=",height="+classBehaviour.utilities.getClassParameter(a,"height","385"),j=",left="+classBehaviour.utilities.getClassParameter(a,"left",""),m=",top="+classBehaviour.utilities.getClassParameter(a,"top",""),e=",toolbar="+classBehaviour.utilities.getClassParameter(a,"toolbar","no"),c=",scrollbars="+classBehaviour.utilities.getClassParameter(a,"scrollbars","no"),h=",status="+classBehaviour.utilities.getClassParameter(a,"status","no"),g=",resizable="+classBehaviour.utilities.getClassParameter(a,"resizable","yes"),d=",location="+classBehaviour.utilities.getClassParameter(a,"location","no"),k=",menu="+classBehaviour.utilities.getClassParameter(a,"menu","no"),l=classBehaviour.utilities.getClassParameter(a,"name","popup");b.window=window.open(a.getAttribute("href"),l,i+f+c+e+h+g+d+k+j+m);b.window.focus();return false}}classBehaviour.openAsPopUp=new OpenAsPopUp;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.openAsPopUp;function OpenInOpener(){this.name="openInOpener";this.start=function(a){a.onclick=this.process};this.process=function(b){var a=typeof this.nodeName=="undefined"?b:this;window.opener.location.href=a.href;classBehaviour.utilities.getClassParameter(a,"closeParent","false")=="true"&&window.close();return false}}classBehaviour.openInOpener=new OpenInOpener;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.openInOpener;function OpenAsWindow(){this.name="openAsWindow";this.start=function(a){a.target="_blank"}}classBehaviour.openAsWindow=new OpenAsWindow;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.openAsWindow;function SetRandomSrc(){this.name="setRandomSrc";this.start=function(a){this.process(a)};this.process=function(a){var c=parseInt(classBehaviour.utilities.getClassParameter(a,"min","0")),d=parseInt(classBehaviour.utilities.getClassParameter(a,"max","1")),b=Math.round(Math.random()*(d-c))+c;if(a.src!=null)a.src=a.src.replace("_0","_"+b);a.className=a.className.replace("_0","_"+b)}}classBehaviour.setRandomSrc=new SetRandomSrc;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.setRandomSrc;function SetRandomClassName(){this.name="setRandomClassName";this.start=function(a){this.process(a)};this.process=function(a){var c=parseInt(classBehaviour.utilities.getClassParameter(a,"min","0")),d=parseInt(classBehaviour.utilities.getClassParameter(a,"max","1")),b=Math.round(Math.random()*(d-c))+c;if(a.className!=null)a.className=a.className.replace("_0","_"+b);a.className=a.className.replace("_0","_"+b)}}classBehaviour.setRandomClassName=new SetRandomClassName;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.setRandomClassName;function MatchActiveUrl(){this.name="matchActiveUrl";this.index=0;this.start=function(a){a.id=a.id?a.id:this.name+this.index++;allLinks=a.nodeName!="A"?a.getElementsByTagName("a"):new Array(a);scoreSensitivity=parseInt(classBehaviour.utilities.getClassParameter(a,"sensitivity",100))/100;activeLink=this.findActiveUrl(allLinks,scoreSensitivity);activeLink!=null&&this.setActiveLinks(activeLink,a.id)};this.convertAbsToRelUrls=function(a){if(a.indexOf("/")<0||a.substr(0,1)=="."||a.substr(0,1)=="/"){strAbs=document.location.href;strAbs=strAbs.substring(0,strAbs.lastIndexOf("/"));while(a.indexOf("../")==0){a=a.replace("../","");strAbs=strAbs.substring(0,strAbs.lastIndexOf("/"))}a=a.replace(/\.\//gi,"");a=strAbs+"/"+a}return a};this.compareUrls=function(b,a){var g=0,h=0,i=0,c,d;b=b.replace(/ /gi,"%20");a=a.replace(/ /gi,"%20");b=b.split("#")[0];a=a.split("#")[0];b=this.convertAbsToRelUrls(b);a=this.convertAbsToRelUrls(a);var e=b.split(/[?&#\/]/i),f=a.split(/[?&#\/]/i);for(c=0;c<e.length;c++){d=0;while(d<f.length&&e[c]!=f[d])d+=1;if(d<f.length)g+=e[c].length;h+=e[c].length}i=a.length-f.length+1;return g/h};this.findActiveUrl=function(b,e){var d=this.convertAbsToRelUrls(document.location.href);allScores=[];for(var a=0;a<b.length;a++){var c=this.convertAbsToRelUrls(b[a].getAttribute("href"));if(c!=null){var f=this.compareUrls(d,c)*this.compareUrls(c,d);allScores[allScores.length]=[f,b[a]]}}allScores=allScores.sort();return allScores[allScores.length-1][0]>e?allScores[allScores.length-1][1]:null};this.setActiveLinks=function(a,d){var b=classBehaviour.classMouseHover,c=classBehaviour.srcMouseHover;targetNode=a;while(targetNode.id!=d){b.addActive(targetNode);targetNodeImages=targetNode.getElementsByTagName("img");targetNodeImages.length>0&&c.addActive(targetNodeImages[0]);targetNode=targetNode.parentNode}b.addActive(a);activeLinkImages=a.getElementsByTagName("img");activeLinkImages.length>0&&c.addActive(activeLinkImages[0])}}classBehaviour.matchActiveUrl=new MatchActiveUrl;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.matchActiveUrl;function ValidateInput(){this.name="validateInput";this.summaryId=null;this.lastFocus=null;this.customChecks=new CustomChecks;this.start=function(c){this.summaryId=classBehaviour.utilities.getClassParameter(c,"summaryId",this.summaryId);for(var b=this.isFormElement(c)||this.isFormButton(c)?new Array(c):c.getElementsByTagName("*"),a=0;a<b.length;a++){if(this.isFormElement(b[a])){b[a].onfocus=this.clear;b[a].onmousedown=this.clear;b[a].onblur=this.input;b[a].onchange=this.input;b[a].className=c.className}if(this.isFormButton(b[a]))b[a].onclick=this.all}hasExplanation=classBehaviour.utilities.getClassParameter(c,"explanation","no");hasExplanation=="yes"&&setTimeout("classBehaviour.validateInput.restore('"+c.id+"','"+c.value+"')",1e3)};this.warning=function(a,c){var e=classBehaviour.validateInput;if(a.className.indexOf("noWarning")<0)a.className=c?a.className.replace(" validationWarning",""):a.className+" validationWarning";allWithSameName=document.getElementsByName(a.name);for(var d=0;d<allWithSameName.length;d++){a=allWithSameName[d];idWarningNode=classBehaviour.utilities.getClassParameter(a,"warningId",null);nextNode=classBehaviour.utilities.nextNode(a);objWarningNode=idWarningNode?document.getElementById(idWarningNode):nextNode;if(objWarningNode)if(objWarningNode.className.indexOf("validationWarning")>-1)objWarningNode.style.display=c?"none":"block";allLabels=document.getElementsByTagName("label");for(var b=0;b<allLabels.length;b++)if(allLabels[b].getAttributeNode("for").nodeValue==a.id)if(allLabels[b].parentNode.className.indexOf("noWarning")<0&&allLabels[b].className.indexOf("noWarning")<0)allLabels[b].className=c?allLabels[b].className.replace(" validationWarning",""):allLabels[b].className+" validationWarning"}};this.restore=function(c,b){var a=document.getElementById(c);if(a.value!=b)a.className=a.className.replace("explanation_yes","explanation_no")};this.isFormButton=function(a){return a.getAttribute("type")=="submit"||a.nodeName=="BUTTON"};this.isFormElement=function(a){return a.getAttribute("type")=="text"||a.getAttribute("type")=="password"||a.getAttribute("type")=="file"||a.getAttribute("type")=="radio"||a.getAttribute("type")=="checkbox"||a.nodeName=="SELECT"||a.nodeName=="TEXTAREA"};this.summary=function(d){var c=classBehaviour.validateInput;rootNode=classBehaviour.utilities.rootNode(d,null,null,"validateAllInput");c.summaryId=classBehaviour.utilities.getClassParameter(rootNode,"summaryId",null);if(c.summaryId){summaryObj=document.getElementById(c.summaryId);summaryTxt="";for(var b=rootNode.getElementsByTagName("*"),a=0;a<b.length;a++)if(b[a].className.indexOf("validationWarning")>-1&&b[a].style.display=="block")summaryTxt+="<li>"+b[a].innerHTML+"</li>";summaryObj.style.display=summaryTxt.length>0?"block":"none";summaryObj.getElementsByTagName("div")[0].innerHTML=summaryTxt.length>0?"<ul>"+summaryTxt+"</ul>":""}};this.ajaxWait=function(a,b,c){b.innerHTML=a<0?"error: "+c:"sending: "+Math.round(a*100)+"%"};this.ajaxReply=function(c,b,a){b.innerHTML=a.indexOf("</body>")>-1?a.split("<body>")[1].split("</body>")[0]:a.split("<root>")[1].split("</root>")[0];classBehaviour.parser.parseNode(b)};this.clear=function(a){var a=typeof this.nodeName=="undefined"?that:this,b=classBehaviour.validateInput;b.lastFocus=a;hasExplanation=classBehaviour.utilities.getClassParameter(a,"explanation","no");if(hasExplanation=="yes"){a.value="";a.className=a.className.replace("explanation_yes","explanation_no")}};this.all=function(g){var e=typeof this.nodeName=="undefined"?g:this,c=classBehaviour.validateInput,d=true;if(c.lastFocus!=null)e=c.lastFocus;if(e!=null)rootNode=classBehaviour.utilities.rootNode(e,null,null,"validateAllInput");for(var b=rootNode.getElementsByTagName("*"),f="",a=0;a<b.length;a++){if(b[a].className.toLowerCase().indexOf("validateinput")>-1&&c.isFormElement(b[a]))d=c.input(b[a],false)&&d;if(b[a].nodeName=="INPUT"||b[a].nodeName=="SELECT"||b[a].nodeName=="TEXTAREA")f+=b[a].checked||b[a].type!="radio"&&b[a].type!="checkbox"?b[a].name+"="+b[a].value+"&":""}replyId=classBehaviour.utilities.getClassParameter(rootNode,"ajaxReplyId",null);submitId=classBehaviour.utilities.getClassParameter(rootNode,"ajaxReplyUrl",null);if(replyId!=null&&submitId!=null&&d){replyTarget=document.getElementById(replyId);submitUrl=document.getElementById(submitId).nodeName=="FORM"?document.getElementById(submitId).getAttribute("action"):document.getElementById(submitId).getAttribute("value");classBehaviour.ajax.addRequest(submitUrl+"?"+f,c.ajaxReply,c.ajaxWait,null,replyTarget);return false}else return d};this.input=function(f,e){var a=typeof this.nodeName=="undefined"?f:this,c=classBehaviour.validateInput,d,b;strValidatorName=classBehaviour.utilities.getClassParameter(a,"type","");allowEmpty=classBehaviour.utilities.getClassParameter(a,"allowEmpty","no");ifCheckedId=classBehaviour.utilities.getClassParameter(a,"ifCheckedId",null);hasExplanation=classBehaviour.utilities.getClassParameter(a,"explanation","no");if(ifCheckedId)if(!document.getElementById(ifCheckedId).checked)allowEmpty="yes";d=allowEmpty=="yes"&&(a.value==""||hasExplanation=="yes");if(navigator.appVersion.indexOf("MSIE 5.0")>-1&&strValidatorName=="money")strValidatorName=null;switch(strValidatorName){case"email":b=a.value.match(/^[\w\.\-\,\+]+@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/)!=null;break;case"phone":b=a.value.match(/(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)/)!=null;break;case"dutchzipcode":b=a.value.match(/^[0-9]{4}\s{0,1}[a-zA-Z]{2}$/)!=null;break;case"date":b=a.value.match(/^\d{4}\-\d{1,2}\-\d{1,2}$/)!=null;break;case"number":b=a.value.match(/^[0-9]+$/)!=null;break;case"money":b=a.value.match(/^[0-9]+(\.[0-9]{1,2})?$/)!=null;break;case"alphanumeric":b=a.value.match(/^[a-zA-Z0-9]/)!=null;break;case"bankaccount":b=c.customChecks.bankAccount(a);break;case"isradiochecked":b=c.customChecks.isRadioChecked(a);break;case"anyofthesechecked":b=c.customChecks.anyOfTheseChecked(a);break;case"text":b=a.value!="";break;case"regexp":customRegId=classBehaviour.utilities.getClassParameter(a,"regxid","myRegExp");customRegString=document.getElementById(customRegId).value;customRegExp=new RegExp(customRegString);b=a.value.match(customRegExp)!=null;break;default:b=true}validates=!d?b&&hasExplanation=="no":true;c.warning(a,validates);c.summary(a);return e!=null?validates:e}}function CustomChecks(){this.bankAccount=function(e){var d,c,a=e.value,b=0;if(a.length!=9)return false;else{for(i=0;i<a.length;i++)b+=a.substr(i,1)*(9-i);d=b/11;c=b%11;return c==0}};this.isRadioChecked=function(b){allInputs=document.getElementsByTagName("input");for(var a=0;a<allInputs.length;a++)if(allInputs[a].name==b.name)if(allInputs[a].checked)return true;return false};this.anyOfTheseChecked=function(b){anyChecked=false;allChecks=b.parentNode.parentNode.getElementsByTagName("input");for(var a=0;a<allChecks.length;a++)if(allChecks[a].checked)anyChecked=true;return anyChecked}}classBehaviour.validateInput=new ValidateInput;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.validateInput;function ValidateAllInput(){this.name="validateAllInput";this.start=function(a){if(a.nodeName=="FORM")a.onsubmit=classBehaviour.validateInput.all}}classBehaviour.validateAllInput=new ValidateAllInput;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.validateAllInput;function DisableAfterSubmit(){this.name="disableAfterSubmit";this.start=function(b){b.onsubmit=this.disable;allNodes=b.getElementsByTagName("*");if(typeof __doPostBack!="undefined")for(var a=0;a<allNodes.length;a++){if(allNodes[a].onchange!=null)if(allNodes[a].onchange.toString().indexOf("__doPostBack")>-1)allNodes[a].onchange=this.disable;if(allNodes[a].onclick!=null)if(allNodes[a].onclick.toString().indexOf("__doPostBack")>-1)allNodes[a].onclick=this.disable}b.className.indexOf("validateAllInput")>-1&&classBehaviour.validateAllInput.start(b)};this.disable=function(c){var b=typeof this.nodeName=="undefined"?c:this;typeof __doPostBack!="undefined"&&__doPostBack(b.id,b.value);allNodes=document.getElementsByTagName("*");for(var a=0;a<allNodes.length;a++)if(allNodes[a].nodeName.indexOf("INPUT")>-1||allNodes[a].nodeName.indexOf("SELECT")>-1||allNodes[a].nodeName.indexOf("TEXTAREA")>-1){allNodes[a].disabled=true;allNodes[a].onfocus=blur}}}classBehaviour.disableAfterSubmit=new DisableAfterSubmit;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.disableAfterSubmit;function ImageMap(){this.name="imageMap";this.map=new Map;this.areas=new Areas;this.start=function(b){b.onmouseover=this.map.over;this.map.over(b);areas=document.getElementById(this.map.name).getElementsByTagName("area");for(var a=0;a<areas.length;a++){this.cache(b.src.replace(this.map.passive,areas[a].id));areas[a].onmouseover=this.areas.over;areas[a].onmouseout=this.areas.out}};this.cache=function(b){var a=classBehaviour.imageMap;a.map.images[a.map.images.length]=new Image;a.map.images[a.map.images.length-1].src=b}}function Map(){this.object=null;this.name=null;this.passive="default";this.images=[];this.over=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.imageMap;b.map.object=a;b.map.name=a.getAttributeNode("usemap").value.replace("#","")}}function Areas(){this.over=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.imageMap;a.map.object.src=a.map.object.src.replace(a.map.passive,b.id)};this.out=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.imageMap;a.map.object.src=a.map.object.src.replace(b.id,a.map.passive)}}classBehaviour.imageMap=new ImageMap;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.imageMap;function EmptyOnFocus(){this.name="emptyOnFocus";this.start=function(a){a.onfocus=this.clear};this.clear=function(b){var a=typeof this.nodeName=="undefined"?b:this;if(a.className.indexOf("wasEmptied")<0){a.value="";a.className+=" wasEmptied"}}}classBehaviour.emptyOnFocus=new EmptyOnFocus;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.emptyOnFocus;function SlideshowList(){this.name="slideshowList";this.locked=false;this.index=0;this.start=function(b){allButtons=b.getElementsByTagName("button");if(allButtons.length>0)allButtons[allButtons.length-1].onclick=this.next;if(allButtons.length>1)allButtons[allButtons.length-2].onclick=this.previous;this.index+=1;allSlides=b.getElementsByTagName("li");allSlides[0].className+=allSlides[0].className.indexOf("active")<0?" active":"";for(var a=0;a<allSlides.length;a++){allSlides[a].id=allSlides[a].id?allSlides[a].id:"list"+this.index+"slide"+a;allSlides[a].style.display=allSlides[a].className.indexOf("active")>-1?"block":"none"}};this.next=function(e){var d=typeof this.nodeName=="undefined"?e:this;if(!classBehaviour.slideshowList.locked){classBehaviour.slideshowList.locked=true;allSlides=d.parentNode.getElementsByTagName("li");for(var a=allSlides[0],c=allSlides[1],b=0;b<allSlides.length;b++)if(allSlides[b].className.indexOf("active")>-1){a=allSlides[b];c=b<allSlides.length-1?allSlides[b+1]:allSlides[0]}a.style.position="absolute";c.style.position="relative";a.className=a.className.replace(" active","").replace("active","");c.className+=" active";if(classBehaviour.utilities.getClassParameter(d.parentNode,"sameSize","no")=="yes"){classBehaviour.fader.crossFade(c.id,"",0,100,1,"classBehaviour.slideshowList.unlock()");classBehaviour.fader.crossFade("",a.id,0,5,10,"classBehaviour.slideshowList.unlock()")}else classBehaviour.fader.crossFade(c.id,a.id,0,5,10,"classBehaviour.slideshowList.unlock()")}};this.previous=function(e){var d=typeof this.nodeName=="undefined"?e:this;if(!classBehaviour.slideshowList.locked){classBehaviour.slideshowList.locked=true;allSlides=d.parentNode.getElementsByTagName("li");for(var a=allSlides[0],c=allSlides[allSlides.length-1],b=0;b<allSlides.length;b++)if(allSlides[b].className.indexOf("active")>-1){a=allSlides[b];c=b>0?allSlides[b-1]:allSlides[allSlides.length-1]}a.style.position="absolute";c.style.position="relative";a.className=a.className.replace(" active","").replace("active","");c.className+=" active";if(classBehaviour.utilities.getClassParameter(d.parentNode,"sameSize","no")=="yes"){classBehaviour.fader.crossFade(c.id,"",0,100,1,"classBehaviour.slideshowList.unlock()");classBehaviour.fader.crossFade("",a.id,0,5,10,"classBehaviour.slideshowList.unlock()")}else classBehaviour.fader.crossFade(c.id,a.id,0,5,10,"classBehaviour.slideshowList.unlock()")}};this.unlock=function(){this.locked=false}}classBehaviour.slideshowList=new SlideshowList;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.slideshowList;function DatePicker(){this.name="datePicker";this.dateHtml="";this.index=0;this.start=function(a,b){if(a==null)a=document.getElementById(b);this.index+=1;a.id=a.id?a.id:this.name+this.index;a.className+=" toggleNextNode";classBehaviour.toggleNextNode.start(a);calendarContainer=classBehaviour.utilities.nextNode(a);if(this.dateHtml==""){this.dateHtml="loading...";this.dateHtmlSrc=classBehaviour.utilities.nextNode(a).getElementsByTagName("input")[0].value;classBehaviour.ajax.addRequest(this.dateHtmlSrc,classBehaviour.datePicker.build,null,null,calendarContainer)}else if(this.dateHtml=="loading...")setTimeout('classBehaviour.datePicker.start(null, "'+a.id+'")',512);else this.build(null,calendarContainer,this.dateHtml);a.onclick=this.open};this.set=function(c,b){dpr=classBehaviour.datePicker;c.getElementsByTagName("button")[0].onclick=dpr.previous;c.getElementsByTagName("button")[1].onclick=dpr.next;monthNode=c.getElementsByTagName("select")[0];monthNode.selectedIndex=b.getMonth();monthNode.onchange=dpr.update;yearSelect=c.getElementsByTagName("select")[1];yearOptions=yearSelect.getElementsByTagName("option");currentYear=b.getFullYear();if(yearOptions.length==1){yearOption=yearOptions[0].cloneNode(true);for(var a=currentYear-100;a<currentYear+10;a++){yearOption=yearSelect.getElementsByTagName("option")[0].cloneNode(true);yearOption.value=a;yearOption.selected=a==currentYear?"selected":"";yearOption.text=a;yearSelect.appendChild(yearOption)}yearSelect.removeChild(yearSelect.getElementsByTagName("option")[0]);yearSelect.onchange=dpr.update}else for(var a=0;a<yearOptions.length;a++)yearOptions[a].selected=yearOptions[a].value==currentYear?"selected":"";daySlots=c.getElementsByTagName("td");for(var a=0;a<daySlots.length;a++){daySlots[a].className="empty";daySlots[a].innerHTML="";daySlots[a].onclick=null}currentDay=new Date(b.getFullYear(),b.getMonth(),0);nextDay=new Date(b.getFullYear(),b.getMonth(),1);startWeekDay=currentDay.getDay();do{currentDay=new Date(currentDay.getFullYear(),currentDay.getMonth(),currentDay.getDate()+1);nextDay=new Date(nextDay.getFullYear(),nextDay.getMonth(),nextDay.getDate()+1);daySlots[currentDay.getDate()+startWeekDay].innerHTML=currentDay.getDate();daySlots[currentDay.getDate()+startWeekDay].className="";daySlots[currentDay.getDate()+startWeekDay].onclick=dpr.pick}while(currentDay.getDate()<nextDay.getDate())};this.build=function(c,a,b){classBehaviour.datePicker.dateHtml=b;a.innerHTML=b.replace('<?xml version="1.0"?>',"").replace("<root>","").replace("</root>","");classBehaviour.parser.parseNode(a)};this.open=function(b){var c=typeof this.nodeName=="undefined"?b:this,a=classBehaviour.datePicker;a.close();calendar=classBehaviour.utilities.nextNode(c);theDate=new Date;a.set(calendar,theDate);screenXpos=typeof event!="undefined"?event.x:b.layerX;screenYpos=typeof event!="undefined"?event.y:b.layerY;calendarWidth=calendar.firstChild.offsetWidth;screenWidth=window.innerWidth?window.innerWidth:document.documentElement.clientWidth;scrolledWidth=typeof document.documentElement.scrollLeft!="undefined"?document.documentElement.scrollLeft:window.pageXOffset;if(screenXpos+calendarWidth>screenWidth+window.pageXOffset)screenXpos-=calendarWidth;calendarHeight=calendar.firstChild.offsetHeight;screenHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight;scrolledHeight=typeof document.documentElement.scrollTop!="undefined"?document.documentElement.scrollTop:window.pageYOffset;if(screenYpos+calendarHeight+10>screenHeight+scrolledHeight)screenYpos-=calendarHeight;calendar.style.left=screenXpos+"px";calendar.style.top=screenYpos+"px";classBehaviour.toggleNextNode.toggle(c);calendar.onmouseover=a.cancel;calendar.onmouseout=a.wait;return false};this.wait=function(){closeCalendarTimeout=setTimeout("classBehaviour.datePicker.close()",1024)};this.cancel=function(){typeof closeCalendarTimeout!="undefined"&&clearTimeout(closeCalendarTimeout)};this.close=function(){allButtons=document.getElementsByTagName("button");for(var a=0;a<allButtons.length;a++)if(allButtons[a].className.indexOf("datePicker")>-1)classBehaviour.utilities.nextNode(allButtons[a]).className.indexOf("showThisNode")>-1&&classBehaviour.toggleNextNode.toggle(allButtons[a])};this.update=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.datePicker;selectors=a.parentNode.getElementsByTagName("select");month=parseInt(selectors[0].value);year=parseInt(selectors[1].value);theDate=new Date(year,month,1);c.set(a.parentNode.parentNode.parentNode.parentNode,theDate)};this.next=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.datePicker;calendar=a.parentNode.parentNode.parentNode.parentNode;month=parseInt(a.parentNode.parentNode.parentNode.getElementsByTagName("select")[0].value);year=parseInt(a.parentNode.parentNode.parentNode.getElementsByTagName("select")[1].value);theDate=new Date(year,month+1,1);c.set(calendar,theDate);return false};this.previous=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.datePicker;calendar=a.parentNode.parentNode.parentNode.parentNode;month=parseInt(a.parentNode.parentNode.parentNode.getElementsByTagName("select")[0].value);year=parseInt(a.parentNode.parentNode.parentNode.getElementsByTagName("select")[1].value);theDate=new Date(year,month-1,1);c.set(calendar,theDate);return false};this.pick=function(b){var a=typeof this.nodeName=="undefined"?b:this;dayValue=a.innerHTML;calendarTitle=a.parentNode.parentNode.parentNode.getElementsByTagName("caption")[0];month=calendarTitle.getElementsByTagName("select")[0];monthValue=parseInt(month.value)+1;year=calendarTitle.getElementsByTagName("select")[1];yearValue=year[year.selectedIndex].innerHTML;targetFields=a.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("input");targetFields[0].value=(dayValue+"").length==1?"0"+dayValue:dayValue;targetFields[1].value=(monthValue+"").length==1?"0"+monthValue:monthValue;targetFields[2].value=yearValue;calendarButton=a.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("button")[0];classBehaviour.toggleNextNode.toggle(calendarButton)}}classBehaviour.datePicker=new DatePicker;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.datePicker;function CenteredThumbnails(){this.name="centeredThumbnails";this.index=0;this.start=function(a){this.index+=1;if(a.id!=null)a.id=this.name+this.index;setTimeout('classBehaviour.centeredThumbnails.process("'+a.id+'")',10)};this.process=function(b){node=document.getElementById(b);allLinks=node.getElementsByTagName("a");if(allLinks.length==0)allLinks=new Array(node);for(var a=0;a<allLinks.length;a++){containerSize=[allLinks[a].offsetWidth,allLinks[a].offsetHeight];thumbnail=allLinks[a].getElementsByTagName("img")[0];thumbnailSize=[thumbnail.offsetWidth,thumbnail.offsetHeight];offsetX=(containerSize[0]-thumbnailSize[0])/2;offsetY=(containerSize[1]-thumbnailSize[1])/2;thumbnail.style.margin=offsetY+"px "+offsetX+"px "+offsetY+"px "+offsetX+"px"}}}classBehaviour.centeredThumbnails=new CenteredThumbnails;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.centeredThumbnails;function HoverNextNode(){this.name="hoverNextNode";this.start=function(a){if(document.body.className.indexOf("widget")<0){a.onmouseover=this.show;a.onmouseout=this.hide;a.onmousemove=this.place}else{a.onmouseover=this.lift;a.onmouseout=this.drop}};this.lift=function(b){var a=typeof this.nodeName=="undefined"?b:this;targetNode=classBehaviour.utilities.nextNode(a);targetNode.style.zIndex=1e3};this.drop=function(b){var a=typeof this.nodeName=="undefined"?b:this;targetNode=classBehaviour.utilities.nextNode(a);targetNode.style.zIndex=800};this.show=function(b){var a=typeof this.nodeName=="undefined"?b:this;targetNode=classBehaviour.utilities.nextNode(a);targetNode.style.visibility="visible"};this.hide=function(b){var a=typeof this.nodeName=="undefined"?b:this;targetNode=classBehaviour.utilities.nextNode(a);targetNode.style.visibility="hidden"};this.place=function(a){var b=typeof this.nodeName=="undefined"?a:this;targetNode=classBehaviour.utilities.nextNode(b);targetNode.style.position="absolute";targetNode.style.left=typeof a!="undefined"?a.layerX+"px":event.x+"px";targetNode.style.top=typeof a!="undefined"?a.layerY+"px":event.y+"px"}}classBehaviour.hoverNextNode=new HoverNextNode;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.hoverNextNode;document.writeln("<style>.flashTitle .flashAlternative{visibility : hidden;}</style>");function FlashTitle(){this.name="flashTitle";this.index=0;this.cachedXml="";this.start=function(a){if(!a.id){a.id=this.name+this.index;this.index+=1}requiredVersion=parseInt(classBehaviour.utilities.getClassParameter(a,"version","7"));if(this.checkForFlash(requiredVersion))if(this.cachedXml=="")this.loadXml(a);else if(this.cachedXml=="loading...")this.retryLater(a);else this.processXml(null,a,this.cachedXml);else classBehaviour.flashTitle.showAlt(a)};this.checkForFlash=function(a){return typeof DetectFlashVer!="undefined"?DetectFlashVer(a,0,0):true};this.loadXml=function(a){classBehaviour.flashTitle.cachedXml="loading...";loadUrl=a.getElementsByTagName("input")[0].value;classBehaviour.ajax.addRequest(loadUrl,this.processXml,this.loadProgress,null,a)};this.retryLater=function(a){setTimeout('classBehaviour.flashTitle.start(document.getElementById("'+a.id+'"))',100)};this.loadProgress=function(a,b){a<0&&classBehaviour.flashTitle.showAlt(b)};this.processXml=function(d,c,a){classBehaviour.flashTitle.cachedXml=a;flashMovie="../flash/flashTitle.swf";flashWidth=c.offsetWidth;flashHeight=c.offsetHeight;flashWmode="Transparent";flashScale="noScale";flashSalign="l";flashName="_"+c.id;flashVariables="inputText="+c.innerHTML.replace(/<(.|\n)*?>/gi,"").replace(/^\s+/gi,"").replace(/&amp;/gi,"&");allInputs=c.getElementsByTagName("input");for(var b=0;b<allInputs.length;b++)switch(allInputs[b].name){case"movie":flashMovie=allInputs[b].value;break;case"width":flashWidth=allInputs[b].value;break;case"height":flashHeight=allInputs[b].value;break;case"wmode":flashWmode=allInputs[b].value;break;case"scale":flashScale=allInputs[b].value;break;case"salign":flashSalign=allInputs[b].value;break;case"name":flashName=allInputs[b].value;break;case"flashvars":flashVariables+="&"+allInputs[b].value}if(flashWidth.toString().indexOf("%")>-1)c.style.width=flashWidth;if(flashHeight.toString().indexOf("%")>-1)c.style.height=flashHeight;a=a.replace('<?xml version="1.0"?>',"");a=a.replace(/{movie}/gi,flashMovie);a=a.replace(/{width}/gi,flashWidth);a=a.replace(/{height}/gi,flashHeight);a=a.replace(/{wmode}/gi,flashWmode);a=a.replace(/{scale}/gi,flashScale);a=a.replace(/{salign}/gi,flashSalign);a=a.replace(/{name}/gi,flashName);a=a.replace(/{flashvars}/gi,flashVariables);c.innerHTML=a};this.setFlashVar=function(a,c,b){node=document.getElementById("__"+a)?document.getElementById("__"+a):document.getElementById("_"+a)?document.getElementById("_"+a):document.getElementById(a);typeof node.SetVariable!="undefined"&&node.SetVariable(c,b)};this.showAlt=function(b){allContents=b.getElementsByTagName("*");if(allContents.length>0)for(var a=0;a<allContents.length;a++)if(allContents[a].className.indexOf("flashAlternative")>-1)allContents[a].style.visibility="visible"}}classBehaviour.flashTitle=new FlashTitle;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.flashTitle;function ThumbnailToPhoto(){this.name="thumbnailToPhoto";this.thumbnails=[];this.stackTop=1;this.start=function(a){this.thumbnails[this.thumbnails.length]=a;a.onclick=this.loadPhoto};this.loadPhoto=function(d){var b=typeof this.nodeName=="undefined"?d:this,c=classBehaviour.thumbnailToPhoto;if(b.className.indexOf("active")<0){targetId=classBehaviour.utilities.getClassParameter(b,"id","thumbnailTarget");allThumbnails=c.thumbnails;for(var a=0;a<allThumbnails.length;a++){thumbnailTargetId=classBehaviour.utilities.getClassParameter(allThumbnails[a],"id","thumbnailTarget");if(thumbnailTargetId==targetId)allThumbnails[a].className=allThumbnails[a].className.replace(" active","")}b.className+=" active";targetStack=document.getElementById(targetId);targetImages=targetStack.getElementsByTagName("img");targetImage=null;for(var a=0;a<targetImages.length;a++)if(targetImages[a].src==b.href)targetImage=targetImages[a];if(targetImage==null){clonedImage=targetImages[0].cloneNode(true);targetStack.insertBefore(clonedImage,targetStack.firstChild);clonedImage=classBehaviour.utilities.previousNode(targetImages[0]);clonedImage.id=null;clonedImage.onload=c.showPhoto;clonedImage.src=b.href;clonedImage.title=b.getElementsByTagName("img")[0].title;clonedImage.alt=b.getElementsByTagName("img")[0].alt}else c.showPhoto(targetImage)}return false};this.showPhoto=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.thumbnailToPhoto;classBehaviour.fader.setFade(a,0);b.stackTop+=1;a.style.zIndex=b.stackTop;a.id=a.id==null?a.id:b.name+b.stackTop;classBehaviour.fader.fadeIn(a.id,10,50,null)}}classBehaviour.thumbnailToPhoto=new ThumbnailToPhoto;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.thumbnailToPhoto;function RichTextEditor(){this.name="richTextEditor";this.containerType="FIELDSET";this.buttonType="BUTTON";this.stylesheet="";this.editorHtml="";this.index=0;this.instances=[];this.interval=null;this.resizing=false;this.bookmark=null;this.start=function(a){if(a.id==null){this.index+=1;a.id=this.name+this.index}if(this.editorHtml==""){this.editorHtml="loading...";pathNode=a.getElementsByTagName("INPUT")[0];classBehaviour.ajax.addRequest(pathNode.value,this.importXml,this.awaitXml,null,a)}else if(this.editorHtml=="loading...")setTimeout('classBehaviour.richTextEditor.start(document.getElementById("'+a.id+'"))',512);else classBehaviour.richTextEditor.process(a)};this.awaitXml=function(){};this.importXml=function(d,c,b){var a=classBehaviour.richTextEditor;a.stylesheet=b.split("<stylesheet>")[1].split("</stylesheet>")[0];a.editorHtml=b.split("<editorHtml>")[1].split("</editorHtml>")[0];a.process(c)};this.process=function(b){var a=classBehaviour.richTextEditor;b.innerHTML=a.editorHtml+b.innerHTML;a.setCanvas(b);a.setControls(b);a.instances[a.instances.length]=b;clearInterval(a.interval);a.interval=setInterval("classBehaviour.richTextEditor.sync()",256)};this.setCanvas=function(a){var b=classBehaviour.richTextEditor;this.containerType=a.nodeName;textArea=a.getElementsByTagName("TEXTAREA")[0];textArea.id=textArea.id?textArea.id:b.name+"Textarea"+this.index;textArea.style.display="none";iframe=a.getElementsByTagName("IFRAME")[0];iframe.id=iframe.id?iframe.id:b.name+"Iframe"+this.index;iframe.style.display="block";editor=b.getEditor(iframe.id);editor.designMode="on";editor.open();editor.write(textArea.value+this.stylesheet);editor.close();if(editor.selection)editor.onmouseup=this.storeSelect};this.setControls=function(b){toolBars=b.getElementsByTagName("UL");if(toolBars.length==2){classBehaviour.parser.parseNode(toolBars[0]);buttons=toolBars[0].getElementsByTagName("*");for(var a=0;a<buttons.length;a++)if(buttons[a].className.indexOf("cmd_")>-1){if(buttons[a].nodeName=="SELECT")buttons[a].onchange=this.editCommand;if(buttons[a].nodeName=="BUTTON")buttons[a].onclick=this.editCommand}toolBars[0].style.display="block";classBehaviour.parser.parseNode(toolBars[1]);buttons=toolBars[1].getElementsByTagName(this.buttonType);for(var a=0;a<buttons.length;a++)if(buttons[a].nodeName=="BUTTON")if(buttons[a].className.indexOf("cmd_")>-1)buttons[a].onclick=this.editCommand;toolBars[1].style.display="none"}};this.getEditor=function(a){return document.getElementById(a).contentDocument?document.getElementById(a).contentDocument:document.frames[a].document};this.sync=function(){for(var b=classBehaviour.richTextEditor,a=0;a<b.instances.length;a++){allIframes=b.instances[a].getElementsByTagName("iframe");allTextareas=b.instances[a].getElementsByTagName("textarea");if(allIframes.length>0&&allTextareas.length>0){editor=classBehaviour.richTextEditor.getEditor(allIframes[0].id);if(allTextareas[0].style.display=="none")allTextareas[0].value=editor.documentElement.firstChild.nextSibling.innerHTML.split("<LINK")[0].split("<link")[0];else editor.documentElement.firstChild.nextSibling.innerHTML=allTextareas[0].value+classBehaviour.richTextEditor.stylesheet}}};this.resize=function(a){if(!this.resizing){iFrame=a.getElementsByTagName("iframe")[0];textArea=a.getElementsByTagName("textarea")[0];editor=textArea.style.display=="none"?iFrame:textArea;if(editor.className.indexOf("biggerEditor")<0){editor.className="biggerEditor "+editor.className;classBehaviour.richTextEditor.resizing=true;classBehaviour.fader.grow(editor.id,null,editor.offsetHeight*3,20,10,"classBehaviour.richTextEditor.resizing=false;")}else{editor.className=editor.className.replace("biggerEditor","");classBehaviour.richTextEditor.resizing=true;classBehaviour.fader.shrink(editor.id,null,editor.offsetHeight/3,20,10,"classBehaviour.richTextEditor.resizing=false;")}}return false};this.closeOption=function(a){var b=classBehaviour.richTextEditor;rootNode=classBehaviour.utilities.rootNode(a,"LI",null,null);buttonNode=rootNode.getElementsByTagName(b.buttonType)[0];if(buttonNode.className.indexOf("toggleNextNode")>-1)buttonNode.onclick(buttonNode)};this.storeSelect=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.richTextEditor;editor=a;if(editor.selection)c.bookmark=editor.selection.createRange().getBookmark()};this.restoreSelect=function(a){var b=classBehaviour.richTextEditor;if(a.selection)if(b.bookmark){range=a.documentElement.firstChild.nextSibling.createTextRange();range.moveToBookmark(b.bookmark);range.select()}};this.toggle=function(a){iframes=a.getElementsByTagName("iframe");buttonBars=a.getElementsByTagName("ul");textareas=a.getElementsByTagName("textarea");if(textareas[0].style.display=="none"){buttonBars[0].style.display="none";buttonBars[1].style.display="block";iframes[0].style.display="none";textareas[0].style.display="block"}else{buttonBars[0].style.display="block";buttonBars[1].style.display="none";iframes[0].style.display="block";textareas[0].style.display="none"}return false};this.editCommand=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.richTextEditor;container=a;while(container.nodeName.indexOf(classBehaviour.richTextEditor.containerType)<0)container=container.parentNode;editorId=container.getElementsByTagName("iframe")[0].id;editor=b.getEditor(editorId);b.restoreSelect(editor);selection=editor.selection?editor.selection.createRange().text:editor.getSelection?editor.getSelection():editor.createRange?editor.createRange():null;commandName=classBehaviour.utilities.getClassParameter(a,"cmd","");commandArgument=classBehaviour.utilities.getClassParameter(a,"arg",a.value);command=true;switch(commandName){case"insertimage":commandArgument=classBehaviour.utilities.previousNode(a).value;b.closeOption(a);break;case"createlink":commandArgument=classBehaviour.utilities.previousNode(a).value;b.closeOption(a);break;case"forecolor":b.closeOption(a);break;case"forecolor2":commandArgument=classBehaviour.utilities.previousNode(a).value;commandName="forecolor";b.closeOption(a);break;case"fontname":b.closeOption(a);break;case"fontname2":commandArgument=classBehaviour.utilities.previousNode(a).value;commandName="fontname";b.closeOption(a);break;case"fontsize":b.closeOption(a);break;case"fontsize2":commandArgument=classBehaviour.utilities.previousNode(a).value;commandName="fontsize";b.closeOption(a);break;case"toggle":command=b.toggle(container);break;case"bigger":command=b.resize(container)}selection&&command&&editor.execCommand(commandName,false,commandArgument);return false}}classBehaviour.richTextEditor=new RichTextEditor;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.richTextEditor;function MakeStylesheet(){this.name="makeStylesheet";this.styleSheet="\t/* "+document.location.href.split("/")[document.location.href.split("/").length-1]+" */\n";this.referenceCss="";this.start=function(a){this.makeReferenceCss();a.style.position="absolute";a.style.right="2px";a.style.top="2px";a.onclick=this.showNodeClasses};this.makeReferenceCss=function(){for(var a=0;a<document.styleSheets.length;a++)if(document.styleSheets[a].cssRules)for(var b=0;b<document.styleSheets[a].cssRules.length;b++)this.referenceCss+=document.styleSheets[a].cssRules[b].selectorText+" {}\n\t"};this.isFormElement=function(a){return"INPUT,SELECT,TEXTAREA,BUTTON".indexOf(a.nodeName)>-1};this.isClassBehaviour=function(b){foundHandler=false;if(typeof b=="string")for(var a=0;a<classBehaviour.handlers.length;a++)foundHandler=b.indexOf(classBehaviour.handlers[a].name)>-1?true:foundHandler;return foundHandler};this.isInStylesheet=function(a,b){foundStyle=false;a=a.replace(/\t/gi,"").replace(" {}\n","").replace(",","");foundStyle=this.styleSheet.indexOf(a)>-1;foundStyle=this.referenceCss.indexOf(a)>-1&&b?true:foundStyle;return foundStyle};this.stripBehaviour=function(b){foundHandler=false;for(var a=0;a<classBehaviour.handlers.length;a++)b=b.replace(classBehaviour.handlers[a].name+".","").replace(classBehaviour.handlers[a].name,"");return b};this.getNodeClasses=function(m,g,e,i){for(var d="",k,h,j,f,c="",l=0;l<=g;l++)d+="\t";for(var b=m.childNodes,a=0;a<b.length;a++){k="";h="";j="";f="";if(typeof b[a].id!="undefined"&&!this.isFormElement(b[a]))if(b[a].id!=""&&!this.isClassBehaviour(b[a].id))if(typeof b[a].id=="string"){c=d+"#"+b[a].id+" {}\n";if(!this.isInStylesheet(c,i))this.styleSheet+=c;k="#"+b[a].id}if(typeof b[a].className!="undefined"){allClasses=b[a].className.replace(/ /gi,".");if(b[a].className!=""){c=d+e+b[a].nodeName.toLowerCase()+"."+allClasses+" {}\n";if(!this.isInStylesheet(c,i)){this.styleSheet+=c;if(b[a].nodeName=="A"){this.styleSheet+="\t"+d+e+b[a].nodeName.toLowerCase()+"."+allClasses+":link,\n";this.styleSheet+="\t"+d+e+b[a].nodeName.toLowerCase()+"."+allClasses+":visited {}\n";this.styleSheet+="\t"+d+e+b[a].nodeName.toLowerCase()+"."+allClasses+":hover,\n";this.styleSheet+="\t"+d+e+b[a].nodeName.toLowerCase()+"."+allClasses+":active {}\n";g+=1}}h=b[a].nodeName.toLowerCase()+"."+allClasses}}if(b[a].className==""&&(b[a].id==""||this.isFormElement(b[a]))&&b[a].nodeName.indexOf("text")<0&&b[a].nodeName.indexOf("comment")<0){c=d+e+b[a].nodeName.toLowerCase()+" {}\n";if(!this.isInStylesheet(c,i)){this.styleSheet+=c;if(c.indexOf(" a {}")>-1){this.styleSheet+="\t"+c.replace("a {}","a:link,");this.styleSheet+="\t"+c.replace("a {}","a:visited {}");this.styleSheet+="\t"+c.replace("a {}","a:hover,");this.styleSheet+="\t"+c.replace("a {}","a:active {}");g+=1}}j=b[a].nodeName.toLowerCase()}if(b[a].childNodes.length>0){if(k)f=k+" ";else if(h)f=e+h+" ";else if(j)f=e+j+" ";this.getNodeClasses(b[a],g+1,f,i)}}};this.showNodeClasses=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.makeStylesheet;document.body.style.textAlign="left";document.body.style.background="#ffffff none";document.body.style.color="#000000";document.body.style.fontFamily="Sans Serif";document.body.style.fontSize="10pt";onlyChanges=classBehaviour.utilities.getClassParameter(b,"changesOnly","yes")=="yes";a.getNodeClasses(document.body,0,"",onlyChanges);document.body.innerHTML=navigator.userAgent.indexOf("MSIE 6")>-1?'<textarea style="width:720px;height:480px;border:solid 1px #000000;">'+a.styleSheet+"</textarea>":'<textarea style="position:absolute;left:5%;top:5%;width:90%;height:90%;border:solid 1px #000000;">'+a.styleSheet+"</textarea>"}}classBehaviour.makeStylesheet=new MakeStylesheet;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.makeStylesheet;function HtmlEncode(){this.name="htmlEncode";this.start=function(a){a.style.position="absolute";a.style.right="0px";a.style.top="25px";a.onclick=this.importDoc};this.importDoc=function(){classBehaviour.ajax.addRequest(document.location.href,classBehaviour.htmlEncode.encode,classBehaviour.htmlEncode.wait,false,null)};this.wait=function(){};this.encode=function(c,b,a){document.body.innerHTML='<textarea id="htmlEncoded" style="position:absolute;left:12.5%;top:12.5%;width:75%;height:75%;border:solid 1px #000000;">'+a+"</textarea>";document.getElementById("htmlEncoded").value=document.getElementById("htmlEncoded").value.replace(/>/gi,"&gt;").replace(/</gi,"&lt;")}}classBehaviour.htmlEncode=new HtmlEncode;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.htmlEncode;function ClickOnParent(){this.name="clickOnParent";this.start=function(a){parentCount=parseInt(classBehaviour.utilities.getClassParameter(a,"parent","2"));targetNode=a;for(var b=0;b<parentCount;b++)targetNode=targetNode.parentNode;linkTarget=a.href;targetNode.onclick=this.clicked;targetNode.style.cursor="pointer"};this.clicked=function(c){var b=typeof this.nodeName=="undefined"?c:this;linkTargets=b.getElementsByTagName("A");for(var a=0;a<linkTargets.length;a++)if(linkTargets[a].className.indexOf("clickOnParent")>-1)linkTarget=linkTargets[a].href;document.location.href=linkTarget}}classBehaviour.clickOnParent=new ClickOnParent;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.clickOnParent;function VirtualScrollbar(){this.name="virtualScrollbar";this.interval=null;this.start=function(a){a.onmousedown=this.pick;a.onmouseup=this.drop;a.onmousemove=this.drag;a.onmouseout=this.drop;document.onmousemove=this.nodrag;pageId=classBehaviour.utilities.getClassParameter(a,"id","scrollCanvas");this.scrollTo(pageId,0,a)};this.scrollTo=function(c,a,b){var d=classBehaviour.virtualScrollbar;if(a>0)a=0;page=document.getElementById(c).getElementsByTagName("div")[0];pageHeight=page.offsetHeight;containerHeight=page.parentNode.offsetHeight;if(pageHeight<containerHeight)pageHeight=containerHeight;if(navigator.userAgent.indexOf("Safari")>-1){page.style.position="absolute";page.style.top=a<containerHeight-pageHeight?containerHeight-pageHeight+"px":a+"px"}else page.style.marginTop=a<containerHeight-pageHeight?containerHeight-pageHeight+"px":a+"px";b.style.backgroundPosition="0px "+Math.round(-1.2*containerHeight*a/pageHeight)+"px"};this.scrollBy=function(a,b){page=document.getElementById(a);if(navigator.userAgent.indexOf("Safari")>-1)scrolledHeight=page.style.top?parseInt(page.style.top):0;else scrolledHeight=page.style.marginTop?parseInt(page.style.marginTop):0;position=scrolledHeight+b;this.scrollTo(a,position)};this.pick=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.virtualScrollbar;a.className=a.className.replace("passive","active");c.drag(a);return false};this.drag=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.virtualScrollbar;if(a.className.indexOf("active")>-1){mouseX=typeof event!="undefined"?event.x:b.layerX;mouseY=typeof event!="undefined"?event.y:b.layerY;id=classBehaviour.utilities.getClassParameter(a,"id","scrollCanvas");page=document.getElementById(id).getElementsByTagName("div")[0];pageHeight=page.offsetHeight;containerHeight=page.parentNode.offsetHeight;position=Math.round(-1*mouseY*(pageHeight-containerHeight)/containerHeight);position=position*1.2+containerHeight*.2;c.scrollTo(id,position,a)}return false};this.nodrag=function(){return false};this.drop=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.virtualScrollbar;a.className=a.className.replace("active","passive");return false}}classBehaviour.virtualScrollbar=new VirtualScrollbar;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.virtualScrollbar;function RssSearch(){this.name="rssSearch";this.form=null;this.url=null;this.input=null;this.output=null;this.startIndex=0;this.endIndex=8;this.search=new Search;this.source=new Source;this.start=function(a){a.onsubmit=this.doSubmit;this.form=document.getElementById("searchform");this.url=document.getElementById("searchsource");this.input=document.getElementById("searchstring");this.output=document.getElementById("searchresults")};this.find=function(a,b){if(a!=null)this.startIndex=a;if(b!=null)this.endIndex=b;if(this.source.document==null)this.source.load(this.url.value);else{var e=this.search.query(this.input.value),c=this.search.results(e,this.source.document),d=this.search.summary(c,this.startIndex,this.endIndex);this.output.innerHTML=d}return false};this.doSubmit=function(){return classBehaviour.rssSearch.find()}}function Search(){this.sort=function(a,b){return isNaN(a[0])||isNaN(b[0])?0:b[0]-a[0]};this.query=function(a){return new RegExp(a.replace(" ","|"),"gi")};this.results=function(i,j){var a,f,g,d,e,h,b=[];a=j.getElementsByTagName("item");for(var c=0;c<a.length;c++){f=a[c].getElementsByTagName("title");g=a[c].getElementsByTagName("description");d="";if(f.length>0)d+=f[0].firstChild.nodeValue;if(g.length>0)d+=g[0].firstChild.nodeValue;e=d.match(i);if(e!=null){h=e.join(" ").length;b[b.length]=[h,a[c]]}}b=b.sort(this.sort);return b};this.summary=function(b,e,g){var a='<dl class="items">',i,h,f,l,k,d,c=e*g;while(c<b.length&&(c+1)%g!=0){i=b[c][1].getElementsByTagName("link");l=i.length==0?"":i[0].firstChild.nodeValue;h=b[c][1].getElementsByTagName("title");k=h.length==0?"":h[0].firstChild.nodeValue;authors=b[c][1].getElementsByTagName("author");author=authors.length>0?authors[0].firstChild.nodeValue:"";categories=b[c][1].getElementsByTagName("category");category=categories.length>0?categories[0].firstChild.nodeValue:"";pubDates=b[c][1].getElementsByTagName("pubDate");pubDate=pubDates.length>0?pubDates[0].firstChild.nodeValue.replace(":00 +0100",""):"";f=b[c][1].getElementsByTagName("description");if(f.length>0){d=f[0].xml?f[0].xml:f[0].firstChild.nodeValue;d=d.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/<(.|\n)+?>/gi,"");d=f[0].xml?d.substr(0,64)+"...":d.substr(0,128)+"..."}else d="";a+='<dt class="title"><a href="'+l+'">'+k+"</a></dt>\n";a+="<dd>\n";a+='\t<ul class="information">\n';a+='\t\t<li class="author">'+author+"</li>\n";a+='\t\t<li class="category">'+category+"</li>\n";a+='\t\t<li class="pubDate">'+pubDate+"</li>\n";a+="\t</ul>\n";a+='\t<div class="description"><p>'+d+"</p></div>\n";a+="</dd>\n";c+=1}a+="</dl>";if(b.length==0)a+='<p class="error">Sorry, no matches were found</p>';else{var m=0,j=Math.round(b.length/g+.49);a+='<ul class="pager">\n';a+=e>m?'<li class="previous"><a href="#" onclick="return classBehaviour.rssSearch.find('+(e-1)+","+g+')">Previous</a></li>':'<li class="previous"></li>';a+=e<j-1?'<li class="next"><a href="#" onclick="return classBehaviour.rssSearch.find('+(e+1)+","+g+')">Next</a></li>':'<li class="next"></li>';a+='<li class="count">Page '+(e+1)+" of "+j+"</li>";a+="</ul>\n"}return a}}function Source(){this.document=null;this.load=function(a){classBehaviour.ajax.addRequest(a,classBehaviour.rssSearch.source.onload,classBehaviour.rssSearch.source.wait)};this.wait=function(a){if(a<0)classBehaviour.rssSearch.output.innerHTML="<hr /><p>Something went wrong.</p>";else classBehaviour.rssSearch.output.innerHTML="<hr /><p>Searching: "+Math.round(a*100)+"%</p>"};this.onload=function(a){classBehaviour.rssSearch.source.document=a;classBehaviour.rssSearch.find()}}classBehaviour.rssSearch=new RssSearch;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.rssSearch;function RssChat(){this.name="rssChat";this.index=0;this.timeout=null;this.delay=4096;this.start=function(a){a.id=a.id?a.id:this.name+this.index++;a.getElementsByTagName("button")[0].onclick=this.send;rssUrl=a.getElementsByTagName("input")[0].value;rssRnd="&upd="+(new Date).getTime();classBehaviour.ajax.addRequest(rssUrl+rssRnd,this.update,this.wait,null,a.id)};this.wait=function(a,b,c){var d=document.getElementById(b);progressNode=d.getElementsByTagName("div")[0];progressNode.style.backgroundPosition=a<0?"0% 100%":100-a*100+"% 0%";progressNode.innerHTML=a<0?"error: "+c:Math.round(a*100)+"% updated"};this.update=function(d,c){var b=document.getElementById(c);clearTimeout(classBehaviour.rssChat.timeout);rssHeader=b.getElementsByTagName("h3");if(rssHeader.length>0)rssHeader[0].innerHTML=d.getElementsByTagName("title")[0].firstChild.nodeValue;previousDts=b.getElementsByTagName("dt");previousDds=b.getElementsByTagName("dd");for(var a=previousDts.length-1;a>0;a--){removedDd=previousDds[a].parentNode.removeChild(previousDds[a]);removedDt=previousDts[a].parentNode.removeChild(previousDts[a])}allItems=d.getElementsByTagName("item");listNode=b.getElementsByTagName("dl")[0];for(var a=0;a<allItems.length;a++){itemAuthor=allItems[a].getElementsByTagName("author")[0].childNodes.length>0?allItems[a].getElementsByTagName("author")[0].firstChild.nodeValue:"";itemPubDate=allItems[a].getElementsByTagName("pubDate")[0].childNodes.length>0?allItems[a].getElementsByTagName("pubDate")[0].firstChild.nodeValue:"";itemCategory=allItems[a].getElementsByTagName("category")[0].childNodes.length>0?allItems[a].getElementsByTagName("category")[0].firstChild.nodeValue:"";itemLink=allItems[a].getElementsByTagName("link")[0].childNodes.length>0?allItems[a].getElementsByTagName("link")[0].firstChild.nodeValue:"";itemTitle=allItems[a].getElementsByTagName("title")[0].childNodes.length>0?allItems[a].getElementsByTagName("title")[0].firstChild.nodeValue:"";itemDescription=allItems[a].getElementsByTagName("description")[0].childNodes.length>0?allItems[a].getElementsByTagName("description")[0].firstChild.nodeValue:"";itemPubDate=(new Date(itemPubDate)).toLocaleString();clonedDt=b.getElementsByTagName("dt")[0].cloneNode(true);clonedDd=b.getElementsByTagName("dd")[0].cloneNode(true);clonedDt.className=clonedDt.className.replace("prototype","");clonedDt.innerHTML=clonedDt.innerHTML.replace(/{author}/gi,itemAuthor).replace(/{pubDate}/gi,itemPubDate).replace(/{category}/gi,itemCategory).replace(/{link}/gi,itemLink).replace(/{title}/gi,itemTitle);clonedDd.className=clonedDd.className.replace("prototype","");clonedDd.firstChild.nodeValue=itemDescription;listNode.appendChild(clonedDt);listNode.appendChild(clonedDd)}listNode.scrollTop=listNode.scrollHeight+1e3;rssUrl=b.getElementsByTagName("input")[0].value;rssRnd="&upd=?upd="+(new Date).getTime();classBehaviour.rssChat.timeout=setTimeout('classBehaviour.ajax.addRequest("'+rssUrl+rssRnd+'", classBehaviour.rssChat.update, classBehaviour.rssChat.wait, null, "'+c+'")',classBehaviour.rssChat.delay)};this.send=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.rssChat;rootNode=classBehaviour.utilities.rootNode(b,null,null,a.name);itemAuthor=rootNode.getElementsByTagName("input")[1].value.replace(";",":");itemPubDate=(new Date).toUTCString();itemCategory="replies";itemLink=document.location.href;itemTitle=document.title;itemDescription=rootNode.getElementsByTagName("textarea")[0].value;rssPost="&root=channel&parent=item&indexa=-1&valuesa=author;"+itemAuthor+";pubDate;"+itemPubDate+";category;"+itemCategory+";title;"+itemTitle+";description;"+itemDescription;rssUrl=rootNode.getElementsByTagName("input")[0].value;rssRnd="&upd=?upd="+(new Date).getTime();classBehaviour.ajax.addRequest(rssUrl+rssRnd+rssPost,a.update,a.wait,null,rootNode.id);rootNode.getElementsByTagName("textarea")[0].value=""}}classBehaviour.rssChat=new RssChat;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.rssChat;function ManyToMany(){this.name="manyToMany";this.start=function(a){if(a.nodeName=="SELECT"){a.className+=" from_"+a.id;a.ondblclick=this.clicked}else a.onclick=this.clicked};this.resetEdit=function(a){textArea=document.getElementById(a.replace("$",""));if(textArea.type!="textarea")return;selectArea=document.getElementById(a);textArea.value="";for(i=0;i<selectArea.length;i++)textArea.value+=selectArea.options[i].value+"|"+selectArea.options[i].text+"\n"};this.clicked=function(b){var a=typeof this.nodeName=="undefined"?b:this;moveSourceId=classBehaviour.utilities.getClassParameter(a,"from",null);moveDestinationId=classBehaviour.utilities.getClassParameter(a,"to",null);upSourceId=classBehaviour.utilities.getClassParameter(a,"up",null);downSourceId=classBehaviour.utilities.getClassParameter(a,"down",null);moveSource=document.getElementById(moveSourceId);upSource=document.getElementById(upSourceId);downSource=document.getElementById(downSourceId);moveDestination=document.getElementById(moveDestinationId);if(moveSource&&moveDestination){sourceNode=moveSource.selectedIndex>-1?moveSource.getElementsByTagName("option")[moveSource.selectedIndex]:null;destinationNode=moveDestination.selectedIndex>-1?moveDestination.getElementsByTagName("option")[moveDestination.selectedIndex]:null;if(sourceNode){removedNode=moveSource.removeChild(sourceNode);if(destinationNode)moveDestination.insertBefore(removedNode,destinationNode.nextSibling);else moveDestination.appendChild(removedNode)}}if(upSource){upNodes=upSource.getElementsByTagName("option");sourceNode=upSource.selectedIndex>-1?upNodes[upSource.selectedIndex]:null;destinationNode=upSource.selectedIndex>0?upNodes[upSource.selectedIndex-1]:null;if(sourceNode&&destinationNode){removedNode=upSource.removeChild(sourceNode);upSource.insertBefore(removedNode,destinationNode)}classBehaviour.manyToMany.resetEdit(upSource.id)}if(downSource){downNodes=downSource.getElementsByTagName("option");sourceNode=downSource.selectedIndex>-1?downNodes[downSource.selectedIndex]:null;destinationNode=downSource.selectedIndex<downNodes.length-2?downNodes[downSource.selectedIndex+2]:null;if(sourceNode&&destinationNode){removedNode=downSource.removeChild(sourceNode);downSource.insertBefore(removedNode,destinationNode)}else if(sourceNode){removedNode=downSource.removeChild(sourceNode);downSource.appendChild(removedNode)}classBehaviour.manyToMany.resetEdit(downSource.id)}return false}}classBehaviour.manyToMany=new ManyToMany;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.manyToMany;function DragToSort(){this.name="dragToSort";this.moving=null;this.over=null;this.offsetX=-50;this.offsetY=1;this.timeout=null;this.allowed=true;this.start=function(b){this.offsetX=parseInt(classBehaviour.utilities.getClassParameter(b,"offx",this.offsetX));this.offsetY=parseInt(classBehaviour.utilities.getClassParameter(b,"offy",this.offsetY));allRows=b.getElementsByTagName("tr");for(var a=0;a<allRows.length;a++){if(allRows[a].parentNode.nodeName=="TBODY")allRows[a].onmousedown=this.pickUp;allRows[a].onmouseover=this.trackOver;allRows[a].onmouseout=this.trackOut;allRows[a].className+=" notDragged"}allInputs=b.getElementsByTagName("input");allButtons=b.getElementsByTagName("button");allLinks=b.getElementsByTagName("a");allSelects=b.getElementsByTagName("selects");for(var a=0;a<allInputs.length;a++){allInputs[a].onmouseover=this.disallow;allInputs[a].onmouseout=this.allow}for(var a=0;a<allButtons.length;a++){allButtons[a].onmouseover=this.disallow;allButtons[a].onmouseout=this.allow}for(var a=0;a<allLinks.length;a++){allLinks[a].onmouseover=this.disallow;allLinks[a].onmouseout=this.allow}for(var a=0;a<allSelects.length;a++){allSelects[a].onmouseover=this.disallow;allSelects[a].onmouseout=this.allow}document.onmousemove=this.moveAround;document.onmouseup=this.dropDown;document.onmouseout=this.wait};this.disallow=function(){var a=classBehaviour.dragToSort;a.allowed=false};this.allow=function(){var a=classBehaviour.dragToSort;a.allowed=true};this.dropDown=function(){var a=classBehaviour.dragToSort;if(a.moving){a.moving.style.position="static";a.moving.style.left="auto";a.moving.style.top="auto";if(a.over&&a.moving!=a.over){storedNode=a.moving.parentNode.removeChild(a.moving);a.over.parentNode.insertBefore(storedNode,a.over);a.reZebra(a.over);classBehaviour.parser.parseNode(classBehaviour.utilities.previousNode(a.over))}a.moving=null;a.over=null}return false};this.reZebra=function(b){allRows=b.parentNode.getElementsByTagName("TR");for(var a=0;a<allRows.length;a++)allRows[a].className=a%2==0?allRows[a].className.replace("even","odd"):allRows[a].className.replace("odd","even")};this.trackOver=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.dragToSort;if(a.parentNode.nodeName=="TBODY"){if(a!=b.moving)b.over=a;if(b.moving!=null)a.className=a.className.replace("notDragged","isDraggedOver")}};this.trackOut=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.dragToSort;if(a!=c.moving)a.className=a.className.replace("isDraggedOver","notDragged")};this.pickUp=function(b){var c=typeof this.nodeName=="undefined"?b:this,a=classBehaviour.dragToSort;if(a.allowed){a.moving=c;scrollX=document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;scrollY=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;xPos=typeof event!="undefined"?event.clientX+scrollX:b.pageX;yPos=typeof event!="undefined"?event.clientY+scrollY:b.pageY;a.moving.style.position="absolute";a.moving.style.left=xPos+a.offsetX+"px";a.moving.style.top=yPos+a.offsetY+"px";return false}};this.moveAround=function(b){var c=typeof this.nodeName=="undefined"?b:this,a=classBehaviour.dragToSort;clearTimeout(a.timeout);if(a.moving){scrollX=document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;scrollY=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;xPos=typeof event!="undefined"?event.clientX+scrollX:b.pageX;yPos=typeof event!="undefined"?event.clientY+scrollY:b.pageY;a.moving.style.position="absolute";a.moving.style.left=xPos+a.offsetX+"px";a.moving.style.top=yPos+a.offsetY+"px"}return false};this.wait=function(){var a=classBehaviour.dragToSort;clearTimeout(a.timeout);a.timeout=setTimeout("classBehaviour.dragToSort.dropDown()",250)}}classBehaviour.dragToSort=new DragToSort;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.dragToSort;function ClickToSort(){this.name="clickToSort";this.start=function(b){indicatorArrows=b.getElementsByTagName("span")[0];theTbody=b.getElementsByTagName("tbody")[0];theTbody.className+=" hideIndicators";allRows=theTbody.getElementsByTagName("tr");for(var a=0;a<allRows.length;a++){allRows[a].className+=" link";if(navigator.appVersion.indexOf("MSIE 6")>-1){allRows[a].onmouseover=this.hoverOver;allRows[a].onmouseout=this.hoverOut}allRows[a].onclick=this.selectRow;firstCell=allRows[a].getElementsByTagName("td")[0];clonedArrows=indicatorArrows.cloneNode(true);firstCell.insertBefore(clonedArrows,firstCell.firstChild)}};this.reZebra=function(b){allRows=b.parentNode.getElementsByTagName("tr");for(var a=0;a<allRows.length;a++)allRows[a].className=a%2==0?allRows[a].className.replace("even","odd"):allRows[a].className.replace("odd","even")};this.hoverOver=function(b){var a=typeof this.nodeName=="undefined"?b:this;a.className=a.className.replace("link","hover")};this.hoverOut=function(b){var a=typeof this.nodeName=="undefined"?b:this;a.className=a.className.replace("hover","link")};this.selectRow=function(c){var a=typeof this.nodeName=="undefined"?c:this,d=classBehaviour.clickToSort;theTbody=a.parentNode;if(theTbody.className.indexOf("hideIndicators")>-1){a.className=a.className.replace("link","active").replace("hover","active");theTbody.className=theTbody.className.replace("hideIndicators","showIndicators")}else{theTbody.className=theTbody.className.replace("showIndicators","hideIndicators");theActiveRow=null;allRows=theTbody.getElementsByTagName("tr");for(var b=0;b<allRows.length;b++)if(allRows[b].className.indexOf("active")>-1){theActiveRow=allRows[b];allRows[b].className=allRows[b].className.replace("active","link")}if(theActiveRow!=a){removedNode=theTbody.removeChild(theActiveRow);theTbody.insertBefore(removedNode,a)}d.reZebra(a)}}}classBehaviour.clickToSort=new ClickToSort;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.clickToSort;function LinkedSelects(){this.name="linkedSelects";this.start=function(a){a.onchange=this.updateLinked;setTimeout('classBehaviour.linkedSelects.updateLinked(document.getElementById("'+a.id+'"))',100)};this.updateLinked=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.linkedSelects;if(a.value!=""){linkedId=classBehaviour.utilities.getClassParameter(a,"id","myLinkedSelect");linkedObj=document.getElementById(linkedId);classBehaviour.ajax.addRequest(a.value,b.updateLoaded,b.updateProgress,null,linkedObj)}};this.updateProgress=function(a,b){firstOption=b.getElementsByTagName("option")[0];firstOption.selected=true;firstOption.firstChild.nodeValue="--- loading: "+parseInt(a*100)+"% ---"};this.updateLoaded=function(c,b){currentOptions=b.getElementsByTagName("option");for(var a=currentOptions.length-1;a>=0;a--)removedNode=b.removeChild(currentOptions[a]);importedOptions=c.getElementsByTagName("option");for(var a=0;a<importedOptions.length;a++){newOption=document.createElement("option");newOptionText=document.createTextNode(importedOptions[a].firstChild.nodeValue);newOption.appendChild(newOptionText);newOption.value=importedOptions[a].getAttribute("value");b.appendChild(newOption)}}}classBehaviour.linkedSelects=new LinkedSelects;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.linkedSelects;function AutoSizeIframe(){this.name="autoSizeIframe";this.start=function(a){a.onload=this.resize;this.resize()};this.resize=function(){var b=classBehaviour.autoSizeIframe;allIframes=document.getElementsByTagName("iframe");for(var a=0;a<allIframes.length;a++)if(allIframes[a].className.indexOf(b.name)>-1)if(window.frames[allIframes[a].name].document.getElementsByTagName("body").length>0)if(window.frames[allIframes[a].name].document.getElementsByTagName("body")[0].offsetHeight>0)document.getElementById(allIframes[a].id).style.height=window.frames[allIframes[a].name].document.getElementsByTagName("body")[0].offsetHeight+"px"}}classBehaviour.autoSizeIframe=new AutoSizeIframe;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.autoSizeIframe;function AutoSizeFromIframe(){this.name="autoSizeFromIframe";this.start=function(){parent.classBehaviour.autoSizeIframe.resize()}}classBehaviour.autoSizeFromIframe=new AutoSizeFromIframe;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.autoSizeFromIframe;function PortfolioList(){this.name="portfolioList";this.start=function(b){allLinks=b.getElementsByTagName("a");for(var a=0;a<allLinks.length;a++)allLinks[a].onclick=this.clickItem};this.waitForList=function(a,b){b.getElementsByTagName("div")[0].innerHTML=a<0?"<h1>loading: failed</h1><p>Please try another.</p>":"<h1>loading: "+a*100+"%</h1>"};this.insertTheList=function(c,a,b){sourceUrl=classBehaviour.utilities.previousNode(a).href;if(b.indexOf("templates index")>-1&&b.indexOf("<body>")>-1){sourceBaseUrl=sourceUrl.replace("/index.html","");importedHtml=b.split("<body>")[1].split("</body>")[0].replace(/href="./gi,'href="'+sourceBaseUrl);a.getElementsByTagName("div")[0].innerHTML=importedHtml}else document.location.href=classBehaviour.utilities.previousNode(a).href};this.clickItem=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.portfolioList;if(classBehaviour.utilities.nextNode(a)==a){newDiv=document.createElement("div");newDiv.className="popUp hideThisNode";newBorder=document.createElement("div");newBorder.className="popUpBorder";newTitle=document.createElement("h1");newText=document.createTextNode("loading...");newTitle.appendChild(newText);newBorder.appendChild(newTitle);newDiv.appendChild(newBorder);a.parentNode.appendChild(newDiv);classBehaviour.ajax.addRequest(a.href,b.insertTheList,b.waitForList,null,classBehaviour.utilities.nextNode(a));a.className+="toggleNextNode family_portfolio0";classBehaviour.toggleNextNode.start(a);classBehaviour.toggleNextNode.toggle(a)}else classBehaviour.toggleNextNode.toggle(a);return false}}classBehaviour.portfolioList=new PortfolioList;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.portfolioList;function ArtificialScrollBar(){this.name="artificialScrollBar";this.interaction=false;this.interactor=null;this.scrollInterval=null;this.index=0;this.start=function(a){a.id=a.id?a.id:this.name+this.index++;allDivs=a.getElementsByTagName("DIV");a.style.overflow="hidden";allDivs[allDivs.length-5].style.display="block";a.onmouseover=this.overCanvas;a.onmouseout=this.offCanvas;allDivs[allDivs.length-1].onmousedown=this.onDown;allDivs[allDivs.length-1].onmousemove=this.onDrag;allDivs[allDivs.length-1].ondrag=this.onDrag;document.onmouseup=this.onUp;a.onmousewheel=this.onWheel;window.addEventListener&&window.addEventListener("DOMMouseScroll",this.onWheel,false);allDivs[allDivs.length-3].onmousedown=this.buttonDown;allDivs[allDivs.length-3].onmouseup=this.buttonOff;allDivs[allDivs.length-3].onmouseout=this.buttonOff;allDivs[allDivs.length-4].onmousedown=this.buttonUp;allDivs[allDivs.length-4].onmouseup=this.buttonOff;allDivs[allDivs.length-4].onmouseout=this.buttonOff;setTimeout('classBehaviour.artificialScrollBar.moveTo(document.getElementById("'+a.id+'"), 0)',100)};this.resize=function(a){allDivs=a.getElementsByTagName("DIV");contentNode=allDivs[0];indicatorNode=allDivs[allDivs.length-2]};this.moveTo=function(b,a){allDivs=b.getElementsByTagName("DIV");contentNode=allDivs[0];indicatorNode=allDivs[allDivs.length-2];contentToWindowRatio=contentNode.parentNode.offsetHeight/contentNode.offsetHeight;scrollBarHeight=indicatorNode.parentNode.offsetHeight;indicatorSize=contentToWindowRatio*scrollBarHeight;if(!isNaN(indicatorSize))indicatorNode.style.height=Math.round(indicatorSize)+"px";if(contentToWindowRatio<1){indicatorSurplus=indicatorSize/2;indicatorPosition=a-indicatorSurplus;if(a<indicatorSurplus)indicatorPosition=0;if(indicatorPosition>scrollBarHeight-indicatorSize)indicatorPosition=scrollBarHeight-indicatorSize;if(!isNaN(indicatorPosition))indicatorNode.style.top=Math.round(indicatorPosition)+"px";scrollBarFraction=(a-indicatorSurplus)/(scrollBarHeight-indicatorSurplus*2);contentOverlap=contentNode.offsetHeight-contentNode.parentNode.offsetHeight;contentPosition=scrollBarFraction*contentOverlap;if(contentPosition<0)contentPosition=0;if(contentPosition>contentOverlap)contentPosition=contentOverlap;if(!isNaN(contentPosition))contentNode.style.top=Math.round(0-contentPosition)+"px"}};this.moveBy=function(a,b){if(a){allDivs=a.getElementsByTagName("DIV");contentNode=allDivs[0];indicatorNode=allDivs[allDivs.length-2];indicatorPosition=indicatorNode.style.top?parseInt(indicatorNode.style.top):0;indicatorSize=indicatorNode.style.height?parseInt(indicatorNode.style.height):0;this.moveTo(a,indicatorPosition+indicatorSize/2+b)}};this.onDown=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.artificialScrollBar;b.interaction=true;mouseY=typeof event!="undefined"&&navigator.userAgent.indexOf("Safari")<0?event.y:a.layerY;b.moveTo(c.parentNode.parentNode,mouseY);return false};this.onDrag=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.artificialScrollBar;if(b.interaction){mouseY=typeof event!="undefined"&&navigator.userAgent.indexOf("Safari")<0?event.y:a.layerY;b.moveTo(c.parentNode.parentNode,mouseY);return false}};this.onUp=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.artificialScrollBar;b.interaction=false;return false};this.buttonUp=function(b){var c=typeof this.nodeName=="undefined"?b:this,a=classBehaviour.artificialScrollBar;a.moveBy(a.interactor,-5);a.scrollInterval=setInterval("classBehaviour.artificialScrollBar.moveBy(classBehaviour.artificialScrollBar.interactor, -5)",50);return false};this.buttonDown=function(b){var c=typeof this.nodeName=="undefined"?b:this,a=classBehaviour.artificialScrollBar;a.moveBy(a.interactor,5);a.scrollInterval=setInterval("classBehaviour.artificialScrollBar.moveBy(classBehaviour.artificialScrollBar.interactor, 5)",50);return false};this.buttonOff=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.artificialScrollBar;clearInterval(b.scrollInterval);return false};this.onWheel=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.artificialScrollBar;distance=window.event?window.event.wheelDelta/120:-b.detail/3;a.moveBy(a.interactor,-5*distance);return false};this.overCanvas=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.artificialScrollBar;c.interactor=a};this.offCanvas=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.artificialScrollBar;b.interactor=null}}classBehaviour.artificialScrollBar=new ArtificialScrollBar;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.artificialScrollBar;function LongdescToolTip(){this.name="longdescToolTip";this.start=function(a){a.onmouseover=this.overImage;a.onmouseout=this.offImage};this.waitForDesc=function(a,b){targetNode=classBehaviour.utilities.previousNode(b);targetNode.innerHTML="loading: "+Math.round(a*100)+"%"};this.insertDesc=function(c,b,a){targetNode=classBehaviour.utilities.previousNode(b);targetNode.innerHTML=a.split("<body>")[1].split("</body>")[0]};this.overImage=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.longdescToolTip;targetNode=classBehaviour.utilities.previousNode(a);if(targetNode.nodeName=="DIV"&&targetNode.className.indexOf(b.name)>-1)targetNode.style.visibility="visible";else{newToolTip=document.createElement("DIV");newToolTip.className=b.name;a.parentNode.insertBefore(newToolTip,a);classBehaviour.ajax.addRequest(a.getAttribute("longdesc"),b.insertDesc,b.waitForDesc,null,a)}};this.offImage=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.longdescToolTip;targetNode=classBehaviour.utilities.previousNode(a);if(targetNode.nodeName=="DIV"&&targetNode.className.indexOf(c.name)>-1)targetNode.style.visibility="hidden"};this.moveImage=function(a){var b=typeof this.nodeName=="undefined"?a:this,c=classBehaviour.longdescToolTip;targetNode=classBehaviour.utilities.previousNode(b);if(targetNode.nodeName=="DIV"&&targetNode.className.indexOf(c.name)>-1){targetNode.style.position="absolute";targetNode.style.left=typeof a!="undefined"?a.layerX+"px":event.x+"px";targetNode.style.top=typeof a!="undefined"?a.layerY+"px":event.y+"px"}}}classBehaviour.longdescToolTip=new LongdescToolTip;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.longdescToolTip;function InsertFromFile(){this.name="insertFromFile";this.start=function(a){classBehaviour.ajax.addRequest(a.getAttribute("href"),this.insert,this.wait,null,a)};this.wait=function(a,b){b.innerHTML="loading: "+Math.round(a*100)+"%"};this.insert=function(c,a,b){newDiv=document.createElement("div");a.parentNode.insertBefore(newDiv,a);insertedNode=classBehaviour.utilities.previousNode(a);insertedNode.innerHTML=b.split("<body>")[1].split("</body>")[0];classBehaviour.parser.parseNode(insertedNode);removedNode=a.parentNode.removeChild(a)}}classBehaviour.insertFromFile=new InsertFromFile;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.insertFromFile;function ScrollLock(){this.name="scrollLock";this.index=0;this.timeout=null;this.objects=[];this.start=function(a){a.id=a.id?a.id:this.name+this.index;this.objects[this.objects.length]=a;window.onscroll=this.scrolled};this.scrolled=function(d,c){var b=classBehaviour.scrollLock;clearTimeout(classBehaviour.scrollLock.timeout);for(var a=0;a<b.objects.length;a++){scrollingObject=b.objects[a];offset=Math.round(classBehaviour.utilities.getClassParameter(scrollingObject,"offset","0"));scrollPos=document.documentElement.scrollTop;availableHeight=window.innerHeight?window.innerHeight:document.documentElement.clientHeight;if(scrollPos>=offset&&scrollingObject.offsetHeight<availableHeight){scrollingObject.style.position=navigator.appVersion.indexOf("MSIE 6")<0?"fixed":"absolute";scrollingObject.style.marginTop=navigator.appVersion.indexOf("MSIE 6")<0?-1*offset+"px":scrollPos-offset+"px"}else{scrollingObject.style.position="relative";scrollingObject.style.marginTop="0px"}}if(!c)classBehaviour.scrollLock.timeout=setTimeout("classBehaviour.scrollLock.scrolled(null, true);",128)}}classBehaviour.scrollLock=new ScrollLock;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.scrollLock;function ScrollList(){this.name="scrollList";this.list=null;this.focus=null;this.speed=1;this.idleTimer=null;this.start=function(a){a.onmousedown=classBehaviour.utilities.getClassParameter(a,"scrollDirection","forward")=="backward"?this.startBackward:this.startForward;a.onmouseover=this.cancel;a.onmouseup=this.cancel;a.onmouseout=this.cancel;id=classBehaviour.utilities.getClassParameter(a,"id","scrollList0");this.prepareList(id)};this.startBackward=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.scrollList;id=a.reset(b);a.scrollBackward(id)};this.startForward=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.scrollList;id=a.reset(b);a.scrollForward(id)};this.idle=function(a){classBehaviour.scrollList.speed=1;classBehaviour.scrollList.scrollForward(a)};this.prepareList=function(a){scroller=document.getElementById(a);if(scroller.className.indexOf("trippled")<0){scrollList=scroller.getElementsByTagName("UL")[0];scrollList.innerHTML+=scrollList.innerHTML+scrollList.innerHTML;var b=scrollList.offsetWidth;scrollList.style.marginLeft="-"+Math.round(b/3)+"px";scroller.className+=" trippled";classBehaviour.scrollList.idle(a)}};this.reset=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.scrollList;clearTimeout(a.idleTimer);clearTimeout(a.timeout);a.speed=5;id=classBehaviour.utilities.getClassParameter(b,"id","scrollList0");return id};this.cancel=function(c){var b=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.scrollList;clearTimeout(a.idleTimer);clearTimeout(a.timeout);a.focus=null;id=classBehaviour.utilities.getClassParameter(b,"id","scrollList0");a.idleTimer=setTimeout('classBehaviour.scrollList.idle("'+id+'")',2e3)};this.scrollBackward=function(e){var b=classBehaviour.scrollList,d=document.getElementById(e),g=d.offsetWidth,a=d.getElementsByTagName("UL")[0],f=a.offsetWidth,c=a.style.marginLeft?parseInt(a.style.marginLeft):0;loopPoint=0;resetPoint=-1*Math.round(f/3);if(c<loopPoint)a.style.marginLeft=c+b.speed+"px";else a.style.marginLeft=resetPoint-b.speed+"px";b.timeout=setTimeout('classBehaviour.scrollList.scrollBackward("'+e+'")',40)};this.scrollForward=function(f){var b=classBehaviour.scrollList,e=document.getElementById(f),g=e.offsetWidth,a=e.getElementsByTagName("UL")[0],d=a.offsetWidth,c=a.style.marginLeft?parseInt(a.style.marginLeft):0;loopPoint=-2*Math.round(d/3);resetPoint=-1*Math.round(d/3);if(loopPoint<c)a.style.marginLeft=c-b.speed+"px";else a.style.marginLeft=resetPoint-b.speed+"px";b.timeout=setTimeout('classBehaviour.scrollList.scrollForward("'+f+'")',40)}}classBehaviour.scrollList=new ScrollList;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.scrollList;function DragAndDrop(){this.name="dragAndDrop";this.node=null;this.grid=new Coordinates(16,16);this.minPos=new Coordinates;this.maxPos=new Coordinates;this.pickup=new Coordinates;this.mouse=new Coordinates;this.style=new Coordinates;this.onMove=null;this.start=function(a){a.onmousedown=this.pickUp;document.onmouseup=this.dropDown;a.onmousemove=this.moveAway;this.grid.x=parseInt(classBehaviour.utilities.getClassParameter(a,"gridX",null));this.grid.y=parseInt(classBehaviour.utilities.getClassParameter(a,"gridY",null));this.minPos.x=parseInt(classBehaviour.utilities.getClassParameter(a,"limitLeft",null));this.minPos.y=parseInt(classBehaviour.utilities.getClassParameter(a,"limitTop",null));this.maxPos.x=parseInt(classBehaviour.utilities.getClassParameter(a,"limitRight",null));this.maxPos.y=parseInt(classBehaviour.utilities.getClassParameter(a,"limitBottom",null));this.restore(a)};this.restore=function(){};this.store=function(){};this.pickUp=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.dragAndDrop;if(b.pickupObj==null){b.node=a;b.pickup.x=typeof event!="undefined"?event.clientX:c.clientX;b.pickup.y=typeof event!="undefined"?event.clientY:c.clientY;b.pickup.z=a.style.zIndex==""?a.style.zIndex:0;if(a.style.position!="absolute")a.style.position="absolute";if(a.style.left=="")a.style.left="0px";if(a.style.top=="")a.style.top="0px";a.style.zIndex=1024}return false};this.dropDown=function(b){var c=typeof this.nodeName=="undefined"?b:this,a=classBehaviour.dragAndDrop;if(a.node!=null){if(a.grid.x>0)a.node.style.left=Math.round(parseInt(a.node.style.left)/a.grid.x)*a.grid.x+"px";if(a.grid.y>0)a.node.style.top=Math.round(parseInt(a.node.style.top)/a.grid.y)*a.grid.y+"px";a.node.style.zIndex=a.pickup.z;a.store(a.node);a.node=null;a.pickup.x=null;a.pickup.y=null;a.pickup.z=null}return false};this.moveAway=function(d){var e=typeof this.nodeName=="undefined"?d:this,a=classBehaviour.dragAndDrop;if(a.node!=null){a.mouse.x=typeof event!="undefined"?event.clientX:d.clientX;a.mouse.y=typeof event!="undefined"?event.clientY:d.clientY;a.style.x=a.node.style.left.indexOf("px")<0?0:parseInt(a.node.style.left);a.style.y=a.node.style.top.indexOf("px")<0?0:parseInt(a.node.style.top);var b=a.style.x+a.mouse.x-a.pickup.x,c=a.style.y+a.mouse.y-a.pickup.y;if(b<a.minPos.x)b=a.minPos.x;if(b>a.maxPos.x)b=a.maxPos.x;if(c<a.minPos.y)c=a.minPos.y;if(c>a.maxPos.y)c=a.maxPos.y;if(a.pickup.x!=null)a.node.style.left=b+"px";if(a.pickup.y!=null)a.node.style.top=c+"px";a.pickup.x=a.mouse.x;a.pickup.y=a.mouse.y;if(a.onMove!=null)a.onMove(a.node)}return false}}function Coordinates(a,b,c){this.x=a;this.y=b;this.z=c}classBehaviour.dragAndDrop=new DragAndDrop;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.dragAndDrop;function ValueSlider(){this.name="valueSlider";this.active=false;this.start=function(a){sliderCover=a.getElementsByTagName("div")[1];sliderCover.onmousedown=this.onDown;sliderCover.onmouseup=this.onUp;sliderCover.onmousemove=this.onMove;sliderCover.onmouseout=this.onUp;sliderInput=classBehaviour.utilities.nextNode(a);sliderInput.onchange=this.onTyped};this.setSlider=function(c,a,b){minimumValue=parseFloat(classBehaviour.utilities.getClassParameter(c,"min",0));maximumValue=parseFloat(classBehaviour.utilities.getClassParameter(c,"max",100));offsetValue=parseFloat(classBehaviour.utilities.getClassParameter(c,"off",0));if(a!=null)a+=offsetValue;maximumSize=c.offsetWidth-5;if(a==null)a=Math.round((b-minimumValue)/maximumValue*maximumSize);if(b==null)b=a/maximumSize*(maximumValue-minimumValue)+minimumValue;if(a<1)a=1;if(a>maximumSize)a=maximumSize;if(b<minimumValue)b=minimumValue;if(b>maximumValue)b=maximumValue;c.getElementsByTagName("div")[0].style.width=a+5+"px";classBehaviour.utilities.nextNode(c).value=b.toFixed(1);c.getElementsByTagName("span")[0].innerHTML=b.toFixed(1).replace(".",",")};this.onDown=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.valueSlider;mouseX=typeof event!="undefined"&&navigator.userAgent.indexOf("Safari")<0?event.x:a.layerX;b.setSlider(c.parentNode,mouseX,null);b.active=true;return false};this.onUp=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.valueSlider;b.active=false;return false};this.onMove=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.valueSlider;if(b.active){mouseX=typeof event!="undefined"&&navigator.userAgent.indexOf("Safari")<0?event.x:a.layerX;b.setSlider(c.parentNode,mouseX,null)}return false};this.onTyped=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.valueSlider;sliderNode=classBehaviour.utilities.previousNode(a);inputValue=parseInt(a.value);c.setSlider(sliderNode,null,inputValue)}}classBehaviour.valueSlider=new ValueSlider;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.valueSlider;function CopyToClipboard(){this.name="copyToClipboard";this.start=function(a){a.onclick=this.copyContents};this.copyContents=function(b){var a=typeof this.nodeName=="undefined"?b:this;targetId=classBehaviour.utilities.getClassParameter(a,"id",null);if(targetId!=null){targetNode=document.getElementById(targetId);targetValue=targetNode.value?targetNode.value:targetNode.innerHTML;window.clipboardData&&window.clipboardData.setData("text",targetValue)}}}classBehaviour.copyToClipboard=new CopyToClipboard;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.copyToClipboard;function SelectContent(){this.name="selectContent";this.start=function(a){a.onchange=this.loadNew;this.loadNew(a)};this.loadNew=function(c){var a=typeof this.nodeName=="undefined"?c:this,b=classBehaviour.selectContent;newUrl=a.value;targetId=classBehaviour.utilities.getClassParameter(a,"id",null);targetId!=null&&newUrl!=""&&classBehaviour.ajax.addRequest(newUrl,b.insertNew,b.waitForNew,null,document.getElementById(targetId))};this.waitForNew=function(a,b,c){b.innerHTML=a<0?'<dt class="selectContentProgress">Foutmelding: '+c+"%</dt>":'<dt class="selectContentProgress">Bezig met inladen: '+Math.round(a*100)+"%</dt>"};this.insertNew=function(c,a,b){classBehaviour.fader.setFade(a,0);a.innerHTML=b.split("</root>")[0].split("<root>")[1];classBehaviour.parser.parseNode(a);classBehaviour.fader.fadeIn(a.id,10,100)}}classBehaviour.selectContent=new SelectContent;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.selectContent;function LoadOpml(){this.name="loadOpml";this.start=function(a){xmlUrl=a.getElementsByTagName("input")[0].value;classBehaviour.ajax.addRequest(xmlUrl,this.insertNew,this.waitForNew,null,a)};this.waitForNew=function(){};this.insertNew=function(d,c){var b="";allNodes=d.getElementsByTagName("outline");for(var a=0;a<allNodes.length;a++){podUrl=allNodes[a].getAttribute("htmlUrl");podRss=allNodes[a].getAttribute("xmlUrl");podTitle=allNodes[a].getAttribute("text");b+='<li><a href="'+podUrl+'">'+podTitle+"</a>";b+=podRss!=""?' - <a href="'+podRss+'" class="rss">rss</a></li>':"</li>"}c.innerHTML="<ul>"+b+"</ul>"}}classBehaviour.loadOpml=new LoadOpml;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.loadOpml;function DisabledButton(){this.name="disabledButton";this.start=function(a){a.onclick=this.cancelClick;classBehaviour.fader.setFade(a,50)};this.cancelClick=function(a){var b=typeof this.nodeName=="undefined"?a:this;return false}}classBehaviour.disabledButton=new DisabledButton;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.disabledButton;function ParallaxBackground(){this.name="parallaxBackground";this.index=0;this.focusNode=null;this.start=function(a){this.index+=1;a.id=a.id?a.id:this.name+this.index;scrollerId=classBehaviour.utilities.getClassParameter(a,"scroller",null);scroller=scrollerId!=null?document.getElementById(scrollerId):window;classBehaviour.utilities.addEvent(scroller,"scroll",this.adjustScroll);if(scroller!=window)scroller.onmouseover=this.storeFocus;if(scroller!=window)scroller.onmouseout=this.clearFocus};this.storeFocus=function(b){var a=typeof this.nodeName=="undefined"?b:this,c=classBehaviour.parallaxBackground;c.focusNode=a};this.clearFocus=function(a){var c=typeof this.nodeName=="undefined"?a:this,b=classBehaviour.parallaxBackground;b.focusNode=null};this.adjustScroll=function(c){var d=typeof this.nodeName=="undefined"?c:this,a=classBehaviour.parallaxBackground;if(a.focusNode==null){scrollPosition=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;parallaxLayers=[document.body.id,10]}else{scrollPosition=a.focusNode.scrollTop;parallaxCSV=classBehaviour.utilities.getClassParameter(a.focusNode,"layers",a.focusNode.id+";10");parallaxLayers=parallaxCSV.split(";")}for(var b=0;b<parallaxLayers.length-1;b+=2){backgroundPosition=Math.round(-1*scrollPosition/parseInt(parallaxLayers[b+1]));parallaxLayer=document.getElementById(parallaxLayers[b]);parallaxLayer.style.backgroundPosition="50% "+backgroundPosition+"px"}}}classBehaviour.parallaxBackground=new ParallaxBackground;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.parallaxBackground;function SkipToNextField(){this.name="skipToNextField";this.start=function(a){a.onkeyup=this.count};this.count=function(b){var a=typeof this.nodeName=="undefined"?b:this;maxCount=classBehaviour.utilities.getClassParameter(a,"count",2);nextId=classBehaviour.utilities.getClassParameter(a,"id",null);curCount=a.value.length;if(curCount>=maxCount)if(nextId!=null){nextNode=document.getElementById(nextId);nextNode.focus()}else{notFound=true;while(notFound){nextNode=classBehaviour.utilities.nextNode(a);if(nextNode.nodeName=="INPUT"||nextNode.nodeName=="TEXTAREA"||nextNode.nodeName=="BUTTON"||nextNode.nodeName=="SELECT"){nextNode.focus();notFound=false}if(a==nextNode)notFound=false}}}}classBehaviour.skipToNextField=new SkipToNextField;classBehaviour.handlers[classBehaviour.handlers.length]=classBehaviour.skipToNextField
