function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function LTrim(str){
	if (str==null){return null;}
	for(var i=0;str.charAt(i)==" ";i++);
	return str.substring(i,str.length);
}

function RTrim(str){
	if (str==null){return null;}
	for(var i=str.length-1;str.charAt(i)==" ";i--);
	return str.substring(0,i+1);
}

function Trim(str){return LTrim(RTrim(str));}

function fnAllCheckUncheckGroup(controller) {	
	var theController = controller;
	if (!theController || theController.type!='checkbox') { 
		alert("the controller is invalid object<checkbox>");
		return;
	}
	var formElements = document.getElementsByTagName("input");
	if (formElements.length==0) { 
		alert("the formElements don't has object<input>");
		return;
	}
	
	var theElement = controller.value;
	for (var z=0; z<formElements.length; z++) {		
		var theElem = formElements[z];
		if (theElement == theElem.name.substring(0,3) && theElem != theController) {
			theElem.checked = theController.checked;
		}
	}
}