function editPrice(name, group) {
	closeAllSpans("EditPriceValueSpan");
	
	priceField = document.getElementById("priceValueEditField" + name);
	var data = getAjaxPage("/Default.aspx?CMD=GetPriceValue&PriceName="+ name +"&PriceGroup="+ group +"&CacheKiller=" + new Date().getTime());

    data = replaceSubstring(data, "&#230;", "\u00E6");
    data = replaceSubstring(data, "&#248;", "\u00F8");
    data = replaceSubstring(data, "&#229;", "\u00E5");

	priceField.value = data;
	
    document.getElementById("priceValueEdit" + name).style.display = '';
    document.getElementById("priceValueEditField" + name).style.display = '';
}

function savePrice(name, group) {
	closeAllSpans("EditPriceValueSpan");
	
	priceField = document.getElementById("priceValueEditField" + name);
	var txt = priceField.value;

    if (txt.indexOf("\u00E6") > -1 || txt.indexOf("\u00F8") > -1 || txt.indexOf("\u00E5") > -1) {
        txt = replaceSubstring(txt, "\u00E6", "[ae]");
        txt = replaceSubstring(txt, "\u00F8", "[oe]");
        txt = replaceSubstring(txt, "\u00E5", "[aa]");    
    } 

	var data = getAjaxPage("/Default.aspx?CMD=GetPriceValue&PriceSave=true&PriceTxt="+ txt +"&PriceName="+ name +"&PriceGroup="+ group +"&CacheKiller=" + new Date().getTime());

    if (data.indexOf("æ") > -1 || data.indexOf("ø") > -1 || data.indexOf("å") > -1) {
        data = replaceSubstring(data, "æ", "&aelig;");
        data = replaceSubstring(data, "ø", "&slash;");
        data = replaceSubstring(data, "å", "&aring;");    
    } else {
    }      
    
    document.getElementById("priceValueEditField" + name).style.display = 'none';
    document.getElementById("thePrice_" + name).innerHTML = data;
}

