function doOnLoad()

{ //if (document.location.hash != "" ) {window.document.location = document.location.hash} //= document.location.hash 
}

lH='/';sH='/'; lC=null;

d = document
dP = d.location.protocol
dPa = d.location.pathname
dLh = d.location.hostname
dLs = d.location.search

if(dP=='file:')
	{	lC=null;}
else if ((dLh.indexOf('192')!=-1) || (dLh.indexOf('81.86')!=-1) || (dLh.indexOf('thinkpad')!=-1) || (dLh.indexOf('pavilion')!=-1))
	{	lH='/';sH='/'; lC=null; }
else if (ReadCookie("admin") != "on")
	{	lC = ".pentagonart.com"
		lH='http://www.pentagonart.com/';
		if (dP=='http:')
			{	sH='http://www.pentagonart.com/';	}
		if((dLh.indexOf('www.pentagonart')==-1)&&(dLh.indexOf('local.pentagonart')==-1)&&(dLh.indexOf('shared')==-1)&&(dLh.indexOf('world')==-1))
			{	//d.location.replace( 'http://www.pentagonart.com'+dPa+dLs); 
			}
	}
localCookie = lC; localHost = lH


function MM_openPop(theURL,winName,features) 
	{ window.open(theURL,winName,features);	}

function ReadCookie (key, skips) 
{
	if (skips == null) {skips = 0}
	var cookie_string = '' + document.cookie;
	var cookie_array = cookie_string . split ('; ');
	for (var i = 0; i < cookie_array . length; ++ i) 
		{var single_cookie = cookie_array [i] . split ('=');
			if (single_cookie . length != 2) {continue}
			var name = unescape (single_cookie [0]);
			var value = unescape (single_cookie [1]);
			if (key == name && skips -- == 0) {return value}
		}
	return 'None';
}

function setExpiry(days)
{	var newExpires = new Date ();
	newExpires.setTime (newExpires.getTime() + days * (24 * 60 * 60 * 1000)); // 1 days from now
	return (newExpires)
}

function SetCookie (name, value) 
	{	var argv = SetCookie.arguments;
		var argc = SetCookie.arguments.length;
		var expires = (argc > 2) ? argv[2] : null;
		var path = (argc > 3) ? argv[3] : null;
		var domain = (argc > 4) ? argv[4] : null;
		var secure = (argc > 5) ? argv[5] : false;
		document.cookie = name + '=' + escape (value) +
		((expires == null) ? '' : ('; expires=' + expires.toGMTString())) +
		((path == null) ? '' : ('; path=' + path)) +
		((domain == null) ? '' : ('; domain=.pentagonart.com')) +
		((secure == true) ? '; secure' : '');
	}
	
function jumpGallery(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function writeEmail(address,clickable) 
	{ 
	sn = "penta"+"gonart"
	sn+= ".com"
	if (clickable == 1) 
		{ 
		document.writeln("<a href='ma"+"ilto:"+(address+"@"+sn)+"'>") 
		}
	document.writeln (address+"@"+sn+"</a>")
	}

