
hs.graphicsDir = '/libs/scripts/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.outlineWhileAnimating = true;
hs.allowSizeReduction = false;
hs.showCredits = false;
hs.captionEval = 'this.thumb.title';
// always use this with flash, else the movie will be stopped on close:
//hs.preserveContent = false; 


var videoWindow = 
{
	divs: {},
	running: false,
	show: function(id, file, name, width, height, movetext, closetext)
	{
		if (this.running) return;
		this.running = true;
		
		width = width || 640;
		height = height || 480;
		
		//winwidth = parseInt(width);
		winheight = parseInt(height) + 15;
		
		
		if (typeof this.divs[id] == 'undefined')
		{
			div = this.divs[id] = document.createElement('div');
			
			div.id = 'content_'+id;
			div.className = 'highslide-html-content';
			div.style.width = width+'px';
			div.style.height = winheight+'px';
			//div.style.border = 'none';
			
			div.innerHTML = '<div class="highslide-header"><ul><li class="highslide-move"><a>'+movetext+'</a></li><li class="highslide-close"><a href="#" onclick="videoWindow.hide(this, \''+id+'\'); return false;" class="control" style="color:#666">'+closetext+'</a></li></ul></div><div class="highslide-body" id="flash_'+id+'" style="background: #000; width: '+width+'px; height: '+height+'px;">You need to upgrade your Flash Player</div>';
			
			document.body.appendChild(div);
		}
		
		var player = new SWFObject('/libs/flvplayer.swf?file=/'+file, this.flashId = 'embed_'+id, width, height, '7','#336699');
		player.addParam('file', '/'+file);
		player.addParam('wmode', 'transparent');
		player.addVariable('autostart', 'true');
		player.addVariable('enablejs', 'true');
		
		player.write('flash_'+id);
		
		hs.htmlExpand(document.getElementById(id), {
			
			contentId: 'content_'+id,
			allowSizeReduction: false
		});
	},
	hide: function(el, id)
	{
		document.getElementById('embed_'+id).sendEvent('stop');
		document.getElementById('flash_'+id).innerHTML = '';
		hs.close(el);
		
		this.running = false;
	}
};

