// JavaScript Document
function showhide(d) {
	if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
	else { document.getElementById(d).style.display = "none"; }
}

function show(d){
	document.getElementById(d).style.display = "block";
}

function hide(d){
	document.getElementById(d).style.display = "none";
}

function createSWF(folder) {

	var so = new SWFObject("flashgallery.swf", "gallery", "390", "370", "8"); // Location of swf file. You can change gallery width and height here (using pixels or percents).
	so.addParam("quality", "high");
	so.addParam("allowFullScreen", "true");
	so.addVariable("content_path","gallery/"+folder); // Location of a folder with JPG and PNG files (relative to php script) or a link to Flickr photostream (for example "http://www.flickr.com/photos/username/" or "http://www.flickr.com/photos/username/sets/setid/").
	so.addVariable("color_path","gallery.xml"); // Location of xml file with settings.
	so.addVariable("script_path","flashgallery.php"); // Location of php script (not requred if you work with Flickr).
	so.write("gallery");
	
}

function createYoutube(id) {

	var params = { allowScriptAccess: "always" };
    var atts = { id: "myytplayer" };
    var so = new SWFObject("http://www.youtube.com/v/"+id+"?enablejsapi=1&playerapiid=ytplayer", 
                       "ytapiplayer", "390", "370", "8", null, null, params, atts);
	so.addParam("quality", "high");
	so.addParam("allowFullScreen", "true");
	so.write("gallery");
	
}

function createSound(url) {


	var so = new SWFObject(url, "gallery", "390", "130", "8");
	so.addParam("quality", "high");
	so.addParam("allowFullScreen", "true");
	so.write("gallery");

}

