// input form onclick event function
function OnEnter(field) {
	if(field.value == field.defaultValue ){
		field.value = "";
	}
}
// input form onblur event function
function OnExit(field) {
	if(field.value == ""){
		field.value = field.defaultValue;
	}
}

function sf_checkOnOff(theForm, chkBox, elmBox) {
	var checkBox = chkBox;
	var elements = theForm.elements[elmBox];
	var elements_count = elements.length;

	if(elements_count){
		if (checkBox.checked == true) {
			for(var i=0; i<elements_count; i++){
				elements[i].checked = true;
			}
		} else {
			for(var i=0; i<elements_count; i++){
				elements[i].checked = false;
			}
		}
	}
}

function sf_showPageMoveForm(mark){
	$('pageMoveForm').show();
	$('pageMoveForm').style.left = mark.offsetLeft + 'px';
	//$('pageMoveForm').style.top  = mark.offsetTop + 'px';
}

function sf_toggleEditor(type, obj, epath, eheight, defaultToolbar) {
	if (!defaultToolbar) {
		defaultToolbar = "Default";
	}
	if (type==3) {
		if (document.getElementById('div_'+obj).firstChild.nodeName == 'TEXTAREA') {

			if (eheight<300) {
				eheight = 300;
			}

			$(function(){
				$('#wrap_'+obj).css('padding', 0);
				$.fck.path = epath;
				$('#'+obj).fck({toolbar: defaultToolbar, height: eheight });
			});
		}
	} else {
		if (document.getElementById('div_'+obj).firstChild.nodeName != 'TEXTAREA') {
			var oEditor = FCKeditorAPI.GetInstance(obj) ;
			var cont = oEditor.GetHTML();

			$('#wrap_'+obj).css('padding', '5px');

			if (type<2 && cont){
				cont = br2nl(cont);
				cont = strip_tags(cont);
			}

			$('#div_'+obj).html("<textarea name='"+obj+"' id='"+obj+"' style='height: "+eheight+"px; width: 100%;' class='editorTextarea'>"+cont+"</textarea>");
		}
	}
}

function sf_sendmemo() {
	alert('Wait!');
}

function sf_sendmail(mail) {
	var url = '?iKey=sendmail';
	if (mail) {
		url += "&mail="+mail;
	}
	window.open(url, 'SendMail',
		'toolbar=no, location=(20,20), directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=700, height=600'
	);
}

function sf_profile(uid) {
	if (typeof memberDB =='undefined') {
		var url = '?iKey=profile&no_header=1&mid=' + uid;
	} else {
		var url = '?db='+ memberDB +'&actKey=profile&no_header=1&mid=' + uid;
	}

	window.open(url, 'Profile',
		'toolbar=no, location=(20,20), directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=500'
	);
}

function sf_view_stationery(sty, url_core) {
	var url = url_core + 'library/sendmail.stationery/' + sty;
	window.open(url, 'ViewStationary',
		'toolbar=no, location=(20,20), directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=160'
	);
}

function sf_check_id(idField, idValue) {
	var url = '?iKey=checkid&idField='+idField+'&idValue='+idValue;
	window.open(url, 'CheckIdWindow',
		'toolbar=no, location=(20,20), directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=200, height=240'
	);
}

function sf_showHideDiv(clsname, objname, curid, bhv) {

	jQuery.each(jQuery.browser, function(i) {
	  if($.browser.msie){
		bhv = 'noeffect';
	  }
	});

	$(document).ready(function() {
		var divs = $(clsname);
		idArray = new Array();
		var s = 0;

		for (x=0; x<divs.length; x++) {
			if (!empty(divs[x].id)) {
				idArray[s] = divs[x].id;
				s++;
			}
		}

		if (curid=="showall") {
			for (var i=0; i<idArray.length; i++) {
				if (bhv=='noeffect') $("#"+idArray[i]).show();
				else $("#"+idArray[i]).slideDown("fast");
			}
		} else if (curid=="hideall") {
			for (var i=0; i<idArray.length; i++) {
				if (bhv=='noeffect') $("#"+idArray[i]).hide();
				else $("#"+idArray[i]).slideUp("fast");
			}
		} else if ($("#"+objname+curid).is(":hidden")) {
			for (var i=0; i<idArray.length; i++) {
				if (idArray[i]==objname+curid) {
					if (bhv=='noeffect') $("#"+idArray[i]).show();
					else $("#"+idArray[i]).slideDown("fast");
				} else {
					if (bhv=='noeffect') $("#"+idArray[i]).hide();
					else $("#"+idArray[i]).slideUp("fast");
				}
			}

		} else {
			if (bhv=='noeffect') $("#"+objname+curid).hide();
			else $("#"+objname+curid).slideUp("fast");
		}

	});
}

