function DiTHER_findObj(n, d) //v4.01
{
	var p,i,x;
	if(!d) d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length)
	{
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n];
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=DiTHER_findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n);
	return x;
}
function DiTHER_switchLayersVisibility() {
	var i,p,v,obj,args=DiTHER_switchLayersVisibility.arguments;
	for (i=0;i<DiTHER_switchLayersVisibility.arguments.length; i++) {
		obj=DiTHER_findObj(args[i]);
		if (obj.style) {
			obj=obj.style;
			if (obj.display=='block')
			{
				obj.display='none';
			}
			else if (obj.display=='none')
			{
				obj.display='block';
			}
		}
	}
}

var menuIconRollover01 = new Image(26,26);
menuIconRollover01.src="/img/menuIconRollover01.gif";
var menuIconRollover02 = new Image(26,26);
menuIconRollover02.src="/img/menuIconRollover02.gif";
var menuIconRollover03 = new Image(26,26);
menuIconRollover03.src="/img/menuIconRollover03.gif";
document.subtimeout = setTimeout("document.a = 'c'",1);

function createLink(link, display, style_class)
{
	var link_full = "<a href = '"+link+"' class = '"+style_class+"'>"+display+"</a>";
	document.getElementById('span_link').innerHTML = link_full;
}

function createLinkBlank(link, display, style_class)
{
	var link_full = "<a href = '"+link+"' class = '"+style_class+"' target='_blank'>"+display+"</a>";
	document.getElementById('span_link').innerHTML = link_full;
}

function createLinkBlankv1(link, display, style_class, pos)
{
	var link_full = "<a href = '"+link+"' class = '"+style_class+"' target='_blank'>"+display+"</a>";
	document.getElementById('span_link'+pos).innerHTML = link_full;
}

function menuIconToOver(cl,n)
{
	cl.style.backgroundImage="url(/img/menuIconRollover0"+n+".gif)";
}
function menuIconFromOver(cl,n)
{
	cl.style.backgroundImage="url(/img/menuIcon0"+n+".gif)";
}


function flatlinkOver(cl,url)
{
	var i;
	var td;
	for(i=0;i<cl.childNodes.length;i++)
	{
		if(cl.childNodes[i].nodeName == 'TD')
		{
			td = cl.childNodes[i];
			td.style.color = '#798190';
		}
	}
}
function flatlinkOut(cl)
{
	var i;
	var td;

	for(i=0;i<cl.childNodes.length;i++)
	{
		if(cl.childNodes[i].nodeName == 'TD')
		{
			td = cl.childNodes[i];
			td.style.color = '#272E39';
		}
	}
}
function flatlinkExtraOver(cl,url)
{
	var i;
	var td;
	for(i=0;i<cl.childNodes.length;i++)
	{
		if(cl.childNodes[i].nodeName == 'TD')
		{
			td = cl.childNodes[i];
			td.style.color = 'orange';
		}

	}
}
function flatlinkExtraOut(cl)
{
	var i;
	var td;
	for(i=0;i<cl.childNodes.length;i++)
	{
		if(cl.childNodes[i].nodeName == 'TD')
		{
			td = cl.childNodes[i];
			td.style.color = '#C63018';
		}
	}
}
function flatlink(cl,url)
{
	myWin = open(url,"","");
	myWin.document.close();	
}
function tomap(indaddr,cl)
{
	cl.style.color = '#5597E7';
}
function showmap(type,param1,param2,cl)
{
	if(type == 'pid')
	{
		thisurl = '/includes/map/showgmap.php?pid='+param1+'&hash='+param2;
	}
	else if(type == 'id')
	{
		thisurl = '/includes/map/showgmap.php?id='+param1+'&type='+param2;
	}

	window.open(thisurl,"","menubar=no,resizable=no,width=570,height=670,toolbar=no,top=100,left=100");
}
function showgmap(type,param1,param2,cl)
{
        if(type == 'pid')
        {
                thisurl = '/includes/map/showgmap.php?pid='+param1+'&hash='+param2;
        }
        else if(type == 'id')
        {
                thisurl = '/includes/map/showgmap.php?id='+param1+'&type='+param2;
        }

        window.open(thisurl,"","menubar=no,resizable=no,width=760,height=620,toolbar=no,top=100,left=100, scrollbars=yes");
}
function showgmap_moscow(type,param1,param2,cl)
{
        if(type == 'pid')
        {
                thisurl = '/includes/map/showgmap_moscow.php?pid='+param1+'&hash='+param2;
        }
        else if(type == 'id')
        {
                thisurl = '/includes/map/showgmap_moscow.php?id='+param1+'&type='+param2;
        }

        window.open(thisurl,"","menubar=no,resizable=no,width=760,height=620,toolbar=no,top=100,left=100, scrollbars=yes");
}
function showgmap_agency(id)
{
        window.open('/show_agency/'+id,"","menubar=no,resizable=no,width=760,height=590,toolbar=no,top=100,left=100, scrollbars=yes");
}
function finshowmap(cl)
{
	self.status = '';
	cl.style.color = '#1E68C1';
}
function tophoto(indaddr,cl)
{
}
function toplan(id,cl)
{
}

function setCookie(name, value, expires, path, domain, secure)
{
	var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" +
	expires.toGMTString() : "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" +
	domain : "") +
	((secure) ? "; secure" : "")
	if ((name + "=" + escape(value)).length <= 4000)
	{
		document.cookie = curCookie
	}
	else
	{
		if (confirm("Cookie ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ 4KB ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ !"))
		{
			document.cookie = curCookie
		}
	}
}

function getCookie(name)
{
	var prefix = name + "="
	var cookieStartIndex = document.cookie.indexOf(name)
	if (cookieStartIndex == -1)
	{
		return null
	}
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
	if (cookieEndIndex == -1)
	{
		cookieEndIndex = document.cookie.length
		return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
	}
	if(cookieStartIndex != -1 && cookieEndIndex != -1)
	{
		return unescape(document.cookie.substring(cookieStartIndex + prefix.length,cookieEndIndex))
	}
}

