function startTicker() { // Define run time values theCurrentStory = -1; theCurrentLength = 0; tickerPaused = 0; // Locate base objects if (document.getElementById) { theAnchorObject = document.getElementById("tickerAnchor"); theAnchorObjectHid = document.getElementById('tickerAnchorHid'); runTheTicker(); } else { document.write(""); return true; } } var advStart; // Ticker main run loop function runTheTicker() { var myTimeout; // Go for the next story data block if(theCurrentLength == 0) { if (tickerPaused == 1) { setTimeout("runTheTicker()", myTimeout); return; } theCurrentStory++; theCurrentStory = theCurrentStory % theItemCount; var pom = theSummaries[theCurrentStory].replace(/"/g,'"'); pom = pom.replace(/'/g,"'"); pom = pom.replace(/'/g,"'"); var theStorySummaryWIthoutStripped = pom; var stripped = stripHTML(pom); if(stripped == theStorySummaryWIthoutStripped) { theStorySummary = theStorySummaryWIthoutStripped; advStart = 0; thePrefix = ""; thePostfix = ""; } else { theStorySummary = stripped; advStart = theStorySummaryWIthoutStripped.length - stripped.length - 7; thePrefix = theStorySummaryWIthoutStripped.substring(0,advStart); thePostfix = ""; advStart = 0; } theTargetLink = theSiteLinks[theCurrentStory]; theAnchorObject.href = theTargetLink; } // Stuff the current ticker text into the anchor var text = thePrefix + theStorySummary.substring(advStart,theCurrentLength) + whatWidget() + thePostfix; theAnchorObjectHid.innerHTML = text var widthpx = theAnchorObjectHid.offsetWidth //alert(advStart+"; "+widthpx+" - "+320) if(widthpx>=320) { advStart++; advStart++; } var text = thePrefix + theStorySummary.substring(advStart,theCurrentLength) + whatWidget() + thePostfix; theAnchorObject.innerHTML = text // Modify the length for the substring and define the timer if(theCurrentLength != theStorySummary.length) { theCurrentLength++; myTimeout = theCharacterTimeout; } else { theCurrentLength = 0; myTimeout = theStoryTimeout; } // Call up the next cycle of the ticker setTimeout("runTheTicker()", myTimeout); } // Widget generator function whatWidget() { if(theCurrentLength == theStorySummary.length) { return theWidgetNone; } if((theCurrentLength % 2) == 1) { return theWidgetOne; } else { return theWidgetTwo; } } function pauseTicker(){ tickerPaused = 1; } function unpauseTicker(){ tickerPaused = 0; } function stripHTML(value){ var re= /<\S[^><]*>/g; return value.replace(re, ""); } var theCharacterTimeout = 60; var theStoryTimeout = 2000; var theWidgetOne = "_"; var theWidgetTwo = "-"; var theWidgetNone = ""; var theLeadString = ""; // LATEST var theSummaries = new Array(); var theSiteLinks = new Array(); theSummaries[0] = "Boyle is going to climb Ponte Tower"; theSiteLinks[0] = "http://tickermyfeed.com/news.php/MHx8/boyle_is_going_to_climb_ponte_tower/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfNTIwNy5odG1s&title=Qm95bGUgaXMgZ29pbmcgdG8gY2xpbWIgUG9udGUgVG93ZXI="; theSummaries[1] = "ADV: Easily Generate Creative Domain Names"; theSiteLinks[1] = "http://tickermyfeed.com/adv.php/Mw=="; theSummaries[2] = "Craven might be considering Scream 4"; theSiteLinks[2] = "http://tickermyfeed.com/news.php/MHx8/craven_might_be_considering_scream_4/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfNDcyMi5odG1s&title=Q3JhdmVuIG1pZ2h0IGJlIGNvbnNpZGVyaW5nIFNjcmVhbSA0"; theSummaries[3] = "ADV: Add This Ticker to Your Website for Free"; theSiteLinks[3] = "http://tickermyfeed.com/adv.php/NA=="; theSummaries[4] = "Star Trek: Christmas 2008"; theSiteLinks[4] = "http://tickermyfeed.com/news.php/MHx8/star_trek_christmas_2008/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfNDA0NS5odG1s&title=U3RhciBUcmVrOiBDaHJpc3RtYXMgMjAwOA=="; theSummaries[5] = "ADV: Slide in Banner Exchange for Webmasters"; theSiteLinks[5] = "http://tickermyfeed.com/adv.php/MTE="; theSummaries[6] = "James Caan is leaving Las Vegas"; theSiteLinks[6] = "http://tickermyfeed.com/news.php/MHx8/james_caan_is_leaving_las_vegas/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfMzAxNy5odG1s&title=SmFtZXMgQ2FhbiBpcyBsZWF2aW5nIExhcyBWZWdhcw=="; theSummaries[7] = "ADV: Automated Link Exchange for Webmasters"; theSiteLinks[7] = "http://tickermyfeed.com/adv.php/MTI="; theSummaries[8] = "McConaughey is a Surfer Dude"; theSiteLinks[8] = "http://tickermyfeed.com/news.php/MHx8/mcconaughey_is_a_surfer_dude/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfMjY1NC5odG1s&title=TWNDb25hdWdoZXkgaXMgYSBTdXJmZXIgRHVkZQ=="; theSummaries[9] = "ADV: Win a Apple MacBook 13-inch Notebook Computer Now"; theSiteLinks[9] = "http://tickermyfeed.com/adv.php/NTk="; theSummaries[10] = "The Mummy 3 to shoot in Montreal"; theSiteLinks[10] = "http://tickermyfeed.com/news.php/MHx8/the_mummy_3_to_shoot_in_montreal/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfMjQzNi5odG1s&title=VGhlIE11bW15IDMgdG8gc2hvb3QgaW4gTW9udHJlYWw="; theSummaries[11] = "Die Hard 4.0 poster"; theSiteLinks[11] = "http://tickermyfeed.com/news.php/MHx8/die_hard_40_poster/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfMTcyMy5odG1s&title=RGllIEhhcmQgNC4wIHBvc3Rlcg=="; theSummaries[12] = "Review: Black Snake Moan"; theSiteLinks[12] = "http://tickermyfeed.com/news.php/MHx8/review_black_snake_moan/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfMDgwMy5odG1s&title=UmV2aWV3OiBCbGFjayBTbmFrZSBNb2Fu"; theSummaries[13] = "Review: Ghost Rider"; theSiteLinks[13] = "http://tickermyfeed.com/news.php/MHx8/review_ghost_rider/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfMDY1Mi5odG1s&title=UmV2aWV3OiBHaG9zdCBSaWRlcg=="; theSummaries[14] = "Review: Reno 911: Miami"; theSiteLinks[14] = "http://tickermyfeed.com/news.php/MHx8/review_reno_911_miami/?link=aHR0cDovL3d3dy50aGVob2xseXdvb2RuZXdzLmNvbS9hcnRpY2xlXzIwMDdfMDJfMjhfMDUwNi5odG1s&title=UmV2aWV3OiBSZW5vIDkxMTogTWlhbWk="; var theItemCount = theSummaries.length; if (window.addEventListener) window.addEventListener("load", startTicker, false) else if (window.attachEvent) window.attachEvent("onload", startTicker) else if (document.getElementById) window.onload=startTicker document.write('
ADV: Easily Generate Creative Domain Names
'); document.write('
ADV: Add This Ticker to Your Website for Free
'); document.write('
ADV: Slide in Banner Exchange for Webmasters
'); document.write('
ADV: Automated Link Exchange for Webmasters
'); document.write('
ADV: Win a Apple MacBook 13-inch Notebook Computer Now
'); document.write(''); document.write('
'); document.write('
'); document.write('
'); document.write('');