var nowdiv = '';
var cur='';
var curpos=25;
//commented-out for text & edit writes and tput = 0
var tput=1;
lt = new Array();
var dcount = 0;
var sq ="\'";
var dcur=0;
var will=true;
lt[0]="ma1";
hi= new Array();
hi[1] = "Faq";
hi[2] = "various";
hi[3] = "images";
hi[4] = "dance";
hi[5] = "cajun";
hi[6] = "songs";
hi[7]="ses";
var hcur=0;
var subd=0;
var here =location.pathname;
//here="/www.users.waitrose.com/~cresby/Faq/FAQMagyar3.htm"
var mir=here.search("Mirror");// looking for where in the directory tree we are
var loca="";
var rest;
var dum2;
var dum3;
var dum4;
if(mir<=0)mir=here.search("cresby/");
if(mir>=0)here=here.substring(mir+7)
 for(tt=7;tt>=1;tt--){
   hcur=hi[tt].length+1;
   dum2 =hi[tt]+"\\";
   dum3 =here.substr(0,hcur);
   dum4 =(dum2==dum3);
   if(here.substr(0,hcur)==hi[tt]+"/"||here.substr(0,hcur)==hi[tt]+"\\"){
     subd=hi[tt]+"/";
   loca="../";
   }
 }
if(here.search("/")>=0)loca="../";
if((obj = findObj("mt0"))!=null) obj.style.cssText='z-index: 3;';
//0 width, 1  class , 2 mouse out.in, 3, href, 4 image, 5 text
if( xist('mt1') ){
w1stline("dd");
wtd(50,0,'me2',"index.htm","Home",0);
wtd(145,0,'lo2',0,"My Local Lists",0);
wtd(123,0,'nl2',0,"Other Local Lists",0);
wtd(90,0,'ma2',0,"Magazines",0);
wtd(20,0,'fa2',0,'','Faq/flags2.gif');
wtd(70,0,'fa2',0,"FAQ\'s",0);
wtd(100,0,'ge2',0,"My Folk pages",0);
wtd(55,0,'co2',0,"Contact",0);
divend(2);
}
will = false;
if (tput!=0){
	obj = findObj('mt1');
	obj.style.top = 5;
	dend(5);
}
if( xist('lo2') ){
w1stline("de",280,1,4);
wtrd(0,'',"My Local Lists",0,1);
wtrd(0,'',"Dance, Festivals etc",0,2);
wtrd(0,'ses/ses.htm',"Sessions by DAY",0,1);
wtrd(0,'dance.htm',"DANCE Diary",0,2);
wtrd(0,'ses/sesc.htm',"Sessions by COUNTY",0,1);
wtrd(0,'various/var3.htm#var2',"Local Ceilidh Bands",0,2);
wtrd(0,'fcd.htm',"Folk Clubs by DAY",0,1);
wtrd(0,'cajun/cajun.htm',"Cajun links",0,2);
wtrd(0,'fcc.htm',"Folk Clubs by COUNTY",0,1);
wtrd(0,'fest.html',"Festivals",0,2);
wtrd(0,'glospage.htm',"just GLOUCS Venues",0,1);
wtrd(0,'radio.htm',"Radio Programmes",0,2);
wtrd(0,'dmn.htm',"Dursley AMN",0,1);
wtrd(0,'CheltFC.htm',"Cheltenham FC",0,2);
wtrd(0,'tlink.htm',"further a-field",0,1);
wtrd(0,'various/var3.htm#dom3',"28 day Calendar",0,2);
divend(3);
}
dend(5);
//alert("lo2 done");
if( xist('ma2') ){
w1stline("de",170,1,2);
wtrd(0,'',"Paper Magazines",0,0);
wtrd(0,'mailto:mainwaring@enta.net',"Shreds &amp; Patches (Shrops)",0,0);
wtrd(0,'.shirefolk.org.uk',"Shire Folk (Oxon)",0,0);
wtrd(0,'.tradartsteam.co.uk/FM/',"Folk Monthly (W Mids)",0,0);
wtrd(0,'.broadsheep.com',"Broadsheep (Marches)",0,0);
wtrd(0,'.taplas.co.uk',"Taplas (Wales)",0,0);
wtrd(0,'http://homepage.ntlworld.com/trevor.gilson/sw/index.htm',"Solent Waves",0,0);
wtrd(0,'.frootsmag.com',"fRoots (national)",0,0);
wtrd(0,'.folklife-west.co.uk',"FolkLife West",0,0);
wtrd(0,'.2leftfeet.co.uk/Pages/Editorial%20Team.html',"Whats Afoot (Devon)",0,0);
divend(3);
}
dend(300);
//alert("ma2 done");
if( xist('ge2') ){
w1stline("de",165,1,4);
wtrd(0,'',"My Folk pages",0,0);
wtrd(0,'songs.htm',"Cresby\'s Songs",0,0);
wtrd(0,'songs/calltips.htm',"Dance callers\' tips",0,0);
wtrd(0,"various/var3.htm#dancepats","Ceilidh Dance sequences",0,0);
wtrd(0,"various/var3.htm#var7","Folklore resources",0,0);
wtrd(0,'various/var3.htm#forums',"Discussion Forums",0,0);
wtrd(0,"various/var3.htm#var6","General Websites",0,0);
wtrd(0,"various/var3.htm#lists","Listings further away",0,0);
divend(3);
}
dend(480);
//alert("ge2 done");
if( xist('co2') ){
w1stline("de",120,1,4);
wtrd(0,'',"Contact Me",0,0);
wtrd(0,'contact.htm',"Contact Mr Red",0,0);
wtrd(0,'dance/dancecont.htm',"Your Dance Details",0,0);
if(goforit!=null)wtrd(0,'',goforit,0,0);
divend(3);
}
dend(577);
if( xist('fa2') ){
w1stline("de",187,1);
wtrd(0,'','FAQ\'s',0,1);
wtrd(0,'Faq/FAQ.htm',' English','Faq/uk.gif',2);
wtrd(0,'Faq/FAQglobish.htm'," Globish",'Faq/un.gif',1);
wtrd(0,'Faq/FAQWelsh.htm',"Cymraeg ",'Faq/wa.gif',2);
wtrd(0,'Faq/FAQIt.htm',"Italiano ",'Faq/it.gif',1);
wtrd(0,'Faq/FAQFren.htm', ' Fran&ccedil;ais','Faq/fr.gif',2);
wtrd(0,'Faq/FAQSpan.htm', ' Espa&ntilde;ol','Faq/sp.gif',1);
wtrd(0,'Faq/FAQPortu.htm',"Portugu&ecirc;s ",'Faq/po.gif',2);
wtrd(0,'Faq/FAQGerm.htm', ' Deutsch','Faq/de.gif',1);
wtrd(0,'Faq/FAQneder.htm',"Nederlands ",'Faq/nd.gif',2);
wtrd(0,'Faq/FAQSvenske.htm', ' Svensk','Faq/sv.gif',1);
wtrd(0,'Faq/FAQNorske.htm',"Norske ",'Faq/nk.gif',2);
wtrd(0,'Faq/FAQDanske.htm', ' Dansk','Faq/dk.gif',1);
wtrd(0,'Faq/FAQPolska.htm',"Polskie ",'Faq/pk.gif',2);
wtrd(0,'Faq/FAQMagyar.htm', ' Magyar','Faq/ma.gif',1);
wtrd(0,'Faq/FAQrus.htm',"&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081; &#1103;&#1079;&#1099;&#1082;  ",'Faq/ru.gif',2);
wtrd(0,'Faq/FAQThai.htm', ' Thai','Faq/th.gif',1);
wtrd(0,'Faq/FAQch.htm',"Chinese ",'Faq/ch.gif',2);
divend(3);
}
dend(380);
if( xist('nl2') ){
w1stline("dz",0,1,3);
wtrd(0,'','',0,1);
wtd(0,'de','','','Other listing websites around this area and surrounding it.',0,11); 
wtrd('','',"",0,2);

wtrd(0,'','Bristol',0,1); wtd(0,'dy','','','Devon',0); wtd(0,0,'','','Gloucs',0); wtd(0,'dy','','','H &amp; W',0);
wtd(0,0,'','','Oxon',0); wtd(0,'dy','','','Somerset',0); wtd(0,0,'','','Shrops',0);wtd(0,'dy','','','Wales',0);
wtd(0,0,'','','Wilts',0); wtd(0,'dy','','','North',0); wtd(0,0,'','','South',0); wtrd('dy','',"National",0,2);

wtrd(0,'.folkaroundbristol.org.uk','FAB','',1);
wtd(0,'dy','','.devonfolk.co.uk','Devon',0); wtd(0,0,'','.glosfolk.org.uk','Glosfolk',0); wtd(0,'dy','','.worcesterfolk.org.uk','Worcs',0); wtd(0,0,'','.icknieldwaymorrismen.org.uk/folk_sessions.php','Sess',0);
wtd(0,'dy','','.sadfolk.co.uk/regular.html','SaD',0); wtd(0,0,'','.bbc.co.uk/shropshire/music/folk/folk_diary_01.shtml','R Shrops',0); wtd(0,'dy','','.folkwales.org.uk/listings.html','FolkWales',0); wtd(0,0,'','.wiltsfolka.fsnet.co.uk','Folk Ass',0);
wtd(0,'dy','','.nrkarts.co.uk/north%20staffs%20folk%20diary.pdf','Staffs',0); wtd(0,0,'','.broadsideman.co.uk','Broadside',0); wtrd('dy','various/var3.htm#lists',"My UK list",'',2);

wtrd(0,'.folkaroundbristol.org.uk/list.htm','Avon FD','',1);
wtd(0,'dy','','http://www.shammickacoustic.org.uk/events.htm','North',0); wtd(0,0,'','.mustrad.org.uk/sessions.htm','Rod<BR>Stradling',0); wtd(0,'dy','','.tbinnie.pwp.blueyonder.co.uk/2.html','Redditch',0); wtd(0,0,'','.icknieldwaymorrismen.org.uk/linker2_0_4/index.php?cat=11','FC\'s',0);
wtd(0,'dy','','.folkmusicsomerset.co.uk/somerset_folk_diary.php','Somerset<BR>Folk',0); wtd(0,0,'','.sabrinaflu.co.uk/clubs.htm','Sabrinaflu',0); wtd(0,'dy','','.torgwen.co.uk/5.html','Torfaen',0); wtd(0,0,'','.broadsideman.co.uk','Broadside',0);
wtd(0,'dy','','.lfd.org.uk','Leics',0); wtd(0,0,'','http://homepage.ntlworld.com/trevor.gilson/sw/index.htm','Solent<BR>Waves',0); wtrd('dy','.frootsmag.com/content/festivals',"fRoots",'',2);

wtrd(0,'http://swampmen.pwp.blueyonder.co.uk/FolkAroundFishponds.htm','Fishponds',0,1); wtd(0,'dy','','.harbertonfolk.co.uk','South 1',0); wtd(0,0,'','','',0); wtd(0,'dy','','.bromyardsessions.co.uk','Bromyard',0);
wtd(0,0,'','.oxonfolk.co.uk/song.htm','Oxonfolk',0); wtd(0,'dy','','.southwestfolk.freeforums.org','Wessex',0); wtd(0,0,'','.broadsheep.com/(vxxq1z2yzwgibq453jlgqpr4)/listings.aspx?page=music','Broadsheep',0); wtd(0,'dy','','http://gwenttrad.bravehost.com','Gwent',0);
wtd(0,0,'','.wiltshirefolkarts.org.uk/wfdiary.htm','Folk Arts',0); wtd(0,'dy','','.covfolk.co.uk','Warks',0); wtd(0,0,'','.focsle.org.uk/SCoFF/index.htm','SCoFF',0); wtrd('dy','.efdss.org/ukdiary.htm',"EFDSS",'',2);

wtrd(0,'.hiberniacentrebristol.org/sessionsinbristol.htm','Hibernia',0,1); wtd(0,'dy','','.flaxey-green.co.uk/Pages/Whats_On.html','South 2',0); wtd(0,'dy','','http://launch.groups.yahoo.com/group/TraditionalMusicCotswolds','Yahoo Costwolds',0,3); 
wtd(0,0,'','.bbc.co.uk/oxford/music/folk.shtml','BBC',0); wtd(0,'dy','','.mrch.freeserve.co.uk/sessions','Martin H',0); wtd(0,0,'','','',0); wtd(0,'dy','','.pluckandsqueeze.com/events.htm','Pluck &amp; Sq',0);
wtd(0,0,'','http://homepage.ntlworld.com/djfoster/Venues.htm','Swindon',0); wtd(0,'dy','','.tradartsteam.co.uk/FM', "West Mids",0); wtd(0,0,'','.sadfolk.co.uk/regular.html','Dorset',0); wtrd('dy','http://web.ukonline.co.uk/martin.nail/Folkmus.htm#Regional',"Martin Nail",0,2);


wtrd(0,'','',0,1); wtd(0,0,'dy','.w.users.waitrose.com/~pennymoor/page5.htm',"Penny's",0); wtd(0,0,'','','',0); wtd(0,0,'','','',0);
wtd(0,0,'','','',0); wtd(0,0,'','','',0); wtd(0,0,'','','',0); wtd(0,'dy','','http://launch.groups.yahoo.com/group/welshfolk/','Yahoo',0);
wtd(0,0,'','.southwestfolk.freeforums.org','Wessex',0); wtd(0,0,'','','',0); wtd(0,0,'','','',0); wtrd('dy','.folking.com',"Folking.com",0,2);

wtrd(0,'','',0,1); wtd(0,0,'','','',0); wtd(0,0,'','','',0); wtd(0,0,'','','',0);
wtd(0,0,'','','',0); wtd(0,0,'','','',0); wtd(0,0,'','','',0); wtd(0,0,'','','',0);
wtd(0,0,'','','',0); wtd(0,0,'','','',0); wtd(0,0,'','','',0); wtrd(0,'','',0,2);

wtrd('dy','','dance',0,1); wtd(0,'dy','','http://fp.jculf.plus.com/hfolk/ceilidhs.htm','Devon',0); wtd(0,'dy','','dance.htm','Mr Red',0); wtd(0,'dy','','.frenchdanceleeds.co.uk/events/frenchdiaryuk.php','FrenchUK',0);
wtd(0,'dy','','.oxonfolk.co.uk/dance.htm','Oxon',0); wtd(0,'dy','','.poppyrecords.co.uk/bathceilidh/links.htm','Bath',0); wtd(0,'dy','','.webfeet.org/events.html','Webfeet',0); wtd(0,'dy','','.areyoudancing.com','AreYouDancing',0,3);
//wtd(0,'dy','','','dance',0); 
wtd(0,'dy','','http://www.btinternet.com/%7Eradical/thefolkmag/dancediary.htm','WM Dance',0); wtd(0,'dy','','.setandturnsingle.org.uk/diary/diary.htm','S&amp;TSingle',0); wtrd('dy','http://www.cajunuk.motagator.net/who_are_we_2.html','Cajun',0,2);

//wtrd(0,'url','text',0,1); wtd(0,'dy','','url','text2',0); wtd(0,0,'','url','text3',0); wtd(0,'dy','','url','text4',0);
//wtd(0,0,'','url','text5',0); wtd(0,'dy','','url','text6',0); wtd(0,0,'','url','text7',0); wtd(0,'dy','','url','text8',0);
//wtd(0,0,'','url','text9',0); wtd(0,'dy','','url','text10',0); wtd(0,0,'','url','text11',0); wtrd(0,'url','text12',0,2);

divend(3);
}
dend(1);

