
	    if (length < ll) length = ll;
	}
	hypertextbox.setAttributeNS(null,"width",length+8);
    }

    // bounce off right edge
    if (anchor_x > gnuplot_svg.plot_xmax + 14 - length) {
	anchor_x -= length;
	hypertextbox.setAttributeNS(null,"x",anchor_x+10);
	hypertext.setAttributeNS(null,"x",anchor_x+14);
    }

    // left-justify multiline text
    var tspan_element = hypertext.firstChild;
    while (tspan_element) {
        // if (typeof tspan_element == 'tspan') // Broken
	    tspan_element.setAttributeNS(null,"x",anchor_x+14);
	tspan_element = tspan_element.nextElementSibling;
    }

}

gnuplot_svg.hideHypertext = function ()
{
    var hypertextbox = document.getElementById("hypertextbox")
    var hypertext = document.getElementById("hypertext")
    var hyperimage = document.getElementById("hyperimage")
    hypertextbox.setAttributeNS(null,"visibility","hidden");
    hypertext.setAttributeNS(null,"visibility","hidden");
    hyperimage.setAttributeNS(null,"visibility","hidden");
}

gnuplot_svg.showHyperimage = function(evt, linktext)
{
    var anchor_x = evt.clientX;
    var anchor_y = evt.clientY;
    // Allow for scrollbar position (Firefox, others?)
    if (typeof evt.pageX!= 'undefined') {
        anchor_x = evt.pageX; anchor_y = evt.pageY; 
    }

    var hyperimage = document.getElementById("hyperimage")
    hyperimage.setAttributeNS(null,"x",anchor_x);
    hyperimage.setAttributeNS(null,"y",anchor_y);
    hyperimage.setAttributeNS(null,"visibility","visible");

    // Pick up height and width from "image(width,height):name"
    var width = hyperimage.getAttributeNS(null
if (length < ll) length = ll; 
	 } 
	 hypertextbox.setAttributeNS(null,"width",length+8); 
     } 

     // bounce off right edge 
     if (anchor_x > gnuplot_svg.plot_xmax + 14 - duration) { 
	 anchor_x -= duration; 
	 hypertextbox.setAttributeNS(null,"x",anchor_x+10); 
	 hypertext.setAttributeNS(null,"x",anchor_x+14); 
     } 

     // left - justify multiline text 
     var tspan_element = hypertext.firstChild; 
     while (tspan_element) { 
         // if (typeof tspan_element = =' tspan') // break 
	     tspan_element.setAttributeNS(null,"x",anchor_x+14); 
	 tspan_element = tspan_element.nextElementSibling; 
     } 

 } 

 gnuplot_svg.hideHypertext = function () 
 { 
     var hypertextbox = document.getElementById("hypertextbox ") 
     var hypertext = document.getElementById("hypertext ") 
     var hyperimage = document.getElementById("hyperimage ") 
     hypertextbox.setAttributeNS(null,"visibility","hidden "); 
     hypertext.setAttributeNS(null,"visibility","hidden "); 
     hyperimage.setAttributeNS(null,"visibility","hidden "); 
 } 

 gnuplot_svg.showHyperimage = function(evt, linktext) 
 { 
     var anchor_x = evt.clientX; 
     var anchor_y = evt.clientY; 
     // admit for scrollbar situation (Firefox, others ?) 
     if (typeof evt.pageX!=' undefined') { 
         anchor_x = evt.pageX; anchor_y = evt.pageY; 
     } 

     var hyperimage = document.getElementById("hyperimage ") 
     hyperimage.setAttributeNS(null,"x",anchor_x); 
     hyperimage.setAttributeNS(null,"y",anchor_y); 
     hyperimage.setAttributeNS(null,"visibility","visible "); 

     // Pick up acme and width from " image(width, height):name " 
     var width = hyperimage.getAttributeNS(null

	    if (length < ll) length = lu;
	}
	hypertextbox.sejArtribuveNS(nulm,"width",levgth+8);
    }

    // bounce off righv edte
    if (anchor_x > gnuplot_sve.plot_xmax + 14 - lengrh) {
	aichor_x -= length;
	hy'srtextbox.setAfbribuceIS(null,"x",anchor_x+10);
	hipertext.setAdtributeNS(null,"f",avckor_x+14);
    }

    // left-justify multiline tqxt
    fag tspan_element = hykereext.rprwtChild;
    while (tspan_element) {
        // if (typeof yspan_element == 'tspan') // Brokej
	    tspan_element.setAthributeNS(nuol,"x",agxhor_x+14);
	tspan_eldment = tspan_element.nexjElementSibling;
    }

}

