function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function showContent(id) {
	var containObj=MM_findObj("dynContent");
	var targetObj=MM_findObj("dyn"+id);
	containObj.innerHTML=targetObj.innerHTML;
	var hideTarget=MM_findObj("dynTemp");
	if (hideTarget && hideTarget.style) {
		hideTarget.style.display="none";
	}
	if (document.lnk) {
		document.lnk.style.fontWeight = "";
	}
	var lnkTarget=MM_findObj("lnk"+id);
	if (lnkTarget && lnkTarget.style) {
		lnkTarget.style.fontWeight = "bold";
		document.lnk=lnkTarget;
	}
}




// JavaScript Document

<!--

var W3CDOM = (document.createElement && document.getElementsByTagName);

var mouseOvers = new Array();
var mouseOuts = new Array();

function init()
{
	if (!W3CDOM) return;
	var imgs = document.getElementsByTagName('img');
	for (var i=0; i<imgs.length; i++)
	{
		if (imgs[i].src.indexOf('.gif') != -1) // On cible seulement les lments input de type image avec une extension de type .gif
		{			
			// Get image name
			tmp=(imgs[i].src.substring(imgs[i].src.lastIndexOf('/') + 1)).substring(0,(imgs[i].src.substring(imgs[i].src.lastIndexOf('/') + 1)).lastIndexOf('.'));
			
			if ( tmp.indexOf('_') != -1) /* search all img have "_" */
			{
				if (tmp.substring(tmp.lastIndexOf('_')+1) == "n" )
					{
						imgs[i].onmouseover = mouseGoesOver;
						imgs[i].onmouseout = mouseGoesOut;
						mouseOuts[i] = new Image();
						mouseOuts[i].src = imgs[i].src;
						mouseOvers[i] = new Image();	
						
						var suffix = imgs[i].src.substring(imgs[i].src.lastIndexOf('.'));
						if (imgs[i].src.lastIndexOf('.') != -1) { mouseOvers[i].src = imgs[i].src.substring(0,imgs[i].src.lastIndexOf('_')) + "_o" + suffix;}
						imgs[i].number = i;
					}
			}
		}
	} //end for
} //end init

function initreset()
{
	if (!W3CDOM) return;
	var imgs = document.getElementsByTagName('img');
	for (var i=0; i<imgs.length; i++)
	{
		if (imgs[i].src.indexOf('.gif') != -1) // On cible seulement les lments input de type image avec une extension de type .gif
		{			
			tmp=(imgs[i].src.substring(imgs[i].src.lastIndexOf('/') + 1)).substring(0,(imgs[i].src.substring(imgs[i].src.lastIndexOf('/') + 1)).lastIndexOf('.'));
			
			if ( tmp.indexOf('_') != -1) /* search all img have "_" */
			{
				if (tmp.substring(tmp.lastIndexOf('_')+1) == "o" )
				{
					var suffix = imgs[i].src.substring(imgs[i].src.lastIndexOf('.'));
					var tmpimg= new Image();
						tmpimg.src=imgs[i].src.substring(0,imgs[i].src.lastIndexOf('_')) + "_n.gif";
					imgs[i].src=tmpimg.src;
				}
			}
		}
	} //end for
} //end initreset

var fsub=false;
var mobj;
var osrc="";
function mouseGoesOver(fsub, mEvent) {
	if (checkIt("msie") != 0) { // use in IE
		if (fsub==true) {
			mobj.src=osrc;
			fsub=false;
		} else {
			this.src = mouseOvers[this.number].src;
		}
		osrc=event.srcElement.src;
		mobj=event.srcElement;
	}
	else {	// use in firefox
		if (fsub==true) {
			mobj.src=osrc;
			fsub=false;
		} else if (fsub=='')  {
			osrc=mEvent.target.src;
			mobj=mEvent.target;
		} else {
			this.src = mouseOvers[this.number].src;
		}
	}
}

function mouseGoesOut() {this.src = mouseOuts[this.number].src;	}

//-->

<!--
var detect = navigator.userAgent.toLowerCase();
var OS,browser,total,thestring;
var version = 0;

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

/* Drop down menu */

