
var y = 0;
var i ;
var x = 10;
var arr = [];
var z = 0;
var pix_w = google_img_width;
var pix_h = google_img_height;

if ( google_pic_count >= 10)
{
 x = 100;

}
else
{
 x = 10;
}
google_pic_show = (google_pic_show*1)+1;

for (i=1;i < google_pic_show ;i++)
{

    while ( y >= google_pic_count || y < 1 )
	{
	  y = Math.random();
	  y = y * x;
	  y = Math.round(y);

	}	  

        for (el in arr)
	{
	  if (arr[el] == y)
	  {

           i = i-1;
           z = 1;  
          }
         
	}
    if (z == 0) 
	{
		arr[i] = y;
		if (google_pic_use_format == 1) 
		{
			document.write(google_pic_start_tag);
		}
		
		document.write('<img width="'+pix_w+'" height="'+pix_h+'" src='+img_path+google_pic_type+'_'+y+'.jpg>');
		
		if (google_pic_use_format == 1) 
		{
			document.write(google_pic_end_tag);
		}

		y = 0;
	}
     else
	{
         z = 0;
         y = 0;
	}

 }


