var win = null;

var win_height = screen.availHeight;
var win_width = screen.availWidth;

  LeftPosition = (screen.width) ? (screen.width-500)/2 : 0;
TopPosition = (screen.height) ? (screen.height-600)/2 : 0;




		//alert("AVAILHEIGHT: " + screen.availHeight + " AVAILWIDTH: " + screen.availWidth);
		//alert("HEIGTH: " + screen.height + " WIDTH: " + screen.width);
	

function changepage()  {

	if ((win != null) && !(win.closed)) { win.close(); }

}





function fenetre(mypage,myname,w,h,scroll,no)
{
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+no+'';
if ((win != null) && !(win.closed)) { win.close(); }
win = window.open(mypage,myname,settings);

if (win.window.focus) {win.window.focus();}


}

function checkstatus()  {

	if (flag && (state !=	 "")) alert(location.href);




}
