var aa,flag1=0,flag=0

var id,bb;
function expand(id)
{
		id=id
			if(id>3){
			document.getElementById('rolltxt').innerHTML='<img src=IMAGES/'+id+'.jpg>'
		}

	clearTimeout(aa);
		if(id==0)
		{
		message12='<table width="590" align="left" border="0"  height="66" cellspacing="0" cellpadding="2" > <tr align="right" valign="top">   <td width="100" align="right"    valign="middle">&nbsp;<image src=images/northeast.gif ></td>   <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>The North East Portal is a comprehensive electronic database that compiles, stores and analyses information and data on crucial issues relating to conflict, resolution and development in India’s Northeast.</i></font></td></tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12
		}
		if(id==1)
		{
message12='<table width="590" align="left" border="0"  height="66" cellspacing="0" cellpadding="2" > <tr align="right" valign="top">   <td width="100" align="right"    valign="middle">&nbsp;<image src=images/icm_logo.gif ></td> <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>The  Institute of Conflict  Management’s Database and Documentation Centre on Conflict & Development in India’s Northeast seeks to establish a comprehensive source of data, information and analysis on critical issues relating to this region.</i></font></td></tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12
		}
		if(id==2)
		{
message12='<table width="590" align="left" border="0"  height="66" cellspacing="0" cellpadding="2" > <tr align="right" valign="top">   <td width="100" align="right"    valign="middle">&nbsp;<image src=images/satp_logo.gif ></td><td width=80% align="left" valign="middle"><font color="#1E6704" size=2><i>SATP is the world largest electronic platform for the projection of data, research and opinion on terrorism in South Asia. The Website provides critical new inputs and daily updates to support  global counter-terrorism research and policy.</i></font></td></tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12
		}
		if(id==4)
		{
		message12='<table width="590" align="left" border="0"  height="66" cellspacing="0" cellpadding="5"> <tr align="right" valign="top">    <td width="80"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=images/assam.gif ></td><td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>Known as Kamrup in earlier times, Assam gets its name from the Ahoms, the largest ethnic group in the State. It is the most prominent of all the northeastern states.</i></font></td>    </tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12
		}
			if(id==5)
		{
		message12='<table width="590" border="0" align="left" height="66" cellpadding="5" cellspacing="0"  > <tr align="right" valign="top"> <td width="80"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=images/arunachal.gif ></td>   <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>Earlier known as the North East Frontier Agency (NEFA), Arunachal Pradesh was granted Statehood on February 20, 1987. The largely Buddhist State that borders Tibet does not have any history of insurgency, an unusual feature in the Northeast.</i></font></td>    </tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12

		}
		if(id==6)
		{
		message12='<table width="590" border="0" align="left" height="66" cellpadding="5" cellspacing="0"  > <tr align="right" valign="top"> <td width="80"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=images/manipur.gif ></td>   <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>The erstwhile princely State merged with the Indian Union on January 21, 1972. With the largest Vaishnavite (a Hindu denomination) presence in the Northeast, Manipur has a dance form of its own, Manipuri.</i></font></td>    </tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12

		}
		if(id==7)
		{
		message12='<table width="590" border="0" align="left" height="66" cellpadding="5" cellspacing="0"  > <tr align="right" valign="top"> <td width="80"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=images/meghalaya.gif ></td>   <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>Carved out of Assam as a separate State on January 21, 1972, Meghalaya is situated between lower Assam and Bangladesh. With its capital in Shillong, Meghalaya is home to the Garo, Khasi, and Jaintia tribes.</i></font></td>    </tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12

		}
		if(id==8)
		{
		message12='<table width="590" border="0" align="left" height="66" cellpadding="5" cellspacing="0"  > <tr align="right" valign="top"> <td width="80"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=images/mizoram.gif ></td>   <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>Predominantly Christian, Mizoram achieved Statehood on February 20, 1987. Once the site of a violent insurgency, Mizoram is regarded as a successful case of peaceful conflict resolution.</i></font></td>    </tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12

		}
		if(id==9)
		{
		message12='<table width="590" border="0" align="left" height="66" cellpadding="5" cellspacing="0"  > <tr align="right" valign="top"> <td width="80"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=images/nagaland.gif ></td>   <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>It was founded as the 16th State of the Indian Union on December 1, 1963 and shares its border with Arunachal Pradesh, Assam, Manipur, and Myanmar. Inhabited by 16 Indo-Mongoloid tribes, the State has an overwhelmingly Christian population.</i></font></td>    </tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12

		}
		if(id==10)
		{
		message12='<table width="590" border="0" align="left" height="66" cellpadding="5" cellspacing="0"  > <tr align="right" valign="top"> <td width="80"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=images/sikkim.gif ></td>   <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>Incorporated into the Indian Union after the fall of the Chogyal dynasty in 1975, two-thirds of its population is Nepalese. But there are also indigenous tribes like the Bhutias and Lepchas.</i></font></td>    </tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12

		}
		if(id==11)
		{
		message12='<table width="590" border="0" align="left" height="66" cellpadding="5" cellspacing="0"  > <tr align="right" valign="top"> <td width="80"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<image src=images/tripura.gif ></td>   <td width=80% align="left" valign="middle"><font color=1E6704 size=2><i>A former princely State ruled by the Manikyas, Tripura attained statehood on 21st January 1972. Comprising the largest Bengali Hindu population after West Bengal, it shares its border with Bangladesh. </i></font></td>    </tr>  </table>'
		document.getElementById("divExCont").innerHTML = message12

		}
	
	if(flag)
	{}
	else
	{
		
		showCont()
	}
}
//Animate function1

