//location on lpfch server: http://www.lpfch.org/calendar/js/phEvent.js
//location on sums-dbase server: calendar/Library/phEvent.js

function writePhEventUrl(){

//set image url, ie: http://www.myco.com/images/file.gif
var img="http://www.lpfch.org/images/lpchlogo.gif";

//set key words: make sure there are no spaces and avoid using special characters
// if you must use special characters, encode them:
// ie. use %27 for apostrophe; replace spaces with plus signs:
var keywords="Lucile+Packard+Children%27s+Hospital";
var head="Upcoming+Packard+Hospital+Events";

//////////////////Do not change the code below////////////////
var lpfchUrl = "http://www.lpfch.org/cgi-bin/calendar/";
var today = new Date(); 
var month = today.getMonth() + 1; 
var day = today.getDate(); 
var year = today.getFullYear();
var phEventUrl = lpfchUrl + "index.cgi?display=searchResults&searchDateRange=future";
phEventUrl += "&searchAfterMonth=" + month + "&searchAfterDay=" + day + "searchAfterYear=" + year;
phEventUrl += "&searchBeforeMonth=" + month + "&searchBeforeDay=" + day + "searchBeforeYear=" + year;
phEventUrl += "&keywords=" + keywords;
phEventUrl += "&sortBy=event_start_dt&submit=Search";
phEventUrl += "&img=" + img;
phEventUrl += "&head=" + head;
this.location.href = phEventUrl;

}