// JavaScript Document

/***** ENVOYER A UN AMI ****************************************************************/
function mail_page()
{
 chaine_mail = "mailto:?subject=" + document.title;
 chaine_mail += "&body=";
 chaine_mail += "" + document.title;
 chaine_mail += "%20" + window.location.href;
 chaine_mail += "";

 window.location.href = chaine_mail;
}


function expand(){
window.moveTo(0,0);
window.resizeTo(screen.width,(screen.height-25))
}



/***** VERSION IMPRIMABLE **************************************************************/
function printer_friendly() {
  var hauteur=660;
  var largeur=750;
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(document.location ,"printable","top="+top+",left="+left+",width="+largeur+",height="+hauteur+",toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=0");
}

if (window.name=="printable") {
	document.write("<style>body{background:#fff;position:relative;margin:0 0 0 60px}#main{background:none;top:0;left:0;width:650px;margin:0;}");
	document.write(".printHide{display:none}.printShow{display:block}#contentHeader{height:75px;margin:0 0 20px 0};");
	document.write(".show_inline{display:inline}#content{overflow:visible;padding:0;background:#fff}#mainContent{background:#fff;margin-top:50px}#printBox{background:#fff;height:30px;width:650px;padding:0 0 30px 0;position:absolute;top:0;}</style>");
}


/***** POPUP **************************************************************/
//Popup function
//<a href="my-pop-up-window.htm" onclick="popUp(this.href,'console',600,600,'windowName');return false;" target="_blank">This is my link</a>
var newWin = null;
function popUp(strURL, strType, strHeight, strWidth, strName) {
if (newWin != null && !newWin.closed)
	newWin.close();  
	var strOptions="";
	if (strType=="scrolling")    
	strOptions="resizable,scrollbars,height="+
		strHeight+",width="+strWidth;  
	if (strType=="console")    
	strOptions="resizable,scrollbars,height="+
		strHeight+",width="+strWidth;  
	if (strType=="fixed")
		strOptions="status,height="+      
			strHeight+",width="+strWidth;  
	if (strType=="elastic")
		strOptions="toolbar,menubar,scrollbars,"+
			"resizable,location,height="+      
			strHeight+",width="+strWidth;
	if (strType=="preview")
		strOptions="toolbar,menubar,scrollbars,"+
			"resizable,location";		
	newWin = window.open(strURL, strName, strOptions);  
	newWin.focus();
}


//SCREEN

function test_scr(OptW, OptH, mess) {
 if (screen.width < OptW || screen.height < OptH ) alert(mess + " " + OptW + "x" + OptH);
}


test_scr(1024,768,"Site Optimisé pour une résolution de ");
