if (!docWin) var docWin = null;
function DocumentWindow( AnchorObject, w, h )
{
    var DocumentFilePath = AnchorObject.href;
    if (!w)       var w = 550;
    if (!h)       var h = 400;
    w+=20; h+=20;

    if (docWin && !docWin.closed) docWin.close();
    WinFeatures  = "width="+w+",height="+h+",toolbar=no,location=no,directories=no,status=no,statusbar=no,menubar=no,resizable=yes,scrollbars=no";
    docWin       = window.open( DocumentFilePath, "DocumentWindow", WinFeatures );
    docWin.title = AnchorObject.title;
    if (!docWin.opener) docWin.opener = self;

    leftPos = (screen.width / 2) - ( w / 2);
    topPos  = (screen.height / 2) - ( h / 2) - 60;
    docWin.moveTo( leftPos, topPos );
    docWin.focus();

    return true;
}

function flash(file,width,height,flashvars,winmode,id,classs,alternative) {

	var shockmode = false;
	if(id!=''){
		id=' id="'+id+'"';
	}
	if(classs!=''){
		classs=' class="'+classs+'"';
	}
	var mimetype = 'application/x-shockwave-flash';

	if (navigator.mimeTypes) {
		if (navigator.mimeTypes[mimetype] != null) {
			if (navigator.mimeTypes[mimetype].enabledPlugin != null) {
				shockmode = true;
		      }
		}
	}
	if (!shockmode && navigator.appVersion.indexOf('MSIE') !=-1) {
		shockmode = true;
	}
	if (shockmode) {
		document.write('<object'+id+' type="application/x-shockwave-flash" data="'+file+'"'+classs+' width="'+width+'" height="'+height+'">');
		document.write('<param name="movie" value="'+file+'" />');
		document.write('<param name="menu" value="false" />');
		document.write('<param name="wmode" value="'+winmode+'" />');  
		if(flashvars!=''){
			document.write('<param name="flashvars" value="'+flashvars+'" />');
		}
		document.write(alternative);
		document.write('</object>');
	}
	else {
		document.write(alternative);
	}
}

// Otevreni pop up okna - dokument
var docWin=null;
function DocOpen(DocName,w,h,idw) //DocName - jmeno souboru,w - sirka,h - vyska,idw - identifikator okna
{
	if (!idw) cesta = "Radegast";		//def hodnota
	 w+=2; h+=2;
	winFeatures="width="+w+",height="+h+",toolbar=no,location=no,"+
	"directories=no,status=no,menubar=no,resizable=no,scrollbars=no";
	docWin = "";
	docWin = window.open(DocName, idw, winFeatures);
	window.open(DocName, idw, winFeatures);
}



