function sleep(ms)
	{
		var dt = new Date();
		dt.setTime(dt.getTime() + ms);
		while (new Date().getTime() < dt.getTime());
	}

function isInt(x) {
	   var y=parseInt(x);
	   if (isNaN(y)) return false;
	   return x==y && x.toString()==y.toString();
	 } 
