﻿// JScript File
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];x
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function WS_preload()  {
	MM_preloadImages('../../images/maintvroll.gif','../../images/maincopyroll.gif','../../images/mainphotroll.gif','../../images/mainphilroll.gif','../../images/mainbioroll.gif','../../images/mainconroll.gif', '../../images/circle.gif','../../images/circleroll.gif');
}

function WS_restoreText()  {	// v 0.2
	var i,x
	if (document.WS_sr)  {
		var a=document.WS_sr;
		if (x=a[0])  x.style.display='block';	// restore welcome text
		for(i=1;a&&i<(a.length)&&(x=a[i]);i++) x.style.display='none';	
	}
}

function WS_swapText()  {	// v 0.1
	var x,j=0,a=WS_swapText.arguments;
	document.WS_sr=new Array;
	if ((x=MM_findObj('copySection'))!=null){
		document.WS_sr[j++]=x;
		x.style.display='none';	
	}
	if ((x=MM_findObj(a[0]))!=null){
		document.WS_sr[j++]=x;
		x.style.display='block';	
	}
}

function WS_restore()  {	// v 0.1
	MM_swapImgRestore();
	WS_restoreText();
}

function WS_rollover()  {	// v 0.2
	var x,j=0,a=WS_rollover.arguments;
	if(a.length>=3)  {
		if (document.WS_sr) {
			MM_swapImgRestore();
			WS_restoreText();
		}
		MM_swapImage(a[0],'',a[1],1);
		WS_swapText(a[2]);
	}
}


function WS_rollover_main()  {		// v 0.1
	var a=WS_rollover_main.arguments;
	if (a.length>=3)  {
		WS_restore();
		MM_swapImage(a[0],'',a[2],1);
	}
}

function WS_MediaPreload()		// v 0.1
{ 
  var args = WS_MediaPreload.arguments;

  document.mediaArray = new Array(args.length);

  for(var i=0; i<args.length; i++)
  {
    document.mediaArray[i] = new Image;
    document.mediaArray[i].src = args[i];
  }
}

// ********************
// * Embed MOV Player *
// ********************
// embeds a player in the div section specified by DivID
// avoids click to activate message in Internet Explorer for embedded media
// v 0.1
function EmbedMOVPlayer(DivID, MediaURL)
{
	var d = document.getElementById(DivID);
	d.innerHTML = '<OBJECT	CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ' + 
				'CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" ' +
				'STYLE="background-color:#FFCC66" ' +
				'HEIGHT=260 WIDTH=325>' +
				'<PARAM NAME="src" VALUE="' + MediaURL + '" >' +
				'<PARAM NAME="autoplay" VALUE="true" >' +
				'<PARAM NAME="bgcolor" VALUE="#FFCC66" >' +
				'<EMBED SRC="' + MediaURL +'" ' +
				'HEIGHT=260 WIDTH=325 ' +
				'TYPE="video/quicktime" ' + 
				'PLUGINSPAGE="http://www.apple.com/quicktime/download/" ' +
				'/>' +  
				'</OBJECT> ';
}

// *************************
// * Embed MOV Player Wide *
// *************************
// embeds a player in the div section specified by DivID
// avoids click to activate message in Internet Explorer for embedded media
// v 0.1
function EmbedMOVPlayerWide(DivID, MediaURL)
{
	var d = document.getElementById(DivID);
	d.innerHTML = '<OBJECT	CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ' + 
				'CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" ' +
				'STYLE="background-color:#FFCC66" ' +
				'HEIGHT=260 WIDTH=430>' +
				'<PARAM NAME="src" VALUE="' + MediaURL + '" >' +
				'<PARAM NAME="autoplay" VALUE="true" >' +
				'<PARAM NAME="bgcolor" VALUE="#FFCC66" >' +
				'<EMBED SRC="' + MediaURL +'" ' +
				'HEIGHT=260 WIDTH=430 ' +
				'TYPE="video/quicktime" ' + 
				'PLUGINSPAGE="http://www.apple.com/quicktime/download/" ' +
				'/>' +  
				'</OBJECT> ';
}



// ********************
// * Embed WMP Player *
// ********************
// embeds a player in the div section specified by DivID
// avoids click to activate message in Internet Explorer for embedded media
// v 0.1
function EmbedWMPlayer(DivID, MediaURL)
{
	var d = document.getElementById(DivID);
	d.innerHTML = '<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=240 ' +
		  'CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" ' +
		  'STANDBY="Loading Windows Media Player components..." ' +
		  'TYPE="application/x-oleobject" ' +
		  'CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">' +
		  '<PARAM name="autoStart" value="True">' +
		  '<PARAM name="FileName" value="' + MediaURL + '">' +
		  '<EMBED TYPE="application/x-mplayer2" ' +
			'NAME="MediaPlayer" ' +
			'WIDTH=320 HEIGHT=240>' +
		  	'</EMBED>' +
			'</OBJECT>';
}
// ********************
// * Embed MP3 Player *
// ********************
// embeds a player in the div section specified by DivID
// avoids click to activate message in Internet Explorer for embedded media
// v 0.1
function EmbedMP3Player(DivID, MediaURL, Caption)
{
		var d = document.getElementById(DivID);
			d.innerHTML = '<p><b><a href="' + MediaURL + '">' + Caption + '</a></b><br><object type="application/x-shockwave-flash" data="/player/player.swf" width="290" height="24" id="flash' + DivID + '">' +
				'<param name="movie" value="/player/player.swf" />' + 
				'<param name="FlashVars" value="playerID=flash' + DivID + '&bg=0xf8f8f8&leftbg=0xeeeeee&lefticon=0x666666&rightbg=0xcccccc&rightbghover=0x999999&righticon=0x666666&righticonhover=0xffffff&text=0x666666&slider=0x666666&track=0xFFFFFF&border=0x666666&loader=0x9FFFB8&soundFile=' + MediaURL + '" />' +
				'<param name="quality" value="high" />' +
				'<param name="menu" value="false" />' + 
				'<param name="wmode" value="transparent" />' +
				'</object></center>' + 
				'</p>';
}