function sf_editChoiceForm(var_uid, varDB, targetDiv, v_key, v_name, v_curval, func) {
	var url = '?db='+varDB+'&actKey=edit&var_uid='+var_uid+'&hide_header=1&targetDiv='+targetDiv+'&v_key='+v_key+'&v_name='+v_name+'&v_curval='+v_curval+'&func='+func;
	window.open(url, 'varEditWindow',
		'toolbar=no, location=(20,20), directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=600, height=500'
	);
}


function sf_open_window(url, width, height, winId) {
	if (!winId)
	{
		winId = 'openWindow';
	}
	if (!width) {
		width = 600;
	}
	if (!height) {
		height = 400
	}
	window.open(url, winId,
		'toolbar=no, location=(20,20), directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width='+ width +', height='+ height +''
	);
}

function sf_mm_extmenu(rand) {
	var mm = $('#'+rand);

	if (mm.is(":hidden")) {
		mm.fadeIn('fast');

		mm.bind("mouseleave",function(){
			mm.fadeOut('fast');
		});

		setTimeout('sf_mm_extmenuHide('+rand+')', 2000);

	} else {
		mm.fadeOut('fast');
	}

}

function sf_mm_extmenuHide(rand) {
	var mm = $('#'+rand);
	mm.fadeOut('fast');
}

function sf_toggleObj(objectId) {
	if ( $("#"+objectId).is(":hidden") || $("#"+objectId).css("display")=="none" ) {
		$("#"+objectId).show();
	} else {
		$("#"+objectId).hide();
	}
}

// calculate typing start time
function sf_start_type(editorobj) {
	var eurl = '?iKey=set.starttime&obj='+editorobj;
	$.ajax({
		type: 'get',
		url: eurl,
		success: function(result) {
		}
	});
}

