function getBrowserInfo() {
 var t,v = undefined;
 if (window.opera) t = 'Opera';
 else if (document.all) {
  t = 'IE';
  var nv = navigator.appVersion;
  var s = nv.indexOf('MSIE')+5;
  v = nv.substring(s,s+1);
 }
 else if (navigator.appName) t = 'Netscape';
 return {type:t,version:v};
}
 
function bookmark(a){
 var url = window.document.location;
 var title = window.document.title;
 var b = getBrowserInfo();
 if (b.type == 'IE' && 7 > b.version && b.version >= 4) window.external.AddFavorite(url,title);
 else if (b.type == 'Opera') {
  a.href = url;
  a.rel = "sidebar";
  a.title = url+','+title;
  return true;
 }
 else if (b.type == "Netscape") window.sidebar.addPanel(title,url,"");
 else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки.");
 return false;
}



var n = (document.layers) ? 1 : 0; var inside = 0; var our_obj = 0; var was_cursor_init = 0;

function cursorInit(){
	maper = new marker('hint');
	if (n) document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove = move;
	was_cursor_init = 1;
}
function b_moveIt(x,y){
	this.x = x; this.y = y;
	lay.left = this.x; lay.top = this.y;
}
function marker(obj){
	lay = (n)?eval('document.'+obj):eval('document.all.'+obj+'.style');
	this.x = (n)?lay.left:lay.pixelLeft; this.y = (n)?lay.top:lay.pixelTop;
	this.moveIt = b_moveIt; return this;
}
function move(e){
	our_obj = e;
	if (inside == 1) {
		x = n ? e.pageX : event.x+document.body.scrollLeft;
		y = n ? e.pageY : event.y+document.body.scrollTop;
		maper.moveIt(x-70, y+15);
	}
}
function Show(help){	inside = 1;
	if ( was_cursor_init == 0 ) cursorInit(); if (our_obj != 0) move(our_obj);
	if (n) {
		if (help) {
		document.layers["hint"].document.open();
		document.layers["hint"].document.writeln('<table width=165 border=1 cellpadding=2 cellspacing=0 bordercolordark=#FEF5DC><tr><td class=ahint>' + help +'</td></tr></table>');	
		document.layers["hint"].document.close();
		document.layers["hint"].visibility = "visible";	}
	} else {
		if (help) {
		document.all("hint").innerHTML = '<table width=165 border=1 cellpadding=2 cellspacing=0 bordercolordark=#FEF5DC><tr><td class=ahint>' + help +'</td></tr></table>';	
		document.all.hint.style.visibility = "visible"; }
	}
}
function Out(){
	if ( was_cursor_init == 0 ) cursorInit(); inside = 0;
	lay.visibility = "hidden";
}

onload=cursorInit;

