<!--
var arrTemp = self.location.href.split("?"); 
var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
var NS = (navigator.appName=="Netscape")?true:false;

function FitPic() { 
	iWidth = (NS)?window.innerWidth:document.body.clientWidth;
	iHeight = (NS)?window.innerHeight:document.body.clientHeight;
	iWidth = document.images[0].width - iWidth;
	iHeight = document.images[0].height - iHeight;
	window.resizeBy(iWidth, iHeight);
	//window.moveTo((screen.width / 2) - (document.images[0].width / 2), (screen.height / 2) - (document.images[0].height / 2));
	self.focus();
 }

function PopupPic(sPicURL) {

	var winProp = 'width=50,height=50,left=200,top=200,scrollbars=0,resizable=1,menubar=no';
	window.open("Popup.asp?"+sPicURL, "", winProp);

}

function Popup(sURL,sName,sWidth,sHeight) {

	var winProp = 'width=' + sWidth + ',height=' + sHeight + ',left=200,top=200,scrollbars=0,resizable=1,menubar=no';
	window.open(sURL, sName, winProp);

}

function loadExternal(url) {
	if ( window.frames['buffer'] ) {
		window.frames['buffer'].location = url;
		
		var lyr = document.getElementById? document.getElementById('display'): document.all? document.all['display']: null;
		
		return false;
	} 
	return true; // other browsers follow link
}

// called when documents loaded into iframe (from their body's onload attribute)
function displayExternal() {
	var lyr = document.getElementById? document.getElementById('display'): document.all? document.all['display']: null;
	
	if ( window.frames['buffer'] && lyr && typeof lyr.innerHTML != "undefined" ) {
		lyr.innerHTML = window.frames['buffer'].document.body.innerHTML;
	}
}

var vphone = /^\D*([1-9]\d{2})\D*(\d{3})\D*(\d{4})\D*$/

function FormatPhone(x){
	if (x.value != 0) {
		if(vphone.test(x.value)) {
			x.value=x.value.replace(vphone,'($1) $2-$3');
		} else {
			alert('Invalid phone number!');
		}
	}
}

// Preload button on images to improve initial swap time
var aButtons = new Array();

aButtons[0] = new Image();
aButtons[0].src = "images/nav_about_us_on_01.gif";
aButtons[1] = new Image();
aButtons[1].src = "images/nav_contact_us_on_01.gif";
aButtons[2] = new Image();
aButtons[2].src = "images/nav_events_on_01.gif";
aButtons[3] = new Image();
aButtons[3].src = "images/nav_faqs_on_01.gif";
aButtons[4] = new Image();
aButtons[4].src = "images/nav_free_quote_on_01.gif";
aButtons[5] = new Image();
aButtons[5].src = "images/nav_gallery_on_01.gif";
aButtons[6] = new Image();
aButtons[6].src = "images/nav_home_on_01.gif";
aButtons[7] = new Image();
aButtons[7].src = "images/nav_interior_on_01.gif";

function SimpleSwap(el,which){
  el.src = el.getAttribute(which || "origsrc");
}

function SimpleSwapSetup(){
	var x = document.getElementsByTagName("img");

	for (var i=0;i<x.length;i++){
		var oversrc = x[i].getAttribute("oversrc");

		if (!oversrc) continue;
		// preload image
		// comment the next two lines to disable image pre-loading
		x[i].oversrc_img = new Image();
		x[i].oversrc_img.src = oversrc;
		// set event handlers
		x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
		x[i].onmouseout = new Function("SimpleSwap(this);");
		// save original src
		x[i].setAttribute("origsrc",x[i].src);
	}
}

var PreSimpleSwapOnload =(window.onload)? window.onload : function(){};
window.onload = function(){PreSimpleSwapOnload(); SimpleSwapSetup();}
// -->