url = document.location.href;
xend = url.lastIndexOf("/") + 1;
var base_url = url.substring(0, xend);

function levTid(x){
	div = document.getElementById('levtid');
	if(x==0){
		div.style.visibility = 'hidden';
		div.style.height = '5px';
	}
	if(x==1){
		div.style.visibility = 'visible';
		div.style.height = '20em';
	}
}

function check(x){
	if(x.value.match(/.*?\.\.\./)) x.value='';
}

function get_val(){
	obj = document.getElementById('pnr'); 
	verdi = obj.value;
}

function ajax_do (url) {
        // Does URL begin with http?
        if (url.substring(0, 4) != 'http') {
                url = base_url + url;
        }

        // Create new JS element
        var jsel = document.createElement('SCRIPT');
        jsel.type = 'text/javascript';
        jsel.src = url;

        // Append JS element (therefore executing the 'AJAX' call)
        document.body.appendChild (jsel);
}