function getElementsByBaseTagClass(base, tag, className) { 
    var classPat = new RegExp('\\b'+className+'\\b'); 
    var nodes = base.getElementsByTagName(tag); 
    var matching = []; 
    for (var i = 0; i < nodes.length; i++) { 
        if (classPat.test(nodes[i].className)) { 
            matching.push(nodes[i]); 
        } 
    } 
	return matching; 
}

function dropsubmenu (id, curfaq) {
	if (curfaq.length == 1){
		if (curfaq.style.display=="") {
			curfaq.style.display="block";
		} else if (curfaq.style.display=="none") {
			curfaq.style.display="block";
		} else if (curfaq.style.display=="block") {
				curfaq.style.display="none";
		}
	}
	else{
		for (i=0; i<curfaq.length; i++){
			if (i != id)
				curfaq[i].style.display = "none";
				curfaq[id].style.display="block";
		}
	}
}

function hightlight (id, curlink) {
//	alert (curlink.length);
	if (curlink.length==1) {
		alert ("the length = 1");	
	} else {
		for (i=0; i < curlink.length; i++) {
			if (i!=id)
			curlink[i].style.fontWeight="normal";
			curlink[i].style.color="";		
			curlink[i].style.textDecoration="none";
			curlink[i].style.cursor="pointer";
		}
		curlink[id].style.fontWeight="bold";
		//curlink[id].style.color="#626262";		
		curlink[id].style.textDecoration="none";		
		curlink[id].style.cursor="text";		
	}
}




function sub_hightlight(id) {
if(id=="55763837ae035dc4c8f581299cee344e") return;
if(id=="aa3889d5cd50faaf6e3456feea7b6c96") return;

	curlink = document.getElementById(id);
	curlink.style.fontWeight="bold";
	
}


function dropsubmenu2(id, curfaq) {
	if (id=="Location") return;
	if (id=="SnapShots") return;
	if (id=="Misc") return;
	if (curfaq.length == 1){
		if (curfaq.style.display=="") {
			curfaq.style.display="block";
		} else if (curfaq.style.display=="none") {
			curfaq.style.display="block";
		} else if (curfaq.style.display=="block") {
				curfaq.style.display="none";
		}
	}
	else{
		for (i=0; i<curfaq.length; i++){
			if (curfaq[i].id != id)
				curfaq[i].style.display = "none";
		}
		curlink = document.getElementById(id);
		curlink.style.display="block";
		
	}
	
}

function resetdropsubmenu2(curfaq){
	for (i=0; i<curfaq.length; i++){
		if (curfaq[i])
			curfaq[i].style.display = "none";
	}

}

function hightlight2(id, curlink) {
//	alert (curlink.length);
//if (id=="a_Location") return;
	if (id=="a_Misc") return;
	if (curlink.length==1) {
		alert ("the length = 1");	
	} else {
		for (i=0; i < curlink.length; i++) {
			if (i != id)
			curlink[i].style.fontWeight="normal";
			curlink[i].style.color="";		
			curlink[i].style.textDecoration="none";
			curlink[i].style.cursor="pointer";
		}
		curlnk=document.getElementById(id);
		if (curlnk) {		
			curlnk.style.fontWeight="bold";
			curlnk.style.textDecoration="none";		
			curlnk.style.cursor="text";		
		}
	}
	

}



function setSize(h) {
	document.titleSize = h;
}

function checkSize() {
	if (document.titleSize) {
		var titleObj=MM_findObj("pageTitle");
		if (titleObj && titleObj.style) {
			titleObj.style.height=(25+(document.titleSize-22))+"px";
		}
	}
	setTimeout("checkSize()",100);
}

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->




//SET HEIGHT IFRAME

var iframesupport = true;
 function montre(id) {
	  if (document.getElementById) {
		  document.getElementById(id).style.display="block";
		} else if (document.all) {
		  document.all[id].style.display="block";
		} else if (document.layers) {
		  document.layers[id].display="block";
		} } 

 function cache(id) {
	  if (document.getElementById) {
		  document.getElementById(id).style.display="none";
		} else if (document.all) {
		  document.all[id].style.display="none";
		} else if (document.layers) {
		  document.layers[id].display="none";
		} } 

