function OnButton1()
{
	//document.checki.action = "http://www.safedata.net/admin/assessment_register.asp"
	document.checki.action = "http://www.safedata.jholtweb.com/admin/assessment_register.asp"
	document.checki.target = "_blank";
	
}

function OnButton2()
{
	document.checki.action = "http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
	
	document.checki.submit();
	OnButton1();
	
	return true;
	
	
}
function OnContact1()
{
	//document.checkh.action = "http://www.safedata.net/admin/register.asp"
	document.checkh.action = "http://www.safedata.jholtweb.com/admin/register.asp"
	document.checkh.target = "_blank";
	
}

function OnContact2()
{
	document.checkh.action = "http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
	
	document.checkh.submit();
	OnContact1();
	
	return true;
	
	
}
function OnWhRegister1()
{
	//document.checkj.action = "http://www.safedata.net/admin/wh_register.asp"
	document.checkj.action = "http://www.safedata.jholtweb.com/admin/wh_register.asp"
	document.checkj.target = "_blank";
	
}

function OnWhRegister2()
{
 	document.checkj.action = "http://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"
	
	
	document.checkj.submit();
	OnWhRegister1();
	
	return true;
	
	
}


function checkF(f){
	
	if(f.username.value < 1 || f.username.value == 'Username'){
		f.username.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			f.username.style.background = "#E3E3E3";
			f.password.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(f.password.value < 1 || f.password.value == 'Password'){
		f.password.focus();
		//alert("Please enter your last name.");
		if(document.all || document.getElementById){
			f.password.style.background = "#E3E3E3";
			f.username.style.background = "#FFFFFF";
		}
		return (false);
	}
}

function check(e) {
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){
			return (false);
		}
	}
	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) {
			return (-1);
		}
	}
}

