// JavaScript Document

var fadeimages4=new Array()
var delaytime_array4=new Array()
var maxorder4=0;
// Add By Abhishek Mittal
for(j4=0;j4<total_banner4;j4++)
		  {
			fadeimages4[j4]=["photos/banners/"+banner4[j4][0]+"", siteurl4[j4][0], "_blank"]
		  }
for(j4=0;j4<total_banner4;j4++)
		  {
			delaytime_array4[j4]=[delaytime4[j4][0]]
		  }		  
// End Added by Abhishek Mittal		  
var fadebgcolor4="white"
////NO need to edit beyond here/////////////
var indexstate4=0; 
var indexflag4=0;
var fadearray4=new Array() //array to cache fadeshow instances
var fadeclear4=new Array() //array to cache corresponding clearinterval pointers
var dom4=(document.getElementById) //modern dom browsers
var iebrowser4=document.all
function fadeshow4(theimages4, fadewidth4, fadeheight4, borderwidth4, delay4, pause4, img4, displayorder4){
//alert(fadeshow4);
fadeshow4.pausecheck4=pause4
fadeshow4.mouseovercheck4=0
fadeshow4.delay4=delay4
fadeshow4.degree4=100 //initial opacity degree (10%)
fadeshow4.curimageindex4=img4
fadeshow4.nextimageindex4=img4+1
fadearray4[fadearray4.length]=fadeshow4
fadeshow4.slideshowid4=fadearray4.length-1
fadeshow4.canvasbase4="canvas"+fadeshow4.slideshowid4

fadeshow4.curcanvas4="submaster4_0"
fadeshow4.theimages4=theimages4
fadeshow4.imageborder4=parseInt(borderwidth4)
fadeshow4.postimages4=new Array() //preload images

for (p=0;p<theimages4.length;p++){
fadeshow4.postimages4[p]=new Image()
fadeshow4.postimages4[p].src=theimages4[p][0]
}

/*var fadewidth4=728
var fadeheight4=79*/
if (iebrowser4&&dom4||dom4)
{//if IE5+ or modern browsers (ie: Firefox)
//alert("One");

document.write('<div  id="master4" style="position:relative;width:'+fadewidth4+'px;height:'+fadeheight4+'px;overflow:hidden;display:none;"><div id="submaster4_0" style="position:absolute;width:'+fadewidth4+'px;height:'+fadeheight4+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor4+'"></div><div id="submaster4_1" style="position:absolute;width:'+fadewidth4+'px;height:'+fadeheight4+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor4+'"></div></div>')
}
else
{
document.write('<div style="display:none;"><img name="defaultslide'+fadeshow4.slideshowid4+'" src="'+fadeshow4.postimages4[0].src+'"></div>')
}

if (iebrowser4&&dom4||dom4) //if IE5+ or modern browsers such as Firefox
fadeshow4.startit4()

else{
fadeshow4.curimageindex4++

setInterval("fadearray4["+fadeshow4.slideshowid4+"].rotateimage4()", fadeshow4.delay4)

}
}
function fadepic4(obj4){
if (obj4.degree4<100){
obj4.degree4+=100
if (obj4.tempobj4.filters&&obj4.tempobj4.filters[0]){
if (typeof obj4.tempobj4.filters[0].opacity=="number") //if IE6+
obj4.tempobj4.filters[0].opacity=obj4.degree4
else //else if IE5.5-
obj4.tempobj4.style.filter="alpha(opacity="+obj4.degree4+")"
}
else if (obj4.tempobj4.style.MozOpacity)
obj4.tempobj4.style.MozOpacity=obj4.degree4/101
else if (obj4.tempobj4.style.KhtmlOpacity)
obj4.tempobj4.style.KhtmlOpacity=obj4.degree4/100
else if (obj4.tempobj4.style.opacity&&!obj4.tempobj4.filters)
obj4.tempobj4.style.opacity=obj4.degree4/101
}
else{
clearInterval(fadeclear4[obj4.slideshowid4])
//alert(obj4.canvasbase4+"_1");
obj4.nextcanvas4=(obj4.curcanvas4=="submaster4_0")? "submaster4_0" : "submaster4_1"
obj4.tempobj4=iebrowser4? iebrowser4[obj4.nextcanvas4] : document.getElementById(obj4.nextcanvas4)
if(indexflag4==1){
	clearInterval(fadeclear4[obj4.slideshowid4])
	 obj4.nextimageindex4=indexstate4
	 indexflag4=0
}
obj4.populateslide4(obj4.tempobj4, obj4.nextimageindex4)
obj4.nextimageindex4=(obj4.nextimageindex4<obj4.postimages4.length-1)? obj4.nextimageindex4+1 : 0
if(maxorder4==total_banner4)
	maxorder4=0;
setTimeout("fadearray4["+obj4.slideshowid4+"].rotateimage4()", delaytime_array4[maxorder4])
maxorder4++;
}
}
fadeshow4.populateslide4=function(picobj4, picindex4){
var slideHTML4=""
if (fadeshow4.theimages4[picindex4][1]!="") //if associated link exists for image
slideHTML4='<a href="http://'+fadeshow4.theimages4[picindex4][1]+'" target="'+fadeshow4.theimages4[picindex4][2]+'">'

split_path_ext4=fadeshow4.postimages4[picindex4].src.split(".");
if(split_path_ext4[split_path_ext4.length-1]=='swf')
	slideHTML4+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="300" height="225"  style="z-index:0;"><param name="movie" value="'+fadeshow4.postimages4[picindex4].src+'" /><param name="quality" value="high" /> <param name="wmode" value="transparent" /><embed src="'+fadeshow4.postimages4[picindex4].src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="300" height="225"  WMODE="transparent"></embed></object>'
else
	slideHTML4+='<img src="'+fadeshow4.postimages4[picindex4].src+'" border="'+fadeshow4.imageborder4+'px" width="300" height="225">'
if (fadeshow4.theimages4[picindex4][1]!="") //if associated link exists for image
slideHTML4+='</a>'



document.getElementById('banner_inner_left_div').innerHTML=slideHTML4;
//picobj4.innerHTML=slideHTML4
}
fadeshow4.rotateimage4=function(){
if (fadeshow4.pausecheck4==1) //if pause onMouseover enabled, cache object
var cacheobj4=fadeshow4
if (fadeshow4.mouseovercheck4==1)
setTimeout(function(){cacheobj4.rotateimage4()}, 100)
else if (iebrowser4&&dom4||dom4){
fadeshow4.resetit4()
var crossobj4=fadeshow4.tempobj4=iebrowser4? iebrowser4[fadeshow4.curcanvas4] : document.getElementById(fadeshow4.curcanvas4)
crossobj4.style.zIndex++
fadeclear4[fadeshow4.slideshowid4]=setInterval("fadepic4(fadearray4["+fadeshow4.slideshowid4+"])",50)
fadeshow4.curcanvas4=(fadeshow4.curcanvas4=="submaster4_0")? "submaster4_1" : "submaster4_0"
}
else{
var ns4imgobj4=document.images['defaultslide'+fadeshow4.slideshowid4]
ns4imgobj4.src=fadeshow4.postimages4[fadeshow4.curimageindex4].src
}
fadeshow4.curimageindex4=(fadeshow4.curimageindex4<fadeshow4.postimages4.length-1)? fadeshow4.curimageindex4+1 : 0
}
fadeshow4.resetit4=function(){
fadeshow4.degree4=100
var crossobj4=iebrowser4? iebrowser4[fadeshow4.curcanvas4] : document.getElementById(fadeshow4.curcanvas4)
if (crossobj4.filters&&crossobj4.filters[0]){
if (typeof crossobj4.filters[0].opacity=="number") //if IE6+
crossobj4.filters(0).opacity=fadeshow4.degree4
else //else if IE5.5-
crossobj4.style.filter="alpha(opacity="+fadeshow4.degree4+")"
}
else if (crossobj4.style.MozOpacity)
crossobj4.style.MozOpacity=fadeshow4.degree4/101
else if (crossobj4.style.KhtmlOpacity)
crossobj4.style.KhtmlOpacity=fadeshow4.degree4/100
else if (crossobj4.style.opacity&&!crossobj4.filters)
crossobj4.style.opacity=fadeshow4.degree4/101
}
fadeshow4.prototype.restart4=function(){
}
fadeshow4.startit4=function(){
var crossobj4=iebrowser4? iebrowser4[fadeshow4.curcanvas4] : document.getElementById(fadeshow4.curcanvas4)
fadeshow4.populateslide4(crossobj4, fadeshow4.curimageindex4)
if (fadeshow4.pausecheck4==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj4=fadeshow4
var crossobjcontainer4=iebrowser4? iebrowser4["master4"] : document.getElementById("master4")
crossobjcontainer4.onmouseover=function(){cacheobj4.mouseovercheck4=1}
crossobjcontainer4.onmouseout=function(){cacheobj4.mouseovercheck4=0}
}
fadeshow4.rotateimage4()
}
function startSlide4(image4){
  indexflag4=1;
  indexstate4=image4;
  fadeshow4.prototype.restart4();
  }