/* ============================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\" style=\"text-decoration:underline\" 	 onMouseOver=\"SetMenuLabel(this)\"  onMouseOut=\"PopUpMenu(MenuLabelg,\'close\')\" onClick=\"location=\'index.html\'\">Home</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\" style=\"text-decoration:underline\" onMouseOver=\"SetMenuLabel(this)\" onMouseOut=\"PopUpMenu(MenuLabelg,\'close\')\" onClick=\"location=\'contactus.html\'\">Contact Us</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=\'dogsPetfinder.html\'\""+
"     onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Dogs</div>"+
"    <div id=\"AdoptMenuItem2\" onClick=\"location=\'catsPetfinder.html\'\""+
"     onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Cats</div>"+
"    <div id=\"AdoptMenuItem3\" onClick=\"location=\'http://www.petfinder.com/pet-search?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=\'horserescue.html\'\" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Horses</div>"+

"<div id=\"AdoptMenuItem5\" onClick=\"location=\'http://www.petfinder.com/pet-search?N=39&Ne=2&Ns=shelter_name%7C%7Canimal_type%7C%7Cpet_breed_1%7C%7Cpet_breed_2%7C%7Cidentifier&Ntk=shelter_id%7Crecord_type%7Cstatus&Ntt=OH180%7Cpet%7CA&distance=0\'\" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Small &amp; Furry</div>"+

"    <div id=\"AdoptMenuItem6\" onClick=\"location=\'howtoadopt.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">How To Adopt</div>"+
"    <div id=\"AdoptMenuItem7\" onClick=\"location=\'surrender.html\' \"  onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Pet Surrender</div>"+
"    <div id=\"AdoptMenuItem8\" 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=\'members.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Become a Member</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=\'specialevents.html?2F\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Barn Cat Rescue Program</div>"+



"    <div id=\"ServicesMenuItem3\"  onClick=\"location=\'spayneuter.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Spay/Neuter Clinic</div>"+
"    <div id=\"ServicesMenuItem4\"  onClick=\"location=\'crueltyinvestigation.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Cruelty Investigation</div>"+
"    <div id=\"ServicesMenuItem5\"  onClick=\"location=\'clinic.html\' \" onMouseOver=\"SetMenuItem(this,\'MouseOver\')\" onMouseOut=\"SetMenuItem(this,\'MouseOut\')\">Vaccination Clinic</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 OLDPayPalBtn=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>");

var PayPalBtn = 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=\"PayPalFund(\'GeneralFund\')\">"+
"<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 to the Barn Cat Fund supports rescuing, as well as spay/neutering of cats in Delaware COunty.\""+
"    				href=\"javascript:PayPalFund(\'BarnCatFund\')\">Barn Cat Rescue Fund</a></li>"+


"        <li><a title=\"Donations made to the Horse Rescue fund will be used to support the rescue, foster, and adoption of horses in Delaware county.\""+
"    			 	href=\"javascript:PayPalFund(\'HorseRescueFund\')\" >Horse Rescue Fund</a>&nbsp;"+
"    				<a href=\"horserescue.html\"><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?2A#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?2A#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?2A#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?2A#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){
/***
alert('The HSDC PayPal account is not accessible at this time.\n'+ 
'Please contact the shelter directly to donate by credit card, or '+ 
'mail your donation to:\n\n'+
'Humane Society of Delaware County\n'+
'4920 State Route 37 East\n'+
'Delaware, Ohio 43015\n\n'+
'If you intend for your donation to go to a particular fund, please indicate that on the check.\n\n'+ 
'We apologize for any inconvenience, and again, thank you for your donation!\n');
***/

  var BtnID;
  switch (FundName){
        case 'SpayNeuter':
            BtnID='HE5M9DXRXU2M6';
            break;
        case 'HumaneServices':
            BtnID='LHJ5J6PL9YTBE';
            break;
        case 'VolunteerProgram':
            BtnID='KAT3XWCWLZ3CG';
            break;
        case 'FacilityImprovement':
            BtnID='AWK9JXEHNCJ2N';
            break;
        case 'Fence':
            BtnID='';
            break;
        case 'The120Club':
            BtnID='3C9NGKBHK3X4Q';
            break;
        case '120ClubSubscribe':
            BtnID='PBJT3W8U3A7LU';
            break;
        case 'HeatFromHerschelFund':
            BtnID='EWL3S9GPQ4RVJ';
            break;
        case 'AlliesFund':
            BtnID='';
            break;
        case 'HorseRescueFund':
            BtnID='HPE5ELCFHPTBL';
            break;
        case 'Furball2011':
            BtnID='';
            break;
        case 'Membership':
            BtnID='TPT2GGCLNKUWE';
            break;
        case 'BarnCatFund':
            BtnID='HU2KFH44BYL6L';
            break;
        case 'GeneralFund':
            BtnID='GADP3T4AJVWX2';
            break;
        default:  /* general Fund  */
            BtnID='GADP3T4AJVWX2';
           break;}

  if (BtnID=='') alert("Oops!\n\nThat fund is not currently available!\n\nPlease select another one.");
  else 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 =========================== */
