var nn = document.layers ? true : false;
var dom = document.getElementById ? true : false;
var old_ie = (document.all && !dom) ? true : false;
var ie = (navigator.appVersion.indexOf('MSIE') <= 0) ? true : false;
var none_value = "none";

if (self.parent.frames.length != 0)
	self.parent.location.replace(document.location.href);

function em(box, server, zone)
{
	var at = String.fromCharCode(64);
	return '<a href="'+'mai'+'lto'+':'+box+at+server+'.'+zone+'">'+box+at+server+'.'+zone+'<'+'/a>';
}

function open_request_window(window_url, width, height)
{
	var left = Math.round((screen.width-width)/2), top = Math.round((screen.height-height)/2)-30
	var window_param =	'ontop=yes,status=yes,menubar=no,toolbar=no,directories=no,resizable=yes,scrollbars=yes,location=no,'+
						'width='+width+',height='+height+','+
						'left='+left+',top='+top;
	var window_name = 'win_'+Math.floor(Math.random()*1000);
	var win = window.open(window_url, window_name, window_param);
	win.focus();
	return false;
}

function open_location(form)
{               
	var formindex = form.nav.selectedIndex;
	if (form.nav.options[formindex].value != none_value)
		document.location = form.nav.options[formindex].value; 
}

function print_select(lines)
{
	var width_text = "width:100px";
	if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0)
		width_text = "width:95%";
	document.write ('<select name="nav" onchange="open_location(this.form)" style="'+width_text);
	document.write (';font-family:arial narrow,arial;font-size:11px;');
	document.write ('">');
	for(i=0; i<lines.length; i++)
	{
		sel = lines[i][2] ? " selected" : "";
		document.write ('<option value="'+lines[i][0]+'"'+sel+'>'+lines[i][1]+'</option>');
	}
	document.write ('</select>');
}               
