// gulden snede: 0.61803398874989484820458683436563811772030917980576
// document.body.firstChild.firstChild.firstChild.appendChild(document.createTextNode('\r\n'))

var d = document, pop, say, colour, popw = [], drago = null, lasto = null, zstep = 3,
 gid = d.getElementById ? function(o) { return d.getElementById(o) || null; } : ( d.all ? function(o) { return d.all(o) || null; } : null );

function a( o, e ) {
 e.cancelBubble = true; if( e.stopPropagation ) { e.stopPropagation(); }
 var c = +pop || +getcookie( 'pop' ) || 2, u = o.href;
 if( c<2 || e.shiftKey ) { window.open( u, '_blank' ); return false; }
 function rax( ex, x, l, w ) {
  var rx = l + ex;
  if(ex+x>w) {
   rx += w - ex - x - 2;//for the border
   if( rx<l ) { rx = l; }
  }
  return rx + 'px';
 }
 var g, h, i, j, p = u.replace( /\W/g, '' ),
  name = u.replace( /^.*\/([^\/\.]*)(\.[^\/\.]*)?$/, '$1' ),
  ext = u.replace( /^.*\.(\w+$)/, '$1' ).toLowerCase(),
  ico, lines, size, th, tr = o, v, w = getwindow(), x, y;
 while( !istag( tr, 'tr' ) ) { tr = tr.parentNode; }
 th = tr.parentNode.parentNode.getElementsByTagName('th'); i = th.length;
 while(i--) { j = th[i].title.toLowerCase();
  if( j.indexOf('extension')+j.indexOf('type')>-2 ) { ico = tr.childNodes[i].lastChild.src || '/image/icon/ext/html.gif'; }
   else if( j.indexOf('width')+j.indexOf('breedte')>-2 ) { x = tr.childNodes[i].firstChild && +tr.childNodes[i].firstChild.nodeValue || 0; }
   else if( j.indexOf('height')+j.indexOf('hoogte')>-2 ) { y = tr.childNodes[i].firstChild && +tr.childNodes[i].firstChild.nodeValue || 0; }
   else if( j.indexOf('lines')+j.indexOf('regels')>-2 ) { lines = tr.childNodes[i].firstChild && +tr.childNodes[i].firstChild.nodeValue || 0; }
   else if( j.indexOf('bytes')>-1 ) { size = +tr.childNodes[i].title.replace(/,/g,'') || 0; }
 }
 if( e.altKey ) { window.open( '/image/palette.php?file='+u.replace( /^.*?\b\/\b/, '' ), '_search' ); return false; }
 if( c===2 ) {
  if( ext.match(/^(w?bmp|jpe?g|gif|png|x[bp]m)$/) ) {
   g = d.createElement( 'img' );
   g.src = u;
   g.alt = name + '.' + ext;
   g.title = ' ' + name + '.' + ext + ' \u000d ' + x + ' x ' + y + ' px  100% ';
   g.className = 'drag last';
   g.style.left = rax( e.clientX, x, w.l, w.w );
   g.style.top = rax( e.clientY, y, w.t, w.h );
   g.width = x;
   g.height = y;
   g.style.zIndex = zstep;
   g.onmousedown = setlast;
   g.ondblclick = shut;
   gid( 'y' ).appendChild( g );
   if( lasto ) { toggleclass( lasto, 'last' ); } lasto = g;
   if( e.ctrlKey ) { refit( g ); }
   return false;
  } else if( !u.match(/\/view\?/) && ext.match(/^(css|js|txt)$/) ) {
   window.location.href = 'view-source:' + u; return false;
  } else if( u.match(/\/view\?/) || ext.match(/^(au|kar|mid|mp3|wav|html?|ico|cur|ani|swf|xml|xsl)$/) ) {
   x = Math.round( Math.max( Math.min( (lines && 570) || x, 570), 100 ) );
   y = Math.round( Math.max( Math.min( lines*15 || y, 400), 100 ) );
   if( ext.match(/^(au|kar|mid|mp3|wav)$/) ) { x=290; y=80; }
   if( ( h = d.getElementsByTagName('iframe') ) && ( i = h.length ) ) {
    while(i--) { if( h[i].src===u ) { g = h[i].parentNode;
     g.style.left = rax( e.clientX, x, w.l, w.w );
     g.style.top = rax( e.clientY, y, w.t, w.h );
     setlast( e, g );
     return false;
   }}}
   g = d.createElement( 'div' );
   g.className = 'drag last';
   g.style.left = rax( e.clientX, x, w.l, w.w );
   g.style.top = rax( e.clientY, y, w.t, w.h );
   g.style.zIndex = zstep;
   g.onmousedown = setlast;
   g.onmousemove = moveover;
   g.ondblclick = shut;
   h = d.createElement( 'a' ); h.href = '#shut';
   h.className = 'shut';
   h.title = ' ' + say['x'] + '. ';
   h.onclick = shut;
   g.appendChild( h );
   h = d.createElement( 'a' ); h.href = '#dock';
   h.className = 'shut dock';
   h.title = ' ' + say['dock'] + '. ';
   h.onclick = sdock;
   g.appendChild( h );
   if( ext.match(/^(css|js|phps?|txt|xml|xsl)$/) ) {
    h = d.createElement( 'a' ); h.href = '#wrap';
    h.className = 'shut wrap';
    h.title = ' ' + say['wrap'] + '. ';
    h.onclick = swrap;
    g.appendChild( h );
   }
   h = d.createElement( 'a' ); h.href = u; h.target = '_pop';
   h.title = ' Pop up ' + name + '. ';
   h.style.background = 'url(' + ico + ') 0 no-repeat';
   h.appendChild( d.createTextNode( name + '.' + ext ) );
   g.appendChild( h );
   h = d.createElement( 'iframe' );
   g.style.width = x + 'px';
   h.height = y + 'px';
   if( lines && lines<30 ) { h.height= ( lines * 15 + 6 ) + 'px'; }
   h.src = ext.match(/^(cur|ani)$/) ? 'javascript:\'<body style="cursor:url(' + u + ')"><\/body>\'' : 
    ( ext.match(/^(au|kar|mid|mp3|wav)$/) ? ( '/web/sound/audioplayer.php?file=' + u ) : u );
   g.appendChild( h );
   gid( 'y' ).appendChild( g );
   if( lasto ) { toggleclass( lasto, 'last' ); } lasto = g;
   if( e.ctrlKey ) { refit( g ); }
   return false;
  }
 } else if( c>2 ) {
  h = '<link href="/4umi.css" rel="stylesheet" type="text/css"/>' +
    '<script type="text/javascript">\n' +
    ' document.onkeydown = function(e) { e = e || window.event || {}; if( e.keyCode===27 ) { self.close(); } };\n' +
    '<\/script>';
  var q = '', r = '', s = 'margin:0', t = '', z = window.screen;
  if(u.match(/\/view?/)) {
   t = ext=='css' ? 'Stylesheet' : 'Script';
   x = 555; y = 342; q=u;
  } else if(ext=='csv'||ext=='dat'||ext=='log'||ext=='txt') {
   t = 'Text';
   q = 'view-source:' + u; x = 555; y = 343;
  } else if(ext=='ico'||ext=='cur'||ext=='ani') {
   t = 'Icon';
   q = u;
  } else if(ext=='bmp'||ext=='jpg'||ext=='jpeg'||ext=='gif'||ext=='png'||ext=='xbm') {
   t = 'Image';
   s = 'background:white url(' + u + ') center no-repeat;height:100%;" title=" ' + u + ' \u000d ' + x + ' x ' + y + ' px ';
  } else if(ext=='au'||ext=='kar'||ext=='mid'||ext=='mp3'||ext=='wav') {
   t = 'Sound';
   x = 300; y = 45;
   q = '/web/sound/audioplayer.php?file='+u;
  } else if(ext=='avi'||ext=='mov'||ext=='mpg'||ext=='mpeg'||ext=='wmv') {
   t = 'Movie';
   x = 320; y = 285;
   r = '<div style="text-align:center;"><embed src="' + u + '" loop="true" width="100%" height="100%"><\/embed><\/div>';
  } else if(ext=='swf') {
   t = 'Flash';
   r = '<div><object width="100%" height="100%"' +
    ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
    ' codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"' +
    ' type="application/x-shockwave-flash">' +
    '<param name="movie" value="' + u + '">' +
    '<param name="bgcolor" value="#ffffff">' +
    '<param name="quality" value=high>' +
    '<embed src="' + u + '" width="' + x + '" height="' + y + '"' +
    ' bgcolor="#ffffff" quality="high" type="application/x-shockwave-flash"' +
    'Failed embedding media.<\/embed><\/object><\/div>';
  }
  if(t) { x = Math.max( 100, x ); y = Math.max( 100, y );
   if( c>3 && popw[p] && !popw[p].closed ) { popw[p].close(); }
   g = window.open( q, '_pop' + ( c>3 ? '' : p ),
    'left=' + Math.round( ( z.availWidth - x ) / 2 ) + ',top=' + Math.round( ( z.availHeight - y ) / 2 ) +
    ',width=' + x + ',height=' + y + ',resizable,scrollbars' );
   if( q && g ) { return !q.indexOf('view-source'); } if( g ) {
    v = g.document;
    v.open();
    v.write( '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"' +
    ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' +
    '<html><head><title>\u02da' + t + ': ' + name.replace( /_/g, ' ' ) + '<\/title>' +
    '' + h + '<\/head>' +
    '<body style="' + s + '">' + r + '<\/body><\/html>' );
    v.close(); g.focus(); popw[p] = g;
    return false;
   }
  }
 }
 return true;
}

