defaultStatus="Sushi Kings";

function popup(url,name){
	window.open('popup.html?'+url,name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=650,height=350');
	}

function isNumberString(InString)  {
	if(InString.length==0)
		return (false);
	RefString="1234567890";
	for (Count=0; Count < InString.length; Count++)  {
		TempChar= InString.substring (Count, Count+1);
		if (RefString.indexOf (TempChar, 0)==-1)
			return (false);
	}
	return (true);
}

function trim(strText) {
    while (strText.substring(0,1) == ' ')
        strText = strText.substring(1, strText.length);
    while (strText.substring(strText.length-1,strText.length) == ' ')
        strText = strText.substring(0, strText.length-1);
   return strText;
}

function checkAmount(naam){
	var aantal = eval("document."+naam+".aantal.value");
	var aantal = trim(aantal);
	if ((aantal != "") & (isNumberString(aantal))){
		return true;
	}else if (aantal==""){
		return true;
	}else{
		alert("alleen nummers invullen aub");
		eval("document."+naam+".aantal.value=''");
	return false;
	}
}