/*
 MODULE: wwwRedirect.js
 AUTHOR: Dower Chin
 DATE:   03/09/2010
 DESCRIPTION: 
	Tests for a condition of the user comes to the site without the
	www prefix. If so, a redirect is made to force a www.

	This was updated so the check is only for the //mvphealthcare
	or //mvpselectcare conditions.

*/

function checkWWWPrefix()
{
	var fURL = document.URL;
	var prtcl = document.location.protocol;
	var tBase = fURL.substring(fURL.indexOf("//")+2,fURL.length);
	var curBase = tBase.substring(0,tBase.indexOf("/"));
	var dhost = document.domain;

	/* We don't want mvphealthcare.com without a prefix */
	if (fURL.indexOf("//mvphealthcare.com") > 0 ||
	    fURL.indexOf("//mvpselectcare.com") > 0)
	{
		this.location.replace("https://www." + tBase);
	}
}


