	Patroon.Helper.commentFFDate = function(dString) {
		//date is in the form 2008-12-26T17:13:26Z
		var regexp = /(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/;  
		var d = dString.match(regexp);
		
		if (d) {  
			var offset = 0;  
   
			var year = d[1];
			year = year.substr(2);
			
			var month = new Number(d[3]);
			
			var day = new Number(d[5]);
			
			var h = new Number(d[7]);
			
			var m = new Number(d[9]);
			
			if (d[13] != 'Z') {  
				offset = (d[15] * 60) + parseInt(d[17]);  
				offset *= ((d[14] == '-') ? -1 : 1);  
				h - offset;  
			}  
			//we're GMT + 1...i think 
			h++;
			
			return day+"/"+month+"/"+year+" "+h+":"+m;
		} else {  
    		return null;
  		}  
   
	
	
	}
	
	Patroon.Helper.createImage = function(src,width,height,styleSheet,alt,title) {
	    if (src) {
	        var img = document.createElement("img");

	        if (width || width === 0) {
	            img.width = width;
	            //the following is for IE6
	            img.style.width = width;
	        }
	        if (height || height === 0) {
	            img.height = height;
	            //IE 6
	            img.style.height = height;
	        }
	        if (styleSheet) {
	            img.className = styleSheet;
	        }
	        if (alt) {
	            img.alt = alt;
	        }
	        if (title) {
	            img.title = title;
	        }

			//TODO asynchonous: test browsers
			/*
				setTimeout(function() {
					img.src = src;
				},1);
			
			*/     
	        img.src = src;
	        
	        return img;
	    }
	    return "";
	};
	
	Patroon.Helper.youtube = function(url,maxW,maxH) {
		var w = 425; //480
    	var h = 344; //295
    	
    	if (maxW && maxW < w) {
    		h = (maxW*h)/w
    		w = maxW;
    	}
    	if (maxH && maxH < h) {
    		w = (maxH*w)/h
    		h = maxH;
    	}
	
	 
	 	if(url.indexOf("watch?") > -1) {
	 		url = url.replace("watch?","");
	 		url =  	url.replace("=","/");
	 	}
	    	
	       	
	    var embedTag = document.createElement("embed");
	    embedTag.height = h;
	    embedTag.width = w;
	    embedTag.allowfullscreen = "true";
	    embedTag.allowscriptaccess = "always";
	    embedTag.type = "application/x-shockwave-flash";
	    embedTag.src = url;
		return embedTag;
	    	
	    	
	}