//functions for directions section
function openDir(name){
	dirWindow = window.open('direct/direct-' + name + '.htm', 'dirWIN', 'width=550,height=350');
	dirWindow.focus()
}


//functions for gallary section
function openPage(url){
	opener.document.location = url
	controller.focus()
}

function showController(){
	controller = window.open('gallary-control.htm', 'ctrlWin', 'width=225,height=300')
	controller.focus()
}


//functions for music play
function openMusic(){
	leftPos=0;
	topPos=0;
	if (screen){
		leftPos = screen.width-155;
		topPos = screen.height-100;
	}
	sound_control = window.open('SC.htm', 'SC', 'width=155,height=55,left='+leftPos+',top='+topPos+',toolbar=no,location=no,scrollbars=no,resizeable=no');
}

function closeMusic(SCwin){
	SCwin.close();
}

function startSound(SCwin){
	SCwin.bigtime.play();
}

function pauseSound(SCwin){
	SCwin.bigtime.pause();
}

function stopSound(SCwin){
	SCwin.bigtime.stop();
}

function changeVol(changeBy){
	currentVol = sound_control.bigtime.GetVolume();
	if (currentVol < 100 && currentVol > 0){
		sound_control.bigtime.setvol(currentVol+changeBy);
	}
}
