
var AgntUsr=navigator.userAgent.toLowerCase();
var AppVer=navigator.appVersion.toLowerCase();
var DomYes=document.getElementById?1:0;
var NavYes=AgntUsr.indexOf('mozilla')!=-1&&AgntUsr.indexOf('compatible')==-1?1:0;
var ExpYes=AgntUsr.indexOf('msie')!=-1?1:0;
var Opr=AgntUsr.indexOf('opera')!=-1?1:0;

function clkmnu(obj){
 var name=obj.id;
 window.location.href=eval("Menu" + name.substr(7,3))[1];
}


//================preload image====================
 if(document.images){
 pic1=new Image(100,25);
 pic1.src="img/menubg.jpg";
 
 pic2=new Image(100,25);
 pic2.src="img/logo_blur.jpg";
 
 pic3=new Image(100,25);
 pic3.src="img/favicon.jpg";
 
 pic4=new Image(100,25);
 pic4.src="img/msg_cross.jpg";
 
 }





//====================change language version==========================
function toEng(){
var b=window.location.toString();
window.location="../english/"+b.substr(b.lastIndexOf('/')+1,b.length);
}
function toBig5(){
var b=window.location.toString();
window.location="../chinese/"+b.substr(b.lastIndexOf('/')+1,b.length);
}



function hidelayer(){
document.getElementById("login").style.display='none';
document.getElementById("warnning").style.display='none';
document.getElementById("form").style.display='none';
}
function showlayer(){
document.getElementById("login").style.display='block';
document.getElementById("form").style.display='block';
document.getElementById("login_name").value='';
document.getElementById("login_password").value='';
document.getElementById('login_name').focus();
}
function errormsg(){
document.getElementById("warnning").style.display='block';
document.getElementById("form").style.display='none';
}
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_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.id; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { 
		obj=obj.style; 
		v=(v=='show')?'visible':(v=='hide')?'hidden':v; 
	}
    obj.visibility=v; }
	
	if (v=='hidden'){
		obj.display='none';
		}else{ obj.display='block';
		}
}



//=========================disclaimer function====================
function showDisclaimer(){
	if(ExpYes){
		if(document.all.list){
			hideme();	
		}	
	}
	document.getElementById('disclaimer').style.display = "block";		

	document.getElementById('disclaimer').innerHTML="<div style='position:relative;left:30px;' align='right'><img src='img/msg_cross.jpg'/ onclick='hideDisclaimer()'></div><div style='position:relative;left:0px;width:280px;background-color:#FFFFFF;' align='left'><img src='img/favicon.jpg'/></div><b>DISCLAIMER</b><br/><br/>The Manhattan Macau Development Limited (hereinafter referred to as the Vendor) reserves the right to make modifications and changes to the building design, specifications, features, floor plans, materials and the intended use of all facilities without prior notice.<br/><br/> All information provided on or through this website is subject to final Government approved plans and documentation. Photos, maps, perspectives and computer graphics in this brochure are for reference only and nothing in this website shall constitute or be construed as an offer, representation or warranty whether expressly or impliedly. <br/><br/>Some of the photos and floor plans have been enhanced by computer graphics. The Vendor reserves the right to make modifications and changes to the timetable, plans, layout, design, facilities and other perspectives of the development referred to herein, which are for reference only. <br/><br/>All information contained herein shall be conditioned to the terms and conditions of the constitutive title of horizontal property and to the Purchase and Sales Agreement.";
}
function hideDisclaimer(){
	if(ExpYes){
		if(document.all.list){
			showme();	
		}	
	}	
	document.getElementById('disclaimer').style.display = "none";		
}