


	
		
	function showAddBasket(){
	
	
	

		document.getElementById('addBasket').style.top= 400 ;
		document.getElementById('addBasket').style.visibility='visible';
		
		setTimeout('hideAddBasket()',1000);
		}
	function hideAddBasket(){
			document.getElementById('addBasket').style.visibility='hidden';
			}


	function SearchQ() {
		var StringQ;
		if (document.getElementById("SearchQstr").value=="") {
		alert ("Please Enter Sesarch term");
		}
		else {
		StringQ = "./display.asp?q=" + document.getElementById("SearchQstr").value + "&amp;title=Search";
		window.location.href=StringQ;
		
		};
	}
	
	
	
	function Score(productID,Inc,val)
	{
	
	var d ;
	
	if (Inc == 'p'){
	 
	 d=parseInt(val)+1 ;
	
	
	document.getElementById("workFrame").src="../scripts/LogactionV1.asp?score=" + d.toString() + "&ProductID=" + productID;

	 }else{
	
	 d=parseInt(val)-1;
		document.getElementById("workFrame").src="../scripts/LogactionV1.asp?score=" + d.toString() + "&ProductID=" + productID;

	
	 };
	 alert("Thank You for Voting")
	 window.location.reload();
	 }
	
	

	function showBasket(){
	var tm = new Date();
	document.getElementById('basket').style.visibility='visible';
	document.getElementById('basketDisplay').src='../asp/v1/display_order.asp?tm='+tm.getTime();
	
	}
	
	
	function AddBasketold(Bsrc){
	var tm = new Date();
	document.getElementById("workFrame").src=Bsrc+'&tm='+tm.getTime();
	
	}
	
	function AddBasket(Bsrc){
	var tm = new Date();
	document.location=Bsrc+'&tm='+tm.getTime();
	
	}
	
		
	
	function showlnk(Turl){
	window.status=Turl;
	
	}
	
	
	function login(){
	var p;
	
	p=prompt("Enter customer ID","Customer ID");
	
	if ((p !=null)&&(IsNumeric(p))){
	document.getElementById("workFrame").src="../asp/v1/login.asp?Bid="+p ;
			var r=confirm("Show my previous details")
		  if (r==true)
					{
					setTimeout('showBasket()',500);
					 }
 
    }
	
	}
	
	
	function IsNumeric(sText)
{
   var ValidChars = "0123456789";
   var IsNumber=true;
   var Char;
  

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }

