<!-- hide from older browsers

var xmlHttp

function xUpField26(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="xUpField26.php";
  var params = "q1=" + encodeURI(document.getElementById("q1").value)+
	"&q2=" + encodeURI(document.getElementById("q2").value)+
	"&q3=" + encodeURI(document.getElementById("q3").value)+
	"&q4=" + encodeURI(document.getElementById("q4").value)+
	"&q5=" + encodeURI(document.getElementById("q5").value)+
	"&q6=" + encodeURI(document.getElementById("q6").value)+
	"&q7=" + encodeURI(document.getElementById("q7").value)+
	"&q8=" + encodeURI(document.getElementById("q8").value)+
	"&q9=" + encodeURI(document.getElementById("q9").value)+
	"&q10=" + encodeURI(document.getElementById("q10").value)+
	"&q11=" + encodeURI(document.getElementById("q11").value)+
	"&q12=" + encodeURI(document.getElementById("q12").value)+
	"&q13=" + encodeURI(document.getElementById("q13").value)+
	"&q14=" + encodeURI(document.getElementById("q14").value)+
	"&q15=" + encodeURI(document.getElementById("q15").value)+
	"&q16=" + encodeURI(document.getElementById("q16").value)+
	"&q17=" + encodeURI(document.getElementById("q17").value)+
	"&q18=" + encodeURI(document.getElementById("q18").value)+
	"&q19=" + encodeURI(document.getElementById("q19").value)+
	"&q20=" + encodeURI(document.getElementById("q20").value)+
	"&q21=" + encodeURI(document.getElementById("q21").value)+
	"&q22=" + encodeURI(document.getElementById("q22").value)+
	"&q23=" + encodeURI(document.getElementById("q23").value)+
	"&q24=" + encodeURI(document.getElementById("q24").value)+
	"&q25=" + encodeURI(document.getElementById("q25").value)+
	"&q26=" + encodeURI(document.getElementById("q26").value)+
	"&Luser=" + encodeURI(document.getElementById("Luser").value)+
	"&Lfn=" + encodeURI(document.getElementById("Lfn").value)+
	"&xname=" + encodeURI(document.getElementById("xname").value)+
	"&xmail=" + encodeURI(document.getElementById("xmail").value)+
	"&mod=" + encodeURI(document.getElementById("mod").value);

xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}


function xUpField1(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="xUpField1.php";
  var params = "q1=" + encodeURI(document.getElementById("q1").value)+
	"&Luser=" + encodeURI(document.getElementById("Luser").value)+
	"&Lfn=" + encodeURI(document.getElementById("Lfn").value)+
	"&xname=" + encodeURI(document.getElementById("xname").value)+
	"&xmail=" + encodeURI(document.getElementById("xmail").value)+
	"&mod=" + encodeURI(document.getElementById("mod").value);

xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}


function xUpField5(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="xUpField5.php";
  var params = "q1=" + encodeURI(document.getElementById("q1").value)+
	"&q2=" + encodeURI(document.getElementById("q2").value)+
	"&q3=" + encodeURI(document.getElementById("q3").value)+
	"&q4=" + encodeURI(document.getElementById("q4").value)+
	"&q5=" + encodeURI(document.getElementById("q5").value)+
	"&Luser=" + encodeURI(document.getElementById("Luser").value)+
	"&Lfn=" + encodeURI(document.getElementById("Lfn").value)+
	"&xname=" + encodeURI(document.getElementById("xname").value)+
	"&xmail=" + encodeURI(document.getElementById("xmail").value)+
	"&mod=" + encodeURI(document.getElementById("mod").value);

xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}


function xUpField10(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="xUpField10.php";
  var params = "q1=" + encodeURI(document.getElementById("q1").value)+
	"&q2=" + encodeURI(document.getElementById("q2").value)+
	"&q3=" + encodeURI(document.getElementById("q3").value)+
	"&q4=" + encodeURI(document.getElementById("q4").value)+
	"&q5=" + encodeURI(document.getElementById("q5").value)+
	"&q6=" + encodeURI(document.getElementById("q6").value)+
	"&q7=" + encodeURI(document.getElementById("q7").value)+
	"&q8=" + encodeURI(document.getElementById("q8").value)+
	"&q9=" + encodeURI(document.getElementById("q9").value)+
	"&q10=" + encodeURI(document.getElementById("q10").value)+
	"&Luser=" + encodeURI(document.getElementById("Luser").value)+
	"&Lfn=" + encodeURI(document.getElementById("Lfn").value)+
	"&xname=" + encodeURI(document.getElementById("xname").value)+
	"&xmail=" + encodeURI(document.getElementById("xmail").value)+
	"&mod=" + encodeURI(document.getElementById("mod").value);

xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}


