
function doGotoURL(url)
{
	 
  if (url.length > 0)
  {
    document.location = url;
    return;
  } 
}

function doIFrameResize(id)
{
  var a = navigator.userAgent;
  var isSF = (a.indexOf("Safari") > 0) ? true : false;
  var isIE = (a.indexOf("MSIE") > 0) ? true : false;
  
  var time;
  var delay = 200;

  var docHeight = (isIE) ? document.body.scrollHeight + 4 : document.body.offsetHeight;
  var docHeight = (isSF) ? docHeight + 20 : docHeight;

  //alert("docHeight:" + docHeight);

  if (docHeight == null || docHeight <= 10)
  {
    var func = "doIFrameResize('"+ id +"')";
    time = setTimeout(func, delay);    
  } 
  else 
  {  
    if (time)
      clearTimeout(time);
    
    try
    {
      if (isIE)
        window.parent.document.getElementById(id).style.height = docHeight;
      else 
        window.parent.document.getElementById(id).height = docHeight;
    } catch(e)
    {
     //alert(e);  
    }
  }
}

function doPopUp(url, name, option, width, height)
{
  if (!name) name= "_popup";  
  if (!option) option = "menubar=0,scrollbars=1,status=1,resizable=1";
  if (!width) width = 700;
  if (!height) height = 500;

  var w = window.open(url, name, "width=" + width + ",height=" + height + "," + option);
  if (w) 
    w.focus();
}

function doPrint(url)
{
//  var w = window.open(url, "_print");
//  if (w) 
//    w.focus();
  window.print();
}

function doEmail(context, handle, wnd)
{
   
  doPopUp(context, handle, wnd);
}


function doWindowOpen(url, wnd, props)
{
  if (url.length > 0)
  {
    window.open(url, wnd, props)
    return;
  } 
}


function keywordSearch() {
	document.searchbox.submit();
}

