function closeCatfish()
{
	// set time, it's in milliseconds
	var today = new Date();
	today.setTime(today.getTime());
	expires = 30 * 1000 * 60 * 60 * 24;
	var expires_date = new Date(today.getTime() + (expires));
	
	document.cookie = "q1CatClosed=" +escape(1) +
	((expires) ? ";expires=" + expires_date.toGMTString() : "" );
}

function processSignup1(theForm)
{	
	var qstring = 'email='+theForm.email.value+'&formName='+theForm.formid.value;
	$.ajax({
		url: '/index/ajaxemailprocess',
		method: 'post',
		data: qstring,					
		success: function(data) {
			var json = $.evalJSON(data);
			if(json.success == 'true')
			{
				window.location = "http://www.q1publishing.com/dispatch/thankyou";
			}
			else
			{
				var form = '<form name="ajaxemailform" onsubmit="return processSignup1(this)" action=""><div style="float:left; padding:5px; font-weight:bold;">Email Address:</div><div style="float:left; margin-right:10px;"><input style="width:200px; background:#a13422; color:white; padding:5px; border:none;" type="text" name="email" id="email" value="" /></div><div><input style="background:white; border:solid 2px #a13422; padding:2px;" type="submit" name="submit" id="submit" value="Send My Free Report" /></div></form>';
				$('.ajaxsignupform').html(form+json.message);
			}
		}
	});
	return false;	
}