//	A "True" Preloader
//	Written by: Randy Girard - April 2003
//	You are free to redistribute or edit this code in
//	any way as long as this notice stays intact.

//Q: How igsactly does this method of preloading things work?
//A: This script makes a hidden layer, then prints html code
//   inside of the layer. An event (onload) is then setup
//   to redirect to the next page when loading is complete.
//   So, the browser loads the images and saves them into
//   your temporary internet files. As you continue through
//   the site, there is no wait for pictures or flash movies
//   to load.
//   This can be customized to preload close to anything!! (wav's, midi's, probly even mp3's!!)

//I do not recommend having any images on your "loading" page

var DoRedirect = "true"; 	//set this to "true" to redirect when completed loading, other values will be considered false (case sensitive)
var RedirectTo = "/vmart/index.php";	//This is the page we will navigate to once the load is complete (this may be case sensitive, depending on the server it is hosted on)



//This function will redirect to the page specified at the top of this script
function Redirect() {
    window.location.replace(RedirectTo);
}

//Now lets set an event so that once the page fully loads, we will redirect to the next page.
//Also added an option to cancel the redirect.
if ( DoRedirect == "true" ) {
	window.onload = Redirect;
}