	function changeFont( incDec )
	{
	    // [incDec]
		// steps in font size (px)
		var i = 0;
		var dv = document.getElementById( holdDiv );
		var len = tag.length;
		
		for ( var j = 0; j < len; j++ )
		{
			var h = dv.getElementsByTagName( tag[j] );
			//alert( tag[j] );
			for (i = 0; i < h.length; i++) {
			
				if ( h[i].style.fontSize == "" && incDec > 0 ) {
					h[i].style.fontSize = tagSize[j] +'px';
					if ( j == 0 ) hoops = 0;
				}
				
				if ((parseInt(h[i].style.fontSize) <= tagSize[j] && incDec < 0)) {
					h[i].style.fontSize = '';
					if ( j == 0 ) hoops = 0;
				}
				
				
				if ( parseInt(h[i].style.fontSize) >= tagSize[j] || parseInt(h[i].style.fontSize) <= (tagSize[j]+steps) ) {
			   		h[i].style.fontSize = parseInt(h[i].style.fontSize) + incDec + 'px';
						if ( j == 0 ) hoops += incDec;
				}
				
				// stoppa vid [steps]
				if ( parseInt(h[i].style.fontSize) > (tagSize[j]+steps) ) {
					h[i].style.fontSize = (tagSize[j]+steps)+'px';
					if ( j == 0 ) hoops -= incDec;
				}
				
				if( hoops < 0 ) hoops = 0;
				if( hoops > steps ) hoops = steps;
			}

		}
		
			//alert("hoops: " + parseInt(hoops));
		
		// set cookie to remember selected fontsize
		setCookie('LK50fontSize', parseInt(hoops), 1000);
		setFontSizeCookie( );
	}
	
function setFontSizeCookie( ) {
		if ( hoops < 0 ) hoops = 0;
		var dv = document.getElementById( holdDiv );
		var len = tag.length;
		
		for ( var j = 0; j < len; j++ )	{
			var h = dv.getElementsByTagName( tag[j] );
			
			for (i = 0; i < h.length; i++) {
				h[i].style.fontSize = (tagSize[j]+hoops)+'px';
			}
		}
}

	
function getCookie( name ) {
    var cname = name + "=";
    var dc = document.cookie;
	 
    if ( dc.length > 0 ) {
        begin = dc.indexOf( cname );
        if ( begin != -1 ) {
            begin += cname.length;
            end = dc.indexOf(";", begin);
            if (end == -1) end = dc.length;
                return unescape( dc.substring(begin, end) );
        }
    }
    return null;
}

function setCookie(name, value, days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else
        expires = "";
        document.cookie = name+"="+value+expires+"; path=/";
}

