/*function imageReplacement(){	x = document.getElementsByTagName('img')	for (var i=0;i<x.length;i++)	{		if (x[i].src.indexOf("/buddhapadipa.nsf/") > 0)   x[i].src = x[i].src.split("/buddhapadipa.nsf/")[1] + "/" + x[i].src.split("/buddhapadipa.nsf/")[2]	}}*/function toggleContent(name,n) {	var i,t='',el = document.getElementById(name);	if (!el.origCont) el.origCont = el.innerHTML;		for (i=0;i<n;i++) t += el.origCont;	el.innerHTML = t;}function MM_showHideLayers() { //v6.0  var i,p,v,obj,args=MM_showHideLayers.arguments;  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }    obj.visibility=v; }}function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n_substring(p+1)].document; n=n_substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_reloadPage(init) {  //reloads the window if Nav4 resized  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);/* ------------------------------------------------------------------------------     ZEBRA STRIPED TABLE/* ------------------------------------------------------------------------------*/function tableruler() { if (document.getElementById && document.createTextNode) {  var tables=document.getElementsByTagName('table');  for (var i=0;i<tables.length;i++) {   if(tables[i].className=='ruler') {    var trs=tables[i].getElementsByTagName('tr');    for(var j=0;j<trs.length;j++) {     if(trs[j].parentNode.nodeName=='TBODY'  && trs[j].className != 'header' && trs[j].className != 'header1' && trs[j].className != 'colheader' && trs[j].className != 'subheadernoclick') {      if (trs[j].className=='subheader') {       trs[j].onmouseover=function(){this.className='subheader_dn';return false}       trs[j].onmouseout=function(){this.className='subheader';return false}      } else {       trs[j].onmouseover=function(){this.className='ruled';return false}       trs[j].onmouseout=function(){this.className='';return false}       if (j % 2 == 0) trs[j].bgColor = '#EFEFEF';      }     }    }   }  } }}/* ---------------------------------------------------------------------------------     WRAP  EDIT AND OPEN DOC TAGS TO SHORTEN THEM/* -------------------------------------------------------------------------------*/function EditDoc(unid) { var dbPath = window.location.pathname.toLowerCase(); var dbURL = dbPath.substring(0, (dbPath.lastIndexOf(".nsf") + 4)) + "/"; if (unid.lastIndexOf("?")>0) {  window.location = dbPath + "/" + unid; } else {  window.location = "http://cf.logicspot.com/" + unid + "?EditDocument"; }}function OpenDoc(unid, where) { var dbPath = window.location.pathname.toLowerCase(); var dbURL = dbPath.substring(0, (dbPath.lastIndexOf(".nsf") + 4)) + "/"; if (unid.lastIndexOf("?")>0) {  window.location = dbPath + "/" + unid; } else {  window.location = "http://cf.logicspot.com/" + unid + "?OpenDocument"; } if (where=="_new") { popinfo(loc, 950, 650, 'yes', 'no') } else { window.location = loc }}/** * Sets a Cookie with the given name and value. * * name       Name of the cookie * value      Value of the cookie * [expires]  Expiration date of the cookie (default: end of current session) * [path]     Path where the cookie is valid (default: path of calling document) * [domain]   Domain where the cookie is valid *              (default: domain of calling document) * [secure]   Boolean value indicating if the cookie transmission requires a *              secure transmission */function setCookie(name, value, expires, path, domain, secure) {//    document.cookie= name + "=" + escape(value) +     document.cookie= name + "=" + value +     	"; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/" +        ((domain) ? "; domain=" + domain : "") +        ((secure) ? "; secure" : "");//        ((expires) ? "; expires=" + expires.toGMTString() : "") +//        ((path) ? "; path=" + path : "") +}/** * Gets the value of the specified cookie. * * name  Name of the desired cookie. * * Returns a string containing value of specified cookie, *   or null if cookie does not exist. */function getCookie(name){	var dc = document.cookie;	var prefix = name + "=";	var begin = dc.indexOf("; " + prefix);	if (begin == -1) {		begin = dc.indexOf(prefix);		if (begin != 0) return null;	} else {		begin += 2;	}	var end = document.cookie.indexOf(";", begin);	if (end == -1) {		end = dc.length;	}	return unescape(dc.substring(begin + prefix.length, end));}/** * Deletes the specified cookie. * * name      name of the cookie * [path]    path of the cookie (must be same as path used to create cookie) * [domain]  domain of the cookie (must be same as domain used to create cookie) */function deleteCookie(name, path, domain) {	if (getCookie(name)) {		document.cookie = name + "=" + 			((path) ? "; path=" + path : "") +			((domain) ? "; domain=" + domain : "") +			"; expires=Thu, 01-Jan-70 00:00:01 GMT";	}}/* ------------------------------------------------------------------------------     ALLOWS STYLE SWITCHING/* ------------------------------------------------------------------------------*/var cookie = getCookie("style");var title = cookie ? cookie : getPreferredStyleSheet();setActiveStyleSheet(title);function setActiveStyleSheet(title) {	var i, a, main;	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {			a.disabled = true;			if(a.getAttribute("title") == title) a.disabled = false		}	}	setCookie("style", title)			x = document.getElementById("subheader1");	if (x != null) {		format = document.forms[0].format.value		image = "url(" + title + "_" + format + "_hd.jpg)"		document.getElementById("subheader1").style.backgroundImage = image		}			x = document.getElementById("index_title1");	if (x != null) {		format = document.forms[0].format.value		document.getElementById("index_title1").src = title + "_index1.gif"		document.getElementById("index_title2").src = title + "_index2.gif"		document.getElementById("index_title3").src = title + "_index3.gif"		}}function getActiveStyleSheet() {	var i, a;	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");	}	return null;}function getPreferredStyleSheet() {	var i, a;	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("rel").indexOf("alt") == -1 && a.getAttribute("title")) return a.getAttribute("title");	}	return null;}function loadcode() {	var cookie = getCookie("style");	var title = cookie ? cookie : getPreferredStyleSheet();}