Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 15th, 2014  |  syntax: JavaScript  |  size: 3.04 KB  |  views: 14,047  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var img1=1;
  2. var img2=1;
  3. function imgSwap(x){
  4. if(x==1){
  5.   if (img1==1){ document.getElementById('img1').src="/images/stories/kitchen-renovation-wood-flooring-central-ma.jpg" ; img1=2;  }
  6. else if (img1==2){document.getElementById('img1').src="/images/stories/renovated-wood-flooring-kitchen-granite-countertops-central-massachusetts.jpg";  img1=1;}
  7. }
  8.  
  9. if(x==2){
  10. if (img2==1){ document.getElementById('img2').src="/images/stories/kitchen-restoration-wood-flooring-installation-western-ma.jpg" ; img2=2;  }
  11. else if (img2==2){document.getElementById('img2').src="/images/stories/restored-kitchen-countertops-finished-cabinets-western-massachusetts.jpg";  img2=1;}
  12. }
  13.  
  14. if(x==3){
  15.   if (img2==1){ document.getElementById('img3').src="/images/stories/original-kitchen-restoration-countertop-flooring-redesign-western-ma.jpg" ; img2=2;  }
  16. else if (img2==2){document.getElementById('img3').src="/images/stories/redesigned-kitchen-flooring-restoration-central-massachusetts.jpg";  img2=1;}
  17. }
  18.  
  19. if(x==4){
  20.   if (img2==1){ document.getElementById('img4').src="/images/stories/exterior-home-restoration-siding-western-ma.jpg" ; img2=2;  }
  21.   else if (img2==2){document.getElementById('img4').src="/images/stories/house-porch-entrance-renovation-lighting-western-ma.jpg";  img2=1;}
  22. }
  23.  
  24. if(x==5){
  25.   if (img2==1){ document.getElementById('img5').src="/images/stories/central-massachusetts-home-exterior-renovation.jpg" ; img2=2;  }
  26.   else if (img2==2){document.getElementById('img5').src="/images/stories/home-vinyl-siding-roofing-renovation-massachusetts.jpg";  img2=1;}
  27. }
  28.  
  29. if(x==6){
  30.   if (img2==1){ document.getElementById('img6').src="/images/stories/outside-home-restoration-siding-western-ma.jpg" ; img2=2;  }
  31.   else if (img2==2){document.getElementById('img6').src="/images/stories/finished-exterior-siding-renovation-central-ma.jpg";  img2=1;}
  32. }
  33.  
  34. if(x==7){
  35.   if (img2==1){ document.getElementById('img7').src="/images/stories/cape-kitchen-lighting-renovation-massachusetts.jpg" ; img2=2;  }
  36.   else if (img2==2){document.getElementById('img7').src="/images/stories/kitchen-cabinetry-restoration-western-massachusetts.jpg";  img2=1;}
  37. }
  38.  
  39. if(x==8){
  40.   if (img2==1){ document.getElementById('img8').src="/images/stories/kitchen-quartz-countertop-redesign-central-ma.jpg" ; img2=2;  }
  41.   else if (img2==2){document.getElementById('img8').src="/images/stories/quartz-countertop-redesign-finishing-central-ma.jpg";  img2=1;}
  42. }
  43.  
  44. if(x==9){
  45.   if (img2==1){ document.getElementById('img9').src="/images/stories/kitchen-cabinet-restoration-rollout-trash-installation-western-ma.jpg" ; img2=2;  }
  46.   else if (img2==2){document.getElementById('img9').src="/images/stories/cape-kitchen-renovation-massachusetts.jpg";  img2=1;}
  47. }
  48.  
  49. if(x==10){
  50.   if (img2==1){ document.getElementById('img10').src="/images/stories/pantry-redesign-cabinet-restoration-central-massachusetts.jpg" ; img2=2;  }
  51.   else if (img2==2){document.getElementById('img10').src="/images/stories/pantry-redesign-renovated-cabinets-western-ma.jpg";  img2=1;}
  52. }
  53.  
  54. if(x==11){
  55.   if (img2==1){ document.getElementBy
clone this paste RAW Paste Data