winh = screen.availHeight
function openwindow(href,name,mywidth,myheight)
{
hpos = winh - 112 - myheight
window.name='suwc'
window.open(href,name,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+mywidth+',height='+myheight+',screenX=10,screenY='+hpos+',top='+hpos+',left=10')
}

function popup(ref)
{
href = "popups.php?ref=" + ref;
openwindow(href,'popup',400,300);
}

moz=document.getElementById&&!document.all
mozHeightOffset= 0

function resize_minithisweek(){
document.getElementById('minithisweek_id').height=window.frames["minithisweek_name"].document.body.scrollHeight+(moz?mozHeightOffset:0)
}

var pagename=new Array(12)
pagename[0]="Home"
pagename[1]="Calendar"
pagename[2]="Committee"
pagename[3]="Gear Advice"
pagename[4]="How to Join"
pagename[5]="Market Place"
pagename[6]="Photo Gallery"
pagename[7]="Socials"
pagename[8]="This Week"
pagename[9]="Walks"
pagename[10]="Weekend Trips"
pagename[11]="Documentation"
pagename[12]="Email the Club"

var pagehtml=new Array(12)
pagehtml[0]="index.html"
pagehtml[1]="calendar.html"
pagehtml[2]="committee.html"
pagehtml[3]="gear.html"
pagehtml[4]="join.html"
pagehtml[5]="market.html"
pagehtml[6]="photogallery.html"
pagehtml[7]="socials.html"
pagehtml[8]="thisweek.php"
pagehtml[9]="walks.html"
pagehtml[10]="trips.html"
pagehtml[11]="docs.html"
pagehtml[12]="mailto:suwc@sheffield.ac.uk"


