// JavaScript Document
window.onload = init;

function init() {

    var x = document.getElementsByTagName('a');
    var y;
    var newDiv;
    //			var newTxt = "";
    var parent;

    for (var i = 0; i <= x.length; i++) {
        y = x[i];
        if (y.className == 'tour') {
            newDiv = document.createElement("DIV");
            newDiv.setAttribute("onMouseOver", "showCurrencies(" + i + ");");
            newDiv.setAttribute("onMouseOut", "hideCurrencies(" + i + ");");
            newDiv.setAttribute("style", "position:relative;top:0;left:0;color:#ffffff;width:200px;");
            var oldcuid = y.toString();
            var usdcuid = oldcuid.replace("7838", "8062");
			var gbpcuid = oldcuid.replace("7838", "8907");
			var eurcuid = oldcuid.replace("7838", "8914");			
            newDiv.innerHTML = "<div style='height:28px'></div><div style='position:absolute;top:0;left:0;z-index:10000;background-color:#ff0000;width:200px;'><a style='display:block;width:180px;text-align:center;padding:5px 10px;margin:0;text-decoration:none;background-color:#ff0000;color:#FFFFFF;font-size:1.1em;font-weight:normal;' id='newLink" + i + "' href='" + y + "'>Price &amp; Bookings &raquo;</a><div id='toggleDiv" + i + "' style='display:none'><p style='padding:5px 10px 0 13px;margin:0'><strong>Select Currency:</strong></p><ul style='margin:0 0 0 13px;padding: 0 10px 10px 0;font-size:90%;'><li style='list-style-type:none;background-image:none;'><a style='float:none;color:#ffffff' href='" + y + "'>Australian Dollar (<strong>AUD</strong>)</a></li><li style='list-style-type:none;background-image:none;'><a style='color:#ffffff;float:none;' href='" + usdcuid + "'>United States Dollar (<strong>USD</strong>)</a></li><li style='list-style-type:none;background-image:none;'><a style='color:#ffffff;float:none;' href='" + gbpcuid + "'>British Pounds (<strong>GBP</strong>)</a></li><li style='list-style-type:none;background-image:none;'><a style='color:#ffffff;float:none;' href='" + eurcuid + "'>Euros (<strong>EUR</strong>)</a></li></ul></div></div>";
            parent = y.parentNode;
            parent.replaceChild(newDiv, y);
        }
    }

}

function showCurrencies(var1) {
    document.getElementById('newLink' + var1).style.display = 'none';
    document.getElementById('toggleDiv' + var1).style.display = 'block';
}

function hideCurrencies(var2) {
    document.getElementById('newLink' + var2).style.display = 'block';
    document.getElementById('toggleDiv' + var2).style.display = 'none';
}
