if (typeof(AdNum)=='undefined') { AdNum = 1; } else { AdNum++; }
iprom_banner=false;
var cam='';var ad='';var no_camp='';var no_zone='';var pref_camp='';
if ((typeof(iprom_forced_campaign)!='undefined')&&(iprom_forced_campaign.length>0)) {  cam='camp='+iprom_forced_campaign+';'; }
if ((typeof(iprom_forced_ad)!='undefined')&&(iprom_forced_ad.length>0)) { ad='ad='+iprom_forced_ad+';'; }
if ((typeof(iprom_no_campaign)!='undefined')&&(iprom_no_campaign.length>0)) { no_camp='no_camp='+iprom_no_campaign+';'; }
if ((typeof(iprom_pref_campaign)!='undefined')&&(iprom_pref_campaign.length>0)) { pref_camp='pref_camp='+iprom_pref_campaign+';'; }
if ((typeof(iprom_no_zone)!='undefined')&&(iprom_no_zone.length>0)) { no_zone='no_zone='+iprom_no_zone+';'; }
var flash=false;var flash4=false; var flash5=false; var flash6=false; var flash7=false;
document.write("<span ID='placeHolder"+AdNum+"'></span>");
if (typeof(K_Word)=='undefined') { K_Word = 'null'; }
var agt=navigator.userAgent.toLowerCase();major = parseInt(navigator.appVersion);minor = parseFloat(navigator.appVersion);
isIE = (document.all)?true:false;var res = screen.width+"x"+screen.height;
var IE5up  = (isIE && (((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1))  && !(major < 4) && !((major == 4) && (agt.indexOf("msie 4")!=-1) )));
function getFlashVersion(){
   // ie
   try {
     try {
       var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
       try { axo.AllowScriptAccess = 'always'; }
       catch(e) { return '6,0,0'; }
     } catch(e) {}
     return new 
ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,',').match(/^,?(.+),?$/)[1];
   // other browsers
   } catch(e) {
     try {
       if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
         return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];
       }
     } catch(e) {}
   }
   return '0,0,0';
}
var flash = 0;
flash = getFlashVersion().split(',').shift();

var RmCaching = new Date();
document.write('<SCRIPT src="ht'+'tp://adserver.iprom.net/adserver7/Impression?z=47;t=js;sid=blog;m=delosi;ie5up='+IE5up+';'+ad+cam+no_camp+pref_camp+no_zone+'ref=;num='+AdNum+';kw='+K_Word+';flash='+flash+';res='+res+';re='+encodeURIComponent(document.referrer)+';rmc='+RmCaching.getTime()+'" LANGUAGE=Javascript\>');
document.write('</');
document.write('SCRIPT\>');

// vedenjsko (return code)
//function iprom_return_code() { // za _iprom_koda_oglas_prikazan=0
if (typeof(_iprom_koda_oglas_prikazan)!='undefined') {
if (typeof(_iprom_koda_campaign)!='undefined') {
if (_iprom_koda_campaign && _iprom_koda_oglas_prikazan==0) {
document.write('<SCRIPT src="ht'+'tp://adserver.iprom.net/adserver7/Impression?z=47;t=js;sid=blog;m=delosi;ie5up='+IE5up+';'+ad+cam+no_camp+pref_camp+no_zone+'nocamp='+_iprom_koda_campaign+';ref=;num='+AdNum+';kw='+K_Word+';flash='+flash+';res='+res+';rmc='+RmCaching.getTime()+'" LANGUAGE=Javascript\>');
document.write('</');
document.write('SCRIPT\>');
}
}
}
//}


