document.write('<div style="clear:both"></div>');

// The 'bhadzone' variable is set in the page itself. It designates what zone (type of ad) to display. We use this to select what openx zone to display.

openx_zoneid = '22';  // - dont need this line - this is 'ros'
if (bhadzone == 'baby') 		openx_zoneid = '23'; 
if (bhadzone == 'pregnancy' || bhadzone == 'conception' || bhadzone == 'Preconception_home' || bhadzone == 'Preg_home')  	openx_zoneid = '24'; 
if (bhadzone == 'toddler')  	openx_zoneid = '25'; 


<!--/* OpenX Javascript Tag v2.6.1 */-->

<!--//<![CDATA[
   var m3_u = (location.protocol=='https:'?'https://www.bubhub.com.au/ads/www/delivery/ajs.php':'http://www.bubhub.com.au/ads/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid=" + openx_zoneid + "&amp;target=_blank");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
//]]>-->
document.write ("<noscript><a href='http://www.bubhub.com.au/ads/www/delivery/ck.php?n=" + randomstring(8) + "&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.bubhub.com.au/ads/www/delivery/avw.php?zoneid=" + openx_zoneid + "&amp;n=" + randomstring(8) + "' border='0' alt='' /></a></noscript>");


// random string function --------------
 function randomstring(L){
    var s= '';
    var randomchar=function(){
        var n= Math.floor(Math.random()*62);
        if(n<10) return n; //1-10
        if(n<36) return String.fromCharCode(n+55); //A-Z
        return String.fromCharCode(n+61); //a-z
    }
    while(s.length< L) s+= randomchar();
    return s;
}

document.write('');
