if (getCookie('fontsize') == 'L'){
	setCSS('/shared/css/font-l.css');
}


function fontsizeChange() {
	var obj = $('fontsize');
	
	if (getCookie('fontsize') == 'L'){
		addListener(obj,'click', setS, false);
	}else{
		addListener(obj,'click', setL, false);
	}
	
	function setS() {
		setCookie('fontsize', 'S', 365,'/');
		window.location.reload();
	}
	
	function setL() {
		setCookie('fontsize', 'L', 365,'/');
		window.location.reload();
	}
	
}

(function () {
	var d              = document.createElement('div');
	var is_ie          = (d && d.runtimeStyle);
	var is_large       = (getCookie('fontsize') == 'L');
	var code           = [];
	var img_fontsize_s = '/shared/image/side/side-fontsize-s.png';
	var img_fontsize_l = '/shared/image/side/side-fontsize-l.png';
	var img_print      = '/shared/image/side/side-print.png';
	var img_blank      = '/shared/image/s.gif';
	
	var img_fontsize;
	(is_large) ? img_fontsize = img_fontsize_s : img_fontsize = img_fontsize_l;
	
	var src_fontsize;
	(is_ie) ? src_fontsize = '<img src="'+ img_blank +'" id="fontsize" width="75" height="20" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+ img_fontsize +' ,sizingmethod=image);"/>'
	        : src_fontsize = '<img src="'+ img_fontsize +'" id="fontsize" width="75" height="20" />';
	
	var src_print;
	(is_ie) ? src_print    = '<img src="'+ img_blank +'" id="fontsize" onclick="window.print()" width="76" height="20" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+ img_print +' ,sizingmethod=image);"/>'
	        : src_print    = '<img src="'+ img_print +'" id="fontsize" onclick="window.print()" width="76" height="20" />';
	
	
	code.push('<table width="151" border="0" cellspacing="0" cellpadding="0" class="function">');
	code.push('<tr><td>');
	code.push(src_fontsize);
	code.push('</td><td>');
	code.push(src_print);
	code.push('</td></tr></table>');
	
	
	document.write(code.join(''));
	
	addListener(window,'load', fontsizeChange, false);
	
})();