function positionChart(){
	var chart1 = document.getElementById("widechart");
	chart1.style.visibility = "hidden";
	var img = document.getElementById("chart_anchor");
	var imgx = findPosX(img);
	var imgy = findPosY(img);
	imgx = imgx + -130;
	imgy = imgy + 10;
	chart1.style.position = 'absolute';
	chart1.style.left = imgx + "px";
	chart1.style.top = imgy + "px";
	chart1.style.visibility = "visible";
}

function findPosX(obj) {
var curleft = 0;

if (obj.offsetParent) {
curleft = obj.offsetLeft;
curleft += findPosX(obj.offsetParent);

} else if( obj.x)
curleft = obj.x;

return curleft;
}

function findPosY(obj) {
var curtop = 0;

if (obj.offsetParent) {
curtop = obj.offsetTop;
curtop += findPosY(obj.offsetParent);

} else if (obj.y)
curtop += obj.y;

return curtop;
} 

function resizeWindow(){
       var maxwidth;
       var table1a;
	   var table1b;
	   var table2;
	   var table3;
	   var cell1;
	   var cell2;
	   var cell3;
	   var cell4;
	   
       maxwidth = 954;
	   table1a = "menuTable";
	   table1b = "bottomTable";
       table2 = "mainTable";
	   table3 = "footerTable";
	   cell1 = "contentcell";
	   cell2 = "mainCell";
	   cell3 = "homeCell";
	   cell4 = "portalCell";
	   	
	   if (document.body.clientWidth>maxwidth)
       { 
           var width;
           width = Math.round(maxwidth/(document.body.clientWidth/100)) + "%"; 
		   document.getElementById(table1a).setAttribute("width", width);
		   document.getElementById(table1b).setAttribute("width", width); 
		   document.getElementById(table2).setAttribute("width", width); 
		   document.getElementById(table3).setAttribute("width", width); 
       }
       else
       {
           document.getElementById(table1a).setAttribute("width", '100%');
           document.getElementById(table1b).setAttribute("width", '100%');
		   document.getElementById(table2).setAttribute("width", '100%');
		   document.getElementById(table3).setAttribute("width", '100%');
       }
	   
	   
	   var height1;
	   var height2;
	   var height;
	   
	   height = GetWindowInnerHeight();
		height1= height-174;	
	  document.getElementById(cell1).setAttribute("height", height1);
//	   if(isset(cell4))
//	   {	
//		height2= height-360;	
//	    document.getElementById(cell4).setAttribute("height", height2);
//	   }
//	   else if(isset(cell3))
//	   {
//	   	height2= height-545;
//		document.getElementById(cell3).setAttribute("height", height2);
//		}
	   if(isset(cell2))
	   {
	   	height2= height-410;	
		document.getElementById(cell2).setAttribute("height", height2);
	   }
	   
}

function GetWindowInnerHeight()
{ 
	if(self.innerHeight)
		return self.innerHeight-5;
	else
		return document.body.clientHeight;

	return -1;
}

function isset(varid)
{
	if(document.getElementById(varid) != null)
		return true;
	else
		return false;
}



//<ol>
//<script type="text/javascript">
//var el=document.getElementById("contentcell")

//for(var i=0;i<el.attributes.length;i++){
//document.write("<li><b>"+el.attributes.item(i).name+"</b> = '"+el.attributes.item(i).value+"'</li>")
//}

// </script>
//</ol>