//Animated Window- By Rizwan Chand (rizwanchand@hotmail.com)
//Modified by DD for NS compatibility 
//Modified by CORDOU Olivier for center placement
//Visit http://www.dynamicdrive.com for this script

function expandingWindow(website,leftdist,topdist,rightdist,bottomdist,winwidth,winheight) {
var windowprops='width='+leftdist+',height='+rightdist+',scrollbars=yes,status=yes,resizable=yes'
var heightspeed = 2; // vertical scrolling speed (higher = slower)
var widthspeed = 7;  // horizontal scrolling speed (higher = slower)
var placewidth= (window.screen.availWidth-winwidth)/2;
var placeheight= (window.screen.availHeight-winheight)/2;
if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
//var winwidth = window.screen.availWidth - leftdist - rightdist;
//var winheight = window.screen.availHeight - topdist - bottomdist;
var sizer = window.open("","","left=" + placewidth + ",top=" + placeheight +",right=" + rightdist +",bottom=" + bottomdist +","+windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;
}
else
window.open(website,'mywindow');
}