// video_events.js

var player_loaded = false;

function switchFrame(iframeID, newTarget){

	// may need to use window.frames["iframename"].property for IE4?
	if(document.getElementById) {
  		i = document.getElementById(iframeID);
		i.src = newTarget;
	}
}



function mouseOver(i){

	// highlight title, switch video frame if player not loaded, show details
	rollOver('title' + i,'title' + i +'_over','videoLnksTxt');
	if (!player_loaded) { 
		switchFrame('videoFrame', getSrc('photo' + i +'_over'));
		//switchFrame('videoFrame','home/photo' + i + '.html'); 
	}
	switchLayer('homeVideoDetails' + i); 
	
}

function mouseOut(i){

	// unhighlight title, remove details, if player is not loaded, switch back to initial photo
	rollOver('title' + i,'title' + i +'_off','videoLnksTxt');
	switchLayer('homeVideoDetails' + i); 
	if (!player_loaded) { 
		switchFrame('videoFrame',getSrc('photo' + i +'_off')); 
	}
}

function clickedMe(i){

	// hide other transcripts, show this transcript, set loaded to true
	for(t=0; t<5 ;t++){
		if (t != i) {
			hideLayer('homeContent' + t);
		}
	}
	showLayer('homeContent' + i); 
	player_loaded = true;
}
