<!--
function MM_preloadImages() { //v3.0
  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_swapImgRestore() { //v3.0
  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_findObj(n, d) { //v4.01
  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() { //v3.0
  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];}
}
//-->

/* cookie functions */

function getExpDate(days, hours, minutes) {
    var expDate = new Date();
    if (typeof days == "number" && typeof hours == "number" && typeof hours == "number") {
        expDate.setDate(expDate.getDate() + parseInt(days));
        expDate.setHours(expDate.getHours() + parseInt(hours));
        expDate.setMinutes(expDate.getMinutes() + parseInt(minutes));
        return expDate.toGMTString();
    }
}

// utility function called by getCookie()
function getCookieVal(offset) {
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1) {
        endstr = document.cookie.length;
    }
    return unescape(document.cookie.substring(offset, endstr));
}

// primary function to retrieve cookie by name
function getCookie(name) {
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen) {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg) {
            return getCookieVal(j);
        }
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break; 
    }
    return "";
}

// store cookie value with optional details as needed
function setCookie(name, value, expires, path, domain, secure) {
    document.cookie = name + "=" + escape (value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

// remove the cookie by setting ancient expiration date
function deleteCookie(name,path,domain) {
    if (getCookie(name)) {
        document.cookie = name + "=" +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}

/* textSizer functions */

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'body');
function isEmpty(o) {
    var i, v;
    if (isObject(o)) {
        for (i in o) {
            v = o[i];
            if (isUndefined(v) && isFunction(v)) {
                return false;
            }
        }
    }
    return true;
}
//Specify spectrum of different font sizes:
var szs = new Array( '70%','75%','85%','95%','100%','110%','120%' );
function checkCookie() {
	var tempVal = getCookie("fontSize");
	if(tempVal=="") {
		startSz = 1;
		setCookie("fontSize", startSz, getExpDate(360, 0, 0));
		setSize('body', startSz);
	} else {
		stringSz = getCookie("fontSize");
		startSz = parseInt(stringSz);
		setSize('body', startSz);
	}
}


function setSize( trgt,startSz ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	startSz = sz;
	setCookie("fontSize", startSz, getExpDate(360, 0, 0));

	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}
function ts( trgt,inc ) {
	if (document.getElementById) 
	{
		var d = document,cEl = null,sz = startSz,i,j,cTags;
		sz += inc;
		if ( sz < 0 ) sz = 0;
		if ( sz > 6 ) sz = 6;
		startSz = sz;
		setCookie("fontSize", startSz, getExpDate(360, 0, 0));
		if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];
	
		cEl.style.fontSize = szs[ sz ];
	
		for ( i = 0 ; i < tgs.length ; i++ ) {
			cTags = cEl.getElementsByTagName( tgs[ i ] );
			for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
		}
	}
}

function openWin(theURL,winName,properties) {
 theWindow = window.open(theURL,winName,properties);
 theWindow.focus();
} //end function openWin()

//-------begin function MagazineDP--------

function MagazineDP(Form)
{

 var dalert = "";
 dalert = "If you wish to proceed to additional information about this program, click the 'OK' button below.  When you click on the 'OK' link below, please be aware that you are leaving the CareFirst BlueCross BlueShield Web site and entering the American WholeHealth Network, Inc. (AWHN) site, governed by AWHN's privacy policy. AWHN tracks user traffic patterns throughout its site. However, it does not correlate this information with data about individual users. Users remain anonymous in the tracking process. AWHN uses this information to determine which areas of the site are most popular with users, based on traffic to those areas. AWHN does not track what individual users read, but rather how well each page performs overall. This helps AWHN continue to build a better service for the consumer.";

 if (confirm (dalert)){
    if (Form == true)
		{
			location = "Magazine.html";
			window.open('http://options.wholehealthmd.com/cfhealthyreading.asp','_blank','');

		}
	else 
		{
			location = "Magazine.html";
			window.open('http://options.wholehealthmd.com/cfhealthyreading.asp','_blank','');
		}
	return true;
  }
  else{
  location ="/CMSReview/html/Options.html";
  return false;
  }

} //end function MagazineDP

function pasuser(form) {
if (form.id.value=="Review") { 
if (form.pass.value=="CMS") {              
location="index.html" 
} else {
alert("Invalid Password")
}
} else {  alert("Invalid UserID")
}
}
