if (document.all) {
yMax = document.body.clientHeight
xMax = document.body.clientWidth
}

else if (document.layers||document.getElementById) {
yMax = window.innerHeight;
xMax = window.innerWidth-14
}

if (yMax>560)
head();

function head() {
if (xMax<912)
document.write ("<table cellpadding=\"0\" cellspacing=\"0\" width=\"780\" background=\"dir/b/head.gif\" height=\"60\"><tr><td width=\"100%\">&nbsp;</td></tr></table>\r\n");
else
document.write ("<table cellpadding=\"0\" cellspacing=\"0\" width=\"910\" background=\"dir/b/head.gif\" height=\"60\"><tr><td width=\"100%\">&nbsp;</td></tr></table>\r\n");
}


var browserName=navigator.appName;
var expiration=new Date();
var version=parseFloat(navigator.appVersion); 
expiration.setTime(expiration.getTime()+120000);
var curCookie="java=1; expires=" + expiration.toGMTString()+";";
document.cookie=curCookie;

var strMesgX;
var strMesgY;

function report_key(e){
strMesgX=e.x;
strMesgY=e.y;
}

if ((browserName.indexOf('Netscape')>=0) && (version<5)) value1="nav=0";
else if (browserName.indexOf('Netscape')>=0) value1="nav=1";
else value1="nav=2";

var navCookie=value1+"; expires=" + expiration.toGMTString()+";";
document.cookie=navCookie;

var width=0;
var DHTML_texts=new Array(
"<table border=0 cellpadding=0 cellspacing=0 width=100% height=1 bgcolor=#524E5F><tr><td></td></tr></table>" + 
"<div><a href=http://www.sgallery.net/dir/new/>New Additions &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</a></div>" +
"<div><a href=http://www.sgallery.net/dir/g1/>Spring &nbsp; Landscape &nbsp; </a></div>" + 
"<div><a href=http://www.sgallery.net/dir/g2/>Summer Landscape &nbsp; </a></div>" + 
"<div><a href=http://www.sgallery.net/dir/g3/>Autumn Landscape &nbsp;</a></div>" + 
"<div><a href=http://www.sgallery.net/dir/g4/>Winter &nbsp; Landscape &nbsp; </a></div>" +
"<div><a href=http://www.sgallery.net/dir/g5/>Seascape &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" + 
"<div><a href=http://www.sgallery.net/dir/g6/>Still-Life & Floral &nbsp; &nbsp; &nbsp; </a></div>" + 
"<div><a href=http://www.sgallery.net/dir/g7/>Animals or Wildlife &nbsp; </a></div>" + 
"<div><a href=http://www.sgallery.net/dir/g8/>Portrait or Figure &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=http://www.sgallery.net/dir/g9/>Miniature &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=http://www.sgallery.net/dir/dm/>Demo &nbsp;  &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>",

"<table border=0 cellpadding=0 cellspacing=0 width=100% height=1 bgcolor=#524E5F><tr><td></td></tr></table>" + 
"<div><a href=http://www.sgallery.net/dir/inf/apainting.html>About Painting&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=http://www.sgallery.net/dir/inf/index.html>Contact Info &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=http://www.sgallery.net/dir/gbook/index.html>Guestbook &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=http://www.sgallery.net/dir/inf/bio.html>Biography &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=http://www.sgallery.net/dir/inf/map.html>Site Guide &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</a></div>" +
"<div><a href=http://www.sgallery.net/dir/inf/copyright.html>Copyright &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=mailto:&#105;&#110;&#102;&#111;&#64;&#115;&#103;&#97;&#108;&#108;&#101;&#114;&#121;&#46;&#110;&#101;&#116;>Email&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=http://www.sgallery.net/dir/inf/faq.html>FAQ&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</a></div>",





"<table border=0 cellpadding=0 cellspacing=0 width=100% height=1 bgcolor=#524E5F><tr><td></td></tr></table>" + 
"<div><a href=http://www.sgallery.net/dir/sale/htb.html>How to Buy &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" + 
"<div><a href=http://www.sgallery.net/dir/sale/ds.html>Direct Sale &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" + 
"<div><a href=http://www.sgallery.net/dir/sale/sh.html>Shipping &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" + 
"<div><a target=new href=http://search.ebay.com/search/search.dll?cgiurl=http%3A%2F%2Fcgi.ebay.com%2Fws%2F&krd=1&from=R8&MfcISAPICommand=GetResult&ht=1&SortProperty=MetaEndSort&query=soryn>Auction Sale &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>",

"<table border=0 cellpadding=0 cellspacing=0 width=100% height=1 bgcolor=#524E5F><tr><td></td></tr></table>" + 
"<div><a href=links01.htm>Art Galleries &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=links02.htm>Top Sites &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=links03.htm>Artists &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=links04.htm>Digital Art &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=links05.htm>Photo Sites &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=links06.htm>Web Design &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>" +
"<div><a href=links07.htm>Art Directories / Resources</a></div>" +
"<div><a href=http://directory.sgallery.net/submit.php>Add Your Link to Art-Links Directory</a></div>",

"<table border=0 cellpadding=0 cellspacing=0 width=100% height=1 bgcolor=#524E5F><tr><td></td></tr></table>" + 
"<div><a href=http://directory.sgallery.net/submit.php>Submit Your Site / Link To Us</a></div>",

"<div><a href=mailto:&#105;&#110;&#102;&#111;&#64;&#115;&#103;&#97;&#108;&#108;&#101;&#114;&#121;&#46;&#110;&#101;&#116;>Email&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </a></div>");

