function gEBC(clsName, clsTo){
    var retVal = new Array();
    var elements = document.getElementsByTagName("*");
    for(var i = 0;i < elements.length;i++){
        if(elements[i].className.indexOf(" ") >= 0){
            var classes = elements[i].className.split(" ");
            for(var j = 0;j < classes.length;j++){
                if(classes[j] == clsName)
                    elements[i].className = clsTo;
            }
        }
        else if(elements[i].className == clsName)
            elements[i].className = clsTo;
    }

}

  function initCorners() {
    var settings = {
      tl: { radius: 4 },
      tr: { radius: 4 },
      bl: { radius: 4 },
      br: { radius: 4 },
      antiAlias: true
    }
    
    if (document.getElementById('formnieuwsbrief')  != null) curvyCorners(settings, "#formnieuwsbrief form");
    if (document.getElementById('commentform')  != null) curvyCorners(settings, "#commentform form");
    curvyCorners(settings, ".box");
  }

	hs.graphicsDir = '/js/highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.fadeInOut = true;
	hs.dimmingOpacity = 0.8;
	hs.outlineType = 'rounded-white';
	hs.captionEval = 'this.thumb.alt';
	hs.marginBottom = 105; // make room for the thumbstrip and the controls
	hs.numberPosition = 'caption';

	// Add the slideshow providing the controlbar and the thumbstrip
	hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: true,
		overlayOptions: {
			className: 'text-controls',
			position: 'bottom center',
			relativeTo: 'viewport',
			offsetY: -60
		},
		thumbstrip: {
			position: 'bottom center',
			mode: 'horizontal',
			relativeTo: 'viewport'
		}
	});


// ajax
var http = false;

if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
}

function externalLinks() {
  for(var i = 0; i < document.links.length; i++) {
     if(document.links[i].hostname.length < 1) 
     { continue; }
     if(document.links[i].target.length > 0)
     { continue; }
     var h = document.links[i].hostname.toLowerCase();
     if (h != location.hostname) {
     	// new win
      document.links[i].target = '_blank';
      document.links[i].onclick = function() {
      	//alert("URL: "+this.href);
      	http.open("GET", "/ajax.outlink_click.php?url="+escape(this.href));
      	http.send(null);
      }
    }
  }
}

function inits()
{
	externalLinks();
	//initCorners();
}

window.onload = inits;