/**
* @Method Name  :   newWindow
* @Purpose      :   opens a small unscrolable pop up window. 
* @Param        :   pageName - Name of the page that should open
*/
function newWindow(pageName)
{
    var width = "600";
    var height = "450";
    var left = (screen.width/2) - width/2;
    var top = (screen.height/2) - height/2;
    var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
    var msgWindow = window.open(pageName,"", styleStr);
}

/**
* @Method Name  :   newWindowLarge
* @Purpose      :   opens a large unscrolable pop up window. 
* @Param        :   pageName - Name of the page that should open
*/
function newWindowLarge(pageName)
{
    var width = "800";
    var height = "480";
    var left = (screen.width/2) - width/2;
    var top = (screen.height/2) - height/2;
    var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
    var msgWindow = window.open(pageName,"", styleStr);
}

function newCustomWindow(pageName, pageWidth, pageHeight)
{
    var width = pageWidth, height = pageHeight;
    var left = (screen.width/2) - width/2;
    var top = (screen.height/2) - height/2;
    var styleStr = 'location=no,status=no,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
   // var msgWindow = window.open(pageName,"", styleStr);
   window.open(pageName,"", styleStr);
}

function newWindow(url)
{
    var width = "800";
    var height = "480";
    var left = (screen.width/2) - width/2;
    var top = (screen.height/2) - height/2;
    var styleStr = 'toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbar=yes,resizable=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
    window.open(url,"", styleStr);
}

function newWindowImage(url)
{
    var width = "700";
    var height = "480";
    var left = (screen.width/2) - width/2;
    var top = (screen.height/2) - height/2;
    var styleStr = 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbar=yes,resizable=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
    window.open(url,"", styleStr);
}
function newWindowEmail(url)
{
    var width = "600";
    var height = "590";
    var left = (screen.width/2) - width/2;
    var top = (screen.height/2) - height/2;
    var styleStr = 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbar=yes,resizable=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
    window.open(url,"", styleStr);
}
function focusInput(inputId)
{ 
  var input = document.getElementById(inputId);
  
  if (input)
  { 
    input.value = "";
  } 
}        
function clickButton(e, buttonid){ 

  var evt = e ? e : window.event;

  var bt = document.getElementById(buttonid);

  if (bt){ 

      if (evt.keyCode == 13){ 
            bt.click(); 
            return false; 
      } 
  } 
}
function showContent(contentDiv){ 
    // Hide all content panes.
    document.getElementById('content1').style['display'] = 'none';  
    document.getElementById('content2').style['display'] = 'none';  
    document.getElementById('content3').style['display'] = 'none';  

    // Show required content div.
    document.getElementById('content' + contentDiv).style['display'] = 'block';  
    // Set the rounding div class to display tab status as selected.
    document.getElementById('divContent').className = 'content' + contentDiv;
}