	function gShowTermsConditions(link_path){
		window.open(link_path+'termeni-si-conditii.php','gShowTermsConditions','top=0,left=0,scrollbars=1,resizable=1');
	}
	function gShowDefinition(word){
		alert('Acum afisam definitia pentru "'+word+'".');
	}
	function gShowPresentation(){
		window.open('prezentare.html','gPrezentare','top=100,left=150, width=900, height=700, scrollbars=1,resizable=1');
	}
	
	function gShowAllUsersRows(i){						
		if (document.add_pj.soft_type[1].checked) {
			for (i=0;i<work_places_no;i++) {
				deleteInput();
			}
			display();					
			gShowUsersRows();
		}		
	}
	
	function gShowUsersRows(){
		work_places_no = parseInt(document.getElementById('work_places').value);		
		if (work_places_no<=15 && (!isNaN(work_places_no)) ) {
			for (i=0;i<work_places_no;i++) {
				deleteInput();
			}
			for (i=0;i<work_places_no;i++) {													
				addInput();												
			}
			
		}
	}

	function gHideUsersRows() {
		work_places_no = parseInt(document.getElementById('work_places').value);		
		if (work_places_no<=15 && (!isNaN(work_places_no)) ) {
			for (i=0;i<work_places_no;i++) {
				deleteInput();
			}
			display();
		}
		 document.getElementById('users_rows').visibility='hidden';
		 document.getElementById('users_rows').position='absolute';
	}
	
	
var arrInput = new Array(0);
var arrInputValue = new Array(0);

function addInput() {
  arrInput.push(arrInput.length);
  arrInputValue.push("");
  display();
}

function display() {
  document.getElementById('users_rows').innerHTML="";
  for (intI=0;intI<arrInput.length;intI++) {
    document.getElementById('users_rows').innerHTML+=createInput(arrInput[intI], arrInputValue[intI]);
  }
}

function saveValue(intId,strValue) {
  arrInputValue[intId]=strValue;
}  

function createInput(id,value) {
	x = id+1;
  return " <label for='soft_type' class='gRequired'>Utilizatori Pct. Fact."+x+"</label><div class='gFormInputWrap'><input type='text' name='user_work_places[]' class='gFormInput' maxlength='2' style='width:30px;' id='user_work_places_"+ id +"' onChange='javascript:saveValue("+ id +",this.value)' onfocus='this.className=\"gFormInputFocus\";' onblur='this.className=\"gFormInput\";' value='"+ value +"'></div>";
}

function deleteInput() {
  if (arrInput.length > 0) { 
     arrInput.pop(); 
     arrInputValue.pop();
  } 
}