// JavaScript Document

//=======================================================================
// Preload Images and RollOver
//=======================================================================

var sActHref = window.location.href;
var sLng = sActHref.substr(sActHref.indexOf(".com/") + 5, 2);
//var sSectFolderName = sActHref.substr(sActHref.indexOf(sLng + "/") + 3, sActHref.indexOf("/", sActHref.indexOf(sLng + "/") + 3) - (sActHref.indexOf(sLng + "/") + 3));



//=======================================================================
// Preload Images and RollOver
//=======================================================================

var preloadFlag = false;


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


function preloadImages() {
	if (document.images) {

		// Images used for the roll over on the left menu
		btn_leftMenu_01 = newImage("/" + sLng + "/images/leftMenu_over_03.gif");
		btn_leftMenu_02 = newImage("/" + sLng + "/images/leftMenu_over_04.gif");
		btn_leftMenu_03 = newImage("/" + sLng + "/images/leftMenu_over_05.gif");
		btn_leftMenu_04 = newImage("/" + sLng + "/images/leftMenu_over_06.gif");
		btn_leftMenu_05 = newImage("/" + sLng + "/images/leftMenu_over_07.gif");
		btn_leftMenu_06 = newImage("/" + sLng + "/images/leftMenu_over_08.gif");
		btn_leftMenu_07 = newImage("/" + sLng + "/images/leftMenu_over_09.gif");
		btn_leftMenu_08 = newImage("/" + sLng + "/images/leftMenu_over_10.gif");
		btn_leftMenu_09 = newImage("/" + sLng + "/images/leftMenu_over_11.gif");
		btn_leftMenu_10 = newImage("/" + sLng + "/images/leftMenu_over_12.gif");
		
		
		btn_topMenu2_01 = newImage("/" + sLng + "/images/top_2007_over_04.jpg");
		btn_topMenu2_02 = newImage("/" + sLng + "/images/top_2007_over_06.jpg");
		btn_topMenu2_03 = newImage("/" + sLng + "/images/top_2007_over_08.jpg");
		btn_topMenu2_04 = newImage("/" + sLng + "/images/top_2007_over_13.jpg");
		btn_topMenu2_05 = newImage("/" + sLng + "/images/top_2007_over_15.jpg");
		btn_topMenu2_06 = newImage("/" + sLng + "/images/top_2007_over_17.jpg");
		
		
		btn_bottomMenu_01 = newImage("/" + sLng + "/images/bottom_2007_over_01.gif");
		btn_bottomMenu_02 = newImage("/" + sLng + "/images/bottom_2007_over_02.gif");
		btn_bottomMenu_03 = newImage("/" + sLng + "/images/bottom_2007_over_03.gif");
		
		preloadFlag = true;
	}
}

function poptour(url) {
	var w = 550;
	var h = 500;
	
	var nt = (screen.width / 2) - (w / 2);
	var nl = (screen.height / 2) - (h / 2);
	
	window.open(url,'tour','width=' + w + ',height=' + h + ',left=' + nt + ',top=' + nl + ',scrollbars=yes');
}

function artistes(url) {
	window.open(url,'Artistes','width=625,height=400,left=50,top=50,resizable=no');
}

function cartedusite(url) {
	window.open(url,"carte","width=725,height=585,left=50,top=50");
}

function popwin(url,w,h) {
	window.open(url,"win","width=" + w + ",height=" + h + ",top=50,left=50,scrollbars=yes");
}

function popwindow(url) {
	var iNewWinWidth = 525;
	var iNewWinheight = 450;
	var iX_pos = Math.round((screen.width / 2) - (iNewWinWidth / 2));
	var iY_pos = Math.round((screen.height / 2) - (iNewWinheight / 2));
	
	window.open(url,'Tour','width=' + iNewWinWidth + ',height=' + iNewWinheight + ',toolbar=no,scrollbars=no,left=' + iX_pos + ',top=' + iY_pos + ',resizable=no')
}


//=======================================================================
// Function Call
//=======================================================================

preloadImages();



	
//=======================================================================
// Function Popup for User Login
//=======================================================================
/*function winForgot(url) {
	var iNewWinWidth = 350;
	var iNewWinheight = 175;
	var iX_pos = (screen.width / 2) - (iNewWinWidth / 2);
	var iY_pos = (screen.height / 2) - (iNewWinheight / 2);
	
	forgotPass = window.open(url, "winforgot", "width=" + iNewWinWidth + ",height=" + iNewWinheight + ",left=" + iX_pos + " ,top=" + iY_pos + ",resize=yes");
}


function winopen(url) {
	window.open(url, "win", "width=" + iNewWinWidth + ",height=" + iNewWinheight + ",left=" + iX_pos + ",top=" + iY_pos);
}*/
