		 var image1x ;
  	     var image2x ;
         var image3x ;
         var home_left;
         var home_cent ;
         var home_right ;
         var home_bot ;
         var home_left08 = " " ;
         var home_right08 = " ";
function getsubPictures(){
		   
 		var random_num = 0;
         var image1 = "001" ;
  		 random_num =(Math.round((Math.random()*4)));
  		 if(random_num == 0) {random_num = 4};
  		 if(random_num < 0) {random_num = 1};
  		 image1 = "000" + random_num;
  		 image1 = image1.substring(image1.length -3,image1.length );
  	     image1x = "<img id='pic1' src='http://www.correctdeck.com/img/header/sub_image_" + image1 + ".jpg' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='200' height='85'>";     
         var image2 = "002" ;
  		 random_num =(Math.round((Math.random()*4))) ;
  		 if(random_num == 0) {random_num = 4};
  		 random_num = random_num + 4;
  		 image2 = "000" + random_num;
  		 image2 = image2.substring(image2.length -3,image2.length );
         image2x = "<img id='pic2' src='http://www.correctdeck.com/img/header/sub_image_" + image2 + ".jpg' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='200' height='85'>";     
         var image3 = "003" ;
  		 random_num =(Math.round((Math.random()*4))) ;
  		 if(random_num == 0) {random_num = 4};
  		 random_num = random_num + 8;
  		 if (random_num > 12) random_num = 12; 
  		 image3 = "000" + random_num ;
  		 image3 = image3.substring(image3.length -3, image3.length );
  	     image3x = "<img id='pic3' src='http://www.correctdeck.com/img/header/sub_image_" + image3 + ".jpg' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='200' height='85'>";     
     	
     	 //////homepage left images///////
 	     home_left = "001" ;
  		 random_num = Math.random();
  		 random_num =(Math.round((random_num*10) ));
  		 if(random_num == 0) {random_num = 10};
  		 home_left = "000" + random_num;
  		 home_left = home_left.substring(home_left.length -2,home_left.length );
  	     home_left = "<img id='pic1h' src='http://www.correctdeck.com/img/home/Deck" + home_left + ".jpg' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='332' height='432'>";  


     	 //////homepage right images//////
 	     home_topright = "001" ;
  		 random_num = Math.random();
  		 random_num =(Math.round((random_num*4) ));
  		 if(random_num == 0) {random_num = 4};
  		 home_topright = "000" + random_num;
  		 home_topright = home_topright.substring(home_topright.length -2,home_topright.length ); 
		 home_topright = "<a href='/products/decking/cx/default.htm'><img id='pic1h' src='http://www.correctdeck.com/img/home/new/rotate_" + home_topright + ".jpg' alt='CorrectDeck CX' width='400' height='280' border=0></a>";
   

	     home_cent = "001" ;
  		 random_num = Math.random();
  		 random_num =(Math.round((random_num*3) ));
  		 if(random_num == 0) {random_num = 1};
  		 home_cent = "000" + random_num;
  		 home_cent = home_cent.substring(home_cent.length -2,home_cent.length );
  	     home_cent = "<img id='pic2h' src='http://www.correctdeck.com/img/home/home_cent_" + home_cent + ".jpg' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='243' height='141'>";     

	     home_right = "001" ;
  		 random_num = Math.random();
  		 random_num =(Math.round((random_num*3) ));
  		 if(random_num == 0) {random_num = 1};
  		 home_right = "000" + random_num;
  		 home_right = home_right.substring(home_right.length -2,home_right.length );
  	     home_right = "<img id='pic3h' src='http://www.correctdeck.com/img/home/home_right_" + home_right + ".jpg' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='243' height='141'>";     

         var random_save = 0;
     	 //////homepage left images///////
 	     home_left08 = "001" ;
  		 random_num = Math.random();
  		 random_num =(Math.round((random_num*19) ));
  		 if(random_num == 0) {random_num = 19};
  	 	 random_save = random_num;
     
  		 home_left08 = "000" + random_num;
  		 home_left08 = home_left08.substring(home_left08.length -2,home_left08.length );
  	     home_left08 = "<img id='pic1h' src='http://www.correctdeck.com/img/08/rotate/Rotate" + home_left08 + ".jpg' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='277' height='140'>";  

	
	  	 //////homepage right images///////
 	     home_right08 = "001" ;
  		 random_num = Math.random();
  		 random_num =(Math.round((random_num*20) ));
  		 if(random_num == 0) {random_num = 20};
  		 if (random_save == random_num) {random_num = 20};
     	 home_right08 = "000" + random_num;
  		 home_right08 = home_right08.substring(home_right08.length -2,home_right08.length );
  	     home_right08 = "<img id='pic2h' src='http://www.correctdeck.com/img/08/rotate/Rotate" + home_right08 + ".jpg' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='277' height='140'>";  


	     home_bot = "001" ;
  	//	 random_num = Math.random();
  	//	 random_num =(Math.round((random_num*3) ));
  	//	 if(random_num == 0) {random_num = 1};
  	//	 home_bot = "000" + random_num;
  	//	 home_bot = home_bot.substring(home_bot.length -2,home_bot.length );
  	     home_bot = "<a href='http://www.correctdeck.com/products/decking/cx/default.htm'><img id='pic4h' src='http://www.correctdeck.com/img/home/home_bot_01.gif' alt='CorrectDeck&reg; Composite Decking &amp; Railing Systems' width='487' height='109' border='0'></a>";     
  }
    	 getsubPictures();

