<!--

var xmlHttp;

function getTally(optionv,otherv) {

	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}
	var url="site/ajax_form.php";
	url=url+"?option="+optionv;
	if (otherv != "") {
		url=url+"&other="+otherv;
	}
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
} 

function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		document.getElementById("calculator").innerHTML=xmlHttp.responseText;
	} 
} 

function GetXmlHttpObject() {
	var xmlHttp=null;
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
		// Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	    }
		catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    	}
	}
	return xmlHttp;
}

function checkValue(option,other) {
	var o = option;
	var o2 = "";

//	if ( o == "Magazine" ) {
		getTally(o,o2);
//	} else {
//		getTally(o,o2);
//	}
}

function checkValue2(option,other) {
	var o = option;
	var o2 = other;

	if ( o2 == "Other" ) {
		getTally(o,o2);
	} else {
		getTally(o,o2);
	}
}


//-->