// calculates if one date is before another
function check_days(getDate1,getDate2){
	
	// get form values in format DD/MM/YYYY
	
	// put into american date format for JS
	dcal1=getDate1.split("/");
	calDate1 = dcal1[0];
	calMonth1 = dcal1[1];
	calYear1 = dcal1[2];
	formatDate1 = calMonth1+"/"+calDate1+"/"+calYear1;
	
	dcal2=getDate2.split("/");
	calDate2 = dcal2[0];
	calMonth2 = dcal2[1];
	calYear2 = dcal2[2];
	formatDate2 = calMonth2+"/"+calDate2+"/"+calYear2;
	
	// convert to JS date format
	date1temp = new Date(formatDate1);
	date2temp = new Date(formatDate2);
	
	// check if before
	if (date1temp>=date2temp){
		return false;
	} else {
		return true;
	}
}
// confirm delete for other things
function confirm_delete(itemdesc,strDest){
       msg = "DELETING "+(itemdesc.toUpperCase())+"S CANNOT BE UNDONE!\n\nAre you sure you want to delete this "+itemdesc+"? \n\nIf so, click 'OK'. Otherwise, click 'Cancel'.";
       if (confirm(msg)){
	   		document.location.href=strDest;
	   };
	}
	
function oe(eid){
	ob = document.getElementById(eid);
	return ob;
}
function doguestbook(idnum){
	window.open('guestbook_details.php?guestbookid='+idnum,'guestbook','width=500,height=500,scrollbars');
}