function fullscreen(url,name,toolbar)
{
	var width=screen.width-25, height=screen.height-150;
	var left = 0;
	var top = 0;
	var styleStr = 'toolbar='+toolbar+',location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
	var msgWindow = window.open(url,name, styleStr);
}

function popup(url,name,toolbar)
{
	var width=screen.width/2, height=screen.height/2;
	var left = (screen.width/2) - width/2;
	var top = (screen.height/2) - height/2;
	var styleStr = 'toolbar='+toolbar+',location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
	var msgWindow = window.open(url,name, styleStr);
}

function popupx(url, name, toolbar, location, scrollbar, width, height )
{
	//var width=screen.width/2, height=screen.height/2;
	var _left = (screen.width/2) - width/2;
	var _top = (screen.height/2) - height/2;
	var _styleStr = 'toolbar='+toolbar+',location='+location+',directories=no,status=no,menubar=no,scrollbars='+scrollbar+',resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+_left+',top='+_top+',screenX='+_left+',screenY='+_top;
	var msgWindow = window.open(url,name, _styleStr);
	var e = null;
	try{ msgWindow.moveTo( _left, _top ); }
	catch(e){}
	try{ msgWindow.resizeTo( width, height ); }
	catch(e){}
	try{ msgWindow.focus(); }
	catch(e){}
}

function popup_image( url, name, width, height )
{
	//var width=screen.width/2, height=screen.height/2;
	var new_width = width > 0 ? width + 25 : screen.width-25;
	var new_height = height > 0 ? height + 25 : screen.height-25;
	//alert(new_width)
	popupx( url, name, 'no', 'no', 'yes', new_width, new_height );
}

