//'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//	This script is the intellectual property of:
//	ALPHA51 INC.
//	
//	Copyright © 2002 ALPHA51 INC. All rights reserved.
//
//	Written by: Wayne Helman
//
//'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

var ns = (document.layers)? true:false
var ie = (document.all)? true:false
var dom = (document.getElementById)? true:false
var ns6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));

var moDir = '/images/'

if(window.event + "" == "undefined") event = null;
function f_PopUp(){return false};
function f_PopDown(){return false};
popUp = f_PopUp;
popDown = f_PopDown;

PG_MenuWidth = 109;
PG_FontFamily = "Verdana,Arial,sans-serif";
PG_FontSize = 8;
PG_FontBold = 0;
PG_FontItalic = 0;
PG_FontColor = "#465466";
PG_FontColorOver = "#465466";
PG_ItemPadding = 2;

PG_BorderWidth = 1;
PG_BorderColor = "#465466";
PG_BorderStyle = "solid";
PG_SeparatorSize = 1;
PG_SeparatorColor = "#465466";

PG_ImageSrc = moDir+"more.gif";
PG_ImageSrcLeft = moDir+"more.gif";
PG_ImageSrcOver = moDir+"more.gif";
PG_ImageSrcLeftOver = moDir+"more.gif";

PG_ImageSize = 5;
PG_ImageHorizSpace = 0;
PG_ImageVertSpace = 2;

PG_KeepHilite = true; 
PG_ClickStart = 0;
PG_ClickKill = false;
PG_ChildOverlap = 1;
PG_ChildOffset = -1;
PG_ChildPerCentOver = null;
PG_TopSecondsVisible = .2;
PG_StatusDisplayBuild =0;
PG_StatusDisplayLink = 0;
PG_UponDisplay = null;
PG_UponHide = null;
PG_RightToLeft = 0;

PG_CreateTopOnly = 0;
PG_ShowLinkCursor = 1;
PG_NSFontOver = true;

function goBasis() {

	window.open('http://www.basis100.com','Basis100');

	}

function newWin(url,win) {
	window.open(url,win);
	}

function swap(img1,ref1,sts1) {
	document.images[img1].src = moDir + ref1 + ".gif";
	s(sts1);
	}
	
function s(txt) {
	if(txt != "") status = txt;
	else status = "Basis100 Valuation Solutions";
	}

function popMisc(url,wd,ht,scrl) {
	var miscwin = window.open(url,'misc','height='+ht+',width='+wd+',toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars='+scrl+',copyhistory=0');
	}

function isblank(s) {
    for(var i = 0; i < s.length; i++) {
        var c = s.charAt(i);
        if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
    }
    return true;
}

function verify(f) {
    var msg;
    var empty_fields = "";
    var errors = "";

    for(var i = 0; i < f.length; i++) {
        var e = f.elements[i];
        if (((e.type == "text") || (e.type == "textarea")) && !e.optional) {
            // first check if the field is empty
            if ((e.value == null) || (e.value == "") || isblank(e.value)) {
				tempName = e.name;
				str = tempName.replace("_"," ")
				empty_fields += "\n          " + str;
                continue;
            }
			if (e.name == "Email") { 
				if (e.value.indexOf ('@',0) == -1 || e.value.indexOf ('.',0) == -1){      
					errors += "- Please format your email address correctly.";      
				} 
			}
        }
    }


    if (!empty_fields && !errors) return true;

    msg  = "______________________________________________________\n\n"
    msg += "The form was NOT submitted due to the following error(s).\n";
    msg += "Please correct the error(s) and re-submit.\n";
    msg += "______________________________________________________\n\n"

    if (empty_fields) {
        msg += "- The following required field(s) are empty:" 
                + empty_fields + "\n";
        if (errors) msg += "\n";
    }
    msg += errors;
    alert(msg);
    return false;
}

function pU(menu,evnt) {
	if(AreLoaded == true) popUp(menu,evnt)
	}
function pD(menu) {
	if(AreLoaded == true) popDown(menu)
	}

