/* Newsletter opt-in (on Resource Library forms) */
function newsletterOptIn() {
	if (document.subcheck.subscription.checked == false) {
		document.subcheck.subscription.checked = false;
		document.subcheck.subscription.value = '0';
		document.registerlibrary.newsletter.value = '0';
		document.loginlibrary.newsletter.value = '0';
	}
	else {
		document.subcheck.subscription.checked= true;
		document.subcheck.subscription.value = '1';
		document.registerlibrary.newsletter.value = '1';
		document.loginlibrary.newsletter.value = '1';
	}
	
	//alert(document.loginlibrary.newsletter.value);
}

/* NewWindow popup functionality */
function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function openVideoWin(href) {
	NewWindow(href, 'video', '401', '358', 'no');
}

function jumpMenu(targ,selObj,restore) 
{
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/* Used to show and hide elements */
function removeDiv(whichDiv){
	document.getElementById(whichDiv).style.display = 'none';
}

function displayDiv(whichDiv){
	document.getElementById(whichDiv).style.display = 'block';
}

