// aimsStradario.js
/*
*  JavaScript template file for ArcIMS HTML Viewer
*		dependent on aimsXML.js, ArcIMSparam.js, aimsCommon.js, aimsMap.js, aimsIdentify, and aimsLayers.js
*		To be interactive, dependent also on aimsDHTML.js, aimsClick.js, and aimsNavigation.js
*/

function str_csi_SettaLayerStradario() {
  //il layer  0 è quello dello stradario in modo da poter fare 
  //identify solo su questo per tutta le sessione
  setActiveLayer(0);
}

//gestione delle label delle fermate e dei punti di partenza e arrivo
function str_csi_addStartEndPoints(sStartPoint,sEndPoint) {
  var sReturnString="";
  if (sStartPoint!="" && sEndPoint!="") {
	  sReturnString+='<LAYER type="acetate" name="Acetate2">';
    if (str_csi_fermate.length>0) {
      for (i=1;i<str_csi_fermate.length-1;i++) {
    	  sReturnString+='<OBJECT units="database">';
        sReturnString+='<TEXT coords="'+str_csi_fermate[i]+'" label="'+(i)+'">';
        sReturnString+='<TEXTMARKERSYMBOL font="Arial" fontstyle="bold" fontsize="16" blockout="255,255,255" fontcolor="'+str_csi_stradPercTematSott[0]+'" />';
        sReturnString+='</TEXT>';
	      sReturnString+='</OBJECT>';	  	  
      }
    }
	  sReturnString+='<OBJECT units="database">';
    sReturnString+='<TEXT coords="'+sEndPoint+'" label="A">';
    sReturnString+='<TEXTMARKERSYMBOL font="Arial" fontstyle="bold" fontsize="16" blockout="255,255,255" fontcolor="'+str_csi_stradPercTematSott[0]+'" />';
    sReturnString+='</TEXT>';
	  sReturnString+='</OBJECT>';	  	  
	  sReturnString+='<OBJECT units="database">';
    sReturnString+='<TEXT coords="'+sStartPoint+'" label="P">';
    sReturnString+='<TEXTMARKERSYMBOL font="Arial" fontstyle="bold" fontsize="16" blockout="255,255,255" fontcolor="'+str_csi_stradPercTematSott[0]+'" />';
    sReturnString+='</TEXT>';
	  sReturnString+='</OBJECT>';	  	  
	  sReturnString+='</LAYER>';
  } 
  
  return sReturnString;
}
