var t = [], o = window.document.images.leftim;

if( o ) {
 o.onmouseover=leftstart;
 o.onmouseout=leftstop;
 o.onclick=leftclick;
}

function getpos( o ) { var x = 0, y = 0; do { x += o.offsetLeft; y += o.offsetTop; } while( ( o = o.offsetParent ) ); return { x: x, y: y }; }

function cleartime( i ) { i++; while(i--) { if( t[i] ) { window.clearTimeout( t[i] ); } } }
function leftclip( i ) { o.style.clip = 'rect(auto auto auto ' + i + 'px)'; }
function leftstart() {
 var a = this, i, s, w = a.width; cleartime( w );
 s = w - parseInt( a.style.clip.match( /\(\s*([^)]+)\s*\)/ )[1].split( /\s/ )[3], 10 );
 for( i=s; i<w; i++ ) {
  t[i] = window.setTimeout( 'leftclip(' + ( w - i ) + ');', ( i - s ) * 5 );
 }
}
function leftstop() {
 var a = this, i, s, w = a.width; cleartime( w );
 s = w - parseInt( a.style.clip.match( /\(\s*([^)]+)\s*\)/ )[1].split( /\s/ )[3], 10 );
 for( i=s; i>200; i-- ) {
  t[i] = window.setTimeout( 'leftclip(' + ( w - i ) + ');', ( s - i ) * 5 );
 }
}
function leftclick() {
 var a = this, s, w = a.width; cleartime( w );
 s = w - parseInt( a.style.clip.match(/\(\s*([^)]+)\s*\)/)[1].split(/\s/)[3], 10 );
 leftclip( s>w/2 ? 0 : (w-200) );
}

function voorrenna( o ) {
 var d=window.document, i;
 if((i=d.createElement&&d.createElement('iframe'))){
  i.src=o.href;i.style.width='522px';i.style.height='402px';
  o.parentNode.replaceChild(i,o);
  return false;
 }else if((i=window.open(o.href,'iname','width=500,height=398,resizable'))){
  i.focus();
  return false;
 }
 return true;
}

(function() {
 var d = window.document, m = 5,
  o = d.getElementById && d.createElement && d.images.munch;
 if( !o ) { return; }
 function mm( e ) { if( !s.display ) {
  e = e || window.event;
  var x, y, z = getpos( o ),t,r,b,l;
  if( typeof e.clientX==='number' ) {
   x = e.clientX;
   y = e.clientY;
  } else {
   x = e.x;
   y = e.y;
  }
  x -= z.x;
  y -= z.y;
  t = 0;
  l = x * ( qx-ox ) / ( 2+ox );status=y+', '+ oy+', '+(qy+y);
  r = l + ox;
  b = t + oy;
  s.left = Math.round( -l ) + 'px';
  s.clip = [ 'rect(' + Math.round( t + m ), Math.round( r - m ), Math.round( b - m ), Math.round( l + m ), ')' ].join( 'px ' );
 } };
 function mo() { m = Math.random() * 4; s.display = ''; }
 function mt() { s.display = 'none'; }
 var ox = o.width,
  oy = o.height,
  qx = 813,
  qy = 1036,
  p = o.parentNode,
  q = o.cloneNode( true ),
  s = q.style;
 p.style.overflow = 'hidden';
 q.style.overflow = 'hidden';
 if( !s ) { return; }
 q.src = q.src.replace( /(\.[gif|jpe?g|png])?\.[mwh]\d+(\.[gif|jpe?g|png])$/i, '$2' );
 q.width = qx;
 q.height = qy;
 s.display = 'none';
 s.position = 'absolute';
 s.top = '0';
 s.left = '-999px';
 s.clip = 'rect( 0 0 0 0 )';
 p.insertBefore( q, o.nextSibling );
 o.onmousemove = q.onmousemove = mm;
 o.onmouseover = q.onmouseover = mo;
 o.onmouseout = q.onmouseout = mt;
})();
