function setCookie(name,value) {	var today = new Date();	var expires = new Date(today.getTime() + 86400000);	document.cookie = name + "=" + escape(value) + ";expires=" + expires.toGMTString() + ";path=/";}function getCookie(Name) {	var search = Name + '=';	if (document.cookie.length > 0) {		offset = document.cookie.indexOf(search);		if (offset != -1) {			offset += search.length;			end = document.cookie.indexOf(';', offset);			if (end == -1) {				end = document.cookie.length;				}			return unescape(document.cookie.substring(offset, end)) 		} else {			return '' ;		} 	}}function validateSearch(strValue) {if (strValue != '' ) {	var f = document.forms["1"];	strValue = strValue.replace("<script>","");	f.Query.value = strValue;	f.submit();    }}function setColors(objTable, Color1, Color2) {	var rows = objTable.getElementsByTagName("tr") ;	var Colors = [Color1, Color2];	for( var i = 1; i < rows.length; i++) {		rows[i].style.backgroundColor = Colors[i % 2] 	}}function checkNoDocuments(docTypeStr) { // function to replace the 'No documents found' message	if (docTypeStr == undefined || docTypeStr == "") {		var docTypeStr = 'There are currently no records in this view.'	}	if (document.getElementById("view").innerHTML.indexOf("No documents found") > 0) {		document.getElementById("view").innerHTML = "<br><span>" + docTypeStr + "</span><br>"	}}function getPixelsFromTop(obj){	objFromTop = obj.offsetTop;	while(obj.offsetParent!=null) {		objParent = obj.offsetParent;		objFromTop += objParent.offsetTop;		obj = objParent;	}	return objFromTop;}function reSize() {var myWidth = 0, myHeight = 0;  if( typeof( window.innerWidth ) == 'number' ) {    //Non-IE    myWidth = window.innerWidth;    myHeight = window.innerHeight;  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {    //IE 6+ in 'standards compliant mode'    myWidth = document.documentElement.clientWidth;    myHeight = document.documentElement.clientHeight;  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {    //IE 4 compatible    myWidth = document.body.clientWidth;    myHeight = document.body.clientHeight;  }	var f = document.forms[0];	var scrollStart = document.getElementById('scrollStart');	var scrollEnd = document.getElementById('scrollEnd');	var topSpacing = getPixelsFromTop(scrollStart);	var pageSpacing = getPixelsFromTop(pageEnd);	var botSpacing = pageSpacing- getPixelsFromTop(scrollEnd);	scrollStart.style.height=myHeight-topSpacing-botSpacing;}function getParamValue(queryString, paramName){	var params = queryString.split("&");	for (j=0;j<params.length;j++){		if (params[j].indexOf(paramName)>-1){			//alert(paramName);			var pos = params[j].indexOf("=");			var fp =  params[j].substring(pos+1)			//alert(fp);			return fp;				}	}	return "";}function middleString(fullString, startString, endString) {   if (fullString.indexOf(startString) == -1) {      return "";   } else {      var sub = fullString.substring(fullString.indexOf(startString)+startString.length, fullString.length);      if (sub.indexOf(endString) == -1) {         return sub;      } else {         return (sub.substring(0, sub.indexOf(endString)));      }   }}function selectCategory() {//check if this is a form or a view, and redirect accordingly	var f = document.forms[0];	var si = f.viewCategory.selectedIndex;	var db = f.path.value;	var view = f.viewTitle.value;	var viewCountpref = f.viewCountPref.value;			if (si != 0) {	//not first item in list>		var groupy = f.viewCategory[si].value;		cat = "?openview&RestrictToCategory=" + groupy + "&Start=1&Count=" + viewCountpref;		location.replace("/" + db + "/" + view + cat);		return true;	}}