//Create an iframe that goes to the generate url
function create_iframe()
{
	if(typeof tweet_bgcolor == 'undefined')
		var tweet_bgcolor1 = '';
	else
		var tweet_bgcolor1 = tweet_bgcolor;
	if(typeof tweet_color == 'undefined')
		var tweet_color1 = '';
	else
		var tweet_color1 = tweet_color;
	if(typeof tweet_textarea == 'undefined')
		var tweet_textarea1 = 'F';
	else
		var tweet_textarea1 = tweet_textarea;
	var tweet_div = document.getElementById('tweet_this');
	tweet_div.style.display = 'block';
	//Create the iframe
	var iframe = document.createElement('iframe');
	iframe.style.width = '400px';
	iframe.style.height = '285px';
	iframe.style.border = 'none';
	iframe.setAttribute('id', 'tweet_iframe');
	iframe.setAttribute('border', '0');
	iframe.setAttribute('src', 'http://www.austinhallock.com/tweet_this.php?content='+encodeURIComponent(tweet_content)+'&bgcolor='+encodeURIComponent(tweet_bgcolor1)+'&color='+encodeURIComponent(tweet_color1)+'&textarea='+encodeURIComponent(tweet_textarea1));
	tweet_div.appendChild(iframe);
}
function addEvent(obj, evType, fn)
{ 
	if (obj.addEventListener)
	{ 
		obj.addEventListener(evType, fn, false); 
		return true; 
	} 
	else if (obj.attachEvent)
	{ 
		var r = obj.attachEvent("on"+evType, fn); 
		return r; 
	 } 
	else 
	{ 
		return false; 
	} 
}

addEvent(window, 'load', create_iframe);