$(document).ready(function(){
	
	$("#splash").load(function(){
		
		
		
		qs = new Querystring(top.location.search.substring(1, top.location.search.length));

		

		if(qs.contains("kat") && typeof(top.splash.main) != "undefined")
		{
			category = qs.get("kat");
			page = qs.get("pg");
			menu = qs.get("menu");
		
			mainpath = "/a/DATS/"+category+"/pg/"+page+".html";
			menupath = "/a/www/front/menu/rightmenu/rightmenu_"+menu+".html";
			
			top.splash.main.location = mainpath;
			top.splash.rightmenu.location = menupath;
			//$("#main").attr("src",mainpath);
			//$("#rightmenu").attr("src",menupath);
		}
		else if(qs.contains("hoved") && typeof(top.splash.main) != "undefined")
		{
			
			
			//console.log("hoved");
			tempHoved = qs.get("hoved");
			
			pos = tempHoved.indexOf("/");
			if(pos > -1)
			{
				hoved = tempHoved.substr(0,pos);
			}
			else
			{
				hoved = tempHoved;
			}
			mainpath = "/a/DATS/hovedsider/" + hoved + ".html";
			
			top.splash.main.location = mainpath;
		}
	
	
	
	}); // Splash.load
	
	


}) // Document.ready
