
function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}
function addEventSimple(obj,evt,fn){if(obj.addEventListener)
obj.addEventListener(evt,fn,false);else if(obj.attachEvent)
obj.attachEvent('on'+evt,fn);}
addLoadEvent(setGlobalVariables);var w=window;var d=document;function setGlobalVariables(){b=d.getElementsByTagName('body')[0];}
var Sniff={ie:function(){return!!(d.all)}(),w3:function(){return!!(d.getElementById&&d.createElement);}(),safariMac:function(){var isMac=/Mac/;var isWebKit=/WebKit/;if(navigator.platform.match(isMac)&&navigator.userAgent.match(isWebKit)){return true;}
else return false;}()}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name){createCookie(name,"",-1);}
function setUpSearchKeywords(){var allForms=d.forms;for(var i=0,j=allForms.length;i<j;i++){if(!allForms[i].getAttribute('action'))continue;if(allForms[i].getAttribute('action').indexOf('captureSearchBar')>=0||allForms[i].getAttribute('action').indexOf('captureSitterSearch')>=0){addEventSimple(allForms[i],'submit',addSearchKeywords);}}}
addLoadEvent(setUpSearchKeywords);function addSearchKeywords(evt){if(evt.target){var theForm=evt.target;}
else if(w.event){var theForm=w.event.srcElement;};var action=theForm.getAttribute('action');var qsStarts=action.indexOf('?');if(qsStarts>=0){action=action.substring(0,qsStarts);};switch(theForm.sitterService.value){case'childCare':theForm.setAttribute('action',action+'?care=child-care-babysitter-nanny');break;case'babysitter':theForm.setAttribute('action',action+'?care=child-care-babysitter-nanny');break;case'nanny':theForm.setAttribute('action',action+'?care=child-care-babysitter-nanny');break;case'tutoring':theForm.setAttribute('action',action+'?care=tutoring-test-prep-homework-help-private-lessons-teachers-coaches-math-music');break;case'seniorCare':theForm.setAttribute('action',action+'?care=senior-care-eldercare');break;case'petCare':theForm.setAttribute('action',action+'?care=pet-care-pet-sitting-dog-walking');break;case'housekeeping':theForm.setAttribute('action',action+'?care=housekeeping-house-cleaning-maid-service');break;case'careGigs':theForm.setAttribute('action',action+'?care=errands-house-sitting-personal-assistant');break;case'specialNeeds':theForm.setAttribute('action',action+'?care=special-needs-care');break;case'childCareJob':theForm.setAttribute('action',action+'?care=child-care-babysitter-nanny-jobs');break;case'tutoringJob':theForm.setAttribute('action',action+'?care=tutoring-test-prep-homework-help-private-lessons-teachers-coaches-math-music-jobs');break;case'seniorCareJob':theForm.setAttribute('action',action+'?care=senior-care-eldercare-jobs');break;case'petCareJob':theForm.setAttribute('action',action+'?care=pet-care-pet-sitting-dog-walking-jobs');break;case'housekeepingJob':theForm.setAttribute('action',action+'?care=housekeeping-house-cleaning-maid-service-jobs');break;case'careGigsJob':theForm.setAttribute('action',action+'?care=errands-house-sitting-personal-assistant-jobs ');break;case'specialNeedsJob':theForm.setAttribute('action',action+'?care=special-needs-care-jobs');break;case'childCareExchange':theForm.setAttribute('action',action+'?care=child-care-babysitter-nanny');break;case'petCareExchange':theForm.setAttribute('action',action+'?care=pet-care-pet-sitting-dog-walking');break;default:break;}}