function blockError(){return true;}
window.onerror = blockError;

function OpenDoc(URL,TargetName)
{
options="width=" + 800 + ",height=" + 600 + ",resizable=yes,dependent=yes,left=100,top=100"
wnd=open("", TargetName,options)
wnd.location=URL
//return wnd	
}


function printThis()
{
window.print()
}



var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function fitWindowSize() {
if (isNav4) {
window.innerWidth = document.layers[0].document.images[0].width;
window.innerHeight = document.layers[0].document.images[0].height;
}
if (isIE4) {
window.resizeTo(500, 500);
width = 500 - (document.body.clientWidth -  document.images[0].width);
height = 500 - (document.body.clientHeight -  document.images[0].height);
window.resizeTo(width, height);
   }
}


function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function makeRemote() {
remote = window.open("","remotewin","width=570,height=260");
remote.location.href = "remote.html";
    if (remote.opener == null) remote.opener = window; 
remote.opener.name = "opener";
}

function printPage() {
if (window.print) {
agree = confirm('Pour imprimer:cliquer sur OK');
if (agree) window.print(); 
   }
}

var user;
var domain;
var suffix;
function jemail(user, domain, suffix){
document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + user + '@' + domain + '.' + suffix + '</a>');
}

function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Merci de bien voulir remplir le champ "+shortFieldName+" correctement.");
return false;
}
else
return true;
}