//www.changingatttitude.org website
//wai liang tan, liangtea
//mar 2002
//rollover effects
var section_names = new Array("home", "about_us", "news", "events", "get_involved", 
  "contacts", "general_synod", "lambeth_conference", "books", "links");
var image_in_lists, image_out_lists, image_1_lists, image_0_lists;
var status_messages = new Array("Visit Changing Attitude's Homepage",
"Visit 'About Us' Section Main Page on Changing Attitude's aims and activities", 
"Visit 'News' Section Main Page with recent UK and International Anglican and secular Lesbigay issues and news",
"Visit 'Events' Section Main Page listing events organised by Changing Attitude and other groups in 2002", 
"Visit 'Get Involved' Section Main Page on practical advice about what you can do", 
"Visit 'Contacts' Section Main Page on UK diocesan, secular and International Groups and contacts", 
"Visit 'General Synod' Section Main Page on Lesbigay involvement and Changing Attitude's synod activities", 
"Visit 'Lambeth Conference' Section Main Page on Lambeth Conference 1998", 
"Visit 'Books' section Main Page on Changing Attitude's publications and recommended book list", 
"Visit 'Links' section Main Page on websites relevant to UK and International Anglican, Christian and secular Lesbigay issues");
/*
var alt_lists = new Array("Go to homepage", "Go to 'About Us' main page", "Go to 'News' main page", "Go to 'Events' main page", "Go to 'Get Involved' main page", "Go to 'Contacts' main page", "Go to 'General Synod' main page", "Go to 'Lambeth Conference' main page", "Go to 'Books' main page", "Go to 'Links' main page");
*/
if(document.images)
{   image_in_lists = new Array(section_names.length);
//cache both image_0 and image_1
	image_0_lists = new Array(section_names.length);
	image_1_lists = new Array(section_names.length);
	for(i=0;i<section_names.length; i++)
	{  image_in_lists[i] = new Image();
	   image_in_lists[i].src = "img\\"+section_names[i]+"_2.gif";
	   image_0_lists[i] = new Image();
	   image_0_lists[i].src = "img\\"+section_names[i]+".gif";
	   image_1_lists[i] = new Image();
	   image_1_lists[i].src = "img\\"+section_names[i]+"_1.gif";
	}
	
	image_out_lists = new Array(section_names.length);
	for(i=0; i<section_names.length; i++)
	{  image_out_lists[i] = new Image();
	   if(i==section_no) image_out_lists[i].src = image_1_lists[i].src;
	   else image_out_lists[i].src = image_0_lists[i].src;
	}
}
	
function img_in(i)
{  //if(i==section_no) return;
   if(document.images) 
     document.images[i+1].src = image_in_lists[i].src;
   window.status=status_messages[i];
}
function img_out(i)
{  //if(i==section_no) return;
   if(document.images) 
     document.images[i+1].src = image_out_lists[i].src;
   window.status="";
}

//membership application
function apply()
{  //   newWindow1 = window.open('mailing.html', 'membership', 'toolbar=no,status=no,menubar=yes,scrollbars=yes,location=no,width=300,height=300');
   alert("Please print the form and send, with your payment, \nin order to support our work and receive our newsletters.");
}

//email a friend
var appName = navigator.appName;
var version = parseInt(navigator.appVersion);
function email_friend()
{ if((appName=="Microsoft Internet Explorer" && version>=4) || (appName=="Netscape" && version>=4))
    return true;
  else return false;   
}
var alt_email = "mailto:?subject=Changing%20Attitude%20Website&body=I%20would%20like%20to%20introduce%20you%20to%20the%20Changing%20Attitude%20website%20www.changingattitude.org%20on%20gay%20and%20lesbian%20issues%20in%20the%20Anglican%20Churches%20of%20the%20United%20Kingdom.";

//sitemap hash
function site_map_anchor()
{  //var pathname=document.links[1].pathname;
   var pathname=document.URL;
   var start = pathname.lastIndexOf('\\')
   var end = pathname.lastIndexOf('.');
   pathname = pathname.substring(start+1,end);
   if(document.URL.indexOf("index") != -1)
   { 
     document.links[0].href="sitemap.html#"+pathname;     
   }
   else
   { 
     document.links[1].href="sitemap.html#"+pathname;
   }
}