function act( e ) {
 e = e || window.event || {};
 var o = e.srcElement || e.target, h = o.hash.substring(1);
 if( h && lasto ) {
  if( lasto.src && !o.pathname.indexOf( 'image/palette' ) ) {
   window.open( o.href + '?file=' + lasto.src.replace( /^.*?\b\/\b/, '' ), e.altKey ? '_search' : '_blank' );
  }
  if( h==='c' ) { refit(); }
  else if( h==='s' ) { resize(); }
  else if( h==='shut' ) { shut( e, lasto ); }
  else if( !h.indexOf('f') ) { flip( parseInt( h.substring(1) ) ); }
  else if( !h.indexOf('r') ) { rotate( lasto, parseInt( h.substring(1) ) ); }
  else if( !h.indexOf('z') ) {
   if( h==='z8' ) {
    var p = window.prompt( 'New percentage:', '100' ); if( p ) { resize( +p ); }
   } else {
    resize( parseInt( o.firstChild.nodeValue ) );
   }
  }
 return false;
 }
return true;
}

function beweeg() { gid('m').style.top = getwindow().t + 'px'; }

function help() {
 if( window.confirm( say['help'] ) ) { window.open( '/view?help', '_search' ); } return false;
}

function keyd( e ) {
 e = e || window.event || {};
 var k = e.keyCode || e.which, a = gid( 'cols' ) && gid( 'cols' ).childNodes, b = true, i = a && a.length, j;
 if( lasto && k==46 ) {
  shut( e, lasto ); return false;
 } else if( lasto && k>47 && k<58 && ( e.ctrlKey || e.altKey ) ) {
  k -= 48; resize( k * ( e.altKey ? 10 : 100 ) ); return false;
 } else if( lasto && k>96 && k<106 ) { j = e.ctrlKey ? 2 : 1; if( e.altKey ) { j *= 10; }
  if( k===97 || k===100 || k===103 ) { lasto.style.left = parseInt(lasto.style.left) - j + 'px'; }
  if( k===97 || k===98 || k===99 ) { lasto.style.top = parseInt(lasto.style.top) + j + 'px'; }
  if( k===99 || k===102 || k===105 ) { lasto.style.left = parseInt(lasto.style.left) + j + 'px'; }
  if( k===103 || k===104 || k===105 ) { lasto.style.top = parseInt(lasto.style.top) - j + 'px'; }
  return false;
 } else if( k<65 ) { return true; }

 k = String.fromCharCode( k ).toLowerCase();
 if( k==='i' && lasto ) {
  if( e.ctrlKey ) { refit( lasto ); return false; }
   else if( e.altKey ) { rotate( lasto, null, e.shiftKey ); return false; }
   else if( e.shiftKey ) { resize(); return false; }
 } else if( e.altKey ) {
  while(i--) { j = a[i].firstChild;
   if( j.accessKey.toLowerCase()===k ) { togglecol( e, j ); b=false; }
  }
 } else if( e.ctrlKey ) {
  while(i--) { j = a[i].firstChild;
   if( j.accessKey.toLowerCase()===k ) {
    sortcursor( 'wait' ); window.setTimeout( 'sortable( \'t'+english( j.hash.substring(1) ) + '\', ' + i + ' ); sortcursor( \'\' );', 20 );
    if( !j.className ) { togglecol( e, j ); } b = false; }
  }
 }
 e.returnValue = b; return b;
}

