if (document.images) {
// HOME NAV
abo_on = new Image();	abo_on.src = view_path+"images/roll/about_on.gif";
abo_off = new Image();	abo_off.src = view_path+"images/roll/about_off.gif";
att_on = new Image();	att_on.src = view_path+"images/roll/attorneys_on.gif";
att_off = new Image();	att_off.src = view_path+"images/roll/attorneys_off.gif";
suc_on = new Image();	suc_on.src = view_path+"images/roll/successes_on.gif";
suc_off = new Image();	suc_off.src = view_path+"images/roll/successes_off.gif";
pra_on = new Image();	pra_on.src = view_path+"images/roll/practiceareas_on.gif";
pra_off = new Image();	pra_off.src = view_path+"images/roll/practiceareas_off.gif";
rec_on = new Image();	rec_on.src = view_path+"images/roll/careers_on.gif";
rec_off = new Image();	rec_off.src = view_path+"images/roll/careers_off.gif";
res_on = new Image();	res_on.src = view_path+"images/roll/resources_on.gif";
res_off = new Image();	res_off.src = view_path+"images/roll/resources_off.gif";
con_on = new Image();	con_on.src = view_path+"images/roll/contact_on.gif";
con_off = new Image();	con_off.src = view_path+"images/roll/contact_off.gif";

tab_act_left = new Image(); tab_act_left.src = view_path + 'images/tab_act_left.gif';
tab_act_right = new Image(); tab_act_right.src = view_path + 'images/tab_act_right.gif';
tab_act_inner = new Image(); tab_act_inner.src = view_path + 'images/tab_act_bg.gif';

tab_off_left = new Image(); tab_off_left.src = view_path + 'images/tab_off_left.gif';
tab_off_right = new Image(); tab_off_right.src = view_path + 'images/tab_off_right.gif';
tab_off_inner = new Image(); tab_off_inner.src = view_path + 'images/tab_off_bg.gif';

tab_hover_left = new Image(); tab_hover_left.src = view_path + 'images/tab_hover_left.gif';
tab_hover_right = new Image(); tab_hover_right.src = view_path + 'images/tab_hover_right.gif';
tab_hover_inner = new Image(); tab_hover_inner.src = view_path + 'images/tab_hover_bg.gif';
}
function pause(millis){
  var date = new Date();
  var curDate = null;
  
  do { curDate = new Date(); }
  while(curDate-date < millis);
}
function roll(sname,rname){
    sname.src = rname.src;
}
function id2elem(id) {
	if (typeof(id) != 'string') {
		return id;
	}
	if (document.getElementById) {
		id = document.getElementById(id);
	} else if (document.all) {
		id=document.all[id];
	} else {
		id = null;
	}
	return id;
}

function popup(url,width,height){
    nw = window.open(url,"newwindow","width="+width+",height="+height+",status=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,location=0");
    if (parseInt(navigator.appVersion)>3) {
       if (navigator.appName=="Netscape") {
          winW = window.innerWidth;
          winH = window.innerHeight;
       }
       if (navigator.appName.indexOf("Microsoft")!=-1) {
          winW = document.body.offsetWidth;
          winH = document.body.offsetHeight;
       }
    }
    posX = (winW/2)-(width/2);
    posY = (winH/2)-(height/2);
    nw.moveTo(posX,posY);
    nw.focus();
}

function checkForm(){
if (document.subscribeForm.elements['Email Address'].value.length > 0){
 return true;
 }
else{
 alert('Please enter your email address.');
 document.subscribeForm.elements['Email Address'].focus();
 return false;
 }
}

function tabhover(tabNum){
    tabL = id2elem("tl"+Math.abs(tabNum));
    tabR = id2elem("tr"+Math.abs(tabNum));
    tabI = id2elem("ti"+Math.abs(tabNum));
    if(tabNum > 0){ //mouseover
        if(tabL.className.indexOf("_act_")<0){
            tabL.className = "tab_hover_left";
            tabR.className = "tab_hover_right";
            tabI.className = "tab_hover_inner";
        }
    }else{//mouseout
        if(tabL.className.indexOf("_act_")<0){
            tabL.className = "tab_off_left";
            tabR.className = "tab_off_right";
            tabI.className = "tab_off_inner";
        }

    }
}
function tabswitch(tabNum,contentPrefix,contentMax){
    //set tab colors
    for(j = 1 ; j <= contentMax; j++){
        tabL = id2elem("tl" + j);
        tabR = id2elem("tr" + j);
        tabI = id2elem("ti" + j);
        tabW = id2elem("tab" + j);
        contentElem = id2elem(contentPrefix + j);

        if(j == tabNum){
            tabL.className = "tab_act_left";
            tabR.className = "tab_act_right";
            tabI.className = "tab_act_inner";
            tabW.style.zIndex = '5';
            contentElem.style.display = "block";
        }else{
            tabL.className = "tab_off_left";
            tabR.className = "tab_off_right";
            tabI.className = "tab_off_inner";
            tabW.style.zIndex = '3';

            contentElem.style.display = "none";
        }
    }
}
//gets random number between 1 and upper
function rand(upper)
{
    var ranNum= Math.floor(Math.random()*upper) +1;
    return ranNum;
}