var xx
var mY = 10
var mEnd = 163
var intervalID
var intervalID01
var direction = "down"
function animate()
	{
	target = (direction == "down") ? mEnd : mY;
	diff=(direction == "down")? 12 : -12;
	diff1=(direction == "down")? 6 : -6;
	diffY= target - xx
	endS=Math.abs(diffY)
	check=(direction == "down") ? xx > target : xx < target;
	if(endS==0 || check){
		xx = target
		clearInterval(intervalID);
		clearInterval(intervalID01);
		}else{
			xx += diff 
			yy=parseInt(document.getElementById('u1').style.left)
			yy -=diff1
			document.getElementById('u1').style.top= xx + "px";
			document.getElementById('u1').style.left =yy + "px";
				
			}
		}

function startanimate(){
	//alert(document.getElementById('u1').style.left)
	xx=parseInt(document.getElementById('u1').style.top)
	clearInterval(intervalID);
	clearInterval(intervalID01);
intervalID = setInterval("animate()", 25)
}
//Animate function2

var xx3
var mY3 = 10
var mEnd3 = 163
var intervalID3
var intervalID03
var direction3 = "down"
function animate3()
	{
	target3 = (direction3 == "down") ? mEnd3 : mY3;
	diff3=(direction3 == "down")? 12 : -12;
	diff31=(direction3 == "down")? 6 : -6;
	diffY3= target3 - xx3
	endS3=Math.abs(diffY3)
	check3=(direction3 == "down") ? xx3 > target3 : xx3 < target3;
	if(endS3==0 || check3){
		xx3 = target3
		clearInterval(intervalID3);
		clearInterval(intervalID03);
		}else{
			xx3 += diff3 
			yy3=parseInt(document.getElementById('u2').style.left)
			yy3 -=diff31
			document.getElementById('u2').style.top= xx3 + "px";
			document.getElementById('u2').style.left =yy3 + "px";
				
			}
		}

function startanimate3(){
	xx3=parseInt(document.getElementById('u2').style.top)
	clearInterval(intervalID3);
	clearInterval(intervalID03);
intervalID3 = setInterval("animate3()", 25)
}
//Lower Meny bar
var xx1
var mY1 = 246
var mEnd1 = 308
var intervalID1
var intervalID11
var direction1 = "down"
function animate1(){
	target = (direction1 == "down") ? mEnd1 : mY1;
	diff=(direction1 == "down")? 2 : -2;
	diff1=(direction1 == "down")? 1 : -1;
	diffY= target - xx1
	endS=Math.abs(diffY)
	check=(direction1 == "down") ? xx1 > target : xx1 < target;
	if(endS==0 || check){
	xx1 = target
	clearInterval(intervalID1);
	clearInterval(intervalID11);
	}else{
			xx1 += diff 
			yy=parseInt(document.getElementById('l1').style.left)
			yy -=diff1
			document.getElementById('l1').style.top= xx1 + "px";
			document.getElementById('l1').style.left =yy + "px";
		}
	}