function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
//document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}


function stateChanged5() 
{ 
 if (xmlHttp.readyState==4)
 { 
  document.getElementById("txtu3").innerHTML=xmlHttp.responseText;
 }
}


function xID0(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="xID0.php";
url=url+"?qID="+str;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged5;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}


function PromptMe(thisform)
{
var name = prompt("Please enter your \'email address\' in the box below and \rpress the \'OK\' button.","");

thisform.dept.value = name;
return true;
}

function goFoods(xname,xW,xH,xT,xL) 
{
TheNewWin =window.open(xname,'TheNewpop','width=' + xW + ',height=' + xH + 'top=' + xT + ',left=' + xL + ', toolbar=no,menubar=no,resizable=no,directories=no,status=no'); 
}


function CheckEntry() 
{
 if (document.keepform5.rptss[0].checked==false && document.keepform5.rptss[1].checked==false && document.keepform5.rptss[2].checked==false && document.keepform5.rptss[3].checked==false && document.keepform5.rptss[4].checked==false)
 {
  alert('You will need to Choose an Option from the Menu to Continue.');
  return false;
 }
 return true;
}

function valid2(thisform)
{

  if (thisform.Luser.value.indexOf(".") < 2)
  {
   alert ("Please enter a valid Username. This is the Email address you used at Course Registration");
   thisform.Luser.focus();
   thisform.Luser.select();
   return false;
  }

  if (thisform.Luser.value.indexOf("@") < 0)
  {
   alert ("Please enter a valid Username. This is the Email address you used at Course Registration");
   thisform.Luser.focus();
   thisform.Luser.select();
   return false;
  }

  if (thisform.Lpassw.value.length < 1)
  {
   alert ("Please enter your Password. This is the password that you chose at Course Registration.");
   thisform.Lpassw.focus();
   thisform.Lpassw.select();
   return false;
  }
 
  if (thisform.Lpassw.value.length > 1)
  {
   return true;
  }
}

function valid3(thisform)
{
  if (thisform.fname.value.length < 1)
  {
   alert ("Please enter a valid First Name.");
   thisform.fname.focus();
   thisform.fname.select();
   return false;
  }

  if (thisform.lname.value.length < 1)
  {
   alert ("Please enter a valid Last Name.");
   thisform.lname.focus();
   thisform.lname.select();
   return false;
  }


  if (thisform.city.value.length < 1)
  {
   alert ("Please enter a valid City.");
   thisform.city.focus();
   thisform.city.select();
   return false;
  }

  if (thisform.zip.value.length < 1)
  {
   alert ("Please enter a valid Zip Code.");
   thisform.zip.focus();
   thisform.zip.select();
   return false;
  }


  if (thisform.email.value.indexOf(".") < 2)
  {
   alert ("Please enter a valid Email address.");
   thisform.email.focus();
   thisform.email.select();
   return false;
  }

  if (thisform.email.value.indexOf("@") < 0)
  {
   alert ("Please enter a valid Email address.");
   thisform.email.focus();
   thisform.email.select();
   return false;
  }

  if ((thisform.Lpasswn.value.length < 4) || (thisform.Lpasswn.value.length > 10)) 
  {
   alert ("Select Password is not the Correct Length.  The Select password must be at least 4 characters & not more than 10 characters in length.");
   thisform.Lpasswn.focus();
   thisform.Lpasswn.select();
   return false;
  }
  if ((thisform.Lpasswc.value) != (thisform.Lpasswn.value)) 
  {
   alert ("Confirm Password not the same as Select password.  Please Enter the same password for both Select password and Confirm password.");
   thisform.Lpasswc.focus();
   thisform.Lpasswc.select();
   return false;
  }

  if (thisform.comments1.value.length < 1) 
  {
   alert ("How did you learn about this \"Living With Purpose\" course?. [a maximum of 200 characters can be entered].");
   thisform.comments1.focus();
   thisform.comments1.select();
   return false;
  }

  if (thisform.comments2.value.length < 1) 
  {
   alert ("What do you want to achieve by participating in this 40-day course?. [a maximum of 200 characters can be entered].");
   thisform.comments2.focus();
   thisform.comments2.select();
   return false;
  }

  if (thisform.comments3.value.length < 1) 
  {
   alert ("Why are you committed to successfully completing this 40-day course?. [a maximum of 200 characters can be entered].");
   thisform.comments3.focus();
   thisform.comments3.select();
   return false;
  }

  if (thisform.lname.value.length > 1)
  {
   return true;
  }
}

