var theHeight;
var iFrameHeight;
var footerHeight;
var containerHeight;
var speed = 10;
var start1 = 312;
var start2 = 312;
var start3 = 585;
var start4 = 633;
function setSize(){
	theHeight = parent.document.body.clientHeight;
	theHeight = theHeight - 358;
	if(theHeight < 312){
		theHeight = 312;
	}
	containerHeight = theHeight;
	if(theHeight > 312){
		iFrameHeight = theHeight + 75;
		footerHeight = iFrameHeight + 234;
	} else {
		parent.document.getElementById('Content0').style.height = 392 + 'px';
		parent.document.getElementById('pageFooter').style.top = 633 + 'px';
	}
	growContainer();
	//alert('called');

}
var end1 = 0;
var end2 = 0;
var end3 = 0;
var end4 = 0;
function growContainer() {
	//parent.buildText=0;
	if(parent.loader){
	//alert(parent.buildText);
		if(parent.buildText==1){
			if(end1 == 0){
			  if(start1 < theHeight){
			   start1 = start1 + speed;
			   document.getElementById('contentText').style.height = start1 + 'px';
			  } else {
			   end1 = 1;
			  }
			}
			if(end2 == 0){
			  if(start2 < containerHeight){
			   start2 = start2 + speed;
			   document.getElementById('contentContainer').style.height = start2 + 'px';
			  } else {
			   end2 = 1;
			  }
			}
			if(end3 == 0){
			  if(start3 < iFrameHeight){
			   start3 = start3 + speed;
			   parent.document.getElementById('Content0').style.height = start3 + 'px';
			  } else {
			   end3 = 1;
			  }
			}
			if(end4 == 0){
			  if(start4 < footerHeight){
			   start4 = start4 + speed;
			   parent.document.getElementById('pageFooter').style.top = start4 + 'px';
			  } else {
			   end4 = 1;
			  }
			}
			if(end1 == 0 || end2 == 0 || end3 == 0 || end4 == 0){
			  setTimeout("growContainer()", 25);
			} else {
			 document.getElementById('contentText').style.height = theHeight + 'px';
			 document.getElementById('contentContainer').style.height = containerHeight + 'px';
			 parent.document.getElementById('Content0').style.height = iFrameHeight + 'px';
			 parent.document.getElementById('pageFooter').style.top = footerHeight + 'px';
			 parent.buildText = 0;
			}
		} else {
			document.getElementById('contentText').style.height = theHeight + 'px';
			document.getElementById('contentContainer').style.height = containerHeight + 'px';
			parent.document.getElementById('Content0').style.height = iFrameHeight + 'px';
	 		parent.document.getElementById('pageFooter').style.top = footerHeight + 'px';
		} 
	} else {
		parent.loader = 0;
		parent.buildText=1
	}
}

function friendsLink() {
   var thisLink = 'Friends';
   thisLink = thisLink + '@';
   thisLink = thisLink + 'LETV';
   thisLink = thisLink + '.org';
   document.getElementById('friendsLink').href= 'mailto:' + thisLink; 
}
