function goToRiverPoint(lo)
{
	var answer = confirm("You are about to leave the CVS web site. By clicking the \"OK\" button below, you will be connected to this new site. Please be sure to read the new site's Privacy Policy. \n\n To return to CVS, please click the \"cancel\" button.");
	if (answer )
	{
		window.open(lo,'ActivityTracker','top=0,left=0,screenX=0,screenY=0,width=920,height=920,toolbar=0,location=0,status=1,menubar=0,scrollbars=yes,resizable=1,directories=0',true);	
	}
}

function popWindow(url, width, height, name, scrollbars){
	if (!scrollbars) scrollbars = false;
	if (!width) width = 450;
	if (!height) height = 500;
 	var realW = (width)/2;
	var realH = (height)/2;
 	if (document.all){		
        var xMax = screen.width, yMax = screen.height;
    }else if (document.layers){       
        var xMax = screen.width, yMax = screen.height;
    }else if (document.getElementById){
		var xMax = screen.width, yMax = screen.height;
	}else{
		var xMax = 800, yMax=600;
	}
	var xOffset = ((xMax)/2) - realW, yOffset = (((yMax)/2)) - realH; 
	if (yMax==600){
		yOffset = 0;
	}	
	
	if (scrollbars) {
		var options = "directories=no,status=no,location=no,scrollbars=yes,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}else{
		var options = "directories=no,status=no,location=no,scrollbars=no,menubar=no,toolbar=no,resizable=no" + ",screenX=" + xOffset + ",screenY=" + yOffset + ",top=" + yOffset + ",left=" + xOffset + ",width=" + width + ",height=" + height;
	}
	
	if (!name) name = "default_window";
	
	popup = window.open(url,name,options);
	popup.focus();	
}
function populate()
{

	var selectedValue = document.all.birthMonthStr.options[document.all.birthMonthStr.selectedIndex].value
	var box2 = document.all.birthDayStr;
	box2.options.length= null
	var len = box2.options.length

	if ( selectedValue == "02" )
	{
		for(i=1;i<30;i++)
		{
			box2.options[0] = new Option("Day","00");
			box2.options[i] = new Option(i,i);
			document.all.birthDayStr.options[0].selected = true
		}
	}
	else if( selectedValue == "04" || selectedValue == "06" || selectedValue == "09" || selectedValue == "11" )
	{
		for(i=1;i<31;i++)
		{
			box2.options[0] = new Option("Day","00")
			box2.options[i] = new Option(i,i);
			document.all.birthDayStr.options[0].selected = true
		}
	}
	else
	{
		for(i=1;i<32;i++)
		{
			box2.options[0] = new Option("Day","00")
			box2.options[i] = new Option(i,i);
			document.all.birthDayStr.options[0].selected = true
		}
	}
}

function hwsopen()

{
hwsopen =  window.open("http://www.urac.org/consumers/","_blank","width=800,height=800,resizable=yes,scrollbars=yes");
}


function clientNewWindow(where)
{
	window.open(where , "",'toolbar=yes,menubar=yes,resizable=yes,location=yes,status=yes,scrollbars=yes' );
}

function clientAlert(lo)
{
var answer = confirm("You are now leaving CVS Caremark. You will be redirected to our corporate site, which will open in a separate browser window. You will not be able to use the back arrow to return to My Online Wellness, but the site will remain open in a separate window. Click \"OK\"  to proceed.")

if (answer )
{

	window.open(lo , "",'toolbar=yes,menubar=yes,resizeable=yes,status=yes,location=yes' );
}

}


function ex(form){
window.location.href=form.s.options[form.s.selectedIndex].value;
}

var mydomain=document.location.hostname
var clientDomain="cdphp.com";
var consumerhiDomain="consumerhi.com";
var symptomsDomain="symptoms.";
var cvsDomain="cvs.com";

function leavingSitePopUp() {

var sitename="CVS Health Resources"

	return confirm("You are about to leave the " + sitename + " web site. By clicking the \"OK\" button below, you will be connected to this new site. Please be sure to read the new site's Privacy Policy. \n\n To return to " + sitename + ", please click the \"cancel\" button.")

}

function clickHandlerNetscape6(e) {  
	//alert("In clickHandlerNetscape6")
	if (e.target.parentNode != null && 
		e.target.parentNode.hostname != null && 
		e.target.parentNode.hostname.indexOf(mydomain)==-1 && 
		e.target.parentNode.hostname.indexOf(cvsDomain)==-1 && 		
		e.target.parentNode.hostname.indexOf(clientDomain)==-1 &&
		e.target.parentNode.hostname.indexOf(symptomsDomain)==-1 )
		
  	{
		return leavingSitePopUp()
	}
	else
		return true;
}

function clickHandlerNetscape(e) {  
	//alert("In clickHandlerNetscape")
	if (e.target != null && 
		e.target.hostname != null && 
		e.target.hostname.indexOf(mydomain)==-1 && 
		e.target.parentNode.hostname.indexOf(cvsDomain)==-1 && 				
		e.target.hostname.indexOf(symptomsDomain)==-1 &&
		e.target.hostname.indexOf(clientDomain)==-1 &&
		e.target.href.indexOf("JavaScript:")==-1 && hrefUrl.indexOf(".pdf")==-1)
		
  	{
		return leavingSitePopUp()
	}
	else
		return e.target.handleEvent(e);
}

function clickHandlerIE() {  
	//alert("In clickHandlerIE")
	var elementTag = window.event.srcElement.tagName;
	var hrefUrl = "";
	if (elementTag.indexOf("IMG")>=0)
		hrefUrl = window.event.srcElement.parentElement.href;
	else
		hrefUrl = window.event.srcElement.href;
	
	if (hrefUrl != null && 
		hrefUrl.indexOf(mydomain)==-1 && 
		hrefUrl.indexOf(cvsDomain)==-1 && 		
		hrefUrl.indexOf("javascript:")==-1 &&
                hrefUrl.indexOf(clientDomain)==-1 &&
		hrefUrl.indexOf(symptomsDomain)==-1 && hrefUrl.indexOf(".pdf")==-1 &&  hrefUrl.length > 1)
  	{
		return leavingSitePopUp()
	}
	else
		return true;
}

if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
	if (window.Event) document.captureEvents(Event.ONCLICK);
	document.onclick = clickHandlerIE;
}

if (navigator.appName == "Netscape") 
{
	//alert("Netscape version " + parseInt(navigator.appVersion))
	if (parseInt(navigator.appVersion) >= 6)
	{
		window.addEventListener(click, clickHandlerNetscape6, true)
	}
	else if (parseInt(navigator.appVersion) == 5)
	{
		window.captureEvents(Event.CLICK);
		window.onclick = clickHandlerNetscape6;
	}
	else 
	{
		window.captureEvents(Event.CLICK);
		window.onclick = clickHandlerNetscape;
	}
}

function MM_swapImgRestore() { 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}