var winUploadWait;

function openUploadWaitForm()
{
	winUploadWait = NewWindow('UploadWaitForm.aspx', 'UploadWait', 400, 200, 'no');
}

function closeUploadWaitForm()
{
	openUploadWaitForm();
	
	if (winUploadWait != null)	
	{
		winUploadWait.close();
	}
	else
	{
		alert('Window is null');
	}
	

}

function NewWindow(mypage, myname, width, height, showScroll) 
{
	var leftPos = (screen.width - width) / 2;
	var topPos = (screen.height - height) / 2;
	
	winprops = 'height='+height+',width='+width+',top='+topPos+',left='+leftPos+',scrollbars='+showScroll+',resizable=no, dependent=yes' 
	
	win = window.open(mypage, myname, winprops)
	
	return win;
//	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

	
/* Versteckt ein Element*/
function HideElement(id) 
{
	/* Ermitteln des Browsers */
	var _ie4 = (document.all) ? true : false;
	var _ns4 = (document.layers) ? true : false;
	var _ns6 = (document.getElementById && !document.all) ? true : false;

	if (_ie4) {document.all[id].style.visibility = "hidden";}
	if (_ns4) {document.layers[id].visibility = "hide";}
	if (_ns6) {document.getElementById(id).style.display = "none";}
}

function ShowElement(id) 
{
	/* Ermitteln des Browsers */
	var _ie4 = (document.all) ? true : false;
	var _ns4 = (document.layers) ? true : false;
	var _ns6 = (document.getElementById && !document.all) ? true : false;
	
	if (_ie4) {document.all[id].style.visibility = "visible";}
	if (_ns4) {document.layers[id].visibility = "show";}
	if (_ns6) {document.getElementById(id).style.display = "block";}
}
