function showEmailBox()
{
	var email =	document.getElementById("emailRow");
	var chk = document.getElementById("chkEmail");
	if(chk.checked == true)
	{
		email.style.display = "inline";
	}
	else
	{
		email.style.display = "none";
	}
	return false;
}

function showConfirm(event)
{
	var msg = "";
	msg += "Proceed to PayPal for purchase, " +
	"please verify that all entered information is correct";
	if(!confirm(msg))
	{
		var IE = document.all?true:false;
		if( IE == false )
		{
			event.preventDefault();
		}
		else
		{
			event.returnValue = false;
		}
	}
}
function ismaxlength(obj,event){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "";
if (obj.getAttribute && obj.value.length>mlength-1)
{
	if(alphanumeric(event.keyCode))
	{
		obj.value = obj.value.substring(0,mlength);
		var IE = document.all?true:false;
		if( IE == false )
		{
			event.preventDefault();
		}
		else
		{
			event.returnValue = false;
		}
		
		//return false;
	}
}
}
function limitMsg(obj)
{
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "";
	if (obj.getAttribute && obj.value.length>mlength)
	{
		obj.value = obj.value.substring(0,mlength);
	}
}

function alphanumeric(hh)
{
	if((hh > 47 && hh<58) || (hh > 64 && hh<91) || (hh > 96 && hh<123) || hh == 32)
	{
	  	return true;
	}
	else	
	{
		 return false;
	}
}
