
function print_art(d,f,url,page) {
var page
var d
var f
var url
var url=escape(url);
var title=escape(document.title);
window.open("print.asp?c="+page+"&start="+d+"&end="+f+"&ac=p&print_url="+url,'','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,height=350,width=680');
}



function OpenZone(val_pas)
{
   with(document.register){

        if(user.value == "")
        {
                alert("Le champ d'identifiant ne peut pas être vide.");
                user.focus();
                return false;
        }
	user.value = user.value.toLowerCase();
        if(password.value == "")
        {
                alert("Veuillez renseigner votre mot de passe.");
                password.focus();
                return false;
        }
        
              	password.value = password.value.toLowerCase();

        var dire = window.location.href;
        if (dire.indexOf("#")!=-1)
        	        dire=dire.substring(0,dire.indexOf("#"));

	//if not secured before login, then secure the url	
	dire=dire.replace("http:","http:");
        
        document.register.user.value = user.value;
        document.register.password.value = password.value;
		document.register.action=dire;
        document.register.submit();
    }
    return false;
}




function SubmitProc2(URL,height,width,winName)
{
winstyle="height="+height+",width="+width+",status=no,scrollbars=yes,toolbar=no,menubar=no,location=no,resizable=yes,left=80,top=50";
MM_openBrWindow(URL,winName,winstyle);
}
function MM_openBrWindow(theURL,winName,features) { 
var  winUpl

if (winUpl) winUpl.close();

  winUpl = window.open(theURL,winName,features);
	  winUpl.focus();
}
	
	
	
	function confirmCmd(str) {
  ret = confirm(str);
  return (ret ? true : false);
}

function changeLocation(window_obj,purl){
  window_obj.document.location.href = purl ;
}

//drop down box
function newGo2(box) {
  if ((-1 < box.selectedIndex) && (box.options[box.selectedIndex].value.lastIndexOf('virtualcenter.com') != -1)) {
    document.forms[0].action = box.options[box.selectedIndex].value;
    document.forms[0].submit();
   return true;
  }
  if ((-1 < box.selectedIndex) && (box.options[box.selectedIndex].value !='nil')) {
    val = box.options[box.selectedIndex].value;
    if (val.lastIndexOf(',') != -1) {
      window.open ((val.substring(0,val.lastIndexOf(","))),
      (val.substring((val.lastIndexOf(",")+1) , val.length)));
    } else {
      window.open (val, '_top');
    }
  }
  return true;
}

function popItUp(window_location, window_name,width,height){
  if(typeof popup == "object"  && !popup.closed){
    popup.document.close();
    popup.document.write("Veuillez patienter S.V.P.<br>Chargement en cours ...");
    popup.document.close();		
    changeLocation(popup,window_location);
  } else {
    popup = window.open(window_location,window_name,"resizable=1,scrollbars=1,status=1,width="+width+",height="+height);
  }
  if(typeof popup == "object"){
    popup.focus();
    return 1;
  } else {
    return 0;
  }
  }

function pop2Up(window_location, window_name,width,height){
  if(typeof popa == "object"  && !popa.closed){
    popa.document.close();
    popa.document.write("Veuillez patienter S.V.P.<br>Chargement en cours ...");
    popa.document.close();		
    changeLocation(popa,window_location);
  } else {
    popa = window.open(window_location,window_name,"resizable=0,scrollbars=0,status=0,width="+width+",height="+height);
  }
  if(typeof popa == "object"){
    popa.focus();
    return 1;
  } else {
    return 0;
  }
}
