TextSize = {
	increment: 1.1875,
	currentPercent: null,
	defaultPercent: 100,
	defaultSize: 16,
	originalPercent: null,
	minSize: null,
	maxSize: null,
	inited: false,
	
	init: function(){
		if(!this.inited){
			this.inited = true;
			var element = $(document.body)
			var origSize = element.getStyle("font-size");
			if(origSize.indexOf("%")!=-1){
				this.originalPercent = parseInt(origSize);
			}else if(origSize.length>0){
				var size = parseInt(origSize);
				if(!isNaN(size) && size>0){
					this.originalPercent = (size/this.defaultSize)*this.defaultPercent;
				}
			}else{
				this.originalPercent = this.defaultPercent;
			}
			element.setStyle("font-size",this.originalPercent+"%");
			this.currentPercent = this.originalPercent;
		}
	},
	limit: function(min, max){
		this.minSize = min;
		this.maxSize = max;
	},
	reset: function(tween){
		this.init();
		this.adjust(this.originalPercent, tween);
	},
	increase: function(tween){
		this.init();
		this.adjust(this.currentPercent*this.increment, tween);
	},
	decrease: function(tween){
		this.init();
		this.adjust(this.currentPercent*(1/this.increment), tween);
	},
	adjust: function(to, tween){
		if(tween==null)tween = false;
		if(to>0){
			var old = this.currentPercent;
			if(this.maxSize)to = Math.min(to,this.maxSize);
			if(this.minSize)to = Math.max(to,this.minSize);
			this.currentPercent = to;
			if(tween && Fx!=null && old!=null){
				var myEffect = $(document.body).effect('font-size', {duration: 500, unit: "%"});
				myEffect.start(to+"%");
			}else{
				$(document.body).setStyle("font-size",to+"%");
			}
		}
	}
};
		
function ConfirmRedirect(url) 
{
    if (url != "")
    {
        var WinSettings = "center:yes;resizable:no;help:no;status:no;dialogHeight:130px;dialogWidth:450px;";	
        var retValue = window.showModalDialog("/personal/redirect-confirmation.aspx", null, WinSettings);    
        
        if (retValue != null)			
        {
            if (retValue[0] == "Yes")
            {
                
		return true;
            }
	    else 
	    {
		return false;
	    }
        }
	else 
	{
	    return false;
	}
	
    }
}				 