var links = {
	'0':{'type':'link','name':'Sheffield University','href':'http://www.shef.ac.uk/','description':'Sheffield University'},
	'1':{'type':'link','name':'The Students Union','href':'http://www.shef.ac.uk/union/','description':'The Students Union'},
	'2':{'type':'link','name':'Met Office','href':'http://www.meto.gov.uk/weather/europe/uk/','description':'UK weather forecasts'},
	'10':{'type':'subheading','text':'Clubs & Organisations'},
	'11':{'type':'link','name':'BMC','href':'http://www.thebmc.co.uk/','description':'British Mountaineering Council'},
	'12':{'type':'link','name':'Council for National Parks','href':'http://www.cnp.org.uk/','description':'Info on the UKs 11 national parks'},
	'13':{'type':'link','name':'Long Distance Walkers Association','href':'http://www.ldwa.org.uk/','description':'Information on Britains long distance paths'},
	'14':{'type':'link','name':'LUHC club links','href':'http://www.luhc.org.uk/links/clubs.html','description':'Links to all UK student walking clubs'},
	'15':{'type':'link','name':'Ramblers Association','href':'http://www.ramblers.org.uk/','description':'Everything there is to know about rambling'},
	'20':{'type':'subheading','text':'Local'},
	'21':{'type':'link','name':'Saddpeds','href':'http://www.saddleworthpeds.org/','description':'Saddleworth Pedestrians Walking Club (North Dark Peak area)'},
	'22':{'type':'link','name':'Sheffield City Net','href':'http://www.sheffieldcity.net/','description':'Information, local organisations and events listings for Sheffield'},
	'23':{'type':'link','name':'Sheffield Only','href':'http://www.sheffieldonly.co.uk/','description':'Everything about Sheffield'},
	'24':{'type':'link','name':'Sheffield on the Internet','href':'http://www.sheffnet.net/','description':'Information Source for Sheffield, South Yorkshire and the Peak District for business, tourists, visitors and expats'},
	'25':{'type':'link','name':'Sheffield Walking Group','href':'http://www.sheffieldwalkinggroup.org.uk/','description':'Walking group aimed at, but not exclusive to, people in their 20s and 30s'},
	'26':{'type':'link','name':'Peak National Park','href':'http://www.peakdistrict.org/','description':'Official Peak District web-site'},
	'27':{'type':'link','name':'Discover Derbyshire and <br>the Peak District','href':'http://www.derbyshire-peakdistrict.co.uk/','description':'An independent Guide to the Peak National Park and Derbyshire'},
	'30':{'type':'subheading','text':'Scenery'},
	'31':{'type':'link','name':'Mountain Images','href':'http://www.mountain-images.co.uk/','description':'Professional mountain photographs'},
	'32':{'type':'link','name':'Scottish Mountain Photo Gallery','href':'http://www.gla.ac.uk/medicalgenetics/gallery.htm','description':'Extensive photogallery of the Scottish highlands'},
	'40':{'type':'subheading','text':'Travel'},
	'41':{'type':'link','name':'Ordnance Survey','href':'http://www.ordnancesurvey.gov.uk/','description':'Purchase maps online'},
	'42':{'type':'link','name':'National Rail Enquiries','href':'http://ojp.nationalrail.co.uk/en/pj/jp','description':'UK train timetable enquiries'},
	'43':{'type':'link','name':'Yorkshire Journey Planner','href':'http://www.yorkshiretravel.net/journeyplanner/','description':'Bus & train enquiries in the Sheffield region'},
	'44':{'type':'link','name':'Youth Hostel Association','href':'http://www.yha.org.uk/','description':'Affordable accommodation in England and Wales'},
	'45':{'type':'link','name':'YHA Scotland','href':'http://www.syha.org.uk/','description':'Affordable accommodation in Scotland'},
	'50':{'type':'subheading','text':'Walking'},
	'51':{'type':'link','name':'Daleswalks.co.uk','href':'http://www.daleswalks.co.uk/','description':'Walking routes in the Yorkshire Dales'},
	'52':{'type':'link','name':'Lakeswalks.co.uk','href':'http://www.lakeswalks.co.uk/','description':'Walking routes in the Lake District'},
	'53':{'type':'link','name':'Three Peaks Challenge','href':'http://www.3peaks.info/','description':'Ben Nevis, Scafell Pike and Snowdon in 24 hours'},
	'54':{'type':'link','name':'Walking Britain','href':'http://www.walkingbritain.co.uk/','description':'Large database of walks and other information'},
	'55':{'type':'link','name':'Countryside Code','href':'http://www.countrysideaccess.gov.uk/countryside_code/index.php','description':'A set of guidelines designed to protect the countryside for future generations'},
	'56':{'type':'subheading','text':'Retailers'},
	'57':{'type':'link','name':'Webtogs','href':'http://www.webtogs.co.uk/','description':'Offer a wide range of walking related items. All members are entitled to a 11% discount - email the club for details.'}
	}


function MakePage(heading,PageID,subheading)
{

// to redirect all visitors to the suwc.co.uk domain

if (window.location.href.indexOf("www.suwc.union.shef.ac.uk") != -1) window.location.href=window.location.href.replace(/www.suwc.union.shef.ac.uk/,"www.suwc.co.uk")

else if (window.location.href.indexOf("suwc.union.shef.ac.uk") != -1) window.location.href=window.location.href.replace(/suwc.union.shef.ac.uk/,"www.suwc.co.uk")

document.write("\
<table cellspacing=0 border=0 height=\"100%\" width=\"100%\" cellpadding=0 valign=\"top\">\
<tr><td colspan=7 height=100 background=\"images/banner_bg.jpg\" valign=\"bottom\"><img src=\"images/banner.jpg\" height=100 vspace=0></td></tr>\
<tr height=4><td colspan=5></td></tr>\
<tr>\
<td width=3></td>\
<td valign=\"top\" width=140>\
	<table cellspacing=1 class=\"bordercolor\" width=\"100%\" style=\" font-family:arial ; font-size:13pt\">")
		cell=0
		while (cell <13)
		{if (cell!=PageID)
			{document.write("\
			<tr>\
			<td class=\"boxcolor\"><a href=\""+pagehtml[cell]+"\">"+pagename[cell]+"</a></td><td>&nbsp</td>\
			</tr>")}
		else if (subheading!=0)
			{document.write("\
			<tr>\
			<td class=\"highlightcolor\"><a href=\""+pagehtml[cell]+"\"><b><font color=#000000> "+pagename[cell]+"</font></b></a></td><td>&nbsp;</td>\
			</tr>")
			}	
		else
			{document.write("\
			<tr>\
			<td class=\"highlightcolor\"><b>"+pagename[cell]+"</b></td><td>&nbsp</td>\
			</tr>")
			}	
		cell++}

	document.write("\
	</font></table>\
</td>\
<td width=5></td>\
<td valign=\"top\">\
  <table cellspacing=1 width=\"100%\" class=\"bordercolor\">\
	<tr><td align=\"right\" valign=\"top\"  class=\"highlightcolor\">\
	<font size=\"+3\" face=\"arial\"><b>"+heading+"&nbsp;</b></font>")
		if (subheading!=0) {document.write("<br><font face=\"arial\"><b>"+subheading+"&nbsp;</b></font>\
		</td></tr><tr><td class=\"boxcolor\">\
		<div class=\"smalltext\"><a href=\""+pagehtml[PageID]+"\">&nbsp;&nbsp;Back to "+heading+"</a></div>")}
	document.write("\
	</td></tr><tr><td valign=\"top\" align=\"center\" height=\"100%\" class=\"boxcolor\">\
")
}


