var xmlHttp;
var _divid
function showResult(str,_url,divid)
{
_divid = divid
if (str.length==0)
 { 
 document.getElementById(divid).
 innerHTML="";
 document.getElementById(divid).
 style.border="0px";
 return;
 }

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 } 

var url=_url;
url=url+"?q="+str;
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(_divid).
 innerHTML=xmlHttp.responseText;
 document.getElementById(_divid).
 style.border="0";
 } 
}

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 ChangeTotalonDelivery(deliveryprice, totalprice)
{
	deliveryprice = parseFloat (deliveryprice) 
	totalprice = parseFloat(totalprice)
	document.getElementById("basketvalue").
	innerHTML= deliveryprice + totalprice;
}*/


//when key is pressed in the 
$(document).ready(function(){
    
    //called when key is pressed in textbox
	$("#quantity").keypress(function (e)  
	{ 
	  //if the letter is not digit then display error and don't type anything
	  if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57))
	  {
		//display error message
		$("#errmsg").html("Digits Only").show().fadeOut("slow"); 
	    return false;
      }	
	});

  });
  
$(document).ready(function(){
    
    //called when key is pressed in textbox
	$("#numberonshirt").keypress(function (e)  
	{ 
	  //if the letter is not digit then display error and don't type anything
	  if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57))
	  {
		//display error message
		$("#errmsg2").html("Digits Only").show().fadeOut("slow"); 
	    return false;
      }	
	});

  });
  