var c = 1;
var spark = 1;
var spark2 = 0;
var speed = 3000;
/* Preloading images */
var image1 = new Image();
image1.src = "images/vt_header_spark.gif";
var image2 = new Image();
image2.src = "images/vt_header.gif";

function disp_img(w)
{
   if (c == 3) {
      c = 1;
   }

   if (c==2)
      img_src = "images/vt_header_anim.gif";
   else {
       img_src = "images/vt_header_spark.gif";
   }
   c++;
      document.ani.src = img_src;

    /*
    if (c==2&&spark==1&spark2==0) {
         speed = 300;
         spark2 = 1;
         alert(1);
    }
    else if (c==3&&spark==1&spark2==1) {
         speed = 300;
         spark=0;
         spark2=0;
          alert(2);
    }
    else {
         speed = 3000;
         spark = 1;
          alert(3);
    } */

}


//var t = 'setInterval("disp_img('+c+')",'+speed+')';
//t = setInterval("disp_img(c)", 1000);
//eval (t);

function prepareImageSwap(elem,mouseOver,mouseOutRestore,mouseDown,mouseUpRestore,mouseOut,mouseUp) {
//Do not delete these comments.
//Non-Obtrusive Image Swap Script V1.1 by Hesido.com
//Attribution required on all accounts 
    
    if (typeof(elem) == 'string') elem = document.getElementById(elem);
    if (elem == null) return;
    //var regg = /(.*)(_nm\.)([^\.]{3,4})$/
    var regg = /(.*)(_tape\.)([^\.]{3,4})$/
    var prel = new Array(), img, imgList, imgsrc, mtchd;
    imgList = elem.getElementsByTagName('img');
    for (var i=0; img = imgList[i]; i++) {
        if (!img.rolloverSet && img.src.match(regg)) {
            mtchd = img.src.match(regg);
            //img.hoverSRC = mtchd[1]+'_hv.'+ mtchd[3];
            //img.hoverSRC = mtchd[1]+'_photo.'+ mtchd[3];
            img.hoverSRC = mtchd[1]+'_photo.'+ 'jpg';
            img.outSRC = img.src; 
            if (typeof(mouseOver) != 'undefined') { 
                //img.hoverSRC = (mouseOver) ? mtchd[1]+'_hv.'+ mtchd[3] : false;
                //img.hoverSRC = (mouseOver) ? mtchd[1]+'_photo.'+ mtchd[3] : false;
                img.hoverSRC = (mouseOver) ? mtchd[1]+'_photo.'+ 'jpg' : false;
                img.outSRC = (mouseOut) ? mtchd[1]+'_ou.'+ mtchd[3] : (mouseOver && mouseOutRestore) ? img.src : false; 
                img.mdownSRC = (mouseDown) ? mtchd[1]+'_md.' + mtchd[3] : false; 
                img.mupSRC = (mouseUp) ? mtchd[1]+'_mu.' + mtchd[3] : (mouseOver && mouseDown && mouseUpRestore) ? img.hoverSRC : (mouseDown && mouseUpRestore) ? img.src : false; 
                } 
            if (img.hoverSRC) {preLoadImg(img.hoverSRC); img.onmouseover = imgHoverSwap;} 
            if (img.outSRC) {preLoadImg(img.outSRC); img.onmouseout = imgOutSwap;} 
            if (img.mdownSRC) {preLoadImg(img.mdownSRC); img.onmousedown = imgMouseDownSwap;} 
            if (img.mupSRC) {preLoadImg(img.mupSRC); img.onmouseup = imgMouseUpSwap;} 
            img.rolloverSet = true; 
        } 
    } 
    function preLoadImg(imgSrc) { 
        prel[prel.length] = new Image(); prel[prel.length-1].src = imgSrc; 
    } 
} 
function imgHoverSwap() {this.src = this.hoverSRC;} 
function imgOutSwap() {this.src = this.outSRC;} 
function imgMouseDownSwap() {this.src = this.mdownSRC;} 
function imgMouseUpSwap() {this.src = this.mupSRC;}
//Hidden Email Script
function dc(s){c='';for (i=0;i<s.length;i++){c+=String.fromCharCode(s.charCodeAt(i)-1);}document.write(c)}