function ImageHeader(imageHeaderName,talentId){
	var req1 = new XMLHttpRequest();
	req1.open("GET", "imagesHeaderDisplay.php?imageHeaderName="+imageHeaderName+"&talentId="+talentId, true);
	req1.onreadystatechange = function ()
	{
		if (req1.readyState == 4) {
			if (req1.status == 200) {
				
				if(req1.responseText != ""){
					document.getElementById("Imageheader").innerHTML = req1.responseText;
				}
				else{
					document.getElementById("errMsg").innerHTML = "";
				}
			}
			else {
				alert("Error: while trying to checking username, please try again");
			}
		}
	};
	req1.send("");
}

function playVideoFile(VideoFile,videoPath)
{
	document.getElementById("bigImageContainer").style.display="none";
	document.getElementById("bigImageContainer").innerHTML = '<embed height=276 width=350 align=middle pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="always"  bgcolor="#E1E1E1" quality="high" flashvars="vfile='+VideoFile+'" swliveconnect="true" src="'+videoPath+'video.swf">' ;
	setTimeout("showVideoPlayer()", 1000); 

}
function showVideoPlayer(VideoFile,videoPath)
{

	document.getElementById("bigImageContainer").style.display="block";
}
function playAudioFile(AudioFile,AgencyUrl,ImagePath,audioPath)
{

	var imageUrl = ImagePath;

	document.getElementById("bigImageContainer").innerHTML = '<img id="bigImage" border="0"  src='+imageUrl+'><span id="showPlayerId" style="display:none;"><embed height="22" width="350" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" bgcolor="#E1E1E1" quality="high" flashvars="sclip='+AudioFile+'" swliveconnect="true" src="'+audioPath+'audio.swf"/></span>' ;
	setTimeout("showPlayer()", 3000); 
	
}
function showPlayer()
{

	document.getElementById('showPlayerId').style.display="block";
}

function viewBigImage(path,imageName,phototcredit)
{	
	
	phototcredit = decodeURIComponent(phototcredit);

	document.getElementById("bigImageContainer").innerHTML = "";
	//document.getElementById("loadingImage").style.display = "block";
	document.getElementById("bigImageContainer").innerHTML='<img id="bigImage" border="0" src='+path+"Big"+imageName + '>';
	//document.getElementById("loadingImage").style.display = "none";
	document.getElementById("photoCredit").innerHTML = '<b>Photo Credit</b>: ' + phototcredit;
	if(phototcredit==""){
		document.getElementById("photoCredit").innerHTML="";
	}
}
function changeTextOnMouseOver(videoHeading)
{
	videoHeading = decodeURIComponent(videoHeading);
	
	if(videoHeading!="")
	{
		document.getElementById('textheading').innerHTML = decodeURIComponent(videoHeading);
	}
	else
	{
		document.getElementById('textheading').innerHTML = 'Video Clips';

	}

}
function changeTextOnMouseOut()
{
	document.getElementById('textheading').innerHTML = 'Video Clips';
}
function changeAudioTextOver(audioHeading)
{
	
	if(audioHeading!="")
	{
		document.getElementById('textaudioheading').innerHTML = decodeURIComponent(audioHeading);
	}
	else
	{
		document.getElementById('textaudioheading').innerHTML = 'Audio Clips';

	}

}
function changeAudioTextOut()
{
	document.getElementById('textaudioheading').innerHTML = 'Audio Clips';
}
