function menu(podmenu){
if(document.getElementById(podmenu).style.display=='none'){
		document.getElementById(podmenu).style.display='block'}
else{
		document.getElementById(podmenu).style.display='none'}
}

function proverka(){
		if(document.forms[0].imya.value == ''){alert('Пожалуста, введите Ваше имя'); document.forms[0].imya.focus()}
		else{
				if(document.forms[0].vozrast.value == ''){alert('Пожалуста, введите Ваш возраст'); document.forms[0].vozrast.focus()}
				else{
						if(document.forms[0].vopros.value == ''){alert('Пожалуста, введите Ваш вопрос'); document.forms[0].vopros.focus()}
						else{document.forms[0].submit()}
				}
    }
}

function vopros(){
		document.getElementById('vopros_form').style.left=document.body.clientWidth/2-450;
		document.getElementById('vopros_form').style.top=document.body.clientHeight/2-300;
}

function zakryt(){
		document.getElementById('vopros_form').style.top='-1000'
}


function zakrytImg(){
		document.body.removeChild(document.getElementById('nov'))
		document.body.removeChild(document.getElementById('fon'))
}

////////////////////////////////////////////////
function prosmotr(img){
    var nov = document.createElement('div')
				nov.setAttribute("id","nov")
		    nov.style.position = 'absolute'
		    nov.style.zIndex = '100'
		    nov.style.width = document.body.clientWidth
		    nov.style.height = document.body.clientHeight
		    nov.style.left = document.body.scrollLeft
		    nov.style.top = document.body.scrollTop
				nov.innerHTML = '<table class="w100 h100" onClick="zakrytImg()"><tr><td class="c m"><a href="#" onCLick="zakrytImg(); return(false)" title="щелчок для закрытия"><img src="'+img+'" id="img" alt="щелчок для закрытия" style="border:1px solid #bbb; cursor:url(/include/images/zoomout.cur),pointer" /></a></td></tr></table>'
				document.body.appendChild(nov)
				fon()
}

/////////////////////////////////////////////////////////
function fon(){
		if(document.getElementById('fon')){
    		document.body.removeChild(document.getElementById('fon'))
		}
		var fon = document.createElement('div')
		    fon.setAttribute("id","fon")
		    fon.style.position = 'absolute'
				fon.style.backgroundColor = '#000'
  			fon.style.opacity = '.65'
		  	fon.style.filter = 'alpha(opacity=65)'
		    fon.style.width = document.body.clientWidth
		    fon.style.height = document.body.clientHeight
		    fon.style.left = document.body.scrollLeft
				fon.style.top = document.body.scrollTop
				document.body.appendChild(fon)
}

//function prosmotr(img){
//    var nov = document.createElement('div')
//				nov.setAttribute("id","nov")
//		    nov.style.position = 'absolute'
//		    nov.style.zIndex = '100'
//		    nov.style.left=document.body.clientWidth/2-200
//				nov.style.top=document.body.scrollTop+document.body.clientHeight/2-350
//				nov.innerHTML = '<a href="#" onCLick="zakrytImg(); return(false)" title="щелчок для закрытия"><img src="'+img+'" alt="щелчок для закрытия" /></a>'
//				document.body.appendChild(nov)
//		var fon = document.createElement('div')
//				fon.setAttribute("onClick","zakrytImg()")
//				fon.setAttribute("id","fon")
//		    fon.style.position = 'absolute'
//				fon.style.backgroundColor = '#000'
//   			fon.style.opacity = '.7'
//		  	fon.style.filter = 'alpha(opacity=70)'
//		    fon.style.width = '100%'
//		    fon.style.height = '100%'
//		    fon.style.left = '0'
//				fon.style.top = '0'
//				document.body.appendChild(fon)
//}
