function setUrl(locationName)
{
	var minNav3 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 3)
	var minIE4 = (navigator.appName.indexOf("Microsoft") >= 0 && parseInt(navigator.appVersion) >= 4)
	var minDOM = minNav3 || minIE4   // baseline DOM required for this function
	var isNav4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 4)
    var pageVal = "";                  // URL variable
	var argVal = "";                    // argument variable for sub-pages
	
	if (self == top) 
	   {
		// Don't do anything if running NN4 
		// so that the frame can be printed on its own
		if (isNav4 && window.innerWidth == 0)
		   {
			  return
		   }

        // Encode content of parameter "subPage" by replacing special characters = and &  
	  	if (location.search) 
		  {
		     var argArray = locationName.split('?');
             pageVal = argArray[0];
			 argVal = argArray[1].replace("=","~");
			 while(argVal.search("=") != -1)
 			    argVal = argVal.replace("=","~");
			 while(argVal.search("&") != -1)
 			    argVal = argVal.replace("&","-");
				
			 pageVal = pageVal + "&subPage=" + argVal;
		  }
		else
		  pageVal = locationName;  
  
	    // If the top or the left frame is loaded on it's own, do this
	    if ( locationName == "" )
           {
	 	      top.location.replace("http://www.blasernick.ch/")
		      return
	       }		
		   
	    if (minDOM) 
	      {
		      // Use replace() to keep current page out of history
		      top.location.replace(loadMain(pageVal) + pageVal);
		   } 
	    else
	      {
		      top.location.replace(loadMain(pageVal) + pageVal);
		   }
	   }
}

function loadMain(mainURL)
{
	var inString = new String(mainURL);
	
	if (inString.indexOf("Lebenslauf") != -1)
		return("http://www.blasernick.ch/Lebenslauf/index.html?content=");

	if (inString.indexOf("Levensloop") != -1)
		return("http://www.blasernick.ch/Levensloop/index.html?content=");

	if (inString.indexOf("Curriculum_vitae") != -1)
		return("http://www.blasernick.ch/Curriculum_vitae/index.html?content=");


	if (inString.indexOf("Psychotherapy") != -1)
		return("http://www.blasernick.ch/Psychotherapy/index.html?content=");

	if (inString.indexOf("Psychotherapie_nl") != -1)
		return("http://www.blasernick.ch/Psychotherapie_nl/index.html?content=");

	if (inString.indexOf("Psychotherapie") != -1)
		return("http://www.blasernick.ch/Psychotherapie/index.html?content=");


	if (inString.indexOf("familyconstellations") != -1)
		return("http://www.blasernick.ch/familyconstellations/index.html?content=");

	if (inString.indexOf("familieopstellingen") != -1)
		return("http://www.blasernick.ch/familieopstellingen/index.html?content=");

	if (inString.indexOf("familienaufstellungen") != -1)
		return("http://www.blasernick.ch/familienaufstellungen/index.html?content=");

}

if (window == top)
  setUrl(document.location.href);

