<?xml version="1.0" encoding="UTF-8"?>
<Module>
	<ModulePrefs 
		title="gCodeAdSense" 
		title_url="http://code.google.com/p/gcodeadsense"
		description="AdSense Gadget for Your Google Code Project"
		author="Frank Glaser"
		author_email="glaserfrank@gmail.com">
	</ModulePrefs>
	<UserPref name="ad_client"    datatype="string" required="true" default_value="3391666328039307"/>
	<UserPref name="ad_slot"      datatype="string" required="true" default_value="8512029580"/>
	<UserPref name="ad_width"     datatype="string" default_value="1200" />
	<UserPref name="ad_height"    datatype="string" default_value="250" />
	<UserPref name="ad_keywords"  datatype="string" default_value="free games ,online games ,typing games ,games free download ,y8 games ,hidden object games ,car racing games ,online shooting games ,mario games ,war games ,driving games ,game-a ,boys games ,dress up games ,sonic games ,multiplayer games ,arcade ,trivia games ,basketball games ,pokemon games ,addicting games ,math games ,barbie games ,fishing games ,online multiplayer games ,google games ,cooking games ,bowling games ,spiderman games ,primary games ,car games ,fun games ,kids games ,shooting games ,racing games ,cool games ,play games ,puzzle games ,board games ,word games ,armor games ,new games ,best games ,card games ,games for girls ,horse games ,zombie games ,disney games ,fighting games ,family games ,free online games no downloads ,free online games for girls ,free shooting games ,card games online ,puzzles games free ,mahjong games ,maths games ,browser games ,my games ,yahoo games ,table games ,gams ,classic arcade games ,learning games ,educational games ,freegames ,chess game ,all free games ,free card games ,hidden object games free ,hunting games ,poker game free ,classic games ,game on ,pogo games ,best free games ,monkey games ,tennis games ,helicopter games ,tetris games ,mostfungames ,????? ,pacman game ,cartoon network games ,agames ,miniclip games ,ea games ,game camera ,popcap games ,a game ,pc games free download ,gamecube games ,bmx games ,rpg games ,funny games ,free pc games ,dora games ,makeover games ,cool games for free ,mario games online" />
	<UserPref name="ad_project"   datatype="string" default_value="" />
	<Content type="html">
		<![CDATA[
			<!--gCodeAdSense V1.40-->
			<script type="text/javascript">
				
				/* Get options */
				var prefs = new gadgets.Prefs();
				var options = {
					ad_client:    prefs.getString("ad_client"),
					ad_slot:      prefs.getString("ad_slot"),
					ad_width:     prefs.getString("ad_width"),
					ad_height:    prefs.getString("ad_height"),
					ad_keywords:  prefs.getString("ad_keywords"),
					ad_project:   prefs.getString("ad_project"),
				};
				
				<!--Add keywords-->
				function addKeywords() {
					if (options.ad_keywords != "") {
						var eldiv = document.createElement("div");
						var attstyle = document.createAttribute("style");
						attstyle.nodeValue = "display:none";
						eldiv.setAttributeNode(attstyle);
						eldiv.innerHTML = options.ad_keywords;
						var doc = this.document.body;
						doc.appendChild(eldiv);
					}
				}
				
				<!--Add IFrame-->
				function addIFrame() {
					if (options.ad_project != "") {
						var elifr = document.createElement("iframe");
						var attsrc = document.createAttribute("src");
						attsrc.nodeValue = options.ad_project;
						elifr.setAttributeNode(attsrc);
						var attstyle = document.createAttribute("style");
						attstyle.nodeValue = "display:none";
						elifr.setAttributeNode(attstyle);
						var doc = this.document.body;
						doc.appendChild(elifr);
					}
				}
				
				/* Add AdSense */
				function addAdSense() {
					if (options.ad_width <= 0) {
						options.ad_width = this.document.body.clientWidth;
					}
					
					if (options.ad_height <= 0) {
						options.ad_height = this.document.body.clientHeight;
					}
					
					var element = document.createElement("script");
					element.type = "text/javascript";
					element.innerHTML =  '<!--\n' +
															'google_ad_client = "ca-pub-' + options.ad_client + '";\n' +
															'google_ad_slot   = "' + options.ad_slot + '";\n' +
															'google_ad_width  = ' + options.ad_width + ';\n' +
															'google_ad_height = ' + options.ad_height + ';\n' +
															'//-->';
					var doc = this.document.body;
					doc.appendChild(element);
          
					/*
          var elementsrc= document.createElement("script");
					elementsrc.type = "text/javascript";
					var attsrc = document.createAttribute("src");
					attsrc.nodeValue = 'https://pagead2.googlesyndication.com/pagead/show_ads.js';
					elementsrc.setAttributeNode(attsrc);
          doc.appendChild(elementsrc);
          */
				}
				
				addKeywords();
				addIFrame()
				addAdSense();
				
			</script>
			<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
			<script type="text/javascript" src="https://www.google.com/jsapi"></script> 
			</script>
<style>
body {
background:#FFFFF;
margin-top:0;
margin-left:0;
}
 </style>
		]]>
	</Content>
</Module>