<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="National Geographic Photos" title_url="http://www.zinterra.com" directory_title="National Geographic Photos" description="National Geographic Photo of the Day" author="gWidgets" author_email="phillip132@gmail.com" height="807" category="communication" category2="lifestyle" screenshot="http://www.mapyourancestors.com/genealogy-family-tree/photos-plot/1019.png" scrolling="true" thumbnail="http://hosting.gmodules.com/ig/gadgets/file/115288948760256340515/nat_tn.png" >
		<Require feature="dynamic-height" />
		<Require feature="analytics" />
	</ModulePrefs>
	<UserPref name="FSZ" 
		display_name="Font Size" 
		datatype="string" 
		default_value="10" 
		required="true" />
	<UserPref name="MXH" 
		display_name="Max Height" 
		datatype="string" 
		default_value="300" 
		required="true" />
<Content type="html" view="default, home">
<![CDATA[
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6181819858622240";
/* crglst 300x250 */
google_ad_slot = "0332506968";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br>

<div
	id="NatGeoPOD"
	style="
		margin: 0px auto;
		text-align: left;
	">
</div>
<p
	id="theWidth"
	style="
		font-size: 8px;
		font-weight: bold;
		margin: 0 auto;
		text-align: left;
	">
</p>
	<script type="text/javascript">
		var pod = "http://photography.nationalgeographic.com/photography/photo-of-the-day";
		var base = "http://";
		var html = "";
		var htmlp = "";
		var maxHeight = 0;
		
		function getPOD(maxH, fontSize) {
			maxHeight = maxH;
			_gel('theWidth').style.fontSize = fontSize;
			htmlp += '<a href="'+pod+'/archive/" style="font-size: '+fontSize * .75+'px; font-weight: normal; ';
			htmlp += ' text-decoration: none;" target="_blank"></a>  ';
			_IG_FetchContent(pod, function (responseText) {
				if (responseText == "") {
					html += '<a href="'+pod+'" target="_blank">';
					html += '<img id="ngpodimg" src="http://drbeagle.com/google/ngpod/ngpoderror.png" border="0"></a><br />';
					htmlp += 'Gadget Error, check back later'
					_gel('NatGeoPOD').innerHTML = html;
					return;
				} else {
					var c = responseText;
					RegExp.multiline = true;
					var regExp = /images\.nationalgeographic\.com\/wpf\/media\-live\/photos\/[0-9]+\/[0-9]+\/cache\/[a-zA-Z0-9._%\-]+\.jpg/;
					var imgA = regExp.exec(c);
					var imgL = base+imgA[0];
					html += '<a href="'+pod+'" target="_blank">';
					html += '<img id="ngpodimg" src="'+imgL+'" onload="reSize();" border="0"></a><br />';
					_gel('NatGeoPOD').innerHTML = html;
					RegExp.multiline = true;
					var regExpb = /<h2>[a-zA-Z0-9._%\-,\s]+<\/h2>/;
					var info = regExpb.exec(responseText);
					var end = info[0].length - 5;
					htmlp += info[0].substring(4, end);
					htmlp += '  <a target="_blank" href="'+imgL+'" style="font-size:'
						+fontSize * .75+'px; text-decoration: none; font-weight: normal;">'
						+'</a>';
				}
			});
		}
		
		function reSize(){
				var x = _gel('ngpodimg');
	      var p = _gel('theWidth');
				var maxWidth = p.offsetWidth;
				var pWidth = maxWidth/x.width;
				var pHeight = maxHeight/x.height;
				var w = 10;
				var h = 10;
				if(pWidth <= pHeight){
					var w = parseInt(x.width * pWidth);
					var h = parseInt(x.height * pWidth);
				}else{
					var w = parseInt(x.width * pHeight);
					var h = parseInt(x.height * pHeight);
				}
				x.width = w;
				x.height = h;
				_gel('theWidth').innerHTML = htmlp;
				_IG_AdjustIFrameHeight();
		}
		
		_IG_RegisterOnloadHandler(getPOD("__UP_MXH__", "__UP_FSZ__"));
		
		
	</script>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6181819858622240";
/* 336x280 */
google_ad_slot = "5989007924";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
   ]]>
</Content>
</Module>