// Requires prototype.js in the scriptaculous directory 
function axCall(myAction, myISBNs) {
	
	var rURL = 'zproxy.asp?a=' + myAction + '&ISBN=' + myISBNs;
	//$("errors").update(rURL); //<div id="errors"></div>
	var AxReq = new Ajax.Request(rURL, {   
	method: 'get',
	onComplete: function(xml) {   
			// These need to be defined as <div>s in the output web page.
			var errMsg = $('error');  
			var mtaLink = $('mtaLink');
			if (xml.responseXML.getElementsByTagName("title").length > 0){
			
				errMsg.update(xml.responseXML.getElementsByTagName("title")[0].childNodes[0].nodeValue);  

			}else{
				var myItem = xml.responseXML.getElementsByTagName("Ref");
				var attlist = myItem.item(0).attributes;
				var att = attlist.getNamedItem("href").value;
				
				//alert(myItem[0].attributes.length);
				mtaLink.update('<a style="text-decoration:none;font-size:80%" href="' + att + '" title="View video clip made by the author. Requires Windows Media Player." ><img src="images/icon_wmp.png" border="0" width="22" height="22"> Watch a video clip of the author talking about this book</a>');
			} 
		}
	});
	
}

// end