function sf_ajax_action(key, target, action) {

	if ($("#"+target).length>0) {
		$('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
	}

	var k = key.split(":");
	var eurl = "?" + k[0];
	eurl += "=" + k[1];
	eurl += "&";
	eurl += "hash";
	eurl += "=";
	eurl += HASH;

	if (action) {
		var a = action.split(":");
		eurl += "&";
		eurl += a[0];
		eurl += "=";
		eurl += a[1];
		if (a[2]) {
			eurl += "&";
			eurl += "op";
			eurl += "=";
			eurl += a[2];
		}
	}

	eurl += "&";
	eurl += "no_header";
	eurl += "=";
	eurl += "1";

	$.ajax({
		type: 'get',
		url: eurl,
		beforeSend: function() {
			if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
		},
		success: function(result) {
			if ($("#"+target).length>0) {
				//if ($('#'+target).is(":hidden")) {
					$('#'+target).show();
					$('#'+target).html(result);
				//} else {
				//	$('#'+target).hide();
				//}
			}
		}
	});
}

function sf_ajax(key, target, move) {
	var k = key.replace(/;/g, "&");
	var eurl = "?" + k;
	eurl += "&";
	eurl += "no_header";
	eurl += "=";
	eurl += "1";
	eurl += "&";
	eurl += "hash";
	eurl += "=";
	eurl += HASH;

	if (move) {
		murl = target;
		target = false;
	}

	if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");

	$.ajax({
		type: 'get',
		url: eurl,
		beforeSend: function() {
			if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
		},
		success: function(result) {
			if ($("#"+target).length>0) {
				$('#'+target).show();
				$('#'+target).empty().html('<img src="/core/resources/images/loading.gif" />');
				$('#'+target).html(result);
			}

			if (move) {
				location.reload(true);
			}
		}
	});
}

function sf_ajax_toggle(key, target) {
	if ($('#'+target).is(":hidden"))	{
		var k = key.replace(/;/g, "&");
		var eurl = "?" + k;
		eurl += "&";
		eurl += "no_header";
		eurl += "=";
		eurl += "1";
		eurl += "&";
		eurl += "hash";
		eurl += "=";
		eurl += HASH;

		//$('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");

		$.ajax({
			type: 'get',
			url: eurl,
			beforeSend: function() {
				if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
			},
			success: function(result) {
				$('#'+target).show();
				$('#'+target).html(result);
			}
		});

	} else {
		$('#'+target).hide();
	}
}

function sf_ajax_simple_toggle(url, target) {
	var eurl = url + "&no_header=1";

	if ($("#"+target).length>0) {
		if ($("#"+target).is(":hidden")) {
			$.ajax({
				type: 'get',
				url: eurl,
				beforeSend: function() {
					if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
				},
				success: function(result) {
					$("#"+target).html(result);
					$("#"+target).show();
				}
			});
		} else {
			$("#"+target).hide();
		}
	}
}

function sf_ajax_remove(url, target){
	var eurl = url + "&no_header=1";
	var msg = "정말 삭제하시겠습니까?";

	if (confirm(msg)){
		$.ajax({
			type: 'get',
			url: eurl,
			beforeSend: function() {
				if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
			},
			success: function(result) {
				if ($("#"+target).length>0) $("#"+target).remove();
			}
		});
	}
}

function sf_get_simple_toggle(url, target, btnId, showText, hideText, actionType) {
	var eurl = url + "&no_header=1";

	if ($("#"+target).length>0) {
		if ($("#"+target).is(":hidden")) {
			$.ajax({
				type: 'get',
				url: eurl,
				beforeSend: function() {
					if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
				},
				success: function(result) {
					$("#"+target).html(result);
					if (actionType=='upDown') $("#"+target).slideDown("fast");
					else $("#"+target).show();
					$("#"+btnId).html(hideText);
				}
			});
		} else {
			if (actionType=='upDown') $("#"+target).slideUp("fast");
			else $("#"+target).hide();
			$("#"+btnId).html(showText);
		}
	}
}

function sf_post(theForm, target) {
	//if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");

	//alert(theForm.name);

	$.ajax({
		type: 'POST',
		url: $(theForm).attr('action'),
		enctype: 'multipart/form-data',
		data: $(theForm).serialize(),
		beforeSend: function() {
			if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
		},
		success: function(result) {
			if ($("#"+target).length>0) {
				$('#'+target).show();
				$('#'+target).html(result);
			}
		}
	});
/*
	$(theForm).bind('submit',function(){
		$theForm = $(this);
			$.post($theForm.attr('action'), $theForm.serialize(), function(responseText){
				$('#'+target).show();
				$('#'+target).html(responseText);
			});
		return false;
	});
*/
}

function sf_goMenu(db) {
	location.href = '?db='+db;
}

function sf_get_simple(url, target, append, confirmMsg) {
	var eurl = url + "&no_header=1";
	var proceed = true;
	if (confirmMsg)
	{
		var proceed = confirm(confirmMsg);
	}

	if (proceed)
	{
		$.ajax({
			type: 'get',
			url: eurl,
			beforeSend: function() {
				if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
			},
			success: function(result) {
				if ($("#"+target).length>0)
				{
					if (append) $("#"+target).append(result);
					else $("#"+target).html(result);
					$("#"+target).show();
				}
			}
		});
	}
}

function sf_submitForm(e, myform) {
	evt = e || window.event;
	var keyPressed = evt.which || evt.keyCode;
	if (keyPressed==13) {
		myform.submit();
		return false;
	}
}

function sf_getVarChild(url, target) {
	var eurl = url + "&no_header=1";
	$.ajax({
		type: 'get',
		url: eurl,
		beforeSend: function() {
			if ($("#"+target).length>0) $('#'+target).html("<p style='text-align: center;'><img src='core/resources/images/loading.gif' /></p>");
		},
		success: function(result) {
			$("#"+target).html(result);
		}
	});
}

function sf_confirm(url, msg) {
	if (confirm(msg)){
		location.href = url;
	}
}

function sf_confirm_and_close(url, msg) {
	if (confirm(msg)){
		location.href = url;
		window.close();
	}
}

function sf_str_length(string) {

	char_cnt = 0;
	for(var i = 0; i < string.length; i++)     {

		var chr = string.substr(i,1);
		chr = escape(chr);
		key_eg = chr.charAt(1);
		// key_eg 가 u 이면 한글 , 공백이면 영문 , 숫자면 특수문자

		switch (key_eg) {
			case "u":
				key_num = chr.substr(2,(chr.length-1));
				if((key_num < "AC00") || (key_num > "D7A3")) {
					//alert("잘못된 입력입니다");
					return false;
				} else {
					char_cnt = char_cnt + 2;
				}
				break;
			case "B":
				char_cnt = char_cnt + 2;
				break;
			case "A":
				//alert("잘못된 입력입니다");
				return false;
				break;
			default:
				char_cnt = char_cnt + 1;
		}
	}

	return char_cnt;

}

window.GET = function(){
    var array = window.location.search.substring(1).split(/&;/);
    window._GET = {};
    for(var i = 0; i < array.length; i++){
        var assign = array[i].indexOf('=');
        if(assign == -1){
            _GET[array[i]] = true;
        }else{
            _GET[array[i].substring(0, assign)] = array[i].substring(assign + 1);
        }
    }
}

function strip_tags(str, allowed_tags) {
    // Strip HTML and PHP tags from a string
    //
    // +    discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_strip_tags/
    // +       version: 810.819
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Luke Godfrey
    // +      input by: Pul
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   bugfixed by: Onno Marsman
    // *     example 1: strip_tags('<p>Kevin</p> <br /><b>van</b> <i>Zonneveld</i>', '<i>,<b>');
    // *     returns 1: 'Kevin <b>van</b> <i>Zonneveld</i>'
    // *     example 2: strip_tags('<p>Kevin <img src="someimage.png" onmouseover="someFunction()">van <i>Zonneveld</i></p>', '<p>');
    // *     returns 2: '<p>Kevin van Zonneveld</p>'
    // *     example 3: strip_tags("<a href='http://kevin.vanzonneveld.net'>Kevin van Zonneveld</a>", "<a>");
    // *     returns 3: '<a href='http://kevin.vanzonneveld.net'>Kevin van Zonneveld</a>'

    var key = '', tag = '', allowed = false;
    var matches = allowed_array = [];
    var allowed_keys = {};

    var replacer = function(search, replace, str) {
        var tmp_arr = [];
        tmp_arr = str.split(search);
        return tmp_arr.join(replace);
    };

    // Build allowes tags associative array
    if (allowed_tags) {
        allowed_tags  = allowed_tags.replace(/[^a-zA-Z,]+/g, '');;
        allowed_array = allowed_tags.split(',');
    }

    str += '';

    // Match tags
    matches = str.match(/(<\/?[^>]+>)/gi);

    // Go through all HTML tags
    for (key in matches) {
        if (isNaN(key)) {
            // IE7 Hack
            continue;
        }

        // Save HTML tag
        html = matches[key].toString();

        // Is tag not in allowed list? Remove from str!
        allowed = false;

        // Go through all allowed tags
        for (k in allowed_array) {
            // Init
            allowed_tag = allowed_array[k];
            i = -1;

            if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+'>');}
            if (i != 0) { i = html.toLowerCase().indexOf('<'+allowed_tag+' ');}
            if (i != 0) { i = html.toLowerCase().indexOf('</'+allowed_tag)   ;}

            // Determine
            if (i == 0) {
                allowed = true;
                break;
            }
        }

        if (!allowed) {
            str = replacer(html, "", str); // Custom replace. No regexing
        }
    }

    return str;
}

