//***************************************************************************////*      General purpose scripts         Copyright © RJ Hodgkiss 2008 - 2010               *////*      URL targets changed to absolute to allow use from sub-directories                  *////***************************************************************************//<!--// record referrer page for latervar lastpage = this.window.document.referrer;if (lastpage == "") lastpage = "../home.html";function launch(newURL,newname,winprops,oldname ) {  // Begin Pop_up windowvar newname = "mywindow"var remote = window.open(newURL,newname,winprops); window.open(newURL,newname,winprops); if (remote.opener == null) remote.opener = window; remote.opener.name = oldname;return remote; } // Endfunction nowfocus(form) {  // Focus on text input windowwindow.focus();document.mysearch.search.focus();  document.mysearch.search.disabled=false;}  // Endfunction leapto(form) {  // Leap to new URL - same window var newURL = form;if (newURL !='') { window.location=newURL; } }  // Endfunction leaptoselected(form) {     // Leap to new URL from Select Option menuvar navname = navigator.appName;var myindex=form.dest.selectedIndex;  // use: Select name=destwindow.location=(form.dest.options[myindex].value);    if (navname != "Microsoft Internet Explorer") { if (browserOK) dest=form.reset();}} // Endfunction listBookmarks() {         // list & parse bookmarks, remove mail & internal links                                                 // must be invoked after page is fully loadedvar   mystring = "www.succulent-plant.com/botanic.html";var          str1 = "External bookmarks: <hr>";var          str2 = "<hr>";var   winprops = "alwaysraised,resizable,menubar=1,location=1,toolbar=1,scrollbars=1,width=600,height=500,top=0,left=0";        mywindow = window.open("","mywindow",winprops);for ( i=0; i<document.links.length; i++) {    var mystring = mystring.link(document.links[i]);      var mystr1 = mystring.substring(9,16);      var mystr2 = mystring.substring(16,39);        if (mystr1 == 'mailto:') str1 +="";                               // remove mailto link else if (mystr1 == 'file://')    str1 +="";                               // remove local internal link else if (mystr2 == 'www.succulent-plant.com') str1 +="";   // remove web internal link else if (mystr2 == 'validator.w3.org/check?')   str1 +="";  // remove html validator link else if (mystr2 == 'jigsaw.w3.org/css-valid')    str1 +="";   // remove css validator link else if (mystr2 == 'www.streamline.net/?aff')  str1 +="";  // remove isp link else { str1 += "<br><a target='_new' href="+document.links[i]+">"+document.links[i]+"</a>";}  }  // write live url          with (mywindow.document) { open(); write(str1); write(str2);close(); }}  // Endfunction IsQueryString() {                                                                 // Parse URL for queries and commandsvar OnLine = false;var thisURL = window.location.href;  var len = thisURL.length;   if  ( thisURL.substring(0,7) == "http://" )  OnLine = true;           // test for online at www.succulent-plant.com     var query1 = thisURL.split("?command=");                                // look for command     if ( query1[1] == "gastropod" ) { listBookmarks();  }                // only after page fully loaded and popups enabled     if ( query1[1] == "search" ) {      if   ( OnLine == true )  setTimeout("location.replace('http://www.succulent-plant.com/succulent-plant-search.html');",100);  // On line     else   setTimeout("location.replace('succulent-plant-search.html');",100);             // Off line                                                                                return; }    var query2 = thisURL.split("?word="); var len2=query2[0].length;      // look for word in glossary     if ( query2[1] !="" ) { if (len > (len2 + 6)) {   // jump to glossary word                                        if ( OnLine == true )   newURL = "http://www.succulent-plant.com/glossary/index.html?word=" + query2[1];   // On line                                        else                             newURL = "glossary/index.html?word=" + query2[1];    // Off line                                                                                                                                                                                                            setTimeout("location.replace(newURL);",100); return; } }     var query3 = thisURL.split("?");                                     // look for instruction     if ( query3[1] == "search" ) {      if   ( OnLine == true )  setTimeout("location.replace('http://www.succulent-plant.com/succulent-plant-search.html');",100);  // On line     else   setTimeout("location.replace('succulent-plant-search.html');",100);             // Off line                                                                                return; }var     query4 = thisURL.split("?search="); var len4=query4[0].length; // look for search term     if ( query4[1] !="" ) { if (len > len4 + 8) {   // jump to search term                                        if ( OnLine == true )  newURL = "http://www.succulent-plant.com/succulent-plant-search.html?search=" + query4[1];                                        else                           newURL = "succulent-plant-search.html?search=" + query4[1];                                                         setTimeout("location.replace(newURL);",100); return; }  }}   // EndIsQueryString();  // Invoke me !//--> End