<!--
function openWin( windowURL, windowName, windowFeatures ) {
	// default to this dimension if no dimension specified
	if ( windowFeatures == "" ) {
		windowFeatures = "width=600,height=401,toolbar=0,location=0,directories=0,status=1,menuBar=0,scrollBars=1,resizable=1,left=120, top=80"
	}
	newWindow = window.open( windowURL, windowName, windowFeatures ) ; 
	newWindow.focus();
	//return newWindow; 
} 
// -->

<!-- start hiding script
// no popup window <select onChange="jumpHere( this, false )">
// with popup window <select onChange="jumpHere( this, true )">
function jumpHere (which, win)
{
	n = which.selectedIndex;
	var URL = which.options[which.selectedIndex].value;
	if (win){
		openWindow(URL);
	}
	else{
		window.location.href = URL;
	}
}

/*
 * returns the value of the selected item from the select_id provided
 */
function getSelectValue( select_id )
{
	var oSelect = document.getElementById(select_id);
	
	return oSelect.options[oSelect.selectedIndex].value;
}

/*
 * returns an array with the associative 'text' and 'value' for each selected item 
 * from the select_id provided
 */
function getMultipleSelectValue( select_id )
{
	var oSelect = document.getElementById(select_id);
	var selectedItems = new Array();
	var count = 0;
	
	for(var i=0; i<oSelect.options.length; i++)
	{
		if(oSelect.options[i].selected == true)
		{
			selectedItems[count] = new Array();
			selectedItems[count]['value'] = oSelect.options[i].value;
			selectedItems[count]['text'] = getText(oSelect.options[i]);
			count++;
		}
	}	
	
	if( checked_items.length > 0)
	{
		return selectedItems;
	}
	else
	{
		return false; //nothing checked
	}
}

/*
 * returns the value of the radio item selected, or returns FALSE if none was selected
 * from the radio_name provided
 */
function getRadioValue( radio_name )
{
	var temp_obj = document.getElementsByName(radio_name);
	for (var i=0; i<temp_obj.length; i++) 
	{
		if(temp_obj[i].checked == true)
		{
			return temp_obj[i].value ;
		}
	}
	return false; //nothing checked
}

/*
 * returns the value of the text item selected, or returns FALSE if blank
 * from the text_name provided
 */
function getTextValue( text_name )
{
	var temp_obj = document.getElementById(text_name);
	if(  (temp_obj.value==null) || temp_obj.value == '' )
	{
		return false; //nothing checked
	}
	else
	{
			return temp_obj.value
	}
}


/*
 * returns an array of the values of checkboxes that have been checked
 * from the checkbox_name provided
 */
function getCheckboxValue( checkbox_name )
{
	var temp_obj = document.getElementsByName(checkbox_name);
	var checked_items = new Array();
	var count = 0;
	
	for (var i=0; i<temp_obj.length; i++) 
	{
		if(temp_obj[i].checked == true)
		{
			return temp_obj[i].value ;
			
			checked_items[count] = new Array();
			checked_items[count]['value'] = temp_obj[i].value;
			count++;
		}
	}
	
	if( checked_items.length > 0)
	{
		return checked_items;
	}
	else
	{
		return false; //nothing checked
	}
}

function getText(obj)
{
		tmp_text = obj.innerText;
		if(  (tmp_text==null) || tmp_text.length == '' )
		{
			tmp_text = obj.textContent;
		}
		
		return tmp_text;
}

function isEmpty(aInput, aType) 
{
	if( aType == 'text')
	{
		if ( (aInput.value.length==0) ||  (aInput.value==null) ) 
		{
			return true;
		}
		else 
		{
			return false; 
		}
	}
	
	if( aType == 'checkbox')
	{
		if( aInput.checked == false )
		{
			return true;
		}
		else 
		{
			return false; 
		}
	}
}	

function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 

function currentOpac(id, opacEnd, millisec) {
    //standard opacity is 100
    var currentOpac = 100;
    
    //if the element has an opacity set, get it
    if(document.getElementById(id).style.opacity < 100) {
        currentOpac = document.getElementById(id).style.opacity * 100;
    }
    //call for the function that changes the opacity
    opacity(id, currentOpac, opacEnd, millisec)
} 
function shiftOpacity(id, millisec) {
    //if an element is invisible, make it visible, else make it ivisible
    if(document.getElementById(id).style.opacity == 0) {
        opacity(id, 0, 100, millisec);
    } else {
        opacity(id, 100, 0, millisec);
    }
} 
// end hiding scrupt 

// http://bontragerconnection.com/ and http://willmaster.com/
// Version: July 28, 2007
var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
function AssignPosition(d) {
if(self.pageYOffset) {
	rX = self.pageXOffset;
	rY = self.pageYOffset;
	}
else if(document.documentElement && document.documentElement.scrollTop) {
	rX = document.documentElement.scrollLeft;
	rY = document.documentElement.scrollTop;
	}
else if(document.body) {
	rX = document.body.scrollLeft;
	rY = document.body.scrollTop;
	}
if(document.all) {
	cX += rX; 
	cY += rY;
	}
d.style.left = (cX+10)-599 + "px";
d.style.top = (cY+10)-100 + "px";
}
function HideContent(d) {
if(d.length < 1) { return; }
shiftOpacity(d, 500);
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
dd.style.display = "block";
shiftOpacity(d, 500);
}
function ReverseContentDisplay(d) {
	if(d.length < 1) { return; }
	var dd = document.getElementById(d);
	AssignPosition(dd);
	if(dd.style.display == "none") { 
		dd.style.display = "block"; 
		opacity(d, 0, 100, 500);
	} else { 
		opacity(d, 100, 0, 500);
		setTimeout("document.getElementById('" + d + "').style.display = 'none';", 550);
	}
}
-->