if( xist('me2') ){
w1stline("dd",110,1);
wtrd(0,'index.htm','','images/redbtl.gif',0);
wtrd(0,'','RED between the lines?','',0);
wtrd(0,'','&nbsp;','',2);
divend(3);
}
dend(5);
hil('n');

//function w1stline
//awid = width, 
//aclas = class 
//aout onMouseOut attribute = onMouseOver. if 'n' then only MouseOut written
//ahref is the <A HREF= URL> TAG, if 0 no TAG is written
//atext is the cell text
//aleft is the image URL, if a number no image is TAGged, but if 9 then.....
//apad - cell padding.

nowdiv = null;

function w1stline(atext,awid,aout,apad){
 var xmov="<DIV id="+nowdiv+" class="+nowdiv
 if(aout==1)xmov=xmov+" onMouseOut=hil(\'"+nowdiv+"\') onMouseOver=shl(\'"+nowdiv+"\')";
 xmov=xmov+"><table class="+atext;
 if(apad!=null&&apad>=1)xmov=xmov+" cellpadding="+apad;
 if(awid!=null&&awid>=10)xmov=xmov+" width="+awid;
 dw(xmov+"><TR>");
 nowdiv='';
}

function divend(aclas){
var dmov='';
 if(aclas>=1&&aclas<=2)dnd();
 if(aclas>=2)dmov=dmov+"</Table></DIV>";
 dw(dmov);
}
function dend(aleft){
	var obj;
 if(tput!=0){
	obj=findObj(cur);
	obj.style.left = aleft;
 if(dcur!=1){
	obj.style.top = 25;
	obj.style.visibility = 'hidden';
 }
 }
}

