function check_list(the_value,the_form){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
	  if(the_form.elements[i].value==the_value){
	     the_form.elements[i].checked = true;
	  }
	}
}
function disable_all(the_form){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
	  if(the_form.elements[i].type=="checkbox"){
		the_form.elements[i].disabled = true;
	  }
	}
}

function check_all(the_form){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
		the_form.elements[i].checked = true;
	}
}
function enable_all(the_form){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
			the_form.elements[i].disabled = false;
	}
}
function uncheck_all(the_form){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
			the_form.elements[i].checked = false;
	}
}

function select_list(the_value,the_list){
	var option_count = the_list.options.length;

	for (i=0;i<option_count;i++){
		if (the_value==the_list.options[i].value){
			the_list.options[i].selected	= true;
			return true;
		}
	}

	return false;
}

function radio_list(the_value,the_list){
	var name_count = the_list.length;

	for (i=0;i<name_count;i++){
		if (the_value==the_list[i].value){
			the_list[i].checked=true;
			break;
		}
	}
}	

function do_confirm(msg,url){
  if(confirm(msg)){
	window.location.href=url;  
  }
  return false;
}

function is_checked_item(the_form){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
		if ( (the_form.elements[i].type == 'checkbox') && (the_form.elements[i].checked == true) ){
			return true;
		}
	}
	return false;
}
// JavaScript Document
var t_current_id="tab_default";
var i_current_id="item_default";
function ShowItem(t_id,i_id){
	var prev_obj = document.getElementById(i_current_id);
	var obj = document.getElementById(i_id);
	if(prev_obj){
		prev_obj.style.display = "none";
	}
	document.getElementById(t_current_id).className = "tab_unselect";
	if(obj){
		obj.style.display = "block";
		t_current_id = t_id;
		i_current_id = i_id;
	}
	document.getElementById(t_id).className = "tab_select";
}
var current_id="about";
function ShowItemAbout(id){
	var prev_obj = document.getElementById("item_" + current_id);
	var obj = document.getElementById("item_" + id);
	if(prev_obj){
		prev_obj.style.display = "none";
	}
	document.getElementById("about_tab_" + current_id).className = "about_tab_unselect";
	if(obj){
		obj.style.display = "block";
		current_id = id;
	}
	document.getElementById("about_tab_" + id).className = "about_tab_select";
}




