
function showContent(content, type, page)
{
	strContent = document.getElementById(content).innerHTML;
}
//Function de recherche
var	loai = 0;
var	tukhoa = 'txtKeyword0';

function setFromSearchType(loai_b, tukhoa_b)
{
	loai = loai_b;
	tukhoa = tukhoa_b;
}

function checkFormSearch(type, idKeyword)
{
	keyword = document.getElementById(idKeyword).value;
	if (!trim(keyword))
	{
		keyword = "";
		document.getElementById(idKeyword).focus();
		return false;
	}
	if(type==0)
	{
		if ( keyword!='Entrer un mot cl&eacute; pour rechercher un MP3!' )
			window.location.href = dle_root + 'thuy.php?searchtype=mp3&key=' + keyword;
	}
	if(type==1)
	{
		if ( keyword!='Entrer un mot cl&eacute; pour rechercher un MP3!' )
			window.location.href = dle_root + 'thuy.php?searchtype=artist&key=' + keyword;
	}
	if(type==2)
	{
		if ( keyword!='Entrer un mot cl&eacute; pour rechercher des paroles!' )
			window.location.href = dle_root + 'thuy.php?searchtype=lyrics&key=' + keyword;
	}
	if(type==3)
	{
		if ( keyword!='Entrer un mot cl&eacute; pour rechercher des albums!' )
			window.location.href = dle_root + 'thuy.php?searchtype=album&key=' + keyword;
	}
	if(type==4)
	{
		if ( keyword!='Entrer un mot cl&eacute; pour rechercher des playlist!' )
			window.location.href = dle_root + 'thuy.php?searchtype=playlist&key=' + keyword;
	}
	if(type==5)
	{
		if ( keyword!='Entrer un mot cl&eacute; pour rechercher des vid&eacute;os' )
			window.location.href = dle_root + 'thuy.php?searchtype=video&key=' + keyword;
	}

}
//fin de la recherche
function trim(val)
{ 
	return val.replace(/^\s+|\s+$/g, "");
}

function stripPHP(str)
{
	str = trim(str);
	str = str.replace(/<\?php/g, "");
	str = str.replace(/<\?/g, "");
	str = str.replace(/\?>/g, "");
	return str;
}

//Tab
function photo_active_tab(obj, num){
		var curentTab=obj.id;
		var curentContent=curentTab.replace("tab","cont");

		curentContent_1=curentTab.replace("tab","cont");
		var tabs=$('#' + curentTab).parent().children();
		var contents=$('#' + curentContent).parent().children();

		$(tabs).each( function(){								
				$(this).attr('class','');
		});		
		
		$(contents).each( function(){								
				$(this).hide();
		});	
		
		$('#' + curentTab).addClass('active');
		$('#' + curentContent).fadeIn('slow');	
}
//Active Menu

