<!--
//browser detection
function Is() 
{
   var agent = navigator.userAgent.toLowerCase();
   this.major = parseInt(navigator.appVersion);
   this.minor = parseFloat(navigator.appVersion);

   this.ns = ((agent.indexOf('mozilla') != -1) && 	
    (agent.indexOf('spoofer') == -1) && 
    (agent.indexOf('compatible') == -1) && 
    (agent.indexOf('opera') == -1) && 
    (agent.indexOf('webtv') == -1));

   this.ns2 = (this.ns && (this.major == 2));
   this.ns3 = (this.ns && (this.major == 3));
   this.ns4 = (this.ns && (this.major == 4));
   this.ns6 = (this.ns && (this.major >= 5));
   this.ie = (agent.indexOf("msie") != -1);
   this.ie3 = (this.ie && (this.major < 4));
   this.ie4 = (this.ie && (this.major >= 4));
   this.ie5 = (this.ie && (this.major == 4) && 
     (agent.indexOf("msie 5.0") != -1));
   this.ieX = (this.ie && !this.ie3 && !this.ie4);
}

var is = new Is();

//function to make valid layers that work in NS and IE
function layerObject(id,position,left,top,visibility) 
{
   if(is.ie4) 
   {
	this.obj = document.all[id].style;
	this.obj.position = position;
	this.obj.left = left;
	this.obj.top = top;
	this.obj.visibility = visibility;
	return this.obj;
   }
   if(is.ns4) 
   {
	this.obj = document.layers[id];
	this.obj.position = position;
	this.obj.left = left;
	this.obj.top = top;
	this.obj.visibility = visibility;
	return this.obj;
   }
   
   //is.ie5||is.ns6 or more modern browser 
   this.obj = document.getElementById(id).style;
   this.obj.position = position;
   this.obj.left = left;
   this.obj.top = top;
   this.obj.visibility = visibility;
   return this.obj;
}

var focusCount=0; //Counts the number of times the silder slides.

var TABLE_WIDTH=950; //Parameters set in terms of the table width

var NUM_HORIZ_TIMES; //number of times the horizontal image moves, a function of screen width

var EffectLyr;//layer in which vertical sliding image resides
var HorizEffectLyr;//layer for horizontal sliding image resides

var VERT_IMAGE_WIDTH=402;//If this is changed, also change in EffectLayer and VertEffectLayer html code 
var VERT_IMAGE_HEIGHT=151;
var iVERT_RATE=20; //controls speed of vertical sliding image

var HORIZ_IMAGE_WIDTH=146;
var HORIZ_IMAGE_HEIGHT=49;
var iHORIZ_RATE=10;//controls speed of horizontal sliding image

var Y_INCREMENT = 2;//each iVERT_RATE msec interval, 2 more pixels are revealed at the bottom edge.

//number of times VertEffect() needs to be called to completely reveal the page.
//N.B. NUM_TIMES*Y_INCREMENT = HORIZ_IMAGE_HEIGHT; //= height of vertical scrolling image.
var NUM_TIMES = HORIZ_IMAGE_HEIGHT/Y_INCREMENT;
var WAIT_TIME=100;//time the vertical image stays on screen before moving upward

var X_INCREMENT = 2;//each iHORIZ_RATE msec interval, move to the right.

var timerVert;//timer for vertical sliding image
var timerHoriz;//timer for horizontal sliding image
var iCount; //counter for vertical sliding image timer
var iHCount;//counter for horizontal sliding image timer


var iHORIZ_POSx; //(width of the screen- image width)/2
var iHORIZ_POSy=59;


//var iVERT_POSx; //(width of the screen- image width)/2
//var iVERT_POSy=51;

function Load()
{
   SetDimensions(); //Set time parameters in terms of the table width
   
   EffectLyr=new layerObject('EffectLayer','absolute', iHORIZ_POSx,iHORIZ_POSy,'hidden');  
   
   HorizEffectLyr=new layerObject('HorizEffectLayer','absolute', iHORIZ_POSx,iHORIZ_POSy,'hidden'); 
    
   iCount=0;
   iHCount=0;
   timerVert=null;
   timerHoriz=null; 
   
   imgID=document.images["invite"];   
   imgID.width=HORIZ_IMAGE_WIDTH;
   imgID.height=HORIZ_IMAGE_HEIGHT;   
   
   VertEffect(); 
}

function myOnFocus()
{
  if ( focusCount < 3 )
   {
      Load();
      focusCount++;
   }
}
   
