
// google-analytics //

/*var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

try {
	var pageTracker = _gat._getTracker("UA-9065224-1");
	pageTracker._trackPageview();
} 
catch(err) {}*/

// pop-up date validation //
        var origDate;
        function setOrig() {
                origDate = document.getElementById('idBeginDate').value;
        }
 
        function SetNewBeginDate2(newDate)
        {
                // if date changed
                if( newDate != origDate) 
                {
                        var wasValidated = DateValidate('SetCalendarUpdate', 'BeginDate');
                if (wasValidated) 
                {
                        var Next = "test.cfm?method=cUtil.SetCal&BeginDate="+ newDate;
                        window.location.href = Next;
                }
                }
        }

// confirm action //

function confirm_action(actionname,actionfile) {
	if (actionname == null) {var actionname = 'delete'};
	if (confirm("Are you sure you want to " + actionname + "?")) {window.location = actionfile;}
	else {window.location.reload()}
}

// change style display

function changeDisplayStyle(inObj,state) {
  inObj.style.display = state;
}

// change visibility

function changeVisibility(inObj,state) {
  inObj.style.visibility = state;
}

// disable/enable all form elements //

function DisableEnableForm(xForm,xHow){
  objElems = xForm.elements;
  for(i=0;i<objElems.length;i++){
    objElems[i].disabled = xHow;
  }
}

// place focus in specified field //

function placeFocus(fieldID) {
	if (
			(document.getElementById(fieldID) != undefined) &&
			(document.getElementById(fieldID).type.toString().charAt(0) != "s") && (
				(document.getElementById(fieldID).type == "textarea") || 
				(document.getElementById(fieldID).type == "file") || 
				(document.getElementById(fieldID).type == "password") || 
				(document.getElementById(fieldID).type == "text")))
			{
			 document.getElementById(fieldID).focus();
			}
		}
// confirm complete //

/*
function confirm_complete(doctitle,okAction,cancelAction)
{
if (docname =! null) {
	var wheretogo = '';
	input_box=confirm("Please be sure that this " + doctitle + " is complete! Clicking OK will open a printable version AND lock the file so that no further changes can be made.");
	if (input_box==true) { 
		wheretogo = okAction; }
		else { wheretogo = cancelAction; }
	}
	window.location = wheretogo;
	return wheretogo; 
}
*/

// popup window script //

/*
var features = "width=580,height=400,scrollbars,resizable,location,toolbar,menubar,status,screenX=10,screenY=10,top=10,left=10";
function popUp(newPage) {
	window.open(newPage,'popUp',features);
	return false;
}
*/

