
/*
function check_zoom(path){
	var xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");
	xmlHTTP.open("POST",'/chzoom/'+path,false); 
	xmlHTTP.send(); 
	return xmlHTTP.responseText;	
}
*/

/*
function zoomProgress(path){  	
	var args = ['/chzoom/'+path+'xml', 'Web editor / Zo0om', 'Work Done'];
	return showModalDialog('/edit/dlg_progress', args, 'center:1; dialogWidth:350px; dialogHeight:200px; status:0;');
}
*/

function openZo0om(idX,wX,hX,winX){
	var b = navigator.appName;
	var v = this.version = navigator.appVersion;
	var ua = navigator.userAgent.toLowerCase();	
	v0 = parseInt(v);
	safari = ua.indexOf("safari")>-1;	 //always check for safari & opera 
	opera = opera6 = opera7 = ua.indexOf("opera")>-1;	// before ns or ie
	ns = ns4 = ns4n = ns6 = !opera && !safari && (b=="Netscape");
	ie = ie4 = ie5 = ie55 = ie6 = !opera && (b=="Microsoft Internet Explorer");
	gecko = ua.indexOf('gecko')>-1; // check for gecko engine
//---WE
if (ie){
	var resp=check_zoom(idX+'w'+wX+'h'+hX);
	if (resp) zoomProgress(idX+'w'+wX+'h'+hX);
}
//---
	var urlX="/photo/"+idX+"w"+wX+"h"+hX+"/index.html";
	_req = new Subsys_JsHttpRequest_Js();
	_req.onreadystatechange = function(){
		alert(_req.readyState);		
		if (_req.readyState == 4)
		{
			if (_req.responseJS) {
				alert(_req.responseJS.params);
			}
		}
	}
	_req.caching = false;
	_req.open("GET", "/mods/zo0om/v1/params.php", true);
	_req.send({idX: idX, wX: wX, hX: hX});
}


function showPopUpWindow()
{
	wX+=64;	hX+=73;
	if (ns) {
		ns4 = (v0==4);
		v0=parseFloat(v);
		ns4n = (v0>=4.05);
		ns6 = (v0>=5);
		b = "Netscape";
	}else if (ie) {
		ie4 = ie5 = ie55 = ie6 = false;
		if (v.indexOf('MSIE 4')>0) {ie4 = true; v0 = 4;}
		else if (v.indexOf('MSIE 5')>0) {ie5 = true; v0 = 5;}
		else if (v.indexOf('MSIE 5.5')>0) {ie55 = true; v0 = 5.5;}
		else if (v.indexOf('MSIE 6')>0) {ie6 = true; v0 = 6;}
		b = "MSIE";
	}else if (opera) {
		v0=parseInt(ua.substr(ua.indexOf("opera")+6,1)); // set opera version
		opera6=(v0>=6);
		opera7=(v0>=7);
		b = "Opera";
	}else if (safari) {
		ns6 = (v0>=5);	// ns6 compatible correct?
		b = "Safari";
	}
	dom = (document.createElement && document.appendChild && document.getElementsByTagName)? true : false;
	def = (ie||dom);
	win32 = ua.indexOf("win")>-1;
	mac = ua.indexOf("mac")>-1;
	other = (!win32 && !mac);
	old = (ie4||ns4)? true:false;
	iemac =	(ie && mac)? true:false;
	supported = (def||ns4||ns6||opera)? true:false;
	supportedZ = (def||ns4n||ns6||opera7)? true:false;

	url=urlX?urlX:'http://zo0om.com/uc.html';
	var win=winX?winX:'win';
	var w=wX?wX:1024;
	var h=hX?hX:768;
	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';
	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 (opera) {
		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 {
		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(!old && popupWindow.window.focus){popupWindow.window.focus();}
	}
	*/
}
