/**
 * @author Tuatara Aplicacions TIC
 */

var hotnews_newsitems;
var hotnews_curritem=0;

function ticknews() {
    $("ul.hotnews-list li:eq("+hotnews_curritem+")").hide();
    hotnews_curritem = ++hotnews_curritem%hotnews_newsitems;
    $("ul.hotnews-list li:eq("+hotnews_curritem+")").show();

}

function phpads_deliverActiveX(content)
{
	document.write(content);	
}

function MP3showTallVeu(tallveuid,ruta)
{
	$('#nav_podcasting').show('slow');
	$('#nav_podcasting h1').html($('#tallveu_'+tallveuid).html());
	$('#nav_podcasting div.mp3player').html('Carregant...');
	MP3loadTallVeu(ruta);
	
}

function MP3hideTallVeu()
{
	$('#nav_podcasting').hide('slow');
	$('#nav_podcasting div.mp3player').empty();
}

function MP3loadTallVeu(ruta)
{
	$.fn.media.defaults.bgColor = '#e6f5ff';
	$('#nav_podcasting div.mp3player').empty();
	$('<a/>').addClass('linkmedia').attr('href',ruta).html(ruta).appendTo($('#nav_podcasting div.mp3player'));
	$('#nav_podcasting div.mp3player a.linkmedia').media({ width: 910, height: 20, autoplay: 1 });
}

function pl_newWindow(url,winName,width,height,position){
if(position=="random") {
leftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-width)):100;
topPosition=(screen.height)?Math.floor(Math.random()*((screen.height-height)-75)):100;
} else { // center
leftPosition=(screen.width)?(screen.width-width)/2:100;
topPosition=(screen.height)?(screen.height-height)/2:100;
}
settings='width='+width+',height='+height+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(url,winName,settings);
win.focus();
}