/* Javascript Loader for HTML::Tag::Date and HTML::Tag::Datetime */ var html_tag_datetime_loaded; if (!html_tag_datetime_loaded) { html_tag_datetime_loaded = 1; with (document) { writeln(''); writeln(''); writeln(''); writeln(''); writeln(''); writeln(''); } } function scriptPath() { var script_name = 'html_tag_datetime_loader.js'; // optimized :-D var scripts = document.getElementsByTagName("SCRIPT"); var script_name_len = script_name.length; for (i=0; i< scripts.length; i++) { var script = scripts[i].src; if (script.slice(script.length-script_name_len,script.length) == script_name) { var script_url = script; if (script_url.slice(0,4) != 'http') { // build as an absolute url (IE hack) var loc = document.location; script_url = loc.protocol + '//' + loc.host; if (script.slice(0,1) == "/") { // absolute path script_url += script; } else { // relative path script_url += loc.pathname; script_url = script_url.slice(0,script_url.lastIndexOf('/')); script_url = script_url + '/' + script; } } return script_url.slice(0,script_url.length-script_name_len); } } }