var media_place_list = [{i:"19", d:"2", w:"800", h:"35", fd:"-1", bf:"-1"},{i:"22", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"23", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"28", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"30", d:"3", w:"250", h:"250", fd:"-1", bf:"208"},{i:"32", d:"3", w:"250", h:"250", fd:"-1", bf:"-1"},{i:"33", d:"4", w:"250", h:"250", fd:"-1", bf:"190"},{i:"46", d:"1", w:"160", h:"90", fd:"-1", bf:"-1"},{i:"51", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"52", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"55", d:"3", w:"200", h:"200", fd:"-1", bf:"221"},{i:"10", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"11", d:"1", w:"236", h:"90", fd:"-1", bf:"-1"},{i:"12", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"20", d:"1", w:"468", h:"60", fd:"-1", bf:"-1"},{i:"31", d:"3", w:"250", h:"250", fd:"-1", bf:"144"},{i:"34", d:"4", w:"250", h:"250", fd:"-1", bf:"152"},{i:"42", d:"1", w:"468", h:"60", fd:"-1", bf:"-1"},{i:"47", d:"3", w:"250", h:"250", fd:"-1", bf:"177"},{i:"14", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"15", d:"1", w:"180", h:"180", fd:"-1", bf:"-1"},{i:"16", d:"1", w:"180", h:"150", fd:"-1", bf:"-1"},{i:"17", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"18", d:"1", w:"192", h:"90", fd:"-1", bf:"-1"},{i:"27", d:"2", w:"800", h:"35", fd:"-1", bf:"133"},{i:"48", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"49", d:"1", w:"468", h:"60", fd:"-1", bf:"-1"},{i:"13", d:"1", w:"120", h:"40", fd:"-1", bf:"-1"},{i:"21", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"50", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"35", d:"3", w:"250", h:"250", fd:"-1", bf:"186"},{i:"43", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"44", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"},{i:"45", d:"1", w:"728", h:"90", fd:"-1", bf:"-1"}];function E(A){return document.getElementById(A)}function ToggleDisplay(A){if(A.style.display=="none"){A.style.display="block"}else{A.style.display="none"}}function takeYear(A){x=A.getYear();var B=x%100;B+=(B<38)?2000:1900;return B}function FormatDate(B){var C=B.getFullYear();var D=B.getMonth()+1;if(D<10){D="0"+D}var A=B.getDate();if(A<10){A="0"+A}return C+"-"+D+"-"+A}function MonthName(B){var A="";switch(B){case 1:A="Janvāris";break;case 2:A="Februāris";break;case 3:A="Marts";break;case 4:A="Aprīlis";break;case 5:A="Maijs";break;case 6:A="Jūnijs";break;case 7:A="Jūlijs";break;case 8:A="Augusts";break;case 9:A="Septembris";break;case 10:A="Oktobris";break;case 11:A="Novembris";break;case 12:A="Decembris";break}return A}function GetJsonDom(F,C){try{var A=encodeURIComponent||escape;if(F.match(/\?/)){F=F+"&c="+A(C)}else{F=F+"?c="+A(C)}var B=document.createElement("script");B.type="text/javascript";document.body.appendChild(B);B.src=F}catch(D){alert(["ErGeJe",D.message])}}function MyRandom(C,B){var A=Math.random();A=A*(B-(C-1));A=Math.floor(A)+C;return A}try{if(document.addEventListener){window.addEventListener("load",MediaOnLoad,false)}else{if(document.attachEvent){window.attachEvent("onload",MediaOnLoad)}else{MediaOnLoad()}}}catch(e){MediaOnLoad()}var media_loaded=false;var media_session=(new Date()).getTime()+""+MediaRandom(1,5500);function MediaOnLoad(){if(media_loaded==false){media_loaded=true;for(var A=0;A<media_place_list.length;A++){MediaShowPlace(media_place_list[A].i)}}}function MediaShowPlace(L){for(var C=0;C<media_place_list.length;C++){if(media_place_list[C].ok&&media_place_list[C].ok==true){continue}if(media_place_list[C].i==L){media_place_list[C].ok=true;var D=MediaGetElem("media_place_"+media_place_list[C].i);if(D!=false&&D!=null){var B=0;try{D.style.display="block";D.style.visibility="visible";D.style.padding="0px";D.style.width=media_place_list[C].w+"px";D.style.height=media_place_list[C].h+"px";D.innerHTML="";B=1;if(media_place_list[C].d==1){B=11;var K="http://www.anymedia.lv/show.php?p="+media_place_list[C].i+"&r="+media_session;D.innerHTML="<iframe style='' src='"+K+"' width='"+media_place_list[C].w+"' height='"+media_place_list[C].h+"' frameborder='0' marginwidth='0'  marginheight='0' scrolling='no' allowTransparency></iframe>"}else{if(media_place_list[C].d==2){B=12;var A=media_place_list[C].w;var J=media_place_list[C].h;var M=media_place_list[C].fd;var H=media_place_list[C].bf;var I="media_place_"+media_place_list[C].i;ScrollBanner(I,"","",A,J,M,H,media_session)}else{if(media_place_list[C].d==3||media_place_list[C].d==4){B=13;var A=media_place_list[C].w;var J=media_place_list[C].h;var M=media_place_list[C].fd;var H=media_place_list[C].bf;var I="media_place_"+media_place_list[C].i;var F=media_place_list[C].d;AM_ShowFixedBottom(I,"","",A,J,M,H,media_session,F)}}}}catch(G){}}}}}function MediaShowScrollingRow(B){var D=media_place_list[B].w;var A=media_place_list[B].h;var C="media_place_"+media_place_list[B].i;ScrollBanner(C,media_place_ban_source,media_place_ban_link,D,A,media_place_fill_date_id)}function MediaGetElem(C){var A=false;try{A=document.getElementById(C)}catch(B){A=false}if(A==null){A=false}return A}function MediaRandom(C,B){var A=Math.random();A=A*(B-(C-1));A=Math.floor(A)+C;return A}function ScrollBanner(L,H,G,R,O,T,C,B){if(T==-1&&C==-1){return }try{var D=document.getElementById(L);if(D==null){return }D.style.height=O+"px";D.style.dispaly="none";D.style.margin="0px";D.style.padding="0px";D.style.left="0px";D.style.overflow="hidden";if(1==1&&navigator.appName=="Microsoft Internet Explorer"&&navigator.userAgent.match(/MSIE [78]\./i)){D.style.display="block";D.style.position="fixed";D.style.bottom="0px";D.style.right="0px";D.style.width=document.body.clientWidth+"px"}else{if(window.attachEvent){window.attachEvent("onscroll",function(){SB_AdjustPosition(D,O)});window.attachEvent("onresize",function(){SB_AdjustPosition(D,O)})}else{window.addEventListener("resize",function(){SB_AdjustPosition(D,O)},1)}SB_AdjustPosition(D,O)}var Q=document.createElement("div");D.appendChild(Q);Q.style.position="absolute";Q.style.left="0px";Q.style.width="3000px";var I=document.createElement("a");Q.appendChild(I);I.href=G;I.target="_blank";I.style.padding="0px";I.style.margin="0px";I.style.left="0px";I.style.position="absolute";var K="";if(T!=-1){K="?fd="+T}if(C!=-1){K="?bf="+C}if(K!=""){var N="http://www.anymedia.lv/show.php";var M=N+K+"&r="+B;var F="<iframe style='' src='"+M+"' width='"+R+"' height='"+O+"'  frameborder='0' marginwidth='0' marginheight='0' scrolling='no' allowTransparency></iframe>";var P=N+K;var J="<iframe style='' src='"+P+"' width='"+R+"' height='"+O+"'  frameborder='0' marginwidth='0' marginheight='0' scrolling='no' allowTransparency></iframe>";I.innerHTML=F+J+J+J;I.innerHTML="";I.style.height=O+"px";I.style.width="3000px";I.style.background="url("+M+") repeat-x 0px 0px";I.href="http://www.anymedia.lv/ban_click.php"+K;var A=new ScrollObject(I,R);A.Start();D.onmouseover=function(){A.Stop()};D.onmouseout=function(){A.Start()}}else{}}catch(S){SB_Debugg("ScrollBanner",S)}}function ScrollObject(B,A){try{var H=null;var C=-1*Math.round(A);this.Start=function(){if(H==null){H=setInterval(function(){G()},50)}};this.Stop=function(){clearInterval(H);H=null};var F=0;function G(){F-=1;if(F<C){F=0}B.style.left=F+"px"}}catch(D){SB_Debugg("ScrollObject",D)}}function SB_AdjustPosition(B,G){try{var A=0;if(!window.innerWidth){var D=document.documentElement.scrollTop+document.documentElement.clientHeight;var C=document.body.scrollTop+document.body.clientHeight;A=(D>0)?D:C;B.style.position="absolute"}else{A=window.innerHeight;B.style.position="fixed"}A-=G;B.style.top=A+"px";B.style.dispaly="block";B.style.width=document.body.clientWidth+"px"}catch(F){SB_Debugg("SB_AdjustPosition",F)}}function SB_AppendBannerImage(C,G,B,A){try{var F=document.createElement("img");C.appendChild(F);F.src=G;F.style.borderWidth="0px";F.style.width=B+"px";F.style.height=A+"px"}catch(D){SB_Debugg("SB_AppendBannerImage",D)}}function SB_Debugg(B,A){}var call_back=new CallbackObject("call_back");function CallbackObject(D){var C=this;var A=new Array();this.GenerateCallbackID=function(){var G=F();while(B(G)){G=F()}return G};function F(){return(new Date()).getTime()+MyRandom(0,1000)}function B(I){var G=false;for(var H=0;H<A.length;H++){if(A[H].id==I){G=true;break}}return G}this.Add=function(G,H){A.push({id:G,fn:H})};this.Call=function(H){for(var G=0;G<A.length;G++){if(A[G].id==H){A[G].fn();A.remove(G);break}}};this.LoadJson=function(H,G){setTimeout(function(){var I=C.GenerateCallbackID();C.Add(I,G);GetJsonDom(H,D+".Call("+I+")")},100)}}function GetJsonDom(D,C){var A=encodeURIComponent||escape;if(D.match(/\?/)){D=D+"&c="+A(C)}else{D=D+"?c="+A(C)}var B=document.createElement("script");B.type="text/javascript";document.body.appendChild(B);B.src=D}function AM_ShowFixedBottom(L,I,H,P,O,S,C,B,D){try{var A=document.getElementById(L);setTimeout(function(){try{A.innerHTML="";A.style.display="none"}catch(T){}},20*1000);if(A==null){return }A.style.width=P+"px";A.style.height=O+"px";A.style.dispaly="none";A.style.backgroundColor="transparent";A.style.margin="0px";A.style.padding="0px";A.style.overflow="hidden";if(D==3){A.style.right="0px"}else{if(D==4){A.style.left="0px"}}var R="";var F=0;var M=/(MSIE|Opera|Firefox|Chrome)(?: |\/)(\d+\.\d)/i;var J=M.exec(navigator.userAgent);if(J!=null){R=J[1];F=J[2]}if((R=="MSIE"&&F>=7)||(R=="Opera"&&F>=9)||(R=="Firefox"&&F>=3)||(R=="Chrome"&&F>=5)){A.style.display="block";A.style.position="fixed";A.style.bottom="0px"}else{if(window.attachEvent){window.attachEvent("onscroll",function(){AM_ShowFixedBottom_AdjustPosition(A,P,O)});window.attachEvent("onresize",function(){AM_ShowFixedBottom_AdjustPosition(A,P,O)})}else{window.addEventListener("resize",function(){AM_ShowFixedBottom_AdjustPosition(A,P,O)},1)}AM_ShowFixedBottom_AdjustPosition(A,P,O)}var K="";if(S!="-1"){K="?fd="+S}else{if(C!="-1"){K="?bf="+C}}if(K!=""){var N="http://www.anymedia.lv/show.php";var I=N+K+"&r="+B+"&h=1";var G="<iframe style='' src='"+I+"' width='"+P+"' height='"+O+"'  frameborder='0' marginwidth='0' marginheight='0' scrolling='no' allowTransparency></iframe>";A.innerHTML=G}}catch(Q){AM_ShowFixedBottom_Debug("AM_ShowFixedBottom",Q)}}function AM_ShowFixedBottom_AdjustPosition(C,B,H){try{var A=0;if(!window.innerWidth){var F=document.documentElement.scrollTop+document.documentElement.clientHeight;var D=document.body.scrollTop+document.body.clientHeight;A=(F>0)?F:D;C.style.position="absolute"}else{A=window.innerHeight;C.style.position="fixed"}A-=H;C.style.top=A+"px";C.style.dispaly="block"}catch(G){AM_ShowFixedBottom_Debug("SB_AdjustPosition",G)}}function AM_ShowFixedBottom_Debug(B,A){};

