﻿function enterAttraction(town)
{
    var sl = document.getElementById("servicelink");
    if (sl != null)
    {
        sl.href="Places_To_Visit.aspx?id=62&town=" + town;
        sl.style.backgroundPosition = "0 0";
    }
}

function enterStay(town)
{
    var sl = document.getElementById("servicelink");
    if (sl != null)
    {
        sl.href="Places_To_Visit.aspx?id=47&town=" + town;
        sl.style.backgroundPosition = "0 -58px";
    }
}

function enterEat(town)
{
    var sl = document.getElementById("servicelink");
    if (sl != null)
    {
        sl.href="Places_To_Visit.aspx?id=48&town=" + town;
        sl.style.backgroundPosition = "0 -116px";
    }
}

function enterServices(town)
{
    var sl = document.getElementById("servicelink");
    if (sl != null)
    {
        sl.href="Places_To_Visit.aspx?id=49&town=" + town;
        sl.style.backgroundPosition = "0 -174px";
    }
}

function enterResource(href, y)
{
    var rl = document.getElementById("resourcelink");
    if (rl != null)
    {
        rl.href = href;
        rl.style.backgroundPosition = "0 -" + y +"px";
    }
}

function enterMedia(href, y)
{
    var rl = document.getElementById("medialink");
    if (rl != null)
    {
        rl.href = href;
        rl.style.backgroundPosition = "0 -" + y +"px";
    }
}

function enterRail(href, y)
{
    var rl = document.getElementById("raillink");
    if (rl != null)
    {
        rl.href = href;
        rl.style.backgroundPosition = "0 -" + y +"px";
    }
}