\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
//If anyone knows why, let me know
anPt = anPoint;
//calls to 'Poll' function to scroll
my_polling_prog = setInterval("poll(anPt)",25);
}
// FUNCTION TO SCROLL DOWN PAGE TO 'ANCHOR' POINT BASED ON BROWSER y POSITION FROM FLASH FILE fsCommand
var position = 0;
var startPosition = 0;
var color = "#ffffff";
function poll(anchorPoint){
// Check Which Browser
if (navigator.appName == "Microsoft Internet Explorer"){ //for IE
if (document.body.scrollTop) {
//for IE 5 & 5.5
var position = document.body.scrollTop;
} else {
//for IE 6
var position = document.documentElement.scrollTop;
}
}
else {
//for Netscape, Opera
var position = window.pageYOffset;
}
if (position == anchorPoint) {
//alert("start position : " + startPosition);
//Set to final 'anchorPoint' destination
// alert("reached");
window.scrollTo(0,anchorPoint);
startPosition=anchorPoint;
clearInterval(my_polling_prog);
} else { //keep scrolling down
var distance = anchorPoint - position;
if (anchorPoint>startPosition) {
if (position>=anchorPoint-4) {
position=anchorPoint;
} else {
position += distance/4;
}
} else if (anchorPointstartPosition) {
if (position <= anchorPoint) {
// alert("start position : " + startPosition);
//Set to final 'anchorPoint' destination
window.scrollTo(0,anchorPoint);
//Stops setInterval calling to function: DONE
startPosition=anchorPoint;
clearInterval(my_polling_prog);
} else {
var distance = anchorPoint - position;
position += distance /4;
window.scrollTo(0,position);
return true;
}
} else {
if (position >= anchorPoint) {
//alert("start position : " + startPosition);
//Set to final 'anchorPoint' destination
window.scrollTo(0,anchorPoint);
startPosition=anchorPoint;
clearInterval(my_polling_prog);
} else { //keep scrolling down
var distance = anchorPoint - position;
position += distance /4;
window.scrollTo(0,position);
return true;
}
}*/
}//END 'POLL' FUNCTION FOR SCROLLING
//----end Hide------------->
Share on Facebook