/* ============================START OF PULLDOWNMENUS =========================== */
var pulldownmenus=new String( "<!-- **********************BELOW ARE THE PULLDOWN MENUS AND ARE NOT PART OF THE OVERALL LAYOUT ABOVE ***********************- -->"+
"<div style=\"margin-left:50%;text-align:center\">"+
"  <div id =\"OutOfTop\" class=\"OutOfTop\" onMouseOver=\"if(MenuLabelg)PopUpMenu(MenuLabelg,\'close\')\"></div>"+
" <div ID=\"TopMenuBar\" class=\"TopMenuBar\" onMouseOver=\"return false\" onMouseOut=\"return false\">"+

"    <span id=\"home\"  	 onMouseOver=\"SetMenuLabel(this)\"  onMouseOut=\"PopUpMenu(MenuLabelg,\'close\')\" onClick=\"location=\'index.html\'\"><u>Home</u></span>"+
"    <span id=\'adopt\' 	 onMouseOver=\"SetMenuLabel(this)\" >Adopt</span>"+
"    <span id=\'howyoucanhelp\'onMouseOver=\"SetMenuLabel(this)\">How to Help</span>"+
"    <span id=\'events\' 	 onMouseOver=\"SetMenuLabel(this)\" >Events</span>"+
"    <span id=\'education\' onMouseOver=\"SetMenuLabel(this)\" >Education</span>"+
"    <span id=\'services\'  onMouseOver=\"SetMenuLabel(this)\" >Services</span>"+
"    <span id=\'abouthsdc\' onMouseOver=\"SetMenuLabel(this)\" >About HSDC</span>"+
"    <span id=\"contactus\" onMouseOver=\"SetMenuLabel(this)\" onMouseOut=\"PopUpMenu(MenuLabelg,\'close\')\" onClick=\"location=\'contactus.html\'\"><u>Contact Us</u></span>"+
"  </div>"+

"  <div ID=\"homemenu\"></div> <!-- this is a dummy menu so will unlhilight after mouseover -->"+

"  <div Id=\"adoptmenu\" class=\"TopMenuPulldowns\" style=\"display:inline;visibility:hidden\">  "+
"    <div id=\"AdoptMenuItem1\" onClick=\"location=\'http://search.petfinder.com/shelterSearch/shelterSearch.cgi?animal=dog&breed=&age=&size=&specialNeeds=&declawedPets=&children=&status=&id=&internal=&contact=&name=&shelterid=OH180&sort=&preview=1\'\""+
"     onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Dogs</div>"+
"    <div id=\"AdoptMenuItem2\" onClick=\"location=\'http://search.petfinder.com/shelterSearch/shelterSearch.cgi?animal=cat&breed=&age=&size=&specialNeeds=&declawedPets=&children=&status=&id=&internal=&contact=&name=&shelterid=OH180&sort=&preview=1\'\""+
"     onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Cats</div>"+
"    <div id=\"AdoptMenuItem3\" onClick=\"location=\'http://search.petfinder.com/shelterSearch/shelterSearch.cgi?animal=rabbit&breed=&age=&size=&specialNeeds=&declawedPets=&children=&status=&id=&internal=&contact=&name=&shelterid=OH180&sort=&preview=1\'\""+
"     onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Rabbits</div>"+
"    <div id=\"AdoptMenuItem4\" onClick=\"location=\'howtoadopt.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">How To Adopt</div>"+
"    <div id=\"AdoptMenuItem5\" onClick=\"location=\'surrender.html\' \"  onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Pet Surrender</div>"+
"    <div id=\"AdoptMenuItem6\" onClick=\"location=\'alumni.html?2A\' \"  onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Alumni Spotlights</div>"+
"    </div>"+

"  <div Id=\"howyoucanhelpmenu\" class=\"TopMenuPulldowns\"  style=\"display:inline;visibility:hidden\"> "+
"    <div id=\"HYCHMenuItem1\"  onClick=\"location=\'donate.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Donate</div>"+
"    <div id=\"HYCHMenuItem2\"  onClick=\"location=\'volunteer.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Volunteer</div>"+
"    <div id=\"HYCHMenuItem3\"  onClick=\"location=\'supporters.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Supporters</div>"+
"    <div id=\"HYCHMenuItem4\"  onClick=\"location=\'giftideas.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Gift Ideas</div>"+
"    <div id=\"HYCHMenuItem5\"  onClick=\"location=\'inmemorium.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">In Memoriam</div>"+
"   <!-- <div id=\"HYCHMenuItem6\"  onClick=\"location=\'employment.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Employment</div> -->"+ 
"  </div>"+

"  <div Id=\"eventsmenu\"  class=\"TopMenuPulldowns\" style=\"display:none\"> "+
"    <div id=\"EventsMenuItem1\"  onClick=\"location=\'calendar.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Calendar</div>"+
"    <div id=\"EventsMenuItem2\"  onClick=\"location=\'specialevents.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Special Events</div>"+
"    </div>"+

"  <div Id=\"educationmenu\" class=\"TopMenuPulldowns\"  style=\"display:none\">  "+
"    <div id=\"EducationMenuItem1\" onClick=\"location=\'behaviorwellnessprogram.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Behavioral Wellness Program</div>"+
"    <div id=\"EducationMenuItem2\" onClick=\"location=\'newpetadvice.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">New Pet Advice</div>"+
"    <!-- <div id=\"EducationMenuItem3\" onClick=\"location=\'\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Clicker  Training</div> -->"+
"    <div id=\"EducationMenuItem4\" onClick=\"location=\'resources.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Resources</div>"+
"    </div>"+

"   <div Id=\"servicesmenu\" class=\"TopMenuPulldowns\" style=\"display:none\"> "+
"    <div id=\"ServicesMenuItem1\"  onClick=\"location=\'lostandfound.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Lost &amp; Found</div>"+
"    <div id=\"ServicesMenuItem2\"  onClick=\"location=\'spayneuter.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Spay/Neuter Clinic</div>"+
"    <div id=\"ServicesMenuItem3\"  onClick=\"location=\'crueltyinvestigation.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Cruelty Investigation</div>"+
"    <div id=\"ServicesMenuItem4\"  onClick=\"location=\'microchipping.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Microchipping</div>"+
"    </div>"+

"  <div Id=\"abouthsdcmenu\" class=\"TopMenuPulldowns\"  style=\"display:none\">  "+
"    <div id=\"AboutHSDCMenuItem1\"  onClick=\"location=\'hoursandmap.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Map &amp; Hours</div>"+
"    <div id=\"AboutHSDCMenuItem3\"  onClick=\"location=\'staffandboard.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Staff &amp; Board</div>"+
"    <div id=\"AboutHSDCMenuItem4\"  onClick=\"location=\'history.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">History</div>"+
"    </div>"+

"  <div ID=\"contactusmenu\"></div>"+
"</div>");



