//function for results paging so qstring search criteria isnt lost
// ========================================================================================================
	function page(p){
		var strHref = window.location.href;
		var subStrHref = "";
		if(strHref.indexOf("?") > 0){
			if(strHref.indexOf("page") > 0){
				if(strHref.lastIndexOf("&") > strHref.indexOf("page=")){
					subStrHref = strHref.substring(strHref.indexOf("page="),strHref.indexOf("&",strHref.indexOf("page=")));
				}else{
					subStrHref = strHref.substring(strHref.indexOf("page="));
				}
				strHref = strHref.replace(subStrHref,"page=" + p);
				location.href = strHref;
			}else{
				location.href = location.href + "&page=" + p;
			}
		}else{
			location.href = location.href + "?page=" + p;
		}
	}




//function for selecting photo gallery category
// ========================================================================================================
	function photoGalleryCat(cat,catID){
		var theCatID = document.getElementById("galleryCats")[catID].id;
		location.href="/about/photos.aspx?id=" + theCatID + "&category=" + cat;
	}






//function for keyword search & keyowrd search fromm error page
// ========================================================================================================
	function keywordsearch(){
		if(document.getElementById('txt1').value != ''){
			var keyword=document.getElementById('txt1').value;
		}else if(document.getElementById('errorSearch').value != ''){
			var keyword=document.getElementById('errorSearch').value;
		}
   	 location.href="/search-results.aspx?keyword=" + keyword;
	}


	function keywordsearch_error(){
		var keyword=document.getElementById('errorSearch').value;
		location.href="/search-results.aspx?keyword=" + keyword;
	}


