function PromoReveal(prID){
	this.prDiv_ = document.getElementById(prID);
	this.contractTimer_ = null;
	this.spotlightDelay = '3000';
	this.init();
}
PromoReveal.prototype.init = function(){
	var self = this;
	this.prDiv_.onmouseover = function(){
		self.expand();
	}
	this.prDiv_.onmouseout = function(){
		self.contract();	
	}
	if (!this.checkCookie()){
		this.expand();
		this.contractTimer_ = setInterval(function(){
			self.contract();
			clearInterval(self.contractTimer_);
			self.contractTimer_ = null;
		},this.spotlightDelay);
		self.setCookie();
	}
}
PromoReveal.prototype.expand = function(){
	this.prDiv_.className = "pr-expanded";
}
PromoReveal.prototype.contract = function(){
	this.prDiv_.className = "pr-collapsed";
}
PromoReveal.prototype.checkCookie = function(){
	this.cookieParts = document.cookie.split('; ');
	for(var i=0;i < this.cookieParts.length;i++) {
		var c = this.cookieParts[i];
		if (c.indexOf('TgtPrCookie') == 0){
			return (true);
		}
	}
	return(false);
}
PromoReveal.prototype.setCookie = function(){
	this.theDate = new Date();
	this.oneWeekLater = new Date(this.theDate.getTime() + 604800000);
	this.expiryDate = this.oneWeekLater.toGMTString();
	document.cookie = 'TgtPrCookie=1; expires=' + this.expiryDate + '; ';	
}
