var galleryid = '0';
var galleryopened = "n";

function galleryreset(){
	galleryopened = "n";
}

function gotoAnchor(divname){
  var browser=navigator.appName;
  var ieversion=8;
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){  
		var ieversion=new Number(RegExp.$1);
	}
	if (ieversion>6){
		window.location.hash="#" + divname;
	}
    
}



function bedroomtypechange(ts){
	var t1,t2,t3;
	t3 = t3 + "<select name='bedroomname' id='bedroomname' class='inputField'>";
	t3 = t3 + "<option value='Duke of Atholl'>Duke of Atholl</option>";
	t3 = t3 + "<option value='Emma'>Emma</option>";
	t3 = t3 + "<option value='Isobel'>Isobel</option>";
	t3 = t3 + "<option value='Sir Francis Goldshmidt'>Sir Francis Goldshmidt</option>";
	t3 = t3 + "<option value='Mr Bulmers'>Mr Bulmer's</option>";
	t3 = t3 + "<option value='Mr Fredricks'>Mr Fredrick's</option>";
	t3 = t3 + "</select>";
	t1 = t1 + "<select name='bedroomname' id='bedroomname' class='inputField'>";
	t1 = t1 + "<option value='George Hanbury'>George Hanbury</option>";
	t1 = t1 + "<option value='James Wyatt'>James Wyatt</option>";
	t1 = t1 + "<option value='Duke of Newcastle'>Duke of Newcastle</option>";
	t1 = t1 + "<option value='Mr Attwicks Suite'>Mr Attwick's Suite</option>";
	t1 = t1 + "<option value='Lady Islington'>Lady Islington</option>";
	t1 = t1 + "</select>";
	t2 = t2 + "<select name='bedroomname' id='bedroomname' class='inputField'>";
	t2 = t2 + "<option value='Anthony Blunt'>Anthony Blunt</option>";
	t2 = t2 + "<option value='Samuel Courtauld'>Samuel Courtauld</option>";
	t2 = t2 + "<option value='Earl Grey'>Earl Grey</option>";
	t2 = t2 + "<option value='Lady Susan Thorpe'>Lady Susan Thorpe</option>";
	t2 = t2 + "<option value='Lady Charlotte'>Lady Charlotte</option>";
	t2 = t2 + "<option value='Floras'>Flora's</option>";
	t2 = t2 + "<option value='Carolines'>Caroline's</option>";
	t2 = t2 + "<option value='Patricia Portman'>Patricia Portman</option>";
	t2 = t2 + "<option value='Drury Lowe'>Drury Lowe</option>";
	t2 = t2 + "</select>";
	if (ts.value=="Suites"){
		document.getElementById("bedroomnamediv").innerHTML = t1;
	}else if (ts.value=="Feature Rooms"){
		document.getElementById("bedroomnamediv").innerHTML = t2;
	}else if (ts.value=="Club Rooms"){
		document.getElementById("bedroomnamediv").innerHTML = t3;
	}
	
}

function gallerySwitch(gid,rs){
	galleryopened = "y";
	galleryid = gid;
	hs.close(rs);
	setTimeout ( "loadingGallery()", 1000 );
}
function popupwin(url,sx,sy) {
	var winl = (screen.width-sx)/2;
	var wint = (screen.height-sy)/2;
  window.open(url,"popup","toolbar=no,location=no,resizable=yes,directories=yes,status=no,statusbar=no,menubar=no,scrollbars=yes,width="+sx+",height="+sy+"");
}

function openWindow(url,sx,sy)
{
      var winX = (screen.availWidth - sx) / 2;
      var winY = (screen.availHeight - sy) / 2;
      var features = 'left=' + winX + ',top=' + winY + ',height=' + sy + ',' + 'width=' + sx + ',status=yes,' + 'toolbar=no,resizable=yes,menubar=no,location=no';
      window.open(url, null, features);
}

