// JavaScript Document
function checkForm(msg,msg2){
	document.getElementById('msgfield').style.color='#FFFFFF';
	document.getElementById('privacy-cell').style.backgroundColor='';
	document.getElementById('brands-cell').style.backgroundColor='';
	for(var i = 0; i < document.form1.elements.length; i++) {
		myName = document.form1.elements[i].name;
		if (myName.charAt(0) == "F"){
			myNameH = myName.replace('F','');
			myNameH = myNameH + '_default';
			checkS = 'document.form1.' + myNameH + '';
			if(eval(checkS)){
			    document.getElementById(myName).style.backgroundColor='#3F3D3D';
					if(eval(checkS).value == document.form1.elements[i].value){
					   document.getElementById('msgfield').style.color='#FF0000';
					   document.getElementById(myName).style.backgroundColor='#FF0000';
					   return;
					}
			}
		}
	}
	if(document.form1.privacy.checked == false){
		document.getElementById('msgfield').style.color='#FF0000';
		document.getElementById('privacy-cell').style.backgroundColor='#FF0000';
		return;
	}
	if(!checkEMail(document.form1.Femail.value)){
		document.getElementById('msgfield').style.color='#FF0000';
		document.getElementById('msgfield').innerHTML = msg2;
		document.getElementById('Femail').style.backgroundColor='#FF0000';
		return;
	}
/*	for(var i = 0; i < document.form1.elements.length; i++) {
		myName = document.form1.elements[i].name;
		$myC = 0;
		if (myName.charAt(0) == "B"){
			if(document.form1.elements[i].checked == true){
			   $myC++;
			   break;
			}
		}
	}
	if($myC == 0){
	   document.getElementById('msgfield').innerHTML = msg;
	   document.getElementById('msgfield').style.color='#FF0000';
	   document.getElementById('brands-cell').style.backgroundColor='#FF0000';
	   return;
	}*/
	document.form1.submit();
}
function doUnsubscribe(){
	if(document.form1.email.value != ''){
	   document.form1.submit(); 
	}
}