function moveover( e ) {
 e = e || window.event || {}; if( !d.onmousemove ) {
  var o = e.srcElement || e.target, p = o.style, b, w = getwindow(),
   x = e.clientX - parseInt( p.left ) + w.l,
   y = e.clientY - parseInt( p.top ) + w.t;
  if( (b=x<4) || o.offsetWidth-x<4 ) {
   o.dragmode = b ? 'left' : 'right';
   p.cursor = 'col-resize';
  } else if( (b=y<4) || o.offsetHeight-y<4 ) {
   o.dragmode = b ? 'top' : 'bottom';
   p.cursor = 'row-resize';
  } else {
   o.dragmode = '';
   p.cursor = '';
  }
 }
}

function moused( e ) {
 e = e || window.event || {};
 var o = e.srcElement || e.target;
 if( /\bdrag\b/.test( o.className ) ) {
  if( lasto || lasto!==o ) { toggleclass( lasto, 'last' ); o.className += ' last'; }
  lasto = o;
  drago = o;
  o.L = parseInt( o.style.left );
  o.T = parseInt( o.style.top );
  o.X = parseInt( o.style.left ) - e.clientX;
  o.Y = parseInt( o.style.top ) - e.clientY;
  o.W = parseInt( o.style.width ) - e.clientX;
  o.H = parseInt( o.lastChild && o.lastChild.height ) - e.clientY - getwindow().t;
  d.onmousemove = mousem;
  d.onselectstart = f;
}}