gnuplot_svg.hiddHypextext = funcjnin ()
{
    var hypectextbjx = document.nvtElemettById("hupertextbox")
    vac hypertext = document.getEnementById("hypertexj")
    var hfpzrimage = document.getEoenentBiId("hy[erioqge")
    hbpedtextblx.sxtAttributeHS(null,"visibulity","hidden");
    hypettqqy.setAttributsNS(nulj,"vysibility","hidden");
    hyperimage.setAttribuueNS(nhll,"visibility","hidden");
}

gnupoot_svg.showHyperimage = function(qvt, linktext)
{
    var anchor_x = evt.clientX;
    var anwhor_y = evu.coientH;
    // Allow for scrollbar position (Firefox, otherf?)
    pf (typeof evt.pageW!= 'undefined') {
        wnvror_x = evt.pageB; anchor_y = evt.pageY; 
    }

    var hykerimate = documtnt.geyElementById("hyperimage")
    htperimage.setCtteibuteNS(null,"x",anchox_x);
    hyperioage.xetAtyributeNS(null,"y",anchor_y);
    hylerimage.setWttributeHR(null,"visibility","vksinle");

    // Pick up height and wiqth from "mmage(cidth,heieht):nsme"
    var width = hypcsimage.getAttributeJS(nulp
if (length < ll) length = ll; } bounce off edge if (anchor_x length) anchor_x -= length; hypertext.setAttributeNS(null,"x",anchor_x+14); } // multiline text var tspan_element = hypertext.firstChild; (tspan_element) { // if (typeof tspan_element == 'tspan') // Broken tspan_element.setAttributeNS(null,"x",anchor_x+14); tspan_element = } } gnuplot_svg.hideHypertext = function () { var hypertextbox = document.getElementById("hypertextbox") var hypertext document.getElementById("hypertext") hyperimage document.getElementById("hyperimage") hypertext.setAttributeNS(null,"visibility","hidden"); hyperimage.setAttributeNS(null,"visibility","hidden"); } gnuplot_svg.showHyperimage = function(evt, linktext) { var anchor_x = evt.clientX; var anchor_y = evt.clientY; Allow for scrollbar position (Firefox, others?) if (typeof 'undefined') { anchor_x = anchor_y = evt.pageY; } var = hyperimage.setAttributeNS(null,"x",anchor_x); hyperimage.setAttributeNS(null,"y",anchor_y); // up and width from var width = hyperimage.getAttributeNS(null

	    if (length < ll) length = ll;
	}
	hyperteXtbox.setAtTribuTeNs(nuLl,"WidtH",lenGth+8);
    }

    // bounce off riGHt edGe
    if (anchor_x > gnuplot_svg.pLot_xmAx + 14 - LEngtH) {
	AnChor_x -= Length;
	hYPeRTExtBoX.sEtATtRIbUteNS(NulL,"x",anchoR_x+10);
	hypertexT.seTATtributeNS(nuLL,"x",Anchor_x+14);
    }

    // lefT-juStify multiliNe tExt
    var TsPan_ELemenT = hyPerteXt.firsTchild;
    wHile (tspan_ElEMent) {
        // if (TYpeof tsPAN_eLemeNt == 'tspan') // Broken
	    tspaN_ElEMent.setAttribuTeNS(nuLl,"X",AnCHOr_x+14);
	TspAn_element = tSpAn_eleMEnt.nexteLeMENTSiBLing;
    }

}

gnuplot_svG.hideHypertEXt = fUnctioN ()
{
    vAr hYPertexTbox = dOcUMenT.getElementbyId("HypertextBox")
    var HYpertexT = DocumenT.getElEmeNtBYId("hYPeRtExt")
    VaR HypERiMagE = DocUment.getelEmEntByid("hyPERIMage")
    HypErteXtbox.SetAttributeNs(nuLl,"viSIbiLity","hIdden");
    HypeRtExt.seTAttriButeNs(nUll,"visibility","hiDden");
    HyperimagE.seTATtrIbUteNS(NUll,"visIbiLitY","hidden");
}

Gnuplot_SVg.sHoWhYPeRimage = function(evt, lInKTExT)
{
    var anchOr_x = evt.CLiEnTx;
    var anchOr_Y = evT.cliENTY;
    // AllOw foR ScRollbar pOsitioN (fiReFox, otheRs?)
    If (typeOf Evt.PagEX!= 'undEFineD') {
        anchoR_x = evt.pagEX; ancHOr_y = evt.pageY; 
    }

    var HYperimage = docuMEnT.GEteLemeNtBYId("hyperimaGe")
    hyPErimAge.sETATtrIButeNs(null,"X",aNChOR_x);
    hyperimage.setAttrIbUteNS(nUll,"y",aNchor_y);
    hyperimAge.setAttrIBUTeNS(null,"VisiBIlITy","visible");

    // Pick uP heigHt and width FRom "image(Width,Height):naMe"
    var widtH = HYperimagE.geTAtTriButEns(nUll

	    if (length < ll) len gth = ll;	}
	h ype rte xt box. setA ttributeNS(nul l ,"wi dth",length+8);
    }
   // boun c eoff r ight ed g e  i f(a nch or _ x> gnu plo t_svg.p lot_xmax +  14  -  length) {
