/* printing */
function printArticle(articleUrl) {
	width = 618;
	height = 500;
	apWindow = window.open(articleUrl,'apWindow','width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=yes,menubar=yes,status=no,location=no,personalbar=no,directories=no,dependent=yes,resizable=no');
	apWindow.moveTo((screen.width - width)/2,(screen.height - height - 100)/2);
	apWindow.focus();
	apWindow.print();
}


/* polls */
function checkPoll(formID) {
	obj = getFormElement(formID,'oID');
	for (i=0; i<obj.length; i++) {
		if (obj[i].checked==true) return true;
	}
	return false;
}


function votePoll(pollID,pollSuffix) {
	if (checkPoll('s'+ pollID + pollSuffix +'_frm')==true) {
		advAJAX.submit(document.getElementById('s'+ pollID + pollSuffix +'_frm'), {
			onSuccess : function(obj) {
				document.getElementById('s'+ pollID + pollSuffix).innerHTML = obj.responseText;
			}
		});
	}
}