//--- Form Clear ----------------------------------

function confirmClear(f) {
	var agree =	confirm("Are you sure you want to clear the form?");
	if (agree) {
		eval ("document." + f + ".reset()");
	}
	else {
	}
}

//--- Div Mouseover ----------------------------------

function divSwap(obj, new_style, type) {
	if (type == "class")
		obj.className = new_style;
	else if (type == "id")
		obj.id = new_style;
}

//--- Window Popper ----------------------------------

function popwin(url,name,w,h) {  // no scrollbars, not resizable
	var winW = (screen.width - w) / 2;
	var winH = (screen.height - h) / 2;
	window.open(url,name,'width='+w+',height='+h+',top='+winH+',left='+winW+',toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no');
}

//---
//--- Window Popper Plus ------------------------------
//--- the 'wp' and 'hp' variables add on extra width and height respectively to the total popup window dimensions
//---
function popwinplus(url,name,w,h,wp,hp) {  // no scrollbars, not resizable
	w = w + wp;
	h = h + hp;
	var winW = (screen.width  - w) / 2;
	var winH = (screen.height - h) / 2;
	window.open(url,name,'width='+w+',height='+h+',top='+winH+',left='+winW+',toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no');
}