function formatZip(t) {
t = t.replace(/[^0-9]/g,"")
var n = t
return n
}

function formatTel(t) {
t = t.replace(/[^0-9]/g,"")
var n = t
if (t.length>=3) n = t.substr(0,3)+"-"+t.substr(3,3)
if (t.length>=6) n+= "-"+t.substr(6,4)
return n
}

function formatDate(d) {
d = d.replace(/[^0-9]/g,"")
var n = d
if (d.length>=2) n = d.substr(0,2)+"/"+d.substr(2,4)
if (d.length>=7) n = d.substr(0,2)+"/"+d.substr(2,2)+"/"+d.substr(4,4)
return n
}

function formatDateOriginal(d) {
d = d.replace(/[^0-9]/g,"")
var n = d
if (d.length>=2) n = d.substr(0,2)+"/"+d.substr(2,2)
if (d.length>=4) n+= "/"+d.substr(4,4)
return n
}

function onlyNumbers(d) {
d = d.replace(/[^0-9]/g,"")
var n = d
return n
}

function onlyNumbersAndDecimals(d) {
d = d.replace(/[^0-9,"."]/g,"")
var n = d
return n
}

function onlySSNs(d) {
d = d.replace(/[^0-9]/g,"")
var n = d
if (d.length>=3) n = d.substr(0,3)+"-"+d.substr(3,2)
if (d.length>=5) n+= "-"+d.substr(5,4)
return n
}

function onlyPhoneNumbers(d) {
d = d.replace(/[^0-9-]/g,"")
var n = d
return n
}

function onlyChars(d) {
d = d.replace(/[^a-zA-Z]/g,"")
var n = d
return n
}

function onlyDates(d) {
d = d.replace(/[^0-9\/]/g,"")
var n = d
return n
}

function onlyMoney(d) {
d = d.replace(/[^0-9,"."]/g,"")
var n = d
return n
}

function RestrictToInt(evt) {
    evt = (evt) ? evt : window.event
    var charCode = (evt.which) ? evt.which : evt.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        status = "This field accepts numbers only."
        return false
    }
    status = ""
    return true
}

function formatHeight(d) {
d = d.replace(/[^0-9-]/g,"")
var n = d
return n
}

function MsgBox (textstring)
{
	alert (textstring)
}

var ns6=document.getElementById&&!document.all
var ie=document.all

function show_text(thetext, whichdiv){
	if (ie) eval("document.all."+whichdiv).innerHTML=linktext[thetext]
	else if (ns6) document.getElementById(whichdiv).innerHTML=linktext[thetext]
}

function resetit(whichdiv){
	if (ie) eval("document.all."+whichdiv).innerHTML=' '
	else if (ns6) document.getElementById(whichdiv).innerHTML=' '
}

function openFAQWindow(FAQPage){
	window.open(FAQPage,'_blank','height=650,width=420,scrollbars=yes,toolbar=yes,resizable=yes');
}

function hideDIV(divName) {
	if (document.getElementById){
		var o = document.getElementById(divName);
		o.style.visibility = 'hidden';
		o.style.display = 'none';
	}
}
function showDIV(divName) {
	if (document.getElementById){
		var o = document.getElementById(divName);
		o.style.visibility = 'visible';
		o.style.display = '';
	}
}
function fnShowHide(uid) {
	var o = document.getElementById(uid);
	if( o.style.display == "none" ) {
		o.style.display = "";
	}
	else {
		o.style.display = "none";
	}
	return;
}
