// PRELOAD IMAGES
if (document.images) {
	var ufoOn = new Image();
	ufoOn.src = "img/big_ufo_anim_on.gif";

	var gumOn = new Image();
	gumOn.src = "img/big_gum_anim_on.gif";

	var dinoOn = new Image();
	dinoOn.src = "img/big_dino_anim_on.gif";

	var miniOn = new Image();
	miniOn.src = "img/big_mini_anim_on.gif";
}

// SHOW AND HIDE ROLLOVERS
function toggle(id) {
	if (document.getElementById(id).style.display == 'none') {
		document.getElementById(id).style.display = 'block';
	} else {
		document.getElementById(id).style.display = 'none';
	}
}

// CREATE CENTERED POPUPS
function centeredPopup(url,windowName,windowWidth,windowHeight) {
	var windowLeft = (screen.width-windowWidth)/2;
	var windowTop = (screen.height-windowHeight)/2;
	winprops = 'width='+windowWidth+',height='+windowHeight+',top='+windowTop+',left='+windowLeft+',resizable=no,scrollbars=no,location=no,status=no,menubar=no,toolbar=no';
	win = window.open(url, windowName, winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// EMBED QT MOVIE
function embedQT(file,objectName,width,height) {
	document.write('<object id="'+objectName+'" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="'+width+'" height="'+height+'" codebase="http://www.apple.com/qtactivex/qtplugin.cab">');
	document.write('<param name="src" value="'+file+'">');
	document.write('<param name="bgcolor" value="#000000">');
	document.write('<param name="autoplay" value="true">');
	document.write('<param name="controller" value="false">');
	document.write('<param name="loop" value="false">');
	document.write('<param name="pluginspage" value="http://www.apple.com/quicktime/download/">');
	document.write('<embed name="'+objectName+'" src="'+file+'" width="'+width+'" height="'+height+'" bgcolor="#000000" autoplay="true" controller="false" loop="false" pluginspage="http://www.apple.com/quicktime/download/"></embed>');
	document.write('</object>');
}

// REPLAY MOVIE FUNCTIONS
function replayUfoMovie() {
	document.ufo_movie.Rewind();
	document.ufo_movie.Play();
}

function replayDinosaurMovie() {
	document.dinosaur_movie.Rewind();
	document.dinosaur_movie.Play();
}

function replayGumMovie() {
	document.gum_movie.Rewind();
	document.gum_movie.Play();
}

 function callTracking(hostname,url){
                var doTrack = new Image();
                doTrack.src = "http://" + hostname + url ;
 }

