var noOfDecimals = 2;

function highlight(obj)
{
	obj.style.color="#000000";
	obj.style.fontWeight="bold";
}
function resetStyle(obj)
{
	obj.style.color="#666666";
	obj.style.fontWeight="normal";	
}

function getFloat(x) {
    x = x.replace(",", ".");
    return parseFloat(x).toFixed(noOfDecimals);
}

function setFloat(x) {
    return x.toFixed(noOfDecimals).toString().replace(".", ",");
}

function FCKValue(id)
{
    var temp = document.createElement('txBuffer');
    temp.value = FCKeditorAPI.GetInstance(id).GetXHTML();
    //alert(temp.value);
    return temp;
}

function $() {
        
	if (arguments.length>1) {
		return false;
	}
	if (arguments.length<1) {
		return false;
	}

	var element = arguments[0];

    if (typeof element == 'string') {
        if (document.getElementById) 
        {
            try 
            {
                element = FCKValue(element);
            }
            catch(err)
            {
                element = document.getElementById(element);            
            }

        } else if (document.all) {
            element = document.all[element];
        }
    }
    
	
	return element;
}

function changeLanguage(lang) {
    $("hLang").value = lang;
    $("hAction").value = "ChangeLanguage";
    $("frmMain").submit();
}

function showBig(img) {
    if (img.length > 0) {
        window.open(img, '','width=600,height=480,status=no,resizable=yes,scrollbars=auto');
    }
}