
function relocate(Where){
	location=Where;
}
	
function openBrWindow(theURL,winName,features) { //v2.0
 	window.open(theURL,winName,features);
}
    
function open_window(url) {
	mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0,width=446,height=362');
}

function go(url) {
  opener.location.href = url;
}

function openWindow(clproj)
{
	eval('desktop = window.open("help/' + clproj + '.htm","' + clproj + '","width=600,height=475,scrollbars,resizable");')
}

function WindowOpen(clproj)
{
	eval('desktop = window.open("' + clproj + '.htm","' + clproj + '","width=600,height=475,scrollbars,resizable");')
}

function showprogress() {
	//var screenwidth=window.screen.availWidth;
	//var leftposition=(screenwidth - 200) / 2;
  //var topposition=110;
	if (document.all) {
		//document.all.Progress.style.posleft=leftposition;
		//document.all.Progress.style.postop=topposition;
		document.all.Progress.style.visibility="visible";
	}
	if (document.layers) {
		//document.Progress.left=leftposition;
		//document.Progress.top=topposition;
		document.Progress.visibility="visible";
	}
}

function hideprogress() {
if (document.all) {	
		document.all.Progress.style.visibility="hidden"
	}
	if (document.layers) {
		document.Progress.visibility="hidden"
	}
}

function PopUp(WhichAdvisor) 
{
  myWin= open("Profile.cfm?AdID=" + WhichAdvisor, "displayWindow", 
    "width=600,height=475,scrollbars,resizable");
}

// Beginning of JavaScript -
// CREDITS:
// PopupTicker describing all your links onmouseover by Urs Dudli and Peter Gehrig 
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.com.
// info@24fun.ch
// 8/1/2000

// IMPORTANT: 
// If you add this script to a script-library or a script-archive 
// you have to insert a link to http://www.24fun.com right into the webpage where the script
// will be displayed.

// CONFIGURATION:
// Go to http://www.24fun.com, open category 'text' and download the ZIP-file of this script 
// containing the the script-file with step-by-step instructions for easy configuration.

var tickerwidth=210
var tickerheight=155
var tickerpadding=5
var borderwidth=2
var bordercolor="ff0000"
var fnt="Verdana"
var fntsize=8
var fntsizelastletter=8
var fntcolor="000000"
var fntcolorlastletter="000000"
var fntweight=3
var backgroundcolor="cccc99"
var standstill=2000
var speed=5
var xdistance=-150
var ydistance=10
var timer
var topposition=0
var leftposition=0
var x,y
var i_substring=0
var i_presubstring=0
var i_message=0
var message
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""
fntweight=fntweight*100

function getmessagebackground() {
		messagebackground="<table border="+borderwidth+" bordercolor='"+bordercolor+"' bordercolordark='"+bordercolor+"' bordercolorlight='"+bordercolor+"' width="+tickerwidth+" height="+tickerheight+" cellspacing=0 cellpadding=0><tr><td valign=top bgcolor='"+backgroundcolor+"'>"
		messagebackground+="&nbsp;</td></tr></table>"
}

function getmessagecontent() {	
		messagecontent="<table border=0 cellspacing=0 cellpadding="+tickerpadding+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top>"
		messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+"'>"	
		messagecontent+="<font color='"+fntcolor+"'>"
		messagecontent+=messagepresubstring
		messagecontent+="</font>"
		messagecontent+="</span>"
		messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:900'>"	
		messagecontent+="<font color='"+fntcolorlastletter+"'>"
		messagecontent+=messageaftersubstring
		messagecontent+="</font>"
		messagecontent+="</span>"
		messagecontent+="</td></tr></table>"
}

function showticker() {
	if (i_substring<=message.length-1) {
			i_substring++
			i_presubstring=i_substring-1
			if (i_presubstring<0) {i_presubstring=0}
            messagepresubstring=message.substring(0,i_presubstring)
	        messageaftersubstring=message.substring(i_presubstring,i_substring)
			getmessagecontent()
		if (document.all) {
			ticker.innerHTML=messagecontent
			timer=setTimeout("showticker()", speed)
		}
		if (document.layers) {
			document.ticker.document.write(messagecontent)
			document.ticker.document.close()
			timer=setTimeout("showticker()", speed)
		}
	}
	else {
		clearTimeout(timer)
	}
}

function hideticker() {
    clearTimeout(timer)
    i_substring=0
	i_presubstring=0
    if (document.all) {
	    document.all.ticker.style.visibility="hidden"
        document.all.tickerbg.style.visibility="hidden"
	}
	if (document.layers) {
		document.ticker.visibility="hidden"
        document.tickerbg.visibility="hidden"
	}
}

function showmessage(linkmessage) {
    getmessagebackground()
    message=linkmessage
   
	i_substring=0
	i_presubstring=0
    leftposition=x+xdistance
    topposition=y+ydistance
	if (document.all) {	
		document.all.ticker.style.posLeft=leftposition
		document.all.ticker.style.posTop=topposition
		document.all.tickerbg.style.posLeft=leftposition
		document.all.tickerbg.style.posTop=topposition
		tickerbg.innerHTML=messagebackground
    document.all.ticker.style.visibility="visible"
    document.all.tickerbg.style.visibility="visible"
		showticker()
	}
	if (document.layers) {
    document.ticker.left=leftposition
		document.ticker.top=topposition
		document.tickerbg.left=leftposition
		document.tickerbg.top=topposition
		document.tickerbg.document.write(messagebackground)
		document.tickerbg.document.close()
    document.ticker.visibility="visible"
    document.tickerbg.visibility="visible"
		showticker()
	}
}

/* // commented out by ted 1/21/05 b/c they don't seem to be used and I can't imagine what they are useful for
function handlerMM(e){ 
	x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
	y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
}

if (document.layers){
	document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;

if (top.location != location){top.location.href = document.location.href;}   
*/

function AddMonths(formName,writeField,strDate,intMonths){
  var theField = eval('document.' + formName + '.' + writeField);
  strDate = Date.parse(strDate);
  strDate = new Date(strDate);
  var endDay = strDate.getDate();
  var startMonth = strDate.getMonth()+1;
  var startYear = strDate.getFullYear();
  var endMonth = startMonth;
  var endYear = startYear;
  if( parseInt(intMonths) + parseInt(startMonth) <= 12 ) {
    endMonth = parseInt(intMonths) + parseInt(startMonth);
  } else {
    if( ((parseInt(intMonths) + parseInt(startMonth)) % 12) > 0 ) {
      endMonth = (parseInt(intMonths) + parseInt(startMonth)) % 12;
  } else if( ((parseInt(intMonths) + parseInt(startMonth)) % 12) == 0 ) {
      endMonth = 12;
      endYear = endYear-1;
  }
  endYear = parseInt(endYear) + parseInt((parseInt(intMonths) + parseInt(startMonth))/12);
  } 
  // use this to make sure we don't set the maturity day higher than days in that month 
  switch(parseInt(endMonth)) {
    case 2:
      maxDays = 28;
      break;
    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 10:
    case 12:
      maxDays = 31;
      break;
    case 9:
    case 4:
    case 6:
    case 11:
      maxDays = 30;
      break;
  }
  if ( endDay > maxDays ) {
    var endDay = maxDays;
  } 
  theField.value = endMonth + '/' + endDay + '/' + endYear;
}
/*
//This goes in the document <script>nospam_email('sagientresearch.com','memberservices','Memberservices')</script>
//
*/
function nospam_email(domain,name,visible){
	document.write('<a href=\"mail'+'to:' + name + '@' + domain + '\">');
	document.write(visible+ '</a>');
}

