<!-- Begin

var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var ns4 = (document.layers)? true:false;
var ie4 = (document.all)? true:false;
var w3c = (document.getElementById)? true:false;


function getRef(id) {
if (isDOM) return document.getElementById(id);
if (isIE4) return document.all[id];
if (isNS4) return document.layers[id];
}


function getSty(id) {
return (isNS4 ? getRef(id) : getRef(id).style);
} 

function funGet2d(WO) { 
        if (WO) {
		lnkPage = "/content/Get2dSurvey.asp?SURV_ID=" + WO;
		ifMain.location.replace(lnkPage);
	}
}

function funGet3d(WO) {
        if (WO)
        {
		lnkPage = "/content/Get3dSurvey.asp?SURV_ID=" + WO;
		ifMain.location.replace(lnkPage);
	}
}
function funNavMain(id) {
	lnkPage = "/content/" + id + ".asp";
	ifMain.location.replace(lnkPage);
}

function msieversion()
// return Microsoft Internet Explorer (major) version number, or 0 for others.
// This function works by finding the "MSIE " string and extracting the version number
// following the space, up to the decimal point for the minor version, which is ignored.
{
    var ua = window.navigator.userAgent
    var msie = ua.indexOf ( "MSIE " )
    if ( msie > 0 )        // is Microsoft Internet Explorer; return version number
        return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) )
    else
        return 0    // is other browser
}

function askConfirm() {
    return window.confirm ("Are you sure? Click OK to continue, Cancel to not.")
}

function show(id) {
	if (ns4) document.layers[id].visibility = "show";
	else if (ie4) document.all[id].style.visibility = "visible";
	else if (w3c)	document.getElementById(id).style.visibility = "visible";
}
function hide(id) {
	if (ns4) document.layers[id].visibility = "hide"
	else if (ie4) document.all[id].style.visibility = "hidden"
	else if (w3c)	document.getElementById(id).style.visibility = "hidden";
}
function jumpTo() {
	if (expanded) {
		hide('jumpOne');
		if (!ns4) hide('jumpTwo');
		document.images['jumpToArrow'].src='/graphics/jumparrow_up.gif';
		expanded = false;
	}
	else {
		show('jumpOne');
		if (!ns4) show('jumpTwo');
		document.images['jumpToArrow'].src='/graphics/jumparrow_down.gif';
		expanded = true;
	}
	return false;
}
function changeImage(name) {
	document.images[name].src='/images/' + name;
}
function sectionTitle(name,path,ext) {
	document.images[name].src='/images/' + name;
}
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
// End -->
