Subscribe

#md_optin_tbl {} #md_optin_tbl td{font-family:Arial}
.md_err {border:2px solid #FF5555 }
.ms_norm {border:}
.md_required {color:#FF5555}

var md_required_arr=new Array(Array("optin_email","te"))

function md_checkEmail(myEmail) {
var reg = /^([A-Za-z0-9_-.])+@([A-Za-z0-9_-.])+.([A-Za-z]{2,8})$/;
if(reg.test(myEmail)) return 1;
else return 0;
}

function md_checkRadio(obj){
var result=0;
obj=document.md_optin[obj];
for(var i=0;i<obj.length;i++){
if(obj[i].checked==true) return 1;
}
return 0;
}

function md_validation(){
var md_temp,flag_err,f_unsub;
f_unsub=(document.getElementById("md_unsubscribe").checked==true)?1:0;
for(md_i in md_required_arr){
switch(md_required_arr[md_i][1]){
case "te":
if(md_checkEmail(document.getElementById("md_"+md_required_arr[md_i][0]).value) || (md_required_arr[md_i][0]!="optin_email" && f_unsub)) md_temp="md_norm";
else {md_temp="md_err";flag_err=1;}
document.getElementById("md_"+md_required_arr[md_i][0]+"_td").className=md_temp;
break;
case "t":
if(document.getElementById("md_"+md_required_arr[md_i][0]).value!="" || f_unsub) md_temp="md_norm";
else {md_temp="md_err";flag_err=1;}
document.getElementById("md_"+md_required_arr[md_i][0]+"_td").className=md_temp;
break;
case "c":
if(document.getElementById("md_"+md_required_arr[md_i][0]).checked || f_unsub) md_temp="md_norm";
else {md_temp="md_err";flag_err=1;}
document.getElementById("md_"+md_required_arr[md_i][0]+"_td").className=md_temp;
break;
case "r":
if(md_checkRadio(md_required_arr[md_i][0]) || f_unsub) md_temp="md_norm";
else {md_temp="md_err";flag_err=1;}
document.getElementById("md_"+md_required_arr[md_i][0]+"_td").className=md_temp;
break;
case "s":
if(document.getElementById("md_"+md_required_arr[md_i][0]).selectedIndex || f_unsub) md_temp="md_norm";
else {md_temp="md_err";flag_err=1;}
document.getElementById("md_"+md_required_arr[md_i][0]+"_td").className=md_temp;
break;
default:
}
}
return (flag_err)?false:true;
return true;
}

* Your Email:

 
  * required field