if (window.XMLHttpRequest){ 
	    xmlhttp=new XMLHttpRequest() 
} 
else if (window.ActiveXObject){ 
	    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP") 
	     
}

function SetJurisdiction(nr) { 
      	    for(i = 1; i<=4; i++){
            if(i==nr){
                document.getElementById("country_"+nr).style.display = 'block'; 
                document.getElementById("menu_right_"+nr).className = 'current'; 
            }
            else{
                  document.getElementById("country_"+i).style.display = 'none'; 
                  document.getElementById("menu_right_"+i).className = ''; 
            }
        }
       //makeScrollbar( $('british'), $('scrollbarbritish'), $('handlebritish') );
       //makeScrollbar( $('zeland'), $('scrollbarzeland'), $('handlezeland') );
} 

function SetContentJurisdiction(nr) { 
        //alert(nr);
	    xmlhttp.open("GET", "set_jurisdiction_id.php?id=" + nr); 
	    xmlhttp.onreadystatechange = function() { 
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
               document.location.href = "jurisdiction.php";
	        } 
	    } 
	    xmlhttp.send(null); 
} 


function SetServices(nr) { 
	    for(i = 1; i<=7; i++){
            if(i==nr){
                document.getElementById("services_"+nr).style.display = 'block';  
                document.getElementById("menu_right_"+nr).className = 'current'; 
            }
            else{
                  document.getElementById("services_"+i).style.display = 'none'; 
                  document.getElementById("menu_right_"+i).className = ''; 
            }
        }
        //makeScrollbar( $('trust'), $('scrollbartrust'), $('handletrust') );
} 

function SetContentServices(nr) { 
	    xmlhttp.open("GET", "set_services_id.php?id=" + nr); 
	    xmlhttp.onreadystatechange = function() { 
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
               document.location.href = "services.php";
	        } 
	    } 
	    xmlhttp.send(null); 
} 

function ShowPersonal(nr) { 
	    for(i = 1; i<=6; i++){
            if(i==nr){
                document.getElementById("personal_"+nr).style.display = 'block'; 
                document.getElementById("menu_right_"+nr).className = 'current'; 
            }
            else{
                  document.getElementById("personal_"+i).style.display = 'none'; 
                  document.getElementById("menu_right_"+i).className = ''; 
            }
        }
} 

var row_lines = 1;
function AddPublication(){
    var main_container = document.getElementById('more_lines');
    var div1    = document.createElement("div");
    var input1  = document.createElement("input");
    
    div1.setAttribute('id', 'publication_text62');
    
    input1.type =  'file'; 
    input1.name = 'picture['+row_lines+']';
    input1.setAttribute('id', 'publication_file');
    
    div1.setAttribute('style', 'height:25px');

    div1.appendChild(input1);
    main_container.appendChild(div1);
    row_lines++;
    
    document.getElementById('add').style.height ="360px";
    document.getElementById('scrollbaradd').style.visibility = 'visible'; 
    makeScrollbar( $('add'), $('scrollbaradd'), $('handleadd') );
    
    var objDiv = document.getElementById("add");
    objDiv.scrollTop = objDiv.scrollHeight;
    //objDiv.scrollTo(0,objDiv.scrollHeight);
}

function EditPublication(){
    var main_container = document.getElementById('more_lines');
    var div1    = document.createElement("div");
    var input1  = document.createElement("input");
    
    div1.setAttribute('id', 'publication_text62');
    
    input1.type =  'file'; 
    input1.name = 'picture['+row_lines+']';
    input1.setAttribute('id', 'publication_file');
    
    div1.setAttribute('style', 'height:25px');

    div1.appendChild(input1);
    main_container.appendChild(div1);
    row_lines++;
    
    document.getElementById('edit').style.height ="360px";
    document.getElementById('scrollbaredit').style.visibility = 'visible'; 
    makeScrollbar( $('edit'), $('scrollbaredit'), $('handleedit') );
       
    
    var objDiv = document.getElementById("edit");
    objDiv.scrollTop = objDiv.scrollHeight;
    //objDiv.scrollTo(0,objDiv.scrollHeight);
}