function writeLangCookie(cookieValue) { //var today = new Date(); //var expire = new Date(); //nDays=1; //expire.setTime(today.getTime() + 3600000*24*nDays); //document.cookie = "lang_pref="+ escape(cookieValue) + ";expires=" + expire.toGMTString() + ";path=/"; document.cookie = "lang_pref="+ escape(cookieValue) + ";path=/"; } function popup(mylink, width, height, windowname) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') { href=mylink; } else { href=mylink.href; } //window.open(href, windowname, 'width=910,height=440,resizable=1,scrollbars=0'); window.open(href, windowname, 'width=' + width + ',height=' + height + 'resizable=1,scrollbars=0'); return false; } function funcWriteTopNav(sInput,sObjectDelimiter,sItemDelimiter) { var sOutput = new String(); var sClass = null; var sUrl = null; var sText = null; var aryThisLink = null; var aryTopNav = unescape(sInput); aryTopNav = aryTopNav.split(sObjectDelimiter); var nLen = aryTopNav.length; //made this 1 so the home page link does not show //for(var i = 0; i < nLen; i++) for(var i = 1; i < nLen; i++) { //This is a sapcer that shows up after every row except the last if (i != 1) { sOutput += "\n" } aryThisLink = aryTopNav[i].split(sItemDelimiter); sText = aryThisLink[0]; sUrl = aryThisLink[1]; sClass = (parseInt(aryThisLink[2])) ? "class=\"gni_on\"" : "class=\"gni_off\""; //alert ("sUrl\n" + sUrl); //alert ("sText\n" + sText); sOutput += "" + sText + "\n"; } //alert ("sOutput\n" + sOutput); return sOutput; } function funcWriteBreadcrumb(sInput) { var sOutput = new String(); var sClass = null; var sUrl = null; var sText = null; var aryThisLink = null; var aryTopNav = unescape(sInput); aryTopNav = aryTopNav.split(";"); var nLen = aryTopNav.length; //sOutput += " "; for(var i = 0; i < nLen; i++) { aryThisLink = aryTopNav[i].split(","); sText = aryThisLink[0]; sUrl = aryThisLink[1]; if (i > 0) { sOutput += " » "; } //if its not the last one, use a href, or not if it is last (or current page) if (i < nLen-1) { sOutput += "" + sText + ""; } else { sOutput += "" + sText + "\n" } } //alert ("sOutput=\n" + sOutput); return sOutput; } function funcSetupLink(sSiteName, sLinkUrlId, newWindow ) { var sSiteNameParseKey = "SITENAME"; var sHomepagePath = "/main/SiteGen/SITENAME/Content/Home.html"; var sHomepageUrl = sHomepagePath.replace(sSiteNameParseKey, sSiteName); var sExternal = new String(">"); var sLink = new String(""); var sLinkA = new String(""); //alert ("sSiteName=*" + sSiteName + "*") //alert ("sLinkUrlId=*" + sLinkUrlId + "*") //alert ("sHomepagePath=*" + sHomepagePath + "*") //alert ("sHomepageUrl=*" + sHomepageUrl + "*") //Retrieve string hidden in a div with the id passed in as a parameter var oStandardLinks = document.getElementById(sLinkUrlId ); if ( oStandardLinks ) { sExternal = oStandardLinks.innerHTML; //alert ("If1-1 sExternal=*" + sExternal + "*") sExternal = trimString(sExternal) //alert ("If1-2 sExternal=*" + sExternal + "*") } oStandardLinks = document.getElementById(sLinkUrlId+"_Link" ); if ( oStandardLinks ) { sLink = oStandardLinks.innerHTML; //alert ("If2 sLink=*" + sLink + + "*") } oStandardLinks = document.getElementById(sLinkUrlId+"_LinkA" ); if ( oStandardLinks ) { sLinkA = oStandardLinks.innerHTML; //alert ("If3 sLinkA=*" + sLinkA + "*") } //alert ("sExternal=*" + sExternal + "*") //alert ("sLink=*" + sLink + "*") //alert ("sLinkA=*" + sLinkA + "*") //Manipulate StandardLink strings if you want to var sUrl = (sLinkA.indexOf("/eprise") == 0) ? sLink : sExternal; //alert ("sUrl 1=" + sUrl) //alert ("sHomepageUrl =" + sHomepageUrl) sUrl = (sUrl.length > 0) ? sUrl : sHomepageUrl; //alert ("About to send - sUrl 2= *" + sUrl + "*") if(sUrl.length > 0 && sUrl.indexOf("/") >= 0) { //alert ("newwindow: " + newWindow) if (newWindow=='yes') { //alert ("newWindow=='yes'") var openWindow = window.open(sUrl, '_blank'); openWindow.focus(); history.back(); } else if (newWindow=='630x575') { //alert ("newWindow=='630x575'") var openWindow = window.open(sUrl,'630x575window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=630,height=575'); openWindow.focus(); history.back(); } else { //alert ("else") top.location.replace(sUrl); } } } function checkObitSearch(form) { //alert ("In checkObitSearch") var errorText = "" search_value = false var start_year = "" var end_year = "" if (form.start_date) { //alert ("The start_date Field Exists") //alert ("form.start_date.value=" + form.start_date.value) if ((form.start_date.value!= "")&&(form.start_date.value!="mm/dd/yyyy")) { search_value = true var st_date=form.start_date if (isDate(st_date.value)==false) { st_date.focus() return false } else { start_year = st_date.value.substr(st_date.value.length-4) } } } if (form.end_date) { //alert ("The end_date Field Exists") //alert ("form.end_date.value=" + form.end_date.value) if ((form.end_date.value!= "")&&(form.end_date.value!="mm/dd/yyyy")) { search_value = true var ed_date=form.end_date if (isDate(ed_date.value)==false) { ed_date.focus() return false } else { end_year = ed_date.value.substr(ed_date.value.length-4) } } } if (form.lastname) { if (form.lastname.value!="") { search_value = true } } //alert ("start_year=" + start_year) //alert ("end_year=" + end_year) var year_search = "" if ((start_year!="")||(end_year!="")) { if (start_year=="") { year_search = end_year } if (end_year=="") { year_search = start_year } if (start_year==end_year) { year_search = start_year } //else we don't set it since we can only search on a single year } if (form.search_year) { if (year_search!="") { form.search_year.value = year_search } //alert("form.search_year.value=" + form.search_year.value) } if (search_value) { return true; } else { alert("You must fill out a Last Name and/or a Dates to perform a search.") return false; } } function pageObitFormSubmit(pgNum) { //alert ("In pageObitFormSubmit") form1 = document.ObitSearch; //alert ("In pageObitFormSubmit pgNum=" + pgNum); form1.action = "/obituaries.html?page=" + pgNum; checkForm = checkObitSearch(form1) //alert ("checkForm=" + checkForm) if (checkForm) { //alert ("submiting") form1.submit(); } } function isDate(dtStr) { // Declaring valid date character, minimum year and maximum year var dtCh= "/"; var minYear=1900; var maxYear=2100; var daysInMonth = DaysArray(12) var pos1=dtStr.indexOf(dtCh) var pos2=dtStr.indexOf(dtCh,pos1+1) var strMonth=dtStr.substring(0,pos1) var strDay=dtStr.substring(pos1+1,pos2) var strYear=dtStr.substring(pos2+1) strYr=strYear if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1) if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1) for (var i = 1; i <= 3; i++) { if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1) } month=parseInt(strMonth) day=parseInt(strDay) year=parseInt(strYr) if (pos1==-1 || pos2==-1) { alert("The date format should be : mm/dd/yyyy") return false } if (strMonth.length<1 || month<1 || month>12) { alert("Please enter a valid month") return false } if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]) { alert("Please enter a valid day") return false } if (strYear.length != 4 || year==0 || yearmaxYear) { alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear) return false } if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripChars(dtStr, dtCh))==false) { alert("Please enter a valid date") return false } return true } function daysInFebruary (year) { // February has 29 days in any year evenly divisible by four, // EXCEPT for centurial years which are not also divisible by 400. return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 ); } function isInteger(s) { var i; for (i = 0; i < s.length; i++) { // Check that current character is number. var c = s.charAt(i); if (((c < "0") || (c > "9"))) return false; } // All characters are numbers. return true; } function DaysArray(n) { for (var i = 1; i <= n; i++) { this[i] = 31 if (i==4 || i==6 || i==9 || i==11) {this[i] = 30} if (i==2) {this[i] = 29} } return this } function stripChars(s, bag) { var i; var returnString = ""; // Search through string's characters one by one. // If character is not in bag, append to returnString. for (i = 0; i < s.length; i++) { var c = s.charAt(i); if (bag.indexOf(c) == -1) returnString += c; } return returnString; } //--- contact form checker function fnCheckForm(form) { var alertmsg = ""; if (form.first_name.value == "") { alertmsg = alertmsg + ("- your FIRST NAME is required\n") } if (form.last_name.value == "") { alertmsg = alertmsg + ("- your LAST NAME is required\n") } if (form.address_line1.value == "") { alertmsg = alertmsg + ("- your ADDRESS is required\n") } if (form.city.value == "") { alertmsg = alertmsg + ("- your CITY is required\n") } if (form.state.value == "") { alertmsg = alertmsg + ("- your STATE is required\n") } if (form.zip.value == "") { alertmsg = alertmsg + ("- your ZIP is required\n") } if (form.email_address.value == "") { alertmsg = alertmsg + ("- your EMAIL ADDRESS is required\n") } else if (form.email_address.value.indexOf("@")==-1 || form.email_address.value.indexOf(".")==-1) { alertmsg = alertmsg + ("- your EMAIL format is not correct\n") } if (alertmsg!="") { alert("Incorrect Information: \n\n" + alertmsg + "\nPlease return to the form and correct your information.\n\nThank You.\n") alertmsg = "" return false } return true; } //--- Second Helpings Giveaway Form Checker and Set Cookie function fnCheck_SH_Form(form) { var alertmsg = ""; if (form.first_name.value == "") { alertmsg = alertmsg + ("- your FIRST NAME is required\n") } if (form.last_name.value == "") { alertmsg = alertmsg + ("- your LAST NAME is required\n") } if (form.address_line1.value == "") { alertmsg = alertmsg + ("- your ADDRESS is required\n") } if (form.city.value == "") { alertmsg = alertmsg + ("- your CITY is required\n") } if (form.state.value == "") { alertmsg = alertmsg + ("- your STATE is required\n") } if (form.zip.value == "") { alertmsg = alertmsg + ("- your ZIP is required\n") } if (form.email_address.value == "") { alertmsg = alertmsg + ("- your EMAIL ADDRESS is required\n") } else if (form.email_address.value.indexOf("@")==-1 || form.email_address.value.indexOf(".")==-1) { alertmsg = alertmsg + ("- your EMAIL format is not correct\n") } if (alertmsg!="") { alert("Incorrect Information: \n\n" + alertmsg + "\nPlease return to the form and correct your information.\n\nThank You.\n") alertmsg = "" return false } //set cookie to 1 here - this is used so a refresh of the form will not register person again - will be zero after submission document.cookie = "sh_submitted=1;path=/"; return true; } //cleans white spaces in a string function trimString(str) { while('' + str.charAt(0) == ' ') { str=str.substring(1,str.length); } while('' + str.charAt(str.length-1) == ' ') { str=str.substring(0,str.length-1); } return str; } //*--- Start from AC_RunActiveContent.js ---*// //v1.7 // Flash Player Version Detection // Detect Client Browser type // Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; function ControlVersion() { var version; var axo; var e; // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry try { // version will be set for 7.X or greater players axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); version = axo.GetVariable("$version"); } catch (e) { } if (!version) { try { // version will be set for 6.X players only axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); // installed player is some revision of 6.0 // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29, // so we have to be careful. // default to the first public version version = "WIN 6,0,21,0"; // throws if AllowScripAccess does not exist (introduced in 6.0r47) axo.AllowScriptAccess = "always"; // safe to call for 6.0r47 or greater version = axo.GetVariable("$version"); } catch (e) { } } if (!version) { try { // version will be set for 4.X or 5.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = axo.GetVariable("$version"); } catch (e) { } } if (!version) { try { // version will be set for 3.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = "WIN 3,0,18,0"; } catch (e) { } } if (!version) { try { // version will be set for 2.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); version = "WIN 2,0,0,11"; } catch (e) { version = -1; } } return version; } // JavaScript helper required to detect Flash Player PlugIn version information function GetSwfVer(){ // NS/Opera version >= 3 check for Flash plugin in plugin array var flashVer = -1; if (navigator.plugins != null && navigator.plugins.length > 0) { if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; var descArray = flashDescription.split(" "); var tempArrayMajor = descArray[2].split("."); var versionMajor = tempArrayMajor[0]; var versionMinor = tempArrayMajor[1]; var versionRevision = descArray[3]; if (versionRevision == "") { versionRevision = descArray[4]; } if (versionRevision[0] == "d") { versionRevision = versionRevision.substring(1); } else if (versionRevision[0] == "r") { versionRevision = versionRevision.substring(1); if (versionRevision.indexOf("d") > 0) { versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); } } var flashVer = versionMajor + "." + versionMinor + "." + versionRevision; } } // MSN/WebTV 2.6 supports Flash 4 else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; // WebTV 2.5 supports Flash 3 else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; // older WebTV supports Flash 2 else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; else if ( isIE && isWin && !isOpera ) { flashVer = ControlVersion(); } return flashVer; } // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) { versionStr = GetSwfVer(); if (versionStr == -1 ) { return false; } else if (versionStr != 0) { if(isIE && isWin && !isOpera) { // Given "WIN 2,0,0,11" tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] tempString = tempArray[1]; // "2,0,0,11" versionArray = tempString.split(","); // ['2', '0', '0', '11'] } else { versionArray = versionStr.split("."); } var versionMajor = versionArray[0]; var versionMinor = versionArray[1]; var versionRevision = versionArray[2]; // is the major.revision >= requested major.revision AND the minor version >= requested minor if (versionMajor > parseFloat(reqMajorVer)) { return true; } else if (versionMajor == parseFloat(reqMajorVer)) { if (versionMinor > parseFloat(reqMinorVer)) return true; else if (versionMinor == parseFloat(reqMinorVer)) { if (versionRevision >= parseFloat(reqRevision)) return true; } } return false; } } function AC_AddExtension(src, ext) { if (src.indexOf('?') != -1) return src.replace(/\?/, ext+'?'); else return src + ext; } function AC_Generateobj(objAttrs, params, embedAttrs) { var str = ''; if (isIE && isWin && !isOpera) { str += ' '; } str += ''; } else { str += '