function nl2br (str, is_xhtml) {
    // Inserts HTML line breaks before all newlines in a string
    //
    // +    discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_nl2br/
    // +       version: 810.1311
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Philip Peterson
    // +   improved by: Onno Marsman
    // +   improved by: Atli 謝r
    // *     example 1: nl2br('Kevin\nvan\nZonneveld');
    // *     returns 1: 'Kevin<br />\nvan<br />\nZonneveld'
    // *     example 2: nl2br("\nOne\nTwo\n\nThree\n", false);
    // *     returns 2: '<br>\nOne<br>\nTwo<br>\n<br>\nThree<br>\n'

    breakTag = "<br />";
    if (typeof is_xhtml == "boolean" || is_xhtml == false) {
        breakTag = "<br>";
    }

    return (str + '').replace(/([^>]?)\n/g, '$1'+ breakTag +'\n');
}

function br2nl (str) {
	var result = str.replace(/<br \/>/g, '\n');
	result = result.replace(/<\/p>/g, '\n');
    return result;
}

function empty( mixed_var ) {
    // Determine whether a variable is empty
    //
    // +    discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_empty/
    // +       version: 810.616
    // +   original by: Philippe Baumann
    // +      input by: Onno Marsman
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +      input by: LH
    // +   improved by: Onno Marsman
    // *     example 1: empty(null);
    // *     returns 1: true
    // *     example 2: empty(undefined);
    // *     returns 2: true
    // *     example 3: empty([]);
    // *     returns 3: true
    // *     example 4: empty({});
    // *     returns 4: true

    var key;

    if (mixed_var === ""
        || mixed_var === 0
        || mixed_var === "0"
        || mixed_var === null
        || mixed_var === false
        || mixed_var === undefined
    ){
        return true;
    }
    if (typeof mixed_var == 'object') {
        for (key in mixed_var) {
            return false;
        }
        return true;
    }
    return false;
}

