// JavaScript Document
function buildPlayer(vidId){
 var config = new Array();

 /* 
 * feel free to edit these configurations
 * to modify the player experience
 */
 config["videoId"] = vidId; //the default video loaded into the player
 config["videoRef"] = null; //the default video loaded into the player by ref id specified in console
 config["lineupId"] = null; //the default lineup loaded into the player
 config["playerTag"] = null; //player tag used for identifying this page in brightcove reporting
 config["autoStart"] = false; //tells the player to start playing video on load
 config["preloadBackColor"] = "#000000"; //background color while loading the player

  /* 
 * set the player's size using the parameters below
 * to make this player dynamically resizable, set the width and height as a percentage
 */
 config["width"] = 355;
 config["height"] = 305;
 
 /* do not edit these config items */
 config["playerId"] = 1155295588;//1138292706;
 
 createExperience(config, 8); 
}


function trim(p_sStr){
	return p_sStr.replace(/^\s+|\s+$/g, '') ;	
}

function showDivBounce(p_sId){ if($(p_sId).style.display=='none') Effect.BlindDown(p_sId,{duration:0.3}); }
function hideDivBounce(p_sId){ if($(p_sId).style.display!='none') Effect.BlindUp(p_sId,{duration:0.2}); }	
function toggleDivBounce(p_sId){
	if($(p_sId).style.display=='none'){ showDivBounce(p_sId); }
	else hideDivBounce(p_sId);
}

function toggleForgotPassword(){
	var forgotPass = $('login_forgotpass');
	var userpass = $('login_userpass');
	if(forgotPass.style.display=='none'){ 
		forgotPass.style.display='block'
		userpass.style.display = 'none';
	}
	else {
		forgotPass.style.display='none';
		userpass.style.display = 'block';	
	}
}

function popWin(URL) {
	day = new Date(); id = day.getTime();
	eval("page" + id + " = window.open("+URL+", '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=410,height=600');");
}

function input_prefillFocus(p_sPrefill,p_sId){
	if(trim($(p_sId).value)==p_sPrefill) $(p_sId).value = '';
}
function input_prefillBlur(p_sPrefill,p_sId){
	if(trim($(p_sId).value)=='') $(p_sId).value = p_sPrefill;
}
