// JavaScript Document
function doFlash(clip,height,width){
document.write('<object type="application/x-shockwave-flash" data="'+clip+'" width="'+width+'" height="'+height+'">');
document.write('<param name="movie" value="'+clip+'" />');
document.write('</object>');
}

function popWin(url){
window.open(url,'_blank','width=600,height=465');
}

function init(pages){
obContent = document.getElementById("scroller");
obContent.style.marginLeft ='0px';
oldPos = 0;
move = null;
transPos = 0;
pos = 0;
buts = new Array();
for(i=0; i<pages; i++){
	buts[i] = "but"+i;
	//alert(i);
}

}

function doMove(transPos,pos) {
  dif = (transPos - pos);
  newPos = pos+(dif*0.8);
  obContent.style.marginLeft = 0-newPos + "px";
  transPos = newPos;
  //alert(transPos + ":::::" + pos);
  if(transPos > (pos-3) && transPos < (pos+3))
  {  	
	obContent.style.marginLeft = 0-pos + "px";
	oldPos = pos;
	//alert("w00t");
  }else{
  	setTimeout('doMove('+transPos+','+pos+')',50);
  }
}

function scrollPane(posi,but) {
pos = posi;
transPos = oldPos;
doMove(transPos,pos);
//alert(buts);
for(i=0; i<buts.length; i++){
	//alert(buts[i]);
	document.getElementById(buts[i]).src="images/doclink.gif";
}
document.getElementById(but).src="images/doclinkon.gif";
}