var ZAL1  			= "<b><a href=\"dirs/formularze/zal1.doc\" target=\"new\" style=\"color: #F25B00;\">aneksu</a></b>"
var ZAL2  			= "<b><a href=\"dirs/formularze/zal2.doc\" target=\"new\" style=\"color: #F25B00;\">aneksu</a></b>"
var ZAL3  			= "<b><a href=\"dirs/formularze/zal3.doc\" target=\"new\" style=\"color: #F25B00;\">aneksu</a></b>"
var ZAL4  			= "<b><a href=\"dirs/formularze/zal4.doc\" target=\"new\" style=\"color: #F25B00;\">aneksu</a></b>"
var ZAL_CESJA_EN	= "<b><a href=\"dirs/formularze/cesja_gts_energis.doc\" target=\"new\">Formularz cesji</a></b>"
var ZAL_CESJA_PL	= "<b><a href=\"dirs/formularze/cesja_gts_polska.doc\"  target=\"new\">Formularz cesji</a></b>"
var ADRES_EN 		= "GTS Energis Sp. z o. o. ";
var ADRES_PL		= "GTS Polska Sp. z o.o. ";

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_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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 init() {
	if (TransMenu.isSupported()) {
		TransMenu.initialize();

		menu1.onactivate = function() { document.getElementById("firma").className = "hover"; };
		menu1.ondeactivate = function() { document.getElementById("firma").className = ""; };
		
			//	menu2.onactivate = function() { document.getElementById("oferta").className = "hover"; };
			//	menu2.ondeactivate = function() { document.getElementById("oferta").className = ""; };

				menu3.onactivate = function() { document.getElementById("referencje").className = "hover"; };
				menu3.ondeactivate = function() { document.getElementById("referencje").className = ""; };

				menu4.onactivate = function() { document.getElementById("klienci").className = "hover"; };
				menu4.ondeactivate = function() { document.getElementById("klienci").className = ""; };

				menu5.onactivate = function() { document.getElementById("partnerzy").className = "hover"; };
				menu5.ondeactivate = function() { document.getElementById("partnerzy").className = ""; };

				menu6.onactivate = function() { document.getElementById("media").className = "hover"; };
				menu6.ondeactivate = function() { document.getElementById("media").className = ""; };


				menu7.onactivate = function() { document.getElementById("multimedia").className = "hover"; };
				menu7.ondeactivate = function() { document.getElementById("multimedia").className = ""; };


		/*		menu8.onactivate = function() { document.getElementById("kariera").className = "hover"; };
				menu8.ondeactivate = function() { document.getElementById("kariera").className = ""; };


				menu9.onactivate = function() { document.getElementById("kontakt").className = "hover"; };
				menu9.ondeactivate = function() { document.getElementById("kontakt").className = ""; };		
*/
	}
}

function init2(){
	init();
	MM_preloadImages('media/link-str-glowna2.jpg','media/link-mapa-serwisu2.jpg','media/link-nota-prawna2.jpg','media/arrow-orange.gif','media/l-english2.gif','media/more2.jpg','media/morenews2.gif','media/siteimpulse2.gif');
}

