// JavaScript Document
// <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

function swap_img(img_src) {
  var obj = document.getElementById('kontainer');
	obj.src = img_src;
}

function guestbook_send(guestbook, ime, comment) {
     var what = "Въведете име и мнение!";
     var obj = document.getElementById(guestbook);	 
	   var ime = document.getElementById(ime);	 
     var comment = document.getElementById(comment);	 

  if ((ime.value == "") || (ime.value == "Вашето име") || (comment.value == "") || (comment.value == "Вашето мнение")) {
    alert (what);
		return false;
   } else {
    obj.submit();
  }
}

function clear_ime() {
	var obj = document.getElementById('guestbook');
	obj.ime.value = "";
}
function clear_comment() {
	var obj = document.getElementById('guestbook');
	obj.comment.value = "";
}


function clear_ime2() {
	var obj = document.getElementById('mail');
	obj.ime.value = "";
}
function clear_email() {
	var obj = document.getElementById('mail');
	obj.email.value = "";
}
function clear_message() {
	var obj = document.getElementById('mail');
	obj.message.value = "";
}


function guestbook_send_en(guestbook, ime, comment) {
     var what = "Tipe your name and opinion!";
     var obj = document.getElementById(guestbook);	 
	   var ime = document.getElementById(ime);	 
     var comment = document.getElementById(comment);	 

  if ((ime.value == "") || (ime.value == "Your name") || (comment.value == "") || (comment.value == "Your opinion")) {
    alert (what);
		return false;
   } else {
    obj.submit();
  }
}


function sh_div(what) {
	 var i=0;
	 var coll = [];
	 while (document.getElementById('d'+ i)) {
	  coll[i] = document.getElementById('d'+ i);
		i++;
	 }
 obj = document.getElementById(what);
 var i=0;
 if (obj.className == 'off') {
	 while (coll[i]) {
		coll[i].className = 'off';
		i++;
		} 
	obj.className = 'on';
 } else {
	obj.className = 'off';
 }
}