// create media iframe in non-nested home page

/* instead of target="media" or target="_self", 
         use rel="mediabar". findMediabar chooses
         anchor.target="media" to call rotating news,
         updates, documents & pictures, etc.  in media bar
         if and only if media bar exists, which it does
         not if the live homepage is nested */

/* exchange home page (target="_top" on foot home page) 
      will set its own media bar featuring blog posts */

// media bar need not be an iframe, it can be generated.

function setMediabar(){ 
if(top.location==self.location){ 
document.write('<td width="29" background="sp_note.gif"><img src="blank.gif" width="29" height="5" border="0"></td><td width="640" align="left" bgcolor="#FFFFFF"><iframe name="media" src="http://oldtakoma.net/binder.html" style="border: 0" width="640" height=100% frameborder="0" noresize scrolling="no"></iframe></td>'); 
}
else{ 
document.write('<td colspan="2" align="left"><b><font face="white">&nbsp;</font></b></td>'); 
} }

function findMediabar(){ 
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i < anchors.length; i++) { 
var anchor = anchors[i]; 
if (anchor.getAttribute("href") &&
     anchor.getAttribute("rel") == "mediabar" &&
     top.location==self.location){ 
anchor.target = "media"; 
} } }

if(top.location==self.location){
window.onload=findMediabar(); 
}

// hidden e-mail link (volunteer coordinator)

function voleml(){ 
var addr1 = "mailto:"
var addr2 = "foot.volunteer"
var addr3 = "@"
var addr4 = "gmail.com"
var addr5 = "?subject=Volunteer%20Request"
document.write('<a href="' + addr1 + addr2 + addr3 + addr4 + addr5 + '">')
document.write ('<font face="Gadget" size="2" color="#FF3355">Click Here</font></a>')
}


// javascript called by foot.html (noframes version) 
//  redirects to iframe in electricmaid.org pages.


function goTo(mobb){
bobb=parent.location.href;
if(bobb.indexOf('electricmaid')!=-1){
parent.location.href='http://electricmaid.org';
// tobb=parent.document.getElementbyId('maid');
// parent.tobb.location.href='http://electricmaid.org/'+mobb;

} else{
parent.location.href='http://electricmaid.org';
// tobb=parent.document.getElementbyId('maid');
// parent.tobb.location.href='http://electricmaid.org/'+mobb;

}  } 