//AM:200206
function AssureIsInFrame( redirectionString)
{
  if (top.frames.length == 0) 
  {
    // RSChange(861,BW,2007.08.28,"KNVSrv.Search new predefined + Next and Previous page")
    var newURL = window.location.href;
    newURL = newURL.replace( "?", "&");
    var text = redirectionString+'?'+newURL;
    // RSChangeEnd(861)

    //detects the browser version: 
    //If possible, we want to use the location.replace function, which will load 
    //the specified URL over the existing one (in the browser history). 
    //Otherwise, using the 'back button' on your browser will just redirect you to the 
    //same page over and over. 
    var ver = parseInt(navigator.appVersion, 10);
    if ( ((navigator.appName == "Netscape") && (ver >= 3)) ||
         ((navigator.appName == "Microsoft Internet Explorer") && (ver >= 4)) )
      location.replace(text);
    else
      location = text;
  };
}

//AM:200205
//AM:20020613: not used
function MainRedirect( Domain, Defaultpage)
{
    var newURL = parent.location.href;
    newURL = newURL.toLowerCase();
    newURL = newURL.replace( Domain + "/"+Defaultpage+"?", "");
    newURL = newURL.replace( Domain, ".");

    var newURL2 = ReplaceFirstOccurence( newURL, "&", "?");

    if (!((newURL == './'+Defaultpage) || (newURL == '.') || (newURL == './') || (newURL == '')))
    {
       confirm( "load with frames");
       parent.main.location = newURL2;
    }  
}
