var popwindow2

var tisurl2

var tiswidth2

var tisheight2

var tistopposition2

var tisleftposition2

var pause2=20

var step2=10

var marginright2

var endposition2

var timer2



function openpopup2(thisurl2,thiswidth2,thisheight2,thistopposition2) {

	tisurl2=thisurl2

	tiswidth2=thiswidth2

	tisheight2=thisheight2

	tistopposition2=thistopposition2

	tisleftposition2=-tiswidth2

	



	popwindow2=window.open(tisurl2, "newwindow2", "toolbar=no,width="+tiswidth2+",height="+tisheight2+",top="+tistopposition2+",left="+(tisleftposition2)+",scrollbars=yes,resizable=yes");



	if (document.all) {

		marginright2=screen.width 

	        endposition2=(marginright2-thiswidth2-10)/2

		movewindow2()

	}

	if (document.layers) {

    	marginright2=window.innerWidth-10

		endposition2=marginright2-thiswidth2

		movewindow2()

	}

}



function movewindow2() {

	if (tisleftposition2<=endposition2) {

		popwindow2.moveTo(tisleftposition2,tistopposition2)

		tisleftposition2+=step2

		timer2= setTimeout("movewindow2()",pause2)

	}

	else {

		clearTimeout(timer2)

	}

}
