function openWindow(Explain) {
Explain=window.open(Explain,'Explain','scrollbars=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes,location=no,width=500,height=400,left=200,top=50')
	Explain.focus()
	}

function openLoginTips(Explain) {
Explain=window.open(Explain,'Explain','scrollbars=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes,location=no,width=580,height=540,left=200,top=50')
	Explain.focus()
}
/* new Yahoo Charts Pop-up 06-16-2003 Alex */ 
function openChartsWindow(Explain) {
Explain=window.open(Explain,'Explain','scrollbars=yes,status=yes,menubar=no,toolbar=no,resizable=yes,location=no,width=680,height=480,left=200,top=50')
	Explain.focus()
}
	
function openWindowHelp(Help) {
Help=window.open(Help,'Help','scrollbars=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes,location=no,width=600,height=400,left=100,top=50')
}	

function openWindowLookup(Lookup) {
Explain=window.open(Lookup,'Lookup','scrollbars=yes,status=yes,menubar=no,toolbar=no,resizable=yes,location=no,width=540,height=380,left=200,top=50')
}

/*subscripton agreement and privacy statement popups*/
function openWindow1() {
popupWin=window.open('http://www.idayo.com/i_demo_subscriber_agreement.html','subscriber','scrollbars=yes,status=yes,toolbar=yes,location=no,width=500,height=480')
}
function openWindow2() {
popupWin=window.open('http://www.idayo.com/i_demo_privacy_statement.html','privacy','scrollbars=yes,status=yes,toolbar=yes,location=no,width=500,height=480')
}

function formHandler(form){
var URL = document.form.view.options[document.form.view.selectedIndex].value;
window.location.href = URL;
}

function formHandlerClient(form){
var baseURL = "http://www.idayo.com/cgi-bin/fundsin1.cgi?step-3100&Fundsin1ClientId-";
var clientID = document.form.Fundsin1ClientId.options[document.form.Fundsin1ClientId.selectedIndex].value;
window.location.href = baseURL + clientID;
}

function subsOnly(){
	window.alert('Sorry, additional functions are available only to subscribers.');
	return false;
}

/* check fields in fundsin1 edit screen for number entry*/
function validateNum(field) {
	var valid = "0123456789.,-"
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) {
		temp = "" + field.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") {
		alert("Invalid entry - only numbers are accepted.");
		field.focus();
		field.select();
   	}else{
		removeCommas(field);
	}
}

/* strips commas from a field and writes the result back in the field */
function removeCommas(field) {
	var temp = "";
	for (var i=0; i<field.value.length; i++) {
		if (field.value.substring(i, i+1) != ",") 
			temp = temp + field.value.substring(i, i+1);
	}
	field.value = temp;
}

/* 16 week close date pop-up window 04-18-2003 Alex*/
function showCloseDate(CloseDate) {
	CloseDate=window.open(CloseDate,'date','scrollbars=yes,resizable=yes,status=no,toolbar=no,location=no,width=380,height=385');
	CloseDate.focus();
    	
}
