// JavaScript Document

			var op = {}; //not used. add properties to the params and attributes objects just like flashvars above.
			op.wmode = "opaque";
			var oa = {};
			var ofv = {};
		//this is the embed for the initial overlay
		swfobject.embedSWF("/flash/content/compare/poise_compare_overlay.swf", "flashIntoAnimation", "572", "631", "10", "/flash/common/expressInstall.swf", ofv, op, oa);


   var nuPrdCompound=""
	var BBC1 = "Liners"
	var BBC2 = "PoP"
	var BBC2_sho = "TP"	
	
	//fades out into flash, fades in compare flash & table
	function revealCompare(myArg) {	
			//used by embedswf call inside of revealCompare fn.
			var flashvars = {};
			flashvars.path = "/flash/content/compare/"; //bw updated this value
			flashvars.swfs = "Liners_vs_PoP,Liners_vs_Panties,Liners_vs_TP,PoP_vs_Liners,Panties_vs_Liners,TP_vs_Liners,Ultrathins_vs_PoP,Ultrathins_vs_Panties,Ultrathins_vs_TP,PoP_vs_Ultrathins,Panties_vs_Ultrathins,TP_vs_Ultrathins";
			flashvars.defaultOption = "Liners_vs_PoP,PoP_vs_Liners";
			
			var params = {}; //not used. add properties to the params and attributes objects just like flashvars above.
			params.wmode = "transparent";
			var attributes = {};
			attributes.id = "compare";
			attributes.name = "compare";
			
			swfobject.embedSWF("/flash/content/compare/poise_product_comparison.swf", "productComparison", "574", "244", "10", "/flash/common/expressInstall.swf", flashvars, params, attributes);
			
			$("#flashIntoOverlay").fadeOut(100);	
			$("#flashIntoAnimation").fadeOut(100);	
			$("#revealContent").fadeIn(100);
			$("flashIntoAnimation").height(1);
		}
	
	//toggles value of Other button between TP and Panties
	function toggleOtherPrdBtn(myBtn) { 
		if (myBtn=="y") { 
			if (BBC2_sho!="Panties") { 
				BBC2_sho="Panties"
				$("#Other").removeClass("TPBtn");
				$("#Other").addClass("PtBtn");				
			} else {
				BBC2_sho="TP";
				$("#Other").removeClass("PtBtn");
				$("#Other").addClass("TPBtn");
			};	
			
		} 
		othrPrdToggle(BBC2_sho);
	};
	
	//PvPOP flash control functions: selecting other product / solution
	function othrPrdToggle(nuPrd) { 
			if (nuPrd!="PoP") {
					$("#PoP").removeClass("selected"); 
					$("#Other").addClass("selected"); 
					$("div.wing.other").removeClass("selctdP0A"); 
					$("div.wing.other").addClass("selctdP0B"); 
					$("#Other").addClass(BBC2_sho+"Btn"); ;
			}
		
		BBC2 = nuPrd;
		nuPrdCompound=BBC1+"-"+BBC2; 
		switch (nuPrdCompound) {			
			case "Liners-TP": 
				$("#othrPrdSize").html("Small in theory. Not in reality.");	
				$("#othrPrdThin").html(" Thicker than you'd think.");
				$("#cmprChrtSum img").attr({ src: "../img/prd/hdrSub_cmprChart_ITs-A-PRETTY-SILLY-.gif", alt: "alt Its a pretty silly comparison when you think about it, yet every day thousands of women are still slipping toilet paper into their underwear." });
				break;		
				
			case "Ultrathins-TP":
				$("#othrPrdSize").html("A pretty big wad.");	
				$("#othrPrdThin").html("Not so much.");
				$("#cmprChrtSum img").attr({ src: "../img/prd/hdrSub_cmprChart_ITs-A-PRETTY-SILLY-.gif", alt: "alt Its a pretty silly comparison when you think about it, yet every day thousands of women are still slipping toilet paper into their underwear." });
				break;	
				
			case "Liners-Panties":
				$("#othrPrdSize").html("An uncomfortable amount");	
				$("#othrPrdThin").html("Once you start layering them?");
				$("#cmprChrtSum img").attr({src:"../img/prd/hdrSub_cmprChart_SERIOUSLY-GIVE-POISE-A-TRY-.gif", alt:"alt Seriously. Give Poise&reg; a try. Youll thank us later. Unless, that is, you like doing this much laundry."});
				break;		
				
			case "Ultrathins-Panties": 
				$("#othrPrdSize").html("Can you even carry all this?");		
				$("#othrPrdThin").html("Nope.");
				$("#cmprChrtSum img").attr({src:"../img/prd/hdrSub_cmprChart_SERIOUSLY-GIVE-POISE-A-TRY-.gif", alt:"alt Seriously. Give Poise&reg; a try. Youll thank us later. Unless, that is, you like doing this much laundry."});
				break;	
						
			case "Liners-PoP":
				$("#PoP").addClass("selected");
				$("#Other").removeClass("selected");
				$("#othrPrdSize").html("<img src='../img/prd/icon_cmprChart_popLiner_size.gif' width='133' height='45' alt='7.6 inch x 3 inch pad' />");	
				$("#othrPrdThin").html("<img src='../img/prd/icon_cmprChart_popLiner_thin.gif' width='133' height='32' alt='3.8mm thick' />");
				$("#cmprChrtSum img").attr({ src:"../img/prd/hdrSub_cmprChart_WHEN-IT-COMES-TO-LEAKS-.gif", alt: "alt When it comes to bladder leaks, Poise&reg; just plain works better than Period-only pads. Give them a try and you'll agree." });
				$("div.wing.other").removeClass("selctdP0B");
				$("div.wing.other").addClass("selctdP0A");
				break;
			
			case "Ultrathins-PoP":
				$("#PoP").addClass("selected");
				$("#Other").removeClass("selected");
				$("#othrPrdSize").html("<img src='../img/prd/icon_cmprChart_popPad_size.gif' width='133' height='45' alt='9.3 inch x 3 inch pad' />");	
				$("#othrPrdThin").html("<img src='../img/prd/icon_cmprChart_popPad_thin.gif' width='133' height='32' alt='2.4mm thick' />");					
				$("#cmprChrtSum img").attr({ src:"../img/prd/hdrSub_cmprChart_WHEN-IT-COMES-TO-LEAKS-.gif", alt: "alt When it comes to bladder leaks, Poise&reg; just plain works better than Period-only pads. Give them a try and you'll agree." });
				$("div.wing.other").removeClass("selctdP0B");
				$("div.wing.other").addClass("selctdP0A");
				break;
			
			default: 
				break;
		}
		showOption(BBC1+"_vs_"+BBC2, BBC2+"_vs_"+BBC1);
	}
		
	$(document).ready(function(){
		
		//Hide Thinness
		$("#ourPrdThin").parent().hide();
		
		//PvPOP flash control functions: selecting our product
		$("div.cmprPrd.our").click(		   
			function(){	
				if (this.id!=BBC1) { //
					$("div.cmprPrd.our").toggleClass("selected");
					$("div.wing.our").toggleClass("selctdP02");
					$("div.wing.other").removeClass("selctdP0B");
					$("div.wing.other").addClass("selctdP0A");
					BBC1=this.id;
				};
				BBC2= "PoP";
				$("#PoP").addClass("selected");
				$("#Other").removeClass("selected");
				if (BBC1 == "Liners") {
					$("#ourPrdSize").html("<img src='../img/prd/icon_cmprChart_liner_size.gif' width='133' height='45' alt='7.5 inch x 3 inch pad' />");	
					$("#ourPrdThin").html("<img src='../img/prd/icon_cmprChart_liner_thin.gif' width='133' height='32' alt='1/3 inch thick' />");
					$("#othrPrdSize").html("<img src='../img/prd/icon_cmprChart_popLiner_size.gif' width='133' height='45' alt='7.6 inch x 3 inch pad' />");	
					$("#othrPrdThin").html("<img src='../img/prd/icon_cmprChart_popLiner_thin.gif' width='133' height='32' alt='3.8mm thick' />");
				} else {
					$("#ourPrdSize").html("<img src='../img/prd/icon_cmprChart_pad_size.gif' width='133' height='45' alt='9.4 inch x 3 inch pad' />");	
					$("#ourPrdThin").html("<img src='../img/prd/icon_cmprChart_pad_thin.gif' width='133' height='32' alt='5.7mm thick' />");
					$("#othrPrdSize").html("<img src='../img/prd/icon_cmprChart_popPad_size.gif' width='133' height='45' alt='9.3 inch x 3 inch pad' />");	
					$("#othrPrdThin").html("<img src='../img/prd/icon_cmprChart_popPad_thin.gif' width='133' height='32' alt='2.4mm thick' />");					
				}
				$("#cmprChrtSum img").attr({ src:"../img/prd/hdrSub_cmprChart_WHEN-IT-COMES-TO-LEAKS-.gif", alt: "alt When it comes to bladder leaks, Poise&reg; just plain works better than Period-only pads. Give them a try and you'll agree." });
				showOption(this.id+"_vs_"+BBC2, BBC2+"_vs_"+this.id); //
			}	
		);
			  
	});

		function showOption(leftside,rightside) {
			getSwfByName("compare").updateOptions(leftside,rightside);
		}
		
     	function getSwfByName(movieName) {
         	if (navigator.appName.indexOf("Microsoft") != -1) {
             	return window[movieName];
         	} else {
             	return document[movieName];
         	}
     	}