function getDir( p_sURL )
{
	var sResult = unescape( p_sURL.substring( 0, (p_sURL.lastIndexOf("/")) + 1) );
	return sResult;
}

function getFileName( p_sURL )
{
	var sResult = unescape( p_sURL.substring( p_sURL.lastIndexOf("/") + 1 ),  p_sURL.length );
	return sResult;
}

function switchToEnglish()
{
	var sURL = location.href;
	location.href = getDir( sURL ) + "en/" + getFileName( sURL );
}

function switchToRussian()
{
	var sURL = location.href;
	var sDir = getDir( sURL )
	location.href = sDir.substring( 0, (sDir.lastIndexOf("/") - 2) ) + getFileName( sURL );
}

function showhideBlock( p_sId )
{
	oBlock = document.getElementById( p_sId );
	display = "";
	if( window.getComputedStyle )
		display = window.getComputedStyle( oBlock, null ).display;
	else if( oBlock.currentStyle )
		display = oBlock.currentStyle.display;
	if( display == "none" )
		oBlock.style.display = "block";
	else
		oBlock.style.display = "none";
}

function onLoadContacts(){
     document.getElementById("idml").innerHTML = "<a href=\"mailto:mtinfo@effts.ru\">mtinfo@effts.ru</a>"
}
