/*Combo Link Box script- By Website Abstraction
    (www.wsabstract.com)
    Over 200+ free JavaScripts here!
	"taking" makes the page update with the selected subject's source types
	"check off" and "clear all" handle the checking/unchecking of the source tick boxes
    */
function taking() {
    location=document.subject.gen_id.options[document.subject.gen_id.selectedIndex].value
    }

function checkOff() {
	document.subject.source0.checked = false;
	}
	
function clearAll() {
	// Find the enclosing div, assign "input" to var check_box, loop through each, set to false
   	var div=document.getElementById('source_types');				
   	var check_box=div.getElementsByTagName('input')			
	   	for (i=0; i<check_box.length;i++) {
		   if (check_box[i].getAttribute('type')=='checkbox') {					
		   check_box[i].checked=false;
		   }
		   else { }
		}
   }
// this function hides the best bets pop-up
function visi(nr)
{
	var vista;
	if (document.layers)
	{
		vista = (document.layers[nr].visibility == 'hide') ? 'show' : 'hide'
		document.layers[nr].visibility = vista;
	}
	else if (document.all)
	{
		vista = (document.all[nr].style.visibility == 'hidden') ? 'visible'	: 'hidden';
		document.all[nr].style.visibility = vista;
	}
	else if (document.getElementById)
	{
		vista = (document.getElementById(nr).style.visibility == 'hidden') ? 'visible' : 'hidden';
		document.getElementById(nr).style.visibility = vista;
	}
}
function OpenWindow(url, name, widgets)
    { popupWin = window.open(url, name, widgets)
     }
function showhide(id){
	if (document.getElementById){
	obj = document.getElementById(id);
		if (obj.style.display == "none"){
		obj.style.display = "";
		} else {
		obj.style.display = "none";
		}
	}
}

