function initForm4Places(path, feed, id) {	
	var token = "/EN/";
	var absolutePath = window.location.href;
	var position = absolutePath.lastIndexOf(token);
	absolutePath = absolutePath.substring(0, position);
	//alert('path completo:' + absolutePath + feed);
	if(selectedId != null){
		document.getElementById(selectedId).className = 'notSelectedLine';
	}

	document.getElementById(id).className = 'selectedLine';
	document.getElementById("columnFrame").className = 'selectedIFrame';
	selectedId = id;
	document.getElementById("geoBrowserFrame").style.display = 'block';

	document.getElementById("geoBrowserFrame").src = path  + "?feed=" + encodeURIComponent(absolutePath + feed) + "&showTitle=true&mode=list-points";
}


function initForm4Box(path, feed) {
	var token = "/EN/";
	var absolutePath = window.location.href;
	var position = absolutePath.lastIndexOf(token);
	absolutePath = absolutePath.substring(0, position);
	//alert('path completo:' + absolutePath + feed);
	document.getElementById("geoBrowserFrame").style.display = 'block';
	document.getElementById("geoBrowserFrame").src = path  + "?feed=" + encodeURIComponent(absolutePath + feed) + "&showTitle=true";
}


var selectedId = null;

function initForm4GeoIndexer(path, feed, id) {
	var token = "/EN/";
	var absolutePath = window.location.href;
	var position = absolutePath.lastIndexOf(token);
	absolutePath = absolutePath.substring(0, position);
	//alert('path completo:' + absolutePath + feed);

	if(selectedId != null){
		document.getElementById(selectedId).className = 'notSelectedLine';
	}

	document.getElementById(id).className = 'selectedLine';
	document.getElementById("columnFrame").className = 'selectedIFrame';
	selectedId = id;
	document.getElementById("geoBrowserFrame").style.display = 'block';
	document.getElementById("geoBrowserFrame").src = path  + "?feed=" + encodeURIComponent(absolutePath + feed) + "&showTitle=true";
}

function initForm4Features(urn, url) {
	// todo comentar a linha de baixo para mostrar a parte das features geograficas
	document.getElementById("geoBrowserFrame").src = 'http://ftx.digmap.eu/features-frame.html'  + "?urn=" + urn + "&url=" + encodeURIComponent(url);
}

function initForm2ViewFeatures(urn) {
	// todo comentar a linha de baixo para mostrar a parte das features geograficas
	document.getElementById("geoBrowserFrame").src = 'http://ftx.digmap.eu/viewFeatures-frame.html'  + "?urn=" + urn;
}


function initForm4GeoTimes(path, feed, workList) {
	var token = "/EN/";
	var absolutePathFeed = window.location.href;
	var positionFeed = absolutePathFeed.lastIndexOf(token);
	absolutePathFeed = absolutePathFeed.substring(0, positionFeed);

	var absolutePathWorkList = window.location.href;
	var positionWorkList = absolutePathWorkList.lastIndexOf("/");
	absolutePathWorkList = absolutePathWorkList.substring(0, positionWorkList);
	
	window.open(path  + "feed=" + encodeURIComponent(absolutePathFeed + feed) + "&workList=" + encodeURIComponent(absolutePathWorkList + workList));
}

function initForm4Comments(urlService, urn, collection) {	
	document.getElementById("commentsFrame").src = urlService  + "?urn=" + urn + "&collection=" + collection + "&showInterface=false";
}