function startanimate1()
{
clearInterval(intervalID1);
clearInterval(intervalID11);
xx1=parseInt(document.getElementById('l1').style.top)
intervalID1 = setInterval("animate1()", 25)
}
function sover()
{
	clearTimeout(aa);
	clearInterval(intervalID);
	clearInterval(intervalID01);
	
}
function sout()
{
	aa=setTimeout('showCont1()',1000);
	direction='down';
	clearInterval(intervalID);
	clearInterval(intervalID01); 
	intervalID01=setInterval('startanimate()', 1000);
	
}

function soverm()
{
	clearTimeout(aa)
	clearInterval(intervalID3);
	clearInterval(intervalID03);
	
}
function soutm()
{
	aa=setTimeout('showCont1()',1000);
	direction3='down';
	clearInterval(intervalID3);
	clearInterval(intervalID03); 
	intervalID03=setInterval('startanimate3()', 1000);
}
function aover()
{
	clearTimeout(aa);
	clearInterval(intervalID1);
	clearInterval(intervalID11);
	
}
function aout()
{
	aa=setTimeout('showCont1()',1000);
	direction1='up'; 
	clearInterval(intervalID1);
	clearInterval(intervalID11);
	intervalID11=setInterval('startanimate1()', 1000);
}

/**********************************************************************************   
WindowScript 
*   Copyright (C) 2001 Thomas Brattli
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by Thomas Brattli
*
*   Script date: 07/03/2001 (keep this date to check versions) 
*********************************************************************************/
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()



/*** Variables to set ***/
var  message12=""
sCircleWidth = 0	//The width the script will clip to
sCircleHeight = 0	//The height the script will clip to
sStarty = 50		//Where do you want it to initially start
sStartx = 350		//Where do you want it to initially start
clipSpeed = 20		//Number of pixels for each step in the animation.

/******************************************************************************
Making the clipobject part
******************************************************************************/	
function makeObj(obj, nest, x, y){
	nest = (!nest) ? "":'document.'+nest+'.';										
   	this.css = bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;		
	this.evnt = bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;													
	this.clip = b_clip;
	this.clipIt = b_clipIt;
	this.clipTo = b_clipTo;
	this.obj = obj + "Object";
	eval(this.obj + "=this");
	return this;
}

// A unit of measure that will be added when setting the position or size of a layer.
var px = bw.ns4||window.opera?"":"px";

