document.write('<div id="calpp" style="position:absolute; display:none;">\
<div style="width:931px; overflow:hidden;">\
<div style="float:left; background:url(images/general/events_popup_left_image.gif) no-repeat; width:7px; height:231px;"></div>\
<div style="float:left; height:223px;">\
<div style="background:url(images/general/event_popup_top_image.gif) repeat-x; height:0px; overflow:hidden; padding-top:4px; width:917px;">1</div>\
<div style="height:207px; width:917px; margin-top:0; padding:16px 0 0 0; background-color:#FFFFFF;">\
	<img onclick="$(\'#cal_icon_bg\').click();" title="Close" alt="Close" src="images/general/eve_clpp_cls.gif" onmouseout="this.src=\'./images/general/eve_clpp_cls.gif\'" onmouseover="this.src=\'./images/icons/general/mm_mail_del_ov.gif\'" style="position: absolute; right: 10px; top: 10px; cursor: pointer;" class="Eve_Cl_Close">\
<table width="100%" border="0" cellpadding="0" cellspacing="0"s>\
	<tr>\
		<td width="20" align="right" style="padding-right:6px;" valign="middle"><img alt="Previous" title="Previous" src="images/general/event_popup_left_arrow.gif" onMouseOver="this.src=\'images/general/event_popup_left_arrow_mo.gif\';" onMouseOut="this.src=\'images/general/event_popup_left_arrow.gif\';" style="cursor:pointer;" id="escleft"></td>\
		<td><div id="calendar1" style="display:block;width:199px;height:187px;background-color:#ededed;background-image:url(./images/general/cmn_wait.gif);background-position:center;background-repeat:no-repeat"></div>\</td>\
		<td width="8"></td>\
		<td><div id="calendar2" style="display:block;width:199px;height:187px;background-color:#ededed;background-image:url(./images/general/cmn_wait.gif);background-position:center;background-repeat:no-repeat"></div>\</td>\
		<td width="8"></td>\
		<td><div id="calendar3" style="display:block;width:199px;height:187px;background-color:#ededed;background-image:url(./images/general/cmn_wait.gif);background-position:center;background-repeat:no-repeat"></div>\</td>\
		<td width="35" align="left" style="padding-left:6px;" valign="middle"><img alt="Next" title="Next" src="images/general/event_popup_right_arrow.gif" onMouseOver="this.src=\'images/general/event_popup_right_arrow_mo.gif\';" onMouseOut="this.src=\'images/general/event_popup_right_arrow.gif\';" style="cursor:pointer;" id="escright"></td>\
		<td width="235" valign="top">\
			<table width="100%" border="0" cellspacing="0" cellpadding="0">\
				<tr>\
					<td width="226" valign="top">\
						<table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:12px;">\
							<tr>\
								<td class="arial12_addrest" style="color:#000000; "><p><b>Please select a date or a date range, by clicking or dragging around.</b></p></td>\
							</tr>\
							<tr>\
								<td class="arial12" style="padding-top:16px;color:#000000;">To select a date range click and drag across the calendar. To select multiple days, simply click on the days that you are interested in.</td>\
							</tr>\
							<tr>\
								<td class="arial12" style="padding-top:14px;color:#000000;">Once you are done, click on the "View Events" button to see what\'s going on.</td>\
							</tr>\
							<tr>\
								<td align="center" style="padding-top:18px;"><img alt="View Events" title="View Events" src="images/buttons/btn_type2_19_view.gif" onMouseOver="this.src=\'images/buttons/btn_type2_19_view_ov.gif\';" onMouseOut="this.src=\'images/buttons/btn_type2_19_view.gif\';" style="cursor:pointer;" onClick="view_events()"></td>\
							</tr>\
						</table>\
					</td>\
					<td>&nbsp;</td>\
				</tr>\
			</table>\
		</td>\
	</tr>\
</table>\
</div>\
<div style="background:url(images/general/event_popup_bottom_image.gif) repeat-x; height:0px; overflow:hidden; padding-top:4px; width:917px"></div>\
</div>\
<div style="float:left; background:url(images/general/events_popup_right_image.gif) no-repeat; width:7px; height:231px;"></div>\
</div>\
<div><img src="images/general/event_popup_arrow_image.gif" style="position:relative; left:568px;top:-4px;" alt=" "></div>\
</div>')
$(document).ready(function(){
var	flag=true;
var cur_top=null
var cur_left=null
var sOpen = true;

$("#cal_icon_bg").click(function(){
	var offset=$("#calbtn").offset();
	cur_top=offset.top-252;
	cur_left=offset.left-571;

	if(sOpen) {
		$("#calpp").toggle("slow");
		$("#calpp").css("top",cur_top+"px");
		$("#calpp").css("left",cur_left+"px");
		displayEventsCalendarListPre(sFirst, sSecond, sThird);
		
	}
	if(flag){
		
		$("div.calbg").addClass("events_calendar_ov");
		if(sOpen) {
	
		} else {
				$("#calpp").toggle("slow");
				$("#calpp").css("top",cur_top+"px");
				$("#calpp").css("left",cur_left+"px");
				event_calendar_show(this);
		}
		flag=false;
	} else {
		event_calendar_hide(this);
		$("div.calbg").removeClass("events_calendar_ov");
		flag=true;
	}
	sOpen = false;
});

});