function getURL(db_type)
{
	
//	var thisUrl = document.location.href;
//	var newUrl = thisUrl.split("/");
	var Url="";

/*	if(newUrl[newUrl.length-1]!='')
		for(i=0; i<newUrl.length-1;i++)
			Url += newUrl[i] + "/";
	else
		for(i=0; i<newUrl.length;i++)
			Url += newUrl[i] + "/";
		*/
	document.location.href = Url + "p?selection=" + db_type;
	return false;	

}

function checkSearcher(){
	var result = true;
	if(document.forms['finder'].region.value == ''
		&& document.forms['finder'].selection.value == ''
		&& document.forms['finder'].location.value == ''
		&& document.forms['finder'].begin.value == ''
		&& document.forms['finder'].end.value == ''
		&& document.forms['finder'].words.value == ''){
			alert('Wybierz przynajmniej jedną opcję.');
			result = false;
		}
	return result;
}

var m;
function show_hide(id){
	if(document.getElementById('stars'+m).style.visibility=="visible")
		document.getElementById('stars'+m).style.visibility="hidden";
	document.getElementById('stars'+id).style.visibility="visible";
	m = id;
}

function changeStyAll(id){
	if(id==null) id = '';
	for(i=1;i<=16;i++)
		document.getElementById(id+i).className = 'flashout';
}

function changeSty(int1){
	document.getElementById(int1).className = 'flashover';
}
function changeSty2(int1){
	document.getElementById(int1).className = '';
}

function set_land(int1,int2){
	window.document.mapka.SetVariable('_root.link_over',int1);
	window.document.mapka.SetVariable('_root.mv',int2);
}



function setTarget(formname,db){
	var db_type = document.forms[formname].type.value;
	if(db_type!='') db_type = "," + db_type;
	document.forms[formname].action = "szukaj," + db + db_type + ",1.html";
}

function countChars(id)
{
	if(document.getElementById(id).value.length>500)
		document.getElementById(id).value = document.getElementById(id).value.substring(0,500);

}
function logBox(formname){
	document.forms[formname].submit();
	return false;
}



function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=no,menubar=no' );
}



function setUnerline(value,id){
		document.getElementById(id).style.textDecoration = value;

}





