
	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=620,height=400,scrollbars=yes,status=no,toolbar=no,menubar=yes,resizable=no");
		printWin.focus();
	}

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

	function newwin(w,h) {
	  myparm = 'width='+ w +',height='+ h +',scrollbars=no,status=no,toolbar=no,menubar=no'

	  mywindow=window.open('','newwin',myparm)
	  mywindow.focus();
	}


	/* SET THE 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('pageTop').offsetHeight;
				var footerElement = document.getElementById('footBox');
				var footerHeight  = footerElement.offsetHeight;
				if (windowHeight - (contentHeight + footerHeight) >= 0) {
					footerElement.style.position = 'absolute';
					footerElement.style.top = (windowHeight - footerHeight) + 'px';
				}
				else {
					footerElement.style.position = 'static';
				}
			}
		}
	}
	window.onload = function() {
		setFooter();
	}
	window.onresize = function() {
		setFooter();
	}

