/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Sandeep Gangadharan | http://sivamdesign.com/scripts/ */
var text = 0;

var message=new Array();
  message[0] = "โปรโมชั่นพิเศษ ฟรีพื้นที่ Hosing 1ปี มูลค่า 1500 บาท เมื่อใช้บริการจัดทำเว็บไซต์กับเรา"
  message[1] = "บริการออกแบบและพัฒนาเว็บไซต์ ครบวงจร"
   message[2] = "สอบถามรายละเอียดเพิ่มเติม 08-5957-8832"

function changeText() {
  if (message.length > 0) {
	  var show=document.getElementById("news");
	  show.innerHTML=message[text];
    text++;
  }
  if (text == 3) {text = 0; }  // change the # 4 at the left to the maximum # of message lines you want included
    window.setTimeout("changeText()", 3500); }  // change the # on the left to adjust the speed of the
                                               // scroll. The smaller the # the faster the speed

// Multiple onload function created by: Simon Willison
// http://simon.incutio.com/archive/2004/05/26/addLoadEvent
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  changeText();
});

