var maxWidth=550
var maxHeight=550

var winHeight=100
var winWidth=100
var speed=5

var x=5
var win2

function openwindow(thelocation){
	//temploc=thelocation
	if (!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById)){
		window.open(thelocation)
		return
	}
	win2=window.open(thelocation,"","scrollbars=no, width=" + winWidth + ", height=" + winHeight + ", left=0, top=0")
	win2.moveTo(0,0)
	win2.resizeTo(winWidth, winHeight)
	win2.focus()
	go2()
}

function go2(){
	if(winHeight<maxHeight){
		winHeight+=speed;
	}
	if(winWidth<maxWidth){
		winWidth+=speed;
	}
	if(winHeight>maxHeight) winHeight = maxHeight;
	if(winWidth>maxWidth) winWidth = maxWidth;
	
	win2.resizeTo(winWidth, winHeight)

	speed+=2
	if(winHeight<maxHeight && winWidth<maxWidth) {
		setTimeout("go2()",5)
	}
	else
	{
		winHeight=100
		winWidth=100
		speed=5
	}
	

/*
	if (winHeight>=maxHeight)
	x=0
	win2.resizeBy(speed,x)
	winheight+=speed
	winsize+=speed
	if (winsize>=maxWidth-5){
		win2.location=temploc
		winheight=100
		winsize=100
		x=speed
		return
	}
	*/
}


