﻿
function put(language) {
//login_box title
if (language == 'eng')
	var title_login_box = document.createTextNode('Log in');
else
	var title_login_box = document.createTextNode('Zaloguj się');
var td_login_box = document.createElement('td');
td_login_box.appendChild(title_login_box);
document.getElementById('login_box').appendChild(td_login_box);
//login
var text_login = document.createTextNode('Login: ');
var input_login = document.createElement('input' );
input_login.setAttribute('type', 'text');
input_login.setAttribute('name', 'Slogin');
input_login.setAttribute('id', 'input_dinamic');
//input.setAttribute('name', 'person_name1');
//input.setAttribute('maxlength', '30');
var td_login = document.createElement('td');
td_login.appendChild(text_login);
td_login.appendChild(input_login);
document.getElementById('login').appendChild(td_login);
//password
if (language == 'eng')
	var text_password = document.createTextNode('Password: ');
else
	var text_password = document.createTextNode('Hasło: ');
var input_password = document.createElement('input');
input_password.setAttribute('type', 'password');
input_password.setAttribute('name', 'Spass');
input_password.setAttribute('id', 'input_dinamic');
//input.setAttribute('maxlength', '20');
var td_password = document.createElement('td');
td_password.appendChild(text_password);
td_password.appendChild(input_password);
document.getElementById('password').appendChild(td_password);
//button
var input_button = document.createElement('input');
input_button.setAttribute('type', 'submit');
input_button.setAttribute('name', 'submit');
if (language == 'eng')
	input_button.setAttribute('value', 'Log in');
else
	input_button.setAttribute('value', 'Zaloguj');
input_button.setAttribute('id', 'button_dinamic');
var td_button = document.createElement('td');
td_button.appendChild(input_button);
document.getElementById('button').appendChild(td_button);
}

function remove(parentDiv, childDiv)
{    
    var child = document.getElementById(childDiv);
    var parent = document.getElementById(parentDiv);
    parent.removeChild(child);
}