//display the bottom of the page
var revised_date = "3 April 2006";
var revised_yr_ver = "2001-2006 (Version 2)";
var revised_email = "colin@changingattitude.org";
function display_bottom_3()
{
document.write("<div class=\"smallcaption\" align=\"center\">");
document.write("&#160; <br> Copyright &#160; Changing Attitude &copy; " + revised_yr_ver + " <br> &#160; <br>");
document.write("Version 2 designed by <a href=\"http://members.tripod.co.uk/liangtea/\" target=\"other_website\">LiangTea</a> &#160; &#160; &#160; &#160; &#160;");
document.write("Last updated on " + revised_date + " by <a href=\"mailto:" + revised_email + "\">CCMC</a><br>");
document.write("</div></td></tr></table>");
}

function display_bottom_2(no,is_main)
{
//the first line
document.write("<tr><td colspan=\"2\"><div align=\"center\" class=\"sectionlink\">");
//homepage
if(no==0)
document.write("<span class=\"currentsection\">Home</span> |");
else
document.write("<a href=\"index.html\">Home</a> |");
//about us section
if(no==1)
{	if(is_main)
	document.write(" <span class=\"currentsection\">About Us </span>|");
	else
	document.write(" <a href=\"about_us_main.html\"><span class=\"currentsection\">About Us</span></a> |");
}
else 
document.write(" <a href=\"about_us_main.html\">About Us</a> |");
//news section
if(no==2)
{	if(is_main)
	document.write(" <span class=\"currentsection\">News </span>|");
	else
	document.write(" <a href=\"news_main.html\"><span class=\"currentsection\">News</span></a> |");
}
else 
document.write(" <a href=\"news_main.html\">News</a> |");
//events section
if(no==3)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Events </span>|");
	else
	document.write(" <a href=\"events_main.html\"><span class=\"currentsection\">Events</span></a> |");
}
else 
document.write(" <a href=\"events_main.html\">Events</a> |");
//get involved section
if(no==4)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Get Involved </span>|");
	else
	document.write(" <a href=\"get_involved_main.html\"><span class=\"currentsection\">Get Involved</span></a> |");
}
else 
document.write(" <a href=\"get_involved_main.html\">Get Involved</a> |");
//contacts section
if(no==5)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Contacts </span>|");
	else
	document.write(" <a href=\"contacts_main.html\"><span class=\"currentsection\">Contacts</span></a> |");
}
else 
document.write(" <a href=\"contacts_main.html\">Contacts</a> |");
//the second line
document.write("<br>");
//general synod section
if(no==6)
{	if(is_main)
	document.write(" <span class=\"currentsection\">General Synod </span>|");
	else
	document.write(" <a href=\"general_synod_main.html\"><span class=\"currentsection\">General Synod</span></a> |");
}
else 
document.write(" <a href=\"general_synod_main.html\">General Synod</a> |");
//lambeth conference section
if(no==7)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Lambeth Conference </span>|");
	else
	document.write(" <a href=\"lambeth_conference_main.html\"><span class=\"currentsection\">Lambeth Conference</span></a> |");
}
else 
document.write(" <a href=\"lambeth_conference_main.html\">Lambeth Conference</a> |");
//books section
if(no==8)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Books </span>|");
	else
	document.write(" <a href=\"books_main.html\"><span class=\"currentsection\">Books</span></a> |");
}
else 
document.write(" <a href=\"books_main.html\">Books</a> |");
//links section
if(no==9)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Links </span>");
	else
	document.write(" <a href=\"links_main.html\"><span class=\"currentsection\">Links</span></a> ");
}
else 
document.write(" <a href=\"links_main.html\">links</a> ");
//end of second line
document.write("</div>");
}

