function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
	    return window[movieName];
	} else {
	    return document[movieName];
	}
}
        
function selectMapArea(ID){
	return ID;
//	return this.value;
}

function clickEventAct(OBJ,ID){
	if (OBJ)
		OBJ.parentNode.className = 'act';
} 

function clickEventNct(OBJ,ID){
	if (OBJ)
		OBJ.parentNode.className = '';
}

function clickSmenu(OBJ,ID){
	
	var oursblock = document.getElementById('tm'+ID);
	if (oursblock){
		var smenu = document.getElementById('smenu');

		var span = OBJ.parentNode;
		
		if (smenu){
			if (smenu.style.display=='block'){
				
				if (span){
					clickEventNct(span,ID);
					span.onmouseout = function onmouseout(event) { clickEventNct(this,ID); }
					span.onmouseover = function onmouseover(event) { clickEventAct(this,ID); }
				}
				smenu.style.display = 'none';
				oursblock.style.display = 'none';
			}else{
				
				if (span){
					clickEventAct(span,ID);
					span.onmouseover = '';
					span.onmouseout = '';
				}
				smenu.style.display = 'block';
				oursblock.style.display = 'block';
			}
		}
	}
}

function closeWindow(block){
	var oursblock = document.getElementById(block);
	if (oursblock){
		oursblock.style.display = 'none';
		if (oursblock.style.visibility)
			oursblock.style.visibility = 'hidden';
	}
}

function showWindow(block){
	
	var oursblock = document.getElementById(block);
	if (oursblock){
		oursblock.style.display = 'block';
	}
}

function CatMenuAct(OBJ){
	
	var nodobj = OBJ.parentNode;
	nodobj.className+=' act';
	OBJ.style.display = 'none';

	var div = nodobj.getElementsByTagName("div");
	var ul = nodobj.getElementsByTagName("ul");
	if (div[0])
		div[0].style.display = 'block';
	if (ul[0])
		ul[0].style.display = 'block';
} 

function CatMenuNct(OBJ){
	
	var nodobj = OBJ.parentNode;
	nodobj.className = nodobj.className.replace(' act','');
	OBJ.style.display = 'none';

	var div = nodobj.getElementsByTagName("u");
	var ul = nodobj.getElementsByTagName("ul");
	if (div[0])
		div[0].style.display = 'block';
	if (ul[0])
		ul[0].style.display = 'none';
} 



function turnMenu(link,OBJ,act){
	
	if (act && OBJ){
		var uls = document.getElementById('ul'+act);
		if (uls){
			uls.style.display = 'none';
			OBJ.className = 'na';
			OBJ.setAttribute('onclick','turnMenu(\''+link+'\')');
		}
	}else
		location.href = link;
}

function BlockMenuAct(ID,OBJ){
	
	
	var titlesbl = document.getElementById('titlesbl');
	if (titlesbl){
		var div = titlesbl.getElementsByTagName("div");
		for (var i=0;i<div.length; i++) {
			div[i].className = div[i].className.replace('act','');
			div[i].className = div[i].className.replace('p','');
		}
	}
	
	var txtsbl = document.getElementById('txtsbl');
	if (txtsbl){
		var div = txtsbl.getElementsByTagName("div");
		for (var i=0;i<div.length; i++) {
			div[i].style.display = 'none';
		}
	}
	
	if (OBJ){
		var oursblock = OBJ.parentNode;
		if (oursblock)
			oursblock.className+= 'act';
		var IDs = (ID - 1);
		if (IDs>=0){
			var prevblock = document.getElementById('tl'+IDs);
			if (prevblock)
				prevblock.className = 'p' + prevblock.className;
		}
		
		var nextblock = document.getElementById('bl'+ID);
		if (nextblock){
			nextblock.style.display = 'block';
		}
	}
} 


