﻿
$(document).ready(function () {
    var host = window.location.host.split('.');
    var length = host.length;
    var siteRegEx = '(^http.*\.' + host[length - 2] + '\.' + host[length - 1] + ')|(javascript)|(#)';
    $('a').filter(
    function (index) {
        return !this.href.match(siteRegEx);
    }).attr("target", "_blank");
});

function blocking(nr) {
    if (document.layers) {
        current = (document.layers[nr].display == 'none') ? 'block' : 'none';
        document.layers[nr].display = current;
    }
    else if (document.all) {
        current = (document.all[nr].style.display == 'none') ? 'block' : 'none';
        document.all[nr].style.display = current;
    }
    else if (document.getElementById) {
        vista = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';
        document.getElementById(nr).style.display = vista;
    }
}
