//<![CDATA[/* checked with jsLint 2005 03 13 */
//User variables settings
lheight=300; //Height of menu (must be user tuned)
lwidth=140; //Width of menu (must be user tuned)
lshow=22; //Width of pulltab
move=10; //Pixels to move each step (- for right side menu)
menuSpeed=20; //Menu refresh in msec.(lower = faster)
moveOnScroll=true; //Move with page scroll[true/false]
scrollSpeed=20; //Scroll refresh rate in msec.
pullImg=true; //Display pullout tab as an image
state=false; //Menu is concealed, false = menu is out on init
/***************************************************************
Do not change anything below this point
***************************************************************/
var itemObj;var frmObj;var pullObj;
var tim;var top;var lleft;var ltop;
scrolled='document.body.scrollTop';
/***************************************************************
Toggle is for the demonstration file (not normally required)
***************************************************************
function toggle(){
if (pullImg==false){pullImg=true;}else{pullImg=false;}
menuInit();}/
/***************************************************************
Move the menu after event (onmouseover or onclick)
***************************************************************/
function moveMenu(){
if(!state){clearTimeout(tim);mIn();
}else{clearTimeout(tim);mOut();} }
function mIn(){ //Menu in
if(parseInt(frmObj.left)>-lwidth+lshow){
if (pullImg==true){pullObj.background='url(http://www.sandpiperchorus.org/images/menu.gif)';}
frmObj.left=parseInt(frmObj.left)-move+'px';
tim=setTimeout("mIn()",menuSpeed);
}else{state=true;} }
function mOut(){ //Menu out
if(parseInt(frmObj.left)<0){
if (pullImg==true){pullObj.background='url(http://www.sandpiperchorus.org/images/menub.gif)';}
frmObj.left=parseInt(frmObj.left)+move+'px';
tim=setTimeout("mOut()",menuSpeed);
}else{state=false;} }
/***************************************************************
Check if page is scrolled and move the menu!
***************************************************************/
function checkScrolled(){
frmObj.top=eval(scrolled)+ltop+'px';
setTimeout('checkScrolled()',scrollSpeed);}
/***************************************************************
Init page, make menu object, move to right place, show it!
***************************************************************/
function menuInit(){ // fudge for conformant browsers!!
lleft=0; // position to left of page
ltop=(screen.availHeight-lheight)/2; // adjust for rez
x1=eval(scrolled);window.scrollBy(0,1); //test scrolled ptr
x2=eval(scrolled);window.scrollBy(0,-1); //reset position
if ((x2-x1)<1){scrolled='document.documentElement.scrollTop';}
if (pullImg==true){
document.getElementById('tab').innerHTML=' ';
pullObj=document.getElementById('pull').style;
pullObj.background='url(http://www.sandpiperchorus.org/images/menu.gif)';}
frmObj=document.getElementById('frame').style;
frmObj.left=lshow-lwidth+'px';frmObj.top=ltop+'px';
frmObj.visibility='visible';;if(!state){mOut();}
if(moveOnScroll){checkScrolled();}} //]]>

