ipcountry = 225;
ipcity = 0;
var banpageid = 251;
var userhash = '5461546085e188ac2a069e91f8294f72';
var showban1 = 1;
window.singleBanner = function singleBanner(banid, bansect, banurl, banalt, banfname, banwidth, banheight, bantype, linktype, banorderposid, banorderid)
{
var tmpurl, tmpimg;
switch (parseInt(linktype))
{
case 1 :
tmpurl1 = "http://b.economedia.bg/clickban.php?banorderposid=" + banorderposid;
tmpurl = "http://b.economedia.bg/clickban.php?banorderposid=" + banorderposid;
break;
case 2 :
tmpurl1 = banurl;
tmpurl = banurl;
break;
}
switch (parseInt(bantype))
{
case 1 :
tmpimg = "";
break;
case 2 :
tmpimg = banalt;
break;
case 3 :
tmpimg = "";
return tmpimg;
case 4:
tmpimg = banalt;
return tmpimg;
}
return "" + tmpimg + ""
}
window.singleBannerFlat = function singleBannerFlat(banid, bansect, banurl, banalt, banfname, banwidth, banheight, bantype, linktype, banorderposid, banorderid)
{
var tmpurl, tmpimg;
switch (parseInt(linktype))
{
case 1 :
tmpurl1 = "http://b.economedia.bg/clickban.php?banorderposid=" + banorderposid;
tmpurl = "http://b.economedia.bg/clickban.php?banorderposid=" + banorderposid;
break;
case 2 :
tmpurl1 = banurl;
tmpurl = banurl;
break;
}
switch (parseInt(bantype))
{
case 1 :
tmpimg = "";
break;
case 2 :
break;
case 3 :
return tmpimg;
case 4:
tmpimg = banalt;
return tmpimg;
}
return "" + tmpimg + "";
}
function vbaneri(section) {
if (!banners[section]) return false;
if (showban1==1) {
document.write(singleBanner(banners[section]['banid'], section, banners[section]['url'], banners[section]['alt'], banners[section]['banfile'], banners[section]['x'], banners[section]['y'], banners[section]['bantype'], banners[section]['linktype'], banners[section]['banorderposid'], banners[section]['banorderid']));
}
}
function vbaneriw(section) {
if (!banners[section]) return false;
if (showban1 == 1) {
document.write(singleBanner(banners[section]['banid'], section, banners[section]['url'], banners[section]['alt'], banners[section]['banfile'], banners[section]['x'], banners[section]['y'], banners[section]['bantype'], banners[section]['linktype'], banners[section]['banorderposid'], banners[section]['banorderid']));
var http = false;
if (navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
var banurl = 'http://' + document.domain + '/lib/banlog.php?type=ban&posid=' + banners[section]['posid'] + '&banid=' + banners[section]['banid'] + '&banorderposid=' + banners[section]['banorderposid'] + '&ipcountry=' + ipcountry + '&ipcity=' + ipcity;
http.open("GET", banurl);
http.onreadystatechange = function() {
if(http.readyState == 4) {
}
}
http.send(null);
}
}
function vbaneriflat(section) {
if (!banners[section]) return false;
if (showban1==1) {
document.write(singleBanner(banners[section]['banid'], section, banners[section]['url'], banners[section]['alt'], banners[section]['banfile'], banners[section]['x'], banners[section]['y'], banners[section]['bantype'], banners[section]['linktype'], banners[section]['banorderposid'], banners[section]['banorderid']));
}
}
function vbaneridnevnik(section) {
if (!banners[section]) return false;
if (showban1==1) {
if (banners[section][6] == 2) { //ako e razlichen ot textov link da si se writeva normalno
document.write("
Спонсорирани линкове
");
}
document.write(singleBanner(banners[section]['banid'], section, banners[section]['url'], banners[section]['alt'], banners[section]['banfile'], banners[section]['x'], banners[section]['y'], banners[section]['bantype'], banners[section]['linktype'], banners[section]['banorderposid'], banners[section]['banorderid']));
if (banners[section][6] == 2) { //ako e razlichen ot textov link da si se writeva normalno
document.write("
")
}
}
}
function vbanericapital(section) {
if (!banners[section]) return false;
if (showban1==1) {
if (banners[section][6] == 2) { //ako e razlichen ot textov link da si se writeva normalno
document.write("
Спонсорирани линкове
");
}
document.write(singleBanner(banners[section]['banid'], section, banners[section]['url'], banners[section]['alt'], banners[section]['banfile'], banners[section]['x'], banners[section]['y'], banners[section]['bantype'], banners[section]['linktype'], banners[section]['banorderposid'], banners[section]['banorderid']));
if (banners[section][6] == 2) { //ako e razlichen ot textov link da si se writeva normalno
document.write("
")
}
}
}
function vbanerimulti(pbanarr, phead, pfoot) {
if (showban1 != 1) {
return 0;
}
var ret = '';
var section;
for(i=0; i < pbanarr.length; i++) {
section = pbanarr[i];
if (banners[section]) {
ret += singleBanner(banners[section]['banid'], section, banners[section]['url'], banners[section]['alt'], banners[section]['banfile'], banners[section]['x'], banners[section]['y'], banners[section]['bantype'], banners[section]['linktype'], banners[section]['banorderposid'], banners[section]['banorderid']);
}
}
if (ret) {
if (phead) document.write(phead);
document.write(ret);
if (pfoot) document.write(pfoot);
}
}
function vbanerimultiw(pbanarr, phead, pfoot) {
if (showban1 != 1) {
return 0;
}
var ret = '';
var section;
for(i=0; i < pbanarr.length; i++) {
section = pbanarr[i];
if (banners[section]) {
ret += singleBanner(banners[section]['banid'], section, banners[section]['url'], banners[section]['alt'], banners[section]['banfile'], banners[section]['x'], banners[section]['y'], banners[section]['bantype'], banners[section]['linktype'], banners[section]['banorderposid'], banners[section]['banorderid']);
var http = false;
if (navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
var banurl = 'http://' + document.domain + '/lib/banlog.php?type=ban&posid=' + banners[section]['posid'] + '&banid=' + banners[section]['banid'] + '&banorderposid=' + banners[section]['banorderposid'] + '&ipcountry=' + ipcountry + '&ipcity=' + ipcity;
http.open("GET", banurl);
http.onreadystatechange = function() {
if(http.readyState == 4) {
}
}
http.send(null);
}
}
if (ret) {
if (phead) document.write(phead);
document.write(ret);
if (pfoot) document.write(pfoot);
}
}
function vbaneripagelog() {
if (!banpageid) {
return;
}
var http = false;
if (navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
var banurl = 'http://' + document.domain + '/lib/banlog.php?type=page&pid=' + banpageid + '&hash=' + userhash + '&ipcountry=' + ipcountry + '&ipcity=' + ipcity;
http.open("GET", banurl);
http.onreadystatechange = function() {
if (http.readyState == 4) {
}
}
http.send(null);
}
function setFlashWidth(divid, newW, bleft) {
var container = document.getElementById(divid).parentNode;
container.style.left = (bleft-(newW-300)) + "px";
document.getElementById(divid).style.width = newW + "px";
}
function setFlashHeight(divid, newH, btop) {
var container = document.getElementById(divid).parentNode;
container.style.top = (btop-(newH-250)) + "px";
document.getElementById(divid).style.height = newH + "px";
}
function setFlashSize(divid, newW, newH) {
var container = document.getElementById(divid).parentNode;
var bcont = container.parentNode;
btop = getY(bcont);
bleft = getX(bcont);
setFlashWidth(divid, newW, bleft);
setFlashHeight(divid, newH, btop);
}
function getY(oElement) {
var iReturnValue = 0;
while (oElement != null) {
iReturnValue += oElement.offsetTop;
oElement = oElement.offsetParent;
}
return iReturnValue;
}
function getX(oElement) {
var iReturnValue = 0;
while (oElement != null) {
iReturnValue += oElement.offsetLeft;
oElement = oElement.offsetParent;
}
return iReturnValue;
}
function expPosition(relid, bancontid) {
b = document.getElementById(relid);
bt = getY(b);
bl = getX(b);
newdiv = document.getElementById(bancontid);
newdiv.style.position = "absolute";
newdiv.style.left = bl + "px";
newdiv.style.top = bt + "px";
newdiv.style.display = "block";
newdiv.style.zIndex = "100";
}
function expBanerWrite(relid, bancontid, banurl) {
document.write('