function winOpen(aUrl, aWidth, aHeight, aMenubar, aResizable,aScrollbars)
{
	var avWidth = window.screen.availWidth;
	var avHeight = window.screen.availHeight;
	var adds = "";
	if(aMenubar != null && aMenubar == 1)
		adds += ",menubar=1";
	if(aResizable != null && aResizable == 1)
		adds += ",resizable=1";
	if(aScrollbars != null && aScrollbars == 1)
		adds += ",scrollbars=1";
	win = window.open(aUrl, '', "width=" + aWidth + ", height=" + aHeight + ", top=" + ((avHeight/2)-(aHeight.toString().replace("px", "")/2)) + ", left=" + ((avWidth/2)-(aWidth.toString().replace("px", "")/2)) + ",status=1" + adds);	
	win.focus();
}
function omo(obj){obj.className = "bdh";}
function omu(obj){obj.className = "bd";}
function ado(obj, c){obj.className = c;}
function $nodisplay(e){if(typeof e=="object")e.style.display="none";else{var item=$(e);if(null==item)alert(e+" does not exist");else item.style.display="none";}}
function $display(e){if(typeof e=="object")e.style.display="";else $(e).style.display="";}
function $(id){return document.getElementById(id);}
centerDiv  = function(divobj){ //Centers a div element on the page 
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes 
var ie=document.all && !window.opera 
var dom=$ 
var scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset 
var scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset 
var docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth/*-this.scrollbarwidth */
var docheight=(ie)? this.standardbody.clientHeight: window.innerHeight 
var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight //Full scroll height of document 
var objwidth=getElementWidth(divobj.id);
var objheight=getElementHeight(divobj.id);
var topposition=(docheight>objheight)? scroll_top+docheight/2-objheight/2+"px" : scroll_top+10+"px"
divobj.style.left=docwidth/2-objwidth/2+"px" //Center div element horizontally 
divobj.style.top=Math.floor(parseInt(topposition))+"px"
};
function centerDiv2(div){div.style.left=((document.body.clientWidth-parseInt(div.style.width))/2)+"px";div.style.top=((document.body.clientHeight-parseInt(div.style.height))/2)+"px";}
centerDiv3  = function(divobj){ //Centers a div element on the page 
this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes 
var ie=document.all && !window.opera 
var dom=$ 
var scroll_top=(ie)? this.standardbody.scrollTop : window.pageYOffset 
var scroll_left=(ie)? this.standardbody.scrollLeft : window.pageXOffset 
var docwidth=(ie)? this.standardbody.clientWidth : window.innerWidth/*-this.scrollbarwidth */
var docheight=(ie)? this.standardbody.clientHeight: window.innerHeight 
var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)? this.standardbody.offsetHeight : this.standardbody.scrollHeight //Full scroll height of document 
var objwidth=getElementWidth(divobj.id);
var objheight=getElementHeight(divobj.id);
var topposition=(docheight>objheight)? scroll_top+docheight/2-divobj.style.pixelHeight/2+"px" : scroll_top+10+"px"
divobj.style.left=docwidth/2-divobj.style.pixelWidth/2+"px" //Center div element horizontally 
divobj.style.top=Math.floor(parseInt(topposition))+"px"
 
};
function changeOpac(opacity,id){var object=$(id).style;object.opacity=(opacity/100);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.filter="alpha(opacity="+opacity+")";}
function findPos(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}}return [curleft,curtop];}
function getPageSize(){var xScroll, yScroll;if (window.innerHeight && window.scrollMaxY) {xScroll = document.body.scrollWidth;yScroll = window.innerHeight + window.scrollMaxY;} else if (document.body.scrollHeight > document.body.offsetHeight){xScroll = document.body.scrollWidth;yScroll = document.body.scrollHeight;} else { xScroll = document.body.offsetWidth;yScroll = document.body.offsetHeight;} var is_ie7 = ( /msie/i.test(navigator.userAgent) && /MSIE 7/.test(navigator.userAgent) );if (is_ie7){yScroll = document.documentElement.scrollHeight;} var windowWidth, windowHeight;if (self.innerHeight) { windowWidth = self.innerWidth;windowHeight = self.innerHeight;} else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth;windowHeight = document.documentElement.clientHeight;} else if (document.body) {windowWidth = document.body.clientWidth;windowHeight = document.body.clientHeight;}if(yScroll < windowHeight){pageHeight = windowHeight;} else {pageHeight = yScroll;}if(xScroll < windowWidth){pageWidth = windowWidth;} else {pageWidth = xScroll;}arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;}
function getElementHeight(Elem) {if($(Elem)){var elem = $(Elem);}else{var elem = document.all[Elem];}return elem.offsetHeight;}
function getElementWidth(Elem) {if($(Elem)){var elem = $(Elem);}else{var elem = document.all[Elem];}return elem.offsetWidth;}

function OnZipCodeChange(v){var regNumber=new RegExp("[0-9]");var regMinus=new RegExp("-");var s=v.value;var text="";    
for(var i=0;i<s.length;i++){switch(i){case 0:case 1:case 3:case 4:case 5:if(regNumber.exec(s.substr(i, 1))==null)break;
else text+=s.substr(i,1);break;case 2:if(regMinus.exec(s.substr(i,1)) == null){text+='-';text+=s.substr(i,1);i++;}else
text+=s.substr(i,1);break;default:break;}}v.value=text;}

function winOpenOld(aUrl, aName, aWidth, aHeight, aScrollBars, aMenubar, aToolbar, aResizable)
{
    winOpen(aUrl, aWidth, aHeight, aMenubar, aResizable,aScrollBars)
}