function ___getPageSize() { var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer if(document.documentElement.clientWidth){ windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; } windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ pageWidth = xScroll; } else { pageWidth = windowWidth; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight); return arrayPageSize; }; var temp; var printOverridden = false; function doPrint() { if(printOverridden) return; bdhtml=window.document.body.innerHTML; sprnstr=""; eprnstr=""; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); var top="
"; prnhtml=top+prnhtml+"
"; var newWin=window.open('prints.jsp', 'newwindow', 'width=660, height=1000, top=0, left=300, toolbar=no, menubar=no, scrollbars=yes, resizable=yes'); newWin.document.open(); newWin.document.write(prnhtml); //newWin.document.close(); temp = newWin; setTimeout("printTrigger()",1000); } function printTrigger(){ try{ temp.document.close(); temp.print(); }catch(ex){} } function playVideo(videoId,bgImage){ //alert("disable scroll here"); //$(document.html).css({'height': '100%', 'overflow': 'hidden'}); //$(document.body).css({'height': '100%', 'overflow': 'hidden'}); var playerXml = "faces-of-copd.xml"; if(bgImage=="KnowShow") { $("#popFlashTitle").css("background","url(resources/images/the-know-show-flash.gif)"); playerXml = "theknowshow.xml"; } else if (bgImage=="TalesofDiscovery") { $("#popFlashTitle").css("background","url(resources/images/the-know-show-flash.gif)"); playerXml = "talesofdiscovery.xml"; } else { $("#popFlashTitle").css("background","url(resources/images/face-of-copd-flash.gif)"); playerXml = "faces-of-copd.xml"; } window.scroll(0,0); $("#popFlashVoicesDialog").dialog('option','position','center'); $("#popFlashVoicesDialog").dialog('open'); var flashvars = {'videoID' : videoId,'xmlPath' : 'xml/' + playerXml,'basePath' : '/resources/flash/videoplayer/'} var params = {'allowFullScreen':'true','scale':'noscale','allowScriptAccess':'always','wmode':'transparent'}; var attributes = {'id':'sotester'} swfobject.embedSWF('/resources/flash/videoplayer/SpirivaVideoPlayer.swf', "popFlashVoices", '935','540', "9.0.0", "expressInstall.swf", flashvars, params, attributes); //dcsMultiTrack('DCS.dcsuri' , '/link/open_up_tour/Cause_of_Death_Video.html', 'WT.ti', 'Cause of Death Video Link'); //dcsMultiTrack('DCS.dcsuri' , '/link/copd_symptoms/treatment_options.html', 'WT.cg_n', 'Open Up Video'); } function flashPlay(flashName,flashwidth,flashheight,flashvars, params, attributes){ window.location.href="#"; $("#modalBackground").css("display","block"); $("#popFlash").css("display","block"); popWindowWidth(flashwidth,"popFlash"); swfobject.embedSWF(flashName, "lungModule", flashwidth, flashheight, "9.0.0", "expressInstall.swf", flashvars, params, attributes); } function closeFlashPlay(){ try{ if($("#popFlashVoicesDialog").dialog( 'isOpen' )){ if(swfobject.hasFlashPlayerVersion("9.0.0")){ $("#popFlashVoicesDialog").html('
'); } $("#popFlashVoicesDialog").dialog('close'); //alert("enable scroll"); // $(document.body).css({'height': '100%', 'width': '100%', 'overflow': 'visible'}); } }catch(ex){} try{ if($("#popFlashLungModuleDialog") && $("#popFlashLungModuleDialog").dialog( 'isOpen' )) $("#popFlashLungModuleDialog").dialog('close'); }catch(ex){} } function closeDialog(){ closeDialogById("popShare"); closeDialogById("popUpdate"); } function closeDialogById(dialogId){ if($("#" + dialogId).dialog( 'isOpen' )){ $("#" + dialogId).dialog('close'); } } function closePoplayout(){ /*if(parent.document.getElementById("popFlash").style.display!="block") parent.document.getElementById("modalBackground").style.display="none"; parent.document.getElementById("popShare").style.display="none";*/ parent.closeDialog(); } function popWindowWidth(popw,id){ var widthPop=(document.body.scrollWidth/2)-popw/2; var topPop=(document.body.scrollTop)+50; var background=$("#main").height(); var arrPageSizes = ___getPageSize(); if(arrPageSizes[0]<1003){ arrPageSizes[0]=1003; } $('#modalBackground').css({ width: arrPageSizes[0], height: arrPageSizes[1] }); document.getElementById(id).style.left=widthPop+"px"; document.getElementById(id).style.top="50px"; } function popWindow(popWindowName,popWidth,popHeight,bgPopImage){ window.scroll(0,0); if(popWindowName=='share-to-friend.jsp'){ $("#popShare").html(""); $("#popShare").dialog('open'); }else if(popWindowName=='set-update-pop.jsp'){ $("#popUpdate").html(""); $("#popUpdate").dialog('open'); } } function dataValidate(){ var friendFirstName=$("#friendFirstName").attr('value'); var lastName=$("#lastName").attr('value'); var email=$("#email").attr('value'); var firstName=$("#firstName").attr('value'); var friendLastName=$("#friendLastName").attr('value'); var friendEmail=$("#friendEmail").attr('value'); var tagName=0; var tagName2=0; var tagAddress=0; var tagAddress2=0; if($.trim(firstName)==null || $.trim(firstName)==""){ $("#firstName").parents("td").prev().css("color","#cc0000"); $("#firstName").focus(); tagName=tagName+1; }else{ $("#firstName").parents("td").prev().css("color","#89B1C4"); tagName2=0; } if($.trim(lastName)==null || $.trim(lastName)==""){ $("#lastName").parents("td").prev().css("color","#cc0000"); $("#lastName").focus(); tagName=tagName+1; }else{ $("#lastName").parents("td").prev().css("color","#89B1C4"); tagName2=0; } if($.trim(friendFirstName)==null || $.trim(friendFirstName)==""){ $("#friendFirstName").parents("td").prev().css("color","#cc0000"); $("#friendFirstName").focus(); tagName=tagName+1; }else{ $("#friendFirstName").parents("td").prev().css("color","#89B1C4"); tagName2=0; } if($.trim(friendLastName)==null || $.trim(friendLastName)==""){ $("#friendLastName").parents("td").prev().css("color","#cc0000"); $("#friendLastName").focus(); tagName=tagName+1; }else{ $("#friendLastName").parents("td").prev().css("color","#89B1C4"); tagName2=0; } if(!/^[a-zA-Z0-9_\-.]{1,}@[a-zA-Z0-9_\-]{1,}\.[a-zA-Z0-9_\-.]{1,}$/.test(email)){ $("#email").parents("td").prev().css("color","#cc0000"); $("#email").focus(); tagAddress=tagAddress+1; }else{ $("#email").parents("td").prev().css("color","#89B1C4"); tagAddress2=0; } if(!/^[a-zA-Z0-9_\-.]{1,}@[a-zA-Z0-9_\-]{1,}\.[a-zA-Z0-9_\-.]{1,}$/.test(friendEmail)){ $("#friendEmail").parents("td").prev().css("color","#cc0000"); $("#friendEmail").focus(); tagAddress=tagAddress+1; }else{ $("#friendEmail").parents("td").prev().css("color","#89B1C4"); tagAddress2=0; } if(tagName!=0&tagAddress!=0){ $("#message").html("All fields are required.
Please make sure the email address is in the format of name@domain.com."); return false; } if(tagName!=0&tagAddress==0){ $("#message").html("All fields are required."); return false; } if(tagName==0&tagAddress!=0){ $("#message").html("Please make sure the email address is in the format of name@domain.com."); return false; } $("#shareForm").css("display","none"); $("#shareThanks").css("display","block"); $.post('/share-to-friend-success.jsp', $('#shareFriendForm').serialize() + "&link=" + parent.location); return false; } function dataUpdateValidate(){ var firstName=$("#firstName").attr('value'); var lastName=$("#lastName").attr('value'); var email=$("#email").attr('value'); var tagName=0; var tagAddress=0; if($.trim(firstName)==null || $.trim(firstName)==""){ $("#firstName").parents("td").prev().css("color","#cc0000"); $("#firstName").focus(); tagName=1; }else{ $("#firstName").parents("td").prev().css("color","#89B1C4"); } if($.trim(lastName)==null || $.trim(lastName)==""){ $("#lastName").parents("td").prev().css("color","#cc0000"); $("#lastName").focus(); tagName=1; }else{ $("#lastName").parents("td").prev().css("color","#89B1C4"); } if(!/^[a-zA-Z0-9_\-.]{1,}@[a-zA-Z0-9_\-]{1,}\.[a-zA-Z0-9_\-.]{1,}$/.test(email)){ $("#email").parents("td").prev().css("color","#cc0000"); $("#email").focus(); tagAddress=1; }else{ $("#email").parents("td").prev().css("color","#89B1C4"); } if(tagName==1&tagAddress==1){ $("#message").html("All fields are required.
Please make sure the email address is in the format of name@domain.com."); return false; } if(tagName==1&tagAddress==0){ $("#message").html("All fields are required."); return false; } if(tagName==0&tagAddress==1){ $("#message").html("Please make sure the email address is in the format of name@domain.com."); return false; } $.post('/submitUserInfo.do', $('#siteUpdateForm').serialize()); $('#shareBody').hide(); $('#shareBodySuccess').show(); //parent.popWindow("set-update-success.jsp","358","495","bg-update"); } function leaveWeb(pageName){ window.open("interstitial.jsp?pageName="+pageName,"closeWin","width=664, height=330, top=0, left=300, toolbar=no, menubar=no, scrollbars=yes, resizable=yes"); } this.href="javascript:void(0);"; function leaveWebU4(){ window.open("interstitial-u4.jsp","closeWin","width=664, height=330, top=0, left=300, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes"); } function fireTag(param1, param2, param3, param4, url, target){ dcsMultiTrack(param1, param2, param3, param4); // Go to URL if (target == '_self') document.location.href = url; else window.open(url,'newwindow'); } function fireVideoTag(type, param1, param2, param3, param4, param5){ if (type == "regular") { dcsMultiTrack('DCS.dcsuri' , param1); //alert(type + ' DCS.dcsuri' + ' ' + param1); } else { dcsMultiTrack('DCS.dcsuri' , param1, 'WT.ti', param2, 'WT.clip_t', param3, 'WT_clip_ev', param4, 'WT_clip_n', param5); //alert(type + ' DCS.dcsuri' + ' ' + param1 + ' ' + 'WT.ti' + ' ' + param2 + ' ' + 'WT.clip_t' + ' ' + param3 + ' ' + 'WT_clip_ev' + ' ' + param4 + ' ' + 'WT_clip_n' + ' ' + param5); } } $(document).ready(function(){ $("#continued .continuedModule").hover(function(){ $(this).css("background","url(/resources/images/bg-reading.jpg) no-repeat"); }, function(){ $(this).css("background-image","none"); }); $("#leftNavWrapper #nav1 a").mouseover(function(){$(this).css("cursor","pointer");}); $("#leftNavWrapper #nav2 a").mouseover(function(){$(this).css("cursor","pointer");}); $("#leftNavWrapper #nav3 a").mouseover(function(){$(this).css("cursor","pointer");}); try{ $("#popFlash").scrollCenter({z:1101}); $("#close").click(function(){ $('#scroll').cycle(0); $("#modalBackground").hide(); $("#popFlash").hide(); }); $('#scroll').cycle({ speed: 500, timeout: 1500, autostop:1, autostopCount: 1, fx: "fade" }); $('#vlt2 .popRight').cycle({ speed: 500, timeout: 1500, autostop:1, autostopCount: 1, fx: "fade" }); $('#vlt3 .popRight').cycle({ speed: 500, timeout: 1500, autostop:1, autostopCount: 1, fx: "fade" }); $('#vlt4 .popRight').cycle({ speed: 500, timeout: 1500, autostop:1, autostopCount: 1, fx: "fade" }); $("#topNav11").click(function(){ $('#vlt2 .popRight').cycle(0); clearClass("vlt2"); $(this).attr("class","topNav1Sel"); }); $("#topNav12").click(function(){ $('#vlt2 .popRight').cycle(1); clearClass("vlt2"); $(this).attr("class","topNav2Sel"); }); $("#topNav13").click(function(){ $('#vlt2 .popRight').cycle(2); clearClass("vlt2"); $(this).attr("class","topNav3Sel"); }); $("#topNav14").click(function(){ $('#vlt2 .popRight').cycle(3); clearClass("vlt2"); $(this).attr("class","topNav4Sel"); }); $("#topNav21").click(function(){ $('#vlt3 .popRight').cycle(0); clearClass("vlt3"); $(this).attr("class","topNav1Sel"); }); $("#topNav22").click(function(){ $('#vlt3 .popRight').cycle(1); clearClass("vlt3"); $(this).attr("class","topNav2Sel"); }); $("#topNav23").click(function(){ $('#vlt3 .popRight').cycle(2); clearClass("vlt3"); $(this).attr("class","topNav3Sel"); }); $("#topNav24").click(function(){ $('#vlt3 .popRight').cycle(3); clearClass("vlt3"); $(this).attr("class","topNav4Sel"); }); $("#topNav31").click(function(){ $('#vlt4 .popRight').cycle(0); clearClass("vlt4"); $(this).attr("class","topNav1Sel"); }); $("#topNav32").click(function(){ $('#vlt4 .popRight').cycle(1); clearClass("vlt4"); $(this).attr("class","topNav2Sel"); }); $("#topNav33").click(function(){ $('#vlt4 .popRight').cycle(2); clearClass("vlt4"); $(this).attr("class","topNav3Sel"); }); $("#topNav34").click(function(){ $('#vlt4 .popRight').cycle(3); clearClass("vlt4"); $(this).attr("class","topNav4Sel"); }); $("#startTour").click(function(){ $('#scroll').cycle(1); $('#vlt2 .popRight').cycle(0); clearClass("vlt2"); $("#topNav11").attr("class","topNav1Sel"); }); $("#airway").click(function(){ $('#scroll').cycle(1); $('#vlt2 .popRight').cycle(0); clearClass("vlt2"); $("#topNav11").attr("class","topNav1Sel"); }); $("#overview").click(function(){ $('#scroll').cycle(0); }); $("#startOver").click(function(){ $('#scroll').cycle(0); }); $("#interior").click(function(){ $('#scroll').cycle(2); $('#vlt3 .popRight').cycle(0); clearClass("vlt3"); $("#topNav21").attr("class","topNav1Sel"); }); $("#interiorBack").click(function(){ $('#scroll').cycle(2); $('#vlt3 .popRight').cycle(0); clearClass("vlt3"); $("#topNav21").attr("class","topNav1Sel"); }); $("#exterior").click(function(){ $('#scroll').cycle(3); $('#vlt4 .popRight').cycle(0); clearClass("vlt4"); $("#topNav31").attr("class","topNav1Sel"); }); }catch(ex){} }); function clearClass(id){ $("#"+id+" div.popLeft ul.topNav li").each(function(i, n){ if($(n).attr("class").indexOf("Sel")!=-1){ $(n).attr("class",$(n).attr("class").substring(0, $(n).attr("class").lastIndexOf("Sel"))); } }); } var goto = function(url){ location.href=url; } function openInterstitial(url){ leaveWeb(url); } function trackEvent(trackUrl){ dcsMultiTrack('DCS.dcsuri' , trackUrl, 'WT.ti', 'Interactive Lung Module Flash'); }