//document.write("
"); /////////////////////////////////////////////////////// // // localendar.com - Common.js // /////////////////////////////////////////////////////// var ppcIE =((navigator.appName == "Microsoft Internet Explorer") || ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion)==5))); var ppcNN6 =((navigator.appName == "Netscape") && (parseInt(navigator.appVersion)==5)); var ppcNN =((navigator.appName == "Netscape")&&(document.layers)) ; var posX = 4; var posY = 4; var now = new Date(); //"<= startDate >"); var eventWindow; function today() { var result = "" var d = new Date(); var curr_date = d.getDate(); var curr_month = d.getMonth(); curr_month++; var curr_year = (d.getFullYear()+"").substring(2,4); if (curr_month<10) result+="0"; result += curr_month + "-"; if (curr_date<10) result+="0"; result+=curr_date + "-" + curr_year; return result } function getPos(atImg) { // MO: Using jQuery to get position 2/1/10 var position=$('#'+atImg).offset(); posX=position.left; posY=position.top; /* if ( ppcIE ) { posX = getOffsetLeft(document.images[atImg]); posY = getOffsetTop(document.images[atImg]) + document.images[atImg].height; } else if (ppcNN) { posX = document.images[atImg].x; posY = document.images[atImg].y + document.images[atImg].height; } */ } function fn_chg_color(lcfield,pcolor){ fn_chk_color(lcfield,pcolor); } function fn_chk_color(lcfield,pcolor){ var numStr = "0123456789ABCDEFabcdef"; if (pcolor.length==0) return true; for (i = 0; i < pcolor.length; i++) { thisChar = pcolor.charAt(i); if (numStr.indexOf(thisChar) == -1){ $.Zebra_Dialog("Please enter a valid six character hexidecimal color value.", { 'type': 'error', 'overlay_opacity': .5, 'title': 'Validation Error' }); lcfield.value = ''; return false; } } if (pcolor.length!=6){ $.Zebra_Dialog("Please enter a valid six character hexidecimal color value.", { 'type': 'error', 'overlay_opacity': .5, 'title': 'Validation Error' }); lcfield.value = ''; return false; } lcfield.value = pcolor; return true; } function validateNewUser(lcform){ var retval = true; if (( !isEmail(lcform)) /*|| (!isLocation(lcform))*/ || (! isName(lcform)) || (! checkPassword(lcform)) || (! checkAgree(lcform)) || (!checkTimezone(lcform)) ){ retval=false; } else { if (lcform.country.value=="USA") retval = checkZip(lcform); else retval = checkCountry(lcform) } return retval; } function checkSelect(lcform){ var w = eval("document." + lcform.name + ".event_category"); var count = 0; for (var x = 0; x < w.length; x++) { if (lcform.event_category[x].checked) { count++ } } if (count == 0 ) { $.Zebra_Dialog("Please select at least one category", { 'type': 'error', 'overlay_opacity': .5, 'title': 'No Categories Selected' }); lcform.event_category[0].focus(); return false; } return true; } function category_check(lcform,pvalue){ var w = eval("document." + lcform.name + ".event_category"); for (var x = 0; x < w.length; x++) { if (pvalue == 'all'){ w[x].checked = true; }else { w[x].checked = false; } } } function popup(info){ var view_window; var lcf; info=info.toUpperCase(); if (info=="HELP") lcf="FAQ"; if (info=="LEGAL") lcf="Legal"; if (info=="A1CLEGAL") lcf="A1CLEGAL"; if (info=="PRIVACY") lcf="Privacy"; if (info=="A1CPRIVACY") lcf="A1CPRIVACY"; // if (info=="PRINTCAL") lcf="PrintableCalendar"; view_window = window.open("/elsie?JSP="+lcf+"&context=None", "localendar", "width=500,height=500,scrollbars=yes,resizable=yes"); view_window.focus(); } function popupEventAdd() { view_window = window.open("/elsie?JSP=EventEditorAnon", "localendar", "width=545,height=550,menubar=yes,scrollbars=yes,resizable=yes"); } function popupPrintableCalendar() { var view_window = window.open("/elsie?JSP=PrintableCalendar&context=None", "printablelocalendar", "toolbar=yes,menubar=yes,width=700,height=600,scrollbars=yes,resizable=yes"); view_window.focus(); } function lc_navjump(p_direction,p_menutype,p_startdate){ window.location.href="/elsie?JSP=Calendar&mode=MONTH_"+p_direction+"&menu_type="+p_menutype+"&start_date="+p_startdate; } function lc_dayjump(p_menutype,p_date){ window.location.href="/elsie?JSP=Calendar&menu_type="+p_menutype+"&start_date="+p_date; } function lc_weekjump(p_menutype,p_date){ window.location.href="/elsie?JSP=Calendar&menu_type="+p_menutype+"&start_date="+p_date; } function lc_monthjump(p_menutype,p_date){ window.location.href="/elsie?JSP=Calendar&menu_type="+p_menutype+"&start_date="+p_date; } function lc_yearjump(p_menutype,p_date){ window.location.href="/elsie?JSP=Calendar&menu_type="+p_menutype+"&start_date="+p_date; } /* function lc_publishjump(p_menutype,p_date,p_calendarid,p_rsslink){ window.location.href="/elsie?JSP=PublishedCalendar&mode=PUBLISH_PUBLIC&search_type="+p_menutype+"&start_date="+p_date+"&calendar_id="+p_calendarid+"&rss_link="+p_rsslink; } */ function lc_searchjump(p_lat,p_lon,p_radius,p_date,p_type){ window.location.href="/elsie?JSP=SearchResults&mode=ADVSEARCH&member_lat="+p_lat+"&member_long="+p_lon+"&radius="+p_radius+"&start_date="+p_date+"&search_type="+p_type; } function lc_pubsearchjump(p_lat,p_lon,p_radius,p_date,p_type){ window.location.href="/elsie?JSP=PublishedSearch&mode=PUBSEARCH&membar_lat="+p_lat+"&member_long="+p_lon+"&radius="+p_radius+"&start_date="+p_date+"&search_type="+p_type; } function HelpWindow(vers){ var view_window; view_window = window.open(('https:' == document.location.protocol ? 'https://' : 'http://')+"www.localendar.com/docs/display/lc"); view_window.title = "FAQ"; view_window.focus(); } function AddEvent(eventDate){ var target = "/elsie?DAM=EventEditor"; if (eventDate!=null){ target+="&eventDate="+eventDate; } window.location.href= target; } function Preferences(){ window.location.href="/elsie?JSP=PreferencesGeneral" } function Search(){ window.location.href="/elsie?JSP=Search" } function PublicEventDetail(m, calendar_id,event_id,more_info,exportDate,category) { if (eventWindow){ eventWindow.close(); } var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top; var left = ((screen.width / 2) - (400 / 2)) + dualScreenLeft; var top = ((screen.height / 2) - (510 / 2)) + dualScreenTop; eventWindow = window.open(('https:' == document.location.protocol ? 'https://' : 'http://')+"localendar.com/event?DAM=PublishedEvent&m="+m+"&event_id="+event_id+"&calendar_id="+calendar_id+"&more_info="+more_info+"&export_date="+exportDate+"&category="+category, "previewevent", "scrollbars=yes,resizable=yes,width=400, height=510, top=" + top + ", left=" + left); if (window.focus) { eventWindow.focus(); } } function zipSearchSubmit(lcform) { var c = lcform.city.value; if (c.length < 3) { $.Zebra_Dialog("Please enter at least the first 3 characters of the city", { 'type': 'warning', 'overlay_opacity': .5, 'title': 'Insufficient Information' }); return false; } return true; } function checkAdvSearch(lcform) { var addressOK = ""; addressOK = $('#member_lat').val(); if (addressOK==null || addressOK=="" || addressOK=="null"){ $.Zebra_Dialog("Please provide a valid geographic location for searching", { 'type': 'warning', 'overlay_opacity': .5, 'title': 'Insufficient Information' }); return false; } else { return true; } } function prefsGeneralSubmit(lcform) { if (checkDayViewRange(lcform)) return true; else return false; } function isNumber(data) { var numStr = "0123456789"; for (i = 0; i < data.length; i++) { thisChar = data.charAt(i); if (numStr.indexOf(thisChar) == -1) return false; } return true; } function checkCountry(lcform) { if (lcform.country.value=="---"){ $.Zebra_Dialog("Please select your country", { 'type': 'error', 'overlay_opacity': .5, 'title': 'Validation Error' }); return false; } else return true; } function checkTimezone(lcform) { if (lcform.timezone.value=="---"){ $.Zebra_Dialog("Please select your timezone", { 'type': 'error', 'overlay_opacity': .5, 'title': 'Validation Error' }); return false; } else return true; } function checkZip(lcform) { var zipcode = lcform.zip.value; if (zipcode!="00000"&& ((!isNumber(zipcode)) || zipcode == "" || zipcode.length != 5) ) { $.Zebra_Dialog("Please enter a valid 5 digit zipcode", { 'type': 'error', 'overlay_opacity': .5, 'title': 'Validation Error' }); lcform.zip.focus(); return false; } return true; } function checkDayViewRange(lcform) { var dayStart = lcform.dayStart.selectedIndex+1; var dayEnd = lcform.dayEnd.selectedIndex+1; if (dayEnd<=dayStart) { $.Zebra_Dialog("Please make sure the day-view 'To:' hour is later than the 'From:' hour.", { 'type': 'error', 'overlay_opacity': .5, 'title': 'Validation Error' }); lcform.dayStart.focus(); return false; } return true; } // if you put one space in then it passes function checkSubject(lcform) { var subject = lcform.event_title.value; if (subject == "") { $.Zebra_Dialog("You must supply a title for this event", { 'type': 'error', 'overlay_opacity': .5, 'title': 'Validation Error' }); lcform.event_title.select(); return false; } return true; } function checkChangeMemberLogon(lcform) { var str = lcform.username.value; // Return false if characters are not a-z, A-Z, or 1-9. for (var i = 0; i < str.length; i++) { var ch = str.substring(i, i + 1); if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch) && (ch < "0" || "9" < ch)) || ch ==' ' && ch != '.') { if (ch!='_' && ch!='-') { $.Zebra_Dialog("The Account name may only consist of letters & numbers (spaces are not allowed).');
document.write("
|
");
//document.write(" |
");
document.write("")
function toggleCategory(id){jQuery('.cat_'+id).toggle();var payload = new Object();payload.calendar_id=2670229;payload.key='category_'+id;payload.value=jQuery('#category_' + id).is(':checked');jQuery.ajax({url:'https://localendar.com/elsie?DAM=AjaxHandler&calendar_id=2670229&key=category_'+id+'&value='+jQuery('#category_' + id).is(':checked'),dataType:'jsonp'}); }function toggleAllCat(id,flag){if (flag){jQuery('.cat_'+id).show();}else{jQuery('.cat_'+id).hide();}var payload = new Object();payload.calendar_id=2670229;payload.key='category_'+id;payload.value=jQuery('#category_' + id).is(':checked');jQuery.ajax({url:'https://localendar.com/elsie?DAM=AjaxHandler&calendar_id=2670229&key=category_'+id+'&value='+jQuery('#category_' + id).is(':checked'),dataType:'jsonp'}); }function toggleAllCategories(id,pID ){jQuery('#'+pID).find(':checkbox').each(function(){ jQuery(this).attr('checked', jQuery('#' + id).is(':checked')); toggleAllCat(jQuery(this).attr('id').substring(9),jQuery('#cat_checkall').is(':checked')); });}
document.write(" | "); document.write(""); document.write(" |
"); document.write(" | |
"); document.write(""); document.write("Online Calendar powered by localendar.com"); document.write(""); document.write(" | ");
document.write("![]() ![]() |