function sel(obj){
	var o=getObj(obj);
	var s=getObj("tab"+obj);
	var h,b;
	if(o!=null)
		o.style.display="block";
	if(s!=null)
		s.className="aFocus";
	for(var oTab in infoTabs){
		h=getObj(infoTabs[oTab]);
		if(h!=null && h!=o)h.style.display="none";
		
		b=getObj("tab"+infoTabs[oTab]);
		if(b!=null && b!=s)b.className="";
	}
}

function findObj(id){
	if(document.getElementById)return document.getElementById(id);
	if(document.all)return document.all[id];
	if(document.layers)return document.layers[id];
	return null
}

//////////////////////////////////
//		FOR POPUP WINDOW		//
//////////////////////////////////

function pop(w,url){
	var popwin=open(url,w,"toolbar=yes,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=100,left=100,width=320,height=240");
	popwin.focus();
}
function pop2(w,url)
{
	var popwin=open(url,w,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,top=100,left=100,width=320,height=240");
	popwin.focus();
}
function reSizeWindow(){

	if(!opener){
		opener=null;
		self.close();
	}
	
	var objI=document.getElementById("pImage");
	var w=objI.width;
	var h=objI.height;
	var Ww=320;
	var Wh=240;

	var nw=Ww;
	var nh=Wh;
	
	//resize
	if(w>Ww||h>Wh){
		nw=w+20;
		nh=h+80;
		window.resizeTo(nw,nh);
	}
	//move window to center
	var l=(window.screen.availWidth-nw)/2;
	var t=(window.screen.availHeight-nh)/2;
	
	window.moveTo(l,t);

}

//
function contactEvent(originalEvent,newEvent)
{
try{
if(originalEvent)originalEvent();
if(newEvent)newEvent();
}catch(ex){};
}

window.onerror=function(){return true;}

//Confirm Exit Site
function ces(url)
{
	var msg="You are now leaving the W.A.C. Lighting website and entering a third party site. W.A.C. Lighting is not responsible for the content presented by a third party website, including advertising claims, special offers, illustrations, names or endorsements. Thank you for visiting waclighting.com. Click \"OK\" to continue.";
	var cf=confirm(msg);
	if(!cf)return;
	var e=open(url);
}

