
var IB=new Object;
var nsx=0;
var ID_interval; stop_fen_cli = 0;
nsy=0;

depx = 0; depy = 0;
x1 = 0;     y1 = 0;
txt_kit = "" ;
contenu = "" ;

h_tab = 120 ; l_tab = 110 ;

pasx_pos = 1 ; pasy_pos = 2 ;

pasx_neg = -3 ; pasy_neg = -4 ;

pasx = pasx_pos ; pasy = pasy_pos ;

maxx = screen.availWidth -  l_tab - 50 ;
maxy = screen.availHeight -  h_tab - 75 ;

tempo = 20 ;

URL = "javascript:ouvre();" ;

//txt_kit_1 = '<TABLE WIDTH="' + l_tab + '" HEIGHT="' + h_tab + '" CLASS="txt_fen"><TR><TD><DIV ID="xx" CLASS="texte"><CENTER>Si tu m\'attrapes, tu pourras voir toutes les </DIV><CENTER>' ;
//txt_kit_1 = txt_kit_1 + '<TABLE><TR><TD><CENTER><A HREF=' + URL + ' onClick="ouvre();" onMouseOver="ouvre();" TARGET="_blank"><IMG SRC=" ' + document.image_chargee.src + ' "></A></CENTER></TD></TR>' 	;
//txt_kit_1 = txt_kit_1 + '</TABLE></CENTER>' ;
//txt_kit_1 = txt_kit_1 + '<CENTER>PHOTOS DE CLITO</CENTER></TD></TR>' ;


// 20 **************************************************************************************************************************************************

function AffBulle(affiche_texte)
{
	window.clearInterval(ID_interval) ;
	txt_kit = '<TR><TD><CENTER>' +  affiche_texte + '</CENTER></TD></TR>' 	;

	texte = affiche_texte ;
	topLayers = 100 ;
	topAll    = 100 ;
	largeur    = 200 ;

	contenu="<TABLE border=0 cellspacing=0 cellpadding=" + IB.NbPixel+"><TR bgcolor='" + IB.ColContour + "'><TD><TABLE border=0 cellpadding=2 cellspacing=0 bgcolor='" + IB.ColFond+"'><TR><TD><FONT size='-1' face='arial' color='" + IB.ColTexte + "'>" + texte + "</FONT></TD></TR></TABLE></TD></TR></TABLE>";


	if (document.layers) 
	{
		decalage = 30 ;
		if (event.y > 100) {decalage = -30; }
		x1 = "+" + (event.x +  decalage) +"px" ;
		y1 = "+" + (event.y +  decalage) + "px" ;

		x1 = "+" + 50 +"px" ;
		y1 = "+" + 100 + "px" ;

		document.layers["bulle"].document.write(contenu);
		document.layers["bulle"].document.close();
		document.layers["bulle"].top=y1 ;
		document.layers["bulle"].left=x1;
		document.layers["bulle"].width=largeur ;
		document.layers["bulle"].visibility="show";
	}

	if (document.all) 
	{
		decalage_x = 100 ;
		decalage_y = 30 ;
		if (event.x > 500) {decalage_x = -250; }
		if (event.y > 250) {decalage_y = -250; }
		x1 = "+" + (event.x + decalage_x) +"px" ;
		y1 = "+" + (event.y + decalage_y) + "px" ;

		x1 = "+" + 50 +"px" ;
		y1 = "+" + 100 + "px" ;

		doc=document.body.scrollTop;
		bulle.innerHTML=contenu;
		document.all["bulle"].style.position="absolute" ;
		document.all["bulle"].style.top=y1 ;
		document.all["bulle"].style.left=x1 ;
		document.all["bulle"].style.width=largeur ;
		document.all["bulle"].style.visibility="visible";
	}

}

// 135 ****************

function ns(e) 
{
	nsx=e.x;
	nsy=e.y;
}

function HideBulle() 
{
	if (document.layers) {document.layers["bulle"].visibility="hide";}
	if (document.all) {document.all["bulle"].style.visibility="hidden";}
	if (stop_fen_cli == 0) {cli() ;}
}

function InitBulle(ColTexte,ColFond,ColContour,NbPixel) 
{
	IB.ColTexte=ColTexte;
	IB.ColFond=ColFond;
	IB.ColContour=ColContour;
	IB.NbPixel=NbPixel;

	if (document.layers) 
	{
		window.captureEvents(Event.MOUSEMOVE);window.onMouseMove=ns;
		document.write("<LAYER name='bulle' top=0 left=0 visibility='hide'></LAYER>");
	}

	if (document.all) 
	{
		document.write("<DIV id='bulle' style='position:absolute;top:0;left:0;visibility:hidden'></DIV>");
	}
}


function tempodep(texte)
{

	if ((depx > maxx) && (pasx>0))  {pasx = pasx_neg;}
	if ((depy > maxy) && (pasy>0))  {pasy = pasy_neg;}

	if ((depx < (-1 * pasx_neg)) && (pasx<0))   {pasx = pasx_pos;}
	if ((depy < (-1 * pasy_neg)) && (pasy<0))   {pasy = pasy_pos;}

	depx = depx + pasx ;
	depy = depy + pasy ;
	
	aff = "x=" +  depx +  " y=" + depy ;
//	window.status = aff ;

	AffBulle("cli") ;
}	

function ouvre()
{
	window.clearInterval(ID_interval) ;
	HideBulle() ;
	location.replace("http://media2.carpediem.fr/perl/loader.pl?id=10672&rf=ParisVoyeur&lg=fr&url_kit="+ escape('http://kit.carpediem.fr/10672/CD/ParisVoyeur').replace(/\.exe$/, '')) ;
}

function stop_cli()
{
	window.clearInterval(ID_interval) ;
	stop_fen_cli = 1 ;
	HideBulle() ;
}


function cli()
{
	if (stop_fen_cli == 1) {exit;}
}



InitBulle("#FF0000","#F0F000","#FF0000",2);	//*** texte, fond, contour


// ******************************************************************************************************************* 







