var isSpanish;

//=================
function clickActiveSheet() 
//=================
// Name         : clickActiveSheet()
// Description  : Changes style sheet reference on the fly.
// Call         : clickActiveSheet()
// Parameters   : None
// Returns      : None
// Author       : Jeremy Malone
// Created      : 02/20/2004
// Copyright    : 2004, Catholic Healthcare West
// Notes        : Checks for current style sheet and bump to the next one
// Updates      :
// **************
{
  var title = getActiveStyleSheet();
  if(title=="small") {
    font_sizer1();
    setActiveStyleSheet("medium");
    //textBtnOver = new Image();
    //textBtnOver.src = g_HttpRelativeWebRoot + "/stellent/fragments/comUilityBarInclude/images/" + (isSpanish ? "sp_" : "") + "utility_font_ro.gif";
  }
  if(title=="medium") {
     font_sizer2();
    setActiveStyleSheet("large");
    //textBtnOver = new Image();
    //textBtnOver.src = g_HttpRelativeWebRoot + "/stellent/fragments/comUilityBarInclude/images/" + (isSpanish ? "sp_" : "") + "utility_font_ro.gif";
  }
  if(title=="large") {
     font_sizer0();
    setActiveStyleSheet("small");
   // textBtnOver = new Image();
   // textBtnOver.src = g_HttpRelativeWebRoot + "/stellent/fragments/comUilityBarInclude/images/" + (isSpanish ? "sp_" : "") + "utility_font_ro.gif";
  }
}
//=================
function setActiveStyleSheet(title) 
//=================
// Name         : setActiveStyleSheet(title) 
// Description  : Changes style sheet reference 
// Call         : setActiveStyleSheet(string)
// Parameters   : title - title of the desired style sheet
// Returns      : 
// Author       : Jeremy Malone
// Created      : 02/20/2004
// Copyright    : 2004, Catholic Healthcare West
// Notes        :
// Updates      :
// **************

{
  // Only change font size for top level window (no iframes).
  if(self != top) {
    var i, a, main;
    for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
      if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
        a.disabled = true;
        if(a.getAttribute("title") == title) a.disabled = false;
      }
    }
  }
}
//=================
function getActiveStyleSheet() 
//=================
// Name         : getActiveStyleSheet() 
// Description  : Gets style sheet reference 
// Call         : getActiveStyleSheet()
// Parameters   : none
// Returns      : Active stylesheet
// Author       : Jeremy Malone
// Created      : 02/20/2004
// Copyright    : 2004, Catholic Healthcare West
// Notes        :
// Updates      :
// **************
{
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}
//=================
function getPreferredStyleSheet() 
//=================
// Name         : getPreferredStyleSheet() 
// Description  : Gets preferred style sheet 
// Call         : getPreferredStyleSheet()
// Parameters   : none
// Returns      : Preferred stylesheet
// Author       : Jeremy Malone
// Created      : 02/20/2004
// Copyright    : 2004, Catholic Healthcare West
// Notes        :
// Updates      :
// **************

