/* NOCCCD */
function getElementsByClass(searchClass,node,tag) { 
        var classElements = new Array();
        if ( node == null )
                node = document;
        if ( tag == null )
                tag = '*';
        var els = node.getElementsByTagName(tag);
        var elsLen = els.length;
        var pattern = new RegExp('(^|\\\\s)'+searchClass+'(\\\\s|$)');
        for (i = 0, j = 0; i < elsLen; i++) {
                if ( pattern.test(els[i].className) ) {
                        classElements[j] = els[i];
                        j++;
                }
        }
        return classElements;
}
var redirectDelay = 5000;
function resetPage() {
        location.href = '/';
}
function fixPinChangeLogout(){
        var error_msg = document.getElementById('error_msg').innerHTML;
        if (error_msg.indexOf("Can't service request to /cp/home/logout") > 0){
                if(error_msg.indexOf("failed to find permissions") > 0) {
                        var hdng_class = getElementsByClass('head24');
                        for (i=0;i<hdng_class.length;i++){
                                var hdng = hdng_class[i].innerHTML;
                                if (hdng.indexOf("System Error") > 0){
                                        hdng_class[i].innerHTML = "Logout";
                                }
                        }
                        document.getElementById('error_msg').innerHTML = "<b>PIN changed during session.<br>Signing out...one moment please.</b
>";
                        document.getElementById('error_msg').innerHTML += "<br><br><b>Click here to <a href='javascript:resetPage();'>Log In</a
> again!</b>";
                        document.getElementById('error_msg').innerHTML += "<br><br><br>If this page does not disappear after a few seconds,<br>
";
                        document.getElementById('error_msg').innerHTML += "click here to <a href='javascript:resetPage();'>complete the sign ou
t process</a>.";
                        setTimeout ('resetPage()', redirectDelay);
                }
        }
}
/* end NOCCCD */
function handleResize()
{
		if ( navigator.appName != "Netscape" ||
				 navigator.appVersion.substring(0,3) != "4.0" )
		{
				location.reload()
		}
		return false
}
function Build_Footer_Small()
{	
		document.write("<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>");
		document.write("<TR><TD COLSPAN=3><IMG SRC='/cps/images/misc/dot-blank.gif' WIDTH=1 HEIGHT=5></TD></TR>");
		document.write("<TR>");
		document.write("<TD VALIGN=TOP WIDTH=100%><IMG SRC='/cps/images/misc/dot-blank.gif' WIDTH=1 HEIGHT=5><BR clear=all><IMG SRC='/cps/images/misc/dot-blank.gif' WIDTH=2 HEIGHT=40 ALIGN=LEFT HSPACE=0><SPAN ID='copyright'>Copyright&nbsp;&copy; SunGard 1998&nbsp;-&nbsp;2008.</SPAN></TD>");
		document.write("<TD VALIGN=TOP ALIGN=RIGHT NOWRAP><IMG SRC='/cps/images/misc/dot-blank.gif' WIDTH=1 HEIGHT=5><BR><SPAN CLASS='text10' ID='totop_ftr'>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF='#TOP' onMouseover=\"window.status=''; return true;\"><B>Top</B></A>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></TD>");
		document.write("<TD WIDTH=120 ALIGN=RIGHT><A HREF='javascript:OpenNotice();' onMouseover=\"window.status=''; return true;\"><IMG SRC='/cps/images/misc/foot_logo.gif' ALT='Powered by SCT' WIDTH=129 HEIGHT=52 BORDER=0></A></TD>");
		document.write("</TR>");
		document.write("</TABLE>");
}
function OpenNotice()
{
		stats='resizable=no,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,';
		stats += 'width=600,height=400';
		noticeWindow = window.open ( /*URL*/ "/misc/tmNotice.html","tmNotice",stats)
		setTimeout ("noticeWindow.focus ()", 500);
}