function display_bottom_1()
{
document.write("&#160; <br><table width=\"600\" border=\"0\" align=\"center\">");
//document.write("<table width=\"600\" border=\"0\" align=\"center\">");
document.write("<tr><td align=\"center\">");
document.write("<div class=\"useroption\">");
document.write("<a href=\"mailto:changinguk@freeuk.com\" onmouseover=\"status='Email us if you have any enquiries'; return true\" onmouseout=\"status='';\"><img height=\"51\" hspace=\"5\" src=\"img/email2.gif\" width=\"44\" align=\"middle\" border=\"0\" alt=\"Email Changing Attitude\"/></a>");
document.write("<br> &#160; <br>");
document.write("<a href=\"http://www.egroups.com/subscribe/lesbigayanglicans\" onmouseover=\"status='Join our email list to exchange news and information, and to support each other.'; return true\" onmouseout=\"status='';\" target=\"other_website\"><img src=\"img/join.gif\" border=\"0\" width=\"91\" height=\"52\" alt=\"Join Changing Attitude Email List\">");
document.write("</a></div>");
document.write("</td>");
document.write("<td align=\"center\"><div class=\"useroption\">");
document.write("To become a supporter of Changing Attitude, click <a href=\"application.html\" target=\"application\" onClick=\"apply();\" onmouseover=\"status='Get supporter application form'; return true\" onmouseout=\"status='';\">here</a>.");
document.write("&#160; <br> &#160; <br>");
document.write("Experienced problems in viewing this website?<br> Click <a href=\"tech_support.html\" onmouseover=\"status='Go to technical support page'; return true\" onmouseout=\"status='';\">here</a> for technical support.<br> &#160; <br>");
document.write("Click <a name=\"email2\" href=\"mailto:?subject=Changing%20Attitude%20Website%20www.changingattitude.org\" onmouseover=\"status='Email a friend about our website'; return true\" onmouseout=\"status='';\" onClick=\"if(email_friend()) href=alt_email;\">here</a> to recommend our website to a friend.");
document.write("</div>");
document.write("</td></tr>");
document.write("<tr><td colspan=\"2\"><div class=\"smallcaption\" align=\"center\">");
document.write("&#160; <br>");
document.write("Changing Attitude Trust is a registered charity No 1076808 and a non-profit company <br> limited by guarantee registered in England and Wales No 3765699.<br> &#160; <br></div>");
document.write("</td>");
document.write("</tr>");
}

//display the navigator menu on the top of the page
//no is the section number
//is_main is true for the main page of the section.  Otherwise it is false;

function display_top(no,is_main)
{
//display the first navigation menu
//document.write("<table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"navigationbar\" align=\"center\">");
document.write("<table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"  align=\"center\">");

//the first line
document.write("<tr><td colspan=\"2\"><div align=\"center\" class=\"sectionlink\">");
//homepage
if(no==0)
document.write("<span class=\"currentsection\">Home</span> |");
else
document.write("<a href=\"index.html\">Home</a> |");
//about us section
if(no==1)
{	if(is_main)
	document.write(" <span class=\"currentsection\">About Us </span>|");
	else
	document.write(" <a href=\"about_us_main.html\"><span class=\"currentsection\">About Us</span></a> |");
}
else 
document.write(" <a href=\"about_us_main.html\">About Us</a> |");
//news section
if(no==2)
{	if(is_main)
	document.write(" <span class=\"currentsection\">News </span>|");
	else
	document.write(" <a href=\"news_main.html\"><span class=\"currentsection\">News</span></a> |");
}
else 
document.write(" <a href=\"news_main.html\">News</a> |");
//events section
if(no==3)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Events </span>|");
	else
	document.write(" <a href=\"events_main.html\"><span class=\"currentsection\">Events</span></a> |");
}
else 
document.write(" <a href=\"events_main.html\">Events</a> |");
//get involved section
if(no==4)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Get Involved </span>|");
	else
	document.write(" <a href=\"get_involved_main.html\"><span class=\"currentsection\">Get Involved</span></a> |");
}
else 
document.write(" <a href=\"get_involved_main.html\">Get Involved</a> |");
//contacts section
if(no==5)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Contacts </span>|");
	else
	document.write(" <a href=\"contacts_main.html\"><span class=\"currentsection\">Contacts</span></a> |");
}
else 
document.write(" <a href=\"contacts_main.html\">Contacts</a> |");
//the second line
document.write("<br>");
//general synod section
if(no==6)
{	if(is_main)
	document.write(" <span class=\"currentsection\">General Synod </span>|");
	else
	document.write(" <a href=\"general_synod_main.html\"><span class=\"currentsection\">General Synod</span></a> |");
}
else 
document.write(" <a href=\"general_synod_main.html\">General Synod</a> |");
//lambeth conference section
if(no==7)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Lambeth Conference </span>|");
	else
	document.write(" <a href=\"lambeth_conference_main.html\"><span class=\"currentsection\">Lambeth Conference</span></a> |");
}
else 
document.write(" <a href=\"lambeth_conference_main.html\">Lambeth Conference</a> |");
//books section
if(no==8)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Books </span>|");
	else
	document.write(" <a href=\"books_main.html\"><span class=\"currentsection\">Books</span></a> |");
}
else 
document.write(" <a href=\"books_main.html\">Books</a> |");
//links section
if(no==9)
{	if(is_main)
	document.write(" <span class=\"currentsection\">Links </span>");
	else
	document.write(" <a href=\"links_main.html\"><span class=\"currentsection\">Links</span></a> ");
}
else 
document.write(" <a href=\"links_main.html\">links</a> ");