function valid4(thisform)
{

  if (thisform.fname.value.length < 1)
  {
   alert ("Please enter a valid First Name.");
   thisform.fname.focus();
   thisform.fname.select();
   return false;
  }


  if (thisform.lname.value.length < 1)
  {
   alert ("Please enter a valid Last Name.");
   thisform.lname.focus();
   thisform.lname.select();
   return false;
  }


  if (thisform.email.value.indexOf(".") < 2)
  {
   alert ("Please enter a valid Email address.");
   thisform.email.focus();
   thisform.email.select();
   return false;
  }

  if (thisform.email.value.indexOf("@") < 0)
  {
   alert ("Please enter a valid Email address.");
   thisform.email.focus();
   thisform.email.select();
   return false;
  }

  if ((thisform.Lpasswn.value.length < 4) || (thisform.Lpasswn.value.length > 10)) 
  {
   alert ("Select Password is not the Correct Length.  The Select password must be at least 4 characters & not more than 10 characters in length.");
   thisform.Lpasswn.focus();
   thisform.Lpasswn.select();
   return false;
  }
  if ((thisform.Lpasswc.value) != (thisform.Lpasswn.value)) 
  {
   alert ("Confirm Password not the same as Select password.  Please Enter the same password for both Select password and Confirm password.");
   thisform.Lpasswc.focus();
   thisform.Lpasswc.select();
   return false;
  }

  if (thisform.comments1.value.length < 1) 
  {
   alert ("How did you learn about this \"Living With Purpose\" course?. [a maximum of 200 characters can be entered].");
   thisform.comments1.focus();
   thisform.comments1.select();
   return false;
  }

  if (thisform.comments2.value.length < 1) 
  {
   alert ("What do you want to achieve by participating in this 40-day course?. [a maximum of 200 characters can be entered].");
   thisform.comments2.focus();
   thisform.comments2.select();
   return false;
  }

  if (thisform.comments3.value.length < 1) 
  {
   alert ("Why are you committed to successfully completing this 40-day course?. [a maximum of 200 characters can be entered].");
   thisform.comments3.focus();
   thisform.comments3.select();
   return false;
  }

  if (thisform.comments1.value.length > 1)
  {
   return true;
  }
}



/*
function validss1() 
{
 alert ("Please Watch the Video before taking the Daily Assignment.");
 return true ;
}
*/


function validss1() 
{
var x=window.confirm("Please Watch the Video before taking the Daily Assignment.\r\rHave you watched the Video?\r\r[OK=\'Yes\' Cancel=\'No\']")
if (x)
 {
  window.alert("Great! Here is your Daily Assignment.");
  return true ;
 }
else
 {
  window.alert("Please Watch the Video before taking the Daily Assignment.");
  return false ;
 }
}


/*
function validss1()
  {
  var r=confirm("Please Watch the Video before taking the Daily Assignment. Have you watched the Video? Ok=")
  if (r==true)
    {
    document.write("Great! Proceed to the Daily Assignment.");
    return true ;
history.go(-1);
    }
  else
    {
    document.write("Please Watch the Video before taking the Daily Assignment.");
    return false ;
history.go(-1);
    }
  }
*/

function validss2() 
{
// confirm ("Inside video validate ");
document.Formd1.ssbn1.value = "w";
document.Formd1.action="xwatch.php";
document.Formd1.submit();
 return true ;
}

function validss3() 
{
// confirm ("Inside video validate ");
document.Formd1.ssbn1.value = "w";
document.Formd1.action="xwatch2.php";
document.Formd1.submit();
 return true ;
}


// done hiding -->