function deleteCookie(name, path, domain)
{
	if (getCookie(name))
	{
		document.cookie = name + "=" +
		((path) ? "; path=" +
		path : "") +
		((domain) ? "; domain=" +
		domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT"
	}
}

document.checkeds = Array();

{
	document.checkeds = getCookie('testcoo');
}


function setCookies()
{
	setCookie('testcoo',document.checkeds,false,'/',false,false);
}

function moreDescr(cl)
{
	document.getElementById('desccuttrg2').style.display = 'block';
	document.getElementById('desccuttrglnk').parentNode.removeChild(document.getElementById('desccuttrglnk'));
}
function showMap(mmp,w,h,type)
{
	cw = w+20;
	ch = h+20;
	newin = window.open("","viewmap", "dependent=yes,width="+cw+",height="+ch+",screenX=100,screenY=100");

	if(type == 'photo')
	{
		titl = 'Ïðîñìîòð ôîòîãðàôèè';
	}
	else if(type == 'plan')
	{
		titl = 'Ïðîñìîòð ïëàíèðîâêè';
	}
	else if(type == 'map')
	{
		titl = 'Ïðîñìîòð êàðòû';
	}

	newin.document.write("<html><head><title>"+titl+"</title></head><body><img src=\""+mmp+"\" width=\""+w+"\" height=\""+h+"\"/></body></html>");
}

function showimg(src,w,h,ptitle)
{
	cw = w+40;
	ch = h+40;
	newin = window.open("","viewimg", "dependent=yes,width="+cw+",height="+ch+",screenX=100,screenY=100, scrollbars=yes");

	newin.document.write("<html><head><title>"+ptitle+"</title></head><body><img src=\""+src+"\" width=\""+w+"\" height=\""+h+"\"/></body></html>");
	newin.document.close();
}


function showvote(src)
{
        window.open('/konkurs_vote/'+src,'', 'width=385,height=590, scrollbars=yes, resizible = yes');
}


function show_icon(name_icon)
{
	var an = navigator.appName;
	var icon = document.getElementById(name_icon);
	if (an == "Microsoft Internet Explorer")
		{
			icon.filters.blendTrans.Apply();
			icon.filters.blendTrans.Play();
			icon.style.visibility = "visible";
			setTimeout(" hidden_icon('"+name_icon+"') ", 2300);
		}
		else 
		{
			icon.style.visibility = "visible";
			setTimeout(" hidden_icon('"+name_icon+"') ", 2300);
		}
}
function hidden_icon(name_icon)
{
	var icon = document.getElementById(name_icon);
	icon.style.visibility = "hidden";
}

function ShowConsult(img)
{
	window.open(img, '', 'menubar=no,resizable=no,width=600,height=600,toolbar=no,top=100,left=100');
}

// Ñïèñîê îïåðàòîðîâ äëÿ îïëàòû ÷åðåç ñìñ
function show_operators()
{  
	var head     = document.getElementById('sms_operator');
  for(i=0;i<jsonSMS.country[0].Operators.length; i++)
  {		
  		var name = jsonSMS.country[0].Operators[i];
	if((typeof name.Numbers[7]) != "undefined" && (name.Name == 'ÌÒÑ' || name.Name == 'Ìåãàôîí' || name.Name == 'TELE2' || name.Name == 'BEE LINE'))
		{
			
			for(k=0;k<name.Numbers.length; k++)
			{
				if(name.Numbers[k].Number == '9691')
				{
					operatorList=document.createElement('span');
					var cost = Math.round(name.Numbers[k].CostLocal*0.0118*100)/100;
					operatorList.innerHTML = '<b> '+name.Name+'</b> - ñòîèìîñòü: <b>'+cost+'</b> ðóá.; ';
					head.appendChild(operatorList)
				}
			}
			
		}
	}
}

// Ñïèñîê îïåðàòîðîâ äëÿ îïëàòû ÷åðåç ñìñ
function show_operators_4445()
{
        var head     = document.getElementById('sms_operator');
  for(i=0;i<jsonSMS.country[0].Operators.length; i++)
  {
                var name = jsonSMS.country[0].Operators[i];
        if((typeof name.Numbers[7]) != "undefined" && (name.Name == 'ÌÒÑ' || name.Name == 'Ìåãàôîí' || name.Name == 'TELE2' || name.Name == 'BEE LINE'))
                {

                        for(k=0;k<name.Numbers.length; k++)
                        {
                                if(name.Numbers[k].Number == '4445')
                                {
                                        operatorList=document.createElement('span');
                                        var cost = Math.round(name.Numbers[k].CostLocal*0.0118*100)/100;
                                        operatorList.innerHTML = '<b> '+name.Name+'</b> - ñòîèìîñòü: <b>'+cost+'</b> ðóá.; ';
                                        head.appendChild(operatorList)
                                }
                        }

                }
        }
}

function ar_flver(){
 var d, n = navigator, m, f = 'Shockwave Flash';
 if((m = n.mimeTypes) && (m = m["application/x-shockwave-flash"]) && m.enabledPlugin && (n = n.plugins) && n[f]) {d = n[f].description}
 else if (window.ActiveXObject) { try { d = (new ActiveXObject((f+'.'+f).replace(/ /g,''))).GetVariable('$version');} catch (e) {}} 
 return d ? d.replace(/\D+/,'').split(/\D+/) : [0,0];
};


var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));


function mover(num) {
	
	var head     = document.getElementById('on'+num);
	if(is_ie)
	{
		head.style.display = 'none';
		head.style.width = '0px';
		head.style.overflow = 'hidden';
	}
	else
	{
		head.setAttribute('style','display:none; width:0px; overflow:hidden');
	}

	var head1     = document.getElementById('off'+num);
	if(is_ie)
	{
		head1.style.display = 'block';	
		head1.style.clear = 'left';	
	}
	else
	{
		head1.setAttribute('style','clear:left;');
	}
	
	
}
function mout(num) {
	
	var head     = document.getElementById('on'+num);
	if(is_ie)
	{
		head.style.display = 'block';	
	}
	else
	{
		head.setAttribute('style','clear:left;');
	}
	var head1     = document.getElementById('off'+num);
	if(is_ie)
	{
		head1.style.display = 'none';
		head1.style.width = '0px';
		head1.style.overflow = 'hidden';
	}
	else
	{
		head1.setAttribute('style','display:none; width:0px; overflow:hidden');
	}
}

