/* stylesheet generator */

	// generates an empty stylesheet based on the html dom
	var strStyleSheet = "";
	var objBody = document.body;
	
	function isFormElement(node){
		return (('INPUT,SELECT,TEXTAREA,BUTTON').indexOf(node.nodeName)>-1);
	}
	
	function getNodeClasses(objNode, intRecursion, prefix){
		var strTabs = '';
		var idPrefix, classPrefix, tagPrefix, addPrefix;
		var newEntry = '';
		// for every recursion add one tab
		for(var intB=0; intB<intRecursion; intB++) strTabs += '\t';
		// get the child nodes
		var objChildNodes = objNode.childNodes;
		// for every childnode
		for(var intA=0; intA<objChildNodes.length; intA++){
			// reset prefixes
			idPrefix = '';
			classPrefix = '';
			tagPrefix = '';
			addPrefix = '';
			// if it has an id, but is not a form element
			if(typeof(objChildNodes[intA].id)!='undefined' && !isFormElement(objChildNodes[intA])){
				if(objChildNodes[intA].id!=''){
					// add class to stylesheet prototype
					newEntry = strTabs + '#' + objChildNodes[intA].id + ' {}\n'
						// strStyleSheet += strTabs + prefix + '#' + objChildNodes[intA].id + ' {}\n'
					// add this style only if there's not double
					if(strStyleSheet.indexOf(newEntry)<0) strStyleSheet += newEntry;
					// update the prefix
					idPrefix = '#' + objChildNodes[intA].id;
				}
			}
			// if it has a className
			if(typeof(objChildNodes[intA].className)!='undefined'){
				if(objChildNodes[intA].className!=''){
					// split the classnames
					allClasses = objChildNodes[intA].className.split(' ');
					// for all classes
					for(var b=allClasses.length-1; b>=0; b--){
						// add class to stylesheet prototype
						newEntry = strTabs + prefix + objChildNodes[intA].nodeName.toLowerCase() + '.' + allClasses[b] + ' {}\n';
						// add this style only if there's not double
						if(strStyleSheet.indexOf(newEntry)<0) strStyleSheet += newEntry;
						// update the prefix
						classPrefix = objChildNodes[intA].nodeName.toLowerCase() + '.' + allClasses[b];
					}
				}
			}
			// if it has neither
			if(
				objChildNodes[intA].className=='' && 
				(objChildNodes[intA].id=='' || isFormElement(objChildNodes[intA])) && 
				objChildNodes[intA].nodeName.indexOf('text')<0 && 
				objChildNodes[intA].nodeName.indexOf('comment')<0
			){
				// add class to stylesheet prototype
				newEntry = strTabs + prefix + objChildNodes[intA].nodeName.toLowerCase() + ' {}\n';
				// add this style only if there's not double
				if(strStyleSheet.indexOf(newEntry)<0) strStyleSheet += newEntry;
				// update the prefix
				tagPrefix = objChildNodes[intA].nodeName.toLowerCase();
			}
			// if the last entry was a link
			if(newEntry.indexOf(' a {}')>-1){
				// repeat it four times with the mouseover states
				linkEntry = newEntry.replace('a {}','a:link,');
				if(strStyleSheet.indexOf(linkEntry)<0) strStyleSheet += '\t' + linkEntry;
				linkEntry = newEntry.replace('a {}','a:visited {}');
				if(strStyleSheet.indexOf(linkEntry)<0) strStyleSheet += '\t' + linkEntry;
				linkEntry = newEntry.replace('a {}','a:hover,');
				if(strStyleSheet.indexOf(linkEntry)<0) strStyleSheet += '\t' + linkEntry;
				linkEntry = newEntry.replace('a {}','a:active {}');
				if(strStyleSheet.indexOf(linkEntry)<0) strStyleSheet += '\t' + linkEntry;
				// and jump further in
				intRecursion += 1;
			}
			// if it has childNodes
			if(objChildNodes[intA].childNodes.length>0){
				// update the prefix
				if(idPrefix){
					addPrefix = idPrefix + ' ';
				}else if(classPrefix){
					addPrefix = prefix + classPrefix + ' ';
				}else if(tagPrefix){
					addPrefix = prefix + tagPrefix + ' ';
				}
				// recurse
				getNodeClasses(objChildNodes[intA], intRecursion+1, addPrefix);
			}
		}
	}

	function showNodeClasses(){
		document.body.style.textAlign = 'left';
		getNodeClasses(objBody, 0 , '');
		document.body.innerHTML = '<pre>' + strStyleSheet + '</pre>';	
	}

	//document.writeln('<a href="javascript:{showNodeClasses()}" style="position : absolute; left : 0px; top : 0px;">Click here to create an empty stylesheet for this markup.</a>');
	
	
	
	
	
	
	
	
	
	
	
/*
name			: Class Behaviour
update			: 20051129
author			: Xander Bindt, Frank van Rooijen, Maurice van Creij
dependencies		: lib_classbehaviour.js
info				: http://www.woollymittens.nl/content/details.asp?id=20040805133501
*/

	// MAIN
	// main class-behaviour object
	function ClassBehaviour(){
		/* properties */
			this.handlers			=	new Array();
		/* methods */
			// return a parameter from the url's query strings
			this.getQueryParameter 	= 	function(paramName, defaultValue){
											// split the query string at the parameter name
											var queryParameters = document.location.search.split(paramName+"=");
											// split the parameter value from the rest of the string
											var queryParameter = (queryParameters.length>1) ? queryParameters[1].split("&")[0] : null ;
											// return the value
											return (queryParameter!=null) ? queryParameter : defaultValue ;
										}
			// returns a string of parameters found in the classname which can be [eval]uated
			this.getClassParameter	=	function(targetNode, paramName, defaultValue){
											// get the class parameter from the classname
											var classParameter = targetNode.className;
											// split the classname between the parameter name
											classParameter = classParameter.split(paramName + '_');
											// split the second piece between spaces and take the first part,  if there are two pieces
											classParameter = (classParameter.length>1) ? classParameter[1].split(' ')[0] : null ;
											// return the value
											return (classParameter!=null) ? classParameter : defaultValue ;
										}
			// returns the visible display state needed for this element
			this.getVisibleState	=	function(node){
											// what kind of node is this
											switch(node.nodeName.toLowerCase()){
												case 'table' : visibleState='table' ; break;
												case 'thead' : visibleState='table-header-group' ; break;
												case 'tfoot' : visibleState='table-footer-group' ; break;
												case 'tbody' : visibleState='table-row-group' ; break;
												case 'tr' : visibleState='table-row' ; break;
												case 'td' : visibleState='table-cell' ; break;
												case 'th' : visibleState='table-cell' ; break;
												default : visibleState='block';
											}
											// apply the state
											return (document.all && navigator.userAgent.indexOf('Opera')<0) ? 'block' : visibleState;
										}
			// (cross)fader and pseudo event handler
			this.fader				=	new Fader;
			// get the previous node without worrying about text nodes
			this.nextNode			=	function(node){
											// look for the next html node
											do {
												node = node.nextSibling;
											} while(node.nodeName.indexOf('#text')>-1);
											// return it
											return node;
										}
			// get the next node without worrying about text nodes
			this.previousNode		=	function(node){
											// look for the previous html node
											do {
												node = node.previousSibling;
											} while(node.nodeName.indexOf('#text')>-1);
											// return it
											return node;
										}
			// parse the document for classnames
			this.parseDocument		=	function(){
											// get all document nodes
											var allNodes = (document.all) ? document.all : document.getElementsByTagName("*");
											// for all tags
											for(var a=0; a<allNodes.length; a++){
												// if the item has a className
												if(allNodes[a].className){
													// get the classname
													nodeClass = allNodes[a].className;
													// for all behaviours
													for(var b=0; b<this.handlers.length; b++){
														// if the behaviour's name exists in the class name, apply it's events
														if(nodeClass.indexOf(this.handlers[b].name)>-1) this.handlers[b].start(allNodes[a]);
													}
												}
											}
										}
	}
	// create the main class-behaviour object
	var classBehaviour = new ClassBehaviour;
	
	// UTILITIES
		function Fader(){
			/* properties */
			/* methods */
			this.getFade	=	function(node){
									var fadeValue = null;
									// get the fade value using the proper method
									if(typeof(node.style.MozOpacity)!='undefined')	fadeValue = Math.round(parseFloat(node.style.MozOpacity)*100);
									if(typeof(node.style.filter)!='undefined')		fadeValue = parseInt(node.filters.alpha.opacity);
									if(typeof(node.style.opacity)!='undefined')		fadeValue = Math.round(parseFloat(node.style.opacity)*100);
									// return the value
									return fadeValue;
								}
			this.setFade	=	function(node, amount){
									// set the fade value using the proper method
									if(typeof(node.style.MozOpacity)!='undefined')	node.style.MozOpacity = amount/100;
									if(typeof(node.style.filter)!='undefined')		node.style.filter = "alpha(opacity=" + amount + ")";
									if(typeof(node.style.opacity)!='undefined')		node.style.opacity = amount/100;
										/*
										filter:alpha(opacity=50);	imageobject.filters.alpha.opacity=opacity
										-moz-opacity: 0.5;			imageobject.style.MozOpacity=opacity/100
										opacity: 0.5;
										-khtml-opacity: 0.5;
										*/
								}
			this.fadeIn		=	function(idIn, step, delay, evalEvent){
									var cf = classBehaviour.fader;
									// get the fading object
									node = document.getElementById(idIn);
									// get the current fade
									fade = cf.getFade(node) + step;
									// if not 100%
									if((fade)<100){
										// set the new fade
										cf.setFade(node, fade);
										// next step
										cf.timeOut = setTimeout("classBehaviour.fader.fadeIn('"+idIn+"',"+step+","+delay+",'"+evalEvent+"')", delay);
									// else
									}else{
										// set the fade to 100%
										cf.setFade(node, 100);
										// trigger the end event
										eval(evalEvent);
									}
								}
			this.fadeOut	=	function(idOut, step, delay, evalEvent){
									var cf = classBehaviour.fader;
									// get the fading object
									node = document.getElementById(idOut);
									// get the current fade
									fade = cf.getFade(node) - step;
									// if not 100%
									if(fade>0){
										// set the new fade
										cf.setFade(node, fade);
										// next step
										cf.timeOut = setTimeout("classBehaviour.fader.fadeOut('"+idOut+"',"+step+","+delay+",'"+evalEvent+"')", delay);
									// else
									}else{
										// set the fade to 100%
										cf.setFade(node, 0);
										// trigger the end event
										eval(evalEvent);
									}
								}
			this.crossFade	=	function(idIn, idOut, amount, step, delay, evalEvent){
									var cf = classBehaviour.fader;
									// if the amount is not the end value yet
									if(amount<=100){
										// set the fade amounts
										if(idIn && idIn!="") cf.setFade(document.getElementById(idIn), amount);
										if(idOut && idOut!="") cf.setFade(document.getElementById(idOut), 100-amount);
										// unhide the new page
										document.getElementById(idIn).style.display = 'block';
										// construct the fade function
										var evalLoop = "classBehaviour.fader.crossFade('"+idIn+"', '"+idOut+"', "+(amount+step)+", "+step+", "+delay+", '"+evalEvent+"')";
										// repeat the fade
										setTimeout(evalLoop, delay);
									}else{
									// else
										// cancel the opacity style
										var node = document.getElementById(idIn);
										if(typeof(node.style.MozOpacity)!='undefined')	node.style.MozOpacity = 'auto';
										if(typeof(node.style.filter)!='undefined')		node.style.filter = 'none';
										if(typeof(node.style.opacity)!='undefined')		node.style.opacity = 'auto';
										// hide the old page
										if(idOut && idOut!="") document.getElementById(idOut).style.display = 'none';
										// trigger the end event
										cf.onEnd(evalEvent);
									}
								}
			/* events */
			this.onEnd		=	function(evalEvent){
									eval(evalEvent);
								}
		}