function _iEvent(_iadid,_icategory,_iaction) {
var _iLoggerURL = 'ht'+'tp://adserver.iprom.net/adserver7/iLogger?z=47;t=js;sid=blog;m=delosi;cb=' + (new Date().getTime()) + ';adid=';if ((typeof(_iadid)!='undefined') && (_iadid)) { _iLoggerURL += _iadid + ''; } else { _iLoggerURL += ''; }if (typeof(_iaction)!='undefined') { _iLoggerURL += ';iact=' + escape(_iaction); }
if (typeof(_icategory)!='undefined') { _iLoggerURL += ';icat=' + escape(_icategory); }
var _ilogger = document.createElement('script'); _ilogger.type = 'text/javascript';
_ilogger.src = _iLoggerURL;var _is = document.getElementsByTagName('script')[0];
_is.parentNode.insertBefore(_ilogger, _is);
}
// za logiranje videoShadow Oglasov
if (typeof(_iprom_instream_layer)=='undefined'||_iprom_instream_layer=='') { _iprom_instream_layer='_iprom_inStream'; }
if (typeof(_iprom_instream_type)!='undefined'&&_iprom_instream_type!='') {
    document.write('<div id="iinstreamZERO" style="position:absolute; width:1px; height:1px; left: -1000px; top: -1000px; z-index:9001;"></div>');
    var iprom_isIE = navigator.userAgent.indexOf("MSIE") > -1;
    var mx,my;
    var iprom_instream_div=document.getElementById(_iprom_instream_layer);
    var plx=iprom_instream_div.style.width.replace(/px/,"");
    var ply=iprom_instream_div.style.height.replace(/px/,"");;
    var iprom_alphanum=0;
	function iprom_getRealPos(el,which) {
	    var iPos = 0;
	    while (el.offsetParent !=null) {
		    iPos += el["offset" + which];
		    el = el.offsetParent;
	    }
	    iPos += el["offset" + which];
	    return iPos;
	}
	function iprom_getPlay(ky) {
	    var sx; var sy; var gx; var gy;
	    if (ky.match(/youtube/i)) {
		var tab=[[0,0,0,0],[0,0,0,0]];
		if (plx<=405) { // gumb levo spodaj
		    sx=Math.round(((60/400)*plx)/2);
		    sy=Math.round(((36/337)*ply)/2);
		    gx=Math.round(((46/400)*plx)/2);
		    gy=Math.round(((22.5/337)*ply)/2);
		} else {
		    sx=31;sy=17;gx=24;gy=11;
		}
		tab[0]=[(sx-gx),(ply-(sy+gy)),(sx+gx),(ply-(sy-gy))];
		if (plx<=405) { // gumb v sredini
		    sx=Math.round(plx/2);
		    sy=Math.round(((300/337)*ply)/2);
		    gx=Math.round(((100/400)*plx)/2);
		    gy=Math.round(((80/337)*ply)/2);
		} else {
		    sx=Math.round(plx/2);
		    sy=Math.round((ply-36)/2);
		    gx=50;gy=40;
		}
		tab[1]=[(sx-gx),(sy-gy),(sx+gx),(sy+gy)];
		return tab;
	    } else if (ky.match(/google/i)) {
		sx=32; sy=ply-16; gx=30; gy=12;
		var tab=[[(sx-gx),(sy-gy),(sx+gx),(sy+gy)]];
		return tab;
	    } else if (ky.match(/jwflv/i)) {
		sx=0; sy=0; gx=plx-1; gy=ply-1;
		var tab=[[sx,sy,gx,gy]];
		return tab;
	    } else {
		return 0;
	    }
	}
	function iprom_getMouseXY(e) {
		if (iprom_isIE) { // za IE
			mx = event.clientX;
			my = event.clientY;
		} else {  // za NS
			mx = e.pageX;
			my = e.pageY;
		}
		return true;
	}
	function iprom_click(e) {
	    var klig;
	    if (!iprom_alphanum) {
		    if (!e) var e = window.event;
		    if (e.which) klig = (e.which == 1);
		    else if (e.button) { klig = (e.button == 1); }
		    if (klig) {
			iprom_getMouseXY;
			var i=0;
			while (iprom_play[i]) {
			    kx1=ofx+iprom_play[i][0]; ky1=ofy+iprom_play[i][1];
			    kx2=ofx+iprom_play[i][2]; ky2=ofy+iprom_play[i][3];
			    // alert(kx1+','+ky1+','+kx2+','+ky2);
			    if (iprom_isIE) {
				kx1-=document.documentElement.scrollLeft;
				kx2-=document.documentElement.scrollLeft;
				ky1-=document.documentElement.scrollTop;
				ky2-=document.documentElement.scrollTop;
				//mx+=document.documentElement.scrollLeft; my+=document.documentElement.scrollTop;
				//alert(mx+'>='+kx1+'&&'+mx+'<='+kx2+'&&'+(my)+'>='+ky1+'&&'+(my)+'<='+ky2);
			    }
			    if (mx>=kx1&&mx<=kx2&&my>=ky1&&my<=ky2) {
				//alert('klik');
				
				    //alert('<img src="ht'+'tp://adserver.iprom.net/adserver7/LogZero?z=47;t=js;sid=blog;m=delosi;fl='+flash+';kw=;tm='+RmCaching.getTime()+'" width=1 height=1>');
				    document.getElementById('iinstreamZERO').innerHTML='<img src="ht'+'tp://adserver.iprom.net/adserver7/LogZero?z=47;t=js;sid=blog;m=delosi;fl='+flash+';kw=;tm='+RmCaching.getTime()+'" width=1 height=1>';
				    if (typeof(iprom_AD_video_shown)!='undefined')
				    {
					    iprom_Init_InstreamAd(AdNum);
				    }
				    iprom_alphanum++;
			    }
			    i++;
			}
		    }
	    }
	}
     var iprom_play=iprom_getPlay(_iprom_instream_type);
     if (iprom_play&&iprom_play.length>0) {
	var ofx=iprom_getRealPos(iprom_instream_div, "Left");
	var ofy=iprom_getRealPos(iprom_instream_div, "Top");
	if (document.layers) { document.captureEvents(Event.MOUSEUP); }
	document.onmouseup=iprom_click;
	if (!iprom_isIE) document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove=iprom_getMouseXY;
    }

}
if (AdNum == 1) {
document.write('<div style="position:absolute;width:1px;height:1px;left:-10000px;top:-10000px;">');
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0" id="iprom_tie" width="1" height="1">');
document.write('<param name="movie" value="ht'+'tp://tie.iprom.net/iprom_tie.swf?uid=0" /><param name="allowscriptaccess" value="samedomain" />');
document.write('<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="1" height="1" name="iprom_tie" src="ht'+'tp://tie.iprom.net/iprom_tie.swf?uid=0" swLiveConnect="true" allowScriptAccess="samedomain"></embed>');
document.write('</object></div>');
}