/*----- JAVA_N -----*/

<!--
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function test_DoFSCommand(command, args) {
	var testObj = isInternetExplorer ? document.all.test : document.test;
	var d = document;
	var GetElements=d.getElementById?d.getElementById('konk_layer'):d.all?d.all['konk_layer']:d.layers['konk_layer'];
	if(d.layers)
		GetElements.style=GetElements;
	GetElements.style.visibility = "hidden";
	
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub test_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call test_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
//-->

function noerror_mail()
{
	var l;
	
	l = document.news_attach.user_email.value;
	
	if((l.indexOf('@', 0) == -1) || (l.indexOf('.', 0) == -1) || (l.length <= 4) || (l.indexOf(' ', 0) != -1))
	{
		alert("Ïîëå 'E-mail' ïóñòîå èëè çàïîëíåíî íåêîððåêòíî");
		return false;
	}
					
	return true;
}

function showFormReestor()
{
	newin = window.open("","viewmap", "dependent=yes,width="+cw+",height="+ch+",screenX=100,screenY=100");		
}

function pre_submit_v1()
{
	if(document.mainform.title_ru.value.length > 0 && document.mainform.code_auth.value.length > 0 && document.mainform.phone_1.value.length > 0 && document.mainform.pub_mail.value.length > 0)    	
	{
		if(checkerror(document.mainform.title_ru) && (document.mainform.code_auth.value == document.mainform.code.value) && checkerror(document.mainform.phone_1) && checkerror(document.mainform.pub_mail))
	    		document.mainform.submit();	
		else
	    		alert("Ïîëÿ çàïîëíåíû íåêîððåêòíî!");	    		
	}
    	else
    		alert("Âñå ïîëÿ îáÿçàòåëüíû ê çàïîëíåíèþ!");
}    

function pre_submit()
{
	if(document.mainform.title_ru.value.length > 0 && document.mainform.addr.value.length > 0)    	
	{
		if(checkerror(document.mainform.title_ru) && checkerror(document.mainform.addr))
	    		document.mainform.submit();	
		else
	    		alert("Îáÿçàòåëüíûå ïîëÿ çàïîëíåíû íåêîððåêòíî!");
	}
    	else
    		alert("Ïîëÿ îòìå÷àííûå çâåçäî÷êîé îáÿçàòåëüíû ê çàïîëíåíèþ!");
}    

function checkerror(src)
{
	var no_error = true;

	if (src.name == 'title_ru' || src.name == 'title_en' || src.name == 'addr' || src.name == 'website')		
	{
		if(src.name == 'title_en' || src.name == 'website')
			re = new RegExp('^[A-Za-z0-9\\s_".:/\\-]*$',"i")		
		else
			re = new RegExp('^[À-ßà-ÿA-Za-z0-9\\s_",./\\-]*$',"i");				
							
    		if(re.test(src.value) != false && src.value.length > 0)    			
    		{    		
    			src.style.backgroundColor = "#ffffff";			
			src.style.color = "#2F5481";
    		}
    		else
    		{   
    			if((src.name == 'title_en' || src.name == 'website')&& src.value.length == 0)
    			{
	    			src.style.backgroundColor = "#ffffff";			
				src.style.color = "#2F5481";
    			}
    			else 
    			{
				src.style.backgroundColor="red";			
    				src.style.fontWeight = "bold|bolder|900";
				src.style.color = "white";
				if(src.name == 'title_ru')
					alert("Ïîëå 'Ðóññêîå íàçâàíèå' çàïîëíåíî íåêîððåêòíî!");					
				else
					if(src.name == 'title_en')
						alert("Ïîëå 'Àíãëèéñêîå íàçâàíèå' çàïîëíåíî íåêîððåêòíî!");					
					else
						if(src.name == 'addr')
							alert("Ïîëå 'Àäðåñ' çàïîëíåíî íåêîððåêòíî!");					
						else
							alert("Ïîëå 'Web-ñàéò' çàïîëíåíî íåêîððåêòíî!");
				no_error = false;
   			}

    		}
		}

		if (src.name == 'phone_1' || src.name == 'phone_2' || src.name == 'phone_3' || src.name == 'fax')		
		{
			re = new RegExp("^[0-9\\-\\+\\(\)\\s]*$","i");
			
    		if(re.test(src.value) != false && src.value.length > 6)    			
    		{    		
    			src.style.backgroundColor = "#ffffff";			
			src.style.color = "#2F5481";
    		}
    		else
    		{    			
    			if (src.value.length == 0)
    			{
    				src.style.backgroundColor = "#ffffff";			
				src.style.color = "#2F5481";
    			}
    			else
    			{
	    			src.style.backgroundColor="red";			
	    			src.style.fontWeight = "bold|bolder|900";
				src.style.color = "white";
					
				if(src.value.length < 7)
					alert("Ïîëÿ 'Òåëåôîí' èëè 'Ôàêñ' çàïîëíåíû íåêîððåêòíî!");				
				else
					alert("Ïîëÿ 'Òåëåôîí' èëè 'Ôàêñ' çàïîëíåíû íåêîððåêòíî!");
				no_error = false;
    			}
    		}
		}

		if (src.name == 'pub_mail')
		{
			re = new RegExp("^(\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*)","i");
			
    		if(re.test(src.value))    			
    		{    		
    			src.style.backgroundColor = "#ffffff";			
			src.style.color = "#2F5481";
    		}
    		else
    		{
    			if (src.value.length == 0)
    			{
    				src.style.backgroundColor = "#ffffff";			
				src.style.color = "#2F5481";
    			}
    			else
    			{    			    			
	    			src.style.backgroundColor="red";			
	    			src.style.fontWeight = "bold|bolder|900";
				src.style.color = "white";
				alert("Ïîëå 'Êîíòàêòíûé E-mail' çàïîëíåíî íåêîððåêòíî!");
				no_error = false;
    			}
    		}
		}
	return no_error;		
    }

function show_img(url,w,h)
{
	newin = window.open("","viewmap", "dependent=yes,width="+w+",height="+h+",screenX=100,screenY=100");		
	newin.document.write("<html><head><title>Ïîáåäèòåëè êîíêóðñà</title></head><body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 BOTTOMMARGIN=0><img src="+url+"></body></html");
	newin.document.close();
}

function reloadclass(src,src_img)
{
	var d = document;
	//document.photo.src = src_img;
	id_name = 'photo';
	GetElements=document.getElementById?document.getElementById(id_name):document.all?d.all[id_name]:document.layers[id_name];
	GetElements.src = src_img;
	src.className = 'link_photo_show';
	for(i=1;i<4;i++)
	{
		id_name = "a"+i;
		if(src.id != id_name)
		{
			GetElements=document.getElementById?document.getElementById(id_name):document.all?d.all[id_name]:document.layers[id_name];
			GetElements.className = 'link_photo';
		}
	}
}

/*----- END JAVA_N -----*/



/*----- JAVA_SMBV -----*/


var Spry;
if(!Spry)
{
	Spry = {};
}
if(!Spry.Widget)
{
	Spry.Widget = {};
}

Spry.Widget.MenuBar = function(element, opts)
{
	this.init(element, opts);
};

Spry.Widget.MenuBar.prototype.init = function(element, opts)
{
	this.element = this.getElement(element);

	
	this.currMenu = null;

	var isie = (typeof document.all != 'undefined' && typeof window.opera == 'undefined' && navigator.vendor != 'KDE');
	if(typeof document.getElementById == 'undefined' || (navigator.vendor == 'Apple Computer, Inc.' && typeof window.XMLHttpRequest == 'undefined') || (isie && typeof document.uniqueID == 'undefined'))
	{
		
		return;
	}

	
	if(opts)
	{
		for(var k in opts)
		{
			var rollover = new Image;
			rollover.src = opts[k];
		}
	}

	if(this.element)
	{
		this.currMenu = this.element;
		var items = this.element.getElementsByTagName('li');
		for(var i=0; i<items.length; i++)
		{
			this.initialize(items[i], element, isie);
			if(isie)
			{
				this.addClassName(items[i], "MenuBarItemIE");
				items[i].style.position = "static";
			}
		}
		if(isie)
		{
			if(this.hasClassName(this.element, "MenuBarVertical"))
			{
				this.element.style.position = "relative";
			}
			var linkitems = this.element.getElementsByTagName('a');
			for(var i=0; i<linkitems.length; i++)
			{
				linkitems[i].style.position = "relative";
			}
		}
	}
};

Spry.Widget.MenuBar.prototype.getElement = function(ele)
{
	if (ele && typeof ele == "string")
		return document.getElementById(ele);
	return ele;
};

Spry.Widget.MenuBar.prototype.hasClassName = function(ele, className)
{
	if (!ele || !className || !ele.className || ele.className.search(new RegExp("\\b" + className + "\\b")) == -1)
	{
		return false;
	}
	return true;
};

Spry.Widget.MenuBar.prototype.addClassName = function(ele, className)
{
	if (!ele || !className || this.hasClassName(ele, className))
		return;
	ele.className += (ele.className ? " " : "") + className;
};

Spry.Widget.MenuBar.prototype.removeClassName = function(ele, className)
{
	if (!ele || !className || !this.hasClassName(ele, className))
		return;
	ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
};

// addEventListener for Menu Bar
// attach an event to a tag without creating obtrusive HTML code
Spry.Widget.MenuBar.prototype.addEventListener = function(element, eventType, handler, capture)
{
	try
	{
		if (element.addEventListener)
		{
			element.addEventListener(eventType, handler, capture);
		}
		else if (element.attachEvent)
		{
			element.attachEvent('on' + eventType, handler);
		}
	}
	catch (e) {}
};

Spry.Widget.MenuBar.prototype.createIframeLayer = function(menu)
{
	var layer = document.createElement('iframe');
	layer.tabIndex = '-1';
	layer.src = 'javascript:false;';
	menu.parentNode.appendChild(layer);
	
	layer.style.left = menu.offsetLeft + 'px';
	layer.style.top = menu.offsetTop + 'px';
	layer.style.width = menu.offsetWidth + 'px';
	layer.style.height = menu.offsetHeight + 'px';
};

Spry.Widget.MenuBar.prototype.removeIframeLayer =  function(menu)
{
	var layers = menu.parentNode.getElementsByTagName('iframe');
	while(layers.length > 0)
	{
		layers[0].parentNode.removeChild(layers[0]);
	}
};

Spry.Widget.MenuBar.prototype.clearMenus = function(root)
{
	var menus = root.getElementsByTagName('ul');
	for(var i=0; i<menus.length; i++)
	{
		this.hideSubmenu(menus[i]);
	}
	this.removeClassName(this.element, "MenuBarActive");
};

Spry.Widget.MenuBar.prototype.bubbledTextEvent = function()
{
	return (navigator.vendor == 'Apple Computer, Inc.' && (event.target == event.relatedTarget.parentNode || (event.eventPhase == 3 && event.target.parentNode == event.relatedTarget)));
};

Spry.Widget.MenuBar.prototype.showSubmenu = function(menu)
{
	if(this.currMenu)
	{
		this.clearMenus(this.currMenu);
		this.currMenu = null;
	}
	
	if(menu)
	{
		this.addClassName(menu, "MenuBarSubmenuVisible");
		if(typeof document.all != 'undefined' && typeof window.opera == 'undefined' && navigator.vendor != 'KDE')
		{
			if(!this.hasClassName(this.element, "MenuBarHorizontal") || menu.parentNode.parentNode != this.element)
			{
				menu.style.top = menu.parentNode.offsetTop + 'px';
			}
		}
		if(typeof document.uniqueID != "undefined")
		{
			this.createIframeLayer(menu);
		}
	}
	this.addClassName(this.element, "MenuBarActive");
};

Spry.Widget.MenuBar.prototype.hideSubmenu = function(menu)
{
	if(menu)
	{
		this.removeClassName(menu, "MenuBarSubmenuVisible");
		if(typeof document.all != 'undefined' && typeof window.opera == 'undefined' && navigator.vendor != 'KDE')
		{
			menu.style.top = '';
			menu.style.left = '';
		}
		this.removeIframeLayer(menu);
	}
};

Spry.Widget.MenuBar.prototype.initialize = function(listitem, element, isie)
{
	var opentime, closetime;
	var link = listitem.getElementsByTagName('a')[0];
	var submenus = listitem.getElementsByTagName('ul');
	var menu = (submenus.length > 0 ? submenus[0] : null);

	var hasSubMenu = false;
	if(menu)
	{
		this.addClassName(link, "MenuBarItemSubmenu");
		hasSubMenu = true;
	}

	if(!isie)
	{
		listitem.contains = function(testNode)
		{
			// this refers to the list item
			if(testNode == null)
			{
				return false;
			}
			if(testNode == this)
			{
				return true;
			}
			else
			{
				return this.contains(testNode.parentNode);
			}
		};
	}
	
	var self = this;

	this.addEventListener(listitem, 'mouseover', function(e)
	{
		if(self.bubbledTextEvent())
		{
			return;
		}
		clearTimeout(closetime);
		if(self.currMenu == listitem)
		{
			self.currMenu = null;
		}
		// show menu highlighting
		self.addClassName(link, hasSubMenu ? "MenuBarItemSubmenuHover" : "MenuBarItemHover");
		if(menu && !self.hasClassName(menu, "MenuBarSubmenuVisible"))
		{
			opentime = window.setTimeout(function(){self.showSubmenu(menu);}, 250);
		}
	}, false);

	this.addEventListener(listitem, 'mouseout', function(e)
	{
		if(self.bubbledTextEvent())
		{
			return;
		}

		var related = (typeof e.relatedTarget != 'undefined' ? e.relatedTarget : e.toElement);
		if(!listitem.contains(related))
		{
			clearTimeout(opentime);
			self.currMenu = listitem;

			self.removeClassName(link, hasSubMenu ? "MenuBarItemSubmenuHover" : "MenuBarItemHover");
			if(menu)
			{
				closetime = window.setTimeout(function(){self.hideSubmenu(menu);}, 600);
			}
		}
	}, false);
};

var menuids=["mtree"]

function hormenu(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
                if (ultags[t].parentNode.parentNode.id==menuids[i]){
                        ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px"
                        ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon"
                }
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.visibility="visible"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.visibility="hidden"
    }
    }
  }
}

