browserName = navigator.appName; browserVer = parseInt(navigator.appVersion); ie = (browserName == "Microsoft Internet Explorer"); if ((browserName == "Netscape" && browserVer >= 3) || (ie && browserVer >= 4)) version = "n3"; else version = "n2"; var i; var minFN = new Object(); var data = new Array( "AM", "Mashiter", "Andrew", "0fuxS2dozVhDK4o", "JP", "Pybon", "Janet", "CUcDHYfv", "JC", "Clasper", "Janet", "vJX036rJQau", "GC", "Cutler", "Graham", "yD0mAOV29t" ); for( i = 0; i < data.length; i += 4 ){ id = data[i].toUpperCase(); minFN[id] = "Rev. "+data[i+2]+" "+data[i+1]; } var secTitle = new Object(); var secMin = new Object(); var secMinFN = new Object(); var data = new Array( "S1", "Park Rd/Euxton", "AM", "S2", "Coppull, etc.", "JP", "S3", "Trinity/Adlington/Preston Rd", "JC", "S4", "Brinscall, etc.", "GC" ); for( i = 0; i < data.length; i += 3 ){ id = data[i].toUpperCase(); secTitle[id] = data[i+1]; secMin[id] = data[i+2]; secMinFN[id] = minFN[secMin[id]]; } var chuTitle = new Object(); var chuSec = new Object(); var chuMin = new Object(); var chuMinFN = new Object(); var data = new Array( "_AD", "Adlington", "S3", "_BR", "Brinscall", "S4", "_EC", "Eccleston", "S2", "_EU", "Euxton", "S1", "_HE", "Heskin", "S2", "_PK", "Park Road", "S1", "_PR", "Preston Road", "S3", "_SL", "Spendmore Lane", "S2", "_TR", "Trinity", "S3", "_WW", "Whittle-le-Woods", "S4", "_WF", "Withnell Fold", "S4" ); var i = 0; for( i = 0; i < data.length; i += 3 ){ id = data[i].toUpperCase(); chuTitle[id] = data[i+1]; chuSec[id] = data[i+2]; chuMin[id] = secMin[chuSec[id]]; chuMinFN[id] = secMinFN[chuSec[id]]; } function findFrame( frame ){ var s; var w = self; while( w != null && w[frame] == null ){ s = w.self; w = w.parent; if( w != null && w == s ){ w = w.opener; } } if( w == null ){ alert("Error: Cannot find "+frame+"\n\n"+stacktrace() ); goUrl("http://www.chorleycircuit.org.uk/front.html"); } else { return w[frame]; } } function navValues( names, values ){ var i; var gotVals = ( values != null ); var ret; var nf = findFrame( "nav_frame" ); if( nf != null ){ ret = new Array(); for( i = 0; i < names.length; i++ ){ ret[ i ] = nf[ names[i] ]; if( gotVals ){ nf[ names[ i ] ] = values[ i ]; } } } return ret; } function navValue( name, value ){ var ret; var nf = findFrame( "nav_frame" ); if( nf != null ){ ret = nf[ name ]; if( value != null ){ nf[ name ] = value; } } return ret; } function myReturn(){ var url = ""; var nf = findFrame( "nav_frame" ); if( nf != null ){ url = nf.return_url; } if( url != "" ){ nf.return_url = ""; opener.location.replace( url ); } else { opener.location.reload(); } // close(); } function myGo( url ){ navValue( "return_url", location.href ); goUrl( url ); } function funcname(f){ var s = f.toString().match(/function (\w*)/)[1]; if((s==null) || (s.length == 0 ) ) return "anonymous"; return s; } function stacktrace(){ var s = ""; for(var a = arguments.caller; a != null; a = a.caller){ s += funcname(a.callee)+"\n"; if( a.caller == a ) break; } s += "\n"; s += self.location.href; return s; } function privNam( id, mode, type, domain ){ /* Returns the privilege name required for access to an object: id - object identifier mode - "R" or "W" or "GR" or "GW" (read, write, grant read, grant write) type - "I" for information pages, "D" for diaries. domain - "S" for section, "C" for church, "R" for circuit, "O" for other diary. */ priv = "_badpv"; if( domain == "S" ) { if( type == "D" ){ if( mode == "R" ){ priv = "_rdadr"; } else if( mode == "W" ){ priv = "_sdr"+id; } else if( mode == "GR" ){ priv = "_grdadr"; } else { priv = "_gsdr"+id; } } } else if( domain == "O" ) { if( type == "D" ){ if( mode == "R" ){ priv = "_odr"+id; } else if( mode == "W" ){ priv = "_odw"+id; } else if( mode == "GR" ){ priv = "_godr"+id; } else { priv = "_godw"+id; } } } else if( domain == "R" ) { if( type == "D" ){ if( mode == "R" ){ priv = "_rdadr"; } else if( mode =="W" ){ priv = "_cirdr"; } else if( mode =="GR" ){ priv = "_grdadr"; } else { priv = "_gcirdr"; } } } else if( domain == "C" ) { if( type == "D" ){ if( mode == "R" ){ priv = "_rdadr"; } else if( mode =="W" ){ priv = "_cdr"+id; } else if( mode =="GR" ){ priv = "_grdadr"; } else { priv = "_gcdr"+id; } } else if( type == "I" ){ if( mode == "R" ){ priv = "_rdain"; } else if( mode =="W" ){ priv = "_cin"+id; } else if( mode =="GR" ){ priv = "_grdain"; } else { priv = "_gcin"+id; } } } return priv; } function personUrlText(id,fullnm){ if( id != "" ){ if( fullnm != "" ) { var pattern = new RegExp("^(.+) (\\(.+\\).*)$"); var result = pattern.exec(fullnm); if( result != null ){ fname = result[1]; etc = result[2]; } else { fname = fullnm; etc = ""; } } else { fname = id; etc = ""; } text = ""+fname+" "+etc; } else { text = fullnm; } return text; } function personShow( id ){ var nf = findFrame( "nav_frame" ); var ok = true; if( nf.privs == null ) { nf.ploc = location.href; nf.pwin = self; nf.pset = 1; ok = hasPriv( "_rdadr", "javascript:void personShow( \""+id+"\" );" ); } if( ok ) { if( nf.pset == 1 ) { nf.pwin.location.replace( nf.ploc ); nf.ploc = ""; nf.pwin = "" nf.pset = 0; } var url = 'http://www.chorleycircuit.org.uk/cgi-bin/people.pl?cmd=display&id='+id+'&privs='+nf.privs; nw = open( url, "Person", "width=550,height=600,scrollbars,resizable,status"); setTimeout( "nw.focus();", 1000 ); } } function personUrl(id,fullnm){ document.writeln( personUrlText(id,fullnm) ); } function hasPriv( priv, ret ) { /* Returns true if the logged in user has the specified privilege, and false otherwise. If the user has not yet logged in they are redirected to the login page, from whence they are redirected back here. */ var nf = findFrame( "nav_frame" ); if( nf.username == null ){ iret = (nf.nret)++; if( ret == null ) { Set_Cookie( "ccircpage", location.href, 0, "/" ); nf.callstack[iret] = location.href; } else { Set_Cookie( "ccircpage", ret, 0, "/" ); nf.callstack[iret] = ret; } goUrl( "http://www.chorleycircuit.org.uk/login.php" ); return false; } if( nf.privs.indexOf( priv ) == -1 && nf.privs.indexOf( "_super" ) == -1) { return false; } else { return true; } } function goUrl (url, replace) { location.replace( url ); } function img_act(imgName) { if (version == "n3") { imgOn = eval(imgName + "on.src"); document [imgName].src = imgOn; } } function img_inact(imgName) { if (version == "n3") { imgOff = eval(imgName + "off.src"); document [imgName].src = imgOff; } } function goBack(){ var h = eval( "backoff.height" ); var w = eval( "backoff.width" ); document.write(''); document.write('Go back to the previous page'); document.writeln(''); } function myconfirm(a){ words = a.split(' '); line = ''; b = ''; for( i=0; i 50 ){ b = b + line +'\n'; line = words[i] + ' '; } else { line = newline; } } if( line.length > 0 ){ b = b + line; } return confirm( b ); } function Get_Cookie(name) { var start = document.cookie.indexOf(name+"="); var len = start+name.length+1; if ((!start) && (name != document.cookie.substring(0,name.length))) return null; if (start == -1) return null; var end = document.cookie.indexOf(";",len); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(len,end)); } function Set_Cookie(name,value,expires,path,domain,secure) { document.cookie = name + "=" +escape(value) + ( (expires) ? ";expires=" + expires.toGMTString() : "") + ( (path) ? ";path=" + path : "") + ( (domain) ? ";domain=" + domain : "") + ( (secure) ? ";secure" : ""); } function Delete_Cookie(name,path,domain) { if (Get_Cookie(name)) document.cookie = name + "=" + ( (path) ? ";path=" + path : "") + ( (domain) ? ";domain=" + domain : "") + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; } function showMsg (msg) { var pattern = new RegExp("\\+", "g"); var nw = open( "", "MSG", "height=400,width=400,resizable,scrollbars"); nw.document.open(); nw.document.writeln("
"); nw.document.writeln(" 

 

"); nw.document.writeln( msg.replace( pattern, " ") ); nw.document.writeln(" 


 

"); nw.document.writeln("Clicking here will close this window, ensuring that this message does not appear again.

If you want to close the window without deleting the message, click here."); nw.document.writeln(" 

"); nw.document.writeln("

"); nw.document.close(); } var ccircmsg = Get_Cookie("ccircmsg"); if( ccircmsg && ccircmsg != null ) { var nf = findFrame( "nav_frame" ); if( !nf.msgdone ) { Delete_Cookie( "ccircmsg" ); nf.msgdone = 1; setTimeout( "showMsg( ccircmsg );", 9000 ); } }