function image_accueil_change(imgSrc, objName) {
   if (objName == "ac") {
		document.accueil.src = imgSrc; 
	} else if (objName == "ar") {
		document.article.src = imgSrc; 
	} else if (objName == "ou") {
		document.outils.src = imgSrc; 
	} else if (objName == "dg") {
		document.docgen.src = imgSrc; 
	} else if (objName == "li") {
		document.liens.src = imgSrc; 
	}
}

function what2do(op) {
	document.mf.ha.value = op;

	document.mf.submit();
}

function delete_me(recid) {
	document.epingler.hiddel.value = recid;

	document.epingler.submit();
}

function edit_me(recid) {
	document.epingler.hidedit.value = recid;

	document.epingler.submit();
} 

function clear_epingler() {
	document.epingler.txtitem.value = "";
	document.epingler.txtpubstartdate.value = "";
	document.epingler.txtpubenddate.value = "";
	document.epingler.txtpuborder.value = "";

	document.epingler.hidedit.value = "";
}

function open_buien() {
   whnd  =  window.open("http://www6.buienradar.nl/images.aspx?type=1&jaar=-3&bliksem=0&voor=&soort=loop1uur1x1","http://www6.buienradar.nl/images.aspx?type=1&jaar=-3&bliksem=0&voor=&soort=loop1uur1x1","menubar=no, status=no, scrollbars=no, menubar=no, width=570, height=530");
}

function ow(url, w, h) {
   window.open(url, 'owpopup',"menubar=0,status=0,location=0,directories=0,toolbar=0,resizable=0,scrollbars=0,width="+w+",height="+h);
}

function popupimage(img) { 
	titre="Agrandissement"; 
	w=open("",'image','width=400,height=400,left=100,top=100,toolbar=no,scrollbars=no,resizable=no'); 
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
	w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+70); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
	w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
	w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt='Mon image'>"); 
	w.document.write("</TD></TR></TABLE>");
	w.document.write("</BODY></HTML>"); 
	w.document.close(); 
} 

function CheckDate(DateData,DateFormat) {
	correct = true;
	if ((DateData.length == 10)) {
		if (DateFormat == "FR") {
			j = DateData.substring(0,2);
			m = DateData.substring(3,5);
		} else {
			j = DateData.substring(3,5);
			m = DateData.substring(0,2);
		}
		a = DateData.substring(6,DateData.length);
		bi = ((parseInt(a) % 4) == 0);
		if ( ( ( DateData.substring(2,3) != "/" ) || (DateData.substring(5,6) != "/" )) ) {
			return false;
		}
		if (((m == "01") || (m == "03") || (m == "05") || (m == "07") || (m == "08") || (m == "10") || (m == "12")) && ((Math.round(j) >= 1) && (Math.round(j) <= 31))) {
			correct = true;
		} else {
			if    (((m == "04") || (m == "06") || (m == "09") || (m == "11") ) && ((Math.round(j) >= 1) && (Math.round(j) <= 30))) {
				correct = true;
			} else {
				if (bi) {
					correct = (  ( (Math.round(j) >= 1) &&  (Math.round(j) <= 29) ) && (m == "02") );
				} else {
					correct = ( ( (Math.round(j) >= 1) && (Math.round(j) <= 28) ) && (m == "02")  );
				}
			}
		}
	} else {
		correct = false;
	}
	return correct;
}

function IsNumeric(sText) {
	var ValidChars = "0123456789";
	var IsNumber=true;
	var Char;
 
	for (i = 0; i < sText.length && IsNumber == true; i++) { 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) == -1) {
			IsNumber = false;
		}
	}
	return IsNumber;
}



