\n"; /* Cross browser Marquee script- © Dynamic Drive (www.dynamicdrive.com) For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com Credit MUST stay intact */ //Specify the marquee's width (in pixels) echo "var marqueewidth=\"590px\"\n"; //Specify the marquee's height echo "var marqueeheight=\"21px\"\n"; //Specify the marquee's marquee speed (larger is faster 1-10) echo "var marqueespeed=2\n"; //configure background color: echo "var marqueebgcolor=\"#993333\"\n"; //Pause marquee onMousever (0=no. 1=yes)? echo "var pauseit=1\n"; //Specify the marquee's content (don't delete tag) //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great): require_once("rss_fetch.inc"); /*$url = "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml"; $rss = fetch_rss( $url ); $rssval=""; foreach ($rss->items as $item) { $href = $item['link']; $title = $item['title']; $rssval=$rssval . "$title    "; }*/ $url = "http://www.marlin.ac.uk/DC-UK/dcukrss.php"; $rss = fetch_rss( $url ); $rssval=""; foreach ($rss->items as $item) { $href = $item['link']; $title = $item['title']; $rssval=$rssval . "$title    "; } $rssval=str_replace("'","\\'",$rssval); echo "var marqueecontent='

$rssval'\n"; ////NO NEED TO EDIT BELOW THIS LINE//////////// echo "marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1)\n"; //slow speed down by 1 for NS echo "var copyspeed=marqueespeed\n"; echo "var pausespeed=(pauseit==0)? copyspeed: 0\n"; echo "var iedom=document.all||document.getElementById\n"; echo "if (iedom)\n"; echo "document.write(''+marqueecontent+'')\n"; echo "var actualwidth=''\n"; echo "var cross_marquee, ns_marquee\n"; echo "function populate(){\n"; echo "if (iedom){\n"; echo "cross_marquee=document.getElementById? document.getElementById(\"iemarquee\") : document.all.iemarquee\n"; echo "cross_marquee.style.left=parseInt(marqueewidth)+8+\"px\"\n"; echo "cross_marquee.innerHTML=marqueecontent\n"; echo "actualwidth=document.all? temp.offsetWidth : document.getElementById(\"temp\").offsetWidth\n"; echo "}\n"; echo "else if (document.layers){\n"; echo "ns_marquee=document.ns_marquee.document.ns_marquee2\n"; echo "ns_marquee.left=parseInt(marqueewidth)+8\n"; echo "ns_marquee.document.write(marqueecontent)\n"; echo "ns_marquee.document.close()\n"; echo "actualwidth=ns_marquee.document.width\n"; echo "}\n"; echo "lefttime=setInterval(\"scrollmarquee()\",20)\n"; echo "}\n"; //echo "window.onload=populate\n"; echo "function scrollmarquee(){\n"; echo "if (iedom){\n"; echo "if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))\n"; echo "cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+\"px\"\n"; echo "else\n"; echo "cross_marquee.style.left=parseInt(marqueewidth)+8+\"px\"\n"; echo "}\n"; echo "else if (document.layers){\n"; echo "if (ns_marquee.left>(actualwidth*(-1)+8))\n"; echo "ns_marquee.left-=copyspeed\n"; echo "else\n"; echo "ns_marquee.left=parseInt(marqueewidth)+8\n"; echo "}\n"; echo "}\n"; echo "if (iedom||document.layers){\n"; echo "with (document){\n"; echo "document.write('
')\n"; echo "if (iedom){\n"; echo "write('
')\n"; echo "write('
')\n"; echo "write('
')\n"; echo "write('
')\n"; echo "}\n"; echo "else if (document.layers){\n"; echo "write('')\n"; echo "write('')\n"; echo "write('')\n"; echo "}\n"; echo "document.write('
')\n"; echo "}\n"; //echo "}\n"; echo "}\n"; ?>