
	var ie4 = document.all;
	var	ie5=(document.getElementById && document.all)? 1 : 0;
	var ns4 = document.layers;
	var ns6 = document.getElementById && !document.all; 
	var w3c=(document.getElementById)? 1 : 0;

	if(ns4){document.write ('<layer name="divbig"></layer>');}else{document.write ('<div id="divbig" style="position:absolute;z-index:100" ></div>');}
	if(w3c)div1=document.getElementById('divbig');
	if(ie4)div1=document.all['divbig'];
	if(ns4)div1=document.layers['divbig'];
	
	//NS init:
	if(document.layers){ document.captureEvents(Event.MOUSEMOVE); document.onMouseMove = getMouseLoc; }
	
	function write_div(text){
		if(ns4){
			div1.document.open();
			div1.document.write(text);
			div1.document.close();
		}
		else {div1.innerHTML=text;}
	}
	
	function showbig(n){
			write_div("<P align=left> <img onmouseout='hidebig()' name=bigimage style='BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-COLOR: #cccccc; BORDER-TOP-COLOR: #cccccc; BORDER-RIGHT-COLOR: #cccccc' height=400 width=400 border=4 hspace=0 src="+n+"></a> <P>&nbsp;</P>");
			moveLayerToMouseLoc('divbig',0,0);
	}
	
	function showbig_detail(n){
			write_div("<P align=left> <img onmouseout='hidebig()' name=bigimage style='BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-COLOR: #cccccc; BORDER-TOP-COLOR: #cccccc; BORDER-RIGHT-COLOR: #cccccc' height=400 width=400 border=4 hspace=0 src="+n+"></a> <P>&nbsp;</P>");
			moveLayerToLoc('divbig',0,0);
	}
	
	function hidebig(){
		showHideLayers('divbig','','hide');
	}
	
	function moveLayerToLoc(theLayer, offsetH, offsetV)
	{
	  var obj;
	  if ((findObj(theLayer))!=null)
	  {
		if (document.layers)  //NS
		{
		  obj = document.layers[theLayer];
		  //obj.left = mLoc.x +offsetH;
		  obj.left = 776 - 410 + (window.innerWidth - 776)/2;
		  obj.top  = 60;
		}
		else if (document.all)//IE
		{
		  getMouseLoc();
		  obj = document.all[theLayer].style;
		  //obj.pixelLeft = mLoc.x +offsetH;
		  obj.pixelLeft = 776 - 410 + (window.document.body.clientWidth - 776)/2;
		  obj.pixelTop  = 60;
		}
		showHideLayers(theLayer,'','show');
	  }
	}
	
	// * Dependencies * 
	// this function requires the following snippets:
	// findObj
	// showHideLayers
	// getMouseLoc
	function moveLayerToMouseLoc(theLayer, offsetH, offsetV)
	{
	  var obj;
	  if ((findObj(theLayer))!=null)
	  {
		if (document.layers)  //NS
		{
		  document.onMouseMove = getMouseLoc;
		  obj = document.layers[theLayer];
		  //obj.left = mLoc.x +offsetH;
		  obj.left = (window.innerWidth-17)/2-200;
		  obj.top  = mLoc.y + offsetV - 20;
		}
		else if (document.all)//IE
		{
		  getMouseLoc();
		  obj = document.all[theLayer].style;
		  //obj.pixelLeft = mLoc.x +offsetH;
		  obj.pixelLeft = (window.document.body.clientWidth-1)/2-200;
		  obj.pixelTop  = mLoc.y +offsetV - 20;
		}
		showHideLayers(theLayer,'','show');
	  }
	}
	// get mouse location
	/* 
	Example:
	function test()
	{
	  if (document.layers) getMouseLoc;     //NS
	  else if (document.all) getMouseLoc(); //IE
	  alert(mouseLocation.x+","+mouseLocation.y);
	}
	in the BODY:
	<a href="#" onmouseover="test()">test</a>
	*/
	function Point(x,y) {  this.x = x; this.y = y; }
	mLoc = new Point(-500,-500);
	function getMouseLoc(e)
	{
	  if(!document.all)  //NS
	  {
		mLoc.x = e.pageX;
		mLoc.y = e.pageY;
	  }
	  else               //IE
	  {
		mLoc.x = event.x + document.body.scrollLeft;
		mLoc.y = event.y + document.body.scrollTop;
	  }
	  return true;
	}
	
	// Accepts a variable number of arguments, in triplets as follows:
	// arg 1: simple name of a layer object, such as "Layer1"
	// arg 2: ignored (for backward compatibility)
	// arg 3: 'hide' or 'show'
	// repeat...
	//
	// Example: showHideLayers(Layer1,'','show',Layer2,'','hide');
	function showHideLayers()
	{ 
	  var i, visStr, obj, args = showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3)
	  {
		if ((obj = findObj(args[i])) != null)
		{
		  visStr = args[i+2];
		  if (obj.style)
		  {
			obj = obj.style;
			if(visStr == 'show') visStr = 'visible';
			else if(visStr == 'hide') visStr = 'hidden';
		  }
		  obj.visibility = visStr;
		}
	  }
	}
	
	// Example: obj = findObj("image1");
	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;
	}

