// JavaScript Document
/*function visibl(id) {
     var o = document.getElementById(id);
     if (o.style.display=='none') {
          o.style.display = 'block';
     } else o.style.display = 'none';
}*/
var prev_visibl = null;

function visibl(id) {
    var o = document.getElementById(id);
    if (o.style.display=='none') {
        if (prev_visibl)
            visibl(prev_visibl);
        o.style.display = 'block';
        prev_visibl = id;
    } else {
        o.style.display = 'none';
        prev_visibl = null;
    }
}

function openwnd(url)
{
     window.open(url, '_blank', 'menubar=0,status=0,resizable=0,scrollbars=0');
}

function leftopen(id)
{
	var o = document.getElementById(id);
	if (o.style.display=='none')
		o.style.display = 'block';
	else
		o.style.display = 'none';
}

function getLeft(o)
{
	var result = o.offsetLeft;
	while (o = o.offsetParent)
		result += o.offsetLeft;
	return result;
}

function getTop(o)
{
	var result = o.offsetTop;
	while (o = o.offsetParent)
		result += o.offsetTop;
	return result;
}

var timers = new Object();

function topopen(sId, tId)
{
	for (id in timers)
	{
		clearTimeout(timers[tId]);
		if (id != tId)
		{
			document.getElementById(id).style.display = 'none';
			document.getElementById(id.replace('ttm', 'stm')).className = '';
		}
	}
	var s = document.getElementById(sId);
	var t = document.getElementById(tId);
	if (!s || !t)
		return;
	s.className = 'selected';
	t.style.position = 'absolute';
	t.style.left = getLeft(s) + 'px';
	t.style.top = getTop(s) + s.offsetHeight + 'px';
	t.style.display = 'block';
}

function topclose(sId, tId)
{
	var s = document.getElementById(sId);
	var t = document.getElementById(tId);
	if (!s || !t)
		return;
	if (timers[tId])
		clearTimeout(timers[tId]);
	timers[tId] = setTimeout("document.getElementById('" + sId + "').className = ''; document.getElementById('" + tId + "').style.display = 'none'", 700);
}

function mainimageover(id, n)
{
	var s = document.getElementById('s'+id);
	var t = document.getElementById('t'+id);
	if (!s || !t)
		return;

	t.style.position = 'absolute';
	t.style.left = getLeft(s) - (n > 5 ? 144 : -10) + 'px';
	t.style.top = getTop(s) + s.offsetHeight + 'px';
	t.style.display = 'block';
}

function mainimageout(id)
{
	var t = document.getElementById('t'+id);
	if (!t)
		return;
	
	t.style.display = 'none';
}
function InsertFlashObj(sId, sSrc, sWidth, sHeight, bReturn) {
     var result = "<object id='"+sId+"' width='"+sWidth+"' height='"+sHeight+"' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+sSrc+"' /><param name='quality' value='high' /><param name='wmode' value='transparent'/><embed src='"+sSrc+"' width='"+sWidth+"' height='"+sHeight+"' name='"+sId+"' align='middle' quality='high' wmode='transparent' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";
     if (bReturn) return result;
     document.write(result);
}
