



// --------------------------------------------------------------------------------------
// popup window
function openwinOnCentre(url, w, h){
	window.open(url,'_blank','top='+(window.screen.height-h)/2+',left='+(window.screen.width-w)/2+',height='+h+',width='+w+',status = no,toolbar = no,scrollbars = no,titlebar=no,directories=no,resizable=no menubar=no,location=no');
	return;
}
// --------------------------------------------------------------------------------------


// --------------------------------------------------------------------------------------
// change images on activate cursor

	function menuOver(id){
		//alert('sffds');
		window.document.getElementById(id).src="../images/design/point_sel.gif";
		//o.src="../images/design/pugovka_over_icon.gif";
	}
	function menuOut(id){
		
		window.document.getElementById(id).src="../images/design/point_menu_icon.gif";
		//o.src="../images/design/pugovka_icon.gif";
	}
	
// --------------------------------------------------------------------------------------


// --------------------------------------------------------------------------------------
// function replacement of string (for replace tags internals)

function replace_all(s, subs, repl)
{
	res=s;
	while((res.search(subs))!=-1)
		res=res.replace(subs,repl);
	return res;
}

// --------------------------------------------------------------------------------------



////Script - change images
	var banners = new Array();
	var current = 0;
	
banners[0] = '<a href="http://www.softdrinks.kz" target="_blank"><img src="../images/content/arctic_banner site-1.gif" alt="Баннеры партнеров" width="139" height="104" /  class="ban_img"></a>';
banners[1] = '<a href="http://www.softdrinks.kz" target="_blank"><img src="../images/content/arctic_banner site-2.gif" alt="Баннеры партнеров" width="139" height="104" /  class="ban_img"></a>';
banners[2] = '<a href="http://www.poltina.kz" target="_blank"><img src="../images/content/poltina_banner site.gif" alt="Баннеры партнеров" width="139" height="104" /  class="ban_img"></a>';

	function changeTopBanner()
	{
		var obj1 	= document.getElementById('partn_banner');
		obj1.innerHTML 	= banners[current];
		current++;
		
		if (current >= banners.length) {
			current = 0;
		}
	}
	
	// ---------------------------------------------------------------------------------------------
	
// ------------- map selection of current points	
	function map_sel(id) {
		
		//alert(id);
		document.getElementById('t'+id).style.display='block';
	
}

	function map_unsel(id) {
		document.getElementById('t'+id).style.display='none';
	
}

// ------------- 

		// ---------------------------------------------------------------------------------------------
		
		
		
function flashDiv(div) {
	//alert(div.id);
	var clsdiv='s-'+div.id;
	sdo=document.getElementById(clsdiv);
	//alert(clsdiv);
	if(sdo.className=="divHide" ){
		sdo.className="divShow";
		
	}
	else {
		sdo.className="divHide";
	}
	return sdo.className=="divShow"; 
}

/////// Флэшер
function flashDivId(id) {
	//alert(div.id);
	var clsdiv='s-'+id;
	sdo=document.getElementById(clsdiv);
	//alert(clsdiv);
	if(sdo.className=="divHide" ){
		sdo.className="divShow";
		
	}
	else {
		sdo.className="divHide";
	}
	return sdo.className=="divShow"; 
}

// ------------- 


function getBrowserName() {
  var ua = navigator.userAgent.toLowerCase();
  // Определим Internet Explorer
  if (ua.indexOf("msie") != -1 && ua.indexOf("opera") == -1 && ua.indexOf("webtv") == -1) {
    return "msie"
  }
  // Opera
  if (ua.indexOf("opera") != -1) {
    return "opera"
  }
  // Gecko = Mozilla + Firefox + Netscape
  if (ua.indexOf("gecko") != -1) {
    return "gecko";
  }
  // Safari, используется в MAC OS
  if (ua.indexOf("safari") != -1) {
    return "safari";
  }
  // Konqueror, используется в UNIX-системах
  if (ua.indexOf("konqueror") != -1) {
    return "konqueror";
  }
  return "unknown";
}


function sample(obj) {

//obj.style.background='#b5bfe8'; //Фон подменю при наведении
obj.style.backgroundImage="url(../images/design/logo.jpg)";
//background-image:{url(путь к файлу) | none;}
}
	
