/* Start of Article Font Resizer */
var min = 0.7;
var max = 1.6;

function increaseFontSize(id) {
    var p = document.getElementById(id);
    if (p.style.fontSize) {
        var s = parseFloat(p.style.fontSize.replace("em", ""));
    } else {
        var s = 1;
    }
    if (s != max) {
        s += 0.1;
    }
    p.style.fontSize = s + "em"
}
function decreaseFontSize(id) {
    var p = document.getElementById(id);
    if (p.style.fontSize) {
        var s = parseFloat(p.style.fontSize.replace("em", ""));
    } else {
        var s = 1;
    }
    if (s != min) {
        s -= 0.1;
    }
    p.style.fontSize = s + "em"
}


function big() {
    increaseFontSize('content');
    increaseFontSize('maincontent');
}

function small() {
    decreaseFontSize('content');
    decreaseFontSize('maincontent');
}

/* End of Article Font Resizer */

WEBAUDIT=function() {
    
  this.WACID=null;
  this.WACIDName="WACID";
  
  
  this.getCookie=function(name)  {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++)
    {
            var c = ca[i];
            while (c.charAt(0)==' ') c = c.substring(1,c.length);
            if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
  }
  
  this.setCookie=function(name,value,topDomain) {
    var date = new Date(2020,12,31,23,59,59);
    var expires = "; expires="+date.toGMTString();
    document.cookie = name+"="+value+expires+"; path=/; domain=" + topDomain;  
  }
  
  this.generateID=function(splitter) {
    var sp=(splitter) ? splitter : 'A';
    var now=new Date();
    return Date.parse(now.toGMTString()) + sp + Math.floor(Math.random()*1000000);
  }
  
  this.getTopDomain=function(fullDomain) {
    var darabok=fullDomain.split('.');
    return darabok[(darabok.length-2)] + '.' + darabok[(darabok.length-1)];
  }
  
  this.getDomain=function(url) {
    var urlDarabok=url.split('/');
    return urlDarabok[2];
  }
  
  this.WACID=this.getCookie(this.WACIDName);
}

var wa=new WEBAUDIT();
var felbontas = "";
var same =  Math.floor(Math.random()*1000000);

if(wa.WACID==null)
{
  wa.WACID=wa.generateID('A');
  wa.setCookie(wa.WACIDName,wa.WACID,wa.getTopDomain(wa.getDomain(document.URL)));
}

same = same + "@welid=" + wa.WACID;
if(screen) felbontas='@felbontas='+screen.width+'x'+screen.height;
same = same + felbontas;

/* Start of Article Send */
function doPopup2(oid, printpage, artpage) {
    window.open(printpage + "?artid=" + oid + "&page=" + artpage, "", "width=670, height=485, top=100, left=150, scrollbars");
}
/* End of Article Send */