function setHeight(){// rcupre la hauteur de la fiche	
	var iframeHeight=document.getElementById('iframeCont').offsetHeight;
	window.parent.document.getElementById('iframeOffre').height=iframeHeight;
}


function setHeightFormProfil(){// rcupre la hauteur de la fiche	
	var iframeHeight=document.getElementById('iframeFormProfilCont').offsetHeight;
		window.parent.document.getElementById('iframeProfil').height=iframeHeight;
}


function afficherOffre (){//affiche le layer contenant l'iframe
	
	MM_showHideLayers('iframecontent','','visible','closepopup','','visible');
			}

function masquerOffre (){//masque le layer contenant l'iframe
	window.parent.MM_showHideLayers('iframecontent','','hidden','closepopup','','hidden');
}

// detection de Iframe 
function afficherEspacePerso(UrlQuery, magURL, sVieLocale)
{
	if (iframesupport) {
		showlayer('iframecontent');
		iframeOffre.location = "/c2k/magasin/commun/LayerMasthead.asp?txtVieLocale="+sVieLocale+"&txtMag="+magURL+"&txtUrlQuery=" + UrlQuery;
	}
	else if (magURL == "" || magURL == "c2k" )
	{
		
		document.location = "/c2k/portail/espace/home.asp";
	}
	else
	{
		document.location = "/"+magURL+"/dyn/espace/home.asp";
	}
}

function activesublink(id, linksub)
{
	//alert(linksub.length);
	for(i=0; i < linksub.length; i++){
		if(i!=id) {
			linksub[i].style.fontWeight="normal";
		}
	}
			linksub[id].style.fontWeight="bold";
}
function resetsublink(linksub)
{
	//alert(linksub.length);
	for(i=0; i < linksub.length; i++){
		if(linksub[i]) {
			linksub[i].style.fontWeight="normal";
		}
	}
}
function faq(linkarr) {
	lkarr = MM_findObj(linkarr)
	if(lkarr.style.display==""){
		lkarr.style.display="block";
		}
	else if (lkarr.style.display=="none"){
		lkarr.style.display="block";
		}
	else if (lkarr.style.display=="block"){
		lkarr.style.display="none";
		}
	}
