// Image Functions
// changeImage() and preload() functions for rollovers and GIF animation
// 19990326

// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/

function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}
function changeImage(layer,imgName,imgObj) {
	if (document.images) {
		if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src')
		else document.images[imgName].src = eval(imgObj+".src")
	}
}



function swapLang( lang ) {
		// expires=Fri, 1-Jan-2010 12:00:00 GMT; 
		document.cookie = "mega_lng=" + lang + "; expires=Fri, 1-Jan-2050 12:00:00 GMT; path=/;";
		document.location.reload();
}


function model() {

	ms = document.getElementById('model').style.display;

	if (ms == 'none') {
		document.getElementById('model').style.display = "";
		document.getElementById('modelimg').src = "/img/minus.gif";
	} else {
		document.getElementById('model').style.display = "none";
		document.getElementById('modelimg').src = "/img/plus.gif";
	}

}

function load_music(location)
{
	window.document.flash.SetVariable("currentStop", 0);
	window.document.flash.SetVariable("location",  location);
	window.document.flash.SetVariable("getting", 1);
}