function loadingGallery(){
	galleryopened = "y";
	//console.log("loadingGallery",galleryopened);
	var galleryDiv 	= YAHOO.util.Dom.get('gallerySection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						galleryDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			galleryDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingGallery&manuname="+galleryid, callbacks);
	//openRoom(12);
	var num = 12
	

	var browser=navigator.appName;
	if (browser=="Microsoft Internet Explorer"){
		setallcontentnone();
		document.getElementById("content"+num).style.display="block";
	}
	
	var room = document.getElementById("content"+num);
	hs.htmlExpand(room,{ contentId: "content"+num, width:697, height:467});
	
	//alert(galleryopened);
	time12 = time12+1;
	
	winResize(num);
}

function loadingContactus(manuname){
	
	var contactusDiv 	= YAHOO.util.Dom.get('contactusSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						contactusDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			contactusDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingContactus&manuname="+manuname, callbacks);
}

function loadingPress(){
	var aboutDiv 	= YAHOO.util.Dom.get('pressSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						aboutDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			aboutDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingPress", callbacks);
}

function loadingAbout(manuname){
	var aboutDiv 	= YAHOO.util.Dom.get('aboutusSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						aboutDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			aboutDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingAbout&manuname="+manuname, callbacks);
}

function logmembershioplogin(){
	var currentpage = document.getElementById("currentpage").value;
	var manuname = "membershiplogin";
	var membershipDiv 	= YAHOO.util.Dom.get('membershipLoginSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
			    	//YAHOO.util.Dom.get('membershopleftside').innerHTML="";
						membershipDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			membershipDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingMembership&manuname="+manuname+"&currentpage="+currentpage, callbacks);
	
	//var num = 6;
	//var room = document.getElementById("content"+num);
	//return hs.htmlExpand(room,{ contentId: "content"+num, width:697, height:467})
}

function loadingMembership(manuname){
	var membershipDiv 	= YAHOO.util.Dom.get('membershipSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
			    	//YAHOO.util.Dom.get('membershopleftside').innerHTML="<div class='roomImage'><img src='img/6_OFFICE_MEMBERSHIP.jpg'/></div>";
						membershipDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			membershipDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingMembership&manuname="+manuname+'&rnd='+'aaa', callbacks);
}

function loadingEvents(manuname,eid){
	var eventsDiv 	= YAHOO.util.Dom.get('eventsSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						eventsDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			eventsDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingEvents&manuname="+manuname+"&eid="+eid, callbacks);
}

function loadingBedrooms(manuname){
	var bedroomsDiv 	= YAHOO.util.Dom.get('bedroomsSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						bedroomsDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			bedroomsDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS' /></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingBedrooms&manuname="+manuname, callbacks);
}

function loadingPrivate(manuname){
	var privateDiv 	= YAHOO.util.Dom.get('privateSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						privateDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			privateDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingPrivate&manuname="+manuname, callbacks);
}

function loadGym(manuname){
	if (manuname=="Spa"){
		YAHOO.util.Dom.get('room8').className = "roomImage81";
	}else{
		YAHOO.util.Dom.get('room8').className = "roomImage8";
	}
	
	var gymDiv 	= YAHOO.util.Dom.get('gymSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						gymDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			gymDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadGym&manuname="+manuname, callbacks);
}

function loadingBar(manuname){
	var barDiv 	= YAHOO.util.Dom.get('barSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						barDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			barDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingBar&manuname="+manuname, callbacks);
}


function loadingRestaurant(manuname){
	var restaurantDiv 	= YAHOO.util.Dom.get('restaurantSection');
	var callbacks = {
		success : function (o) {
			if(o.responseText !== undefined){
		    if(o.responseText.indexOf('||') != -1) {
			    update = o.responseText.split('||');
			    if (update[0]=="y"){
						restaurantDiv.innerHTML = update[1];
			    }
		    }
			}
		},
		failure : function (o) {
			restaurantDiv.innerHTML = "<div id='loadingCSS'><img src='images/loading.gif' class='loadingimageCSS'/></div>";
		},
		timeout : 10000
	}
	YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=loadingRestaurant&manuname="+manuname, callbacks);
}

function membershipEnquiriesClick(){
	var mstr			= "";
	var mname 		= YAHOO.util.Dom.get('mname').value;
	var maddress 	= YAHOO.util.Dom.get('maddress').value;
	var mdob 			= YAHOO.util.Dom.get('mdob').value;
	var mtelephone= YAHOO.util.Dom.get('mtelephone').value;
	var memail 		= YAHOO.util.Dom.get('memail').value;
	var mhear 		= YAHOO.util.Dom.get('mhear').value;
	var mexisting = YAHOO.util.Dom.get('mexisting').value;
	if (mname=="" || mname=="Your Name"){
		alert("Please fill-in name, address, DOB, telephone & email before you submit the form");
	}else if (maddress=="" || maddress=="Address"){
		alert("Please fill-in name, address, DOB, telephone & email before you submit the form");
	}else if (mdob=="" || mdob=="Date of Birth"){
		alert("Please fill-in name, address, DOB, telephone & email before you submit the form");
	}else if (mtelephone=="" || mtelephone=="Telephone Number"){
		alert("Please fill-in name, address, DOB, telephone & email before you submit the form");
	}else if (memail=="" || memail=="Email Address"){
		alert("Please fill-in name, address, DOB, telephone & email before you submit the form");
	}else{
		var club		= "";
		if (YAHOO.util.Dom.get('mclub1').checked){
			club			= YAHOO.util.Dom.get('mclub1').value + "||";
		}
		if (YAHOO.util.Dom.get('mclub2').checked){
			club			= club + YAHOO.util.Dom.get('mclub2').value + "||" ;
		}
		if (YAHOO.util.Dom.get('mclub3').checked){
			club			= club + YAHOO.util.Dom.get('mclub3').value + "||";
		}
		if (YAHOO.util.Dom.get('mclub4').checked){
			club			= club + YAHOO.util.Dom.get('mclub4').value + "||";
		}
		if (YAHOO.util.Dom.get('mclub5').checked){
			club			= club + YAHOO.util.Dom.get('mclub5').value + "||";
		}
		if (YAHOO.util.Dom.get('mclub6').checked){
			club			= club + YAHOO.util.Dom.get('mclub6').value + "||";
		}
		mstr = "&mname=" + mname + "&maddress=" + maddress + "&mdob=" + mdob + "&mtelephone=" + mtelephone+ "&memail=" + memail + "&mhear=" + mhear + "&mexisting=" + mexisting + "&club=" + club;
		var callbacks = {
			success : function (o) {
				if(o.responseText !== undefined){
			    if(o.responseText.indexOf('||') != -1) {
				    update = o.responseText.split('||');
				    if (update[0]=="y"){
							alert("Your enquiry has been sent");
				    }
			    }
				}
			},
			failure : function (o) {
				
			},
			timeout : 10000
		}
		YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=membershipenquiriesclick"+mstr, callbacks);
		
		
	}
	
}

function membershiplogonswitch(rs){
	setTimeout ( "logmembershioplogin()", 1000 );
	hs.close(rs);
}


function tablereservationclick(){
	var newstr				= "";
	var bedname				= YAHOO.util.Dom.get('bedname1').value;
	var bedmembership	= YAHOO.util.Dom.get('bedmembership1').value;
	var sdate			= "";
	
	var sdate1		= YAHOO.util.Dom.get('fday').value;
	var sdate2		= YAHOO.util.Dom.get('fmonth').value;
	var sdate3		= YAHOO.util.Dom.get('fyear').value;
	
	
	var stime		= YAHOO.util.Dom.get('stime').value;
	var guests		= YAHOO.util.Dom.get('guests').value;
	
	
	if (bedname=="" || bedname=="Your Name"){
		alert("Please fill-in the form before you submit it");
	}else if (bedmembership=="" || bedmembership=="Membership Number"){
		alert("Please fill-in the form before you submit it");
	}else if (sdate1=="" || sdate2=="" || sdate3==""){
		alert("Please fill-in the form before you submit it");
	}else if (stime=="" || stime=="Time"){
		alert("Please fill-in the form before you submit it");
	//}else if (isDate(sdate)==false){
	}else{
		sdate = sdate1 + "/" + sdate2 + "/" + sdate3;
		newstr+="&bedname="+bedname+"&bedmembership="+bedmembership+"&sdate="+sdate+"&stime="+stime+"&guests="+guests;
		var callbacks = {
			success : function (o) {
				if(o.responseText !== undefined){
			    if(o.responseText.indexOf('||') != -1) {
				    update = o.responseText.split('||');
				    if (update[0]=="y"){
				    	alert("Thank you, your data has been sent.");
				    }
			    }
				}
			},
			failure : function (o) {
			},
			timeout : 10000
		}
		YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=tablereservationclick"+newstr, callbacks);
	}
}


function isDate11 (str) {
var mySplitResult = str.split("/");
if (mySplitResult.length>=3){
	var year = mySplitResult[2];
	var month = mySplitResult[1];
	var day = mySplitResult[0];
	alert(year);
	alert(month);
	alert(day);
	
	month = month - 1; 
	var tempDate = new Date(year,month,day);
	if ( (getYear(tempDate.getYear()) == year) &&
	(month == tempDate.getMonth()) &&
	(day == tempDate.getDate()) )
		return true;
	else
		return false
}else{
	return false;
}

}
var dtCh= "/";
var minYear=1900;
var maxYear=2100;

function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}

function isDate(dtStr){
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	
	var strDay=dtStr.substring(0,pos1)
	var strMonth=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
		alert("The date format should be : dd/mm/yyyy")
		return false
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month")
		return false
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Please enter a valid day")
		return false
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Please enter a valid date")
		return false
	}
	return true
}

function bedroomreservationclick(){
	var newstr				= "";
	var bedname				= YAHOO.util.Dom.get('bedname').value;
	var youremail				= YAHOO.util.Dom.get('youremail').value;
	var bedmembership	= YAHOO.util.Dom.get('bedmembership').value;
	
	var bedcheckin		= "";
	
	var sdate1		= YAHOO.util.Dom.get('fday').value;
	var sdate2		= YAHOO.util.Dom.get('fmonth').value;
	var sdate3		= YAHOO.util.Dom.get('fyear').value;
	
	
	
	var bednumberofnights		= YAHOO.util.Dom.get('bednumberofnights').value;
	var bedroomtype		= YAHOO.util.Dom.get('bedroomtype').value;
	var bedroomname		= "";
	
	
	if (bedname=="" || bedname=="Your Name"){
		alert("Please fill-in the form before you submit it");
	}else if (youremail=="" || youremail=="Membership Number"){
		alert("Please fill-in the form before you submit it");
	}else if (bedmembership=="" || bedmembership=="Membership Number"){
		alert("Please fill-in the form before you submit it");
	}else if (sdate1=="" || sdate2=="" || sdate3==""){
		alert("Please fill-in the form before you submit it");
	}else if (bednumberofnights=="" || bednumberofnights=="Number of Nights"){
		alert("Please fill-in the form before you submit it");
	}else if (bedroomtype=="" || bedroomtype=="Room Type"){
		alert("Please fill-in the form before you submit it");
	}else{
		bedcheckin = sdate1 + "/" + sdate2 + "/" + sdate3;
		
		newstr+="&bedname="+bedname+"&youremail="+youremail+"&bedmembership="+bedmembership+"&bedcheckin="+bedcheckin+"&bednumberofnights="+bednumberofnights+"&bedroomtype="+bedroomtype+"&bedroomname="+bedroomname;
		var callbacks = {
			success : function (o) {
				if(o.responseText !== undefined){
			    if(o.responseText.indexOf('||') != -1) {
				    update = o.responseText.split('||');
				    if (update[0]=="y"){
				    	alert("Thank you, your data has been sent.");
				    }
			    }
				}
			},
			failure : function (o) {
			},
			timeout : 10000
		}
		YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=bedroomreservationclick"+newstr, callbacks);
	}
}

function privateenquiriesclick(){
	var newstr		= "";
	var pename		= YAHOO.util.Dom.get('pename').value;
	var pephone		= YAHOO.util.Dom.get('pephone').value;
	var peemail		= YAHOO.util.Dom.get('peemail').value;
	var petype		= YAHOO.util.Dom.get('petype').value;
	var pedate		= "";
	var peguests	= YAHOO.util.Dom.get('peguests').value;
	
	var sdate1		= YAHOO.util.Dom.get('sday').value;
	var sdate2		= YAHOO.util.Dom.get('smonth').value;
	var sdate3		= YAHOO.util.Dom.get('syear').value;
	
	
	
	if (pename=="" || pename=="Your Name"){
		alert("Please fill-in the form before you submit it");
	}else if (pephone=="" || pephone=="Contact Phone Number"){
		alert("Please fill-in the form before you submit it");
	}else if (peemail=="" || peemail=="Email Address"){
		alert("Please fill-in the form before you submit it");
	}else if (petype=="" || petype=="Type of Event"){
		alert("Please fill-in the form before you submit it");
	}else if (sdate1=="" || sdate2=="" || sdate3==""){
		alert("Please fill-in the form before you submit it");
	}else{
		pedate = sdate1 + "/" + sdate2 + "/" + sdate3;
		newstr+="&pename="+pename+"&pephone="+pephone+"&peemail="+peemail+"&petype="+petype+"&pedate="+pedate+"&peguests="+peguests;
		var callbacks = {
			success : function (o) {
				if(o.responseText !== undefined){
			    if(o.responseText.indexOf('||') != -1) {
				    update = o.responseText.split('||');
				    if (update[0]=="y"){
				    	alert("Thank you, your data has been sent.");
				    }
			    }
				}
			},
			failure : function (o) {
			},
			timeout : 10000
		}
		YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=privateenquiriesclick"+newstr, callbacks);
	}
}

function joinussubmit(){
	var newstr		= "";
	var fposition	= YAHOO.util.Dom.get('fposition').value;
	var fstartdd	= YAHOO.util.Dom.get('fstartdd').value;
	var fstartmm	= YAHOO.util.Dom.get('fstartmm').value;
	var fstartyy	= YAHOO.util.Dom.get('fstartyy').value;
	var fhear			= YAHOO.util.Dom.get('fhear').value;
	var fwork 		= "";
	if (YAHOO.util.Dom.get('fwork1').checked){
		fwork				= "Full Time";
	}else if (YAHOO.util.Dom.get('fwork2').checked){
		fwork				= "Part Time";
	}
	var fstudying = "";
	if (YAHOO.util.Dom.get('fstudying1').checked){
		fstudying		= "yes";
	}else if (YAHOO.util.Dom.get('fstudying2').checked){
		fstudying		= "no";
	}
	var favilable = "";
	if (YAHOO.util.Dom.get('favilable1').checked){
		favilable		= "Mornings,";
	}
	if (YAHOO.util.Dom.get('favilable2').checked){
		favilable		+= "Evenings,";
	}
	if (YAHOO.util.Dom.get('favilable3').checked){
		favilable		+= "Weekends";
	}
	newstr+="&fposition="+fposition+"&fstartdd="+fstartdd+"&fstartmm="+fstartmm+"&fstartyy="+fstartyy+"&fhear="+fhear+"&fwork="+fwork+"&fstudying="+fstudying+"&favilable="+favilable;
	

	
	var fname			= YAHOO.util.Dom.get('fname').value;
	var flname		= YAHOO.util.Dom.get('flname').value;
	var faddress	= YAHOO.util.Dom.get('faddress').value;
	var fpostcode	= YAHOO.util.Dom.get('fpostcode').value;
	var fphone		= YAHOO.util.Dom.get('fphone').value;
	var fmobile		= YAHOO.util.Dom.get('fmobile').value;
	var fni				= YAHOO.util.Dom.get('fni').value;
	var fpassport = "";
	if (YAHOO.util.Dom.get('fpassport2').checked){
		fpassport		= "yes";
	}else if (YAHOO.util.Dom.get('fpassport2').checked){
		fpassport		= "no";
	}
	faddress		= escape(faddress);
	newstr+="&fname="+fname+"&flname="+flname+"&faddress="+faddress+"&fpostcode="+fpostcode+"&fphone="+fphone+"&fmobile="+fmobile+"&fni="+fni+"&fpassport="+fpassport;

	var fpassportdd	= YAHOO.util.Dom.get('fpassportdd').value;
	var fpassportmm	= YAHOO.util.Dom.get('fpassportmm').value;
	var fpassportyy	= YAHOO.util.Dom.get('fpassportyy').value;
	var fpassportid	= YAHOO.util.Dom.get('fpassportid').value;
	var fnationality= YAHOO.util.Dom.get('fnationality').value;
	var fpermit = "";
	if (YAHOO.util.Dom.get('fpermit2').checked){
		fpermit		= "yes";
	}else if (YAHOO.util.Dom.get('fpermit2').checked){
		fpermit		= "no";
	}
	var fpermitdd	= YAHOO.util.Dom.get('fpermitdd').value;
	var fpermitmm	= YAHOO.util.Dom.get('fpermitmm').value;
	newstr+="&fpassportdd="+fpassportdd+"&fpassportmm="+fpassportmm+"&fpassportyy="+fpassportyy+"&fpassportid="+fpassportid+"&fnationality="+fnationality+"&fpermit="+fpermit+"&fpermitdd="+fpermitdd+"&fpermitmm="+fpermitmm;

	
	var fpermityy	= YAHOO.util.Dom.get('fpermityy').value;
	var fbankaccount = "";
	if (YAHOO.util.Dom.get('fbankaccount2').checked){
		fbankaccount		= "yes";
	}else if (YAHOO.util.Dom.get('fbankaccount2').checked){
		fbankaccount		= "no";
	}
	var fphysical = "";
	if (YAHOO.util.Dom.get('fphysical1').checked){
		fphysical		= "yes";
	}else if (YAHOO.util.Dom.get('fphysical2').checked){
		fphysical		= "no";
	}
	var fimpairment	= YAHOO.util.Dom.get('fimpairment').value;
	var finterview	= YAHOO.util.Dom.get('finterview').value;
	var fdiseases	= YAHOO.util.Dom.get('fdiseases').value;
	var fmedicine	= YAHOO.util.Dom.get('fmedicine').value;
	var fabsences	= YAHOO.util.Dom.get('fabsences').value;
	fimpairment		= escape(fimpairment);
	finterview		= escape(finterview);
	fdiseases		= escape(fdiseases);
	fmedicine		= escape(fmedicine);
	fabsences		= escape(fabsences);
	newstr+="&fpermityy="+fpermityy+"&fbankaccount="+fbankaccount+"&fphysical="+fphysical+"&fimpairment="+fimpairment+"&finterview="+finterview+"&fdiseases="+fdiseases+"&fmedicine="+fmedicine+"&fabsences="+fabsences;

	
	
	var femployedfrommm	= YAHOO.util.Dom.get('femployedfrommm').value;
	var femployedfromyy	= YAHOO.util.Dom.get('femployedfromyy').value;
	var femployedtomm	= YAHOO.util.Dom.get('femployedtomm').value;
	var femployedtoyy	= YAHOO.util.Dom.get('femployedtoyy').value;
	var femployeraddress	= YAHOO.util.Dom.get('femployeraddress').value;
	var femployername	= YAHOO.util.Dom.get('femployername').value;
	var femployerphone	= YAHOO.util.Dom.get('femployerphone').value;
	var fleaving	= YAHOO.util.Dom.get('fleaving').value;
	fleaving		= escape(fleaving);
	newstr+="&femployedfrommm="+femployedfrommm+"&femployedfromyy="+femployedfromyy+"&femployedtomm="+femployedtomm+"&femployedtoyy="+femployedtoyy+"&femployeraddress="+femployeraddress+"&femployername="+femployername+"&femployerphone="+femployerphone+"&fleaving="+fleaving;
	
	
	var femployed2frommm	= YAHOO.util.Dom.get('femployed2frommm').value;
	var femployed2fromyy	= YAHOO.util.Dom.get('femployed2fromyy').value;
	var femployed2tomm	= YAHOO.util.Dom.get('femployed2tomm').value;
	var femployed2toyy	= YAHOO.util.Dom.get('femployed2toyy').value;
	var femployer2address	= YAHOO.util.Dom.get('femployer2address').value;
	var femployer2name	= YAHOO.util.Dom.get('femployer2name').value;
	var femployer2phone	= YAHOO.util.Dom.get('femployer2phone').value;
	var femployed3frommm	= YAHOO.util.Dom.get('femployed3frommm').value;
	newstr+="&femployed2frommm="+femployed2frommm+"&femployed2fromyy="+femployed2fromyy+"&femployed2tomm="+femployed2tomm+"&femployed2toyy="+femployed2toyy+"&femployer2address="+femployer2address+"&femployer2name="+femployer2name+"&femployer2phone="+femployer2phone+"&femployed3frommm="+femployed3frommm;
	
	var femployed3fromyy	= YAHOO.util.Dom.get('femployed3fromyy').value;
	var femployed3tomm	= YAHOO.util.Dom.get('femployed3tomm').value;
	var femployed3toyy	= YAHOO.util.Dom.get('femployed3toyy').value;
	var femployer3address	= YAHOO.util.Dom.get('femployer3address').value;
	var femployer3name	= YAHOO.util.Dom.get('femployer3name').value;
	var femployer3phone	= YAHOO.util.Dom.get('femployer3phone').value;
	var foffername	= YAHOO.util.Dom.get('foffername').value;
	var fofferaddress	= YAHOO.util.Dom.get('fofferaddress').value;
	fofferaddress		= escape(fofferaddress);
	newstr+="&femployed3fromyy="+femployed3fromyy+"&femployed3tomm="+femployed3tomm+"&femployed3toyy="+femployed3toyy+"&femployer3address="+femployer3address+"&femployer3name="+femployer3name+"&femployer3phone="+femployer3phone+"&foffername="+foffername+"&fofferaddress="+fofferaddress;

	
	var fofferphone	= YAHOO.util.Dom.get('fofferphone').value;
	var foffername2	= YAHOO.util.Dom.get('foffername2').value;
	var fofferaddress2	= YAHOO.util.Dom.get('fofferaddress2').value;
	var fofferphone2	= YAHOO.util.Dom.get('fofferphone2').value;
	var feducationname	= YAHOO.util.Dom.get('feducationname').value;
	var feducationmm	= YAHOO.util.Dom.get('feducationmm').value;
	var feducationyy	= YAHOO.util.Dom.get('feducationyy').value;
	var feducationtomm	= YAHOO.util.Dom.get('feducationtomm').value;
	fofferaddress2		= escape(fofferaddress2);
	newstr+="&fofferphone="+fofferphone+"&foffername2="+foffername2+"&fofferaddress2="+fofferaddress2+"&fofferphone2="+fofferphone2+"&feducationname="+feducationname+"&feducationmm="+feducationmm+"&feducationyy="+feducationyy+"&feducationtomm="+feducationtomm;


	var feducationtoyy	= YAHOO.util.Dom.get('feducationtoyy').value;
	var feducationsubject	= YAHOO.util.Dom.get('feducationsubject').value;
	var feducationname1	= YAHOO.util.Dom.get('feducationname1').value;
	var feducationmm1	= YAHOO.util.Dom.get('feducationmm1').value;
	var feducationyy1	= YAHOO.util.Dom.get('feducationyy1').value;
	var feducationtomm1	= YAHOO.util.Dom.get('feducationtomm1').value;
	var feducationtoyy1	= YAHOO.util.Dom.get('feducationtoyy1').value;
	var feducationsubject2	= YAHOO.util.Dom.get('feducationsubject1').value;
	newstr+="&feducationtoyy="+feducationtoyy+"&feducationsubject="+feducationsubject+"&feducationname1="+feducationname1+"&feducationmm1="+feducationmm1+"&feducationyy1="+feducationyy1+"&feducationtomm1="+feducationtomm1+"&feducationtoyy1="+feducationtoyy1+"&feducationsubject2="+feducationsubject2;

	///some code here
	
	var fskill	= YAHOO.util.Dom.get('fskill').value;
	var fcentificate	= YAHOO.util.Dom.get('fcentificate').value;
	var fhobbies	= YAHOO.util.Dom.get('fhobbies').value;
	var fworkforhomehouse	= YAHOO.util.Dom.get('fworkforhomehouse').value;
	var fcriminal = "";
	if (YAHOO.util.Dom.get('fcriminal1').checked){
		fcriminal		= "yes";
	}else if (YAHOO.util.Dom.get('fcriminal2').checked){
		fcriminal		= "no";
	}
	var fprosecution = "";
	if (YAHOO.util.Dom.get('fprosecution1').checked){
		fprosecution		= "yes";
	}else if (YAHOO.util.Dom.get('fprosecution2').checked){
		fprosecution		= "no";
	}
	var fcriminaldetail	= YAHOO.util.Dom.get('fcriminaldetail').value;
	fskill		= escape(fskill);
	fcentificate		= escape(fcentificate);
	fhobbies		= escape(fhobbies);
	fworkforhomehouse		= escape(fworkforhomehouse);
	fcriminal		= escape(fcriminal);
	fprosecution		= escape(fprosecution);
	fcriminaldetail		= escape(fcriminaldetail);
	newstr+="&fskill="+fskill+"&fcentificate="+fcentificate+"&fhobbies="+fhobbies+"&fworkforhomehouse="+fworkforhomehouse+"&fcriminal="+fcriminal+"&fprosecution="+fprosecution+"&fcriminaldetail="+fcriminaldetail;
	
	var fleaving2	= YAHOO.util.Dom.get('fleaving2').value;
	var fleaving3	= YAHOO.util.Dom.get('fleaving3').value;
	newstr+="&fleaving2="+fleaving2+"&fleaving3="+fleaving3;
	
	var lan = "";
	for (var i=0;i<5;i++){
		var sna	= YAHOO.util.Dom.get('flanguage' + i).value;
		var sp1 = "";
		var sp2 = "";
		var sp3 = "";
		if (YAHOO.util.Dom.get('fspeak' + i + '1').checked){
			sp1		= "Slight";
		}else if (YAHOO.util.Dom.get('fspeak' + i + '2').checked){
			sp1		= "Fair";
		}else if (YAHOO.util.Dom.get('fspeak' + i + '3').checked){
			sp1		= "Fluent";
		}
		if (YAHOO.util.Dom.get('fread' + i + '1').checked){
			sp2		= "Slight";
		}else if (YAHOO.util.Dom.get('fread' + i + '2').checked){
			sp2		= "Fair";
		}else if (YAHOO.util.Dom.get('fread' + i + '3').checked){
			sp2		= "Fluent";
		}
		if (YAHOO.util.Dom.get('fwrite' + i + '1').checked){
			sp3		= "Slight";
		}else if (YAHOO.util.Dom.get('fwrite' + i + '2').checked){
			sp3		= "Fair";
		}else if (YAHOO.util.Dom.get('fwrite' + i + '3').checked){
			sp3		= "Fluent";
		}
		lan    += "&language" + i + "=" + sna + "&speak"+ i + "=" + sp1+ "&read"+ i + "=" + sp2+ "&write"+ i + "=" + sp3;
		
	}
	newstr += lan;
	
	if (fname=="" || flname=="" || fposition=="" || fwork==""){
		alert("Please fill-in application form before you submit it");
	}else if (YAHOO.util.Dom.get('faccept').checked==false){
		alert("Please accept terms & conditions before you submit it");
	}else{
		var callbacks = {
			success : function (o) {
				if(o.responseText !== undefined){
			    if(o.responseText.indexOf('||') != -1) {
				    update = o.responseText.split('||');
				    if (update[0]=="y"){
				    	alert("Thank you, your data has been sent.");
				    	//document.joinusform.submit();
				    }
			    }
				}
			},
			failure : function (o) {
			},
			timeout : 10000
		}
		YAHOO.util.Connect.asyncRequest('GET',"cmd.php?cmd=joinussubmit"+newstr, callbacks);
	}
}

function killOverlay()
{
	var div = document.getElementById("overlay_container");
	div.style.display="none";
	winstatus1 = "closed";
	winstatus2 = "closed";
	winstatus3 = "closed";
	winstatus4 = "closed";
	winstatus5 = "closed";
	winstatus6 = "closed";
	winstatus7 = "closed";
	winstatus8 = "closed";
	winstatus9 = "closed";
	winstatus10 = "closed";
	winstatus11 = "closed";
	winstatus12 = "closed";
	try{
		var flashdiv = document.getElementById("flashContent");
		flashdiv.setFlash(false);
	}catch(err){
	}
}
function killallRooms(num){
	killOverlay();
	for (var i=1;i<=num;i++){
		hs.close('winPOP'+i);
	}
}
function setallcontentnone(){
	for (var i=1;i<13;i++){
		document.getElementById("content"+i).style.display="none";
	}
}

function openRoom(num)
{
	if (num==10){
		//return;
	}
	if (galleryopened=="n"){
					var browser=navigator.appName;
					if (browser=="Microsoft Internet Explorer"){
						setallcontentnone();
						document.getElementById("content"+num).style.display="block";
					}
					killallRooms(12);
					winResize(num);
					try{
						var flashdiv = document.getElementById("flashContent");
						flashdiv.setFlash(true);
					}catch(err){
					}
					if (num==1){
						winstatus1 = "opened";
						time1 =  time1+1;
					}else if (num==2){
						winstatus2 = "opened";
						time2 =  time2+1;
					}else if (num==3){
						winstatus3 = "opened";
						time3 =  time3+1;
					}else if (num==4){
						winstatus4 = "opened";
						time4 =  time4+1;
					}else if (num==5){
						winstatus5 = "opened";
						time5 =  time5+1;
					}else if (num==6){
						winstatus6 = "opened";
						time6 =  time6+1;
					}else if (num==7){
						winstatus7 = "opened";
						time7 =  time7+1;
					}else if (num==8){
						winstatus8 = "opened";
						time8 =  time8+1;
					}else if (num==9){
						winstatus9 = "opened";
						time9 =  time9+1;
					}else if (num==10){
						winstatus10 = "opened";
						time10 =  time10+1;
					}else if (num==11){
						winstatus11 = "opened";
						time11 =  time11+1;
					}else if (num==12){
						winstatus12 = "opened";
						time12 =  time12+1;
					}
					
					var div = document.getElementById("overlay_container");
					var hSrc = "";
					if (num==5){
						var newnum = 6;
						hSrc = baseURL+"img2/h"+newnum+".png";
						if (browser=="Microsoft Internet Explorer"){
							div.style.display="block";
						}else{
							div.style.display="block";
						}
					}else if (num==6){
						hSrc = "";
					}else{
						hSrc = baseURL+"img2/h"+num+".png";
						if (browser=="Microsoft Internet Explorer"){
							div.style.display="block";
						}else{
							div.style.display="block";
						}
					}
					var hDiv = document.getElementById("headerTitle");
					if (hSrc!=""){
						//hDiv.innerHTML = "<img src='"+hSrc+"' border='none' />";
						var userAgent = navigator.userAgent.toLowerCase();
						if((userAgent.indexOf('msie 6') !=-1))
						{
							swfobject.embedSWF(hSrc, "flashHeader", 175, 85, "9", "swf/expressInstall.swf",flashvars, params);
						}
						else
						{
							var newnum = num;
							if (num==5){
								newnum = 6;
							}
							hDiv.innerHTML = '<img src="'+(baseURL+"img2/h"+newnum+".png")+'"/>'
						}
					}else{
						hDiv.innerHTML = "";
					}
				//alert(num);
					if (num==1){
						/* about us page */
						
						loadingAbout('aboutus');
				
						var swfSrc = baseURL+"swf/aboutus.swf";
						var swfW = 280;
						var swfH = 315;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						document.getElementById("flashContainer").style.marginLeft="-230px";
						document.getElementById("flashContainer").style.marginTop="295px";
						//SWFAddress.setValue("/aboutus/");
						if (browser=="Microsoft Internet Explorer" && ieversion<=8){
							document.getElementById("headerTitle").style.paddingTop = "0px";
						}
					}else if (num==2){
						/* what's on page */
						loadingEvents('events','0');
						var swfSrc = baseURL+"swf/whatson.swf";
						var swfW = 320;
						var swfH = 350;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						
						document.getElementById("flashContainer").style.marginLeft="-185px";
						document.getElementById("flashContainer").style.marginTop="253px";
						//SWFAddress.setValue("/whatson/");
						
						if (ieversion<8){
							//document.getElementById("headerTitle").style.paddingBottom = "250px";
						}
					}else if (num==3){
						/* restaurant page */
						loadingRestaurant('Restaurant');
						var swfSrc = baseURL+"swf/food.swf";
						var swfW = 280;
						var swfH = 275;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						
						document.getElementById("flashContainer").style.marginLeft="-222px";
						document.getElementById("flashContainer").style.marginTop="368px";
						
						//SWFAddress.setValue("/restaurant/");
						if (ieversion<=8){
							//document.getElementById("headerTitle").style.paddingBottom = "300px";
						}
					}else if (num==4){
						/* bedrooms page */
						loadingBedrooms('bedrooms');
						var swfSrc = baseURL+"swf/bedrooms.swf";
						var swfW = 280;
						var swfH = 400;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						
						document.getElementById("flashContainer").style.marginLeft="-226px";
						document.getElementById("flashContainer").style.marginTop="390px";
						//SWFAddress.setValue("/bedrooms/");
						if (ieversion<=8){
							//document.getElementById("headerTitle").style.paddingBottom = "380px";
						}
					}else if (num==5){
						/* private page */
						loadingMembership('membership');
						var swfSrc = baseURL+"swf/membership.swf";
						var swfW = 280;
						var swfH = 250;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
					
						document.getElementById("flashContainer").style.marginLeft="-245px";
						document.getElementById("flashContainer").style.marginTop="337px";
						//SWFAddress.setValue("/membership/");
					}else if (num==6){
						/* membershiplogin page */
						logmembershioplogin();
				
						//SWFAddress.setValue("/loginmember/");
					}else if (num==7){
						/* bar page */
						loadingBar('Bars');
						var swfSrc = baseURL+"swf/bar.swf";
						var swfW = 280;
						var swfH = 306;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						
						document.getElementById("flashContainer").style.marginLeft="-177px";
						document.getElementById("flashContainer").style.marginTop="305px";
						//SWFAddress.setValue("/bars/");
						if (ieversion<8){
							//document.getElementById("headerTitle").style.paddingBottom = "300px";
						}
					}else if (num==8){
						/* gym*/
						loadGym("Gym");
						var swfSrc = baseURL+"swf/spa.swf";
						var swfW = 280;
						var swfH = 131;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						
						document.getElementById("flashContainer").style.marginLeft="-210px";
						document.getElementById("flashContainer").style.marginTop="461px";
						//SWFAddress.setValue("/gym/");
						if (ieversion<=8){
							//document.getElementById("headerTitle").style.paddingBottom = "420px";
						}
					}else if (num==9){
						/* private page */
						loadingPrivate('Private Events');
						var swfSrc = baseURL+"swf/privateevents.swf";
						var swfW = 280;
						var swfH = 261;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						
						document.getElementById("flashContainer").style.marginLeft="-231px";
						document.getElementById("flashContainer").style.marginTop="392px";	
						//SWFAddress.setValue("/private-events/");	
						if (ieversion<=8){
							//document.getElementById("headerTitle").style.paddingBottom = "350px";
						}
					}else if (num==10){
						/* contactus page */
						loadingContactus('contactus');
						var swfSrc = baseURL+"swf/contact.swf";
						var swfW = 280;
						var swfH = 400;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						
						document.getElementById("flashContainer").style.marginLeft="-269px";
						document.getElementById("flashContainer").style.marginTop="413px";
						//SWFAddress.setValue("/contactus/");
						if (ieversion<8){
							//document.getElementById("headerTitle").style.paddingBottom = "450px";
						}
				
					}else if (num==11){
						/* Press page */
						loadingPress();
						var swfSrc = baseURL+"swf/aboutus.swf";
						var swfW = 280;
						var swfH = 315;
						swfobject.embedSWF(swfSrc, divToReplace, swfW, swfH, "9.1.0", "swf/expressInstall.swf",flashvars, params);
						
						document.getElementById("flashContainer").style.marginLeft="-239px";
						document.getElementById("flashContainer").style.marginTop="413px";
						//SWFAddress.setValue("/press/");
						
						if (ieversion<=8){
							//document.getElementById("headerTitle").style.paddingBottom = "250px";
						}
						
					}
					//killallRooms(12);
					var room = document.getElementById("content"+num);
					hs.htmlExpand(room,{ contentId: "content"+num, width:697, height:467});
					
					//return true;
	}

}


var resized = false;
		
function winResize(num){ 
  var myWidth = 0, myHeight = 0;
  var browser=navigator.appName;
  var ieversion=8;
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){  
		var ieversion=new Number(RegExp.$1);
	}
  
	myWidth = getWidth();
	myHeight = getHeight();
  var wid = 0;
  var hei = 0;
	if (originalwidth[num-1]>0){
		wid = originalwidth[num-1]- myWidth;
		hei= originalheight[num-1] - myHeight;
	}else{
		originalwidth[num-1] = myWidth;
		originalheight[num-1] = myHeight;
	}
	var didvalue = (originalwidth[num-1] - 697)/2*-1;
	if (num == 12 || num==6){
		  didvalue = 0;
	}
	if (browser=="Microsoft Internet Explorer"){
		var leftpoint = 0;
		var toppoint = 0;
//alert(myWidth);
		if (num==6){
			leftpoint = 0;
		}else{
			leftpoint = -((myWidth - 697)/2-10)
			if (myWidth>=1100){
				leftpoint = -336/2-10;
			}
		}
		
		if (myHeight>=634){
			toppoint  = -(myHeight-467)/2;
		}else{
			
			if (ieversion==6){
				if (myHeight>467){
					toppoint  = -(myHeight-467)/2;
				}else{
					toppoint  = 0;
				}
			}else if (ieversion==7){
				if (myHeight>467){
					toppoint  = -(myHeight-467)/4;
				}else{
					toppoint  = 0;
				}
			}else{
				if (myHeight>467){
					toppoint  = -(myHeight-467)/2;
				}else{
					toppoint  = 0;
				}
			}

		
		}

		if (num==12){
			if (myWidth>=1200){
				leftpoint = leftpoint + 467/2;
			}else{
				leftpoint = 0;
			}
		}
		//alert(myHeight);
	  document.getElementById("hightid").style.position="absolute";
	  document.getElementById("hightid").style.left= leftpoint + "px";
	  document.getElementById("hightid").style.top= toppoint + "px";
	  
		try{document.getElementById("flashcontainer").innerHTML="";}catch(err){}
		
		/*
		var imgtop = 0;
		var imglef = 0;
		if (ieversion<8){
			if(myWidth>1440){
				imglef = myWidth/2-50;
			}else{
				imglef = myWidth/2-100;
			}
			
			
			var divalue = (myHeight-467)/2;
			if (divalue>60){
				imgtop = -(150-(divalue - 50))
			}else{
				imgtop = -150;
			}
		}

		document.getElementById("shim").style.position="absolute";
		document.getElementById("shim").style.top= imgtop + "px";
		document.getElementById("shim").style.left= imglef + "px";
		
		*/
		
	}else{
		if (wid>0){
			lv = (wid/2)*-1;
		}else if (wid<0){
			lv = (wid/2)*-1;
		}else{
			lv = 0;
		}
		if (hei>0){
			tv = (hei/2)*-1;
		}else if (hei<0){
			tv = (hei/2)*-1;
		}else{
			tv = 0;
		}
		
		var leftpoint = 0;
		var toppoint = 0;
		if (num==1){
			if (time1>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==2){
			if (time2>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==3){
			if (time3>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==4){
			if (time4>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==5){
			if (time5>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==6){
			if (time6>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==7){
			if (time7>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==8){
			if (time8>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==9){
			if (time9>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==10){
			if (time10>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==11){
			if (time11>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}else if (num==12){
			if (time12>1){
				leftpoint= lv;
				toppoint = tv;
			}
		}
	  document.getElementById("hightid").style.position="absolute";
	  document.getElementById("hightid").style.left= leftpoint + "px";
	  document.getElementById("hightid").style.top= toppoint + "px";
	}
  

}

function getWidth(){
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	//IE 6+ in 'standards compliant mode'
	myWidth = document.body.clientWidth;
	myHeight = document.body.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return myWidth;
}

function getHeight(){
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}

function winreset(){
	if (location.hash != hash){
		if (location.hash.indexOf('aboutus')>0){
			if (winstatus1=="closed"){
				openRoom(1);
			}
		}else if (location.hash.indexOf('whatson')>0){
			if (winstatus2=="closed"){
				openRoom(2);
			}
		}else if (location.hash.indexOf('restaurant')>0){
			if (winstatus3=="closed"){
				openRoom(3);
			}
		}else if (location.hash.indexOf('bedrooms')>0){
			if (winstatus4=="closed"){
				openRoom(4);
			}
		}else if (location.hash.indexOf('membership')>0){
			if (winstatus5=="closed"){
				openRoom(5);
			}
		}else if (location.hash.indexOf('loginmember')>0){
			if (winstatus6=="closed"){
				openRoom(6);
			}
		}else if (location.hash.indexOf('bars')>0){
			if (winstatus7=="closed"){
				openRoom(7);
			}
		}else if (location.hash.indexOf('gym')>0){
			if (winstatus8=="closed"){
				openRoom(8);
			}
		}else if (location.hash.indexOf('private-events')>0){
			if (winstatus9=="closed"){
				openRoom(9);
			}
		}else if (location.hash.indexOf('contactus')>0){
			if (winstatus10=="closed"){
				openRoom(10);
			}
		}else if (location.hash.indexOf('press')>0){
			if (winstatus11=="closed"){
				openRoom(11);
			}
		}else if (location.hash.indexOf('gallery')>0){
			if (winstatus11=="closed"){
				openRoom(12);
			}
		}
		if (location.hash=="#" || location.hash==""){
			killallRooms(11);
		}
		hash = location.hash;
	}
}