var agt=navigator.userAgent.toLowerCase();
function printArticle() {
	var prn = new Image();
	
	if (window.print) {
		setTimeout('window.print();',200);
	}
	else if (agt.indexOf("mac") != -1) {
		alert("Press 'Cmd+p' on your keyboard to print article.");
	}
	else {
		alert("Press 'Ctrl+p' on your keyboard to print article.")
	}
}

function mOvr(src,clrOver){if (!src.contains(event.fromElement)){src.style.cursor = "hand";src.bgColor = clrOver;}} function mOut(src,clrIn){if (!src.contains(event.toElement)){src.style.cursor = "default";src.bgColor = clrIn;}}

function mClk(src){if(event.srcElement.tagName=="TD"){src.children.tags("A")[0].click();}}

  opera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
  ie = (document.all && !opera)? true : false;
  dom = (document.getElementById)? true : false;


function getRelLeft(which) {
	var elem = document.all[which];
	var pos = elem.offsetLeft;
	while (elem.offsetParent != null) {
		elem = elem.offsetParent;
		pos += elem.offsetLeft;
		if (elem.tagName == 'BODY') break;
	} 
	return pos;
    }

		
function getRelTop(which) {
	var elem = document.all[which];
	var pos = elem.offsetTop;
	while (elem.offsetParent != null) {
		elem = elem.offsetParent;
		pos += elem.offsetTop;
		if (elem.tagName == 'BODY') break;
	} 
	return pos;
    }

function doOnMouseOver(what) {

         if(what == "1") {
//              CloseBox("2");
//              CloseBox("3");
         } 
         if(what == "2") {
//              CloseBox("1");
//              CloseBox("3");
         } 
				 eval("intusr").style.color = "#f00";
				 eval("intusr").style.cursor = "hand";
         eval("links" + what).style.left = getRelLeft("intusr")+180; // сдвиг по горизонтали
         eval("links" + what).style.top = getRelTop("intusr")+48;    // Отступ по вертикали
         eval("links" + what).is_open = true;
         eval("links" + what).style.display = "block";
  }

function doOnMouseOut(what,flag) {
           eval("links" + what).is_open = false;
					 eval("intusr").style.color = "#69f"; // сдвиг по горизонтали
           setTimeout('CloseBox(' + what + ', "' + flag + '")',400);
  }

function CloseBox(what,flag) {
//					 if (flag == 'on') eval("gm" + what).style.background = "url(/i/all" + (what-1) + "_on.gif)";
           if(!eval("links" + what).is_open) {
                eval("links" + what).style.display = "none";
           }
  }
	
	
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function GetXY(el) {
	for(var xy=[0,0];el;el=el.offsetParent){
	xy[0]+=el.offsetLeft;
	xy[1]+=el.offsetTop;
	} 
return(xy);
}