/* --------------------- */
/* ISeeYou.be, versie 10 */
/* Project van RVTech.be */
/* --------------------- */


var poll = 3;
if (top.location != self.location) {
	top.location = self.location;
}
function verbergen(div) {
	if (document.getElementById(div).style.display != 'none' && document.getElementById(div).style.display != '') {
		document.getElementById(div).style.display = 'none';
	} else {
		document.getElementById(div).style.display = 'block';	
	}
}
function karakterteller(bericht, teller) {
	if (bericht.value.length > 250) { 
		bericht.value = bericht.value.substring(0, 250); 
	} else {
		teller.value = 250 - bericht.value.length;
	}
}
function ubb(knopnaam,openen,sluiten,css) {
	if (css == "Mister") { kleur1 = "#8fa3ef"; kleur2 = "rgb(143, 163, 239)"; } else { kleur1 = "#ed7fae"; kleur2 = "rgb(237, 127, 174)"; }
	if ((document.forms['form'].elements['knop_' + knopnaam].style.backgroundColor != kleur1) && (document.forms['form'].elements['knop_' + knopnaam].style.backgroundColor != kleur2)) {
		eval('document.form.knop_' + knopnaam + '.style.backgroundColor = kleur1');
		eval('document.form.bericht.value += "' + openen + '"');
		document.form.bericht.focus();
	} else {
		eval('document.form.knop_' + knopnaam + '.style.backgroundColor = "#F5F5F5"');
		eval('document.form.bericht.value += "' + sluiten + '"');
		document.form.bericht.focus();		
	}
}
function toevoegen(text) {
	 document.form.bericht.value += text;
	 document.form.bericht.focus();
}
function fotoklik(fotonaam){
	document.form.achtergrondafbeelding.value = fotonaam;	
}
function polls() {
	if (poll <= 10) {
		eval('document.getElementById("antwoord' + poll + '").style.display = "block"');
		poll++;
	}
}
function correctPNG() {
	for(var i=0; i<document.images.length; i++) {
		var img = document.images[i]
		var imgName = img.src.toUpperCase()
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
			var imgID = (img.id) ? "id='" + img.id + "' " : ""
			var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			var imgStyle = "display:inline-block;" + img.style.cssText 
			if (img.align == "left") imgStyle = "float:left;" + imgStyle
			if (img.align == "right") imgStyle = "float:right;" + imgStyle
			if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
			var strNewHTML = "<span " + imgID + imgClass + imgTitle
				+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
			img.outerHTML = strNewHTML
			i = i-1
		}
	}
}
window.attachEvent("onload", correctPNG);
function grootte() {
	var width = 550;
	for(i = 0; i < document.images.length; i++) {
		if(document.images[i].width > width)
			document.images[i].width = width;
	}
}
