function setupMenuPosition(e) {

    var sw  = screen.availWidth;
    var ps  = (sw - 800) / 2;
    var psx = ps - 99;

    if (psx < 0) psx = 10;
    document.getElementById('htmlReferenceMenu').style.left = psx+'px';

}

function setupCSSMenuPosition(e) {

    var sw  = screen.availWidth;
    var ps  = (sw - 800) / 2;
    var psx = ps - 99;

    if (psx < 0) psx = 10;
    document.getElementById('cssReferenceMenu').style.left = psx+'px';

}

function setupJAVAMenuPosition(e) {

    var sw  = screen.availWidth;
    var ps  = (sw - 800) / 2;
    var psx = ps - 99;

    if (psx < 0) psx = 10;
    document.getElementById('javaReferenceMenu').style.left = psx+'px';

}

function setupAPACHEMenuPosition(e) {

    var sw  = screen.availWidth;
    var ps  = (sw - 800) / 2;
    var psx = ps - 99;

    if (psx < 0) psx = 10;
    document.getElementById('apacheReferenceMenu').style.left = psx+'px';

}

function setupPHPMenuPosition(e) {

    var sw  = screen.availWidth;
    var ps  = (sw - 800) / 2;
    var psx = ps - 99;

    if (psx < 0) psx = 10;
    document.getElementById('phpReferenceMenu').style.left = psx+'px';

}

function gloNav(cid,e) {

    document.getElementById(cid).style.backgroundImage = "url('/images/bg/static-navigation-hover.png')";
    document.getElementById(cid).style.backgroundRepeat = "no-repeat";

}

function dimNav(cid,e) {

    document.getElementById(cid).style.backgroundImage = "url('/images/bg/static-navigation-link.png')";
    document.getElementById(cid).style.backgroundRepeat = "no-repeat";

}

function gloResNav(cid,e) {

    cid.style.backgroundImage = "url('/images/bg/menu-item-link.png')";

}

function dimResNav(cid,e) {

    cid.style.backgroundImage = "url('/images/bg/menu-item.png')";

}

function gloResNav2(cid,e) {

    cid.style.backgroundImage = "url('/images/bg/menu-item-link2.png')";

}

function dimResNav2(cid,e) {

    cid.style.backgroundImage = "url('/images/bg/menu-item2.png')";

}

function showPoint(cid,e) {

    if (cid == 0) document.getElementById('bgaPoint').style.display = "block";
    else if (cid == 1) {
        var height = document.getElementById('fcPoint').height;
        var width = document.getElementById('fcPoint').width;
        if (height == 608) {
            height = 312;
            width = 240;
        }
        else {
            height = 608;
            width = 468;
        }
        document.getElementById('fcPoint').height = height
        document.getElementById('fcPoint').width = width;
    }

}

function hidePoint(cid,e) {

    if (cid == 0) document.getElementById('bgaPoint').style.display = "none";

}

function hilightSites (br,t,e) {

   if (t) {

       document.getElementById('select').style.borderColor="red";
       document.getElementById('select').style.backgroundColor="#ffeeee";
       document.getElementById('dbie').style.backgroundColor="#f44";
       document.getElementById('dbie').style.backgroundImage="none";
       document.getElementById('dba').style.borderColor="#c00";
       document.getElementById('dbb').style.borderColor="#c00";
       if (br == "IE") {
           document.getElementById('select').style.height="111px";
           document.getElementById('select').style.overflow="hidden";
       }

   }
   else {
       document.getElementById('select').style.borderColor="white";
       document.getElementById('select').style.backgroundColor="white";
       document.getElementById('dbie').style.backgroundColor="white";
       document.getElementById('dbie').style.backgroundImage="url('/images/bg/design-heading-top.png')";
       document.getElementById('dba').style.borderColor="#686230";
       document.getElementById('dbb').style.borderColor="#686230";
       if (br == "IE") {
           document.getElementById('select').style.height="111px";
           document.getElementById('select').style.overflow="hidden";
       }
   }

}

