﻿function floatAd() {
	this.Id = arguments[0];
	this.Content = arguments[1];
	this.X = arguments[2]
	this.Y = arguments[3];
	this.showClose = arguments[4];
	
	var sAd;
	sAd = "<div id=\"" + this.Id + "\" style=\"top:" + this.Y + "px; left:" + this.X + "px; position:absolute; text-align:right; z-index:100;\">";
	sAd += this.Content;
	if (this.showClose) {
		sAd += "<br \/><a href=\"javascript:void(0);\" onclick=\"document.getElementById('" + this.Id + "').style.display='none';\">close</a>";
	}
	sAd += "<\/div>";
	document.write(sAd);
}

floatAd.prototype.Play = function() {
	document.getElementById(this.Id).style.top = eval(document.documentElement.scrollTop + this.Y) + "px";
}

var sAdRight;
sAdRight = "<a target=\"new\" href=\"http://wpa.qq.com/msgrd?V=1&Uin=499249164&Site=&Menu=no\" title=\"客服果果\"><img src=\"images/qq2.gif\" \/></a>";
sAdRight1 = "<a target=\"new\" href=\"http://wpa.qq.com/msgrd?V=1&Uin=1227228592&Site=&Menu=no\" title=\"客服东东\"><img src=\"images/qq1.gif\" \/></a>";
sAdRight2 = "<a target=\"new\" href=\"booking.asp\" title=\"预定服务\"><img src=\"images/qq3.gif\" \/></a>";
var oAdRight = new floatAd("adRight", sAdRight, document.body.clientWidth - 80, 60, false);
var oAdRight1 = new floatAd("adRight1", sAdRight1, document.body.clientWidth - 80, 152, false);
var oAdRight2 = new floatAd("adRight2", sAdRight2, document.body.clientWidth - 80, 244, false);

window.onscroll = function() {
	oAdRight.Play();
	oAdRight1.Play();
	oAdRight2.Play();
};