function Links()
{document.write("\
  </td></tr></table><br>\
</td>\
<td width=5></td>\
<td valign=\"top\" width=140>\
 <table cellspacing=0 cellpadding=0><tr><td>\
\
   <table cellspacing=1 cellpadding=2 class=\"bordercolor\" width=100%><tr>\
    <td class=\"highlightcolor\" align=\"center\"><h4>This Week</h4></td>\
    </tr><tr>\
    <td class=\"boxcolor\" align=\"center\"><iframe width=\"100%\" height=25  id=\"minithisweek_id\" name=\"minithisweek_name\" src=\"minithisweek.php\" scrolling=\"no\" frameborder=\"0\" allowtransparency=\"true\" onload=resize_minithisweek() onmouseover=resize_minithisweek()>\
    </IFRAME></td>\
    </tr></table>\
\
 </td></tr>\
 <tr><td height=5></td></tr>\
 </tr><td>\
\
  <table cellspacing=1 class=\"bordercolor\" width=100%><tr>\
	<td align=\"center\" valign=\"top\" width=100% class=\"highlightcolor\">\
	<h4>External Links</h4>\
   </td></tr><tr><td align=\"center\" valign=\"top\" width=100% class=\"boxcolor\" >\
	<div class=\"smalltext\">")

for(var ref in links)
  {
	var link = links[ref];
	if (link.type=="link") document.write("<a href=\""+link.href+"\" title=\""+link.description+"\" onMouseOver=\"window.status='"+link.description+"'; return true\" onMouseOut=\"window.status='';return true\" target=\"_blank\">"+link.name+"</a><br>")
	if (link.type=="subheading") document.write("<center><h5>"+link.text+"</h5></center>")

  }


document.write("\
	</div>\
   </td></tr></table><br>\
  </td><td width=3></td></tr></table>\
 </td></tr></table>\
</td>\
</tr>\
</table>\
")
}

//	<h5>Sponsors</h5>\
//	<a href=\"http://www.decathlon.co.uk/\"  onMouseOver=\"window.status='Sheffield University Walking Club is sponsored by Decathlon'; return true\" onMouseOut=\"window.status='';return true\" target=\"_blank\">Decathlon<br><img src=\"images/decathlon_sm.jpg\" border=\"0\"></a><br>\





function image(address,caption,prev,next)
{
document.open()
document.write("\
<html>\
<head>\
<title>SUWC - "+address+"</title>\
<link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\">\
</head>\
<body link=\"#006600\" vlink=\"#006600\">\
<center>\
<br><table class=\"bordercolor\" cellspacing=1 cellpadding=3><td class=\"boxcolor\">\
<div class=\"smalltext\"><a href=\"#\" onclick='history.back(); return false'>back to thumbnail</a></div>\
<img src=\""+address+"\" id=\"pic\"><br>\
<center><font size=\"+1\">"+caption+"</font>\
</td></tr></table><br>\
</center>\
</body>\
</html>\
")
}