var LastMenuListID='';
var LastMenuLabel='';
var MenuLabelg=new Object();
var ItemStyle=new Object();

var LiteBlue="#C1C0DF";
var NavyBlue="#000080";
var Cream="#FFFFDD";

var MenuLabelBkgColor="#C1C0DF";//LiteBlue
var MenuLabelHiLiteColor='yellow';
var MenuLabelTextSelColor='black'; 
var MenuLabelTextColor="#000080";//NavyBlue 
var MenuItemHiLiteColor="#FFFFDD";//Cream
var MenuItemTextSelColor='black';
var MenuItemTextColor='white'; 
var MenuItemBkgColor="#000080";//NavyBlue

var timerHandle='';
var TimerDuration=150;

function SetMenuLabel(MenuLabel){
  MenuLabelg=MenuLabel;
  if(LastMenuLabel){
     LastMenuLabel.style.background=MenuLabelBkgColor;
     LastMenuLabel.style.color=MenuLabelTextColor;}

  MenuLabel.style.background=MenuLabelHiLiteColor;
  MenuLabel.style.color=MenuLabelTextSelColor;

  if(timerHandle){clearTimeout(timerHandle);timerHandle = '';}

  PopUpMenu(MenuLabel,'open');
  LastMenuLabel=MenuLabel;}

