var LayerMove = Class.create({
	
	initialize: function()
	{
		if ($('Danmarkskort')) this.moveDanmarksKort();
		if ($('Nyheder')) this.moveNyheder();
		if ($('Mailingliste')) this.moveMailingliste();
		if ($('Forside_right')) this.moveForside();
		if ($('Side_billede')) this.moveSideImage();
		if ($('Side_billede_bund')) this.moveSideImageBottom();
		if ($('Side_billede_top')) this.moveSideImageTop();
		if ($('Side_billede_top_nomove')) this.moveSideImageTopNomove();
		if ($('Side_billede_bund_nomove')) this.moveSideImageBundNomove();
		if ($('Diesel')) this.moveDiesel();
	},
	
	moveDiesel: function()
	{
		var l = $('Diesel');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);
	},
	
	moveDanmarksKort: function()
	{
		var m = new Element('div');
		m.writeAttribute('id', 'Danmarkskort');
		var kort = '<img src="/images/nykort.gif" usemap="#Zones" name="DanmarksKortet" border="0"><map name="Zones"><area shape="poly" COORDS=" 109, 469, 102, 465, 93, 459, 83, 459, 64, 453, 54, 455, 48, 451, 48, 438, 47, 431, 52, 416, 47, 371, 35, 362, 19, 343, 23, 330, 22, 320, 33, 320, 30, 310, 19, 306, 29, 291, 52, 295, 59, 294, 64, 297, 76, 297, 76, 304, 87, 305, 87, 315, 100, 320, 114, 323, 126, 309, 130, 312, 140, 303, 137, 293, 138, 288, 143, 290, 164, 292, 168, 297, 156, 304, 171, 307, 168, 314, 151, 308, 137, 323, 133, 328, 149, 339, 144, 350, 153, 352, 158, 357, 195, 341, 209, 350, 207, 362, 216, 358, 218, 340, 229, 358, 223, 367, 232, 379, 235, 398, 233, 419, 226, 431, 219, 428, 210, 432, 189, 422, 182, 427, 172, 424, 179, 415, 171, 406, 167, 417, 163, 416, 160, 402, 153, 384, 139, 359, 136, 367, 130, 377, 140, 396, 140, 403, 133, 410, 121, 415, 129, 424, 115, 432, 117, 434, 127, 432, 138, 426, 152, 430, 163, 437, 171, 456, 165, 462, 152, 454, 143, 453, 143, 460, 136, 459, 130, 451, 109, 467" href="http://3dlogistik.dk/site/22300.htm"><area shape="poly" COORDS=" 246, 210, 243, 223, 234, 241, 228, 256, 220, 255, 223, 246, 216, 244, 212, 252, 213, 263, 210, 264, 206, 260, 207, 254, 201, 254, 197, 250, 202, 245, 207, 239, 201, 235, 186, 254, 188, 273, 187, 289, 180, 301, 166, 299, 166, 293, 139, 285, 135, 292, 138, 301, 131, 308, 123, 308, 115, 320, 88, 313, 87, 303, 78, 302, 77, 295, 64, 295, 49, 290, 28, 288, 23, 278, 38, 272, 33, 257, 27, 255, 41, 238, 36, 230, 37, 221, 33, 214, 40, 196, 46, 189, 53, 201, 60, 205, 63, 194, 57, 182, 68, 171, 79, 154, 89, 153, 96, 166, 87, 182, 88, 194, 94, 181, 108, 183, 108, 170, 97, 173, 102, 162, 98, 151, 99, 139, 110, 123, 131, 123, 134, 129, 142, 118, 153, 111, 161, 103, 167, 109, 184, 126, 190, 126, 191, 155, 196, 180, 195, 190, 209, 199, 233, 194, 246, 209" href="http://3dlogistik.dk/site/22301.htm"><area shape="poly" COORDS=" 170, 320, 166, 328, 151, 334, 136, 326, 150, 310, 172, 318" href="http://3dlogistik.dk/site/22301.htm"><area shape="poly" COORDS=" 37, 405, 44, 408, 40, 421, 35, 427, 31, 422, 36, 404" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 385, 273, 379, 291, 383, 309, 385, 320, 392, 337, 398, 329, 402, 331, 402, 338, 399, 340, 397, 336, 394, 340, 385, 346, 378, 341, 368, 339, 361, 345, 353, 351, 354, 363, 365, 373, 375, 383, 375, 389, 366, 396, 354, 399, 347, 407, 347, 414, 351, 418, 349, 424, 350, 431, 351, 435, 357, 438, 354, 429, 359, 426, 365, 428, 380, 432, 384, 441, 381, 443, 369, 440, 361, 447, 354, 453, 352, 461, 341, 475, 336, 489, 337, 503, 331, 503, 328, 491, 321, 491, 303, 490, 292, 497, 275, 487, 253, 476, 247, 469, 256, 468, 254, 460, 252, 452, 264, 444, 275, 445, 284, 454, 294, 459, 300, 463, 307, 453, 315, 453, 314, 443, 322, 443, 332, 445, 339, 451, 340, 448, 340, 443, 328, 440, 318, 430, 314, 418, 307, 409, 292, 404, 289, 407, 274, 407, 270, 393, 258, 380, 270, 376, 261, 355, 263, 342, 245, 333, 256, 331, 242, 321, 252, 321, 265, 320, 274, 321, 284, 313, 283, 306, 293, 305, 295, 291, 282, 288, 273, 280, 276, 278, 282, 283, 289, 286, 300, 285, 307, 287, 315, 281, 317, 285, 314, 294, 308, 298, 312, 304, 313, 307, 314, 313, 322, 310, 330, 306, 327, 291, 322, 284, 332, 277, 342, 267, 357, 258, 372, 263, 382, 267, 385, 273" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 248, 415, 250, 425, 243, 436, 237, 453, 231, 472, 228, 482, 224, 479, 219, 465, 224, 457, 226, 448, 235, 440, 242, 416, 247, 415" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 213, 280, 219, 294, 222, 300, 219, 317, 211, 317, 210, 306, 216, 300, 216, 293, 211, 290, 210, 280" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 238, 81, 247, 77, 261, 72, 263, 75, 256, 77, 257, 82, 248, 88, 244, 84, 237, 82" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 218, 6, 208, 21, 201, 33, 210, 50, 212, 54, 210, 63, 213, 86, 202, 98, 195, 122, 190, 125, 163, 103, 153, 107, 142, 111, 120, 115, 105, 123, 97, 116, 78, 122, 64, 130, 57, 129, 53, 137, 67, 138, 74, 130, 78, 132, 75, 139, 71, 141, 73, 151, 74, 154, 82, 148, 90, 146, 90, 149, 75, 154, 73, 158, 64, 170, 54, 171, 50, 181, 45, 187, 35, 174, 24, 159, 19, 174, 20, 181, 30, 186, 41, 191, 32, 212, 35, 223, 38, 238, 26, 253, 35, 270, 23, 276, 23, 270, 10, 261, 8, 276, 12, 299, 15, 293, 20, 294, 20, 301, 17, 306, 26, 308, 30, 313, 29, 318, 22, 319, 18, 342, 15, 347, 20, 358, 32, 368, 34, 380, 30, 378, 22, 366, 16, 359, 3, 349, 5, 332, 10, 311, 8, 300, 5, 276, 9, 239, 10, 212, 10, 195, 16, 169, 26, 136, 51, 103, 66, 106, 84, 97, 110, 99, 126, 90, 137, 75, 146, 56, 159, 40, 164, 29, 178, 30, 195, 18, 208, 8, 217, 4" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 201, 468, 183, 446, 186, 443, 196, 454, 202, 457, 208, 455, 212, 461, 205, 464, 200, 467" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 210, 438, 221, 435, 224, 442, 218, 448, 209, 439" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 322, 60, 365, 77, 365, 67, 370, 54, 370, 41, 355, 33, 347, 25, 343, 24, 330, 16, 322, 5, 316, 24, 315, 41, 312, 53, 322, 60" href="http://3dlogistik.dk/site/22302.htm"><area shape="poly" COORDS=" 296, 171, 304, 167, 301, 164, 293, 165, 292, 170, 298, 170" href="http://3dlogistik.dk/site/22302.htm"><area shape="default" nohref></map>';
		var l = $('Danmarkskort');
		m.innerHTML = kort;
		$('rightColumn').insert(m);
		//$('rightColumn').innerHTML = kort;
		/*var c = l.cloneNode(true);
		var img = c.getElementsByTagName('img');
		img = img[0];
		img.setAttribute('useMap', '#fisk');
		var map = c.getElementsByTagName('map');
		map = map[0];
		map.setAttribute('name', 'fisk');*/
		l.remove();
		//$('rightColumn').insert(c);
	},
	
	moveForside: function()
	{
		var l = $('Forside_right');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);
	},
	
	moveSideImage: function()
	{
		var l = $('Side_billede');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);
	},
	
	moveSideImageBund: function()
	{
		var l = $('Side_billede_bund');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);
	},
	
	moveSideImageTop: function()
	{
		var l = $('Side_billede_top');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);
	},
	
	moveSideImageTopNomove: function()
	{
		var l = $('Side_billede_top_nomove');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);
	},
	
	moveSideImageBundNomove: function()
	{
		var l = $('Side_billede_bund_nomove');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);
	},
	
	moveNyheder: function()
	{
		var l = $('Nyheder');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);
		
		var l2 = $('Nyheder_2');
		if (!l2) return;
		var c2 = l2.cloneNode(true);
		l2.remove();
		$('rightColumn').insert(c2);
	},
	
	moveMailingliste: function()
	{
		var l = $('Mailingliste_2');
		var c = l.cloneNode(true);
		l.remove();
		$('rightColumn').insert(c);

		var l2 = $('Mailingliste');
		if (!l2) return;
		var c2 = l2.cloneNode(true);
		l2.remove();
		$('rightColumn').insert(c2);
	}
	
});