if (top.location != location) top.location.href = location.href;
var warningString = "<B>WARNING:</B> To maintain your login session, make sure that your browser is configured to accept Cookies.";
document.cookie = 'acceptsCookies=yes';
if(document.cookie == ''){
document.write(warningString);
}
else{
document.cookie = 'acceptsCookies=yes; expires=Fri, 13-Apr-1970 00:00:00 GMT';
}
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
document.cookie = curCookie;
}
function getCookie(name) {
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else
begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
}
function SubmitForm() {
if(document.frmPost.dispusername.value.length > 0 && document.frmPost.password.value.length == 0) {
alert("Please enter your password.");
return false;
}
document.frmPost.username.value = trim(document.frmPost.dispusername.value) + '@cgx.cooperatorsgroup.ca';
document.frmPost.submit();
}
function trim(str)
{
return str.replace(/^\s*|\s*$/g,"");
}
function ClearField() {
document.frmPost.dispusername.value = "";
document.frmPost.password.value = "";
}
function openNote()
{
var agt=navigator.userAgent.toLowerCase();
var is_aol = (agt.indexOf("aol") != -1);
leftpos=0;
if (screen) {
leftpos=screen.width/2 - 300;
}
if (is_aol) {
var s = " ";
s=document.calculator.sJavaScriptReport('HTML');
document.write(s);
}
else {
window.location=("/local/sov/help.html");
}
}
function GotoAv() {
window.location=("/ps/avatier/ps/default.aspx?backto=" + getCookie("RTMPage"));
}
function fixDate(date) {
var base = new Date(0);
var skew = base.getTime();
if (skew > 0)
date.setTime(date.getTime() - skew);
}
function submitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;
if (keycode == 13)
{
SubmitForm();
return false;
}
else
return true;
}
if(window.location.href.indexOf('pkms') == -1)
{
var now = new Date();
fixDate(now);
now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000); //1 year
setCookie("RTMPage", window.location.href, now);
}
function displayMsgwithBrokenEmailAddr() {
var text1 = "If you would like access to this secured section, please contact your local Sovereign Branch ";
var text2 = "office or e-mail webm";
var text3 = "aster@s";
var text4 = "ovgen.c";
var text5 = "om.";
}
