if (document.all)
    var xMax = screen.width, yMax = screen.height;
else
    if (document.layers)
        var xMax = window.outerWidth, yMax = window.outerHeight;
    else
        var xMax = 640, yMax=480;
				
				
				
function linkselector (frmObj,lien){
frmObj.action=lien;
frmObj.submit();
}



function popupcentered(lien,width,height) {
window.open(lien,'','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width='+width+',height='+height+',top='+(yMax-height)*50/100+',left='+(xMax-width)*50/100+'');
return false;
}

function popupcenteredws(lien,width,height) {
window.open(lien,'','toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,menuBar=1,width='+width+',height='+height+',top='+(yMax-height)*50/100+',left='+(xMax-width)*50/100+'');
return false;
}

function popup(myURL,target,popupWidth,popupHeight,ws){
  var popupX = (screen.availWidth)? ((screen.availWidth - popupWidth) / 2): 20;
  var popupY = (screen.availHeight)? ((screen.availHeight - popupHeight) / 3):20;
	var details = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+ws+',resizable=1,width='+popupWidth+',height='+popupHeight+',top='+popupY+',left='+popupX;
	mypopup = 	window.open(myURL,target,details);
	mypopup.focus();
}

function popupcoloris(lien,width,height) {
window.open(lien,'','toolbar=0,location=0,directories=0,status=0,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width='+width+',height='+height+',top='+(yMax-height)*50/100+',left='+(xMax-width)*50/100+'');
return false;
}


