﻿function sendemail() {
    var recp = "";
    var subj = "Eaton Corporation Web page";
    var btxt = "I thought you might be interested in this information from the Eaton Corporation Web site. ";
    window.location = "mailto:" + recp + "?subject=" + subj + "&body=" + btxt + "%0D%0A%0D%0A" + document.title + "%0D%0A%0D%0A" + window.location;
}

var min = 11;
var max = 12;

function changeFontSize() {

    var p = document.getElementsByTagName('div');
    for (i = 0; i < p.length; i++) {
        if (p[i].style.fontSize) {
            var s = parseInt(p[i].style.fontSize.replace("px", ""));
        } else {
            var s = 12;
        }
        if (s != max) {
            s++;
        }
        else
            s--;
        p[i].style.fontSize = s + "px"
    }
    var fontsize = s;
    setCookie('fontsize', fontsize, 365)
}

function setFontSize() {
    fontsize = getCookie('fontsize');
    var p = document.getElementsByTagName('div');
    for (i = 0; i < p.length; i++) {
        if (p[i].style.fontSize) {
            var s = parseInt(p[i].style.fontSize.replace("px", ""));
        } else {
            var s = fontsize;
        }
        p[i].style.fontSize = s + "px"
    }
}

function getCookie(FontCookie) {
    if (document.cookie.length > 0) {
        begin = document.cookie.indexOf(FontCookie + "=");
        if (begin != -1) {
            begin += FontCookie.length + 1;
            end = document.cookie.indexOf(";", begin);
            if (end == -1) end = document.cookie.length;
            return unescape(document.cookie.substring(begin, end));
        }
    }
    return null;
}

function setCookie(FontCookie, fontsize, expiredays) {
    var ExpireDate = new Date();
    var path = "/";
    ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

    document.cookie = FontCookie + "=" + escape(fontsize) +
	  ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + ";path=/";
}

function DoTheCookieStuff() {
    fontsize = getCookie('fontsize');
    if (fontsize != null) { setFontSize() }
}

emailup = new Image; emailup.src = "http://www.roadranger.com/ecm/groups/public/@pub/@eaton/@corp/documents/content/98060380.gif";
emaildown = new Image; emaildown.src = "http://www.roadranger.com/ecm/groups/public/@pub/@eaton/@corp/documents/content/98066424.gif";
printup = new Image; printup.src = "http://www.roadranger.com/ecm/groups/public/@pub/@eaton/@corp/documents/content/98060381.gif";
printdown = new Image; printdown.src = "http://www.roadranger.com/ecm/groups/public/@pub/@eaton/@corp/documents/content/98066425.gif";
fontup = new Image; fontup.src = "http://www.roadranger.com/ecm/groups/public/@pub/@eaton/@corp/documents/content/98060382.gif";
fontdown = new Image; fontdown.src = "http://www.roadranger.com/ecm/groups/public/@pub/@eaton/@corp/documents/content/98066426.gif";

function MouseOverRoutine(ButtonName) {
    if (ButtonName == "emailOff")
    { document.emailOff.src = emaildown.src; }
    if (ButtonName == "printOff")
    { document.printOff.src = printdown.src; }
    if (ButtonName == "fontOff")
    { document.fontOff.src = fontdown.src; }
}

function MouseOutRoutine(ButtonName) {
    if (ButtonName == "emailOff")
    { document.emailOff.src = emailup.src; }
    if (ButtonName == "printOff")
    { document.printOff.src = printup.src; }
    if (ButtonName == "fontOff")
    { document.fontOff.src = fontup.src; }
}

function printpage() {
    window.print();
}

function toLowercase(s, e) {
    s.value = s.value.toLowerCase();
}

