// genereal js

function checkNotEmpty(id){
	var this_item = document.getElementById(id);
	if((this_item.value == '') || (this_item.value == 'Search')){
		return false;
	}
	return true;
}

function toggleCollapse(id){
	var toggleThis = document.getElementById(id);
	var thisClass = toggleThis.className;
	var closedPos = thisClass.indexOf('closed');
	var openPos = thisClass.indexOf('open');
	if(closedPos >= 0){
		toggleThis.className = thisClass.substring(0, closedPos) + 'open';
	} else if(openPos >= 0){
		toggleThis.className = thisClass.substring(0, openPos) + 'closed';
	} else {
		return;
	}
}