﻿// JScript File

		function convertSecondsToMilliSeconds(seconds) {
			var seconds = seconds;
			var milliseconds = seconds * 1000;
			return milliseconds;
		}
		function hbxMediaPlay(hbxFileName, hbxCurrentPos, hbxEndPos, hbxFlashVersion) {
			var hbxCurrentPos = convertSecondsToMilliSeconds(hbxCurrentPos);
			var hbxEndPos = convertSecondsToMilliSeconds(hbxEndPos);
			_hbSet('m.f',hbxFileName);
			_hbSet('m.cp',hbxCurrentPos);
			_hbSet('m.ep',hbxEndPos);
			_hbSet('m.s','play');
			_hbSet('m.cl','Flash Player');
			_hbSet('m.cv',hbxFlashVersion);
			_hbSet('m.tt','e');
			_hbSend();
        }

		function hbxMediaPause(hbxFileName, hbxCurrentPos, hbxEndPos, hbxFlashVersion) {
			var hbxCurrentPos = convertSecondsToMilliSeconds(hbxCurrentPos);
			var hbxEndPos = convertSecondsToMilliSeconds(hbxEndPos);
			_hbSet('m.f',hbxFileName);
			_hbSet('m.cp',hbxCurrentPos);
			_hbSet('m.ep',hbxEndPos);
			_hbSet('m.s','pause');
			_hbSet('m.cl','Flash Player');
			_hbSet('m.cv',hbxFlashVersion);
			_hbSet('m.tt','e');
			_hbSend();

		}

		function hbxMediaStop(hbxFileName, hbxCurrentPos, hbxEndPos, hbxFlashVersion) {
			var hbxCurrentPos = convertSecondsToMilliSeconds(hbxCurrentPos);
			var hbxEndPos = convertSecondsToMilliSeconds(hbxEndPos);
			_hbSet('m.f',hbxFileName);
			_hbSet('m.cp',hbxCurrentPos);
			_hbSet('m.ep',hbxEndPos);
			_hbSet('m.s','stop');
			_hbSet('m.cl','Flash Player');
			_hbSet('m.cv',hbxFlashVersion);
			_hbSet('m.tt','e');
			_hbSend();

		}

		var displayTestimonialTexta = "Over 40 years of nursing have taken a toll on Rosette's knees. As her arthritis pain increased, she";
		var displayTestimonialTextb = "decided that she was going to take action. Learn how she found a treatment that works for her!";
		
		var displayTestimonialText0a = "Over 40 years of nursing have taken a toll on Rosette's knees. As her arthritis pain increased, she";
		var displayTestimonialText0b = "decided that she was going to take action. Learn how she found a treatment that works for her!";
		
		var displayTestimonialText1a = "Over 40 years of nursing have taken a toll on Rosette's knees. As her arthritis pain increased, she";
		var displayTestimonialText1b = "decided that she was going to take action. Learn how she found a treatment that works for her!";
		
		var displayTestimonialText2a = "Marlene was a dancer, and her active lifestyle led to arthritis in her knees. Hear about her";
		var displayTestimonialText2b = "journey to find the right medication, and how treating her arthritis pain has affected her life.";
		
		var displayTestimonialText3a = "Coping with arthritis was difficult for John. Hear how the pain affected him, and how his life";
		var displayTestimonialText3b = "has been impacted by seeking treatment.";
		
		var displayTestimonialText4a = "Robert has osteoarthritis from many years of wear and tear on his joints. Hear how CELEBREX";
		var displayTestimonialText4b = "has helped him get back to what he loves mostzzzspending time with his young grandson!";
		displayTestimonialText4b = displayTestimonialText4b.replace('zzz','\u2014'); 

		var disclaimerText = "<span id=\"disclaimerText\" style=\"float:right; font-family:Verdana, Helvetica, Arial, sans-serif; font-size:10px; color:#999;\">Real patients featured.  Individual results may vary.*</span>";
		var patientsCompensatedText = "<div style=\"text-align:right; font-family:Verdana, Helvetica, Arial, sans-serif; font-size:10px; color:#999; padding-bottom:10px;\">*Patients were compensated to share their stories</div>";
    var videoArea = "", s = "";
    var myParentNode = ""; myChildNode = "";
	var newA = "", newImg = "", newT = "";
	var txt = "";
        function closeVideo() {
        
            swfobject.removeSWF("flashVideo");
            document.getElementById("videoTeaser").style.display = "block";
            document.getElementById("ft_marlene_large").innerHTML = '<div id="flashVideo"></div>';
			//*s = document.getElementById("ft_marlene_large"); // Get the div
			/*if ( s.hasChildNodes() )
			{
			    while ( s.childNodes.length >= 1 )
			    {
			        s.removeChild( s.firstChild );       
			    } 
			}*/
			/*
			// Define the new element <img>
		    newImg = document.createElement("img");
			
			// Add attribute 'src'	to <img>
			newImg.setAttribute("src", "images/ft_marlene.jpg");

            // Define the new element <a>
			newA = document.createElement("a");
			
			// Add attribute 'id' to <a>
			newA.setAttribute("id", "show_marlene_large");

            // Replace <embed> with <a><img /></a>
            newA.appendChild(newImg);
			s.appendChild(newA);

			testimonialAnchor = document.getElementById("show_marlene_large");
			testimonialAnchor.onmouseover = function() {
			this.style.cursor = "pointer";
			}
			testimonialAnchor.onclick = function() {
				showTestimonial();

			}*/
		}	
        

		function showTestimonial() {
		
		var isiPath = "ISI_large.flv";
		var isiName = "ISI";
		var mediGuide = "http://media.pfizer.com/files/products/mg_celebrex.pdf";
		var fullPrescribeInfo = "http://pfizer.com/files/products/uspi_celebrex.pdf";
			
		        /*var so = new SWFObject("./media/testimonial_large.swf", "player", "531", "263", "8", "");
				so.addVariable("videoPath", "../media/marlene_large.flv");
				so.addParam("menu", "false");
				so.addParam("scale", "noscale");
				so.addParam("wmode", "transparent");
				so.addParam("autoplay", "true");
				so.addParam("allowScriptAccess", "always");
				so.addParam("allowFullScreen", "false");
				so.addParam("movie", "media/testimonial_large.swf");
				so.addParam("quality", "high");
				so.addParam("bgcolor", "#ffffff");
				so.addParam("FlashVars", "videoPath=../media/marlene_large.flv&videoName=marlene-large" + "&isiPath=" + isiPath + "&isiName=" + isiName + "&mediGuide=" + mediGuide + "&fullPrescribeInfo=" + fullPrescribeInfo);
				so.write("ft_marlene_large");*/
				
				 var params = {
                    allowScriptAccess: "always", 
                    allowFullScreen: "false", 
                    wmode: "transparent", 
                    quality: "high", 
                    bgcolor: "#FFFFFF",
                    name: "brain",
                    align: "middle",
                    type: "application/x-shockwave-flash",
                    scale: "noscale",
                    menu : "false",
                    autoplay : "true",
                    quality : "high"
                };
                var attributes = {
                    //wmode: "transparent"
                };

                var flashvars={
                    "videoPath": "../media/marlene_large.flv",
                    "videoName": "marlene-large",
                    "isiPath" : isiPath,
                    "isiName" : isiName,
                    "mediGuide": mediGuide,
                    "fullPrescribeInfo" : fullPrescribeInfo
                };
                swfobject.embedSWF("media/testimonial_large.swf", "flashVideo", "531", "263", "8.0.0", "/flash/expressInstall.swf", flashvars, params, attributes);
                
                document.getElementById("videoTeaser").style.display = "none";

			}
				//videoArea = videoArea + "\n<div id=\"ft_marlene_large\" style=\"padding-left:11px;\">\n\t<a id=\"show_marlene_large\">\n\t\t<img src=\"images/ft_marlene.jpg\" />\n\t</a>\n</div>" + disclaimerText; 
				//document.write(videoArea); 
				//document.getElementById("disclaimerText").style.paddingRight = "40px";
				/*
				var testimonialAnchor = document.getElementById("show_marlene_large");
				testimonialAnchor.onmouseover = function() {
					this.style.cursor = "pointer";
				}
				testimonialAnchor.onclick = function() {
					showTestimonial();
              }*/