// JavaScript Document

function PopUp()  
{
  var href=PopUp.arguments[0];
  var width=(PopUp.arguments.length>1?PopUp.arguments[1]:620);
  var height=(PopUp.arguments.length>2?PopUp.arguments[2]:500);
  var left=Math.floor((screen.availWidth-width)/2);
  var top=Math.floor((screen.availHeight-height)/2);
  var win=window.open( href, "IMERYSEXPORT", "width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=yes,resizable=yes" );
  win.focus();
}

function ZoomPhoto()  
{ 
  var width=(ZoomPhoto.arguments.length>1?ZoomPhoto.arguments[1]:350);
  var height=(ZoomPhoto.arguments.length>2?ZoomPhoto.arguments[2]:250);
  var left=Math.floor((screen.availWidth-width)/2);
  var top=Math.floor((screen.availHeight-height)/2);
  var win=window.open("zoom.asp?img="+ZoomPhoto.arguments[0], "IMERYSEXPORT", "width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=no,resizable=no" );
  win.focus();
}

function DocPDF()  
{
  var href=DocPDF.arguments[0];
  var width=(DocPDF.arguments.length>1?DocPDF.arguments[1]:700);
  var height=(DocPDF.arguments.length>2?DocPDF.arguments[2]:500);
  var left=Math.floor((screen.availWidth-width)/2);
  var top=Math.floor((screen.availHeight-height)/2);
  var win=window.open( href, "IMERYSEXPORT_DOCS", "width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=yes,resizable=yes" );
  win.focus();
} 

function InsidePopup()  
{
  var href=InsidePopup.arguments[0];
  var width=(InsidePopup.arguments.length>1?InsidePopup.arguments[1]:700);
  var height=(InsidePopup.arguments.length>2?InsidePopup.arguments[2]:500);
  Resizer(width,height);
  window.location=href;
} 

function Resizer(width,height) {
  GetSize();
  var Nb=30;
  var SetpX = (width - window.width)/Nb;
  var SetpY = (height - window.height)/Nb;
  for (i=0; i<Nb;i++)
	resizeBy(SetpX,SetpY);
  resizeTo(width,height);
}

function GetAcrobat() 
{
  var width=700;
  var height=500;
  var left=Math.floor((screen.availWidth-width)/2);
  var top=Math.floor((screen.availHeight-height)/2);
  var win=window.open( "http://www.adobe.com/products/acrobat/", "GETACROBAT", "width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=yes,resizable=yes" );
  win.focus();
}

function externHREF()  
{
  var href=externHREF.arguments[0];
  var width=(externHREF.arguments.length>1?externHREF.arguments[1]:700);
  var height=(externHREF.arguments.length>2?externHREF.arguments[2]:500);
  var left=Math.floor((screen.availWidth-width)/2);
  var top=Math.floor((screen.availHeight-height)/2);
  var win=window.open( href, "EXPORT_EXTERNE", "width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=yes" );
  //var win=window.open( "/asp/voir_HREF.asp?HREF="+href, "ETOITURE_DOC", "width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=yes,resizable=yes" );
  win.focus();
} 

function GetSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  window.width=myWidth;
  window.height=myHeight;
}


function PopUpCCTP()  
{
  var href=PopUpCCTP.arguments[0];
  var width=(PopUpCCTP.arguments.length>1?PopUpCCTP.arguments[1]:400);
  var height=(PopUpCCTP.arguments.length>2?PopUpCCTP.arguments[2]:260);
  var left=Math.floor((screen.availWidth-width)/2);
  var top=Math.floor((screen.availHeight-height)/2);
  var win=window.open( href, "IMERYSEXPORT_DOCS", "width="+width+",height="+height+",left="+left+",top="+top+",scrollbars=no,resizable=yes" );
  win.focus();
} 
