//pass id of the dom element for which height should be set and the height or width which should be subtracted
//from original height and width-sukeerthiadiga

//setting height
function set_height(dom_id,height)
    {// ''height'' is the parameter to subtract from window height
    myHeight = getheight();
    var object=document.getElementById(dom_id);
    object.style.height = myHeight-parseInt(height) + "px" ;
    }

//setting width
function set_width(dom_id,width)
    {// ''width'' is the parameter to subtract from window width
    myWidth = getwidth();
    var object=document.getElementById(dom_id);
    object.style.width = myWidth-parseInt(width) + "px" ;
    }
	
function set_width_sugg_adv(dom_id)
    {// ''width'' is the parameter to subtract from window width
    myWidth = getwidth();
	widthToIncrese = myWidth - 1020
    var object=document.getElementById(dom_id);
	object.style.width = (1003 + widthToIncrese) + "px" ;
    }
    
    
function getheight ()
{
      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;
  }

  return myHeight;
  
}

function getwidth()
{
      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;
  }

  return myWidth;
  
}
