// Temp fix to pass old Google Analytics tracker function to new tracker function.
function urchinTracker(arg) { pageTracker._trackPageview(arg); }

function linkpop(winurl, width, height, screen_location, resizable, location_bar, status_bar, scrollbars)
{
	var screenwidth  = screen.width;
	var screenheight = screen.height;
	var winwidth = width;
	var winheight = height;
	var wintop = 0;
	var winleft = 0;
	var winsettings = "";
	
	if (screen_location == 10 || winwidth == '')
	{
		winwidth = screenwidth - 8;
	}
	if (screen_location == 10 || winheight == '')
	{
		winheight = screenheight - 8;
	}
	
	// top left or full screen
	if (screen_location == 1 || screen_location == 10)
	{
		wintop = 0;
		winleft = 0;
	}
	// top center
	if (screen_location == 2)
	{
		wintop = 0;
		winleft = parseInt((screenwidth/2) - (winwidth/2));
	}
	// top right
	if (screen_location == 3)
	{
		wintop = 0;
		winleft = screenwidth - winwidth - 8;
	}
	// middle left
	if (screen_location == 4)
	{
		wintop = parseInt((screenheight/2) - (winheight/2));
		winleft = 0;
	}
	// middle center
	if (screen_location == 5)
	{
		wintop = parseInt((screenheight/2) - (winheight/2));
		winleft = parseInt((screenwidth/2) - (winwidth/2));
	}
	// middle right
	if (screen_location == 6)
	{
		wintop = parseInt((screenheight/2) - (winheight/2));
		winleft = screenwidth - winwidth - 8;
	}
	// bottom left
	if (screen_location == 7)
	{
		wintop = screenheight - winheight - 8;
		winleft = 0;
	}
	// bottom center
	if (screen_location == 8)
	{
		wintop = screenheight - winheight - 8;
		winleft = parseInt((screenwidth/2) - (winwidth/2));
	}
	// bottom right
	if (screen_location == 9)
	{
		wintop = screenheight - winheight - 8;
		winleft = screenwidth - winwidth - 8;
	}
	
	winsettings = 'top='+wintop+',left='+winleft+',height='+winheight+',width='+winwidth+',scrollbars='+scrollbars+',resizable='+resizable+',location='+location_bar+',status='+status_bar+',toolbar='+location_bar;
	
	window.open(winurl, '', winsettings);
}
