var d=document;

function animantiestart(timeout) {
	setTimeout("verkleingroot('-')",timeout);
	if ( main.location.href.indexOf('zwart.htm') >= 0 ) {
  	main.location.href="home.html";
	}
}

var smooth_timer;
var smooth_delay= 20;
//var tr_laag     = '';
var iframe_laag = '';
var welkom_laag = '';
var prev_id     = '';
var basis_grootte = 563;
function vloeiend(id, cur, target, step, mode) {
  if (welkom_laag.display == "none" ) { return }
  diff = target - cur;
	//   kleiner worden     groter worden
  if (diff != step*-1 && diff != 0) {
		if ( step < 1 ) {
    	nieuw = (diff >= 0) ? cur + Math.ceil(diff*step)+1 : cur + Math.floor(diff*step)-1;
			if ( nieuw < 0 ) { nieuw = 0 }
	//		nieuw = Math.round(nieuw/10)*10;
		} else {
    	nieuw = (diff >= 0) ? cur + step : cur - step;
	//		nieuw = Math.round(nieuw/10)*10;
			if ( diff  > step*-1.5 && target == 0 ) { nieuw = 0 }
			if ( nieuw > target    && target >  0 ) { nieuw = target }
		}
		//document.title = Math.floor(diff*step)+' '+document.title;
		iframe_laag.width = nieuw + "px";
		iframe2_laag.width= (basis_grootte-nieuw+1) + "px";
    if (smooth_timer) window.clearTimeout(smooth_timer);
    smooth_timer = window.setTimeout( "vloeiend('" + id + "'," + nieuw + "," + target + "," + step + ",'" + mode + "')", smooth_delay );
  }
  else if (mode != "groter_worden") {
  	if (welkom_laag.display != "none" ) { main.window.location.reload() }
  	if (smooth_timer) window.clearTimeout(smooth_timer);
		iframe_laag.width  = "0px";
		iframe_laag.width  = (basis_grootte+1)+"px";
		welkom_laag.display = "none";
//		document.images['nav'].src = 'navigatie/navigatie.gif';
	} else {
//		document.images['nav'].src = 'images/navigatie.gif';
    main.location.href="zwart.htm";
	}
//	document.title = iframe_laag.width+'  '+cur+' +/- '+Math.round(diff*step)+' '+diff;
//	document.title = step;
}

function verkleingroot(richting) {
	iframe_laag = eval(doc + '\'welkom\''    + sty);
	iframe2_laag= eval(doc + '\'main\''      + sty);
	welkom_laag = eval(doc + '\'welkom_td\'' + sty);
//	document.images['nav'].src = 'images/spacer.gif';
  if (iframe_laag != null) {
    if (richting == '+' ) { //welkom_laag.display=="none"
      welkom_laag.display="";
//      if (!iframe_laag.src && href != '') ifObj.src = href;
      vloeiend('welkom',0,basis_grootte,.02,'groter_worden');
    }
    else {
      vloeiend('welkom',basis_grootte,0,.02,'welkom_td');
    }
  }
}


