var surveyCurrent;
var hasCSS = false;

function checkCSS() {
	var testDiv = document.createElement("div");
	document.body.appendChild(testDiv);
	testDiv.style.visibility = "hidden";
	testDiv.style.width = "5px";
	testDiv.style.margin = "0px";
	testDiv.style.padding = "5px";
	var testDivWidth = testDiv.offsetWidth;
	if (testDivWidth != 15)
		hasCSS = false;
	else
		hasCSS = true;
	document.body.removeChild(testDiv);
}
function surveyInit() {
	checkCSS();
	if (hasCSS) {
		document.getElementById("control").type = "button";
		surveyCurrent = 2;
		for (var i = 3; i < 14; i++)
		surveyHide(i);
	}
}
function surveyHide(pageIn) {
	document.getElementById("s" + pageIn).style.display = "none";
}
function surveyShow(pageIn) {
	document.getElementById("s" + pageIn).style.display = "block";
}
function surveyNext() {
	if (hasCSS) {
		if (surveyCurrent == 13) {
			document.getElementById("control").style.visibility = "hidden";
			document.data.submit();
		}
		else {
			surveyHide(surveyCurrent);
			surveyCurrent = surveyCurrent + 1;
			surveyShow(surveyCurrent);
		}
	}
}