
var d = document;

var popUpWin=0;

function nextBack(dir) {

	if (imgNum == totalImgs && dir > 0) {
		imgNum = 0;
	} else if (dir > 0) {
		imgNum++
	} else if (dir < 0 && imgNum != 0) {
		imgNum--
	} else {
		imgNum = totalImgs;
	}
	modifyimage('dynloadarea', imgNum);
	
	var zaehler = imgNum +1;
	d.getElementById("bild").value = zaehler;
//	if (zaehler <= 34) {
//		d.getElementById("game").value = "Immortal Throne";
//	} else {
//		d.getElementById("game").value = "Titan Quest";
//	}
}

function bignextBack(dir) {

	if (imgNum == totalImgs && dir > 0) {
		imgNum = 0;
	} else if (dir > 0) {
		imgNum++
	} else if (dir < 0 && imgNum != 0) {
		imgNum--
	} else {
		imgNum = totalImgs;
	}
	modifyimage('dynloadarea', imgNum);
	
	var zaehler = imgNum +1;
	d.getElementById("bild").value = zaehler;
//	if (zaehler <= 34) {
//		d.images["logo"].src = "images/it_logo.gif";
//	} else {
//		d.images["logo"].src = "images/tq_logo.gif";
//	}
}


function popUpWindow(area) {
	if (area == "screens") {
		w = "1024";
		h = "840";
		URLStr = "enlarge.php?img=" + imgNum;
	}
	if (area == "artwork") {
		w = "1024";
		h = "840";
		URLStr = "artenlarge.php?img=" + imgNum;
	}
	if (area == "items") {
		w = "500";
		h = "480";
		URLStr = "itemenlarge.php";
	}
	if (area == "pack") {
		w = "491";
		h = "760";
		URLStr = "packenlarge.php";
	}
		if (area == "packi") {
		w = "496";
		h = "760";
		URLStr = "packIenlarge.php";
	}

	if(popUpWin) {
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+w+',height='+h);
}

