function openDyn(elem, filler, w, h, videourl,videotext){

		this.elem = document.getElementById(elem);
		this.filler = document.getElementById(filler);
		this.elemWidth = w+40;
		this.elemHeight = h+40;	
		this.offPosX = this.elemWidth / 2;
		this.offPosY = this.elemHeight / 2;
		
		var scrOfY;
		var leftpos;
		var Ypos;
		
		scrOfY = 0;
 			if( typeof( window.pageYOffset ) == 'number' ) {
   				 scrOfY = window.pageYOffset;
  			} else if( document.body && ( document.body.scrollTop ) ) {
   				 scrOfY = document.body.scrollTop;
 			 } else if( document.documentElement && ( document.documentElement.scrollTop ) ) {
    			scrOfY = document.documentElement.scrollTop;
  			}

 		if (navigator.appName.indexOf("Microsoft")!=-1) {
			iw = document.body.clientWidth;
			ih = document.body.clientHeight;
			leftpos = document.body.clientWidth / 2 - this.offPosX;
			Ypos = document.body.clientHeight / 2 - this.offPosY;
		}else{
			iw = window.innerWidth;
			ih = window.innerHeight;
			leftpos = window.innerWidth / 2 - this.offPosX;
			Ypos = window.innerHeight / 2 - this.offPosY;
		}
		
		Ypos = Ypos + scrOfY;
				
		this.elem.style.top=Ypos+'px';
 		this.elem.style.left=leftpos+'px';
 		
		this.elem.style.height = this.elemHeight + 'px';
		this.elem.style.width = this.elemWidth + 'px';
		
		this.elem.style.display='';
		this.filler.style.display='';
					
		var so = new SWFObject("http://verkkokirkko-production.abako.fi/flashplayer/vkplayer09.swf", "FLVPlayer", w, h, "8", "#FFFFFF");
		so.addVariable("flashVarContent", videourl);
		so.addParam("allowFullScreen", "true");
		so.addParam("allowScriptAccess", "sameDomain");
		so.addParam("wmode", "transparent");
		so.addVariable("flashVarSkin", "http://verkkokirkko-production.abako.fi/flashplayer/SkinUnderPlayStopSeekFullVol.swf");
		so.write(elem);
		
		//try {
			var containerdiv;
			containerdiv = document.createElement('div');
			containerdiv2 = document.createElement('div');
			containerdiv.setAttribute('class','video_header');
			containerdiv.setAttribute('id','vHeader');		
			containerdiv.appendChild(containerdiv2);
			this.elem.insertBefore(containerdiv,this.elem.firstChild);
			
			document.getElementById("vHeader").onclick=function(){
				closeDyn(elem, filler);
			}	 
			
			//} catch(e) { }
}
	
function closeDyn(elem, filler) {	
	this.elem = document.getElementById(elem);
	this.filler = document.getElementById(filler);	
	this.elem.style.display='none';
	this.filler.style.display='none';
	this.elem.innerHTML='';
}
	
function openradio(urli,navi) {
	 radiowindow = window.open(urli,'radiowindow','menubar=1,resizable=1,width=170,height=150');
	 radiowindow.focus();
}