// JavaScript Document
/*
function addTopic(sku){	
	winwidth=500;
	winheight=365;
	wposx=(screen.width-500)/2;
	wposy=(screen.height-525)/2;
	file =  H_PATH + '/modules/forum/addTopic.php?sku=' + sku ;
	popupWin = window.open(file, "addTopic", "status=no,resizable=no,toolbar=no,scrollbars=yes,screenX=" + wposx + ",screenY=0,left=" + wposx + ",top=" + wposy + ",width=" + winwidth + ",height=" + winheight);
	popupWin.focus();
}
function addComment(topicId){	
	winwidth=500;
	winheight=365;
	wposx=(screen.width-500)/2;
	wposy=(screen.height-525)/2;
	file =  H_PATH + '/modules/forum/addComment.php?topicId=' + topicId ;
	popupWin = window.open(file, "addComemnts", "status=no,resizable=no,toolbar=no,scrollbars=yes,screenX=" + wposx + ",screenY=0,left=" + wposx + ",top=" + wposy + ",width=" + winwidth + ",height=" + winheight);
	popupWin.focus();
}*/

function checkAbuseValues(frm){
	//alert(frm.innerHTML);
	var chks = frm.elements['abusecheck[]'];
	var hasChecked = true;
	for (var i=0;i<chks.length;i++){
		if(chks[i].checked){
			hasChecked = false;
			break;
		}
	}
	if(hasChecked){
		alert("Please select the reason(s) that best describe your complaint.");
		chks[0].focus();
		return false;	
	}
	return true;
}

function reportAbuse(id){
	var srcElement = document.getElementById(id);
	isDisplayed = srcElement.style.display;
	if( isDisplayed =="" || isDisplayed =="none"){
		 srcElement.className = "abuseFrmNew";
		srcElement.style.display = 'block';
	}else{
		srcElement.style.display = 'none';
	}
}

function voteToComment(comtID,topicID){
	
	document.frmComtList.mode.value ="VOTE";
	document.frmComtList.comtId.value =comtID;
	document.frmComtList.topicId.value =topicID;
	document.frmComtList.submit();
}
