<!--
var fabricguideWindow=null;
function fabricguide(mypage,myname,w,h,pos,infocus){

if (pos == 'random')
{LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
else
{LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';fabricguideWindow=window.open('',myname,settings);
if(infocus=='front'){fabricguideWindow.focus();fabricguideWindow.location=mypage;}
if(infocus=='back'){fabricguideWindow.blur();fabricguideWindow.location=mypage;fabricguideWindow.blur();}

}
// -->

function ekmResponseSignupUser()
{
	var firstName = document.getElementById("ekmResponseFirstName");
	var lastName = document.getElementById("ekmResponseLastName");
	var emailAddress = document.getElementById("ekmResponseEmailAddress");

	ekmResponseSignup(firstName.value, lastName.value, emailAddress.value);
}

function ekmResponseSignup(firstname, lastname, email)
{		
	var requestURL = "http://www.ekmresponse.com/Web%20Services/RecipientSignup.ashx?GroupID=528&UserID=176&Hash=28e4f2d216e374fa7058195abeaef04ebef69003383102985d220be0eb778abe&FirstName=" + firstname + "&LastName=" + lastname + "&Email=" + email + "&Date=" + Date();
	ekmResponseDoSignup(requestURL);
	setTimeout("ekmResponseGetResponse();", 100);
}

function ekmResponseGetResponse()
{
	var responseScript = document.getElementById("ekmResponseRequestScript");
	
	if  (typeof(ekmResponseStatus) != "undefined")
	{
		var emailInput = document.getElementById("ekmResponseEmailAddress");
				
		if (ekmResponseStatus.match("Thanks"))
		{
			var button = document.getElementById("ekmResponseSignupButton");
			button.value = ekmResponseStatus;
			button.disabled = true;
			emailInput.style.backgroundColor = "#e0ffe0";
		}
		else
		{
			emailInput.style.backgroundColor = "#ffe4e1";
			alert("Your signup could not be taken:\n\n" + ekmResponseStatus);
		}
	}
	else
	{
		setTimeout("ekmResponseGetResponse();", 100);
	}
}

function ekmResponseDoSignup(url)
{
	var responseScript = document.getElementById("ekmResponseRequestScript");
	var head = document.getElementsByTagName("head").item(0);
	
	if (responseScript) 
	{
		head.removeChild(responseScript);
	}
	
	responseScript = document.createElement("script");
	responseScript.setAttribute("src", url);
	responseScript.setAttribute("id", "ekmResponseRequestScript");

	head.appendChild(responseScript);
}
