function openReacties(){
	var element = document.getElementById("blog_reacties");
	
	if ( element.style.display != 'none' ) {
		element.style.display = 'none';
	}
	else {
		element.style.display = '';
	}	
}


function ltrim(s){return s.replace(/^[\s]+/g,"");}
function rtrim(s){return s.replace(/[\s]+$/g,"");}
function trim(s){return ltrim(rtrim(s));}
function css_add_class(e, clss) {
	if (!e.className) e.className = clss;
	else if (e.className.indexOf(clss) == -1) e.className = trim(clss + " " + e.className);
}
function css_remove_class(e, clss) {
	if (e.className.indexOf(clss) != -1) e.className = trim(e.className.replace(new RegExp(clss, "g"), "").replace(/\s\s+/g, " "));
	if (e.className == "") e.removeAttribute("className");
}


function cDim() {
        var docwidth, docheight;
        if (window.innerWidth || window.innerHeight){
                docwidth = window.innerWidth;
                docheight = window.innerHeight;
        }
        if (document.body.clientWidth || document.body.clientHeight){
                docwidth = document.body.clientWidth;
                docheight = document.body.clientHeight;
        }
        var width=776;
        var height=578;
        var top=parseInt((docheight-height)/2);
        var left=parseInt((docwidth-width)/2);
        if (top<0) top=0;
        if (left<0) left=0;
        return {height:height+"px",width:width+"px",top:top+"px",left:left+"px"};
}

function patchStyle() {
	var x = cDim();
	document.write("<style type='text/css'>#main{width:"+x.width+";height:"+x.height+";top:"+x.top+";left:"+x.left+";}</style>");
}

function mo(el) {
	if (el.src.substring(el.src.length-9) != "_high.gif") {
		el.src = el.src.substring(0, el.src.length-4)+"_high.gif";
	}
}
function mu(el) {
	if (el.src.substring(el.src.length-9) == "_high.gif") {
		el.src = el.src.substring(0, el.src.length-9)+".gif";
	}
}

