// language toggle script begin
// by Josh Draper
// edited by Fredrik Petersson - v1.0 - 27 May 2002
// updated 2004-04-26

var loc = window.location;
var locToString = loc.toString();
var indexOfAnchor = locToString.indexOf("#")

if ((indexOfAnchor != -1) && (indexOfAnchor != "false")){
var locLengthNoLanguage = indexOfAnchor - 8;
var locCharNoLanguage = locToString.slice (0, locLengthNoLanguage);
}
else {
var locLength = locToString.length;
var locLengthNoLanguage = locLength - 8;
var locCharNoLanguage = locToString.slice (0, locLengthNoLanguage);
}

var smart_logo_off = new Image(); // for the inactive image
smart_logo_off.src = "http://smart.tii.se/smart/img/smart.gif";
var smart_logo_on = new Image(); // for the active image

// smart_logo_on.src = "http://tii.se:20080/jpeg/100x45.jpeg";
// smart_logo_on.src = "http://smarttable.tii.se/jpeg/philips1000.jpeg" + "?" + (new Date()).getTime();
// below is the latest one
// smart_logo_on.src="http://smartcatcher.tii.se/table.jpeg";
// to disable logo, use below
smart_logo_on.src = "http://smart.tii.se/smart/img/smart-back.jpg";

var swedish_flag_off = new Image(); // for the inactive image
swedish_flag_off.src = "http://smart.tii.se/smart/img/swedish_flag_off.gif";
var swedish_flag_on = new Image(); // for the active image
swedish_flag_on.src = "http://smart.tii.se/smart/img/swedish_flag_on.gif";

var english_flag_off = new Image(); // for the inactive image
english_flag_off.src = "http://smart.tii.se/smart/img/english_flag_off.gif";
var english_flag_on = new Image(); // for the active image
english_flag_on.src = "http://smart.tii.se/smart/img/english_flag_on.gif";


function langSwapToEnglish () {
	var swapLoc = locCharNoLanguage + "_en.html"
	window.location = swapLoc
}

function langSwapToSwedish () {
	var swapLoc = locCharNoLanguage + "_se.html"
	window.location = swapLoc
}

// language toggle script end

