var winWidth = 800;
var winHeight = 800;
if( screen ){
   winWidth = screen.width;
   winHeight = screen.height;
}
function popupFull(path){
	newWindow = window.open(path,'winFull','toolbar=no,location=no,scrollbars=yes,resizable=yes,width='+winWidth+',height='+winHeight+',left=0,top=0');
	newWindow.focus();
}
function popupFullHeight(path,w){
	var left=(winWidth-w)/2;
	newWindow = window.open(path,'winFullHeight','toolbar=no,location=no,scrollbars=yes,resizable=yes,width='+w+',height='+winHeight+',left='+left+',top=0');
	newWindow.focus();
}
function popupSmall(path,w,h){
	var left=(winWidth-w)/2;
	var top=(winHeight-h)/2;
	newWindow = window.open(path,'winSmall','toolbar=no,location=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+',left='+left+',top='+top+'');
	newWindow.focus();
}
// Filetree
var active = 0;
function showDiv(id){
	//if(active==id && document.getElementById('pdf'+id).style.display != 'block')
	if(active>0){
		document.getElementById('pdf'+active).style.display='none';
		document.getElementById('group'+active).className='groupblock';
		if(active==id){ active = 0; return; }
	}
	document.getElementById('pdf'+id).style.display='block';
	document.getElementById('group'+id).className='groupblockAktiv';
	active = id;
	return;
}
function setReadMore(){
	var doc = document.all || document.getElementsByTagName('span');
	var len = doc.length;
	for(var x=0; x<len; x++){
		var elm = doc[x];
		if(elm.className!='linkMehr')continue;
		else var tit = elm.title;
		elm.title='';
		elm.innerHTML=' <a href="'+tit+'">mehr &raquo;</a> ';
	}
	return;
}

function changeVideo( y, w, h ){
	var str = '<object width="'+w+'" height="'+h+'">';
	str += '<param name="movie" value="http://www.youtube.com/v/'+y+'"></param>';
	str += '<embed src="http://www.youtube.com/v/'+y+'" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>';
	document.getElementById('video').innerHTML = str;
	return false;
}

