/*
    Всплывающее меню (версия 1.4)
    -----------------------------------
    MSIE 5.5+, Gecko, Opera 7+
    -----------------------------------
    -----------------------------------
    теперь тут не тока всплывающее меню но и другое...очень мноогоо...
*/
show=false;
showSub=false;
showSub1=false;
showSub2=false;
showSub3=false;
timeout=false;
timeout2=false;
timeout3=false;
timeout4=false;
timeout5=false;

function showMenu (id, el) {
	obj=document.getElementById(id);
	clearTimeout(timeout);
	if (show!=false && show!=obj) hideMenu(show);
	if (!obj) return false;
		base=document.getElementById(el);
		var x=0;
		var y=base.offsetHeight;
		o=base;
		do {
			x+=o.offsetLeft;
			y+=o.offsetTop;
		} while (o=o.offsetParent);
		if (self.innerHeight && self.pageXOffset) w_width=self.innerWidth+self.pageXOffset;
		else if (document.documentElement.clientWidth) w_width=document.documentElement.clientWidth+document.documentElement.scrollLeft;
		else if (document.body.clientWidth) w_width=document.body.clientWidth+document.body.scrollLeft;
		else w_width=800;
		oldClass=base.className;
		base.className=oldClass+' parentHere';
	    obj.style.left=x+'px';
		obj.style.top=y+'px';
		obj.style.visibility='visible';
		show=obj;
	timeout=setTimeout('hideMenu(obj)', 700);
}

function showMenuFoto (id, el) {
	obj=document.getElementById(id);
	clearTimeout(timeout);
	if (show!=false && show!=obj) hideMenu(show);
	if (!obj) return false;
		base=document.getElementById(el);
		var x=0;
		var y=base.offsetHeight;
		if (self.innerHeight && self.pageXOffset) w_width=self.innerWidth+self.pageXOffset;
		else if (document.documentElement.clientWidth) w_width=document.documentElement.clientWidth+document.documentElement.scrollLeft;
		else if (document.body.clientWidth) w_width=document.body.clientWidth+document.body.scrollLeft;
		else w_width=800;
		oldClass=base.className;
		base.className=oldClass+' parentHere';
	    obj.style.left=x+'px';
		obj.style.top=y+'px';
		obj.style.visibility='visible';
		show=obj;
	timeout=setTimeout('hideMenu(obj)', 700);
}
function showMenuRight(id, el, left_menu) {
	if(document.getElementById(left_menu)) {
		left=document.getElementById(left_menu);
		left_x=left.offsetLeft;
	}
	else{
		left_x=0;
	}
	obj=document.getElementById(id);
	clearTimeout(timeout);
	if (show!=false && show!=obj) hideMenu(show);

	if (!obj) return false;

		base=document.getElementById(el);
		var y=0;
		var x=base.offsetWidth;
		o=base;
		do {
			x+=o.offsetLeft;
			y+=o.offsetTop;
		} while (o=o.offsetParent);

		if (self.innerHeight && self.pageXOffset) w_width=self.innerWidth+self.pageXOffset;
		else if (document.documentElement.clientWidth) w_width=document.documentElement.clientWidth+document.documentElement.scrollLeft;
		else if (document.body.clientWidth) w_width=document.body.clientWidth+document.body.scrollLeft;
		else w_width=800;

		oldClass=base.className;
		base.className=oldClass+' parentHere';
		
		x=((w_width/2)<x)?(x-(obj.offsetWidth-base.offsetWidth)):(x)
	    obj.style.left=left_x+x+(208-x)+'px';/*специально для сайта micran!!!!*/
		obj.style.top=y+'px';
		obj.style.visibility='visible';
		show=obj;
		timeout=setTimeout('hideMenu(obj)', 700);
}
function hideMenu (obj) {
	if (!obj) return false;
	obj.style.visibility='hidden';
	obj.style.top='0px';
	obj.style.left='0px';
	if (showSub!=false) hideSubMenu(showSub);
	base.className=oldClass;
}
function hideSubMenu (obj) {
	if (!obj) return false;
	obj.style.visibility='hidden';
	obj.style.top='0px';
	obj.style.left='0px';
}