if (window.addEventListener)
window.addEventListener("load", hormenu, false)
else if (window.attachEvent)
window.attachEvent("onload", hormenu)



/*----- END JAVA_SMBV -----*/




/*----- JAVA_KONKURS1 -----*/
var count = 0;

	function act_err_form ()
	{		
		var true_code = document.mainform.true_code.value,
		code = document.mainform.code.value,
		fio = document.mainform.fio.value,
		mail = document.mainform.mail.value,
		phone = document.mainform.phone.value,
		flag = 0;		
		
		count++;

		if(fio.length > 0 && mail.length > 0 && phone.length > 0 && code.length > 0)
		{
			if(true_code == code)
			{	
				re = new RegExp("^(\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*)","i");
				if(!re.test(mail))
				{					
					flag = 1;
					document.mainform.mail.style.backgroundColor="red";
		    		document.mainform.mail.style.fontWeight = "bold|bolder|900";
					document.mainform.mail.style.color = "white";
					alert("E-mail ââåäåí íåâåðíî")
				}
				else
				{
					document.mainform.mail.style.backgroundColor="white";
					document.mainform.mail.style.color = "black";
				}

				re = new RegExp("^[0-9\\-\\+\\(\)\\s]*$","i");

				if(re.test(phone) != true)								
				{										
					flag = 2;
					document.mainform.phone.style.backgroundColor="red";
		    		document.mainform.phone.style.fontWeight = "bold|bolder|900";
					document.mainform.phone.style.color = "white";
					alert("Òåëåôîí ââåäåí íåâåðíî")
				}
				else
				{
					if(phone.length > 6)					
					{
						document.mainform.phone.style.backgroundColor="white";
						document.mainform.phone.style.color = "black";
					}
					else
					{
						flag = 3;
						document.mainform.phone.style.backgroundColor="red";
			    		document.mainform.phone.style.fontWeight = "bold|bolder|900";
						document.mainform.phone.style.color = "white";
						alert("Òåëåôîí ââåäåí íåâåðíî")
					}
				}			
				
				if (!flag)
				{					
					window.open("http://www.bsn.ru/add_konk.php?code="+code+"&fio="+fio+"&mail="+mail+"&phone="+phone,"","top=20,left=90,width="+300+",height="+396+",toolbar=no,menubar=no,location=no,derectories=no,status=no,scrolling=no");
					window.close();					
				}
			}
			else
			{
				alert("Êîä ââåäåí íåâåðíî")
			}
		}
		else
		{
			alert("Íå âñå ïîëÿ çàïîëíåíû.");
			flag = -1;
		}
		
		if(count>0 && flag != 0)
		{
			if (count >= 2)
				window.close();
			str = "Ó Âàñ îñòàëîñü "+(2-count)+" ïîïûòîê."
			alert(str);
		}
	}

