function AdClick(tpaID, SchoolID) {
		$.ajax({
			type: "POST",
			contentType: "application/json; charset=utf-8",
			url: "HTTP://www.wissports.net/WSNServices/SiteFunctions.asmx/AdClick",
			data: "{TpaID: " + tpaID + ", SchoolID: " + SchoolID + "}",
			dataType: "json"
		});
	}

var timerId;
var input;



function tableClicked(e) {
	window.alert("clicked");
}

function search(query, ctrl) {
	var contentDiv = $('#' + ctrl).parent().get(0);

	GoogleSuggest(query, contentDiv)
}


	
function GoogleSuggest(q, ctrl) {
	$.ajax({
		type: "POST",
		contentType: "application/json; charset=utf-8",
		url: "HTTP://192.168.0.150/WSNServices/SiteFunctions.asmx/GoogleSearch",
		data: "{q: '" + q + "'}",
		dataType: "json",
		processData: false,
		success: function(xml) {
			CreateTable(xml, ctrl);
		}

		});
//	$.getJSON("HTTP://192.168.0.150/WSNServices/SiteFunctions.asmx/GoogleSearch", {q: q}, function(jsonString) {
//		CreateTable(jsonString, ctrl)
//	});
}

function CreateTable(xml, ctrl) {
	$.each(xml, function(i) {
		document.write(xml(i).title);	
	});
}

//function CreateTable(xml, ctrl) {
//	var root_node = xml.getElementsByTagName('string').item(0)
//	$(ctrl).children("table").remove();
//	$(ctrl).append(root_node.firstChild.data);
//	$(ctrl).onclick = tableClicked;

//}
//	

function GoToSearch(q) {

	window.location = "http://www.wissports.net/search.asp?cx=partner-pub-1864052687105654%3A4vyk7i-lul5&cof=FORID%3A10&ie=ISO-8859-1&sitesearch=&tab=GoogleTab&sa=Search&q=" + q

}

function KeyPress(e)
	{

		
};



