// PROLOGISM - Dev vbe


	
	function adapt_s800x600(Xdecal,Ydecal)
	{		
		parent.window.moveTo(0,0);
		scrollBy(Xdecal /*15*/,Ydecal/*110*/);
	}

	function resize_window(x,y) {
				if (document.layers)
				{
					tmp1 = parent.outerWidth - parent.innerWidth;
					tmp2 = parent.outerHeight - parent.innerHeight;
					newWidth -= tmp1;
					newHeight -= tmp2;
				}
				try {
					parent.window.resizeTo(newWidth,newHeight);	
				}
				catch (err) {
					;
				}
	}
	
	function resizin() {		
		if (self.screen.width > 801 && self.screen.height > 601)
			{
					newWidth = 830;
					newHeight = 730;					
			}
		else {
					newWidth = 800;
					newHeight = 600;			
					adapt_s800x600(15,110);
			}	
		resize_window(newWidth, newHeight);
		
	// alert("ScreenW=" + self.screen.width + "- ScreenH=" + self.screen.height + " :  W=" + newWidth + "  H=" + newHeight);		
}


	function index_resizin() {		
		if (self.screen.width > 801 && self.screen.height > 601)
			{
					newWidth = 830;
					newHeight = 730;					
			}
		else {
					newWidth = 800;
					newHeight = 600;			
					adapt_s800x600(15,125);
			}	
		resize_window(newWidth, newHeight);
	// alert("ScreenW=" + self.screen.width + "- ScreenH=" + self.screen.height + " :  W=" + newWidth + "  H=" + newHeight);		
}

/* Fonction de verification des formulaires de telechargement, le formulaire doit de nommer "form"*/
	
		  
	function autoSize()
	  {
	  	IE5=NN4=NN6=false;
		if (document.all)
		  IE5=true;
		else if (document.getElementById)
		  NN6=true;
		else if (document.layers)
		  NN4=true;
	  
		  if (IE5) {
		  self.resizeTo(780, 590);
			}
		  else if (NN6) self.sizeToContent();
		  else window.resizeTo(780, 590); 
		  self.focus();
	  }
	
	 function validation_form()
	  {
		valide = true;
		if (!verif_vide(document.form.nom.value))
		{
		  valide = false; alert('Le champ Nom est vide, veuillez renseigner ce champ!');
		  document.form.nom.focus();
		  return valide;
		}
		if (!verif_vide(document.form.prenom.value))
		{
		  valide = false; alert('Le champ Prénom est vide, veuillez renseigner ce champ!');
		  document.form.prenom.focus();
  		  return valide;
		}
		if (!verif_vide(document.form.societe.value))
		{
		  valide = false; alert('Le champ Société est vide, veuillez renseigner ce champ!');
		  document.form.societe.focus();
		  return valide;
		}
		
		if (!verif_vide(document.form.fonction.value))
		{
		  valide = false; alert('Le champ Fonction est vide !');
		  document.form.fonction.focus();
		  return valide;
		}
		
		if (!verif_email(document.form.adresse_email.value))
		{
		  valide=false; alert('Votre adresse E-mail est invalide !');
		  document.form.adresse_email.focus();
		  return valide;
		}
		return valide;
	  }
	
	  function verif_vide(texte)
	  {
		return (texte.length > 1);
	  }
	
	  function verif_email(adresse)
	  {
		if (!verif_vide(adresse)) {
			return false;
		}
		if ((adresse == "")
			||(adresse.indexOf ('@') == -1)
			||(adresse.indexOf ('.') == -1))
		{
		  return false;
		}
		return true;
	  } 


	// Cacher les URLs dans la barre de status (efficace seulement sur IE)
	function hidestatus()
	{
	window.status = "PROLOGISM, Expert des Applications Crititques";
	setTimeout("hidestatus()", 1);
	}


	function openW(theURL) {
		  window.open(theURL,'','scrollbars=yes');
	}
	
	
	function openW(theURL,title) {
		  window.open(theURL,title,'scrollbars=yes');
	}

/*	function getFrameSize()
{
			if (self.innerWidth)
		{
			frameWidth = self.innerWidth;
			frameHeight = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientWidth)
		{
			frameWidth = document.documentElement.clientWidth;
			frameHeight = document.documentElement.clientHeight;
		}
		else if (document.body)
		{
			frameWidth = document.body.clientWidth;
			frameHeight = document.body.clientHeight;
		}
		else return;
}
*/
