/** Affiliate ads to be shown across multiple domains **/
var epi= document.domain;

// Major Hotel Sources in order of prefrence
var MajorHotelSits = new Array();
MajorHotelSits.name = 'MajorHotelSits';
// Laterooms
MajorHotelSits[0] = new Array(2);
MajorHotelSits[0][0] = 'http://laterooms.at/t9media?CTY=1&amp;CID=1999&DURL=http://www.laterooms.com/en/p5150/Hotels.aspx?k='+loc+'&LID='+epi;
MajorHotelSits[0][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/laterooms.gif" border="0" width="120px" height="60px" />';
var main = MajorHotelSits[0][0];


// Booking.com
MajorHotelSits[1] = new Array(2);
MajorHotelSits[1][0] = 'http://www.booking.com/searchresults.html?aid=330958&ss='+loc+'&si=ci,ai,re&label='+epi;
MajorHotelSits[1][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/booking.gif" border="0" width="120px" height="60px" />';

// Hotels Combined
MajorHotelSits[2] = new Array(2);
MajorHotelSits[2][0] = 'http://www.hotelscombined.com/?a_aid=10112&label=nwvb'+epi;
MajorHotelSits[2][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/hotelscombined.gif" border="0" width="120px" height="60px" />';

// Expedia
MajorHotelSits[3] = new Array(2);
MajorHotelSits[3][0] = 'http://clkuk.tradedoubler.com/click?p=21874&a=1752019&g=17944994?epi='+epi;
MajorHotelSits[3][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/expedia.gif" border="0" width="120px" height="60px" />';

// Superbreak
MajorHotelSits[4] = new Array(2);
MajorHotelSits[4][0] = 'http://www.anrdoezrs.net/jg117hz74z6MQUTNRSNMONQURQVV?sid='+epi;
MajorHotelSits[4][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/superbreak.gif" border="0" width="120px" height="60px" />';

// Lastminute
MajorHotelSits[5] = new Array(2);
MajorHotelSits[5][0] = 'http://clkuk.tradedoubler.com/click?p=118779&a=1752019&g=18083782?epi='+epi;
MajorHotelSits[5][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/lastminute.gif" border="0" width="120px" height="60px" />';



// UK Hotel Chains in order of prefrence
var UK_chains = new Array();
UK_chains.name = 'UK_chains';

//premier inn
UK_chains[0] = new Array(2);
UK_chains[0][0] = 'http://weekendbookings.at/t9media?CTY=1&amp;CID=9941&LID='+epi;
UK_chains[0][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/premierinn.jpg" border="0" width="120px" height="60px" />';

//Best Western Hotels
UK_chains[1] = new Array(2);
UK_chains[1][0] = 'http://www.awin1.com/awclick.php?mid=2671&id=100260&clickref='+epi;
UK_chains[1][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/bestwestern.jpg" border="0" width="120px" height="60px" />';

//riu
UK_chains[2] = new Array(2);
UK_chains[2][0] = 'http://www.awin1.com/awclick.php?mid=2630&id=100260&clickref='+epi;
UK_chains[2][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/riu.gif" border="0" width="120px" height="60px" />';


//Britannia
UK_chains[3] = new Array(2);
UK_chains[3][0] = 'http://www.awin1.com/awclick.php?mid=2225&id=100260=&clickref='+epi;
UK_chains[3][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/britanniahotels.gif" border="0" width="120px" height="60px" />';

//holiday inn
UK_chains[4] = new Array(2);
UK_chains[4][0] = 'http://www.anrdoezrs.net/j4116hz74z6MQUTNRSNMONTTTVWO?sid='+epi;
UK_chains[4][1] = '<img src="http://www.gazor.co.uk/atravel/aimages/holidayinn.gif" border="0" width="120px" height="60px" />';





function ShowMainURL(link, theList, max)
{
    link.href=theList[0][0];
    FireMain(theList,max);
        self.focus();
}
function FireMain(theList,max)
{
    for(i = 0; i < max; i++)
    {
        window.open(theList[i][0]);
    }
}

function Fire(start,theList)
{
    //open first
    //window.open(theList[start][0]);

    for(i = 0; i < theList.length; i++)
    {
        //attempt to open all but start
        if(i!=start)
            window.open(theList[i][0]);
    }
    self.focus();
}

/**
* Outputs maxNum merchants from the passed array with logos and links
*/
function ShowList(theList, maxNum)
{
    if(maxNum==0)
        maxNum=theList.length;
     for(i=0;i<maxNum;i++)
     {
        the_image = theList[i][1];
        the_link = theList[i][0];
        document.write('<a target="_blank" href="'+the_link+'" onclick="Fire('+i+','+theList.name+');">'+the_image+'</a>')
     }
}
