// JavaScript Document

var fadeimages103=new Array()
var delaytime_array103=new Array()
var maxorder103=0;
// Add By Abhishek Mittal

for(j103=0;j103<total_banner103;j103++)
		  {
			fadeimages103[j103]=["http://www.piotv.com/photos/banners/"+banner103[j103][0]+"", siteurl103[j103][0], "_blank"]
		  }
for(j103=0;j103<total_banner103;j103++)
		  {
			delaytime_array103[j103]=[delaytime103[j103][0]]
		  }		  
// End Added by Abhishek Mittal		  
var fadebgcolor103="white"
////NO need to edit beyond here/////////////
var indexstate103=0; 
var indexflag103=0;
var fadearray103=new Array() //array to cache fadeshow instances
var fadeclear103=new Array() //array to cache corresponding clearinterval pointers
var dom103=(document.getElementById) //modern dom browsers
var iebrowser103=document.all
function fadeshow103(theimages103, fadewidth103, fadeheight103, borderwidth103, delay103, pause103, img103, displayorder103){
//alert(fadeshow103);
fadeshow103.pausecheck103=pause103
fadeshow103.mouseovercheck103=0
fadeshow103.delay103=delay103
fadeshow103.degree103=100 //initial opacity degree (10%)
fadeshow103.curimageindex103=img103
fadeshow103.nextimageindex103=img103+1
fadearray103[fadearray103.length]=fadeshow103
fadeshow103.slideshowid103=fadearray103.length-1
fadeshow103.canvasbase103="canvas"+fadeshow103.slideshowid103

fadeshow103.curcanvas103="submaster103_0"
fadeshow103.theimages103=theimages103
fadeshow103.imageborder103=parseInt(borderwidth103)
fadeshow103.postimages103=new Array() //preload images

for (p=0;p<theimages103.length;p++){
fadeshow103.postimages103[p]=new Image()
fadeshow103.postimages103[p].src=theimages103[p][0]

}
	
/*var fadewidth103=728
var fadeheight103=79*/
if (iebrowser103&&dom103||dom103)
{//if IE5+ or modern browsers (ie: Firefox)
//alert("One");

document.write('<div  id="master103" style="position:relative;width:'+fadewidth103+'px;height:'+fadeheight103+'px;overflow:hidden;"><div id="submaster103_0" style="position:absolute;width:'+fadewidth103+'px;height:'+fadeheight103+'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:'+fadebgcolor103+'"></div><div id="submaster103_1" style="position:absolute;width:'+fadewidth103+'px;height:'+fadeheight103+'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:'+fadebgcolor103+'"></div></div>')
}
else
{
	//alert("Two");
document.write('<div><img name="defaultslide'+fadeshow103.slideshowid103+'" src="'+fadeshow103.postimages103[0].src+'"></div>')
}

if (iebrowser103&&dom103||dom103) //if IE5+ or modern browsers such as Firefox
fadeshow103.startit103()

else{
fadeshow103.curimageindex103++

setInterval("fadearray103["+fadeshow103.slideshowid103+"].rotateimage103()", fadeshow103.delay103)

}
}
function fadepic103(obj103){
if (obj103.degree103<100){
obj103.degree103+=100
if (obj103.tempobj103.filters&&obj103.tempobj103.filters[0]){
if (typeof obj103.tempobj103.filters[0].opacity=="number") //if IE6+
obj103.tempobj103.filters[0].opacity=obj103.degree103
else //else if IE5.5-
obj103.tempobj103.style.filter="alpha(opacity="+obj103.degree103+")"
}
else if (obj103.tempobj103.style.MozOpacity)
obj103.tempobj103.style.MozOpacity=obj103.degree103/103
else if (obj103.tempobj103.style.KhtmlOpacity)
obj103.tempobj103.style.KhtmlOpacity=obj103.degree103/100
else if (obj103.tempobj103.style.opacity&&!obj103.tempobj103.filters)
obj103.tempobj103.style.opacity=obj103.degree103/103
}
else{
clearInterval(fadeclear103[obj103.slideshowid103])
//alert(obj103.canvasbase103+"_1");
obj103.nextcanvas103=(obj103.curcanvas103=="submaster103_0")? "submaster103_0" : "submaster103_1"
obj103.tempobj103=iebrowser103? iebrowser103[obj103.nextcanvas103] : document.getElementById(obj103.nextcanvas103)
if(indexflag103==1){
	clearInterval(fadeclear103[obj103.slideshowid103])
	 obj103.nextimageindex103=indexstate103
	 indexflag103=0
}
obj103.populateslide103(obj103.tempobj103, obj103.nextimageindex103)
obj103.nextimageindex103=(obj103.nextimageindex103<obj103.postimages103.length-1)? obj103.nextimageindex103+1 : 0
if(maxorder103==total_banner103)
	maxorder103=0;
setTimeout("fadearray103["+obj103.slideshowid103+"].rotateimage103()", delaytime_array103[maxorder103])
maxorder103++;
}
}
fadeshow103.populateslide103=function(picobj103, picindex103){
var slideHTML103=""
if (fadeshow103.theimages103[picindex103][1]!="") //if associated link exists for image
slideHTML103='<a href="http://'+fadeshow103.theimages103[picindex103][1]+'" target="'+fadeshow103.theimages103[picindex103][2]+'">'

split_path_ext103=fadeshow103.postimages103[picindex103].src.split(".");
if(split_path_ext103[split_path_ext103.length-1]=='swf')
	slideHTML103+='<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="180" height="150"  style="z-index:0;"><param name="movie" value="'+fadeshow103.postimages103[picindex103].src+'" /><param name="quality" value="high" /> <param name="wmode" value="transparent" /><embed src="'+fadeshow103.postimages103[picindex103].src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="180" height="150"  WMODE="transparent"></embed></object>'
else
	slideHTML103+='<img src="'+fadeshow103.postimages103[picindex103].src+'" border="'+fadeshow103.imageborder103+'px">'

if (fadeshow103.theimages103[picindex103][1]!="") //if associated link exists for image
slideHTML103+='</a>'




picobj103.innerHTML=slideHTML103
}
fadeshow103.rotateimage103=function(){
if (fadeshow103.pausecheck103==1) //if pause onMouseover enabled, cache object
var cacheobj103=fadeshow103
if (fadeshow103.mouseovercheck103==1)
setTimeout(function(){cacheobj103.rotateimage103()}, 100)
else if (iebrowser103&&dom103||dom103){
fadeshow103.resetit103()
var crossobj103=fadeshow103.tempobj103=iebrowser103? iebrowser103[fadeshow103.curcanvas103] : document.getElementById(fadeshow103.curcanvas103)
crossobj103.style.zIndex++
fadeclear103[fadeshow103.slideshowid103]=setInterval("fadepic103(fadearray103["+fadeshow103.slideshowid103+"])",50)
fadeshow103.curcanvas103=(fadeshow103.curcanvas103=="submaster103_0")? "submaster103_1" : "submaster103_0"
}
else{
var ns4imgobj103=document.images['defaultslide'+fadeshow103.slideshowid103]
ns4imgobj103.src=fadeshow103.postimages103[fadeshow103.curimageindex103].src
}
fadeshow103.curimageindex103=(fadeshow103.curimageindex103<fadeshow103.postimages103.length-1)? fadeshow103.curimageindex103+1 : 0
}
fadeshow103.resetit103=function(){
fadeshow103.degree103=100
var crossobj103=iebrowser103? iebrowser103[fadeshow103.curcanvas103] : document.getElementById(fadeshow103.curcanvas103)
if (crossobj103.filters&&crossobj103.filters[0]){
if (typeof crossobj103.filters[0].opacity=="number") //if IE6+
crossobj103.filters(0).opacity=fadeshow103.degree103
else //else if IE5.5-
crossobj103.style.filter="alpha(opacity="+fadeshow103.degree103+")"
}
else if (crossobj103.style.MozOpacity)
crossobj103.style.MozOpacity=fadeshow103.degree103/103
else if (crossobj103.style.KhtmlOpacity)
crossobj103.style.KhtmlOpacity=fadeshow103.degree103/100
else if (crossobj103.style.opacity&&!crossobj103.filters)
crossobj103.style.opacity=fadeshow103.degree103/103
}
fadeshow103.prototype.restart103=function(){
}
fadeshow103.startit103=function(){
var crossobj103=iebrowser103? iebrowser103[fadeshow103.curcanvas103] : document.getElementById(fadeshow103.curcanvas103)
fadeshow103.populateslide103(crossobj103, fadeshow103.curimageindex103)
if (fadeshow103.pausecheck103==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj103=fadeshow103
var crossobjcontainer103=iebrowser103? iebrowser103["master103"] : document.getElementById("master103")
crossobjcontainer103.onmouseover=function(){cacheobj103.mouseovercheck103=1}
crossobjcontainer103.onmouseout=function(){cacheobj103.mouseovercheck103=0}
}
fadeshow103.rotateimage103()
}
function startSlide103(image103){
  indexflag103=1;
  indexstate103=image103;
  fadeshow103.prototype.restart103();
  }