/* 
	Copyright 2010 Ronak Patel under the GNU Lesser General Public License
	
	Twitter Widget is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Twitter Widget is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the Lesser GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
* Twitter Widget that streams multiple accounts.
* @website http://ronakpatel.net
* @author Ronak Patel
* @email rspatel@gmail.com
* @version 1.2.3
*
* Instructions for setting up the widget can be found at:
* http://www.ronakpatel.net/2009/04/05/twitter-widget-that-streams-multiple-accounts/
*/

function RPNetGetWidget() {
	var xhr = null;
	if (window.XMLHttpRequest)
		xhr = new XMLHttpRequest();
	else
		xhr = new ActiveXObject('Microsoft.XMLHTTP');

	if (xhr == null)
		return null;
	
	xhr.onreadystatechange = function() {
		if (xhr.readyState == 4) {            
			document.getElementById('rpnetTWContainer').
				innerHTML = xhr.responseText;
		}
	};

	xhr.open('GET', RPNetTwitterAttrs.url, true);
	xhr.send(null);            		
}

RPNetGetWidget();