var ActivDiv;
var ActivForm;
	
function showForm(val) {
  if(ActivDiv)
    if(ActivDiv.style.display = 'block') ActivDiv.style.display = 'none';

  ActivDiv = document.getElementById(val);
  
  var y = top.document.body.scrollTop+30;
  ActivDiv.style.top = y + "px";
  
  ActivDiv.style.display = 'block';
}

function hideForm() {
  ActivDiv.style.display = 'none';
}

function reloadwin()
{
	this.location.reload();
}
 
function saveForm(val)
{
 ActivForm = val;

 if(val.name=='login') linc = "/user/enter.php?lang="+ language +"&login="+document.getElementById('log').value+"&password="+document.getElementById('pass').value;
 if(val.name=='frogout') linc = "/user/forgot_save.php?lang="+ language +"&mail="+document.getElementById('mail').value;
 if(val.name=='new_user') { 
 	linc = "/user/new_save.php?lang="+ language +"&company="+document.getElementById('company').value+
    "&activity="+document.getElementById('activity').value+
	"&country="+document.getElementById('country').value+
	"&town="+document.getElementById('town').value+
	"&area="+document.getElementById('area').value+
	"&index="+document.getElementById('index').value+
	"&adres="+document.getElementById('adres').value+
	"&name="+document.getElementById('user_name').value+
	"&login="+document.getElementById('user_login').value+
	"&passw1="+document.getElementById('passw1').value+
	"&passw2="+document.getElementById('passw2').value+
	"&post="+document.getElementById('post').value+
	"&mail="+document.getElementById('email').value+
	"&tell="+document.getElementById('tell').value;
	linc = encodeURI(linc);
	// alert(linc);
 }

 document.getElementById('ifr').src = linc;
}

function setPosition(id) {
	document.getElementById(id).style.top = document.body.scrollTop + "px";
}

function Agree(obj)
{
	var button = document.getElementById('row_agree');
	
	if(obj.checked)
	button.style.display = 'block';
	else
	button.style.display = 'none';
	
}