var tickerEntries = new Array( "Amitabh Bachchan calls Kerala govt's act 'cheap'", "A Keralite from Thirumala dies in Kolkata fire", "KSEB recommends increasing costs for units above 200", "TN team of murder suspect behind Women", "Hidden cameras to suspect detention", "Body cremated in front of panchayat office", "UGC pay revision for college teachers of the state", "House wife killed and gold looted by mob", "11 die as busA private bus carrying about 40 passengers", "Four more panchayats will be included in the Munnar master plan", "Three killed in two separate accidents", ""Mohanlal's films will end when he stops acting. However my forty books, that are a reflection of my soul": Azhikode", ""Mohanlal's films will end when he stops acting. However my forty books, that are a reflection of my soul": Azhikode", "I was also thrown out from 'Christian Brothers': Innocent", "I was also thrown out from 'Christian Brothers': Innocent", "" ); //--------------------------------------------------------------------------------------------------------- // Configuration //--------------------------------------------------------------------------------------------------------- var tickerWidth = 400; // width (pixels) var tickerMargin = 20; // margin (pixels) var tickerDelay = 30; // scrolling delay (smaller = faster) var tickerSpacer = "K"; // spacer between ticker entries var tickerBGColor = "#FFFFF0"; // background color var tickerHLColor = "#CAFFCA"; // hilight (mouse over) color var tickerFont = "Ariel"; // font family (CSS-spec) var tickerFontSize = 12; // font size (pixels) var tickerFontColor = "#000000"; // font color var tickerBorderWidth = 1; // border width (pixels) var tickerBorderStyle = "groove"; // border style (CSS-spec) var tickerBorderColor = "#FFFFFF"; // border color //--------------------------------------------------------------------------------------------------------- // Functions //--------------------------------------------------------------------------------------------------------- var DOM = document.getElementById; var IE4 = document.all; var tickerIV, tickerID; var tickerItems = new Array(); var tickerHeight = tickerFontSize + 8; function tickerGetObj(id) { if(DOM) return document.getElementById(id); else if(IE4) return document.all[id]; else return false; } function tickerObject(id) { this.elem = tickerGetObj(id); this.width = this.elem.offsetWidth; this.x = tickerWidth; this.css = this.elem.style; this.css.width = this.width + 'px'; this.css.left = this.x + 'px'; this.css.visibility = 'visible'; this.move = false; return this; } function tickerNext() { if(!DOM && !IE4) return; var obj = tickerItems[tickerID]; obj.x = tickerWidth; obj.css.left = tickerWidth + 'px'; obj.move = true; } function tickerMove() { if(!DOM && !IE4) return; for(var i = 0; i < tickerItems.length; i++) { if(tickerItems[i].move) { if(tickerItems[i].x > -tickerItems[i].width) { tickerItems[i].x -= 2; tickerItems[i].css.left = tickerItems[i].x + 'px'; } else tickerItems[i].move = false; } } if(tickerItems[tickerID].x + tickerItems[tickerID].width <= tickerWidth) { tickerID++; if(tickerID >= tickerItems.length) tickerID = 0; tickerNext(); } } function tickerStart(init) { if(!DOM && !IE4) return; if(tickerBGColor) { var obj = tickerGetObj('divTicker'); obj.style.backgroundColor = tickerBGColor; } if(init) { tickerID = 0; tickerNext(); } tickerIV = setInterval('tickerMove()', tickerDelay); } function tickerStop() { if(!DOM && !IE4) return; clearInterval(tickerIV); if(tickerHLColor) { var obj = tickerGetObj('divTicker'); obj.style.backgroundColor = tickerHLColor; } } function tickerInit() { if(!DOM && !IE4) return; for(var i = width = 0; i < tickerEntries.length; i++) { tickerItems[i] = new tickerObject('divTickerEntry' + (i+1)); width += tickerItems[i].width; } var obj = tickerGetObj('divTicker'); obj.style.width = tickerWidth + 'px'; obj.style.visibility = 'visible'; tickerStart(true); } function tickerReload() { if(!DOM && !IE4) return; document.location.reload(); } window.onresize = tickerReload; window.onload = tickerInit; //--------------------------------------------------------------------------------------------------------- // Build ticker //--------------------------------------------------------------------------------------------------------- document.write(''); document.write('