/*
Libreria de funciones JS de apoyo
Biblioteca - Aula Virtual

*/

function muestraComentario(){
	$("#resumen").slideUp();
	$("#completo").slideDown();
}
function ocultaComentario(){
	$("#resumen").slideDown();
	$("#completo").slideUp();
}
/************************************************************
 ** Clears a field
 ** By: 	Joshua Sowin (fireandknowledge.org)
 ** HTML: <input type="text" value="Search" name="search"
 **			id="search" size="25" 
 ** 		onFocus="clearInput('search', 'Search')" 
 ** 		onBlur="clearInput('search', 'Search')" />
 ***********************************************************/
function clearInput(field_id, term_to_clear) {
	
	// Clear input if it matches default value
	if (document.getElementById(field_id).value == term_to_clear ) {
		document.getElementById(field_id).value = '';
	}
	
	// If the value is blank, then put back term
	else if (document.getElementById(field_id).value == '' ) {
		document.getElementById(field_id).value = term_to_clear;
	}
} // end clearSearch()
function videoshow1(nn,t,url,tit) {
	var w = 480;
	var h = 340;
	if(t==1) {
		var vid = '<embed style="width:'+w+'px; height:'+h+'px;" id="VideoPlayback" type="application/x-shockwave-flash" src="' + url + '" flashvars="autoplay=1" wmode="opaque"><\/embed>';
	} else {
		if(t==2) {
			var vid = '<object width="'+w+'" height="'+w+'"><param name="movie" value="' + url + '&amp;autoplay=1"\/><param name="wmode" value="opaque"\/><embed src="' + url + '&amp;autoplay=1" type="application/x-shockwave-flash" wmode="opaque" width="'+w+'" height="'+h+'"><\/embed><\/object>';
		} else if(t==3) {
			var vid = '<embed src="' + url + '&autoplay=1" width="'+w+'" height="'+h+'" wmode="opaque" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"><\/embed>';
		} else {
			var vid = '<object width="'+w+'" height="'+h+'"><param name="movie" value="' + url + '"\/><param name="allowfullscreen" value="false"\/><param name="wmode" value="opaque"\/><param name="autostart" value="1"\/><embed src="' + url + '" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" allowfullscreen="false" wmode="opaque" flashvars="autostart=1"><\/embed><\/object>';
		}
	}
	document.getElementById(nn).innerHTML = vid + '<\/br>';
	document.getElementById('repltxt').innerHTML = '<h2>' + tit + '<\/h2>';
}

