\n'); } function startPolling(anPoint){ //Have to make a local variable to this function, won't work just as 'anPoint' //And can't use 'var' in front of it, or it won't work anPt = anPoint; //clearInterval(my_polling_prog);//clear first to ensure it's not still going from time before my_polling_prog = setInterval("poll(anPt)",15); //calls to 'Poll' function to scroll } // FUNCTION TO SCROLL DOWN PAGE TO 'ANCHOR' POINT BASED ON BROWSER y POSITION FROM FLASH FILE fsCommand var position = 0; var color = "#ffffff"; function poll(anchorPoint){ // Check Which Browser if (navigator.appName == "Microsoft Internet Explorer"){ //for IE if (document.body.scrollTop) { var position = document.body.scrollTop;//for IE 5 & 5.5 } else { //for IE 6 var position = document.documentElement.scrollTop; } } else { var position = window.pageYOffset; //for Netscape, Opera } //Scroll back to top, backwards scroll if (anchorPoint == 0 && position != anchorPoint) { //Keep scrolling back up position -= 10; //Make sure not a negative number, set to zero to stop if (position <= 0) { position = 0;//will stop //Stops setInterval calling to function: DONE clearInterval(my_polling_prog); } //Scroll to this x, y position in browser window window.scrollTo(0,position); } //Keep scrolling down until reach this number: anchorPoint //If anchorPoint=0, go to scroll back to top statement instead(unless position=anchorPoint=0) if (position >= anchorPoint && anchorPoint != 0) { //Set to final 'anchorPoint' destination window.scrollTo(0,anchorPoint); //Stops setInterval calling to function: DONE clearInterval(my_polling_prog); } else if (position < anchorPoint && anchorPoint != 0) { //keep scrolling down position += 10; //Scroll to this x, y position in browser window window.scrollTo(0,position); //FOR TESTING PURPOSES TO CHANGE BACKGROUND COLOR /* COMMENTED OUT if (position > 50 && position < 250){color = "red";} if (position > 250 && position < 450){color = "yellow";} if (position > 450 && position < 650){color = "blue";} if (position > 650 && position < 850){color = "gray";} if (position > 850 && position < 1050){color = "purple";} if (position > 1050 || position < 50){color = "black"} document.bgColor = color; */ return true; } }//END 'POLL' FUNCTION FOR SCROLLING //----end Hide------------->