// Make sure the correct top frame is loaded
function topredirect(baseref,load) {
//if ((top == self) || (top.frames[0].name != 'officieuze_strippagina_music')) 
   if (top == self)
      reloadpageinframeset(baseref,load);
   else 
      if (top.frames[0].name != 'lspp_logo') 
         reloadpageinframeset(baseref,load);
}

// Do the real loading of the page if top frame was not found
function reloadpageinframeset(baseref,load) {
   // Test if this is a local Internet Explorer browse, uses / instead of \ in adress
   if (location.pathname.lastIndexOf('\\') == -1) 
      var use_slash = "/";
   else
      var use_slash = "\\";

   // Get an index for the page
   if (location.href.lastIndexOf("#") == -1) 
      var fileref = "";
   else
      var fileref = location.href.substring(location.href.lastIndexOf('#'),location.href.length);

   // Get the filename
   var filename = location.pathname.substring(location.pathname.lastIndexOf(use_slash)+1,location.pathname.length);

   // Determine if the calling page is to be loaded as part of the frame
   if (load != 'no')
      var newURL = location.protocol + use_slash+use_slash + location.host + location.pathname.substring(0,location.pathname.lastIndexOf(use_slash)) + use_slash+'index.htm?' + baseref + filename + fileref;
   else
      var newURL = location.protocol + use_slash+use_slash + location.host + location.pathname.substring(0,location.pathname.lastIndexOf(use_slash)) + use_slash+'index.htm?' + baseref;

   // Use the correct way to show the page
   if (document.images)
      top.location.replace(newURL);
   else
      top.location.href = newURL;
}

// Make sure the correct parent frame is loaded
function frameredirect(lvl1framename,lvl1framefile,load) {
  if (top.lspp_logo) {
     if (parent.frames[0].name != lvl1framename) {
        if (load != 'no')

		   // Test if this is a local Internet Explorer browse, uses / instead of \ in adress
           if (location.pathname.lastIndexOf('\\') == -1) 
              var use_slash = "/";
           else
              var use_slash = "\\";
            
           // Fill varibale with the page to be loaded in the frameset.
           //top.DOSlvl1 = location.pathname.substring(location.pathname.lastIndexOf(use_slash)+1,location.pathname.length);
           top.LSPPlvl1 = location.href.substring(location.href.lastIndexOf(use_slash)+1,location.href.length);

        // Use the correct way to show the page
        if (document.images)
           location.replace(lvl1framefile);
        else
           location.href = lvl1framefile;
     }
  }
}

// Make sure the correct page is loaded within the current frameset
function loadcorrectpage(lvl,pagename) {
   // Look for variable if not found return specified (default) pagename.
   // This is done to prevent errors when variable does not exists.
   if (eval('top.LSPPlvl'+lvl)) {
      // If variable is empty return specified (default) pagename,
      // else return the pagename in the varibale and empty the variable
      if (eval('top.LSPPlvl'+lvl) == '') {
         return pagename;
      }
      else {
         var temp = eval('top.LSPPlvl'+lvl);
         eval('top.LSPPlvl'+lvl+' = ""');
         return temp
      }
   }
   else {
     return pagename
   }
}

function copyright(language) {
	var scrx = (screen.width-400)/2
	var scry = (screen.height-135)/2

	var s1 = "<HEAD><TITLE>LSPP copyright</TITLE>"
	var s2 = "<LINK REL='stylesheet' TYPE='text/css' HREF='stylesheet.css'></HEAD><BODY CLASS='color'>"
	if (language == 'en') {
	    var s3 = "&copy; LSPP. Nothing on this site may be duplicated and/or made public in anyway, without a written confirmation from LSPP.";
		var s4 = "<CENTER><FORM><INPUT TYPE='BUTTON' CLASS='texts' VALUE='Close window'"+" onClick='self.close()'>"
	}
	else {
	    var s3 = "&copy; LSPP. Niets op deze site mag worden verveelvuldigd en/of openbaar gemaakt door middel van (electronische) druk, fotocopie of op welke wijze dan ook, zonder voorafgaande schriftelijke toestemming van LSPP."
		var s4 = "<CENTER><FORM><INPUT TYPE='BUTTON' CLASS='texts' VALUE='Sluit venster'"+" onClick='self.close()'>"
	}
	var s5 = "</FORM></CENTER></BODY>"

	ImageWindow=window.open("", "newwin","toolbar=no,scrollbars=no,menubar=no,width=400,height=135,screenX="+scrx+",screenY="+scry)
	ImageWindow.document.write(s1+s2+s3+s4+s5)
	ImageWindow.document.close()
}

function kvk(language) {
	var scrx = (screen.width-400)/2
	var scry = (screen.height-135)/2

	var s1 = "<HEAD><TITLE>Kvk info</TITLE>"
	var s2 = "<LINK REL='stylesheet' TYPE='text/css' HREF='stylesheet.css'></HEAD><BODY CLASS='color'>"
	if (language == 'en') {
	    var s3 = "Life Science Purchasing Power BV is statutair gevestigd in Almere.<BR> Kamer van Koophandel Flevoland registratie nummer: 39076277.";
		var s4 = "<CENTER><FORM><INPUT TYPE='BUTTON' CLASS='texts' VALUE='Close window'"+" onClick='self.close()'>"
	}
	else {
	    var s3 = "Life Science Purchasing Power BV is statutair gevestigd in Almere.<BR> Kamer van Koophandel Flevoland registratie nummer: 39076277.";
		var s4 = "<CENTER><FORM><INPUT TYPE='BUTTON' CLASS='texts' VALUE='Sluit venster'"+" onClick='self.close()'>"
	}
	var s5 = "</FORM></CENTER></BODY>"

	ImageWindow=window.open("", "newwin","toolbar=no,scrollbars=no,menubar=no,width=500,height=100,screenX="+scrx+",screenY="+scry)
	ImageWindow.document.write(s1+s2+s3+s4+s5)
	ImageWindow.document.close()
}