function showSubMenu (third, second, parent) {
	th=document.getElementById(third);
	se=document.getElementById(second);
	pa=document.getElementById(parent);
	clearTimeout(timeout2);
	if (showSub!=false && showSub!=th) hideSubMenu(showSub);
	if (!th || !se || !pa) return false;
		if (self.innerHeight && self.pageXOffset) w_width=self.innerWidth+self.pageXOffset;
		else if (document.documentElement.clientWidth) w_width=document.documentElement.clientWidth+document.documentElement.scrollLeft;
		else if (document.body.clientWidth) w_width=document.body.clientWidth+document.body.scrollLeft;
		else w_width=800;
		th.style.left=se.offsetWidth-1+'px';
		th.style.top=se.offsetTop-1+'px';
		th.style.visibility='visible';
		showSub=th;
	timeout2=setTimeout('hideSubMenu(th)', 700);
}
function showSubMenu1 (third, second, parent) {
	th=document.getElementById(third);
	se=document.getElementById(second);
	pa=document.getElementById(parent);
	clearTimeout(timeout3);
	if (showSub1!=false && showSub!=se) hideSubMenu(showSub1);
	if (!th || !se || !pa) return false;
		if (self.innerHeight && self.pageXOffset) w_width=self.innerWidth+self.pageXOffset;
		else if (document.documentElement.clientWidth) w_width=document.documentElement.clientWidth+document.documentElement.scrollLeft;
		else if (document.body.clientWidth) w_width=document.body.clientWidth+document.body.scrollLeft;
		else w_width=800;
		th.style.left=pa.offsetWidth-2+'px';
		th.style.top=se.offsetTop-1+'px';
		th.style.visibility='visible';
		showSub1=th;
		timeout3=setTimeout('hideSubMenu(th)', 700);
}
function showSubMenu2 (third, second, parent) {
	th=document.getElementById(third);
	se=document.getElementById(second);
	pa=document.getElementById(parent);
	clearTimeout(timeout4);
	if (showSub2!=false && showSub1!=se) hideSubMenu(showSub2);
	if (!th || !se || !pa) return false;
		if (self.innerHeight && self.pageXOffset) w_width=self.innerWidth+self.pageXOffset;
		else if (document.documentElement.clientWidth) w_width=document.documentElement.clientWidth+document.documentElement.scrollLeft;
		else if (document.body.clientWidth) w_width=document.body.clientWidth+document.body.scrollLeft;
		else w_width=800;
		th.style.left=pa.offsetWidth-2+'px';
		th.style.top=se.offsetTop-1+'px';
		th.style.visibility='visible';
		showSub2=th;
		timeout4=setTimeout('hideSubMenu(th)', 700);
}
function showSubMenu3 (third, second, parent) {
	th=document.getElementById(third);
	se=document.getElementById(second);
	pa=document.getElementById(parent);
	clearTimeout(timeout5);
	if (showSub3!=false && showSub2!=se) hideSubMenu(showSub3);
	if (!th || !se || !pa) return false;
		if (self.innerHeight && self.pageXOffset) w_width=self.innerWidth+self.pageXOffset;
		else if (document.documentElement.clientWidth) w_width=document.documentElement.clientWidth+document.documentElement.scrollLeft;
		else if (document.body.clientWidth) w_width=document.body.clientWidth+document.body.scrollLeft;
		else w_width=800;
		th.style.left=pa.offsetWidth-2+'px';
		th.style.top=se.offsetTop-1+'px';
		th.style.visibility='visible';
		showSub3=th;
		timeout5=setTimeout('hideSubMenu(th)', 0);
}

function newWin(s,h)	 
	{	
	var o='600';
	var p='700';
	var l=document.body.offsetWidth-o-28;
	var t=20;
	newwin=window.open(s,h,"resizable, scrollbars,toolbar=0,location=0,menubar=0,width="+o+",height="+p+",left="+l+",top="+t+"");
	newwin.focus();
	}


function addBookmark(url, title)
{
  if (!url) url = location.href;
  if (!title) title = document.title;
  
  //Gecko
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel (title, url, "");
  //IE4+
  else if (typeof window.external == "object") window.external.AddFavorite(url, title);
  //Opera7+
  else if (window.opera && document.createElement)
  {
    var a = document.createElement('A');
    if (!a) return false; //IF Opera 6
    a.setAttribute('rel','sidebar');
    a.setAttribute('href',url);
    a.setAttribute('title',title);
    a.click();
  }
  else return false;
  
  return true;
}
function checkFaq (f, dicField) {
	if (f.postQuestionText.value=='') {
		alert (dicField);
		f.postQuestionText.focus();
		return false;
	} else return true;
}
function checkForum (f, dicField) {
	if (f.postMessText.value=='') {
		alert (dicField);
		f.postMessText.focus();
		return false;
	} else return true;
}
function height_info(){
    obj3 = document.getElementById("info");
	y_top3 = obj3.offsetTop;
	y_height3 = obj3.offsetHeight;
	obj4 = document.getElementById("left_menu");
	y_top4 = obj4.offsetTop;
	y_height4 = obj4.offsetHeight;
	y4= y_top3-y_height4;
	if(y_height4>y_height3){
	obj3.style.height=y_height4-y_top3+105+'px';}
}
function height_table(){
	b_height = document.body.offsetHeight;
	obj4 = document.getElementById("eimg");
	obj4.style.height=b_height-189-23-40+'px';
}


function run_movie(arg)
{
document.write(arg);
} 