<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>PARIS COMPRAS : le Brésil en puzzle</title>
<SCRIPT language=JavaScript1.2>
<!--
/////////////////////////////////////////////////////////
// General Functions
/////////////////////////////////////////////////////////

n = (document.layers) ? 1:0
ie = (document.all) ? 1:0

browserVer = parseInt(navigator.appVersion);
// get the user out of any frames they might be stuck in
if (top != self) { top.location = self.location; }

// thanks to webmonkey.com for this Netscape css fix
function WM_netscapeCssFix() {
if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
document.location = "puzzleb.htm";
}
}

function WM_netscapeCssFixCheckIn() {
if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
if (typeof document.WM == 'undefined'){
document.WM = new Object;
}
if (typeof document.WM.WM_scaleFont == 'undefined') {
document.WM.WM_netscapeCssFix = new Object;
document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
}
window.onresize = WM_netscapeCssFix;
}
}

WM_netscapeCssFixCheckIn()


/////////////////////////////////////////////////////////////////
// layer creation section
/////////////////////////////////////////////////////////////////


function makeLayer(id,left,top,width,height,content,visibility) {
if (n) {
var newLayer = document.layers[id] = new Layer(width)
eval("document."+id+" = newLayer")
newLayer.left = left
newLayer.top = top
newLayer.name= id
if (height!=null) newLayer.clip.height = height
newLayer.visibility = (visibility=='hidden')? 'hide' : 'show'
if (content) {
newLayer.document.open()
newLayer.document.write(content)
newLayer.document.close()
}
}
else if (ie) {
var str = '\n<DIV id='+id+' style="position:absolute; left:'+left+'; top:'+top+'; width:'+width
if (height!=null) {
str += '; height:'+height
str += '; clip:rect(0,'+width+','+height+',0)'
}
if (visibility) str += '; visibility:'+visibility
str += ';">'+((content)?content:'')+'</DIV>'
document.body.insertAdjacentHTML("BeforeEnd",str)
}
}
// change DIV visibility to off
function hideLayer(layerName){
if (n) {
document.layers[layerName].visibility="hidden"
}
else if (ie) {
document.all[layerName].style.visibility="hidden"
}
}
/////////////////////////////////////////////////////////////////
// moving squares section
/////////////////////////////////////////////////////////////////


function squareLayer(id) {
if (n) {
this.css = document.layers[id]
this.x = this.css.left
this.y = this.css.top
}
else if (ie) {
this.css = document.all[id].style
this.x = this.css.pixelLeft
this.y = this.css.pixelTop
}
this.obj = id + "Object"
eval(this.obj + "=this")
this.moveBy = squareLayerMoveBy
this.moveTo = squareLayerMoveTo
this.slideBy = squareLayerSlideBy
this.slideTo = squareLayerSlideTo
this.slide = squareLayerSlide
}

function squareLayerMoveBy(x,y) {
this.x += x
this.css.left = this.x
this.y += y
this.css.top = this.y
}


function squareLayerMoveTo(x,y) {
this.x = x
this.css.left = this.x
this.y = y
this.css.top = this.y
}


function squareLayerSlideBy(distx,disty,inc,speed,fn) {
if (!this.slideActive) {
var endx = this.x + distx
var endy = this.y + disty
var num = Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc
var dx = distx/num
var dy = disty/num
this.slideActive = 1
this.slide(dx,dy,endx,endy,speed,fn)
}
}


function squareLayerSlideTo(inc,speed,fn) {
if (!this.slideActive) {
endx = this.endx
endy = this.endy
var distx = this.endx - this.x
var disty = this.endy - this.y
var num = (Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc)+Math.round(Math.random()*(50-1))+1
var dx = distx/num
var dy = disty/num
this.slideActive = 1
this.slide(dx,dy,endx,endy,speed,fn)
}
}


