
function isEmpty(s)
{
	var whitespace = " \t\n\r";
	var i;
	if((s == null) || (s.length == 0))
		return true;
	// Search string looking for characters that are not whitespace
	for (i = 0; i < s.length; i++)
	{
		var c = s.charAt(i);
		if (whitespace.indexOf(c) == -1)
		return false;
	}
	// At this point all characters are whitespace.
	return true;
}

function isEmptyRegular(s)
{
	if (s == null || s.length == 0)
		return true;

	// The test returns true if there is at least one non-
	// whitespace, meaning the string is not empty. If the
	// test returns true, the string is empty.
	return !/\S/.test(s);
}

function checkspace(str)
{
	for (var i=0;i<str.length;i++)
	{
		var ch=str.substring(i,i+1);
		if (ch!=" ")
			return false;
	}
	return true;
}

//Ë«»÷Êó±ê¹ö¶¯ÆÁÄ»µÄ´úÂë
var currentpos,timer;
function initialize()
{
	timer=setInterval ("scrollwindow ()",30);
}
function sc()
{
	clearInterval(timer);
}
function scrollwindow()
{
	currentpos=document.body.scrollTop;
	window.scroll(0,++currentpos);
	if (currentpos !=document.body.scrollTop)
	sc();
}
document.onmousedown=sc
document.ondblclick=initialize




