/* Used in gen-acc0-1.asp 
*/

// Sets cookie values. Expiration date is optional
function setCookie(name, value, expire) {   
document.cookie = name + "=" + escape(value)   
				+ ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}

// Put the focus on the login box
function putFocus()
{
	// If the browser is different from Microsoft Internet Explorer, 
	// the user is redirected
	if (window.navigator.appName != "Microsoft Internet Explorer")
		location.href = "/content/home/gen-det.htm?n=" + window.navigator.appName 
	else
	str = window.navigator.userAgent;
	re = /Opera/; 
	//found = str.match(re); 
		if (str.search(re) != -1) 
			location.href = "/content/home/gen-det.htm"
		else
			document.all['login'].focus()
}

// Create the associated cooky for the user
function register(value) 
{
	var today = new Date();
	var expires = new Date();
	expires.setTime(today.getTime() + 1000*60*60*24*365);
	setCookie("Redirect", value, expires);
}

// Put the focus on the login box
function putFocusportail()
{
	// If the browser is different from Microsoft Internet Explorer, 
	// the user is redirected
	if (window.navigator.appName != "Microsoft Internet Explorer")
		location.href = "/content/home/port-det.asp?n=" + window.navigator.appName 
	else
	str = window.navigator.userAgent;
	re = /Opera/; 
	//found = str.match(re); 
		if (str.search(re) != -1) 
			location.href = "/content/home/port-det.asp"
		else
			document.all['login'].focus()
}