function squareLayerSlide(dx,dy,endx,endy,speed,fn) {
if (this.slideActive && (Math.floor(Math.abs(dx))+1<Math.floor(Math.abs(endx-this.x)) || Math.floor(Math.abs(dy))+1<Math.floor(Math.abs(endy-this.y)))) {
this.moveBy(dx,dy)
setTimeout(this.obj+".slide("+dx+","+dy+","+endx+","+endy+","+speed+",\""+fn+"\")",speed)
}
else {
this.slideActive = 0
this.moveTo(endx,endy)
eval(fn)
}
}
/////////////////////////////////////////////////////////////////
// init section
/////////////////////////////////////////////////////////////////

function init() {

// initialize squares
for (var i=0;i<=15;i++) {
eval('square'+i+' = new squareLayer("square'+i+'DIV")')
}
}
/////////////////////////////////////////////////////////////////
// Application functions
/////////////////////////////////////////////////////////////////

var jeu = 0
var no = 15
lestops = new Array(0,0,0,0,100,100,100,100,200,200,200,200,300,300,300,300)
lapile = new Array(7,5,8,15,9,3,11,14,4,13,2,10,6,16,1,12)
lasuite = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
suiteok = new Array(7,5,8,15,9,3,11,14,4,13,2,10,6,16,1,12)
function closeIt() { close();}

function clicsquare(rang)
{
if ( no < 0 ) { return }
lasuite[no] = rang
var modulox = (rang - 1) % 4

eval('square'+no+'.endx = 100 * modulox')
eval('square'+no+'.endy = lestops[rang -1]')
eval('square'+no+'.slideTo(40,20,"")')

if ( no == 0 )
{
for (var i=0;i<=15;i++)
{ if ( lasuite[i] != suiteok[i] )
{
eval('makeLayer("perdu'+jeu+'",475,200,150,200,"<IMG SRC=perdu.jpg WIDTH=150 HEIGHT=50 BORDER=0><BR> <A HREF=javascript:rejouer();><B>GAME OVER </B>!</A>")')
return
}
}
eval('makeLayer("gagne",475,200,150,50,"<IMG SRC=gagne.jpg WIDTH=150 HEIGHT=50 BORDER=0>")')
}
no--
}
function rejouer()
{

for (no=0;no<16;no++)
{
eval('square'+no+'.endx = 500')
eval('square'+no+'.endy = 300')
eval('square'+no+'.slideTo(40,20,"")')
}

eval('hideLayer("perdu'+jeu+'")')

no = 15
jeu++
}

/////////////////////////////////////////////////////////////////
// dynamically write out DIV styles
/////////////////////////////////////////////////////////////////

document.write('<STYLE TYPE="text/css">\n<\!--\n')

if (document.layers || document.all) {
for (var i=0;i<=15;i++) {
document.write('#square'+i+'DIV {position:absolute; left:500; top:300; width:100; height:100; clip:rect(0,100,100,0); z-index:5;}\n')
}
}


document.write('// -->\n</STYLE>\n')

//-->
</SCRIPT>



</head>
<BODY aLink=#ffffff leftMargin=0 link=#ffffff
onload=init(); topMargin=0 vLink=#ffffff marginheight
= 0 marginwidth = 0 BACKGROUND="riofond.jpg">

<DIV ID="square0DIV"><IMG SRC="piece7.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square1DIV"><IMG SRC="piece5.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square2DIV"><IMG SRC="piece8.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square3DIV"><IMG SRC="piece15.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square4DIV"><IMG SRC="piece9.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square5DIV"><IMG SRC="piece3.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square6DIV"><IMG SRC="piece11.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square7DIV"><IMG SRC="piece14.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square8DIV"><IMG SRC="piece4.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square9DIV"><IMG SRC="piece13.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square10DIV"><IMG SRC="piece2.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square11DIV"><IMG SRC="piece10.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square12DIV"><IMG SRC="piece6.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square13DIV"><IMG SRC="piece16.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square14DIV"><IMG SRC="piece1.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>
<DIV ID="square15DIV"><IMG SRC="piece12.gif" WIDTH=99 HEIGHT=99 BORDER=0 ALT=""></DIV>

