var coloredTb = 0;
var coloredLi = 0;
var badDOM = (document.all)?1:0;
var colHighlight = '#dddddd';
var colTemp = null;
var TBodies = stb();
var lis = sli();
     tdCol1 = '#ffffff';
     tdCol2 = '#eeeeee';


function stb(){
     elCollection = document.getElementsByTagName('tbody');
     return(elCollection);
}

function sli(){
     elCollection = document.getElementsByTagName('div');
     return(elCollection);
}

function init() {
     var i = null;
     var j = null;
     var k = null;


     for (i=0;i<TBodies.length;i++) {

         if (TBodies.item(i).className == 'tbHigh') {
             for (j=0;j<TBodies.item(i).rows.length;j++){
                 for
(k=0;k<TBodies.item(i).rows[j].getElementsByTagName('td').length;k++) {
                     if (j%2) {
TBodies.item(i).rows[j].getElementsByTagName('td').item(k).style.backgroundColor
= tdCol1; }
                     else     {
TBodies.item(i).rows[j].getElementsByTagName('td').item(k).style.backgroundColor
= tdCol2; }
                 }
             }
         }
     }
     coloredTb=1;
}

var coloredTb = 0;
var coloredLi = 0;
var badDOM = (document.all)?1:0;
var colHighlight = '#dddddd';
var colTemp = null;
var TBodies = stb();
var lis = sli();
     tdCol1 = '#ffffff';
     tdCol2 = '#eeeeee';


function stb(){
     elCollection = document.getElementsByTagName('tbody');
     return(elCollection);
}

function sli(){
     elCollection = document.getElementsByTagName('div');
     return(elCollection);
}

function init() {
     var i = null;
     var j = null;
     var k = null;


     for (i=0;i<TBodies.length;i++) {

         if (TBodies.item(i).className == 'tbHigh') {
             for (j=0;j<TBodies.item(i).rows.length;j++){
                 for
(k=0;k<TBodies.item(i).rows[j].getElementsByTagName('td').length;k++) {
                     if (j%2) {
TBodies.item(i).rows[j].getElementsByTagName('td').item(k).style.backgroundColor
= tdCol1; }
                     else     {
TBodies.item(i).rows[j].getElementsByTagName('td').item(k).style.backgroundColor
= tdCol2; }
                 }
             }
         }
     }
     coloredTb=1;
}

var coloredTb = 0;
var coloredLi = 0;
var badDOM = (document.all)?1:0;
var colHighlight = '#dddddd';
var colTemp = null;
var TBodies = stb();
var lis = sli();
     tdCol1 = '#ffffff';
     tdCol2 = '#eeeeee';


function stb(){
     elCollection = document.getElementsByTagName('tbody');
     return(elCollection);
}

function sli(){
     elCollection = document.getElementsByTagName('div');
     return(elCollection);
}

function init() {
     var i = null;
     var j = null;
     var k = null;


     for (i=0;i<TBodies.length;i++) {

         if (TBodies.item(i).className == 'tbHigh') {
             for (j=0;j<TBodies.item(i).rows.length;j++){
                 for
(k=0;k<TBodies.item(i).rows[j].getElementsByTagName('td').length;k++) {
                     if (j%2) {
TBodies.item(i).rows[j].getElementsByTagName('td').item(k).style.backgroundColor
= tdCol1; }
                     else     {
TBodies.item(i).rows[j].getElementsByTagName('td').item(k).style.backgroundColor
= tdCol2; }
                 }
             }
         }
     }
     coloredTb=1;
}

function initList() {
     var i = null;
     var j = 0;
 
     for (i=0;i<lis.length;i++) {
         if(lis.item(i).className=='folderListElement')
             if(j++%2){lis.item(i).style.backgroundColor=tdCol1;}
             else{lis.item(i).style.backgroundColor=tdCol2;}
     }
     coloredLi=1;
}
 
 
function high(tBody,ev,switchCol) {
     if (navigator.appName != 'Opera') {
 
         if (coloredTb == 1) {
             if (badDOM) {
                 el = document.all[tBody];
             }
             else
             {
                 el = document.getElementById(tBody);
             }
 
             with (el.rows[ev.sectionRowIndex].getElementsByTagName('td')) {
                 if (switchCol == 1 && colHighlight != 
item(1).style.backgroundColor) {
                     colTemp = item(1).style.backgroundColor;
                     for (i=0;i<length;i++) {
                         item(i).style.backgroundColor = colHighlight;
                     }
                 }
                 else
                 {
                     for (i=0;i<length;i++) {
                         item(i).style.backgroundColor = colTemp;
                     }
                 }
             }
         }function highLi(ev,switchCol) {
     if (coloredLi == 1) {
         if (switchCol == 1 && colHighlight != ev.style.backgroundColor) {
             colTemp = ev.style.backgroundColor;
             ev.style.backgroundColor = colHighlight;
         }
         else
         {
             ev.style.backgroundColor = colTemp;
         }
     }
}
 
     }
}

function submitSave(form,value) {
     form.currency_code.value=value;
     form.submit();
}

function submitChange(form,ivalue) {
     form.index_id.value= ivalue;
     form.submit();
}

function submitSavef(form,ivalue) {
     form.fund_type_id.value= ivalue;
     form.submit();
}
function iframeHeight(){
	if(!(document.layers)){
		var doc=document,oe=doc.all?doc.all['ifra']:doc.getElementById('ifra');
		var cdoc=oe.all?document.ifra.document:oe.contentDocument;
		oe.height=cdoc.body.scrollHeight+50;
		cdoc.body.style.border='none';
	}
}



function submitRegistrationf(form) 
{
	
	
	
		//alert('Witaj w mojej walidacji ±ęłń¶¦Ń Ęmail deliver '+form.mailDeliver[0].checked+' comment5 '+form.comment5[0].checked +' biuletyn ' + form.bulletin[0].checked + ' comment 4 '+form.comment4[0].checked );
    
    
     if(form.comment3.checked == false)
    {
    	   //alert('W celu zarejestrowania konta należy zaznaczyć TAK w pierwszym o¶wiadczeniu!');
    	   alert('Wyrażenie zgody jest niezbędne, aby otrzymywać newsletter');
    	   return false;
    }
    else if(form.mailDeliver[0].checked==true && form.comment5.checked == true && form.comment4.checked ==false && form.bulletin[0].checked==true)
    {
    	   alert('Wyrażenie zgody jest niezbędne, aby otrzymywać newsletter');

    		///alert('Wysłanie newslettera wymaga zgody na przetwarzanie danych osobowych w celach marketingowych!');
   			return false;
    }
    else if(form.mailDeliver[0].checked==false && form.comment5.checked == true)
    {
    	   alert('Wyrażenie zgody jest niezbędne, aby otrzymywać newsletter');

		   //alert('Wysyłanie informacji handlowych wymaga zgody na otrzymywanie informacji drog± elektroniczn±!');  
    		return false;
    }
    else if(form.mailDeliver[0].checked==true && form.comment5.checked == false)
    {
    	   alert('Wyrażenie zgody jest niezbędne, aby otrzymywać newsletter');

		  // alert('Zgoda na wysłanie informacji e-mailem przy braku zgody na otrzymywanie informacji handlowych drog± elektroniczn±!'); 
    	   return false;
    }
    else
    {
    	return true;
    }
    
}


