   function step3() {
    document.getElementById('ind').style.display='block';
    document.getElementById('col').style.display='none'
   }
   function step4() {
    document.getElementById('ind').style.display='none';
    document.getElementById('col').style.display='block'
   }
   function exibitN() {
    document.getElementById('exib').style.display='none';
   }
   function exibitY() {
    document.getElementById('exib').style.display='block'
   }

   function hozN(id) {
    document.getElementById('vlasnik'+id).style.display='none';
   }
   function hozY(id) {
    document.getElementById('vlasnik'+id).style.display='block'
   }
   function Recommend(id){
   	var form=document.forms['step3Form'];
	var recommend=parseInt(form['recommend'].value);
	form['recommend'].value=id;
	if(recommend!=0){
		form['recommend'+recommend][1].checked=true;
	}
   }
   function notRecommend(id){
   	var form=document.forms['step3Form'];
	var recommend=parseInt(form['recommend'].value);
	if(recommend==id){
		form['recommend'].value=0;
	}	
   }
   
    function isEmail(str_value)
			{
				var reg_exp=/^[0-9a-z][\w\.-]*@[a-z]+\.[a-z]{2,4}/i;	
				if(reg_exp.test(str_value)) return true;
				reg_exp=/^[0-9a-z][\w\.-]*@[\w\.-]+\.[a-z]{2,4}/i;	
				return reg_exp.test(str_value);
			}
	function addProject(el){
		var form=el.form;
		var next=0;
		for(var i=1;i<=7;i++){
			if(form["project_"+i].value==0){
				next=i;
				break;
			}
		}
		var count_projects= parseInt(form["count_projects"].value)+1;
		form["count_projects"].value=count_projects;
		form["project_"+next].value=1;
		document.getElementById('project'+next).style.display='block';
		if(count_projects>=7){
			el.style.display='none';
		}
		
	}
	function rempoveProject(id){
			var form=document.forms['step3Form'];
			var count_projects= parseInt(form["count_projects"].value)-1;
			form["count_projects"].value=count_projects;
			form["project_"+id].value=0;
			document.getElementById('project'+id).style.display='none';
			document.getElementById('add_btn').style.display='';
			notRecommend(id);
	}
	
	function rempoveProject(id){
			var form=document.forms['step3Form'];
			var count_projects= parseInt(form["count_projects"].value)-1;
			form["count_projects"].value=count_projects;
			form["project_"+id].value=0;
			document.getElementById('project'+id).style.display='none';
			document.getElementById('add_btn').style.display='';
			notRecommend(id);
	}
	function ReloadCaptcha(el){
		document.getElementById(el).style.background='url(/secretkey.php?id='+Math.random()+') left no-repeat';	
	}
	
function jqUploaderErrorMessage(message){
	alert(message);
}


function saveUploadedFile(containerId,filename,session_id){
	var arr=filename.toLowerCase().split('.');
	var ext=arr[arr.length-1];
	filename=containerId+'.'+ext;

	$this= $('#'+containerId).hide();
	$this1=$('#'+containerId+'_div');
	var html='<a href="/download.php?file=/files/tmp/'+session_id+'/'+filename+'" style="color:#686868; font-size:11px;">'+filename+'</a> <a href="javascript:;" onclick="javascript:deleteUploadedFile('+"'"+containerId+"','"+filename+"'"+')"><img src="/_img/delete.gif"></a>';
	if(!$this1[0])
		$('<div>').insertAfter($this).attr({id:containerId+'_div'}).html(html);
	else
		$this1.html(html);
}

function removeUploadedFile(containerId,filename,session_id,url){
		$.post(url, { id:containerId,request:'deletefile',session_id: session_id, filename: filename },
		  function(data){
			 $this= $('#'+containerId+'_div').empty();
			 $('#'+containerId).show();
		  });
}
  function checkDate(day,month,year) {
	   
	day=parseInt(day);
	month=parseInt(month);
	year=parseInt(year);
	
	var testDate = new Date(year,month-1, day);
	return ((testDate.getDate() == day)&&((testDate.getMonth() + 1) == month)&&(testDate.getFullYear() == year));
}

function checkDatePassport(day,month,year) {
	day=parseInt(day);
	month=parseInt(month);
	year=parseInt(year);
	var testDate = new Date(year,month-1, day);
	var date1 = new Date(1983,0,1);
	var date2 = new Date(1992,11,31);
	return ((testDate.getMilliseconds()>=date1.getMilliseconds())&&(testDate.getMilliseconds()<=date2.getMilliseconds()));
}
function checkDateBirthday(day,month,year) {
	day=parseInt(day);
	month=parseInt(month);
	year=parseInt(year);
	var testDate = new Date(year,month-1, day);
	var date1 = new Date(year-35,month-1, day);
	var date2 = new Date(year-16,month-1, day);
	return ((testDate.getMilliseconds()>=date1.getMilliseconds())&&(testDate.getMilliseconds()<=date2.getMilliseconds()));
}
var requiredMajorVersion = 9;
var requiredMinorVersion = 0;
var requiredRevision = 0;
			  $(document).ready(function(){
					$('#jsExclude').css('display','none');
					$('#jsInclude').css('display','');
					if (AC_FL_RunContent == 0 || DetectFlashVer == 0||GetSwfVer()==-1) {
						$('#jsInclude').css('display','none');
						$('#flashExclude').css('display','');
					}
			   });


