function newwindow(url,toolbar,location,menubar,size,placement) 
{ 
	var anewwindow;
	var sToolbar='no';
	var sMenubar='no';
	var sLocation='no';
	var sPlacement;
	var sWindowSize;

	if(toolbar==true)
	{
		sToolbar='yes';
	}
	if (menubar==true)
	{
		sMenubar='yes';
	}
	if (location==true)
	{
		sLocation='yes';
	}
	//Window placement
	switch (placement)
	{
	case 'Top Left':
		sPlacement='top=0,left=0';
		break;
	case 'Top Right':
		sPlacement='top=0,left=700';
		break;
	case 'Center':
		sPlacement='top=250,left=250';
		break;
	case 'Bottom Left':
		sPlacement='top=600,left=0';
		break;
	case 'Bottom Right':
		sPlacement='top=600,left=700';
		break;
	}	
	
	//Window Size
	switch (size)
	{
	case 'Small':
		sWindowSize='width=300,height=200';
		break;
	case 'Medium':
		sWindowSize='width=500,height=400';
		break;
	case 'Large':
		sWindowSize='width=800,height=600';
		break;
	}
	
	//Build string with window options
	var WindowOptions='toolbar=' + sToolbar + 
					  ', menubar=' + sMenubar +
					  ',' + sWindowSize +
					  ',' + sPlacement +
					  ', location='+ sLocation
					  +',scrollbars=yes'
					  +',resizable';
	//alert (WindowOptions);	//Uncomment this line to display toolbar options

	anewwindow=window.open(url,'',WindowOptions); 
	//If the browser supports focus, then set the focus on the popped window
	if (window.focus) 
		{
			anewwindow.focus();
		}
} 
function newexternalsitewindow(url,toolbar,location,menubar,size,placement) 
{ 
	var anewwindow;
	var sToolbar='no';
	var sMenubar='no';
	var sLocation='no';
	var sPlacement;
	var sWindowSize;
	
	if(toolbar=='true')
	{
		sToolbar='yes';
	}
	if (menubar=='true')
	{
		sMenubar='yes';
	}
	if (location=='true')
	{
		sLocation='yes';
	}
	//Window placement
	switch (placement)
	{
	case 'Top Left':
		sPlacement='top=0,left=0';
		break;
	case 'Top Right':
		sPlacement='top=0,left=700';
		break;
	case 'Center':
		sPlacement='top=250,left=250';
		break;
	case 'Bottom Left':
		sPlacement='top=600,left=0';
		break;
	case 'Bottom Right':
		sPlacement='top=600,left=700';
		break;
	}	
	
	//Window Size
	switch (size)
	{
	case 'Small':
		sWindowSize='width=300,height=200';
		break;
	case 'Medium':
		sWindowSize='width=500,height=400';
		break;
	case 'Large':
		sWindowSize='width=800,height=600';
		break;
	}
	//Build string with window options
	var WindowOptions='toolbar=' + sToolbar + 
					  ', menubar=' + sMenubar +
					  ',' + sWindowSize +
					  ',' + sPlacement +
					  ', location='+ sLocation
					  +',scrollbars=yes'
					  +',resizable';
	//alert (WindowOptions);	//Uncomment this line to display toolbar options

	anewwindow=window.open(url,'',WindowOptions); 
	//If the browser supports focus, then set the focus on the popped window
	if (window.focus) 
		{
			anewwindow.focus();
		}
} 