var Icounter = 0;
function getBroadCasterAdvert(username,password,width,heigth,clientRef)
{
    width = width + "px"; heigth = heigth + "px";
    var clientContext = window.location.pathname; var _counter = Icounter++; var refr = clientRef;
    var baseUrl = "http://service.marbil.co.za/services/marbil_advert.aspx?username="+username+"&password="+password+"&clientRef=" + refr + "&clientContext=" + clientContext;
    
    document.write("<div id='div"+_counter+"'><iframe name='iframe"+_counter+"' src='" + baseUrl + "' scrolling='no' frameborder='0' allowtransparency='true' hspace='0' vspace='0' marginheight='0' marginwidth='0' width='"+width+"' height='"+heigth+"' ></iframe></div>");
}
function getBroadCasterAdvertHTML(username,password,width,heigth,clientRef)
{
    width = width + "px"; heigth = heigth + "px";
    var clientContext = window.location.pathname; var _counter = Icounter++; var refr = clientRef;
    var baseUrl = "http://service.marbil.co.za/services/marbil_advert.aspx?username="+username+"&password=" + password + "&clientRef=" + refr + "&clientContext=" + clientContext;
    
    return "<div id='div"+_counter+"'><iframe name='iframe"+_counter+"' src='" + baseUrl + "' scrolling='no' frameborder='0' allowtransparency='true' hspace='0' vspace='0' marginheight='0' marginwidth='0' width='"+width+"' height='"+heigth+"' ></iframe></div>";
}

function getBroadCasterAdvertLimited(Key,width,heigth,clientRef,amount,specialresponse)
{
    width = width + "px"; heigth = heigth + "px";
    var clientContext = window.location.pathname; var _counter = Icounter++; var refr = clientRef;
    var baseUrl = "http://service.marbil.co.za/services/marbil_advert.aspx?key="+Key+"&clientRef=" + refr + "&clientContext=" + clientContext + "&amount=" + amount +"&specialResponse=" + specialresponse;
    var html = "<div id='div"+_counter+"'><iframe name='iframe"+_counter+"' src='" + baseUrl + "' scrolling='no' frameborder='0' allowtransparency='true' hspace='0' vspace='0' marginheight='0' marginwidth='0' width='"+width+"' height='"+heigth+"' ></iframe></div>";
    return html;
}
function getBroadCasterAdvertHTMLLimited(Key,width,heigth,clientRef,amount,specialresponse)
{
    width = width + "px"; heigth = heigth + "px";
    var clientContext = window.location.pathname; var _counter = Icounter++; var refr = clientRef;
    var baseUrl = "http://service.marbil.co.za/services/marbil_advert.aspx?key="+Key+"&clientRef=" + refr + "&clientContext=" + clientContext + "&amount=" + amount +"&specialResponse=" + specialresponse;
    var html = "<div id='div"+_counter+"'><iframe name='iframe"+_counter+"' src='" + baseUrl + "' scrolling='no' frameborder='0' allowtransparency='true' hspace='0' vspace='0' marginheight='0' marginwidth='0' width='"+width+"' height='"+heigth+"' ></iframe></div>";
    document.write(html);
}
function getBroadCasterAdvertPortal(Key,tag,width,heigth,clientRef)
{
    width = width + "px"; heigth = heigth + "px";
    var clientContext = window.location.pathname; var _counter = Icounter++; var refr = clientRef;
    var baseUrl = "http://service.marbil.co.za/services/marbil_advert.aspx?portalkey="+Key+"&tag="+tag+"&clientRef=" + refr + "&clientContext=" + clientContext;
    
    document.write("<div id='div"+_counter+"'><iframe name='iframe"+_counter+"' src='" + baseUrl + "' scrolling='no' frameborder='0' allowtransparency='true' hspace='0' vspace='0' marginheight='0' marginwidth='0' width='"+width+"' height='"+heigth+"' ></iframe></div>");
}	
function getBroadCasterAdvertUsername(username,password,width,heigth,clientRef)
{
    width = width + "px"; heigth = heigth + "px";
    var clientContext = window.location.pathname; var _counter = Icounter++; var refr = clientRef;
    var baseUrl = "http://service.marbil.co.za/services/marbil_advert.aspx?username="+username+"&password="+password+"&clientRef=" + refr + "&clientContext=" + clientContext;
    
    document.write("<div id='div"+_counter+"'><iframe name='iframe"+_counter+"' src='" + baseUrl + "' scrolling='no' frameborder='0' allowtransparency='true' hspace='0' vspace='0' marginheight='0' marginwidth='0' width='"+width+"' height='"+heigth+"' ></iframe></div>");
}
