var total=1; var delay=1000; var errcnt=0; var origih=""; var bigthing=""; var raction=""; var lastw=null; var url=""; var lis=""; var ris=""; var clis=""; var cris=""; var tlsf="


"; var trsf="


"; var xf=null; var yf=null; var elemtype = new Array(); var elemid = new Array(); var elemclass = new Array(); var elemcontent = new Array(); var elemucontent = new Array(); var elemvalid = new Array(); var elempos = new Array(); var elemepos = new Array(); function relative_to_absolute(inth) { var huhs, posthuhs, ii, m, delimis=" "; var uubits=url.split("?"); if (uubits[0].indexOf("/") != -1) { var uuubits=uubits[0].split("/"); if (uuubits[eval(uuubits.length - 1)] != "") { if (uuubits[eval(uuubits.length - 1)].indexOf(".") != -1) { uubits[0] = uubits[0].replace("/" + uuubits[eval(uuubits.length - 1)], "/"); } else { uubits[0] += "/"; } } } var uudirname=uubits[0]; var outth = inth; var ideas = new Array(" href='", ' href="', " Href='", ' Href="', " HREF='", ' HREF="', " href=", " Href=", " HREF=", " src='", ' src="', " Src='", ' Src="', " SRC='", ' SRC="', " src=", " Src=", " SRC="); if (uudirname != "" && url != "") { for (m=0; m 1) { for (ii=eval(huhs.length - 1); ii>=1; ii--) { delimis=ideas[m].substring(eval(ideas[m].length - 1), eval(ideas[m].length)); if (delimis == "=") delimis=" "; posthuhs=huhs[ii].trim().replace(">"," ").replace(/mailto:/g, "http:").replace(/javascript:none;/g, "http:").split(delimis); if (posthuhs[0].length > 0) { if (posthuhs[0].substring(0,1) == "#" || posthuhs[0].substring(0,4).toLowerCase().replace(/file/g, "http").toLowerCase() == "http") { outth = outth; } else if (posthuhs[0].substring(0,1) != "/" && posthuhs[0].substring(0,1) != "'" && posthuhs[0].substring(0,1) != '"') { while (outth.indexOf(posthuhs[0]) != -1) { outth=outth.replace(posthuhs[0], "youwill-never-ever-findthis"); } outth=outth.replace(/youwill-never-ever-findthis/g, uudirname + posthuhs[0]); //alert(posthuhs[0] + " To " + uudirname + posthuhs[0]); } else if (posthuhs[0].substring(1,2) != "/" && posthuhs[0].substring(0,1) != "'" && posthuhs[0].substring(0,1) != '"') { while (outth.indexOf(posthuhs[0]) != -1) { outth=outth.replace(posthuhs[0], "youwill-never-ever-findthis"); } outth=outth.replace(/youwill-never-ever-findthis/g, uudirname.substring(0, eval(uudirname.length - 1)) + posthuhs[0]); //alert(posthuhs[0] + " to " + uudirname.substring(0, eval(uudirname.length - 1)) + posthuhs[0]); } } } } } } return outth; } function howmany(of, within) { var sbits=within.substring(1).split(of); return eval(-1 + sbits.length); } function creepback(isp) { var retval=isp, ii, layer=0; //alert(document.body.innerHTML.substring(eval(-2 + isp))); for (ii=eval(-2 + isp); ii>=0; ii--) { if (document.body.innerHTML.substring(ii, eval(ii + 1)) == ">") layer++; if (document.body.innerHTML.substring(ii, eval(ii + 1)) == "<") { layer--; if (eval(layer) < 0) { //alert(document.body.innerHTML.substring(eval(-1 + ii))); return eval(0 + ii); } } else { retval=0; } } return retval; } function creepalong(isp, tid) { var retval=isp, ii,jj=-1,layer=0; //alert(document.body.innerHTML.substring(eval(1 + isp))); for (ii=0; ii") { layer--; if (eval(layer) < 0) { if (document.body.innerHTML.substring(eval(1 + ii), eval(3 + ii)) != "= eval(ipos)) { waspos=ipos; types=bits[ii].toUpperCase().replace(" ",">").split(">"); thistype=types[0]; if (uc.indexOf("") != -1) { subbits=uc.substring(ipos).split(""); layer=howmany("<" + thistype, subbits[0]); thiscont=""; for (jj=0; jj" + " ... " + thiscont); //alert("1 ... " + thiscont); elemepos.push(ipos); elempos.push(waspos); elemtype.push(thistype.toLowerCase()); elemvalid.push(true); elemcontent.push(thiscont); if (thisis != "") elemucontent.push(relative_to_absolute(thiscont.replace(/absolute;/g, "relative;"))); subbits=thiscont.toUpperCase().split(' ID="'); if (subbits.length > 1) { layer=waspos; waspos+=subbits[0].length; waspos+=5; types=ac.substring(waspos).split('"'); elemid.push(types[0]); //alert(types[0] + " .y.. " + ac.substring(waspos)); waspos=layer; } else { elemid.push(""); } subbits=thiscont.toUpperCase().split(' CLASS="'); if (subbits.length > 1) { layer=waspos; waspos+=subbits[0].length; waspos+=8; types=ac.substring(waspos).split('"'); elemclass.push(types[0]); //alert(types[0] + " .x.. " + ac.substring(waspos)); waspos=layer; } else { elemclass.push(""); } layer=0; //alert(87); if (thisis != "") { if (elemucontent[elemucontent.length - 1].indexOf("<") != -1 && elemucontent[elemucontent.length - 1].indexOf(" ") != -1) { lsf+=""; tlsf=tlsf.replace("", "" + elemucontent[elemucontent.length - 1] + ""); } } else { lsf+=""; //alert(88); lsf+=""; //alert(89); } } else if (thistype.substring(0,1) != "!" && thistype.substring(0,1) != "/") { layer=1; subbits=ac.substring(ipos).split(">"); thiscont=subbits[0] + ">"; subbits=ac.substring(ipos).split("/>"); if (eval(2 + subbits[0].length) < eval(thiscont.length)) { thiscont=subbits[0] + "/>"; } jpos+=thiscont.length; // alert(ac.substring(ipos, jpos)); if (ipos != jpos) thiscont=ac.substring(ipos, jpos); ipos=jpos; if (ac.substring(ipos, eval(2 + ipos)) == ""; jpos+=eval(3 + thistype.length); ipos=jpos; //alert("!" + " ... " + thistype + " +++ " + thiscont); } //alert("<" + thistype + "" + " ... " + thiscont); //alert("2 ... " + thiscont); if (thiscont.toUpperCase().indexOf("<" + thistype.toUpperCase()) != -1) { elemepos.push(-1); elempos.push(waspos); elemtype.push(thistype.toLowerCase()); elemvalid.push(true); elemcontent.push(thiscont); if (thisis != "") elemucontent.push(relative_to_absolute(thiscont.replace(/absolute;/g, "relative;"))); subbits=thiscont.toUpperCase().split(' ID="'); if (subbits.length > 1) { layer=waspos; waspos+=subbits[0].length; waspos+=5; types=ac.substring(waspos).split('"'); elemid.push(types[0]); waspos=layer; //alert(types[0]); } else { elemid.push(""); } subbits=thiscont.toUpperCase().split(' CLASS="'); if (subbits.length > 1) { layer=waspos; waspos+=subbits[0].length; waspos+=9; types=ac.substring(waspos).split('"'); elemclass.push(types[0]); waspos=layer; //alert(types[0]); } else { elemclass.push(""); } layer=0; if (thisis != "") { if (elemucontent[elemucontent.length - 1].indexOf("<") != -1 && elemucontent[elemucontent.length - 1].indexOf(" ") != -1) { rsf+=""; trsf=trsf.replace("", "" + elemucontent[elemucontent.length - 1] + ""); } } else { rsf+=""; rsf+=""; } } } else if (thistype.substring(0,1) != "/") { layer=1; subbits=ac.substring(ipos).split("-->"); thiscont=subbits[0] + "-->"; jpos+=thiscont.length; if (ipos != jpos) thiscont+=ac.substring(ipos, jpos); ipos=jpos; //alert("huh<" + thistype + "" + " ... " + thiscont); //alert("3 ... " + thiscont); layer=0; elemepos.push(-1); elempos.push(waspos); elemtype.push(""); elemvalid.push(false); elemcontent.push(thiscont); if (thisis != "") elemucontent.push(relative_to_absolute(thiscont.replace(/absolute;/g, "relative;"))); elemid.push(""); elemclass.push(""); } } kpos+=bits[ii].length; kpos++; } if (thisis != "") { lso.innerHTML=lsf; rso.innerHTML=rsf; } else { lso.innerHTML=lsf; rso.innerHTML=rsf; if (tlsf.indexOf("", rsf + "" + trsf); //document.body.innerHTML = document.body.innerHTML.replace(lsf + "", lsf + "" + tlsf); document.getElementById('lefttd').innerHTML+=tlsf; document.getElementById('righttd').innerHTML+=trsf; tlsf="
"; trsf="
"; } } if (thisis != "") fillarrays(''); } function docgetclass(inc, intag) { if (document.getElementsByClassName) { return document.getElementsByClassName(inc); } else { var ijl; var anarris=[]; var huhs=document.getElementsByTagName(intag); for (ijl=0; ijl") != -1) { ispot=document.body.innerHTML.indexOf(intowhat.innerHTML + ""); } else { ispot=document.body.innerHTML.indexOf(intowhat.innerHTML + ""); } ispot=creepback(ispot); lastbit=document.body.innerHTML.substring(ispot); //alert(document.body.innerHTML.substring(0,ispot)); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; document.getElementById('mode').value=bef; } else { if (intowhat.tagName != 'A') { if (document.getElementById('mode').value == 'Before') { // ??? //alert(875); lastbit=intowhat.innerHTML; intowhat.innerHTML=placedhtml.replace('[action]', '[' + raction + ']') + lastbit; } else { intowhat.innerHTML+=placedhtml.replace('[action]', '[' + raction + ']'); } } else if (document.body.innerHTML.indexOf(intowhat.innerHTML + "") != -1) { document.body.innerHTML=document.body.innerHTML.replace(intowhat.innerHTML + "", intowhat.innerHTML + "" + placedhtml.replace('[action]', '[' + raction + ']')); document.getElementById('mode').value=bef; } else if (document.body.innerHTML.indexOf(intowhat.innerHTML + "") != -1) { document.body.innerHTML=document.body.innerHTML.replace(intowhat.innerHTML + "", intowhat.innerHTML + "" + placedhtml.replace('[action]', '[' + raction + ']')); document.getElementById('mode').value=bef; } } } else if (document.body.innerHTML.toUpperCase().indexOf("<" + intowhat.tagName.toUpperCase() + ' ID="' + intowhat.id.toUpperCase() + '"') != -1) { ispot=document.body.innerHTML.toUpperCase().indexOf("<" + intowhat.tagName.toUpperCase() + ' ID="' + intowhat.id.toUpperCase() + '"'); if (document.getElementById('mode').value == 'After') ispot=creepalong(ispot, intowhat.id); lastbit=document.body.innerHTML.substring(ispot); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; document.getElementById('mode').value=bef; } } else { //for (var ii=0; ii=0; ii--) { if (intowhat.item(ii).innerHTML != "") { if (document.getElementById('mode').value == 'Before' && intowhat.item(ii).tagName == 'A') { if (document.body.innerHTML.indexOf(intowhat.item(ii).innerHTML + "") != -1) { ispot=document.body.innerHTML.indexOf(intowhat.item(ii).innerHTML + ""); } else { ispot=document.body.innerHTML.indexOf(intowhat.item(ii).innerHTML + ""); } ispot=creepback(ispot); lastbit=document.body.innerHTML.substring(ispot); //alert(document.body.innerHTML.substring(0,ispot)); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; document.getElementById('mode').value=bef; } else { if (intowhat.item(ii).tagName != 'A') { if (document.getElementById('mode').value == 'Before') { // ??? //alert(872); lastbit=intowhat.item(ii).innerHTML; intowhat.item(ii).innerHTML=placedhtml.replace('[action]', '[' + raction + ']') + lastbit; } else { intowhat.item(ii).innerHTML+=placedhtml.replace('[action]', '[' + raction + ']'); } } else if (document.body.innerHTML.indexOf(intowhat.item(ii).innerHTML + "") != -1) { document.body.innerHTML=document.body.innerHTML.replace(intowhat.item(ii).innerHTML + "", intowhat.item(ii).innerHTML + "" + placedhtml.replace('[action]', '[' + raction + ']')); document.getElementById('mode').value=bef; } else if (document.body.innerHTML.indexOf(intowhat.item(ii).innerHTML + "") != -1) { document.body.innerHTML=document.body.innerHTML.replace(intowhat.item(ii).innerHTML + "", intowhat.item(ii).innerHTML + "" + placedhtml.replace('[action]', '[' + raction + ']')); document.getElementById('mode').value=bef; } } } else if (intowhat.item(ii).id) { if (intowhat.item(ii).id != '') { if (document.body.innerHTML.toUpperCase().indexOf("<" + intowhat.item(ii).tagName.toUpperCase() + ' ID="' + intowhat.item(ii).id.toUpperCase() + '"') != -1) { ispot=document.body.innerHTML.toUpperCase().indexOf("<" + intowhat.item(ii).tagName.toUpperCase() + ' ID="' + intowhat.item(ii).id.toUpperCase() + '"'); if (document.getElementById('mode').value == 'After') { ispot=creepalong(ispot, intowhat.item(ii).id); } lastbit=document.body.innerHTML.substring(ispot); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; document.getElementById('mode').value=bef; } } } } } } else if (intowhat != "") { cintowhat="" + eval(intowhat); //alert(cintowhat); if (cintowhat.substring(0,1) == '-') { //alert(8); if (elemid[eval(-1 - intowhat)] != "" && eval(elemcontent[eval(-1 - intowhat)].length) > 50) { //alert(88); tih=document.getElementById(elemid[eval(-1 - intowhat)]).innerHTML; //alert(888); if (tih != "") { //alert(8888); ispot=document.body.innerHTML.indexOf(tih); lastbit=document.body.innerHTML.substring(ispot); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; } else { ispot=document.body.innerHTML.toUpperCase().indexOf("<" + document.getElementById(elemid[eval(-1 - intowhat)]).tagName.toUpperCase() + ' ID="' + document.getElementById(elemid[eval(-1 - intowhat)]).id.toUpperCase() + '"'); lastbit=document.body.innerHTML.substring(ispot); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; document.getElementById('mode').value=bef; tih="x"; } } //alert(88888); if (tih == "") { //alert(888888); ispot=elempos[eval(-intowhat - 1)]; lastbit=document.body.innerHTML.substring(ispot); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; } } else if (cintowhat.substring(0,1) >= '0' && cintowhat.substring(0,1) <= '9') { //alert(elempos[eval(-1 + intowhat)] + ": " + elemcontent[eval(-1 + intowhat)]); if (elemid[eval(-1 + intowhat)] != "" && eval(elemcontent[eval(-1 + intowhat)].length) > 50) { //alert(elemid[eval(-1 + intowhat)]); //alert(6); if (document.getElementById(elemid[eval(-1 + intowhat)]).innerHTML == null) { //alert(66); if (document.body.innerHTML.toUpperCase().indexOf("<" + document.getElementById(elemid[eval(-1 + intowhat)]).tagName.toUpperCase() + ' ID="' + document.getElementById(elemid[eval(-1 + intowhat)]).id.toUpperCase() + '"') != -1) { //alert(666); ispot=document.body.innerHTML.toUpperCase().indexOf("<" + document.getElementById(elemid[eval(-1 + intowhat)]).tagName.toUpperCase() + ' ID="' + document.getElementById(elemid[eval(-1 + intowhat)]).id.toUpperCase() + '"'); ispot=creepalong(ispot, document.getElementById(elemid[eval(-1 + intowhat)]).id); lastbit=document.body.innerHTML.substring(ispot); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; document.getElementById('mode').value=bef; } } else { //alert(6666); tih=document.getElementById(elemid[eval(-1 + intowhat)]).innerHTML; if (tih != "" && tih != null) { //alert(66666); ispot=document.body.innerHTML.indexOf(tih); ispot+=tih.length; ispot+=3; ispot+=elemtype[eval(-1 + intowhat)].length; //alert("IsPot=" + eval(elempos[eval(-1 + intowhat)]) + " + " + eval(elemcontent[eval(-1 + intowhat)].length) + " = " + ispot); } else { //alert(666666); if (document.body.innerHTML.toUpperCase().indexOf("<" + document.getElementById(elemid[eval(-1 + intowhat)]).tagName.toUpperCase() + ' ID="' + document.getElementById(elemid[eval(-1 + intowhat)]).id.toUpperCase() + '"') != -1) { //alert(654); ispot=document.body.innerHTML.toUpperCase().indexOf("<" + document.getElementById(elemid[eval(-1 + intowhat)]).tagName.toUpperCase() + ' ID="' + document.getElementById(elemid[eval(-1 + intowhat)]).id.toUpperCase() + '"'); ispot=creepalong(ispot, document.getElementById(elemid[eval(-1 + intowhat)]).id); lastbit=document.body.innerHTML.substring(ispot); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; document.getElementById('mode').value=bef; } } } } if (tih == "") { if (document.body.innerHTML.indexOf(elemcontent[eval(-1 + intowhat)]) != -1) { ispot=document.body.innerHTML.indexOf(elemcontent[eval(-1 + intowhat)]); ispot+=eval(elemcontent[eval(-1 + intowhat)].length); //alert("Ispot=" + eval(elempos[eval(-1 + intowhat)]) + " + " + eval(elemcontent[eval(-1 + intowhat)].length) + " = " + ispot); } else if (eval(elemepos[eval(-1 + intowhat)]) >= 0) { ispot=eval(elemepos[eval(-1 + intowhat)]); //alert("ISpot=" + eval(elempos[eval(-1 + intowhat)]) + " + " + eval(elemcontent[eval(-1 + intowhat)].length) + " = " + ispot); } else { ispot=eval(elempos[eval(-1 + intowhat)]) + eval(elemcontent[eval(-1 + intowhat)].length); } } //alert("ispot=" + eval(elempos[eval(-1 + intowhat)]) + " + " + eval(elemcontent[eval(-1 + intowhat)].length) + " = " + ispot); lastbit=document.body.innerHTML.substring(ispot); //alert(lastbit); document.body.innerHTML=document.body.innerHTML.substring(0,ispot) + placedhtml.replace('[action]', '[' + raction + ']') + lastbit; } else { //alert(987); slotthisin(placedhtml.replace('[action]', '[' + raction + ']'), document.getElementById(intowhat)); } } else { document.body.innerHTML=placedhtml.replace('[action]', '[' + raction + ']') + document.body.innerHTML; } fillarrays(''); document.getElementById('mode').value=bef; } function firstoff() { // proof of concept only slotthisin("", document.getElementsByTagName('a')); slotthisin("", 'myh1'); slotthisin(""); slotthisin("", document.getElementsByTagName('p')); slotthisin("", 'mybut'); slotthisin("", document.getElementById('myh2')); } function onclickf(proposedhtml, slotthing) { if (typeof slotthing === 'undefined') { slotthisin(proposedhtml); } else if (slotthing == " ") { slotthisin(proposedhtml, ''); } else if (slotthing == "") { if (bigthing == "") { slotthisin(proposedhtml); } else { slotthisin(proposedhtml, eval(bigthing)); } } else { slotthisin(proposedhtml, eval(slotthing)); } } function andthen() { xf = document.getElementById("myiframe"); yf = (xf.contentWindow || xf.contentDocument); try { if (yf.document) { yf = yf.document; } if (yf.body == null) { errcnt++; //document.title += errcnt; setTimeout(andthen, 2000); if (errcnt == 15) alert("This URL ... " + url + " ... cannot be examined."); } else { errcnt=0; //alert(yf.body.innerHTML); fillarrays(encodeURIComponent(yf.body.innerHTML)); } } catch (err) { errcnt+=15; if (errcnt >= 15) { errcnt=0; alert("The URL ... " + url + " ... cannot be examined ... " + err.message); } else { setTimeout(andthen, 2000); } } } function changedhtml(inv) { if (inv.indexOf("<") != -1 || inv.indexOf("lt;") != -1) { inv=inv; } else if (inv != "") { document.getElementById("myiframe").src=decodeURIComponent(inv); document.getElementById('leftfromselect').innerHTML=document.getElementById('leftfromselect').innerHTML.replace("select element to slot in", "select " + decodeURIComponent(inv) + " element to slot in"); document.getElementById('rightfromselect').innerHTML=document.getElementById('rightfromselect').innerHTML.replace("select element to slot in", "select " + decodeURIComponent(inv) + " element to slot in"); setTimeout(andthen, 2000); if (1 == 2) { xf = document.getElementById("myiframe"); yf = (xf.contentWindow || xf.contentDocument); if (yf.document) { yf = yf.document; } fillarrays(encodeURIComponent(yf.body.innerHTML)); } } else { var ubits=document.URL.split("?"); var egis=ubits[0].replace("/HTMLCSS/slotin.html", "/").replace("/slotin.html", "/").replace("slotin.html", "").replace("/HTMLCSS/slotin.htm", "/").replace("/slotin.htm", "/").replace("slotin.htm", ""); var preinv=prompt("Optionally supply URL whose HTML Elements you would like to be able to place eg. " + egis, egis); if (preinv == null) preinv=""; if (preinv != "") { url=preinv; changedhtml(preinv); } } } function placeit(ois,oid,oval) { var okay=true; var tbid=oid=oid.replace('fromselect', 'intext'); var tbido=document.getElementById(tbid); if (oval.indexOf("<") != -1) { okay=false; tbido.value=oval; } else if (decodeURIComponent(oval).indexOf("<") != -1) { okay=false; tbido.value=decodeURIComponent(oval); } else { tbido.value=elemucontent[eval(oval)]; //.replace(//g, ">"); } if (okay) { if (lastw != null) { lastw.close(); lastw=null; } lastw=window.open("", "_blank", "top=100,left=100,width=400,height=400"); lastw.document.write("Slotting In HTML Elements - RJM Programming - September, 2015" + tbido.value + ""); } else { ois.style.backgroundColor='purple'; window.scrollTo(0, 0); } } function ouronload() { if (origih == "") origih=document.body.innerHTML; url = location.search.split('url=')[1] ? location.search.split('url=')[1].split('&')[0] : ''; if (url != '') { changedhtml(url); } fillarrays(''); } dsplit=document.title.split(" ... 0"); total = location.search.split('total=')[1] ? location.search.split('total=')[1].split('&')[0] : total; dddsplit=document.head.innerHTML.split("total="); if (dddsplit.length > 1) { ddsplit=dddsplit[1].split("&"); total=eval(ddsplit[0]); } ddsplit=document.head.innerHTML.split("slotin"); delay = location.search.split('delay=')[1] ? location.search.split('delay=')[1].split('&')[0] : delay; if (document.title.indexOf(" ... 0") == -1) { document.title += " ... 01"; ddsplit=document.head.innerHTML.split("slotin"); if (total == 1) { dsplit=document.head.innerHTML.split("delay="); if (dsplit.length > 1) { ddsplit=dsplit[1].split("&"); delay=eval(ddsplit[0]); } setTimeout(ouronload, delay); //alert(0); } } else if (dsplit.length > 1) { //alert(document.head.innerHTML); xsplit=eval(dsplit[1]); document.title = document.title.replace(" ... 0" + xsplit, " ... 0" + eval(1 + xsplit)); if (eval(1 + xsplit) == eval(total)) { //alert(ddsplit.length + " ... " + eval(1 + xsplit)); dsplit=document.head.innerHTML.split("delay="); if (dsplit.length > 1) { ddsplit=dsplit[1].split("&"); delay=eval(ddsplit[0]); } setTimeout(ouronload, delay); // only last call will get to here if total= used //alert(eval(1 + xsplit)); } }