function fontResize(sizeVar) {
	bodyElem = document.getElementsByTagName("body").item(0);
	bodyCurFontSize = parseInt(bodyElem.style.fontSize);
	bodyNewFontSize = bodyCurFontSize + sizeVar;
	if (bodyNewFontSize>150) bodyNewFontSize=150;
	if (bodyNewFontSize<50) bodyNewFontSize=50;
	bodyElem.style.fontSize=bodyNewFontSize + "%";
	var date = new Date();
	date.setTime(date.getTime()+(365*24*60*60*1000));
	var expires = date.toGMTString();
	document.cookie ='76uhih960yjk='+bodyNewFontSize+'; expires='+expires+'; path=/';
}



function fontSizeLoad() {
	var name = "76uhih960yjk";
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0)  {
			bodyElem = document.getElementsByTagName("body").item(0);
			bodyNewFontSize = c.substring(nameEQ.length,c.length);
			bodyElem.style.fontSize=bodyNewFontSize + "%";			
		}
	}

}

function validateAnswers(jsPageNum, jsQstnNum) {
	var ansFlag = 0;
	if (jsPageNum==3) { //pages wth radio buttons
		for (a=0; a<document["questions" + jsPageNum].p2q0.length; a++) { 
			if (document["questions" + jsPageNum].p2q0[a].checked) {
				ansFlag++;
			} //if
		} //for	
	} else { //pages with checkboxes
		for (a=0; a<jsQstnNum; a++) { 
			if (eval("document.questions"+jsPageNum+".p"+(jsPageNum-1)+"q"+a+".checked==true")) {
				ansFlag++;
			} //if
		} //for
	} //if

	if (ansFlag==0) {
		alert("To properly use Snapshot, please check at least one answer on this page"); 
		return false;
	} //if
	return true;
}


// Added 2008.06.26 by f. strube for subscribe form submission
function register( theForm ) {
	theForm = $(theForm);
	var success = false;
	var theRequest = theForm.get( 'send' );
	theForm.set('send',{url:'../register-ajax.php', method: 'post', async: false });
	theForm.get('send').onSuccess = function( responseText, responseXML ) {
		if ( responseText == "OK" ) {
			success = true;
		} else {
			alert( responseText );
		}
	}
	theForm.send();
	return success;
}
