function adspot_pos(cap,ads,column_number){ var atw=Math.floor(Math.random()*10000); var filled = 0; var ordered_ads = Array(); var real_ads = Array(); for (var i=0;i<ads.length;i++){ for (var j=0;j<ads[i].length;j++){ if ((window.console!=undefined) && (pos!=any)){ console.log(ads[i][j]); } if (j==0) var pos = ads[i][j]; else{ if ((ads[i][j].length>1) && (pos!=any)){ while (ads[i][j].length>0){ var adid=Math.floor(Math.random()*ads[i][j].length); if (ads[i][j][adid]!=undefined){ ads[i][j][adid].push(pos); real_ads.push(ads[i][j][adid]); ads[i][j].splice(adid,1); } } } else{ for (var k=0;k<ads[i][j].length;k++){ ads[i][j][k].push(pos); real_ads.push(ads[i][j][k]); } } } } } var i = 0; while(real_ads.length>0){ if (real_ads[i][2]!=any){ var revid=0; for(revid=1;revid<real_ads[i].length;revid++){ if (typeof(real_ads[i][revid])=='object'){ atw-=real_ads[i][revid][0]; if(atw<=0)break; } } if((real_ads[i][revid] == undefined) || (typeof(real_ads[i][revid]) != 'object')){ real_ads.splice(i,1); continue; } ordered_ads.push([real_ads[i][0],real_ads[i][revid][1],real_ads[i][revid][2]]); real_ads.splice(i,1); atw=Math.floor(Math.random()*10000); } else{ break; } } ads = real_ads; var atw=Math.floor(Math.random()*10000); while((ads.length>0)&&((cap==null)||(filled<cap))) { var adid=Math.floor(Math.random()*ads.length); var revid=0; for(revid=1;revid<ads[adid].length;revid++){ if (typeof(ads[adid][revid])=='object'){ atw-=ads[adid][revid][0]; if(atw<=0)break; } } if((ads[adid][revid] == undefined) || (typeof(ads[adid][revid]) != 'object')){ ads.splice(adid,1); continue; } ordered_ads.push([ads[adid][0],ads[adid][revid][1],ads[adid][revid][2]]); if(window.console!=undefined){ console.log('ad#'+adid+':'+revid); }; ads.splice(adid,1); filled++; atw=Math.floor(Math.random()*10000); } if ((column_number!=undefined) && (column_number>1)){ var filled = 0; adspot_html = adspot_html.replace('--==HEADER_MARKER==--', header_text); for (var c=0;c<column_number;c++) { var tags_per_column = parseInt(ordered_ads.length-filled/column_number); if (tags_per_column*column_number<ordered_ads.length){ tags_per_column = tags_per_column+1; } var diff = 0; adspot_html+='<div class="column_container">'; for (var i=0;i<tags_per_column;i++) { if(window.console!=undefined){ console.log('column#'+c+'diff#'+i*diff); }; if (ordered_ads[c+i*diff]!=undefined){ adspot_html = adspot_html.replace('--==HEADER_MARKER==--', header_text); adspot_html+=ordered_ads[c+i*diff][2]; adspot_cgif+=(adspot_cgif.length==0?'?':'&')+ordered_ads[c+i*diff][0]+'='+ordered_ads[c+i*diff][1]; filled++; } diff = column_number; } adspot_html+='</div>'; } } else{ for (var i=0;i<ordered_ads.length;i++) { adspot_html = adspot_html.replace('--==HEADER_MARKER==--', header_text); adspot_html+=ordered_ads[i][2]; adspot_cgif+=(adspot_cgif.length==0?'?':'&')+ordered_ads[i][0]+'='+ordered_ads[i][1]; } } adspot_html = adspot_html.replace('--==HEADER_MARKER==--', '' ); }var adspot_html='<div class="adspot" id="adspot_930388863"><div class="adspot_head">Blogads</div><div class="adspot_content"><ul>';var adspot_cgif='';var header_text='Blogads';var any='any';adspot_pos(null,Array(Array(1,Array(Array('601000011061',Array(10000,'431000011060','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/601000011061/431000011060/click?d=https%3A%2F%2Fwww.facebook.com%2Fpages%2FPub-On-Passyunk-East%2F87119108681&c=076ce6f1b18b73a3deb37a95cd2e7d56" class="adspot_adurl" ><img src="http://i.blogads.com/431000011060/img.jpg?guid=f7a9165709556f87c88e998b896b2b35" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/601000011061/431000011060/click?d=https%3A%2F%2Fwww.facebook.com%2Fpages%2FPub-On-Passyunk-East%2F87119108681&c=076ce6f1b18b73a3deb37a95cd2e7d56" class="adspot_adurl">Read more...</a></div></li>')),Array('541000011048',Array(10000,'461000011047','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/541000011048/461000011047/click?d=http%3A%2F%2Fbit.ly%2FxvdwUC&c=2dcecc20890300cd2f39a4b73c44dc06" class="adspot_adurl" ><img src="http://i.blogads.com/461000011047/img.jpg?guid=1cd8776e0206dbab731e7f1bb964d9db" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/541000011048/461000011047/click?d=http%3A%2F%2Fbit.ly%2FxvdwUC&c=2dcecc20890300cd2f39a4b73c44dc06" class="adspot_adurl">Read more...</a></div></li>')),Array('931000010298',Array(10000,'321000010297','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/931000010298/321000010297/click?d=http%3A%2F%2Fwww.pafa.org%2FMuseum%2FExhibitions%2FUpcoming-Exhibitions%2FHenry-Ossawa-Tanner-Modern-Spirit%2F879%2F&c=d166ba54cd209d3f3f44cdd7260a2b67" class="adspot_adurl" ><img src="http://i.blogads.com/321000010297/img.gif?guid=fac1465d06e75da2a0647e97697c087c" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/931000010298/321000010297/click?d=http%3A%2F%2Fwww.pafa.org%2FMuseum%2FExhibitions%2FUpcoming-Exhibitions%2FHenry-Ossawa-Tanner-Modern-Spirit%2F879%2F&c=d166ba54cd209d3f3f44cdd7260a2b67" class="adspot_adurl">Read more...</a></div></li>')),Array('125034283',Array(10000,'828696939','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/125034283/828696939/click?d=http%3A%2F%2Fwww.milkboyphilly.com%2F&c=f76cada467e76497b3ba909a245a4798" class="adspot_adurl" ><img src="http://i.blogads.com/828696939/img.gif?guid=6952748295ee7ed99be286b62a48ada1" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/125034283/828696939/click?d=http%3A%2F%2Fwww.milkboyphilly.com%2F&c=f76cada467e76497b3ba909a245a4798" class="adspot_adurl">Read more...</a></div></li>')),Array('591000003311',Array(10000,'811000003310','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/591000003311/811000003310/click?d=http%3A%2F%2Fwww.livenation.com%2Fevent%2F0200477ACEE98251&c=3262a449616ffa858eb7b415825bfd66" class="adspot_adurl" ><img src="http://i.blogads.com/811000003310/img.jpg?guid=a6e929847713bb4ec118360ff900e472" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/591000003311/811000003310/click?d=http%3A%2F%2Fwww.livenation.com%2Fevent%2F0200477ACEE98251&c=3262a449616ffa858eb7b415825bfd66" class="adspot_adurl">Read more...</a></div></li>')),Array('611000008631',Array(10000,'371000014762','<li><span class="adspot_adhead">Live at Johnny Brenda\'s</span><a href="http://st.blogads.com/611000008631/371000014762/click?d=http%3A%2F%2Fwww.johnnybrendas.com%2Fevent%2F80141%2F&c=3cc54e08a93ac1ea607e7a269e6fdb11" class="adspot_adurl" ><img src="http://i.blogads.com/371000014762/img.gif?guid=bdd9bf4a92d62df5002b354f20d20d9e" alt="" title="" longdesc="" height="200" width="160" /></a> <span class="adspot_adtext">Click for full show listing!</span><div class=\'tweet_button_container\'><br><input type=\'button\' value=\'Tweet this!\' onclick="window.open(\'http://st.blogads.com/611000008631_tweet_button/371000014762_tweet_button/click?d=http%3A%2F%2Ftwitter.com%3Fstatus%3DHowlin%2520Rain%2520February%25209%2520%2540johnnybrendas%2521%2520http%253A%2F%2Fticketf.ly%2FuUOpjg%2520&c=e0e6737bc5ac02cf2a9ca6cf24b56cfa\',\'_blank\')"><br><br></div></li>')),Array('301000005187',Array(10000,'761000005186','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/301000005187/761000005186/click?d=http%3A%2F%2Fwww.knightarts.org%2F&c=4812acd31bc9ccfd114af7d9fe1e1f8f" class="adspot_adurl" ><img src="http://i.blogads.com/761000005186/img.gif?guid=858d97cd353be0a374e7bae733da62f1" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/301000005187/761000005186/click?d=http%3A%2F%2Fwww.knightarts.org%2F&c=4812acd31bc9ccfd114af7d9fe1e1f8f" class="adspot_adurl">Read more...</a></div></li>')),Array('174020002',Array(10000,'107613648','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/174020002/107613648/click?d=http%3A%2F%2Fwww.livenation.com%2Fevent%2F020047643FD39EF0%3Fartistid%3D779149%26majorcatid%3D10001%26minorcatid%3D60&c=c3067f8c5d620541cc0c14f5dab90eb3" class="adspot_adurl" ><img src="http://i.blogads.com/107613648/img.jpg?guid=e12030e56b71029a0b3eee037e1c265e" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/174020002/107613648/click?d=http%3A%2F%2Fwww.livenation.com%2Fevent%2F020047643FD39EF0%3Fartistid%3D779149%26majorcatid%3D10001%26minorcatid%3D60&c=c3067f8c5d620541cc0c14f5dab90eb3" class="adspot_adurl">Read more...</a></div></li>')),Array('674720291',Array(10000,'990038016','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/674720291/990038016/click?d=http%3A%2F%2Felectricfactory.info%2F&c=dc6b31f5a77b82656ad67d92727850b7" class="adspot_adurl" ><img src="http://i.blogads.com/990038016/img.gif?guid=107d118bc2004540c30cffa9e251a3dd" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/674720291/990038016/click?d=http%3A%2F%2Felectricfactory.info%2F&c=dc6b31f5a77b82656ad67d92727850b7" class="adspot_adurl">Read more...</a></div></li>')),Array('282854612',Array(10000,'218082812','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/282854612/218082812/click?d=http%3A%2F%2Fwww.utphilly.com%2F%3Futm_source%3Dphilebrity%26utm_medium%3Dbanner%26utm_campaign%3Dblog_ad&c=a612465aee66ec709d35becf08bfbf54" class="adspot_adurl" ><img src="http://i.blogads.com/218082812/img.jpg?guid=53d0c3528a1b765d4a938affd97901ba" alt="" title="" longdesc="" height="200" width="150" /></a> <span class="adspot_adtext"></span><div class="adspot_adurl"><a href="http://st.blogads.com/282854612/218082812/click?d=http%3A%2F%2Fwww.utphilly.com%2F%3Futm_source%3Dphilebrity%26utm_medium%3Dbanner%26utm_campaign%3Dblog_ad&c=a612465aee66ec709d35becf08bfbf54" class="adspot_adurl">Read more...</a></div></li>'))))),0);var blog_id = '72342359';
    
    var adspot_930388863_advertise_here_link_variables = [['advertise here','link_name_imp_advertise_here','link_name_clicks_advertise_here','&link_name_advertise_here'],['your ad here','link_name_imp_your_ad_here','link_name_clicks_your_ad_here','&link_name_your_here'],['buy a blogad','link_name_imp_ad_size','link_name_clicks_ad_size','&link_name_ad_size'],['advertise on Philebrity','link_name_imp_advertise_on_blog','link_name_clicks_advertise_on_blog','&link_name_advertise_on_blog'],['reach your audience','link_name_imp_reach_audience','link_name_clicks_reach_audience','&link_name_reach_audience'],['click here to advertise','link_name_imp_click_here','link_name_clicks_click_here','&link_name_click_here'],['create your ad in 4 clicks','link_name_imp_4_clicks','link_name_clicks_4_clicks','&link_name_4_clicks'],['advertising made easy','link_name_imp_advertising_easy','link_name_clicks_advertising_easy','&link_name_advertising_easy'],['blogads','link_name_imp_blogads','link_name_clicks_blogads','&link_name_blogads'],['snag this space','link_name_imp_snag_space','link_name_clicks_snag_space','&link_name_snag_space'],['reach Philebrity readers like you for 112.0/week','link_name_imp_price','link_name_clicks_price','&link_name_price'],['variable','link_name_imp_variable','link_name_clicks_variable','&link_name_variable'],['Advertise here, cheap and easy.','link_name_imp_control','link_name_clicks_control','&link_name_control']];
    adspot_html+='</ul></div><div class="adspot_link"><a id="adspot_link_930388863" href="http://web.blogads.com/advertising/philebrity/center-right-column/adspotsfolder/ba_adspotsfolder_revision_create_shortcut?persistent_uid=84dd3df4366897631531760716795ea0&persistent_ref=" class="adspot_link" target="_blank">Advertise here, cheap and easy.</a></div><img style="position:absolute;" src="http://st.blogads.com/930388863/c.gif'+adspot_cgif+'" height="1" width="1" alt=""/></div>';adspot_html+='<'+'script type="text/javascript" src="http://i.blogads.com/static/js/bucket_test_cookie_setter.min.js?v=2"><'+'/script>';document.write(adspot_html);
