/***********************************************
* Translucent Slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var trans_width='948px' //slideshow width
var trans_height='149px' //slideshow height
var rotateTimer ="";
/*
var pause = 8000 //pause between slides 3000 = 3 secs
var degree=100 //animation speed. Greater is faster.
*/

  
  
//list all the pic names here
var slideshowPics = new Array (
	"disciplined.jpg",
	"diversification.jpg",
	"invest.jpg",
	"operational.jpg",
	"proven.jpg",
	"service.jpg",
	"significant.jpg"	
)
/*var slideshowTitles = new Array (
	"Diversification. Absolute Returns",
	"Proven Track Record of Success",
	"World Class Investment Expertise",
	"Collaborative Investment Process",
	"Significant Partner Capital Invested",
	"Operational Strength + Integrity",
	"Transparency + Service Excellence"
)

var slideshowBlurbs = new Array (
	"Diversification. Absolute Returns Duis fermentum, metus sed congue gravid a, arcu dui ornare urna, ut imperdiet enim odio dignissim ipsum. ",
	"Proven Track Record of Success Duis fermentum, metus sed congue gravid a, arcu dui ornare urna, ut imperdiet enim odio dignissim ipsum.",
	"World Class Investment Expertise Duis fermentum, metus sed congue gravid a, arcu dui ornare urna, ut imperdiet enim odio dignissim ipsum.",
	"Collaborative Investment Process Duis fermentum, metus sed congue gravid a, arcu dui ornare urna, ut imperdiet enim odio dignissim ipsum.",
	"We are the largest investor in our funds. Of our $1.2 billion in assets under management, approximately $240 million is internal partner and employee personal capital. Collectively, we have a deep belief and financial commitment to the talent of our team.",
	"Operational Strength + Integrity Duis fermentum, metus sed congue gravid a, arcu dui ornare urna, ut imperdiet enim odio dignissim ipsum.",
	"Transparency + Service Excellence Duis fermentum, metus sed congue gravid a, arcu dui ornare urna, ut imperdiet enim odio dignissim ipsum."
)

var picDivIds = new Array (
	"diversification",
	"record",
	"expertise",
	"process",
	"capital",
	"strength",
	"transparency"
)
*/
var picLocation = "images/insideBanner/"
var preload_image_object = new Image();
var slideshowcontent = new Array();
/*var slideshowtitle = new Array();
var slideshowblurb = new Array();
var picdivid = new Array();*/
//Define slideshow contents: [image URL, OPTIONAL LINK, OPTIONAL LINK TARGET]
//slideshowcontent[1]=["images/conference/ "", ""] //plain image syntax

for (x in slideshowPics)
{
	preload_image_object.src = [picLocation + slideshowPics[x]];
	slideshowcontent[x]=[picLocation + slideshowPics[x]];
	/*slideshowtitle[x]=slideshowTitles[x];
	slideshowblurb[x]=slideshowBlurbs[x];
	picdivid[x]=picDivIds[x];*/
}


////NO need to edit beyond here/////////////

var bgcolor='white'

var imageholder=new Array()
for (i=0;i<slideshowcontent.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideshowcontent[i][0]
}

var ie4=document.all
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1

/*
if (ie4||dom){
	document.write('<div id="slideshowInside" style="width:'+trans_width+';height:'+trans_height+';overflow:hidden; position: relative;"><div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1" style="position:absolute;background-color:'+bgcolor+';width:'+trans_width+';height:'+trans_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
}else if (document.layers){
	document.write('<ilayer id=tickernsmain visibility=hide width='+trans_width+' height='+trans_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+trans_width+' height='+trans_height+' left=0 top=0>'+'<img src="'+slideshowcontent[0][0]+'"></layer></ilayer>')
}*/

document.write('<div style="background-image: url(' + slideshowcontent[0][0] +'); background-repeat: no-repeat; width: '+trans_width+'; height: '+trans_height+';" id="canvas0">');
document.write('<img src="' + slideshowcontent[0][0] +'" style="width:'+trans_width+'; height: '+trans_height+'; border: 0 none; filter: alpha(opacity=0); -moz-opacity: 0; opacity: 0;" id="img1" alt="" />')
document.write('</div>');

