var homeVideos = [
{ title: 'Vickie Fagg', url: '/flash/VICKIE-FAGG.flv', screenshot: '/images/VICKIE-FAGG.jpg', description: 'Director of Imaging Services<br />Patients Medical Center<br />Pasadena, Texas' },
{ title: 'Brian Wadley, MD', url: '/flash/BRIAN-WADLEY-MD.flv', screenshot: '/images/BRIAN-WADLEY-MD.jpg', description: 'Desert Valley Radiology<br />Phoenix, Arizona' },
{ title: 'Tyler Crawford, MD', url: '/flash/TYLER-CRAWFORD-MD.flv', screenshot: '/images/TYLER-CRAWFORD-MD.jpg', description: 'Utah Valley Imaging<br />Provo, Utah' }, 
{ title: 'Lisa Adams', url: '/flash/LISA-ADAMS.flv', screenshot: '/images/LISA-ADAMS.jpg', description: 'Director of Center Operations<br />Radiology Associates,<br />Daytona Beach, Florida' }];

if(typeof this.PINT=="undefined"){var PINT = {};}
if(typeof this.PINT.page=="undefined"){PINT.page={};}
if(typeof this.PINT.page.News=="undefined"){PINT.page.News={};}

PINT.page.News.init = function() {
	PINT.page.News.videoPanel = new YAHOO.widget.Panel("videoPanel", {width:420,visible:false,fixedcenter:true,constraintoviewport:true,draggable:false,modal:true});
	PINT.page.News.videoPanel.playerId = "video";
	PINT.page.News.videoPanel.playerDivId = "videoContainer";

	// render the panel
	PINT.page.News.videoPanel.render(document.body);
	
	// remove the flash on hide
	PINT.page.News.videoPanel.beforeHideEvent.subscribe(function(){
		var d = document.getElementById(PINT.page.News.videoPanel.playerDivId);
		var p = document.getElementById(PINT.page.News.videoPanel.playerId);
		d.removeChild(p);
	});

        // add the flash on show panel
        PINT.page.News.showFlash = function(){
                // write the player
                PINT.page.News.flashPlayer.write(PINT.page.News.videoPanel.playerDivId);

                // var titlediv = document.getElementById("videoTitle");
                // titlediv.innerHTML = '<h3>' + homeVideos[i].title + '</h3>';

                PINT.page.News.videoPanel.setHeader('<h3>' + homeVideos[i].title + '</h3>');
        }
	
	var i = Math.floor(Math.random()*(homeVideos.length));
	var html = ''+
	'<img class="hflashpop" src="'+ themeRootDirectory +homeVideos[i].screenshot+'" alt="" />'+
	'<h2 class="vidcaption">'+homeVideos[i].title+'</h2>'+homeVideos[i].description;

	PINT.page.News.flashPlayer = new PINT_FlashObject(themeRootDirectory+"/flash/flvplayer.swf", "video", "360", "200", "/flash/testimonial_alt.jpg", 8);
	
        // wmode triggers flash disappearing on mac firefox with opacity
        //PINT.page.News.flashPlayer.addParam("wmode","transparent");
	PINT.page.News.flashPlayer.addParam("allowfullscreen","true");
	PINT.page.News.flashPlayer.addParam("allowscriptaccess","always");
	PINT.page.News.flashPlayer.addParam("flashvars","file="+themeRootDirectory+homeVideos[i].url+"&autostart=true");

	YAHOO.util.Dom.get('hVideo').innerHTML = html;
	YAHOO.util.Event.addListener("hVideo", "click", PINT.page.News.videoPanel.show, PINT.page.News.videoPanel, true);
        YAHOO.util.Event.addListener("hVideo", "click", PINT.page.News.showFlash, PINT.page.News.videoPanel, true);
	
}


// *************************************************** end rotating flash video popup *******************************

var theImages = new Array() // do not change this
theImages[0] = 'home_rotate01.jpg'
theImages[1] = 'home_rotate02.jpg'
theImages[2] = 'home_rotate03.jpg'
theImages[3] = 'home_rotate04.jpg'
theImages[4] = 'home_rotate05.jpg'

var theIconImagesA = new Array() // do not change this
theIconImagesA[0] = 'scripps.gif'
theIconImagesA[1] = 'haywood.gif'
theIconImagesA[2] = 'goodshepherd.gif'
theIconImagesA[3] = 'jewishhospital.gif'
theIconImagesA[4] = 'rockwood.gif'
theIconImagesA[5] = 'valley.gif'
theIconImagesA[6] = 'northshore.gif'
theIconImagesA[7] = 'methodist.gif'
theIconImagesA[8] = 'bsa.gif'
theIconImagesA[9] = 'rmg.gif'
theIconImagesA[10] = 'sidpeterson.gif'
theIconImagesA[11] = 'borgess.gif'
theIconImagesA[12] = 'saintmarys.gif'
theIconImagesA[13] = 'lakemedical.gif'
theIconImagesA[14] = 'saintalphonsus.gif'
theIconImagesA[15] = 'lrmc.gif'
theIconImagesA[16] = 'jefferson.gif'

var theIconImagesB = new Array() // do not change this
theIconImagesB[0] = 'pacscube.gif'
theIconImagesB[1] = 'hp.gif'
theIconImagesB[2] = 'konica.gif'
theIconImagesB[3] = 'microsoft.gif'
theIconImagesB[4] = 'planar.gif'
theIconImagesB[5] = 'sybase.gif'
theIconImagesB[6] = 'vidar.gif'
theIconImagesB[7] = 'viewsonic.gif'
theIconImagesB[8] = 'imo.gif'
theIconImagesB[9] = 'alife.gif'
theIconImagesB[10] = 'copia.gif'
theIconImagesB[11] = 'dell.gif'
theIconImagesB[12] = 'nec.gif'
theIconImagesB[13] = 'nuance.gif'
theIconImagesB[14] = 'ortho.gif'
theIconImagesB[15] = 'parkplace.gif'
theIconImagesB[16] = 'vital.gif'

// do not edit anything below this line


function showImage(){
var a = theImages.length;
var whichImage = Math.round(Math.random()*(a-1));
document.write('<img src="'+themeRootDirectory+'/images/'+theImages[whichImage]+'" width="748" height="154" alt="" />');
}


function showTestimonials(){
var a = theIconImagesA.length;
var whichImage = Math.round(Math.random()*(a-1));
document.write('<img src="'+themeRootDirectory+'/images/'+theIconImagesA[whichImage]+'" alt="" />');
}

function showPartners(){
var a = theIconImagesB.length;
var whichImage = Math.round(Math.random()*(a-1));
document.write('<img src="'+themeRootDirectory+'/images/'+theIconImagesB[whichImage]+'" alt="" />');
}



