<!-- NOM DE LA FENETRE -->
window.defaultStatus = "CEVEP - Module";


<!-- FOCUS SUR CHAMPS -->
function FocusText(BoxName){
if (BoxName.value == BoxName.defaultValue){
BoxName.value = '';
}
}
function BlurText(BoxName){
if (BoxName.value == ''){
BoxName.value = BoxName.defaultValue;
}
}


<!-- OUVERTURE DE POPUP -->
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


var win = null;
	function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable,'
	win = window.open(mypage,myname,settings)
	}

<!-- VERIFICATION DU FORMULAIRE DE CREATION DE FICHE VEHICULE -->
function verif_fiche_veh() {
	var i
	i=0
	var message
	message=""
	
	if (document.form1.id_dossier.value =="")
	{
		message=message+"- Vous devez entrer un numéro de dossier    \n\n"
		i++
	} 
	if (document.form1.commissaire.value =="")
	{
		message=message+"- Vous devez choisir un commissaire     \n\n"
		i++
	}
	
	if (i>0)
	{
		alert(message)
		return false
	}
}

<!-- VERIFICATION DU FORMULAIRE D'IMPRESSION DES RESULTATS AVANT VENTE -->
function verif_resultats() {
	var i
	i=0
	var message
	message=""
	
	if (document.form1.commissaire.value =="")
	{
		message=message+"- Vous devez choisir un commissaire    \n\n"
		i++
	} 
	if (document.form1.organisme.value =="")
	{
		message=message+"- Vous devez choisir un organisme     \n\n"
		i++
	}
	if (document.form1.dvente.value =="")
	{
		message=message+"- Vous devez entrer la date de vente     \n\n"
		i++
	}

	if (i>0)
	{
		alert(message)
		return false
	}
}

<!-- VERIFICATION DU FORMULAIRE D'IMPRESSION D'UNE PUBLICITE -->
function verif_creationvente() {
	var i
	i=0
	var message
	message=""
	
	if (document.form1.dvente.value =="")
	{
		message=message+"- Vous devez entrer la date de vente   \n\n"
		i++
	} 
	if (document.form1.commissaire.value =="")
	{
		message=message+"- Vous devez choisir un commissaire      \n\n"
		i++
	}
	
	
	if (i>0)
	{
		alert(message)
		return false
	}
}


<!-- VERIFICATION DU FORMULAIRE D'IMPRESSION D'UN PRODUIT DE VENTE -->
function verif_prod_vente() { 
	var i
	i=0
	var message
	message=""
	
	if (document.form1.commissaire.value =="")
	{
		message=message+"- Vous devez choisir un commissaire    \n\n"
		i++
	} 
	if (document.form1.organisme.value =="")
	{
		message=message+"- Vous devez choisir un organisme     \n\n"
		i++
	}
	if (document.form1.dvente.value =="")
	{
		message=message+"- Vous devez entrer la date de vente     \n\n"
		i++
	}
	
	if (i>0)
	{
		alert(message)
		return false
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


<!-- OUVERTURE DE LA POPUP D'ERREUR -->
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


<!-- OUVERTURE DE FENETRE 2 -->
function openWindow(URL,windowName, width, height, center) {
xposition=0; 
yposition=0;

if ((parseInt(navigator.appVersion) >= 4 ) && (center)) {
    xposition = (screen.width - width) / 2;
    yposition = (screen.height - height) / 2;
  }

params = "width=" + width + "," // Set the popup window's width
    + "height=" + height + ","  // Set the popup window's height
    + "location=0," // Location entry field off
    + "menubar=0," // Menu bar off
    + "resizable=0," // Resizeable off
    + "scrollbars=1," // Scroll bars on
    + "status=0," // Status bar off
    + "toolbar=0," // Tool bars off
    + "hotkeys=0," // Hot keys off (except Security and Quit)
    + "screenx=" + xposition + ","   // Set window left position (NN)
    + "screeny=" + yposition + ","   // Set window top position (NN)
    + "left=" + xposition + ","      // Set window left position (IE)
    + "top=" + yposition;            // Set window top position (IE)

    window.open(URL, windowName,params);
}
file://-->