/*var curpos=trans_width*(-1)
var curcanvas="canvas0"
var curindex=0
var nextindex=1

function getslidehtml(theslide){
	var slidehtml=""
	if (theslide[1]!="")
	slidehtml='<a href="'+theslide[1]+'" target="'+theslide[2]+'">'
	slidehtml+='<img src="'+theslide[0]+'" alt="" title="" border="0">'
	if (theslide[1]!="")
	slidehtml+='</a>'
	return slidehtml
}

function moveslide(){
	if (curpos<0){
		curpos=Math.min(curpos+degree,0)
		tempobj.style.left=curpos+"px"
	}else{
		clearInterval(dropslide)
		if (crossobj.filters)
			crossobj.filters.alpha.opacity=100
		else if (crossobj.style.MozOpacity)
			crossobj.style.MozOpacity=1

		nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas1"
		tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
		tempobj.innerHTML=getslidehtml(slideshowcontent[curindex])
		nextindex=(nextindex<slideshowcontent.length-1)? nextindex+1 : 0
		
*/		/*setTimeout("rotateslide()",pause)*/
/*	}
	
}*/

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
}


function blendimage(divid, imageid, imagefile, millisec) {
    var speed = Math.round(millisec / 100);
    var timer = 1;
    
    //set the current image as background
    document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
    
    //make image transparent
    changeOpac(0, imageid);
    
    //make new image
    document.getElementById(imageid).src = imagefile;

    //fade in image
    for(i = 0; i <= 100; i++) {
        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
        timer++;
    }
}

function blendimageFast(divid, imageid, imagefile, millisec) {
    var speed = Math.round(millisec / 1);
    var timer = 1;
    
    //set the current image as background
    document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
    
    //make image transparent
    changeOpac(0, imageid);
    
    //make new image
    document.getElementById(imageid).src = imagefile;

    //fade in image
    for(i = 0; i <= 1; i++) {
        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
        timer++;
    }
}


/*function UpdateLabel (iteration)
{
	document.getElementById("insideBannerHeader").innerHTML = slideshowtitle[iteration];
	document.getElementById("insideBannerBlurb").innerHTML = slideshowblurb[iteration];
	
}*/
					  

function rotateslide(){
	/*if (ie4||dom){
		resetit(curcanvas)
		crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
		crossobj.style.zIndex++
		if (crossobj.filters)
			document.all.canvas0.filters.alpha.opacity=document.all.canvas1.filters.alpha.opacity=20
		else if (crossobj.style.MozOpacity)
			document.getElementById("canvas0").style.MozOpacity=document.getElementById("canvas1").style.MozOpacity=0.2
		var temp='setInterval("moveslide()",50)'
		dropslide=eval(temp)
		curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
		crossobj.innerHTML=getslidehtml(slideshowcontent[curindex])
	}
	else if (document.layers){		
		crossobj.document.write(getslidehtml(slideshowcontent[curindex]))
		crossobj.document.close()
	}*/
	blendimage('canvas0', 'img1', slideshowcontent[curindex], 500)
	//UpdateLabel (curindex);
	curindex=(curindex<slideshowcontent.length-1)? curindex+1 : 0
	if(rotateTimer!=undefined){
		clearTimeout(rotateTimer);
	}
	rotateTimer = setTimeout("rotateslide()",10000);
}

function jumptoslide(which){
	curindex=which
	rotateslide()
	
}

/*function resetit(what){
	curpos=parseInt(trans_width)*(-1)
	var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
	crossobj.style.left=curpos+"px"
	
}
*/
function startit()
{
	randomSlide=Math.floor(Math.random()*slideshowcontent.length)
	curindex=randomSlide
	blendimage('canvas0', 'img1', slideshowcontent[curindex], 5)
	curindex=(curindex<slideshowcontent.length-1)? curindex+1 : 0
	if(rotateTimer!=undefined){
		clearTimeout(rotateTimer);
	}
	rotateTimer = setTimeout("rotateslide()",10000);
}

