﻿function popup(strona){
	popwin = window.open(strona, '', 'left=100,top=100,width=500,height=459,toolbar=no,menubar=no,location=no,resize=no,noresize,scrollbars=yes');
	popwin.focus()
}

        function displayImage(img,width,height) {
                window.open("/show_picture.php?foto=" + img,null,"height=" + (height + 20) + ",width=" + (width + 20) + ",status=yes,toolbar=no,menubar=no,location=no"); 
        }


image1 = new Image();
image1.src = "/img/powrot_on.gif"; 
image2 = new Image();
image2.src = "/img/wiecej_on.gif";
image3 = new Image();
image3.src = "/img/szukaj_on.gif";
image4 = new Image();
image4.src = "/img/dogory_on.gif";

  var editStarted = false;
  var editStarted2 = false;

  function gotFocus() {
    if (document.getElementById && (editStarted == false)) {
      var obj = document.getElementById("user_login");

      if (obj) {
        obj.value = "";
      }
    }
  }
  
  function gotFocus2() {
    if (document.getElementById && (editStarted2 == false)) {
      var obj = document.getElementById("email_login");

      if (obj) {
        obj.value = "";
      }
    }
  }  

  function loginChange() {
    editStarted = true;
  }
  
  function mailChange() {
    editStarted2 = true;
  }  

  function loginUser() {
    if (document.getElementById) {
      var formLogin = document.getElementById("login");
      
      if (formLogin) {
        formLogin.submit();
      } else {
        alert ("Login form doesn't found.");
      }
    } else {
      alert("Your browser does not support >document.getElementById< funtion.");
    }
  }
  
  function loginMail() {
    if (document.getElementById) {
      var formLogin = document.getElementById("login_reminder");
      
      if (formLogin) {
        formLogin.submit();
      } else {
        alert ("Login reminder form doesn't found.");
      }
    } else {
      alert("Your browser does not support >document.getElementById< funtion.");
    }
  } 
  
  function dodajDoUlubionych() {
	if (window.external){
		window.external.Addfavorite('http://lovetrap.pl/','Love Trap')
	}
	else{
		alert('Twoja przeglądarka nie obsługuje tej funkcji - proszę dodaj stronę do ulubionych manualnie');
	}
  } 
  
  function redStrzalaOver(id){
  	document.getElementById(id).src = '/img/strzala_up.gif';
  }
  function redStrzalaOut(id){
  	document.getElementById(id).src = '/img/strzala.gif';
  }
  function blankStrzalaOver(id){
  	document.getElementById(id).src = '/img/strzala.gif';
  }
  function blankStrzalaOut(id){
  	document.getElementById(id).src='/img/blank.gif';
  }

