
function reseter()
{
	var inputs = document.all.tags("INPUT");
	for (var i=0; i < inputs.length; i++)  
	{
		if (inputs[i].type == "text" )
		{
			inputs[i].value="";
		}
		
		if (inputs[i].type == "password")
		{
			inputs[i].value = "";    
		}
		
		if (inputs[i].type == "select-one")
		{
			inputs[i].selectedIndex = 0;
		}     
	}
	
	var textarea = document.all.tags("TEXTAREA");
	
	for (var i = 0; i < textarea.length; i++)
	{
		if (textarea[i].type == "textarea")
		{
			textarea[i].value = "";
		}
	}
	
	var select = document.all.tags("select")
	for (var i = 0; i < select.length; i++)
	{
		if (select[i].type == "select-one")
		{
			select[i].selectedIndex = 0;
		}
	}
	
}

function checkInput(obj)
{
	if(isNaN(obj.value))
	{
		alert('请输入数字！');obj.focus();return false;
	}
	if(obj.value.indexOf("-")>=0)
	{
		alert('请输入数字！');obj.focus();return false;
	}
	if(obj.value.indexOf("+")>=0)
	{
		alert('请输入数字！');obj.focus();return false;
	}
	if(obj.value=='')
	{
	       	alert('请输入数字！');obj.focus();return false;
	}
	return true;
}

function clear(obj)
{
	obj.value = "";
}


