function showNav(area){
	//alert(area);
	if((area!="Help")&&(area!="Home")&&(area!="Members")){
	  document.getElementById('divNavProducts').style.visibility='hidden';
	  document.getElementById('divNavSupport').style.visibility='hidden';
	  document.getElementById('divNavResources').style.visibility='hidden';
	  document.getElementById('divNavAbout').style.visibility='hidden';
	  document.getElementById('divNavNews').style.visibility='hidden';
	  nav="divNav"+area;
		if(document.getElementById(nav)){
		  document.getElementById(nav).style.visibility='visible';
		}
	}
	else if(area=="Home"){
	  document.getElementById('divNavProducts').style.visibility='hidden';
	  document.getElementById('divNavSupport').style.visibility='hidden';
	  document.getElementById('divNavResources').style.visibility='hidden';
	  document.getElementById('divNavAbout').style.visibility='hidden';
	  document.getElementById('divNavNews').style.visibility='hidden';
	}
}

function changeColor(face,state){
	if (document.documentElement){//if browser is IE5+ or NS6+
	  if(state==1){
	    face.style.backgroundColor='#f1f1f1';
	    face.style.color='#000000';
	    face.style.borderColor='#000000';
	  }
	  else{
	    face.style.backgroundColor='#ffffff';
	    face.style.color='#000000';
	    face.style.borderColor='#000000';
	  }
	}
}

function checkLoginForm(){
	if(!document.myForm.username.value){
	  alert("USERNAME cannot be blank");
	  return false;
	}
	if(!document.myForm.password.value){
	  alert("PASSWORD cannot be blank");
	  return false;
	}
}

function checkPostReplyForm(){
	if(!document.myForm.subject.value){
	  alert("You cannot leave the SUBJECT blank.");
	  document.myForm.subject.focus();
	  return false;
	}
	if(!document.myForm.category.value){
	  alert("You cannot leave the CATEGORY blank.");
	  document.myForm.category.focus();
	  return false;
	}
	if(!document.myForm.comments.value){
	  alert("You cannot leave the COMMENTS blank.");
	  document.myForm.comments.focus();
	  return false;
	}
}

function checkFeedbackForm(){
	if(!document.myForm.name.value){
	  alert("You cannot leave your name blank.");
	  document.myForm.name.focus();
	  return false;
	}
	if(!document.myForm.email.value){
	  alert("You cannot leave your email blank.");
	  document.myForm.email.focus();
	  return false;
	}
	if(!document.myForm.message.value){
	  alert("You cannot leave your message blank.");
	  document.myForm.message.focus();
	  return false;
	}
}

function checkNewsletterForm(){
	if(!document.myForm.myname.value){
	  alert("You cannot leave your name blank.");
	  document.myForm.myname.focus();
	  return false;
	}
	if(!document.myForm.company.value){
	  alert("You cannot leave your firm name blank.");
	  document.myForm.company.focus();
	  return false;
	}
	if(document.myForm.discipline.value==0){
	  alert("You cannot leave your discipline blank.");
	  document.myForm.discipline.focus();
	  return false;
	}
	if((document.myForm.discipline.value==2)&&(!document.myForm.disciplineOther.value)){
	  alert("Please specify your discipline in the text field.");
	  document.myForm.disciplineOther.focus();
	  return false;
	}
	if( (!document.myForm.phone1.value) || (!document.myForm.phone2.value) || (!document.myForm.phone3.value) ){
		alert("Please complete your phone number before submitting");
	  document.myForm.phone1.focus();
	  return false;
	}
	if(!document.myForm.email.value){
	  alert("You cannot leave your email blank.");
	  document.myForm.email.focus();
	  return false;
	}
	if(!document.myForm.street.value){
	  alert("You cannot leave your street address blank.");
	  document.myForm.street.focus();
	  return false;
	}
	if(!document.myForm.city.value){
	  alert("You cannot leave your city blank.");
	  document.myForm.city.focus();
	  return false;
	}
	if(!document.myForm.state.value){
	  alert("You cannot leave your state blank.");
	  document.myForm.state.focus();
	  return false;
	}
	if(!document.myForm.zip.value){
	  alert("You cannot leave your zip code blank.");
	  document.myForm.zip.focus();
	  return false;
	}
}

function checkNewsletterFormDiscipline(disc){
	if(disc==2){
		document.getElementById('divOtherDiscipline').style.visibility='visible';
	}
	else{
		document.getElementById('divOtherDiscipline').style.visibility='hidden';
	}
}

function launchPlayer(act,playlist){
    if(screen){
      leftPos=screen.width-786;
      leftPos=(leftPos/2)-5;
      topPos=screen.height-539;
      topPos=(topPos/2)-30;
    }
    url = "http://media.d1tv.net/gateway/open.html?account="+act+"&playlist="+playlist;
    ilsPlayerWin=window.open(url, "ilsPlayerWin", "width=786,height=539,left="+leftPos+",top="+topPos);
}

function launchCalendar(){
    if(screen){
      w = Math.floor(screen.width*.96);
      h = Math.floor(screen.height*.84);
      if(h>730){
	h = 730;
      }
      if(w>1200){
	w = 1200;
      }
      leftPos=screen.width-w;
      leftPos=(leftPos/2)-5;
      topPos=screen.height-h;
      topPos=(topPos/2)-30;
      size = 1;
      if(screen.height>=768){
	size=2;
      }
      if(screen.height>=864){
	size =3;
      }
      url = "/news/calendar.php?s="+size+"&w="+w+"&h="+h;
    }
    ilsCalendarWin=window.open(url, "ilsCalendarWin", "scrolling=yes,scrollbars=yes,width="+w+",height="+h+",left="+leftPos+",top="+topPos);
}

function launchStats(){
	window.open("http://www.ilsdocs.com/admin/stats/frameset.html");
}