/*----- END JAVA_KONKURS1 -----*/



/*----- JAVA_KONKURS -----*/

	function show_new_win(txt)
	{
		Snow = open("","","top=20,left=90,width="+300+",height="+396+",toolbar=no,menubar=no,location=no,derectories=no,status=no,scrolling=no");
		Snow.document.open();
		arr_txt = txt.split(";");
		


		txt = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>";
		txt += "<link rel='StyleSheet' href='http://www.bsn.ru/style-popup.css' type='text/css'>";
		txt += "<title>Âû âûèãðàëè ïðèç!</title>";
		txt += "<script type='text/javascript' src='http://www.bsn.ru/java_konkurs_1.js'></script>";
		txt += "</head><body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 BOTTOMMARGIN=0>";
		txt += "<form name='mainform' method='post' action='add_konk.php' onsubmit='return false;'>";
		txt +="<table cellpadding='0' cellspacing='0' border='0' width='300px' height='396px' align='center'>";
		txt +="<tr><td width='300px' height='77px' align='center' colspan='3'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%' align='center'><tr><td width='38px' height='77px' bgcolor='#27BB00'></td><td width='233px' height='77px' background='http://www.bsn.ru/img/konkurs/popup_02.gif'></td><td width='29px' height='77px' bgcolor='#27BB00'></td></tr></table></td></tr>";
		txt +="<tr><td width='300px' height='35px' align='center' colspan='3'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%' align='center'><tr><td width='267px' class='name_prize' height='35px' rowspan='2' colspan='2' bgcolor='#1B8000' align='center' style='padding-left: 33px;'>"+arr_txt[0]+"</td><td width='33px' height='35px' bgcolor='#1B8000' valign='bottom'><img src='http://www.bsn.ru/img/konkurs/popup_05.gif'></td></tr></table></td></tr>";
		txt +="<tr><td width='300px' colspan='3' height='69px' background='http://www.bsn.ru/img/konkurs/popup_06.gif'></td></tr>";
		txt +="<tr><td width='300px' height='21px' align='center' colspan='3'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%' align='center'><tr><td width='21px' height='21px' bgcolor='#ffffff'></td><td class='inp_td' width='70px' height='21px' bgcolor='#ffffff'>Êîä:</td><td width='180px' height='21px' bgcolor='#ffffff'><input type='text' name='true_code' value='"+arr_txt[1]+"' disabled size='26'></td><td width='29px' height='21px' background='http://www.bsn.ru/img/konkurs/popup_09.gif'></td></tr></table></td></tr>";
		txt +="<tr><td width='300px' height='29px' align='center' colspan='3'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%' align='center'><tr><td width='21px' height='8px' bgcolor='#ffffff' colspan='2' rowspan='2'></td><td class='inp_td' width='70px' height='' bgcolor='#ffffff' colspan='2' rowspan='2'>Ïîâòîðèòå êîä:</td><td width='180px' height='8px' background='http://www.bsn.ru/img/konkurs/popup_11.gif'></td><td width='29px' height='8px' background='http://www.bsn.ru/img/konkurs/popup_12.gif'></td></tr><tr><td width='180px' height='21px' bgcolor='#ffffff'><input type='text' name='code' value='' size='26'></td><td width='29px' height='21px' background='http://www.bsn.ru/img/konkurs/popup_15.gif'></td></tr></table></td></tr>";
		txt +="<tr><td width='300px' height='13px' align='center' colspan='3'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%' align='center'><td width='91px' height='13px' bgcolor='#ffffff'></td><td width='180px' height='13px' background='http://www.bsn.ru/img/konkurs/popup_17.gif'></td><td width='29px' height='13px' background='http://www.bsn.ru/img/konkurs/popup_18.gif'></td></tr></table></td></tr>";
		txt +="<tr><td width='300px' height='21px' align='center' colspan='3'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%' align='center'><tr><td width='21px' height='21px' bgcolor='#ffffff'></td><td class='inp_td' width='70px' height='21px' bgcolor='#ffffff'>ÔÈÎ:</td><td width='180px' height='21px' bgcolor='#ffffff'><input type='text' value='' name='fio' size='26'></td><td width='29px' height='21px' background='http://www.bsn.ru/img/konkurs/popup_21.gif'></td></tr></table></td></tr>";
		txt +="<tr><td width='300px' height='13px' bgcolor='#ffffff' colspan='3'></td></tr>";
		txt +="<tr><td width='300px' height='21px' align='center' colspan='3'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%' align='center'><tr><td width='21px' height='21px' bgcolor='#ffffff'></td><td class='inp_td' width='70px' height='21px' bgcolor='#ffffff'>E-mail:</td><td width='180px' height='21px' bgcolor='#ffffff'><input type='text' value='' name='mail' size='26'></td><td width='29px' height='21px' bgcolor='#ffffff'></td></tr></table></td></tr>";
		txt +="<tr><td width='300px' height='13px' bgcolor='#ffffff' colspan='3'></td></tr>";
		txt +="<tr><td width='300px' height='21px' align='center' colspan='3'><table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%' align='center'><tr><td width='21px' height='21px' bgcolor='#ffffff'></td><td class='inp_td' width='70px' height='21px' bgcolor='#ffffff'>Òåëåôîí:</td><td width='180px' height='21px' bgcolor='#ffffff'><input type='text' value='' name='phone' size='26'></td><td width='29px' height='21px' bgcolor='#ffffff'></td></tr></table></td></tr>";
		txt +="<tr><td width='300px' height='15px' bgcolor='#ffffff' colspan='3'></td></tr>";
		txt +="<tr><td width='197px' height='23px' background='http://www.bsn.ru/img/konkurs/popup_31.gif'></td><td width='74px' height='23px' bgcolor='#ffffff'><input style='height: 23px;width:74px;' type='image' src='http://www.bsn.ru/img/konkurs/popup_32.gif' onclick='act_err_form();'></td><td width='29px' height='23px' bgcolor='#ffffff'></td></tr>";
		txt +="<tr><td width='300px' height='25px' background='http://www.bsn.ru/img/konkurs/popup_34.gif' colspan='3'></td></tr>";
		txt +="</table></form>";		
		txt +="</body></html>";

		Snow.document.write(txt);
	}/*----- END JAVA_KONKURS -----*/

