function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() 
		{
			if (oldonload) {
				oldonload();
		  	}
		  	func();
		}
	}
}	
	
function loadMovie(vid_src, vid_type, details) {
	var v = document.getElementById("video");
	
	if ( v.hasChildNodes() ) {
		while ( v.childNodes.length > 0 ) {
			v.removeChild( v.firstChild );       
		} 
	}
	
	var flashvars = {};
	flashvars.controlBarMode = "floating";
	flashvars.autoPlay = true;
	flashvars.backgroundColor = "#FFFFFF";
	flashvars.src = vid_src;

	
	var params = {};
	params.allowfullscreen = "true";
	params.allowscriptaccess = "always";
	
	var attributes = {};
	attributes.clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";
	
	
	swfobject.embedSWF("http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf", "video", "886", "384", "10.0.0", "http://www.twosmallblondes.com.au/wp-content/plugins/wp-swfobject/2.0/expressInstall.swf", flashvars, params, attributes);
	
	var desc = document.createElement("div");
	var title = document.createElement("p");
	title.className = "videoTitle";
	title.appendChild(document.createTextNode(details));
	desc.appendChild(title);

	var d = document.getElementById("details");
	if ( d.hasChildNodes() ) {
		while ( d.childNodes.length > 0 ) {
			d.removeChild( d.firstChild );       
		} 
	}
	
	d.appendChild(desc);
		
	
}

function onError() {
	var v = document.getElementById("video");
	
	var msg = document.createElement("p");
	var txt = document.creaetTextNode("Error loading video");
	
	msg.appendChild(txt);
	
	if ( v.hasChildNodes() ) {
		while ( v.childNodes.length > 0 ) {
			v.removeChild( v.firstChild );       
		} 
	}
	
	v.appendChild(msg);

}

