// JavaScript Document
//<!-- Begin
document.write('<link rel="stylesheet" type="text/css" href="midway.css">');

//document.write('<!-- Define Div for floating menu -->');
document.write('<div id="floatdiv" style=" '); 
document.write('position:absolute;');  
document.write('width:97px;height:500px;left:0px;top:0px; '); 
//document.write('padding:16px;background:#CCCC99; ');
document.write('padding:16px;background:#800000; ');
//document.write('padding:0px;background:#800000; ');
document.write('border:0px solid #2266AA"> '); 
//document.write('<!-- Create Div for menu -->');
document.write('<div id="menu">');
document.write('<table align="left"> <!--width="97px" border="0" align="left" CELLPADDING="0" CELLSPACING="0"> -->');

document.write('<!-- Begin Logo here -->');
document.write('<tr align="center">');
document.write('<td ><IMG alt="midway inn logo" border=0 src ="images/logomidwayinn.gif" width="97" heigth="57">');
document.write('</td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="amenities.html" target="_self">Amenities</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2">	<td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here	-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="rooms.html" target="_self">Rooms</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="rates.html" target="_self">Rates</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="breakfast.html" target="_self" >Continental Breakfast</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="specials.html" target="_self">Specials</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="business.html" target="_self" >Business Center</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="directions.html" target="_self">Directions</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="activities.html" target="_self">Activities</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="https://www.nitelink.com/main.asp?p=1109" target="_new">Online Reservations</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="contact.html" target="_self">Contact Us</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');

