tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "simple",
		language : "pl",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});


function check(){

				var adres1=document.formularz.email1.value
				var malpa1=adres1.indexOf('@');
				kropka1=adres1.lastIndexOf('.');

				if (malpa1<2 || malpa1>kropka1){
				alert("Adres e-mail nadawcy wpisany niepoprawnie");
				return false;
				}

				var adres2=document.formularz.email2.value
				var malpa2=adres2.indexOf('@');
				kropka2=adres2.lastIndexOf('.');

				if (malpa2<2 || malpa2>kropka2){
				alert("Adres e-mail odbiorcy wpisany niepoprawnie");
				return false;
				}

				if(document.formularz.imie1.value==""){
				alert("Wypełnij pole imię i nazwisko");
				return false;
				} else if(document.formularz.imie2.value==""){
				alert("Wypełnij pole nazwisko");
				return false;
				} else {
				document.formularz.submit();
				}

				}

var min=8;
		var max=18;
		function increaseFontSize() {
		   var p = document.getElementsByTagName('p');
		   for(i=0;i<p.length;i++) {
		      if(p[i].style.fontSize) {
		         var s = parseInt(p[i].style.fontSize.replace("px",""));
		      } else {
		         var s = 12;
		      }
		      if(s!=max) {
		         s += 1;
		      }
		      p[i].style.fontSize = s+"px"
		   }
		}
		function decreaseFontSize() {
		   var p = document.getElementsByTagName('p');
		   for(i=0;i<p.length;i++) {
		      if(p[i].style.fontSize) {
		         var s = parseInt(p[i].style.fontSize.replace("px",""));
		      } else {
		         var s = 12;
		      }
		      if(s!=min) {
		         s -= 1;
		      }
		      p[i].style.fontSize = s+"px"
		   }
		}

function dodaj() {

			    var tytul = 'PlatformaSeniorow.pl - portal generacji 50+';
			    var adres = 'http://www.platformaseniorow.pl';

			    //FireFox
			    if (window.sidebar) {

			        window.sidebar.addPanel(tytul, adres, "");

			    //IE
			    } else if (window.external) {

			        window.external.AddFavorite(adres, tytul);

			    //Opera
			    } else if (window.opera && window.print) {

			        var a = document.createElement('a');
			        a.setAttribute('href', adres);
			        a.setAttribute('title', tytul);
			        a.setAttribute('rel','sidebar');
			        a.click();
			    }
			}