<!--

// for onresize
var origWidth, origHeight;
if (document.layers) {
  origWidth = window.innerWidth;
  origHeight = window.innerHeight;
}

function to_do_onresize() {
	if (document.layers) {
	 if (window.innerWidth != origWidth || window.innerHeight != origHeight) 
	    window.location.reload();
	} else setTimeout("window.location.reload()",200);
}
window.onresize = to_do_onresize;

// content to be written and wiped in/out
// format/wrap however you like
// array can hold items written to various layers
var wipe_array=new Array(
	'<div class="wipe2"><b>WELKOM</b></div>',
	'<div class="wipe2"><b>ONZE WEBSITE</b></div><div class="wipe2"><b>WORDT</b></div><div class="wipe2"><b>OP DIT MOMENT</b></div><div class="wipe2"><b>VERNIEUWD</b></div>'
);

// destination url, where to go at end of animation
function setDest() {
	window.location = "o2.html";
}

var outerLyr, wipeLyr1, wipeLyr2;
function initDynLyrs() {
	// args: left,top,width,height
	outerLyr = new dynObj('outerDiv',0,0,320,320);
	outerLyr.setBgClr("#D14414");
	wipeLyr1 = new dynObj('wipeDiv1',0,0,520);
	// send non-capable browsers to destination url now
	if (!wipeLyr1 || !document.layers && (typeof wipeLyr1.doc.innerHTML == "undefined" || window.opera) ) {
		setDest();
		return;
	}
	wipeLyr2 = new dynObj('wipeDiv2',0,0,493,343);
	wipeLyr2.centerIn(window);
	wipeSeries();
}
window.onload=initDynLyrs;

// prepare for write and wipe in 
function writeWipePrep(obj,itm) {
	// Wraps wipe layer content in table with id
	// so you can get rendered width/height.
	var cntnt = '<table id="w1" width="'+obj.width+'" border="0" cellpadding="4" cellspacing="0"><tr><td class="wipe">'+itm+'</td></tr></table>';
	obj.hide();
	// restore, for ns4, or new content is visible...
	obj.clipTo(0,obj.width,obj.height,0);	
	obj.writeLyr(cntnt);
	obj.width=getWidth(obj.el,'w1');
	obj.height=getHeight(obj.el,'w1');
}

var wipe_ctr=0;
function wipeSeries() {
	switch (wipe_ctr) {
		case 0:
			// call wipeSeries function when slideTo completes
			// (didn't work to leave it as last arg for outerLyr.wipe)
			outerLyr.onSlideEnd=wipeSeries;
			// slideTo args: left,top,duration ('c' for center)
			// (uses posRel method when left is string)
			setTimeout(outerLyr.obj+".slideTo('c',0,1500)",500);
			// arguments: which wipe, delay, wipe duration
    	outerLyr.wipe("in corner",500,1500);
    break;
    case 1:
			writeWipePrep(wipeLyr1,wipe_array[0]);
			wipeLyr1.centerIn(outerLyr);
			// args: which wipe, delay, wipeTime, what next
			wipeLyr1.wipe('in right',1000,1800,"wipeSeries()");
    break;
    case 2:
    	wipeLyr1.wipe('out middle',1500,1000,"wipeSeries()");
    break;
		case 3:
			writeWipePrep(wipeLyr1,wipe_array[1]);
			wipeLyr1.centerIn(outerLyr);
			wipeLyr1.wipe('in top',1000,1500,"wipeSeries()");
    break;
    case 4:
    	wipeLyr1.wipe('out top',2500,1000,"wipeSeries()");
    break;
		case 5:
			setTimeout(outerLyr.obj+".slideTo('se',0,1000)",1000);
			outerLyr.wipe('out corner',1000,1000);
		break;
		case 6:
			wipeLyr2.css.zIndex = 2;
			wipeLyr2.wipe('in center',1200,1200,"wipeSeries()");
    break;
    case 7:
    	setTimeout("setDest()",3000);
    break;
  }
	wipe_ctr++;
}
//-->

