function getStyle(el, cssproperty, csspropertyNS){
if (el.currentStyle)
	{
	return el.currentStyle[cssproperty]
	}
	else if (window.getComputedStyle)
	{
	var elstyle=window.getComputedStyle(el, "")	
	return elstyle.getPropertyValue(csspropertyNS)
	}
}

function posDBox(id,xOff,yOff){
	var x = screen.width
	var y = (document.body.clientHeight)?document.body.clientHeight:window.innerHeight
	var dboxElement = document.getElementById(id)
	var dboxWidth = getStyle(dboxElement,'width','width')
	var dboxHeight = getStyle(dboxElement,'height','height')
	dboxWidth = dboxWidth.replace(/[px]/g, "")
	dboxWidth = dboxWidth/2
	dboxHeight = dboxHeight.replace(/[px]/g, "")
	dboxHeight = dboxHeight/2
	var x1 = (x/2)-dboxWidth
	var y1 = (y/2)-dboxHeight
	var x2 =(xOff)?x1+xOff:x1
	var y2 =(yOff)?y1+yOff:y1	
	dboxElement.style.left=x2+"px"
	dboxElement.style.top=y2+"px"	
	}
	
 
function sizePage(){	
	var threshold = 175    //amount to adjust for toolbar		
	
// GET SCREEN X ----------------------------------------------------------------
	var x1= (document.body.clientWidth)?document.body.clientWidth:screen.availWidth
	var x2 = document.getElementById("finder").scrollWidth      
	var x3 = screen.availWidth 
	var flag=(x3<=1024)?"flag":0
	if(flag=="flag")
		{	
		var x = (x1 < 1000)?1024:x1
		}
		else
		{		
		var x = (x2 - x1 > 80)? x2:x1
		}
	var size =(x > 1024)?"large":"small"     
// GET SCREEN Y ----------------------------------------------------------------
	var y= screen.availHeight-threshold			
// SET SIZES -------------------------------------------------------------------
   var midY = 550
   var Ydiff = y-midY
   if(Ydiff<0)
   		{
   		var bottomY=70
   		var topY=1
   		}
   		else
   		{
   		var bottomY = Ydiff/2
	    if(bottomY>69)
	   		{
	   		var topY = bottomY
	   		}
	   		else
	   		{
	   		bottomY=70
	   		var topY=(Ydiff-bottomY>1)?Ydiff-bottomY:1
	   		}
	   	} 
	//alert("top="+topY+"mid="+midY+"bottom="+bottomY)
	var headerSize = 118
	
	//if(size=="small"){ pull in small stylesheet }	
	var contentY = midY-headerSize			
		 
	document.getElementById("pageTable").style.width = x+"px"									// Set Page Table Width
	document.getElementById("topTD").style.height = topY+"px" 									// Set Top Height	
	document.getElementById("headerLay").style.width = (size == "large")?x+"px":"100%" 			// Set Header Width	
	document.getElementById("menuLay").style.top = topY+"px" 									// Set Menu Layer Height	
	document.getElementById("menuTable").style.width = x+"px" 									// Set Menu Table Width	    
	document.getElementById("logoTable").style.paddingLeft = (size == "large")?"60px":"5px" 	// Set Logo Table Padding Left
	document.getElementById("logoTable").style.paddingRight = (size == "large")?"60px":"5px" 	// Set Logo Table Padding Right 
	document.getElementById("logoTable").style.width = (size == "large")?"100%":"990px" 		// Set Logo Table Width	    
	document.getElementById("mainBody").style.height = contentY+"px" 							// Set Main Body Height	
	document.getElementById("mainBody").style.paddingRight = (size == "large")?"60px":"5px" 	// Set Main Body Padding Right
	document.getElementById("mainBody").style.paddingLeft = (size == "large")?"60px":"5px" 		// Set Main Body Padding Left	
	document.getElementById("bodyTable").style.height = contentY+"px" 							// Set Body Table Height
	document.getElementById("bodyTable").style.width = (size == "large")?"100%":"990px" 		// Set Body Table Width	
	document.getElementById("contentTD").style.height = contentY+"px" 							// Set Content TD Height	
	document.getElementById("content").style.height = contentY+"px" 							// Set Content Div Height	
	document.getElementById("bottomTD").style.height = bottomY+"px" 							// Set Bottom TD Height
	document.getElementById("bottomTD").style.paddingRight = (size == "large")?"60px":"5px" 	// Set Bottom TD Padding Right
	document.getElementById("bottomTD").style.paddingLeft = (size == "large")?"60px":"5px" 		// Set Bottom TD Padding Left
//	alert("top="+topTDy+"middle="+midTDy+"bottom="+bottomTDy+"content="+contentTDy)	

	if(document.getElementById("networking"))
		{
		var posTop=topY+118+30
		var posLeft=(size=="large")?x-60-550-25:x-550-25
		var networking = document.getElementById("networking")
		var pcRepair = document.getElementById("pcRepair")
		var computerSales = document.getElementById("computerSales")
		var dataRecovery = document.getElementById("dataRecovery")
		var offsiteBackup = document.getElementById("offsiteBackup")
		networking.style.top=posTop+"px"
		networking.style.left=posLeft+"px"
		pcRepair.style.top=posTop+"px"
		pcRepair.style.left=posLeft+"px"
		computerSales.style.top=posTop+"px"
		computerSales.style.left=posLeft+"px"
		dataRecovery.style.top=posTop+"px"
		dataRecovery.style.left=posLeft+"px"
		offsiteBackup.style.top=posTop+"px"
		offsiteBackup.style.left=posLeft+"px"
		
		}
	}
	
	
	
