function sendme(adr)
{
	location.href = "mailto:" + adr + "@insei.ru";
	return false;
}

/*  sveta */

function wopen(picname,ww,hh) {
  positionCode='';
  if (v>=4) {
    sw=screen.width; sh=screen.height;
    wbx=Math.round((sw-ww)/2); wby=Math.round((sh-hh)/2);
    if (isExplorer) positionCode='left='+wbx+',top='+wby+',';
    if (isNetscape) positionCode='screenX='+wbx+',screenY='+wby+',';
  }

  page=window.open("",'','width='+ ww +',height='+ hh +','+positionCode+'toolbar=0,'+'scrollbars=0,'+'resizable=0');
  page.document.open();
pagecode = '<BODY STYLE="margin: 0px; padding: 0px" bgcolor="#ffffff"><img src="'+ picname +'" ></BODY>';
page.document.write(pagecode);
page.document.close();
  if (isNetscape && v>=3) newWindow.focus();
}











$(document).ready(function(){

	$("ul.mainNavBar > li").each(function () {
		var index = $("ul.mainNavBar > li").index(this);
		$(this).addClass("lItem_"+index);
	});

	$("a.prev img").hover(
	function() {
		$(this).attr("src","/img/larr_link_hover.gif");
		},
	function() {
		$(this).attr("src","/img/larr_link.gif");
	});

	$("a.next img").hover(
	function() {
		$(this).attr("src","/img/rarr_link_hover.gif");
		},
	function() {
		$(this).attr("src","/img/rarr_link.gif");
	});

	$("ul.lastIt li:last-child").addClass("last");
	$("body table.actions:last-child").addClass("last");

	$(window).resize(function () {
		$(".mainNavBar > li div.under").each( function () {
			$div = $(this);
			 var liwidth = $div.parent().width();
			 var mlinkwidth = $div.prev().width();
			 var finalwidth = liwidth - (mlinkwidth+22);
			 var underwidth = $div.width();
			 $div.css({
				"left" : finalwidth/2		
			});
		 $div.children("img.tricks").attr("width",mlinkwidth+20);
		 $div.children("div.underBg").width(underwidth+2);
		});
	}).resize();

	$("a.link2send").click( function() {
		$("div.linkBox").slideToggle();
		return false;
	});

	$("a.close").click( function() {
		$("div.linkBox").slideToggle();
		return false;
	});

	// Stroke Navigation 
	$(".strokeBox ul").hover(	function() {
		$(this).addClass("hover");
	}, function() {
		$(this).removeClass("hover");
	});

	// Check Boxes 
	$("INPUT.label_highlight").livequery("click",function(){
		if (this.checked) {
			$("label[for='"+this.id+"']").addClass("b");
			$("tr[class*='"+this.id+"_sect']").hide();
			$("tr[class*='"+this.id+"_sectShow']").show();
		}
		else {
			$("label[for='"+this.id+"']").removeClass("b");
			$("tr[class*='"+this.id+"_sect']").show();
			$("tr[class*='"+this.id+"_sectShow']").hide();
		}
	});

	// Even elements
	$("ul.licenceList li:even").addClass("even");

});