function sprawdzFormularzKontaktPL(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.nazwa.value == ""){
		komunikat += "* Proszę wpisać nazwę firmy\n";
		blad++;
	}
	if(document.formularz.imie.value == ""){
		komunikat += "* Proszę wpisać imię\n";
		blad++;
	}	
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Proszę wpisać nazwisko\n";
		blad++;
	}	
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Proszę wpisać poprawny adres e-mail\n";
		blad++;
	}
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzKontaktEN(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.nazwa.value == ""){
		komunikat += "* Please specify the company\n";
		blad++;
	}
	if(document.formularz.imie.value == ""){
		komunikat += "* Please specify the first name\n";
		blad++;
	}	
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Please specify the last name\n";
		blad++;
	}	
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Please specify correct e-mail address\n";
		blad++;
	}
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Please state that you have read the www.gtsenergis.pl policy\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}
function sprawdzFormularzBOKPL()	{
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
	
	var temat = document.formularz.temat.value;
	if((temat == aktualizacja_danych_kontaktowych) ||  (temat == zmiana_danych_firmy)) {
		if(document.formularz.kod.value == ""){
			komunikat += "* Proszę wpisać kod abonenta\n";
			blad++;
		}
				
	}	
	if(document.formularz.nazwa.value == ""){
		komunikat += "* Proszę wpisać nazwę firmy\n";
		blad++;
	}
	if(document.formularz.imie.value == ""){
		komunikat += "* Proszę wpisać imię\n";
		blad++;
	}
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Proszę wpisać nazwisko\n";
		blad++;
	}	
	
	if(document.formularz.telefon.value == ""){
		komunikat += "* Proszę wpisać telefon\n";
		blad++;
	}	
	
	if(temat == aktualizacja_danych_kontaktowych) {	
		if(document.formularz.zalacznik.value == "") {
			komunikat += "* Proszę dołączyć załącznik\n";
			blad++;
		}
	}
	
	if(temat == zmiana_danych_firmy) {
		var oSelect = document.getElementById("zmiana");
		
		if((document.formularz.forma_prawna[0].checked == false) && (document.formularz.forma_prawna[1].checked == false)){
			komunikat += "* Proszę wybrać formę prawną \n";
			blad++;
		}
		
		if((document.formularz.forma_prawna[0].checked == false) && (document.formularz.forma_prawna[1].checked == false)){
			komunikat += "* Proszę wybrać rodzaj abonenta \n";
			blad++;
		}
		
		if(document.formularz.zmiana.value == "") {
			komunikat += "* Proszę wybrać czego dotyczy zmiana \n";
			blad++;
		}
		if((oSelect.options[0].selected || oSelect.options[1].selected || oSelect.options[2].selected || oSelect.options[3].selected || oSelect.options[4].selected) && (document.formularz.aneks.value == "")) {
			komunikat += "* Proszę dołączyć aneks\n";
			blad++;	
		}
		if(oSelect.options[1].selected || oSelect.options[2].selected || oSelect.options[3].selected || oSelect.options[4].selected) {
			if(document.formularz._wypis.value == "") {
				komunikat += "* Prosimy dołączyć Wypis z ewidencji działalności gospodarczej lub aktualny KRS\n";
				blad++;	
			}
		}
		if(oSelect.options[4].selected) {
			if(document.formularz._nip.value == "") {
				komunikat += "* Prosimy dołączyć nip\n";
				blad++;				
			}
			if(document.formularz._regon.value == "") {
				komunikat += "* Prosimy dołączyć regon\n";
				blad++;				
			}
		}
	}
	
	if(document.formularz.email.value != "") {
		if(!document.formularz.email.value.match(re)){
			komunikat += "* Proszę wpisać poprawny adres e-mail\n";
			blad++;
		}
	}
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}
function formularzBOKPL(){
	var temat 					= document.formularz.temat.value
	var oKodAbonenta 			= document.getElementById('kod_abonenta');
	var oTrescZapytania 		= document.getElementById('zapytanie_label');
	var oJednostkaButtonLabel	= document.getElementById('jednostka_button1_label');
	var oJednostkaButtonInput1	= document.getElementById('jednostka_button1_input');

	var oJednostkaButtonLabe2	= document.getElementById('jednostka_button2_label');
	var oJednostkaButtonInput2	= document.getElementById('jednostka_button2_input');
			
	if(temat == aktualizacja_danych_kontaktowych) {
		oKodAbonenta.innerHTML		= "kod abonenta *";
		document.getElementById('form_upload_label').style.display = "block";	
		document.getElementById('form_upload_input').style.display = "block";	
		document.getElementById('form_upload_info').style.display  = "block";	
		oTrescZapytania.innerHTML	= "Komentarz";
		
		document.getElementById('jednostka_button1_label').style.display = "none";
		document.getElementById('jednostka_button1_input').style.display = "none";
		document.getElementById('jednostka_button2_label').style.display = "none";
		document.getElementById('jednostka_button2_input').style.display = "none";
		
		document.getElementById('abonent_button1_label').style.display = "none";
		document.getElementById('abonent_button1_input').style.display = "none";
		document.getElementById('abonent_button2_label').style.display = "none";
		document.getElementById('abonent_button2_input').style.display = "none";
		
		document.getElementById('zmiana_label').style.display  = "none";
		document.getElementById('zmiana_select').style.display = "none";
		document.getElementById('zmiana_info').style.display = "none";
		
		document.getElementById('zmiana_dotyczy_info').style.display = "none";
		
		document.getElementById('formularz_aneks_info').style.display = "none";
		document.getElementById('formularz_aneks_upload').style.display = "none";
	}
	else if(temat == zmiana_danych_firmy) {	
		oKodAbonenta.innerHTML			= "kod abonenta *";
		oTrescZapytania.innerHTML		= "Komentarz";
		document.getElementById('form_upload_label').style.display = "none";	
		document.getElementById('form_upload_input').style.display = "none";	
		document.getElementById('form_upload_info').style.display  = "none";
		document.getElementById('jednostka_button1_label').style.display = "block";
		document.getElementById('jednostka_button1_input').style.display = "block";
		document.getElementById('jednostka_button2_label').style.display = "block";
		document.getElementById('jednostka_button2_input').style.display = "block";

		document.getElementById('abonent_button1_label').style.display = "block";
		document.getElementById('abonent_button1_input').style.display = "block";
		document.getElementById('abonent_button2_label').style.display = "block";
		document.getElementById('abonent_button2_input').style.display = "block";		
		
		document.getElementById('zmiana_label').style.display  = "block";
		document.getElementById('zmiana_select').style.display = "block";
		document.getElementById('zmiana_info').style.display = "block";
		
		document.getElementById('zmiana_dotyczy_info').style.display = "block";
	}
	else {
		oKodAbonenta.innerHTML		= "kod abonenta";
		document.getElementById('form_upload_label').style.display = "none";	
		document.getElementById('form_upload_input').style.display = "none";	
		document.getElementById('form_upload_info').style.display  = "none";
		oTrescZapytania.innerHTML	= "Treść zapytania *";
		
		document.getElementById('jednostka_button1_label').style.display = "none";
		document.getElementById('jednostka_button1_input').style.display = "none";
		document.getElementById('jednostka_button2_label').style.display = "none";
		document.getElementById('jednostka_button2_input').style.display = "none";
		
				
		document.getElementById('abonent_button1_label').style.display = "none";
		document.getElementById('abonent_button1_input').style.display = "none";
		document.getElementById('abonent_button2_label').style.display = "none";
		document.getElementById('abonent_button2_input').style.display = "none";				

		document.getElementById('zmiana_label').style.display  = "none";
		document.getElementById('zmiana_select').style.display = "none";
		document.getElementById('zmiana_info').style.display = "none";
		
		document.getElementById('zmiana_dotyczy_info').style.display = "none";
		
		document.getElementById('formularz_aneks_info').style.display = "none";
		document.getElementById('formularz_aneks_upload').style.display = "none";
	}
}
function resetForm() {
	var oKodAbonenta 			= document.getElementById('kod_abonenta');
	var oTrescZapytania 		= document.getElementById('zapytanie_label');
	oKodAbonenta.innerHTML		= "kod abonenta";
	document.getElementById('form_upload_label').style.display = "none";	
	document.getElementById('form_upload_input').style.display = "none";	
	document.getElementById('form_upload_info').style.display  = "none";
	oTrescZapytania.innerHTML	= "Treść zapytania *";
		
	document.getElementById('jednostka_button1_label').style.display = "none";
	document.getElementById('jednostka_button1_input').style.display = "none";
	document.getElementById('jednostka_button2_label').style.display = "none";
	document.getElementById('jednostka_button2_input').style.display = "none";
		
				
	document.getElementById('abonent_button1_label').style.display = "none";
	document.getElementById('abonent_button1_input').style.display = "none";
	document.getElementById('abonent_button2_label').style.display = "none";
	document.getElementById('abonent_button2_input').style.display = "none";				

	document.getElementById('zmiana_label').style.display  = "none";
	document.getElementById('zmiana_select').style.display = "none";
	document.getElementById('zmiana_info').style.display = "none";
		
	document.getElementById('zmiana_dotyczy_info').style.display = "none";
		
	document.getElementById('formularz_aneks_info').style.display = "none";
	document.getElementById('formularz_aneks_upload').style.display = "none";
		
	document.getElementById('nip_info').style.display = "none";
	document.getElementById('nip_upload').style.display = "none";
	document.getElementById('regon_info').style.display = "none";
	document.getElementById('regon_upload').style.display = "none";
	document.getElementById('formularz_aneks_info').style.display = "none";
	document.getElementById('formularz_aneks_upload').style.display = "none";
	document.getElementById('zmiana_upload_info').style.display = "none";
	document.getElementById('zmiana_upload_upload').style.display = "none";
}
function ustawLink() {
	var oAneks = document.getElementById("link_aneks");
	var oAdres = document.getElementById("adres");
	var pole1  = false;
	var pole2  = false;
	
	if(document.formularz.abonent[0].checked == true) {
		oAdres.innerHTML = ADRES_EN;
		pole1 = true;
	}
	else if(document.formularz.abonent[1].checked == true) {
		oAdres.innerHTML = ADRES_PL;	
		pole1 = true;	
	}
	
	if((document.formularz.abonent[0].checked == true) && (document.formularz.forma_prawna[1].checked == true)) {
		oAneks.innerHTML = ZAL1;
		pole1 = true;
		pole2 = true;
	}
	else if((document.formularz.abonent[1].checked == true) && (document.formularz.forma_prawna[1].checked == true)) {
		oAneks.innerHTML = ZAL2;
		pole1 = true;
		pole2 = true;
	}
	else if((document.formularz.abonent[1].checked == true) && (document.formularz.forma_prawna[0].checked == true)) {
		oAneks.innerHTML = ZAL3;
		pole1 = true;
		pole2 = true;
	}
	else if((document.formularz.abonent[0].checked == true) && (document.formularz.forma_prawna[0].checked == true)) {
		oAneks.innerHTML = ZAL4;
		pole1 = true;
		pole2 = true;
	}	
	if((pole1 == true) && (pole2 == true)) {
		document.getElementById("zmiana").style.display = "block";
		document.getElementById("zmiana_temp").style.display = "none";
	}
}
function przypomnij() {
	var blad=0;
	var komunikat = "";	
	if((document.formularz.forma_prawna[0].checked == false) && (document.formularz.forma_prawna[1].checked == false)){
		komunikat += "* Proszę wybrać formę prawną \n";
		blad++;
	}
	if((document.formularz.abonent[0].checked == false) && (document.formularz.abonent[1].checked == false)){
		komunikat += "* Proszę wybrać rodzaj abonenta \n";
		blad++;
	}
	if(blad > 0) {
		alert(komunikat);
		return false;
	}
}
function testSelect(oSelect) {
	var blad=0;
	var komunikat = "";
	if((document.formularz.forma_prawna[0].checked == false) && (document.formularz.forma_prawna[1].checked == false)){
		komunikat += "* Proszę wybrać formę prawną \n";
		blad++;
	}
	if((document.formularz.abonent[0].checked == false) && (document.formularz.abonent[1].checked == false)){
		komunikat += "* Proszę wybrać rodzaj abonenta \n";
		blad++;
	}
	if(blad > 0) {
		alert(komunikat);
		return false;
	}

	if(oSelect.options[0].selected) {
		document.getElementById('formularz_aneks_info').style.display = "block";
		document.getElementById('formularz_aneks_upload').style.display = "block";		
	}
	if(oSelect.options[1].selected || oSelect.options[2].selected || oSelect.options[3].selected || oSelect.options[4].selected) {
		document.getElementById('zmiana_upload_info').style.display = "block";
		document.getElementById('zmiana_upload_upload').style.display = "block";
		document.getElementById('formularz_aneks_info').style.display = "block";
		document.getElementById('formularz_aneks_upload').style.display = "block";		
	}
	else {
		document.getElementById('zmiana_upload_info').style.display = "none";
		document.getElementById('zmiana_upload_upload').style.display = "none";
	}
	if(oSelect.options[3].selected) {
		document.getElementById('zmiana_upload_info').innerHTML = "Prosimy dołączyć Wypis z ewidencji działalności gospodarczej lub aktualny KRS (nie starszy niż 3 miesiące), Regon *";
	}
	else {
		document.getElementById('zmiana_upload_info').innerHTML = "Prosimy dołączyć Wypis z ewidencji działalności gospodarczej lub aktualny KRS (nie starszy niż 3 miesiące) *";
	}
	if(oSelect.options[4].selected) {	
		document.getElementById('nip_info').style.display = "block";
		document.getElementById('nip_upload').style.display = "block";
		document.getElementById('regon_info').style.display = "block";
		document.getElementById('regon_upload').style.display = "block";	
		document.getElementById('formularz_aneks_info').style.display = "block";
		document.getElementById('formularz_aneks_upload').style.display = "block";
		ustawLink();
	}
	else {
		document.getElementById('nip_info').style.display = "none";
		document.getElementById('nip_upload').style.display = "none";
		document.getElementById('regon_info').style.display = "none";
		document.getElementById('regon_upload').style.display = "none";
		document.getElementById('formularz_aneks_info').style.display = "block";
		document.getElementById('formularz_aneks_upload').style.display = "block";
	}
}

