// JavaScript Document
var speed = 1; // change scroll speed with this value
/**
 * Initialize the marquee, and start the marquee by calling the marquee function.
 */
function init(){
  var el = document.getElementById("marquee_replacement");
  el.style.overflow = 'hidden';
  scrollFromBottom();
}
 
var go = 0;
/**
 * This is where the scroll action happens.
 * Recursive method until stopped.
 */
function scrollFromBottom(){
  var el = document.getElementById("marquee_replacement");  
  if(el.scrollTop >= el.scrollHeight-150){
    el.scrollTop = 0;
  };

  el.scrollTop = el.scrollTop + speed;
  
  if((el.scrollTop%150)==0){
	  go=1;
	  setTimeout("startit()",0000);
	  
  };
  
  if(go == 0){
    setTimeout("scrollFromBottom()",100);
  }; 
}
 
/**
 * Set the stop variable to be true (will stop the marquee at the next pass).
 */
function stop(){
  go = 1;
}
 
/**
 * Set the stop variable to be false and call the marquee function.
 */
function startit(){
  go = 0;
  scrollFromBottom();
}
//var svrdips=0;
function fnsurvey(){
	//alert(svrdips);
	if(typeof svrdips=='undefined'){
	window.open('survey.php','Survey','toolbar=0, location=0, directories=0, menuBar=0, scrollbars=0, resizable=0, width=450, height=350, left=50, top=50');
	svrdips++;
	}
}
window.onload=startit;
//window.onbeforeunload=fnsurvey;

//popupwindow removed