document.write('<!-- Begin link here -->');
document.write('<tr><td><a href ="index.html" target="_self">Home</a></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
//document.write('<!-- Begin Spacer Here-->');
//document.write('<tr height="5"><td bgcolor="#CCDCC2"><img src="Images/pixel.gif"></td></tr>');
//document.write('<!--Begin White Line here -->');	
//document.write('<tr height="2"><td bgcolor="#FFFFFF" ><img src="Images/pixel.gif"></td></tr>');
document.write('</table>');
document.write('</div>');
document.write('</div>  ');
//document.write('<script type="text/javascript"><!--');
//* Script by: www.jtricks.com
// * Version: 20071017
// * Latest version:
// * www.jtricks.com/javascript/navigation/floating.html
// */

//</script>');
var floatingMenuId = 'floatdiv';
var floatingMenu =
{
    targetX: 0,
    targetY: 0,

    hasInner: typeof(window.innerWidth) == 'number',
    hasElement: typeof(document.documentElement) == 'object'
        && typeof(document.documentElement.clientWidth) == 'number',

    menu:
        document.getElementById
        ? document.getElementById(floatingMenuId)
        : document.all
          ? document.all[floatingMenuId]
          : document.layers[floatingMenuId]
};

floatingMenu.move = function ()
{
    floatingMenu.menu.style.left = floatingMenu.nextX + 'px';
    floatingMenu.menu.style.top = floatingMenu.nextY + 'px';
}

floatingMenu.computeShifts = function ()
{
    var de = document.documentElement;

    floatingMenu.shiftX =  
        floatingMenu.hasInner  
        ? pageXOffset  
        : floatingMenu.hasElement  
          ? de.scrollLeft  
          : document.body.scrollLeft;  
    if (floatingMenu.targetX < 0)
    {
        floatingMenu.shiftX +=
            floatingMenu.hasElement
            ? de.clientWidth
            : document.body.clientWidth;
    }

    floatingMenu.shiftY = 
        floatingMenu.hasInner
        ? pageYOffset
        : floatingMenu.hasElement
          ? de.scrollTop
          : document.body.scrollTop;
    if (floatingMenu.targetY < 0)
    {
        if (floatingMenu.hasElement && floatingMenu.hasInner)
        {
            // Handle Opera 8 problems
            floatingMenu.shiftY +=
                de.clientHeight > window.innerHeight
                ? window.innerHeight
                : de.clientHeight
        }
        else
        {
            floatingMenu.shiftY +=
                floatingMenu.hasElement
                ? de.clientHeight
                : document.body.clientHeight;
        }
    }
}

floatingMenu.calculateCornerX = function()
{
    if (floatingMenu.targetX != 'center')
        return floatingMenu.shiftX + floatingMenu.targetX;

    var width = parseInt(floatingMenu.menu.offsetWidth);

    var cornerX =
        floatingMenu.hasElement
        ? (floatingMenu.hasInner
           ? pageXOffset
           : document.documentElement.scrollLeft) + 
          (document.documentElement.clientWidth - width)/2
        : document.body.scrollLeft + 
          (document.body.clientWidth - width)/2;
    return cornerX;
};

floatingMenu.calculateCornerY = function()
{
    if (floatingMenu.targetY != 'center')
        return floatingMenu.shiftY + floatingMenu.targetY;

    var height = parseInt(floatingMenu.menu.offsetHeight);

    // Handle Opera 8 problems
    var clientHeight = 
        floatingMenu.hasElement && floatingMenu.hasInner
        && document.documentElement.clientHeight 
            > window.innerHeight
        ? window.innerHeight
        : document.documentElement.clientHeight

    var cornerY =
        floatingMenu.hasElement
        ? (floatingMenu.hasInner  
           ? pageYOffset
           : document.documentElement.scrollTop) + 
          (clientHeight - height)/2
        : document.body.scrollTop + 
          (document.body.clientHeight - height)/2;
    return cornerY;
};

floatingMenu.doFloat = function()
{
    var stepX, stepY;

    floatingMenu.computeShifts();

    var cornerX = floatingMenu.calculateCornerX();

    var stepX = (cornerX - floatingMenu.nextX) * .07;
    if (Math.abs(stepX) < .5)
    {
        stepX = cornerX - floatingMenu.nextX;
    }

    var cornerY = floatingMenu.calculateCornerY();

    var stepY = (cornerY - floatingMenu.nextY) * .07;
    if (Math.abs(stepY) < .5)
    {
        stepY = cornerY - floatingMenu.nextY;
    }

    if (Math.abs(stepX) > 0 ||
        Math.abs(stepY) > 0)
    {
        floatingMenu.nextX += stepX;
        floatingMenu.nextY += stepY;
        floatingMenu.move();
    }

    setTimeout('floatingMenu.doFloat()', 20);
};

// addEvent designed by Aaron Moore
floatingMenu.addEvent = function(element, listener, handler)
{
    if(typeof element[listener] != 'function' || 
       typeof element[listener + '_num'] == 'undefined')
    {
        element[listener + '_num'] = 0;
        if (typeof element[listener] == 'function')
        {
            element[listener + 0] = element[listener];
            element[listener + '_num']++;
        }
        element[listener] = function(e)
        {
            var r = true;
            e = (e) ? e : window.event;
            for(var i = element[listener + '_num'] -1; i >= 0; i--)
            {
                if(element[listener + i](e) == false)
                    r = false;
            }
            return r;
        }
    }

    //if handler is not already stored, assign it
    for(var i = 0; i < element[listener + '_num']; i++)
        if(element[listener + i] == handler)
            return;
    element[listener + element[listener + '_num']] = handler;
    element[listener + '_num']++;
};

floatingMenu.init = function()
{
    floatingMenu.initSecondary();
    floatingMenu.doFloat();
};

// Some browsers init scrollbars only after
// full document load.
floatingMenu.initSecondary = function()
{
    floatingMenu.computeShifts();
    floatingMenu.nextX = floatingMenu.calculateCornerX();
    floatingMenu.nextY = floatingMenu.calculateCornerY();
    floatingMenu.move();
}

if (document.layers)
    floatingMenu.addEvent(window, 'onload', floatingMenu.init);
else
{
    floatingMenu.init();
    floatingMenu.addEvent(window, 'onload',
        floatingMenu.initSecondary);
}


// End -->