function dnd(){
 dw("</TR>");
}

function wtd(awid,aclas,aout,ahref,atext,aimg,lr){
 var temp="";
 var dum="";
 var duma='';
 var dumb='';
 var dumc='';
 var loca1=loca;
 var targ=" target='_top'";
 var tmov="<TD";
  if(lr==1)tmov=tmov+" align=left";
  if(lr==2)tmov=tmov+" align=right";
  if(lr>=3)tmov=tmov+" align=center colspan="+(lr-1);
 if(awid>=10)tmov=tmov+" width="+awid;
 if(aclas!=0)tmov=tmov+" class="+aclas;
  if(aout.length!=0){
  if (will) {
    tmov=tmov+" onMouseOut=hil(\'"+aout+"\')"; // no out on cells only divs
    if (aout!="n") tmov=tmov+" onMouseOver=shl(\'"+aout+"\')";
  }
 }//aout.length!=0
 tmov=tmov+">";
 temp='';
  if(ahref!=0){  temp="<A HREF=";
  if(ahref.substr(0,1)=='.') ahref="http://www"+ahref;
  if(ahref.search("http:")==-1){
   if(ahref.search("mailto:")!=-1)loca1="" ;
   dum=ahref.search("#");
    if(subd!=0&&ahref.substr(0,subd.length)==subd&&subd!="ses/"){
     loca1="";
     targ = " target='_self'";
     dumb=".htm";
     if(ahref.substr(ahref.length-3,30)=="htm"||ahref.substr(ahref.length-4,30)=="html")dumb="";
     ahref= ahref.substr(dum+1,30)+dumb;
   }
    if(ahref.search("/")!=-1) loca1=loca;
  } else{//ahref.search("http:")
   loca1="";
  }
  temp=temp+loca1+ahref; 
  tmov=tmov+temp+targ+">";
 }//ahref!=0
 temp='';
 if(aimg!=0){
//  alert(aimg);
  if((here.substr(0,3)==aimg.substr(0,3))&&(loca.length==0))aimg="../"+aimg;// for IE local it can't see \
  temp="<img src="+loca+aimg;
  dum = aimg.toLowerCase();
  if(dum.substr(0,3)=="faq") temp = temp +" width=22 height=16";  
  temp = temp+" border=0>";
 } //aimg!=0
if(lr<=1) tmov=tmov+temp+atext;
 if(lr==null||lr>=2)tmov=tmov+atext+temp;
 if(ahref!=0){
  tmov=tmov+"</A>";
 } //ahref!=0
 dw(tmov+"</TD>");
} //function

