//             flash
 // ---------------------------------
function isFlash()
{
var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] )
{
	// Check for Flash version 5 or greater in Netscape
	var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=5)
		UseFlash = 1;
}
else if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
            navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1)
{
	UseFlash = 1;   // Assume any Windows IE except for Windows 3.1 supports the OBJECT tag
}
// Allow the cookie to override
if (document.cookie && (document.cookie.indexOf("FlashRenderOption=P") >= 0))       { UseFlash = 1; }
else if (document.cookie && (document.cookie.indexOf("FlashRenderOption=I") >= 0)) { UseFlash = 0; }
return UseFlash;
}
// --------------------------------------
function imgFlash5(ffile,fwidth,fhight,fbgcolor,fvspace,fhspace)
{
if ( isFlash())
{  // Use Flash player
   document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
   document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"');
   document.write(' ID='+ffile);
   if(fvspace!=0) document.write(' VSPACE='+fvspace);
   if(fhspace!=0) document.write(' HSPACE='+fhspace);
   if(fwidth<=0 || fhight<=0) document.write(' WIDTH=100% HEIGHT=100%>');
   else                             document.write(' WIDTH='+fwidth+' HEIGHT='+fhight+'>');
   document.write('<PARAM NAME=movie VALUE="SWF/'+ffile+'.swf"><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=high>');
   if(fbgcolor<0) document.write('<PARAM NAME=wmode VALUE=transparent>');
   else                document.write('<PARAM NAME=bgcolor VALUE=#'+fbgcolor+'> ');
   document.write('<EMBED src="SWF/'+ffile+'.swf" menu=false quality=high'); 
   if(fbgcolor<0) document.write(' wmode=transparent');
   else                document.write('bgcolor=#'+fbgcolor);
   document.write(' swLiveConnect=FALSE');
   if(fwidth<=0 && fhight<=0) document.write(' WIDTH=100% HEIGHT=100%');
   else                                document.write(' WIDTH='+fwidth+' HEIGHT='+fhight);
   document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
   document.write('</EMBED>');
   document.write('</OBJECT>');
}
else
{  if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0))
   {  // Netscape 2 will display the IMG tag below so don't write an extra one
      document.write('<IMG SRC="SWF/'+ffile+'.gif" usemap="#'+ffile+'" BORDER=0');
      if(fwidth==0 || fhight==0) document.write(' WIDTH=100% HEIGHT=100%>');
      else                          {   if(fwidth<0) fwidth = - fwidth;  if(fhight<0) fhight = - fhight;
                                         document.write(' WIDTH='+fwidth+' HEIGHT='+fhight+'>'); }
}  }
}
 // ---------------------------------

function SetCookieType(ctype)
{
document.cookie='FlashRenderOption='+ctype+';path=/;'
if ( navigator.appName.indexOf("Microsoft") != -1 )	parent.history.go(0);
else if ( navigator.userAgent.indexOf("Mozilla/2") != -1 )	parent.location = parent.location;
        else parent.location.reload();
}
 // ---------------------------------
//   inbuts
function imageButton(imageBeforeClick,imageBeforeClickOver,imageAfterClick,imageAfterClickOver)
{
  this.statusClick = 0;  // 0-noClick, 1-wasClick
  this.iBC  = imageBeforeClick;
  this.iBCO = imageBeforeClickOver;
  this.iAC  = imageAfterClick;
  this.iACO = imageAfterClickOver;
  this.change = changeImageButton;
}
function changeImageButton(name,typeAction)
{
  if(this.statusClick==0)
  { if(typeAction=="Over")    name.src=this.iBCO;
    if(typeAction=="Out")     name.src=this.iBC;
    if(typeAction=="Click") { name.src=this.iAC; this.statusClick=1; }
  }
  else
  { if(typeAction=="Over")  name.src=this.iACO;
    if(typeAction=="Out")   name.src=this.iAC;
    if(typeAction=="Click") name.src=this.iAC;
  }
}
//     HTML ------------------------------
function eqA(level,jclass,jname,jhref,jtitle,jtext) 
{ 
	this.level = level; this.jclass = jclass; this.jname = jname;
	this.jhref = jhref; this.jtitle = jtitle; this.jtext = jtext; 
}
//  genernumb  ----------------------------
function getrA(n,spanClass)
{ 
	var textA = ar[n].jtext;	if(spanClass != "") textA = '<span class="'+spanClass+'">'+ar[n].jtext+'</span>';
	var tclick = "";			if(ar[n].jclass == "BUTTON_A") tclick = "onMouseOver=b"+n+".change("+ar[n].jname+"Img,'Over') onMouseOut=b"+n+".change("+ar[n].jname+"Img,'Out') onClick=b"+n+".change("+ar[n].jname+"Img,'Click')";
	document.write('<a class="'+ar[n].jclass+'" name="'+ar[n].jname+'" href="'+ar[n].jhref+'" title="'+ar[n].jtitle+'" '+tclick+'>'+textA+'</a>');
}
//   text  --------------------------------
function ecat(ncat,jname,jtext,kol,imgk) 
{ 
	this.ncat = ncat; this.jname = jname; 
	this.jtext = jtext; this.kol = kol;  this.imgk = imgk;
}
