// JavaScript Document

var wb=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
wb[0]=["/images/WB/_DSC0091.jpg", "", ""] //plain image syntax
wb[1]=["/images/WB/_DSC0430.jpg", "", ""] //image with link syntax
wb[2]=["/images/WB/DSC04475.jpg", "", ""] //image with link and target syntax
wb[3]=["/images/WB/Img001.jpg", "", ""] //plain image syntax
wb[4]=["/images/WB/pic20.jpg", "", ""] //image with link syntax


var skim=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
skim[0]=["/images/sikkim/_DME0023.jpg", "", ""] //plain image syntax
skim[1]=["/images/sikkim/_DME0045.jpg", "", ""] //image with link syntax
skim[2]=["/images/sikkim/_DME0066.jpg", "", ""] //image with link and target syntax
skim[3]=["/images/sikkim/_DME0105.jpg", "", ""] //plain image syntax
skim[4]=["/images/sikkim/red-panda-3.jpg", "", ""] //image with link syntax


var orrisa=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
orrisa[0]=["/images/orissa/_DME0023-2.jpg", "", ""] //plain image syntax
orrisa[1]=["/images/orissa/_DME0025.jpg", "", ""] //image with link syntax
orrisa[2]=["/images/orissa/_DME0054.jpg", "", ""] //image with link and target syntax
orrisa[3]=["/images/orissa/_DSC0015.jpg", "", ""] //plain image syntax
orrisa[4]=["/images/orissa/_DSC0042.jpg", "", ""] //image with link syntax
orrisa[5]=["/images/orissa/_DSC0104.jpg", "", ""] //image with link and target syntax
orrisa[6]=["/images/orissa/InthecreeksofBhitarkanika.jpg", "", ""] //image with link and target syntax

var megha=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
megha[0]=["/images/meghalaya/_DME0005.jpg", "", ""] //plain image syntax
megha[1]=["/images/meghalaya/_DME0016.jpg", "", ""] //image with link syntax
megha[2]=["/images/meghalaya/_DSC0068.jpg", "", ""] //image with link and target syntax

var assam=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
assam[0]=["/images/assam/Bihu-the-dance-of-Assam2.jpg", "", ""] //plain image syntax
assam[1]=["/images/assam/Bihu-the-dance-of-Assam1.jpg", "", ""] //image with link syntax
assam[2]=["/images/assam/_DME0017.jpg", "", ""] //image with link and target syntax
assam[3]=["/images/assam/_D0007.jpg", "", ""] //image with link and target syntax
 
 
var kanha=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
kanha[0]=["/images/kanha1.jpg", "", ""] //plain image syntax
kanha[1]=["/images/kanha2.jpg", "", ""] //image with link syntax
kanha[2]=["/images/kanha3.jpg", "", ""] //image with link and target syntax
 
var manas=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
manas[0]=["/images/manas1.jpg", "", ""] //plain image syntax
manas[1]=["/images/manas2.jpg", "", ""] //image with link syntax
manas[2]=["/images/manas3.jpg", "", ""] //image with link and target syntax
manas[3]=["/images/manas4.jpg", "", ""] //image with link and target syntax
manas[4]=["/images/manas5.jpg", "", ""] //image with link and target syntax
manas[5]=["/images/manas6.jpg", "", ""] //image with link and target syntax

var corbett=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
corbett[0]=["/images/corbett2.jpg", "", ""] //plain image syntax
corbett[1]=["/images/corbett3.jpg", "", ""] //image with link syntax  

var bhitar=new Array()
bhitar[0]=["/images/bithar1.jpg", "", ""] 
bhitar[1]=["/images/bithar2.jpg", "", ""] 
bhitar[2]=["/images/bithar3.jpg", "", ""] 
bhitar[3]=["/images/bithar4.jpg", "", ""]

