if (document.images)
	{
	image1_on = new Image();
	image1_on.src = "./img/home/photographers_index_on.gif";
	image1_off = new Image();
	image1_off.src = "./img/home/photographers_index_off.gif";

	image2_on = new Image();
	image2_on.src = "./img/home/production_index_on.gif";
	image2_off = new Image();
	image2_off.src = "./img/home/production_index_off.gif";
	}

function swapImg(img,stat)
	{
	if (document.images)
		{
		(stat == "on") ? (document.getElementById(img).src = eval(img + "_on.src")) : (document.getElementById(img).src = eval(img + "_off.src"));
		}
	}

function preloadImages()
	{
	if (document.images)
		{
		for (var i = 0; i < preloadImages.arguments.length; i++)
			{
			(new Image()).src = preloadImages.arguments[i];
			}
		}
	}

function showImprint()
	{
	imprint = window.open("./imprint.htm","imprint","'toolbars=0,location=0,scrollbars=1,statusbars=0,menubars=0,resizable=0,width=500,height=350,left=50,top=50");
	}

function checkSubmit()
	{
	check = confirm("Are you sure you want to submit the information?");
	return check;
	}
	
function updateDB(ph,hnav,ser) // neue sortierung in db schreiben
	{ 
	var strURL = './edit/dbupdater.php';
	var xmlHttpReq = false;
	var self = this;
	// Mozilla/Safari
	if (window.XMLHttpRequest) 
		{
		self.xmlHttpReq = new XMLHttpRequest();
		}
			// IE
			else if (window.ActiveXObject) 
			{
			self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
			}
	self.xmlHttpReq.open('POST', strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.setRequestHeader("Pragma", "no-cache");
	self.xmlHttpReq.setRequestHeader("Cache-Control", "must-revalidate");
	self.xmlHttpReq.setRequestHeader("If-Modified-Since", document.lastModified);
	self.xmlHttpReq.onreadystatechange = confirmUpdate;
	self.xmlHttpReq.send('ph=' + ph + '&hnav=' + hnav + '&' + ser);
	}

function confirmUpdate() // update bestätigen
	{
	if (self.xmlHttpReq.readyState == 4) 
		{
		//var data = eval('(' + self.xmlHttpReq.responseText + ')');
		var data = self.xmlHttpReq.responseText;
		alert(data);
		}
	}
