/**
 * Extend JavaScript:
 */
String.prototype.trim = function() { 
	return(this.replace(/^\s*/,"").replace(/\s*$/,""));
};

/**
 * THINKFilm:
 */
thinkfilm = {};
thinkfilm.counter = 0;
thinkfilm.pop = function(page,title,width,height,scroll) {
	var t = title + this.counter++;
	var s = (scroll) ? "scrollbars=yes":"scrollbars=no";
	this[t] = window.open(page,t,"width=" + width + ",height=" + height + ",status=no,toolbar=no,menubar=no,location=no," + s);
	this[t].focus();
};
thinkfilm.load = function(file) {
	this.pop("img.php?img=" + file,"THINKFilm",100,100,false);
};
thinkfilm.film = function(file) {
	if (file == "0") return;
	window.location.href = "downloads.php?film=" + file;
};