add javascript folder

This commit is contained in:
John Bintz 2009-07-14 12:29:00 -04:00
parent 71c643fd2c
commit f4ab1c5821
2 changed files with 42 additions and 0 deletions

14
js/ie6submenus.js Normal file
View File

@ -0,0 +1,14 @@
//Suckerfish Dropdown for IE6
sfHover = function() {
var sfEls = document.getElementById("menu").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

28
js/scroll.js Normal file
View File

@ -0,0 +1,28 @@
// JavaScript Document
var up_timer
function getPosition(){
yoko = document.body.scrollLeft || document.documentElement.scrollLeft;
tate = document.body.scrollTop || document.documentElement.scrollTop;
}
function pageup(x,y){
if(up_timer) clearTimeout(up_timer);
if(y >= 1){
getPosition();
var divisionY = (tate-(tate/5));
var Y = Math.floor(divisionY);
window.scrollTo(yoko,Y);
up_timer = setTimeout("pageup("+yoko+","+Y+")",2);
}else{
window.scrollTo(yoko,0);
clearTimeout(up_timer);
}
}
function scrollup(){
getPosition();
pageup(yoko,tate)
}