var scrollJSroot = 'https://www.paturnpike.com/PTCConstruction/'; var mainScrollSpan = document.getElementById('scrollerSpan'); var scrollBackgroundColor = "Scroller Background Color"; var scrollHeaderText = "Scroller Header Text"; var scrollHeaderTextColor = "Scroller Header Text Color"; var scrollHeaderTextFont = "Scroller Header Text Font"; var scrollHeaderTextSize = "Scroller Header Text Size"; var scrollWidth = "Scroller Width"; var scrollHeight = "Scroller Height"; var scrollBGColor = "Scroller Background Color"; var scrollItemTextSize = "Scroller Item Text Size"; var scrollItemLinkColor = "Scroller Item Link Color"; var scrollItemTextFont = "Scroller Item Font"; var scrollPopupHeight = "Scroller Popup Height"; var scrollPopupWidth = "Scroller Popup Width"; var scrollPopupHeaderFontSize = "Scroller Popup Header Font Size"; var scrollPopupHeaderFontColor = "Scroller Popup Header Font Color"; var scrollPopupHeaderFont = "Scroller Popup Header Font"; var scrollProjectID = "Scroller Project ID"; var scrollDescFontSize = "Scroller Details Font Size"; var scrollDescFontColor = "Scroller Details Font Color"; var scrollDescFont = "Scroller Details Font"; var IE7S = (navigator.appVersion.indexOf("MSIE 7.") == -1) ? false : true var IE8S = (navigator.appVersion.indexOf("MSIE 8.") == -1) ? false : true mainScrollSpan.innerHTML = "
\ Loading Advisories. . ."; var xmlDocScroll; function SCROLLERloadjscssfile(sfilename, sfiletype) { if (sfiletype == "js") { //if filename is a external JavaScript file var sfileref = document.createElement('script') sfileref.setAttribute("type", "text/javascript") sfileref.setAttribute("src", sfilename) } else if (sfiletype == "css") { //if filename is an external CSS file var sfileref = document.createElement("link") sfileref.setAttribute("rel", "stylesheet") sfileref.setAttribute("type", "text/css") sfileref.setAttribute("href", sfilename) } if (typeof sfileref != "undefined") document.getElementsByTagName("head")[0].appendChild(sfileref) } function SCROLLERloadjs(url, fct) { var script = document.createElement("script") script.type = "text/javascript"; if (script.readyState) { //IE script.onreadystatechange = function () { if (script.readyState == "loaded" || script.readyState == "complete") { script.onreadystatechange = null; fct(); } }; } else { //Others script.onload = function () { fct(); }; } script.src = url; script.setAttribute("src", url) script.setAttribute("type", "text/javascript") document.getElementsByTagName("head")[0].appendChild(script); } SCROLLERloadjscssfile(scrollJSroot + "css/smoothness/jquery-ui-1.8.2.custom.css", "css"); SCROLLERloadjscssfile(scrollJSroot + "css/jquery.marquee.css", "css"); function loadIE8Scripts() { if (typeof jQuery == 'undefined') { SCROLLERloadjscssfile(scrollJSroot+"js/jquery-1.4.2.js", "js"); } if (typeof jQuery != 'undefined') { SCROLLERloadjscssfile(scrollJSroot+"js/ui/jquery-ui-1.8.2.custom.js", "js"); SCROLLERloadjscssfile(scrollJSroot+"js/jquery.marquee.js", "js"); } } if (IE8S) { loadIE8Scripts(); } SCROLLERloadjs(scrollJSroot+"js/jquery-1.4.2.js", function () { SCROLLERloadjs(scrollJSroot+"js/ui/jquery-ui-1.8.2.custom.js", function () { SCROLLERloadjs(scrollJSroot+"js/jquery.marquee.js", function () { if (typeof jQuery == 'undefined') { SCROLLERloadjscssfile(scrollJSroot+"js/jquery-1.4.2.js", "js"); } var xmlTxt = ''; SCROLLERparseIt(xmlTxt); }); }); }); function SCROLLERparseIt(obj) { if (window.DOMParser) { // Firefox Sparser = new DOMParser(); xmlDocScroll = Sparser.parseFromString(obj, "text/xml"); } else // Internet Explorer { xmlDocScroll = new ActiveXObject("Microsoft.XMLDOM"); xmlDocScroll.async = "false"; xmlDocScroll.loadXML(obj); } var ScontentHTML = ''; var marqContent = ''; var scrollDlgJS = ''; if (IE8S) { loadIE8Scripts(); } for (var i = 0; i < xmlDocScroll.documentElement.childNodes.length; i++) { var title = xmlDocScroll.getElementsByTagName("item")[i].attributes.getNamedItem("title").nodeValue; var content = xmlDocScroll.getElementsByTagName("item")[i].attributes.getNamedItem("description").nodeValue; var createdDate = xmlDocScroll.getElementsByTagName("item")[i].attributes.getNamedItem("created_date").nodeValue; var updatedDate = xmlDocScroll.getElementsByTagName("item")[i].attributes.getNamedItem("updated_date").nodeValue; //scrollPopupHeaderFontSize ScontentHTML += ""; //setTimeout(" //scrollDlgJS += setTimeout("jQuery('#JQueryDialogBoxForScroller" + i + "').dialog({ \ autoOpen: false, \ height: "+scrollParams[scrollPopupHeight]+", \ width: "+scrollParams[scrollPopupWidth]+", \ modal: true, \ position: 'center', \ draggable: false, \ resizable: false, \ hide: 'clip' }); \ document.getElementById('JQueryDialogBoxForScroller" + i + "').style.display='inline';", 500); marqContent += '
  • \ ' + title + '
  • '; } if (xmlDocScroll.documentElement.childNodes.length == 0) { marqContent = '
  • \ There Are No Active Advisories.
  • '; } if (IE8S) { loadIE8Scripts(); } mainScrollSpan.innerHTML = ''; mainScrollSpan.style.width = '100%'; ScontentHTML += ""; ScontentHTML += '
    \ " + scrollParams[scrollHeaderText] + ":
      '; ScontentHTML += marqContent; ScontentHTML += '
    '; setTimeout("$(document).ready(function (){ $('#marquee').marquee(); });", 2000); mainScrollSpan.innerHTML += ScontentHTML; // + ''; }