//clip part
function b_clipTo(t,r,b,l){
	if (bw.ns4){
		this.css.clip.top=t;this.css.clip.right=r;this.css.clip.bottom=b;this.css.clip.left=l;
	}
	else {
		this.css.clip="rect("+t+"px "+r+"px "+b+"px "+l+"px)";
	}
}
function b_clipIt(tstop,rstop,bstop,lstop,step,fn){
	if (!fn) fn = null
	var clipval = new Array()
	if (bw.dom || bw.ie4) {
		clipval = this.css.clip
		clipval = clipval.slice(5,clipval.length-1);
		clipval = clipval.split(' ')
		for (var i=0; i<4; i++) clipval[i] = parseInt(clipval[i])
	}
	else {
		clipval[0] = this.css.clip.top
	    clipval[1] = this.css.clip.right
	    clipval[2] = this.css.clip.bottom
	    clipval[3] = this.css.clip.left
	}
	totantstep = Math.max(Math.max(Math.abs((tstop-clipval[0])/step),Math.abs((rstop-clipval[1])/step)),
		Math.max(Math.abs((bstop-clipval[2])/step),Math.abs((lstop-clipval[3])/step)))
	if (!this.clipactive)
		this.clip(clipval[0],clipval[1],clipval[2],clipval[3],(tstop-clipval[0])/totantstep,
			(rstop-clipval[1])/totantstep,(bstop-clipval[2])/totantstep,
				(lstop-clipval[3])/totantstep,totantstep,0, fn)
}
function b_clip(tcurr,rcurr,bcurr,lcurr,tperstep,rperstep,bperstep,lperstep,totantstep,antstep, fn){
	tcurr=tcurr+tperstep; rcurr=rcurr+rperstep
	bcurr=bcurr+bperstep; lcurr=lcurr+lperstep
	this.clipTo(tcurr,rcurr,bcurr,lcurr)
if(flag=="0"&&bw.ns6){	
		if(antstep<3){
		//alert(totantstep)
		this.clipactive=true
		antstep++
		setTimeout(this.obj+".clip("+tcurr+","+rcurr+","+bcurr+","+lcurr+","+tperstep+","
			+rperstep+","+bperstep+","+lperstep+","+totantstep+","+antstep+",'"+fn+"')", 40)	
	//alert(antstep)
		//oExCont.css.visibility = "hidden";
			}else{
				oExCont.css.visibility = "hidden";
				this.clipactive = false
				eval(fn)
		}
	}
	else{
		oExCont.css.visibility = "visible";
		if(antstep<totantstep){
//alert(totantstep)
		this.clipactive=true
		antstep++
		setTimeout(this.obj+".clip("+tcurr+","+rcurr+","+bcurr+","+lcurr+","+tperstep+","
			+rperstep+","+bperstep+","+lperstep+","+totantstep+","+antstep+",'"+fn+"')", 40)	
	
			}else{
				this.clipactive = false
		eval(fn)
	}}
}
/******************************************************************************
Initiating the page and the clip objects.
******************************************************************************/	
function spotInit(){
	pageWidth = (bw.ns4 || bw.ns6)?innerWidth:document.body.clientWidth;
	pageHeight = (bw.ns4 || bw.ns6)?innerHeight:document.body.clientHeight;
	oExCont = new makeObj('divExCont');
	if (bw.dom || bw.ie4){
		oExCont.css.width = "620px";
		oExCont.css.height = "70px";
	}
	oCircle = new makeObj('divCircle','divExCont');
	oExCont.clipTo(sStarty,sStartx+sCircleWidth,sStarty+sCircleHeight,sStartx);
	oCircle.css.left = sStartx+px;
	oCircle.css.top = sStarty+px;
	oCircle.css.visibility = "visible";
	//win_init()
	setTimeout("expand('0')",1000);
	
	xx=document.images.length;
xx=xx-1;
//alert(document.images[42].complete)
if(document.images[42].complete)
{
	if(document.all){
	mid.style.visibility = "visible"
	map.style.visibility="visible"
	logo.style.visibility = "visible"
	u1.style.visibility = "visible"
	u2.style.visibility = "visible"
	l1.style.visibility = "visible"
	}
	else
	{
document.getElementById('mid').style.visibility = "visible";
document.getElementById('map').style.visibility = "visible";
document.getElementById('logo').style.visibility = "visible";
document.getElementById('u1').style.visibility = "visible";
document.getElementById('u2').style.visibility = "visible";
document.getElementById('l1').style.visibility = "visible";
	}
}
	/*if (bw.ns4)document.captureEvents(Event.MOUSEMOVE)
	document.onmousemove = moveCircle;*/
}

//This is being called when someone clicks the circle.
function showCont(){
clipSpeed = 50;
	clearTimeout(aa);
	flag=1;
	document.onmousemove = null;
	oCircle.css.visibility = "hidden";
	oCircle.css.left = 0+px;
	oCircle.css.top = 0+px;
	oExCont.clipIt(7, 615, 87, 20, clipSpeed, 'oExCont.css.overflow="auto"');
	//oExCont.clipIt(-clipSpeed, pageWidth+clipSpeed, pageHeight+clipSpeed, -clipSpeed, clipSpeed, 'oExCont.css.overflow="auto"')
}

if (bw.bw) onload = spotInit
function showCont1(){
	clipSpeed = 100;
	flag=0;
	document.onmousemove = null
	oCircle.css.visibility = "hidden";
	oCircle.css.left = 0+px;
	oCircle.css.top = 0+px;
	document.getElementById('rolltxt').innerHTML='';	
	oExCont.clipIt(87, 20, 7, 615, clipSpeed, 'oExCont.css.overflow="auto"');
	//win_init()
	
}

