// JavaScript Document



        function getBlogAnnouncementPreventCache() {
            //Look up the node we'll stick the text under.
            var targetNode = dojo.byId("announcements");
			targetNode.innerHTML = "<h2>please wait...fetching latest announcement...please wait</h2>";

            //The parameters to pass to xhrGet, the url, how to handle it, and the callbacks.
            var xhrArgs = {
                url: "/groups/svmug/blog/",
                handleAs: "text",
                preventCache: true,
                load: function(data) {
					targetNode.innerHTML = "<h2>fetching announcements...please wait...fetching announcements</h2>";
					
					var re1 = /\r|\n/g;
					data = data.replace(re1,' ');
					
					
					var re2 = /(<div class="entry">.*Frontpage News.+?)<div class="entry">/ig;
					
					var resultArray = re2.exec(data);
					// if we have a match, write it out, otherwise indicate error
					if (resultArray) {
						targetNode.innerHTML = '<p>Please read the organization information, at the bottom of this page.</p>' + resultArray[0];
					}
					else
					{
						targetNode.innerHTML = "<p>No current announcments were found.</p>";
					}
                },
                error: function(error) {
                    targetNode.innerHTML = "An unexpected error occurred: " + error;
                }
            }

            //Call the asynchronous xhrGet
            var deferred = dojo.xhrGet(xhrArgs);
        }
        dojo.addOnLoad(getBlogAnnouncementPreventCache);