function emailCheck2() {
var productordered;
var checkpros=getcookiep(productordered);
//alert(checkpros);
var n=0;
if(checkpros=="yes")
{
alert("You are already subscribed to this course. There is no need to subscribe again.");document.Form2.from.focus();return false
n=1;
}
//quitting = false;
if (document.Form2.from.value=="") {
n=1;
alert("Please enter your email address.");document.Form2.from.focus();return false
}
if(document.Form2.from.value.indexOf('@', 0) == -1){
n=1;
alert("Please enter a valid email address.");document.Form2.from.focus();return false
}
if(document.Form2.from.value.indexOf('.', 0) == -1){
n=1;
alert("Please enter a valid email address.");document.Form2.from.focus();return false
}
if (document.Form2.name.value=="") {
n=1;
alert("Please enter your first name.");document.Form2.name.focus();return false
}
if (document.getElementById("ln1").value=="") {
n=1;
alert("Please enter your dog name.");document.getElementById("ln1").focus();document.getElementById("ln1").select();return false;
}
if (document.Form2.name.value.length==1) {
n=1;
alert("Please enter your full first name instead of using an abbreviation.");document.Form2.name.focus();return false
}
if(n==0)
{
AddClickTaleTag('MiniCourseSubscribed');
}
var index;
var tmpStr;
var tmpChar;
var preString;
var postString;
var strlen;
tmpStr = document.Form2.name.value.toLowerCase();
strLen = tmpStr.length;
if (strLen > 0)  {
for (index = 0; index < strLen; index++)  {
if (index == 0)  {
tmpChar = tmpStr.substring(0,1).toUpperCase();
postString = tmpStr.substring(1,strLen);
tmpStr = tmpChar + postString;
}
else {
tmpChar = tmpStr.substring(index, index+1);
if (tmpChar == " " && index < (strLen-1))  {
tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
preString = tmpStr.substring(0, index+1);
postString = tmpStr.substring(index+2,strLen);
tmpStr = preString + tmpChar + postString;
         }
      }
   }
}

document.Form2.name.value = tmpStr;
document.Form2.from.value = document.Form2.from.value.toLowerCase();

var expires = 999;
var today = new Date();
var expr = new Date(today.getTime() + (expires * 86400000));
var idnum = document.Form2.name.value;
var name = 'firstnamecookie';
var value = idnum;
var path = '/';
document.cookie = name + "=" +escape(value) +
( (expires) ? ";expires=" + expr.toGMTString() : "") +
( (path) ? ";path=" + path : "");
}
function AddClickTaleTag(Tag)
{
   if (typeof ClickTaleTag=="function")
       ClickTaleTag(Tag);
}
function getcookiep(productordered) {
//var cookieName=tracker;
//alert(document.cookie);
var id = document.cookie;
var cookievalue = "";
if (document.cookie.length > 0) {
cookievaluec = id.split("productordered=");
var n2=cookievaluec.length;
if(n2>1)
{
cookievalue = cookievaluec[1].split(";");
return cookievalue[0];
alert(cookievalue[0]);
}
else
{
 return cookievalue;
}

}
else
{
 return cookievalue;
}

}
