function clearValue(obj, inputType) {
    login = 'Přihlašovací jméno';
    password = 'Heslo';
    email = 'Zadejte Váš e-mail';
    phone = 'Zadejte Váš telefon';
    message = 'Zadejte Váš dotaz';
    
    if (inputType == 'email' && obj.value == email) {
        obj.value = '';
        return;
    }
    
    if (inputType == 'phone' && obj.value == phone) {
        obj.value = '';
        return;
    }
    
    if (inputType == 'message' && obj.value == message) {
        obj.value = '';
        return;
    }
    
    if (inputType == 'login' && obj.value == login) {
        obj.value = '';
        return;
    }
    
    if (inputType == 'password' && obj.value == password) {
        obj.value = '';
        return;
    }
}

function returnDefaultValue(obj, defaultText) {
    if (obj.value == '') {
        obj.value = defaultText;
    }
}

function priceFormat(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ' ' + '$2');
	}
	return x1 + x2;
}
