﻿var timeout = 10;
var closetimer = 0;
var ddmenuitem = 0;
var rollover = 0;

function navigationDash_open() {
    navigationDash_canceltimer();
    navigationDash_close();
    ddmenuitem = $(this).find('ul').css('visibility', 'visible');
}

function navigationDash_on(pagename) {
    var curImg;
    var curLI;
    switch (pagename) {
        //NHL HCP Nav Item 1  
        case "NHL_HCP_Efficacy.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavEfficacy a img:eq(0)');
            curLI = $('#tnavEfficacy');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_pivotal_trial.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavPivotalTrial a img');
            curLI = $('#tnavEfficacy');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_molecular_structure.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavMolecularStruct a img');
            curLI = $('#tnavEfficacy');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_moa.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavMOA a img');
            curLI = $('#tnavEfficacy');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;

        //NHL HCP Nav Item 2 

        case "NHL_HCP_safety_information.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavSafety a img:eq(0)');
            curLI = $('#tnavSafety');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_managing_side_effects.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavSideEffects a img:eq(0)');
            curLI = $('#tnavSafety');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_use_in_special_pops.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavSpecialUse a img:eq(0)');
            curLI = $('#tnavSafety');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;

        //NHL HCP Nav Item 3   
        case "NHL_HCP_dosing_and_admin.aspx":
            $('#menu3').css('visibility', 'visible');
            curImg = $('#tnavDosingAdmin a img:eq(0)');
            curLI = $('#tnavDosingAdmin');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_initiation_and_dosing.aspx":
            $('#menu3').css('visibility', 'visible');
            curImg = $('#tnavInitiation a img:eq(0)');
            curLI = $('#tnavDosingAdmin');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_dose_delays_mods_reinitiation.aspx":
            $('#menu3').css('visibility', 'visible');
            curImg = $('#tnavMods a img:eq(0)');
            curLI = $('#tnavDosingAdmin');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_reconstitution_and_preparation.aspx":
            $('#menu3').css('visibility', 'visible');
            curImg = $('#tnavPreparation a img:eq(0)');
            curLI = $('#tnavDosingAdmin');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_HCP_storage_and_handling.aspx":
            $('#menu3').css('visibility', 'visible');
            curImg = $('#tnavStorageHandling a img:eq(0)');
            curLI = $('#tnavDosingAdmin');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;

        //NHL HCP Nav Item 4 
        case "NHL_HCP_professional_resources.aspx":
            curImg = $('#tnavResources a img:eq(0)');
            curLI = $('#tnavResources');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;

        //NHL Pat Nav Item 1 
        case "NHL_pat_home.aspx":
            curImg = $('#tnavHome a img:eq(0)');
            curLI = $('#tnavHome');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;

        //NHL Pat Nav Item 2 

        case "NHL_pat_living_with.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavLivingWith a img:eq(0)');
            curLI = $('#tnavLivingWith');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_pat_about_leukemia.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavAboutLeukemia a img:eq(0)');
            curLI = $('#tnavLivingWith');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;

        case "NHL_pat_diagnosing_staging.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavDiagnosingStaging a img:eq(0)');
            curLI = $('#tnavLivingWith');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_treatment_options.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavTreatmentOptions a img:eq(0)');
            curLI = $('#tnavLivingWith');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_pat_life_with.aspx":
            $('#menu1').css('visibility', 'visible');
            curImg = $('#tnavLifeWith a img:eq(0)');
            curLI = $('#tnavLivingWith');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;

        //NHL Pat Nav Item 3 
        case "NHL_pat_treanda_for_nhl.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavTreandaForNHL a img:eq(0)');
            curLI = $('#tnavTreandaForNHL');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
        case "NHL_pat_how_help.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavHowHelp a img:eq(0)');
            curLI = $('#tnavTreandaForNHL');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));        
            break;
        case "NHL_pat_how_works.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavHowWorks a img:eq(0)');
            curLI = $('#tnavTreandaForNHL');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));                
            break;
        case "NHL_pat_side_effects.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavSideEffects a img:eq(0)');
            curLI = $('#tnavTreandaForNHL');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));                        
            break;
        case "NHL_pat_treatment_with.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavTreatmentWith a img:eq(0)');
            curLI = $('#tnavTreandaForNHL');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));                                
            break;
        case "NHL_pat_promoting_wellness.aspx":
            $('#menu2').css('visibility', 'visible');
            curImg = $('#tnavPromoteWellness a img:eq(0)');
            curLI = $('#tnavTreandaForNHL');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));                                        
            break;

        //NHL Pat Nav Item 4  
        case "NHL_pat_faqs.aspx":
            curImg = $('#tnavFaqs a img:eq(0)');
            curLI = $('#tnavFaqs');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));        
            break;

        //NHL Pat Nav Item 5  
        case "NHL_pat_support.aspx":
            curImg = $('#tnavSupport a img:eq(0)');
            curLI = $('#tnavSupport');
            $(curLI).unbind('mouseout').unbind('mouseover');
            $(curImg).attr('src', $(curImg).attr('hover'));
            break;
           
           
		//CLL Pat Nav Item 1
        case "CLL_pat_home.aspx":
           	curImg = $('#tnavHome a img:eq(0)');
           	curLI = $('#tnavHome');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;

		//CLL Pat Nav Item 2
        case "CLL_pat_living_with_cll.aspx":
           	$('#menu2').css('visibility', 'visible');
        	curImg = $('#tnavlivingwithcll a img:eq(0)');
        	curLI = $('#tnavlivingwithcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_pat_about_leukemia.aspx":
           	$('#menu2').css('visibility', 'visible');
        	curImg = $('#tnavaboutleukemia a img:eq(0)');
        	curLI = $('#tnavlivingwithcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_pat_diagnosing_staging.aspx":
           	$('#menu2').css('visibility', 'visible');
        	curImg = $('#tnavdiagnosingstaging a img:eq(0)');
        	curLI = $('#tnavlivingwithcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_pat_treating_cll.aspx":
           	$('#menu2').css('visibility', 'visible');
        	curImg = $('#tnavtreatingcll a img:eq(0)');
        	curLI = $('#tnavlivingwithcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_pat_life_with_cll.aspx":
           	$('#menu2').css('visibility', 'visible');
        	curImg = $('#tnavlifewithcll a img:eq(0)');
        	curLI = $('#tnavlivingwithcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;

		//CLL Pat Nav Item 3
        case "CLL_pat_treanda_for_cll.aspx":
           	$('#menu3').css('visibility', 'visible');
           	curImg = $('#tnavtreandaforcll a img:eq(0)');
           	curLI = $('#tnavtreandaforcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_pat_how_help.aspx":
           	$('#menu3').css('visibility', 'visible');
           	curImg = $('#tnavhowhelp a img:eq(0)');
           	curLI = $('#tnavtreandaforcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_pat_how_works.aspx":
           	$('#menu3').css('visibility', 'visible');
           	curImg = $('#tnavhowworks a img:eq(0)');
           	curLI = $('#tnavtreandaforcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
		case "CLL_pat_side_effects.aspx":
           	$('#menu3').css('visibility', 'visible');
           	curImg = $('#tnavsideeffects a img:eq(0)');
           	curLI = $('#tnavtreandaforcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_pat_treatment_with.aspx":
           	$('#menu3').css('visibility', 'visible');
           	curImg = $('#tnavtreatmentwith a img:eq(0)');
           	curLI = $('#tnavtreandaforcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_pat_promoting_wellness.aspx":
           	$('#menu3').css('visibility', 'visible');
           	curImg = $('#tnavpromotingwellness a img:eq(0)');
           	curLI = $('#tnavtreandaforcll');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;

		//CLL Pat Nav Item 4
        case "CLL_pat_faqs.aspx":
        	curImg = $('#tnavfaqs a img:eq(0)');
        	curLI = $('#tnavfaqs');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;

		//CLL Pat Nav Item 5
        case "CLL_pat_support.aspx":
        	curImg = $('#tnavsupport a img:eq(0)');
        	curLI = $('#tnavsupport');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;

        //CLL HCP Nav Item 1
        case "CLL_HCP_Efficacy.aspx":
           	$('#menu1').css('visibility', 'visible');
        	curImg = $('#tnav210 a img:eq(0)');
        	curLI = $('#tnav210');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_Pivotal_Trial.aspx":
           	$('#menu1').css('visibility', 'visible');
        	curImg = $('#tnav212 a img:eq(0)');
           	curLI = $('#tnav210');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_Molecular_Structure.aspx":
           	$('#menu1').css('visibility', 'visible');
        	curImg = $('#tnav213 a img:eq(0)');
           	curLI = $('#tnav210');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_MOA.aspx":
           	$('#menu1').css('visibility', 'visible');
        	curImg = $('#tnav214 a img:eq(0)');
           	curLI = $('#tnav210');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;

        //CLL HCP Nav Item 2
        case "CLL_HCP_Safety_Information.aspx":
           	$('#menu2').css('visibility', 'visible');
        	curImg = $('#tnav220 a img:eq(0)');
        	curLI = $('#tnav220');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_Managing_Side_Effects.aspx":
           	$('#menu2').css('visibility', 'visible');
        	curImg = $('#tnav221 a img:eq(0)');
           	curLI = $('#tnav220');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_Use_in_Special_Populations.aspx":
           	$('#menu2').css('visibility', 'visible');
           	curImg = $('#tnav222 a img:eq(0)');
           	curLI = $('#tnav220');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;

        //CLL HCP Nav Item 3
        case "CLL_HCP_Dosing_and_Administration.aspx":
           	$('#menu3').css('visibility', 'visible');
        	curImg = $('#tnav230 a img:eq(0)');
        	curLI = $('#tnav230');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_Initiation_and_Dosing.aspx":
           	$('#menu3').css('visibility', 'visible');
        	curImg = $('#tnav231 a img:eq(0)');
           	curLI = $('#tnav230');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_Dose_Delays.aspx":
           	$('#menu3').css('visibility', 'visible');
        	curImg = $('#tnav232 a img:eq(0)');
           	curLI = $('#tnav230');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_Reconstitution_and_Preparation.aspx":
           	$('#menu3').css('visibility', 'visible');
        	curImg = $('#tnav233 a img:eq(0)');
        	curLI = $('#tnav230');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;
        case "CLL_HCP_Storage_and_Handling.aspx":
           	$('#menu3').css('visibility', 'visible');
        	curImg = $('#tnav234 a img:eq(0)');
        	curLI = $('#tnav230');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;

        //CLL HCP Nav Item 4   	 
        case "CLL_HCP_Professional_Resources.aspx":
        	curImg = $('#tnav250 a img:eq(0)');
        	curLI = $('#tnav250');
           	$(curLI).unbind('mouseout').unbind('mouseover');
           	$(curImg).attr('src', $(curImg).attr('hover'));
           	break;



    }
}

function navigationDash_close() {
    if (ddmenuitem) ddmenuitem.css('visibility', 'hidden');
}

function navigationDash_timer() {
    closetimer = window.setTimeout(navigationDash_close, timeout);
}

function navigationDash_canceltimer() {
    if (closetimer) {
        window.clearTimeout(closetimer);
        closetimer = null;
    }
}

function clickclear(thisfield, defaulttext) {
    if (thisfield.value == defaulttext) {
        thisfield.value = "";
    }
}

function clickrecall(thisfield, defaulttext) {
    if (thisfield.value == "") {
        thisfield.value = defaulttext;
    }
}

function imgSwap(oImg) {
    var strOver = "_on";
    var strOff = "_off";
    var strImg = oImg.src;
    if (strImg.indexOf(strOver) != -1)
        oImg.src = strImg.replace(strOver, strOff)
    else
        oImg.src = strImg.replace(strOff, strOver)
}

function popChart(div, width) {
    // Display an external page using an iframe
	$(div).modal( {onClose: function(){$.modal.close();},  minWidth: width} );
    return false;
}

function popChart1() {
    // Display an external page using an iframe
	$("#popUpChart1").modal(
    { onClose: function(dialog) {
       // dialog.data.fadeOut('slow', function() {
            dialog.container.slideUp('slow', function() {
                dialog.overlay.fadeOut('slow', function() {
                    $.modal.close(); // must call this!
                });
            });
      //  });
    }
    });

    return false;
}

function popChart2() 
{
    // Display an external page using an iframe
    $("#popUpChart2").modal({ onClose: function(dialog) {
        //dialog.data.fadeOut('slow', function() {
            dialog.container.slideUp('slow', function() {
                dialog.overlay.fadeOut('slow', function() {
                    $.modal.close(); // must call this!
                });
            });
       // });
    }
    });

    return false;
}

function popModal(divID)
{
	// Display an external page using an iframe
	$(divID).modal({ onClose: function(dialog)
	{
		dialog.data.fadeOut('fast', function()
		{
			dialog.container.slideUp('fast', function()
			{
				dialog.overlay.fadeOut('fast', function()
				{
					$.modal.close(); // must call this!
				});
			});
		});
	}
	});

	return false;
}

// Exit Interstitial

function exitInterstitial() {
    return confirm("By following this link, you are now leaving the TREANDA.com website.  Cephalon Oncology provides these links as a convenience but these sites are not controlled by Cephalon Oncology and Cephalon Oncology is not responsible for their content or your use of them.  For medical advice, please contact your healthcare provider.");
}

function HCPWarning() {
    return confirm("The information contained in this section of the site is intended for U.S. healthcare professionals only. Click OK if you are a healthcare professional.");
}

function ddHCPWarning() {
    if(confirm("The information contained in this section of the site is intended for U.S. healthcare professionals only. Click OK if you are a healthcare professional.")) {
        
    } else {

    window.location = "default.aspx";
    
    }
   }

var popPage = function(source, width, height)
{
if (width == null)
	width = 600;
if (height == null)
	height = 400;
modalWindow.windowId = "Modal";
modalWindow.width = width;
modalWindow.height = height;
modalWindow.content = "<iframe width='" + width + "' height='" + height + "' frameborder='0' scrolling='no' src='" + source + "'></iframe>";
modalWindow.open();
};

var modalWindow = {
parent: "body",
windowId: null,
content: null,
width: null,
height: null,
close: function()
{
	$(".modal-window").remove();
	$(".modal-overlay").remove();
},
open: function()
{
	var modal = "";
	modal += "<div class=\"modal-overlay\" onmousewheel=\"return false;\"></div>";
	modal += "<div id=\"" + this.windowId + "\" class=\"modal-window\" style=\"position:absolute;width:" + this.width + "px; height:" + this.height + "px; margin-top:-" + (this.height / 2) + "px; margin-left:-" + (this.width / 2) + "px;\">";
	modal += this.content;
	modal += "</div>";

	$(this.parent).append(modal);
	
	
	$(".modal-window").append("<div style=\"position:absolute;top:10px;right:10px;\"><img class=\"close-window\" src=\"images/NHL/hcp/btn-close.gif\" alt=\"Close\" border=\"0\"  /></div>");
	$(".close-window").click(function() { modalWindow.close(); });
	$(".modal-overlay").click(function() { modalWindow.close(); });
}
};


//function BigTextSize()
//{
//    $('.textContent p, .textContent a, .textContent ul, .textContent ol').css('font-size', '15px');
//	return false;
//}


//function SmallTextSize()
//{
//    $('.textContent p, .textContent a, .textContent ul, .textContent ol').css('font-size', '12px');
//	return false;
//}

function chooseFontSize(direction) {
    // Get Current size.
    //var cookie = readCookie("style");
    var cookie = readCurrentClass();
    //alert('Cookie is: ' + cookie); 

    // Go smaller
    //alert('Direction to size is: ' + direction);
    if (direction == 0) {
        if (cookie == 'large') {
            // Resize down to regularFont
            createCookie("style", 'normal', 365);
            setActiveStyleSheet('normal');
        }
        else if (cookie == 'larger') {
            // Resize down to largerFont
            createCookie("style", 'large', 365);
            setActiveStyleSheet('large');
        }
        else {
            createCookie("style", 'normal', 365);
        }
    }
    // Go bigger
    else {
        if (cookie == null || cookie == 'normal') {
            // Set to 'largerFont'
            createCookie("style", 'large', 365);
            setActiveStyleSheet('large');
        }
        else if (cookie == 'large') {
            // Set to 'largestFont'
            createCookie("style", 'larger', 365);
            setActiveStyleSheet('larger');
        }
        else if (cookie != 'larger') {
            createCookie("style", 'normal', 365);
        }
    }
}

function readCurrentClass() {
    var className;

    if (document.getElementById("bodyMain") != null) {
        className = document.getElementById("bodyMain").className;
    }

    return className;
}

//Create a cookie to store the preferred style sheet.
function createCookie(name, value, days) {
    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;
}

function setActiveStyleSheet(title) {
    document.getElementById("bodyMain").className = title;
   }

function popup(targetUrl, xWidth, yHeight)
{
	window.open(targetUrl, '_blank', 'width=' + xWidth + ',height=' + yHeight + ',scrollbars=no');
}

function onSelectNavigationChange(el) {
    trackLink(el.options[el.selectedIndex].value.split('|')[0], el.options[el.selectedIndex].value.split('|')[1], 'o');
    window.location.href = el.options[el.selectedIndex].value.split('|')[0];
    ddHCPWarning();
}

function onSelectNavigationChangePAT(ele) {
    trackLink(ele.options[ele.selectedIndex].value.split('|')[0], ele.options[ele.selectedIndex].value.split('|')[1], 'o');
    window.location.href = ele.options[ele.selectedIndex].value.split('|')[0];
}