﻿/*Partners that call directly jobticker script:netlog*/

/*CREATE TICKERS*/
var rootUrl = 'http://www.jobat.be';
//var rootUrl = 'http://localhost/vum.jobat.web2';

/*160x600*/
function createJobatTicker160NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_160x600_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="160px" height="600px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}
 
function createJobatTicker160FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_160x600_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="160px" height="600px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*362x200*/
function createJobatTicker362x200NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_362x200_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="362px" height="200px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker362x200FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_362x200_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="362px" height="200px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}


/*177x255*/
function createJobatTicker177x255NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_177x255_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="170px" height="255px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker177x255FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_177x255_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="170px" height="255px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*211x300*/
function createJobatTicker211x300NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_211x300_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="211px" height="300px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker211x300FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_211x300_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="211px" height="300px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*300x430*/
function createJobatTicker300x430NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_300x430_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="300px" height="430px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker300x430FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_300x430_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="300px" height="430px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTickerPartner300x430NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/tickerPartner_300x430_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="300px" height="430px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTickerPartner300x430FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/tickerPartner_300x430_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="300px" height="430px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*300x400*/
function createJobatTicker300x400NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_300x400_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="300px" height="400px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker300x400FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_300x400_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="300px" height="400px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*728x90*/
function createJobatTicker728x90NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_728x90_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="728px" height="90px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker728x90FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_728x90_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="728px" height="90px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*300x280*/
function createJobatTicker300x280FR(divname, source, term, sameSite, xml) {
    var query = GetQuery(source, term, xml);

    if (sameSite) {
        query = query + '&sameSite=' + sameSite;
    }
    
    var url = rootUrl + '/ticker/ticker_300x280_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="300px" height="280px">';
    var divticker = document.getElementById(divname);
    
    if (divticker)
        divticker.innerHTML = html;
}

/*200x500*/

function createJobatTicker200x500FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_200x500_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="200px" height="500px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}
 
/*300x166*/

function createJobatTicker300x166FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_300x166_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="300px" height="166px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*150x300*/

function createJobatTicker150x300FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_150x300_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="150px" height="300px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker150x300NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_150x300_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="150px" height="300px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*369x300*/
function createJobatTicker369x300NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_369x300_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="369px" height="300px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker369x300FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_369x300_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="369px" height="300px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*369x120*/
function createJobatTicker369x120NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_369x120_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="369px" height="120px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker369x120FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_369x120_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="369px" height="120px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*170x350*/
function createJobatTicker170x350NL(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_170x350_nl.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="170px" height="350px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

function createJobatTicker170x350FR(divname, source, term, xml) {
    var query = GetQuery(source, term, xml);

    var url = rootUrl + '/ticker/ticker_170x350_fr.html' + query;

    var html = '<iframe src="' + url + '" scrolling="no" frameborder="0" vspace="0" marginwidth="0" marginheight="0" hspace="0" width="170px" height="350px">';
    var divticker = document.getElementById(divname);

    if (divticker)
        divticker.innerHTML = html;
}

/*General Functions*/

function GetQuery(source, term, xml) {
    var query = '?source={0}&term={1}&xml={2}';

    if (source && source != 'undefined') {
        query = query.replace('{0}', source);
    }
    else {
        query = query.replace('{0}', '');
    }

    if (term && term != 'undefined') {
        query = query.replace('{1}', term);
    }
    else {
        query = query.replace('{1}', '');
    }

    if (xml && xml != 'undefined') {
        query = query.replace('{2}', xml);
    }
    else {
        query = query.replace('{2}', '');
    }


    return query;
}
