function mailto(whe, who) {window.open('mailto:'+who+'@'+whe, '_top')}

function slize(id){
      $('#'+id).toggle("slow");   
 };

 var last=1;
 function ch(id){	
	document.getElementById('m_'+last).style.color='#f15922';
	document.getElementById('m_'+last).style.borderBottom='1px dashed #f15922';
	
	document.getElementById('d_'+last).style.display='none';
	
	//document.getElementById('bl_1_'+last).src='img/bl.jpg';
	//document.getElementById('bl_3_'+last).src='img/bl.jpg';
	document.getElementById('bl_2_'+last).style.background='url(img/bl.jpg)';
	
	
	document.getElementById('m_'+id).style.color='white';
	document.getElementById('m_'+id).style.borderBottom='none';
	
	document.getElementById('d_'+id).style.display='block';
	
	//document.getElementById('bl_1_'+id).src='img/m1.jpg';
	//document.getElementById('bl_3_'+id).src='img/m3.jpg';
	document.getElementById('bl_2_'+id).style.background='#F15922';
	
	
	last=id;
 }
 

 function pc(id){
	document.getElementById('pc_'+lastpc).style.background='none';
	
	document.getElementById('avtor').innerHTML=vhoo[id];
	document.getElementById('datet').innerHTML=when[id];
	document.getElementById('pc_'+id).style.background='url(img/malevich.jpg) no-repeat center';
	document.getElementById('tot_samiy').src='img/usr/photo'+id+'.jpg';
	lastpc=id;
 }
 
 
 var left = 0;
 function to_right(){
	left = left + 140;
	//document.getElementById('polznok').style.marginLeft = ''+left+'px';
	
	
      $("#polznok").animate({"marginLeft": "+=140px"}, "slow");


	
	if(left==-maxscr+140){
		document.getElementById('lb1').style.display='inline';
	}
	if(left==0){
		document.getElementById('rb1').style.display='none';
	}

 }
 
 
 function to_left(){
	left = left - 140;
	//document.getElementById('polznok').style.marginLeft = ''+left+'px';
	$("#polznok").animate({"marginLeft": "-=140px"}, "slow");
	if(left==-140){
		document.getElementById('rb1').style.display='inline';
	}
	if(-left==maxscr){
		document.getElementById('lb1').style.display='none';
	}
 }
 
 function do_photo(){
	//document.getElementById('photoisit')
 }
 
 function file_change(obj){
	//console.dir(obj);
palka = "\ ";
palka = palka.substring(0,1);
ext = obj.value;
ext=ext.substring(0,ext.length);
	//console.dir(ext);
	i=0;
	while(ext.indexOf(palka)!=-1){
		ext=ext.substring(ext.indexOf(palka),ext.length);
		if(i++==100) break;
	}
	if(ext.length>0){
		document.getElementById('prphoto').style.display='none';
		document.getElementById('zagr').style.display='inline';
		document.getElementById('zagr').innerHTML = ext;
	}
 }