
var w3c = (document.getElementById) ? 1:0
var ns4 = (document.layers) ? 1:0
var ie4 = (document.all) ? 1:0


// ASM SCROLLER 2.0 - (c) 2000 Brent Gustafson, vitaflo.com and assembler.org
// Feel free to hack around with this code for personal use, it's open source
// so do what ya want w/ it
// -Brent (brent@assembler.org)



var range2 = "";
var cap2 = "";
var mutex2 = 0;
var yplace2 = 0;
var ymax2 = 0;
var ymin2 = 0;
var xplace2 = 0;
var newsHeight2 = 0;

/** The only code you should ever need to change here are the following 3 vars **/
var speed2 = 5;                         //speed at which the news scrolls
var newsId2 = "news2";                   //name of the overall news div
var newsClipId2 = "clientinfo";       //name of the news clipping div

function redrawScreen() {
  location.reload();
  return false
}

function shiftTo2(obj, x, y) {
  if (w3c) {
    obj.style.left = x + "px";
    obj.style.top = y + "px";
  }
  else if (ns4) {
	 obj.moveTo(x,y);
  } 
  else if (ie4) {
    obj.style.pixelLeft = x;
	obj.style.pixelTop = y;
  }
}

function getObject2(obj) {
	var theObj = eval("document." + range2 + obj + cap2);
	return theObj;
} 

function scrollUpAgain() {
  if (mutex2 == 1){
    var theObj = getObject2(newsId2);
    if (yplace2 < ymax2) {
      yplace2 = yplace2 + speed2;
      if (yplace2 > ymax2) yplace2 = ymax2;
      shiftTo2(theObj, xplace2, yplace2);
      setTimeout("scrollUpAgain()",25);
    }
  }
}
  
function scrollDownAgain() {
   if (mutex2 == 2){
    var theObj = getObject2(newsId2);
    if (yplace2 > ymin2) {
      yplace2 = yplace2 - speed2;
      if (yplace2 < ymin2) yplace2 = ymin2;
      shiftTo2(theObj, xplace2, yplace2);
      setTimeout("scrollDownAgain()",25);
    }
  }
}

function scrollIt2(msg, dir) {
  window.status = msg; 
  mutex2 = dir;
  if (mutex2 == 1) {
    scrollUpAgain();
    //alert('up');
  }
  else if (mutex2 == 2) {
    //alert('down');
    scrollDownAgain();
   
  }
}

function scrollinit2() {
  if (w3c) {
    range2 = "getElementById(\"";
    cap2 = "\")";
    theObj = getObject2(newsClipId2);
    newsHeight2 = parseInt(theObj.offsetHeight);
    theObj = getObject2(newsId2);
    ymin2 = (parseInt(theObj.offsetHeight) - newsHeight2) * -1;
  }
  else if (ns4) {
    window.captureEvents(Event.RESIZE);
    window.onresize = redrawScreen;
    theObj = getObject2(newsClipId2);
    newsHeight2 = theObj.clip.height;
    newsId2 = newsClipId2 + ".document." + newsId2;
    theObj = getObject2(newsId2);
    ymin2 = (theObj.clip.height - newsHeight2) * -1;
  }
  else if (ie4) {
    range2 = "all.";
    theObj = getObject2(newsClipId2);
    newsHeight2 = theObj.offsetHeight;
    theObj = getObject2(newsId2);
    ymin2 = (theObj.offsetHeight - newsHeight2) * -1;
  }
}

// END OF LINE