function ClickReturn (noret) {
	if (!noret) {
		if (!opera)	return true;
	} 
	return false;
}

function loadPanoWin(n) {
	if (iemac) {
		var w = screen.width ? screen.width : 800;
		var h = screen.height ? screen.height : 600;
		popupWin = mrw(w,h,'fullscreen');
		popupWin.location = path+'/fullscreen.html?id='+n;
	} else {
		var w = screen.width ? screen.width * 0.9 : 800;
		var h = screen.height ? screen.height * 0.8 : 550;
		openWindow(path+'/fullscreen.html?id='+n,w,h,'panowin',true);
	}
}

function openWindow(urlX,wX,hX,winX,toolbarsX,modalX) {
	url=urlX?urlX:path+'/fullscreen.html';
	var win=winX?winX:'win';
	var w=wX?wX:1024;
	var h=hX?hX:768;
	var toolbars=toolbarsX?true:false;
	var modal=modalX?true:false;
	var ow = (w>=screen.width)?(screen.width-10):w;
	var oh = (h>=screen.height)?(screen.height-56):h;
	var centerW=(screen.width-w)/2;
	var centerH=(screen.height-h)/2;
	LeftPosition = (screen.width)?((centerW<0)?0:centerW):0;
	TopPosition = (screen.height)?((centerH<0)?0:centerH):0;
	var location='0';
	var status='0';
	var menubar='0';
	var scrollbars='0';
	var resizable='0';
	var scrolling='no';
	var noresize='noresize';
	ow = (modal && window.showModalDialog)?ow+6:ow;
	oh = (modal && window.showModalDialog)?oh+24:oh;
	if ((w>=screen.width) || (h>=screen.height)) {
		scrollbars = '1';
		scrolling='yes';
		ow = (ow<(screen.width-10))?(ow+14):ow;
		oh = (oh<(screen.height-56))?(oh+14):oh;
	}
	if (toolbars) {
		location='0';
		status='1';
		menubar='0';
		scrollbars='1';
		resizable='1';
		scrolling='yes';
		noresize='';
		TopPosition=0;
	}
	if (opera && !toolbars) {
		popupWindow = window.open('',win,'toolbar=0,location='+location+',directories=0,status='+status+',menubar='+menubar+',width='+(ow+2)+',height='+(oh+2));
		popupWindow.document.writeln('<html><head><title>.:: zo0om image viewer by Ebeling Data OY &copy; ::.</title></head>');
		popupWindow.document.writeln('<frameset rows="1*,'+oh+',1*" cols="1*,'+ow+',1*" frameborder="0" border="0" framespacing="0">');
		popupWindow.document.writeln('<frame name="blank" src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="main"  src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling='+scrolling+' frameborder="0" '+noresize+'>');
		popupWindow.document.writeln('<frame name="blank" src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('<frame name="blank" src="http://zo0om.com/blank.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
		popupWindow.document.writeln('</frameset>');
		popupWindow.document.writeln('</html>');
		popupWindow.document.close(); 
		popupWindow.main.location=url;
		if(popupWindow.window.focus){popupWindow.window.focus();}
	} else if (modal && window.showModalDialog) {
		popupWindow = window.showModalDialog(url,"return false;","dialogHeight: "+oh+"px; dialogWidth: "+ow+"px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No; scroll: "+toolbars+";");
	} else {
		popupWindow = window.open(url,win,'toolbar=0,location='+location+',directories=0,status='+status+',menubar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable+',width='+ow+',height='+oh+',top='+TopPosition+',left='+LeftPosition);
		if(popupWindow.window.focus){popupWindow.window.focus();}
	}
}

function WM_imageSwap(daImage, daSrc){
	var objStr,obj;
	if(document.images){
		if (typeof daImage == 'string') {
			objStr = 'document.' + daImage;
			obj = eval(objStr);
			obj.src = daSrc;
		} else if ((typeof daImage == 'object') && daImage && daImage.src) {
			daImage.src = daSrc;
		}
	}
}

function opw(w,h,winX,x,y){
	return window.open('',winX,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+w+',height='+h+',top='+y+',left='+x);
}

function mrw(w,h,winX){
	var x = (screen.width) ? (screen.width-w)/2 : 0;
	var y = (screen.height) ? (screen.height-h)/2 : 0;
	var win = opw(w,h,winX,x,y);
	if (win.resizeTo) win.resizeTo(w,h);
	if (win.moveTo) win.moveTo(x,y);
	if (win.innerHeight && (win.innerHeight != h || win.innerWidth != w) ) {
		win.close();
		win = opw(w,h,winX,x,y);
	}
	return win;
}


