//-- Scroll Procedures

if (document.all){ browse='ie'} else if (document.layers){browse='net'} else if (document.getElementById){browse='dom'}

function clipValues(layerName,step) {
	if (browse=='net') {
		eval(layerName+'.clip.top = '+layerName+'.clip.top + step')
		eval(layerName+'.clip.bottom = '+layerName+'.clip.bottom + step')
	}
	if (browse=='ie') {
		var clipv = eval(layerName+'.clip.split("rect(")[1].split(")")[0].split("px")')
		var intTop = Number(clipv[0])
		var intBottom = Number(clipv[2])
		var intNewTop = Number(intTop+step)
		var intNewBottom = Number(intBottom+step)
		eval(layerName+'.clip = "rect("+intNewTop+"px "+intScrollWidth+"px "+intNewBottom+"px 0px)"')
	}// 138
	if (browse=='dom') {
		var clipv = eval(document.getElementById(layerName).style.clip.split("rect(")[1].split(")")[0].split("px"))
		var intTop = Number(clipv[0])
		var intBottom = Number(clipv[2])
		var intNewTop = Number(intTop+step)
		var intNewBottom = Number(intBottom+step)
		document.getElementById(layerName).style.clip = "rect("+intNewTop+"px "+intScrollWidth+"px "+intNewBottom+"px 0px)"
	}
}



function scrollDown(layerName,test) {
  if(browse=='dom') {
    el=document.getElementById(layerName);
    if(el.style.ypos<8){
      el.style.ypos+=5;
      el.style.top=el.style.ypos;
      clipValues(layerName,-5);
      IDdown=setTimeout("scrollDown('"+layerName+"','"+test+"')",menuspeed);
    }
    
  } else {
	if (browse=='ie') layerName2 = layerName + '.style';
	if (browse=='net') layerName2 = 'document.'+test+'.document.'+layerName;
	if (eval(layerName2+'.ypos < 8')) {
	  eval(layerName2+'.ypos += 5');
      eval(layerName2+'.top = '+layerName2+'.ypos');
      eval('clipValues("'+layerName2+'",-5)');
      IDdown=setTimeout("scrollDown('"+layerName+"','"+test+"')",menuspeed);
	}
  }
}

function scrollDownStop() {
	clearTimeout(IDdown)
}

function scrollUp(layerName,test) {
  if(browse=='dom') {
    el=document.getElementById(layerName);
    if(el.style.ypos>-el.offsetHeight+58){
      el.style.ypos-=5;
      el.style.top=el.style.ypos
      clipValues(layerName,5);
      IDup=setTimeout("scrollUp('"+layerName+"','"+test+"')",menuspeed);
    }
  } else {
	if (browse=='ie') {
		layerName2 = layerName + '.style';
		heightAttr = layerName + '.clientHeight'; }
	if(browse=='net') {
		layerName2 = 'document.'+test+'.document.'+layerName;
		heightAttr = layerName2 + '.document.height'; }
	if (eval(layerName2+'.ypos > -'+heightAttr+' + 58')) {
    eval(layerName2+'.ypos -= 5');
    eval(layerName2+'.top = '+layerName2+'.ypos');
		eval('clipValues("'+layerName2+'",5)');
    IDup=setTimeout("scrollUp('"+layerName+"','"+test+"')",menuspeed);
	}
  }
}

function scrollUpStop() {
	clearTimeout(IDup)
}
