<!-- ----------------------------------------------------------- -->
<!--	Copyright 1999-2001 JilJil Interactive Media			 -->
<!--	This code is protected by applicable international laws. -->
<!--	Unauthorised use is completely prohibited.				 -->
<!-- ----------------------------------------------------------- -->

var browser;
var intTime = 11100;
var j = 0;
var k = j + 1;
var intSlidesArrayLength = 14;
var swPlay = true;
var swPause = false;

var browser=((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4));

if (browser)
{	
// create arrays for slides, messages and transitions

	slides=new Array(15);
	messages = new Array(15);
	transitions = new Array(15);

// set the values for transitions

	transitions[0] = 19;
	transitions[1] = 1;
	transitions[2] = 3;
	transitions[3] = 23;
	transitions[4] = 23;
	transitions[5] = 23;
	transitions[6] = 23;
	transitions[7] = 14;
	transitions[8] = 12;
	transitions[9] = 23;
	transitions[10] = 23;
	transitions[11] = 23;
	transitions[12] = 23;
	transitions[13] = 23; 
	transitions[14] = 12;  

// set the values for mrssages

	messages[0] = "The Wedding of Anoop and Deepthi."
	messages[1] = "Deepthi's house during the night before wedding."
	messages[2] = "Deepthi with one of her best aunties, Guna."
	messages[3] = "A 'mylanchi' work by Aneena, Deepthi's best friend."
	messages[4] = "Deepthi with her mother and Guna aunty."
	messages[5] = "Deepthi's family. Brother Abhi in the middle."
	messages[6] = "Deepthi with Anoop's mother and her sisters."
	messages[7] = "Deepthi is ready for that great moment in life."
	messages[8] = "With lots of thoughts in mind..."
	messages[9] = "Deepthi weds Anoop..A couple made for each other.."
	messages[10] = "Deepthi and Anoop with Anoop's parents."
	messages[11] = "With Deepthi's brother and Guna aunty."
	messages[12] = "With Prasanth, Princy and Shyna, Prasanth's wife."
	messages[13] = "With Anoop's mother's sister Valsala and family."
	messages[14] = "Thank you!"

// initially load first 2 slides to make the transition smooth
    
	slides[j] = new Image();
	slides[j].src = "image" + j + ".jpg";
	slides[j+1] = new Image();
	slides[j+1].src = "image" + j + ".jpg";
}

// function : showMouseOver
// description : Change the color when mouse is over the action boxes

function showMouseOver(intDiv, clrFont, clrBorder)
{
	intDiv.style.borderColor = clrBorder;
	intDiv.style.color = clrFont;
}

// function : showMouseOut
// description : Change the color when mouse is out of the action boxes

function showMouseOut(intDiv, clrFont, clrBorder)
{
    var swOut = true;
    
    // If Playing, don't change color
    
    if ((intDiv.id == 'div3') && swPlay)
    {
        swOut = false;
    }

    // if paused, don't change color
    
    if ((intDiv.id == 'div3') && swPause)
    {
        swOut = false;
    }

    if ((intDiv.id == 'div4') && swPause)
    {
        swOut = false;
    }
    
    // change the color
        
    if (swOut)
    {
    intDiv.style.borderColor = clrBorder;
	intDiv.style.color = clrFont;    
	}
}

// function : showMouseClick
// description : Change the color when mouse is over the action boxes

function showMouseClick(intDiv,clrFont, clrBorder, clrFontFinish, clrBorderFinish)
{
    if (intDiv.id == 'div3') 
    {
        if (!swPlay)
        {
            playSlide(clrFont, clrBorder);
        }
    }        
}

function playSlide(clrFont, clrBorder, clrFontFinish, clrBorderFinish)
{
	if (swPlay)
	{
      	if (j <= intSlidesArrayLength)
    	    {
            init(clrFont,clrBorder);
          }
         else    
      		done(2,clrFontFinish, clrBorderFinish);
	}
	else
	{  
	    swPlay = true;
	    init(clrFont, clrBorder);
	}
	
}

function pauseSlide(clrFont,clrBorder)
{
	if (swPause)
	{
    	div4.style.borderColor = clrBorder;
    	div4.style.color = clrFont;
		swPause = false;
		swPlay = true;
	}
	else
	{
	    swPause = true;
		swPlay = false;
    	div3.style.borderColor = clrBorder;
    	div3.style.color = clrFont;
		done(2,clrFont,clrBorder);
	}
}

function fastForward()
{
	intTime = intTime - 500;
	if (intTime < 500)
	{
		intTime = 500;
	}
}
function init(clrFont, clrBorder) 
{
    div3.style.borderColor = clrBorder;
   	div3.style.color = clrFont;

	i = 2;
	setTimeout("start(" + i + ")", intTime);
	slides[j+1] = new Image();
	k = j + 1;

	if (k <= intSlidesArrayLength)
	{	
		slides[j+1].src = "image" + k + ".jpg";
	}

	k = j + 1;
	if (k <= intSlidesArrayLength)
	{	
		slides[j+1].src = "image" + k + ".jpg";
	}	
		
}

function start(i)
{
	if (swPlay)
	{
	obj = eval("div" + i );
	obj.filters.item(0).Transition = 8
	div1.filters.item(0).Transition = transitions[j]
	obj.filters.item(0).Apply()
	div1.filters.item(0).Apply()
	obj.innerText = messages[j]
	div1.innerHTML = "<IMG SRC='" + slides[j].src + "'>"
	j++
	obj.filters.item(0).Play()
	div1.filters.item(0).Play()
	}
}

function done(i, clrFont, clrBorder)
{
    j=0;
    div3.style.borderColor = clrBorder;
 	div3.style.color = clrFont;
 	swPlay = false;
}

function popup(strURL,strItem)
{
    var blnScrollBar, intHeight
    if (strItem == "invite")
    {
        intHeight = 530;
        blnScrollBar = "No"
    }
    if (strItem == "help")
    {
        intHeight = 530;
        blnScrollBar = "Yes"
    }       
    var newWin = open(strURL,'newwin',"toolbar=no,location=no,directories=no,status=no,scrollbars=" + blnScrollBar + ",resizable=yes,copyhistory=no,width=350,height=" + intHeight + "'");
 //   newWin.moveTo(0,0);
}
