// utils.js - javascript utilities for www.goth.net pages.

var browserName=navigator.appName; 
var browserVer=parseInt(navigator.appVersion);

if ((browserName=="Netscape" && browserVer>=3) || (browserName=="Microsoft Internet Explorer" && browserVer>=4))    
	version="n3";
else
	version="n2";

if (version=="n3")
{
     pic1on= new Image(122,30);
     pic1on.src="images/about02.gif";  
     pic2on= new Image(77,30); 
     pic2on.src="images/news02.gif"; 
     pic3on= new Image(124,30); 
     pic3on.src="images/members2.gif"; 
     pic4on= new Image(140,29); 
     pic4on.src="images/community2.gif"; 
     pic5on= new Image(98,30); 
     pic5on.src="images/goth02.gif"; 
     pic6on= new Image(123,29); 
     pic6on.src="images/writings2.gif"; 
     pic7on= new Image(63,29); 
     pic7on.src="images/art02.gif"; 
     pic8on= new Image(76,29); 
     pic8on.src="images/chat2.gif"; 
     pic9on= new Image(103,29); 
     pic9on.src="images/forums02.gif"; 
     pic10on= new Image(128,30); 
     pic10on.src="images/sponsors2.gif"; 
     pic11on= new Image(74,30);
     pic11on.src="images/links02.gif";
     pic12on= new Image(140,29);
     pic12on.src="images/awards02.gif";
     pic13on= new Image(63,29);
     pic13on.src="images/faq2.gif";
     pic14on= new Image(93,30);
     pic14on.src="images/home2.gif";

     pic1off= new Image(122,30);
     pic1off.src="images/about01.gif";
     pic2off= new Image(77,30);
     pic2off.src="images/news01.gif";   
     pic3off= new Image(124,30);
     pic3off.src="images/members01.gif";
     pic4off= new Image(140,29);
     pic4off.src="images/community01.gif";
     pic5off= new Image(98,30);
     pic5off.src="images/goth01.gif";
     pic6off= new Image(123,29);
     pic6off.src="images/writings01.gif";
     pic7off= new Image(63,29);
     pic7off.src="images/art01.gif";
     pic8off= new Image(76,29);
     pic8off.src="images/chat01.gif";
     pic9off= new Image(103,29);
     pic9off.src="images/forums01.gif"; 
     pic10off= new Image(128,30);
     pic10off.src="images/sponsors01.gif"; 
     pic11off= new Image(74,30);
     pic11off.src="images/links01.gif";
     pic12off= new Image(140,29);
     pic12off.src="images/awards01.gif";
     pic13off= new Image(63,29);
     pic13off.src="images/faq01.gif";
     pic14off= new Image(93,30);
     pic14off.src="images/home01.gif";
}

function lightup(imgName)
{
	if (version=="n3")
	{
		imgOn=eval(imgName + "on.src");
		document[imgName].src= imgOn;
	}
}

function turnoff(imgName)
{
	if (version=="n3")
	{
		imgOff=eval(imgName + "off.src");
		document[imgName].src= imgOff;
	}
}

//  Function openWindow()
//  - imgPage:   html page which is loaded in the new window
//  - imgName:   name of the image (not filename)
//  - imgWidth:  width of the image (actually, the width of the new window)
//  - imgHeight: height of the image (actually, the width of the new window)
//
function openWindow(imgPage, imgName, imgWidth, imgHeight)
{
	window.open(	imgPage, 
			imgName, 
			'width=' + width + ',height=' + height + 		',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');

}


function hideLinkLines()
{
if(document.getElementsByTagName)
{
el = document.getElementsByTagName('a')
for(i=0;i<el.length;i++)
{
el[i].onfocus = function() { this.blur() }
}
delete el
}
}
onload = hideLinkLines


/*
Submit Once form validation- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
