// JavaScript Document
<!--
var i, cel_var_meniu, cel_var_corp;
	
function selChange(n) {
	var str = "";
	for(i = 1; i <=n; i++){
	   str += "<input name=\"n"+ i +"\"  type=\"file\" tabindex=\"1\" size=\"30\"><br>";
	}
	document.getElementById("client_fisiere").innerHTML = str;
}

function resetClient(){
	selChange(0);
}

function changeCat(i){
	ind = document.getElementById(i).selectedIndex;
	document.getElementById("c_ro").selectedIndex = ind;
	document.getElementById("c_ru").selectedIndex = ind;
	document.getElementById("c_en").selectedIndex = ind;
}

function changeSite(i){
	ind = document.getElementById(i).value;
	document.getElementById("s_ro").value = ind;
	document.getElementById("s_ru").value = ind;
	document.getElementById("s_en").value = ind;
}

var te;
te = 1;
function atach_file(){
    var q = te;
	q = q+1;
	document.getElementById("n_h").value = te;
	var str = "";
	   str += "<input name=\"n"+ te +"\"  type=\"file\" tabindex=\"1\" size=\"30\" onchange=\"atach_file()\"><br><span id=\"s"+q+"\" ></span>";
	document.getElementById("s"+te+"").innerHTML += str;
	te = te + 1;
}
function remove_file(i){
//	i =i;
	document.getElementById("s"+i+"").innerHTML = '';
	te = te - 1;
}
function screenSize(h1,w1) {
    var w, h; // Объявляем переменные, w - длина, h - высота
    w = (window.innerWidth ? window.innerWidth : (document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.offsetWidth));
    h = (window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight));
	w = w - w1;
	h = h - h1;
	if (w<0) {w=0};
	if (h<0) {h=0};
    return {w:w, h:h};
}
function schimbaLimba(limba){
	var l , lim ;
	l = window.location.href;
	lim = l.search ('lang=');
	if (lim == -1) {
		l = l + '?lang=ro';
	}
	l = l.replace ( 'lang=ro', 'lang='+limba );
	l = l.replace ( 'lang=ru', 'lang='+limba );
	l = l.replace ( 'lang=en', 'lang='+limba );
	document.write(l);
}
//-->