function mousem( e, x, y ) { if( drago && !drago.docked ) { x=x||0; y=y||0;
 e = e || window.event || {};
 if( !drago.dragmode ) {
  drago.style.left = drago.X + x + e.clientX + 'px';
  drago.style.top = drago.Y + y + e.clientY + 'px';
 } else if( drago.dragmode==='right' ) {
  drago.style.width = Math.max( 0, drago.W + x + e.clientX ) + 'px';
 } else if( drago.dragmode==='bottom' ) {
  drago.lastChild.height = Math.max( 0, drago.H + y + e.clientY + getwindow().t ) + 'px';
 } else if( drago.dragmode==='left' ) {
  drago.style.left = drago.X + x + e.clientX + 'px';
  drago.style.width = Math.max( 0, drago.L + 2*drago.W - x - e.clientX ) + 'px';
 } else if( drago.dragmode==='top' ) {
  drago.style.top = drago.Y + y + e.clientY + 'px';
  drago.style.height = Math.max( 0, drago.T + 2*drago.H - y - e.clientY ) + 'px';
 }
 return false;
}}

function mouseup() {
 d.onmousemove = null; d.onselectstart = null; drago = null;
}

function raise( s, e ) {
 e = e || window.event || {}; var g, h, i, j;
 if( e.type&&e.type.indexOf('up')>-1 ) {
  mouseup();
 } else if( e.type&&e.type.indexOf('down')>-1 ) {
  if(!drago) { h = d.getElementsByTagName('iframe'); i = h.length;
  while(i--) { if( h[i].src==s ) {
   setlast( e, h[i].parentNode ); break;
  }}}
 } else if( drago && ( g = d.onmousemove ) ) {
  if( drago.lastChild && drago.lastChild.src==s ) {
   g ( e, parseInt( drago.style.left ) + drago.lastChild.offsetLeft, parseInt( drago.style.top ) + drago.lastChild.offsetTop );
  } else {
   h = d.getElementsByTagName('iframe'); i = h.length;
   while(i--) { if( h[i].src==s ) {
    j = h[i].parentNode;
    g ( e, parseInt( j.style.left ) + j.lastChild.offsetLeft, parseInt( j.style.top ) + j.lastChild.offsetTop );
    break;
  }}}
 } else if( lasto && lasto.lastChild && lasto.lastChild.src!=s ) {
  h = d.getElementsByTagName('iframe'); i = h.length;
  while(i--) { if( h[i].src==s ) {
   setlast( e, h[i].parentNode ); break;
}}}}

