// private.js

function stockStatus(pkey){
var Code=getTheTaxCode(pkey);
/*
Used here for availability
(as well as tax)
1 Available
2 Limited Availability
3 Out of Stock
*/

// alert("pkey = "+pkey +"\n" +"Code = "+Code);

switch(Code)
	{
	case 1:
		document.write('<b>&nbsp;</b>');
		break;
	case 2:
		document.write('<b>In Stock</b><br>Limited stock buy now');
		break;
	case 3:
		document.write('<b>Out of Stock</b>');
		break;
	default:
		document.write('&nbsp;');
		break;
	}
}


function buyImage(pkey){

var Code=getTheTaxCode(pkey);
/*
Used here for availability
(as well as tax)
1 Available
2 Limited Availability
3 Out of Stock
*/

// alert("pkey = "+pkey +"\n" +"Code = "+Code);

switch(Code)
	{
	case 1:
	case 2:
	case 4: // no vat reg yet!
		var smsg=productData[pkey].ProductName +" in "+productData[pkey].VARSLOT2;
		// var buylink='<a href="#" onClick="buy(window.document.'
		var buylink='<a onClick="buy(window.document.'
			+pkey
			+');" onMouseOver="window.status=\''
			+smsg
			+'\';return(true);" onMouseOut="window.status=\'\';return(true);">'
			+'<img src="buy.gif" width="40" height="15" border="0"></a>';
			// alert(buylink)
		document.write(buylink);
		break;
	case 3:
		document.write('<img SRC="blank.gif" WIDTH="50" height="19" border="0" alt="">');
		break;
	default:
		document.write('&nbsp;');
		break;
	}
}

