var newWin = null;
function closeWin(){
if (newWin != null){
if(!newWin.closed)
newWin.close();
}
}
function popUp(strURL,strType,strHeight,strWidth) {
closeWin();
var strOptions="";
if (strType=="console") { strOptions="resizable,height="+strHeight+",width="+strWidth;}
if (strType=="fixed") { strOptions="status,height="+strHeight+",width="+strWidth+",left=150,top=100";}
if (strType=="print") { strOptions="scrollbars,status,height="+strHeight+",width="+strWidth+",left=0,top=0";}
if (strType=="elastic") {strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;}
newWin = window.open(strURL, 'newWin', strOptions);
newWin.focus();
}


/* anciennement js_accueil.js */
function clear_field(value){
if (value=='Recherche...'){
document.forms[0].search.value='';
}
}

function clear_field2(value){
if (value=='Recherche...'){
document.forms[1].search.value='';
}
}

function verifsearch(idform){
document.forms[idform].elements[0].style.border='1px solid #979797';
if ( (document.forms[idform].search.value=='') || (document.forms[idform].search.value=='Recherche...') ){
   alert('Indiquez un ou plusieurs mots clés dans le champ "recherche".');
   document.forms[idform].search.focus();
   if (idform==0){
     document.getElementById('idsearch').style.border='1px solid #f00';
     }
     else {document.getElementById('idsearch2').style.border='1px solid #f00';}
   return false;
   }
   else return true;
}
