function hideDhtml(){
	document.getElementById('overlay').style.display = 'none';
    document.getElementById('div_dhtml').style.display = 'none';
}

var text_timer;
var text_visible = 1;
var text_tmp;

function blink()
{
	if (text_visible)
	{
		text_tmp = document.form_dhtml.contact_mail.value;
		document.form_dhtml.contact_mail.value = '';
		text_visible = false;
	}
	else
	{
		document.form_dhtml.contact_mail.value = text_tmp;
		text_visible = true;
	}
}
function start_blink()
{
	if (document.form_dhtml.contact_mail.value=='@')
	{
		text_timer = setInterval('blink()', 500);
	}
}
function stop_blink()
{
	if (text_timer)
	{
		clearInterval(text_timer);
	}
}
function email_focus(form_name)
{
	stop_blink();
	e = document.getElementById(form_name).contact_mail;
	if (e.value == '@') e.value = '';
}
function email_blur(form_name)
{
	e = document.getElementById(form_name).contact_mail;
	if (e.value == '@' || e.value == '')
	{
		e.value = '@';
		start_blink();
	}
}

// verif mail
function validation(form_name, id_video, url)
{
    if(!verif(document.getElementById(form_name).contact_mail.value)) {
    	if(this.id_video == undefined){
    		this.id_video = id_video;
			this.url = url;
		}
		dhtml();
    	return false;
    }
}

function verif(email) { 
	var arobase = email.indexOf("@")
	var point = email.lastIndexOf(".")
	if((arobase < 3)||(point + 2 > email.length) ||(point < arobase+3)){
		return false;
	}
	else {
		sendCatch(email);
		//return false;
		return true;
	}
}

function popunder(url) {
	fenpop = window.open(url, "archiveporno", "toolbar=yes, scrollbars=yes, menubar=yes, location=yes");
	fenpop.blur();
}