
var TbCloseFromFrame = function(){
	this.CloseButton = document.getElementById("TB_CLOSEBUTTON");
	this.CloseButton.onclick = function(){
		parent.tb_remove();
	}
}

TbCloseFromFrame();


var PagePrevNext = function(){
	// Need ActivateMenu.js
	
	this.PrevButton = document.getElementById("PREV_BUTTON");
	this.NextButton = document.getElementById("NEXT_BUTTON");
	
	this.PageName = AMObj.PageName;
	this.PageNum = new Number(this.PageName.substring(4,5));
	
	this.PageNextName = "Page" + (this.PageNum + 1 );
	this.PagePrevName = "Page" + (this.PageNum - 1 );

	if(this.NextObj = document.getElementById(this.PageNextName)){
		NextHref = this.NextObj.getAttribute("href");
		this.NextButton.setAttribute("href",NextHref);
	}else{
		DisableLink(this.NextButton);
	}

	if(this.PrevObj = document.getElementById(this.PagePrevName)){
		PrevHref = this.PrevObj.getAttribute("href");
		this.PrevButton.setAttribute("href",PrevHref);
	}else{
		DisableLink(this.PrevButton);
	}
	
	function DisableLink(obj){
		if(!document.all){
			obj.setAttribute("style","display:none");
		}else{
			obj.style.cssText = "display:none";
		}
		
	}
	
}

PPNObj = new PagePrevNext();