<!--//

// -->		

/* HELP FUNCTIONS
 ******************************/
var GetElementById = GetElementById_Initialize;

function GetElementById_Initialize( id )
{
	if( null != document.getElementById )
	{
		GetElementById = function( id ) 
		{ 
			return document.getElementById( id ); 
		}
	}
	else if( null != document.all )	
	{
		GetElementById = function( id )
		{
			return document.all[ id ];
		}
	}
	else if( null != document.layers )
	{
		GetElementById = function( id )
		{
			return GetElementById_Netscape4( id );
		}
	}
	else
	{
		GetElementById = function( id )
		{
			return null;
		}
	}
	return GetElementById( id );
}

function GetElementById_Netscape4( id )
{
	var i;
	for( i = 0; i < document.forms[ 0 ].length; i ++ )
	{
		var e = document.forms[ 0 ].elements[ i ];
		if( e.name && id == e.name )
			return e;
	}
	return document.layers[ id ];
}

/* Window Functions
 **************************/
 var wopen; 

function closeWindow()
{
	if (window.opener.progressWindow)
	{
		window.opener.progressWindow.close();
	}
	window.close();
}

function new_window(url, iWidth, iHeight) 
{   
	iLeft = (screen.availWidth-10 - iWidth) / 2;
	iTop = (screen.availHeight-20 - iHeight) / 2;

	if(wopen == null || wopen.closed)
	{
		wopen = window.open(url,"_blank","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop);
		if(wopen != null)
		{
			wopen.dependent = true;
		}
	}
	else
	{  
		wopen.close();
		wopen = window.open(url,"_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop);
	}
}

function new_window_scroll(url, iWidth, iHeight) 
{   
	iLeft = (screen.availWidth-10 - iWidth) / 2;
	iTop = (screen.availHeight-20 - iHeight) / 2;

	if(wopen == null || wopen.closed)
	{
		wopen = window.open(url,"_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop);
	}
	else
	{  
		wopen.close();
		wopen = window.open(url,"_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=" + iWidth + ",height=" + iHeight + ",left=" + iLeft + ",top=" + iTop);
	}
}

function open_newWindowJoinQuery(f,q,url)
{
	if(document.getElementById)
	{
		var obj = document.getElementById(f);
		if (obj!=null)
		{
			new_window(url + q + obj.value);
		}
	}
}

function refreshParent()
{
	sURL = window.opener.location.href;
	window.opener.location.href = sURL;
	closeWindow();
}

function refreshParentURL(url)
{
	window.opener.location.href = url;
	closeWindow();
}

function submitParentForm()
{
	window.opener.document.forms(0).submit();
	closeWindow();
}

function changeParent(sURL)
{
	window.opener.location.href = sURL;
	closeWindow();
}

function changeURL(sURL)
{
	window.location.href = sURL;
}





