// JavaScript Document
// JavaScript Document
// pour les images fantomes
var hauteurBarretitre = 13; 													// Hauteur de la barre de titre
//var couleurHaut = "#F5F0CF";														// Couleur de la barre de titre	

var couleurHaut = "#FF0000";	

//var couleurBas = "#FFFFFF";										// Couleur du corps de la fenetre

couleurBas = "#FFFFFF";	

var texteBarretitre = "";	// Texte qui apparait dans la barre de titre
var policeBarretitre = "Arial, Verdana, Helvetica, sans-serif";				// Police dans la barre de titre
var taillePoliceBarretitre = "10";												// taille de la police dans la barre de titre
var couleurPoliceBarretitre = "#98916A";
										// Couleur du texte de la barre de titre
var policeCorps = "Arial, Verdana, Helvetica, sans-serif";
var taillePoliceCorps = "12";																	// Taille du texte
var couleurPoliceCorps = "#000000";
var Ombre = 1;  					// 0 : pas d'ombre; 1 : ombrage
var clic = false;

//-------------------
//
//-------------------
function setMyDiv(userFile)
{
//document.getElementById("myDiv").innerHTML = "<iframe src='"+userFile+"' width=100 height=200 frameborder=0 scrolling=yes>";
document.getElementById("myDiv").innerHTML = "<iframe src='"+userFile+"' scrolling=no>";

}

//-------------------
//
//-------------------

function clicDown(tab) {
	abscisse = abs-leftFenetre;
	//alert(abscisse);
	ordonne = ord-topFenetre;
	clic=true;
}
//-------------------
//
//-------------------
function clicUp() {
		clic=false;
}
//-------------------
//
//-------------------
function fermerPopup() {
	document.getElementById("pop_up").style.visibility="hidden";
}
//-------------------
//
//-------------------
function get_mouse(e){
	if (document.getElementById && document.all) {
		// Internet explorer
		abs = event.x+document.body.scrollLeft;
		ord = event.y+document.body.scrollTop;
	} else if (document.getElementById) {
		// Netscape 6+
		abs = e.pageX;
		ord = e.pageY;
	} 
	
	if(clic && document.getElementById){
		leftFenetre = abs-abscisse;
		topFenetre = ord-ordonne;
	}
		
	document.getElementById("pop_up").style.left = leftFenetre + "px";
	document.getElementById("pop_up").style.top = topFenetre + "px";
}
if (document.getElementById && !document.all) {
	document.captureEvents(Event.MOUSEMOVE);
}
//-------------------
//
//-------------------
//document.onmousemove = get_mouse;
function popup(){//largeurFenetre, hauteurFenetre, texteCorps
    
	//var external_file = ('http://pianos-international.com/Piano/popup_content.php')
	 
	if (navigator.appName == "Microsoft Internet Explorer") { //IE
		var topFenetre = (document.body.clientHeight/2)-(hauteurFenetre/2);				// Distance du haut de la fenetre
		var leftFenetre = (document.body.clientWidth/2)-(largeurFenetre/2);				// Distance du bord gauche de la fenetre
	}
	else { //les autres navigateurs
		var topFenetre = (window.innerHeight/2)-(hauteurFenetre/2);						// Distance du haut de la fenetre
		var leftFenetre = (window.innerWidth/2)-(largeurFenetre/2);						// Distance du bord gauche de la fenetre
	}
	
	if (topFenetre < 550)
		topFenetre = 550;
		
	if (document.getElementById) {
		document.write('<style type="text/css">')
		document.write('table.popup {')
		document.write('	border: 1px solid #555;border-bottom:1px solid black;border-right:1px solid black; }')
		document.write('table.popup td.titre {')
		document.write('	font-family: '+policeBarretitre+';')
		document.write('	font-size: '+taillePoliceBarretitre+'px;')
		document.write('	background-color: #FFFFFF;')
		document.write('	color: '+couleurPoliceBarretitre+';}')
		document.write('table.popup td.corps {')
		document.write('	font-family: '+policeCorps+';')
		document.write('	font-size: '+taillePoliceCorps+'px;')
		document.write('	color: '+couleurPoliceCorps+';}')
		document.write('table.popup a {')
		document.write('	font-family: '+policeCorps+';')
		document.write('	font-size: '+taillePoliceCorps+'px;')
		document.write('	color: #000000;}')
		document.write('</style>')
		document.write('<div id="pop_up" style="position:absolute;top:'+topFenetre+'px; left:'+leftFenetre+'px;visibility:visible;z-index:10;">')
	
		if (Ombre == 1 ) {
			document.write('<table width="'+largeurFenetre+'" height="'+hauteurFenetre+'" border="0" cellspacing="0" cellpadding="0">')
			document.write('<tr> ')
			largeurFenetre -= 5
			hauteurFenetre -= 5
			document.write('<td width="'+largeurFenetre+'"  height="'+hauteurFenetre+'" colspan="2" rowspan="2" align="left" valign="top">')
		}
       
	  
	   
	   
		document.write('<table width="'+largeurFenetre+'"  height="'+hauteurFenetre+'" border="0" cellspacing="0" cellpadding="1" class="popup">')
		largeurFenetre -= hauteurBarretitre
		hauteurFenetre -= hauteurBarretitre
		document.write('<tr>')// onMouseDown="clicDown()" onMouseUp="clicUp()"
		document.write('<td class="titre" width="'+largeurFenetre+'" height="'+hauteurBarretitre+'" align="right"><a href="javascript:fermerPopup()" title="Fermer la fen&ecirc;tre" style="text-decoration: none; font-size: 10px; font-weight:normal;">Fermer la fen&ecirc;tre <img src="Piano Images/Piano Navig/bt_fermer.gif" alt="Fermer la fenÃªtre" border="0" align="absmiddle"></a></td>')
		document.write('</tr>')
		document.write('<tr valign="top">') 
		document.write('<td bgcolor="'+couleurBas+'" width="'+largeurFenetre+'" height="'+hauteurFenetre+'" class="corps">')
		document.write('<iframe src="'+external_file+'" width="'+largeurFenetre+'" height="'+hauteurFenetre+'">')
        // ... some code ...
        document.write("</iframe>");
		document.write('</td>')

		document.write('</tr>')
		document.write('</table>')
				
		
	
		if (Ombre == 1 ) {
			document.write('</td>')
			document.write('<td width="5" height="5"></td>') 
			document.write('</tr>')
			document.write('<tr>')
			document.write('<td width="5" height="'+hauteurFenetre+'"></td>')
			document.write('</tr>')
			document.write('<tr> ')
			document.write('<td height="5" width="5"></td>')
			document.write('<td height="5" width="'+largeurFenetre+'"></td>')
			document.write('<td height="5" width="5"></td>')
			document.write('</tr>')
  			document.write('</table>')
		}
		document.write('</div>')
	}
}


//-------------------
//
//-------------------