function refit( o ) {
 o = o || lasto; if( o ) {
 o.style.left = '-9999px';
 o.style.top = '-9999px';
 var s = o.src && o.src.match( /r(\d+).\w+$/ ),
  t = ( o.title + o.offsetWidth + ' x ' + o.offsetHeight ).match( /(\d+) x (\d+)/ ),
  w = getwindow(), x;
 if( s && +s[1]%2 ) { var u=t[1]; t[1]=t[2]; t[2]=u; }
 x = Math.min( 1, (w.w-2)/( +t[1] ), (w.h-2)/( +t[2] ) );
 o.width = Math.round( x * t[1]  );
 o.height = Math.round( x * t[2]  );
 o.style.left = Math.round( ( w.w - o.width ) / 2 ) + w.l -1 + 'px';
 o.style.top = Math.round( ( w.h - o.height ) / 2 ) + w.t -1 + 'px';
 o.title = o.title.replace( /\d+%/, Math.round( x * 100 ) + '%' );
 stickhead();
}}

function resize( factor ) {
 factor = factor || 1; if( factor>1 ) { factor /= 100; }
 var s, t = lasto && lasto.title.match( /(\d+) x (\d+)/ );
 if( t ) {
  if( /r(13)/.test( lasto.src ) ) {
   s = t[1]; t[1] = t[2]; t[2] = s;
  }
  lasto.width = Math.round( factor * t[1]  );
  lasto.height = Math.round( factor * t[2]  );
//  lasto.src = lasto.src.replace( /\.?[fr\d]+(\.\w+)$/, '$1' );
  lasto.title = lasto.title.replace( /\d+%/, Math.round( factor * 100 ) + '%' );
 } else if( (t=lasto.lastChild) && typeof t.style.zoom==='string' ) {
  t.style.zoom = factor; // (t=t.contentWindow) && (t=t.document) && (t=t.body) &&
 }
 stickhead();
}

function rotate( o, angle, anticlock ) {
 var s = o.src && o.src.match( /^(.*?)(\.?r(\d+))?(\.(gif|jpe?g|png))$/i );
 if( s ) {
  o.style.background = 'red'; o.onload = function() { this.style.background = ''; };
  angle = ( typeof angle==='number' ? angle : ( (+s[3]||4) + (anticlock?-1:1) ) )%4;
  if( angle<0 ) { angle += 4; }
  o.src = s[1] + ( angle ? ( '.r' + angle ) : '' ) + s[4];
  o.title = o.title.replace( /%[\s\S]*$/, '% ' + ( angle ? ( '\u000d ' + say['r' + angle] ) : '' ) );
  s = o.width; o.width = o.height; o.height = s;
 }
 stickhead();
}

function flip( angle ) {
 var s = lasto.src && lasto.src.match( /^(.*?)(\.?f(\d+))?(\.(gif|jpe?g|png))$/i );
 if( s ) {//alert(angle+'\n'+ s[1] + ( angle ? ( '.f' + angle ) : '' ) + s[4]);
  lasto.src = s[1] + ( angle ? ( '.f' + angle ) : '' ) + s[4];
 }
}

function shut( e, o ) {
 e = e || window.event || {};
 o = o || e.srcElement || e.target;
 if( istag( o, 'a' ) ) { o = o.parentNode; }
 if( o.lastChild ) { o.removeChild( o.lastChild ); }
 o.parentNode.removeChild( o );
 if( !lasto || !lasto.offsetWidth && ( lasto = getlast() ) ) { lasto.className += ' last'; }
 window.setTimeout( 'stickhead()', 10 ); return false;
}

