	function avscSite(){}
	var isAVSC = new avscSite();
	
	function go(location){
		var form = document.forms[0];
		if(arguments.length>1) for (var i = 1; i < arguments.length; i+=2) if(form.elements[arguments[i]]) form.elements[arguments[i]].value = arguments[i+1];
		var aryLoc = location.split("/"); 
		form.action = (aryLoc[aryLoc.length-1] == "") ? location + "default.asp" : location 
		form.submit();
	}	
	
	function popup(type){
		var querystring = ""
		if(arguments.length > 1){
			querystring += "?";
			for(var i = 1; i < arguments.length; i+=2) querystring += arguments[i] + "=" + arguments[i+1] + "&"
			querystring = querystring.substring(0,querystring.length-1)
		}
		
		switch(type){
			case 'legal' :
				var win = window.open('/legal.asp','avsc','height=400,width=400,left=10,top=10,location=no,resizable=yes,status=no,menubar=no,personalbar=no,toolbar=no,scrollbars=yes');break;		
			case 'privacy' :
				var win = window.open('/privacy.asp','avsc','height=400,width=400,left=10,top=10,location=no,resizable=yes,status=no,menubar=no,personalbar=no,toolbar=no,scrollbars=yes');break;
			case 'sitemap' :
				var win = window.open('/sitemap.asp','avsc','height=400,width=400,left=10,top=10,location=no,resizable=yes,status=no,menubar=no,personalbar=no,toolbar=no,scrollbars=yes');break;	
			default:
				var win = window.open(type,'preview','height=500,width=500,left=10,top=10,location=no,resizable=yes,status=no,menubar=no,personalbar=no,toolbar=no,scrollbars=yes');break;
		}
	}
	
/*	Check to see if the given number is really a number */
	function isNumber(val){ if( isNaN(val) || isEmpty(val) )return false; else return true;	}

/*	Check to see if the argument is empty */	
	function isEmpty(val){ 	return (val == undefined) || (val == "") || (val == null) 	}	

/* This function is used to round any number to a given perscision */
	function roundOff(value){
		var precision = arguments[1] ? arguments[1] : 2
        return Math.round(value*Math.pow(10,precision))/Math.pow(10,precision); }

/*	fixes parseInt bug when there are leading 0's */	
	function parseInteger(string){
		for(var i = 0; i < string.length; i++) if (string.charAt(i) == 0) string = string.substring(2,string.length-1); else break;
		return parseInt(string); }

/*	Netscape 4.x resize bug fix */
	if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) {
		widthCheck = window.innerWidth
		heightCheck = window.innerHeight
		window.onResize = resizeFix
	}
	function resizeFix() {
		if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
		document.location.href = document.location.href
	}

/*	Return the difference between two dates in days, hours */	
	function dateDiff(a, b, t){	
			switch(t.toLowerCase()){
				case "d": return roundOff((a.getTime() - b.getTime()) / 86400000,2); break;
				case "h": return roundOff((a.getTime() - b.getTime()) / 3600000,2); break;
				default: return roundOff((a.getTime() - b.getTime()),2); break;
			}
		}	
		
/*	Return new date */
	function dateAdd(d,n,t){
			switch(t.toLowerCase()){
				case "d": d.setTime(d.getTime() + (n*86400000)); break;
				case "h": d.setTime(d.getTime() + (n*3600000)); break;
				default: d.setTime(d.getTime()) + n; break;
			}
	}
	
	function Client(debug){
		this.debug = debug;
		
		this.isCSS = this.isDOM1 = this.isDOM0 = this.isNS4 = this.isIE6CSS = this.isBaseline = null
		
		this.isWin = (navigator.appVersion.indexOf("Win") > -1)
		this.isMac = (navigator.appVersion.indexOf("Mac") > -1)
		this.isUnix = (navigator.appVersion.indexOf("Linux") > -1 || navigator.appVersion.indexOf("X11") >-1)
	
		this.version = parseInt(navigator.appVersion)
	
		this.availWidth = window.screen.availWidth
		this.availHeight = window.screen.availHeight
		this.colorDepth	= window.screen.colorDepth
	}
	Client.prototype.init = function(){
		if (!document.images) return false;
		
		this.isCSS = (document.body && document.body.style) ? true : false
		this.isDOM1 = (this.isCSS && document.getElementById && !(this.isMac && document.all)) ? true : false; 
		this.isDOM0 = (this.isCSS && document.all) ? true : false;
		this.isNS4 = document.layers ? true : false;
		this.isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >=0) ? true :false;
		this.isBaseline = (this.isDOM1 || this.isDOM0) ? true : false;
		
		if(this.debug)
			alert("This CLIENT has the following attributes\n" + 
					"\nDHTML Compatible:\t\t" + this.isBaseline + 
					"\n\nCSS Compatible:\t\t" + this.isCSS + 
					"\nDOM 1 Compatible:\t\t" + this.isDOM1 + 
					"\nDOM 0 Compatible:\t\t" + this.isDOM0 + 
					"\nLayer Compatible:\t\t" + this.isNS4 + 
					"\nIE 6 CSS Compatible:\t" + this.isIE6CSS + 
					"\n\nWindows:\t\t\t" + this.isWin + 
					"\nMac:\t\t\t" + this.isMac + 
					"\nUnix:\t\t\t" + this.isUnix + 
					"\n\nBrowser Version:\t\t" + this.version + 
					"\n\nScreen Width:\t\t" + this.availWidth + 
					"\nScreen Height:\t\t" + this.availHeight + 
					"\nColor Depth:\t\t" + this.colorDepth + 
					"\n\nQuerystring: " + (this.qs ? this.qs : " - none -"))
	}
	Client.prototype.getObject = function(o) {
		if (typeof o == "object") return o;
		
		if (this.isDOM1) return document.getElementById(o);
		if (this.isDOM0) return document.all[o];
		if (this.isNS4) return document.layers[o];
		
		if(this.debug) alert("getObject has returned FALSE");
		return false;
	}
	Client.prototype.getStyle = function(o){
		o = this.getObject(o);
		if(!o) return false;
		return this.isCSS ? o.style : o;
	}