// Make fading menu
		// define this class behaviour
		function FadingMenu(){
			/* properties */
			this.name 		= 	'fadingMenu';
			this.current 	=	null;
			this.always		=	null;
			this.locked		=	false;
			this.timeout	=	null;
			/* methods */
			this.start		=	function(node){
									this.process(node);
								}
			this.process 	= 	function(objNode){
									var objNodes, objMatch;
									// apply events to all LIs
									objNodes = objNode.childNodes;
									for(var a=0; a<objNodes.length; a++){
										if(objNodes[a].nodeName=="LI"){
											// if this LI as a link
											objLinks = objNodes[a].getElementsByTagName('A');
											if(objLinks.length>0){
												// mouseover events
												objLinks[0].onmousemove	= this.open;
												objNode.onmouseout	= this.delay;
												// store the last link marked active
												this.always = (objLinks[0].className.indexOf('active')>-1) ? objLinks[0] : this.always ;
											}
											// if this LI has a child UL, give it a random id
											objLists = objNodes[a].getElementsByTagName('UL');
											if(objLists.length>0){
												objLists[0].id = 'sub_' + Math.round(Math.random() * 10000);
											}
										}
									}
									// open the starting node
									this.open(this.always, true);
								}
			/* events */
			this.open 		= 	function(that, noFade){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var fm = classBehaviour.fadingMenu;
									// cancel the closing timer
									clearTimeout(fm.timeout);
									// if not locked
									if(!fm.locked && objNode!=fm.current){
										// PREVIOUS MENU
										if(fm.current){
											// deactivate the link
// TODO: stylesheet link
											// deactivate the image
											//linkImage = fm.current.getElementsByTagName('IMG')[0];
											//linkImage.src = linkImage.src.replace('_hover','_link');
											// store the sub-menu
											linkMenu = fm.current.parentNode.getElementsByTagName('UL');
											fadeCloseId = (linkMenu.length>0) ? linkMenu[0].id : '' ;
										}else{
											fadeCloseId = '';
										}
										// OPEN NEW MENU
										if(objNode){
											// deactivate the link
// TODO: stylesheet link
											// activate the image
											//linkImage = objNode.getElementsByTagName('IMG')[0];
											//linkImage.src = linkImage.src.replace('_link','_hover');
											// store the sub-menu
											linkMenu = objNode.parentNode.getElementsByTagName('UL');
											fadeOpenId = (linkMenu.length>0) ? linkMenu[0].id : '' ;
										}
										// store the current link 
										fm.current = objNode;
										// SET THE FADE
										if(noFade){
											if(fadeCloseId!='') document.getElementById(fadeCloseId).style.display = 'none';
											if(fadeOpenId!='') document.getElementById(fadeOpenId).style.display = 'block';
										}else{
											fm.locked = true;
											classBehaviour.fader.crossFade(fadeOpenId, fadeCloseId, 0, 10, 20, 'classBehaviour.fadingMenu.locked=false;');
										}
									}
								}
			this.delay		=	function(){
									var fm = classBehaviour.fadingMenu;
									// clear the previous delay
									clearTimeout(fm.timeout);
									// delay the closing
									fm.timeout = setTimeout('classBehaviour.fadingMenu.close()', 1024);
								}
			this.close 		= 	function(){
									var fm = classBehaviour.fadingMenu;
									// if not locked
									if(!fm.locked){
										fm.open(fm.always);
									}
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.fadingMenu = new FadingMenu;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.fadingMenu;
	
	// Open print dialog
		// define this class behaviour
		function OpenAsPrintable(){
			/* properties */
			this.name 		= 	'openAsPrintable';
			/* methods */
			this.start		=	function(node){
									node.onclick = this.process;
								}
			this.process 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									// If there is a demo popup
									if(document.getElementById('tgtPopTitle')){
										// copy the title to the print popup title
										document.getElementById('tgtPopTitle').innerHTML = document.getElementById('content').getElementsByTagName('h1')[0].innerHTML;
										// copy the content tot the print popup content
										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];
										// show the print popup
										classBehaviour.openLayerPopUp.show(document.getElementById('popup0'));
										// open the print dialog
										setTimeout("window.print();",2048);
									}else{
										window.print();
									}
									// cancel the click
									return false;
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.openAsPrintable = new OpenAsPrintable;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.openAsPrintable;
	
	// replace in class
		// define this class behaviour
		function ClassMouseHover(){
			/* properties */
			this.name 		= 	'classMouseHover';
			/* methods */
			this.start		=	function(node){
									node.onmouseover = this.addHover;
									node.onmouseout = this.remHover;
								}
			this.hasNoStateClass 	= 	function(objNode){
											return (objNode.className.indexOf('link')<0 && objNode.className.indexOf('hover')<0 && objNode.className.indexOf('active')<0);
										}
			/* events */
			this.addHover 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var cmh = classBehaviour.classMouseHover;
									// replace link by hover
									objNode.className = (cmh.hasNoStateClass(objNode)) ? 'hover ' + objNode.className : objNode.className.replace('link','hover') ;
								}
			this.remHover 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var cmh = classBehaviour.classMouseHover;
									// replace hover by link
									objNode.className = (cmh.hasNoStateClass(objNode)) ? 'link ' + objNode.className : objNode.className.replace('hover','link') ;
								}
			this.addActive 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var cmh = classBehaviour.classMouseHover;
									// replace link by active
									objNode.className = objNode.className.replace('link','active') ;
									// replace hover by active
									objNode.className = objNode.className.replace('hover','active') ;
									// if there's still no active class
									if(cmh.hasNoStateClass(objNode)) objNode.className = 'active ' + objNode.className;
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.classMouseHover = new ClassMouseHover;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.classMouseHover;
	
	// make all sub elements fake the :hover attribute with .hover
		// define this class behaviour
		function PseudoHover(){
			/* properties */
			this.name 		= 	'pseudoHover';
			/* methods */
			this.start		=	function(node){
									// get all elements
									allNodes = node.getElementsByTagName('LI');
									// for all elements
									for(var a=0; a<allNodes.length; a++){
										// add the hover event
										classBehaviour.classMouseHover.start(allNodes[a]);
									}
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.pseudoHover = new PseudoHover;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.pseudoHover;
		
	// replace in src sub-string
		// define this class behaviour
		function SrcMouseHover(){
			/* properties */
			this.name 			= 	'srcMouseHover';
			this.cache 			= new Array();
			/* methods */
			this.start			=	function(node){
										this.cacheImages(node);
										node.onmouseover = this.addHover;
										node.onmouseout = this.remHover;
									}
			this.cacheImages	 = 	function(that) {
										var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
										// if this is not the image, it must be the parent
										if(!objNode.src) objNode = objNode.getElementsByTagName('IMG')[0];
										// replace link by hover
										var cacheIdx = this.cache.length;
										// hover version
										this.cache[cacheIdx] = new Image();
										this.cache[cacheIdx].src = objNode.src.replace('_link','_hover');
										// active version
										this.cache[cacheIdx+1] = new Image();
										this.cache[cacheIdx+1].src = objNode.src.replace('_link','_active');
									}
			/* events */
			this.addActive 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									// if this is not the image, it must be the parent
									if(objNode.nodeName!='IMG') objNode = objNode.getElementsByTagName('IMG')[0];
									// replace link by active
									objNode.src = objNode.src.replace('_link','_active');
									// replace hover by active
									objNode.src = objNode.src.replace('_hover','_active');
								}
			this.addHover 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									// if this is not the image, it must be the parent
									if(!objNode.src) objNode = objNode.getElementsByTagName('IMG')[0];
									// replace link by hover
									objNode.src = objNode.src.replace('_link','_hover');
								}
			this.remHover 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									// if this is not the image, it must be the parent
									if(!objNode.src) objNode = objNode.getElementsByTagName('IMG')[0];
									// replace link by hover
									objNode.src = objNode.src.replace('_hover','_link');
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.srcMouseHover = new SrcMouseHover;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.srcMouseHover;

	// replace in src sub-string
		// define this class behaviour
		function FadeMouseHover(){
			/* properties */
			this.name 			= 'fadeMouseHover';
			this.cache 			= new Array();
			this.count			= 0;
			this.timeOut		= null;
			/* methods */
			this.start			=	function(node){
										this.cacheImages(node);
										// node.onload = this.setUpFader;
										this.setUpFader(node);
									}
			this.setUpFader		=	function(that){
										var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
										var fmh = classBehaviour.fadeMouseHover;
										// give this image an id, if it doesn't have one
										if(!objNode.id) objNode.id = 'fadingImage' + fmh.count;
										fmh.count += 1;
										// set the active version of the image source as a background-image of the container
										objNode.parentNode.style.backgroundImage = 'url(' + objNode.src.replace('_link','_hover') + ')';
										// set the image as a block element
										objNode.parentNode.style.display = 'block';
										objNode.parentNode.style.width = objNode.width + 'px';
										objNode.parentNode.style.height = objNode.height + 'px';
										// set the default fade
										classBehaviour.fader.setFade(objNode, 100);
										// set up the events
										objNode.onmouseover = fmh.addHover;
										objNode.onmouseout = fmh.remHover;
									}
			this.cacheImages	 = 	function(that) {
										var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
										// if this is not the image, it must be the parent
										if(!objNode.src) objNode = objNode.getElementsByTagName('IMG')[0];
										// replace link by hover
										var cacheIdx = this.cache.length;
										// hover version
										this.cache[cacheIdx] = new Image();
										this.cache[cacheIdx].src = objNode.src.replace('_link','_hover');
									}
			/* events */
			this.addHover 	= 	function(that, id){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var fmh = classBehaviour.fadeMouseHover;
									// if an id is passed. It overrides the event node
									if(id) objNode = document.getElementById(id);
									// if there's no fade active at the moment // fade out the image
									if(classBehaviour.fader.getFade(objNode)%100==0){
										classBehaviour.fader.fadeOut(objNode.id, 20, 50, '');
									// else try again in a bit
									}else{
										// fmh.timeOut = setTimeout("classBehaviour.fadeMouseHover.addHover(null, '" + objNode.id + "')",50);
									}
								}
			this.remHover 	= 	function(that, id){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var fmh = classBehaviour.fadeMouseHover;
									// if an id is passed. It overrides the event node
									if(id) objNode = document.getElementById(id);
									// if there's no fade active at the moment // fade in the image
									if(classBehaviour.fader.getFade(objNode)%100==0){
										classBehaviour.fader.fadeIn(objNode.id, 20, 50, '');
									// else try again in a bit
									}else{
										fmh.timeOut = setTimeout("classBehaviour.fadeMouseHover.remHover(null, '" + objNode.id + "')",50);
									}
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.fadeMouseHover = new FadeMouseHover;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.fadeMouseHover;
		
	// Add or remove display:none; onclick
		// define this class behaviour
		function ToggleNextNode(){
			/* properties */
			this.name 		= 	'toggleNextNode';
			this.nextNode	=	null;
			this.lastNode	=	null;
			this.lastLink	=	null;
			this.locked	=	false;
			/* methods */
			this.start		=	function(node){
									node.onclick = this.toggleNext;
								}
			this.animate	=	function(){
									var tnn = classBehaviour.toggleNextNode;
									// set the loop status
									tnn.locked = true;
									openingComplete = true;
									closingComplete = true;
									// FOR THE CLOSING NODE
									if(tnn.lastNode){
										// what is the content's height of this object
										closingCurrentHeight = parseInt(tnn.lastNode.offsetHeight);
										closingContentHeight = parseInt(classBehaviour.getClassParameter(tnn.lastNode, 'height', '0'));
										// calculate the step-size
										closingStep = Math.round(closingContentHeight / 10);
										// if the current height isn't big enough
										if(closingCurrentHeight > closingStep){
											closingComplete = false;
											// set the container to hide any overflow
											tnn.lastNode.style.overflow = 'hidden';
											// set the container to the current height + a step
											tnn.lastNode.style.height = (closingCurrentHeight - closingStep) + 'px';
										// else
										}else{
											closingComplete = true;
											// hide the node
											tnn.lastNode.style.display = 'none';
											// remove the overflow parameter
											tnn.lastNode.style.overflow = 'visible';
											// set the height to automatic
											tnn.lastNode.style.height = 'auto';
											// RESET THE PARENT NODE (since the animation loop prevents this to be done in it's regular function "toggleNext"
											titleNode = classBehaviour.previousNode(tnn.lastNode);
											titleNode.className = titleNode.className.replace('active','link');
											if(titleNode.src!=null) titleNode.src = titleNode.src.replace('active','link');
										}
									}
									// FOR THE OPENING NODE
									if(tnn.nextNode){
										// what is the content's height of this object
										openingCurrentHeight = parseInt(tnn.nextNode.offsetHeight);
										openingContentHeight = parseInt(classBehaviour.getClassParameter(tnn.nextNode, 'height', '0'));
										// calculate the step-size
										openingStep = Math.round(openingContentHeight / 10);
										// if the current height isn't big enough
										if(openingCurrentHeight <= openingContentHeight - openingStep){
											openingComplete = false;
											// set the container to hide any overflow
											tnn.nextNode.style.overflow = 'hidden';
											// set the container to the current height + a step
											tnn.nextNode.style.height = (openingCurrentHeight + openingStep) + 'px';
											// make the node visible
											tnn.nextNode.style.display = classBehaviour.getVisibleState(tnn.nextNode);
										// else
										}else{
											openingComplete = true;
											// remove the overflow parameter
											tnn.nextNode.style.overflow = 'visible';
											// set the height to automatic
											tnn.nextNode.style.height = 'auto';
										}
									}
									// REPEAT OR END
									// if both limits are reached
									if(openingComplete && closingComplete){
										// remember the new last node
										tnn.lastNode = tnn.nextNode;
										// restore the click lock
										tnn.locked = false;
									// else
									}else{
										// call this function again
										setTimeout("classBehaviour.toggleNextNode.animate();", 10);
									}
								}
			/* events */
			this.toggleThis = 	function(that, strClosePrevious){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var tnn = classBehaviour.toggleNextNode;
									// restore previous node
									if(tnn.lastNode!=null && tnn.lastNode!=objNode && strClosePrevious=='yes') tnn.lastNode.style.display = 'none';
									// toggle node's visibility
									objNode.style.display = (objNode.style.display=='none') ? classBehaviour.getVisibleState(objNode) : 'none' ;
									// remember last node
									tnn.lastNode = objNode;	
								}
			this.toggleAnim =	function(that, strClosePrevious){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var tnn = classBehaviour.toggleNextNode;
									// store the animating nodes
									if(strClosePrevious=='no'){
										tnn.nextNode = (objNode.style.display=='none') ? objNode : null ;
										tnn.lastNode = (objNode.style.display=='none') ? null : objNode ;
									}else{
										tnn.nextNode = (objNode.style.display=='none') ? objNode : null ;
										tnn.lastNode = (objNode.style.display=='none') ? tnn.lastNode : objNode ;
									}
									// measure the height of the content in the opening node
									tnn.animate();
								}
			this.toggleNext = 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var tnn = classBehaviour.toggleNextNode;
									// if there is not a running animation
									if(!tnn.locked){
										// get parent recursion
										var intParentRecursion = parseInt(classBehaviour.getClassParameter(objNode,'useParent','0'));
										var objParentNode = objNode;
										for(var a=0; a<intParentRecursion; a++) objParentNode = objParentNode.parentNode;
										// check if a previousnode needs closing
										var strClosePrevious = classBehaviour.getClassParameter(objNode,'closePrevious','no');
										// get optional id
										var strCloseId = classBehaviour.getClassParameter(objNode, 'id', null);
										// animated folding
										var strAnimated = classBehaviour.getClassParameter(objNode,'animated','no');
										// determine the next node
										var objNextNode;
										if(strCloseId!=null){
											objNextNode = document.getElementById(strCloseId);
										}else if(objParentNode.nextSibling){
											objNextNode = (objParentNode.nextSibling.nodeName.indexOf("text")<0) ? objParentNode.nextSibling : objParentNode.nextSibling.nextSibling ;
										}
										// if there is a next node
										if(objNextNode!=null){
											// toggle it's visibility
											if(strAnimated=='yes'){
												tnn.toggleAnim(objNextNode, strClosePrevious);
											}else{
												tnn.toggleThis(objNextNode, strClosePrevious);
											}
											// If the next node has been hidden
											if(objNextNode.style.display=='none'){
												// restore current node's click state
												objNode.className = objNode.className.replace('active','link');
												if(objNode.src!=null) objNode.src = objNode.src.replace('active','link');
											}else{
												// mark current node as active
												objNode.className = objNode.className.replace('link','active');
												objNode.className = objNode.className.replace('hover','active');
												if(objNode.src!=null) objNode.src = objNode.src.replace('link','active');
												if(objNode.src!=null) objNode.src = objNode.src.replace('hover','active');
												// restore previous node's click state
												if(tnn.lastLink!=null && tnn.lastLink!=objNode && strClosePrevious=='yes'){
													tnn.lastLink.className = tnn.lastLink.className.replace('active','link');
													if(objNode.src!=null) tnn.lastLink.src = tnn.lastLink.src.replace('active','link');
												}
											}
											// remember last node
											tnn.lastLink = objNode;
										}
									}
									// cancel onclick event
									return false;
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.toggleNextNode = new ToggleNextNode;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.toggleNextNode;

	// add display='none'; on parse
		// define this class behaviour
		function HideThisNode(){
			/* properties */
			this.name 		= 	'hideThisNode';
			/* methods */
			this.start		=	function(node){
									// store the node's height in it's className
									node.className += ' height_' + node.offsetHeight;
									// hide the node
									node.style.display = 'none';
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.hideThisNode = new HideThisNode;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.hideThisNode;
		
	// affirms the visibility status in regard to toggles
		// define this class behaviour
		function ShowThisNode(){
			/* properties */
			this.name 		= 	'showThisNode';
			/* methods */
			this.start		=	function(node){
									// store the node's height in it's className
									node.className += ' height_' + node.offsetHeight;
									// apply the visible state
									node.style.display = classBehaviour.getVisibleState(node);
									// fill the "previous node" parameters of a related object
									classBehaviour.toggleNextNode.lastNode = node;
									classBehaviour.toggleNextNode.lastNode = node;
									// if this isn't the first node
									if(node.parentNode.childNodes[0] != node){
										// pick the previousnode
										objPreviousNode = (node.previousSibling.nodeName.indexOf("text")<0) ? node.previousSibling : node.previousSibling.previousSibling ;
										// store it as the 'previous' toggle
										if(objPreviousNode!=null) classBehaviour.toggleNextNode.lastNext = objPreviousNode;
									}
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.showThisNode = new ShowThisNode;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.showThisNode;
		
	// add display='none'; to parent node
		// define this class behaviour
		function CloseParentNode(){
			/* properties */
			this.name 		= 	'closeParentNode';
			/* methods */
			this.start		=	function(node){
									/*event*/;
									node.onclick = this.process;
								}
			/* events */
			this.process 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var tnn = classBehaviour.toggleNextNode;
									// get the desired parent recursion
									targetParent = parseInt(classBehaviour.getClassParameter(objNode, 'parent', '0'));
									objTarget = objNode;
									for(var a=0; a<targetParent; a++) objTarget = objTarget.parentNode;
									// hide the parent node
									objTarget.style.display = 'none';
									// restore previous node's click state
									if(tnn.lastNext!=null && tnn.lastNext!=objNode) tnn.lastNext.className = tnn.lastNext.className.replace('active','link');
									// cancel onclick event
									return false;
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.closeParentNode = new CloseParentNode;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.closeParentNode;
		
	// tabbed content
		// define this class behaviour
		function TabbedContent(){
			/* properties */
			this.name 		= 	'tabbedContent';
			/* methods */
			this.start		=	function(node){
									// get all tabs
									allTabs = node.getElementsByTagName('a');
									// store the most likely opened tab
									openedTab = allTabs[0];
									// for all tabs
									for(var a=0; a<allTabs.length; a++){
										// get the id this tab refers to
										tabId = allTabs[a].href.split('#')[1];
										// apply onclick events to the referred tab
										allTabs[a].onclick = this.open;
										// apply the starting state of the tab if needed
										if(allTabs[a].className.indexOf('closedTab')<0) allTabs[a].className += ' closedTab';
										// apply the starting state of the referred content if needed
										document.getElementById(tabId).style.display = 'none';
										// if this tab is referred to in the page url, remember it as active
										if(document.location.href.indexOf(allTabs[a].href)>-1) openedTab = allTabs[a];
										// if this tab was manualy set
										if(allTabs[a].className.indexOf('openedTab')>-1) openedTab = allTabs[a];
									}
									// if there is a pager
									pager = document.getElementById(classBehaviour.getClassParameter(node, 'pagerId', 'none'));
									if(pager){
										// assign the events for the buttons
										pager.getElementsByTagName('a')[0].onclick = this.previous;
										pager.getElementsByTagName('a')[1].onclick = this.next;
									}
									// open the most likely first tab
									this.open(openedTab, true);
								}
			/* events */
			this.next		=	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var tbd = classBehaviour.tabbedContent;
									// get the pager information
									pagerInfo = objNode.parentNode.parentNode.getElementsByTagName('span')[0].firstChild.nodeValue;
									// what is the current pagenumber
									currentPage = parseInt(pagerInfo.split('/')[0]);
									// how many pages are there
									totalPages = parseInt(pagerInfo.split('/')[1]);
									// what is the next page
									nextPage = (currentPage<totalPages) ? currentPage + 1 : 1 ;
									// what is the tabs strip
									tabStrip = document.getElementById(classBehaviour.getClassParameter(objNode.parentNode.parentNode, 'tabsId', 'none'));
									if(tabStrip){
										// get the relevant page from the tab strip
										targetTab = tabStrip.getElementsByTagName('a')[nextPage-1];
										// activate it's click
										tbd.open(targetTab);
									}
								}
			this.previous	=	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var tbd = classBehaviour.tabbedContent;
									// get the pager information
									pagerInfo = objNode.parentNode.parentNode.getElementsByTagName('span')[0].firstChild.nodeValue;
									// what is the current pagenumber
									currentPage = parseInt(pagerInfo.split('/')[0]);
									// how many pages are there
									totalPages = parseInt(pagerInfo.split('/')[1]);
									// what is the next page
									previousPage = (currentPage>1) ? currentPage - 1 : totalPages ;
									// what is the tabs strip
									tabStrip = document.getElementById(classBehaviour.getClassParameter(objNode.parentNode.parentNode, 'tabsId', 'none'));
									if(tabStrip){
										// get the relevant page from the tab strip
										targetTab = tabStrip.getElementsByTagName('a')[previousPage-1];
										// activate it's click
										tbd.open(targetTab);
									}
								}
			this.open		=	function(that, noAnimation){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var tbd = classBehaviour.tabbedContent;								
									
									// INDEX THE TAB STATES
									// get all tabs
									var allTabs = objNode.parentNode.parentNode.getElementsByTagName('a');
									var prevTab = null;
									var pageNumber = 0;
									// find the current tab
									for(var a=0; a<allTabs.length; a++){
										// rememeber the previous tab
										if(allTabs[a].className.indexOf('openedTab')>-1) prevTab = allTabs[a];
										// count the new pagenumber
										if(allTabs[a]==objNode) pageNumber = a;
									}
									
									// if this is the current tab again
									if(prevTab!=objNode){
									
										// PREVIOUS TAB
										if(prevTab){
											// mark the previous tab as passive
											prevTab.className = prevTab.className.replace('openedTab', 'closedTab');
											// if the tab has an image
											tabImages = prevTab.getElementsByTagName('img');
											if(tabImages.length>0) tabImages[0].src = tabImages[0].src.replace('_active','_link');
											// id the previous tabbed content
											prevContentId = prevTab.href.split('#')[1];
										}
										
										// NEXT TAB
										// mark the next tab as active
										objNode.className = objNode.className.replace('closedTab', 'openedTab');
										// if the tab has an image
										tabImages = objNode.getElementsByTagName('img');
										if(tabImages.length>0) tabImages[0].src = tabImages[0].src.replace('_link','_active').replace('_hover','_active');
										// id the next tabbed content
										nextContentId = objNode.href.split('#')[1];
										
										// FADE ANIMATION
										isAnimated = (noAnimation) ? 'no' : classBehaviour.getClassParameter(objNode, 'animated', 'yes') ;
										if(isAnimated=='yes'){
											// make the previous tab float
											document.getElementById(prevContentId).style.position = 'absolute';
											document.getElementById(prevContentId).style.top = '0px';
											// make the next tab no float
											document.getElementById(nextContentId).style.position = 'relative';
											// order the animation
											classBehaviour.fader.crossFade(nextContentId, prevContentId, 0, 10, 50, null);
										}else{
											if(prevTab) document.getElementById(prevContentId).style.display = 'none';
											document.getElementById(nextContentId).style.display = 'block';
										}
										
										// PAGE NUMBER
										// update page-numbering
										pager = document.getElementById(classBehaviour.getClassParameter(objNode.parentNode.parentNode, 'pagerId', 'none'));
										if(pager){
											pager.getElementsByTagName('span')[0].firstChild.nodeValue = (pageNumber+1) + '/' + allTabs.length ;
										}
										
									}
									// cancel the jump to the anchor
									return false;
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.tabbedContent = new TabbedContent;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.tabbedContent;
	
	// Replaces all png's in the container with gif alternatives in Internet Explorer 6 and lower.
		// preload cosmetic tweak
		if(document.all && (navigator.userAgent.indexOf('MSIE 6.0')>-1 || navigator.userAgent.indexOf('MSIE 5')>-1) && navigator.userAgent.indexOf('Opera')<0)
				document.writeln("<style>.pngAlternative img {visibility:hidden;}</style>");
		// define this class behaviour
		function PngAlternative(){
			/* properties */
			this.name 		= 	'pngAlternative';
			this.lastNode	=	null;
			this.lastNext	=	null;
			/* methods */
			this.start		=	function(node){
									this.process();
								}
			/* events */
			this.process	=	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									// if this is a crappy browser
									if
									(
										(navigator.userAgent.indexOf('MSIE 6.0')>-1 || navigator.userAgent.indexOf('MSIE 5')>-1)
										&& navigator.userAgent.indexOf('Opera')<0
									)
									{
										// get all image tags
										var allImages = objNode.getElementsByTagName('img');
										// for all images
										for(var a=0; a<allImages.length; a++){
											// replace it with it's gif alternative
											allImages[a].src = allImages[a].src.replace('.png', '.gif');
											allImages[a].style.visibility = 'visible';
										}
									}
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.pngAlternative = new PngAlternative;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.pngAlternative;
	
	// Open an overlay as a popup window
		// define this class behaviour
		function OpenLayerPopUp(){
			/* properties */
			this.name 		= 	'openLayerPopUp';
			/* methods */
			this.start		=	function(node){
									// find the target layer
									targetPopUp = null;
									// process the node
									this.process(node);
									// the node's open button
									node.onclick = this.show;
								}
			this.fadeIn	=	function(id, amount){
									node = document.getElementById(id);
									nodes = node.getElementsByTagName('div');
									nodeShadow = nodes[0];
									nodeContent = nodes[1];
									// if the amount is not 50
									if(amount<80){
										// hide the popup content
										nodeContent.style.display = 'none';
										// set the shadow's fade to the next step
										nodeShadow.style.display = 'block';
										if(typeof(nodeShadow.style.MozOpacity)!='undefined')	nodeShadow.style.MozOpacity = amount/100;
										if(typeof(nodeShadow.style.filter)!='undefined')		nodeShadow.style.filter = "alpha(opacity=" + amount + ")";
										if(typeof(nodeShadow.style.opacity)!='undefined')		nodeShadow.style.opacity = amount/100;
										// show the popup collection
										node.style.display = 'block';
										// repeat the fade
										setTimeout("classBehaviour.openLayerPopUp.fadeIn('" + id + "'," + (amount+10) + ")",10);
									}else{
									// else
										// show the popup content
										nodeContent.style.display = 'block';
									}
								}
			this.fadeOut	=	function(id, amount){
									node = document.getElementById(id);
									nodes = node.getElementsByTagName('div');
									nodeShadow = nodes[0];
									nodeContent = nodes[1];
									// if the amount is not 100
									if(amount>0){
										// hide the popup content
										nodeContent.style.display = 'none';
										// set the fade to the next step
										if(typeof(nodeShadow.style.MozOpacity)!='undefined')	nodeShadow.style.MozOpacity = amount/100;
										if(typeof(nodeShadow.style.filter)!='undefined')		nodeShadow.style.filter = "alpha(opacity=" + amount + ")";
										if(typeof(nodeShadow.style.opacity)!='undefined')		nodeShadow.style.opacity = amount/100;
										// repeat the fade
										setTimeout("classBehaviour.openLayerPopUp.fadeOut('" + id + "'," + (amount-10) + ")",10);
									}else{
										// show the popup content
										node.style.display = 'none';
									}
								}
			/* events */
			this.process	=	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									// is this a link with an href
									popUpId = (objNode.href) ? (objNode.href.indexOf('#')==0) ? objNode.href.split('#').reverse()[0] : 'popup0' : 'popup0' ;
									popUpId = classBehaviour.getClassParameter(objNode, 'id', popUpId) ;
									// get the popup object
									popUp = (popUpId) ? document.getElementById(popUpId) : objNode;
									// prepare the popup's layout
									popUp.style.display = 'none';
									popUp.style.visibility = 'visible';
								}
			this.show		=	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var olp = classBehaviour.openLayerPopUp;
									var submit = false;
									// is this a link with an href
									popUpId = (objNode.href) ? (objNode.href.indexOf('#')==0) ? objNode.href.split('#').reverse()[0] : 'popup0' : 'popup0' ;
									popUpId = classBehaviour.getClassParameter(objNode, 'id', popUpId) ;
									// get the popup object
									popUp = (popUpId) ? document.getElementById(popUpId) : objNode;
									// if there is an iframe in the popup load the url into it
									popUpIframes = popUp.getElementsByTagName('iframe');
									popUpTitles = popUp.getElementsByTagName('h1');
									if(popUpIframes.length>0){
										// is an href supplied
										if(objNode.href){
											// if the link had a title and if the popup has a title. put the link title in the popup
											if(objNode.title && popUpTitles.length>0) popUpTitles[0].innerHTML = objNode.title;
											// load the href in the iframe
											popUpIframes[0].src = objNode.href;
										// is this a form submit
										}else if(objNode.nodeName=="BUTTON" || objNode.nodeName=="INPUT"){
											// find the form this button belongs to
											formNode = objNode.parentNode;
											while(formNode.nodeName!='FORM') formNode = formNode.parentNode;
											// change the form to submit to the iframe
											formNode.target = popUpIframes[0].id;
											// then change it back for the other sumbit buttons
											setTimeout("document.getElementById('"+formNode.id+"').target='_self';",512);
											// allow the function to submit
											submit = true;
										}
									}
									// find the close gadget
									popUpCloser = popUp.getElementsByTagName('a')[0];
									popUpCloser.onclick = olp.hide;
									// remove the scroll bars
									if(navigator.appVersion.indexOf('MSIE 6')>-1 || navigator.appVersion.indexOf('MSIE 5')>-1){
										document.body.parentNode.style.overflow = "hidden";
										allSelects = document.getElementById('content').getElementsByTagName('select');
										for(var a=0; a<allSelects.length; a++) allSelects[a].style.visibility = 'hidden';
									}
									// fade the popup in
										//popUp.style.display = 'block';
									olp.fadeIn(popUp.id, 0);
									// mark the body with a class
									document.body.className += " hasLayerPopUp";
									// cancel the click
									return submit;
								}
			this.hide		=	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var olp = classBehaviour.openLayerPopUp;
									// fade the popup out
									olp.fadeOut(objNode.parentNode.parentNode.parentNode.id, 50);
										//objNode.parentNode.parentNode.style.display = 'none';
									// restore the scroll bars
									if(navigator.appVersion.indexOf('MSIE 6')>-1 || navigator.appVersion.indexOf('MSIE 5')>-1){
										document.body.parentNode.style.overflow = "auto";
										allSelects = document.getElementById('content').getElementsByTagName('select');
										for(var a=0; a<allSelects.length; a++) allSelects[a].style.visibility = 'visible';
									}
									// unmark the body class
									document.body.className = document.body.className.replace(" hasLayerPopUp", "");
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.openLayerPopUp = new OpenLayerPopUp;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.openLayerPopUp;
		
	// Triggers all validateInput class behaviours within a node after the onsubmit event.',
		// define this class behaviour
		function ValidateAllInput(){
			/* properties */
			this.name 		= 	'validateAllInput';
			/* methods */
			this.start		=	function(node){
									// set the form validation eventhandler
									node.onsubmit = classBehaviour.validateInput.all;
									// if there's a place for a summary store the id
									classBehaviour.validateInput.summaryId = classBehaviour.getClassParameter(node, 'summaryId', null);
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.validateAllInput = new ValidateAllInput;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.validateAllInput;

	// Validate the value of a for element to a predefined regular expression
		// define this class behaviour
		function ValidateInput(){
			/* properties */
			this.name 		= 	'validateInput';
			this.summaryId	=	null;
			/* methods */
			this.start	=	function(node){
								// was a summary requested?
								this.summaryId = classBehaviour.getClassParameter(node, 'summaryId', this.summaryId);
								// apply the event to all form-element childnodes
								var nodes = (this.isFormElement(node)) ? new Array(node) : node.getElementsByTagName('*');
								for(var a=0; a<nodes.length; a++){
									if(this.isFormElement(nodes[a])){
										// give it the event handler
										nodes[a].onfocus = this.clear;
										nodes[a].onblur = this.input;
										nodes[a].onchange = this.input;
										// if the form is small enough one could revalidate the whole thing at every change
											//nodes[a].onblur = this.all;
											//nodes[a].onchange = this.all;
										// and the parent's classname
										nodes[a].className = node.className;
									}
								}
								// if there's a greyed axplanation
								hasExplanation = classBehaviour.getClassParameter(node, 'explanation', 'no');
								if(hasExplanation=='yes'){
									// remove it if a value is restored by a form manager
									setTimeout("classBehaviour.validateInput.restore('"+node.id+"','"+node.value+"')", 1000);
								}
							}
			this.all 	= 	function(that){
								var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
								var vi = classBehaviour.validateInput;
								var booPassed = true;
								// get all subnodes in the form
									//var objSubNodes = objNode.getElementsByTagName("*") ;
									var objSubNodes = document.getElementsByTagName("*") ;
								// for all nodes
								for(var intA=0; intA<objSubNodes.length; intA++){
									// Does this node have the validateInput put class? Invoke the validator function upon it.
									if(objSubNodes[intA].className.toLowerCase().indexOf('validateinput')>-1 && vi.isFormElement(objSubNodes[intA])) booPassed = (vi.input(objSubNodes[intA], false) && booPassed);
								}
								// is a summary required
								if(vi.summaryId){
									summaryObj = document.getElementById(vi.summaryId);
									summaryTxt = '';
									// for all nodes
									for(var a=0; a<objSubNodes.length; a++){
										// if this node a visible warning
										if(objSubNodes[a].className.indexOf('validationWarning')>-1 && objSubNodes[a].style.display!='none'){
											// copy it's contents to the summary text
											summaryTxt += '<li>' + objSubNodes[a].innerHTML + '</li>';
										}
									}
									// add the summary text to the summary
									summaryObj.innerHTML = (summaryTxt.length>0) ? '<ul>' + summaryTxt + '</ul>' : '' ;
								}
								// is the form valid enough?
								return booPassed;
							}
			this.input = 	function(that, override){
								var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
								var vi = classBehaviour.validateInput;
								// default validator values
								var booEmptyValidator, booValueValidator;
								// get the type of validation required			
								strValidatorName	= classBehaviour.getClassParameter(objNode, 'type', '');
								allowEmpty			= classBehaviour.getClassParameter(objNode, 'allowEmpty', 'no');
								ifCheckedId			= classBehaviour.getClassParameter(objNode, 'ifCheckedId', null);
								hasExplanation 		= classBehaviour.getClassParameter(objNode, 'explanation', 'no');
								// check a special dependency on a parent checkbox
								if(ifCheckedId){
									if(!document.getElementById(ifCheckedId).checked) allowEmpty = 'yes';
								}
								// validation tests
									// empty test	objNode.value!=''
									booEmptyValidator = (allowEmpty=='yes' && (objNode.value=='' || hasExplanation=='yes'));
									// bizarre exception for MSIE 5.0
									if(navigator.appVersion.indexOf('MSIE 5.0')>-1 && strValidatorName=='money') strValidatorName = null;
									// test expressions
									switch(strValidatorName){
										// regular expression tests
										case 'email' : 
											booValueValidator = (objNode.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' : 
											booValueValidator = (objNode.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' : 
											booValueValidator = (objNode.value.match(/^[0-9]{4}\s{0,1}[a-zA-Z]{2}$/)!=null); 
											break;
										case 'date' : 
											booValueValidator = (objNode.value.match(/^\d{4}\-\d{1,2}\-\d{1,2}$/)!=null);
											// booRegExpValidator = (objNode.value.match(/^\d{1,2}\-\d{1,2}\-(\d{2}|\d{4})$/)!=null); 
											break;
										case 'number' : 
											booValueValidator = (objNode.value.match(/^[0-9]+$/)!=null); 
											break;
										case 'money' :
											booValueValidator = (objNode.value.match(/^[0-9]+(\.[0-9]{1,2})?$/)!=null); 
											break;
										case 'alphanumeric' :
											booValueValidator = (objNode.value.match(/^[a-zA-Z0-9]/)!=null);
											break;
										// custom tests
										case 'bankaccount' :
											booValueValidator = vi.bankAccount(objNode);
											break;
										case 'isradiochecked' :
											booValueValidator = vi.isRadioChecked(objNode);
											break;
										case 'anyofthesechecked' : 
											booValueValidator = vi.anyOfTheseChecked(objNode);
											break;
										case 'text' :
											booValueValidator = (objNode.value!="");
											break;
										default :
											booValueValidator = true;
									}
								// does the input validate when the field is not empty or not allowed to be empty
								validates = (!booEmptyValidator) ? (booValueValidator && hasExplanation=='no') : true ;
								// show or hide the warning message based on the validator's match
								vi.warning(objNode, validates);
								// return a pass of fail boolean to whoever may want to know the results of the test
								return (override!=null) ? validates : override;
							}
			this.warning =	function(objNode, status){
								var vi = classBehaviour.validateInput;
								// for all inputs with the same name
								allWithSameName = document.getElementsByName(objNode.name);
								for(var b=0; b<allWithSameName.length; b++){
									objNode = allWithSameName[b];
								// Show the foldout warning
									// is the warning node named?
									idWarningNode		= classBehaviour.getClassParameter(objNode, 'warningId', null);
									// check if the next node is for summaries
									nextNode 			= (objNode.nextSibling.nodeName.indexOf("text")<0) ? objNode.nextSibling : objNode.nextSibling.nextSibling ;
									// if there's an id given for thewarning message use it. Otherwise use the next node
									objWarningNode		= (idWarningNode) ? document.getElementById(idWarningNode) : nextNode ;
									// show or hide the warning, if the warning node was found
									if(objWarningNode) if(objWarningNode.className.indexOf('validationWarning')>-1) objWarningNode.style.display = (status) ? 'none' : 'block' ;
								// Highlight the label
									// get all labels
									allLabels = document.getElementsByTagName('label');
									// for all labels
									for(var a=0; a<allLabels.length; a++){
										// does the label refer to an input element
										if(allLabels[a].getAttributeNode('for')){
											// if the label matches this input
											if(allLabels[a].getAttributeNode('for').nodeValue == objNode.id){
												// add or remove the warning colour
												if(allLabels[a].parentNode.className.indexOf('noWarning')<0 && allLabels[a].className.indexOf('noWarning')<0) allLabels[a].className = (status) ? '' : 'warning' ;
											}
										}
									}
								}
							}
			this.clear	=	function(objNode){
								var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
								// if there was an explanation provides as a value
								hasExplanation = classBehaviour.getClassParameter(objNode, 'explanation', 'no');
								if(hasExplanation=='yes'){
									// clear the value
									objNode.value = '';
									// che change the class back to normal
									objNode.className = objNode.className.replace('explanation_yes', 'explanation_no');
								}
							}
			this.restore =	function(id, value){
								var objNode = document.getElementById(id);
								// if this input has a value which doesn't match the current value, a form manager has restored a value
								if(objNode.value!=value){
									objNode.className = objNode.className.replace('explanation_yes','explanation_no');
								}
							}
			/* utility functions */
			this.isFormElement		=	function(objNode){
											return (objNode.nodeName=='INPUT' || objNode.nodeName=='SELECT' || objNode.nodeName=='TEXTAREA');
										}
			/* custom validation functions */
			this.bankAccount 		= 	function(objNode){
											var intDeel, intRest;
											var strInput = objNode.value;
											var intTot=0;
											if (strInput.length!=9){
												return false;
											}else{
												for (i=0; i<strInput.length; i++) intTot += strInput.substr(i,1) * (9 - i);
												intDeel = intTot/11;
												intRest = intTot%11;
												return (intRest==0);
											}
										}
			this.isRadioChecked	=	function(objNode){
											// get all inputs with this name
											allInputs = document.getElementsByTagName('input');
											// for all inputs
											for(var a=0; a<allInputs.length; a++){
												// If the input has the same name. 
												if(allInputs[a].name == objNode.name){
													// If the input is checked set the validator to true
													if(allInputs[a].checked) return true;
												}
											}
											return false;
										}
			this.anyOfTheseChecked	=	function(objNode){
												// default validatie
												anyChecked = false;
												// get all inputs from the parentnode
												allChecks = objNode.parentNode.parentNode.getElementsByTagName('input');
												// for all inputs
												for(var a=0; a<allChecks.length; a++){
													// if this checkbox is checked remember is
													if(allChecks[a].checked) anyChecked = true;
												}
												return anyChecked;
											}
		}
		// add this function to the classbehaviour object
		classBehaviour.validateInput = new ValidateInput;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.validateInput;
		
// Correlate a dragable object to an input value
		// define this class behaviour
		function SliderInput(){
			/* properties */
			this.name 			= 	'sliderInput';
			this.allowNudge	=	true;
			/* methods */
			this.start			=	function(node){
										// event
										node.parentNode.onclick	= this.nudgeInput;
										// get the target Id
										valueToId =	classBehaviour.getClassParameter(node, 'valueToId', null);
										// get the object
										valueToObject = document.getElementById(valueToId);
										// assign the event handler
										valueToObject.onchange = this.inputToSlider;
										// add the drag and drop classbehaviour and give it out event handlers
										classBehaviour.dragAndDrop.onMove = this.sliderToInput;
										classBehaviour.dragAndDrop.start(node); 
										// trigger the starting value
										this.inputToSlider(valueToObject);
										// allow nudging
										this.allowNudge = true;
									}
			/* events */
			this.inputToSlider = 	function(that){
										var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
										var sli = classBehaviour.sliderInput;
										// get the the slider to sync with from the classname
										sliderTarget = objNode;
										sliderButtonId = classBehaviour.getClassParameter(sliderTarget, 'valueFromId', null);
										sliderButton = document.getElementById(sliderButtonId);
										// get the limit values from the slider
										curValue	=	parseFloat(sliderTarget.value);
										minValue	=	parseFloat(classBehaviour.getClassParameter(sliderButton, 'minValue', null));
										maxValue	=	parseFloat(classBehaviour.getClassParameter(sliderButton, 'maxValue', null));
										minPos		=	parseInt(classBehaviour.getClassParameter(sliderButton, 'limitLeft', null));
										maxPos		=	parseInt(classBehaviour.getClassParameter(sliderButton, 'limitRight', null));
										// correct improper input
										if(isNaN(curValue)){
											curValue = Math.round((maxValue-minValue)/2 + minValue);
											sliderTarget.value = curValue;
										}
										// apply limits
										if(curValue>maxValue){curValue = maxValue; sliderTarget.value = curValue;}
										if(curValue<minValue){curValue = minValue; sliderTarget.value = curValue;}
										// adjust slider
										sliderButton.style.left 	= 	Math.round(
																			(curValue - minValue) / (maxValue - minValue) * (maxPos - minPos) + minPos
																		) + 'px';
									}
			this.sliderToInput	= 	function(that){
										var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
										var dnd = classBehaviour.dragAndDrop;
										var sli = classBehaviour.sliderInput;
										// disable the onclick on the sliderTrack 
										sli.allowNudge = false ;
										// get the the input field to sync with from the classname
										sliderButton	=	objNode;
										sliderTargetId	=	classBehaviour.getClassParameter(sliderButton, 'valueToId', null);
										sliderTarget	=	document.getElementById(sliderTargetId);
										// get the limit values from the slider
										curValue	=	parseFloat(sliderTarget.value);
										minValue	=	parseFloat(classBehaviour.getClassParameter(sliderButton, 'minValue', null));
										maxValue	=	parseFloat(classBehaviour.getClassParameter(sliderButton, 'maxValue', null));
										minPos		=	parseInt(classBehaviour.getClassParameter(sliderButton, 'limitLeft', null));
										maxPos		=	parseInt(classBehaviour.getClassParameter(sliderButton, 'limitRight', null));
										// translate the slider value to the input box
										valueFraction 	    = 	Math.round(
																	(dnd.style.x - dnd.minPos.x) / (dnd.maxPos.x - dnd.minPos.x) * 
																	(maxValue - minValue) + minValue
																);
										sliderTarget.value = valueFraction;
										total = document.getElementById('rekeningTotal').value;
										document.getElementById('rekeningOutput0').innerHTML = "&euro;" + (total*valueFraction/100).toFixed(2) + " (" + valueFraction + "%)";
										document.getElementById('rekeningOutput1').innerHTML = "&euro;" + (total*(1-valueFraction/100)).toFixed(2) + " (" + (100-valueFraction) + "%)";
									}
			this.nudgeInput	=	function(that){
										var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
										var dnd = classBehaviour.dragAndDrop;
										var sli = classBehaviour.sliderInput;
										// if nudging is allowed
										if(sli.allowNudge){
											// slider objects
											sliderTrack		=	objNode;
											sliderButton	=	sliderTrack.getElementsByTagName('div')[0];
											sliderTargetId	=	classBehaviour.getClassParameter(sliderButton, 'valueToId', null);
											sliderTarget	=	document.getElementById(sliderTargetId);
											// slider limits
											minPos			=	parseInt(classBehaviour.getClassParameter(sliderButton, 'limitLeft', null));
											maxPos			=	parseInt(classBehaviour.getClassParameter(sliderButton, 'limitRight', null));
											minValue		=	parseFloat(classBehaviour.getClassParameter(sliderButton, 'minValue', null));
											maxValue		=	parseFloat(classBehaviour.getClassParameter(sliderButton, 'maxValue', null));
											// click position
											clickX = (typeof(event)!='undefined') ? event.x : that.layerX ;
											// slider position
											sliderX = (sliderButton.style.left.indexOf('px')<0) ? 0 : parseInt(sliderButton.style.left) ;
											// nudge the value of the slider closer towards the click
											newValue = Math.round(parseInt(sliderTarget.value) + ((clickX - sliderX) / (maxPos - minPos) * (maxValue - minValue)) / 2);
											// apply limits
											if(newValue>maxValue){newValue = maxValue; sliderTarget.value = curValue;}
											if(newValue<minValue){newValue = minValue; sliderTarget.value = curValue;}
											// adjust slider and input
											sliderTarget.value			=	newValue;
											sliderButton.style.left 	= 	Math.round(
																				(newValue - minValue) / (maxValue - minValue) * (maxPos - minPos) + minPos
																			) + 'px';
										// else the nudging was locked
										}else{
											// unlock the nudging
											sli.allowNudge = true;
										}
									}
		}
		// add this function to the classbehaviour object
		classBehaviour.sliderInput = new SliderInput;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.sliderInput;
		
// handle ondrag events
		// define this class behaviour
		function DragAndDrop(){
			/* properties */
			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;
			/* methods */
			this.start		=	function(node){
									// event
									node.onmousedown 			= this.pickUp;
									document.onmouseup 			= this.dropDown;
										 document.onmousemove 		= this.moveAway;
									    // node.onmousemove 			= this.moveAway;
									// exctract the limits from the class parameters
									this.grid.x	=	parseInt(classBehaviour.getClassParameter(node, 'gridX', null));
									this.grid.y	=	parseInt(classBehaviour.getClassParameter(node, 'gridY', null));
									this.minPos.x	=	parseInt(classBehaviour.getClassParameter(node, 'limitLeft', null));
									this.minPos.y	=	parseInt(classBehaviour.getClassParameter(node, 'limitTop', null));
									this.maxPos.x	=	parseInt(classBehaviour.getClassParameter(node, 'limitRight', null));
									this.maxPos.y	=	parseInt(classBehaviour.getClassParameter(node, 'limitBottom', null));
									// saved position
									this.restore(node);
								}
			this.restore 	= 	function(objNode){
									// is lib_cookies available
									if(typeof(setCookie)!='undefined'){
										var strStyles, arrStyles;
										// retrieve styles string
										strStyles = getCookie('dragposition');					
										// were any styles recovered
										if(strStyles!=null){
											arrStyles = strStyles.split(',');
											// does the stored positions match the object
											if(arrStyles[0]==objNode.id && arrStyles.length>2){
												objNode.style.left = arrStyles[1];
												objNode.style.top = arrStyles[2];
											}
										}
									}
								}
			this.store 		= 	function(objNode){
									// is lib_cookies available
									if(typeof(setCookie)!='undefined'){
										// store styles
										setCookie('dragposition', objNode.id + ',' + objNode.style.left + ',' + objNode.style.top, null, '/', null, null);
									}
								}
			/* events */
			this.pickUp 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var dnd = classBehaviour.dragAndDrop;
									// accept no new pickups before dropdown
									if(dnd.pickupObj==null){
										// store the object being picked up
										dnd.node = objNode;
										// store pickup location
										dnd.pickup.x = (typeof(event)!='undefined') ? event.clientX : that.clientX ;
										dnd.pickup.y = (typeof(event)!='undefined') ? event.clientY : that.clientY ;
										dnd.pickup.z = (objNode.style.zIndex=='') ? objNode.style.zIndex : 0;
										// default starting position if none was given
										if(objNode.style.position!='absolute') objNode.style.position = 'absolute';
										if(objNode.style.left=='') objNode.style.left = /*dnd.pickup.x +*/ '0px'; 
										if(objNode.style.top=='') objNode.style.top = /*dnd.pickup.y +*/ '0px';
										// promote z position
										objNode.style.zIndex = 1024;
									}
									// cancel browser mouse handler
									return false;
								}
			this.dropDown 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var dnd = classBehaviour.dragAndDrop;
									// only if a pickup is active
									if(dnd.node!=null){
										// snap coordinates to grid
										if(dnd.grid.x>0) dnd.node.style.left = Math.round(parseInt(dnd.node.style.left)/dnd.grid.x)*dnd.grid.x + "px";
										if(dnd.grid.y>0) dnd.node.style.top = Math.round(parseInt(dnd.node.style.top)/dnd.grid.y)*dnd.grid.y + "px";
										// restore z position
										dnd.node.style.zIndex = dnd.pickup.z;
										// store the position in a cookie
										dnd.store(dnd.node);
										// release the picked up object
										dnd.node = null;
										// clear pickup location
										dnd.pickup.x = null;
										dnd.pickup.y = null;
										dnd.pickup.z = null;
									}
									// cancel browser mouse handler
									return false;
								}
			this.moveAway 	= 	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									var dnd = classBehaviour.dragAndDrop;
									// only if a pickup is active
									if(dnd.node!=null){
										// mouse position
										dnd.mouse.x = (typeof(event)!='undefined') ? event.clientX : that.clientX ;
										dnd.mouse.y = (typeof(event)!='undefined') ? event.clientY : that.clientY ;
										// current object position
										dnd.style.x = (dnd.node.style.left.indexOf('px')<0) ? 0 : parseInt(dnd.node.style.left) ;
										dnd.style.y = (dnd.node.style.top.indexOf('px')<0) ? 0 : parseInt(dnd.node.style.top) ;
										// calculate new object position
										var newXpos = dnd.style.x + dnd.mouse.x - dnd.pickup.x;
										var newYpos = dnd.style.y + dnd.mouse.y - dnd.pickup.y;
										// limit new object position
										if(newXpos<dnd.minPos.x) newXpos = dnd.minPos.x;
										if(newXpos>dnd.maxPos.x) newXpos = dnd.maxPos.x;
										if(newYpos<dnd.minPos.y) newYpos = dnd.minPos.y;
										if(newYpos>dnd.maxPos.y) newYpos = dnd.maxPos.y;
										// apply new object position
										if(dnd.pickup.x!=null) dnd.node.style.left = newXpos + 'px';
										if(dnd.pickup.y!=null) dnd.node.style.top = newYpos + 'px';
										// update pickup location
										dnd.pickup.x = dnd.mouse.x;
										dnd.pickup.y = dnd.mouse.y;
										// execute custom event handler
										if(dnd.onMove!=null) dnd.onMove(dnd.node);
									}
									// cancel browser mouse handler
									return false;
								}
		}
			function Coordinates(x,y,z){
				this.x = x;
				this.y = y;
				this.z = z;
			}
		// add this function to the classbehaviour object
		classBehaviour.dragAndDrop = new DragAndDrop;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.dragAndDrop;
						
	// Defines something a layer popup and automaticaly opens it after a set time
		// define this class behaviour
		function LayerPopUp(){
			/* properties */
			this.name 		= 	'layerPopUp';
			/* methods */
			this.start		=	function(node){
									// get the required time delay
									delay = parseInt(classBehaviour.getClassParameter(node, 'autodeploy', '9999'));
									// if the delay is a rational one
									if(delay!=9999){
										// set a timeout for the popup
										setTimeout("classBehaviour.layerPopUp.showId('" + node.id + "')",delay);
									}
								}
			/* events */
			this.showId	=	function(id){
									classBehaviour.openLayerPopUp.show(document.getElementById(id));
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.layerPopUp = new LayerPopUp;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.layerPopUp;
		
	// hover an explanation in a layer
		// define this class behaviour
		function HelpIcon(){
			/* properties */
			this.name 		= 	'helpIcon';
			this.previous	=	null;
			/* methods */
			this.start		=	function(node){
									node.onmouseover = this.show;
									// get the next node
									nextNode = classBehaviour.nextNode(node);
									nextNode.onmouseout = this.hide;
								}
			/* events */
			this.show		=	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									// close the previous one
									if(classBehaviour.helpIcon.previous) classBehaviour.helpIcon.previous.style.display = 'none';
									// get the next node
									nextNode = classBehaviour.nextNode(objNode);
									// show it
									nextNode.style.display = 'block';
									// store the current one
									classBehaviour.helpIcon.previous = nextNode;
								}
			this.hide		=	function(that){
									var objNode = (typeof(this.nodeName)=='undefined') ? that : this ;
									// hide it
									objNode.style.display = 'none';
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.helpIcon = new HelpIcon;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.helpIcon;
	
	// Use SwfObject to replace a title with a flash version		// hide the alternative beforehand		document.writeln("<style>.flashTitle .alternative{visibility : hidden;}</style>");		// define this class behaviour		function FlashTitle(){			/* properties */			this.name 		= 	'flashTitle';			this.index		=	0;			/* methods */			this.start		=	function(node){									// give the node an id of it doesn't have one									if(!node.id){										node.id = 'flashTitle' + this.index;										this.index += 1;									}									// delay the loading of the flash
									classBehaviour.flashTitle.process(node.id);
								}			this.process	=	function(id){									node = document.getElementById(id);									// set the default values for all parameters									flashMovie		= "../flash/title.swf";									flashWidth		= node.offsetWidth;									flashHeight		= node.offsetHeight;									flashVersion	= "7";									flashBuild		= "0";									flashWmode		= "Transparent";									flashScale		= "noScale";									flashSalign		= "l";									flashName		= "_" + id;									flashVariables	= "lorem=ipsum&dolor=sit amet";									// for all childnodes of node which may contain configuration variables									for(var a=0; a<node.childNodes.length; a++){										if(node.childNodes[a].className == "movie") flashMovie = node.childNodes[a].value;										if(node.childNodes[a].className == "width") flashWidth = node.childNodes[a].value;										if(node.childNodes[a].className == "height") flashHeight = node.childNodes[a].value;										if(node.childNodes[a].className == "majorversion") flashVersion = node.childNodes[a].value;										if(node.childNodes[a].className == "build") flashBuild = node.childNodes[a].value;										if(node.childNodes[a].className == "wmode") flashWmode = node.childNodes[a].value;										if(node.childNodes[a].className == "scale") flashScale = node.childNodes[a].value;										if(node.childNodes[a].className == "salign") flashSalign = node.childNodes[a].value;										if(node.childNodes[a].className == "name") flashName = node.childNodes[a].value;										if(node.childNodes[a].className == "flashvars") flashVariables = node.childNodes[a].value;									}									// if the dimensions are in %, be sure to tell the container									if(flashWidth.toString().indexOf('%')>-1) node.style.width = flashWidth;									if(flashHeight.toString().indexOf('%')>-1) node.style.height = flashHeight;									// get the alternative to the flash content and filter a title from it									flashVariables = "inputText=" + node.innerHTML.replace(/<(.|\n)*?>/gi,"").replace(/^\s+/gi,"") + "&" + flashVariables;
									// load the flash plugin for "UFO"									if(UFO){										var FO = { 											movie			: flashMovie,											width			: flashWidth, 											height			: flashHeight,											majorversion	: flashVersion, 											build			: flashBuild, 											wmode			: flashWmode,											scale			: flashScale,											salign			: flashSalign,											id				: flashName,											name			: flashName,											flashvars		: flashVariables										}										UFO.create(FO, node.id);									}								}			/* events */		}		// add this function to the classbehaviour object		classBehaviour.flashTitle = new FlashTitle;		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.flashTitle;

			
			
	// make a slideshow from a list of images
		// define this class behaviour
		function BackgroundFadeList(){
			/* properties */
			this.name 		= 	'backgroundFadeList';
			this.locked	=	false;
			this.timeout	=	null;
			this.index		=	0;
			/* methods */
			this.start		=	function(node){
									this.index++;
									node.id = (node.id) ? node.id : 'slideshowFader' + this.index ;
									this.next(node.id);
								}
			/* events */
			this.next		=	function(id){
									if(!classBehaviour.backgroundFadeList.locked){
										classBehaviour.backgroundFadeList.locked = true;
										// get all slides
										allSlides = document.getElementById(id).getElementsByTagName('li');
										// for all slides
										var activeSlide, nextSlide;
										for(var a=0; a<allSlides.length; a++){
											// if the slide doesn't have an id, make one
											allSlides[a].id = (allSlides[a].id) ? allSlides[a].id : 'slide' + a;
											// if this slide is marked active
											if(allSlides[a].className.indexOf('active')>-1){
												// store the active slide
												activeSlide = allSlides[a];
												// store the next slide
												nextSlide = (a<allSlides.length-1) ? allSlides[a+1] : allSlides[0] ;
											}
										}
										// change the classes
										activeSlide.className = activeSlide.className.replace(' active','').replace('active','');
										nextSlide.className += ' active';
										// fade between the active and next slide
										classBehaviour.fader.crossFade(nextSlide.id, activeSlide.id, 0, 10, 10, 'classBehaviour.backgroundFadeList.unlock("'+id+'")');
									}
								}
			this.unlock	=	function(id){
									this.locked = false;
									setTimeout("classBehaviour.backgroundFadeList.next('"+id+"')", '4000');
								}
		}
		// add this function to the classbehaviour object
		classBehaviour.backgroundFadeList = new BackgroundFadeList;
		classBehaviour.handlers[classBehaviour.handlers.length] = classBehaviour.backgroundFadeList;

	// STARTUP-SEQUENCE
	// start the parsing of classes
	classBehaviour.parseDocument();
	
	
	
