﻿
function clipMover(section,num) {
    newTop = 9 - (num * 21);
    if (browserNew) {
        obj = document.getElementById(section);
        obj.style.top = newTop+"px";
    } else {
        obj = document.all[section].style;
        obj.top = newTop+"px";
    }
}

function startpeelup(section) {
    if (section != currentsection) {
        startpeeldown(lastover);
        lastover = section;
        peelingup[section] = 1;
        peelingdown[section] = 0;
        peelup(section);
    }
}

function startpeeldown(section) {
    if (section != currentsection) {
        peelingdown[section] = 1;
        peelingup[section] = 0;
        peeldown(section);
    }
}

function peelup(section) {
    if (section != currentsection) {
        if (! peelingdown[section]) {
            if (counter[section] < 8) {
                clipMover(section,counter[section]);
                if (counter[section] < 7) {
                    counter[section] = counter[section] + 1;
                    setTimeout("peelup('" + section + "')",delay);
                }
            }
        }
    }
}

function peeldown(section) {
    if (section != currentsection) {
        if (! peelingup[section]) {
            if (counter[section] > -1) {
                clipMover(section,counter[section]);
                if (counter[section] > 0) {
                    counter[section] = counter[section] - 1;
                    setTimeout("peeldown('" + section + "')",delay);
                }
            }
        }
    }
}











function suckerfish(type, tag, parentId) {    
	if (window.attachEvent) {    
		window.attachEvent("onload", 
			function() {    
				var sfEls = (parentId==null)?document.getElementsByTagName(tag):document.getElementById(parentId).getElementsByTagName(tag);    
				type(sfEls);    
			}
		);    
	}    
}    
sfFocus = function(sfEls) {    
	
	
	for (var i=0; i<sfEls.length; i++) {    
		if(sfEls[i].id=="search"){
			return ;
		}
		sfEls[i].onfocus=function() { 
			if(this.readOnly == false && (this.type=="text" || this.type == "textarea" || this.type=="password")){
				this.className+=" form_textfieldonfocus";
			}    
		}    
		
		sfEls[i].onblur=function() {  
			this.className=this.className.replace(new RegExp(" form_textfieldonfocus\\b"), "");
		}    
	}    
}    
suckerfish(sfFocus, "INPUT");    
suckerfish(sfFocus, "TEXTAREA");