// JavaScript Document
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 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_popupMsg(msg) { //v1.0
  alert(msg);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function myFocus(object) {
	document.f.object.focus();
	}

function lostfocus(obj) { 
	obj.style.backgroundColor='#ffffff'
	}

function setfocus(obj) { 
	obj.style.backgroundColor='#faead1'
	}
	
function highlight(obj) {
	obj.style.backgroundColor= '#faead1'
}

function remove(obj) {
	obj.style.backgroundColor= ''
}

function goToURL() {
  var i, args=goToURL.arguments; document.returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}

var statusLuxury = false;
var statusTheme = false;

function Luxury() {
	var e = document.getElementById('luxury');
	var d = e.getElementsByTagName('DIV');
	if (statusLuxury == false) {
		if (statusTheme == true) Theme();
		for (var i = 0; i < d.length; i++) {
			if (d[i].className == 'menu1') d[i].style.display = 'block';
		}
		document.images['minimize1'].src = '../images/luxury_theme_selected.gif';
		statusLuxury = true;
	}
	else {
		for (var i = 0; i < d.length; i++) {
			if (d[i].className == 'menu1') d[i].style.display = 'none';
		}
		document.images['minimize1'].src = '../images/luxury_theme.gif';
		statusLuxury = false;
	}
}

function Theme() {
	var e = document.getElementById('theme');
	var d = e.getElementsByTagName('DIV');
	if (statusTheme == false) {
		if (statusLuxury == true) Luxury();
		for (var i = 0; i < d.length; i++) {
			if (d[i].className == 'menu2') d[i].style.display = 'block';
		}
		document.images['minimize2'].src = '../images/theme_selected.gif';
		statusTheme = true;
	}
	else {
		for (var i = 0; i < d.length; i++) {
			if (d[i].className == 'menu2') d[i].style.display = 'none';
		}
		document.images['minimize2'].src = '../images/theme.gif';
		statusTheme = false;
	}
}
	
var curexpando;

function expando1(ids,elmnt,whichClass,index)	{
curexpando = ids;
var theElement = document.getElementById(ids)
var dropList = theElement.getElementsByTagName(elmnt)
	for(var i = 0; i < dropList.length; i++)	{
		if (dropList[i].className == whichClass)	{//droplist
			if (dropList[i].style.display == 'block')	{
				dropList[i].style.display = 'none'
				//if nested menus are not using any images set index to zero
				if (index > 0)
				document.images['minimize' +index].src = '../images/luxury_theme.gif'
			} else if (dropList[i].style.display = 'none')	{
				dropList[i].style.display = 'block'
				if (index > 0)
				document.images['minimize' +index].src = '../images/luxury_theme_selected.gif'
			}
		}

	}
}
function expando2(ids,elmnt,whichClass,index)	{
curexpando = ids;
var theElement = document.getElementById(ids)
var dropList = theElement.getElementsByTagName(elmnt)
	for(var i = 0; i < dropList.length; i++)	{
		if (dropList[i].className == whichClass)	{//droplist
			if (dropList[i].style.display == 'block')	{
				dropList[i].style.display = 'none'
				//if nested menus are not using any images set index to zero
				if (index > 0)
				document.images['minimize' +index].src = '../images/theme.gif'
			} else if (dropList[i].style.display = 'none')	{
				dropList[i].style.display = 'block'
				if (index > 0)
				document.images['minimize' +index].src = '../images/theme_selected.gif'
			}
		}

	}
}

function mailTo( who, login )
	{
		document.write( "<a href=\"mailto:" + login + "@fantasylandhotel.com\">" + who + "</a>" );
	}
	
// below is taken from The JavaScript Source!! http://javascript.internet.com
function right(e) {
  var msg = "Images on this page are copyright protected!";
  
  if (navigator.appName == 'Netscape' && e.which == 3) {
    alert(msg);
    return false;
  }
  
  if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
    alert(msg);
    return false;
  }
  else return true;
}

function trap() 
{
  if(document.images)
  {
    for(i=0;i<document.images.length;i++)
    {
      document.images[i].onmousedown = right;
      document.images[i].onmouseup = right;
    }
  }
  if (document.referrer.indexOf('fantasylandhotel') > 0 && document.referrer.indexOf('splash/wemindex.asp') < 0){
    var obj=document.getElementById('promopop');
      if(obj){
        var style = obj.style;
        style.display = "none";
 
      }
   }
}
function hidepopup () 
{ 
	var style = document.getElementById('promopop').style 
	style.display = "none"; 
} 

//trap();

//function rc(evnt){if (navigator.appName.toUpperCase().match(/NETSCAPE/) != null)
//{if (evnt.which>=2){alert("All images on this page are copyright protected!");return false;}}else
//{if (event.button>=2){alert("All images on this page are copyright protected!");}}}document.onmousedown=rc;
//if (document.layers)window.captureEvents(Event.MOUSEDOWN);window.onmousedown=rc;