function objGet(id) {
	if (Boolean(document.getElementById))
		return document.getElementById(id);
	else if (Boolean(document.all))
		return eval('document.all.'+id);
	else
		return eval('document.'+id);
}

function printpage() {
	window.print();
}

var addPrintLink = {
	init:function(sTargetEl,sLinkText,sViewText) {
		if (!document.getElementById || !document.createTextNode) {return;}
		if (!document.getElementById(sTargetEl)) {return;}
		if (!window.print) {return;}
		var oTarget = document.getElementById(sTargetEl);
		var oLink = document.createElement('a');
		var oImage = document.createElement('img');
		var oText = document.createTextNode( ' '+sLinkText ) ;
		if (document.all) {
			oImage.src='/images/prt.gif';
			oLink.id = 'print-link';
			oLink.href = '#';
			oLink.alt=sLinkText;
			oLink.title=sLinkText;
		}
		else {
			oImage.setAttribute( 'src' , '/images/prt.gif' );
			oLink.setAttribute( 'id' , 'print-link' );
			oLink.setAttribute( 'href' , '#' );
			oLink.setAttribute( 'alt' , sLinkText );
			oLink.setAttribute( 'title' , sLinkText );
		}
		//oLink.appendChild(document.createTextNode(sLinkText));
		oLink.appendChild(oImage);
		if( sViewText ) oLink.appendChild(oText);
		oLink.onclick = function() {window.print(); return false;}
		oTarget.appendChild(oLink);
	},

	addEvent:function(obj, type, fn) {
		if (obj.addEventListener)
			obj.addEventListener(type, fn, false);
		else if (obj.attachEvent) {
			obj["e"+type+fn] = fn;
			obj[type+fn] = function() {obj["e"+type+fn](window.event);}
			obj.attachEvent("on"+type, obj[type+fn]);
		}
	}
};
addPrintLink.addEvent(window, 'load', function(){addPrintLink.init('servicesprt','Vytisknout stránku',false);});
addPrintLink.addEvent(window, 'load', function(){addPrintLink.init('ftprt','Vytisknout stránku',true);});

function remAllChilds( element ) {
	var el = objGet( element ) ;
		while (el.firstChild) {
		el.removeChild(el.firstChild);
	}
}