var hasLoaded = true;
window.onload=loaded;
var hasLoaded = false;
function loaded(){
	hasLoaded = true;
	if(typeof initialize == 'function')initialize();
/*	if (mobile==true){
		var newHeight = parseInt(d("contentMiddle").offsetHeight);
		d("contentMiddleLeft").style.height = newHeight + "px";
		d("contentMiddleRight").style.height = newHeight + "px";
		d("contentBottom").style.top = (newHeight+130) + "px";
		d("bottomAddress").style.top = (newHeight+170) + "px";
	}else{
	fixSizes();
	}
	*/
}
function fixSizes(){
	/*if (mobile!=true){
		var midHeight = (findPosY(d("contentBottom"))-findPosY(d("contentMiddle")));
		d("contentMiddle").style.height=midHeight+'px';
		d("middleContent").style.height=midHeight-31+'px';
		d("contentMiddleLeft").style.height=midHeight+'px';
		d("contentMiddleRight").style.height=midHeight+'px';
		var pageWidth = GetWidth();
		var tmpWidth = parseInt(pageWidth-220-750);
		if(tmpWidth<0)tmpWidth=0;
		d("bottomAddressCenter").style.width=tmpWidth+'px';
		d("contentTopMiddle").style.width=(640+tmpWidth)+'px';
		d("contentBottomMiddle").style.width=(640+tmpWidth)+'px';
		d("contentMiddle").style.width=(680+tmpWidth)+'px';
		d("contentMiddleRight").style.left=(906+tmpWidth)+'px';
		if(pageWidth<1010){d("wrench").style.right = (pageWidth-1010)+'px';}		
	}*/
}
//window.onresize=fixSizes;
function d(inD){return document.getElementById(inD);}
function mOver(inMenu){
	if(hasLoaded==true)d(inMenu).style.display='block';
}
function mOut(inMenu){
	if(hasLoaded==true)
		for(var u=1;u<=8;u++)
			d("menu"+u+"M").style.display='none';
}
function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }
  
function GetWidth()
{
var x = 0;
if (self.innerHeight)
{
x = self.innerWidth;
}
else if (document.documentElement && document.documentElement.clientHeight)
{
x = document.documentElement.clientWidth;
}
else if (document.body)
{
x = document.body.clientWidth;
}
return x;
}

function GetHeight()
{
var y = 0;
if (self.innerHeight)
{
y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
{
y = document.documentElement.clientHeight;
}
else if (document.body)
{
y = document.body.clientHeight;
}
return y;
}
