// JavaScript Document
function pageToGo(getURL){
	if(getURL == "welcome"){
	location.href="http://www.periohsu.com";
	} else {
	location.href=getURL+ ".php";
	}
}
function pageToGo2(getURL,name){
	location.href=getURL+ ".php?term" +name+ "#" +name;
}

function soundOff(){
	window.open('soundOff.php', 'windowName', 'width=100, height=100');void(0);
}

function soundOn(){
	window.open('sound.php', 'windowName', 'width=100, height=100');void(0);
}


function gohidden(){
	m_target = "newsperioimplant";
	eval('d'+'o'+'cument.get'+'El'+'ementB'+'yId(m_tar'+'ge'+'t).s'+'tyl'+'e.d'+'is'+'play = "none"');
}

//±`¨£°Ýµª¯B°Êicon
function allblur() {
	for (i = 0; i < document.links.length; i++)
		document.links[i].onfocus = document.links[i].blur;
}
var divMenu = null;
var layerHeight = 410; 

function CheckUIElements(){
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

	yMenuFrom   = parseInt (divMenu.style.top, 10);
	yMenuTo     = document.body.scrollTop + layerHeight;

	timeoutNextCheck = 500;

	if ( yMenuFrom != yMenuTo ) {
		yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );

		if ( yMenuTo < yMenuFrom ) {
			yOffset = -yOffset;
		}

		divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

		timeoutNextCheck = 10;
	}

	setTimeout ("CheckUIElements()", timeoutNextCheck);
}

function stalkerLayerFromTop(stalkerLayer, stalkerLayerHeight) {
	if (stalkerLayer == "" || stalkerLayer == null) {
		return false;
	}

	stalkerLayerHeight = stalkerLayerHeight;
	divMenu = stalkerLayer;
	divMenu.style.top = document.body.scrollTop + layerHeight; 
	divMenu.style.visibility = "visible";
	CheckUIElements();
	return true;
}

window.focus();