
	var winId = 0;

	function openWnd(file, x, y, oneInstance, scrollBars) {
		winId++;
		if(y == -1) y = screen.height;
		if(!x) x = 350;
		if(!y) y = 350;
		if(oneInstance) {
			var wid = 'file';
		}
		else {
			var wid = 'file' + winId;
		}
		if(!scrollBars) {
			scrollBars = "auto";
		}
		cleft = (screen.width / 2) - (x / 2);
		ctop = (screen.height / 2) - (y / 2);
		var windowId;
		windowId=window.open(file, wid,'toolbar=0,directories=0,status=0,menubar=0,width=' + x +',height=' + y + ',scrollbars=' + scrollBars + ',resizable=no,left=' + cleft + ',top=' + ctop);
		windowId.focus();
		return true;
	}

	function sendtofriends(wid) {
		openWnd("/sendtofriend/?wid=" + wid, 550, 350);
		return false;
	}

	function complimentforauthor(wid) {
		openWnd("/complimentforauthor/?wid=" + wid, 550, 300);
		return false;
	}

	function GoTo(anchor) {
		var href = window.location.href;
		var sharpPos = href.indexOf("#");
		if(sharpPos != -1) href = href.substring(0, sharpPos);
		window.location.href = href + "#" + anchor;
	}

	function IsAnchor(anchor) {
		var href = window.location.href;
		var sharpPos = href.indexOf("#" + anchor);
		if(sharpPos != -1) {
			return true;
		}
		return false;
	}

