try { AFD_Referrer = encodeURIComponent(top.location.href);} catch (ex) { AFD_Referrer = encodeURIComponent(document.referrer);}
if ( AFD_Referrer == 'undefined' ) {AFD_Referrer = encodeURIComponent(document.referrer);}
if ( !AFD_Referrer ) AFD_Referrer = encodeURIComponent(document.referrer);
var preview = String(window.location.href).match(/#afdpreview=(.+)/);
if (preview) { var mode = '&preview=true';} else {var mode = '';}
if(typeof ad_text_color !="string") var ad_text_color = '000000';
if(typeof ad_border_color !="string") var ad_border_color = '';
if(typeof ad_background_color !="string") var ad_background_color = 'ffffff';
if(typeof ad_title_color !="string") var ad_title_color = '6B2323';
if(typeof ad_url_color !="string") var ad_url_color = '6B2323';
if(typeof affd_styler !="string") var affd_styler = '';
if(typeof ad_ct !="string") var ad_ct = '';
var ad_r = Math.floor(Math.random()*99999999999);
var cap_frame='<IFRAME border="0" vspace="0" hspace="0" width="' + ad_width + '" height="' + ad_height + '" marginWidth="0" marginHeight="0" frameBorder="no" scrolling="no" src="http://'+AFD_HOST+'/affads.php?cb='+ad_r+'&zoneid='+ad_zone_id+'&kw=' + ad_keyword + '&sr=' + ad_source + '&at=' + ad_type + '&as=' + ad_style + '&bo=' + ad_border_color + '&bg=' + ad_background_color + '&ti=' + ad_title_color + '&te=' + ad_text_color + '&ur='+ad_url_color+'&ty='+ad_type+'&tid='+ad_theme_id+mode+'&ct='+escape(ad_ct)+ '&st='+escape(affd_styler)+ '&ref=' + AFD_Referrer +'"></IFRAME>';
document.write(cap_frame);
