//modified for task 6PG3D5function staticBrowseView( reset )  {	 var frm = document.forms[0];	 if (document.forms[4])	 	frm = document.forms[4];	 	 var bLink = frm.BrowseLink;	 if ( bLink ) {		if ( bLink.value == "" )			bLink.value = "default";		if (  bLink.value == "default" )		 	return;	} 		var path = frm.BrowseLink.value.split(':');	var classification = '';	if ( frm.BrowseClassification )		classification = encodeURIComponent(frm.BrowseClassification.value).replace( /%/g, "~" );		var loc = '/' + path[0] + '/sh/browse';	if ( !reset && frm.webView )		loc += '&VIEW=' + frm.webView.value;		if ( !reset && document.forms[0].BrowseOrder )		loc += '&ORDER=' + frm.BrowseOrder.value;	loc += '&CATEGORY=' + path[1];	if ( !reset  && classification != '' )		loc += '&CLASSIFICATION=' + classification;				location.href = loc;}function browseView( reset ){	 var frm = document.forms[0];	 if (document.forms[4])	 	frm = document.forms[4];	 	 var bLink = frm.BrowseLink;	 if ( bLink ) {		if ( bLink.value == "" )			bLink.value = "default";		if (  bLink.value == "default" )		 	return;	} 		var path = frm.BrowseLink.value.split(':');	var classification = '';	if ( frm.BrowseClassification )		classification = frm.BrowseClassification.value.replace( /\u2014/g, "%" + "97" );		classification = classification.replace(/&/g, "%" + "26" ); //replace '&' with hex equivalent		var loc = '/' + path[0] + '/browse?OpenForm';	if ( !reset && frm.webView )		loc += '&VIEW=' + frm.webView.value;		if ( document.forms[0].BrowseOrder )		loc += '&ORDER=' + frm.BrowseOrder.value + '&START=1';	if ( !reset )		loc += '&CLASSIFICATION=' + classification;			loc += '&CATEGORY=' + path[1];		location.href = loc;}function submitSearch(){	if (document.forms[0].SearchQuery.value == "") {		alert("No query entered ...");		return(false);	} else {		return(true);	}}function submitSiteOptions(){	var biscuit = document.cookie		if (biscuit.indexOf('DBCT=1') == -1) {		if (confirm("To save your selected site options cookies must be used, do you wish to continue?")) {			return(true);			} else {			return(false);		}	} else {			return(true);	}			}function submitSelectDB(){	var biscuit = document.cookie		if (biscuit.indexOf('ACSD=1') == -1) {		if (confirm("To save your selected databases a cookie must be set, do you wish to continue?")) {			return(true);			} else {			return(false);		}	} else {			return(true);	}			}function selectAll(name) { 	for (x=0; x< document.forms[0].elements.length; x++) {		if (document.forms[0].elements[x].name == name) {			document.forms[0].elements[x].checked = 1;		}	}}function deselectAll(name){	for (x=0; x< document.forms[0].elements.length; x++) {		if (document.forms[0].elements[x].name == name) {			document.forms[0].elements[x].checked = 0;		}	}}function validateEmailAddr(email){  var result = false  var theStr = new String(email)  var index = theStr.indexOf("@");  if (index > 0)  {    var pindex = theStr.indexOf(".",index);    if ((pindex > index+1) && (theStr.length > pindex+1))	result = true;  }  return result;}function validateFeedabckForm(){	var errmsg = "";		if (document.forms[0].Fullname.value == "") {		errmsg += "- Fullname is empty\n";		document.forms[0].Fullname.focus();	}	if (document.forms[0].Email.value == "" | !validateEmailAddr(document.forms[0].Email.value)) {		errmsg += "- Email is empty or not a valid address\n";			document.forms[0].Email.focus();	}	if (document.forms[0].Message.value == "") {		errmsg += "- Message is empty\n";		document.forms[0].Message.focus();	}			if (errmsg != "") {				errmsg = "___________________________________\n\n" + errmsg;		errmsg = "The following field ERRORS must be corrected \nin order to SUBMIT this form:\n" + errmsg;		errmsg += "___________________________________\n\n";		errmsg += "Please correct these errors and try again.\n";				alert(errmsg);		return(false);	} else {		return(true);	}	}function validateBrowseForm(){	if (document.forms[0].BrowseQuery.value == "") {		alert("No query entered ...");		return(false);	} else {		return(true);	}	}function expandCollapse( idStem ) {		var img = document.getElementById( "img" + idStem );	var div = document.getElementById( "div" + idStem );		if ( img ) {		var src = img.src;		var index = src.substr( src.length - 1 );		if ( index == "1" ) {			img.src = src.substr( 0, src.length -1 ) + "0";			div.style.display = "none";		} else {			img.src = src.substr( 0, src.length -1 ) + "1";			div.style.display = "";		}	}	}function toggleNavDisplay(oNav, sDefault, sID){//Created on:10/03/2006//By: Nila Dao//post: this function gives the ui effect of expanding and collapsing each volumn in the TOC navigator	if (oNav == null || oNav == "undefined"){		return true;	}	var oColl = oNav.childNodes;	var i ;	var sStyle = sDefault;	for (i = 0; i < oColl.length; i++)	{		if (oColl[i].style != null && oColl[i].style != "undefined")		{			oColl[i].style.display = sStyle;			if (oColl[i].id == sID)			{				if (sStyle == "block")				{					sStyle = "none";					}else{					sStyle = "block";					}			}		}	}}function loadTOC(sUNID, sParentID){//Created on:14/03/2006//By: Nila Dao//post: load the toc for the selected volume	var leftNavWindow = window.parent.frames["leftNav"];	var surl = new String(leftNavWindow.location);			leftNavWindow.location = surl.substring(0, surl.lastIndexOf("/") + 1) + sUNID + "?OpenDocument&ID=" + sParentID + "!";}function loadTOC(sUNID, sParentID){//Created on:14/03/2006//By: Nila Dao//post: load the toc for the selected volume	var leftNavWindow = window.parent.frames["leftNav"];	var surl = new String(leftNavWindow.location);			leftNavWindow.location = surl.substring(0, surl.lastIndexOf("/") + 1) + sUNID + "?OpenDocument&ID=" + sParentID + "!";}function resetNavDisplay(sUNID){//Created on:14/03/2006//By: Nila Dao//post: calling code to toggle menu display so it corresponds to the selected item	var doc = window.parent.frames["leftNav"].document;	//this function gives the ui effect of expanding and collapsing each volumn in the TOC navigator	//starting at the top, hide all the links that are below the selected one	toggleNavDisplay(doc.getElementById("topNav"), "block", sUNID);		//do the opposite for the bottom bav, starting at the top, show all the links that are below the selected one	toggleNavDisplay(doc.getElementById("bottomNav"), "none", sUNID);		//if the TOC rich text field has no text then display the warning	if (doc.getElementById("attnavigation").innerHTML == "<!----><!---->")	{		var oNode = doc.createElement("DD");		oNode.id = "warning";		oNode.appendChild(doc.createTextNode("Table of Contents Not Available"));		doc.getElementById("attnavigation").appendChild(oNode);	}		window.scrollTo(0,0);}