if(typeof SD=="undefined"||!SD)var SD={};SD.config={dr:{source:"Smart588"},hosthash:"4f1995404ad5",stop:false,statichost:"http://ad.sitemaji.com/",sitename:"smart588"};
(function(){SD.util=SD.util||{};S=SD.util;SD.util.Dom={_reClassNameCache:{},_getClassRegEx:function(a){var b=S.Dom._reClassNameCache[a];b||(b=RegExp("(?:^|\\s+)"+a+"(?:\\s+|$)"),S.Dom._reClassNameCache[a]=b);return b},getElementsByClassName:function(a,b,c,d){for(var e=[],b=(c||document).getElementsByTagName(b||"*"),a=S.Dom._getClassRegEx(a),c=0,g=b.length;c<g;c++)a.test(b[c].className)&&(e[e.length]=b[c],d&&d.call(b[c],b[c]));return e},getAncestorByTagName:function(a,b){for(;a=a.parentNode;)if(a.tagName.toLowerCase()==
b)return a;return null}};SD.util.Event={getTarget:function(a){return this.resolveTextNode(a.target||a.srcElement)},resolveTextNode:function(a){try{if(a&&3==a.nodeType)return a.parentNode}catch(b){}return a},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=false}}})();
(function(){SD.util.createEl={get:function(a,b,c){var a=document.createElement(a),d;for(d in b)a[d]=b[d];if(c)a.innerHTML=c;this.append(a);return a},append:function(a){(document.getElementsByTagName("head")[0]||document.body).appendChild(a)},remove:function(a){setTimeout(function(){a.parentNode.removeChild(a);a=null},0)},js:function(a,b){var c=this.get("script",{src:a,type:"text/javascript"},null);b&&c.setAttribute("charset",b);return c},css:function(a,b){b||(b="all");return this.get("link",{href:a,
rel:"stylesheet",type:"text/css",media:b},null,"head")}}})();
(function(){var a=SD.util.Dom.getElementsByClassName("sitemajidr");SD.ysm={drHTML:function(a,c,d){return"<IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH="+c+" HEIGHT="+d+' SRC="http://ad.yieldmanager.com/st?ad_type=iframe&ad_size='+c+"x"+d+"&entity=376336&site_code="+a+"&section_code="+a+"&ytwpartcode="+a+'"></IFRAME><IFRAME STYLE="border:0px;width:0px;height:0px;" SRC="http://ad.yieldmanager.com/pixel?id='+SD.config.dr.pixel+'&t=2"></IFRAME>'},swfHTML:function(a,c,d){return sHtml=
'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+c+'" height="'+d+'" id="sitemajisystem"><param name="movie" value="'+decodeURIComponent(a)+'"><param name="allowScriptAccess" value="always"><embed src="'+decodeURIComponent(a)+'" width="'+c+'" height="'+d+'" allowscriptaccess="always"></embed></object>'},getSitemajiad:function(b){for(var c=0,d=a.length;c<d;c++){var e="",g="",h=a[c],e=h.getAttribute("model")?h.getAttribute("model"):"300x250";sSize="s"+e;var f=e.split("x"),g=f[0]?
f[0]:"300",f=f[1]?f[1]:"250";if(b[sSize].ad_size==e)b[sSize].ad_list[0].ad_type!==""?(e=b[sSize].ad_list[0].ad_type,g=e=="img"?'<a href="'+decodeURIComponent(b[sSize].ad_list[0].ad_url)+'" target="_blank"><img style="margin:0 auto;display:block;width:'+g+"px;height:"+f+'px;" src="'+decodeURIComponent(b[sSize].ad_list[0].ad_img)+'"></a>':SD.ysm.swfHTML(decodeURIComponent(b[sSize].ad_list[0].ad_img),g,f),h.innerHTML=g,b[sSize].ad_list.shift()):h.innerHTML=SD.ysm.drHTML(SD.config.dr.source,g,f)}},percent:function(b){var c=
{"300x250":1,"728x90":2,"300x100":3,"240x400":4,"120x120":5,"160x600":6,"425x300":7,"425x600":8,"234x60":9,"120x600":10},d={};if(Math.floor(Math.random()*101)<b){for(var e="",b=0,g=a.length;b<g;b++){var h=a[b],f=h.getAttribute("model")?h.getAttribute("model"):"300x250";d[c[f]]=d[c[f]]==void 0?1:d[c[f]]+1}for(var i in d)e=e+i+"x"+d[i]+",";e=e.replace(RegExp("[,]+$","g"),"");SD.util.createEl.js("http://rd.sitemaji.com/ask.php?size="+e+"&hosthash="+SD.config.hosthash+"&callback=SD.ysm.getSitemajiad")}else{b=
0;for(g=a.length;b<g;b++){h=a[b];c=h.innerHTML;try{e=c.replace(/^\s+|\s+$/g,"")}catch(j){e=c}if(e=="")f=h.getAttribute("model")?h.getAttribute("model"):"300x250",c=f.split("x"),h.innerHTML=SD.ysm.drHTML(SD.config.dr.source,c[0]?c[0]:"300",c[1]?c[1]:"250")}SD.ysm.pixel()}},pixel:function(){if(a[0])dPixel=document.createElement("span"),dPixel.innerHTML='<IFRAME STYLE="border:0px;width:0px;height:0px;" SRC="http://ad.yieldmanager.com/pixel?id=1083068&t=2"></IFRAME>',document.body.appendChild(dPixel)},
drgen:function(){a[0]&&SD.util.createEl.js("http://ad.sitemaji.com/adpercent/sitemajipercent")}}})();(function(){SD.util.Dom.getElementsByClassName("sitemajidr")[0]&&SD.ysm.drgen()})();

