// JavaScript Document

    YAHOO.namespace("example.container");

    function boxscores(show,county) {

	

        var content = document.getElementById(show);
        var button = document.getElementById("close_" + show);
        content.innerHTML = "";
		
     

        // Define the callback object for Connection Manager that will set the body of our content area when the content has loaded



        var callback = {
            success : function(o) {
				var messages = [];

       		// Use the JSON Utility to parse the data returned from the server
        		try {
            		messages = YAHOO.lang.JSON.parse(o.responseText);
        			}
        		catch (x) {
            		alert("JSON Parse failed!");
            		return;
        			}

			var message_text = '';
        	// The returned data was parsed into an array of objects.
        	// Add a P element for each received message
	
			//message_text = '<button id="close_' + show + '" class="x_button">Close Window</button>';
			for (var i = 0, len = messages.length; i < len; ++i) {
           	 	var m = messages[i];
           		message_text = message_text + '<div class="warnings_text">' + m.text + '</div>';
		        }
			
			
                content.innerHTML = message_text;
                content.style.visibility = "visible";
                button.style.visibility = "visible";
				content.style.height = "100%";
				//content.style.overflow = "auto";
 
 
            },
            failure : function(o) {
                content.innerHTML = o.responseText;
                content.style.visibility = "visible";
                button.style.visibility = "visible";
 				content.style.height = "100px";
                content.innerHTML = "CONNECTION FAILED!";
            }
        }
    
        content.style.visibility = "hidden";
        button.style.visibility = "hidden";

        // Connect to our data source and load the data
        var conn = YAHOO.util.Connect.asyncRequest("GET", "/common/localsports_ajax.php?app=weather&data=weather&fips=" + county, callback);
    }
