function freeReport() { 
	var fr = eval(document.optin.optattr2);
	var fr2 = eval(document.optin.optattr1);
	
	if(fr2.checked == true && checkFN() && checkLN() && emailsMatch() && checkEM()) {
	window.open("http://www.kenvarga.com/", "report","directories,location,menubar,toolbar,scrollbars,resizable,height=500,width=500");
	}
	
	if(fr.checked == true && checkFN() && checkLN() && emailsMatch() && checkEM()) {
	window.open("http://www.kenvarga.com/free_report.html", "report","directories,location,menubar,toolbar,scrollbars,resizable");
	}

	return false;
}
	function checkEM()
	{
		if(document.optin.ea.value.length < 1) { 
			alert("Please enter your E-mail address"); 
			return false;}	
		else return true;
	}
	
	function checkFN()
	{
		if(document.optin.value_100.value.length < 1) { 
			alert("Please enter your first name"); 
			return false;}	
		else return true;
	}
	
	function checkLN()
	{
		if(document.optin.value_300.value.length < 1) { 
			alert("Please enter your last name"); 
			return false;}	
		else return true;
	}
	
	function doUnsubscribe()
	{
	  if (emailsMatch())
	  {
        document.optin.us.value = 'true';	  
		document.optin.submit();   
	  }     
	}
	
	function doSave()
	{
     //document.optin.us.value = 'false';	  
	  if (emailsMatch() && checkFN() && checkLN() && checkEM())
	  {
	  	  if (true)
        {
           checkForUnsubscribe();
        }
	  }
	}
	
	function doCancel()
	{
	
	if(true)
		window.close();	
	}
	
    function emailsMatch()
    {	
		if (false) return true;
    	
    	email1 = document.optin.ea.value;
    	email2 = document.optin.rea.value; 	
    	if (email1.toLowerCase() != email2.toLowerCase())
    	{
    		alert('The email address entered does not match the first email provided.  Please re-enter your email address.');
    		return false;
    	}
		email();
    	return true;
    }
    

    function checkForUnsubscribe(){
        var total = 0;
        
          if (document.optin.elements['optattr1'].checked) {
              total++;
          }
          if (document.optin.elements['optattr2'].checked) {
              total++;
          }

if (total == 0) {
			if ('true' == 'true') {
                if( window.confirm('Please choose newsletter, free report or both') ){
               }
            }
            else {
                if ('false' == 'true') {
                    if( window.confirm('Would you like to be removed from all future email campaigns from Creating Customers, LLC?') ){
                        document.optin.us.value = 'true';
                    }
                }
                document.optin.submit();
            }
        }
        else {
            document.optin.submit();
        }
    }
    
	function email() {
	var email=document.optin.rea.value;
	document.optin.value_5000.value = email;
	
	//var email=document.optin.forms['optin'].elements['rea'].value;
	//document.optin.forms['optin'].elements['value_5000'].value = email;
	//email=document.forms['optin'].elements['rea'].value;
	//document.optin.value_5000.value = email;
	}
	
		function profession()
	{
		if(document.optin.value_5100.value.length < 1) { 
			alert("Please enter your profession"); 
			return false;}	
		else return true;
	}

