// <![CDATA[

function loadHome(){
//var so = new SWFObject("pg_Home_FlashShell.swf", "pg_Home_FlashShell", "960", "585", "8", "#FFFFFF");
var so = new SWFObject("_bin/c.swf?path=_bin/pg_Home_FlashShell.swf", "c", "960", "100%", "8", "#000000");
so.useExpressInstall("expressinstall.swf");
so.addParam('allowScriptAccess', 'always');
so.addParam("allowFullScreen", "true");
so.addParam("menu", "false");
//so.addVariable();
so.write("homeflash");
}

var ch;

function growHomeSwf(){
	var done = false;
	$('#header *').not('.bottom').animate({opacity:0}, 200, function(){
		if (!done) {
			$('#header').animate({height:7},500);
			$('#homeflash').animate({height:585},500);
			done = true;
		}
	});
	$('#content').animate({opacity:0}, 200, function(){
		$('#content').slideUp(500);
	});
}

function shrinkHomeSwf(){
	$('#header *').not('.bottom').css('opacity',1);
	$('#content').slideDown(500, function(){
		$('#content').animate({opacity:1}, 200);
	});
	$('#homeflash').animate({height:387},500);	
	$('#header').animate({height:109},500);
}

function loadLetterVideo(){
	var so = new SWFObject("../_bin/pg_video_player_LetterToShareholders.swf", "c", "576", "500", "8", "#FFFFFF");
	so.useExpressInstall("expressinstall.swf");
	so.addParam('allowScriptAccess', 'always');
	so.addParam("allowFullScreen", "true");
	so.addParam("menu", "false");
	//so.addVariable("cdcMediaPath", "http://media.annualreport.pg.com/video/");
	//so.addVariable();
	$('#ltrflash').fadeIn(500, function(){
		so.write("ltrflash");
	});
}

function closeAGvideo(){
	$('#ltrflash').html('').hide();
}

// ]]>