function RegisterNow()
{
	var frmMain;
	var isIE = true;
	
	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) 
		frmMain = document.frmMain;
	else 
	{
		frmMain = document.forms["frmMain"];
		isIE = false;
	}
	
	var form = document.createElement("form");
	
	form.setAttribute("name","Survey");
	form.setAttribute("method","post");
	form.setAttribute("action","http://sp1.actemarketing.com/The_Training_Surgery_Ltd.shelleyf/SurveyTTSWebsiteForm/Survey.aspx");
	form.setAttribute("id","Survey");
	if(isIE)
		form.setAttribute("target","_blank");
	else
		form.setAttribute("target","_self");
	
	var recEmail = document.createElement("input");
	recEmail.type = "hidden";
	recEmail.name = "RecEmail";
	recEmail.id = "RecEmail";
	form.appendChild(recEmail);
	
	var guid = document.createElement("input");
	guid.type = "hidden";
	guid.name = "Guid";
	guid.id = "Guid";
	form.appendChild(guid);
	
	var firstName = document.createElement("input");
	firstName.type = "hidden";
	firstName.name = "SurveyData1";
	firstName.id = "SurveyData1";
	firstName.value = frmMain.SurveyData1.value;
	form.appendChild(firstName);
	
	var surName = document.createElement("input");
	surName.type = "hidden";
	surName.name = "SurveyData2";
	surName.id = "SurveyData2";
	surName.value = frmMain.SurveyData2.value;
	form.appendChild(surName);
	
	var email = document.createElement("input");
	email.type = "hidden";
	email.name = "SurveyData3";
	email.id = "SurveyData3";
	email.value = frmMain.SurveyData3.value;
	form.appendChild(email);
	
	var comp = document.createElement("input");
	comp.type = "hidden";
	comp.name = "SurveyData4";
	comp.id = "SurveyData4";
	comp.value = frmMain.SurveyData4.value;
	form.appendChild(comp);
	
	var phone = document.createElement("input");
	phone.type = "hidden";
	phone.name = "SurveyData5";
	phone.id = "SurveyData5";
	phone.value = frmMain.SurveyData5.value;
	form.appendChild(phone);
	
	document.body.appendChild( form );
	
	form.submit();	
	
	if(document.getElementById('frmDiv'))
		CloseSignup();
}

function CloseSignup()
{
	document.getElementById('frmDiv').style.width="0px";
	document.getElementById('frmDiv').style.height="0px";
	document.getElementById('frmDiv').style.visibility="visible";
	document.getElementById('frmDiv').style.position="fixed";
	document.getElementById('frmDiv').style.zIndex="0";
	document.getElementById('frmDiv').style.top="-10000px";
	document.getElementById('frmDiv').style.left="-10000px";
	//document.getElementById('frmDiv').style.backgroundColor = "white";
	
	document.getElementById('freezeDiv').style.width  ="0%";
	document.getElementById('freezeDiv').style.height="0%";
	document.getElementById('freezeDiv').style.visibility="visible";
	document.getElementById('freezeDiv').style.position="fixed";
	document.getElementById('freezeDiv').style.zIndex="0";
	document.getElementById('freezeDiv').style.top="-10000px";
	document.getElementById('freezeDiv').style.left="-10000px";
	document.getElementById('freezeDiv').style.backgroundColor = "black";
	
	var theform;
	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) 
	{
		theform = document.frmMain;
	}
	else 
	{
		theform = document.forms["frmMain"];
	}
	
	for (i=0;i<theform.elements.length;i++) {
		el = theform.elements[i];
		
		if(el)
			el.disabled=false;
	}
	
	return;
}

function openSignupForm() {
	document.getElementById('freezeDiv').style.width  ="100%";
	document.getElementById('freezeDiv').style.height="100%";
	document.getElementById('freezeDiv').style.visibility="visible";
	document.getElementById('freezeDiv').style.position="fixed";
	document.getElementById('freezeDiv').style.zIndex="99";
	document.getElementById('freezeDiv').style.top="0px";
	document.getElementById('freezeDiv').style.left="0px";
	document.getElementById('freezeDiv').style.backgroundColor = "black";
	
	document.getElementById('frmDiv').style.width="276px";
	document.getElementById('frmDiv').style.height="381px";
	document.getElementById('frmDiv').style.visibility="visible";
	document.getElementById('frmDiv').style.position="fixed";
	document.getElementById('frmDiv').style.zIndex="9999";
	
	var top, left, width, height; 
	width = pageWidth();
	height = pageHeight();
	
	left = (width-276)/2;
	top = (height-381)/2;
	
	document.getElementById('frmDiv').style.top=top.toString()+"px";
	document.getElementById('frmDiv').style.left=left.toString()+"px";
	//document.getElementById('frmDiv').style.backgroundColor = "white";
	
/*	
	var theform;
	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) 
	{
		theform = document.frmMain;
	}
	else 
	{
		theform = document.forms["frmMain"];
	}
	
	for (i=0;i<theform.elements.length;i++) {
		el = theform.elements[i];
		
		if(el)
		{
			if(el.type!='input')
				el.disabled=true;
		}
	}
*/
	/*
	myLinks = document.getElementsByTagName("a");

	for (j=0;j<myLinks.length;j++) {
		myLinks[j].href="";
	}
	*/
}

// Browser Window Size and Position
// copyright Stephen Chapman, 3rd Jan 2005, 8th Dec 2005
// you may copy these functions but please keep the copyright notice as well
function pageWidth() 
{
	return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?       document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;
} 

function pageHeight() 
{
	return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ?  document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;
} 

function posLeft() 
{
	return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;
} 

function posTop() 
{
	return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;
} 

function posRight() 
{
	return posLeft()+pageWidth();
} 

function posBottom() 
{
	return posTop()+pageHeight();
}
