/*funcion que crear html per augmentar tamanys de fonts */ function tamanyText(){ document.write(""); } function setActiveStyleSheet(title) { var i, a, main; for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { a.disabled = true; if(a.getAttribute("title") == title) a.disabled = false; setCookie('tamany', title, new Date(2015,10,10)); } } } function getActiveStyleSheet() { var i, a; for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title"); } return null; } function getPreferredStyleSheet() { var i, a; for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("rel").indexOf("alt") == -1 && a.getAttribute("title") ) return a.getAttribute("title"); } return null; } function getDomain() { var index=location.hostname.indexOf("."); if(index==-1) return location.hostname; return location.hostname.substring(index,location.hostname.length); } function setCookie(name, value, date){ document.cookie = name + "=" + escape(value) + (date?";expires=" + date.toGMTString(date.getTime()):"") + ";Domain=" + getDomain() +";Path=/"; } function getCookie(name) { var begin=document.cookie.indexOf(name+"="); if(begin==-1) return null; var end=document.cookie.indexOf(";",begin); if(end==-1) end=document.cookie.length; return document.cookie.substring(document.cookie.indexOf("=",begin)+1,end); } function delCookie(name) { setCookie(name,"",new Date(1999,1,1)); } var vartamany = getCookie('tamany'); if (vartamany == "normal") { setActiveStyleSheet('normal', 1); } if (vartamany == "mitja") { setActiveStyleSheet('mitja', 1) } if (vartamany == "gran") { setActiveStyleSheet('gran', 1) }