// Chanel Functions

function chLoadPage (url, locale, target, features)
{
  var target = (target == null) ? "_top" : target; // default to _top
  if (url != null) 
  {
    if (target=="_top")
    {
      top.location.href = url;
    }
    else if (target=="_parent")
    {
	  if (window.opener) {
        window.opener.location.href = url;
        window.opener.focus(); 
	  }
    }
	else if (target=="_self" || target=="")
    {
      location.href = url;
    }
	else if (target=="_blank")
    {
      // This will spawn a new blank window
	  // Pass 'features' to control size and window options
	  var newWin = window.open(url,target,features);
	  if (newWin) { newWin.focus(); }
    }
	else 
    {
      // This will spawn a new window with the target reference name
	  // Pass 'features' to control size and window options
	  var newWin = window.open(url,target,features);
	  if (newWin) { newWin.focus(); }
    }
  }
}

// EOF