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_558978306"><div class="adspot_head"></div><div class="adspot_content"><ul>';var adspot_cgif='';var header_text='';var any='any';adspot_pos(null,Array(Array(any,Array(Array('601000020454',Array(10000,'361000020453','<li><span class="adspot_adhead">Watch Autism Media Channel</span><a href="http://st.blogads.com/601000020454/361000020453/click?d=http%3A%2F%2Fwww.autismmediachannel.com%2F&c=873825262d041511f04de8b3bef6d279" class="adspot_adurl" ><img src="http://i.blogads.com/361000020453/img.jpg?guid=d34f81ac6b7da6d50f4ad748e719ab9c" alt="" title="" longdesc="" height="150" width="133" /></a> <span class="adspot_adtext">Autism Media Channel - Autism Hints and Tips for Children and Adults. Videos about living with Autism, treatment and latest news. Dietary information. Asperger&#8217;s Syndrome.						Our cameras will go where no one else has been beforeWe say it as it is.</span><div class=\'tweet_button_container\'><br><input type=\'button\' value=\'Tweet this!\' onclick="window.open(\'http://st.blogads.com/601000020454_tweet_button/361000020453_tweet_button/click?d=http%3A%2F%2Ftwitter.com%3Fstatus%3DAutism%2520Media%2520Channel%253A%2520http%253A%2F%2Fbit.ly%2FyiRy00%2520%2521&c=e0e6737bc5ac02cf2a9ca6cf24b56cfa\',\'_blank\')"><br><br></div><div class="adspot_adurl"><a href="http://st.blogads.com/601000020454/361000020453/click?d=http%3A%2F%2Fwww.autismmediachannel.com%2F&c=873825262d041511f04de8b3bef6d279" class="adspot_adurl">More from Advertiser Here</a></div></li>')),Array('971000005422',Array(10000,'691000005421','<li><span class="adspot_adhead">Free Shipping on Supplements</span><a href="http://st.blogads.com/971000005422/691000005421/click?d=http%3A%2F%2Fwww.ourkidsasd.com&c=f76934d02dba2116a73632e180052e14" class="adspot_adurl" ><img src="http://i.blogads.com/691000005421/img.jpg?guid=eea2839af09ad766f212d67fe36d65bb" alt="" title="" longdesc="" height="200" width="160" /></a> <span class="adspot_adtext">Free ground shipping on orders over $40 with promo code AOA at checkout.We carry Kirkman, Houston, Thorne, New Beginnings and many other brands.OurkidsASD is the largest supplement retailer for autism and has thousands of satisfied customers.<br />For more info,&nbsp; visit OurKidsASD or call 1-977-918-8831.&nbsp;</span><div class=\'tweet_button_container\'><br><input type=\'button\' value=\'Tweet this!\' onclick="window.open(\'http://st.blogads.com/971000005422_tweet_button/691000005421_tweet_button/click?d=http%3A%2F%2Ftwitter.com%3Fstatus%3DFree%2520Shipping%2520from%2520OurKidsASD%2520on%2520dozens%2520of%2520supplement%2520brands%253A%2520http%253A%2F%2Fbit.ly%2FfhEgz7%2520%2521&c=e0e6737bc5ac02cf2a9ca6cf24b56cfa\',\'_blank\')"><br><br></div><div class="adspot_adurl"><a href="http://st.blogads.com/971000005422/691000005421/click?d=http%3A%2F%2Fwww.ourkidsasd.com&c=f76934d02dba2116a73632e180052e14" class="adspot_adurl">More from Advertiser Here</a></div></li>')),Array('561000008244',Array(10000,'831000008243','<li><span class="adspot_adhead"></span><a href="http://st.blogads.com/561000008244/831000008243/click?d=http%3A%2F%2Fwww.autismfile.com%2Fsubscribe&c=10e94119f9dd69819f0c79ff44cbf488" class="adspot_adurl" ><img src="http://i.blogads.com/831000008243/img.jpg?guid=2cfe00cee27ee013f4d35fa10a3b052e" alt="" title="" longdesc="" height="200" width="160" /></a> <span class="adspot_adtext"><br /></span></li>')),Array('151000012663',Array(10000,'121000012662','<li><span class="adspot_adhead">ASD APRIL SPECIAL EDITION SOON!</span><a href="http://st.blogads.com/151000012663/121000012662/click?d=http%3A%2F%2Fwww.autismone.org%2Fcontent%2Fautism-science-digest-journal-autismone&c=584e5a0da151f64a764c5f4bb727d2a5" class="adspot_adurl" ><img src="http://i.blogads.com/121000012662/img.jpg?guid=91514c13ed13817379e1a7a63eb8e8ce" alt="" title="" longdesc="" height="207" width="160" /></a> <span class="adspot_adtext">Respecting the intelligence of parents. Providing info toward healing children. The&nbsp;150+&nbsp;page&nbsp;April Autism Awareness Month issue is coming soon!&nbsp;<i>Autism Science Digest: </i>THE place for scientists and expert parents to share help&nbsp;and hope.&nbsp;Stores added!&nbsp;Subscribe: <b><u><a href="http://st.blogads.com/151000012663/121000012662/click?d=http%3A%2F%2Fwww.autismone.org%2Fcontent%2Fautism-science-digest-journal-autismone&c=584e5a0da151f64a764c5f4bb727d2a5" class="adspot_adurl">www.autismone.org/content/autism-science-digest-journal-autismone</a></u></b></span><div class="adspot_adurl"><a href="http://st.blogads.com/151000012663/121000012662/click?d=http%3A%2F%2Fwww.autismone.org%2Fcontent%2Fautism-science-digest-journal-autismone&c=584e5a0da151f64a764c5f4bb727d2a5" class="adspot_adurl">More from Advertiser Here</a></div></li>')),Array('631000005428',Array(10000,'521000005427','<li><span class="adspot_adhead">Save $20 on First Rx!</span><a href="http://st.blogads.com/631000005428/521000005427/click?d=http%3A%2F%2Fwww.leesilsby.com&c=2f1cb992dd09f4b39e504c8fdfed4345" class="adspot_adurl" ><img src="http://i.blogads.com/521000005427/img.jpg?guid=23ad1622bb0c49f0646e4e3a84fc5aaf" alt="" title="" longdesc="" height="200" width="160" /></a> <span class="adspot_adtext">Save $20 on your first prescription order at Lee Silsby Compounding Pharmacy (mention code LS20). Many insurance plans accepted. Our ASD Vitamin/Mineral formula and Enhansa may be covered by insurance with a prescription.&nbsp; For more information visit Lee Silsby or call 1-800-918-8831. <br /><br /><br /></span><div class=\'tweet_button_container\'><br><input type=\'button\' value=\'Tweet this!\' onclick="window.open(\'http://st.blogads.com/631000005428_tweet_button/521000005427_tweet_button/click?d=http%3A%2F%2Ftwitter.com%3Fstatus%3DLee%2520Silsby%252C%2520custom%2520compounded%2520supplements%2520and%2520medications%2520for%2520autism%252C%2520menopause%2520and%2520much%2520more%253A%2520http%253A%2F%2Fbit.ly%2FqYb6zX%2520%2521&c=e0e6737bc5ac02cf2a9ca6cf24b56cfa\',\'_blank\')"><br><br></div><div class="adspot_adurl"><a href="http://st.blogads.com/631000005428/521000005427/click?d=http%3A%2F%2Fwww.leesilsby.com&c=2f1cb992dd09f4b39e504c8fdfed4345" class="adspot_adurl">More from Advertiser Here</a></div></li>')),Array('721000015437',Array(10000,'651000015436','<li><span class="adspot_adhead">Heavenly Heat Saunas</span><a href="http://st.blogads.com/721000015437/651000015436/click?d=http%3A%2F%2Fwww.heavenlyheatsaunas.com%2Fautistic_children.htm&c=65ddaa8f5ce0dc830eb606ca1cbc5bf8" class="adspot_adurl" ><img src="http://i.blogads.com/651000015436/img.jpg?guid=28dbb8e39c960a7ca545d562045914a1" alt="" title="" longdesc="" height="108" width="150" /></a> <span class="adspot_adtext">Dr. Rimland and I met in 1980 on the beach in La Jolla, California. My desire to help autistic children began almost 40 years ago and has now come full circle. I am grateful to be able to provide the autism community with the safest &amp; most effective saunas for your children.<br />Bob Morgan, Founder</span><div class="adspot_adurl"><a href="http://st.blogads.com/721000015437/651000015436/click?d=http%3A%2F%2Fwww.heavenlyheatsaunas.com%2Fautistic_children.htm&c=65ddaa8f5ce0dc830eb606ca1cbc5bf8" class="adspot_adurl">More from Advertiser Here</a></div></li>'))))),0);var blog_id = '110898605';
    
    var adspot_558978306_advertise_here_link_variables = [['advertise here','link_name_imp_advertise_here_round20120208','link_name_clicks_advertise_here_round20120208','&link_name_advertise_here'],['your ad here','link_name_imp_your_ad_here_round20120208','link_name_clicks_your_ad_here_round20120208','&link_name_your_here_round20120208'],['buy a blogad','link_name_imp_ad_size_round20120208','link_name_clicks_ad_size_round20120208','&link_name_ad_size_round20120208'],['advertise on Age of Autism','link_name_imp_advertise_on_blog_round20120208','link_name_clicks_advertise_on_blog_round20120208','&link_name_advertise_on_blog_round20120208'],['reach your audience','link_name_imp_reach_audience_round20120208','link_name_clicks_reach_audience_round20120208','&link_name_reach_audience_round20120208'],['click here to advertise','link_name_imp_click_here_round20120208','link_name_clicks_click_here_round20120208','&link_name_click_here_round20120208'],['create your ad in 4 clicks','link_name_imp_4_clicks_round20120208','link_name_clicks_4_clicks_round20120208','&link_name_4_clicks_round20120208'],['advertising made easy','link_name_imp_advertising_easy_round20120208','link_name_clicks_advertising_easy_round20120208','&link_name_advertising_easy_round20120208'],['blogads','link_name_imp_blogads_round20120208','link_name_clicks_blogads_round20120208','&link_name_blogads_round20120208'],['snag this space','link_name_imp_snag_space_round20120208','link_name_clicks_snag_space_round20120208','&link_name_snag_space_round20120208'],['reach Age of Autism readers like you for 25.0/week','link_name_imp_price_round20120208','link_name_clicks_price_round20120208','&link_name_price_round20120208'],['variable','link_name_imp_variable_round20120208','link_name_clicks_variable_round20120208','&link_name_variable_round20120208'],['Advertise on AofA','link_name_imp_control_round20120208','link_name_clicks_control_round20120208','&link_name_control_round20120208'],['reach Age of Autism readers like you','link_name_imp_like_you_round20120208','link_name_clicks_like_you_round20120208','&link_name_like_you_round20120208']];
    adspot_html+='</ul></div><div class="adspot_link"><a id="adspot_link_558978306" href="http://web.blogads.com/advertising/age-of-autism/sidebar/adspotsfolder/ba_adspotsfolder_revision_create_shortcut?persistent_uid=8ad44127898673f336c7afa4dd0e5b1e&persistent_ref=" class="adspot_link" target="_blank">Advertise on AofA</a></div><img style="position:absolute;" src="http://st.blogads.com/558978306/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_newround.min.js?v='+Math.floor(Math.random()*10000)+'"><'+'/script>';document.write(adspot_html);
