function printDate()
{
	var months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
	var today = new Date();
	month = today.getMonth(); 
	day = today.getDate();
	yy = today.getYear();
	
	var year = (yy < 1000) ? yy + 1900 : yy;

	fullDate = months[month] + " " + day + ", &nbsp;" + year;
	return (fullDate);
}


var topNavWidth=135;
var topNavDown = 0;
var minWidth = 750;

function positionTopNav(object)
//This Function will Position the Top Navigation Bar
{
	if (getWidth() > minWidth) 
	{
		left = getWidth()/2 - topNavWidth/2  + 15;
	}
	else
	{
		left = minWidth/2 - topNavWidth/2  + 15;
	}
	moveObject(object,topNavDown,left);
}

function moveObject(object,top2,left)
	//This function is used in all others, this will move the objects. 
	/* Takes the Follwoing Arguments:
		object = name of object to move;
		top2 = new top of object;
		left = new left location of object;
		This is Cross Browser Compatible;
	*/
	{
	show(object);
	
	var target = document.getElementById(object);
	target.style.top = top2;
	target.style.left = left;
	
/* 	if (document.all)
	//if Internet Explorer
	{
		target = document.all[object];
		target.style.top = top2;
		target.style.left = left;
	}
	else if (document.layers)
	// If Netscape
		{
			document.layers[object].top = top2;
			document.layers[object].left = left;
		}
	*/
	} 

function getWidth()
//This Funntion will Return the Wdith of the Window
{
	var width = document.body.clientWidth;
	return (width);
}
//End getWidth

function getHeight()
//This Function will Return the Height of the Window
{
	var height = document.body.clientHeight;
	return (height);
}


function setup()
// Main Setup Function Called by On-Load and On Resize
// This Function will handle all postioning of elemts of Home Page
{
	positionTopNav('topNav');
}

function show(object) 
//This Function will Show the Menu Contents When Hovered Over
{
	document.getElementById(object).style.visibility = 'visible';

}

function nnResize()
{
	if (document.layers)
	{
		location.reload();
	}
}



// Image Rollover Script
var flag = false;
function imageLoad() {  // called with onLoad()
    if (document.images) {
        img1on = new Image(); img1on.src = "../images/navAttorneyProfilesSelected.jpg";
        img2on = new Image(); img2on.src = "../images/navCommunityServiceSelected.jpg";
        img3on = new Image(); img3on.src = "../images/navPracticeAreasSelected.jpg";
        img4on = new Image(); img4on.src = "../images/navNewsAndEventsSelected.jpg";
        img5on = new Image(); img5on.src = "../images/navAboutKBLawSelected.jpg";

// and so on until you load them all          
        return (flag = true);  // set the flag and let the function know know it can work
    }
}

if (document.images) {   // load the off images in the normal way
    img1off = new Image(); img1off.src = "../images/navAttorneyProfiles.jpg";
    img2off = new Image(); img2off.src = "../images/navCommunityService.jpg";
    img3off = new Image(); img3off.src = "../images/navPracticeAreas.jpg";
	img4off = new Image(); img4off.src = "../images/navNewsAndEvents.jpg";
	img5off = new Image(); img5off.src = "../images/navAboutKBLaw.jpg";
}


function rollIn(imgName) {
    if (document.images && (flag == true)) {
        document[imgName].src = eval(imgName + "on.src");
    }
}

function rollOut(imgName) {  // the normal onMouseOut function
    if (document.images){
        document[imgName].src = eval(imgName + "off.src");
    }
}

function windowPopup(url)
{
	//window.open (url)
	popupWin = window.open (url, 'myWin', 'toolbar=no, width=605, height=500, scrollbars=yes, resizable=yes')
	popupWin.print()
}
// -->