document.write("</td></tr>");
//document.write("<tr><td><hr noshade=\"noshade\" size=\"5\" width=\"100%\"></td></tr>");
document.write("</table>");
}

/*
function display_top(no,is_main)
{
//display the first navigation menu
document.write("<table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"navigationbar\" align=\"center\">");
//homepage
if(no==0)
document.write("<td width=\"15%\" align=\"center\"><img src=\"img/home_1.gif\" border=\"0\" alt=\"You are in Homepage\" class=\"button\" height=\"16\" name=\"tag1\"/></td>");
else
document.write("<tr><td width=\"15%\" align=\"center\"><a href=\"index.html\" onMouseOver=\"img_in(0); return true;\" onMouseOut=\"img_out(0);\"><img src=\"img/home.gif\" border=\"0\" alt=\"Go to Homepage\" class=\"button\" height=\"16\"/></a></td>");

//about us section
document.write("<td width=\"16%\" align=\"center\">");
if(no==1)
{	if(is_main)
    	document.write("<img src=\"img/about_us_1.gif\" border=\"0\" alt=\"You are in 'About Us' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"about_us_main.html\" onMouseOver=\"img_in(1); return true;\" onMouseOut=\"img_out(1);\"><img src=\"img/about_us_1.gif\" border=\"0\" alt=\"Go to 'About Us' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"about_us_main.html\" onMouseOver=\"img_in(1); return true;\" onMouseOut=\"img_out(1);\"><img src=\"img/about_us.gif\" border=\"0\" alt=\"Go to 'About Us' main page.\" class=\"button\" height=\"16\"/></a></td>");

//news section
document.write("<td width=\"15%\" align=\"center\">");
if(no==2)
{	if(is_main)
    	document.write("<img src=\"img/news_1.gif\" border=\"0\" alt=\"You are in 'News' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"news_main.html\" onMouseOver=\"img_in(2); return true;\" onMouseOut=\"img_out(2);\"><img src=\"img/news_1.gif\" border=\"0\" alt=\"Go to 'News' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"news_main.html\" onMouseOver=\"img_in(2); return true;\" onMouseOut=\"img_out(2);\"><img src=\"img/news.gif\" border=\"0\" alt=\"Go to 'News' main page.\" class=\"button\" height=\"16\"/></a></td>");

//events section
document.write("<td width=\"15%\" align=\"center\">");
if(no==3)
{	if(is_main)
    	document.write("<img src=\"img/events_1.gif\" border=\"0\" alt=\"You are in 'Events' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"events_main.html\" onMouseOver=\"img_in(3); return true;\" onMouseOut=\"img_out(3);\"><img src=\"img/events_1.gif\" border=\"0\" alt=\"Go to 'Events' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"events_main.html\" onMouseOver=\"img_in(3); return true;\" onMouseOut=\"img_out(3);\"><img src=\"img/events.gif\" border=\"0\" alt=\"Go to 'Events' main page.\" class=\"button\" height=\"16\"/></a></td>");

//get involved section
document.write("<td width=\"22%\" align=\"center\">");
if(no==4)
{	if(is_main)
    	document.write("<img src=\"img/get_involved_1.gif\" border=\"0\" alt=\"You are in 'Get Involved' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"get_involved_main.html\" onMouseOver=\"img_in(4); return true;\" onMouseOut=\"img_out(4);\"><img src=\"img/get_involved_1.gif\" border=\"0\" alt=\"Go to 'Get Involved' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"get_involved_main.html\" onMouseOver=\"img_in(4); return true;\" onMouseOut=\"img_out(4);\"><img src=\"img/get_involved.gif\" border=\"0\" alt=\"Go to 'Get Involved' main page.\" class=\"button\" height=\"16\"/></a></td>");

//contacts section
document.write("<td width=\"17%\" align=\"center\">");
if(no==5)
{	if(is_main)
    	document.write("<img src=\"img/contacts_1.gif\" border=\"0\" alt=\"You are in 'Contacts' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"contacts_main.html\" onMouseOver=\"img_in(5); return true;\" onMouseOut=\"img_out(5);\"><img src=\"img/contacts_1.gif\" border=\"0\" alt=\"Go to 'Contacts' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"contacts_main.html\" onMouseOver=\"img_in(5); return true;\" onMouseOut=\"img_out(5);\"><img src=\"img/contacts.gif\" border=\"0\" alt=\"Go to 'Contacts' main page.\" class=\"button\" height=\"16\"/></a></td>");

document.write("</tr></table>");

//display the second navigation menu
document.write("<table width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"navigationbar\" align=\"center\">");

//general synod section
document.write("<td width=\"30%\" align=\"center\">");
if(no==6)
{	if(is_main)
    	document.write("<img src=\"img/general_synod_1.gif\" border=\"0\" alt=\"You are in 'General Synod' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"general_synod_main.html\" onMouseOver=\"img_in(6); return true;\" onMouseOut=\"img_out(6);\"><img src=\"img/general_synod_1.gif\" border=\"0\" alt=\"Go to 'General Synod' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"general_synod_main.html\" onMouseOver=\"img_in(6); return true;\" onMouseOut=\"img_out(6);\"><img src=\"img/general_synod.gif\" border=\"0\" alt=\"Go to 'General Synod' main page.\" class=\"button\" height=\"16\"/></a></td>");

//lambeth conference section
document.write("<td width=\"30%\" align=\"center\">");
if(no==7)
{	if(is_main)
    	document.write("<img src=\"img/lambeth_conference_1.gif\" border=\"0\" alt=\"You are in 'Lambeth Conference' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"lambeth_conference_main.html\" onMouseOver=\"img_in(7); return true;\" onMouseOut=\"img_out(7);\"><img src=\"img/lambeth_conference_1.gif\" border=\"0\" alt=\"Go to 'Lambeth Conference' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"lambeth_conference_main.html\" onMouseOver=\"img_in(7); return true;\" onMouseOut=\"img_out(7);\"><img src=\"img/lambeth_conference.gif\" border=\"0\" alt=\"Go to 'Lambeth Conference' main page.\" class=\"button\" height=\"16\"/></a></td>");

//books section
document.write("<td width=\"20%\" align=\"center\">");
if(no==8)
{	if(is_main)
    	document.write("<img src=\"img/books_1.gif\" border=\"0\" alt=\"You are in 'Books' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"books_main.html\" onMouseOver=\"img_in(8); return true;\" onMouseOut=\"img_out(8);\"><img src=\"img/books_1.gif\" border=\"0\" alt=\"Go to 'Books' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"books_main.html\" onMouseOver=\"img_in(8); return true;\" onMouseOut=\"img_out(8);\"><img src=\"img/books.gif\" border=\"0\" alt=\"Go to 'Books' main page.\" class=\"button\" height=\"16\"/></a></td>");

//links section
document.write("<td width=\"20%\" align=\"center\">");
if(no==9)
{	if(is_main)
    	document.write("<img src=\"img/links_1.gif\" border=\"0\" alt=\"You are in 'Links' section main page\" class=\"button\" height=\"16\"/></td>");
	else
		document.write("<a href=\"links_main.html\" onMouseOver=\"img_in(9); return true;\" onMouseOut=\"img_out(9);\"><img src=\"img/links_1.gif\" border=\"0\" alt=\"Go to 'Links' main page.\" class=\"button\" height=\"16\"/></a></td>");
}
else
document.write("<a href=\"links_main.html\" onMouseOver=\"img_in(9); return true;\" onMouseOut=\"img_out(9);\"><img src=\"img/links.gif\" border=\"0\" alt=\"Go to 'Links' main page.\" class=\"button\" height=\"16\"/></a></td>");

document.write("</tr></table>");

}
*/

function display_top_banner(page_title)
{
document.write("<table width=\"600\" border=\"0\" align=\"center\">");
document.write("<tr><td class=\"logobackground\" width=\"113\"><a href=\"index.html\" onMouseOver=\"window.status=\'Click on the logo to return to homepage\'; return true;\" onMouseOut=\"window.status='';\"><img src=\"img/logo.gif\" width=\"113\" align=\"right\" alt=\"Changing Attitude\'s logo\" border=\"0\" class=\"button\"/></a></td>");
document.write("<td width=\"487\" class=\"pagetitle\"><div align=\"center\">" + page_title + "</div></td></tr>");
document.write("<tr><td colspan=\"2\" align=\"right\" class=\"sectionlink\"><a href=\"sitemap.html\" onClick=\"site_map_anchor();\">Site Map</a></td></tr></table>");

}
