var today_date= new Date()
var month=today_date.getMonth()
var today=today_date.getDate()
var year=today_date.getFullYear()

var months = new Array(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December");



/*
 * 
 * jFontSizer Plugin
 * Written by fluidByte - http://www.fluidbyte.net
 * 
 * 
 */

jQuery.fn.jfontsizer = function(o) {

	// Cookie functions
	function setCookie(c_name,value,expiredays){
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
	}
	
	function getCookie(c_name){
	if (document.cookie.length>0){
	  c_start=document.cookie.indexOf(c_name + "=");
	  if (c_start!=-1){
	    c_start=c_start + c_name.length+1;
	    c_end=document.cookie.indexOf(";",c_start);
	    if (c_end==-1) c_end=document.cookie.length;
	    return unescape(document.cookie.substring(c_start,c_end));
	    }
	  }
	return "";
	}

    
	// Defaults
	var o = jQuery.extend( {
		applyTo: 'body',
		changesmall: '2',
		changelarge: '2',
		expire: 30
	},o);
	
	var s = '';
	var m = '';
	var l = '';
	
	// Current
	var c = 'fs_sml';
	
	// Check cookie  
	if (getCookie('fsizer') != "") {
		var c = getCookie('fsizer');
		switch (c) {
				case 'fs_sml':
				    $(o.applyTo).css('font-size','1em');
				break;
			case 'fs_med':
			    $(o.applyTo).css('font-size','1.1em');
				break;
			case 'fs_lrg':
				$(o.applyTo).css('font-size','1.2em');
				break;
		}
	}
	else {
		s = "fsactive";
	}
	
	// Create font-chooser box
	$(this).html('<div class="fsizer" title="font size"><a id="fs_sml" class="'+s+'">A</a><a id="fs_med" class="'+m+'">A</a><a id="fs_lrg" class="'+l+'">A</a><br style="clear: both" /></div>');
	
	
	$('.fsizer a').click(function(){
//$('div').each(function(i,e){alert($(this).attr('id'));});
		var t = $(this).attr('id');
		
		setCookie('fsizer',t,o.expire);
		
		$('.fsizer a').removeClass('fsactive');
		$(this).addClass('fsactive');
		
		var f = $(o.applyTo).css('font-size');
		switch(t){
			case 'fs_sml':
				$(o.applyTo).css('font-size','1em');
				break;
			case 'fs_med':
			    $(o.applyTo).css('font-size','1.1em');
				break;
			case 'fs_lrg':
				$(o.applyTo).css('font-size','1.2em');
				break;
		}
//alert($(o.applyTo));		
	});
};

	$(document).ready(function(){
		var lb=escape("\r\n\r\n");
		var myhtml='<div class="buttons"><div id="fontsizer"></div><a href="javascript:window.print()" title="print"><img src="/images/print.png" /></a><a href="mailto:?subject=Info from SkowSavings website for you&body=Hello,'+lb+'I thought you might be interested in this information from Skowhegan Savings:'+lb+window.location.href+'" title="email"><img src="/images/email.png" /></a></div>';
		$('.h1_underline').prepend(myhtml);
		$('.highlight2').prepend(myhtml);
		//$('.financial_font').prepend(myhtml);
		$('#fontsizer').jfontsizer({
			applyTo: '#contents',
			changesmall: '1',
			changelarge: '1',
			expire: 30
		});

	});

if(typeof jump != 'function') {
	function jump(menu)
	{
	ref=menu.choice.options[menu.choice.selectedIndex].value;
	splitc=ref.lastIndexOf("*");
	target="";
	if (splitc!=-1)
	{loc=ref.substring(0,splitc);
	target=ref.substring(splitc+1,1000);}
	else {loc=ref; target="_self";};
	if (ref != "") {land(loc,target);}
	}
	function land(ref, target)
	{
	lowtarget=target.toLowerCase();
	if (lowtarget=="_self") {window.location=loc;}
	else {if (lowtarget=="_top") {top.location=loc;}
	else {if (lowtarget=="_blank") {window.open(loc);}
	else {if (lowtarget=="_parent") {parent.location=loc;}
	else {parent.frames[target].location=loc;};
	}}}
	}

}
