function userStartup() {
	p=isProperBrowser();
	if (!p) {
		if (GetCookie("browserWarned")!="true")
			alert("We support only the most popular browsers! \n\n(i.e. Internet Explorer 4.x/5.x/6.x and Netscape/Gecko 6.x/7.x) \n\nPages may not be shown properly on the browser that you are using. \n\nFor enquiry, please contact our reservations. \n\nTel: +852 2722 7822 \nFax: +852 2723 3718 \nE-mail: hillview@stanfordhotel.com");
		SetCookie("browserWarned","true");
	}
	return p;
}

function clickTo(u) {		// Go to u [u:url(String)]
	this.location=u;
}

function changeBGC(o,c) {	// Change background colour [o:object;c:colour(String)]
	if (o && o.style)
		o.style.backgroundColor=c;
}

function changeIMG(o,i) {	// Change image [o:object;i:url(String)]
	if (o && o.src)
		o.src=i;
}

function setPosition(o,x,y) {
	if (o && o.style) {
		o.style.left=x;
		o.style.top=y;
	}
}

function setVisible(o,v) {
	if (o && o.style) {
		o.style.visibility=v;
	}
}


var pageHeight=0;
var pageWidth=0;

function resized() {
	pageHeight=parseInt(document.body.clientHeight);
	pageWidth=parseInt(document.body.clientWidth);
}

function fadeImg(obj,img) {
	if (obj.filters && obj.filters[0]) obj.filters[0].apply();
	changeIMG(obj,img);
	if (obj.filters && obj.filters[0]) obj.filters[0].play();
}


function sideOver(obj) {
	fadeImg(obj,"/images/b_s_g.gif");
}

function sideOut(obj) {
	setTimeout("fadeImg("+obj.id+",'/images/b_s_w.gif')",500);
}


//------- for test & debug use

function mouseXY() {
	top.status=event.x+","+event.y;
}