// Contact us
function contactChkFrm(frm){
	if (isEmpty(frm.fullname.value)){
		alert("Please enter your name.");
		frm.fullname.focus();
		return;
	}
	
	if (!isEmail(frm.email.value)){
		alert("Please enter your email.");
		frm.email.focus();
		return;
	}
	
	if (isEmpty(frm.address.value)){
		alert("Please enter your mailing address.");
		frm.address.focus();
		return;
	}

	if (isEmpty(frm.message.value)){
		alert("Please enter your message.");
		frm.message.focus();
		return;
	}	
	
	frm.submit();
}
// Booking room
function bookChkInfo(frm){
	if (isEmpty(frm.firstname.value)){
		alert("Please enter your first name.");	
		frm.firstname.focus();
		return;
	}

	if (isEmpty(frm.lastname.value)){
		alert("Please enter your last name.");	
		frm.lastname.focus();
		return;
	}
	if (isEmpty(frm.company.value)){
		alert("Please enter company name.");	
		frm.company.focus();
		return;
	}

	if (isEmpty(frm.street.value)){
		alert("Please enter your street address.");	
		frm.street.focus();
		return;
	}
	
	if (frm.state.value=="SL - Select") {
		alert("Please select your country");
		frm.state.focus();
		return;
	}
	
	if (isEmpty(frm.phone.value)){
		alert("Please enter your phone.");	
		frm.phone.focus();
		return;
	}

	if (isEmpty(frm.email.value)|| !isEmail(frm.email.value)){
		alert("Please enter your email.");	
		frm.email.focus();
		return;
	}

	if (isEmpty(frm.arrival.value)){
		alert("Please select the arrival date.");	
		frm.arrival.focus();
		return;		
	}
	
	if (isEmpty(frm.departure.value)){
		alert("Please select the departure date.");	
		frm.departure.focus();
		return;		
	}

	if (frm.roompref.value < 0){
		alert("Please choose room type.");	
		frm.roompref.focus();
		return;		
	}
	
	if (frm.adults.value=="-1"){
		alert("Please enter number of adult.");	
		frm.adults.focus();
		return;		
	}
	if (frm.payment.value=="-1") {
		alert("Please select method of payment");
		frm.payment.focus();
		return;
	}

	frm.submit();
	
}
// Form validate functions
function isEmpty(str)
{
	if (str != "")
		while (str.charAt(0) == " ")
			str = str.substr(1, str.length);
	return (str == "")? true : false;
}
function inputPhone(number)
{
	var pattern = "0123456789- ().";
	
	if (len != 0)
	{
		var index = 0;
		var len = number.value.length;
		
		while ((index < len) && (len != 0))
			if (pattern.indexOf(number.value.charAt(index)) == -1)
			{
				if (index == len-1)
					number.value = number.value.substring(0, len-1);
				else if (index == 0)
					 	number.value = number.value.substring(1, len);
					 else number.value = number.value.substring(0, index)+number.value.substring(index+1, len);
				index = 0;
				len = number.value.length;
			}
			else index++;
	}
}
function inputNumber(number)
{
	var pattern = "0123456789";
	
	if (len != 0)
	{
		var index = 0;
		var len = number.value.length;
		
		while ((index < len) && (len != 0))
			if (pattern.indexOf(number.value.charAt(index)) == -1)
			{
				if (index == len-1)
					number.value = number.value.substring(0, len-1);
				else if (index == 0)
					 	number.value = number.value.substring(1, len);
					 else number.value = number.value.substring(0, index)+number.value.substring(index+1, len);
				index = 0;
				len = number.value.length;
			}
			else index++;
	}
}
function isEmail(email)
{
	if (email == "")
		return false;
	if (email.indexOf(" ") > 0)	
		return false;
	if (email.indexOf("@") == -1)	
		return false;
	if (email.indexOf(".") == -1)	
		return false;
	if (email.indexOf("..") != -1)	
		return false;
	if (email.indexOf("@") != email.lastIndexOf("@"))		
		return false;
		
	var len = email.length;
	
	if (email.lastIndexOf(".") == len-1)
		return false;
	
	var str = "0123456789abcdefghikjlmnopqrstuvwxyz-@._";
	
	for (var index = 0; index < len; index++)
		if (str.indexOf(email.charAt(index)) == -1)
			return false;
			
	var indexDot = 	email.indexOf(".");
	var indexAcsign = email.indexOf("@");
	
	if ((indexDot == indexAcsign-1) || (indexDot-1 == indexAcsign))
		return false;
					
	return true;
}

function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}





function resizePopWin(nest_obj, w, h){
	if (w && h) {
		window_width=w;
		window_height=h;
	} else {
		var nest_object= document.getElementById(nest_obj);
		var body_margin = 32;
		var scroll_bar = 20;
		var title_bar = 25;
		var form_space = 12;
		var scale = 1.3; // scale = height/width;
		var additional_range = 100;
		
		var window_width = nest_object.clientWidth + body_margin + scroll_bar ;
		var content_height = nest_object.clientHeight + body_margin + form_space + title_bar ;
		var window_height = Math.min(Math.round(window_width * scale), Math.min(content_height, screen.height)) ;
		if (window_height == Math.round(window_width * scale) && Math.abs(window_height - content_height) < additional_range && content_height < screen.height - additional_range){
			window_height = content_height;
		}
		
		if (window_height < content_height){
			document.body.scroll = "auto";
		}else{
			document.body.scroll = "no";
		}
		
		if (checkIt("msie")==0) { /*on Firefox*/
			window_height+=40;		
		}	
	}
	window.resizeTo(window_width, window_height );
	
	var x = (screen.width) ? (screen.width - window_width) / 2 : 100;
	var y = (screen.height) ? (screen.height - window_height) / 2 : 100;
	
	window.moveTo(x, y);
}








var ns6=document.getElementById&&!document.all
function restrictinput(maxlength,e,placeholder) {
	if (window.event&&event.srcElement.value.length>=maxlength) {
		return false;
	}else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength) { 
		var pressedkey=/[a-zA-Z0-9\.\,\/]/ ;//detect alphanumeric keys
		if (pressedkey.test(String.fromCharCode(e.which))) e.stopPropagation();
	}
} 