function SetMenuItem(item,MouseMove){
  ItemStyle=item.style;
  ItemStyleColor=item.style.color;
  switch (MouseMove){
    case 'MouseOver':
        ItemStyle.textDecoration="none";
        ItemStyle.background=MenuItemHiLiteColor;
				ItemStyle.color=MenuItemTextSelColor;
        if(timerHandle){clearTimeout(timerHandle);timerHandle = '';}
				break;
    case 'MouseOut':
        ItemStyle.textDecoration="none";
        ItemStyle.background=MenuItemBkgColor;
        ItemStyle.color=MenuItemTextColor;
        timerHandle=setTimeout("PopUpMenu(MenuLabelg,'close')",TimerDuration);
        break;
    default:return;}}
 
function PopUpMenu(MenuLabel,status){
  MenuListID=document.getElementById(MenuLabel.id+'menu');
  if (!MenuListID) return; // MenuLabel is Home or Contact us and has no menu

  if(status=='open') {
    if(LastMenuListID && LastMenuListID != MenuListID)LastMenuListID.style.visibility="hidden";
    MenuListID.style.display="inline";
    MenuListID.style.visibility="visible";
    SetMenuDims(MenuLabel,MenuListID);} 

  if(status=='close'){
    // MenuListID.style.display="none";
    MenuListID.style.visibility="hidden";
    MenuLabel.style.background=MenuLabelBkgColor;
    MenuLabel.style.color=MenuLabelTextColor;}
      
  LastMenuListID=MenuListID;
  LastMenuLabel=MenuLabel;}


function SetMenuDims(MenuLabel,MenuListID){
  TopMenuBarID=document.getElementById("TopMenuBar");
  MenuListID.style.left=TopMenuBarID.offsetLeft+MenuLabel.offsetLeft+'px';
  MenuListID.style.top=TopMenuBarID.offsetTop+  MenuLabel.offsetTop+MenuLabel.offsetHeight - 2+'px';}

 /* ============================END OF PULLDOWNMENUS =========================== */
 
 /* ============================START OF PAYPAL MENUS AND SCRIPTS =========================== */
 
  /* ========================== START OF OLDPAYPAL BUTTON IN TITLE AREA============= */
var PayPalBtn=new String("<div style=\"text-align:right;margin:-22px 0px -8px 0px\">"+
"	<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">"+
"  <input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">"+
"  <input type=\"hidden\" name=\"hosted_button_id\" value=\"596001\">"+
"  <input type=\"image\" src=\"https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif\" border=\"0\" name=\"submit\" alt=\"\">"+
"  <img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">"+
" </form></div>");
/* ========================== END OF OLDPAYPAL BUTTON IN TITLE AREA=============*/


/* ========================== START OF PAYPAL BUTTON =============*/
var PayPalBtnNEW=new String("<style>#DonateMenu li a{font-weight:bold; padding:0 2px; color:#00F}</style>"+


"<div style=\"text-align:right;margin:-10px 0px -8px 0px\">"+
"<a href=\"#\" id=\"DonateButton\" onClick=\"DonateWindow(true)\">"+
"<img src=\"https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif\" border=\"0\"></a></div>");

