function civiewer(url)
{
var civiewerpop = window.open (url,'civiewer','location=no,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=yes,status=no,width=350,height=300');
}
function civiewer2(url)
{
var civiewerpop = window.open (url,'civiewer','location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no,width=308,height=180');
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function makeArray(n){
    this.length = n;
    for (i=1;i<=n;i++){
        this[i]=0;
    }
    return this;
}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function displayDate(){
    var this_month = new makeArray(12);
    this_month[0]  = "Janvier";
    this_month[1]  = "Février";
    this_month[2]  = "Mars";
    this_month[3]  = "Avril";
    this_month[4]  = "Mai";
    this_month[5]  = "Juin";
    this_month[6]  = "Juillet";
    this_month[7]  = "Août";
    this_month[8]  = "Septembre";
    this_month[9]  = "Octobre";
    this_month[10] = "Novembre";
    this_month[11] = "Décembre";
    var today = new Date();
    var day   = today.getDate();
    var month = today.getMonth();
    var year  = today.getYear();
    if (year < 1900){
        year += 1900;
    }
    return(day+" "+this_month[month]+" "+year+"&nbsp;");
}

function displayDateEn(){
    var this_month = new makeArray(12);
    this_month[0]  = "January";
    this_month[1]  = "February";
    this_month[2]  = "March";
    this_month[3]  = "April";
    this_month[4]  = "May";
    this_month[5]  = "June";
    this_month[6]  = "Jully";
    this_month[7]  = "Augustt";
    this_month[8]  = "September";
    this_month[9]  = "October";
    this_month[10] = "November";
    this_month[11] = "Décember";
    var today = new Date();
    var day   = today.getDate();
    var month = today.getMonth();
    var year  = today.getYear();
    var suffixe = "th";
    if (day == 1) {suffixe="st";}
    else if (day == 2) {suffixe="nd";}
    else if (day == 3) {suffixe="rd";}
    if (year < 1900){
        year += 1900;
    }
    return(this_month[month]+" "+day+suffixe+", "+year+"&nbsp;");
}

function noclick(scx) {
if (navigator.appName == "Netscape" && scx.which == 3) {
alert("Progisoftware Conseil - All rights reserved");
return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) {
alert("Progisoftware Conseil - All rights reserved");
return false; }
}

function setPage(cPage)
{
if (cPage != "" ) {window.location.href=cPage;}
}

function affichepage(cPage)
{
if (cPage != "" ) {window.location.href=cPage;}
}

function confirmation(cUrl)
{
 if (confirm("Etes-vous sûr de vouloir supprimer cet item ?"))
 {
  window.location.href=cUrl;
 }
}

function GetShortNav()
{
 return navigator.appName.substring(0,2);
}

function PSendMail(cTo, cSubject)
{
 var cRet = "";
 var cDom = "pgs.fr";
 cRet = "mail" + "to:" + cTo + "@" + cDom;
 if (cSubject != null)
 { cRet = cRet + "?subject=" + cSubject; }
 window.location.href=cRet;
}

function run_filter(obj)
{
 if(obj && obj.filters[0])
 {
  obj.filters[0].apply();
  obj.visibility="visible";
  obj.filters[0].play();
 }
}