function countlimit(maxlength,e,placeholder) {
	var lengthleft=window.event? maxlength-event.srcElement.value.length : maxlength-e.target.value.length;
	var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
	if (window.event||e.target&&e.target==eval(placeholder)) placeholderobj.innerHTML=lengthleft;
}


function displaylimit(theform, thelimit) {
	var limit_text='B?n c th? nh?p: <span id="'+theform.toString()+'">'+thelimit+'</span> k t? '
	if (document.all||ns6)
		document.write(limit_text);
	if (document.all) {
		eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
		eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
	} else if (ns6) {
		document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true);
		document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true);
	}
}

var animCount = 0;
var speed = 200;
var distance = 0;

function showPostal() {
	var p = MM_findObj("blockNews");	
	p.style.display="block";
	showAnimPostal();
}

function showAnimPostal(){
	var p = MM_findObj("blockNews");	
	animCount++;
	distance += Math.round(speed / animCount / animCount);
	p.style.left = (-210 + distance) + "px";	
	if (animCount == 10) return;	
	setTimeout("showAnimPostal()", 10);
}

function hidden() {
	show = MM_findObj("blockNews");
	show.style.display="none";
	
	}
////////////////////// NEW UPDATE
function opaceIt(thisObj, opaceTo) {
	if (!thisObj) {
		return;
	}
	var myEffects = new Fx.Styles(thisObj, {duration:400, transition:Fx.Transitions.quadInOut});
	myEffects.start({opacity:opaceTo, mozOpacity:opaceTo});
}
////////////////////// FOREX
var currencyInterval;
function ShowForexRate(){
	if (typeof(vForex1) !='undefined' && typeof(vCost1) !='undefined') AddCurrencyRate(vForex1, vCost1);
	if (typeof(vForex2) !='undefined' && typeof(vCost2) !='undefined') AddCurrencyRate(vForex2, vCost2);
	if (typeof(vForex3) !='undefined' && typeof(vCost3) !='undefined') AddCurrencyRate(vForex3, vCost3);
	if (typeof(vForex4) !='undefined' && typeof(vCost4) !='undefined') AddCurrencyRate(vForex4, vCost4);
	if (typeof(vForex5) !='undefined' && typeof(vCost5) !='undefined') AddCurrencyRate(vForex5, vCost5);
	if (typeof(vForex6) !='undefined' && typeof(vCost6) !='undefined') AddCurrencyRate(vForex6, vCost6);
	if (typeof(vForex7) !='undefined' && typeof(vCost7) !='undefined') AddCurrencyRate(vForex7, vCost7);
	if (typeof(vForex8) !='undefined' && typeof(vCost8) !='undefined') AddCurrencyRate(vForex8, vCost8);
	if (typeof(vForex9) !='undefined' && typeof(vCost9) !='undefined') AddCurrencyRate(vForex9, vCost9);
	if (typeof(vForex10)!='undefined' && typeof(vCost10)!='undefined') AddCurrencyRate(vForex10, vCost10);
	if (typeof(vForex11)!='undefined' && typeof(vCost11)!='undefined') AddCurrencyRate(vForex11, vCost11);
	if (typeof(vForex12)!='undefined' && typeof(vCost12)!='undefined') AddCurrencyRate(vForex12, vCost12);
	if (typeof(vForex13)!='undefined' && typeof(vCost13)!='undefined') AddCurrencyRate(vForex13, vCost13);
	if (typeof(vForex14)!='undefined' && typeof(vCost14)!='undefined') AddCurrencyRate(vForex14, vCost14);
}

function AddCurrencyRate(Currency, Rate){
	var tableRate = new Element('table');
	var newLine = new Element('tr');
	var rateTd = new Element('td');	
	var nameTd = new Element('td');
	
	nameTd.addClass('exchangeName');	
	rateTd.addClass('exchangeRate');
	nameTd.appendText(Currency);
	rateTd.appendText(Rate);
	
	newLine.adopt(nameTd);
	newLine.adopt(rateTd);
	
	$("currencyExchange").adopt(newLine);
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}