function showDesign(h,n,e) {

    if (n == 1) {
        document.getElementById('lsd').href = "http://www.tidygarage.com/";
        document.getElementById('sdp').src = h+"/images/sites/tidygarage.png";
        document.getElementById('sdp').alt = " Screen shot of www.tidygarage.com ";
        document.getElementById('sdp').title = " Screen shot of www.tidygarage.com ";
        document.getElementById('clsd').innerHTML = "TidyGarage";
    }
    if (n == 2) {
        document.getElementById('lsd').href = "http://www.thesurveycenter.net/";
        document.getElementById('sdp').src = h+"/images/sites/thesurveycenter.png";
        document.getElementById('sdp').alt = " Screen shot of www.thesurveycenter.net ";
        document.getElementById('sdp').title = " Screen shot of www.thesurveycenter.net ";
        document.getElementById('clsd').innerHTML = "The Survey Center";
    }
    if (n == 3) {
        document.getElementById('lsd').href = "http://www.zipplash.com/";
        document.getElementById('sdp').src = h+"/images/sites/zipplash.png";
        document.getElementById('sdp').alt = " Screen shot of www.zipplash.com ";
        document.getElementById('sdp').title = " Screen shot of www.zipplash.com ";
        document.getElementById('clsd').innerHTML = "ZippLash";
    }
    if (n == 4) {
        document.getElementById('lsd').href = "http://www.info-matrix.net/";
        document.getElementById('sdp').src = h+"/images/sites/infomatrix.png";
        document.getElementById('sdp').alt = " Screen shot of www.info-matrix.net ";
        document.getElementById('sdp').title = " Screen shot of www.info-matrix.net ";
        document.getElementById('clsd').innerHTML = "InfoMatrix";
    }
    if (n == 5) {
        document.getElementById('lsd').href = "http://www.americanbluegrasslandscaping.com/";
        document.getElementById('sdp').src = h+"/images/sites/americanbluegrass.png";
        document.getElementById('sdp').alt = " Screen shot of www.americanbluegrasslandscaping.com ";
        document.getElementById('sdp').title = " Screen shot of www.americanbluegrasslandscaping.com ";
        document.getElementById('clsd').innerHTML = "American Bluegrass Landscaping";
    }
    if (n == 6) {
        document.getElementById('lsd').href = "http://www.ajcs.ca/";
        document.getElementById('sdp').src = h+"/images/sites/ajcomputers.png";
        document.getElementById('sdp').alt = " Screen shot of www.ajcs.ca ";
        document.getElementById('sdp').title = " Screen shot of www.ajcs.ca ";
        document.getElementById('clsd').innerHTML = "AJ Computer Solutions";
    }
    if (n == 7) {
        document.getElementById('lsd').href = "http://www.allcareauto.ca/";
        document.getElementById('sdp').src = h+"/images/sites/allcareauto.png";
        document.getElementById('sdp').alt = " Screen shot of www.allcareauto.ca ";
        document.getElementById('sdp').title = " Screen shot of www.allcareauto.ca ";
        document.getElementById('clsd').innerHTML = "All Care Auto";
    }
    if (n == 8) {
        document.getElementById('lsd').href = "http://www.supremeshutters.net/";
        document.getElementById('sdp').src = h+"/images/sites/supremeshutters.png";
        document.getElementById('sdp').alt = " Screen shot of www.supremeshutters.net ";
        document.getElementById('sdp').title = " Screen shot of www.supremeshutters.net ";
        document.getElementById('clsd').innerHTML = "Supreme Shutters";
    }
    if (n == 9) {
        document.getElementById('lsd').href = "http://www.corazzasolutions.ca/";
        document.getElementById('sdp').src = h+"/images/sites/corazzasolutions.png";
        document.getElementById('sdp').alt = " Screen shot of www.corazzasolutions.ca ";
        document.getElementById('sdp').title = " Screen shot of www.corazzasolutions.ca ";
        document.getElementById('clsd').innerHTML = "Corazza Solutions";
    }
    if (n == 10) {
        document.getElementById('lsd').href = "http://www.laurenhedges.com/";
        document.getElementById('sdp').src = h+"/images/sites/laurenhedges.png";
        document.getElementById('sdp').alt = " Screen shot of www.laurenhedges.com ";
        document.getElementById('sdp').title = " Screen shot of www.laurenhedges.com ";
        document.getElementById('clsd').innerHTML = "Lauren Hedges";
    }
    if (n == 11) {
        document.getElementById('lsd').href = "http://www.uniquecandles.ca/";
        document.getElementById('sdp').src = h+"/images/sites/uniquecandles.png";
        document.getElementById('sdp').alt = " Screen shot of www.uniquecandles.ca ";
        document.getElementById('sdp').title = " Screen shot of www.uniquecandles.ca ";
        document.getElementById('clsd').innerHTML = "Unique Candles";
    }
    if (n == 12) {
        document.getElementById('lsd').href = "http://www.windsor-contractors.ca/";
        document.getElementById('sdp').src = h+"/images/sites/windsor-contractors.png";
        document.getElementById('sdp').alt = " Screen shot of www.windsor-contractors.ca ";
        document.getElementById('sdp').title = " Screen shot of www.windsor-contractors.ca ";
        document.getElementById('clsd').innerHTML = "Windsor Contractors";
    }

}

function moveDef(cid,e) {

    var sid = 'def'+cid;
    var xid = 'def'+cid+'Close';
    var vid = 'def'+cid+'Shadow';

    document.getElementById(sid).style.position = "absolute";
    if (cid == "Structure") {
    document.getElementById(sid).style.top = "580px";
    document.getElementById(sid).style.left = "250px";
    }
    else {
    document.getElementById(sid).style.top = "575px";
    document.getElementById(sid).style.left = "300px";
    }
    document.getElementById(xid).style.display = "inline";
    document.getElementById(vid).style.display = "block";

}

function closeDef(cid,e) {

    var sid = 'def'+cid;
    var xid = 'def'+cid+'Close';
    var vid = 'def'+cid+'Shadow';

    document.getElementById(sid).style.position = "static";
    document.getElementById(sid).style.top = "";
    document.getElementById(sid).style.left = "";
    document.getElementById(xid).style.display = "none";
    document.getElementById(vid).style.display = "none";

}

function glowHelp(i) {
    document.getElementById(i).style.backgroundImage = "url(/help/css/images/html-hi.png)";
}

function dimHelp(i) {
    document.getElementById(i).style.backgroundImage = "url(/help/css/images/html.png)";
}

