
function goOut() {
var agree=confirm("You are about to exit the Internet America, Inc. website and enter a third-party site. Internet America, Inc. accepts no responsibility for the quality and/or accuracy of the information provided by said third-party site. Click 'OK' to leave our site or 'Cancel' to stay.");
if (agree)
	return true ;
else
	return false ;
}

function getDownload() {
var agree=confirm("The document you are about to download resides on a third-party web site not affiliated with Internet America, Inc. Internet America, Inc. accepts no responsibility for the quality and/or accuracy of the information provided by said third-party site. Click 'OK' to continue downloading to your computer or 'Cancel' to stop.");
if (agree)
	return true ;
else
	return false ;
}


/* http://simon.incutio.com/archive/2004/05/26/addLoadEvent */
function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			if (oldonload) {
			    oldonload();
			}
			func();
		}
	}
}

/* http://www.dustindiaz.com/getelementsbyclass/ */
function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

/* by Jeremy Keith */
function insertAfter(newElement, targetElement) {
	var parent = targetElement.parentNode;
	if (parent.lastChild == targetElement) {
		parent.appendChild(newElement);
	}
	else {
		parent.insertBefore(newElement, targetElement.nextSibling);
	}
}

function buttonEndings() {
	if (!document.getElementsByTagName) {
		return false
	}
	
	var buttons = getElementsByClass("button");
	/* loop through all buttons and attach a child div */
	for (i=0; i < buttons.length; i++) {
		var div = document.createElement("div");
		div.className = "buttonEnding";
		insertAfter(div, buttons[i]);
	}
}

addLoadEvent(buttonEndings);

function Localize(pStr){return pStr;}
    var submitbtn = document.getElementById('submitbtn');
    var StatusText = Localize("Please wait...");
    var cnt=0;
function doIt(f){
    f.submitbtn.value=StatusText;
    f.submitbtn.disabled=true;
    if (cnt==0)f.submit();
    cnt++;
}


