﻿function glossaryWindow(theAnchor) {
	var theWindow = window.open('/whatishep2_1_3small.html#'+theAnchor,'Glossary','toolbar=no,location=no,status=no,menubar=no,links=no,scrollbars=no,resizable=no,width=750,height=250,left=50,top=100');
	return false;
}

window.onload = function() {
    document.body.onclick = function (e) {
        //alert((function(theObj){var retval ="";for(prop in theObj){retval+=prop+":"+theObj[prop]+"\n";}return retval;})(e.target));
        var theElement = ( (typeof e != "undefined") ? (e.target) : (event.srcElement) );
        var theElementTarget = theElement.getAttribute("target");
        var theLinkUrl = theElement.getAttribute("href");
        if( (theElementTarget == "_blank") && (theLinkUrl.indexOf("whatishep") < 0 ) && (theLinkUrl.substr(0,1) != "/") && (theLinkUrl.indexOf("/pdf/")<0) && !confirm("Вы покидаете этот Интернет-сайт. Хотите продолжить? ;") ) {
            // Cancel Event
            //try {e.preventDefault()} catch (var temp){}
            //try {e.stopPropagation()} catch (var temp) {}
            return false;
        }
    }
}