﻿


SAOSS_Method = 'Empty';

function Company() {




}


var xmlhttp = null;
 
function getHTTPRequestObject() {
    var reqObj = null;
    try {
        reqObj = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (err) {
        try {
            reqObj = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (err2) {
            try {
                reqObj = new XMLHttpRequest();
            }
            catch (err3) {
                reqObj = null;
            }
        }
    }
    return reqObj;
}

var Page = 0;
var MyService = "Plumber"; 
var MyLocation = "Hemel Hempstead";

var URL = 'http://www.btexchanges.com/' + MyService + '/' + MyLocation + '/Search-Type/View-List/Page-' + Page + '/Sort-Distance/Radius-15/Default.aspx'

//xmlhttp = getHTTPRequestObject();

if (xmlhttp) {
    xmlhttp.open("GET", URL, true);
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            var box = document.getElementById('Scrape')
            box.innerHTML = xmlhttp.responseText;
            //alert(xmlhttp.responseText);
        }
    }
    xmlhttp.send(null);
}



//-------------------------------------|    START: 118499 Bubble    |-----------------------------------------------------------

function clearBubble() {
    SAOSS_Module = '118499'; SAOSS_Method = 'clearBubble';

    Bubble.style.display = 'none';

}
function hideBubble() {
    SAOSS_Module = '118499'; SAOSS_Method = 'hideBubble';

    //alert('clearBubble');
    playSound(0);
    setTimeout("clearBubble(Bubble);", 100)
    
}
function showBubble() {
    SAOSS_Module = '118499'; SAOSS_Method = 'showBubble';

    //alert('showBubble');
    
    Bubble.style.top = '100px';
    Bubble.style.top = '100px';
    Bubble.style.display = 'block';

    playSound();    //Plays the default or preferred jingle;
}
function doBubbleTags() {
    SAOSS_Module = '118499'; SAOSS_Method = 'doBubbleTags';
//alert('doBubbleTags');
    var Tags = document.getElementsByTagName('b');

    for (var i = 0; i < Tags.length; i++) {

        if (Tags[i].className == 'A499') {
            var inn = Tags[i].innerHTML;
            if (inn === '499') {
                //alert(inn);
                //Add Handler
                Tags[i].onmouseover = showBubble;
                Tags[i].onmouseout = hideBubble;
                Tags[i].onclick = showBubble; 
                inn = null;
            };
        };
    };
};


var Bubble = Object;

function doBubbles() {
    SAOSS_Module = '118499'; SAOSS_Method = 'doBubbles';

    var B = document.body
    Bubble = document.createElement('div');
    Bubble.id = 'LittleBubble';

    setTimeout("document.body.appendChild(Bubble);", 100)

    //We then need to apply the ShowBubble function to all <a> tags of class:A499

    doBubbleTags();

}




//-------------------------------------|    FINISH: 118499 Bubble    |-----------------------------------------------------------









//--------------------------------------------------------|    END: Module    |------------------------------------------------------//

(typeof SAOSS_Modules != 'undefined') ? SAOSS_AddModule('118499 Module', '1.0', false) : '';   //Add this Module to the Modules Array (Tracking)

//window.onload = fixMeffyIE;  //Call Setup Method - Any Setup routine MUST call Global.Setup()

doBubbles();