
function createFlashMovieOverlay(linkId,contentId,oFlash) {
	linkObject=document.getElementById(linkId);
	controller=API.frameControllers.New('frameControllerDummy','v2');
	scrollHeight=document.documentElement.scrollHeight;
	outerFrame=controller.addFrame();
	outerFrame.addEffect(new frameController_v2_fadeEffect(.5,50,0,80));
	outerFrame.attachEventById(linkId,'onclick','show');

	innerFrame=controller.addFrame();
	innerFrame.addEffect(new frameController_v2_slideEffect('width',1,75,0,640,function (step,increment) {if(step==100) return increment; return increment-Math.pow(increment,(100-step)/100);   }));
	innerFrame.addEffect(new frameController_v2_slideEffect('height',1,75,0,480,function (step,increment) {if(step==100) return increment; return increment-Math.pow(increment,(100-step)/100);   }));
	innerFrame.addEffect(new frameController_v2_slideEffect('margin-left',1,75,0,-320,function (step,increment) {if(step==100) return increment; return -(-increment-Math.pow(-increment,(100-step)/100));   }));
	innerFrame.addEffect(new frameController_v2_slideEffect('margin-top',1,75,0,-240,function (step,increment) {if(step==100) return increment; return -(-increment-Math.pow(-increment,(100-step)/100));   }));
	innerFrame.attachEventById(linkId,'onclick','show',2000);

	subFrame=controller.addFrame();
	subFrame.addEffect(new frameController_v2_slideEffect('margin-left',1,75,-320,320,function (step,increment) {if(step==100) return increment; return increment-Math.pow(increment,(100-step)/100);   }));
	subFrame.addEffect(new frameController_v2_slideEffect('margin-top',1,75,-240,240,function (step,increment) {if(step==100) return increment; return increment-Math.pow(increment,(100-step)/100);   }));
	subFrame.attachEventById(linkId,'onclick','show',2000);

	object=document.createElement('div');
	subFrame.setContainer(object);
	object.style.display='none';
	//object.style.backgroundColor=oFlash.bgcolor;
	object.className='flashmovie';



	controller.Load();


	innerFrame.container.appendChild(object);

	flashDecoy=document.createElement('div');
	//flashDecoy.style.backgroundColor='white';
	flashDecoy.style.height=oFlash.height+'px';
	flashDecoy.style.width=oFlash.width+'px';
	object.appendChild(flashDecoy);
	/*
	objTmp=object;
	objTmp.innerHTML=oFlash.getHtml();
	object=objTmp;
	*/

	closeButton=document.createElement('a');
	closeButton.innerHTML='<img src="style/verder/images/close.gif">';
	//closeButton.src=;
	closeButton.style.position='absolute';
	closeButton.style.right="5px";
	closeButton.style.top="5px";
	closeButton.style.zIndex=12;
	closeButton.style.display='none';
	closeButton.style.cursor='pointer';
	closeButton.id='flashClose';
	innerFrame.container.appendChild(closeButton);

	outerFrame.attachEvent(closeButton,'onclick','hide');
	innerFrame.attachEvent(closeButton,'onclick','hide');
	subFrame.attachEvent(closeButton,'onclick','hide');

	eventObj=closeButton.eventHandler.attachEvent('onclick',function() { this.flashContainer.innerHTML='';this.flashContainer.appendChild(this.flashDecoy);this.closeButton.style.display="none"; });
	eventObj.flashContainer=object;
	eventObj.flashDecoy=flashDecoy;
	eventObj.closeButton=closeButton;

	eventObj=linkObject.eventHandler.attachEvent('onclick',function() { this.flashContainer.innerHTML=this.flashObject.getHtml();this.closeButton.style.display="inline"; });
	eventObj.flashContainer=object;
	eventObj.flashObject=oFlash;
	eventObj.closeButton=closeButton;

	object=outerFrame.container;
	object.style.display="none";
	object.style.position='absolute';
	object.style.left='0px';
	object.style.top='0px';
	object.style.width=document.documentElement.scrollWidth+'px';
	object.style.height=document.documentElement.scrollHeight+'px';
	object.style.zIndex=10;
	object.style.backgroundColor='white';

	object=innerFrame.container;
	object.className='wrapper';
	object.style.zIndex=11;
	var flashController=controller;
}