	if ((window.parent.frames['ItsTime']) || (window.location.href.indexOf('src=itstime') > -1)) {
		var str1 = location.search.substring(1);
		if (str1) {
			document.write('<link rel="stylesheet" type="text/css" href="/healthinfo/css/itstime.css">');
			if (str1.indexOf('col=red') > -1) {
				document.write('<link rel="stylesheet" type="text/css" href="/healthinfo/css/itstime_rubine.css">');
			} else if (str1.indexOf('col=yellow') > -1) {
				document.write('<link rel="stylesheet" type="text/css" href="/healthinfo/css/itstime_yellow.css">');
			} else if (str1.indexOf('col=blue') > -1) {
				document.write('<link rel="stylesheet" type="text/css" href="/healthinfo/css/itstime_blue.css">');
			} else {
				document.write('<link rel="stylesheet" type="text/css" href="/healthinfo/css/itstime_green.css">');
			}
		}
	}
	
	
	var baseUrl = "../../xml";
	
	

	function FollowLink( docHWID, intHWID )
	{
		//var url = "ContentViewer.htm?hwid=" + docHWID;
		var url = docHWID + ".html";
		
		var newLocation = location.search.substring(1);
		if (newLocation) { url += "?" + newLocation;}
		
		if(intHWID != null)
		{
			url += "#" + intHWID;
		}
		window.location.assign( url );
	}

	function FollowLeftNavLink( docHWID )
	{
		var url = docHWID + ".html";
		
		var newLocation = location.search.substring(1);

		if (window.parent.frames['ItsTime']) {
			if (newLocation) { url += "?" + newLocation + "&src=itstime";}
			else { url += "?src=itstime";}	
		} else {
			if (newLocation) { url += "?" + newLocation; }
		}
		
		window.location.assign( url );
	}
	

	function PopupLink(docHWID)
	{
		var url = docHWID + ".html";
		
		var newLocation = location.search.substring(1);
		
		if (window.parent.frames['ItsTime']) {
			if (newLocation) { url += "?" + newLocation + "&src=itstime";}
			else { url += "?src=itstime";}	
		} else {
			if (newLocation) { url += "?" + newLocation; }
		}
		
		var win = window.open(url, "Knowledgebase", "width=550,height=550,status=yes,toolbar=no,menubar=no,location=yes,scrollbars=yes,resizable=yes,top=10,left=10");
		win.focus();
	}
	
	function PopOffWindow( DaURL )
	{
		var features;
		var ItsTheWindow;
		
		features = "top=60,left=100,toolbar=no,location=no,menubar=no,statusbar=no,"
		   +"scrollbars=yes,resizable=yes";
		
		// Check to see if the value passed begins with "/healthinfo", convert passed value to lower case.
		var filePath = DaURL.substring(11,0);
		var lcFilePath = filePath.toLowerCase();   
                if(lcFilePath == "/healthinfo") {
			DaURL = DaURL.toLowerCase();
                    	ItsTheWindow = window.open( DaURL, "Healthwise", features );
                }
        	else {
			DaURL = DaURL.toLowerCase();
			ItsTheWindow = window.open( "/healthinfo/" + DaURL, "Healthwise", features );
		}
		ItsTheWindow.focus();
	}

        // Added by Sudhaker to resolve html links - Start
	function GetHtmlFilePath( docHWID )
	{
		var URL;
		var strDocHWID;
		var i;

		url		= new String();
		strDocHWID	= new String(docHWID);

		for( i=0; i<strDocHWID.length; i+=4 )
		{
			url += "/" + strDocHWID.substr(i, 4);
		}
		url += "/" + docHWID + ".html";
		
		var newLocation = location.search.substring(1);
		if (newLocation) { url += "?" + newLocation;}

		url = baseUrl + url;

		return url;
	}

	// Added by Sudhaker to resolve html links - End
	
	function GetXmlFilePath( docHWID )
	{
		var url;
		var strDocHWID;
		var i;

		url		= new String();
		strDocHWID	= new String(docHWID);

		for( i=0; i<strDocHWID.length; i+=4 )
		{
			url += "/" + strDocHWID.substr(i, 4);
		}
		url += "/" + docHWID + ".xml";
		url = baseUrl + url;

		return url;
	}
	
	
  function popupModelessBox(whichID, windowType, questionText) {
  	
 	// copy the selected answer's content to the modal box
 	if (questionText) { 
 		if (windowType == "symptomChecker") {
 			document.getElementById('questionBlock').innerHTML = "You answered 'Yes' to <strong>" + questionText + "</stromg><br><br>";
 		}
 		else {
 			document.getElementById('questionBlock').innerHTML = "<strong>" + questionText + "</stromg><br><br>";
 		}
 	}
	else { document.getElementById('questionBlock').innerHTML = "";}

	// copy the selected answer's content to the modal box
	document.getElementById('answerBlock').innerHTML = document.getElementById(whichID).innerHTML;
	if (self.pageYOffset) {
        scrollOffsetPosition = self.pageYOffset;
    } else if (document.documentElement && document.documentElement.scrollTop) {
        scrollOffsetPosition = document.documentElement.scrollTop;
    } else if (document.body) {
        scrollOffsetPosition = document.body.scrollTop;
    }
	
	// set window height based on type of popup requested
	if (windowType == 'quizAnswer') { windowHeight = "200px"; }
	if (windowType == 'symptomChecker') { windowHeight = "450px"; }
	
	document.getElementById('modelessBox').style.height = windowHeight;		
	
	// position the dialog; then display it 
  	document.getElementById('modelessBox').style.top = scrollOffsetPosition+50+'px';
	document.getElementById('answerBlock').parentNode.scrollTop = 0+'px';
  	document.getElementById('modelessBox').style.visibility = 'visible';
 
 }
 
 function displaySlide (slideToShow,slideToHide) {
	    			
	// if not the first time, hide the current slide		 
	if (slideToHide != '0' )  { document.getElementById('slide'+slideToHide).style.display = 'none';}

	// show the desired slide		
	document.getElementById('slide'+slideToShow).style.display = 'block';
}