/* ----- JAVA_MAIL_RU ----- */
function genMailru1()
{
	d=document; a=''; a+=';r='+escape(d.referrer);
	js=10;
}

function genMailru11()
{
	a+=';j='+navigator.javaEnabled();
	js=11; 
}

function genMailru12()
{
	s=screen; a+=';s='+s.width+'*'+s.height;
	a+=';d='+(s.colorDepth?s.colorDepth:s.pixelDepth);
	js=12; 
}

function genMailru13()
{
	js=13;
}

function genMailru2()
{
	d.write('<img src="http://da.c6.b1.a0.top.list.ru/counter'+
			'?id=92695;js='+js+a+';rand='+Math.random()+'" height="1" width="1"/>');
	if(11<js) d.write('<'+'!--');
	if(11<js) d.write('--'+'>'); 
}
/* ----- END JAVA_MAIL_RU ----- */

/* ----- JAVA_OBJECTSWAP ----- */
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

if (ie){
	document.write ("<style id='hideObject'> object{display:none;} </style>");
}


objectSwap = function(){
	if (!document.getElementsByTagName){
		return;
	}
	
	var stripQueue = [];
	
	var objects = document.getElementsByTagName('object');
	for (var i=0; i<objects.length; i++){			
		var o = objects[i];	
		var h = o.outerHTML;
		var params = "";
		var hasFlash = true;
		for (var j = 0; j<o.childNodes.length; j++) {
			var p = o.childNodes[j];
			if (p.tagName == "PARAM"){
				if (p.name == "flashVersion"){
					hasFlash = detectFlash(p.value);
					if (!hasFlash){
						o.id = (o.id == "") ? ("stripFlash"+i) : o.id;
						stripQueue.push(o.id);
						break;
					}
				} 
				params += p.outerHTML;		       
			}
		}	
		if (!hasFlash){
			continue;
		}		
		if (!ie){
			continue;
		} 
		if (o.className.toLowerCase().indexOf ("noswap") != -1){
			continue;
		}		
		
		var tag = h.split(">")[0] + ">";			
		var newObject = tag + params + o.innerHTML + " </OBJECT>";		
		o.outerHTML = newObject;
	}
	
	if (stripQueue.length) {
		stripFlash(stripQueue)
	}
	
	if (ie){
		document.getElementById("hideObject").disabled = true;
	}
}

