$(document).ready(function(){
	$("#myController").jFlow({
		slides: "#mySlides",
		width: "566px",
		height: "200px",
		duration: 400
	});
});

var prevX = 'sub_navs_tab1'; 
var prevY = 'sub_navs_tab1a'; 
function do_highlight(nameX,nameY) 
{ 
	if(prevX){
		document.getElementById(prevX).style.display = 'block';
		document.getElementById(prevY).style.display = 'none';
	}	
	document.getElementById(nameX).style.display = 'none';
	document.getElementById(nameY).style.display = 'block';
	prevX = nameX;
	prevY = nameY; 
}

function addBookmark(title,url) {
   if (window.sidebar) {
	window.sidebar.addPanel(title, url,""); }
	else if( document.all ) {
	   window.external.AddFavorite( url, title); }
	else if( window.opera && window.print ) {
	   return true; }
}

function Validate(theForm) {
   if (theForm.term.value == "") {
      alert("Please enter a single or multiple keywords to search.");
      theForm.term.focus();
      return false; }
   theForm.Action.value="Submit";
   theForm.submit(); }

function Validate_Dom() {
   var entry=document.Search.domain.value.toLowerCase();
   var el=entry.length;
   if ((entry.charAt(0)==" ") || (entry.charAt(0)=="-") || (entry.charAt(el-1)=="-") || (entry.length==0) || (entry.length>60)) {
      alert("Sorry, you have not entered a valid Domain Name! Domain names can be from 1 to 60 characters in length, contain letters A-Z, numbers 0-9, or hyphens (-), but cannot begin or end with a hyphen, nor contain any white spaces between characters.");
      document.Search.domain.focus();
      return false; }
   for (var i=el-1; i>=0; i--) {
      if (entry.charAt(i)==" ") entry=entry.replace(entry.charAt(i), ""); }
   re=/^[a-zA-Z0-9\-]+\.[a-zA-Z]{2,4}(\.[a-zA-Z]{2})?$/i;
   if (!entry.match(re)) {
      alert('Sorry, '+entry+' is not a valid Domain Name! Domain names can be from 1 to 60 characters in length, contain letters A-Z, numbers 0-9, or hyphens (-), but cannot begin or end with a hyphen, nor contain any white spaces between characters. Please do not enter the www. prefix before the domain name!');
      document.Search.domain.focus();
      return false; }
   document.Search.Action.value="Submit";
   return true; }

