function sg_launch(use_ssl, page_start, limited_movie, show_dock, product_id, category, url_root, url_root_ssl, session_id)
{
	window.moveTo(0,0);
	if (document.all) 
	{
		top.window.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById) 
	{
		if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
		{
			top.window.resizeTo(screen.availWidth,screen.availHeight); // For Safari.
			top.window.outerHeight = screen.availHeight;
			top.window.outerWidth = screen.availWidth;
		}
	}
	
	var show_dock_string = 'no';
	if (show_dock)
		show_dock_string = 'yes';
		
	var limited_movie_string = 'no';
	if (limited_movie)
		limited_movie_string = 'yes';
	
	var url_flash = null;
	if (use_ssl)
		var url_flash = url_root_ssl+'main.swf?page_start='+page_start+'&limited_movie='+limited_movie_string+'&show_dock='+show_dock_string+'&product_id='+product_id+'&category='+category+'&url_root='+url_root+'&url_root_ssl='+url_root_ssl+'&session_id='+session_id;
	else
		var url_flash = url_root+'main.swf?page_start='+page_start+'&limited_movie='+limited_movie_string+'&show_dock='+show_dock_string+'&product_id='+product_id+'&category='+category+'&url_root='+url_root+'&url_root_ssl='+url_root_ssl+'&session_id='+session_id;
	
	var movie = new SWFObject(url_flash, 'movie_sg', '100%', '100%', '9', '#FFFFFF', true, 'high', '', url_root+'getflash.html', 'flashcontent');
	movie.addParam('scale', 'noscale');
	movie.write('area_movie')
	
	return false;
}


function sg_usessl()
{
	if (sg_ssl_required)
	{
	 	location.replace(sg_url_root_ssl+'login.html');
	}
}
