// use swfobject to specify required version of flash for planetfoss pages
//   this version is required for the flash uploader component
// alert( swfobject.getFlashPlayerVersion().release );
swfobject.registerObject("indexSwf", "9.0.45");

/* FUNCTIONS FOR LIGHTBOX FROM FLASH */
function openTutorial() {
	//alert('open tutorial');	
	var caption = "PlanetFOSS Tutorial";
	var url ="flvplayer.swf?appName=deltaedu&streamName=FOSS/Planet_FOSS/PlanetFOSS&serverName=flash.streamingmediahosting.com&skinName=flvplayer_skin&autoPlay=true&autoRewind=true&bufferTime=2&moviename=flvplayer.swf";
	var width = 640;
	var height = 480;
	//alert('calling swfdelegate');
	SWFDelegate(url,width,height,caption);
}

function SWFDelegate(url,width,height,caption) {
	//alert('swfdelegate');
	var objLink = document.createElement('a');
	//alert('one');
	objLink.setAttribute('href',url);
	//alert('two');
	objLink.setAttribute('rel','lightbox');
	//alert('three');
	objLink.setAttribute('title',caption);
	//alert('four');
	if(typeof width != 'undefined') {
		objLink.setAttribute('width',width);
	}
	if(typeof height != 'undefined') {
		objLink.setAttribute('height',height);
	}
	//alert("STARTING LIGHTBOX");
	Lightbox.prototype.start(objLink);
	//alert("ENDING LIGHTBOX");
}

	
function sharePhotos() {
	location.href = "form.php";
}

function viewPhotos() {
	location.href = "../search/photo_search.php#/"+modid;
}
	
function howTo() {
	//alert('open tutorial');	
	var caption = "PlanetFOSS Tutorial";
	var url ="flvplayer.swf?appName=deltaedu&streamName=FOSS/Planet_FOSS/PlanetFOSS&serverName=flash.streamingmediahosting.com&skinName=flvplayer_skin&autoPlay=true&autoRewind=true&bufferTime=2&moviename=flvplayer.swf";
	var width = 640;
	var height = 480;
	//alert('calling swfdelegate');
	SWFDelegate(url,width,height,caption);
}