// JavaScript Document

var xmlhttp;
function callAHAH(url, pageElement, callMessage) {
	xmlhttp=null;
	if (window.XMLHttpRequest) {// code for all new browsers
		xmlhttp=new XMLHttpRequest();
	} else if (window.ActiveXObject) {// code for IE5 and IE6
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (xmlhttp!=null) {
		xmlhttp.onreadystatechange = function() {responseAHAH(pageElement);};
		xmlhttp.open("GET",url,false);
		xmlhttp.send(null);
	} else {
		alert("Your browser does not support XMLHTTP.");
	}
}

function responseAHAH(pageElement) {
	var output = '';
	if(req.readyState == 4) {
		if(req.status == 200) {
			output = req.responseText;
			document.getElementById(pageElement).innerHTML = output;
		}
	}
}

var getnews = function() { callAHAH('http://www.meltwaternews.com/magenta/xml/html/29/57/78933.html', 'news', 'Loading...'); }
//if (window.attachEvent) window.attachEvent("onload", getnews);

function chooseSearch(){
	if ($(".stype:checked").val() == 1) {
		$("#searchForm").attr("action","search.html");	
	} else {
		$("#searchForm").attr("action","search.asp");
		$("#zoom_query").val($("#keyword").val());
	}
	$("#searchForm").submit();
	return false;
}