function createFlashControl( elemId, clsID, codebase, width, height, path)
{
	var elem = document.getElementById(elemId);
	var innerhtml;
	innerhtml = '<object classid="clsid:' +clsID+ '" ' +
							'codebase="' +codebase+ '" ' +
							'width="' +width+ '" ' +
							'height="' +height+ '">';
	innerhtml += '<param name="movie" value="' +path+ '">';
	innerhtml += '<param name="quality" value="high">';
	innerhtml += '<param name="autoStart" value="-1">';
	innerhtml += '<embed src="' +path+ '" ' +
						'quality="high" ' +
						'pluginspage="http://www.macromedia.com/go/getflashplayer" ' +
						'type="application/x-shockwave-flash" ' +
						'width="' +width+ '" ' +
						'height="' +height+ '"></embed>';
	innerhtml += '</object>';

	elem.innerHTML = innerhtml;
}
function calculateHeight(firstDiv,SecondDiv) {
  var firstDivHeight = document.getElementById(firstDiv).clientHeight;
  var secondDivHeight = document.getElementById(SecondDiv).clientHeight;
  //alert(firstDivHeight);
  //alert(secondDivHeight);
  if (firstDivHeight > secondDivHeight) {
    document.getElementById(SecondDiv).style.height = firstDivHeight;
  } else {
    document.getElementById(firstDiv).style.height = secondDivHeight;
  }
  
  
}
function changewidth(DivParent,DivChild,minus){
 var DivHeightParent = document.getElementById(DivParent).clientHeight;
 var DivHeightChild = document.getElementById(DivChild).clientHeight;
 //var DivHeightMinus = document.getElementById(DivMinus).clientHeight;
 //alert(DivHeightParent);
 //alert(DivHeightChild);
 //alert(DivHeightMinus);
 document.getElementById(DivChild).style.height = DivHeightParent - minus;// - DivHeightMinus;
}

function changewidth_old(DivParent,DivChild){
 var DivHeightParent = document.getElementById(DivParent).clientHeight;
 var DivHeightChild = document.getElementById(DivChild).clientHeight;
 //alert(DivHeightParent);
 //alert(DivHeightChild);
 if (DivHeightParent < DivHeightChild)
 {
 //DivHeightParent = DivHeightChild;

 document.getElementById(DivParent).style.height = DivHeightChild;
 }else {
 //DivHeightChild = DivHeightParent;
 document.getElementById(DivChild).style.height = DivHeightParent;
 }
}


function makeCalculations(firstDiv,SecondDiv,DivParent,DivChild,minus) {

  var firstDivHeight = document.getElementById(firstDiv).clientHeight;
  var secondDivHeight = document.getElementById(SecondDiv).clientHeight;
  //alert(firstDivHeight);
  //alert(secondDivHeight);
  if (firstDivHeight > secondDivHeight) {
    document.getElementById(SecondDiv).style.height = firstDivHeight;
  } else {
    document.getElementById(firstDiv).style.height = secondDivHeight;
  }
  
  var DivHeightParent = document.getElementById(DivParent).clientHeight;
  var DivHeightChild = document.getElementById(DivChild).clientHeight;
  document.getElementById(DivChild).style.height = DivHeightParent - minus;// - DivHeightMinus;

}
