// Settings: Change these values on a per user basis
document.write("<scr"+"ipt src='http://www.lijit.com/files/branding-images/customAds/lijit_serp_ad_utils.js");
document.write ("'><\/scr"+"ipt>");
document.write ('<link rel="stylesheet" type="text/css" href="http://www.lijit.com/res/css/results_ads.css" />');

var lwp_ad_username = "enn";
var lwp_ad_width = "600px";
var lwp_ad_zoneid = "18919";
var lwp_ad_numads = "1";
var lwp_ad_premium = "1";// or 0 for non-premium ad
var lwp_name = "q";
var lwp_method = "regex";
google_afs_client = 'pub-7617474579108946'; // substitute your client ID
google_afs_channel = '5569855875'; // enter your custom channel ID
google_afs_ad = '';


var scriptBegin = '<scr' + 'ipt>';
document.write('<style>');
document.write('#lwp_ad_item{');
document.write('display:none;');
document.write('width:'+lwp_ad_width+';');
document.write(' }');
document.write('<\/style>');
document.write('<div id="lwp_ad_item">');
document.write('<div style="display:inline">');
document.write('<div id="lijit_sl_wide_ad_unit"></div>');
      
function lwp_gup( lwp_name,method )
{
        if (method=="regex")
        {
                lwp_name = lwp_name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
                var lwp_regexS = "[\\?&]"+lwp_name+"=([^&#]*)";
                var lwp_regex = new RegExp( lwp_regexS );
                var lwp_win_results = lwp_regex.exec( window.location.href );
                if( lwp_win_results == null )
                {
                        return "";
                }
                else
                {
                        return lwp_win_results[1];
                }
        }
        else
        {
                var lwp_win_results = window.location.href.split("/").pop();
                if( lwp_win_results.length < 1 )
                {
                        return "";
                }
                else
                {
                        return lwp_win_results;
                }
        }

}

var lwp_kw_term = escape(lwp_gup(lwp_name,lwp_method));
google_afs_query = lwp_kw_term;
if (lwp_kw_term.length > 0){
   var m3_u = (location.protocol=='https:'?'https://ads.qa.lijit.com/alpha/www/delivery/ajs.php':'http://ads.qa.lijit.com/alpha/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="+lwp_ad_zoneid);
        document.write ("&amp;username="+lwp_ad_username);
        document.write ("&amp;lijit_kw=" + lwp_kw_term);
	document.write ("&amp;numAds="+lwp_ad_numads);
	document.write ("&amp;ad_hint=");
	document.write ("&amp;autofire=1");
	document.write ("&amp;premium="+lwp_ad_premium);
        document.write ('&amp;cb=' + m3_r);
        if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
        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://ads.qa.lijit.com/alpha/www/delivery/ck.php?n=ac7a23e0&amp;cb=1223504537" target="_blank"><img src="http://ads.qa.lijit.com/alpha/www/delivery/avw.php?zoneid=16115&amp;cb=1223504537&amp;n=ac7a23e0" border="0"/><\/a><\/noscript>');
        document.write("<scr"+"ipt src='http://www.lijit.com/files/branding-images/customAds/lijit_ads_util.js");
        document.write ("'><\/scr"+"ipt>");
}
document.write('</div></div>');
