function trim(str) {
	str = str.replace(/^\s+/, '');
	for (var i = str.length - 1; i >= 0; i--) {
		if (/\S/.test(str.charAt(i))) {
			str = str.substring(0, i + 1);
			break;
		}
	}
	return str;
}
function popupwin(url, name, height, width) {
	newwindow=window.open(url, name, 'width=' + width + ',height=' + height);
	if (window.focus) {newwindow.focus()}
	return false;
}
function localDate() {
	var now = new Date();
	var day = now.getDate();
	var month = now.getMonth();
	var year = now.getFullYear();
	month++;
	if (month < 10) {month = "0" + month;}
	if (day < 10) {day = "0" + day;}
	return month + "/" + day + "/" + year;
}
function xcollapse(id) { 
	var ccommid = $('#' + id); 
	if(ccommid !== null) {
		ccommid.slideToggle();
	}
}
