function toggle(obj)
{
	if (document.getElementById(obj).style.display != 'none')
	{
		document.getElementById(obj).style.display = 'none';
	}
	else
	{
		document.getElementById(obj).style.display = '';
	}
}

function setLinks()
{
	var email = document.getElementById('email').value;
	var email_test = new RegExp("^[0-9a-z\\._]+@[0-9a-z]+\\..+$","i");
	
	if (email_test.test(email))
	{		
		document.getElementById('links').innerHTML = 
		'<a href="http://login.tracking101.com/ez/dwsomckrxxs/&subid1=df_' + email + '" onclick="setHasTried();"><img src="8004.gif" width="468" height="60" border="0" style="margin: 5px;" /></a>' +
		'<a href="http://login.tracking101.com/ez/dwsomchksso/&subid1=df_' + email + '" onclick="setHasTried();"><img src="6013.gif" width="468" height="60" border="0" style="margin: 5px;" /></a>' +
		'<a href="http://login.tracking101.com/ez/dwsomcsrrbo/&subid1=df_' + email + '" onclick="setHasTried();"><img src="5811.gif" width="234" height="60" border="0" style="margin: 5px;" /></a>' +
		'<a href="http://login.tracking101.com/ez/avwakplorsn/&subid1=df_' + email + '" onclick="setHasTried();"><img src="5321.gif" width="468" height="60" border="0" style="margin: 5px;" /></a>';
	}
	else
	{
		alert('Invalid Email Entered');
	}
}

var hasTried = false;

/*window.onbeforeunload = function() {
	if (!hasTried)
	{
		return 'You\'d miss the chance to get a FREE DragonFable Amulet!' + "\n"
			 + 'Why don\'t you press "cancel" and try to complete the first' + "\n"
			 + 'offer to see just how easy it is. You\'ll be done in no time!';
	}
}*/

function setHasTried()
{
	hasTried = true;
}

function getHasTried()
{
	return hasTried;
}