var wnd=null;

window.onerror=noerror;

function oldzoom(i)
{
  img=document.images[i];
  big=new String(img.src);
  big=big.substring(0,big.lastIndexOf("/"));
  big+="/big"+i+".jpg";
  w=450;
  h=450;
  x=(screen.width-w)/2;
  y=(screen.height-h)/2;
  wnd=window.open("","","scrollbars=no,left="+x+",top="+y+",width="+w+",height="+h);
  wnd.document.writeln("<html>");
  wnd.document.writeln("<head>");
  wnd.document.writeln("<title>"+img.alt+"</title>");
  wnd.document.writeln("</head>");
  wnd.document.writeln("<body topmargin=0 leftmargin=0>");
  wnd.document.writeln("<table width=100% height=100% border=0 cellspacing=0 cellpadding=0>");
  wnd.document.writeln("<tr><td valign=center align=center><img src="+big+"></td></tr>");
  wnd.document.writeln("</table></body>");
  wnd.document.writeln("</html>");
  if(navigator.appName=="Microsoft Internet Explorer")
  {
    while(!wnd.document.images[0].complete) {}
  }
  w=wnd.document.images[0].width+4;
  h=wnd.document.images[0].height+32;
  x=(screen.width-w)/2;
  y=(screen.height-h)/2;
  wnd.resizeTo(w,h);
  wnd.moveTo(x,y);
}

function zoom(i)
{
  img=document.images[i];
  big=new String(img.src);
  big=big.substring(0,big.lastIndexOf("/"));
  big+="/big"+i+".jpg";
  w=200;
  h=100;
  w1=w;
  h1=h;
  x=(screen.width-w)/2;
  y=(screen.height-h)/2;
  wnd=window.open("","","left="+x+",top="+y+",width="+w+",height="+h);
  wnd.document.writeln("<html>");
  wnd.document.writeln("<head>");
  wnd.document.writeln("<title>Loading...</title>");
  wnd.document.writeln("</head>");
  wnd.document.writeln("<body topmargin=0 leftmargin=0>");
  wnd.document.writeln("<table width=100% !height=100% border=0 cellspacing=0 cellpadding=0>");
  wnd.document.writeln("<tr><td valign=center align=center><img src=zoom.gif alt=\"Loading...\" width=200 height=100>");
  wnd.document.writeln("<img src="+big+" width=0 height=0></td></tr>");
  wnd.document.writeln("</table></body>");
  wnd.document.writeln("</html>");
  if(navigator.appName=="Microsoft Internet Explorer") while(!wnd.document.images[1].complete) {} ;
  wnd.document.clear();
  wnd.document.close();
  wnd.document.writeln("<html>");
  wnd.document.writeln("<head>");
  wnd.document.writeln("<title>Taxibrousse asbl</title>");
  wnd.document.writeln("</head>");
  wnd.document.writeln("<body topmargin=0 leftmargin=0>");
  wnd.document.writeln("<table width=100% !height=100% border=0 cellspacing=0 cellpadding=0>");
  wnd.document.writeln("<tr><td valign=center align=center><img src="+big+" alt=\""+img.alt+"\"></td></tr>");
  wnd.document.writeln("</table></body>");
  wnd.document.writeln("</html>");
  if(navigator.appName=="Microsoft Internet Explorer") while(!wnd.document.images[0].complete) {} ;
  w=wnd.document.images[0].width+8;
  h=wnd.document.images[0].height+32;
  w2=w;
  h2=h;
//  zoomanim(wnd,w1,h1,w2,h2);
  x=(screen.width-w)/2;
  y=(screen.height-h)/2;
  wnd.resizeTo(w,h);
  wnd.moveTo(x,y);  
  title=img.alt;
  if(title=="") title="Taxibrousse asbl";
  wnd.document.title=title;
}

function zoomanim(wnd,w1,h1,w2,h2)
{
  if(w1<w2) w1=w1+(w2/32);
  if(h1<h2) h1=h1+(h2/32);
  wnd.resizeTo(w1,h1);
  x=(screen.width-w1)/2;
  y=(screen.height-h1)/2;
  wnd.moveTo(x,y);
  if(w1<w2 || h1<h2)
  {
    setTimeout("zoomanim(wnd,"+w1+","+h1+","+w2+","+h2+")",1);
  }
    else
  {
    wnd.resizeTo(w2,h2);
    x=(screen.width-w2)/2;
    y=(screen.height-h2)/2;
    wnd.moveTo(x,y);
  }
}

function noerror()
{
  return true;
}