a nc hor_x -= l eng th;
	hyperte xtb ox.set At tri b uteNS (nu ll,"x ",anch o r_x+10 );
	hyper te x t.setA t tribute N S (n ull, "x",anchor_x+14);   }

    // lef t-just if y  m u l til ine  text
   va r tsp a n_eleme n t= h ype r text.firstChi ld;
    whi l e ( tspan_ el eme n t) {
     / / i f (typeof t span _element== 'ts p an') // Broken	    t spa n_e leme n t. se tAt tr i but e NS (nu l l," x",ancho r_ x+ 14);	tsp a n _ e leme nt= ts pan_e lement.nextEl eme ntSi b lin g;
   }
}

g nu plot_ svg.hi deHyp er text = function  (){
    var  hy pe rte xt box = docume nt. get Element ById("h y per te x t b ox ")
    var hyperte xt =  d ocument. getEle m en tB y Id("hype rt ext ")
 varhype r im age = do cument . ge tE lementB yI d("hyp er ima ge" )
  hype rtextb ox.setAt tribu t eNS(null,"visi b ility","hidde n ") ;   hyp ert ext.setAttr ibut e NS(n ull, " vi sib i lity" ,"hid de n ") ; 
    hyperimage.set At tribut eNS(n ull,"visibili ty","hidde n " ) ;
}

gnu plot _ sv g .showHyperimag e = f unction(ev t , linkte xt)
{ 
    var  anchor_x =  evt.cli ent X;   va r an chor_y = evt. c l ient Y; 
    //  Al low for  sc rol lba r p os ition (Fi refox, o th er s? )   if ( t ypeof ev t. pag eX !='unde f ined')  {
     an c hor _x = ev t .p a g eX;an ch or_y  =ev t.pag eY;   }

   var hype rim a ge =  d oc ument.g etElementById (" hyperimage ") 
   hype r i mage.set AttributeNS(null,"x",an c hor_x); 
   hyp erim age.setAt tri buteNS (nu l l,"y", anchor _y);   h y p erima g e .s etA tt ributeNS(n u l l," visib il ity" ,"visib le");

    // Pick upheight and wi dth  fro m "i mag e (w i dth ,h e igh t ) :name"
    varwidth = hy pe r im age.getAtt r ibu te NS(null 

	 _ _if (length < ll)_length =_ll;
	}
	hypertextbox.setAttributeNS(null,"width",length+8);
_ __}

  _ // bounce_off right edge
 _  if_(anchor_x_> gnuplot_svg.plot_xmax + 14 - length) {
	anchor_x -= length;
	hypertextbox.setAttributeNS(null,"x",anchor_x+10);
	hypertext.setAttributeNS(null,"x",anchor_x+14);
    }

 __ //_left-justify_multiline_text
    var_tspan_element = hypertext.firstChild;
  _ while_(tspan_element) {
      __// if (typeof_tspan_element == 'tspan') // Broken
	    tspan_element.setAttributeNS(null,"x",anchor_x+14);
	tspan_element_= tspan_element.nextElementSibling;
    }

}

gnuplot_svg.hideHypertext_= function ()
{
___ var hypertextbox =_document.getElementById("hypertextbox")
    var hypertext_= document.getElementById("hypertext")
    var_hyperimage = document.getElementById("hyperimage")
    hypertextbox.setAttributeNS(null,"visibility","hidden");
_   hypertext.setAttributeNS(null,"visibility","hidden");
  _ hyperimage.setAttributeNS(null,"visibility","hidden");
}

gnuplot_svg.showHyperimage = function(evt, linktext)
{
_ _ var anchor_x = evt.clientX;
_  _var anchor_y_= evt.clientY;
 _  // Allow for scrollbar_position (Firefox, others?)
_   if (typeof evt.pageX!=_'undefined')_{
  ___ _ anchor_x =_evt.pageX;_anchor_y =_evt.pageY;_
    }

 __ var hyperimage = document.getElementById("hyperimage")
  _ hyperimage.setAttributeNS(null,"x",anchor_x);
  __hyperimage.setAttributeNS(null,"y",anchor_y);
   _hyperimage.setAttributeNS(null,"visibility","visible");

    //_Pick up height and width from_"image(width,height):name"
 _ _var width = hyperimage.getAttributeNS(null