////////////////////////////////////////////////////////////////////////////////////
//
//     ValdoPopLib_Rodykle.js Audiniams
//
////////////////////////////////////////////////////////////////////////////////////

window.onerror=null;

var P_SpanPad='0px';
var P_SpanBord='0px';
var P_SpanMarg='0px';
var P_SpanVis='hidden';
var P_SpanPos='absolute';
var P_SpanTop='0px';
var P_SpanLeft='0px';
var P_SpanTxtCol='#FFFFFFF';
var P_SpanBgCol='#EEFDF2';

var P_CellPad=4;
var P_CellSpace=0;
var P_TableBord=1;

var P_TxtSize=2;
var P_TxtCol='#604040';
var P_TxtFace="'MS Sans serif'";

////////////////////////////////////////////////////////////////////////////////////

function AudPopParams(nr,DivWidth,DivHeight,Txt)
{
  PopParams(nr,DivWidth,DivHeight,Txt,P_TxtCol,P_SpanBgCol);
}

function PopParams(nr,DivWidth,DivHeight,Txt,Txtcol,col)
{
  if ( document.layers )
  {
    PopNeParams(nr,DivWidth,DivHeight,Txt,Txtcol,col);
  }
  else
  {
    if ( document.all )
    {
      PopIeParams(nr,DivWidth,DivHeight,Txt,Txtcol,col);
    }
    else
    {
      if ( document.getElementById )
      {
        PopDomParams(nr,DivWidth,DivHeight,Txt,Txtcol,col);
      }
    }
  }
}

function PopIeParams(nr,DivWidth,DivHeight,Txt,Txtcol,col)
{
  var str;
  var IDname='d'+nr; 

  str="<SPAN ID="+IDname+" ";

  str=str+"STYLE='position:"+P_SpanPos+"; width:"+DivWidth+"; height:"+DivHeight+"; padding:"+P_SpanPad+"; color:"+P_SpanTxtCol+"; margin:"+P_SpanMarg+"; border:"+P_SpanBord+"; visibility:"+P_SpanVis+"; z-index:"+nr+"; left:"+P_SpanLeft+"; top:"+P_SpanTop+"; ";

  if ( col ) str=str+"background-color:"+col+" ";

  str=str+"'>";  
  str=str+"<CENTER>";

  str=str+"<TABLE WIDTH="+DivWidth+" HEIGHT="+DivHeight+" border="+P_TableBord+" cellPadding="+P_CellPad+" cellSpacing="+P_CellSpace+">";

  str=str+"<TR><TD align=left>";
//  str=str+"<FONT FACE="+P_TxtFace+" size="+P_TxtSize+" color="+Txtcol+">";

  if ( Txt!=null) str=str+Txt+"<br>";

  str=str+"</FONT>";
  str=str+"</TD></TR>"; 

  str=str+"</TABLE>"; 

  str=str+"</CENTER></SPAN>";

  document.write(str);  
}


function PopDomParams(nr,DivWidth,DivHeight,Txt,Txtcol,col)
{
  var str;
  var IDname='d'+nr; 
  
  str="<SPAN ID="+IDname+" ";

  str=str+"STYLE='position:"+P_SpanPos+"; width:"+DivWidth+"; height:"+DivHeight+"; padding:"+P_SpanPad+"; color:"+P_SpanTxtCol+"; margin:"+P_SpanMarg+"; border:"+P_SpanBord+"; visibility:"+P_SpanVis+"; z-index:"+nr+"; left:"+P_SpanLeft+"; top:"+P_SpanTop+"; ";

  if ( col ) str=str+"background-color:"+col+" ";

  str=str+"'>";  
  str=str+"<CENTER>";

  str=str+"<TABLE WIDTH="+DivWidth+" HEIGHT="+DivHeight+" border="+P_TableBord+" cellPadding="+P_CellPad+" cellSpacing="+P_CellSpace+">";

  str=str+"<TR><TD align=left>";
//  str=str+"<FONT FACE="+P_TxtFace+" size="+P_TxtSize+" color="+Txtcol+">";

  if ( Txt!=null) str=str+Txt+"<br>";

  str=str+"</FONT>";
  str=str+"</TD></TR>"; 

  str=str+"</TABLE>"; 

  str=str+"</CENTER></SPAN>";

  ComWrite('Valdas',str); 
}


function PopNeParams(nr,DivWidth,DivHeight,Txt,Txtcol,col)
{
  var ae; 
  var IDname='d'+nr; 
  var NeIDname="Ne"+IDname;
  
  str="<LAYER WIDTH="+DivWidth+" HEIGHT="+DivHeight+" LEFT=0 TOP=0 CLIP='0,0,"+DivWidth+","+DivHeight+"' ";

  if ( col ) str=str+"BGCOLOR="+col+" ";

  str=str+">"; 

  str=str+"<CENTER>";

  str=str+"<TABLE WIDTH="+DivWidth+" HEIGHT="+DivHeight+" border="+P_TableBord+" cellPadding="+P_CellPad+" cellSpacing="+P_CellSpace+">";

  str=str+"<TR><TD>";
  str=str+"<FONT FACE="+P_TxtFace+" size="+P_TxtSize+" color="+Txtcol+">";

  if ( Txt!=null) str=str+Txt+"<br>";

  str=str+"</FONT>";
  str=str+"</TD></TR>"; 

  str=str+"</TABLE>"; 

  str=str+"</CENTER></LAYER>";  

  ae=document.layers[NeIDname];
  ae.visibility="hide";

  ae=document.layers[NeIDname].document; 
  ae.open(); ae.write(str); ae.close(); 

  Visibl=nr;
  hideDivision();
}

