
   var myUrls = new Array();
	var ext='jpg';
	var ext2='png';
   myUrls[0] = 'marketing.php?p=custommarketingwebsites';
   myUrls[1] = 'seo.php?p=sem';
   myUrls[2] = 'marketing.php';
   myUrls[3] = 'seo.php?p=seo';
   splashsrc = 'images/splash/';
	var myPics = new Array();
	for(i=0;i<myUrls.length;i++){
		myPics[i] = new Image(0,0);
		myPics[i].src = splashsrc + i +  '_img.'+ext2;
	}
   function splashMenu(divid){
      var display = '<ul>';
      for(i=0;i<myUrls.length;i++){
         if(i==0){
            var link = '<li><a href="#" class="splash_nav active">' + (i+1) + '</a></li>';
         } else {
            var link = '<li><a href="#" class="splash_nav">' + (i+1) + '</a></li>';
         }
       display = display + link;
      }
      display = display + '</ul>';
      document.getElementById(divid).innerHTML = display;
   }
   function cyclesplash(timeout){
      var test = document.getElementById('splashmenudiv').getElementsByTagName("a");
      for(i=0; i< test.length; i++){
         if(test[i].className == 'splash_nav active'){
            if(i==(test.length-1)){
               n = 0;
            } else {
               n = i +1;
            }
               next =test[n];

         }
      }
      change(next);
      setTimeout("cyclesplash("+timeout+")",timeout);
   }
   function change(activate){
      var next = activate.innerHTML;

      $('#splash_img').hide();
      $('#splash_text').hide();
      $('#splash_link').hide();
		$(activate).hide();
         var max = myUrls.length;
         if(next > max){
            next = 1;
         }
         var no = next -1;
         var imgsrc = splashsrc + no + '_img.'+ext2;
         var txtsrc =  splashsrc + no + '_text.'+ext;
         var lnksrc = myUrls[next];
      // var active = getActive();
         $('#splash_img').attr("src",imgsrc);
         $('#splash_text').attr("src",txtsrc);
         $('#splash_link').attr("href",lnksrc);

      $('#splash_img').fadeIn(1800);
      $('#splash_text').show();//fadeIn(1800);
      $('#splash_link').show();//fadeIn(1800);
      $('.splash_nav').removeClass('active');
      activate.className = 'splash_nav active';
		$(activate).fadeIn('slow');
   // results = "no: "+no+" next:"+next+" imgsrc: "+imgsrc;
   }
$("body").ready(function(){
         $('#splash_img').fadeIn('slow');
         $('#splash_text').fadeIn('slow');
         $('#splash_link').fadeIn('slow');
         $('#splashmenudiv').fadeIn('slow');
         $('.splash_nav').click(function(){
            if(this.className != 'splash_nav active'){
               $('.splash_nav').removeClass('active');
               change(this);
            }
         });
         setTimeout("cyclesplash(9500)",9500);
   });

