var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;//ie6 of lager als true

function centreerme() {
offsetheight = 0;
if(window.innerHeight) {
	iwidth = window.innerWidth;
	iheight = window.innerHeight;
} else {
if(document.body.clientHeight) {
	iwidth = document.body.clientWidth;
	iheight = document.body.clientHeight;
}
}
if(iwidth<=1028) {
	document.write("<style>#main {width:995px;} </style>");
}
if(iheight<=681) {
	offsetheight = Math.round(iheight/-2);
	document.write("<style>#main {height:"+iheight+"px;top:"+offsetheight+"px;} </style>");
	document.write("<style>body {background-position: top center;} </style>");
} else {
	document.write("<style>#main {height:681px;overflow-y:auto;}</style>");
}
}

function pngme(focus) {
if(!IE6) {
	document.getElementById("logo").src = "images/sportplazaclub_logo.png";
	if(focus=="wordlid") {document.getElementById("button_wordlid").src = "images/button_wordlid_focus.png";} else {document.getElementById("button_wordlid").src = "images/button_wordlid.png";}
	if(focus=="acties") {document.getElementById("button_acties").src = "images/button_acties_focus.png";} else {document.getElementById("button_acties").src = "images/button_acties.png";}
	if(focus=="faciliteiten") {document.getElementById("button_faciliteiten").src = "images/button_faciliteiten_focus.png";} else {document.getElementById("button_faciliteiten").src = "images/button_faciliteiten.png";}
	if(focus=="programmas") {document.getElementById("button_programmas").src = "images/button_programmas_focus.png";} else {document.getElementById("button_programmas").src = "images/button_programmas.png";}
	if(focus=="senioren") {document.getElementById("button_senioren").src = "images/button_senioren_focus.png";} else {document.getElementById("button_senioren").src = "images/button_senioren.png";}
	if(focus=="openingstijden") {document.getElementById("button_openingstijden").src = "images/button_openingstijden_focus.png";} else {document.getElementById("button_openingstijden").src = "images/button_openingstijden.png";}
	if(focus=="tarieven") {document.getElementById("button_tarieven").src = "images/button_tarieven_focus.png";} else {document.getElementById("button_tarieven").src = "images/button_tarieven.png";}
	if(focus=="contact") {document.getElementById("button_contact").src = "images/button_contact_focus.png";} else {document.getElementById("button_contact").src = "images/button_contact.png";}
	if(focus=="hoegezond") {document.getElementById("button_hoegezond").src = "images/button_hoegezond_focus.png";} else {document.getElementById("button_hoegezond").src = "images/button_hoegezond.png";}
	document.getElementById("button_links").src = "images/button_links.png";
}
}

function focussen(naam) {
if(document.images) {
	imgurl = document.images[naam].src;
	l = imgurl.length;
	document.images[naam].src = imgurl.substr(0,l-4)+"_focus"+imgurl.substr(l-4,4);
}
}

function outfocussen(naam) {
if(document.images) {
	imgurl = document.images[naam].src;
	l = imgurl.length;
	document.images[naam].src = imgurl.substr(0,l-10)+imgurl.substr(l-4,4);
}
}

function emailvalidation(entered) {
with (entered) {
value = value.replace(" ","");
apos=value.indexOf("@"); 
dotpos=value.lastIndexOf(".");
lastpos=value.length-1;
if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) {
	return false;
	}
else {
	return true;
	}
}
}