function dw(dwtext){
//for text & edit of homepage tables
if(tput==0){
  for(i=0;i<dwtext.length;i++){
   if(dwtext.substr(i,1)=="<")dwtext=dwtext.substr(0,i)+"£"+dwtext.substr(i+1,dwtext.length);
   if(dwtext.substr(i,1)==">")dwtext=dwtext.substr(0,i)+"$"+dwtext.substr(i+1,dwtext.length);
   if(dwtext.substr(i,1)=="&")dwtext=dwtext.substr(0,i)+"^"+dwtext.substr(i+1,dwtext.length);
  }//for
 dwtext=dwtext+"<BR>";
}
self.document.write(dwtext);
}//function

function wtrd(aclas,ahref,atext,aimg,lr){
 var temp='';
 if(lr==1)temp="<TR>";
 if(lr==0)temp="<TR align=center>";
 dw(temp);
 temp='';
 if(lr==0||lr>=2)temp = ("</TR>");
 wtd(0,aclas,"",ahref,atext,aimg,lr);
dw(temp);
}

function wtr(awid,aclas){
 var rmov="<TR";
 if(awid!=0)rmov=rmov+" width="+awid;
 if(aclas!=null)rmov=rmov+" class="+aclas;
 dw(rmov+">");
}

function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
 for (i=0; !foundObj && i < theDoc.forms.length; i++) foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}

function xist(lay){
 var obj;
 nowdiv=lay;
 cur=lay;
 lt[dcur++]=lay;
 return ((obj=findObj(lay))==null);
}

function shl(lid){ 
	nowdiv=lid;
	if((obj = findObj(lid))!=null) {
	 obj.style.top= curpos;
	 obj.style.visibility = 'visible';
	}
}// function

function hil(lod){ 
	if((obj= findObj(nowdiv))!=null) obj.style.visibility = 'hidden';
	if(++dcount==9) {
            if((obj = findObj('mt0'))!=null) obj.style.visibility = 'hidden';
            if((obj = findObj('rl1'))!=null) obj.style.visibility = 'hidden';
          }
	nowdiv = null;
}// function

