﻿//function getUrlVars() {
//    var vars = [], hash;
//    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
//    for (var i = 0; i < hashes.length; i++) {
//        hash = hashes[i].split('=');
//        vars.push(hash[0]);
//        vars[hash[0]] = hash[1];
//    }
//    return vars;
//};

//var page_nr = parseInt(getUrlVars()['page']);
//var sub_page_nr = parseInt(getUrlVars()['sub']);

//jQuery().ready(function () {
//    jQuery('#contentList').accordion({
//        alwaysOpen: false,
//        autoheight: false,
//        header: '.acc_header',
//        active: page_nr
//    });
//});

//jQuery().ready(function () {
//    jQuery('#subcontentList').accordion({
//        alwaysOpen: false,
//        autoheight: false,
//        header: '.acc_sub_header',
//        active: sub_page_nr
//    });
//});


var min = 10;
var max = 18;
function zoominLetter() {
    var p = document.getElementsByTagName('p');
    for (i = 0; i < p.length; i++) {
        if (p[i].style.fontSize) {
            var s = parseInt(p[i].style.fontSize.replace("px", ""));
        } else {
            var s = 12;
        }
        if (s != max) {
            s += 1;
        } p[i].style.fontSize = s + "px"
    }
};


function zoomoutLetter() {
    var p = document.getElementsByTagName('p');
    for (i = 0; i < p.length; i++) {
        if (p[i].style.fontSize) {
            var s = parseInt(p[i].style.fontSize.replace("px", ""));
        } else {
            var s = 12;
        }
        if (s != min) {
            s -= 1;
        }
        p[i].style.fontSize = s + "px"
    }
};

//------------------------------------------------------------------------------

//var actPage = null;

//function getParamNr() {
//    var nr = jQuery(document).getUrlParam('page');
//    return nr;
//};

//jQuery(document).ready(function () {
//    var paramPage = getParamNr();
//    if (paramPage != null) {
//        var newNr = paramPage.toString();
//        jQuery('#hid_' + newNr).val('1');
//        jQuery('#img_' + newNr).attr('src', 'Images/icon-expanded.gif');
//        actPage = paramPage;
//    }
//});

//function msplit(id) {
//    var str = id.toString();
//    var tmp = str.split("_");
//    return tmp[1].toString();
//};

//function closeRestAcc() {
//    for (i = 0; i <= 4; i++) {
//        if (i != parseInt(actPage)) {
//            jQuery('#hid_' + i).val('0');
//            jQuery('#img_' + i).attr('src', 'Images/icon-collapsed.gif');
//        }
//    }
//};

//function checkState(id) {
//    var idNr = msplit(id);
//    var hidVal = jQuery('#' + id).val();
//    if (hidVal == '1') {
//        jQuery('#' + id).val('0');
//        jQuery('#img_' + idNr).attr('src', 'Images/icon-collapsed.gif');
//        actPage = idNr;
//        closeRestAcc();
//    }
//    else {
//        jQuery('#' + id).val('1');
//        jQuery('#img_' + idNr).attr('src', 'Images/icon-expanded.gif');
//        actPage = idNr;
//        closeRestAcc();
//    }
//};