var sundar=new Array()
sundar[0]=["/images/sundar1.jpg", "", ""] 
sundar[1]=["/images/sundar2.jpg", "", ""] 
sundar[2]=["/images/sundar3.jpg", "", ""] 
sundar[3]=["/images/sundar4.jpg", "", ""]
sundar[4]=["/images/sundar5.jpg", "", ""] 
sundar[5]=["/images/sundar6.jpg", "", ""] 

var arunachal=new Array()
arunachal[0]=["/images/arunachal1.jpg", "", ""] 
arunachal[1]=["/images/arunachal2.jpg", "", ""] 
arunachal[2]=["/images/arunachal3.jpg", "", ""] 
arunachal[3]=["/images/arunachal4.jpg", "", ""]
arunachal[4]=["/images/arunachal5.jpg", "", ""] 



var bandhav=new Array()
bandhav[0]=["/images/bandhavgr1.jpg", "", ""] 
bandhav[1]=["/images/bandhavgr2.jpg", "", ""] 
bandhav[2]=["/images/bandhavgr3.jpg", "", ""] 
bandhav[3]=["/images/bandhavgr4.jpg", "", ""]


var himachal=new Array()
himachal[0]=["/images/himachal1.jpg", "", ""] 
himachal[1]=["/images/himachal2.jpg", "", ""] 
himachal[2]=["/images/himachal3.jpg", "", ""] 
himachal[3]=["/images/himachal4.jpg", "", ""]
himachal[4]=["/images/himachal5.jpg", "", ""]
himachal[5]=["/images/himachal6.jpg", "", ""]
himachal[6]=["/images/himachal7.jpg", "", ""]
himachal[7]=["/images/himachal8.jpg", "", ""]

var ladakh=new Array()
ladakh[0]=["/images/ladakh1.jpg", "", ""] 
ladakh[1]=["/images/ladakh2.jpg", "", ""] 
ladakh[2]=["/images/ladakh3.jpg", "", ""] 
ladakh[3]=["/images/ladakh4.jpg", "", ""]
ladakh[4]=["/images/ladakh5.jpg", "", ""]
ladakh[5]=["/images/ladakh6.jpg", "", ""]
ladakh[6]=["/images/ladakh9.jpg", "", ""]
ladakh[7]=["/images/ladakh10.jpg", "", ""]
ladakh[8]=["/images/ladakh11.jpg", "", ""]
ladakh[9]=["/images/ladakh12.jpg", "", ""]
ladakh[10]=["/images/ladakh13.jpg", "", ""]
ladakh[11]=["/images/ladakh14.jpg", "", ""]
ladakh[12]=["/images/ladakh15.jpg", "", ""]
ladakh[13]=["/images/ladakh16.jpg", "", ""]


var ghnp=new Array()
ghnp[0]=["/images/ghnp1.jpg", "", ""] 
ghnp[1]=["/images/ghnp2.jpg", "", ""] 
ghnp[2]=["/images/ghnp3.jpg", "", ""] 
ghnp[3]=["/images/ghnp4.jpg", "", ""]
ghnp[4]=["/images/ghnp5.jpg", "", ""]

var chambal=new Array()
chambal[0]=["/images/chambal1.jpg", "", ""] 
chambal[1]=["/images/chambal2.jpg", "", ""] 
chambal[2]=["/images/chambal3.jpg", "", ""] 
chambal[3]=["/images/chambal4.jpg", "", ""]
chambal[4]=["/images/chambal5.jpg", "", ""]
chambal[5]=["/images/chambal6.jpg", "", ""]

var Singalila=new Array()
Singalila[0]=["/pictures/Singalila/150214829_std.jpg", "", ""] 
Singalila[1]=["/pictures/Singalila/150215343_std.jpg", "", ""] 
Singalila[2]=["/pictures/Singalila/150215905_std.jpg", "", ""] 
Singalila[3]=["/pictures/Singalila/162183558_std.jpg", "", ""]


var fadebgcolor="white"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
 
