
hs.graphicsDir = '/scripts/highslide/graphics/';
hs.outlineType = 'rounded-white';
hs.outlineWhileAnimating = true;
hs.allowSizeReduction = false;
hs.showCredits = false;
hs.captionEval = 'this.thumb.title';
hs.maxWidth = 900;
// 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;
		
		/*document.write('width: ' + mywidth);
		document.write('height: ' + myheight);
		document.write('winheight: ' + winheight);
		return;*/
		
		/*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 = mywidth;
			div.style.height = winheight;
			//div.style.border = '5px solid black';
			
			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: '+mywidth+'px; height: '+myheight+'px;">You need to upgrade your Flash Player</div>';
			
			document.body.appendChild(div);
		}

		var flashvars = {
			autostart: 'true',
			enablejs: 'true'
		}
		
		var params = {
		  file: '/'+file,
		  wmode: 'transparent'
		};

		var attributes = {};
		
		swfobject.embedSWF('/player/flvplayer.swf?file=/'+file, 'flash_'+id, mywidth, myheight, "9.0.0", "", flashvars, params, attributes);
		
		this.flashId = 'embed_'+id;
		
		
		/*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), {
			width: mywidth,
			height: winheight,
			contentId: 'content_'+id,
			allowSizeReduction: false
		});*/
		
		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('/player/flvplayer.swf?file=/'+file, this.flashId = 'embed_'+id, width, height, '7','#336699');
		player.addParam('file', '/'+file);
		player.addParam('wmode', 'transparent');
		player.addParam('allowfullscreen', 'false');
		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;
	}
};


