sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" ie_does_hover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" ie_does_hover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


function get_edress(edress){
	var re= /_at_/gi;
	edress = edress.replace(re,'@');
	var re= /_dot_/gi;
	edress = edress.replace(re,'.');
	var the_link="mai" + "lto" +":"+edress+"" ;
	window.location=the_link;
}


function Typewriter1(sName,sTarget)
{	// PROPERTIES
//sTarget="typewriter_output";
	this.counter = 0;
	this.name = sName;
	this.text = "";
	this.speed = 100; // in milliseconds
	
	// METHODS
	this.addText = AddText;
	this.next = Next;
	this.setSpeed = SetSpeed;
	this.write = Write;
	
	// FUNCTIONS
	function AddText(s)
	{	this.text = s
	}
	function Next()
	{	document.getElementById(sTarget).innerHTML = this.text.substr(0, this.counter++);
	}
	function SetSpeed(iSpeed)
	{	this.speed = iSpeed;
	}
	function Write()
	{	setInterval(this.name+".next()",this.speed);
	}
}


function Typewriter(sName,sTarget) {
    // PROPERTIES
    this.counter = 0;
    this.name = sName;
    this.text = "";
    this.speed = 100; // in milliseconds
    this.mode = 0;
   
    // METHODS
    this.addText = AddText;
    this.next = Next;
    this.setSpeed = SetSpeed;
    this.write = Write;
   
    // FUNCTIONS
    function AddText(s) {
        this.text = s;
    }
    function Next() {
        text=this.text;
        len=text.length;
        cntr=this.counter;
        mode=this.mode;
        nextMode="203451";
        s="";
        // mode 0 = grow left-to-right
        if (mode==0) {
            s=text.substr(0, cntr);
        // mode 1 = shrink right-to-left
        } else if (mode==1) {
            s=text.substr(0, len-cntr+2);
        // mode 2 = moving bold letter left-to-right
        } else if (mode==2) {
            c=cntr;
            s=text.substr(0, c)+"<strong>"+text.substr(c, 1)+"</strong>"+text.substr(c+1);
        // mode 3 = moving bold letter right-to-left
        } else if (mode==3) {
            c=len+1-cntr;
            s=text.substr(0, c)+"<strong>"+text.substr(c, 1)+"</strong>"+text.substr(c+1);
        // mode 4 = bold growing left-to-right
        } else if (mode==4) {
            c=cntr;
            s="<strong>"+text.substr(0, c)+"</strong>"+text.substr(c);
        // mode 5 = bold shrinking right-to-left
        } else if (mode==5) {
            c=len+1-cntr;
            s="<strong>"+text.substr(0, c)+"</strong>"+text.substr(c);
        }
        document.getElementById(sTarget).innerHTML = s;
        this.counter++;
        if (this.counter>len+1) {    // pause 1 letter
            this.counter=1;
            this.mode=nextMode.substr(mode,1);
        }
    }
    function SetSpeed(iSpeed) {
        this.speed = iSpeed;
    }
    function Write() {
        setInterval(this.name+".next()",this.speed);
    }
}


