<!-- Hide this file from non-JavaScript-supporting browsers!

/* Check if there is no frame IF no frame-> send the user to a frame! */ 

var platsens_namn = "http://www.latronix.se/index.html"
var strang = window.location.pathname

//if the names are the same, there is no frame!
if (window.parent.location == window.location) {

	//Find the catalouge "sidor" 
	check_strang = strang.indexOf("sidor")   //returns the position IF the index is found, else -1
	if (check_strang > -1) { //IN CASE ERRORS; check if there exist "sidor"

		// IF "start_sve" --> send to index!
		testa_namn = strang.indexOf("start_sve")
		if (testa_namn > -1) {
			//alert("start_sve finns :" + testa_namn)
		}

		else { // if (testa_namn > -1)
			//alert("INGET start_sve fanns :" + testa_namn)
			var katalog = "ramar"
	
			var del1 = strang.substring(0,check_strang) + katalog  // "namn/ramar"
			var del2 = strang.substring((check_strang + katalog.length),(check_strang + katalog.length + 1)) // "/"
			var del3 = "ram_" + strang.substring((check_strang + katalog.length + 1),strang.length)  // "ram_filnamn"

			platsens_namn = del1 + del2 + del3
		}

	} //if (check_strang > -1)

	else { // if (check_strang > -1)
	//alert("Error! Felaktigt filnamn! Ramar saknas dock!")
	}

	//SEND to right position:
	//alert("Gå in i ChangeToFram.js och se till att vi flyttar till " + platsens_namn)
	parent.location.href = platsens_namn

} // if (window.parent.location == window.location)

else { // if (window.parent.location == window.location)
//alert("Det finns ramar: "+ window.parent.location + ", " + window.location)
}

// stop the hiding -->