function w(url)
{
    window.open(url, "page", "menubar=yes, location=yes, status=yes, toolbar=no, scrollbars=yes, resizable=yes");
    return false;
}

function wf(url, width, height)
{
	width += 50; height += 50;
	window.open(url, 'foto', 'width='+width+', height='+height+', toolbar=no, location=no, resizable=yes, scrollbars=yes, top=100, left=100');
	return false; 
}


function change_js_input()
{
    var el = document.getElementById('js_input');
    el.value = 1;
    return true;
}

// ankety
function set_poll(html_id, poll_id)
{
    var el = document.getElementById('POLLS_answer_' + html_id);
    el.value = poll_id;
}

function send_poll(html_id)
{
    var el = document.getElementById('POLLS_form_' + html_id);
    el.submit();

    return true;
}

function trim(hodnota)
{
	if(hodnota.charAt(0) == " ") {
		hodnota = hodnota.substring(1,hodnota.length);
		hodnota = trim(hodnota);
	}
	if(hodnota.charAt(hodnota.length-1) == " ") {
		hodnota = hodnota.substring(0,hodnota.length-1);
		hodnota=trim(hodnota);
	}
	return hodnota;
}

function jmeno_focus()
{
	var el = document.getElementById('jmeno');
	if (el.value == 'jméno') el.value = '';	
}

function telefon_focus()
{
	var el = document.getElementById('telefon');
	if (el.value == 'telefonní číslo') el.value = '';	
}

function email_focus()
{
	var el = document.getElementById('mail');
	if (el.value == 'e-mail') el.value = '';	
}

function zprava_focus()
{
	var el = document.getElementById('zprava');
	if (el.value == 'zpráva...') el.value = '';	
}



function webx_trim(val)
{
	if (val.charAt(0) == " ") {
		val = val.substring(1,val.length);
		val = webx_trim(val);
	}
	if (val.charAt(val.length-1) == " ") {
		val = val.substring(0,val.length-1);
		val = webx_trim(val);
	}
	return val;
}

function tu_corr()
{
	var el = document.getElementById('top_up');
	el.style.marginLeft = '0.40%';
	el.style.marginTop = '0%';
	
}