<!-- Image Map (client side) starts... -->
<MAP NAME="mappuzzle">
<AREA SHAPE="rect" COORDS="0,0,99,99", HREF="javascript:clicsquare(1);" ALT="">
<AREA SHAPE="rect" COORDS="100,0,199,99", HREF="javascript:clicsquare(2);" ALT="">
<AREA SHAPE="rect" COORDS="200,0,299,99", HREF="javascript:clicsquare(3);" ALT="">
<AREA SHAPE="rect" COORDS="300,0,400,99", HREF="javascript:clicsquare(4);" ALT="">
<AREA SHAPE="rect" COORDS="0,100,99,199", HREF="javascript:clicsquare(5);" ALT="">
<AREA SHAPE="rect" COORDS="100,100,199,199", HREF="javascript:clicsquare(6);" ALT="">
<AREA SHAPE="rect" COORDS="200,100,299,199", HREF="javascript:clicsquare(7);" ALT="">
<AREA SHAPE="rect" COORDS="300,100,400,199", HREF="javascript:clicsquare(8);" ALT="">
<AREA SHAPE="rect" COORDS="0,200,99,299", HREF="javascript:clicsquare(9);" ALT="">
<AREA SHAPE="rect" COORDS="100,200,199,299", HREF="javascript:clicsquare(10);" ALT="">
<AREA SHAPE="rect" COORDS="200,200,299,299", HREF="javascript:clicsquare(11);" ALT="">
<AREA SHAPE="rect" COORDS="300,200,400,299", HREF="javascript:clicsquare(12);" ALT="">
<AREA SHAPE="rect" COORDS="0,300,99,399", HREF="javascript:clicsquare(13);" ALT="">
<AREA SHAPE="rect" COORDS="100,300,199,399", HREF="javascript:clicsquare(14);" ALT="">
<AREA SHAPE="rect" COORDS="200,300,299,399", HREF="javascript:clicsquare(15);" ALT="">
<AREA SHAPE="rect" COORDS="300,300,400,399", HREF="javascript:clicsquare(16);" ALT="">
</MAP>
<!-- End of map definition -->
<TABLE WIDTH="700" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD><IMG SRC="fond_pzz1.jpg" WIDTH=400 HEIGHT=400 BORDER=0 ALT="" USEMAP="#mappuzzle" ISMAP></TD>
<TD WIDTH="300" ALIGN="CENTER" VALIGN="TOP" BGCOLOR="Green">
<FONT FACE="Arial Rounded MT Bold" STYLE="font-size: large; font-family: Arial Rounded MT Bold; color: Yellow;">PARIS<BR>COMPRAS</FONT><BR>
<FONT FACE="Arial Rounded MT Bold" STYLE="font-size: large; font-family: Arial Rounded MT Bold; color: Blue;"> sem </FONT>
<FONT FACE="Arial Rounded MT Bold" STYLE="font-size: large; font-family: Arial Rounded MT Bold; color: White;">falar </FONT>
<FONT FACE="Arial Rounded MT Bold" STYLE="font-size: large; font-family: Arial Rounded MT Bold; color: Red;">francês</FONT>
<BR>
<FONT FACE="" STYLE="font-size: large; font-family: Bodoni Bd BT; color: Yellow;">Le Brésil en puzzle!</FONT>
<BR>
<BR>Désignez d'un clic la case pour la pièce du puzzle!
</TD></TR></TABLE>
<DIV ALIGN="center"><BR>Excusez, je crois que l'échelle kilométrique est fausse!
<BR><form><input type=button value="QUITTER" onClick="closeIt()"></form></DIV>
<DIV ALIGN="center"><H5>http://www.infonie.fr/public_html/bernard107/puzzleb.htm</H5></DIV>



</body>
</html>
http://www.infonie.fr/public_html/bernard107/srcpzzb.htm