function getLabel( input_id){
    var labels = document.getElementsByTagName( 'LABEL' );
    for( var i = 0; i < labels.length; i++ ) 
    {
        if( labels[ i ].htmlFor == input_id)
        {
            return labels[ i ];
		}
    }
    return false;
}

function focusPress( input_id )
{
	var ele = document.getElementById( input_id );
    var label = getLabel( input_id );
    if( ele.value.length == 0)
    {
        label.className = 'inlined focus';
    }
    else
    {
        label.className = 'inlined has-text focus';
    }
}

function keyPress( input_id )
{
	var ele = document.getElementById( input_id );
    var label = getLabel( input_id );
    label.className = 'inlined has-text focus';
}

function blurPress( input_id )
{
	var ele = document.getElementById( input_id );
    var label = getLabel( input_id );
    if( ele.value.length == 0)
    {
        label.className = 'inlined';
    }
}
