function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



function zoom(name,szer,wys){
szer1 = szer + 50 ;
wys1 = wys + 70 ;
	zoom1 = window.open('','','width=' + szer1 + ',height=' + wys1);

	zoom1.document.write('<html><head><title>Archeton</title><link rel="stylesheet" href="http://www.archeton.pl/Zasoby/CSS/styl_glowna.css"></head>');

	zoom1.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#F4F4F4">');

	zoom1.document.write('<table width="'+szer+'" border="0" cellspacing="0" cellpadding="0" align="center" valign="top">');
	
	zoom1.document.write('<tr><td height="20">&nbsp;</td></tr>');

	zoom1.document.write('<tr><td align="center" valign="top"><a class="linkcz" href="javascript:window.close();" title="Close window"><img src="'+name+'" border="0" alt="Close window"></a></td></tr>');

	zoom1.document.write('<tr><td height="20"></td></tr>');

	zoom1.document.write('<tr><td align="center"><a href="javascript:window.close()" class="linkcz">Close window</a></td></tr>');

	zoom1.document.write('</table><br>');

	zoom1.document.write('</body></html>');

	}

	function zooms(name,szer,wys){
szer1 = szer + 50 ;
wys1 = wys + 70 ;
	zoom1 = window.open('','','scrollbars=yes','width=' + szer1 + ',height=' + wys1);

	zoom1.document.write('<html><head><title>Archeton</title><link rel="stylesheet" href="http://www.archeton.pl/Zasoby/CSS/styl_glowna.css"></head>');

	zoom1.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#F4F4F4">');

	zoom1.document.write('<table width="'+szer+'" border="0" cellspacing="0" cellpadding="0" align="center" valign="top">');
	
	zoom1.document.write('<tr><td height="20">&nbsp;</td></tr>');

	zoom1.document.write('<tr><td align="center" valign="top"><a href="javascript:window.close();" title="Close window"><img src="'+name+'" width="'+szer+'" height="'+wys+'" border="0" alt="Close window"></a></td></tr>');

	zoom1.document.write('<tr><td height="20"></td></tr>');

	zoom1.document.write('<tr><td align="center"><a href="javascript:window.close()" class="linkz">Close window</a></td></tr>');

	zoom1.document.write('</table><br>');

	zoom1.document.write('</body></html>');

	}


function drukuj(plik){
szer1 = 650 ;
wys1 = 570 ;
	okno = window.open('','','width=' + szer1 + ',height=' + wys1);

	okno.document.write('<html><head><title>ARCHETON Sp. z o.o.</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head>');

	okno.document.write('<frameset rows="500,50" frameborder="NO" border="0" framespacing="0">');

	okno.document.write('<frame name="mainFrame" src="' + plik + '"><frame name="bottomFrame" scrolling="NO" noresize src="Zasoby/Formularze/drukuj.htm" >');
	
	okno.document.write('</frameset><noframes><body bgcolor="#FFFFFF" text="#000000"></body></noframes></html>');
}

function drukuj1(plik){
szer1 = 650 ;
wys1 = 350 ;
	okno = window.open('','','width=' + szer1 + ',height=' + wys1);

	okno.document.write('<html><head><title>ARCHETON Sp. z o.o.</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head>');

	okno.document.write('<frameset rows="*,50" frameborder="NO" border="0" framespacing="0">');

	okno.document.write('<frame name="mainFrame" src="' + plik + '"><frame name="bottomFrame" scrolling="NO" noresize src="Zasoby/Formularze/drukuj_pusty.htm" >');
	
	okno.document.write('</frameset><noframes><body bgcolor="#FFFFFF" text="#000000"></body></noframes></html>');
}

function drukuj760(plik){
szer1 = 760 ;
wys1 = 680 ;
	okno = window.open('','','width=' + szer1 + ',height=' + wys1);

	okno.document.write('<html><head><title>ARCHETON Sp. z o.o.</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head>');

	okno.document.write('<frameset rows="640,40" frameborder="NO" border="0" framespacing="0">');

	okno.document.write('<frame name="mainFrame" src="' + plik + '"><frame name="bottomFrame" scrolling="NO" noresize src="Zasoby/Formularze/drukuj.htm" >');
	
	okno.document.write('</frameset><noframes><body bgcolor="#FFFFFF" text="#000000"></body></noframes></html>');
}

function drukujs(plik,szer1,wys1){
wys = wys1;
wys1 = wys1 + 80;
	okno = window.open('','','width=' + szer1 + ',height=' + wys1);

	okno.document.write('<html><head><title>ARCHETON Sp. z o.o.</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"></head>');

	okno.document.write('<frameset rows="' + wys + ',40" frameborder="NO" border="0" framespacing="0">');

	okno.document.write('<frame name="mainFrame" scrolling="AUTO" src="' + plik + '"><frame name="bottomFrame" scrolling="NO" noresize src="Zasoby/Formularze/drukujs.htm" >');
	
	okno.document.write('</frameset><noframes><body bgcolor="#FFFFFF" text="#000000"></body></noframes></html>');
}

function ValidatorNull(TheObject,ErrorText)
{
  if (TheObject.value == "")
  {
    alert(ErrorText);
    TheObject.focus();
    return (false);
  }
  return (true);
}


function ValidatorZero(TheObject,ErrorText)
{
  if (TheObject.value == "0")
  {
    alert(ErrorText);
    TheObject.focus();
    return (false);
  }
  return (true);
}

function ValidatorNumber(TheObject,ErrorText)
{

  var checkOK = "0123456789";
  var checkStr = TheObject.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert(ErrorText);
    TheObject.focus();
    return (false);
  }
  return (true);
}



function ValidatorMail(TheObject,ErrorText)
{
  var checkStr = TheObject.value;
  var malpaValid = false;
  var kropkaValid = false;

  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
      if (ch == "@")
        malpaValid = true;

      if (ch == ".")
        kropkaValid = true;
  }
  if ((!malpaValid) || (!kropkaValid))
  {
    alert(ErrorText);
    TheObject.focus();
    return (false);
  }
  return (true);
}

function changeContent(nazwa,tekst)
{
var x=document.getElementById(nazwa).rows[0].cells
x[0].innerHTML=tekst;
document.images[nazwa + 'p'].src="../IMG/pusty.gif";
document.images[nazwa + 'm'].src="../IMGSYS/minus.gif";
}
function wroc(nazwa)
{
var y=document.getElementById(nazwa).rows[0].cells
y[0].innerHTML="";
document.images[nazwa + 'm'].src="../IMG/pusty.gif";
document.images[nazwa + 'p'].src="../IMGSYS/plus.gif";
}
function UstawObrazek(ObrazekId,Folder,Obrazek)
{
document.getElementById(ObrazekId).src = "http://www.archeton.net/RESOURCES/" + Folder + "/" + Obrazek;
}

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function piktogram_v7_pl_DoFSCommand(command, args) {
	var piktogram_v7_plObj = isInternetExplorer ? document.all.piktogram_v7_pl : document.piktogram_v7_pl;
	//
	  if (command == "ustawartykol") {SetArticle(args);}
	//
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub piktogram_v7_pl_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call piktogram_v7_pl_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
