// wajax.js // Ajax functionality for onmouseover event specifics at http://www.rjmprogramming.com.au/wordpress ... contextual advice // RJM Programming // Robert Metcalfe // November 2014 // Mobile devices use ontouchstart and ontouchend logic // Non-Mobile devices use onmouseover and onmouseout logic var hrsel = ""; var hrdivid = ""; var zhr = null; var zok = 1; var bpost = 0; var mtimer = null; var mdownis = false; var mfunction = null; var tickcnt = 0; var wua = navigator.userAgent; var wisiPad = /iPad/i.test(wua) || /iPhone OS 3_1_2/i.test(wua) || /Android/i.test(wua) || /iPhone OS 3_2_2/i.test(wua); var wisTouch = /touch/i.test(wua) || /Touch/i.test(wua); var wadvice = 'If contextual help is available for a feature (that you long touch on) of this webpage a new green bordered webpage part will open and on clicking in this and answering Y you can read and interact with a relevant Blog Posting regarding this. To remove (or restore) context help access the All Posts menu Toggle Context Help Mode submenu, as required.'; var cpost = ""; function dowhos() { if (document.getElementById('whos').innerHTML == '?') { document.getElementById('whos').innerHTML='admin'; setTimeout(dowhos, 9000); } else if (document.getElementById('whos').innerHTML == 'admin') { document.getElementById('whos').innerHTML='admin, But we seem to be lacking that using nothing more than an array schtick you go on and on and on and on about ...'; setTimeout(dowhos, 9000); } else if (document.getElementById('whos').innerHTML.indexOf('admin,') != -1 && document.getElementById('whos').innerHTML.indexOf('glad you') == -1) { var dwhuh="admin, But we seem to be lacking that using nothing more than an array schtick you go on and on and on and on and on and on and on and on about ...
Well, glad you asked ... take a look at var ans=['8.:Oxygen','6.:Carbon','1.:Hydrogen','7.:Nitrogen','20.:Calcium','15.:Phosphorus','19.:Potassium','16.:Sulphur','11.17:Sodium.Chlorine','17.11:Chlorine.Sodium','12.:Magnesium']; "; dwhuh+=" as the array lesson today ... why the . delimiter? ... the user is presented with element percentages of the body as clues and yet you can see there that Sodium and Chlorine both have a value of 0.2% ... so, what to do? ... legitimize a . as delimiter everywhere and allow for either answer when getting to that choice ... again, just an array, but complex delimitation ... endeth of thoueth lessoneth."; document.getElementById('whos').innerHTML=dwhuh; } } function getSws(evt) { var ourid="0", oids, oidss; cpost = ""; if (evt.target.id) { ourid=evt.target.id; cpost=document.getElementById(ourid).value; } else if (evt.id) { ourid=evt.id; cpost=document.getElementById(ourid).value; } if (cpost.indexOf("?p=") != -1 && cpost.indexOf("/wordpress") != -1) { oids=cpost.split("?p="); oidss=oids[1].split("&"); bpost = eval(oidss[0]); cpost=""; } else { bpost = 99999; } if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getVisualSynopsis(evt) { bpost = 17510; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getAlphabeticalSearch(evt) { bpost = 16749; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getHighlightedSearch(evt) { bpost = 16598; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getBytheby(evt) { bpost = 11891; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getBodyBorder(evt) { bpost = 13953; //; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getHrs(evt) { return; bpost = 11666; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getPostedOn(evt) { return; bpost = 11444; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getSVG(evt) { return; bpost = 10920; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 8000); } } function getBlockquote(evt) { return; bpost = 11408; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getNoclass(evt) { return; bpost = 11421; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getCode(evt) { return; bpost = 10939; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getRpnow(evt) { return; bpost = 10985; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getDownloadMode(evt) { return; bpost = 12156; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function getContextHelpMode(evt) { return; bpost = 12220; if ((wisiPad || wisTouch)) { if (mtimer) clearInterval(mtimer); tickcnt = 0; mtimer = setInterval(mchecker, 1000); } else { setTimeout(xget, 4000); } } function clickaid(aidis) { var ooaidis=document.getElementById(aidis); if (ooaidis != null) { document.getElementById(aidis).click(); } else { //alert(999); var oaidis=document.getElementsByClassName(aidis.replace("a","")); //alert(998); if (oaidis[0] != null) { //alert(999); var huhhref=oaidis[0].innerHTML.split("href="); //alert(996); if (huhhref.length > 1) { //alert(995); var huhdelim=huhhref[1].substring(0,1); //alert(994); var huhref=huhhref[1].substring(1).split(huhdelim); //alert(huhref[0]); location.href=huhref[0]; } } } } function winit() { var opostedon = null; var clname = ''; var hdivids; var allPs; zhr = null; zok = 1; hrsel = ""; if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('div'); } else { allPs= document.getElementsByTagName('div'); } for (var j=0; j < allPs.length; j++) { hdivid = allPs[j].id; if (typeof hdivid == "undefined") { hdivid = ""; } else { if (hdivid.indexOf("post-") != -1) { hdivids = (hdivid.substring(hdivid.indexOf("post-")) + " ").split(" "); hdivid = hdivids[0]; hdivids = allPs[j].innerHTML.split(' class="entry-title">'); if (hdivids.length > 1) { clname = ("~" + hdivids[1]).replace('~<',' ').replace('~',''); hdivids = clname.split("<"); if (hdivid != "" && hdivids[0] != "") { if (hdivids[0].indexOf(">") != -1) { clname = hdivids[0]; hdivids = clname.split(">"); hdivids[0] = hdivids[hdivids.length - 1]; } if (hrsel.length == 0) { hrsel = "
"; } else if (hrsel.indexOf(hdivids[0]) == -1) { hrsel = hrsel.replace("", ""); } } } } } } if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('p'); } else { allPs= document.getElementsByTagName('p'); } for (var j=0; j < allPs.length; j++) { hdivid = allPs[j].id; if (typeof hdivid == "undefined") { hdivid = ""; } else { hdivids = allPs[j].innerHTML.split(">"); if (hdivids.length > 1) { clname = ("~" + hdivids[1]).replace('~<',' ').replace('~',''); hdivids = clname.split("<"); if (hdivids[0].indexOf(">") != -1) { clname = hdivids[0]; hdivids = clname.split(">"); hdivids[0] = hdivids[hdivids.length - 1]; } if ((hrsel + "*").indexOf("
"; } else if (hdivids[0].substring(0,1) >= "A" && hdivids[0].substring(0,1) <= "Z" && hrsel.indexOf(hdivids[0]) == -1) { hrsel = hrsel.replace("
"; } else if (hdivids[0].substring(0,1) >= "A" && hdivids[0].substring(0,1) <= "Z" && hrsel.indexOf(hdivids[0]) == -1) { hrsel = hrsel.replace("", ""); } } } } } } if (hrsel.indexOf("", ""); } } } } } if (allPs[j].id == "access") { if ((wisiPad || wisTouch)) { allPs[j].ontouchstart = getGradient; allPs[j].ontouchend = yehBut; } else { allPs[j].onmouseover = getGradient; // 10640 if (allPs[j].title.indexOf(" ...") == -1) { allPs[j].title = allPs[j].title + " ... welcome to the long hover functionality that shows Blog Post regarding CSS3 Gradient"; } allPs[j].onmouseout = yehBut; } } } if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) { allPs = document.getElementsByTagName('p'); } else { allPs= document.getElementsByTagName('p'); } for (var j=0; j < allPs.length; j++) { hdivid = allPs[j].id; if (typeof hdivid == "undefined") { hdivid = ""; } else { hdivids = allPs[j].innerHTML.split(">"); if (hdivids.length > 1) { clname = ("~" + hdivids[1]).replace('~<',' ').replace('~',''); hdivids = clname.split("<"); if (hdivids[0].indexOf(">") != -1) { clname = hdivids[0]; hdivids = clname.split(">"); hdivids[0] = hdivids[hdivids.length - 1]; if ((wisiPad || wisTouch)) { wisiPad = wisiPad; } else { allPs[j].innerHTML = newblogmap(allPs[j].innerHTML, 0); // map to new blog with permalink /%postname%/ } } if ((hrsel + "*").indexOf("
"; } else if (hdivids[0].substring(0,1) >= "A" && hdivids[0].substring(0,1) <= "Z" && hrsel.indexOf(hdivids[0]) == -1) { hrsel = hrsel.replace("
"; } else if (hdivids[0].substring(0,1) >= "A" && hdivids[0].substring(0,1) <= "Z" && hrsel.indexOf(hdivids[0]) == -1) { hrsel = hrsel.replace("", ""); } } } } } } if (hrsel.indexOf("