detectFlash = function(version){
	if(navigator.plugins && navigator.plugins.length){
		var plugin = navigator.plugins["Shockwave Flash"];
		if (plugin == undefined){
			return false;
		}
		var ver = navigator.plugins["Shockwave Flash"].description.split(" ")[2];
		return (Number(ver) >= Number(version))
	} else if (ie && typeof (ActiveXObject) == "function"){
	
		try{
			var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + version);
			return true;
		}
		catch(e){
			return false;
		}
	}
	
	return true;
}

stripFlash = function (stripQueue){
	if (!document.createElement){
		return;
	}
	for (var i=0; i<stripQueue.length; i++){
		var o = document.getElementById(stripQueue[i]);
		var newHTML = o.innerHTML;	
		newHTML = newHTML.replace(/<!--\s/g, "");
		newHTML = newHTML.replace(/\s-->/g, "");
		newHTML = newHTML.replace(/<embed/gi, "<span");		
		var d = document.createElement("div");
		d.innerHTML = newHTML;
		d.className = o.className;
		d.id = o.id;
		o.parentNode.replaceChild(d, o);
	}
}

var tempFunc = window.onload;
window.onload = function(){
	if (typeof (tempFunc) == "function"){
		try{
			tempFunc();
		} catch(e){}
	}
	objectSwap();
}
/* ----- END JAVA_OBJECTSWAP ----- */

/* ----- JAVA_AWSTATS_MISC_TRACKER ----- */

var awstatsmisctrackerurl="/js/awstats_misc_tracker.js";

function awstats_setCookie(TRKNameOfCookie, TRKvalue, TRKexpirehours) {
	var TRKExpireDate = new Date ();
  	TRKExpireDate.setTime(TRKExpireDate.getTime() + (TRKexpirehours * 3600 * 1000));
  	document.cookie = TRKNameOfCookie + "=" + escape(TRKvalue) + "; path=/" + ((TRKexpirehours == null) ? "" : "; expires=" + TRKExpireDate.toGMTString());
}

function awstats_detectIE(TRKClassID) {
	var TRKresult = false;
	document.write('<SCR' + 'IPT LANGUAGE=VBScript>\n on error resume next \n TRKresult = IsObject(CreateObject("' + TRKClassID + '"))</SCR' + 'IPT>\n');
	if (TRKresult) return 'y';
	else return 'n';
}

function awstats_detectNS(TRKClassID) {
	var TRKn = "n";
	if (TRKnse.indexOf(TRKClassID) != -1) if (navigator.mimeTypes[TRKClassID].enabledPlugin != null) TRKn = "y";
	return TRKn;
}

function awstats_getCookie(TRKNameOfCookie){
	if (document.cookie.length > 0){
		var TRKbegin = document.cookie.indexOf(TRKNameOfCookie+"=");
	    if (TRKbegin != -1) {
			TRKbegin += TRKNameOfCookie.length+1; 
			TRKend = document.cookie.indexOf(";", TRKbegin);
			if (TRKend == -1) TRKend = document.cookie.length;
    	  	return unescape(document.cookie.substring(TRKbegin, TRKend));
		}
		return null; 
  	}
	return null; 
}

