var d = document;
var x;
var y;
var depth = 5;
var desc = new Array (
    "8' High 8' Wide Containers","Lots of room for packing &amp; storing large items",
    "Translucent Roof","Lets in plenty of light",
    "Steel Construction","Welded frame, strong &amp; secure steel siding",
    "Locking Roll-Up Door","Convenient &amp; secure",
    "Sturdy Railings","For hanging clothes &amp; securing tie downs",
    "Moisture Resistant Floor","Moisture resistant floor",
    "8\" Ground Clearance","Allows easy access &amp; avoids water issues",
    "Closeable Rear Vent","Reduces moisture &amp; humidity that contribute to mold &amp; mildew",
    "No Sweating","Galvanized steel exterior coated with factory baked paint",
    "Casters","Allow for easy maneuverability"
);
var minis = new Array (
    "12","675","8,000","$99.00","$129.00",
    "16","900","8,000","$120.00","$150.00",
    "18","1025","8,000","$139.00","$169.00",
    "20","1150","8,000","$159.00","$189.00"
);


function hide() {
    d.getElementById('tip').style.visibility = 'hidden';
}
function show() {
    setPosition();
}
function showMini(index) {
    var i = index * depth;
    var html = "<div style='text-align: left;'>";
    html +="<div class='row'><img alt='8' x 8' x "+minis[i]+"' Mini' src='/images/gominis_"+minis[i]+"ft.gif' /></div><h3 style='padding-top: 85px;'>"+minis[i]+" ft Mini</h3>";
    html +="<div class='row'>Approx. Dimensions</div>8' high x 8' wide x "+minis[i]+"' long<br />";
    html +="<div class='row'>Storage Capacity</div>"+minis[i+1]+" cubic ft.<br />";
    html +="<div class='row'>Weight Capacity</div>"+minis[i+2]+" lbs.<br />";
    html +="<div class='row'>You Store Rate</div><b>"+minis[i+3]+"</b>/month <br />";
    html +="<div class='row'>We Store Rate</div><b>"+minis[i+4]+"</b>/month <br />";
    html +="</div>";
    html +="<div class='clear'></div>";
    d.getElementById('tip').innerHTML = html;
    setPosition();
}
function showDesc(index) {
    var i = index * 2;
    var html ="<h3>"+desc[i]+"</h3>";
    html += desc[i+1];
    d.getElementById('tip').innerHTML = html;
    setPosition();
}
function setPosition() {
    var t = d.getElementById('tip').style;
    var max_width = window.innerWidth || d.body.offsetWidth;
    var my_width = t.width.substring(0,2) * 15;
    var pad = 10;
     if( (x-my_width-pad) <= 0 )
        t.left =  x + pad + 'px';
     else if( (x+my_width+pad) >= max_width)
        t.left =  max_width - my_width - (max_width - x) + pad + 'px';
     else
        t.left = x - my_width + pad + 'px';
    t.top = y + 'px';
    t.visibility = 'visible';
}
function setCoords(e) {
    if (document.all) {
        x = event.clientX + d.body.scrollLeft;
        y = event.clientY + d.body.scrollTop;
    } else {
        x = e.pageX;
        y = e.pageY;
    }
}
d.onmousemove = setCoords;
d.onmouseover = setCoords;
