/* HTML controls */
function get_selected_value_by_object(source) {
	if (source == null) { return ""; }
	try {
		var _rtn = source.options[source.selectedIndex].value;
		return _rtn;
	} catch (e){
		return "";
	}	
}

function get_selected_value_by_id(obj_id) {
	return get_selected_value_by_object($(obj_id));
}

/* lightwindow */
function show_image_lightwindow(lwObj, src) {
	try {
		myLightWindow.activateWindow({
			href: src,
			type: 'image',
			loadingAnimation: false}
		);
	} catch(e) {
		alert("Your browser doesn't support preview dialog, please use Firefox 2.x, Safari 3.x or Opera 9.x or above.\n\nPlease also check your internet connection.");
	}
}