//
//
// BEGIN functions for pop-up windows

function popwindow(url) {
mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=450');
}

function popwindowtwo(url) {
mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=770,height=450');
}

function vidwindow(url) {
mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=400,height=400');
}

function empvidwindow(url) {
mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=420,height=261');
}

// END functions for pop-up windows
//
//

//
//
// BEGIN function for footer pulldown menu

function pageRedirect(pageForm) {
	var URL = document.pageForm.pageLocation.options[document.pageForm.pageLocation.selectedIndex].value;
	window.location.href = URL;
}

function pageRedirect2(pageForm2) {
	var URL = document.pageForm2.pageLocation.options[document.pageForm2.pageLocation.selectedIndex].value;
	window.location.href = URL;
}

// END function for footer pulldown menu
//
//


//
//
// BEGIN function for href url posting

function urlprotect(page,values)
{
	formelem = document.createElement('form');
	formelem.setAttribute("method","post");
	formelem.setAttribute("action",page);
	formelem.setAttribute("id","urlprotect");
	queryarray = values.split("&");
	var i = 0;
	while (i<queryarray.length)
	{
		attrib = queryarray[i].split("=");
		inputelm = document.createElement('input');
		inputelm.setAttribute("name",attrib[0]);
		inputelm.setAttribute("value",attrib[1]);
		inputelm.setAttribute("type","hidden");
		formelem.appendChild(inputelm);
		i++;
	}
	document.body.appendChild(formelem);
	document.getElementById("urlprotect").submit();
}

// END function for href url posting
//
//

//
//
// BEGIN Profile Forms Functions

function ClearTextbox(checkbox, textbox)
{
	var t = document.getElementsByName(textbox);

     	for (var i = 0; i < t.length; i++) 
	{
		if(!checkbox.checked)
		{
			t[i].value = "";
		}
	}
}
function ClearRadio(checkbox, radio)
{
	var r = document.getElementsByName(radio);

     	for (var i = 0; i < r.length; i++) 
	{
		if(!checkbox.checked)
		{
			r[i].checked=false;
		}
		
	}
}

// END Profile Forms Functions
//
//