function newImage(arg)
{
  if (document.images) 
  {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function changeImages() 
{
  if (document.images && (preloadFlag == true)) 
  {
    for (var i = 0; i < changeImages.arguments.length; i += 2)
    {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}

var preloadFlag = false;

function preloadImages() 
{
  var d = document; 
  if(d.images)
  { 
    if(!d.MM_p) 
    {
      d.MM_p=new Array();
    }
    var i, j = d.MM_p.length, a = preloadImages.arguments;
    for(i = 0; i < a.length; i++)
    {
      if (a[i].indexOf("#") != 0)
      {
        d.MM_p[j] = new Image;
        d.MM_p[j++].src = a[i];
      }
    }
  }
  preloadFlag = true;
}

function displayStatusMsg(string)
{
  status = string;
  document.returnValue = true;
}

function top_refresh(int_set, str_session)
{
  
  if (top.tiscali_navigation != null)
	{
    switch (int_set)
    {
      case 1 :  if (top.location != 'http://www.starsteps.nl/tiscali/tiscali_starsteps_2.php' && top.location != 'http://www.starsteps.nl/tiscali/tiscali_starsteps_2.php?'+str_session && top.location != 'http://www.starsteps.nl/tiscali/tiscali_starsteps_3.php' && top.location != 'http://www.starsteps.nl/tiscali/tiscali_starsteps_3.php?'+str_session)
                {
                  if(str_session != '')
                  {
                    top.location = 'http://www.starsteps.nl/tiscali/tiscali_starsteps_2.php?' + str_session;
                  }
                  else
                  {
                    top.location = 'http://www.starsteps.nl/tiscali/tiscali_starsteps_2.php';
                  }
                }
                else
                {
                  if (top.tiscali_top != null)
                  {
                    top.tiscali_top.location.reload();
                  }
                }
                break;
      case 2 :  if (top.location != 'http://www.starsteps.nl/tiscali/tiscali_starsteps_3.php' && top.location != 'http://www.starsteps.nl/tiscali/tiscali_starsteps_3.php?'+str_session)
                {
                  if(str_session != '')
                  {
                    top.location = 'http://www.starsteps.nl/tiscali/tiscali_starsteps_3.php?' + str_session;
                  }
                  else
                  {
                    top.location = 'http://www.starsteps.nl/tiscali/tiscali_starsteps_3.php';
                  }
                }
                break;
    }
    if(top.tiscali_count.location == 'http://www.starsteps.nl/tiscali/tiscali_counter.php')
    {
      top.tiscali_count.location.reload();
    }
	}

  if (top.move_navigation != null)
  {
    switch (int_set)
    {
      case 1 :  if (top.location != 'http://www.starsteps.nl/tiscali/12move_starsteps_2.php' && top.location != 'http://www.starsteps.nl/tiscali/12move_starsteps_2.php?'+str_session)
                {
                  if(str_session != '')
                  {
                    top.location = 'http://www.starsteps.nl/tiscali/12move_starsteps_2.php?' + str_session;
                  }
                  else
                  {
                    top.location = 'http://www.starsteps.nl/tiscali/12move_starsteps_2.php';
                  }
                }
                else
                {
                  top.move_navigation.location.reload();
                }
                break;
      case 2 :  top.move_navigation.location.reload();
                break;
    }
  }
}

function popup_richedit(str_url)
{
	richedit = window.open(str_url, "richedit", "toolbar=no, directories=no, status=no, resize=yes, scrollbars=auto, menubar=no, top=50, left=50, height=580, width=780");
	richedit.window.focus();
}

function frames_refresh(int_prev_type, int_page_type, str_highlight)
{
	if(top.starmenu != null)
	{
		top.starmenu.location = '/menu.php?highlight=' + str_highlight;
	}

	if(int_prev_type != int_page_type)
	{
		if(top.startop != null)
		{
			top.startop.location.reload();
		}

		if(top.starfiller != null)
		{
			top.starfiller.location.reload();
		}
	}
}

function frames_refresh_en(int_prev_type, int_page_type, str_highlight)
{
	if(top.starmenu != null)
	{
		top.starmenu.location = '/models/menu.php?highlight=' + str_highlight;
	}

	if(int_prev_type != int_page_type)
	{
		if(top.startop != null)
		{
			top.startop.location.reload();
		}

		if(top.starfiller != null)
		{
			top.starfiller.location.reload();
		}
	}
}

