
String.prototype.Trim = function () {
	return this.replace(/(^\s*)|(\s*$)/g, "");
}

function LimitText(field,length){
}

function fclick(obj){
  with(obj){
    style.posTop=event.srcElement.offsetTop	//����͸���ϴ����Y����ģ�ⰴť��Y������
    style.posLeft=event.x-offsetWidth/2		//����͸���ϴ����X���Ϊ�����X���ϵ���������Ŀ��һ��(ȷ�����ʱ�ܵ���͸���ϴ���İ�ť�ؼ�)������ֻ���ṩһ��˼·����ʵ�����Ը�ȷ�Ŀ������X��귶Χ
  }
}
function checkSelect(formname){
	var count = 0;
	var length = 0;
	try{
		 length = document.all(formname).fid.length;
	} catch(e){
		return -1;
	}
	if (isNaN(length))	{
		try{
			if (document.all(formname).fid.checked)	{
				++count;
			}
		}catch(e){}
	}

	for(var i=0;i<document.all(formname).fid.length;i++){
		if(document.all(formname).fid[i].checked)
			count++;
	}
	return count;
}
function isNum(oNum){
if(!oNum) return false;
  var strP=/^\d+(\.\d+)?$/;
  if(!strP.test(oNum)) return false;
  try{
  if(parseFloat(oNum)!=oNum) return false;
  }
  catch(ex)
  {
   return false;
  }
  return true;
}
