How to correctly shorten this script using arrays and iterations

Hullo elite coders of the universe, I am new to this coding buisness and was wondering how to use for loops and arrays to shorten the script below:

 var l1 : GUITexture; 
 var l2 : GUITexture;
 var l3 : GUITexture;    
 var l4 : GUITexture; 
 var l5 : GUITexture;
 var l6 : GUITexture;
 var l7 : GUITexture; 
 var l8 : GUITexture;
 var l9 : GUITexture;
 var l10 : GUITexture; 
 var l11 : GUITexture;
 var l12 : GUITexture;
 var l13 : GUITexture;
 var l14 : GUITexture;
 var l15 : GUITexture; 
 var l16 : GUITexture;  
 var l17 : GUITexture;
 var l18 : GUITexture;

  function Update () {

  for (var evt : Touch in Input.touches) 

   {

var l1T = l1.HitTest(Input.mousePosition);

var l2T = l2.HitTest(Input.mousePosition);

var l3T = l3.HitTest(Input.mousePosition);

var l4T = l4.HitTest(Input.mousePosition);

var l5T = l5.HitTest(Input.mousePosition);

var l6T = l6.HitTest(Input.mousePosition);

var l7T = l7.HitTest(Input.mousePosition);

var l8T = l8.HitTest(Input.mousePosition);

var l9T = l9.HitTest(Input.mousePosition);

var l10T = l10.HitTest(Input.mousePosition);

var l11T = l11.HitTest(Input.mousePosition);

var l12T = l12.HitTest(Input.mousePosition);

var l13T = l13.HitTest(Input.mousePosition);

var l14T = l14.HitTest(Input.mousePosition);

var l15T = l15.HitTest(Input.mousePosition);

var l16T = l16.HitTest(Input.mousePosition);

var l17T = l17.HitTest(Input.mousePosition);

var l18T = l18.HitTest(Input.mousePosition);

if (evt.phase == TouchPhase.Stationary)

 { 
 if(l1T) 
 { 
 Application.LoadLevel(1);
 } 
 if(l2T) 
 {
 Application.LoadLevel(2);
 } 
 if(l3T) 
 {
and so on.....
 } 

 } 



 }

HERE IS MY FEEBLE ATTEMPT ------------------->

var levels : int;

levels = new float[15];

for(var i = 0; i < 14; i++)
{
if( == )
{

DO SHIT!
}
Thats as far as I got :frowning:
ANy help would be rewarded with endless love and appreciation.

var myTextures GUITexture = new GUITexture[18]; // you could set these in the inspector.

function Update(){

    for(var i=0;i<myTextures.length;i++)
    {
        if(myTextures*.HitTest(Input.mousePosition))*

{
for (var evt : Touch in Input.touches)
{
if (evt.phase == TouchPhase.Stationary)
Application.LoadLevel(i+1);
}
}
}
}
think that should work…
of course don’t forget to assign the GUITextures to the array…

A few tweaks on the above answer works perfectly! Thanks bro.

var myTextures : GUITexture[] = new GUITexture[18]; 

 function Update(){

for(var i=0;i<myTextures.length;i++)
{
    if(myTextures*.HitTest(Input.mousePosition))*

{
for (var evt : Touch in Input.touches)

{
if (evt.phase == TouchPhase.Stationary)
Application.LoadLevel(i+1);
}
}
}
}