﻿/*
* C1 Core JavaScript Functions
*/

function extURL(sURL) {
        window.open(sURL);
}

function extURL2(sURL) {
    var answer = confirm("You are now leaving this website.\r\n Are you sure ?")
    if (answer) {
        window.open(sURL);
    }
}

function changeFontSize(inc) {
    var p = document.getElementsByTagName('p');

    for (n = 0; n < p.length; n++) {
        if (p[n].style.fontSize) {
            var size = parseInt(p[n].style.fontSize.replace("px", ""));
        } else {
            var size = 12;
        }

        p[n].style.fontSize = size + inc + 'px';
    }
}

function ChangeFont(id, change) {
    var block = document.getElementById(id);
    var font_size = parseInt(document.getElementById(id).style.fontSize);

    if (change == 'increase') {
        font_size = font_size + 2;
        block.style.fontSize = font_size + "px";
    }
    if (change == 'decrease') {
        font_size = font_size - 2;
        block.style.fontSize = font_size + "px";
    }
}

function ChangeFontLarge(id) {
    var block = document.getElementById(id);
    block.style.fontSize = "15px";
}

function ChangeFontMedium(id) {
    var block = document.getElementById(id);
    block.style.fontSize = "12px";
}

function ChangeFontSmall(id) {
    var block = document.getElementById(id);
    block.style.fontSize = "8px";
}