/* ========================== START OF PAYPAL FUND MENU =============*/
var PayPalMenu= new String("<div id=\"DonateMenu\" style=\"visibility:hidden;position:absolute;text-align:left;background:white;border:4px ridge blue\">"+
"	<div style=\"background: url(\'images/pawprint.png\') center center repeat\">"+
"  	<h2 style=\"position:relative;padding:5px;top:0px;color:yellow;font-size:125%;text-align:center;"+
"				background:url(\'images/MainTextTitle.png\') repeat top left;\">Thanks for the donation!<br>Please select a fund:&nbsp;"+
"				</H2>"+
"		<div style=\"position:relative;padding:10px;opacity:.98;background:#FFFFDD\">"+
"     <ul>"+
"        <li><a title=\"Donations to the General Fund support those functions in most need of immediate funding.\""+
"    				href=\"javascript:PayPalFund(\'GeneralFund\')\">General Fund</a></li>"+

"        <li><a title=\"Donations made to the fence fund will be used for materials to build a fence around the acre of land in front of HSDC.\""+
"    			 	href=\"javascript:PayPalFund(\'Fence\')\" >Fence Fund</a>&nbsp;"+
"    				<a href=\"specialevents.html?2E#FenceFund\"><img src=\"images/question.png\"</a></li>"+


"        <li><a title=\"Donations made to the spay / neuter fund subsidize surgery costs for low income families and feral cats living throughout the county.\""+
"    			 	href=\"javascript:PayPalFund(\'SpayNeuter\')\" >Spay/Neuter Fund</a>&nbsp;"+
"    				<a href=\"specialevents.html?2E#SpayNeuterFund\"><img src=\"images/question.png\"</a></li>"+
    
"        <li><a title=\"Donations made to the humane service fund support the efforts of humane agents responding to the needs of sick, injured, abused, and neglected animals in Delaware County.\""+
"    				href=\"javascript:PayPalFund(\'HumaneServices\')\">Humane Services Fund</a>"+
"            <a href=\"specialevents.html?2E#HumaneServiceFund\"><img src=\"images/question.png\"</a></li>"+

"        <li><a title=\"Donations made to the volunteer program fund support the driving force behind the Humane Society of Delaware County.\""+
"    				href=\"javascript:PayPalFund(\'VolunteerProgram\')\">Volunteer Programs Fund</a>"+
"    				<a href=\"specialevents.html?2E#VolunteerProgramFund\"><img src=\"images/question.png\"</a></li>"+
    
"        <li><a title=\"Donations made to the facility improvement fund make possible the expansion and upkeep of the Humane Society of Delaware County.\""+
"      			href=\"javascript:PayPalFund(\'FacilityImprovement\')\">Facility Improvement Fund</a>"+
"      			<a href=\"specialevents.html?2E#FacilityImprovementFund\"><img src=\"images/question.png\"</a></li>"+
"      </ul>"+
    
"    <div style=\"text-align:center\"><a href=\"#\" onClick=\"DonateWindow()\"><img src=\"images/cancel.png\"></a></div>"+
" 	 </div></div></div>");

/* ========================== START OF PAYPAL FUND MENU SCRIPT =============*/
function PayPalFund(FundName){
  var BtnID;
  if(FundName=='GeneralFund')document.location='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=596001';
	else {switch (FundName){
        case 'SpayNeuter':
            BtnID='1439269';
            break;
        case 'HumaneServices':
            BtnID='1439324';
            break;
        case 'VolunteerProgram':
            BtnID='1439354';
            break;
        case 'FacilityImprovement':
            BtnID='1439378';
            break;
        case 'Fence':
            BtnID='6179497';
            break;
        case 'The120Club':
            BtnID='MLK45HKD4MUJ4';
            break;
        case '120ClubSubscribe':
            BtnID='VQ7K32EDRWDWW';
            break;
        case 'AlliesFund':
            BtnID='KJVPJKBYAK2LJ';
            break;
        case 'HorseRescueFund':
            BtnID='NSD5F5L7238G6';
            break;

        default:break;}

  document.location='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id='+BtnID;}
  }

function DonateWindow(call){
 var Pos =[];
 windowID=document.getElementById("DonateMenu");
  buttonID=document.getElementById("DonateButton");
  Pos=GetPos(buttonID);
  if (call) {
			windowID.style.visibility="visible";
      windowID.style.top= Pos[1]+buttonID.offsetHeight+'px';
      windowID.style.left= Pos[0]-buttonID.offsetWidth+'px';
      windowID.style.width="auto";}
  else windowID.style.visibility="hidden";}

// pass the HTML element return the x, y position
function GetPos(obj){
 ObjLeft=obj.offsetLeft;
 ObjTop=obj.offsetTop;
 while(obj.offsetParent!=null){
      z=obj.offsetParent;
      ObjLeft+=z.offsetLeft;
      ObjTop+=z.offsetTop;
      obj=z;}
 return [ObjLeft,ObjTop];}

 /* ============================END OF PAYPAL MENUS AND SCRIPTS =========================== */