// {{{ explode
function explode( delimiter, string, limit ) {
    // Split a string by string
    //
    // +    discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_explode/
    // +       version: 809.522
    // +     original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +     improved by: kenneth
    // +     improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +     improved by: d3x
    // +     bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // *     example 1: explode(' ', 'Kevin van Zonneveld');
    // *     returns 1: {0: 'Kevin', 1: 'van', 2: 'Zonneveld'}
    // *     example 2: explode('=', 'a=bc=d', 2);
    // *     returns 2: ['a', 'bc=d']

    var emptyArray = { 0: '' };

    // third argument is not required
    if ( arguments.length < 2
        || typeof arguments[0] == 'undefined'
        || typeof arguments[1] == 'undefined' )
    {
        return null;
    }

    if ( delimiter === ''
        || delimiter === false
        || delimiter === null )
    {
        return false;
    }

    if ( typeof delimiter == 'function'
        || typeof delimiter == 'object'
        || typeof string == 'function'
        || typeof string == 'object' )
    {
        return emptyArray;
    }

    if ( delimiter === true ) {
        delimiter = '1';
    }

    if (!limit) {
        return string.toString().split(delimiter.toString());
    } else {
        // support for limit argument
        var splitted = string.toString().split(delimiter.toString());
        var partA = splitted.splice(0, limit - 1);
        var partB = splitted.join(delimiter.toString());
        partA.push(partB);
        return partA;
    }
}// }}}

// {{{ implode
function implode( glue, pieces ) {
    // Join array elements with a string
    //
    // +    discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_implode/
    // +       version: 809.522
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: _argos
    // *     example 1: implode(' ', ['Kevin', 'van', 'Zonneveld']);
    // *     returns 1: 'Kevin van Zonneveld'

    return ( ( pieces instanceof Array ) ? pieces.join ( glue ) : pieces );
}// }}}

// {{{ in_array
function in_array(needle, haystack, strict) {
    // Checks if a value exists in an array
    //
    // +    discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_in_array/
    // +       version: 809.522
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // *     example 1: in_array('van', ['Kevin', 'van', 'Zonneveld']);
    // *     returns 1: true

    var found = false, key, strict = !!strict;

    for (key in haystack) {
        if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) {
            found = true;
            break;
        }
    }

    return found;
}// }}}

// {{{ print_r
function print_r( array, return_val ) {
    // Prints human-readable information about a variable
    //
    // +    discuss at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_print_r/
    // +       version: 809.2411
    // +   original by: Michael White (http://getsprink.com)
    // +   improved by: Ben Bryan
    // *     example 1: print_r(1, true);
    // *     returns 1: 1

    var output = "", pad_char = " ", pad_val = 4;

    var formatArray = function (obj, cur_depth, pad_val, pad_char) {
        if (cur_depth > 0) {
            cur_depth++;
        }

        var base_pad = repeat_char(pad_val*cur_depth, pad_char);
        var thick_pad = repeat_char(pad_val*(cur_depth+1), pad_char);
        var str = "";

        if (obj instanceof Array || obj instanceof Object) {
            str += "Array\n" + base_pad + "(\n";
            for (var key in obj) {
                if (obj[key] instanceof Array) {
                    str += thick_pad + "["+key+"] => "+formatArray(obj[key], cur_depth+1, pad_val, pad_char);
                } else {
                    str += thick_pad + "["+key+"] => " + obj[key] + "\n";
                }
            }
            str += base_pad + ")\n";
        } else if(obj == null || obj == undefined) {
            str = '';
        } else {
            str = obj.toString();
        }

        return str;
    };

    var repeat_char = function (len, pad_char) {
        var str = "";
        for(var i=0; i < len; i++) {
            str += pad_char;
        };
        return str;
    };
    output = formatArray(array, 0, pad_val, pad_char);

    if (return_val !== true) {
        document.write("<pre>" + output + "</pre>");
        return true;
    } else {
        return output;
    }
}// }}}



