



$E.onDOMReady(function(){ 


	var url = window.location.href.match(/umwonline\.net\/events/);
	
	/*****************************
***************************************************
    Add Immigration Vigil Event Notice
    -----------------------------------------------------------------------------
    The following script will append a message under the events page group share radio button to let 
    the user know that if they are adding an immigration vigil they should make sure to share 
	it with the immigration group
********************************************************************************/

	if(url == "umwonline.net/events") {
	
		// Create a new DIV element and give it some content
		messageDiv = document.createElement("div");
		messageDiv.style.width = "483px";
		messageDiv.style.position = "relative";
		messageDiv.style.padding = "0px 15px 19px 40px";
		messageDiv.innerHTML = "<div id=\"roundedcornr_box_712816\" style=\"background: #E6E6E6\;\">"
				+ "<div id=\"roundedcornr_top_961745\" style=\"background: url(http://static.sixent.com/content/1/0/85720001/69/roundedcornr_961745_tr.png) no-repeat top right\; width: 100%\; height: 10px\; font-size: 1px\;\">"
				+ "<div style=\"background: url(http://static.sixent.com/content/1/0/85720001/66/roundedcornr_961745_tl.png) no-repeat top left\; width: 100%\; height: 10px\; font-size: 1px\;\"></div>"
				+ "</div>"
				+ "<div style=\"padding: 0px 10px\;\">"
					+ "<div style=\"float:left\; padding: 0px 7px 7px 0px\;\">"
						+ "<img width=50px src=\"http://static.sixent.com/content/1/0/85720001/65/ppt-group-info-icon.png\" />"
					+ "</div>"
					+ "<div id=\"roundedcornr_content_961745\" style=\"padding: 13px 0px; color: red; font-size: 12px; font-weight: bold;\">"
						+ "If you are adding a Public Witness location for May 1st, please remember to share it with the Immigration group. If you aren't a member of this group click <a href=\"http://immigration.umwonline.net/\">HERE</a> to join." 	
					+ "</div>"
				+ "</div>"
				+ "<div id=\"roundedcornr_bottom_961745\" style=\"background: url(http://static.sixent.com/content/1/0/85720001/67/roundedcornr_961745_br.png) no-repeat bottom right\; width: 100%\; height: 10px\; font-size: 1px\;\">"
				+ "<div style=\"background: url(http://static.sixent.com/content/1/0/85720001/68/roundedcornr_961745_bl.png) no-repeat bottom left\; width: 100%\; height: 10px\; font-size: 1px\;\"></div>"
				+ "</div>"
			+ "</div>";
				
									   
		// Add the newly created element and it's content into the DOM
		
		parent_element = $("add_event_form");
		first_child = YAHOO.util.Dom.getFirstChild("add_event_form");
		second_child = YAHOO.util.Dom.getNextSibling(first_child);
		third_child = YAHOO.util.Dom.getNextSibling(second_child);
		fourth_child = YAHOO.util.Dom.getNextSibling(third_child);
		//this insertBefore with a "...nextSibling" works like the missing insertAfter function for javascript
		parent_element.insertBefore(messageDiv, YAHOO.util.Dom.getNextSibling(fourth_child));  	
	
	
	}
	
	// Change the "Browse" tab to "Main"	
	first_element = $("rm-groupMeta");
	//first_child = YAHOO.util.Dom.getFirstChild("add_event_form");
	second_element = YAHOO.util.Dom.getNextSibling(first_element);
	first_child = YAHOO.util.Dom.getFirstChild(second_element);
	second_child = YAHOO.util.Dom.getNextSibling(first_child);
	first_grandchild = YAHOO.util.Dom.getFirstChild(second_child);
	first_greatgrandchild = YAHOO.util.Dom.getFirstChild(first_grandchild);
	first_greatgrandchild.innerHTML = "Main <span></span>";
		
	var url = window.location.href.match(/immigration\.umwonline\.net/);

	if(url == "immigration.umwonline.net") {
	
	
		//Remove top title from google map pod
		first_el = $("yui-gen4");
		first_ch = YAHOO.util.Dom.getFirstChild(first_el);
		first_gch = YAHOO.util.Dom.getFirstChild(first_ch);
		first_ggch = YAHOO.util.Dom.getFirstChild(first_gch);
		first_ggch.style.visibility = "hidden";
		
	
	}
})