/*  */
function change_view_page(dform,mdmitem,mdditem,mtype) {
	var bg_active = '#838383';
	var bg_deactive = '#EEEEEE';
	var text_active = '#FFFFFF';
	var text_deactive = '#AAAAAA';
	if ($('#detail_items_'+mtype).length > 0 &&
		$(dform+' .'+mdmitem+'_all_dtdiv').length > 0 &&
		($(dform+' .'+mdmitem+'_all_dtdiv').attr('inum'))) {
		var inum = parseInt($(dform+' .'+mdmitem+'_all_dtdiv').attr('inum')),
			ival = $('#detail_items_'+mtype).val(), iary = [];
		if (ival.match(/,/g)) iary = ival.split(','); else iary[0] = ival;
		for (var i=0; i < inum; i++) {
			if (i == (inum-1)) iary[i] = mdditem;
			else if (!iary[i]) iary[i] = '';
		}
		$('#detail_items_'+mtype).val(iary.join(','));
	}
	$(dform+' .'+mdmitem+'_all_dlitab').css('background-color', bg_deactive);
	$(dform+' .'+mdmitem+'_all_dlitab a').css('color', text_deactive);
	$(dform+' #tab_'+mdditem).css('background-color', bg_active);
	$(dform+' #tab_'+mdditem+' a').css('color', text_active);
	$(dform+' .'+mdmitem+'_all_ddiv').hide();
	if ($(dform+' #detail_'+mdditem).length > 0) {
		$(dform+' #detail_'+mdditem).show();
	}
	if ($('#content').height() <= 550){
		$('#page_body').height(585);
	}else{
		$('#page_body').height($('#content').height() + 35);
	}
}