var compatible = (document.getElementById && document.getElementsByTagName && document.createElement);

if (compatible){
window.onload = init;
}

function init(){
	//checkOS();
	zetNoSpam();
}

function checkOS(){
	if (navigator.appVersion.indexOf("Mac")!=-1) return;
	document.title = "The Anacondas";
}

function checkForm(){
	if(document.getElementById('hoi').checked == true){
	document.forms[0].action="/surf/pivot/submit.php#message";
	document.forms[0].submit();
	}
	else{
		return;
	}
}

var nw = '';
nw += '<h2>Leave a comment</h2><p>Name<br /><input type="text" name="piv_name" class="commentinput " value="" /></p>';
nw += '<p>Email:<br /><input name="piv_email" type="text" class="commentinput " value="" /></p>';
nw += '<p>Website:<br /><input name="piv_url" type="text" class="commentinput " value="" /></p>';
nw += '<p>Aloha,<br /><textarea name="piv_comment" cols="40" rows="5" class="commentText"></textarea></p>';
nw += '<p><input type="checkbox" id="hoi" /> I am cool</p>';
nw += '<p><input type="button" onclick="checkForm()" name="post" value="Ride it" class="commentbutton" style="font-weight: bold;" /></p>';
nw += '<div class="divSub"> </div>';

function zetNoSpam(){
	var inNw = document.getElementById('reageer');
	if (!inNw) return;
	inNw.innerHTML = nw;
}
