nn4=(document.layers)?true:false;
ie4=(document.all)?true:false;
ie5=navigator.appVersion.indexOf("MSIE 5")>0;

newWindow = null;
win = null;

function showDetails(src, name){
	if(window.screen){
		 aw=screen.availWidth;
		 ah=screen.availHeight;
	}else{
		 aw=800;
		 ah=600;
	}
	w=600;
	h=600;
	if(name=="w"){
		w=800;
		h=450;
	}
	settings=
	 "left=" + (aw-w)/2 + ","
	 +"top=" + (ah-h)/2 + ","
	 +"screenX=" + (aw-w)/2 + ","
	 +"screenY=" + (ah-h)/2 + ","
	 +"width=" + (w+20) + ","
	 +"height=" + (h+20) + ","
	 +"innerWidth=" + (w+20) + ","
	 +"innerHeight=" + (h+20) + ","
	 +"toolbar=no,"
	 +"location=no,"
	 +"directories=no,"
	 +"status=no,"
	 +"menubar=no,"
	 +"scrollbars=yes,"
	 +"resizable=no"
	win = window.open("", name, settings);
    win.location.href = src;
	win.focus();
}

function show(src, w, h, text){
	if(window.screen){
		 aw=screen.availWidth;
		 ah=screen.availHeight;
	}else{
		 aw=640;
		 ah=450;
	}
if(newWindow==null || newWindow.closed){
	 settings=
	 "left=" + (aw-w)/2 + ","
	 +"top=" + (ah-h)/2 + ","
	 +"screenX=" + (aw-w)/2 + ","
	 +"screenY=" + (ah-h)/2 + ","
	 +"width=" + (w+20) + ","
	 +"height=" + (h+20) + ","
	 +"innerWidth=" + (w+20) + ","
	 +"innerHeight=" + (h+20) + ","
	 +"toolbar=no,"
	 +"location=no,"
	 +"directories=no,"
	 +"status=no,"
	 +"menubar=no,"
	 +"scrollbars=no,"
	 +"resizable=no"
	newWindow = window.open("",'image',settings);
	}
	newWindow.document.open();
	newWindow.document.clear();
	newWindow.document.write(
	"<html><head><title>SPARE- "+ text +"</title>\n"
	+"<style><!--\n"
	+"body{background-repeat:no-repeat}\n"
	+"--></style>\n"
	+"</head>\n"
	+"<body rightmargin='10' bottommargin='10' marginwidth='10' marginheight='10'></body>\n"
	+"<img src=" +src+ " width="+w+" height="+h+" border='0'>\n"
	+"</html>"
	);
	newWindow.document.close();
	newWindow.focus();
}
