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;
  }
}
