<!--

if (top.location != self.location)
{
top.location.replace(self.location)
} 

function displaydiv(id, hide) {
	var div = document.getElementById('div' + id);
	var display = div.style.display;
	
	if (display == "none") {
		if (hide) {
			var obj;
			for (i = 1; i < 200; i++) {
				obj = document.getElementById('div' + i);
				if (obj != null) {
					obj.style.display = "none";
					document.getElementById('img' + i).src = plus.src;
				}
			}
		}
		div.style.display = "";
		document.getElementById('img' + id).src = minus.src;
		
	}
	else {
		div.style.display = "none";
		document.getElementById('img' + id).src = plus.src;
	}
	
	return false;
}

function PreLoad(imgName, imgObjName) {
	if (document.images)
		document.images[imgName].src = eval(imgObjName + ".src");
}

jQuery(function() {
  jQuery('#gallery a').lightBox();
});


function Translate(selectedlang) {
  if (location.hostname == 'http://www.altay-rrc.ru/' && selectedlang == 'ru|ru')
    return;
  else if(location.hostname != 'http://www.altay-rrc.ru/' && selectedlang == 'ru|ru')
    location.href = done('u');
  else if(location.hostname == 'http://www.altay-rrc.ru/' && selectedlang != 'ru|ru')
    // location.href = 'http://translate.google.com/translate_p?client=tmpg&hl=ru&langpair=' + selectedlang.value + '&u=http://www.altay-rrc.ru/' + location.href;
    location.href = 'http://translate.google.com/translate_p?client=tmpg&hl=ru&langpair=' + selectedlang + '&u=http://www.altay-rrc.ru/' ;
  else
    location.href = 'http://translate.google.com/translate_p?client=tmpg&hl=ru&langpair=' + selectedlang + '&u=http://www.altay-rrc.ru/' ;
    // location.href = 'http://translate.google.com/translate_p?client=tmpg&hl=ru&langpair=' + selectedlang.value + '&u=http://www.altay-rrc.ru/' + done('u');
} 

function done(name) {
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var origURL = "[\\?&]"+name+"=([^&#]*)";
  var orig = new RegExp(origURL);
  var results = orig.exec(location.href);
  if(results == null)
    return '';
  else
    return results[1];
}

/*
snow_intensive=400;
snow_speed=30000;
snow_src=new Array('/images/snow/snow.gif','/images/snow/snow2.gif','/images/snow/snow3.gif','/images/snow/snow.gif');

jQuery(document).ready(snow_start);

function snow_start() {
  snow_id=1;
  snow_y=jQuery("#container").height()-30;
  setInterval(function() {
    snow_x=Math.random()*document.body.offsetWidth-100;
    snow_img=(snow_src instanceof Array ? snow_src[Math.floor(Math.random()*snow_src.length)] : snow_src);
    snow_elem='<img class="png" id="snow'+snow_id+'" style="position:absolute; left:'+snow_x+'px; top:0;z-index:10000" src="'+snow_img+'"/>';
    jQuery("#container").append(snow_elem);
    snow_move(snow_id);
    snow_id++;
  },snow_intensive);
}

function snow_move(id) {
  jQuery('#snow'+id).animate({top:snow_y,left:"+="+Math.random()*100},snow_speed,function() {
    jQuery(this).empty().remove();
  });
}
*/

-->
