function g_fnOpenWin(sUrl, sName, sResizable, iWidth, iHeight) 
{
	var objWin = window.open(sUrl,sName,'width=' + iWidth + ',height=' + iHeight + ',status=yes,resizable=' + sResizable + ',toolbar=no,menubar=no,scrollbars=yes,location=no');
	if (objWin != null)
	  { 
		objWin.moveTo((screen.width-iWidth)/2,(screen.height-iHeight)/2);
		objWin.focus();
	  }
}

function g_fnSessionTimeout()
{

	g_fnOpenWin('/_/login/loggedout.asp', 'LoggedOutInfo', 'yes', '480', '160');

}

function g_fnTrack(sTrackingNumber) 
{

	var sUrl = 'http://server.logistik.posten.se/servlet/PacTrack';

	// Tracking number
	sUrl += '?kolliid=' + escape(sTrackingNumber);

	// Language
	sUrl += '&lang=SE';

	// XSL (XML StyleSheet)
	sUrl += '&xslURL=' + escape('/xsl/pactrack/standard.xsl');

	// We can't use g_fnOpenWin here because IE will not allow us to 
	// move a window that isn't in our domain.
	var objWin = window.open(sUrl, 'frameTrack','width=500,height=400,status=yes,resizable=yes,toolbar=no,menubar=no,scrollbars=yes,location=no');
	if (objWin != null)
	  { 
		objWin.focus();
	  }
}

function g_fnGetSelectValue(selectObject)
{
	if ( !selectObject )
	{
		return null;
	}
	else
	{
		var iSelectedIndex = selectObject.selectedIndex;
		
		return selectObject.options[iSelectedIndex].value;
	}	
}

