
	function PicPrev(url, src) {
		url = url + "?src=" + src;
		NewWindow(url, 100, 100, "showimg", "yes");
	}

	function NewWindow(url, w, h, name, scroll) {
		NewWin = window.open(url,name,"width="+w+",height="+h+",scrollbars="+scroll+",status=no,toolbar=no,menubar=no,resizable=yes");
		NewWin.focus();
	}

	function preview() {
		url = p + ";bPrint:1";
		printWin = window.open(url, "printpage", "width=640,height=400,scrollbars=yes,status=no,toolbar=no,menubar=yes,resizable=no");
		printWin.focus();
	}

	function search() {
		document.frmSearch.submit();
	}

	function openVoting(sUrl) {
		window.open(sUrl, "votewindow", "width=1,height=1,scrollbars=no,status=no,toolbar=no,menubar=no,resizable=yes");
	}


	/* SET FOOTER */

	function getWindowHeight() {
		var windowHeight = 0;
		if (typeof(window.innerHeight)=="number") {
			windowHeight = window.innerHeight;
		}
		else {
			if (document.documentElement&&document.documentElement.clientHeight) {
				windowHeight = document.documentElement.clientHeight;
			}
			else {
				if (document.body&&document.body.clientHeight) {
					windowHeight=document.body.clientHeight;
				}
			}
		}
		return windowHeight;
	}

	function setFooter() {
		if (document.getElementById) {
			var windowHeight = getWindowHeight();
			if (windowHeight>0) {
				var contentHeight = document.getElementById("content").offsetHeight;
				var footerElement = document.getElementById("foot");
				var footerHeight  = footerElement.offsetHeight;
				if (windowHeight-(contentHeight+footerHeight)>=0) {
					footerElement.style.position = "relative";
					footerElement.style.top = (windowHeight-(contentHeight+footerHeight)) + "px";
				}
				else {
					footerElement.style.position = "static";
				}
			}
		}
	}

	window.onload = function() {
		setFooter();
	}
	window.onresize = function() {
		setFooter();
	}

