var xqs,xpath;document.onclick=chck;function chck(e){e=e||window.event;var t=e.target||e.srcElement;if(t.nodeName.toLowerCase()!=="a"){t=t.parentNode;};if(t.nodeName.toLowerCase()==="a"){if(t.getAttribute('onclick')===null){_dohref(t);};}}function sethf(){for(var i=0;i<document.getElementsByTagName('a').length;i++){var eg=document.getElementsByTagName('a')[i];if(eg.getAttribute('onclick')===null){eg.setAttribute('onclick','_dohref(this)');}}}function getqv(url,name){var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);if(typeof(url)=='undefined'){return null;}var results=regex.exec(url);if(results===null){return null;}else{return results[1];}}function replaceqv(url,name,val){var reg="(?=[?&]*)"+name+"=([^&#]*)";var regex=new RegExp(reg);return url.replace(regex, name+"="+val);}function geturlvalue(rkey){var ss;if(window.location.search){ss=window.location.search;}else{return null;}return getqv(ss,rkey);}function getseid(){if(typeof xqseid!='undefined'){return xqseid;}else{return geturlvalue('seid');}}function _initxqs(){if(!xqs){xqs='';}if(xqs){xqs+="&seid="+getseid();}else{xqs="seid="+getseid();}var q;q=geturlvalue('q');if(q!==null){if(q.length>0){xqs+="&q="+q;}}}function isurlseid(){if(window.location.search.indexOf("seid=")<0){return 0;}return 1;}function isnewseid(){if((typeof xqseid=='undefined')&&(isurlseid()===0)){return 0;}if(typeof xqseid!='undefined'){return 1;}if(isurlseid()==1){return 2;}}function _dohref(el){if(el.href.indexOf(document.location.host)==-1){return;};var q,ss;ss=getqv(el.href,"seid");if(ss===null){ss=getseid();if(ss!==null){if(el.href.indexOf('?')==-1){el.href+='?seid='+ss;}else{el.href+='&seid='+ss;}}}q=getqv(el.href,"q");if(q===null){q=geturlvalue('q');if(q!==null){if(q.length>0){if(el.href.indexOf('?')==-1){el.href+='?q='+q;}else{el.href+='&q='+q;}}}}}function cleanres(wp){document.getElementById('txtsearch').value='';gos(wp);}function sreload(){switch(isnewseid()){case 0:window.location.reload();break;case 1:window.location.search='seid='+getseid();break;default:window.location.search='seid='+getseid();}}function dxact(){window.location.search=window.location.search.replace(/(xact=)\w*[^&](&){0,1}/i, "");}function isEnterKey(e){var charcode;if(!e){e=window.event;}if(e.keyCode){charcode=e.keyCode;}else if(e.which){charcode=e.which;}if(charcode==13){return true;}else{return false;}}function createhttpreq(){var xobj;if(typeof(XMLHttpRequest)!='undefined'){return new XMLHttpRequest();}var activeXObjects=['MSXML2.XML6HTTP.6.0', 'Msxml2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP'];for(var i=0;i<activeXObjects.length;i++){try{xobj=new ActiveXObject(activeXObjects[i]);if(typeof(xobj)!='undefined'){return xobj;}}catch(err){}}alert('XMLHttp object could not be created');}function cjson(rx){var xobj;xobj=createhttpreq();var rurl;rurl="service.asmx?sclone=1&seid="+getseid();xobj.open("POST",rurl, false);xobj.setRequestHeader("Content-Type", "application/jsonrequest;charset=utf-8");xobj.send(rx);return xobj.responseText;}function cjsona(rx,xt,rfnc){var xobj,rurl,xtr;xobj=createhttpreq();if(xt===1){xtr="POST"}else{xtr="GET"};rurl="service.asmx?sclone=1&seid="+getseid();xobj.open(xtr,rurl, true);xobj.setRequestHeader("Content-Type", "application/jsonrequest;charset=utf-8");xobj.send(rx);xobj.onreadystatechange=function(){if(xobj.readyState==4){rfnc.call(this,xobj.responseText);}}}function sencode(rstr){rstr=rstr.replace(/^\s*([\S\s]*?)\s*$/, '$1');rstr=rstr.replace(/\s{2,}/g,' ');rstr=encodeURI(rstr);rstr=rstr.replace(/\x27/g, "%27");rstr=rstr.replace(/(\&)/gi, "%26");rstr=rstr.replace(/(\+)/gi, "%2B");rstr=rstr.replace(/(\%20)/gi, "+");rstr=rstr.replace(/=/g, "%3D");rstr=rstr.replace(/\#/g, "%23");rstr=rstr.replace(/\$/g, "%24");rstr=rstr.replace(/\(/g, "%28");rstr=rstr.replace(/\)/g, "%29");rstr=rstr.replace(/\//g, "%2F");rstr=rstr.replace(/\\/g, "%5C");rstr=rstr.replace(/\,/g, "%2C");return(rstr);}if(!this.JSON){this.JSON={};}(function(){function f(n){return n <10 ? '0'+n : n;}if(typeof Date.prototype.toJSON !=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())? this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z' : null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b': '\\b','\t': '\\t','\n': '\\n','\f': '\\f','\r': '\\r','"' : '\\"','\\': '\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable, function(a){var c=meta[a];return typeof c==='string' ? c :'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"' :'"'+string+'"';}function str(key, holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value &&typeof value==='object' &&typeof value.toJSON==='function'){value=value.toJSON(key);}if(typeof rep==='function'){value=rep.call(holder, key, value);}switch(typeof value){case 'string':return quote(value);case 'number':return isFinite(value)? String(value): 'null';case 'boolean':case 'null':return String(value);case 'object':if(!value){return 'null';}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i <length;i+=1){partial[i]=str(i, value)|| 'null';}v=partial.length===0 ? '[]' :gap ? '[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']' :'['+partial.join(',')+']';gap=mind;return v;}if(rep &&typeof rep==='object'){length=rep.length;for(i=0;i <length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k, value);if(v){partial.push(quote(k)+(gap ? ': ' : ':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value, k)){v=str(k, value);if(v){partial.push(quote(k)+(gap ? ': ' : ':')+v);}}}}v=partial.length===0 ? '{}' :gap ? '{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}' : '{'+partial.join(',')+'}';gap=mind;return v;}}if(typeof JSON.stringify !=='function'){JSON.stringify=function(value, replacer, space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i <space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}rep=replacer;if(replacer &&typeof replacer !=='function' &&(typeof replacer !=='object' || typeof replacer.length !=='number')){throw new Error('JSON.stringify');}return str('',{'': value});};}if(typeof JSON.parse !=='function'){JSON.parse=function(text, reviver){var j;function walk(holder, key){var k, v, value=holder[key];if(value &&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value, k)){v=walk(value, k);if(v !==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder, key, value);}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx, function(a){return '\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').replace(/(?:^|:|,)(?:\s*\[)+/g, ''))){j=eval('('+text+')');return typeof reviver==='function' ?walk({'': j}, ''): j;}throw new SyntaxError('JSON.parse');};}}());function checkval(e,pat){return pat.test(e);}function setfoc(elid){if(typeof xfoc!=='undefined'){elid=xfoc;};var fel;fel=document.getElementById(elid);if(fel===null){return;}var flen=fel.value.length;if(document.selection){fel.focus();var oSel=document.selection.createRange();oSel.moveStart('character',-flen);oSel.moveStart('character', flen);oSel.moveEnd('character', 0);oSel.select();}else if(fel.selectionStart||fel.selectionStart=='0'){fel.selectionStart=flen;fel.selectionEnd=flen;fel.focus();}}if(typeof(xar)=="undefined"){var xar=["/search", "/dir", "/deceased", "/images","/name","/products","/member","/forum","/news"]};function gos(spath){if(spath===null){spath='/';};if(spath=='/'){var xr=/^\/[^/]*/i;var xp=xr.exec(document.location.pathname);if(arrindex(xar,xp)<0){spath=xar[0]}else{spath=xp};}document.location=document.location.protocol+'//'+document.location.host+spath+'?seid='+getseid()+'&pn=1&q='+sencode(document.getElementById('txtsearch').value);}function arrindex(xarr,rval){for(var i=0;i<xarr.length;i++){if(xarr[i]==rval){return i}}return-1}function gosm(spath){document.location='http://m.sysoon.com'+spath+'?seid='+getseid()+'&pn=1&q='+sencode(document.getElementById('txtsearch').value);}function switchssl(){var h=window.location.href;if(h.indexOf('http://')===0){h=h.replace('http://','https://');}else{h=h.replace('https://','http://');}window.location.href=h;}function setshare(e){var u,t,f;u=encodeURIComponent('http://'+document.location.hostname+document.location.pathname);t=encodeURIComponent(document.title);f=e.href;f=e.href.replace('xurl',u).replace('xtitle',t);e.target='_blank';e.href=f;}function ccbx(jsdata){var c;var cb;cb=document.createElement('select');cb.style.width="150px";for(var i=0;i <jsdata.length;i++){c=document.createElement('option');c.value=jsdata[i].value;c.appendChild(document.createTextNode(jsdata[i].text));cb.appendChild(c);}return cb;};function getjstext(cbdata,val){for(var i=0;i <cbdata.length;i++){if(cbdata[i].value===val){return cbdata[i].text;}}};function setcbx(el){var val,cb,cx,t;val=el.getAttribute('data-cbxvalue');cb=el.getAttribute('data-cbxsetvalue');if(cb!==null){document.getElementById(cb).setAttribute('value',val);}cb=el.getAttribute('data-cbx');cx=eval(cb);if(el.getAttribute('data-cbxshow')=='text'){el.innerHTML=getjstext(cx,val);el.setAttribute('onclick','scbx(this)');}else{el.innerHTML=val};};function scbx(el){if(el.firstChild.hasChildNodes()){return};var cb,cx,cbx,act,oldval,valid;oldval=el.innerHTML;el.innerHTML='';cb=el.getAttribute('data-cbx');cx=eval(cb);cbx=ccbx(cx);act="";valid=el.getAttribute('data-cbxsetvalue');if(valid!==null){act="document.getElementById('"+valid+"').value=this.options[this.selectedIndex].value;"};act=act+"this.removeAttribute('onblur');this.parentNode.setAttribute('data-cbxvalue',this.options[this.selectedIndex].value);this.parentNode.innerHTML=this.options[this.selectedIndex].innerHTML;";cbx.value=el.getAttribute('data-cbxvalue');cbx.setAttribute('onchange',act);cbx.setAttribute('data-oldval',oldval);cbx.setAttribute('onblur','this.parentNode.innerHTML=this.getAttribute("data-oldval");');el.appendChild(cbx);cbx.focus();}function swdisp(el){var e;e=document.getElementById(el);if(e.style.display=='none'){e.style.display='block';}else{e.style.display='none';};}function setadx(el,params){var xa,durl;xa=createhttpreq();durl='/adsx.sysh?seid='+getseid()+'&params='+params;xa.open("GET", durl, true);xa.setRequestHeader("Content-Type", "text/html;charset=utf-8");xa.send('');xa.onreadystatechange=function(){if(xa.readyState==4 &&xa.status==200){el.innerHTML=xa.responseText;}};return null;}function setallcbx(){var elem=document.getElementsByTagName('span');for(var i=0;i <elem.length;i++){if(elem[i].hasAttribute('data-cbx')){setcbx(elem[i]);}}}function setpageadx(){var elem=document.getElementsByTagName('div');for(var i=0;i <elem.length;i++){if(elem[i].hasAttribute('data-adx')){setadx(elem[i],elem[i].getAttribute('data-adx'));}}}function flw(el,xid,logid){var a=new Object();a.follow=new Object();var xt=el.getAttribute('data-xtype');a.follow.flid=xid;a.follow.xtype=xt;if((a.follow.flid*logid)==0){el.innerHTML="You must <a href='?xact=login'>Login to follow!</a>";return;};if(a.follow.flid>0){cjson(JSON.stringify(a));if(el.getAttribute('class')=='btx btge'){el.innerHTML="⧺ Follow";el.setAttribute("class","btx btb");}else{el.innerHTML="✔ Following";el.setAttribute("class","btx btge");}}}window.onload=function(){setfoc('txtsearch');setallcbx();}
