function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; 
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){
       document.MM_sr[j++]=x; 
       if(!x.oSrc) x.oSrc=x.src; 
       x.src=a[i+2];
   }
}



function get_random(maxNum)
{
  if (Math.random && Math.round)
  {
    var ranNum= Math.round(Math.random()*(maxNum-1));
    ranNum+=1;
    return ranNum;
  }
  else
  {
  today= new Date();
  hours= today.getHours();
  mins=   today.getMinutes();
  secn=  today.getSeconds();
  if (hours==19)
   hours=18;
  var ranNum= (((hours+1)*(mins+1)*secn)%maxNum)+1;
  return ranNum;
  }
}

function get_Image()
{
pic_width=695;   /*change to match the height of all your images */
pic_height=174;   /* change to match the width of all your images */

 if (document.images)
 {

    /* define image urls */

     pic1= new Image(pic_width,pic_height);
     pic1.src="images/mainpic_Oettinger A4 Rear 4.jpg";  
     pic2= new Image(pic_width,pic_height); 
     pic2.src="images/mainpic_Carrera_GT_Frt.jpg"; 
     pic3= new Image(pic_width,pic_height);
     pic3.src="images/mainpic_Brabus CLS front 2.jpg";  
     pic4= new Image(pic_width,pic_height);
     pic4.src="images/mainpic_TAGTsport_StudioRR.jpg";
     pic5= new Image(pic_width,pic_height);
     pic5.src="images/mainpic_b07aa011.jpg";
     pic6= new Image(pic_width,pic_height);
     pic6.src="images/mainpic_GTstreet_front.jpg";
     pic7= new Image(pic_width,pic_height);
     pic7.src="images/mainpic_GTstreet_rear.jpg";
     pic8= new Image(pic_width,pic_height);
     pic8.src="images/mainpic_OET-Golf V_34.jpg";
     pic9= new Image(pic_width,pic_height);
     pic9.src="images/mainpic_OETA3-wagen-34.jpg";
     pic10= new Image(pic_width,pic_height);
     pic10.src="images/mainpic_OETS4-front.jpg";
	 pic11= new Image(pic_width,pic_height);
     pic11.src="images/mainpic_GTstreet_side.jpg";
	 pic12= new Image(pic_width,pic_height);
     pic12.src="images/mainpic_TechArt Magnum rear.jpg";
	 pic13= new Image(pic_width,pic_height);
     pic13.src="images/mainpic_Techart-997-34-studio.jpg";
	 pic14= new Image(pic_width,pic_height);
     pic14.src="images/mainpic_techart-996-driverside.jpg";
	 pic15= new Image(pic_width,pic_height);
     pic15.src="images/mainpic_S-Class-Black-front-3.jpg";
	 pic16= new Image(pic_width,pic_height);
     pic16.src="images/mainpic_TECHART_Turbo_Front.jpg";
	 pic17= new Image(pic_width,pic_height);
     pic17.src="images/mainpic_TA_987_WIDE_RR2_lr.jpg";
	 pic18= new Image(pic_width,pic_height);
     pic18.src="images/mainpic_TAGTsport_StudioFRT.jpg";
	 pic19= new Image(pic_width,pic_height);
     pic19.src="images/mainpic_techart-996-back35.jpg";
	 pic20= new Image(pic_width,pic_height);
     pic20.src="images/mainpic_S-Class-Silver-front2rear2.jpg";
	 pic21= new Image(pic_width,pic_height);
     pic21.src="images/mainpic_Widestar rear_E.jpg";
	 pic22= new Image(pic_width,pic_height);
     pic22.src="images/mainpic_neu-4_1174417165_610x610.jpg";
	 pic23= new Image(pic_width,pic_height);
     pic23.src="images/mainpic_neu-14_1174416285_610x610.jpg";
	 pic24= new Image(pic_width,pic_height);
     pic24.src="images/mainpic_OET- Golf V-front-end.jpg";
	 pic25= new Image(pic_width,pic_height);
     pic25.src="images/mainpic_OET- Golf V-rear2 S4.jpg";
	 
	 
	 /* To add a new image to the random selection copy these lines,
	 and update both the 'picname' label and the image src location 
	 picname= new Image(pic_width,pic_height);
     picname.src="images/mainpic_10.jpg";
	 */
   

/* no need to edit past this point (unless you want to add more image slots) */
 
 /* Each time you add a new picture to the random selection, you must 
	make a new entry in the Array list below. Make sure to match the name of the image 
	to the name entered above. Also be sure to add one to the get_random() line 
	and the new Array(+1) line.
	*/
 
      var choose_one= get_random(25);  
      choose_one--;

      var pics= new Array(25) 
       pics[0]=pic1.src;
       pics[1]=pic2.src;
       pics[2]=pic3.src;
       pics[3]=pic4.src;
       pics[4]=pic5.src; 
       pics[5]=pic6.src; 
       pics[6]=pic7.src; 
       pics[7]=pic8.src;
       pics[8]=pic9.src;
       pics[9]=pic10.src;  
       pics[10]=pic11.src;  
       pics[11]=pic12.src;
       pics[12]=pic13.src;
       pics[13]=pic14.src;
       pics[14]=pic15.src;
       pics[15]=pic16.src;
       pics[16]=pic17.src;
       pics[17]=pic18.src;
       pics[18]=pic19.src;
       pics[19]=pic20.src;
       pics[20]=pic21.src;
       pics[21]=pic22.src;
       pics[22]=pic23.src;
       pics[23]=pic24.src;
       pics[24]=pic25.src;
   

       if ((x=MM_findObj('imgHeader'))!=null){
           x.src=pics[choose_one];
        }

  //document.write(cent_it+"<IMG SRC='"+pics[choose_one]+"' width='"+pic_width+"' height='"+pic_height+"' border='"+border_size+"'>"+cent_it2);
 }
}