var winit = window.onload;

window.onload = cinit;

function cinit(){

	winit();

	if ($('expcol')){
		EXPCOL('expcol');
	}
		
}


function $(e){
	
	if (typeof e == 'object'){
		return e;
	}else if(document.getElementById(e)){
		return document.getElementById(e);
	}else{
		return false;
	}
	
}
 
 function bind(e, f){
    return function() { f.call(e); }
 }
 
 function EXPCOL(id){
 	this.dl = $(id);
 	this.hd = this.dl.getElementsByTagName('strong');
 	this.dd = this.dl.getElementsByTagName('dd');
 	for (var n = 0;n<this.hd.length;n++){
 		new EXPCOLtoggle(this.hd[n], this.dd[n]);
 	}
 }
 
 function EXPCOLtoggle(e, d){
 	this.h = e;
 	this.d = d;
 	//this.height = this.d.offsetHeight;
 	//this.d.style.overflow = 'hidden';
 	this.state = false;
 	//this.fx = new joinkFX(this.d, 'outQuintic', 40, 'height', ''+this.height, '' + (0 - this.height), true);
  	this.toggle();
 	this.h.onclick = bind(this, this.toggle);
	if(this.h.className != "kopen") { 
			this.h.onmouseover = function() { this.style.color = "0000CC"; }
			this.h.onmouseout = function() { this.style.color = "000000"; }
	}
 }
 
 EXPCOLtoggle.prototype = {
 	
 	toggle:function(){
		if(this.h.className == 'kopen'){
 			//this.fx.move();
			this.d.style.display = 'block';
 		}
 		else if (this.state){
 			//this.fx.move();
 			this.h.className = 'open';
			this.d.style.display = 'block';
 			this.state = false;
 		}else {
 			//this.fx.move();
 			this.h.className = 'close';
			this.d.style.display = 'none';
 			this.state = true;
 		}
 	}
 	
 }