function blockError()
{
	return true;
}
window.onerror = blockError;

// pop-up lyrics
function lyricPopupR(id)
{	
	var direc = 'http://www.jpopasia.com/pag/popUp/lyricPopupR.php?id=' + id;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=300,height=700,left=0,top=100,screenX=0,screenY=100');return false;   
}

function lyricPopupK(id)
{
	var direc = 'http://www.jpopasia.com/pag/popUp/lyricPopupK.php?id=' + id;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=300,height=700,left=0,top=100,screenX=0,screenY=100');return false;   
}

function lyricPopupT(id)
{
	var direc = 'http://www.jpopasia.com/pag/popUp/lyricPopupT.php?id=' + id;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=450,height=700,left=0,top=100,screenX=0,screenY=100');return false;  
}

// mp3 flash player
function playMp()
{	
	myWin = window.open('http://www.jpopasia.com/mp3/playMp.php?id=<? echo $data->id; ?>', 'Lyric1',
	'width=280, height=250,status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,fullscreen=no,directories=no,location=no');
}

// pop-up video @ play
function vdView(hash) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/viewVideo.php?hash=' + hash;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=450,height=450,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// pop-up comments and message
function postMsgCmt(type, id) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/postMsgCmt.php?type=' + type + '&id=' + id;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=455,height=550,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// pop-up information public profile
function pubProfileInfo(fav) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/pubProfileInfo.php?fav=' + fav;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=455,height=550,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// pop-up explain
function popExp(doc) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/popExp.php?type=' + doc;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=455,height=600,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// pop-up add friends
function addFriends(action, toID) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/addFriends.php?action=' + action + '&toID=' + toID;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=435,height=120,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// pop-up fav video
function fav(id) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/fav.php?id=' + id;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=435,height=120,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// pop-up play settings
function playSettings(id) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/playSettings.php?id=' + id;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=435,height=300,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// pop-up rate
function rate(id, rating) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/rate.php?id=' + id + '&rating=' + rating;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=435,height=120,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// pop-up play settings
function showCmt(id) 
{  	 	
	var direc = 'http://www.jpopasia.com/pag/popUp/showCmt.php?id=' + id;	window.open(direc,'Help','fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=435,height=700,left=0,top=100,screenX=0,screenY=100');return false;   	 	 
}

// more and less artist info @ play
function showInline (elName) {
	var theElemenet = document.getElementById(elName);
	if (theElemenet) {
		theElemenet.style.display = "inline";
	}
	}
function hideInline (elName) {
	var theElemenet = document.getElementById(elName);
	if (theElemenet) {
		theElemenet.style.display = "none";
	}
}















var aExpandedAnswer = new Array();
var aExpandedCategory = new Array();

function toggleAnswer(answerId)
{
	var answerDiv = $('answer' + answerId);
	var questionDiv = $('question' + answerId);
	//answerDiv.style.display = (answerDiv.className == '') ? 'block' : 'none';
	questionDiv.className = (questionDiv.className == 'faqExpanded') ? '' : 'faqExpanded';
	answerDiv.className = (answerDiv.className == 'faqExpanded') ? '' : 'faqExpanded';
	hideAllAnswers(answerId);
	aExpandedAnswer = new Array();
	aExpandedAnswer.push(answerId);
}

function hideAllAnswers(chosenId)
{
	for(var i=0; i<aExpandedAnswer.length; i++) 
	{
		if(chosenId != aExpandedAnswer[i])
		{
			hideAnswer(aExpandedAnswer[i]);
		}
	}
}

function hideAnswer(answerId)
{
	var answerDiv = $('answer' + answerId);
	var questionDiv = $('question' + answerId);
	//answerDiv.style.display = 'none';
	answerDiv.className = '';
	questionDiv.className = '';
}

function toggleCategory(category, categoryId)
{
	var listElement = $(category + 'list');
	var readMoreDiv = $('readMore' + category);
	listElement.className = (listElement.className == 'faqCollapsedList') ? '' : 'faqCollapsedList';
	//readMoreDiv.childNodes[1].className = "collapse";
	//readMoreDiv.childNodes[1].innerHTML = (listElement.className == 'faqCollapsedList') ? '<span>Show all</span>' : '<span>Collapse</span>';
	if (listElement.className == 'faqCollapsedList') hideAllAnswers();
	
	for(var i=0; i<aExpandedCategory.length; i++) 
	{
		//hideCategory(aExpandedCategory[i]);
	}

	aExpandedCategory = new Array();
	aExpandedCategory.push(category); 
	//window.location.href = '#category' + categoryId;
}

function hideCategory(category)
{
	var readMoreDiv = $('readMore' + category);
	readMoreDiv.style.display = 'block';
}