/* ====================================================
//MM pop up functions etc
==================================================== */


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
 /* Functions that shows hides layer. */
function MM_findObj(n, d) { //v3.0
  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]; if(!(x=d[n])&&d.getElementById) x=d.getElementById(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); return x;
}


function MM_showHideLayers() {
  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 launchwin(url, scrollo) {
    var larg_schermo = screen.availWidth - 10;
    var altez_schermo = screen.availHeight - 120;
    window.open(url, "WindowName", "width=" + larg_schermo + ",height=" + altez_schermo + ",top=0,left=0,scrollbars=" + scrollo + "");
}




/* ====================================================
General Site variables script
==================================================== */

defaultStatus		= 'www.glennspace.com';
pagelink		= document.location
pagename		= document.title
email			= '<a href="mailto:me@glennspace.com?subject=Glennspace%20comment"><span class="smallgrey"><u>me@glennspace.com</u></span></a>'
rightfoot			= 'Coded in <a href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.glennspace.com&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.1">valid XHTML</a> and <a href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.glennspace.com/glennspace3.css&amp;profile=css21&amp;usermedium=all&amp;warning=1&amp;vextwarning=&amp;lang=en">valid CSS</a>'
yearc			= '2010'

/* ====================================================
BOOKMARK tool
==================================================== */

function bookmark()

{
	if (window.external)
	{
	external.AddFavorite(pagelink,pagename)
	}
	
	else if(navigator.appName == "Netscape")
	{
	alert('press control and D now!')
	}

	else if(navigator.appName == "Opera")
	{
	alert('press control and T now!')
	}
}

/* ====================================================
RND FUNC
==================================================== */

function GetRandom(start,end)
{
  var range = end - start + 1;
  var result = start + Math.floor(Math.random()*range);
  return result;
}

/* ====================================================
RND IMG
==================================================== */

function randimage() {
	
	var choice = GetRandom(1,4);
				
				if (choice==1)
  					document.write('<img src="gfx11/jedi.gif" height="483" width="304" alt="Jedi cartoon character" />');
					
				else if (choice == 2)
  					document.write('<img src="gfx11/arthurdaley.jpg" height="483" width="304" alt="Arthur Daley - cyborg guitarist with comedy act Mandro1d" />');
					
				else if (choice == 3)
  					document.write('<img src="gfx11/warpdj.jpg" height="483" width="304" alt="DJ Glenn" />');
					
				else if (choice == 4)
  					document.write('<img src="gfx11/astralglenn.jpg" height="483" width="304" alt="Glenn - Space" />');
}
