function form_submit() { var msg = ""; if (document.forms[0].email.value != "") { indexAroba = document.forms[0].email.value.indexOf('@'); indexPoint = document.forms[0].email.value.indexOf('.'); if ((indexAroba < 0) || (indexPoint < 0)) { document.forms[0].email.style.backgroundColor = "#FFFF00"; msg += "L\'adresse email est incorrecte !\n"; } } else { document.forms[0].email.style.backgroundColor = "#FFFF00"; msg += "Veuillez saisir votre adresse email !\n"; } if (msg == "") { //winwidth = 1000; winheight = 685; winwidth = screen.availWidth; winheight = screen.availHeight; cbpop = window.open("http://www.unewebcam.com/email.php?s="+winwidth+"&t="+document.forms[0].t.value+"&email="+document.forms[0].email.value, '_blank', 'scrollbars=1, width='+winwidth+', height='+winheight+', left='+(screen.availWidth-winwidth)/2+', top='+(screen.availHeight-winheight)/2); } else { alert(msg); } return false; } function blinkit() { if (!document.getElementById('blinkme')) return; else document.getElementById('blinkme').style.color = document.getElementById('blinkme').style.color == "red" ? "black" : "red"; } var text_timer; var text_visible = 1; var text_tmp; function blink() { if (text_visible) { text_tmp = document.getElementById('email').value; document.getElementById('email').value = ''; text_visible = false; } else { document.getElementById('email').value = text_tmp; text_visible = true; } } function start_blink() { if (document.getElementById('email').value=='@') { text_timer = setInterval('blink()', 400); } if(typeof blinkit_timer == "undefined") blinkit_timer = setInterval('blinkit()', 500); } function stop_blink() { if (text_timer) { clearInterval(text_timer); } } function email_focus() { stop_blink(); if (document.getElementById('email').value == '@') document.getElementById('email').value = ''; } function email_blur() { e = document.getElementById('email'); if (document.getElementById('email').value == '@' || document.getElementById('email').value == '') { document.getElementById('email').value = '@'; start_blink(); } } if (window.addEventListener) window.addEventListener("load", start_blink, false); else if (window.attachEvent) window.attachEvent("onload", start_blink); else if (document.getElementById) window.onload=start_blink; document.write(''); document.write('