if (self.screen) {width=screen.width;} else if (self.java) {var jkit=java.awt.Toolkit.getDefaultToolkit(); var scrsize=jkit.getScreenSize(); width=scrsize.width;}




if (yMax<560) {
var gposY=new Array(20,20,20,20,159,460);
var gHeight=new Array(0,0,0,0,0,0);
}

if (xMax<908) {
var gposX=new Array(200,320,440,560,560,380);
var gWidth=new Array(120,120,120,120,120,120);
}

if (yMax>=560) {
var gposY=new Array(76,76,76,76,219,520);
var gHeight=new Array(0,0,0,0,0,0);
}

if (xMax>=908) {
var gposX=new Array(140,270,400,530,480,310);
var gWidth=new Array(120,120,120,120,120,120);
}


var mainTableWidth=750;

if (browserName.indexOf('Netscape')>=0) {
v  = ".top";
l  = ".left";
dS = "document.";
sD = "";
y  = "window.pageYOffset";
iW = "window.innerWidth";
iH = "window.innerHeight";
oW = -8;
}
else {
v  = ".pixelTop";
l  = ".pixelLeft";
dS = "";
sD = ".style";
y  = "document.body.scrollTop";
iW = "document.body.clientWidth";
iH = "document.body.clientHeight";
iH2 = "document.body.clientHeight";
oW = 0;
}

var dhtml         = null; // Our layer
var isOver        = true;
var myTimer       = setTimeout("HideDHTML()",300);
var intCurrent    = -1;
var intNew        = -2;

var ns4 = (document.layers)? true:false
var ie4 = (document.all)? true:false

if ((ns4) || (ie4)) {
} else {
	PopUp = no_PopUp;
}

function no_PopUp() {
	return true;
}

function PopUp() {
	clearTimeout(myTimer);
	intNew = arguments[0]
	if (intCurrent!=intNew) {
		intCurrent=intNew;
		var m_frame=self;
		var m_height="height="+gHeight[intNew];
		var m_width="width="+gWidth[intNew];
		var m_text=DHTML_texts[intNew];
		var layerhtml="<table "+m_width+" border=0 cellpadding=1 cellspacing=0 bgcolor=#1F3A58 "+m_height+"><tr><td><table width=100% border=0 cellpadding=2 cellspacing=0 bgcolor=#f0f0e0 "+m_height+"><tr><td valign=top>"+m_text+"</td></tr></table></td></tr></table>";	
		if (ns4) {dhtml=m_frame.document.DHTLMenu;}
		if (ie4) {dhtml=m_frame.DHTLMenu.style;}
		SetPosition(intNew);
		dhtml.onmouseover=OverDHTML;
		dhtml.onmouseout=OutDHTML;
		OverDHTML();
		if (ns4) {
			var lyr=dhtml.document;
			lyr.write(layerhtml);
		  	lyr.close();
		  	dhtml.visibility="show";
		} else if (ie4) {
			m_frame.document.all["DHTLMenu"].innerHTML=layerhtml;
			dhtml.visibility="visible";
		}
		return true;
	}
}

function SetPosition(id) {
	var j=eval(iW);
	var posX=0;
	var posY=0;
	
	if (j<=mainTableWidth) {j=2}
	else {j=((j-mainTableWidth)/2)+oW;}
	if (j<2) {j=2;}
	posX=gposX[id]+j;
	var j1=eval(iH);
	var j2=eval(y);
	var j3=j1+j2;
	var j4=gposY[id];
	var j5=j1+j2-j4;
	var j6=gHeight[id];
	var j7=j4-j2;
  	var j8=j4;
	
	if ((j5<j6) && (j5<j7)) {j8=j4-j6-30;}
	if (j8<0) {j8=0;}
	
	posY=j8;
	
	dhtml.left=posX;
  	dhtml.top=posY;
}

function HideDHTML() {
	if (!isOver) { 
		intCurrent=-2;
		if (ns4 && dhtml) {dhtml.visibility = "hide";}
		else if (ie4 && dhtml) {dhtml.visibility = "hidden";}
	}
}

function OverDHTML() { 
	clearTimeout(myTimer); 
	isOver=true; 
}

function OutDHTML() { 
	clearTimeout(myTimer);
	isOver=false; 
	myTimer=setTimeout("HideDHTML()",500);
}
