// Copyright (c) 2005 trixiedev@gmail.com
// This script is licensed under the MIT license.  See
// http://opensource.org/licenses/mit-license.php for more details.
//
// ==UserScript==
// @name          Hotmail Ad Remover
// @namespace     http://www.bhelpuri.net/GreaseMonkey/HotmailAdRemover
// @description   Remove ads on the Hotmail page
// @include       http://*.hotmail.msn.com/*
// ==/UserScript==

//
// Discussion forum: http://groups.yahoo.com/group/trixieUsers/
//

(function(){
try {
	var tables = 0;
	var nodes = document.body.childNodes;
	for(var i = 0; i < nodes.length; ++i)
	{
		if(nodes[i].tagName == 'TABLE')
		{
			++tables;
		}

		// Top ad
		if(2 == tables)
		{
			document.body.removeChild(nodes[i]);
		}
		
		// Right ad
		if(8 == tables)
		{
			var rows = nodes[i].getElementsByTagName('tr');
			rows[0].removeChild(rows[0].childNodes[2]);
			break;
		}
	}
} 
catch(e) {}
})();
