function doClick(ean,zip){
	if (zip.length == 5){
		addCookie('zip',document.checkAvail.zipcode.value,'365');
		callCheckStoreWebService();
	}else{
		document.getElementById('StoreAvailabilityOutput').innerHTML='<ul><li><span class="red">Please enter a valid 5 digit zip code.</span></li></ul>';
	}
		changeClass(document.getElementById('cs-bg2'), "cs-bg");
	}
      
function callCheckStoreWebService(){
	  	
	if(document.checkAvail.ean.value.length > 0 && document.checkAvail.zipcode.value.length > 0){
	document.getElementById('StoreAvailabilityOutput').innerHTML="";
		 			WebService.initialize({url:'http://storelocator.barnesandnoble.com/webservices/feed/inventory.do?ean='+document.checkAvail.ean.value+'&zipcode='+document.checkAvail.zipcode.value+'&distance=2&appid=bncom&bncallback=webservicecallback',outputNode:document.getElementById('StoreAvailabilityOutput'),StyleSheet:StoreXslStyleSheet,moreLink:'http://search.barnesandnoble.com/booksearch/store.asp?EAN='+document.checkAvail.ean.value+'&distance=2&zipcode='+document.checkAvail.zipcode.value+'&z=y',errorMsg:'<ul><li><span class="red">We did not find any stores in your zip code.</span></li></ul>'});
	}
}