// This file was dynamicaly created for https://vitaminxp.com // JavaScript Document /** * @version 2020-02-26 */ function explore_object(obj /* [, return_result] */) { var _args = explore_object.arguments; var return_result = (_args.length > 1) ? _args[1] : false; var txt = ''; for(i in obj) { try { if(typeof obj[i] != 'function') { txt += i + ' = ' + obj[i] + '\n'; } else { txt += i + ' = function(){}\n'; } } catch(ex) { txt += i + ' = [UNABLE TO ACCESS THIS PROPERTY]\n'; } } if(return_result) return txt; else alert(txt); } // displaying "Loading Framework..." message document.writeln(''); // Definitions var framework_location = 'https://vitaminxp.com/framework/JavaScript/'; // Framework Start var VitaminXP = window.VitaminXP || {}; // Detect Web browser VitaminXP.DetectBrowser = function() { var agt=navigator.userAgent.toLowerCase(); if (agt.indexOf("opera") != -1) return 'Opera'; if (agt.indexOf("staroffice") != -1) return 'Star Office'; if (agt.indexOf("webtv") != -1) return 'WebTV'; if (agt.indexOf("beonex") != -1) return 'Beonex'; if (agt.indexOf("chimera") != -1) return 'Chimera'; if (agt.indexOf("netpositive") != -1) return 'NetPositive'; if (agt.indexOf("phoenix") != -1) return 'Phoenix'; if (agt.indexOf("firefox") != -1) return 'Firefox'; if (agt.indexOf("safari") != -1) return 'Safari'; if (agt.indexOf("skipstone") != -1) return 'SkipStone'; if (agt.indexOf("msie") != -1) return 'Internet Explorer'; if (agt.indexOf("netscape") != -1) return 'Netscape'; if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla'; if (agt.indexOf('\/') != -1) { if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') { return navigator.userAgent.substr(0,agt.indexOf('\/'));} else return 'Netscape';} else if (agt.indexOf(' ') != -1) return navigator.userAgent.substr(0,agt.indexOf(' ')); else return navigator.userAgent; } var Browser = VitaminXP.DetectBrowser(); var loaded_modules = 0; // Creates (if doesn't exist) and returns the namespace passed VitaminXP.Namespace = function(ns) { if (!ns || !ns.length) { return null; } var levels = ns.split("."); var nsobj = VitaminXP; // "VitaminXP" is implied, so it is ignored if it is included for (var i = (levels[0] == "VitaminXP") ? 1 : 0; i < levels.length; ++i) { nsobj[levels[i]] = nsobj[levels[i]] || {}; nsobj = nsobj[levels[i]]; } loaded_modules++; document.getElementById("loaded_modules").innerHTML = "Loaded Modules: " + loaded_modules; return nsobj; }; // Load prerequisit namespace VitaminXP.Import = function(ns) { var levels = ns.split("."); var nsobj = VitaminXP; var exists = true; // check if this namespace is already imported for (var i = (levels[0] == "VitaminXP") ? 1 : 0; i < levels.length; ++i) { if(nsobj[levels[i]]) { nsobj = nsobj[levels[i]]; } else { exists = false; i = levels.length; } } if(!exists) { document.writeln(''); } }; VitaminXP.Exception = function(error, func) { var message = (typeof error == 'object') ? error.message : error; alert("JavaScript Error Occured: ''" + message + "'' in function " + func + "()"); }; // String of javascript to execute when page loads VitaminXP.StartupScript = new Array(); // Adds passed script to variable and will be executed when page loads VitaminXP.StartUp = function(script) { VitaminXP.StartupScript.push(script); } VitaminXP.RunStartupScript = function() { while(VitaminXP.StartupScript.length > 0) { try { if(typeof VitaminXP.StartupScript[0] == 'string') { eval(VitaminXP.StartupScript[0]); } else { VitaminXP.StartupScript[0](); } } catch(ex) { window.status = ex.message; } VitaminXP.StartupScript.shift(); } } // On Page Load window.onload = function() { VitaminXP.RunStartupScript(); } // Returns Element that has ID same as passed function element(el) { return VitaminXP.Element.Get(el); } function $(el) { return VitaminXP.Element.Get(el); } // Opens a new pop up window VitaminXP.OpenWindow = function(url,id,width,height) { // Additional args: 5) left, 6) top. var args = open_window.arguments var left = (args.length > 4)? args[4] : (screen.availWidth/2)-(width/2) var top = (args.length > 5)? args[5] : (screen.availHeight/2)-(width/2) setup = 'toolbar=no,location=no,directories=no,left='+left+',top='+top+',menubar=no,width='+width+',height='+height setup += 'scrollbars=no,resizable=no' window.open(url,id,setup) } // Reloads page (not just refreshes) VitaminXP.ReloadPage = function() { if(Browser == "Internet Explorer"){ history.go(0) }else{ window.location.reload(true) } } // hide "loading..." message VitaminXP.HideLoadingStatusMessage = function() { VitaminXP.Animation.Animate($('loading_message'), {opacity:{to:0}}, 1, 'EaseBoth'); // just hide it in case animation failed setTimeout('$(\'loading_message\').style.display = \'none\'', 1000); } VitaminXP.StartUp("VitaminXP.HideLoadingStatusMessage()");