function openWindow(url, name, width, height, center, resize, scroll, posleft, postop)
{
	var X, Y;
	center = 1;

	if (posleft != 0) { X = posleft; }
	if (postop  != 0) { Y = postop; }

	if (!width) { width = 822; }
	if (!height) { height = 550; }
	if (!resize) { resize = 0; }

	if (center)
	{
		X = (screen.width - width) / 2;
		Y = (screen.height - height) / 2;
	}

	if (scroll != 0) scroll = 1;
	if (resize != 0) resize = 1;

	var features = 'width='+width+',height='+height+',top='+Y+',left='+X+',resizable='+resize+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no';

	win2 = window.open(url,name,features);
	win2.focus();
}

function link()
{
	var url = "";
	var i;
	
	for (i = 0; i < arguments.length; i++)
	{
		url = url + arguments[i];
	}
	
	window.open(url);
}

function confirmNav(msg, href)
{
	if (confirm(msg))
	{
		window.location.href = href;
	}
	else
	{
		return;
	}
}

/*function ajaxReplace(pageUrl, value, targetId)
{
	var http = false;

	if (navigator.appName == "Microsoft Internet Explorer") 
	{
		http = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	else 
	{
		http = new XMLHttpRequest();
	} 

	http.open("GET", pageUrl + '?id=' + value , true);
	http.onreadystatechange = function()
	{
		if (http.readyState == 4)
		{
			document.getElementById(targetId).outerHTML = http.responseText;
		}
	}
	
	http.send(null);
}

function ajaxGet(pageUrl, urlParams, targetId)
{
	var http = false;

	if (navigator.appName == "Microsoft Internet Explorer") 
	{
		http = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	else 
	{
		http = new XMLHttpRequest();
	}
	
	http.open("GET", pageUrl + '?' + urlParams , true);
	http.onreadystatechange = function()
	{
		if (http.readyState == 4)
		{
			document.getElementById(targetId).outerHTML = http.responseText;
		}
	}

	http.send(null);
}*/

/*function toggleFloatingWindow(target)
{
	var el = document.getElementById(target);
	
	if (el.style.display == 'none')
	{
		el.style.display = '';
	}
	else
	{
		el.style.display = 'none';
	}
}

function showTip(id, left, top)
{
	obj = document.getElementById(id);
	obj.style.top = top - 55;
	obj.style.left = left - 9;
	obj.style.display = '';
	obj.style.opacity = '0.95';
}

function hideTip(id)
{
	obj = document.getElementById(id);
	obj.style.display = 'none';
}*/

function toggleSubMenu(id)
{
	obj = document.getElementById("subMenu" + id);
	
	if (obj.style.display == 'none')
	{
		obj.style.display = '';
	}
	else
	{
		obj.style.display = 'none';
	}
}

function togglePackageDetails(id, top, left)
{
	obj = document.getElementById(id);
	
	if (obj.style.display == 'none')
	{
		obj.style.top = top - 55;
		obj.style.left = left - 9;
		obj.style.display = '';
		//obj.style.opacity = '0.95';
	}
	else
	{
		obj.style.display = 'none';
	}
}