<!----------CACHER LE LIEN DANS LA BARRE DE STATUT------------>

function hidestatus(){

	window.status='Rencontre coquines ou sérieuses avec tchat webcam audio !'
	return true
	
}

if (document.layers)

	document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
	document.onmouseover=hidestatus
	document.onmouseout=hidestatus
	
<!----------------FONCTION EMPECHER CLIC DROIT-------------->
<!-- DEBUT DU SCRIPT -->
// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS) document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler()
{ if(EnableRightClick==1)
{ return true; }
else {return false; }}
function mousehandler(e)
{ if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;}
function keyhandler(e) { var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96) EnableRightClick = 1;
return;}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
<!-- FIN DU SCRIPT -->
	
<!----------FONCTION IMAGE ROLLOVER------------>
	
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

<!----------FONCTION AJOUTER AUX FAVORIS------------>

function addToFavorites (url, page) {
	
	if (navigator.appName != 'Microsoft Internet Explorer') {
		
		window.sidebar.addPanel(page,url,"");
		
	}
	
	else {
		
		window.external.AddFavorite(url,page);
		
	}	
}

<!----------FONCTION METTRE EN PAGE DE DEMARRAGE------------>

function homePage (page, url) {

	page.style.behavior='url(#default#homepage)';
	page.setHomePage(url);

}

<!----------FONCTION MASQUER / AFFICHER LES FORMULAIRES------------>

function visibilite (formulaire,invisible) {
	
	var targetElement;
	targetElement = document.getElementById(formulaire);
	
	if (targetElement.style.display == "none") {
		targetElement.style.display = "" ;
	}
	else {
		targetElement.style.display = "none" ;
	}
	
	if (invisible != "") { //masquer le formulaire 'identifiants perdus' lorsqu'on clique sur le bouton 'deja membre'
		document.getElementById(invisible).style.display = "none";
	}

}

<!------------------------FONCTION VERIFICATION EMAIL--------------------------->

function checkEmail(emailAddr) {
	// Cette fonction vérifie le bon format d'une adresse e-mail.
	// Comme :
	// user@domain.com ou user.perso@domain.com
	
	var i;
	
	// Recherche de @
	i = emailAddr.indexOf("@");
	if (i == -1) {
		return false;
	}
	
	// Séparation du nom de l'utilisateur et du nom de domaine.
	var username = emailAddr.substring(0, i);
	var domain = emailAddr.substring(i + 1, emailAddr.length)

	// Recherche des espaces au début du nom de l'utilisateur.
	i = 0;
	while ((username.substring(i, i + 1) == " ") && (i < username.length)) {
		i++;
	}
	// Les enlève s'il en trouve.
	if (i > 0) {
		username = username.substring(i, username.length);
	}

	// Recherche d'espaces à la fin du nom de domaine.
	i = domain.length - 1;
	while ((domain.substring(i, i + 1) == " ") && (i >= 0)) {
		i--;
	}
	// Les enlève s'il en trouve.
	if (i < (domain.length - 1)) {
		domain = domain.substring(0, i + 1);
	}

	// Vérifie que le nom de l'utilisateur et du domaine ne soit pas vide.
	if ((username == "") || (domain == "")) {
		return false;
	}
	
	// Vérifie s'il n'y a pas de caractères interdits dans le nom de l'utilisateur.
	var ch;
	for (i = 0; i < username.length; i++) {
		ch = (username.substring(i, i + 1)).toLowerCase();
		if (!(((ch >= "a") && (ch <= "z")) || 
			((ch >= "0") && (ch <= "9")) ||
			(ch == "_") || (ch == "-") || (ch == "."))) {
				return false;
		}
	}
	
	// Vérifie s'il n'y a pas de caractères interdits dans le nom de domaine
	for (i = 0; i < domain.length; i++) {
		ch = (domain.substring(i, i + 1)).toLowerCase();
		if (!(((ch >= "a") && (ch <= "z")) || 
			((ch >= "0") && (ch <= "9")) ||
			(ch == "_") || (ch == "-") || (ch == "."))) {
				return false;
		}
	}

// Ajouter ci-dessous de nouveaux noms de domaine.
// Voir tous les noms de domaine sur http://www.toulouse-renaissance.net/c_outils/c-nom-domaine.htm
//
var aSuffix = new Array("com","net","int","aero","biz","museum","name","info","coop","pro","eu","edu","org","gov","mil","bj","dz","de","ad","be","ca","bf","bi","cm","cf","cg","cd","ci","dj","fr","ga","gp","gf","lu","mg","ml","ma","mq","mr","mc","nc","pf","re","pm","sn","ch","td","tf","tn","COM","NET","INT","AERO","BIZ","MUSEUM","NAME","INFO","COOP","PRO","EU","EDU","ORG","GOV","MIL","BJ","DZ","DE","AD","BE","CA","BF","BI","CM","CF","CG","CD","CI","DJ","FR","GA","GP","GF","LU","MG","ML","MA","MQ","MR","MC","NC","PF","RE","PM","SN","CH","TD","TF","TN");
	var bFoundSuffix = false;
	i = 0;
	while (i < aSuffix.length) {
		if (("." + aSuffix[i]) == domain.substring(domain.length - aSuffix[i].length - 1, domain.length)) {
			return true;
		}
		i++;
	}
	// Si le nom de domaine est inconnu  : return false
	return false;
	
}	

function emailOK(emailAddr) {
	
	if (!(checkEmail(emailAddr))) {
		alert("Adresse email invalide ! Merci de la corriger");
	}
	
}

