var width = "100";
var offsetx = 0;
var offsety = 25;
var height = 0;	

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0) {
		ie5 = true;
	} else {
		ie5 = false; }
} else {
	ie5 = false;
}

var x =570;
var y = 145;
var snow = 0;
var sw = 0;
var cnt = 0;
var dir = 1;

if ( (ns4) || (ie4) ) {
	if (ns4) over = document.overDiv;
	if (ie4) over = overDiv.style;
}

// Clears popups if appropriate
function nd() 
{
//	alert ('in Nd');
	if ( cnt >= 1 ) { sw = 0 };
	if ( (ns4) || (ie4) ) 
	{
		if ( sw == 0 ) 
		{
			snow = 0;
			hideObject(over);
			window.status='KR SandStone';
		} 
		else 
		{
			cnt++;
		}
	}
}

// Create popup
function dtc() 
{
//	alert('in dtc');
//	x=(window.screen.width-393)+(nPos);
	txt = "<table border=1 cellspacing=0 cellpadding=0><tr><td><a href=marble1.asp>Marble</a></td></tr><tr><td valign=top><a href=sandstone1.asp>Sand Stone</a></td></tr><tr><td valign=top>Kota Stone</td></tr><tr><td valign=top>Silica Stone</td></tr></table>"
	layerWrite(txt);
	disp();
	window.status="KR SandStone";
	return height;
}

function disp() {
//	alert('in disp');
	if ( (ns4) || (ie4) ) {
		if (snow == 0) 	{
			moveTo(over,x,y-(offsety+height));
			//moveTo(over,x,y);
		}		
		showObject(over);
		snow=1;
		this.height=height;
	}
}


// Writes to a layer
function layerWrite(txt) {
//	alert('in layer Write');
        if (ns4) {
                var lyr = document.overDiv.document
                lyr.write(txt)
                lyr.close()
        }
        else if (ie4) document.all["overDiv"].innerHTML = txt
}

// Make an object visible
function showObject(obj) {
//	alert('in show Object');
        if (ns4) obj.visibility = "show"
        else if (ie4) obj.visibility = "visible"
}

// Hides an object
function hideObject(obj) {
//	alert('in hide Object');
        if (ns4) obj.visibility = "hide"
        else if (ie4) obj.visibility = "hidden"
}


// Move a layer
function moveTo(obj,xL,yL) {
//	alert('in move To');
//	alert('xl = ' + xL + 'yl = ' + yL);
	obj.left = xL
	obj.top = yL
	
}

function MouseMove()
{
	if(!(event.x>540 && event.x<645) ||  !(event.y>95 && event.y<210) ) 
	{
//		alert('hide');	
		hideObject(over);
	}

}
if (document.layers) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=MouseMove;
//document.onmouseover=MouseMove;


function ShowPopUp()
{
//	alert('in show pop up');
//	alert('x= ' + event.x);
//	alert('y=' + event.y);
	nd();
	dtc(); 
	return true;
}