function SetDimensions()
{   
   //4 IS "FUDGE FACTOR"
   NUM_HORIZ_TIMES=(TABLE_WIDTH-HORIZ_IMAGE_WIDTH)/(2*X_INCREMENT)-4;
   //iVERT_POSx=(TABLE_WIDTH-VERT_IMAGE_WIDTH)/2-56;      
   
   iHORIZ_POSx=(TABLE_WIDTH-HORIZ_IMAGE_WIDTH)/2;
}

function VertEffect()
{    
   EffectLyr.visibility="visible";   
      
   if(iCount<= NUM_TIMES)  
   { 
      EffectLyr.left =iHORIZ_POSx;  
      EffectLyr.top =iHORIZ_POSy+iCount*Y_INCREMENT-HORIZ_IMAGE_HEIGHT;      
      
      clipLayer(EffectLyr,0,HORIZ_IMAGE_HEIGHT-iCount*Y_INCREMENT,1000,HORIZ_IMAGE_HEIGHT);
      iCount++;
      
      timerVert=setTimeout("VertEffect()",iVERT_RATE);//clip region advances each iVERT_RATE msec.
   }  
   else if(iCount<NUM_TIMES+WAIT_TIME)
   {
      iCount++;
      timerVert=setTimeout("VertEffect()",iVERT_RATE);//Waiting to scroll back up
   }
   /*else if( iCount<= 2*NUM_TIMES+WAIT_TIME)
   {
      var iNewTop=(2*NUM_TIMES+WAIT_TIME-iCount)*Y_INCREMENT;
      EffectLyr.top =iVERT_POSy+iNewTop-VERT_IMAGE_HEIGHT;      
      
      clipLayer(EffectLyr,0,VERT_IMAGE_HEIGHT-iNewTop,1000,VERT_IMAGE_HEIGHT);
      iCount++;
      
      timerVert=setTimeout("VertEffect()",iVERT_RATE);//clip region advances each  iVERT_RATE msec.      
   }*/
   else
   { 
        //End the vertical sliding.
   	EffectLyr.visibility="hidden";   	
   	clearTimeout(timerVert); 
   	  
   	//Start the horizontal slider.  
   	var imgID=document.images["leavebehind2"];   
        imgID.width=HORIZ_IMAGE_WIDTH;
        imgID.height=HORIZ_IMAGE_HEIGHT;  
        
   	HorizEffectLyr.left =iHORIZ_POSx;  
   	HorizEffectLyr.top =iHORIZ_POSy;    	 
   	HorizEffectLyr.visibility="visible";  
   	timerHoriz=setTimeout("HorizEffect()",iHORIZ_RATE);//clip region advances each 100 msec.
   }   	
}

function HorizEffect()
{ 
   var imgID=document.images["leavebehind2"];   
   imgID.width=HORIZ_IMAGE_WIDTH;
   imgID.height=HORIZ_IMAGE_HEIGHT;
   
   if(iHCount <= NUM_HORIZ_TIMES)
   { 
      HorizEffectLyr.left =iHORIZ_POSx+iHCount*X_INCREMENT; 
      HorizEffectLyr.top =iHORIZ_POSy;   
            
      iHCount++;
      timerHoriz=setTimeout("HorizEffect()",iHORIZ_RATE);//clip region advances each 100 msec.
   }
   else
   { 
      HorizEffectLyr.top =iHORIZ_POSy;  
      clearTimeout(timerHoriz); 
   }   
}


function GetImageX(imgID) 
{
  if (navigator.appName=="Netscape") 
  {
     return eval(imgID).x;
  }
  return GetIEx(imgID);
}

function GetIEx(imgElem) 
{
   var xPos = eval(imgElem).offsetLeft;
   var tempEl = eval(imgElem).offsetParent;
   while (tempEl != null) 
   {
	xPos += tempEl.offsetLeft;
	tempEl = tempEl.offsetParent;
   }
   return xPos;
}


function GetImageY(imgID) 
{
  if (navigator.appName=="Netscape") 
  {
     return eval(imgID).y;
  }
  return GetIEy(imgID);
}

function GetIEy(imgElem) 
{
   var yPos = eval(imgElem).offsetTop;
   var tempEl = eval(imgElem).offsetParent;
   while (tempEl != null) 
   {
	yPos += tempEl.offsetTop;
	tempEl = tempEl.offsetParent;
   }
   return yPos;
}

//Clipping function to implement the opening transition
function clipLayer(layer,cLeft,cTop,cRight,cBottom) 
{
   if(is.ns4) 
   {
   	layer.clip.left =  cLeft;
	layer.clip.top = cTop;
	layer.clip.right = cRight;
	layer.clip.bottom = cBottom;	
   } 
   else 
   {
   
	layer.clip = 'rect(' + cTop + ' ' + cRight + ' ' + cBottom + ' ' + cLeft + ')';
   }
}


-->
