function showDesc(id, visFlag){
	return;
	var desc = document.getElementsByName("desc_"+id)[0];
	//alert(desc)
	if(visFlag){
		desc.style["visibility"] = "visible";
	}else{
		desc.style["visibility"] = "hidden";
	}
}
camFrame = parent.frames["cameras"];
camFrame.popupWin = null;
camFrame.popupWinClosedFirstTime = false;

function openWin(url, winX, winY, winWidth, winHeight) {
	var _left = winX;
	var _top = winY; 
	var features = 'status = 0, menubar = 0, scrollbars = 0, resizable = 0,';
	if(camFrame.popupWin == null){
		camFrame.popupWin = camFrame.window.open(url,'popup','toolbar = 0, left = ' + _left + ', top = ' + _top + ', '+features+' width = ' + winWidth + ', height = ' + winHeight);
		setTimeout("debug('was null');", 2000);
	}else if(camFrame.popupWin && !camFrame.popupWin.closed){
		camFrame.popupWin.location.href = url;
		setTimeout("debug('was open');", 2000);
	}else if(camFrame.popupWin.closed){
		camFrame.popupWin = camFrame.window.open(url,'popup','toolbar = 0, '+features+' width = ' + winWidth + ', height = ' + winHeight);
		setTimeout("debug('was closed');", 2000);
		}else{
		camFrame.popupWin = camFrame.window.open(url,'popup','toolbar = 0, left = ' + _left + ', top = ' + _top + ', '+features+' width = ' + winWidth + ', height = ' + winHeight);
	}
	camFrame.popupWin.window.resizeTo(winWidth, winHeight);
	camFrame.popupWin.focus();
	
}

function debug(str){
	window.status = str;
}
function showImg(imgID){
	var imgData=imgItems[imgID];
	var format = imgData.format.length ==0 ? "quer":imgData.format;
	var title = imgData.description;
	var winX = 560;
	var winY = 97;
	
	//return;
	if(format.indexOf('quer')== 0){
	
			var winWidth = 480;
			var winHeight = 360;
			}
	else if(format.indexOf('hoch') == 0){
		
			var winWidth = 360;
			var winHeight = 480;
			}
	else{
			
			var winWidth = 480;
			var winHeight = 360;
	}
	var url= "/includes/photo-popup.php?url="+imgData.src+"&title="+title+"&w="+winWidth+"&h="+winHeight;
	openWin(url, winX, winY, winWidth, winHeight);
}


function findObj(theObj, theDoc) {
	var p, i, foundObj;
	if (!theDoc) {
		theDoc = document;
	}
	if ((p=theObj.indexOf("?"))>0 && parent.frames.length) {
		theDoc = parent.frames[theObj.substring(p+1)].document;
		theObj = theObj.substring(0, p);
	}
	if (!(foundObj=theDoc[theObj]) && theDoc.all) {
		foundObj = theDoc.all[theObj];
	}
	for (i=0; !foundObj && i<theDoc.forms.length; i++) {
		foundObj = theDoc.forms[i][theObj];
	}
	for (i=0; !foundObj && theDoc.layers && i<theDoc.layers.length; i++) {
		foundObj = findObj(theObj, theDoc.layers[i].document);
	}
	if (!foundObj && document.getElementById) {
		foundObj = document.getElementById(theObj);
	}
	return foundObj;
}

//startChangeImages();