function toggleView(id) {
  var item = document.getElementById(id);
  var value = item.style.display ? '' : 'none';
  item.style.display = value;
}

function anchorTest()
{
	var newLocation = location.href;
	var hwSection = newLocation.split('#');
	if (hwSection[1]) {
		document.getElementById(hwSection[1]).style.display = '';
		document.location.href="#" + hwSection[1];
	}
}

// Function to open Audio MP3 in English
function playAudioEn(fileName) {

	// Get the host name from the server. If calling from my.cigna.com, MP3 should load from secure.cigna.com.
	var getHostName = window.location.hostname;

	if (getHostName == "my.cigna.com") {

		var audioFile = "https://secure.cigna.com/healthinfo/audio/english/" + fileName + ".mp3?file=" + fileName;
	}
	else {
		var audioFile = "/healthinfo/audio/english/" + fileName + ".mp3?file=" + fileName;
	}
	window.open(audioFile);

}

// Function to open Audio MP3 in Spanish
function playAudioSp(fileName) {
	// Get the host name from the server. If calling from my.cigna.com, MP3 should load from secure.cigna.com.
	var getHostName = window.location.hostname;
	if (getHostName == "my.cigna.com") {
		var audioFile = "https://secure.cigna.com/healthinfo/audio/spanish/" + fileName + ".mp3?file=" + fileName;
	}
	else {
		var audioFile = "/healthinfo/audio/spanish/" + fileName + ".mp3?file=" + fileName;
	}
	window.open(audioFile);
}

function downloadAudio(fileName,catName,topicName) {
	var refName = "?ref=CIGNA";
	
	var useBaseHref = "http://www";
	if(window.parent.frames['myCIGNA']) {
		useBaseHref = "https://secure";
		refName = "?ref=myCIGNA";
	}
	if(window.parent.frames['mcaAudio']) {
		refName = "?ref=MyCareAllies";
	}
	var baseLink = ".cigna.com/healthinfo/audio/";
	var forWT = "&file=" + catName + "-" + topicName;
	var addWT = escape(forWT);	
	window.location.assign(useBaseHref + baseLink + fileName + refName + addWT);
}