

//get cookie
function getCookie( name ) {
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;
	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
		return null;
	}
	if ( start == -1 ) return null;
	var end = document.cookie.indexOf( ';', len );
	if ( end == -1 ) end = document.cookie.length;
	return unescape( document.cookie.substring( len, end ) );
}

var fontCookie = (getCookie("myCookie"));
			
window.addEvent('domready', function() {
			var fontSize = $ES('.productCopy');
			if(fontSize.length == 0)
			{
				fontSize = $ES('.categoryCopy');
			}
											
		
		
	var bigRun = $('bigRun');
	var smallRun = $('smallRun');
	
	
	if (bigRun != null || smallRun != null) {
		
		if (fontCookie == "large") {
		//alert("large");

			if(fontSize.length >= 0)
			{
				fontSize.setStyle('fontSize', '16px');
				fontSize.setStyle('lineHeight','23px');
				
				if(ie == 1){
				smallRun.className="smallRun";
				bigRun.className="bigRunActive";
				}
				
				//Firefox doesnt understand className
				smallRun.setAttribute("class", "smallRun");
				bigRun.setAttribute("class", "bigRunActive");
				
			}

		}
		
		if (fontCookie == "small") {
		//alert("small");

			if(fontSize.length >= 0)
			{
				fontSize.setStyle('fontSize', '12px');
				fontSize.setStyle('lineHeight','18px');
				
				if(ie == 1){
				bigRun.className="bigRun";
				smallRun.className="smallRunActive";
				}
				
				//Firefox doesnt understand className
				bigRun.setAttribute("class", "bigRun");
				smallRun.setAttribute("class", "smallRunActive");
				
			}


		}
		}
});