if (window.location.search == "" || window.location.search == "?") {
    // If no query string
	var TRKnow = new Date();
	var TRKscreen=screen.width+"x"+screen.height;
	if (navigator.appName != "Netscape") { TRKcdi=screen.colorDepth; }
	else {TRKcdi=screen.pixelDepth};
	var TRKjava=navigator.javaEnabled();
	var TRKuserid=awstats_getCookie("AWSUSER_ID");
	var TRKsessionid=awstats_getCookie("AWSSESSION_ID");
	var TRKrandomnumber=Math.floor(Math.random()*10000);
	if (TRKuserid == null || (TRKuserid=="")) { TRKuserid = "awsuser_id" + TRKnow.getTime() +"r"+ TRKrandomnumber; }
	if (TRKsessionid == null || (TRKsessionid=="")) { TRKsessionid = "awssession_id" + TRKnow.getTime() +"r"+ TRKrandomnumber; }
	awstats_setCookie("AWSUSER_ID", TRKuserid, 10000);
	awstats_setCookie("AWSSESSION_ID", TRKsessionid, 1);
	TRKuserid=""; TRKuserid=awstats_getCookie("AWSUSER_ID");
	TRKsessionid=""; TRKsessionid=awstats_getCookie("AWSSESSION_ID");
	
	var TRKagt=navigator.userAgent.toLowerCase();
	var TRKie  = (TRKagt.indexOf("msie") != -1);
	var TRKns  = (navigator.appName.indexOf("Netscape") != -1);
	var TRKwin = ((TRKagt.indexOf("win")!=-1) || (TRKagt.indexOf("32bit")!=-1));
	var TRKmac = (TRKagt.indexOf("mac")!=-1);

    // Detect the browser internal width and height
    var TRKwinsize;
    if (document.documentElement && document.documentElement.clientWidth)
        TRKwinsize = document.documentElement.clientWidth + 'x' + document.documentElement.clientHeight;
    else if (document.body && document.body.clientWidth)
        TRKwinsize = document.body.clientWidth + 'x' + document.body.clientHeight;
    else
        TRKwinsize = window.innerWidth + 'x' + window.innerHeight;
	
	var TRKshk;
	var TRKfla;
	var TRKrp;
	var TRKmov;
	var TRKwma;
	var TRKpdf;

	if (TRKie && TRKwin) {
		TRKshk = awstats_detectIE("SWCtl.SWCtl.1")
		TRKfla = awstats_detectIE("ShockwaveFlash.ShockwaveFlash.1")
		TRKrp  = awstats_detectIE("rmocx.RealPlayer G2 Control.1")
		TRKmov = awstats_detectIE("QuickTimeCheckObject.QuickTimeCheck.1")
		TRKwma = awstats_detectIE("MediaPlayer.MediaPlayer.1")
		TRKpdf = 'n'; 
        if (awstats_detectIE("PDF.PdfCtrl.1") == 'y') { TRKpdf = 'y'; }
	    if (awstats_detectIE('PDF.PdfCtrl.5') == 'y') { TRKpdf = 'y'; }
		if (awstats_detectIE('PDF.PdfCtrl.6') == 'y') { TRKpdf = 'y'; }
	}
	if (TRKns || !TRKwin) {
		var TRKnse = ""; for (var TRKi=0;TRKi<navigator.mimeTypes.length;TRKi++) TRKnse += navigator.mimeTypes[TRKi].type.toLowerCase();
		TRKshk = awstats_detectNS("application/x-director")
		TRKfla = awstats_detectNS("application/x-shockwave-flash")
		TRKrp  = awstats_detectNS("audio/x-pn-realaudio-plugin")
		TRKmov = awstats_detectNS("video/quicktime")
		TRKwma = awstats_detectNS("application/x-mplayer2")
		TRKpdf = awstats_detectNS("application/pdf");
	}

	var imgsrc = awstatsmisctrackerurl+'?screen='+TRKscreen+'&win='+TRKwinsize+'&cdi='+TRKcdi+'&java='+TRKjava+'&shk='+TRKshk+'&fla='+TRKfla+'&rp='+TRKrp+'&mov='+TRKmov+'&wma='+TRKwma+'&pdf='+TRKpdf+'&uid='+TRKuserid+'&sid='+TRKsessionid;
	if( document.createElementNS ) {
    	var l=document.createElementNS("http://www.w3.org/1999/xhtml","img");
        l.setAttribute("src", imgsrc );
        l.setAttribute("height", "0");
        l.setAttribute("width", "0");
        l.setAttribute("border", "0");
	} else {
		document.write('<img style="display:none;" src="'+ imgsrc +'" height="0" width="0" border="0" />')
	}

}

function showNers()
{
document.cookie="nerstop=1; path=/";    
param="&refer=&page=http://www.bsn.ru/";
param+="&c="+(document.cookie?'yes':'no')+"&res="+screen.width+'x'+screen.height+"&b=2";
document.write("<a id='topnersru' href='http://top.ners.ru/in.php?id=2803' target='_blank'><img "+
" src='http://top.ners.ru/img.php?id=2803"+param+"' border='0' alt='top.ners.ru'></a>");
}
/* ----- END JAVA_OBJECTSWAP ----- */
function sortBy(field)
{
    if(field!=undefined)
    {
        $("form:[name='hids']").append('<input type="hidden" name="field" value="'+field+'"/>');
    }
}
// Show's Google map on offer's page
function loadEstateMap(lat, lng) {

    if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        map.removeMapType(G_SATELLITE_MAP);
        point = new GLatLng(lat,lng);

        map.setCenter(point, 15);

        map.addControl(new GLargeMapControl());

        iconBlue = new GIcon();
        iconBlue.image = '/img/kpal.png';
        iconBlue.shadow = '/img/kpal_sh.png';
        iconBlue.iconSize = new GSize(27, 47);
        iconBlue.shadowSize = new GSize(52, 45);
        iconBlue.iconAnchor = new GPoint(14, 51);
        iconBlue.infoWindowAnchor = new GPoint(15, 1);

        marker = new GMarker(point, iconBlue);
        map.addOverlay(marker);

        var mapControl = new GMapTypeControl();
            
        
        map.addControl(mapControl);
   }
}

function showNers()
{
    document.cookie="nerstop=1; path=/";    
    param="&refer="+escape(document.referrer)+"&page="+escape(window.location.href);
    param+="&c="+(document.cookie?'yes':'no')+"&res="+screen.width+'x'+screen.height+"&b=2";
    document.write("<a id='topnersru' href='http://top.ners.ru/in.php?id=2803' target='_blank'><img "+" src='http://top.ners.ru/img.php?id=2803"+param+"' border='0' alt='top.ners.ru'></a>")
}
