function setimgPosition() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  
  //alert((document.getElementById("popupContentDiv").style.width).replace("px", ""));
  
  var posLeft = (myWidth/2) - (parseInt((document.getElementById("imgDiv").style.width).replace("px", ""))/2);
  var posTop = 5; //(myHeight/2) - (parseInt((document.getElementById("imgDiv").style.height).replace("px", ""))/2);
  //alert(posLeft + "," + posTop);
  /*if ((posTop-170) < 0) {
	 posTop = 0; 
  } else {
	 posTop = posTop-170; 
  }*/
  
  if (myWidth < document.getElementById("cp01").width) {
	  document.getElementById("imgDiv").style.left = "5px";
  	  document.getElementById("imgDiv").style.top = posTop + "px";
	  var newWidth = myWidth - 10;
	  document.getElementById("imgDiv").style.width = newWidth + "px";
	  var wFact = 600 / newWidth;
	  var newHeight = 247 * wFact;
	  document.getElementById("cp01").width = newWidth;
	  document.getElementById("cp01").height = newHeight;
  } else {
  
	  document.getElementById("imgDiv").style.left = posLeft + "px";
	  document.getElementById("imgDiv").style.top = posTop + "px";
	  document.getElementById("imgDiv").style.width = "600px";
	  document.getElementById("cp01").width = 600;
	  document.getElementById("cp01").height = 247;
  }
  
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
}


function getWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && document.documentElement.clientWidth ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && document.body.clientWidth ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
  return myWidth;
}

function getHeight() {
  var myHeight = 0;
  if( typeof( window.innerHeight ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && document.documentElement.clientHeight ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && document.body.clientHeight ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  //alert(myHeight);
  return myHeight;
}

