/* include	me like this
<script type="text/javascript" 
	language="JavaScript1.3"
	src="/cinchclub.js">
</script>
*/
function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function checkrequired(which) {

	var signupPage = false;
	var passwd = '';
	var confirmPasswd = '';

	if (document.images) {
		for (i=0; i<which.length; i++) {
			var tempobj=which.elements[i];
			if (tempobj.name.substring(0,8)=="required") {
				if (((tempobj.type=="text" || tempobj.type=="textarea" || tempobj.type=="password")&&
				(tempobj.value=='' || tempobj.value.split(' ').join('').length==0))||
				(tempobj.type.toString().charAt(0)=="s" && tempobj.selectedIndex==0)) {

			      shortFieldName=tempobj.name.substring(8,30).toUpperCase();
							  alert("Please make sure the "+shortFieldName+" field was properly completed.");
							  return false;

						  }
					 else if ( tempobj.type == 'checkbox' )
					  {
						  if ( tempobj.checked == false )
					{
				      shortFieldName=tempobj.name.substring(8,30).toUpperCase();
				      alert("Please make sure the "+shortFieldName+" field was properly selected.");
						return false;
					}
			}	
      	}
		}

			var str = which.requiredEmail.value;
			var at="@";
			var dot=".";
			var lat=str.indexOf(at);
			var lstr=str.length;
			var ldot=str.indexOf(dot);
			if (str.indexOf(at)==-1){
			   alert("Invalid E-MAIL ID");
			   return false;
			}
	
			if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
			   alert("Invalid E-MAIL ID");
			   return false;
			}
	
			if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
			    alert("Invalid E-MAIL ID");
			    return false;
			}
	
			 if (str.indexOf(at,(lat+1))!=-1){
			    alert("Invalid E-MAIL ID");
			    return false;
			 }
	
			 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
			    alert("Invalid E-MAIL ID");
			    return false;
			 }
	
			 if (str.indexOf(dot,(lat+2))==-1){
			    alert("Invalid E-MAIL ID");
			    return false;
			 }
			
			 if (str.indexOf(" ")!=-1){
			    alert("Invalid E-MAIL ID");
			    return false;
			 }
	
	}

	return true;

}

function verifyAnswerForm()	{
			if(document.form1.ques1[0].checked || document.form1.ques1[1].checked )	{
			}else{
				alert("Please select answer for Question #1 ");	
				return false;
			}

			if(document.form1.ques2[0].checked || document.form1.ques2[1].checked )	{
			}else{
				alert("Please select answer for Question #2 ");	
				return false;
			}
			if(document.form1.ques3[0].checked || document.form1.ques3[1].checked )	{
			}else{
				alert("Please select answer for Question #3 ");	
				return false;
			}
			if(document.form1.ques4[0].checked || document.form1.ques4[1].checked )	{
			}else{
				alert("Please select answer for Question #4 ");	
				return false;
			}
			
			if(document.form1.ques5[0].checked || document.form1.ques5[1].checked )	{
			}else{
				alert("Please select answer for Question #5 ");	
				return false;
			}

return true;

}

