/*********************************************************************
*						Common functions
*********************************************************************/

// Follows passed link

function followLink(link) {
	while((pos = link.indexOf('$'))!=-1) {
		link[pos] = '.';
		link = link.substring(0,pos)+'.'+link.substring(pos+1)
	}
	window.location.href = "http://"+link;
}

// Follows link with tail

var gFL = {}

function fL(link, tail) {
	if(gFL[link.href]) return true;
	pos = link.href.lastIndexOf('.')
	if(pos!=-1) {
		t = link.href.substring(pos);
		link.href = link.href.substring(0, pos);
	} else t = '';
	link.href+="_"+tail+t;
	gFL[link.href] = 1
//	link.click();
	return true;
}
