function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  if (selObj.options[selObj.selectedIndex].value == "popup") {
						MM_openBrWindow('/providers/index.htm','','scrollbars=yes,width=574,height=580')
	  } else {
      		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      		if (restore) selObj.selectedIndex=0;
	  }//end if
}//end function


	var width = screen.width;
	var the_availWidth = screen.availWidth;

/***********************************************************************************************
function name: openWebReadyPortal
description: openWebReadyPortal tests the width of the user screen and delivers the 
                      appropriate html page which controls the size of the flash
***********************************************************************************************/
function  openWebReadyPortal(Plan,Portal) {
	var width = screen.width;
	var the_availWidth = screen.availWidth;
	var the_path;	

	Plan = Plan.toUpperCase();
	Portal = Portal.toLowerCase();
	PlanLC = Plan.toLowerCase();

	//find what plan and portal the function is going to use
	the_path = 'http://www.bcbs' + PlanLC + '.com/mmedia/guided_tour/' + Plan + '_' + Portal + '/';

	
	var Cut_Portal = Portal.substring(0, 3);
	Cut_Portal = Cut_Portal.toLowerCase();

	 if (width=='1024' || width=="1024" || width==1024) 
	 {		
			the_path = the_path + 'hires_' + Cut_Portal + '_' + Plan + '.htm';
			window.open(the_path,'hires','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=905,height=675'); return false;
	 }
	 else if (width=='800' || width=="800" || width==800) 
	 {
			the_path = the_path + 'lores_' + Cut_Portal + '_' + Plan + '.htm';
			window.open(the_path,'lores','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=667,height=495'); return false;
	 }
	 else  
	 {	
			the_path = the_path + 'hires_' + Cut_Portal + '_' + Plan + '.htm';
			window.open(the_path,'hires','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=905,height=675'); return false;
	 }
}

function validateProviderNomination() {
	with(window.document.providerNomination) {
				if (Physician_Last.value.length<1) {
				  alert("Please enter the Physician's Last Name");
					return false;
				}//end if
				if (Physician_First.value.length<1) {
					alert("Please enter the Physician's First Name");
			    return false;
    		}//end if		
				if (Physician_Last.value.length<1) {
				  alert("Please enter the Physician's Last Name");
					return false;
				}//end if
				if (Specialty[0].checked == false && Specialty[1].checked == false && Specialty[2].checked == false && Specialty[3].checked == false) {
					alert("Please enter a Specialty Type");
			    return false;
    		}//end if		
				if (Specialty[3].checked == true && Specialty_Other.value.length <1) {
					alert("Please enter a Specialty Type");
			    return false;					
				}
				if (Address_1.value.length <1) {
					alert("Please enter an Address");
			    return false;					
				}
				if (City.value.length <1) {
					alert("Please enter a City");
			    return false;					
				}
				if (State.value.length <1) {
					alert("Please enter a State");
			    return false;					
				}
				if (Zip.value.length <1) {
					alert("Please enter an Zip Code");
			    return false;					
				}
				if (Phone.value.length <1) {
					alert("Please enter an Physician Phone Number");
			    return false;					
				}
	}//end with
	return true;
}//end validateProviderNomination
function validateIDCardRequest() {
		with(window.document.idcardrequest) {
		   if (Name.value.length<1) {
				  alert("Please enter the Member Name");
					return false;
				}//end if
				if (Group_Number.value.length<1) {
				  alert("Please enter your Group Number");
					return false;
				}//end if
				if (Phone.value.length<1) {
				  alert("Please enter your Phone Number");
					return false;
				}//end if				
        if (Address_1.value.length <1) {
					alert("Please enter your Address");
			    return false;					
				}
				if (City.value.length <1) {
					alert("Please enter your City");
			    return false;					
				}
				if (State.value.length <1) {
					alert("Please enter your State");
			    return false;					
				}
				if (Zip.value.length <1) {
					alert("Please enter your Zip Code");
			    return false;					
				}		
		}//end with
}//end validateIDCardRequest

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function validateOnlineMaterials(){
	with ( window.document.forms.fepform )
	{
		 if (firstname.value.length == "")
			{
				alert("Your First Name is required. Please try again.");
				firstname.focus()
				return false;
			}
		else if (lastname.value.length == "")
			{
				alert("Your Last Name is required. Please try again.");
				lastname.focus()
				return false;
			}
		else if (idnumber.value.length > 9)
			{
				alert("Your Subscriber ID number is required. It must be at least Nine digits. Please try again.");
				idnumber.focus()
				return false;
			}
		else if (street1.value.length == "")
			{
				alert("Please enter your correct address.");
				street1.focus();
				return false;
			}
		else if (city.value.length == "")
			{
				alert("Please complete your full address including city, state and zip code.");
				city.focus();
				return false;
			}
		else if (state.value.length == "")
			{
				alert("Please complete your full address including city, state and zip code.");
				state.focus();
				return false;
			}
		else if (zip.value.length == "")
			{
				alert("Please complete your full address including city, state and zip code.");
				zip.focus();
				return false;
			}
		return true;
	}
}

function  openBlueEdgeTour() 

{

	var width = screen.width;
	var the_availWidth = screen.availWidth;
	var location = window.location.host;
	//alert(location);
	//window.alert(screen.availWidth);
	//window.alert(screen.width);

	//if the user is using a internet explorer browser

	 if (width=='1024' || width=="1024" || width=="1024") 
	{
		var hires = 'http://'+location+'/mmedia/blueedge/hires.htm';
		//alert(hires);
		window.open(hires,'hires','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=905,height=660'); return false;
	}
	else if (width=='800' || width=="800" || width=="800") 
	{
		var lores = 'http://'+location+'/mmedia/blueedge/lores.htm';
		//alert(lores);
		window.open(lores,'lores','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=667,height=480'); return false;
	}
	else  
	{	
		var hires = 'http://'+location+'/mmedia/blueedge/hires.htm';
		//alert(hires);
		window.open(hires,'hires','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=905,height=660'); return false;
	}
}


