// JavaScript Document

function popWindow() {
    var sURL='';
    var iWidth=600;
    var iHeight=400;
    var iTop=0;
    var iLeft=0;
    var sWinHand="";
    var bCenterWin=false;
    var bAlignSide=false;
    var paramStr="";
    var iIsScroll=0;
    if (arguments[0] == null) {return false;}
    else {sURL = arguments[0];}
    if (arguments[1] != null) {if (arguments[1]>0) iLeft=arguments[1];}
    if (arguments[2] != null) {if (arguments[2]>0) iTop=arguments[2];}
    if (arguments[3] != null) {if (arguments[3]>0) iWidth=arguments[3];}
    if (arguments[4] != null) {if (arguments[4]>0) iHeight=arguments[4];}
    if (arguments[5] != null) {sWinHand=arguments[5];}
    if (arguments[6] != null) {iIsScroll=arguments[6];}
    if (arguments[7] != null) {if (arguments[7]=true) bCenterWin=arguments[7];}
    if (arguments[8] != null) {if (arguments[8]=true) bAlignSide=arguments[8];}
    if(bCenterWin) {
        iTop = (screen.height - iHeight)/2;
        if(iTop<50){iTop=50};
        iLeft = (screen.width - iWidth)/2;
    }
    if (bAlignSide) {
        iTop=(event.clientY)+(iHeight/2)+10;
        iLeft=(event.clientX)+(iWidth/2)+5;
    }
    paramStr='" left='+iLeft+', top='+iTop+', height='+iHeight+', width='+iWidth+', status=no, toolbar=no, scrollbars='+iIsScroll+'"';
    window.open(sURL,sWinHand,paramStr);
}

function jsNewWin(url, winName, w1, h1, scroll) {
	var iScroll=1;
	iScroll=((scroll.toLowerCase()=='no')?0:1);
	popWindow(url, 0, 0, w1, h1, winName, iScroll, true);

}
function jsShaily(){
	jsNewWin('ShailyPage.htm','SP','600','400','yes');
	return false;
}
function jsHou1(){
	jsNewWin('Houdini-pp.htm','h1','700','400','yes');
	return false;
}
function jsHou2(){
	jsNewWin('Houdini-India-pp.htm','h2','800','500','yes');
	return false;
}
function jsHouRole(){
	jsNewWin('RoleofVfx.htm','vfx1','800','500','yes');
	return false;
}
function jsVfxindia(){
	jsNewWin('VfxinIndia.htm','vfx2','700','400','yes');
	return false;
}
function jsVfxFuture(){
	jsNewWin('VfxFuture.htm','vfx3','700','400','yes');
	return false;
}
function jsCDArticle(){
	jsNewWin('CDArticle.htm','cdarticle','800','600','no');
}
function jsCDArticle1(){
	jsNewWin('pages/CDArticle.htm','cdarticle','800','600','no');
}


function jsFilmography(){
	jsNewWin('Filmography.htm','filmo','780','600','yes');
	return false;
}

function jsIdMap(){
	jsNewWin('contact-us/googlemap.html','filmo','900','554','no');
}

function jsBasic(){
	jsNewWin('C-basic.htm','basic','750','512','no');	
}
function jsAdvance(){
	jsNewWin('C-Advance.htm','advance','750','512','no');	
}
function jsPDGAD(){
	jsNewWin('C-PDGAD.htm','pdgad','750','512','no');	
}
function jsPDCD(){
	jsNewWin('C-PDCD.htm','pdcd','750','512','no');	
}
function jsPDVE(){
	jsNewWin('C-PDVE.htm','pdve','750','512','no');	
}
function jsPDMod(){
	jsNewWin('C-PDModel.htm','pdmod','750','512','yes');	
}
function jsPDShade(){
	jsNewWin('C-PDShade.htm','pdshade','750','512','no');	
}
function jsPDTexture(){
	jsNewWin('C-PDTexture.htm','pdTexture','750','512','no');	
}
function jsArchWalk(){
	jsNewWin('C-ArchWalk.htm','archwalk','750','512','no');	
}
function jsMA1(){jsNewWin('pages/MA-AnimStory.htm','story1','800','600','no');}
function jsMA2(){jsNewWin('pages/MA-Needof.htm','story2','800','600','no');}
function jsMA3(){jsNewWin('pages/MA-WhatIs.htm','story3','800','600','no');}
function jsMA4(){jsNewWin('pages/MA-AnimationandGaming.htm','story4','800','600','no');}

function jsMA11(){jsNewWin('MA-AnimStory.htm','story1','800','600','no');}
function jsMA22(){jsNewWin('MA-Needof.htm','story2','800','600','no');}
function jsMA33(){jsNewWin('MA-WhatIs.htm','story3','800','600','no');}
function jsMA44(){jsNewWin('MA-AnimationandGaming.htm','story4','800','600','no');}


