//SmoPix Image Transitions
//Copyright 2003 by Shawn Olson
//All Rights Reserved
//http://www.shawnolson.net



 var change;
 var choose;
 var theImgSrc;
 var image2 = new Image();

 function portraits(){
  //portraits 
  choose = Math.round(Math.random()*5);
  if(choose == 0) {theImgSrc = "/media/tara_small.jpg"; }
  if(choose == 1) {theImgSrc = "/media/lys.jpg"; }
  if(choose == 2) {theImgSrc = "/media/jp_table_g.jpg"; }
  if(choose == 3) {theImgSrc = "/media/ninja_shadow.jpg"; }
  if(choose == 4) {theImgSrc = "/media/jp_tank.jpg"; }
  if(choose == 5) {theImgSrc = "/media/srpic_swing.jpg"; }

  return theImgSrc;
 }
 
 function business(){
  //business photos
  choose = Math.round(Math.random()*6);
  if(choose == 0) {theImgSrc = "/media/keyboard.jpg"; }
  if(choose == 1) {theImgSrc = "/media/gnome_ceram.jpg"; }
  if(choose == 2) {theImgSrc = "/media/cranes.jpg"; }
  if(choose == 3) {theImgSrc = "/media/dogs_ceram.jpg"; }
  if(choose == 4) {theImgSrc = "/media/build.jpg"; }
  if(choose == 5) {theImgSrc = "/media/cols_sky_2.jpg"; }
  if(choose == 6) {theImgSrc = "/media/cols_sky.jpg"; }

  return theImgSrc;
 }
 
 function wedding(){
  //wedding photos 
  choose = Math.round(Math.random()*4);
  if(choose == 0) {theImgSrc = "/media/wed_5.jpg"; }
  if(choose == 1) {theImgSrc = "/media/wed_3.jpg"; }
  if(choose == 2) {theImgSrc = "/media/wedding_1.jpg"; }
  if(choose == 3) {theImgSrc = "/media/wed_4.jpg"; }
  if(choose == 4) {theImgSrc = "/media/wed_cake.jpg"; }

  return theImgSrc;
 }
 
 
 function concert(){
 
  choose = Math.round(Math.random()*9);
  if(choose == 0) {theImgSrc = "/media/concert_10.jpg"; }
  if(choose == 1) {theImgSrc = "/media/concert_1.jpg"; }
  if(choose == 2) {theImgSrc = "/media/concert_2.jpg"; }
  if(choose == 3) {theImgSrc = "/media/concert_3.jpg"; }
  if(choose == 4) {theImgSrc = "/media/concert_4.jpg"; }
  if(choose == 5) {theImgSrc = "/media/concert_5.jpg"; }
  if(choose == 6) {theImgSrc = "/media/concert_6.jpg"; }
  if(choose == 7) {theImgSrc = "/media/concert_7.jpg"; }
  if(choose == 8) {theImgSrc = "/media/concert_8.jpg"; }
  if(choose == 9) {theImgSrc = "/media/concert_9.jpg"; }

  return theImgSrc;
 
 }
 
 function Check(type){  
  if (type == 'portraits'){image2.src=portraits();}
  if (type == 'business'){image2.src=business();} 
  if (type == 'wedding'){image2.src=wedding();} 
  if (type == 'concert'){image2.src=concert();} 
  if (image2.src != 'undefined'){
   image1.src=image2.src;
  }
 }

function imageTrans(){
 
 var num;
 if (document.title == 'Columbus Business Photography'){
  Check("business");
 }  
 
 if (document.title == 'Concert Photography'){
  Check("concert");
 } 
 if (document.title == 'Columbus Wedding Photography'){
  Check("wedding");
 } 
 if (document.title == 'Portrait Photography'){
  Check("portraits");
 } 

 if ((document.title != 'Columbus Wedding Photography') && (document.title != 'Concert Photography') && (document.title != 'Columbus Business Photography') && (document.title != 'Portrait Photography') ){
 
  num = Math.round(Math.random()*3);

  if (num == 1){Check("portraits");}
  if (num == 2){Check("business");} 
  if (num == 3){Check("wedding");} 
  if (num == 0){Check("concert");} 

 }
 

}

change = setInterval("imageTrans()", 4000);

 if (document.title == 'Concert Photography'){document.write('<link href="/style/band.css" rel="stylesheet" />')}