//////////////////////////////////////////////////////////////////////////////////////////////////////////////
																		//
var d = document;																//
																		//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

var msg='';
	function fonload() {
		if(msg!=''){alert(msg);}
		if (d.getElementById('sbmenu')) {
			contentHeight=d.getElementById('content').offsetHeight;
			sbmenuHeight=d.getElementById('sbmenu').offsetHeight;
			postHeight=d.getElementById('post') ? d.getElementById('post').offsetHeight : 0 ;
			contactsHeight=d.getElementById('contacts').offsetHeight;
			if (contentHeight>(sbmenuHeight+postHeight+contactsHeight)) {
				raznica=contentHeight-postHeight-contactsHeight-sbmenuHeight;
				d.getElementById('contacts').style.marginTop=raznica+'px';
			}
			d.getElementById('contacts').style.visibility='visible';
		} else {
			if(d.getElementById('contacts')){d.getElementById('contacts').style.visibility='visible';}
		}
	}
window.onload=fonload;

	var tekQ;
	function faq(num) {
		if (d.getElementById('answ'+num).className=='answ') {
			d.getElementById('answ'+num).className='answ dn';
			d.getElementById('sh'+num).className='sh_btn';
		} else {
			if(tekQ){
				d.getElementById('answ'+tekQ).className='answ dn';
				d.getElementById('sh'+tekQ).className='sh_btn';
			}
			d.getElementById('answ'+num).className='answ';
			d.getElementById('sh'+num).className='dn';
			tekQ=num;
		}
	}
	
	var mm = 0;
	var mmTO;
	function mmShow(id) {
		if (mm != id && mm > 0) {
			mmItemHide(mm);
		}
		window.clearTimeout(mmTO);
		if (d.getElementById('mm'+id)) {
			d.getElementById('mm'+id).className = '';
			d.getElementById('ifr'+id).style.height=d.getElementById('mm'+id).offsetHeight+'px';
			d.getElementById('ifr'+id).className = '';
			
			if(d.getElementById('mmlink'+id).className == 'sel'){
				d.getElementById('mmlink'+id).className = 'sel sel2';
			}
			if(d.getElementById('mmlink'+id).className == ''){
				d.getElementById('mmlink'+id).className = 'sel2';
			}
			mm = id;
		} else {
			if(d.getElementById('mmlink'+id).className == 'sel'){
				d.getElementById('mmlink'+id).className = 'sel sel2';
			}
			if(d.getElementById('mmlink'+id).className == ''){
				d.getElementById('mmlink'+id).className = 'sel2';
			}
			mm = id;
		}
	}
	function mmItemHide(id) {
		if (d.getElementById('mm'+id)) {
			d.getElementById('ifr'+id).className = 'dn';
			d.getElementById('mm'+id).className = 'dn'
			if(d.getElementById('mmlink'+id).className == 'sel sel2'){
				d.getElementById('mmlink'+id).className = 'sel';
			}
			if(d.getElementById('mmlink'+id).className == 'sel2'){
				d.getElementById('mmlink'+id).className = '';
			}
			mm = 0;
		} else {
			if(d.getElementById('mmlink'+id).className == 'sel sel2'){
				d.getElementById('mmlink'+id).className = 'sel';
			}
			if(d.getElementById('mmlink'+id).className == 'sel2'){
				d.getElementById('mmlink'+id).className = '';
			}	
			mm = 0;
		}
	}
	function mmHide(id) {
		if (d.getElementById('mm'+id) || d.getElementById('mmlink'+id)) {
			mmTO = window.setTimeout('mmItemHide('+id+')', 500);
		}
	}
	
	
	
