
function popWin(url,name,width,height) { // opens a popup Window
			var etc = "menubar=no,scrollbars=auto,resizable=no,width=" + width + ",height=" + height  ;
    window.open(url,name,etc);
}

function showDiv(name){
	document.getElementById(name).style.display="block";
	return;
}
function hideDiv(name){
	document.getElementById(name).style.display="none";
	return;
}



// functions for the selections widget
function toggleDiv(name){
	var theMenu=name;
	var theState=document.getElementById(theMenu).style.display;
	if(theState=="block"){
		hideDiv(theMenu);
	}else{
		showDiv(theMenu);
	}
}

// tool features toggle
function hideAllFeatures(){
	hideDiv('feature_intro');
	hideDiv('feature_a');
	hideDiv('feature_b');
	hideDiv('feature_c');
	hideDiv('feature_d');
	hideDiv('feature_e');
	hideDiv('feature_f');
	hideDiv('feature_g');
	hideDiv('feature_h');
	hideDiv('feature_i');
	hideDiv('feature_j');
	hideDiv('feature_k');
}


// form validation for the mailing list sign up
function checkMailingListForm(){
	var errorStringTemp="";

	
}




// simple email validation
function echeck(str) {

		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		if((str==null)||(str=="")){
/*			alert("Please enter a valid email address...");
			document.getElementById('email').focus();*/
		   return false;
		}
		if (str.indexOf(at)==-1){
		   /*alert("Please enter a valid email address...");
		   document.getElementById('email').focus();*/
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   /*alert("Please enter a valid email address...");
		   document.getElementById('email').focus();*/
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    /*alert("Please enter a valid email address...");
			document.getElementById('email').focus();*/
		    return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		  /*  alert("Please enter a valid email address...");
			document.getElementById('email').focus();*/
		    return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
/*		    alert("Please enter a valid email address...");
			document.getElementById('email').focus();*/
		    return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
/*		    alert("Please enter a valid email address...");
			document.getElementById('email').focus();*/
		    return false;
		 }
		
		 if (str.indexOf(" ")!=-1){
/*		    alert("Please enter a valid email address...");
			document.getElementById('email').focus();*/
		    return false;
		 }

 		 return true;				
}
	
	

