PlotHTAWeights <- function(weights, color) {
	cx <- weights[[1]]
	cy <- weights[[2]]
	r <- weights[[3]]
	draw.circle(cx, cy, r, col = color)
}

PlotTAWeights <- function(weights, color, off1 = 0, off2 = 0) {
	x1 <- weights[[1 + off1]]
	y1 <- weights[[2 + off1]]
	x2 <- 1 - weights[[3 + 2 * off1 + off2]]
	y2 <- 1 - weights[[4 + 2 * off1 + off2]]
	rect(x1, y1, x2, y2, col = color)	
}

ReadNumeric <- function(file, format) {
	l 			<-	readLines(file, n = 1)
	substrings	<-	strsplit(l, split = ":")
	num_string	<-	substrings[[1]][2]
	ReadNumeric	<-	as.numeric(num_string)
	#tmpstring	<-	sprintf(format, ReadNumeric)
	#print(tmpstring)
	ReadNumeric
}
