
function findimg()
{
 var imgs,i,imgsrc;
// Loop through all images, check if they contain the class roll
 imgs=document.getElementsByTagName('img');
 for(i=0;i<imgs.length;i++)
 {
  if(/l/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l0/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l1/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l2/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l3/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l4/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l5/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l6/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l7/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l8/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
 for(i=0;i<imgs.length;i++)
 {
  if(/l9/.test(imgs[i].id))
  {
// add the function roll to the parent Element of the image
	imgsrc='http://www.astroworld.co.il/showimage.php?img='+imgs[i].src;
  	imgs[i].parentNode.onclick=function(){window.open(imgsrc);};
  	imgs[i].title='Click on image to enlarge it';
  }
 }
}


window.onload=function(){
 findimg();
}