/*
This can be used on any element you wish to change CSS classes.
I've left the elementName in the argument in case you want to affect something other than itself.
elementName and event are appended to create the className you are shifting to so make sure your CSS classes are named appropriately.
For example: elementName="TDheader" and event="over" className must equal "TDheaderover"
*/

var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

function chgStyle(id,elementName,event)
{    
    var clss = elementName + event;
    
    if(document.all||document.getElementById)
    {
        id.className = clss;
    }
    
    if(ie5)
    {
        id.style.cursor = "hand";
    }
    if(ns6)
    {
        id.style.cursor = "pointer";
    }
}

<!-- 

/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

//-->

<!-- 

var win = null;
function imageWindow(url,name)
{
    LeftPosition = (screen.width) ? (screen.width-640)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-480)/2 : 0;
    settings = 'height=480,width=640,top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable'
    win = window.open(url,name,settings)
}

// -->

<!-- 

/*
title:  getURLVar
author: statik
description: returns the value of a parameter
date last modified: 06.2002
*/

function getURLVar(param)
{
    // init vars
    var href = location.href;
    var workingParam = param + "=";
    var varValue = "";
    var hrefString = href.indexOf(workingParam);
    
    // get value
    if (hrefString != -1)
    {
        hrefString += workingParam.length;
        end = href.indexOf("&amp;", hrefString);    // if using '&' instead of '&amp;' then change string here
        if (end == -1) end = href.length;
        varValue = href.substring(hrefString, end);
    }
    else
    {
	varValue ="false";    // give some sort of error to check if var not found
    }

    return varValue;    // return the value;
}

 function sizeUp()
{
    if(navigator.appName == 'Microsoft Internet Explorer')
    {
        a = 30;
        b = 0;
    }
    else if(navigator.appName == 'Netscape')
    {
        a = 30;
        b = 10;
    }
    else 
    {
    a = 0;
    b = 0;
    }
    

iWidth = document.images[0].width;
iHeight = document.images[0].height;
LeftPos = (screen.width) ? (screen.width-iWidth)/2 : 0;
TopPos = (screen.height) ? (screen.height-iHeight)/2 : 0;

    self.resizeTo(iWidth + b, iHeight + a);
    self.moveTo(LeftPos, TopPos);
    
}

/*
title:  loadImageFile
author: statik
description: loads the file specified by the image value returned from getURLVar
date last modified: 06.2002

eg. http://www.mydomain.com/mypage.html?image=myimage.jpg


just call loadImageFile(imageName); to roll that beautiful bean footage

*/

function loadImageFile(imageName)
{
    var fileName = getURLVar("image");
	if(document.images && fileName != "false")
	{
	   document[imageName].src = fileName;
       
       
	}
	else
	{
	   document.write("<br /> Unable to load image. <br />");    // user friendly error
	}
}


// end

// -->

<!--

/*
Check for required email in submission forms
*/

function checkEmail()
{
emailAdd = document.forms[0].email.value;
    if(emailAdd=='')
    {
    alert('Please enter a valid email address.');
    event.returnValue=false;
    }
}

//-->