function jsMA11(){
	jsNewWin('MA-AnimStory.htm','story1','800','600','no');	
}
function jsMA22(){
	jsNewWin('MA-Needof.htm','story2','800','600','no');	
}
function jsMA33(){
	jsNewWin('MA-WhatIs.htm','story3','800','600','no');	
}

// Char Anim Functions 

function jsca1(){
	jsNewWin('ca1.htm','ca1','543','395','no');
}
function jsca2(){
	jsNewWin('ca2.htm','ca2','355','270','no');
}
function jsca3(){
	jsNewWin('ca3.htm','ca3','580','430','no');
}
function jsca4(){
	jsNewWin('ca4.htm','ca4','480','292','no');
}
function jsca5(){
	jsNewWin('ca5.htm','ca5','355','270','no');
}
function jsca6(){
	jsNewWin('ca6.htm','ca6','355','270','no');
}




var SlideShowSpeed = 5000;
var CrossFadeDuration = 30;
var Picture = new Array(); 
var Caption = new Array(); 
Picture[1]  = 'images/ThemeImage1.jpg';
Picture[2]  = 'images/ThemeImage2.jpg';
Picture[3]  = 'images/ThemeImage3.jpg';
Picture[4]  = 'images/ThemeImage4.jpg';
Picture[5]  = 'images/ThemeImage5.jpg';

Caption[1]  = ".";
Caption[2]  = ".";
Caption[3]  = ".";
Caption[4]  = ".";
Caption[5]  = ".";

var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;
var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
	preLoad[iss] = new Image();
	preLoad[iss].src = Picture[iss];
}
function runSlideShow(){
if (document.all){
	document.images.PictureBox.style.filter="blendTrans(duration=2)";
	document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
	document.images.PictureBox.filters.blendTrans.Apply();
	}
	document.images.PictureBox.src = preLoad[jss].src;
		if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
		if (document.all) document.images.PictureBox.filters.blendTrans.Play();
		jss = jss + 1;
		if (jss > (pss)) jss=1;
	tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
function jsBack(){
	history.go(-1);
}
// Rollimage
var swapimg = new Array(10)
var rollimg = new Array(10)
var count=0;
var flag=true;
for (j = 0; j < 3; j++)
	{
		swapimg[j] = new Image();
		rollimg[j] = new Image();
	}
swapimg[0].src = "images/newsevents/home/chintu.jpg";
swapimg[1].src = "images/newsevents/home/jithin1.jpg";
swapimg[2].src = "images/newsevents/home/jithin2.jpg";




rollimg[0].src = "images/newsevents/home/chintu.jpg";
rollimg[1].src = "images/newsevents/home/jithin1.jpg";
rollimg[2].src = "images/newsevents/home/jithin2.jpg";



function reset1(){
	flag = false;
}
function rollimage(){
	if(flag){
	document.mypix.src = rollimg[count].src;
	count++;
		if(count>=22){count=0;}
	setTimeout('rollimage()', 5000);
	}
}

function myswap(num)
{document.mypix.src = swapimg[num].src;}

function p11(){
if(document.getElementById('p11').style.display =='none')
	{
		document.getElementById('p11').style.display='block';
		document.getElementById('p1').src='../images/ico-mnus.gif';
		document.getElementById('p1').title='Collapse';
		
	}else{
		document.getElementById('p11').style.display='none';
		document.getElementById('p1').src='../images/ico-plus.gif';
		document.getElementById('p1').title='Expand';
	} 
}

function p22(){
if(document.getElementById('p22').style.display =='none')
	{
		document.getElementById('p22').style.display='block';
		document.getElementById('p2').src='../images/ico-mnus.gif';
		document.getElementById('p2').title='Collapse';
		
	}else{
		document.getElementById('p22').style.display='none';
		document.getElementById('p2').src='../images/ico-plus.gif';
		document.getElementById('p2').title='Expand';
	} 
}
// For first tab
function vd1(){jsNewWin('vdo1.htm','vd1','414','354','no');}
function vd2(){jsNewWin('vdo2.htm','vd2','414','354','no');}
function vd3(){jsNewWin('vdo3.htm','vd3','414','354','no');}

// For Second tab
function vd4(){jsNewWin('vdo4.htm','vd4','414','354','no');}
function vd5(){jsNewWin('vdo5.htm','vd5','414','354','no');}

// for Third Tab
function vd6(){jsNewWin('vdo6.htm','vd6','414','354','no');}
function vd7(){jsNewWin('vdo7.htm','vd7','414','354','no');}

// for forth Tab
function vd8(){jsNewWin('vdo8.htm','vd8','414','354','no');}
