var popupWindow=null;
function popup_myinfobox(mypage,myname,w,h,pos,infocus)
{





	
	if(document.all)
	{

		screen_width=screen.availWidth;
		screen_height=screen.availHeight;
		
		win_x=0;
		win_y=0;
		win_w=w;
		win_h=screen_height-40;
		
		tempwin=open(mypage,'myinfoboxlogin','resizable=yes,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,Height='+win_h+',Width='+win_w+',left='+win_x+',top='+win_y);
		tempwin.focus();
	}	
	
	if(!document.all && document.getElementById)
	{
		screen_width=screen.availWidth;
		screen_height=screen.availHeight-50;
	
		
		win_x=0;
		win_y=0;
		win_w=w;
		win_h=screen_height-40;
		
		

		tempwin=open(mypage,'myinfoboxlogin','resizable=yes,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,outerHeight='+win_h+',outerWidth='+win_w+',screenX='+win_x+',screenY='+win_y+',left='+win_x+',top='+win_y);
	
		tempwin.focus();	
	}







}//function popup_myinfobox(mypage,myname,w,h,pos,infocus)

function login_user()
{
	
	command='login';
	username=document.forms["login_form"].username.value;
	password=document.forms["login_form"].password.value;
	popup_myinfobox('/home/index.php?command='+command+'&username='+username+'&password='+password,'myinfobox','210','700','center','front');
	
}//function login_user()


function simple_popup_myinfobox(mypage,myname,w,h,pos,infocus,do_scroll,do_resize)
{
if (do_scroll)
	do_scroll_text='yes';
else
	do_scroll_text='no';


if (do_resize)
	do_resize_text='yes';
else
	do_resize_text='no';


if (pos == 'random')
{LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
else
{LeftPosition=(screen.width)?(screen.width-w)/0:0;TopPosition=(screen.height)?(screen.height-h)/0:0;}
settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + do_scroll_text + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=' + do_resize_text + '';popupWindow=window.open('',myname,settings);
if(infocus=='front'){popupWindow.focus();popupWindow.location=mypage;}
if(infocus=='back'){popupWindow.blur();popupWindow.location=mypage;popupWindow.blur();}

}//function simple_popup_myinfobox(mypage,myname,w,h,pos,infocus)