function sdock( e, o ) {
 e = e || window.event || {};
 o = o || e.srcElement || e.target;
 var b = toggleclass( o, 'undock' ), w = getwindow();
 o.title = ' ' + say[b ? 'dock' : 'undock'] + '. '; o = lasto;
 if( o.docked ) {
  o.docked = false;
  o.style.left = o.X + 'px';
  o.style.top = o.Y + 'px';
  o.style.width = o.W + 'px';
  o.lastChild.height = Math.max( 0, o.H ) + 'px';
  window.scrollTo( 0, w.y ); stickhead();
 } else {
  o.docked = true;
  o.X = parseInt( o.style.left ) - w.l;
  o.Y = parseInt( o.style.top ) - w.t;
  o.W = parseInt( o.style.width );
  o.H = parseInt( o.lastChild.height );
  o.style.left = '-9999px';
  o.style.top = '-9999px'; w = getwindow();
  o.style.left = '0';
  o.style.top = w.y + gid('m').scrollHeight + 'px';
  o.style.width = w.w - 6 + 'px';
  o.lastChild.height = w.h - gid('m').scrollHeight - 24 + 'px';
  window.scrollTo( 0, w.y );
 }
 stickhead(); return false;
}

function swrap( e, o ) {
 e = e || window.event || {};
 o = o || e.srcElement || e.target;
 var b = toggleclass( o, 'unwrap' );
 o.title = ' ' + say[b ? 'wrap' : 'unwrap'] + '. ';
 var s = lasto.lastChild.contentWindow.document.body.firstChild.firstChild.style,
  t = s.whiteSpace;
 s.whiteSpace = t ? '' : 'normal'; return false;
}

function getlast() {
 var a = gid( 'y' ).childNodes, i = a.length, r = [];
 if( i ) {
  while(i--) { r[i] = [ a[i].style.zIndex, i ]; }
  r.sort( function(a,b) { return a[0]===b[0] ? ( b[1]-a[1] ) : ( b[0]-a[0] ); } );
  return a[ r[0][1] ];
 }
 return null;
}

function setlast( e, o ) {
 e = e || window.event || {};
 o = o || e.srcElement || e.target; if( o.tagName ) {
  if( istag( o, 'a' ) ) { o = o.parentNode; }
  if( lasto ) { toggleclass( lasto, 'last' ); } lasto = o; o.className += ' last';
  o.style.zIndex = ++zstep;
  if( e.ctrlKey ) { refit( o ); }
   else if( e.altKey ) { rotate( o, null, e.shiftKey ); }
   else if( e.shiftKey ) { resize(); }
 }
}

