﻿function zoomVideo(zoom, divid, swfid, smallvideo, bigvideo, preview) {
	var myheight;
	var mywidth;
	var autostart = false;

	if(zoom == 'zoom'){
		mywidth = 522;
		myheight = 435;
		document.getElementById(divid).style.width = '522px';
		
		var flashvars = {
			file:bigvideo,
			image:preview,
			autostart:autostart,
			width:mywidth,
			height:myheight,
			clickTag:"javascript:zoomVideo('unzoom', '"+ divid +"', '"+ swfid+"', '"+ smallvideo+"', '"+bigvideo+"', '"+preview+"');",
			iszoomed:'true',
			autostart:'false',
			showzoom:'true'
		};
		var params = {
			wmode : "transparent",
			allowfullscreen : "true"
		};
		var attributes = {};
	}

	if(zoom == 'unzoom'){
		mywidth = 240;
		myheight = 200;
		document.getElementById(divid).style.width = '240px';
		var flashvars = {
			file:smallvideo,
			image:preview,
			autostart:autostart,
			width:mywidth,
			height:myheight,
			clickTag:"javascript:zoomVideo('zoom', '"+ divid+"', '"+ swfid+"', '"+ smallvideo+"', '"+bigvideo+"', '"+preview+"');",
			iszoomed:'false',
			autostart:'false',
			showzoom:'true'
		};
		var params = {
			wmode : "transparent",
			allowfullscreen : "true"
		};
		var attributes = {};
	}
	
	swfobject.embedSWF("/swf/flv/flvplayer.swf", swfid, mywidth, myheight, "8.0.0", "expressInstall.swf", flashvars, params, attributes);

}

function zoomVideoWide(zoom, divid, swfid, smallvideo, bigvideo, preview) {

	var myheight;
	var mywidth;
	var autostart = false;
	
	if(zoom == 'zoom'){
		 
		mywidth = 522;
		myheight = 317;
		document.getElementById(divid).style.width = '522px';
		
		var flashvars = {
			file:bigvideo,
			image:preview,
			autostart:autostart,
			width:mywidth,
			height:myheight,
			clickTag:"javascript:zoomVideo('unzoom', '"+ divid +"', '"+ swfid+"', '"+ smallvideo+"', '"+bigvideo+"', '"+preview+"');",
			iszoomed:'true',
			autostart:'false',
			showzoom:'true'
		};
		var params = {
			wmode : "transparent",
			allowfullscreen : "true"
		};
		var attributes = {};	 
	}
	if(zoom == 'unzoom'){
		mywidth = 240;
		myheight = 155;
		document.getElementById(divid).style.width = '240px';
		var flashvars = {
			file:smallvideo,
			image:preview,
			autostart:autostart,
			width:mywidth,
			height:myheight,
			clickTag:"javascript:zoomVideo('zoom', '"+ divid+"', '"+ swfid+"', '"+ smallvideo+"', '"+bigvideo+"', '"+preview+"');",
			iszoomed:'false',
			autostart:'false',
			showzoom:'true'
		};
		var params = {
			wmode : "transparent",
			allowfullscreen : "true"
		};
		var attributes = {};
	}
	
	swfobject.embedSWF("/swf/flv/flvplayer.swf", swfid, mywidth, myheight, "8.0.0", "expressInstall.swf", flashvars, params, attributes);
}
