var REG_MAIL = /^[\w-\.]{2,}@[\w-]{1,}\./;

function check() 
{
	if(!REG_MAIL.test(document.email_form.email.value)) 
	{
		alert("Votre email doit être valable pour recevoir votre accès gratuit !!!");
		document.email_form.email.focus();
	} 
	else 
	{
		var url = "https://secure.securitetotale.com/cb.php?module=guest_cbsys_preform&w=0&force_step1=1&action=step2&email=" + document.email_form.email.value + "&id=" + parentRef.Param.id + "&idp=1&mb&tracker=" + parentRef.Param.tracker + "&synergie=" + parent.My_Param['synergie'] + "&param=&num_facturation=0&oldrf=pvaH_" + parent.My_Param['name_kit'] + "&rf=" + parent.My_Param['rf'] + "&id_site=" + parentRef.My_Param.id_site + "&langue=" + parentRef.Param.lg +"&mb=&e=";
		if (parentRef.Param.id_facturation)
		{
			url += "&id_facturation=" + parentRef.Param.id_facturation;
		}

		window.open(url);
	}
}

//BLINK - IE does not understand the blink css
var text_timer;
var text_visible = 1;
var text_tmp;

function blink()
{
	if (text_visible)
	{
		text_tmp = document.email_form.email.value;
		document.email_form.email.value = '';
		text_visible = false;
	}
	else
	{
		document.email_form.email.value = text_tmp;
		text_visible = true;
	}
}
function start_blink()
{
	if (document.email_form.email.value=='@')
	{
		text_timer = setInterval('blink()', 500);
	}
}
function stop_blink()
{
	if (text_timer)
	{
		clearInterval(text_timer);
	}
}
function email_focus()
{
	stop_blink();
	e = document.email_form.email;
	if (e.value == '@') e.value = '';
}
function email_blur()
{
	e = document.email_form.email;
	if (e.value == '@' || e.value == '')
	{
		e.value = '@';
		start_blink();
	}
}

if (document.all)
{
	document.body.onload = new Function("start_blink();");
}
//BLINK