//Browsercheck (needed) ***************
function lib_bwcheck(){
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.opera5=this.agent.indexOf("Opera")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6||this.ie7
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie7||this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
  return this
}
bw=new lib_bwcheck(); //Browsercheck object
//if(!bw.ie)    //Internet explorer
//if(!bw.opera5)    //Opera
//Lib objects  ********************    id = stamp

function setStamp()
{
	//bw=new lib_bwcheck();	if(bw.ie)
	{
		document.getElementById('stamp').style.left = 200;//200
	}else if(bw.opera5)
	{
		document.getElementById('stamp').style.left = 200;//80
	}else
	{		document.getElementById('stamp').style.left = 200;//200	}
}

function playSound() {
document.firstSound.play();
//getElementById('firstSound').play();
}
function pauseSound() {
document.firstSound.pause();

}
function stopSound() {
document.firstSound.stop();
//getElementById('firstSound').stop();
}
function volup() {   currentVolume = document.firstSound.GetVolume();   newVolume = (currentVolume + 10);
	if (document.firstSound.GetVolume() == 100)
	{
		alert("Volume is already at maximum");
	}
   if (newVolume < 90)
   {
   document.firstSound.setvol(newVolume);
   }   else
   {
		if ((newVolume <= 100) && (newVolume > 90))
		{
			document.firstSound.setvol(100);
		}
	}
}
function voldown() {
	currentVolume = document.firstSound.GetVolume();
	newVolume = (currentVolume - 10);
	if (document.firstSound.GetVolume() == 0)
	{
		alert("Volume is already at minimum");
	}
	if (newVolume > 10)
	{
		document.firstSound.setvol(newVolume);
	}else{
		if ((newVolume >= 0) && (newVolume < 10))
		{
			document.firstSound.setvol(0);
		}
	}
}
function print_snd()
{
	if(bw.ie7){		document.getElementById('divsound').innerHTML = '<EMBED  id="firstSound"  SRC="images/gsong.mp3"   HIDDEN="true"   AUTOSTART="true" height="44" width="288" loop="false" play_loop="1"   NAME="firstSound"   MASTERSOUND><P>Звук <A  style="border:0px #fff solid;" HREF="javascript:playSound();">включить </A>/<A style="border:0px #fff solid;" HREF="javascript:stopSound();"> выключить</A></P>';

	}}
function setCssForOtherBrowsers()
{	if(bw.ie7||bw.opera5){		//document.getElementById('stylesheet').href = 'Hapki.css';
		var van_dao = 328;	}else {		document.getElementById('stylesheet').href = 'Hapki8.css';	}}
setCssForOtherBrowsers();

function checkfolder()
{	var folder = '';
	if(bw.ie7||bw.opera5){
		//document.write('');
		folder = '';
		var van_dao = 328;
	}else {
		folder = 'images8/';
	}
	return folder;}
function printindmenu()
{
	folders = checkfolder();
	document.write('<a href="page1.php"><img border=0 alt="ХАН Ю СУЛЬ<br><br><font color=\'#0099ff\' face=\'Tahoma\' size=\'-2\'><i>НЕБО - Юг,<br>защита</i></font>" src="images/'+folders+'1.png"></a>');
	document.write('<a href="page2.php"><img border=0 alt="ХАП КИ ДО<br><br><font color=\'#ff7700\' face=\'Tahoma\' size=\'-2\'><i>ОГОНЬ - Восток,<br>толкание</i></font>" src="images/'+folders+'3.png"></a>');
	document.write('<a href="page3.php"><img border=0 alt="ХАН КУМ ДО<br><br><font color=\'#fcfcfc\' face=\'Tahoma\' size=\'-2\'><i>ВЕТЕР - Юго-Восток,<br>отведение</i></font>" src="images/'+folders+'2.png"></a>');
	document.write('<a href="page4.php"><img border=0 alt="ГИБКОСТЬ<br><br><font color=\'#0000ff\' face=\'Tahoma\' size=\'-2\'><i>ОЗЕРО - Северо-Восток,<br>локоть</i></font>" src="images/'+folders+'4.png"></a>');
	document.write('<a href="page5.php"><img border=0 alt="ПИТАНИЕ<br><br><font color=\'#aaaaaa\' face=\'Tahoma\' size=\'-2\'><i>ГОРА - Юго-Запад,<br>толкание</i></font>" src="images/'+folders+'8.png"></a>');
	document.write('<a href="page6.php"><img border=0 alt="ФОТОГАЛЕРЕЯ<br><br><font color=\'#ffff00\' face=\'Tahoma\' size=\'-2\'><i>ГРОМ - Северо-Запад,<br>разведение</i></font>" src="images/'+folders+'6.png"></a>');
	document.write('<a href="page7.php"><img border=0 alt="ХАН КИ ДО<br><br><font color=\'#0022ff\' face=\'Tahoma\' size=\'-2\'><i>ВОДА - Запад,<br>давление</i></font>" src="images/'+folders+'7.png"></a>');
	document.write('<a href="page8.php"><img border=0 alt="КОНТАКТЫ<br><br><font color=\'#a67334\' face=\'Tahoma\' size=\'-2\'><i>ЗЕМЛЯ - Север,<br>отведение</i></font>" src="images/'+folders+'5.png"></a>');
}