function OpenURL(StrURL, StrName, StrFeatures){
	win = window.open(StrURL, StrName, StrFeatures);
	win.focus();
}
function OpenFullScreen(StrURL) {
	window.open (StrURL, '','fullscreen=yes')
}

// ***********************************************
// * openWebcast(IdWebcast, IdFragment, IdFrame)
// * Input: IdWebcast - Número del webcast a abrir
// *        IdFragment - Número del fragment a abrir
// *        IdFrame - Número del frame al que hay que ir una vez abierto el fichero
// ***********************************************
function openWebcast(IdFragment, IdOld, IdApartat, IdFrame){

	fs = window.open(StrGetHomePage(window.location.href) + "/videos/Reproductor.swf?Idf="+ IdFragment +"&IdO "+ IdOld+"&IdA=" + IdApartat +"&IdFrame=" + IdFrame+ "&BoolFS=1" ,
		"FullScreenVideo", "toolbar=no,width=" + screen.availWidth  + ",height=" + screen.availHeight 
		+ ",status=no,resizable=yes,fullscreen=yes,scrollbars=no");
	fs.focus();
}
function openWebcastMed(IdWebcast, IdFragment, IntFrame){

	fs = window.open(StrGetHomePage(window.location.href) + "/upload/webcasts/med/Reproductor_med.swf?IdWebcast=" + IdWebcast + "&IdFragment=" + IdFragment + "&IntFrame=" + IntFrame + "&BoolFS=1" ,
		"FullScreenVideo", "toolbar=no,width=" + screen.availWidth  + ",height=" + screen.availHeight 
		+ ",status=no,resizable=yes,fullscreen=yes,scrollbars=no");
	fs.focus();
}
function openWebcastVanguardia(IdWebcast, IdFragment, IntFrame){
		
	fs = window.open(StrGetHomePage(window.location.href) + "/upload/webcasts/lavanguardia/ReproductorVan.swf?IdWebcast=" + IdWebcast + "&IdFragment=" + IdFragment + "&IntFrame=" + IntFrame + "&BoolFS=1" ,
		"FullScreenVideo", "toolbar=no,width=" + screen.availWidth  + ",height=" + screen.availHeight 
		+ ",status=no,resizable=yes,fullscreen=yes,scrollbars=no");
	fs.focus();
}

// *************************************************
// * StrGetHomePage(Str) - Devuelve la parte del dominio de una URL
// * http://a.a.it/dir/pag.asp -> http://a.a.it
// * Input: StrUrl - URL a separar
// * Output: String con el dominio.
// *************************************************
function StrGetHomePage(StrUrl){
var StrDomain, StrTmp;

	StrTmp = StrUrl.split('/');
	StrTmp.length = 3;
	StrDomain = StrTmp.join("/");
	return StrDomain;
}