document.write("<style>");
document.write("#veil {");
document.write("    position:absolute;");
document.write("	left:0px;");
document.write("	*top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);");
document.write("}");
document.write("body > div#veil {");
document.write("    position: fixed;");
document.write("    top:0px;");
document.write("	left:0px;");
document.write("}");
document.write("</style>");
document.write("<div style='width:100%;height:100%;background-color:#000000;*filter:alpha(opacity=10);-moz-opacity:.10;opacity:.10;visibility:hidden; display:none; z-index:1' id='veil'></div>");

var current_set = 2;
var a_image_sets = new Array;
a_image_sets[a_image_sets.length] = new Array("01_01_small.jpg", "01_02_small.jpg", "01_03_small.jpg");
a_image_sets[a_image_sets.length] = new Array("02_01_small.jpg", "02_02_small.jpg", "02_03_small.jpg");
a_image_sets[a_image_sets.length] = new Array("03_01_small.jpg", "03_02_small.jpg", "03_03_small.jpg");
var image_path = "_modules/_text/_upload/image_sets/";
var a_gallery_images = new Array;
a_gallery_images[a_gallery_images.length] = new Array(800, 520, "01_01_small.jpg");
a_gallery_images[a_gallery_images.length] = new Array(800, 560, "01_02_small.jpg");
a_gallery_images[a_gallery_images.length] = new Array(800, 466, "01_03_small.jpg");
a_gallery_images[a_gallery_images.length] = new Array(800, 628, "02_01_small.jpg");
a_gallery_images[a_gallery_images.length] = new Array(800, 597, "02_02_small.jpg");
a_gallery_images[a_gallery_images.length] = new Array(800, 529, "02_03_small.jpg");
a_gallery_images[a_gallery_images.length] = new Array(800, 529, "03_01_small.jpg");
a_gallery_images[a_gallery_images.length] = new Array(800, 555, "03_02_small.jpg");
a_gallery_images[a_gallery_images.length] = new Array(800, 595, "03_03_small.jpg");

var a_gallery_images_frontpage = new Array;
a_gallery_images_frontpage[a_gallery_images_frontpage.length] = new Array(800, 466, "04_01_small.jpg");
a_gallery_images_frontpage[a_gallery_images_frontpage.length] = new Array(800, 566, "04_02_small.jpg");
a_gallery_images_frontpage[a_gallery_images_frontpage.length] = new Array(800, 561, "04_03_small.jpg");
a_gallery_images_frontpage[a_gallery_images_frontpage.length] = new Array(800, 491, "04_04_small.jpg");

function switchImages()
{

	current_set++;
	if(a_image_sets[current_set] == undefined)
	{
		current_set = 0;
	}
	/** Getting the objects **/
	var obj_smallbox1 = document.getElementById("smallbox_1");
	var obj_smallbox2 = document.getElementById("smallbox_2");
	var obj_bigbox1 = document.getElementById("bigbox_1");

	/** Changing the images **/
	obj_smallbox1.src = image_path + a_image_sets[current_set][0];
	obj_smallbox2.src = image_path + a_image_sets[current_set][1];
	obj_bigbox1.src = image_path + a_image_sets[current_set][2];
}

function switchImages2()
{
	/** Getting the objects **/
	var obj_smallbox1 = document.getElementById("smallbox_1");
	var obj_smallbox2 = document.getElementById("smallbox_2");
	var obj_bigbox1 = document.getElementById("bigbox_1");

	/** Changing the images **/
	obj_smallbox1.src = image_path + a_gallery_images_frontpage[1][2];
	obj_smallbox2.src = image_path + a_gallery_images_frontpage[2][2];
	obj_bigbox1.src = image_path + a_gallery_images_frontpage[0][2];
}

function openLargeImage(id)
{
	window.open (id.src.replace("_small", ""));
}

function openPDF(box)
{
	var pdf_path = "_modules/_text/_upload/pdf/";
	if(box == "grundplan")
	{
		window.open(pdf_path + "illustrationsplan.pdf");
	}
	else if(box == "salgsopstilling")
	{
		window.open(pdf_path + "opsat_salgspriser.pdf");
	}
	else if(box == "luftfoto")
	{
		window.open(pdf_path + "illustrationsplan_2009_nummereret.pdf");
	}
	/** The large boxes **/
	else if(box.id == "bigbox_1")
	{
		window.location = "http://gartnerhaven.eu/_modules/_download/getfile.php?filnavn=1245072224_grundplan.pdf";
	}
	/** The small boxes **/
	else
	{
		window.location = "http://gartnerhaven.eu/_modules/_download/getfile.php?filnavn=1245072204_facader.pdf";
	}
}