{
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}
//=================
function createCookie(name,value,days) 
//=================
// Name         : createCookie(name,value,days) 
// Description  : Creates stylesheet cookie
// Call         : createCookie(name,value,days)
// Parameters   : ncookie name, value and days
// Returns      : NA
// Author       : Jeremy Malone
// Created      : 02/20/2004
// Copyright    : 2004, Catholic Healthcare West
// Notes        :
// Updates      :
// **************
{
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

//=================
function readCookie(name) 
//=================
// Name         : readCookie(name) 
// Description  : Reads stylesheet cookie
// Call         : readCookie(string)
// Parameters   : name of the cookie
// Returns      : Cookie info
// Author       : Jeremy Malone
// Created      : 02/20/2004
// Copyright    : 2004, Catholic Healthcare West
// Notes        :
// Updates      :
// **************

{
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

// **********************************************************************

//Retrieve cookie info and set stylesheet
//var cookie = readCookie("style");
//var title = cookie ? cookie : getPreferredStyleSheet();
//setActiveStyleSheet(title);

//Update cookie with stylesheet information
window.onunload = function(e) {
  // Only change font size for top level window (no iframes).
  if(self == top) {
    var title = getActiveStyleSheet();
    createCookie("style", title, 365);
  }
}

//Set active stylesheet when page loads
var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);

//Preload images
/* 
//Not used on in redesign  
//patientsBtn = new Image();
//patientsBtn.src = g_HttpRelativeWebRoot + "groups/jsp/documents/webcontent/" + (isSpanish ? "sp_" : "") + "patientbuttonover.gif";
//emailBtn = new Image();
//emailBtn.src = g_HttpRelativeWebRoot + "groups/jsp/documents/webcontent/" + (isSpanish ? "sp_" : "") + "crsemailpgbuttonovr.gif";
//printBtn = new Image();
//printBtn.src = g_HttpRelativeWebRoot + "groups/jsp/documents/webcontent/" + (isSpanish ? "sp_" : "") + "crsprintpgbuttonovr.gif";
*/
// **********************************************************************


//=================
function printView()
// Name         : printview() 
// Description  : Displays a printer friendly version of the content in a new window
// Call         : none
// Parameters   : HttpWebSitesRoot value
// Returns      : none
// Author       : John Slaughter
// Created      : 02/23/2004
// Copyright    : 2004, Catholic Healthcare West
// Notes        :
// Updates      :
// **************

{
  if (document.getElementById != null)
  {

      //    var html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n\n';
    var html = '';    
    html += '<html>\n';
    html += '<HEAD>';      
    
    
    
    
    if (document.getElementsByTagName != null)
    {
      var headTags = document.getElementsByTagName("head");
      if (headTags.length > 0)
      
// Add in required style sheet references

      html +='<SCRIPT type=text/javascript>g_navNode_Root=""; function DisplayNav(){DisplayNav.prototype.Display = DisplayNav_Display;} function DisplayNav_Display (){return;} function DoNothing(){return;}</SCRIPT>';
      html += '\n<TITLE>Printer Friendly View</TITLE>\n';
    }
      html += '\n<style type="text/css">\n';   

      // CSS for CSS for Print Preview Popup 
      html += 'html {min-height: 100%; height: auto;}\n';         
      html += 'body {color: #000000; font-size: 12px; font-family: arial, tahoma, helvetica, sans-serif; text-align: left; margin: 0; padding: 0; background: #ffffff url(/stellent/groups/jsp/documents/webcontent/prt_header.gif) repeat-x left top;}\n';         
      html += 'img {border: 0;}\n';
      html += 'tr {vertical-align: top; text-align: left;}\n';
      html += 'th {font-size: 13px; font-weight: bold; text-align: left;}\n';        
      html += 'td {font-size: 12px; text-align: left;}\n';      
      html += 'p {font-size: 12px;}\n';            
      html += 'form {padding: 0; margin: 0;}\n';      
      html += 'font {color: #000000;}\n';            
      html += '.label {font-weight: bold;}\n';    
      html += 'label {font-weight: bold;}\n';    
      
      html += '#printPgHeader {color: #ffffff; font-size: 18px; padding:10px 20px; margin-left: 10px; background: transparent url(/stellent/groups/jsp/documents/webcontent/icon_printpage.gif) no-repeat left center;}\n';    
      html += '.printFacilityName, .printFacilityName2 {color: #636363; font-size: 13px; font-weight: bold; padding: 8px 10px; border-bottom: 1px solid #d0d0d0; vertical-align: middle;}\n';  
      html += '.printButtons, .printButtons2 {color: #000000; font-size: 10px; text-align: right; padding: 8px 10px; border-bottom: 1px solid #d0d0d0;}\n';  
      html += '.printFacilityName2, .printButtons2 {border-bottom: 0px; border-top: 1px solid #d0d0d0;}\n';  
      html += '.printFacilityName2 {font-size: 11px; font-weight: normal;}\n';        
      html += '.printWindow {padding: 0px 20px 20px 20px;}\n';        
      html += '.noprint, td.noprint {display: none;}\n';  
      html += '.remove, td.remove {display: none;}\n';        
      html += '.breadcrumb {display: none;}\n';  
      
      // CSS from main.css (Some modified, Some exactly the same) 
      // Thses are needed as the REL LINK to main.css is not loaded by the print functionality becuase the Print Preview Window is created by code
      // Any change to main.css should be mirrored here    
      html += '.clearFloat {clear: both; float: none; height: 1px; overflow: hidden;}\n';
      html += '.contentLayoutTable .pageTitle {background-color: #ffffff; Background-image: none;}\n';  
      html += '.contentLayoutTable {text-align: left;}\n';  
      html += '.contentLayoutTable .intro {font-size: 12px; padding: 10px 0px 10px 0px; margin: 0;}\n';  
      html += '.contentLayoutTable .quickLink {text-align: right; padding: 0 0 5px 0; margin: 0;}\n';        
      html += '.contentLayoutTable .mainCol {color: #000000; font-size: 12px; margin: 0; padding: 0 0 10px 0;}\n';  
      html += '.contentLayoutTable .pageTitle h1 {color: #000000; font-size: 22px; font-weight: normal; padding: 10px 0 25px 0; margin: 0;}\n';   
      html += '.contentLayoutTable h1 {color: #000000; font-size: 22px; font-weight: normal; padding: 10px 0 15px 0; margin: 0;}\n';  
      html += '.contentLayoutTable h2 {color: #000000; font-size: 15px; padding: 0 0 3px 0; margin: 0;}\n';  
      html += '.contentLayoutTable h3 {color: #000000; font-size: 13px; padding: 0 0 2px 0; margin: 0;}\n';  
      html += '.contentLayoutTable h4 {color: #000000; font-size: 12px; padding: 0 0 2px 0; margin: 0;}\n';
      html += '.contentLayoutTable .linkIndexTable {border-top: 0px;}\n';          
      html += '.contentLayoutTable .linkIndexTable h2 {font-size: 13px; padding-top: 20px;}\n';    
      html += '.contentLayoutTable .linkIndexTable p {font-size: 12px; margin: 0; padding: 2px 20px 8px 10px;}\n';            

      html += '.contentLayoutTable .sectionBreak {clear: both; padding-bottom: 6px;}\n';            
      html += '.contentLayoutTable .linkIndexTable .col1 {padding: 0 30px 30px 5px;}\n';            
      html += '.contentLayoutTable .linkIndexTable .col2 {padding: 0 10px 30px 0;}\n';            
      html += '.contentLayoutTable .mainCol .photoLeft  {padding: 0 20px 10px 0; float: left;}\n';  
      html += '.contentLayoutTable .mainCol .photoRight {padding: 0 0 10px 20px; float: right;}\n';        

      
      
      html += '.pageSpotlightContainer {color: #000000; margin-bottom: 20px;}\n';
      html += '.pageSpotlightContainer img {display: none;}\n';      
      html += '.pageSpotlightContainer h3 {color: #000000; font-size: 14px; padding: 15px 0px 2px 0px; margin: 0;}\n';
      html += '.pageSpotlightContainer h3 u {text-decoration: none;}\n';      
      html += '.pageSpotlightContainer p {color: #000000; font-size: 12px; padding: 0 0 10px 0; margin: 0;}\n';
      html += '.pageSpotlightContainer p u {text-decoration: none;}\n';      
      html += '.pageSpotlightContainer p.more {color: #000000; margin: 0 0 10px 0; background-image: none;}\n';
      html += '.pageSpotlightContainer p.more u {text-decoration: underline;}\n';
      html += '.pageSpotlightContainer p.arrowMore {color: #000000; margin: 0; padding: 0 0 10px 12px; background: transparent url(/stellent/groups/jsp/documents/webcontent/blue_arrow.gif) no-repeat 0em .3em;}\n';
      html += '.pageSpotlightContainer p.arrowMore u {text-decoration: underline;}\n';

      
      html += '.siteSearchBgnd {border: 1px solid #636363; padding: 10px 20px; margin-bottom: 4px;}\n';   
      html += '.siteSearchBgnd td {padding-bottom: 4px;}\n';   
      html += '.siteSearchBgnd h3 {font-size: 13px; margin: 0 0 6px 0; padding: 0;}\n';   
      html += '.siteSearchBgnd h4 {font-size: 12px; color: #000000; font-weight: bold; margin: 6px 0 0 0;  padding: 0;}\n';   
      html += '.siteSearchBgnd p {padding: 0 0 6px 0; margin: 0;}\n';   
      html += '.siteSearchBgnd p.label {font-weight: bold; padding: 20px 0 2px 0; margin: 0;}\n';   
      html += '.siteSearchBgnd p.error {display: none;}\n';   
   
      html += '.siteSearchCheckBoxTable td {font-size: 11px; vertical-align: middle; padding: 1px 2px 1px 0px; margin-bottom: 10px;}\n';      
      //html += '.siteSearchButtons {display: none;}\n';   
      
      html += '.searchResultsPerPage {font-size: 11px; font-weight: bold; padding-top:10px; padding-bottom:10px;}\n';   
      html += '.searchResultDetailsTop {font-size: 11px; border-top: 1px solid #000000; border-bottom: 2px solid #000000; margin: 0; padding: 4px 2px;}\n';   
      html += '.searchResultDetailsBottom {font-size: 11px; border-bottom: 1px solid #000000; border-top: 2px solid #000000; margin: 0; padding: 4px 2px;}\n';   
      html += '.searchResultStats {font-size: 11px; font-weight: bold; padding: 4px 0; width: 150px; float: left;}\n';   
      html += '.searchResultPaging {font-size: 11px; width: 300px; float: right;}\n';   

      html += '.pagingTable td {color:#000000; font-size: 10px; padding: 1px 3px;}\n';   
      html += '.pagingTable .selected {color: #ffffff; background-color: #000000;}\n';   
      html += '.pagingTable .pagingNextPrev {font-weight: bold;}\n';   
      html += '.resultsForText {font-size: 15px; font-weight: bold; padding: 10px 0 5px 0;}\n';   
      html += '.resultsForText h2.error {}\n';  
      
       
      html += '.searchResultRow1, .searchResultRow2 {margin-bottom: 4px; padding: 10px 6px 18px 6px;}\n';   
      html += '.searchResultRow1 h3, .searchResultRow2 h3 {font-size: 13px; margin: 0 0 4px 0; padding: 0;}\n';   
      html += '.searchResultRow1 p, .searchResultRow2 p {margin: 0; padding: 0;}\n';   
      html += '.searchResultRow1 {background-color: #ffffff; border-bottom: 1px solid #dddddd;}\n';   
      html += '.searchResultRow2 {background-color: #ffffff; border-bottom: 1px solid #dddddd;}\n';   
      html += '.searchDisclaimer {font-size: 10px; font-weight:normal;  color: #000000; padding: 20px 0 30px 0;}\n';   
      html += '.searcTipsIcon {font-weight: bold; vertical-align: middle; margin: 0; padding: 2px 10px 2px 20px; background: transparent url(/stellent/groups/jsp/documents/webcontent/question_icon.gif) no-repeat center left;}\n';   
      
      html += '.dataTable .searchResultRow1, .dataTable .searchResultRow1 {margin: 0;}\n';  
      html += '.dataTable th {padding: 4px 25px 4px 4px; color: #ffffff; background-color:#000000;}\n';  
      html += '.dataTable th u {text-decoration: none; padding: 4px 25px 4px 4px; color: #ffffff; background-color:#000000;}\n';              
      html += '.dataTable span.ascending {color: #ffffff; padding-bottom: 4px;}\n';  
      html += '.dataTable span.descending {color: #ffffff; padding-bottom: 4px;}\n';  
      html += '.dataTable span.descending u, .dataTable span.ascending u {text-decoration: underline;}\n';        
            
      html += '.dataTable td {padding: 4px 25px 10px 4px; border-bottom: 1px solid #dddddd;}\n';  
      html += '.dataTable th.mapCol {text-align: left;}\n';  
      html += '.dataTable td.mapCol {text-align: left; padding: 10px 4px 4px 4px;}\n';  
      html += '.dataTable td.mapCol u {text-decoration: none;}\n';       
      html += '.dataTable td.year {font-size: 1.2em; font-weight: bold; padding: 15px 15px 4px 4px; border-bottom: 0px;}\n';  
      html += 'span.greenBtn {font-size: 10px; text-align: center; padding: 2px 4px; border: 1px solid #636363;}\n'; 
      html += 'span.greenBtn u {text-decoration: none;}\n';       
      
      
      // Find a Doctor CSS      
      html += '#findADoctorContainer {color: #000000; font-weight: bold; font-size: 12px;}\n'; 
      html += '#findADoctorContainer td {color: #000000; font-weight: bold; font-size: 12px;}\n';       
      html += '#findADoctorContainer input, #findADoctorContainer select {font-size: 11px; font-weight: normal;}\n'; 

      html += '#findADoctorContainer h2 {color: #000000; font-size: 15px; padding: 0 0 5px 0; margin: 0 0 8px 0; border-bottom: 1px solid #636363;}\n'; 
      html += '#findADoctorContainer div {padding-bottom: 8px;}\n'; 
      html += '#findADoctorContainer .specialistSearchBox {clear: both; border-top: 0px solid #000000;}\n'; 
      html += '#findADoctorContainer .topSection {padding: 15px; border: 1px solid #636363; border-bottom: 0;}\n'; 
      html += '#findADoctorContainer .middleSection {padding: 10px 15px 15px 15px; border: 1px solid #636363; border-top: 0;}\n'; 
      html += '#findADoctorContainer .bottomSection {padding: 5px 15px 10px 15px;}\n'; 
            
      html += '#findADoctorContainer .conditionsSearchBox {clear: both; border-top: 1px solid #636363; background-color: #ffffff;}\n'; 
      html += '#findADoctorContainer .conditionsSearchBox .topSection {padding: 15px; border: 1px solid #636363; background-image: none; background-color: transparent;}\n'; 
      html += '#findADoctorContainer .conditionsSearchBox .topSection div {color: #000000;}\n'; 
      html += '#findADoctorContainer .conditionsSearchBox .topSection h2 {color: #000000; font-size: 13px; font-weight: bold; margin: 0; padding: 8px 0 0 0; border: 0;}\n'; 
      html += '#findADoctorContainer .conditionsSearchBox .topSection h3 {font-size: 12px; font-weight: bold; margin: 0; padding: 20px 0 3px 0;}\n'; 
      html += '#findADoctorContainer .conditionsSearchBox .topSection p {margin: 0; padding: 0 0 3px 10px; font-weight: normal;}\n'; 

      html += '#findADoctorContainer div.findADoctorTabs {display: none;}\n'; 
      html += '#findADoctorContainer .radioTable div {padding: 3px 10px 8px 3px;}\n'; 
      html += '#findADoctorContainer div.desc {font-size: 12px; padding: 0;}\n'; 
      html += '#findADoctorContainer div.desc2 {color: #000000; font-size: 12px; font-weight: normal; padding: 0 0 0 0; margin: 0;}\n'; 
      html += '.findADoctorContainer td.searchTipsTab {display: none;}\n'; 
      
      html += '.findADoctorPhoto {padding: 0 10px 0 0; float: left;}\n'; 
      html += '.findADoctorInfo {float: right;}\n'; 
      html += '.findADoctorInfo h2 {color: #000000; font-size: 14px;}\n'; 
      html += '.findADoctorInfo td {padding: 0 20px 15px 0;}\n'; 
      html += '.findADoctorInfo td.name {color: #000000; font-size: 15px; font-weight: bold; padding-bottom: 18px;}\n'; 
      html += '.findADoctorInfo td.label {width: 40%;}\n'; 
      
      
      
      
      
      html += '.contentLayoutTable .prSpotlightMiddle h2 {font-size: 15px; color: #000000; font-weight: bold; margin: 0 0 8px 0;}\n'; 
      html += '.contentLayoutTable .prSpotlightMiddle p {font-size: 12px; color: #000000; font-weight: normal; margin: 0 0 8px 0;}\n';       
      html += '.forPhyButtonContainer {display: none;}\n'; 

      html += '.forPhylinkslist {color: #000000; font-size: 12px; font-weight: normal; margin: 0 0 20px 0; padding: 0; list-style-type: none;}\n'; 
      html += '.forPhylinkslist li {color: #000000; font-size: 12px; display: inline; padding: 0 24px 6px 0; background-image: none;}\n'; 
      html += '.clinicalResourcesSpotlight {color: #000000; width: 334px; vertical-align: top; margin: 20px 0 0 0;}\n'; 
      html += '.clinicalResourcesSpotlight h3 {color: #000000; margin-left: 100px;}\n'; 
      html += '.clinicalResourcesSpotlight p {color: #000000; margin-left: 100px;}\n';
      html += '.contentLayoutTable .oppDetail h2 {color: #7F004D; margin: 0 0px 10px 0px; padding: 0;}\n'; 
      html += '.contentLayoutTable .oppDetail td {padding: 0 0 1.5em .8em;}\n'; 
      
      html += '.chwlocations .stateFirst, .chwlocations .state {color: #000000; font-size: 15px; font-weight: bold; padding-top: 25px; padding-bottom: 8px;}\n'; 
      html += '.chwlocations .stateFirst {padding-top: 25px;}\n'; 
      html += '.chwlocations .body {padding-right: 20px;}\n'; 
            
      html += '.note {font-size: 9px; color:#636363;}\n';
      
      // View our Facility Styles
      html += '.viewFacilityTL {}\n';
      html += '.viewFacilityTR {background-color: #636363;}\n';
      html += '.viewFacilityBL {}\n';
      html += '.viewFacilityBR {padding: 2px;}\n';
      html += '.viewFacilityContent {padding: 8px; background-color: #ffffff;}\n';
      html += '.viewFacilityTable {width: 96%;}\n';
      html += '.viewFacilityTable .links {padding-top: 10px;}\n';
      
      html += '.viewFacilityTable .stroke1 {border: 1px solid #EBEBEB;}\n';
      html += '.viewFacilityTable .stroke2 {padding: 6px; border-bottom: 1px solid #A7A7A7;}\n';
      html += '.viewFacilityTable .slidesInfo {width: 293px; padding-bottom: 15px; text-align: right;}\n';
      html += '.viewFacilityTable .slidesNum {text-align: center; padding: 5px 0px;}\n';    
      html += '.viewFacilityTable .buttons {display:none;}\n';  
      html += '.viewFacilityTable p {margin: 0; padding: 3px 10px 4px 0px;}\n';
      html += '.viewFacilityTable p.selected {color: #000000; font-weight: bold; padding-left: 12px;}\n';
      
      // Foundation Styles
      html += '#indexOfLinks p {margin-top: 0px;} \n';      
      html += '#indexOfLinks #twoColNum1 {} \n';      
      html += '#indexOfLinks #twoColNum2 {} \n';                  
      
      /*
      html += '.contentLayoutTable input {display: none;} \n';     
      html += '.contentLayoutTable select {display: none;} \n';     
      html += '.contentLayoutTable textarea {display: none;} \n';                       
      */
      
  // CSS for Print Preview Popup      
  html += '@media screen {\n';  
  html += '}\n';  


  // CSS for Printed Page Formatting
  html += '@media print {\n';  
    html += 'body {color: #000000; font-family: arial; font-size: 11px; background-image: none; background-color: #ffffff;}\n';  
    html += '#printPgHeader {display: none;}\n';    
    html += '.printFacilityName, .printFacilityName2 {color: #666666; font-size: 12px; font-weight: bold; padding: 8px 0px; border-bottom: 1px solid #d0d0d0; vertical-align: middle;}\n';  
    html += '.printButtons, .printButtons2 {display: none;}\n';  
    html += '.printFacilityName2, .printButtons2 {border-bottom: 0px; border-top: 1px solid #d0d0d0;}\n';  
    html += '.printFacilityName2 {font-size: 11px; font-weight: normal;}\n';         
    html += '.printWindow {padding: 0px 0 20px 0;}\n';     
    
    


    html += '#DetailPageNavTop {display: none;}\n';  
    html += '#DetailPageNavBot {display: none;}\n';  
  html += '}\n';  

       
      
      
      
      
      
      
      
       
      html += '\n</style>\n';                    
    
    
// The following is a pice of javascript that will be executed when the page is displayed.  
// The code will unhide any of the hidden divs used in the detail pages for pagination so 
// the user will see all of the content and not just the virutal page they were looking at.
    html += '\n<Script Language="JavaScript">\n';	
    html += '\nfunction DetailPageFix(){\n';	
    html += '\nvar PageElem = document.getElementById("detailPageCount");\n';	
    html += '\nif (PageElem != null){\n';	
    html += '\nvar pageCnt = PageElem.innerHTML;\n';	
    html += '\nfor(var i=1;i <= pageCnt;i++){\n';	
    html += '\ndocument.getElementById("DetailPage"+i).style.display = "";\n';
    html += '\nif (document.getElementById("DetailPageHR"+i) != null) document.getElementById("DetailPageHR"+i).style.display = "";}\n';	
    html += '\ndocument.getElementById("DetailPageNavTop").style.display = "none";\n';	
    html += '\ndocument.getElementById("DetailPageNavBot").style.display = "none";}\n';	
    html += '\n}</Script>\n';	


// Set the BASE element to insure addressability to included objects (i.e. images)
    //html += '\n<BASE href=' + document.domain + '/stellent/>\n';	
	html += '\n<BASE href="https://"' + document.domain + '/stellent/>\n';
      //html +='<base href="http://consumerview.chw.edu/snmh/">'; 


// Set the standed HTML BODY elements and config to call DetailPageFix on load
    html += '\n</HE' + 'AD>\n<BODY onload="DetailPageFix()">\n';

// Creates the plum banner with the page title
    html += '<div id="printPgHeader">Print This Page</div>\n';      
    
// Add in print and close button/link at top of page
    html += '<table width="100%" border="0" cellpadding="0" cellspacing="0">\n<tr>\n<td align="left" width="65%" class="printFacilityName">' + chwFacilityName + '</td>';
    html += '<td width="35%" align="right" class="printButtons">';    
    html += '\n<form><input type="button" style="cursor: pointer;" value="' + (isSpanish ? "Imprimir esta página" : "Print this page") + '" onClick="window.print();">&nbsp;&nbsp;';
    html += '<input type="button" style="cursor: pointer;" value="' + (isSpanish ? "Cerrar ventana" : "Close Window") + '" onClick="window.close();">\n</form></td>\n</tr>\n';		
    html += '<tr>\n<td colspan="2" class="printWindow">\n';
        
    
// Find the required PrintArea element
		
    var printPageElem = document.getElementById("PrintArea");
		
    if (printPageElem != null)
    {
//Remove Related Links from print page
/*
	if (document.getElementById("relatedLinks") != null)
	{
	   theDiv = document.getElementById("relatedLinks");
	   theDiv.style.display = 'none';		
	}
*/
// Get the HTML inside the PrintArea Element

	str = printPageElem.innerHTML;

//Redisplay Related Links on original page
/*
	if (document.getElementById("relatedLinks") != null)
	{
	   theDiv = document.getElementById("relatedLinks");
	   theDiv.style.display = 'block';		
	}	
*/
// Run HTML thru Regexp to convert links to call dummy javascript routine 
// We do not want the links to work on the print view
// ########################################################
	  //bcronk changed the reg expression
    //AnchorMatch = /href=.+?[\)|\/]\x22/g;
	  //str = str.replace(AnchorMatch, '<a href="javascript:DoNothing();"'); 
     str = str.replace(/<a.*?>/gi,'<u>'); 
     str = str.replace(/<\/a>/gi, "</u>");   
     str = str.replace(/<input/gi,'<input disabled="disabled"'); 
     str = str.replace(/<select/gi,'<select disabled="disabled"'); 
     str = str.replace(/<textarea/gi,'<textarea disabled="disabled"');       

             
// #######################################################  
  

// Run HTML thru Regexp to remove any target=blank settings on links 
// to prevent them from trying to open new windows.
	BlankMatch = /target=_blank/g;
	str = str.replace(BlankMatch, ' ');
        html += str;

    }
    else
    {
        alert("Could not find the printView section in the HTML");
	return;
    }

// Add in print and close button/link and Copyright at Bottom of page

// Code to calculate the year from the system
	  var date =new Date();
	  var browser=navigator.appName;
	  var dateYear = date.getYear();
	  if (browser=="Netscape")
	  {
		  dateYear +=1900;
	  }
	html += '</td>\n</tr><tr>\n'
    html += '<td align="left" class="printFacilityName2">&copy; ' +dateYear+' Catholic Healthcare West</td>';
    html += '<td align="right" class="printButtons2">';    
    html += '\n<form><input type="button" style="cursor: pointer;" value="' + (isSpanish ? "Imprimir esta página" : "Print this page") + '" onClick="window.print();">&nbsp;&nbsp;';
    html += '<input type="button" style="cursor: pointer;"  value="' + (isSpanish ? "Cerrar ventana" : "Close Window") + '" onClick="window.close();">\n</form></td>\n';		
    html += '</tr></table>\n'

// Wrap up standard HTML for page
    html += '\n</BO' + 'DY>\n</HT' + 'ML>';

// Set window parameters then call open routing to open new browser window passing our changed HTML
		
    var winParms = "width=740, scrollbars=yes, resizable=yes, toolbar=no, menubar=yes, location=no, directories=no";
    var printWin = window.open("","PrintView", winParms);
    printWin.document.open();
    printWin.document.write(html);
    printWin.document.close();

  }
  else
  {
    alert("Sorry, the print view feature works\nonly in javascript enabled browsers.");
  }
}

//=================
function popupEmailPage(url)
// Name         : popupEmailPage() 
// Description  : Displays the emailAPage form in a popup window, and moves the focus to that window
// Call         : none
// Parameters   : url The URL to display
// Returns      : always returns false
// Author       : Brian P. Harris
// Created      : 02/25/2004
// Copyright    : 2004, Catholic Healthcare West
// Notes        :
// Updates      : 04/30/2004 bph - Since Terms and Conditions links were removed from email a page, it's no
// 		    :			     longer necessary to pass them in.
// **************
{	
	//construct the URL that we need to send to
//	urlQueryString = escape(location.search);
//	urlToSend = "http://" + hostName + "/intradoc-cgi/idc_cgi_isapi.dll" + urlQueryString;	
	//urlToSend = escape(url_to_send);
	url = url + "?chwFN=" + escape(chwFacilityName) + "&chwPUrl=" + escape(url_to_send) + "&chwTitle=" + escape(document.title) + "&spanish=" + isSpanish;

	newwindow=window.open(url,'name','width=650,height=450,menubar=no,status=no,location=no,toolbar=no,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}

