
function hideAll() {
	hideLayer('myLayer1');
	hideLayer('myLayer2');
	hideLayer('myLayer3');
	hideLayer('myLayer4');
}

function showLayer(objA) {
	hideAll();
    if (document.layers && document.layers[objA] != null)
        document.layers[objA].visibility = 'visible';
    else if (document.all)
        document.all[objA].style.visibility = 'visible';
		document.getElementById(objA).style.visibility = 'visible';
}

function hideLayer(objA) {
    if (document.layers && document.layers[objA] != null)
        document.layers[objA].visibility = 'hidden';
    else if (document.all)
        document.all[objA].style.visibility = 'hidden';
		document.getElementById(objA).style.visibility = 'hidden';
}

function openWindow(strFile) {

	window.open(strFile, "newWindow", "toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,location=no,width=310,height=400");

}

function parsePhoneNumber(strTemp) {
	var strTempFinal = "";
	var intCount = 0;
	var strTempLength;
	var strTempExtension = "";

	strTempLength = strTemp.length;
	while (intCount != strTempLength) {
		if (isNaN(parseInt(strTemp.charAt(intCount)))) {
		
		} else {
			strTempFinal = strTempFinal + strTemp.charAt(intCount);
		}
		intCount = intCount + 1;
	}
	if (strTempFinal.length >= 10) {
		strTempExtension = "";
		if (strTempFinal.length > 10) {
			strTempExtension = " x" + strTempFinal.substring(10, 10 + (strTempFinal.length - 10))
		}
		strTempFinal = "(" + strTempFinal.substring(0,3) + ") " + strTempFinal.substring(3,6) + "-" + strTempFinal.substring(6,10) + strTempExtension;
	}
	
	return strTempFinal;
}

function parseFaxNumber(strTemp) {
	var strTempFinal = "";
	var intCount = 0;
	var strTempLength;
	var strTempExtension = "";

	strTempLength = strTemp.length;
	while (intCount != strTempLength) {
		if (isNaN(parseInt(strTemp.charAt(intCount)))) {
		
		} else {
			strTempFinal = strTempFinal + strTemp.charAt(intCount);
		}
		intCount = intCount + 1;
	}
	if (strTempFinal.length >= 10) {
		strTempExtension = "";
		if (strTempFinal.length > 10) {
			strTempExtension = " x" + strTempFinal.substring(10, 10 + (strTempFinal.length - 10))
		}
		strTempFinal = "" + strTempFinal.substring(0,3) + "-" + strTempFinal.substring(3,6) + "-" + strTempFinal.substring(6,10);
	}
	
	return strTempFinal;
}

