var tgs = new Array('div','span','li','p','a','td');
//var tgst = new Array('td');
//var tgs2 = new Array('h4');
var szs = new Array( '10px','12px','16px' );
var szst = new Array( '10px','11px','16px' );
/*
var startsz = '';

function getURLParam(strParamName){
  var strReturn = "x";
  var strHref = window.location.href;
  if ( strHref.indexOf("&") > -1 ){ 
    var strQueryString = strHref.substr(strHref.indexOf("&")).toLowerCase();
    var aQueryString = strQueryString.split("&");
    for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
      if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 ){
        var aParam = aQueryString[iParam].split("=");
        strReturn = aParam[1];
        break;
      }
    }
  }
  return strReturn;
}

startsz = getURLParam('startsz');
*/

function ts( tgs,trgt,inc ) { 
	if (!document.getElementById) return;
	var d = document,cEl = null,sz,i,j,cTags,cTags2,cTags3,k,l;
	
	sz = inc;
	if ( sz >= 0 ) {
		if ( sz > 2 ) sz = 2;
		//startsz = sz;
		
		if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

/*		if(inc==1) {
			linkelement = document.getElementsByTagName("link")[0];
			if(linkelement.getAttribute("rel").indexOf("style") != -1) {
//			alert(linkelement.href);
				linkelement.href = '/css/mosty.css';
			}
		} else {*/
			if(inc==1) {
				cEl.style.fontSize   = '';
				cEl.style.lineHeight = '';
			}
			else
				cEl.style.fontSize   = szs[ sz ];

			if (inc==2)
				cEl.style.lineHeight = '21px';
			else if (inc==0)
				cEl.style.lineHeight = '15px';
	
			for ( i = 0 ; i < tgs.length ; i++ ) {
				cTags = cEl.getElementsByTagName( tgs[ i ] );
				for ( j = 0 ; j < cTags.length ; j++ ){
					if (inc==2) {
						cTags[ j ].style.fontSize = szs[ sz ];
						cTags[ j ].style.lineHeight = '21px';
					}
					else if (inc==0) {
						cTags[ j ].style.fontSize = szs[ sz ];
						cTags[ j ].style.lineHeight = '15px';
					}
					else {
						cTags[ j ].style.fontSize = '';
						cTags[ j ].style.lineHeight = '';	
					}
				}
			}
//		}


		//for ( i = 0 ; i < tgst.length ; i++ ) {
/*		if(inc==1) {
			cTags = cEl.getElementsByTagName('table');
			//alert(tgst[ i ]);
			//alert(cTags.childNodes.length);
			for ( j = 0 ; j < cTags.length ; j++ ) {
				if(cTags[j].className!='georgia') {
			//alert(cTags[j].className);
					cTags2 = cTags[j].getElementsByTagName('td');
					//alert(cTags2.length);
					for ( i = 0 ; i < cTags2.length ; i++ ) {
						cTags2[i].style.fontSize = szs[ sz ];
//						cTags2[i].style.fontSize = '3px';
						cTags2[i].style.lineHeight = 'normal';
						for ( k = 0 ; k < tgs.length ; k++ ) {
							cTags3 = cTags2[i].getElementsByTagName(tgs[k]);
							for (l = 0; l < cTags3.length; l++) {
								cTags3[l].style.fontSize = szs[sz]; 
								cTags3[l].style.lineHeight = 'normal';
							}
						}
					}
				}
			}
		}
	*/
//				alert(cTags2.length);
			//alert(szst[ sz ]);
	/*			cTags2[ j ].style.fontSize = szst[ sz ]; 
				if (inc==2)
					cTags2[ j ].style.lineHeight = '21px';
				else if (inc==0)
					cTags2[ j ].style.lineHeight = '15px';
				else
					cTags2[ j ].style.lineHeight = 'normal';	
		*/		
				//for (k=0; k<cTags.childNodes.length; k++) {
			//		var currentNode = cTags.childNodes[i];
			//		if (currentNode.nodeName.toLowerCase() == "a") {
			//			cTags.removeChild(currentNode);
			//		}
			//	}
				
	/*			
				for (k=0 ; k < tgs.length ; k++ ) {
					cTags2 = cTags.getElementsByTagName( tgs[ k ][0] );
					cTags2[ k ].style.fontSize = szst[ sz ]; 
					if (inc==2)
						cTags2[ k ].style.lineHeight = '21px';
					else if (inc==0)
						cTags2[ k ].style.lineHeight = '15px';
					else
						cTags2[ k ].style.lineHeight = 'normal';	
				}*/
			//}
		//}
	}
}

function setCoo(size) {
	document.cookie='rozmiar_czcionki='+size+'; path=/';
	//document.cookie='rozmiar_czcionki=""; path=/';
}

function getCoo(cookie)
{
    var position = cookie.indexOf("rozmiar_czcionki");
    if (position != -1) {
        return cookie.substr(position+17, 1);
    }
    return -1;
}


function przepisz(poleDo, poleZ) {
	var foo = document.getElementById(poleDo);
	foo.firstChild.nodeValue = poleZ.value;
}