
function koomkoom_pop(){
					$(".openflv").click(function(event){
							event.preventDefault();
							//read the filename
							var theMovie = $(this).attr('title');
							var akray=parseInt(Math.random()*99999999);
							var flashvars = {
							movie: theMovie
							};
							var params = {
							scale: "noscale",
							wmode: "transparent",
							allowfullscreen: "true"
							};

							var attributes = {
							id: "koomkoom.com_player",
							name: "koomkoom.com_player"
							};
							swfobject.embedSWF("koomkoom_player.swf?rand="+ akray, "innerflash", "640", "400", "9.0.0",false, flashvars, params, attributes);
							//Get the screen height and width
							var hideHeight = $(document).height();
							var hideWidth = $(window).width();

							//Set heigth and width to hide to fill up the whole screen
							$('#hidepop').css({'width':hideWidth,'height':hideHeight,'top':'0px','left':'0px'});
							//transition effect
							$('#hidepop').fadeIn(1000);
							$('#hidepop').fadeTo("slow",0.8);
							
							//restore size of the pop
							$('#pop').css('height', '400px' );
							$('#pop').css('width', '640px');
							
							//var winH = $(window).height();
							var winH = $(window).height();
							var winW = $(window).width();
							//Set the popup window to center
							var poptop = winH/2-$('#pop').height()/2;
							var popleft = winW/2-$('#pop').width()/2;

							if(($.browser.msie) && ($.browser.version.substring(0,1) ==6)){
								$('#pop').css('top', '60px' );
								$('html, body').animate({scrollTop:0}, '1000');
								//this is for naughty ie6 bustard!!! unlike normal browsers - it will scroll to the top
							}else{
								$('#pop').css('position', 'fixed' );
								$('#pop').css('top', poptop );
							}

							$('#pop').css('left', popleft);
							var bttop = poptop;
							var btleft = popleft-275;
							
							//add a close Button
							$('#pop').append('<div id="closebutton"><img src="../images/closebutton.png"/></div><div id="closelink">סגור את החלון</div>');
							$('#closebutton').css({'position':'absolute','top':'50%','left':'50%','margin-top':'-222px','margin-left':'-343px'});
							$('#closelink').css({'text-align':'center','font-size':'12px','color':'#CCCCCC'});
							
							$('#hidepop').click(function () {
								$(this).hide();
								//$('#pop').hide();
								$('#koomkoom.com_player').remove();
								$('#pop').replaceWith('<div id="pop"><div id="innerflash"></div></div>');
							});
							
							$("#closebutton , #closelink").click(function (e) {
								//Cancel the link behavior
								e.preventDefault();
								$('#hidepop').hide();
								$('#koomkoom.com_player').remove();
								$('#pop').replaceWith('<div id="pop"><div id="innerflash"></div></div>');
							});
				});
};

