<!-- Begin hiding ecotools.js - library of java script functions
// by OnLineSalesOffice Copyright 2007 - All Rights Reserved
//
// initialize global date mm-dd-yyyy
var dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var nowDate = new Date();
var month = "";
var day = "";
var year = "";
var myear = "20"; // millenium prefix
var dateString = "";
updateDate();
// initialize global time hh:mm:ss a.m.
var last_hour = "00";
var last_year = myear + year;
var hours = "";
var minutes = "";
var seconds = "";
var timeString = "";
updateTime();
var timerRunning = false;
var clockSpeed = 1000;
var timerId = 0;
var sec_tick = 0;
var min_tick = 0;
var hour_tick = 0;
var elapsedValue = " ";
var clockEnabled = 0;
var elapsedEnabled = 0;
var timerEnabled = 0;
var Home_Message = "Copyright 2007 - All Rights Reserved";
var messageEnabled = 0;
// global messages
var error_msg = "";
var help_msg = "";
var debug_msg = "";
var user_msg = "";
// Browser Attributes
var browserType = "unknown";
var browserVersion = "unknown";
var newFormCount = 0;
var newDocCount = 0;
var newDocWin = 0;
function getBrowserVersion() {
    if ( window.navigator.appName.indexOf('Netscape') == 0 ) {
		browserType = "Netscape";
    } else {
		if ( window.navigator.appName.indexOf('Microsoft') == 0 ) {
			browserType = "Microsoft";
		}
	}
    if ( window.navigator.appVersion.substring(0,1) >= '3') {
		browserVersion = "3";
	}
	if ( window.navigator.appVersion.substring(0,1) >= '4') {
		browserVersion = "4";
	}
}
function updateDate() {
    var h = 0;
	var yyyy = "0000";
	var mm = "00";
	var dd = "00";
	var doy = "000";
	var msg = "";
    nowDate = new Date();
 	hours = nowDate.getHours();
	minutes = nowDate.getMinutes();
	seconds = nowDate.getSeconds();
    month = nowDate.getMonth();
    day = nowDate.getDate();
    year = parseInt( nowDate.getYear() );
    myear = "20"; // millenium prefix
    if( year > 70 && year <= 99 ) myear = "19";
	if( year >= 2000 ) year -= 2000;
	if( year >= 100 ) year -= 100;
	if( year <= 9 ) year = "0" + year;
    month = (month * 1) + 1;
	// mm-dd-yyyy
    mm = ((month < 10) ? "0" : "") + month;
    dd = ((day < 10) ? "0" : "") + day;
    yyyy = myear + year;
	dateString = mm + "-" + dd + "-" + yyyy;
	if ( timerEnabled == 1 ) {
    	document.timer_form.year.value = yyyy;
		document.timer_form.mon.value = mm;
		document.timer_form.day.value = dd;
	}
}
// getDateString() - Returns Date String: day_of_week, Month dd, yyyy
function getDateString() {
	updateDate();
	document.write ( dayName[nowDate.getDay()] +", "+monName[nowDate.getMonth()]+" "+day+", "+myear+year);
}
function openForm ( form_html ) {
        var leftpos=0;
        var winparms;
        winparms = "toolbar=no,menubar=no,location=no,directories=no,";
        winparms += "status=no,scrollbars=no,resizable=yes,";
        winparms += "copyhistory=no,width=500,height=650,";
        if (screen) {
            leftpos=screen.width/2 - 300;
        }
        winparms += "left="+leftpos+",top=20";
        // create a unique window name
        var now = new Date();
        var ss = now.getSeconds();
        var myForm = "myForm_" + ss;
        var myFormWin=window.open(form_html, myForm, winparms );
}

function openTool ( tool_html ) {
        var leftpos=0;
        var winparms;
        winparms = "toolbar=no,menubar=no,location=no,directories=no,";
        winparms += "status=no,scrollbars=no,resizable=yes,copyhistory=no,";
        winparms += "copyhistory=no,width=500,height=550,";
        if (screen) {
            leftpos=screen.width/2 - 250;
        }
        winparms += "left="+leftpos+",top=20";
        // create a unique window name
        var now = new Date();
        var ss = now.getSeconds();
        var myTool = "myTool_" + ss;
        var myToolWin=window.open(tool_html, myTool, winparms );
}
function openPage ( page_html ) {
        var leftpos=0;
        var winparms;
        winparms = "location=yes,directories=no,width=700,height=650,menubar=yes,";
        if (screen) {
            leftpos=screen.width/2 - 200;
        }
        winparms += "left="+leftpos+",top=20,resizable=yes,scrollbars=yes,toolbars=yes";
        // create a unique window name
        var now = new Date();
        var ss = now.getSeconds();
        var myPage = "myPage_" + ss;
        var myPageWin=window.open( page_html, myPage, winparms );
}

function openDoc ( doc_html ) {
        var leftpos=0;
        var winparms;
        winparms = "toolbar=no,menubar=no,location=no,directories=no,";
        winparms += "status=no,scrollbars=yes,resizable=yes,copyhistory=no,";
        winparms += "copyhistory=no,width=600,height=650,";
       
        if (screen) {
            leftpos= screen.width/2 - 150;
        }
        winparms += "left="+leftpos+",top=20";
        // create a unique window name
        var now = new Date();
        var ss = now.getSeconds();
        var myDoc = "myDoc_" + ss;
        var myDocWin=window.open(doc_html, myDoc, winparms );       
}


function replacePage ( pg ) {
    window.location.href = pg;
}
function getModDate() {
	document.write(" "+document.lastModified+" ");
}
function AddBookMark(strURL,strTitle) {
    if (document.all) { 
        window.external.AddFavorite(strURL,strTitle);
    } else {
        alert("Sorry. Bookmarking works only in Internet Explorer versions 4 and later.\r\rIf you are using Netscape Navigator,\rplease bookmark us by clicking on 'Add Bookmark' on your browser.");
    }    
}

//end of ecotools.js -->
