/*  Do not modify anything in this file.  All SVdP User javascript code should be 
 *  entered into svdp-edit.js
 */
 
/* 
  ------------------------------------
  PVII Menu CSS Express Drop-Down Menu
  by Project Seven Development
  www.projectseven.com
  ------------------------------------
*/
function P7_ExpMenu(){ //v1.1.0.2 by PVII-www.projectseven.com
 if(navigator.appVersion.indexOf('MSIE')==-1){return;}
 var i,k,g,lg,r=/\s*p7hvr/,nn='',c,cs='p7hvr',bv='p7menubar';
 for(i=0;i<10;i++){g=document.getElementById(bv+nn);if(g){
 lg=g.getElementsByTagName('LI');if(lg){for(k=0;k<lg.length;k++){
 lg[k].onmouseover=function(){c=this.className;cl=(c)?c+' '+cs:cs;
 this.className=cl;};lg[k].onmouseout=function(){c=this.className;
 this.className=(c)?c.replace(r,''):'';};}}}nn=i+1;}
}

/* Dreamweaver Template Functions */

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf('#')!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

/* Rotating Home Page image code */
/* Try to keep Guest Chef as last image/Link as this rotates in and out on a semi regular basis*/

	var numberOfImages = 5;
	var timeoutDuration = 8000;
	
	if (document.images) {
		ads = new Array(numberOfImages);
		ads[0] = './images/wastenotbanner.jpg';
		ads[1] = './images/gift card web banner.jpg';
		ads[2] = './images/banner_VOLUNTEER_generic.jpg';
		ads[3] = './images/guest chef web banner X.jpg';
		ads[4] = './images/friends of the poor web banner II.jpg';
	}
    
    newplace = new Array(numberOfImages);
    newplace[0] = 'http://www.svdp-alameda.org/News/pdf/eWaste farmers market.pdf'
    newplace[1] = 'http://svdp-alameda.org/nonprofitdiscount.php'
    newplace[2] = 'http://svdp-alameda.org/volunteer.php' 
	newplace[3] = 'http://www.svdp-alameda.org/guestchefmenu.php'
	newplace[4] = 'http://www.svdp-alameda.org/newsfriendsofthepoor.php'
    var timer = null
    var	 counter = 0
    
    function banner() {
            timer=setTimeout('banner()', 8000);
            counter++;
            if (counter >= numberOfImages) {
	            counter = 0;
			}
            document.rotatingImage.src = ads[counter];
    }
    
    function gothere() {
            counter2 = counter;
            window.location.href = newplace[counter2];
    }
    