function checkG(g){
if(!check(g.email.value)){
		alert("Please enter a valid Email address.");
		g.email.focus();
		if(document.all || document.getElementById){
			g.email.style.background = "#E3E3E3";
			
		}
		return (false);
	}
}
function checkH(h){
	
	if(h.company.value < 1 || h.company.value == 'Company'){
		h.company.focus();
		//alert("Please enter the name of your company.");
		if(document.all || document.getElementById){
			h.company.style.background = "#E3E3E3";
			h.first_name.style.background = "#FFFFFF";
			h.last_name.style.background = "#FFFFFF";
			h.phone.style.background = "#FFFFFF";
			h.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(h.first_name.value < 1 || h.first_name.value == 'FirstName'){
		h.first_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			h.first_name.style.background = "#E3E3E3";
			h.company.style.background = "#FFFFFF";
			h.last_name.style.background = "#FFFFFF";
			h.phone.style.background = "#FFFFFF";
			h.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(h.last_name.value < 1 || h.last_name.value == 'LastName'){
		h.last_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			h.last_name.style.background = "#E3E3E3";
			h.company.style.background = "#FFFFFF";
			h.first_name.style.background = "#FFFFFF";
			h.phone.style.background = "#FFFFFF";
			h.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(h.phone.value < 1 || h.phone.value == 'Phone'){
		h.phone.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			h.phone.style.background = "#E3E3E3";
			h.company.style.background = "#FFFFFF";
			h.first_name.style.background = "#FFFFFF";
			h.last_name.style.background = "#FFFFFF";
			h.email.style.background = "#FFFFFF";
		}
		return (false);
	}

	
	if(!check(h.email.value)){
		//alert("Please enter a valid Email address.");
		h.email.focus();
		if(document.all || document.getElementById){
			h.email.style.background = "#E3E3E3";
			h.company.style.background = "#FFFFFF";
			h.first_name.style.background = "#FFFFFF";
			h.last_name.style.background = "#FFFFFF";
			h.phone.style.background = "#FFFFFF";
		}
		return (false);
	}
	var blnCheck=false;
	for(t=0;t<checkh.bp_checkgroup.length;t++){
        if (checkh.bp_checkgroup[t].checked) blnCheck=true;
    }
	 
    if (blnCheck){
       
    }else{
        alert("Please select your status.");
		return (false);
	}
	
	var blnCheck2=false;
	 for(t=0;t<checkh.sys_checkgroup.length;t++){
        if (checkh.sys_checkgroup[t].checked) blnCheck2=true;
    }
	 
    if (blnCheck2){
       
    }else{
        alert("Please select a System Type.");
		return (false);
    }
	var blnCheck3=false;
	 for(t=0;t<checkh.dr_checkgroup.length;t++){
        if (checkh.dr_checkgroup[t].checked) blnCheck3=true;
    }
	 
    if (blnCheck3){
       
    }else{
        alert("Please select a Disaster Recovery Provider.");
		return (false);
	}
//	OnContact1();
	OnContact2();
}
function checkI(i){
	
	if(i.first_name.value < 1 || i.first_name.value == 'FirstName'){
		i.first_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			i.first_name.style.background = "#E3E3E3";
			i.company.style.background = "#FFFFFF";
			i.last_name.style.background = "#FFFFFF";
			i.phone.style.background = "#FFFFFF";
			i.email.style.background = "#FFFFFF";
			//i.industry.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(i.last_name.value < 1 || i.last_name.value == 'LastName'){
		i.last_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			i.last_name.style.background = "#E3E3E3";
			i.company.style.background = "#FFFFFF";
			i.first_name.style.background = "#FFFFFF";
			i.phone.style.background = "#FFFFFF";
			i.email.style.background = "#FFFFFF";
			//i.industry.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(i.company.value < 1 || i.company.value == 'Company'){
		i.company.focus();
		//alert("Please enter the name of your company.");
		if(document.all || document.getElementById){
			i.company.style.background = "#E3E3E3";
			i.first_name.style.background = "#FFFFFF";
			i.last_name.style.background = "#FFFFFF";
			i.phone.style.background = "#FFFFFF";
			i.email.style.background = "#FFFFFF";
			//i.industry.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(i.phone.value < 1 || i.phone.value == 'Phone'){
		i.phone.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			i.phone.style.background = "#E3E3E3";
			i.company.style.background = "#FFFFFF";
			i.first_name.style.background = "#FFFFFF";
			i.last_name.style.background = "#FFFFFF";
			i.email.style.background = "#FFFFFF";
			//i.industry.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(!check(i.email.value)){
		//alert("Please enter a valid Email address.");
		i.email.focus();
		if(document.all || document.getElementById){
			i.email.style.background = "#E3E3E3";
			i.company.style.background = "#FFFFFF";
			i.first_name.style.background = "#FFFFFF";
			i.last_name.style.background = "#FFFFFF";
			i.phone.style.background = "#FFFFFF";
			//i.industry.style.background = "#FFFFFF";
		}
		return (false);
	}
	OnButton2();
//	OnButton1();
	
	//if(i.industry.value < 1 || i.industry.value == 'Industry'){
		//i.industry.focus();
		//alert("Please enter your first name.");
		//if(document.all || document.getElementById){
			//i.industry.style.background = "#E3E3E3";
			//i.phone.style.background = "#FFFFFF";
			//i.company.style.background = "#FFFFFF";
			//i.firstname.style.background = "#FFFFFF";
			//i.lastname.style.background = "#FFFFFF";
			//i.email.style.background = "#FFFFFF";
		//}
		//return (false);
	//}
}
function checkJ(j){
	
	if(j.company.value < 1 || j.company.value == 'Company'){
		j.company.focus();
		//alert("Please enter the name of your company.");
		if(document.all || document.getElementById){
			j.company.style.background = "#E3E3E3";
			j.first_name.style.background = "#FFFFFF";
			j.last_name.style.background = "#FFFFFF";
			j.phone.style.background = "#FFFFFF";
			j.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(j.first_name.value < 1 || j.first_name.value == 'FirstName'){
		j.first_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			j.first_name.style.background = "#E3E3E3";
			j.company.style.background = "#FFFFFF";
			j.last_name.style.background = "#FFFFFF";
			j.phone.style.background = "#FFFFFF";
			j.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(j.last_name.value < 1 || j.last_name.value == 'LastName'){
		j.last_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			j.last_name.style.background = "#E3E3E3";
			j.company.style.background = "#FFFFFF";
			j.first_name.style.background = "#FFFFFF";
			j.phone.style.background = "#FFFFFF";
			j.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(j.phone.value < 1 || j.phone.value == 'Phone'){
		j.phone.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			j.phone.style.background = "#E3E3E3";
			j.company.style.background = "#FFFFFF";
			j.first_name.style.background = "#FFFFFF";
			j.last_name.style.background = "#FFFFFF";
			j.email.style.background = "#FFFFFF";
		}
		return (false);
	}

	
	if(!check(j.email.value)){
		//alert("Please enter a valid Email address.");
		j.email.focus();
		if(document.all || document.getElementById){
			j.email.style.background = "#E3E3E3";
			j.company.style.background = "#FFFFFF";
			j.first_name.style.background = "#FFFFFF";
			j.last_name.style.background = "#FFFFFF";
			j.phone.style.background = "#FFFFFF";
		}
		return (false);
	}
}
function checkK(k){
	
	if(k.company.value < 1 || k.company.value == 'Company'){
		k.company.focus();
		//alert("Please enter the name of your company.");
		if(document.all || document.getElementById){
			k.company.style.background = "#E3E3E3";
			k.first_name.style.background = "#FFFFFF";
			k.last_name.style.background = "#FFFFFF";
			k.phone.style.background = "#FFFFFF";
			k.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(k.first_name.value < 1 || k.first_name.value == 'FirstName'){
		k.first_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			k.first_name.style.background = "#E3E3E3";
			k.company.style.background = "#FFFFFF";
			k.last_name.style.background = "#FFFFFF";
			k.phone.style.background = "#FFFFFF";
			k.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(k.last_name.value < 1 || k.last_name.value == 'LastName'){
		k.last_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			k.last_name.style.background = "#E3E3E3";
			k.company.style.background = "#FFFFFF";
			k.first_name.style.background = "#FFFFFF";
			k.phone.style.background = "#FFFFFF";
			k.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(k.phone.value < 1 || k.phone.value == 'Phone'){
		k.phone.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			k.phone.style.background = "#E3E3E3";
			k.company.style.background = "#FFFFFF";
			k.first_name.style.background = "#FFFFFF";
			k.last_name.style.background = "#FFFFFF";
			k.email.style.background = "#FFFFFF";
		}
		return (false);
	}

	
	if(!check(k.email.value)){
		//alert("Please enter a valid Email address.");
		k.email.focus();
		if(document.all || document.getElementById){
			k.email.style.background = "#E3E3E3";
			k.company.style.background = "#FFFFFF";
			k.first_name.style.background = "#FFFFFF";
			k.last_name.style.background = "#FFFFFF";
			k.phone.style.background = "#FFFFFF";
		}
		return (false);
	}
}
function checkL(l){
	if(l.first_name.value < 1 || l.first_name.value == 'FirstName'){
		l.first_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			l.first_name.style.background = "#E3E3E3";
			l.company.style.background = "#FFFFFF";
			l.last_name.style.background = "#FFFFFF";
			l.phone.style.background = "#FFFFFF";
			l.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(l.last_name.value < 1 || l.last_name.value == 'LastName'){
		l.last_name.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			l.last_name.style.background = "#E3E3E3";
			l.company.style.background = "#FFFFFF";
			l.first_name.style.background = "#FFFFFF";
			l.phone.style.background = "#FFFFFF";
			l.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(l.email.value < 1 || l.email.value == 'Email'){
		l.email.focus();
		//alert("Please enter the name of your company.");
		if(document.all || document.getElementById){
			l.company.style.background = "#E3E3E3";
			l.first_name.style.background = "#FFFFFF";
			l.last_name.style.background = "#FFFFFF";
			l.phone.style.background = "#FFFFFF";
			l.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(l.company.value < 1 || l.company.value == 'Company'){
		l.company.focus();
		//alert("Please enter the name of your company.");
		if(document.all || document.getElementById){
			l.company.style.background = "#E3E3E3";
			l.first_name.style.background = "#FFFFFF";
			l.last_name.style.background = "#FFFFFF";
			l.phone.style.background = "#FFFFFF";
			l.email.style.background = "#FFFFFF";
		}
		return (false);
	}
	if(l.phone.value < 1 || l.phone.value == 'Phone'){
		l.phone.focus();
		//alert("Please enter your first name.");
		if(document.all || document.getElementById){
			l.phone.style.background = "#E3E3E3";
			l.company.style.background = "#FFFFFF";
			l.first_name.style.background = "#FFFFFF";
			l.last_name.style.background = "#FFFFFF";
			l.email.style.background = "#FFFFFF";
		}
		return (false);
	}
}