function sprawdzFormularzBOKReklamacjaPL(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz2.nazwa.value == ""){
		komunikat += "* Proszę wpisać nazwę abonenta\n";
		blad++;
	}
	if(document.formularz2.adres.value == ""){
		komunikat += "* Proszę wpisać adres siedziby\n";
		blad++;
	}
	if(document.formularz2.numer.value == ""){
		komunikat += "* Proszę wpisać numer abonenta\n";
		blad++;
	}	
	
	
	if(document.formularz2.usluga_id.value == ""){
		komunikat += "* Proszę wpisać id usługi\n";
		blad++;
	}	
	
	if(document.formularz2.przedmiot.value == ""){
		komunikat += "* Proszę wpisać przedmiot reklamacji\n";
		blad++;
	}	
	
	if((document.formularz2.okres_od.value == "") || (document.formularz2.okres_do.value == "")){
		komunikat += "* Proszę wpisać prawidłowy okres reklamowany\n";
		blad++;
	}	
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzBOKEN(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.nazwa.value == ""){
		komunikat += "* Please specify the company\n";
		blad++;
	}
	if(document.formularz.imie.value == ""){
		komunikat += "* Please specify the first name\n";
		blad++;
	}
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Please specify the last name\n";
		blad++;
	}	
	
	
	if(document.formularz.telefon.value == ""){
		komunikat += "* Please specify the telephone\n";
		blad++;
	}	
	
	if(document.formularz.zapytanie.value == ""){
		komunikat += "* Please specify the message\n";
		blad++;
	}		
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Please specify correct e-mail address\n";
		blad++;
	}
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Please state that you have read the www.gtsenergis.pl policy\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzBOKReklamacja2PL(){
	
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		

	if(document.formularz2.nazwa.value == ""){
		komunikat += "* Proszę wpisać nazwę abonenta\n";
		blad++;
	}

	if(document.formularz2.numer.value == ""){
		komunikat += "* Proszę wpisać numer abonenta\n";
		blad++;
	}
	
	if(document.formularz2.adres.value == ""){
		komunikat += "* Proszę wpisać adres świadczenia usługi \n";
		blad++;
	}	
	
	if(document.formularz2.opis.value == ""){
		komunikat += "* Proszę podać opis reklamacji\n";
		blad++;
	}	
	
	if(document.formularz2.nr_kontakt.value == ""){
		komunikat += "* Proszę wpisać numer kontaktowy\n";
		blad++;
	}	
	
	if(!document.formularz2.email.value.match(re)){
		komunikat += "* Proszę wpisać poprawny adres e-mail\n";
		blad++;
	}	
	
	

	if(document.getElementById('p1').style.visibility != 'hidden'){
		if(document.formularz2.p1.value == ""){
			komunikat += "* Proszę wpisać numer faktury / reklamowany okres\n";
			blad++;
		}
	}
	
	if(document.getElementById('p3').style.visibility != 'hidden'){
		if(document.formularz2.login.value == ""){
			komunikat += "* Proszę wpisać login łącza/ID usługi\n";
			blad++;
		}
	}
	
	if(!document.formularz2.regulamin.checked){
		komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzBOKReklamacja2ResellerPL(){
	
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		

	if(document.formularz2.nazwa.value == ""){
		komunikat += "* Proszę wpisać nazwę abonenta\n";
		blad++;
	}

	if(document.formularz2.numer.value == ""){
		komunikat += "* Proszę wpisać numer abonenta\n";
		blad++;
	}
	
	if(document.formularz2.numer_faktury.value == ""){
		komunikat += "* Proszę wpisać numer reklamowanej faktury\n";
		blad++;
	}	
	
	if(document.formularz2.opis.value == ""){
		komunikat += "* Proszę podać opis reklamacji\n";
		blad++;
	}	
	
	if(document.formularz2.nazwisko.value == ""){
		komunikat += "* Proszę wpisać imię i nazwisko osoby skłądającej reklamację\n";
		blad++;
	}	
	
	if(!document.formularz2.email.value.match(re)){
		komunikat += "* Proszę wpisać poprawny adres e-mail\n";
		blad++;
	}	
	
	if(document.formularz2.nr_kontakt.value == ""){
		komunikat += "* Proszę wpisać numer kontaktowy\n";
		blad++;
	}
	
	if(!document.formularz2.regulamin.checked){
		komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzBOKReklamacja2EN(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		

	if(document.formularz2.nazwa.value == ""){
		komunikat += "* Please specify subscriber name/company name\n";
		blad++;
	}

	if(document.formularz2.numer.value == ""){
		komunikat += "* Please specify subscriber number\n";
		blad++;
	}
	
	if(document.formularz2.adres.value == ""){
		komunikat += "* Please specify service location \n";
		blad++;
	}	
	
	if(document.formularz2.opis.value == ""){
		komunikat += "* Please specify description \n";
		blad++;
	}	
	
	if(document.formularz2.nr_kontakt.value == ""){
		komunikat += "* Please specify telephone number\n";
		blad++;
	}	
	
	if(!document.formularz2.email.value.match(re)){
		komunikat += "* Please specify correct e-mail address\n";
		blad++;
	}	
	
	

	if(document.getElementById('p1').style.visibility != 'hidden'){
		if(document.formularz2.p1.value == ""){
			komunikat += "* Please specify invoice number/complaint period\n";
			blad++;
		}
	}
	
	if(document.getElementById('p3').style.visibility != 'hidden'){
		if(document.formularz2.login.value == ""){
			komunikat += "* Please specify service ID\n";
			blad++;
		}
	}
	
	if(!document.formularz2.regulamin.checked){
		komunikat += "* Please state that you have read the www.gtsenergis.pl policy\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzBOKReklamacja2ResellerEN(){
	
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		

	if(document.formularz2.nazwa.value == ""){
		komunikat += "* Please specify subscriber name\n";
		blad++;
	}

	if(document.formularz2.numer.value == ""){
		komunikat += "* Please specify subscriber number\n";
		blad++;
	}
	
	if(document.formularz2.numer_faktury.value == ""){
		komunikat += "* Please specify invoice number\n";
		blad++;
	}	
	
	if(document.formularz2.opis.value == ""){
		komunikat += "* Please specify detailed description of a complaint\n";
		blad++;
	}	
	
	if(document.formularz2.nazwisko.value == ""){
		komunikat += "* Please specify name and surname\n";
		blad++;
	}	
	
	if(!document.formularz2.email.value.match(re)){
		komunikat += "* Please specify email address\n";
		blad++;
	}	
	
	if(document.formularz2.nr_kontakt.value == ""){
		komunikat += "* Please specify telephone number\n";
		blad++;
	}
	
	if(!document.formularz2.regulamin.checked){
		komunikat += "* Please state that you have read the www.gtsenergis.pl policy\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzBOKReklamacjaEN(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz2.nazwa.value == ""){
		komunikat += "* Proszę wpisać nazwę abonenta\n";
		blad++;
	}
	if(document.formularz2.adres.value == ""){
		komunikat += "* Proszę wpisać adres siedziby\n";
		blad++;
	}
	if(document.formularz2.numer.value == ""){
		komunikat += "* Proszę wpisać numer abonenta\n";
		blad++;
	}	
	
	
	if(document.formularz2.usluga_id.value == ""){
		komunikat += "* Proszę wpisać id usługi\n";
		blad++;
	}	
	
	if(document.formularz2.przedmiot.value == ""){
		komunikat += "* Proszę wpisać przedmiot reklamacji\n";
		blad++;
	}	
	
	if((document.formularz2.okres_od.value == "") || (document.formularz2.okres_do.value == "")){
		komunikat += "* Proszę wpisać prawidłowy okres reklamowany\n";
		blad++;
	}	
	
		
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzPartnerzyPL(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.nazwa.value == ""){
		komunikat += "* Proszę wpisać nazwę firmy\n";
		blad++;
	}
	if(document.formularz.adres.value == ""){
		komunikat += "* Proszę wpisać adres firmy\n";
		blad++;
	}
	if(document.formularz.nip.value == ""){
		komunikat += "* Proszę wpisać NIP firmy\n";
		blad++;
	}	
	
	
	if(document.formularz.imie.value == ""){
		komunikat += "* Proszę wpisać imię osoby zgłaszającej\n";
		blad++;
	}	
	
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Proszę wpisać nazwisko osoby zgłaszającej\n";
		blad++;
	}		
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Proszę wpisać poprawny adres e-mail osoby zgłaszającej\n";
		blad++;
	}
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzPartnerzyEN(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.nazwa.value == ""){
		komunikat += "* Please specify the company\n";
		blad++;
	}
	if(document.formularz.adres.value == ""){
		komunikat += "* Please specify the company address\n";
		blad++;
	}
	if(document.formularz.nip.value == ""){
		komunikat += "* Please specify the TAX ID\n";
		blad++;
	}	
	
	
	if(document.formularz.imie.value == ""){
		komunikat += "* Please specify your first name\n";
		blad++;
	}	
	
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Please specify your last name\n";
		blad++;
	}		
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Please specify correct e-mail address\n";
		blad++;
	}
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Please state that you have read the www.gtsenergis.pl policy\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzMediaRejestracjaPL(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.imie.value == ""){
		komunikat += "* Proszę wpisać imię\n";
		blad++;
	}
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Proszę wpisać nazwisko\n";
		blad++;
	}	
	
	
	if(document.formularz.redakcja.value == ""){
		komunikat += "* Proszę wpisać redakcję\n";
		blad++;
	}	
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Proszę wpisać poprawny adres e-mail\n";
		blad++;
	}
	
	if(document.formularz.adres.value == ""){
		komunikat += "* Proszę wpisać adres\n";
		blad++;
	}
	
	if(document.formularz.wydawnictwo.value == ""){
		komunikat += "* Proszę wpisać wydawnictwo\n";
		blad++;
	}
	
	if(document.formularz.redakcja.value == ""){
		komunikat += "* Proszę wpisać telefon\n";
		blad++;
	}	
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzMediaRejestracjaEN(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.imie.value == ""){
		komunikat += "* Please specify the first name\n";
		blad++;
	}
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Please specify the last name\n";
		blad++;
	}	
	
	
	if(document.formularz.redakcja.value == ""){
		komunikat += "* Please specify the editor\n";
		blad++;
	}	
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Please specify correct e-mail address\n";
		blad++;
	}
	
	if(document.formularz.adres.value == ""){
		komunikat += "* Please specify the editor's address\n";
		blad++;
	}
	
	if(document.formularz.wydawnictwo.value == ""){
		komunikat += "* Please specify the publishing house\n";
		blad++;
	}
	
	if(document.formularz.redakcja.value == ""){
		komunikat += "* Please specify the phone \n";
		blad++;
	}	
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzMediaLogowaniePL(){
	var blad=0;
	var komunikat = "";
		
	if(document.formularz_log.login.value == ""){
		komunikat += "* Proszę wpisać login\n";
		blad++;
	}
	if(document.formularz_log.haslo.value == ""){
		komunikat += "* Proszę wpisać hasło\n";
		blad++;
	}	
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzMediaLogowanieEN(){
	var blad=0;
	var komunikat = "";
		
	if(document.formularz_log.login.value == ""){
		komunikat += "* Please specify the login\n";
		blad++;
	}
	if(document.formularz_log.haslo.value == ""){
		komunikat += "* Please specify the password\n";
		blad++;
	}	
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzKarieraPL(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.imie.value == ""){
		komunikat += "* Proszę wpisać imię osoby \n";
		blad++;
	}	
	
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Proszę wpisać nazwisko osoby \n";
		blad++;
	}		
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Proszę wpisać poprawny adres e-mail osoby \n";
		blad++;
	}
	
	if(document.formularz.cv.value == ""){
		komunikat += "* Proszę przesłać swoje CV \n";
		blad++;
	}		
	
	if(document.formularz.list.value == ""){
		komunikat += "* Proszę przesłać swój list motywacyjny \n";
		blad++;
	}
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzFormularzKarieraEN(){
	var blad=0;
	var komunikat = "";
	var re = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,4})$/;
		
	if(document.formularz.imie.value == ""){
		komunikat += "* Please specify the first name \n";
		blad++;
	}	
	
	if(document.formularz.nazwisko.value == ""){
		komunikat += "* Please specify the last name \n";
		blad++;
	}		
	
	if(!document.formularz.email.value.match(re)){
		komunikat += "* Please specify correct e-mail address \n";
		blad++;
	}
	
	if(document.formularz.cv.value == ""){
		komunikat += "* Please attach your CV \n";
		blad++;
	}		
	
	if(document.formularz.list.value == ""){
		komunikat += "* Please attach your letter of application \n";
		blad++;
	}
	
	if(!document.formularz.regulamin.checked){
		komunikat += "* Please state that you have read the www.gtsenergis.pl policy\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzBiuroPrasowePL() {
	komunikat = '';
	blad = 0;

	if(!document.formularz.regulamin.checked){
		komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;

}

function sprawdzBiuroPrasoweEN() {
	komunikat = '';
	blad = 0;
	if(!document.formularz.regulamin.checked){
		komunikat += "* Please state that you have read the www.gtsenergis.pl policy\n";
		blad++;
	}
	
	if(blad > 0)
	{
		alert(komunikat);
		return false;
	}
	else
		return true;
}

function sprawdzZgodeFormularzKariera(){
	if(document.formularz.zgoda.checked == true){
		document.formularz.wyslij.disabled=false;
	} else {
		document.formularz.wyslij.disabled=true;
	}
}

function closePopup(lang){
	if(document.popupform.nopopup.checked){
		var now = new Date();
		fixDate(now);
		now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
		setCookie("blockpopup"+lang, document.popupform.nopopup.value, now);
		}
	document.getElementById("popup").style.visibility = "hidden";
	}
	
function showPopup(){
	document.getElementById("popup").style.visibility = "visible";
	}

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

	function changeTitlePL(selectField){
	
		if(selectField.value == 1){
		
			document.getElementById('p1name').innerHTML = "Numer faktury *";			
			document.getElementById('p1').style.visibility = "visible";	
			document.getElementById('p3').style.visibility = "visible";	
		
		} else if(selectField.value == 2){

			document.getElementById('p1name').innerHTML = "Reklamowany okres *";
			document.getElementById('p1').style.visibility = "visible";	
			document.getElementById('p3').style.visibility = "visible";	
	
		} else {
		
			document.getElementById('p1').style.visibility = "hidden";	
			document.getElementById('p3').style.visibility = "hidden";	

		}
	
	}
	
	function changeTitleEN(selectField){
	
		if(selectField.value == 1){
		
			document.getElementById('p1name').innerHTML = "Invoice number *";			
			document.getElementById('p1').style.visibility = "visible";	
			document.getElementById('p3').style.visibility = "visible";	
		
		} else if(selectField.value == 2){

			document.getElementById('p1name').innerHTML = "Complaint Period *";
			document.getElementById('p1').style.visibility = "visible";	
			document.getElementById('p3').style.visibility = "visible";	
	
		} else {
		
			document.getElementById('p1').style.visibility = "hidden";	
			document.getElementById('p3').style.visibility = "hidden";	

		}
	
	}
	
	function openFormContact() {
	    okno=window.open('fast_contact_form_mail.php',"SCREEN","resizable=yes,scrollbars=yes, width=440, height=340");
	}
	
	function valdateFormContact() {	
		var blad = 0;
		var komunikat = "";
		if(document.fast_contact_form.nazwa_firmy.value == ""){
			komunikat += "* Proszę wpisać nazwę firmy\n";
			blad++;
		}		
		
		if(document.fast_contact_form.mail_tel.value == ""){
			komunikat += "* Proszę wpisać adres e-mail lub telefon \n";
			blad++;
		}
		
		if(!document.fast_contact_form.regulamin.checked){
			komunikat += "* Proszę zaznaczyć, że zapoznał się Pan/Pani z treścią Regulaminu Serwisu Internetowego www.gtsenergis.pl\n";
			blad++;
		}
		
		if(blad > 0) {
			alert(komunikat);
			return false;
		}
		else {
			return true;
		}
	}