onerror = customErrorHandler;
var debug = true;

function customErrorHandler(msg,url,l) {
    
    if (debug) {
        alert("Error: " + msg + "\n" + "Page: " + url + "\n" + "Line: " + l + "\n");
        return true;
    }
    
    if (isEmpty(document.getElementById("errorBG"))) {
        document.body.innerHTML = "<div id='errorBG' class='blackOpacity' style='z-index:9950;top:0;left:0;'></div>" + document.body.innerHTML;
    }

    if (isEmpty(document.getElementById("errorBox"))) {
        document.body.innerHTML = "<div class='errorBox' id='errorBox'><b>Script fout</b><br><br>Er is een scriptfout opgetreden in de huidige pagina.<br>Klik <a href='default.aspx'>hier</a> om terug te gaan naar de homepage.</div>" + document.body.innerHTML;
    }
    
    return false;
}

var containerWidth;
var bgWidth;
var bgHeight;
var hdrHeight;
var contentBlockWidth;
var contentBlockHeight;
var slideShowFlashWidth;
var slideShowFlashHeight;

var clientWidth = screen.width;

function posAndSize() {   
    setSizes();
    setPositions();  
}

function setSizes() {    
    eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('1(2<4){}3 1(2>=4&&2<g){0=h;5=i;6=j;7=k;8=l;9=m;a=n;b.c.d="o"}3{0=p;5=q;6=r;7=s;8=t;9=u;a=v;b.c.d="w"}1(x(e())>0){f=0}3{f=e()}',34,34,'bgWidth|if|clientWidth|else|1024|bgHeight|hdrHeight|contentBlockWidth|contentBlockHeight|slideShowFlashWidth|slideShowFlashHeight|document|body|className|getBrowserWidth|containerWidth|1280|983|503|102|706|252|354|225|medium|1242|742|209|913|327|472|300|large|eval'.split('|'),0,{}))
}

function setPositions() {            
    eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('8 5=6.7("J");8 n=6.7("K");8 o=6.7("L");8 k=6.7("y");8 p=6.7("M");8 z=6.7("N");8 A=6.7("O");8 B=6.7("P");Q{n.3.c=d+"4";k.3.c=d+"4";k.3.l=j+"4";a(!q(6.7(\'C\'))){8 D=6.E.h;8 b=6.7(\'C\').R;a(!q(b)){a(b.f(\'.F\')==-1){b=b.S(/r/,D);k.3.b=\'T(\'+b+\')\'}}}o.3.c=d+"4";o.3.l=e+"4";B.3.c=d+"4";z.3.s=9+"4";p.3.c=d+"4";p.3.l=j+"4";5.3.l=t+"4";5.3.m=e+((j-u-e)/2)+"4";a(5.h.f(\'s\')>0){5.3.m=e+9+"4";5.3.s=(U-V)-W+"4"}v a((5.h.f(\'X\')>0)||(5.h.f(\'Y\')>0)){5.3.m=e+(((j-e-u)-t)/2)+"4";5.3.w=((d/2)-(g/2))+"4";5.3.c=g+"4"}v a((5.h.f(\'Z\')>0)){g=10;5.3.m=e+(((j-e-u)-t)/2)+"4";5.3.w=((d/2)-(g/2))+"4";5.3.c=g+"4"}v{5.3.w=((d/2)-(g/2))+"4";5.3.c=g+"4"}a(6.E.h.f(\'r\')>-1){A.11="12/13-14-r.15"}}16(G){17(G.18,19.1a,"")}a(!q(b)){a(b.f(\'.F\')>-1){x=1b(\'1c\',6.7(\'y\'),\'1d\');1e(i=0;i<x.1f;i++){x[i].3.H=\'I\'}}}n.3.H=\'I\';',62,78,'|||style|px|objBlock|document|getElementById|var||if|backgroundImage|width|containerWidth|hdrHeight|indexOf|contentBlockWidth|className||bgHeight|objBackground|height|top|objContainer|objHeader|objContent|isEmpty|large|right|contentBlockHeight|76|else|left|bg|background|objNavigation|objLogo|objFooter|backgroundobject|imageSize|body|swf|error|display|block|contentblock|container|header|content|navigation|imgSixtysevenLogo|footer|try|value|replace|url|clientWidth|bgWidth|27|portfolio|news|contact|750|src|gfx|sixtyseven|logo|png|catch|customErrorHandler|msg|location|href|getElementsByClass|flashBackground|div|for|length'.split('|'),0,{}))

    ie6Png24Fix();
    do_SiFR();
}

function ie6Png24Fix() {
    if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent) && document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule) {
      document.styleSheets[0].addRule('img', 'behavior: url(js/iepngfix.htc)');
    }
}

function getBrowserWidth() {
    var docwidth;
    //opera Netscape 6 Netscape 4x Mozilla 
    if (window.innerWidth){
        docwidth = window.innerWidth; 
    } 
    //IE Mozilla 
    if (document.body.clientWidth){ 
        docwidth = document.body.clientWidth; 
    }
    return docwidth;
}

function getBrowserHeight() {
    var docheight;
    //opera Netscape 6 Netscape 4x Mozilla 
    if (window.innerHeight){ 
        docheight = window.innerHeight; 
    } 
    //IE Mozilla 
    if (document.body.clientHeight){ 
        docheight = document.body.clientHeight; 
    }
    
    return docheight;
}

function do_SiFR() {
    eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('f 2={g:\'h/2.i\'};0.j=k;0.l(2);0.4(2,{5:\'m\',6:\'7\',8:\'.0-9 {3: #a; b-3:#c;d-e:1;}\'});0.4(2,{5:\'n,o,p\',6:\'7\',8:\'.0-9 {3: #a; b-3:#c;d-e:1;q-r:s;}\'});',29,29,'sIFR||nobel|color|replace|selector|wmode|transparent|css|root|F7E700|background|000000|letter|spacing|var|src|SiFR|swf|hideElements|true|activate|h1|h2|h3|h4|text|transform|uppercase'.split('|'),0,{}))  
}

function isEmpty(T) { 
	try {
		return (T === null || T === undefined || T === "" || T === NaN); 
	}
	catch (ex) {
		return true;
	}
}

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp('(^|\\s)'+searchClass+'(\\s|$)');
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function loadFlashBackground(flashObject) {
    setSizes();
    eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('0=0.7(/~\\//,"");2(8.9.a.3(\'5\')==-1){2(0.3("?")>-1){0+="&"}4{0+="?"}0+="6=b"}4{2(0.3("?")>-1){0+="&"}4{0+="?"}0+="6=5"}',12,12,'flashObject||if|indexOf|else|large|size|replace|document|body|className|medium'.split('|'),0,{}))
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"\n');
    document.write('width="100%" height="' + bgHeight + '" id="flashbg" align="middle" VIEWASTEXT>\n');
    document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
    document.write('<param name="movie" value="' + flashObject + '" />\n');
    document.write('<param name="quality" value="high" />\n');
    document.write('<param name="wmode" value="opaque" />\n');
    document.write('<embed wmode="opaque" src="' + flashObject + '" quality="high"  width="100%" height="' + bgHeight + '" name="flashbg"\n');
    document.write('align="middle" allowScriptAccess="sameDomain"  type="application/x-shockwave-flash"\n');
    document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
    document.write('</object>\n');    
}

function generateGuid() {
    var result, i, j;
    result = '';
    
    for(j=0; j<32; j++) {
        if( j == 8 || j == 12|| j == 16|| j == 20)
        result = result + '-';
        i = Math.floor(Math.random()*16).toString(16).toUpperCase();
        result = result + i;
    }
    return result
}