var ns4=(document.layers) ? true:false;
var ns6=(document.getElementById) ? true:false;
var ie4=(document.all) ? true:false;
var nsie456=(
  ((navigator.appName=="Netscape") && (parseInt(navigator.appVersion)>=3)) ||
  ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4))
);
var ie5=false;
if(ie4){
 if((navigator.userAgent.indexOf('MSIE 5')>0) ||
    (navigator.userAgent.indexOf('MSIE 6')>0)) {
  ie5=true;
 }
 if(ns6){ ns6=false; }
}
ver4=(ns4 || ie4 || ie5 || ns6 || nsie456) ? true:false;
var status0  = "An Appeal from the Archive e.Librarian";
var status1  = "Rudolf Steiner Archive HOME Page";
var status2  = "Some Background for First-time Visitors";
var status3  = "Steiner e.Lib: Written Works and Statistics";
var status4  = "Anthroposophical Society in America Directory";
var status5  = "Get Involved: Forums, Discussions, Projects";
var status6  = "Related Sites and Links";
var status7  = "Current Calendar of the Soul Verse";	
var status8  = "Contact the Mayflower Book Store";
var status9  = "Rudolf Steiner Archive Book Shop";
var status10 = "Book Finders Links";
var status11 = "The e.Lib Reading Room";
var status12 = "Fine Art Presentations";
var status13 = "The e.Lib Home Page";
var status14 = "Go to Previous Page";
var status15 = "Send Us Comments via e.Mail";
var status16 = "Send Comments to C4 Systems";
var status17 = "Contact the Rudolf Steiner Library in Ghent, NY";
var status18 = "Our Thank You Page";
var status19 = "Archive NewsWire: News From Around the World";
var status20 = "Rudolf Steiner Biography";
var status21 = "What's New at the Archive?";
var status22 = "Our Statement of Purpose";
var status23 = "Steiner Quote of the Day";
var status24 = "What's Coming to the Archive?";
var status25 = "What's Old at the Archive?";
var status26 = "The History of this Initiative";
var status27 = "Steps in Digitizing Documents";
var status30 = "Holdings: The Writings of Rudolf Steiner (Pictures, too)";
var status31 = "On-Line Stuff: Books, Lectures, Articles, Essays, Related";
var status32 = "Summaries, Statistics, and Information";
var status33 = "Chronological Listing of Lectures";
var status40 = "Archive e.Surveys and e.Polls";
var status41 = "Forums, Conversations, Discussions";
var status42 = "Sign the Archive Guestbook";
var status43 = "Calendars, Clocks, etc.";
var status60 = "The Basics: Books by Rudolf Steiner that you should read";
var status61 = "The Five Basic Books by Rudolf Steiner";
var status62 = "Books on Rudolf Steiner by Other Authors";
var status63 = "Exploring Education as Seen by Rudolf Steiner";
var status64 = "Adolph Arenson's Top 50 Steiner Lecture Cycles";
var status90 = "Steiner BookShop: Rudolf Steiner Press Section";
var status95 = "Steiner BookShop: Amazon.com Section";
var status96 = "Steiner BookShop: Barnes & Noble Section";
var status97 = "Steiner BookShop: Powells Books Section";
var status110 = "Who is Rudolf Steiner? Waldorf Answers will tell you!";
var status111 = "Buy Prints or Posters from Art.com.";
var status112 = "Musical Selections for your enjoyment";
var status113 = "Help Support the Rudolf Steiner Archive";
var status117 = "Visit the e.Lib Stuff Shop at CafePress.com";
var status141 = "Anthroposophical Society in America Main Website";
var status143 = "Anthroposophical Society Directory of Initiatives";
var status145 = "The General Anthroposophical Society in Dornach, Switzerland";
var status146 = "The Biodynamic Farming and Gardening Association";
var status191 = "Archive NewsWire: Technical News Section";
var status192 = "Archive NewsWire: Financial News Section";
var status194 = "Archive NewsWire: World News Section";
var status195 = "Archive NewsWire: U.S. News Section";
var status196 = "Archive NewsWire: Science News Section";
var status197 = "Archive NewsWire: Health News Section";
var status200 = "Just a little Welcome to the Archive page";
var status201 = "What's New at the Archive?";
var status202 = "Calendar of the Soul Information";	
var status204 = "Search the Rudolf Steiner Archive";	
var status205 = "Blackboard Artistry of Rudolf Steiner";	
var status206 = "Contributions, Gifts, and Purchasing Our Offerings";	
var status207 = "Help with understanding the Left-side Menu area";	
var status208 = "What's Coming to the Archive?";
var status209 = "What's Old at the Archive?";
var status210 = "What's Up at the Archive? What's New, Coming, and Old!";
var status211 = "Our recommendations for your best viewing experience.";	
var status213 = "Help Support the Rudolf Steiner Archive";
var status214 = "The Rudolf Steiner On-Line Archiv";
var status215 = "Our Link Partners";
var status301 = "Rudolf Steiner Archive HOME Page";
var status304 = "Search the Rudolf Steiner Archive";	
var status306 = "Related Sites and Links";
var status307 = "Help with understanding the Rudolf Steiner Archive";	
var status310 = "The Goethean Science Site";
var status311 = "KnowNews dot Net NewsWire";
var status312 = "Fine Art Presentations";
var status313 = "The e.Lib Home Page";
var status315 = "Send Us Comments via e.Mail";
var status317 = "Contact the Rudolf Steiner Library in Ghent, NY";
var status318 = "Our Thank You Page";
var status319 = "Archive NewsWire: News From Around the World";
var status320 = "Herb Tandree Anthroposophical Books";
var status401 = "The Day of the Week Exercises.";
var status402 = "A Note on our Internet-related Services.";
var status403 = "Anthroposophically-related News Items.";
var status404 = "About Linking to the Rudolf Steiner Archive.";
var status405 = "On This Day ... Steiner Lectured on ...";
var status406 = "We highly recommend the Firefox browser.";
var status407 = "Help us by using Amazon.com for your shopping needs!";
var status420 = "Find the Rudolf Steiner Archive on Facebook!";
var status421 = "The Books Section at the Rudolf Steiner Archive!";
var status422 = "The Lectures Section at the Rudolf Steiner Archive!";
var status423 = "The Articles Section at the Rudolf Steiner Archive!";
var status424 = "The Related Articles Section at the Rudolf Steiner Archive!";
var status425 = "The Related Authors Section at the Rudolf Steiner Archive!";
if(ver4) {
  var I1=new Image; var I2=new Image;
  I1.src="http://images.rsarchive.org/icons/c4bluecirc.gif";
  I2.src="http://images.rsarchive.org/icons/dbluecirc.gif";
}
function mouse_over(imageNum) {
  if(!ver4) return true;
  var name; var iname;
  name="status"+imageNum;
  window.status=eval(name);
  name ="image"+imageNum;
  iname="I2"+".src";
  document[name].src=eval(iname);     
  return true;
}
function mouse_out(imageNum) {
  if(!ver4) return true;
  var name; var iname;
  window.status=" ";
  name ="image"+imageNum;
  iname="I1"+".src";
  document[name].src=eval(iname);
  return true;
}
function status_over(statNum) {
  if(!ver4) return true;
  var name;
  name="status"+statNum;
  window.status=eval(name);
  return true;
}
function status_out(statNum) {
  if(!ver4) return true;
  var name;
  window.status=" ";
  return true;
}
function openWindow(theURL,winName,features) { //v2.0
  features="resizable=yes,"+features;
  window.open(theURL,winName,features);
}
function launchzoom() {
  w=screen.width*0.7
  h=screen.height*0.7
  w=780
  h=580
  open('/Maps/zoommap/index.php?MAP=%2FMaps%2Fimages%2Feurope06a.png&SMALLMAP=%2FMaps%2Fimages%2Feurope06as.png&MAPNAME=Map+of+Europe+after+World+War+I&INFO=Map+of+Europe%0D%0ANational+borders+after+the+First+World+War&TTF_SIZE=25&TITLECOLOR=F0F0F0&INFOCOLOR=010101','zoommap','width='+w+',height='+h+',scrollbars=no,resizable=1,toolbar=no,status=0,menubar=false')
}
var http=createRequestObject();
var displayRating='';
var totalRating='';
var currentId='';
var numStars=10;
var urlPref='http://www.rsarchive.org/Ratit/';
function createRequestObject() {
  var ro;
  var browser=navigator.appName;

  if(browser=="Microsoft Internet Explorer") {
    ro=new ActiveXObject("Microsoft.XMLHTTP");
  } else {
    ro=new XMLHttpRequest();
  }
  return ro;
}
function updateRating(obj, rating) {
  var id=obj.title;
  var fullId=obj.id;
  var idName=fullId.substr(0, fullId.indexOf(':'));
  var totalRating=rating;
  currentId=idName;

  http.open('get', urlPref+'rc.php?id='+id+'&idName='+idName);
  http.onreadystatechange=handleResponse;
  http.send(null);
}
function handleResponse() {
  if(http.readyState==4) {
    var response=http.responseText;

    if(response=='ERROR') {
      alert("Sorry... Failed to update rating.");
    } else {
      alert("Thank you for your time.");
    }
    displayRating=response.substr(0, 4);
    document.getElementById(currentId+':showrating').innerHTML='Rating: '+displayRating;
    totalRating=Math.ceil(response);
    var obj=document.getElementById(currentId+':'+totalRating);
    //changeover(obj, totalRating);
    changeout(obj, totalRating);
    //displayStars(totalRating, currentId);
  }
}
function changeover(obj, rating) {
  var imageName=obj.src;
  var id=obj.title;
  var index=imageName.lastIndexOf('/');
  var filename=imageName.substring(index+1);
  var fullId=obj.id;
  var idName=fullId.substr(0, fullId.indexOf(':'));
  var totalRating=rating;

  for(i=0; i<id; i++) {
    var num=i+1;

    if(num%2==0) {
      document.getElementById(idName+':'+num).src=urlPref+'images/_even2.jpg';
    } else {
      document.getElementById(idName+':'+num).src=urlPref+'images/_odd2.jpg';
    }
  }
}
function changeout(obj, rating) {
  var imageName=obj.src;
  var id=obj.title;
  var index=imageName.lastIndexOf('/');
  var filename=imageName.substring(index+2);
  var fullId=obj.id;
  var idName=fullId.substr(0, fullId.indexOf(':'));
  var totalRating=rating;

  for(i=0; i<numStars; i++) {
    var num=i+1;

    if(num%2==0) {
      if(i<totalRating) {
       document.getElementById(idName+':'+num).src=urlPref+'images/__even2.jpg';
      } else {
       document.getElementById(idName+':'+num).src=urlPref+'images/even2.jpg';
      }
    } else {
      if(i<totalRating) {
       document.getElementById(idName+':'+num).src=urlPref+'images/__odd2.jpg';
      } else {
       document.getElementById(idName+':'+num).src=urlPref+'images/odd2.jpg';
      }
    }
  }
}
function displayStars(rating, idName) {
  for(i=0; i<numStars; i++ ) {
    if(i%2==0) {
      if(i<rating) {
        document.write('<img src="'+urlPref+'images/__odd2.jpg" id="'+idName+':'+(i+1)+'" title="'+(i+1)+'" onmouseout="changeout(this, '+rating+')" onmouseover="changeover(this, '+rating+')" onclick="updateRating(this, '+rating+')" />');
      } else {
        document.write('<img src="'+urlPref+'images/odd2.jpg" id="'+idName+':'+(i+1)+'" title="'+(i+1)+'" onmouseout="changeout(this, '+rating+')" onmouseover="changeover(this, '+rating+')" onclick="updateRating(this, '+rating+')" />');
      }
    } else {
      if(i<rating) {
        document.write('<img src="'+urlPref+'images/__even2.jpg" id="'+idName+':'+(i+1)+'" title="'+(i+1)+'" onmouseout="changeout(this, '+rating+')" onmouseover="changeover(this, '+rating+')" onclick="updateRating(this, '+rating+')" />');
      } else {
        document.write('<img src="'+urlPref+'images/even2.jpg" id="'+idName+':'+(i+1)+'" title="'+(i+1)+'" onmouseout="changeout(this, '+rating+')" onmouseover="changeover(this, '+rating+')" onclick="updateRating(this, '+rating+')" />');
      }
    }
  }

  if(displayRating=='') {
    if(rating==0) {
      document.write('<br /><div class="ratingText" id="'+idName+':showrating" >No ratings, yet!<BR>Use MouseOver</div>');
    } else {
      document.write('<br /><div class="ratingText" id="'+idName+':showrating" >'+displayRating+'</div>');
    }
  } else {
    document.write('<br /><div class="ratingText" id="'+idName+':showrating" >'+totalRating+'</div>');
  }
}
var newwindow = '';
function popitup(url,winame,winfeat) {
  if(!newwindow.closed && newwindow.location) {
    newwindow.location.href = url;
  } else {
    newwindow=window.open(url,winame,winfeat);
   	if(!newwindow.opener) newwindow.opener = self;
  }
  if(window.focus) {newwindow.focus()}
  return false;
}
/*
document.write(unescape("%3C%53%43%52%49%50%54%20%74%79%70%65%3D%22%74%65%78%74%2F%6A%61%76%61%73%63%72%69%70%74%22%3E%3C%21%2D%2D%0D%0A%61%6D%3D%22%54%68%69%73%20%70%61%67%65%20%68%61%73%20%62%65%65%6E%20%70%72%6F%74%65%63%74%65%64%2E%20%50%72%65%76%69%65%77%20%6F%6E%6C%79%2E%22%3B%62%56%3D%70%61%72%73%65%49%6E%74%28%6E%61%76%69%67%61%74%6F%72%2E%61%70%70%56%65%72%73%69%6F%6E%29%3B%62%4E%53%3D%6E%61%76%69%67%61%74%6F%72%2E%61%70%70%4E%61%6D%65%3D%3D%22%4E%65%74%73%63%61%70%65%22%3B%62%49%45%3D%6E%61%76%69%67%61%74%6F%72%2E%61%70%70%4E%61%6D%65%3D%3D%22%4D%69%63%72%6F%73%6F%66%74%20%49%6E%74%65%72%6E%65%74%20%45%78%70%6C%6F%72%65%72%22%3B%66%75%6E%63%74%69%6F%6E%20%6E%72%63%28%65%29%7B%69%66%28%62%4E%53%20%26%26%20%65%2E%77%68%69%63%68%3E%31%29%7B%61%6C%65%72%74%28%61%6D%29%3B%72%65%74%75%72%6E%20%66%61%6C%73%65%7D%65%6C%73%65%20%69%66%28%62%49%45%20%26%26%20%28%65%76%65%6E%74%2E%62%75%74%74%6F%6E%3E%31%29%29%7B%61%6C%65%72%74%28%61%6D%29%3B%72%65%74%75%72%6E%20%66%61%6C%73%65%7D%7D%64%6F%63%75%6D%65%6E%74%2E%6F%6E%6D%6F%75%73%65%64%6F%77%6E%3D%6E%72%63%3B%69%66%28%64%6F%63%75%6D%65%6E%74%2E%6C%61%79%65%72%73%29%20%77%69%6E%64%6F%77%2E%63%61%70%74%75%72%65%45%76%65%6E%74%73%28%45%76%65%6E%74%2E%4D%4F%55%53%45%44%4F%57%4E%29%3B%69%66%28%62%4E%53%20%26%26%20%62%56%3C%35%29%20%77%69%6E%64%6F%77%2E%6F%6E%6D%6F%75%73%65%64%6F%77%6E%3D%6E%72%63%3B%66%75%6E%63%74%69%6F%6E%20%6F%6E%65%28%29%7B%72%65%74%75%72%6E%20%74%72%75%65%7D%6F%6E%65%72%72%6F%72%3D%6F%6E%65%3B%2F%2F%2D%2D%3E%3C%2F%53%43%52%49%50%54%3E"));
*/
window.focus();
