/* author: john collins */
/* force-frame script */

pageLoc = self.location;
pageAdd = top.location;

if (pageLoc == pageAdd) {
	contentSrc = escape(pageLoc);
	contentPage = 'index.html?' + contentSrc;
	top.location.href = contentPage;
}






scrollSteps = 15
timer=""

function scrollWin(anchorID){
id=anchorID.substring(anchorID.indexOf("#")+1,anchorID.length)
clearTimeout(timer)
if(document.body.scrollTop <= document.getElementById(id).offsetTop+55-scrollSteps){
window.scrollBy(0,scrollSteps)
timer=setTimeout("scrollWin('"+id+"')",10)

// if bottom of page reached before anchor point
if(document.body.scrollTop >(document.body.scrollHeight-document.body.clientHeight)-scrollSteps){
clearTimeout(timer)
document.body.scrollTop=document.body.scrollHeight-document.body.clientHeight
}

}
else{

if(document.body.scrollTop >= document.getElementById(id).offsetTop+55+scrollSteps){
window.scrollBy(0,-scrollSteps)
timer=setTimeout("scrollWin('"+id+"')",10)
}
else{
clearTimeout(timer)
document.body.scrollTop=document.getElementById(id).offsetTop+55
}

}

return false

}

function toTop(){
clearTimeout(timer)
if(document.body.scrollTop >= scrollSteps){
window.scrollBy(0,-scrollSteps)
timer=setTimeout("toTop()",10)
}
else{
clearTimeout(timer)
document.body.scrollTop=0
}

return false

}