// JavaScript Document
aebadgeOVER = new Image();
aebadgeOVER.src = "http://static.ning.com/alternativeenergycom/ds/images/widgets/BN_altnrgComedy_f02.jpg";
// style='height:124px; width:220px; text-align: center;'
document.write("<div id='aebadgediv' style='width:155px; height: 155px; text-align:center;'></div>");

initbadge = "<img id='aebadge' src='http://static.ning.com/alternativeenergycom/ds/images/widgets/BN_altnrgComedy_f01.jpg' width='155' height='155' border='0' \
\
usemap='#m_altnrgbadge' >\
<map name='m_altnrgbadge' id='m_altnrgbadge' onmouseover='aebadgeover();' onmouseout='aebadgeout()' >\
<area shape='rect' coords='0,0,99,178' href='http://alternativeenergy.com/edy' target='_blank' title='Visit AlternativeEnergy.com' alt='Visit AlternativeEnergy.com' />\
<area shape='rect' coords='97,0,153,31' href='javascript:aegetbadge();' title='Put this Badge on Your Site' alt='Put this Badge on Your Site' />"

setupaebadge()





function setupaebadge()
	{
		document.getElementById('aebadgediv').innerHTML = initbadge;
	}

function aebadgeover()
	{
		document.getElementById('aebadge').src = aebadgeOVER.src;
	}

function aebadgeout()
	{
		document.getElementById('aebadge').src = "http://static.ning.com/alternativeenergycom/ds/images/widgets/BN_altnrgComedy_f01.jpg";
	}
	
function aegetbadge()
	{
		newcontents = "<br/><form  style='font-size: 9pt;'>";
		newcontents += "<p>Put Code on Site.  Then <span onclick=\"setupaebadge()\" style='cursor:pointer; text-decoration: underline;' >Return</a></p>";
		newcontents += "<p><textarea id='aecode' cols='20' rows='2' style='font-size: 8pt;'><script src='http://alternativeenergy.com/ds/images/widgets/aecomedybadge.js' type='text/javascript'></script></textarea></p>";
		//newcontents += "<BUTTON onClick='ClipBoard();'>Copy to Clipboard</BUTTON>"
		newcontents += "</form>";
		document.getElementById('aebadgediv').innerHTML = newcontents;
	}
	
function ClipBoard() //not working
	{
	Copied = aecode.createTextRange();
	Copied.execCommand("Copy");
	}