<!----------------FONCTION VERIFICATION FORMULAIRE LOGIN-------------->

function verifFormLogin() {

	var rempli = true; //initialisation de la variable "rempli" - on presuppose que tous les champs sont remplis
	
	for (var i=1;i<3;i++) { //on verifie si un des champs est vide
		
		if (document.formLogin.elements[i].value == "") { //si champ vide		
			rempli = false;
			break;
		}
		
	}
	
	if (rempli == false) {
		alert("Merci d'indiquer vos pseudo et mot de passe !");
		return false;
	}
	
	else {
	    if (document.formLogin.version[0].checked) {
		  site = "webcamcoquine.com";
	    }
	    else {
		  site = "lovelove.fr";
	    }
		document.formLogin.action = "http://rencontre-visiocam."+site+"/member.php?comefrom=index";
		return true;
	}
	
}

<!----------------FONCTION VERIFICATION FORMULAIRE EMAIL-------------->

function verifFormMail() {
		
	if (document.formMail.email.value == "") { //si champ vide		
		alert("Merci d'indiquer votre email pour que vos identifiants vous soient renvoyés !");
		return false;
	}
	
	else {
	    if (document.formMail.version[0].checked) {
		  site = "webcamcoquine.com";
	    }
	    else {
		  site = "lovelove.fr";
	    }
		document.formMail.action = "http://rencontre-visiocam."+site+"/mail/pop_lost_pwd.php";
		return true;
	}
	
}

<!----------------FONCTION VERIFICATION FORMULAIRE INSCRIPTION-------------->

function verifFormRegister() {
	
	if (document.formRegister.cgu.checked == false) {
		alert("Veuillez cocher la case indiquant que vous acceptez la charte du site");
		return false;
	}
	
	var rempli = true; //initialisation de la variable "rempli" - on presuppose que tous les champs sont remplis
	
	for (var i=1;i<5;i++) { //on verifie si un des champs est vide
		
		if (document.formRegister.elements[i].value == "") { //si champ vide		
			rempli = false;
			break;
		}
		
	}
	
	if (rempli == false) {
		alert("Merci de remplir tous les champs du formulaire !");
		return false;
	}
	
	else {
	    if (document.formRegister.version[0].checked) {
		  site = "webcamcoquine.com";
		  idoc = 14837;
	    }
	    else {
		  site = "lovelove.fr";
		  idoc = 14834;
	    }

		document.formRegister.action = "http://rencontre-visiocam."+site+"/template_index/php/include/suite_1ere_page_inscription.php?i=106&idoc="+idoc+"&isay=3429&page_inscription=www.rencontre-visiocam.com&tc=general";
		return true;
	}
	
}

<!----------------FONCTION VERIFICATION FORMULAIRE POP UP INSCRIPTION-------------->

function verifFormulaireRegister() {
	
	if (document.formulaireRegister.cgu.checked == false) {
		alert("Veuillez cocher la case indiquant que vous acceptez la charte du site");
		return false;
	}
	
	var rempli = true; //initialisation de la variable "rempli" - on presuppose que tous les champs sont remplis
	
	for (var i=1;i<5;i++) { //on verifie si un des champs est vide
		
		if (document.formulaireRegister.elements[i].value == "") { //si champ vide		
			rempli = false;
			break;
		}
		
	}
	
	if (rempli == false) {
		alert("Merci de remplir tous les champs du formulaire !");
		return false;
	}
	
	else {
	    if (document.formulaireRegister.version[0].checked) {
		  site = "webcamcoquine.com";
		  idoc = 14837;
	    }
	    else {
		  site = "lovelove.fr";
		  idoc = 14834;
	    }

		document.formulaireRegister.action = "http://rencontre-visiocam."+site+"/template_index/php/include/suite_1ere_page_inscription.php?i=106&idoc="+idoc+"&isay=3429&page_inscription=www.rencontre-visiocam.com&tc=general";
		return true;
	}
	
}

<!----------FONCTION POPUP------------>

function popup1(site, largeur, hauteur, scrollb)
{
	window.open(site, "CGU", "width="+largeur+", height="+hauteur+", left="+((screen.width - largeur)/2)+", top="+((screen.height - hauteur)/2)+", scrollbars="+scrollb+", resizable=no, location=no, toolbar=no, menubar=no");
}

function popup2(site)
{
	window.open(site, "CGU", "width=460, height=600, scrollbars=yes, resizable=no, location=no, toolbar=no, menubar=no");
}

<!----------FONCTION LIGHTBOX------------>

function gradient(id, level)
{
	var box = document.getElementById(id);
	box.style.opacity = level;
	box.style.MozOpacity = level;
	box.style.KhtmlOpacity = level;
	box.style.filter = "alpha(opacity=" + level * 100 + ")";
	box.style.display="block";
	return;
}

function fadein(id) 
{
	var level = 0;
	while(level <= 1)
	{
		setTimeout( "gradient('" + id + "'," + level + ")", (level* 1000) + 10);
		level += 0.01;
	}
}

function openbox(formtitle, fadin)
{
  var box = document.getElementById(formtitle); 
  document.getElementById('filter').style.display = "block";
  
  if (fadin)
  {
	 gradient(formtitle, 0);
	 fadein(formtitle);
  }
  else
  { 	
    box.style.display = "block";
  }  	
}

function closebox(formtitle)
{
  var box = document.getElementById(formtitle); 
  box.style.display = "none";
  document.getElementById("filter").style.display = "none";
}
