$(document).ready(function() { if ($(".ews_cal_list_select_checkbox,.ews_cal_list_select_checkbox_clear").length > 0) { $(".ews_cal_list_select_checkbox,.ews_cal_list_select_checkbox_clear").click(function(srcc) { if ($(this).hasClass("ews_cal_list_select_checkbox")) { $(this).removeClass("ews_cal_list_select_checkbox"); $(this).addClass("ews_cal_list_select_checkbox_clear"); } else { $(this).removeClass("ews_cal_list_select_checkbox_clear"); $(this).addClass("ews_cal_list_select_checkbox"); } }); } }); if (typeof ews == "undefined") var ews = {}; ews.CalendarBlock = {}; ews.CalendarBlock.LightBoxTop = null; ews.CalendarBlock.LightBoxLeft = null; ews.CalendarBlock.SelectBox = function(oBox) { $(".ews_cal_grid_box_normal").removeClass("ews_cal_grid_box_selected"); $(".ews_cal_grid_box_today").removeClass("ews_cal_grid_box_selected"); $(oBox).addClass("ews_cal_grid_box_selected"); } ews.CalendarBlock.LightBox = function(src) { var width = 400; var height = 300; var top = (($(window).height() - height) / 2) - 100; var left = (($(window).width() - width) / 2) - 256; ews.CalendarBlock.LightBoxLeft = left; ews.CalendarBlock.LightBoxTop = top; var iFrame = $("
"); var oBg = $(""); oBg.appendTo('body'); iFrame.appendTo('body'); oBg.show(); iFrame.show(); } ews.CalendarBlock.LightBoxLoaded = function(src) { $(".ews_cal_lightbox").css({ "top": ews.CalendarBlock.LightBoxTop , "left": ews.CalendarBlock.LightBoxLeft }); } ews.CalendarBlock.AddEvent = function(uid, source, clientid) { source = $("#"+clientid+"_"+uid+"_source")[0].value.replace("'","%39").replace("&","%26"); window.open("webcal://www.valleyviewcc.net/"+source+"?Uid="+uid, "_self"); } ews.CalendarBlock.AddCal = function(source) { window.open("webcal://www.valleyviewcc.net/"+source.replace("://",""), "_self"); } ews.CalendarBlock.PrintGrid = function(clientid) { var oldheader = ""; var printhtml = ""; for (var i = 0; i < $("div[id*='ews_cal_grid_print_"+clientid+"']").length; i++) { var newheader = $($($("div[id*='ews_cal_grid_print_"+clientid+"']")[i]).children()[0]).html(); if (oldheader != newheader) { printhtml += newheader; oldheader = newheader; } printhtml += $($("div[id*='ews_cal_grid_print_"+clientid+"']")[i]).html(); } src = "