// JavaScript Document
//script pour pop-up
<!--
// JavaScript Document
//script pour pop-up
<!--
function openPop(theURL, myWidth, myHeight, myScrolls) {
	myWin=window.open(theURL,'pop','toolbar=no,directories=no,menubar=no,scrollbars='+myScrolls+',resizable=no,width='+myWidth+',height='+myHeight);
	myWin.moveTo(50,50);
	myWin.focus();
}


function goToLocation() {
	var selector = document.forms[0].selectSection;
	navig_url=selector[selector.selectedIndex].value;
	if (navig_url == "") {
		return
	}
	self.location=navig_url;
}
// FONCTION POUR CHANGER LES EXTENSION DEPT ASIE
function changeExtension (title,text,pict) { 
	if (document.getElementById) { 
		document.getElementById('titleHolder').childNodes[0].nodeValue = URLDecode(title); 
		document.getElementById('textHolder').childNodes[0].nodeValue = URLDecode(text); 
		document.getElementById('pictHolder').src = "../share/ext_"+pict+".jpg"; 
	}  else if (document.all) {
		window.document.images["pictHolder"].src= "../share/ext_"+pict+".jpg";
		window.document.all.titleHolder.innerText = URLDecode(title); 
		window.document.all.textHolder.innerText = URLDecode(text);
	}
}

function URLDecode(encoded) {
   // Create a regular expression to search all +s in the  string
   var lsRegExp = /\+/g;
   // Return the decoded string
   return unescape(String(encoded).replace(lsRegExp, " ")); 
 }

function submitMySearch(frm,fld) {
	ref = eval('document.'+frm+'.'+fld);
	if (ref.value=="") {
		alert ("Veuillez saisir un terme à chercher.");
	} else {
		document[frm].submit();
	}
}

function submitMyForm(frm) {
	document[frm].submit();
}
function submitMyFormCheck(frm, fld) {
	if (document[frm][fld].selectedIndex!=0) {
		document[frm].submit();
	}
}



//-->

//injection d'une valeur de calendrier flash dans form php

function setMyDate(aDate, aForm, aField, aDiv) {
	document[aForm][aField].value = aDate;
	hide(aDiv);
}

//detect browser pour DHTML

isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;

function getBrowser(arg) {
	if (isNS4){
   		theObj = eval ("document.layers['"+arg+"']");
	} else if (isIE4) {
	   theObj = eval ("document.all['"+arg+"'].style");
	} else  {
	   theObj = eval ("document.getElementById('"+arg+"').style");
	}
	return theObj
}


function show(arg) {
	var br = getBrowser(arg);
	br.visibility = "visible";
}
function hide(arg) {
	var br = getBrowser(arg);
	br.visibility = "hidden";
}

//-->