// JavaScript Document
// Javascript which is used for preloading images:
	var locationAfterPreload = "#" // URL of the page after preload finishes
	var lengthOfPreloadBar = 100 // Length of preload bar (in pixels)
	var heightOfPreloadBar = 2 // Height of preload bar (in pixels)
	// Put the URLs of images that you want to preload below (as many as you want)
	      var yourImages = new Array(
"images/accueil_button_off.gif",
"images/accueil_button_on.gif",
"images/bg_interface_contact.jpg",
"images/bg_interface_home.jpg",
"images/bg_interface_musique.jpg",
"images/bg_interface_video.jpg",
"images/black_horizontal_line.gif",
"images/contact_button_off.gif",
"images/contact_button_on.gif",
"images/enter-flag.gif",
"images/musique_button_off.gif",
"images/musique_button_on.gif",
"images/nav-spacer1.gif",
"images/nav-spacer2.gif",
"images/nav-spacer3.gif",
"images/re-tracks-logo.gif",
"images/video_button_off.gif",
"images/video_button_on.gif",
"images/dot-full.gif",
"images/dot.gif"

		)

// Do not modify anything beyond this point!
if (document.images) {
	var dots = new Array() 
	dots[0] = new Image(1,1)
	dots[0].src = "images/dot-full.gif" // default preloadbar color (note: You can substitute it with your image, but it has to be 1x1 size)
	dots[1] = new Image(1,1)
	dots[1].src = "images/dot.gif" // color of bar as preloading progresses (same note as above)
	var preImages = new Array(),coverage = Math.floor(lengthOfPreloadBar/yourImages.length),currCount = 0
	var loaded = new Array(),i,covered,timerID
	var leftOverWidth = lengthOfPreloadBar%coverage
}
function loadImages() { 
	for (i = 0; i < yourImages.length; i++) { 
		preImages[i] = new Image()
		preImages[i].src = yourImages[i]
	}
	for (i = 0; i < preImages.length; i++) { 
		loaded[i] = false
	}
	checkLoad()
}
function checkLoad() {
	if (currCount == preImages.length) { 
		location.replace(locationAfterPreload)
		return
	}
	for (i = 0; i <= preImages.length; i++) {
		if (loaded[i] == false && preImages[i].complete) {
			loaded[i] = true
			eval("document.img" + currCount + ".src=dots[1].src")
			currCount++
		}
	}
	timerID = setTimeout("checkLoad()",10) 
}