
/* - - - - - - - - - - - - - - - - - - */

function MainPageResize() {
    ClientSize();
    var MainTable_ = document.getElementById("MainTable");
    MainTable_.style.height = (ClientHeight-20) +'px';
}
function HomePageResize() {
		MainPageResize();
    SetHomeFlv(0);
}
function Home2PageResize() {
		MainPageResize();
    FlvBoxReposition( 'Home2'  , 'LEFT' );
}
function CenterObjInPage(obj_) {
    ClientSize(); 
    obj_.style.top = ((ClientHeight - findHeight(obj_))/2) +'px';
    obj_.style.left = (((ClientWidth -20) - findWidth(obj_))/2) +'px';
}

function SetSameHeight(Id_1,Id_2) {
    Id_1_ = document.getElementById(Id_1);
    Id_2_ = document.getElementById(Id_2);
    Id_2_.style.height = findHeight(Id_1_);
}
/* - - - - - - - - - - - - - - - - - - */

/* - - - - - - - - - - - - - - - - - - */
function SetHomeFlv(Cnt_) {
var BodySxDiv_ , BodySxTd_ ;
BodySxDiv_ = document.getElementById("Home3");
BodySxTd_ = document.getElementById("BodySxTd");
	if (document.documentElement){ // Explorer
		BodySxDiv_.style.position='absolute';		
//		alert( BodySxDiv_.style.top +' - '+ findPosY(BodySxTd_) +' ++ '+ BodySxDiv_.style.left +' - '+ findPosX(BodySxTd_) );
		
		BodySxDiv_.style.top  = findPosY(BodySxTd_) +'px';
		BodySxDiv_.style.left = findPosX(BodySxTd_) +'px';
		
//		alert( BodySxDiv_.style.top +' - '+ findPosY(BodySxTd_) +' ++ '+ BodySxDiv_.style.left +' - '+ findPosX(BodySxTd_) );
	
		if ( Cnt_>0 ) { SetHomeFlv(Cnt_ -1); }
	}
	else {
		setTimeout("BodySxDiv_.style.position='relative';",0);
	}
}
/* - - - - - - - - - - - - - - - - - - */
var Divobj;
function ResizeDiv(Box_,DivW,DivH) {
	Divobj = document.getElementById(Box_);
  Divobj.style.height = DivH +'px';
  Divobj.style.width  = DivW +'px';
}
function InitFloatDiv(Box_,DivH,FootH) {
//    if (ClientWidth==0||ClientHeight==0){ alertSize(); }
	ClientSize(); 
	Divobj = document.getElementById(Box_);
	Divobj.style.top = (ClientHeight - DivH - FootH) +'px';
	Divobj.style.position='fixed';
}

function InitAbsoluteDiv(Box_) {
//    if (ClientWidth==0||ClientHeight==0){ alertSize(); }
	ClientSize(); 
	Divobj = document.getElementById(Box_);
	Divobj.style.top = findPosY(Divobj) +'px';
	Divobj.style.left = findPosX(Divobj) +'px';
	Divobj.style.position='absolute';
}
function InitDemoDiv(Box_,DivH) {
//    if (ClientWidth==0||ClientHeight==0){ alertSize(); }
	ClientSize(); 
	Divobj = document.getElementById(Box_);
	Divobj.style.top = (ClientHeight - DivH) +'px';
	Divobj.style.left = '5px';
	Divobj.style.position='fixed';
//	Divobj.style.position='absolute';
}
function InitDemoPage(Box_,DivHead) {
//    if (ClientWidth==0||ClientHeight==0){ alertSize(); }
	ClientSize(); 
	Divobj = document.getElementById(Box_);
  Divobj.style.height = (ClientHeight) +'px';
  Divobj.style.width = (ClientWidth) +'px';
}

/* - - - - - - - - - - - - - - - - - - */
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 findHeight(obj) {
    return obj.offsetHeight;
}

function findWidth(obj) {
    return obj.offsetWidth;
}
  
/* - - - - - - - - - - - - - - - - - - */
