/////////////////////////////////////////////////////////
function onscroll123(){
		var nov = document.getElementById('nov')
		var fon = document.getElementById('fon')
		if(nov && fon){
				nov.style.top = document.body.scrollTop
				nov.style.left = document.body.scrollLeft
				fon.style.top = document.body.scrollTop
				fon.style.left = document.body.scrollLeft
		}
}

/////////////////////////////////////////////////////////
function onresize(){
		var nov = document.getElementById('nov')
		var fon = document.getElementById('fon')
		var width = document.body.clientWidth
		var height = document.body.clientHeight
		if(nov && fon){
				nov.style.width = width
		    nov.style.height = height
		    nov.style.left = document.body.scrollLeft
		    fon.style.width = width
		    fon.style.height = height
		    fon.style.left = document.body.scrollTop
		}
		ten()
}


////////////////////////////////////////////////
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="zakryt()"><tr><td class="c m"><a href="#" onCLick="zakryt(); return(false)" title="щелчок для закрытия"><img src="'+img+'" id="img" alt="щелчок для закрытия" style="border:1px solid #bbb" /></a></td></tr></table>'
				document.body.appendChild(nov)
				fon()
}


/////////////////////////////////////////////////////////
function fon(){
		var fon = document.createElement('div')
				fon.setAttribute("id","fon")
		    fon.style.position = 'absolute'
				fon.style.backgroundColor = '#000'
  			fon.style.opacity = '.6'
		  	fon.style.filter = 'alpha(opacity=60)'
		    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)
				var selectList = document.getElementsByTagName("SELECT");
				for(var i = 0^; i<selectList.length^; i++){
						if(selectList[i].form.name!='nov_form'){
								selectList[i].style.visibility='hidden'
						}
				}
}

/////////////////////////////////////////////////////////
function zakryt(){
		if(document.getElementById('nov')){
				document.getElementById('nov').parentNode.removeChild(document.getElementById('nov'))
		}
		if(document.getElementById('fon')){
				document.body.removeChild(document.getElementById('fon'))
		}
		var selectList = document.getElementsByTagName("SELECT");
		for(var i = 0^; i<selectList.length^; i++){
				selectList[i].style.visibility='visible'
		}
}

/////////////////////////////////////////////////////////
function fixPNG(element,margin){
		if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){
		    if(element.tagName=='IMG'){
						element.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ element.src +"',sizingMethod=scale)"
						element.src = "/include/images/null.gif"
				} else {
				    var backimg = element.style.backgroundImage
				    var regexp = /url\((.+)\)/
				    var url = backimg.match(regexp)
						element.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ url[1] +"',sizingMethod=scale)"
						element.style.backgroundImage = ''
				}
				if(margin){ element.style.marginTop = "3px" }
		}
}

/////////////////////////////////////////////////////////
function menu(v){
		document.getElementById(v).style.display = document.getElementById(v).style.display == 'none' ? 'block' : 'none'
}

/////////////////////////////////////////////////////////
function isEmail(sEmail){
  	if(/([^^@]+)@(.+)\.(.+)/.test(sEmail)){ return(1) } else { return(0) }
}