function check( e ) {
 e = e || window.event || {};
 var o = e.srcElement || e.target,
  a = o.parentNode.parentNode, b = a.childNodes, i = b.length;
 while(i--) { b[i].firstChild.className = ''; }
 o.className = 'c';
 if( ( a = o.href.match( /#(\w+)(\d+)$/ ) ) ) {
  window[ a[1] ] = a[2];
  setcookie( a[1], a[2], 0 );
  return false;
 }
}

function english( s ) { return s.replace(/Mappen/,'Folders').replace(/Bestanden/,'Files'); }

function togglecol( e, o ) {
 e = e || window.event || {};
 o = o || e.srcElement || e.target;
 var h = english(o.hash), i = h.substring(1),
  a = gid( 't' + i ), b, j = 0,
  p = o.parentNode, q = a.offsetWidth, r = a.rows;
 if( english( o.firstChild.nodeValue )===i ) {
  b = toggleclass( a, 'hid' ) ? '' : 'none';
  while( ( p = p.nextSibling ) ) { if( p.tagName ) {
   if( english( p.firstChild.hash )!==h ) { break; } p.style.display = b;
  }}
 } else {
  while( ( p = p.previousSibling ) ) { if( p.tagName ) {
   if( english( p.firstChild.hash )!==h ) { break; } j++;
  }}
  b = toggleclass( a.getElementsByTagName('col')[j], 'hid' );
  o.className = b ? 'c' : '';
  if( o.accessKey.toLowerCase()==='v' ) {
   i = r.length;
   while(--i) { if( ( p = r[i].cells[j].lastChild ) && ( p=p.lastChild ) && ( p=p.lastChild ) && istag(p,'img') ) { toggleclass( p, 'hid' ); } }
//   alert('v!'); r[i].cells[j].lastChild.lastChild.className += ' hid';
  }
  if( q===a.offsetWidth ) {
   b = b ? '' : 'hid';
   i = r.length;
   while(i--) { r[i].cells[j].className = b; }
 }}
 return false;
}

function rowclick() { this.firstChild.style.background = toggleclass( this, 'colc' ) ? 'threedface' : 'gold'; }
function rowover() { this.className += 'over'; }
function rowout() { this.className = this.className.replace( /over\b/, '' ); }

function wakerows( s ) {
 var o = gid( s ); if( o ) {
  var a = o.rows, b, i = a.length, j;
  while(--i) { j = a[i]; b = j.className.indexOf( ' colc' )<0;
   j.className = 'colw' + ( i%2 ? 'a' : 'b' ) + ( b ? '' : ' colc' );
   j.firstChild.style.background = b ? 'threedface' : 'gold';
   j.onclick = rowclick;
   j.onmouseover = rowover;
   j.onmouseout = rowout;
  }
  if( s==='tFiles' ) {
   var k = +getcookie('mini') || 100, l = ( a[0].lastChild.offsetWidth - 17 ) / k;
   i = a.length; k += 3;
   while(--i) { j = a[i].lastChild;
    while(( j = j.firstChild )) { if( j.src ) { j.style.left = ( i-1 )%l * k + 'px'; break; } if( j.href ) { j.style.left = ( i-1 )%l * k + 'px'; break; } }
   }
  }
 }
}

function f() { return false; }

function s() {
 var a = d.createElement('div'), c, e, g, h, i, j, k, l, last = null, m, n, o, p, q, r, t, u;
 a.id = 'y'; d.body.insertBefore( a, d.body.firstChild );
 if(( g = gid('m') && gid('m').lastChild && gid('m').lastChild.firstChild.nextSibling )) {
 getridofemptytextnodes( g );
 h = g.childNodes; i = h.length;
 while(( g = g.previousSibling )) { if( g.tagName ) { g.onclick = f; break; } }
 while(i--) {
  e = h[i].lastChild; j = h[i].firstChild; j.onclick = f; j = j.firstChild.nodeValue;
  if( j=='Columns' || j=='Kolommen' ) { e.id = 'cols'; q = e.firstChild.cloneNode( true );
   m = d.getElementsByTagName('table'); n = m.length;
   while(n--) { t = m[n];
    u = t.getElementsByTagName('caption')[0].firstChild.nodeValue; q.firstChild.href = '#' + u;
    c = t.getElementsByTagName('col');
    o = t.getElementsByTagName('tr')[0].getElementsByTagName('th'); p = o.length;
    while(p--) {
     r = q.cloneNode( true ); a = r.firstChild; a.onclick = togglecol;
     a.className = /\bhid\b/.test( c[p].className ) ? '' : 'c';
     a.title = o[p].title.replace(/Ctrl/,'Alt'); a.accessKey = a.title.match(/Alt\+(.)/)[1];
     a.firstChild.nodeValue = o[p].firstChild.nodeValue.replace( /^\s*\w+\.\s*$/, o[p].title.replace( /^\s*([^\.]*)\.[\S\s]*$/g, '$1' ) );
     last = e.insertBefore( r, last );
    }
    r = q.cloneNode( true ); a = r.firstChild; a.onclick = togglecol;
    a.className = t.id==='tFolders' ? 'f' : 'e';
    a.firstChild.nodeValue = u;
    last = e.insertBefore( r, last );
   }
   if( e.childNodes.length>1 ) { e.removeChild( e.firstChild ); }
  } else if( j=='Help' ) {
   h[i].firstChild.onclick = window[j.toLowerCase()];
  } else if( e.childNodes ) {
   k = e.childNodes; l = k.length;
   while(l--) { m = k[l].firstChild; if( m ) {
     m.onclick = check;
     if( m.className==='c' && ( a = m.href.match( /(\w+)=?(\w+)$/ ) ) ) {
      window[ a[1] ] = a[2];
      setcookie( a[1], a[2], 0 );
     }
    }
   }
  }
 }}
 if(( g = gid('m') && gid('m').lastChild.previousSibling.firstChild.nextSibling )) {
  getridofemptytextnodes( g );
  h = g.childNodes; i = h.length;
  while(i--) { j = h[i].firstChild; j.onclick = act;
   if( h[i].lastChild.childNodes ) {
    k = h[i].lastChild.childNodes; l = k.length;
    while(l--) { if( k[l].firstChild ) { k[l].firstChild.onclick = act; } }
   }
  }
 }
 d.onkeydown = keyd;
 d.onmousedown = moused;
 d.onmouseup = mouseup;
 if( window.attachEvent ) { inim(); }
 eval( 'say={' + gid('h').firstChild.nodeValue.replace( /:\s*([^,\r\n]*)/g, ':\'$1\'' ) + '}' );
}

//----------suckerfish+

if( window.attachEvent ) {
 var mp = function( o ) { while( !istag( o, 'li' ) ) { o = o.parentNode; } return o; },
  mover = function() { var o = mp( this ); o.className += ' sfhover'; },
  mout = function() { var o = mp( this ); o.className = o.className.replace( /(\s)?\bsfhover\b/g, '$1' ); },
  inim = function () {
   var a = gid('m') && gid( 'm' ).getElementsByTagName( 'li' ), i = a && a.length, j;
   while(i--) {
    (j=a[i]).onmouseover = mover; j.onmouseout = mout;
    j.firstChild.onfocus = mover; j.firstChild.onblur = mout;
   }
  };
}

//----------legacy

function getby( n, b, c ) { c = Math.pow( 10, c || 3 ); var a = [ ' bytes', ' kb', ' mb', ' gb', 'tb', 'pb', 'eb', 'zb', 'yb' ], i = 0, j = n; while( j>1024 && a[++i] ) { j /= 1024; } return ( Math.round( n * c ) / c ) + a[i] + ( b && n>1024 ? ( ' (' + n + a[0] + ')' ) : '' ); }

function getridofemptytextnodes( o ) {
 for( var c = o.childNodes, i = 0, y=c[0]; y; y=c[++i] ) {
    if( y.nodeType==1 ) { getridofemptytextnodes( y ); }
     else if( y.nodeType==3 && !( /\S/.test( y.nodeValue ) ) ) {
      o.removeChild( y ); --i;
}}}

function istag( o, s ) { return o.tagName.toLowerCase()===s; }

function getwindow( o ) { o = o || window; var v = o.document, w, h, l, t, x, y; if( typeof o.innerWidth==='number' ) { w = o.innerWidth; h = o.innerHeight; l = o.pageXOffset; t = o.pageYOffset; x = o.scrollMaxX; y = o.scrollMaxY; } else if( ( o = v.documentElement ) && typeof o.clientWidth==='number' && o.clientWidth || ( o = v.body ) ) { w = o.clientWidth; h = o.clientHeight; l = o.scrollLeft; t = o.scrollTop; x = o.scrollWidth; y = o.scrollHeight; } return {w: w, h: h, l: l, t: t, x: x, y: y}; }

function toggleclass( o, name ) {
 var r = new RegExp( '\\s?' + name ), s = o.className, b = r.test( s );
 o.className = b ? s.replace( r, '' ) : ( s + ' ' + name );
 return b;
}

function setcookie( name, val, days ) { var x = new Date(); x.setTime( x.getTime() + ( 1000 * 60 * 60 * 24 * ( typeof days==='number' ? days : 30 ) ) ); d.cookie = name + '=' + escape( val ) + '; expires=' + x.toGMTString() + '; path=/'; }

function getcookie( name ) { name += '=';
 var s = d.cookie, i = s.indexOf( name ), j = i + name.length, k = s.substring( j ).indexOf( ';' );
 if( i<0 ) { return null; }
 return unescape( s.substring( j, k<0 ? s.length : j + k ) );
}
