	function vote(ideaId, stars){
		var req = new Request({
			method: 'post',
			url: '../ajx.php',
			onRequest: function() { /* __ */ },
			onComplete: function(response){
				var nrStars = response.substring(0, 1);
				
				/*
				for(var i = 1; i < 5; i++){
					if(i <= nrStars){
						$("star_" + ideaId + "_" + i).className = "active";
					}else{
						$("star_" + ideaId + "_" + i).className = "";
					}//if
				}//for
				*/
								
				$('star_'+ideaId).className = 'rating star'+nrStars;
				
				$("feedback_" + ideaId).innerHTML = response.substring(2, response.length);

				$("feedback_" + ideaId).fade('in');
				(function(){ $("feedback_" + ideaId).fade('out'); }).delay(5000);
				(function(){ $("feedback_" + ideaId).set('html', ""); }).delay(5500);
			}
		}).send('do=vote&id=' + ideaId + '&stars=' + stars);
	}//vote
	
	function isNumeric(strString){
		var strValidChars = "0123456789.-";
		var strChar;
		var blnResult = true;
		
		if (strString.length == 0) return false;
		
		for (i = 0; i < strString.length && blnResult == true; i++){
			strChar = strString.charAt(i);
			if(strValidChars.indexOf(strChar) == -1){
				blnResult = false;
			}//if
		}//for
		
		return blnResult;
	}//isNumeric
	
	function changeEmailContact(){
		if($("wedstrijdform_emaillid_1").value == ""){
			$("wedstrijdform_emaillid_1").value = $("wedstrijdform_email").value;
		}//if
	}//changeEmailContact
	
	function changeGroupSize(){
		var divHtml = '';
		
		if(isNumeric($("wedstrijdform_groepsgrootte").value)){
			if($("wedstrijdform_emaillid_1") && $("wedstrijdform_emaillid_1").value != ""){
				var val = $("wedstrijdform_emaillid_1").value;
			}else{
				var val = "";
			}//if
				
			divHtml = "<input type='text' class='large' id='wedstrijdform_emaillid_1' name='wedstrijdform_emaillid_1' value='" + val + "' />";
			
			for(var x = 2; x <= $("wedstrijdform_groepsgrootte").value; x++){
				if($("wedstrijdform_emaillid_" + x) && $("wedstrijdform_emaillid_" + x).value != ""){
					var val = $("wedstrijdform_emaillid_" + x).value;
				}else{
					var val = "";
				}//if
				
				divHtml += "<input type='text' class='large' style='margin: 2px 0 0 231px;' id='wedstrijdform_emaillid_" + x + "' name='wedstrijdform_emaillid_" + x + "' value='" + val + "' />";
			}//for
		}else{
			$("wedstrijdform_groepsgrootte").value = 1;
			
			divHtml = "<input type='text' class='large' id='wedstrijdform_emaillid_1' />";
		}//if
		
		$("wedstrijdform_emaillid_div").innerHTML = '<label>E-mailadressen groepsleden:</label>' + divHtml + '<div class="clearer"><!-- --></div>';
	}//changeGroupSize
	
	function changePriceCheck(){
		if($("wedstrijdform_prijs").checked){
			$("wedstrijdform_groepsfoto_div").setStyle("display", "block");
		}else{
			$("wedstrijdform_groepsfoto_div").setStyle("display", "none");
		}//if
	}//changePriceCheck
	
	function updateBeEuName(entryId){
		var req = new Request({
			method: 'post',
			url: '../ajx.php',
			onRequest: function() { /* __ */ },
			onComplete: function(response){ /* __ */ }
		}).send('do=howeuareyou_nameupdate&id=' + entryId + '&entry=' + escape($('share_name').value));
	}//updateBeEuName
	
	function updateBeEuMedium(rdb){
		if(rdb.value == 'link'){
			$("share_link_div").setStyle("display", "block");
			$("share_mail_div").setStyle("display", "none");
			$("share_face_div").setStyle("display", "none");
			
			$("share_link").focus();
		}//if
		
		if(rdb.value == 'mail'){
			$("share_link_div").setStyle("display", "none");
			$("share_mail_div").setStyle("display", "block");
			$("share_face_div").setStyle("display", "none");
		}//if
		
		if(rdb.value == 'facebook'){
			$("share_link_div").setStyle("display", "none");
			$("share_mail_div").setStyle("display", "none");
			$("share_face_div").setStyle("display", "block");
		}//if
	}//updateBeEuMedium
	
	function facebookShare(u, t){
		if(u == ''){
			u = location.href;
		}//if
		
		if(t == ''){
			t = document.title;
		}//if
		
		var width	= 626;
		var height	= 280;
		var popurl	= 'http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t);
		var hori 	= (screen.width - width) / 2;
		var vert 	= (screen.height - height) / 2;
		winpops		= window.open(popurl,"sharer","width=" + width + ",height=" + height + ",left=" + hori + ",top=" + vert + ",scrollbars=no,toolbar=0,status=0,")
		
		return false;
	}//facebookShare
	
	function scrollPhotoframe(direction, totWidth){
		var morph1 		= new Fx.Morph('fotoview1');
		var morph2 		= new Fx.Morph('fotoview2');
		
		var marginMove 	= parseInt($("fotoview1").getStyle("margin-left").substring(0, $("fotoview1").getStyle("margin-left").indexOf("px")));

		if(marginMove > 0){
			if(direction == 'left'){
				marginMove = (marginMove - 250) * -1;
			}else{
				marginMove = (marginMove + 250) * -1;
			}//if
		}else{
			if(direction == 'left'){
				marginMove = (marginMove + 250);
			}else{
				marginMove = (marginMove - 250);
			}//if
		}//if
		
		if(marginMove < - (totWidth - 250)){
			marginMove += 250;
		}//if
		
		morph1.start({
			'margin-left': marginMove
		});
		
		morph2.start({
			'margin-left': marginMove
		});
	}//scrollPhotoframe
	
	function like(ideaId){
		var req = new Request({
			method: 'post',
			url: '../ajx.php',
			onRequest: function() { /* __ */ },
			onComplete: function(response){
				if($("likecolumnright")){
					$("likecolumnright").innerHTML = "Vind ik leuk!";
				}//if
				
				if($("like_" + ideaId)){
					$("like_" + ideaId).innerHTML = "Vind ik leuk!";
				}//if
				
				if($("feedback_" + ideaId)){				
					$("feedback_" + ideaId).innerHTML = response;
				}//if
			}
		}).send('do=like&id=' + ideaId);
	}//like

