
//==========shops popup start============
		
if (document.getElementById) {
	stdBrowser = true
}else {
	stdBrowser = false}

function popUp(evt,currElem) {
	if (stdBrowser) {
		popUpWin = document.getElementById(currElem).style
	}
	/* This sets the menu to be visible */
	popUpWin.visibility = "visible"
}
/* The popDown function makes the menu invisible */
function popDown(currElem) {
	if (stdBrowser) {
		popUpWin = document.getElementById(currElem).style
	}	else {
		popUpWin = eval("document." + currElem)	}
	popUpWin.visibility = "hidden"
}
//==========shops popup end============

//homepage random image rotator 
function printImage1() {
NumberOfImagesToRotate = 11;
FirstPart = '<a href="h/past.htm"><img src="img/hm/';
LastPart = '_mghm.jpg" border="0" alt="Milo Gallery" id="hmimg"></a>';
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}



/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2001-3 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/
//******************product layers start
// resize fix for ns4
var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var cur_lyr;	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "visible";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

// get reference to nested layer for ns4
// from old dhtmllib.js by Mike Hall of www.brainjar.com
function getLyrRef(lyr,doc) {
	if (document.layers) {
		var theLyr;
		for (var i=0; i<doc.layers.length; i++) {
	  	theLyr = doc.layers[i];
			if (theLyr.name == lyr) return theLyr;
			else if (theLyr.document.layers.length > 0) 
	    	if ((theLyr = getLyrRef(lyr,theLyr.document)) != null)
					return theLyr;
	  }
		return null;
  }
}
//******************product layers end


//===============mouseover image enlarge===============
//Thumbnail image viewer- © Dynamic Drive (www.dynamicdrive.com)
var ie=document.all
var ns=document.layers
var ns6=document.getElementById&&!document.all

function enlarge(which,e){
//Render image code for IE 4+ and NS6
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (crossobj.style.visibility=="hidden"){
//crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX
//crossobj.style.top=ns6? pageYOffset+e.clientY : document.body.scrollTop+event.clientY
//crossobj.innerHTML='<div align=right id=drag><b onClick=closepreview()>X</b></div><img src="'+which+'">'
crossobj.innerHTML='<img src="'+which+'">'
crossobj.style.visibility="visible"
}
else
crossobj.style.visibility="hidden"
return false
}
//Render image code for NS 4
else if (document.layers){
if (document.showimage.visibility=="hide"){
document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
document.showimage.document.close()
document.showimage.left=e.x
document.showimage.top=e.y
document.showimage.visibility="show"
}
else
document.showimage.visibility="hide"
return false
}
//if NOT IE 4+ or NS 4, simply display image in full browser window
else
return true
}

function closepreview(){
crossobj.style.visibility="hidden"
}

function enlarge2(which,petnm,e){
//Render image code for IE 4+ and NS6
if (ie||ns6){
crossobj=document.getElementById? document.getElementById("showimage") : document.all.showimage
if (crossobj.style.visibility=="hidden"){
//crossobj.style.left=ns6? pageXOffset+e.clientX : document.body.scrollLeft+event.clientX
//crossobj.style.top=ns6? pageYOffset+e.clientY : document.body.scrollTop+event.clientY
//crossobj.innerHTML='<div align=right id=drag><b onClick=closepreview()>X</b></div><img src="'+which+'">'
crossobj.innerHTML='<img src="'+which+'"><div class="aux">'+petnm+'</div>'
crossobj.style.visibility="visible"
}
else
crossobj.style.visibility="hidden"
return false
}
//Render image code for NS 4
else if (document.layers){
if (document.showimage.visibility=="hide"){
document.showimage.document.write('<a href="#" onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
document.showimage.document.close()
document.showimage.left=e.x
document.showimage.top=e.y
document.showimage.visibility="show"
}
else
document.showimage.visibility="hide"
return false
}
//if NOT IE 4+ or NS 4, simply display image in full browser window
else
return true
}

function closepreview(){
crossobj.style.visibility="hidden"
}

//=======mouseover image enlarge end=====================